meshai/meshai/dashboard/static/assets/index-D0VjptvK.js
Matt Johnson (via Claude) fa8553a1e0 refactor(dashboard): move Central Connection to dedicated tab
- Add 'Central' as first tab in FAMILIES array (before Weather)
- Import Server icon from lucide-react
- Remove Central Connection card from header area
- Render Central config in its own tab panel (no adapter sub-tabs)

The Central tab now shows URL, Durable, and Region fields with the
enabled toggle, matching the previous inline card behavior.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-06-06 20:18:34 +00:00

543 lines
2.1 MiB
Raw Blame History

This file contains invisible Unicode characters

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

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

function Loe(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var hg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ft(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var c7={exports:{}},hS={},f7={exports:{}},yt={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Uy=Symbol.for("react.element"),Ioe=Symbol.for("react.portal"),Ooe=Symbol.for("react.fragment"),Eoe=Symbol.for("react.strict_mode"),Doe=Symbol.for("react.profiler"),Noe=Symbol.for("react.provider"),joe=Symbol.for("react.context"),Roe=Symbol.for("react.forward_ref"),Boe=Symbol.for("react.suspense"),zoe=Symbol.for("react.memo"),$oe=Symbol.for("react.lazy"),s5=Symbol.iterator;function Foe(e){return e===null||typeof e!="object"?null:(e=s5&&e[s5]||e["@@iterator"],typeof e=="function"?e:null)}var h7={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},d7=Object.assign,v7={};function hv(e,t,r){this.props=e,this.context=t,this.refs=v7,this.updater=r||h7}hv.prototype.isReactComponent={};hv.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};hv.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function p7(){}p7.prototype=hv.prototype;function uE(e,t,r){this.props=e,this.context=t,this.refs=v7,this.updater=r||h7}var cE=uE.prototype=new p7;cE.constructor=uE;d7(cE,hv.prototype);cE.isPureReactComponent=!0;var l5=Array.isArray,g7=Object.prototype.hasOwnProperty,fE={current:null},m7={key:!0,ref:!0,__self:!0,__source:!0};function y7(e,t,r){var n,i={},a=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(a=""+t.key),t)g7.call(t,n)&&!m7.hasOwnProperty(n)&&(i[n]=t[n]);var s=arguments.length-2;if(s===1)i.children=r;else if(1<s){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(n in s=e.defaultProps,s)i[n]===void 0&&(i[n]=s[n]);return{$$typeof:Uy,type:e,key:a,ref:o,props:i,_owner:fE.current}}function Voe(e,t){return{$$typeof:Uy,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function hE(e){return typeof e=="object"&&e!==null&&e.$$typeof===Uy}function Goe(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var u5=/\/+/g;function HC(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Goe(""+e.key):t.toString(36)}function H_(e,t,r,n,i){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(a){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Uy:case Ioe:o=!0}}if(o)return o=e,i=i(o),e=n===""?"."+HC(o,0):n,l5(i)?(r="",e!=null&&(r=e.replace(u5,"$&/")+"/"),H_(i,t,r,"",function(u){return u})):i!=null&&(hE(i)&&(i=Voe(i,r+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(u5,"$&/")+"/")+e)),t.push(i)),1;if(o=0,n=n===""?".":n+":",l5(e))for(var s=0;s<e.length;s++){a=e[s];var l=n+HC(a,s);o+=H_(a,t,r,l,i)}else if(l=Foe(e),typeof l=="function")for(e=l.call(e),s=0;!(a=e.next()).done;)a=a.value,l=n+HC(a,s++),o+=H_(a,t,r,l,i);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function X0(e,t,r){if(e==null)return e;var n=[],i=0;return H_(e,n,"","",function(a){return t.call(r,a,i++)}),n}function Woe(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Kn={current:null},U_={transition:null},Hoe={ReactCurrentDispatcher:Kn,ReactCurrentBatchConfig:U_,ReactCurrentOwner:fE};function x7(){throw Error("act(...) is not supported in production builds of React.")}yt.Children={map:X0,forEach:function(e,t,r){X0(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return X0(e,function(){t++}),t},toArray:function(e){return X0(e,function(t){return t})||[]},only:function(e){if(!hE(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};yt.Component=hv;yt.Fragment=Ooe;yt.Profiler=Doe;yt.PureComponent=uE;yt.StrictMode=Eoe;yt.Suspense=Boe;yt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Hoe;yt.act=x7;yt.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=d7({},e.props),i=e.key,a=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,o=fE.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)g7.call(t,l)&&!m7.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){s=Array(l);for(var u=0;u<l;u++)s[u]=arguments[u+2];n.children=s}return{$$typeof:Uy,type:e.type,key:i,ref:a,props:n,_owner:o}};yt.createContext=function(e){return e={$$typeof:joe,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Noe,_context:e},e.Consumer=e};yt.createElement=y7;yt.createFactory=function(e){var t=y7.bind(null,e);return t.type=e,t};yt.createRef=function(){return{current:null}};yt.forwardRef=function(e){return{$$typeof:Roe,render:e}};yt.isValidElement=hE;yt.lazy=function(e){return{$$typeof:$oe,_payload:{_status:-1,_result:e},_init:Woe}};yt.memo=function(e,t){return{$$typeof:zoe,type:e,compare:t===void 0?null:t}};yt.startTransition=function(e){var t=U_.transition;U_.transition={};try{e()}finally{U_.transition=t}};yt.unstable_act=x7;yt.useCallback=function(e,t){return Kn.current.useCallback(e,t)};yt.useContext=function(e){return Kn.current.useContext(e)};yt.useDebugValue=function(){};yt.useDeferredValue=function(e){return Kn.current.useDeferredValue(e)};yt.useEffect=function(e,t){return Kn.current.useEffect(e,t)};yt.useId=function(){return Kn.current.useId()};yt.useImperativeHandle=function(e,t,r){return Kn.current.useImperativeHandle(e,t,r)};yt.useInsertionEffect=function(e,t){return Kn.current.useInsertionEffect(e,t)};yt.useLayoutEffect=function(e,t){return Kn.current.useLayoutEffect(e,t)};yt.useMemo=function(e,t){return Kn.current.useMemo(e,t)};yt.useReducer=function(e,t,r){return Kn.current.useReducer(e,t,r)};yt.useRef=function(e){return Kn.current.useRef(e)};yt.useState=function(e){return Kn.current.useState(e)};yt.useSyncExternalStore=function(e,t,r){return Kn.current.useSyncExternalStore(e,t,r)};yt.useTransition=function(){return Kn.current.useTransition()};yt.version="18.3.1";f7.exports=yt;var G=f7.exports;const ee=Ft(G),Uoe=Loe({__proto__:null,default:ee},[G]);/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Zoe=G,Yoe=Symbol.for("react.element"),Xoe=Symbol.for("react.fragment"),qoe=Object.prototype.hasOwnProperty,Koe=Zoe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Joe={key:!0,ref:!0,__self:!0,__source:!0};function _7(e,t,r){var n,i={},a=null,o=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)qoe.call(t,n)&&!Joe.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:Yoe,type:e,key:a,ref:o,props:i,_owner:Koe.current}}hS.Fragment=Xoe;hS.jsx=_7;hS.jsxs=_7;c7.exports=hS;var p=c7.exports,AP={},b7={exports:{}},Ei={},w7={exports:{}},S7={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(B,H){var U=B.length;B.push(H);e:for(;0<U;){var Y=U-1>>>1,Z=B[Y];if(0<i(Z,H))B[Y]=H,B[U]=Z,U=Y;else break e}}function r(B){return B.length===0?null:B[0]}function n(B){if(B.length===0)return null;var H=B[0],U=B.pop();if(U!==H){B[0]=U;e:for(var Y=0,Z=B.length,Q=Z>>>1;Y<Q;){var re=2*(Y+1)-1,ue=B[re],de=re+1,Re=B[de];if(0>i(ue,U))de<Z&&0>i(Re,ue)?(B[Y]=Re,B[de]=U,Y=de):(B[Y]=ue,B[re]=U,Y=re);else if(de<Z&&0>i(Re,U))B[Y]=Re,B[de]=U,Y=de;else break e}}return H}function i(B,H){var U=B.sortIndex-H.sortIndex;return U!==0?U:B.id-H.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var l=[],u=[],c=1,f=null,h=3,d=!1,v=!1,m=!1,y=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(B){for(var H=r(u);H!==null;){if(H.callback===null)n(u);else if(H.startTime<=B)n(u),H.sortIndex=H.expirationTime,t(l,H);else break;H=r(u)}}function S(B){if(m=!1,b(B),!v)if(r(l)!==null)v=!0,F(T);else{var H=r(u);H!==null&&$(S,H.startTime-B)}}function T(B,H){v=!1,m&&(m=!1,x(P),P=-1),d=!0;var U=h;try{for(b(H),f=r(l);f!==null&&(!(f.expirationTime>H)||B&&!E());){var Y=f.callback;if(typeof Y=="function"){f.callback=null,h=f.priorityLevel;var Z=Y(f.expirationTime<=H);H=e.unstable_now(),typeof Z=="function"?f.callback=Z:f===r(l)&&n(l),b(H)}else n(l);f=r(l)}if(f!==null)var Q=!0;else{var re=r(u);re!==null&&$(S,re.startTime-H),Q=!1}return Q}finally{f=null,h=U,d=!1}}var C=!1,A=null,P=-1,I=5,k=-1;function E(){return!(e.unstable_now()-k<I)}function D(){if(A!==null){var B=e.unstable_now();k=B;var H=!0;try{H=A(!0,B)}finally{H?N():(C=!1,A=null)}}else C=!1}var N;if(typeof _=="function")N=function(){_(D)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,V=z.port2;z.port1.onmessage=D,N=function(){V.postMessage(null)}}else N=function(){y(D,0)};function F(B){A=B,C||(C=!0,N())}function $(B,H){P=y(function(){B(e.unstable_now())},H)}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(B){B.callback=null},e.unstable_continueExecution=function(){v||d||(v=!0,F(T))},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(B){switch(h){case 1:case 2:case 3:var H=3;break;default:H=h}var U=h;h=H;try{return B()}finally{h=U}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(B,H){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var U=h;h=B;try{return H()}finally{h=U}},e.unstable_scheduleCallback=function(B,H,U){var Y=e.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?Y+U:Y):U=Y,B){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=U+Z,B={id:c++,callback:H,priorityLevel:B,startTime:U,expirationTime:Z,sortIndex:-1},U>Y?(B.sortIndex=U,t(u,B),r(l)===null&&B===r(u)&&(m?(x(P),P=-1):m=!0,$(S,U-Y))):(B.sortIndex=Z,t(l,B),v||d||(v=!0,F(T))),B},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(B){var H=h;return function(){var U=h;h=H;try{return B.apply(this,arguments)}finally{h=U}}}})(S7);w7.exports=S7;var Qoe=w7.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var ese=G,Oi=Qoe;function we(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var T7=new Set,um={};function bf(e,t){md(e,t),md(e+"Capture",t)}function md(e,t){for(um[e]=t,e=0;e<t.length;e++)T7.add(t[e])}var js=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),MP=Object.prototype.hasOwnProperty,tse=/^[: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]*$/,c5={},f5={};function rse(e){return MP.call(f5,e)?!0:MP.call(c5,e)?!1:tse.test(e)?f5[e]=!0:(c5[e]=!0,!1)}function nse(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function ise(e,t,r,n){if(t===null||typeof t>"u"||nse(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Jn(e,t,r,n,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var _n={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){_n[e]=new Jn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];_n[t]=new Jn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){_n[e]=new Jn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){_n[e]=new Jn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){_n[e]=new Jn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){_n[e]=new Jn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){_n[e]=new Jn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){_n[e]=new Jn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){_n[e]=new Jn(e,5,!1,e.toLowerCase(),null,!1,!1)});var dE=/[\-:]([a-z])/g;function vE(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(dE,vE);_n[t]=new Jn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(dE,vE);_n[t]=new Jn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(dE,vE);_n[t]=new Jn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){_n[e]=new Jn(e,1,!1,e.toLowerCase(),null,!1,!1)});_n.xlinkHref=new Jn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){_n[e]=new Jn(e,1,!1,e.toLowerCase(),null,!0,!0)});function pE(e,t,r,n){var i=_n.hasOwnProperty(t)?_n[t]:null;(i!==null?i.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(ise(t,r,i,n)&&(r=null),n||i===null?rse(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):i.mustUseProperty?e[i.propertyName]=r===null?i.type===3?!1:"":r:(t=i.attributeName,n=i.attributeNamespace,r===null?e.removeAttribute(t):(i=i.type,r=i===3||i===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var Js=ese.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,q0=Symbol.for("react.element"),Ih=Symbol.for("react.portal"),Oh=Symbol.for("react.fragment"),gE=Symbol.for("react.strict_mode"),PP=Symbol.for("react.profiler"),C7=Symbol.for("react.provider"),A7=Symbol.for("react.context"),mE=Symbol.for("react.forward_ref"),kP=Symbol.for("react.suspense"),LP=Symbol.for("react.suspense_list"),yE=Symbol.for("react.memo"),bl=Symbol.for("react.lazy"),M7=Symbol.for("react.offscreen"),h5=Symbol.iterator;function gp(e){return e===null||typeof e!="object"?null:(e=h5&&e[h5]||e["@@iterator"],typeof e=="function"?e:null)}var ur=Object.assign,UC;function dg(e){if(UC===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);UC=t&&t[1]||""}return`
`+UC+e}var ZC=!1;function YC(e,t){if(!e||ZC)return"";ZC=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}catch(u){if(u&&n&&typeof u.stack=="string"){for(var i=u.stack.split(`
`),a=n.stack.split(`
`),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(o!==1||s!==1)do if(o--,s--,0>s||i[o]!==a[s]){var l=`
`+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=s);break}}}finally{ZC=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?dg(e):""}function ase(e){switch(e.tag){case 5:return dg(e.type);case 16:return dg("Lazy");case 13:return dg("Suspense");case 19:return dg("SuspenseList");case 0:case 2:case 15:return e=YC(e.type,!1),e;case 11:return e=YC(e.type.render,!1),e;case 1:return e=YC(e.type,!0),e;default:return""}}function IP(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Oh:return"Fragment";case Ih:return"Portal";case PP:return"Profiler";case gE:return"StrictMode";case kP:return"Suspense";case LP:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case A7:return(e.displayName||"Context")+".Consumer";case C7:return(e._context.displayName||"Context")+".Provider";case mE:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case yE:return t=e.displayName||null,t!==null?t:IP(e.type)||"Memo";case bl:t=e._payload,e=e._init;try{return IP(e(t))}catch{}}return null}function ose(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return IP(t);case 8:return t===gE?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ou(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function P7(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function sse(e){var t=P7(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function K0(e){e._valueTracker||(e._valueTracker=sse(e))}function k7(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=P7(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Mb(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function OP(e,t){var r=t.checked;return ur({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function d5(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=ou(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function L7(e,t){t=t.checked,t!=null&&pE(e,"checked",t,!1)}function EP(e,t){L7(e,t);var r=ou(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?DP(e,t.type,r):t.hasOwnProperty("defaultValue")&&DP(e,t.type,ou(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function v5(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function DP(e,t,r){(t!=="number"||Mb(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var vg=Array.isArray;function ed(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i<r.length;i++)t["$"+r[i]]=!0;for(r=0;r<e.length;r++)i=t.hasOwnProperty("$"+e[r].value),e[r].selected!==i&&(e[r].selected=i),i&&n&&(e[r].defaultSelected=!0)}else{for(r=""+ou(r),t=null,i=0;i<e.length;i++){if(e[i].value===r){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function NP(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(we(91));return ur({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function p5(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(we(92));if(vg(r)){if(1<r.length)throw Error(we(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:ou(r)}}function I7(e,t){var r=ou(t.value),n=ou(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function g5(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function O7(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function jP(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?O7(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var J0,E7=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,i){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(J0=J0||document.createElement("div"),J0.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=J0.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function cm(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Ig={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},lse=["Webkit","ms","Moz","O"];Object.keys(Ig).forEach(function(e){lse.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ig[t]=Ig[e]})});function D7(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Ig.hasOwnProperty(e)&&Ig[e]?(""+t).trim():t+"px"}function N7(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=D7(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var use=ur({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function RP(e,t){if(t){if(use[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(we(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(we(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(we(61))}if(t.style!=null&&typeof t.style!="object")throw Error(we(62))}}function BP(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 zP=null;function xE(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var $P=null,td=null,rd=null;function m5(e){if(e=Xy(e)){if(typeof $P!="function")throw Error(we(280));var t=e.stateNode;t&&(t=mS(t),$P(e.stateNode,e.type,t))}}function j7(e){td?rd?rd.push(e):rd=[e]:td=e}function R7(){if(td){var e=td,t=rd;if(rd=td=null,m5(e),t)for(e=0;e<t.length;e++)m5(t[e])}}function B7(e,t){return e(t)}function z7(){}var XC=!1;function $7(e,t,r){if(XC)return e(t,r);XC=!0;try{return B7(e,t,r)}finally{XC=!1,(td!==null||rd!==null)&&(z7(),R7())}}function fm(e,t){var r=e.stateNode;if(r===null)return null;var n=mS(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(we(231,t,typeof r));return r}var FP=!1;if(js)try{var mp={};Object.defineProperty(mp,"passive",{get:function(){FP=!0}}),window.addEventListener("test",mp,mp),window.removeEventListener("test",mp,mp)}catch{FP=!1}function cse(e,t,r,n,i,a,o,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(c){this.onError(c)}}var Og=!1,Pb=null,kb=!1,VP=null,fse={onError:function(e){Og=!0,Pb=e}};function hse(e,t,r,n,i,a,o,s,l){Og=!1,Pb=null,cse.apply(fse,arguments)}function dse(e,t,r,n,i,a,o,s,l){if(hse.apply(this,arguments),Og){if(Og){var u=Pb;Og=!1,Pb=null}else throw Error(we(198));kb||(kb=!0,VP=u)}}function wf(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function F7(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function y5(e){if(wf(e)!==e)throw Error(we(188))}function vse(e){var t=e.alternate;if(!t){if(t=wf(e),t===null)throw Error(we(188));return t!==e?null:e}for(var r=e,n=t;;){var i=r.return;if(i===null)break;var a=i.alternate;if(a===null){if(n=i.return,n!==null){r=n;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===r)return y5(i),e;if(a===n)return y5(i),t;a=a.sibling}throw Error(we(188))}if(r.return!==n.return)r=i,n=a;else{for(var o=!1,s=i.child;s;){if(s===r){o=!0,r=i,n=a;break}if(s===n){o=!0,n=i,r=a;break}s=s.sibling}if(!o){for(s=a.child;s;){if(s===r){o=!0,r=a,n=i;break}if(s===n){o=!0,n=a,r=i;break}s=s.sibling}if(!o)throw Error(we(189))}}if(r.alternate!==n)throw Error(we(190))}if(r.tag!==3)throw Error(we(188));return r.stateNode.current===r?e:t}function V7(e){return e=vse(e),e!==null?G7(e):null}function G7(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=G7(e);if(t!==null)return t;e=e.sibling}return null}var W7=Oi.unstable_scheduleCallback,x5=Oi.unstable_cancelCallback,pse=Oi.unstable_shouldYield,gse=Oi.unstable_requestPaint,Tr=Oi.unstable_now,mse=Oi.unstable_getCurrentPriorityLevel,_E=Oi.unstable_ImmediatePriority,H7=Oi.unstable_UserBlockingPriority,Lb=Oi.unstable_NormalPriority,yse=Oi.unstable_LowPriority,U7=Oi.unstable_IdlePriority,dS=null,Eo=null;function xse(e){if(Eo&&typeof Eo.onCommitFiberRoot=="function")try{Eo.onCommitFiberRoot(dS,e,void 0,(e.current.flags&128)===128)}catch{}}var Va=Math.clz32?Math.clz32:wse,_se=Math.log,bse=Math.LN2;function wse(e){return e>>>=0,e===0?32:31-(_se(e)/bse|0)|0}var Q0=64,ex=4194304;function pg(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ib(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,a=e.pingedLanes,o=r&268435455;if(o!==0){var s=o&~i;s!==0?n=pg(s):(a&=o,a!==0&&(n=pg(a)))}else o=r&~i,o!==0?n=pg(o):a!==0&&(n=pg(a));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Va(t),i=1<<r,n|=e[r],t&=~i;return n}function Sse(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Tse(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-Va(a),s=1<<o,l=i[o];l===-1?(!(s&r)||s&n)&&(i[o]=Sse(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}}function GP(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Z7(){var e=Q0;return Q0<<=1,!(Q0&4194240)&&(Q0=64),e}function qC(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Zy(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Va(t),e[t]=r}function Cse(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var i=31-Va(r),a=1<<i;t[i]=0,n[i]=-1,e[i]=-1,r&=~a}}function bE(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Va(r),i=1<<n;i&t|e[n]&t&&(e[n]|=t),r&=~i}}var Nt=0;function Y7(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var X7,wE,q7,K7,J7,WP=!1,tx=[],Fl=null,Vl=null,Gl=null,hm=new Map,dm=new Map,Ml=[],Ase="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function _5(e,t){switch(e){case"focusin":case"focusout":Fl=null;break;case"dragenter":case"dragleave":Vl=null;break;case"mouseover":case"mouseout":Gl=null;break;case"pointerover":case"pointerout":hm.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":dm.delete(t.pointerId)}}function yp(e,t,r,n,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Xy(t),t!==null&&wE(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Mse(e,t,r,n,i){switch(t){case"focusin":return Fl=yp(Fl,e,t,r,n,i),!0;case"dragenter":return Vl=yp(Vl,e,t,r,n,i),!0;case"mouseover":return Gl=yp(Gl,e,t,r,n,i),!0;case"pointerover":var a=i.pointerId;return hm.set(a,yp(hm.get(a)||null,e,t,r,n,i)),!0;case"gotpointercapture":return a=i.pointerId,dm.set(a,yp(dm.get(a)||null,e,t,r,n,i)),!0}return!1}function Q7(e){var t=Cc(e.target);if(t!==null){var r=wf(t);if(r!==null){if(t=r.tag,t===13){if(t=F7(r),t!==null){e.blockedOn=t,J7(e.priority,function(){q7(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Z_(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=HP(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);zP=n,r.target.dispatchEvent(n),zP=null}else return t=Xy(r),t!==null&&wE(t),e.blockedOn=r,!1;t.shift()}return!0}function b5(e,t,r){Z_(e)&&r.delete(t)}function Pse(){WP=!1,Fl!==null&&Z_(Fl)&&(Fl=null),Vl!==null&&Z_(Vl)&&(Vl=null),Gl!==null&&Z_(Gl)&&(Gl=null),hm.forEach(b5),dm.forEach(b5)}function xp(e,t){e.blockedOn===t&&(e.blockedOn=null,WP||(WP=!0,Oi.unstable_scheduleCallback(Oi.unstable_NormalPriority,Pse)))}function vm(e){function t(i){return xp(i,e)}if(0<tx.length){xp(tx[0],e);for(var r=1;r<tx.length;r++){var n=tx[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Fl!==null&&xp(Fl,e),Vl!==null&&xp(Vl,e),Gl!==null&&xp(Gl,e),hm.forEach(t),dm.forEach(t),r=0;r<Ml.length;r++)n=Ml[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Ml.length&&(r=Ml[0],r.blockedOn===null);)Q7(r),r.blockedOn===null&&Ml.shift()}var nd=Js.ReactCurrentBatchConfig,Ob=!0;function kse(e,t,r,n){var i=Nt,a=nd.transition;nd.transition=null;try{Nt=1,SE(e,t,r,n)}finally{Nt=i,nd.transition=a}}function Lse(e,t,r,n){var i=Nt,a=nd.transition;nd.transition=null;try{Nt=4,SE(e,t,r,n)}finally{Nt=i,nd.transition=a}}function SE(e,t,r,n){if(Ob){var i=HP(e,t,r,n);if(i===null)oA(e,t,n,Eb,r),_5(e,n);else if(Mse(i,e,t,r,n))n.stopPropagation();else if(_5(e,n),t&4&&-1<Ase.indexOf(e)){for(;i!==null;){var a=Xy(i);if(a!==null&&X7(a),a=HP(e,t,r,n),a===null&&oA(e,t,n,Eb,r),a===i)break;i=a}i!==null&&n.stopPropagation()}else oA(e,t,n,null,r)}}var Eb=null;function HP(e,t,r,n){if(Eb=null,e=xE(n),e=Cc(e),e!==null)if(t=wf(e),t===null)e=null;else if(r=t.tag,r===13){if(e=F7(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Eb=e,null}function e9(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(mse()){case _E:return 1;case H7:return 4;case Lb:case yse:return 16;case U7:return 536870912;default:return 16}default:return 16}}var kl=null,TE=null,Y_=null;function t9(){if(Y_)return Y_;var e,t=TE,r=t.length,n,i="value"in kl?kl.value:kl.textContent,a=i.length;for(e=0;e<r&&t[e]===i[e];e++);var o=r-e;for(n=1;n<=o&&t[r-n]===i[a-n];n++);return Y_=i.slice(e,1<n?1-n:void 0)}function X_(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function rx(){return!0}function w5(){return!1}function Di(e){function t(r,n,i,a,o){this._reactName=r,this._targetInst=i,this.type=n,this.nativeEvent=a,this.target=o,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(r=e[s],this[s]=r?r(a):a[s]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?rx:w5,this.isPropagationStopped=w5,this}return ur(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=rx)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=rx)},persist:function(){},isPersistent:rx}),t}var dv={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},CE=Di(dv),Yy=ur({},dv,{view:0,detail:0}),Ise=Di(Yy),KC,JC,_p,vS=ur({},Yy,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:AE,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==_p&&(_p&&e.type==="mousemove"?(KC=e.screenX-_p.screenX,JC=e.screenY-_p.screenY):JC=KC=0,_p=e),KC)},movementY:function(e){return"movementY"in e?e.movementY:JC}}),S5=Di(vS),Ose=ur({},vS,{dataTransfer:0}),Ese=Di(Ose),Dse=ur({},Yy,{relatedTarget:0}),QC=Di(Dse),Nse=ur({},dv,{animationName:0,elapsedTime:0,pseudoElement:0}),jse=Di(Nse),Rse=ur({},dv,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Bse=Di(Rse),zse=ur({},dv,{data:0}),T5=Di(zse),$se={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Fse={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"},Vse={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Gse(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Vse[e])?!!t[e]:!1}function AE(){return Gse}var Wse=ur({},Yy,{key:function(e){if(e.key){var t=$se[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=X_(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Fse[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:AE,charCode:function(e){return e.type==="keypress"?X_(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?X_(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Hse=Di(Wse),Use=ur({},vS,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),C5=Di(Use),Zse=ur({},Yy,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:AE}),Yse=Di(Zse),Xse=ur({},dv,{propertyName:0,elapsedTime:0,pseudoElement:0}),qse=Di(Xse),Kse=ur({},vS,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Jse=Di(Kse),Qse=[9,13,27,32],ME=js&&"CompositionEvent"in window,Eg=null;js&&"documentMode"in document&&(Eg=document.documentMode);var ele=js&&"TextEvent"in window&&!Eg,r9=js&&(!ME||Eg&&8<Eg&&11>=Eg),A5=" ",M5=!1;function n9(e,t){switch(e){case"keyup":return Qse.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function i9(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Eh=!1;function tle(e,t){switch(e){case"compositionend":return i9(t);case"keypress":return t.which!==32?null:(M5=!0,A5);case"textInput":return e=t.data,e===A5&&M5?null:e;default:return null}}function rle(e,t){if(Eh)return e==="compositionend"||!ME&&n9(e,t)?(e=t9(),Y_=TE=kl=null,Eh=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return r9&&t.locale!=="ko"?null:t.data;default:return null}}var nle={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 P5(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!nle[e.type]:t==="textarea"}function a9(e,t,r,n){j7(n),t=Db(t,"onChange"),0<t.length&&(r=new CE("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Dg=null,pm=null;function ile(e){g9(e,0)}function pS(e){var t=jh(e);if(k7(t))return e}function ale(e,t){if(e==="change")return t}var o9=!1;if(js){var eA;if(js){var tA="oninput"in document;if(!tA){var k5=document.createElement("div");k5.setAttribute("oninput","return;"),tA=typeof k5.oninput=="function"}eA=tA}else eA=!1;o9=eA&&(!document.documentMode||9<document.documentMode)}function L5(){Dg&&(Dg.detachEvent("onpropertychange",s9),pm=Dg=null)}function s9(e){if(e.propertyName==="value"&&pS(pm)){var t=[];a9(t,pm,e,xE(e)),$7(ile,t)}}function ole(e,t,r){e==="focusin"?(L5(),Dg=t,pm=r,Dg.attachEvent("onpropertychange",s9)):e==="focusout"&&L5()}function sle(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return pS(pm)}function lle(e,t){if(e==="click")return pS(t)}function ule(e,t){if(e==="input"||e==="change")return pS(t)}function cle(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ya=typeof Object.is=="function"?Object.is:cle;function gm(e,t){if(Ya(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var i=r[n];if(!MP.call(t,i)||!Ya(e[i],t[i]))return!1}return!0}function I5(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function O5(e,t){var r=I5(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=I5(r)}}function l9(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?l9(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function u9(){for(var e=window,t=Mb();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Mb(e.document)}return t}function PE(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function fle(e){var t=u9(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&l9(r.ownerDocument.documentElement,r)){if(n!==null&&PE(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,a=Math.min(n.start,i);n=n.end===void 0?a:Math.min(n.end,i),!e.extend&&a>n&&(i=n,n=a,a=i),i=O5(r,a);var o=O5(r,n);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var hle=js&&"documentMode"in document&&11>=document.documentMode,Dh=null,UP=null,Ng=null,ZP=!1;function E5(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;ZP||Dh==null||Dh!==Mb(n)||(n=Dh,"selectionStart"in n&&PE(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Ng&&gm(Ng,n)||(Ng=n,n=Db(UP,"onSelect"),0<n.length&&(t=new CE("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Dh)))}function nx(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Nh={animationend:nx("Animation","AnimationEnd"),animationiteration:nx("Animation","AnimationIteration"),animationstart:nx("Animation","AnimationStart"),transitionend:nx("Transition","TransitionEnd")},rA={},c9={};js&&(c9=document.createElement("div").style,"AnimationEvent"in window||(delete Nh.animationend.animation,delete Nh.animationiteration.animation,delete Nh.animationstart.animation),"TransitionEvent"in window||delete Nh.transitionend.transition);function gS(e){if(rA[e])return rA[e];if(!Nh[e])return e;var t=Nh[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in c9)return rA[e]=t[r];return e}var f9=gS("animationend"),h9=gS("animationiteration"),d9=gS("animationstart"),v9=gS("transitionend"),p9=new Map,D5="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function mu(e,t){p9.set(e,t),bf(t,[e])}for(var nA=0;nA<D5.length;nA++){var iA=D5[nA],dle=iA.toLowerCase(),vle=iA[0].toUpperCase()+iA.slice(1);mu(dle,"on"+vle)}mu(f9,"onAnimationEnd");mu(h9,"onAnimationIteration");mu(d9,"onAnimationStart");mu("dblclick","onDoubleClick");mu("focusin","onFocus");mu("focusout","onBlur");mu(v9,"onTransitionEnd");md("onMouseEnter",["mouseout","mouseover"]);md("onMouseLeave",["mouseout","mouseover"]);md("onPointerEnter",["pointerout","pointerover"]);md("onPointerLeave",["pointerout","pointerover"]);bf("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));bf("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));bf("onBeforeInput",["compositionend","keypress","textInput","paste"]);bf("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));bf("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));bf("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var gg="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(" "),ple=new Set("cancel close invalid load scroll toggle".split(" ").concat(gg));function N5(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,dse(n,t,void 0,e),e.currentTarget=null}function g9(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],i=n.event;n=n.listeners;e:{var a=void 0;if(t)for(var o=n.length-1;0<=o;o--){var s=n[o],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==a&&i.isPropagationStopped())break e;N5(i,s,u),a=l}else for(o=0;o<n.length;o++){if(s=n[o],l=s.instance,u=s.currentTarget,s=s.listener,l!==a&&i.isPropagationStopped())break e;N5(i,s,u),a=l}}}if(kb)throw e=VP,kb=!1,VP=null,e}function qt(e,t){var r=t[JP];r===void 0&&(r=t[JP]=new Set);var n=e+"__bubble";r.has(n)||(m9(t,e,2,!1),r.add(n))}function aA(e,t,r){var n=0;t&&(n|=4),m9(r,e,n,t)}var ix="_reactListening"+Math.random().toString(36).slice(2);function mm(e){if(!e[ix]){e[ix]=!0,T7.forEach(function(r){r!=="selectionchange"&&(ple.has(r)||aA(r,!1,e),aA(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ix]||(t[ix]=!0,aA("selectionchange",!1,t))}}function m9(e,t,r,n){switch(e9(t)){case 1:var i=kse;break;case 4:i=Lse;break;default:i=SE}r=i.bind(null,t,r,e),i=void 0,!FP||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),n?i!==void 0?e.addEventListener(t,r,{capture:!0,passive:i}):e.addEventListener(t,r,!0):i!==void 0?e.addEventListener(t,r,{passive:i}):e.addEventListener(t,r,!1)}function oA(e,t,r,n,i){var a=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var s=n.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=n.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;s!==null;){if(o=Cc(s),o===null)return;if(l=o.tag,l===5||l===6){n=a=o;continue e}s=s.parentNode}}n=n.return}$7(function(){var u=a,c=xE(r),f=[];e:{var h=p9.get(e);if(h!==void 0){var d=CE,v=e;switch(e){case"keypress":if(X_(r)===0)break e;case"keydown":case"keyup":d=Hse;break;case"focusin":v="focus",d=QC;break;case"focusout":v="blur",d=QC;break;case"beforeblur":case"afterblur":d=QC;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":d=S5;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":d=Ese;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":d=Yse;break;case f9:case h9:case d9:d=jse;break;case v9:d=qse;break;case"scroll":d=Ise;break;case"wheel":d=Jse;break;case"copy":case"cut":case"paste":d=Bse;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":d=C5}var m=(t&4)!==0,y=!m&&e==="scroll",x=m?h!==null?h+"Capture":null:h;m=[];for(var _=u,b;_!==null;){b=_;var S=b.stateNode;if(b.tag===5&&S!==null&&(b=S,x!==null&&(S=fm(_,x),S!=null&&m.push(ym(_,S,b)))),y)break;_=_.return}0<m.length&&(h=new d(h,v,null,r,c),f.push({event:h,listeners:m}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",d=e==="mouseout"||e==="pointerout",h&&r!==zP&&(v=r.relatedTarget||r.fromElement)&&(Cc(v)||v[Rs]))break e;if((d||h)&&(h=c.window===c?c:(h=c.ownerDocument)?h.defaultView||h.parentWindow:window,d?(v=r.relatedTarget||r.toElement,d=u,v=v?Cc(v):null,v!==null&&(y=wf(v),v!==y||v.tag!==5&&v.tag!==6)&&(v=null)):(d=null,v=u),d!==v)){if(m=S5,S="onMouseLeave",x="onMouseEnter",_="mouse",(e==="pointerout"||e==="pointerover")&&(m=C5,S="onPointerLeave",x="onPointerEnter",_="pointer"),y=d==null?h:jh(d),b=v==null?h:jh(v),h=new m(S,_+"leave",d,r,c),h.target=y,h.relatedTarget=b,S=null,Cc(c)===u&&(m=new m(x,_+"enter",v,r,c),m.target=b,m.relatedTarget=y,S=m),y=S,d&&v)t:{for(m=d,x=v,_=0,b=m;b;b=Xf(b))_++;for(b=0,S=x;S;S=Xf(S))b++;for(;0<_-b;)m=Xf(m),_--;for(;0<b-_;)x=Xf(x),b--;for(;_--;){if(m===x||x!==null&&m===x.alternate)break t;m=Xf(m),x=Xf(x)}m=null}else m=null;d!==null&&j5(f,h,d,m,!1),v!==null&&y!==null&&j5(f,y,v,m,!0)}}e:{if(h=u?jh(u):window,d=h.nodeName&&h.nodeName.toLowerCase(),d==="select"||d==="input"&&h.type==="file")var T=ale;else if(P5(h))if(o9)T=ule;else{T=sle;var C=ole}else(d=h.nodeName)&&d.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(T=lle);if(T&&(T=T(e,u))){a9(f,T,r,c);break e}C&&C(e,h,u),e==="focusout"&&(C=h._wrapperState)&&C.controlled&&h.type==="number"&&DP(h,"number",h.value)}switch(C=u?jh(u):window,e){case"focusin":(P5(C)||C.contentEditable==="true")&&(Dh=C,UP=u,Ng=null);break;case"focusout":Ng=UP=Dh=null;break;case"mousedown":ZP=!0;break;case"contextmenu":case"mouseup":case"dragend":ZP=!1,E5(f,r,c);break;case"selectionchange":if(hle)break;case"keydown":case"keyup":E5(f,r,c)}var A;if(ME)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else Eh?n9(e,r)&&(P="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(P="onCompositionStart");P&&(r9&&r.locale!=="ko"&&(Eh||P!=="onCompositionStart"?P==="onCompositionEnd"&&Eh&&(A=t9()):(kl=c,TE="value"in kl?kl.value:kl.textContent,Eh=!0)),C=Db(u,P),0<C.length&&(P=new T5(P,e,null,r,c),f.push({event:P,listeners:C}),A?P.data=A:(A=i9(r),A!==null&&(P.data=A)))),(A=ele?tle(e,r):rle(e,r))&&(u=Db(u,"onBeforeInput"),0<u.length&&(c=new T5("onBeforeInput","beforeinput",null,r,c),f.push({event:c,listeners:u}),c.data=A))}g9(f,t)})}function ym(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Db(e,t){for(var r=t+"Capture",n=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=fm(e,r),a!=null&&n.unshift(ym(e,a,i)),a=fm(e,t),a!=null&&n.push(ym(e,a,i))),e=e.return}return n}function Xf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function j5(e,t,r,n,i){for(var a=t._reactName,o=[];r!==null&&r!==n;){var s=r,l=s.alternate,u=s.stateNode;if(l!==null&&l===n)break;s.tag===5&&u!==null&&(s=u,i?(l=fm(r,a),l!=null&&o.unshift(ym(r,l,s))):i||(l=fm(r,a),l!=null&&o.push(ym(r,l,s)))),r=r.return}o.length!==0&&e.push({event:t,listeners:o})}var gle=/\r\n?/g,mle=/\u0000|\uFFFD/g;function R5(e){return(typeof e=="string"?e:""+e).replace(gle,`
`).replace(mle,"")}function ax(e,t,r){if(t=R5(t),R5(e)!==t&&r)throw Error(we(425))}function Nb(){}var YP=null,XP=null;function qP(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var KP=typeof setTimeout=="function"?setTimeout:void 0,yle=typeof clearTimeout=="function"?clearTimeout:void 0,B5=typeof Promise=="function"?Promise:void 0,xle=typeof queueMicrotask=="function"?queueMicrotask:typeof B5<"u"?function(e){return B5.resolve(null).then(e).catch(_le)}:KP;function _le(e){setTimeout(function(){throw e})}function sA(e,t){var r=t,n=0;do{var i=r.nextSibling;if(e.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(n===0){e.removeChild(i),vm(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=i}while(r);vm(t)}function Wl(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function z5(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var vv=Math.random().toString(36).slice(2),bo="__reactFiber$"+vv,xm="__reactProps$"+vv,Rs="__reactContainer$"+vv,JP="__reactEvents$"+vv,ble="__reactListeners$"+vv,wle="__reactHandles$"+vv;function Cc(e){var t=e[bo];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Rs]||r[bo]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=z5(e);e!==null;){if(r=e[bo])return r;e=z5(e)}return t}e=r,r=e.parentNode}return null}function Xy(e){return e=e[bo]||e[Rs],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function jh(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(we(33))}function mS(e){return e[xm]||null}var QP=[],Rh=-1;function yu(e){return{current:e}}function Qt(e){0>Rh||(e.current=QP[Rh],QP[Rh]=null,Rh--)}function Yt(e,t){Rh++,QP[Rh]=e.current,e.current=t}var su={},Bn=yu(su),si=yu(!1),Qc=su;function yd(e,t){var r=e.type.contextTypes;if(!r)return su;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=t[a];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function li(e){return e=e.childContextTypes,e!=null}function jb(){Qt(si),Qt(Bn)}function $5(e,t,r){if(Bn.current!==su)throw Error(we(168));Yt(Bn,t),Yt(si,r)}function y9(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(we(108,ose(e)||"Unknown",i));return ur({},r,n)}function Rb(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||su,Qc=Bn.current,Yt(Bn,e),Yt(si,si.current),!0}function F5(e,t,r){var n=e.stateNode;if(!n)throw Error(we(169));r?(e=y9(e,t,Qc),n.__reactInternalMemoizedMergedChildContext=e,Qt(si),Qt(Bn),Yt(Bn,e)):Qt(si),Yt(si,r)}var ps=null,yS=!1,lA=!1;function x9(e){ps===null?ps=[e]:ps.push(e)}function Sle(e){yS=!0,x9(e)}function xu(){if(!lA&&ps!==null){lA=!0;var e=0,t=Nt;try{var r=ps;for(Nt=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}ps=null,yS=!1}catch(i){throw ps!==null&&(ps=ps.slice(e+1)),W7(_E,xu),i}finally{Nt=t,lA=!1}}return null}var Bh=[],zh=0,Bb=null,zb=0,Ji=[],Qi=0,ef=null,ms=1,ys="";function cc(e,t){Bh[zh++]=zb,Bh[zh++]=Bb,Bb=e,zb=t}function _9(e,t,r){Ji[Qi++]=ms,Ji[Qi++]=ys,Ji[Qi++]=ef,ef=e;var n=ms;e=ys;var i=32-Va(n)-1;n&=~(1<<i),r+=1;var a=32-Va(t)+i;if(30<a){var o=i-i%5;a=(n&(1<<o)-1).toString(32),n>>=o,i-=o,ms=1<<32-Va(t)+i|r<<i|n,ys=a+e}else ms=1<<a|r<<i|n,ys=e}function kE(e){e.return!==null&&(cc(e,1),_9(e,1,0))}function LE(e){for(;e===Bb;)Bb=Bh[--zh],Bh[zh]=null,zb=Bh[--zh],Bh[zh]=null;for(;e===ef;)ef=Ji[--Qi],Ji[Qi]=null,ys=Ji[--Qi],Ji[Qi]=null,ms=Ji[--Qi],Ji[Qi]=null}var Li=null,Ci=null,er=!1,Ra=null;function b9(e,t){var r=na(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function V5(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Li=e,Ci=Wl(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Li=e,Ci=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=ef!==null?{id:ms,overflow:ys}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=na(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Li=e,Ci=null,!0):!1;default:return!1}}function ek(e){return(e.mode&1)!==0&&(e.flags&128)===0}function tk(e){if(er){var t=Ci;if(t){var r=t;if(!V5(e,t)){if(ek(e))throw Error(we(418));t=Wl(r.nextSibling);var n=Li;t&&V5(e,t)?b9(n,r):(e.flags=e.flags&-4097|2,er=!1,Li=e)}}else{if(ek(e))throw Error(we(418));e.flags=e.flags&-4097|2,er=!1,Li=e}}}function G5(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Li=e}function ox(e){if(e!==Li)return!1;if(!er)return G5(e),er=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!qP(e.type,e.memoizedProps)),t&&(t=Ci)){if(ek(e))throw w9(),Error(we(418));for(;t;)b9(e,t),t=Wl(t.nextSibling)}if(G5(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(we(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Ci=Wl(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Ci=null}}else Ci=Li?Wl(e.stateNode.nextSibling):null;return!0}function w9(){for(var e=Ci;e;)e=Wl(e.nextSibling)}function xd(){Ci=Li=null,er=!1}function IE(e){Ra===null?Ra=[e]:Ra.push(e)}var Tle=Js.ReactCurrentBatchConfig;function bp(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(we(309));var n=r.stateNode}if(!n)throw Error(we(147,e));var i=n,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(o){var s=i.refs;o===null?delete s[a]:s[a]=o},t._stringRef=a,t)}if(typeof e!="string")throw Error(we(284));if(!r._owner)throw Error(we(290,e))}return e}function sx(e,t){throw e=Object.prototype.toString.call(t),Error(we(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function W5(e){var t=e._init;return t(e._payload)}function S9(e){function t(x,_){if(e){var b=x.deletions;b===null?(x.deletions=[_],x.flags|=16):b.push(_)}}function r(x,_){if(!e)return null;for(;_!==null;)t(x,_),_=_.sibling;return null}function n(x,_){for(x=new Map;_!==null;)_.key!==null?x.set(_.key,_):x.set(_.index,_),_=_.sibling;return x}function i(x,_){return x=Yl(x,_),x.index=0,x.sibling=null,x}function a(x,_,b){return x.index=b,e?(b=x.alternate,b!==null?(b=b.index,b<_?(x.flags|=2,_):b):(x.flags|=2,_)):(x.flags|=1048576,_)}function o(x){return e&&x.alternate===null&&(x.flags|=2),x}function s(x,_,b,S){return _===null||_.tag!==6?(_=pA(b,x.mode,S),_.return=x,_):(_=i(_,b),_.return=x,_)}function l(x,_,b,S){var T=b.type;return T===Oh?c(x,_,b.props.children,S,b.key):_!==null&&(_.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===bl&&W5(T)===_.type)?(S=i(_,b.props),S.ref=bp(x,_,b),S.return=x,S):(S=rb(b.type,b.key,b.props,null,x.mode,S),S.ref=bp(x,_,b),S.return=x,S)}function u(x,_,b,S){return _===null||_.tag!==4||_.stateNode.containerInfo!==b.containerInfo||_.stateNode.implementation!==b.implementation?(_=gA(b,x.mode,S),_.return=x,_):(_=i(_,b.children||[]),_.return=x,_)}function c(x,_,b,S,T){return _===null||_.tag!==7?(_=Fc(b,x.mode,S,T),_.return=x,_):(_=i(_,b),_.return=x,_)}function f(x,_,b){if(typeof _=="string"&&_!==""||typeof _=="number")return _=pA(""+_,x.mode,b),_.return=x,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case q0:return b=rb(_.type,_.key,_.props,null,x.mode,b),b.ref=bp(x,null,_),b.return=x,b;case Ih:return _=gA(_,x.mode,b),_.return=x,_;case bl:var S=_._init;return f(x,S(_._payload),b)}if(vg(_)||gp(_))return _=Fc(_,x.mode,b,null),_.return=x,_;sx(x,_)}return null}function h(x,_,b,S){var T=_!==null?_.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return T!==null?null:s(x,_,""+b,S);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case q0:return b.key===T?l(x,_,b,S):null;case Ih:return b.key===T?u(x,_,b,S):null;case bl:return T=b._init,h(x,_,T(b._payload),S)}if(vg(b)||gp(b))return T!==null?null:c(x,_,b,S,null);sx(x,b)}return null}function d(x,_,b,S,T){if(typeof S=="string"&&S!==""||typeof S=="number")return x=x.get(b)||null,s(_,x,""+S,T);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case q0:return x=x.get(S.key===null?b:S.key)||null,l(_,x,S,T);case Ih:return x=x.get(S.key===null?b:S.key)||null,u(_,x,S,T);case bl:var C=S._init;return d(x,_,b,C(S._payload),T)}if(vg(S)||gp(S))return x=x.get(b)||null,c(_,x,S,T,null);sx(_,S)}return null}function v(x,_,b,S){for(var T=null,C=null,A=_,P=_=0,I=null;A!==null&&P<b.length;P++){A.index>P?(I=A,A=null):I=A.sibling;var k=h(x,A,b[P],S);if(k===null){A===null&&(A=I);break}e&&A&&k.alternate===null&&t(x,A),_=a(k,_,P),C===null?T=k:C.sibling=k,C=k,A=I}if(P===b.length)return r(x,A),er&&cc(x,P),T;if(A===null){for(;P<b.length;P++)A=f(x,b[P],S),A!==null&&(_=a(A,_,P),C===null?T=A:C.sibling=A,C=A);return er&&cc(x,P),T}for(A=n(x,A);P<b.length;P++)I=d(A,x,P,b[P],S),I!==null&&(e&&I.alternate!==null&&A.delete(I.key===null?P:I.key),_=a(I,_,P),C===null?T=I:C.sibling=I,C=I);return e&&A.forEach(function(E){return t(x,E)}),er&&cc(x,P),T}function m(x,_,b,S){var T=gp(b);if(typeof T!="function")throw Error(we(150));if(b=T.call(b),b==null)throw Error(we(151));for(var C=T=null,A=_,P=_=0,I=null,k=b.next();A!==null&&!k.done;P++,k=b.next()){A.index>P?(I=A,A=null):I=A.sibling;var E=h(x,A,k.value,S);if(E===null){A===null&&(A=I);break}e&&A&&E.alternate===null&&t(x,A),_=a(E,_,P),C===null?T=E:C.sibling=E,C=E,A=I}if(k.done)return r(x,A),er&&cc(x,P),T;if(A===null){for(;!k.done;P++,k=b.next())k=f(x,k.value,S),k!==null&&(_=a(k,_,P),C===null?T=k:C.sibling=k,C=k);return er&&cc(x,P),T}for(A=n(x,A);!k.done;P++,k=b.next())k=d(A,x,P,k.value,S),k!==null&&(e&&k.alternate!==null&&A.delete(k.key===null?P:k.key),_=a(k,_,P),C===null?T=k:C.sibling=k,C=k);return e&&A.forEach(function(D){return t(x,D)}),er&&cc(x,P),T}function y(x,_,b,S){if(typeof b=="object"&&b!==null&&b.type===Oh&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case q0:e:{for(var T=b.key,C=_;C!==null;){if(C.key===T){if(T=b.type,T===Oh){if(C.tag===7){r(x,C.sibling),_=i(C,b.props.children),_.return=x,x=_;break e}}else if(C.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===bl&&W5(T)===C.type){r(x,C.sibling),_=i(C,b.props),_.ref=bp(x,C,b),_.return=x,x=_;break e}r(x,C);break}else t(x,C);C=C.sibling}b.type===Oh?(_=Fc(b.props.children,x.mode,S,b.key),_.return=x,x=_):(S=rb(b.type,b.key,b.props,null,x.mode,S),S.ref=bp(x,_,b),S.return=x,x=S)}return o(x);case Ih:e:{for(C=b.key;_!==null;){if(_.key===C)if(_.tag===4&&_.stateNode.containerInfo===b.containerInfo&&_.stateNode.implementation===b.implementation){r(x,_.sibling),_=i(_,b.children||[]),_.return=x,x=_;break e}else{r(x,_);break}else t(x,_);_=_.sibling}_=gA(b,x.mode,S),_.return=x,x=_}return o(x);case bl:return C=b._init,y(x,_,C(b._payload),S)}if(vg(b))return v(x,_,b,S);if(gp(b))return m(x,_,b,S);sx(x,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,_!==null&&_.tag===6?(r(x,_.sibling),_=i(_,b),_.return=x,x=_):(r(x,_),_=pA(b,x.mode,S),_.return=x,x=_),o(x)):r(x,_)}return y}var _d=S9(!0),T9=S9(!1),$b=yu(null),Fb=null,$h=null,OE=null;function EE(){OE=$h=Fb=null}function DE(e){var t=$b.current;Qt($b),e._currentValue=t}function rk(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function id(e,t){Fb=e,OE=$h=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ai=!0),e.firstContext=null)}function fa(e){var t=e._currentValue;if(OE!==e)if(e={context:e,memoizedValue:t,next:null},$h===null){if(Fb===null)throw Error(we(308));$h=e,Fb.dependencies={lanes:0,firstContext:e}}else $h=$h.next=e;return t}var Ac=null;function NE(e){Ac===null?Ac=[e]:Ac.push(e)}function C9(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,NE(t)):(r.next=i.next,i.next=r),t.interleaved=r,Bs(e,n)}function Bs(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var wl=!1;function jE(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function A9(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function As(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Hl(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,Tt&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,Bs(e,r)}return i=n.interleaved,i===null?(t.next=t,NE(n)):(t.next=i.next,i.next=t),n.interleaved=t,Bs(e,r)}function q_(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,bE(e,r)}}function H5(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?i=a=o:a=a.next=o,r=r.next}while(r!==null);a===null?i=a=t:a=a.next=t}else i=a=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Vb(e,t,r,n){var i=e.updateQueue;wl=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,u=l.next;l.next=null,o===null?a=u:o.next=u,o=l;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==o&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(a!==null){var f=i.baseState;o=0,c=u=l=null,s=a;do{var h=s.lane,d=s.eventTime;if((n&h)===h){c!==null&&(c=c.next={eventTime:d,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var v=e,m=s;switch(h=t,d=r,m.tag){case 1:if(v=m.payload,typeof v=="function"){f=v.call(d,f,h);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=m.payload,h=typeof v=="function"?v.call(d,f,h):v,h==null)break e;f=ur({},f,h);break e;case 2:wl=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[s]:h.push(s))}else d={eventTime:d,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=d,l=f):c=c.next=d,o|=h;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;h=s,s=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(c===null&&(l=f),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);rf|=o,e.lanes=o,e.memoizedState=f}}function U5(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],i=n.callback;if(i!==null){if(n.callback=null,n=r,typeof i!="function")throw Error(we(191,i));i.call(n)}}}var qy={},Do=yu(qy),_m=yu(qy),bm=yu(qy);function Mc(e){if(e===qy)throw Error(we(174));return e}function RE(e,t){switch(Yt(bm,t),Yt(_m,e),Yt(Do,qy),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:jP(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=jP(t,e)}Qt(Do),Yt(Do,t)}function bd(){Qt(Do),Qt(_m),Qt(bm)}function M9(e){Mc(bm.current);var t=Mc(Do.current),r=jP(t,e.type);t!==r&&(Yt(_m,e),Yt(Do,r))}function BE(e){_m.current===e&&(Qt(Do),Qt(_m))}var ar=yu(0);function Gb(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var uA=[];function zE(){for(var e=0;e<uA.length;e++)uA[e]._workInProgressVersionPrimary=null;uA.length=0}var K_=Js.ReactCurrentDispatcher,cA=Js.ReactCurrentBatchConfig,tf=0,or=null,Gr=null,nn=null,Wb=!1,jg=!1,wm=0,Cle=0;function An(){throw Error(we(321))}function $E(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Ya(e[r],t[r]))return!1;return!0}function FE(e,t,r,n,i,a){if(tf=a,or=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,K_.current=e===null||e.memoizedState===null?kle:Lle,e=r(n,i),jg){a=0;do{if(jg=!1,wm=0,25<=a)throw Error(we(301));a+=1,nn=Gr=null,t.updateQueue=null,K_.current=Ile,e=r(n,i)}while(jg)}if(K_.current=Hb,t=Gr!==null&&Gr.next!==null,tf=0,nn=Gr=or=null,Wb=!1,t)throw Error(we(300));return e}function VE(){var e=wm!==0;return wm=0,e}function xo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return nn===null?or.memoizedState=nn=e:nn=nn.next=e,nn}function ha(){if(Gr===null){var e=or.alternate;e=e!==null?e.memoizedState:null}else e=Gr.next;var t=nn===null?or.memoizedState:nn.next;if(t!==null)nn=t,Gr=e;else{if(e===null)throw Error(we(310));Gr=e,e={memoizedState:Gr.memoizedState,baseState:Gr.baseState,baseQueue:Gr.baseQueue,queue:Gr.queue,next:null},nn===null?or.memoizedState=nn=e:nn=nn.next=e}return nn}function Sm(e,t){return typeof t=="function"?t(e):t}function fA(e){var t=ha(),r=t.queue;if(r===null)throw Error(we(311));r.lastRenderedReducer=e;var n=Gr,i=n.baseQueue,a=r.pending;if(a!==null){if(i!==null){var o=i.next;i.next=a.next,a.next=o}n.baseQueue=i=a,r.pending=null}if(i!==null){a=i.next,n=n.baseState;var s=o=null,l=null,u=a;do{var c=u.lane;if((tf&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:e(n,u.action);else{var f={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(s=l=f,o=n):l=l.next=f,or.lanes|=c,rf|=c}u=u.next}while(u!==null&&u!==a);l===null?o=n:l.next=s,Ya(n,t.memoizedState)||(ai=!0),t.memoizedState=n,t.baseState=o,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){i=e;do a=i.lane,or.lanes|=a,rf|=a,i=i.next;while(i!==e)}else i===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function hA(e){var t=ha(),r=t.queue;if(r===null)throw Error(we(311));r.lastRenderedReducer=e;var n=r.dispatch,i=r.pending,a=t.memoizedState;if(i!==null){r.pending=null;var o=i=i.next;do a=e(a,o.action),o=o.next;while(o!==i);Ya(a,t.memoizedState)||(ai=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),r.lastRenderedState=a}return[a,n]}function P9(){}function k9(e,t){var r=or,n=ha(),i=t(),a=!Ya(n.memoizedState,i);if(a&&(n.memoizedState=i,ai=!0),n=n.queue,GE(O9.bind(null,r,n,e),[e]),n.getSnapshot!==t||a||nn!==null&&nn.memoizedState.tag&1){if(r.flags|=2048,Tm(9,I9.bind(null,r,n,i,t),void 0,null),sn===null)throw Error(we(349));tf&30||L9(r,t,i)}return i}function L9(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=or.updateQueue,t===null?(t={lastEffect:null,stores:null},or.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function I9(e,t,r,n){t.value=r,t.getSnapshot=n,E9(t)&&D9(e)}function O9(e,t,r){return r(function(){E9(t)&&D9(e)})}function E9(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Ya(e,r)}catch{return!0}}function D9(e){var t=Bs(e,1);t!==null&&Ga(t,e,1,-1)}function Z5(e){var t=xo();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Sm,lastRenderedState:e},t.queue=e,e=e.dispatch=Ple.bind(null,or,e),[t.memoizedState,e]}function Tm(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=or.updateQueue,t===null?(t={lastEffect:null,stores:null},or.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function N9(){return ha().memoizedState}function J_(e,t,r,n){var i=xo();or.flags|=e,i.memoizedState=Tm(1|t,r,void 0,n===void 0?null:n)}function xS(e,t,r,n){var i=ha();n=n===void 0?null:n;var a=void 0;if(Gr!==null){var o=Gr.memoizedState;if(a=o.destroy,n!==null&&$E(n,o.deps)){i.memoizedState=Tm(t,r,a,n);return}}or.flags|=e,i.memoizedState=Tm(1|t,r,a,n)}function Y5(e,t){return J_(8390656,8,e,t)}function GE(e,t){return xS(2048,8,e,t)}function j9(e,t){return xS(4,2,e,t)}function R9(e,t){return xS(4,4,e,t)}function B9(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function z9(e,t,r){return r=r!=null?r.concat([e]):null,xS(4,4,B9.bind(null,t,e),r)}function WE(){}function $9(e,t){var r=ha();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&$E(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function F9(e,t){var r=ha();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&$E(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function V9(e,t,r){return tf&21?(Ya(r,t)||(r=Z7(),or.lanes|=r,rf|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ai=!0),e.memoizedState=r)}function Ale(e,t){var r=Nt;Nt=r!==0&&4>r?r:4,e(!0);var n=cA.transition;cA.transition={};try{e(!1),t()}finally{Nt=r,cA.transition=n}}function G9(){return ha().memoizedState}function Mle(e,t,r){var n=Zl(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},W9(e))H9(t,r);else if(r=C9(e,t,r,n),r!==null){var i=Un();Ga(r,e,n,i),U9(r,t,n)}}function Ple(e,t,r){var n=Zl(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(W9(e))H9(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,r);if(i.hasEagerState=!0,i.eagerState=s,Ya(s,o)){var l=t.interleaved;l===null?(i.next=i,NE(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}r=C9(e,t,i,n),r!==null&&(i=Un(),Ga(r,e,n,i),U9(r,t,n))}}function W9(e){var t=e.alternate;return e===or||t!==null&&t===or}function H9(e,t){jg=Wb=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function U9(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,bE(e,r)}}var Hb={readContext:fa,useCallback:An,useContext:An,useEffect:An,useImperativeHandle:An,useInsertionEffect:An,useLayoutEffect:An,useMemo:An,useReducer:An,useRef:An,useState:An,useDebugValue:An,useDeferredValue:An,useTransition:An,useMutableSource:An,useSyncExternalStore:An,useId:An,unstable_isNewReconciler:!1},kle={readContext:fa,useCallback:function(e,t){return xo().memoizedState=[e,t===void 0?null:t],e},useContext:fa,useEffect:Y5,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,J_(4194308,4,B9.bind(null,t,e),r)},useLayoutEffect:function(e,t){return J_(4194308,4,e,t)},useInsertionEffect:function(e,t){return J_(4,2,e,t)},useMemo:function(e,t){var r=xo();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=xo();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=Mle.bind(null,or,e),[n.memoizedState,e]},useRef:function(e){var t=xo();return e={current:e},t.memoizedState=e},useState:Z5,useDebugValue:WE,useDeferredValue:function(e){return xo().memoizedState=e},useTransition:function(){var e=Z5(!1),t=e[0];return e=Ale.bind(null,e[1]),xo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=or,i=xo();if(er){if(r===void 0)throw Error(we(407));r=r()}else{if(r=t(),sn===null)throw Error(we(349));tf&30||L9(n,t,r)}i.memoizedState=r;var a={value:r,getSnapshot:t};return i.queue=a,Y5(O9.bind(null,n,a,e),[e]),n.flags|=2048,Tm(9,I9.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=xo(),t=sn.identifierPrefix;if(er){var r=ys,n=ms;r=(n&~(1<<32-Va(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=wm++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=Cle++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Lle={readContext:fa,useCallback:$9,useContext:fa,useEffect:GE,useImperativeHandle:z9,useInsertionEffect:j9,useLayoutEffect:R9,useMemo:F9,useReducer:fA,useRef:N9,useState:function(){return fA(Sm)},useDebugValue:WE,useDeferredValue:function(e){var t=ha();return V9(t,Gr.memoizedState,e)},useTransition:function(){var e=fA(Sm)[0],t=ha().memoizedState;return[e,t]},useMutableSource:P9,useSyncExternalStore:k9,useId:G9,unstable_isNewReconciler:!1},Ile={readContext:fa,useCallback:$9,useContext:fa,useEffect:GE,useImperativeHandle:z9,useInsertionEffect:j9,useLayoutEffect:R9,useMemo:F9,useReducer:hA,useRef:N9,useState:function(){return hA(Sm)},useDebugValue:WE,useDeferredValue:function(e){var t=ha();return Gr===null?t.memoizedState=e:V9(t,Gr.memoizedState,e)},useTransition:function(){var e=hA(Sm)[0],t=ha().memoizedState;return[e,t]},useMutableSource:P9,useSyncExternalStore:k9,useId:G9,unstable_isNewReconciler:!1};function Oa(e,t){if(e&&e.defaultProps){t=ur({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function nk(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:ur({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var _S={isMounted:function(e){return(e=e._reactInternals)?wf(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Un(),i=Zl(e),a=As(n,i);a.payload=t,r!=null&&(a.callback=r),t=Hl(e,a,i),t!==null&&(Ga(t,e,i,n),q_(t,e,i))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Un(),i=Zl(e),a=As(n,i);a.tag=1,a.payload=t,r!=null&&(a.callback=r),t=Hl(e,a,i),t!==null&&(Ga(t,e,i,n),q_(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Un(),n=Zl(e),i=As(r,n);i.tag=2,t!=null&&(i.callback=t),t=Hl(e,i,n),t!==null&&(Ga(t,e,n,r),q_(t,e,n))}};function X5(e,t,r,n,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,a,o):t.prototype&&t.prototype.isPureReactComponent?!gm(r,n)||!gm(i,a):!0}function Z9(e,t,r){var n=!1,i=su,a=t.contextType;return typeof a=="object"&&a!==null?a=fa(a):(i=li(t)?Qc:Bn.current,n=t.contextTypes,a=(n=n!=null)?yd(e,i):su),t=new t(r,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=_S,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function q5(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&_S.enqueueReplaceState(t,t.state,null)}function ik(e,t,r,n){var i=e.stateNode;i.props=r,i.state=e.memoizedState,i.refs={},jE(e);var a=t.contextType;typeof a=="object"&&a!==null?i.context=fa(a):(a=li(t)?Qc:Bn.current,i.context=yd(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(nk(e,t,a,r),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&_S.enqueueReplaceState(i,i.state,null),Vb(e,r,i,n),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function wd(e,t){try{var r="",n=t;do r+=ase(n),n=n.return;while(n);var i=r}catch(a){i=`
Error generating stack: `+a.message+`
`+a.stack}return{value:e,source:t,stack:i,digest:null}}function dA(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function ak(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Ole=typeof WeakMap=="function"?WeakMap:Map;function Y9(e,t,r){r=As(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Zb||(Zb=!0,pk=n),ak(e,t)},r}function X9(e,t,r){r=As(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var i=t.value;r.payload=function(){return n(i)},r.callback=function(){ak(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){ak(e,t),typeof n!="function"&&(Ul===null?Ul=new Set([this]):Ul.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function K5(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new Ole;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(r)||(i.add(r),e=Ule.bind(null,e,t,r),t.then(e,e))}function J5(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Q5(e,t,r,n,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=As(-1,1),t.tag=2,Hl(r,t,1))),r.lanes|=1),e)}var Ele=Js.ReactCurrentOwner,ai=!1;function Fn(e,t,r,n){t.child=e===null?T9(t,null,r,n):_d(t,e.child,r,n)}function eB(e,t,r,n,i){r=r.render;var a=t.ref;return id(t,i),n=FE(e,t,r,n,a,i),r=VE(),e!==null&&!ai?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,zs(e,t,i)):(er&&r&&kE(t),t.flags|=1,Fn(e,t,n,i),t.child)}function tB(e,t,r,n,i){if(e===null){var a=r.type;return typeof a=="function"&&!JE(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=a,q9(e,t,a,n,i)):(e=rb(r.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&i)){var o=a.memoizedProps;if(r=r.compare,r=r!==null?r:gm,r(o,n)&&e.ref===t.ref)return zs(e,t,i)}return t.flags|=1,e=Yl(a,n),e.ref=t.ref,e.return=t,t.child=e}function q9(e,t,r,n,i){if(e!==null){var a=e.memoizedProps;if(gm(a,n)&&e.ref===t.ref)if(ai=!1,t.pendingProps=n=a,(e.lanes&i)!==0)e.flags&131072&&(ai=!0);else return t.lanes=e.lanes,zs(e,t,i)}return ok(e,t,r,n,i)}function K9(e,t,r){var n=t.pendingProps,i=n.children,a=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Yt(Vh,yi),yi|=r;else{if(!(r&1073741824))return e=a!==null?a.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Yt(Vh,yi),yi|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=a!==null?a.baseLanes:r,Yt(Vh,yi),yi|=n}else a!==null?(n=a.baseLanes|r,t.memoizedState=null):n=r,Yt(Vh,yi),yi|=n;return Fn(e,t,i,r),t.child}function J9(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function ok(e,t,r,n,i){var a=li(r)?Qc:Bn.current;return a=yd(t,a),id(t,i),r=FE(e,t,r,n,a,i),n=VE(),e!==null&&!ai?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,zs(e,t,i)):(er&&n&&kE(t),t.flags|=1,Fn(e,t,r,i),t.child)}function rB(e,t,r,n,i){if(li(r)){var a=!0;Rb(t)}else a=!1;if(id(t,i),t.stateNode===null)Q_(e,t),Z9(t,r,n),ik(t,r,n,i),n=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var l=o.context,u=r.contextType;typeof u=="object"&&u!==null?u=fa(u):(u=li(r)?Qc:Bn.current,u=yd(t,u));var c=r.getDerivedStateFromProps,f=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==n||l!==u)&&q5(t,o,n,u),wl=!1;var h=t.memoizedState;o.state=h,Vb(t,n,o,i),l=t.memoizedState,s!==n||h!==l||si.current||wl?(typeof c=="function"&&(nk(t,r,c,n),l=t.memoizedState),(s=wl||X5(t,r,s,n,h,l,u))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),o.props=n,o.state=l,o.context=u,n=s):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,A9(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:Oa(t.type,s),o.props=u,f=t.pendingProps,h=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=fa(l):(l=li(r)?Qc:Bn.current,l=yd(t,l));var d=r.getDerivedStateFromProps;(c=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==f||h!==l)&&q5(t,o,n,l),wl=!1,h=t.memoizedState,o.state=h,Vb(t,n,o,i);var v=t.memoizedState;s!==f||h!==v||si.current||wl?(typeof d=="function"&&(nk(t,r,d,n),v=t.memoizedState),(u=wl||X5(t,r,u,n,h,v,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,v,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,v,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=v),o.props=n,o.state=v,o.context=l,n=u):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),n=!1)}return sk(e,t,r,n,a,i)}function sk(e,t,r,n,i,a){J9(e,t);var o=(t.flags&128)!==0;if(!n&&!o)return i&&F5(t,r,!1),zs(e,t,a);n=t.stateNode,Ele.current=t;var s=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&o?(t.child=_d(t,e.child,null,a),t.child=_d(t,null,s,a)):Fn(e,t,s,a),t.memoizedState=n.state,i&&F5(t,r,!0),t.child}function Q9(e){var t=e.stateNode;t.pendingContext?$5(e,t.pendingContext,t.pendingContext!==t.context):t.context&&$5(e,t.context,!1),RE(e,t.containerInfo)}function nB(e,t,r,n,i){return xd(),IE(i),t.flags|=256,Fn(e,t,r,n),t.child}var lk={dehydrated:null,treeContext:null,retryLane:0};function uk(e){return{baseLanes:e,cachePool:null,transitions:null}}function eZ(e,t,r){var n=t.pendingProps,i=ar.current,a=!1,o=(t.flags&128)!==0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Yt(ar,i&1),e===null)return tk(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=n.children,e=n.fallback,a?(n=t.mode,a=t.child,o={mode:"hidden",children:o},!(n&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=SS(o,n,0,null),e=Fc(e,n,r,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=uk(r),t.memoizedState=lk,e):HE(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return Dle(e,t,o,n,s,i,r);if(a){a=n.fallback,o=t.mode,i=e.child,s=i.sibling;var l={mode:"hidden",children:n.children};return!(o&1)&&t.child!==i?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=Yl(i,l),n.subtreeFlags=i.subtreeFlags&14680064),s!==null?a=Yl(s,a):(a=Fc(a,o,r,null),a.flags|=2),a.return=t,n.return=t,n.sibling=a,t.child=n,n=a,a=t.child,o=e.child.memoizedState,o=o===null?uk(r):{baseLanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~r,t.memoizedState=lk,n}return a=e.child,e=a.sibling,n=Yl(a,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function HE(e,t){return t=SS({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function lx(e,t,r,n){return n!==null&&IE(n),_d(t,e.child,null,r),e=HE(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Dle(e,t,r,n,i,a,o){if(r)return t.flags&256?(t.flags&=-257,n=dA(Error(we(422))),lx(e,t,o,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=n.fallback,i=t.mode,n=SS({mode:"visible",children:n.children},i,0,null),a=Fc(a,i,o,null),a.flags|=2,n.return=t,a.return=t,n.sibling=a,t.child=n,t.mode&1&&_d(t,e.child,null,o),t.child.memoizedState=uk(o),t.memoizedState=lk,a);if(!(t.mode&1))return lx(e,t,o,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var s=n.dgst;return n=s,a=Error(we(419)),n=dA(a,n,void 0),lx(e,t,o,n)}if(s=(o&e.childLanes)!==0,ai||s){if(n=sn,n!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|o)?0:i,i!==0&&i!==a.retryLane&&(a.retryLane=i,Bs(e,i),Ga(n,e,i,-1))}return KE(),n=dA(Error(we(421))),lx(e,t,o,n)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Zle.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,Ci=Wl(i.nextSibling),Li=t,er=!0,Ra=null,e!==null&&(Ji[Qi++]=ms,Ji[Qi++]=ys,Ji[Qi++]=ef,ms=e.id,ys=e.overflow,ef=t),t=HE(t,n.children),t.flags|=4096,t)}function iB(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),rk(e.return,t,r)}function vA(e,t,r,n,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=n,a.tail=r,a.tailMode=i)}function tZ(e,t,r){var n=t.pendingProps,i=n.revealOrder,a=n.tail;if(Fn(e,t,n.children,r),n=ar.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&iB(e,r,t);else if(e.tag===19)iB(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(Yt(ar,n),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(r=t.child,i=null;r!==null;)e=r.alternate,e!==null&&Gb(e)===null&&(i=r),r=r.sibling;r=i,r===null?(i=t.child,t.child=null):(i=r.sibling,r.sibling=null),vA(t,!1,i,r,a);break;case"backwards":for(r=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Gb(e)===null){t.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}vA(t,!0,r,null,a);break;case"together":vA(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Q_(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function zs(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),rf|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(we(153));if(t.child!==null){for(e=t.child,r=Yl(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Yl(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Nle(e,t,r){switch(t.tag){case 3:Q9(t),xd();break;case 5:M9(t);break;case 1:li(t.type)&&Rb(t);break;case 4:RE(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,i=t.memoizedProps.value;Yt($b,n._currentValue),n._currentValue=i;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(Yt(ar,ar.current&1),t.flags|=128,null):r&t.child.childLanes?eZ(e,t,r):(Yt(ar,ar.current&1),e=zs(e,t,r),e!==null?e.sibling:null);Yt(ar,ar.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return tZ(e,t,r);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Yt(ar,ar.current),n)break;return null;case 22:case 23:return t.lanes=0,K9(e,t,r)}return zs(e,t,r)}var rZ,ck,nZ,iZ;rZ=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};ck=function(){};nZ=function(e,t,r,n){var i=e.memoizedProps;if(i!==n){e=t.stateNode,Mc(Do.current);var a=null;switch(r){case"input":i=OP(e,i),n=OP(e,n),a=[];break;case"select":i=ur({},i,{value:void 0}),n=ur({},n,{value:void 0}),a=[];break;case"textarea":i=NP(e,i),n=NP(e,n),a=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Nb)}RP(r,n);var o;r=null;for(u in i)if(!n.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var s=i[u];for(o in s)s.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(um.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in n){var l=n[u];if(s=i!=null?i[u]:void 0,n.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(o in s)!s.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in l)l.hasOwnProperty(o)&&s[o]!==l[o]&&(r||(r={}),r[o]=l[o])}else r||(a||(a=[]),a.push(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(a=a||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(a=a||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(um.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&qt("scroll",e),a||s===l||(a=[])):(a=a||[]).push(u,l))}r&&(a=a||[]).push("style",r);var u=a;(t.updateQueue=u)&&(t.flags|=4)}};iZ=function(e,t,r,n){r!==n&&(t.flags|=4)};function wp(e,t){if(!er)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Mn(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function jle(e,t,r){var n=t.pendingProps;switch(LE(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Mn(t),null;case 1:return li(t.type)&&jb(),Mn(t),null;case 3:return n=t.stateNode,bd(),Qt(si),Qt(Bn),zE(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ox(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ra!==null&&(yk(Ra),Ra=null))),ck(e,t),Mn(t),null;case 5:BE(t);var i=Mc(bm.current);if(r=t.type,e!==null&&t.stateNode!=null)nZ(e,t,r,n,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(we(166));return Mn(t),null}if(e=Mc(Do.current),ox(t)){n=t.stateNode,r=t.type;var a=t.memoizedProps;switch(n[bo]=t,n[xm]=a,e=(t.mode&1)!==0,r){case"dialog":qt("cancel",n),qt("close",n);break;case"iframe":case"object":case"embed":qt("load",n);break;case"video":case"audio":for(i=0;i<gg.length;i++)qt(gg[i],n);break;case"source":qt("error",n);break;case"img":case"image":case"link":qt("error",n),qt("load",n);break;case"details":qt("toggle",n);break;case"input":d5(n,a),qt("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!a.multiple},qt("invalid",n);break;case"textarea":p5(n,a),qt("invalid",n)}RP(r,a),i=null;for(var o in a)if(a.hasOwnProperty(o)){var s=a[o];o==="children"?typeof s=="string"?n.textContent!==s&&(a.suppressHydrationWarning!==!0&&ax(n.textContent,s,e),i=["children",s]):typeof s=="number"&&n.textContent!==""+s&&(a.suppressHydrationWarning!==!0&&ax(n.textContent,s,e),i=["children",""+s]):um.hasOwnProperty(o)&&s!=null&&o==="onScroll"&&qt("scroll",n)}switch(r){case"input":K0(n),v5(n,a,!0);break;case"textarea":K0(n),g5(n);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(n.onclick=Nb)}n=i,t.updateQueue=n,n!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=O7(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[bo]=t,e[xm]=n,rZ(e,t,!1,!1),t.stateNode=e;e:{switch(o=BP(r,n),r){case"dialog":qt("cancel",e),qt("close",e),i=n;break;case"iframe":case"object":case"embed":qt("load",e),i=n;break;case"video":case"audio":for(i=0;i<gg.length;i++)qt(gg[i],e);i=n;break;case"source":qt("error",e),i=n;break;case"img":case"image":case"link":qt("error",e),qt("load",e),i=n;break;case"details":qt("toggle",e),i=n;break;case"input":d5(e,n),i=OP(e,n),qt("invalid",e);break;case"option":i=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},i=ur({},n,{value:void 0}),qt("invalid",e);break;case"textarea":p5(e,n),i=NP(e,n),qt("invalid",e);break;default:i=n}RP(r,i),s=i;for(a in s)if(s.hasOwnProperty(a)){var l=s[a];a==="style"?N7(e,l):a==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&E7(e,l)):a==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&cm(e,l):typeof l=="number"&&cm(e,""+l):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(um.hasOwnProperty(a)?l!=null&&a==="onScroll"&&qt("scroll",e):l!=null&&pE(e,a,l,o))}switch(r){case"input":K0(e),v5(e,n,!1);break;case"textarea":K0(e),g5(e);break;case"option":n.value!=null&&e.setAttribute("value",""+ou(n.value));break;case"select":e.multiple=!!n.multiple,a=n.value,a!=null?ed(e,!!n.multiple,a,!1):n.defaultValue!=null&&ed(e,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Nb)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Mn(t),null;case 6:if(e&&t.stateNode!=null)iZ(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(we(166));if(r=Mc(bm.current),Mc(Do.current),ox(t)){if(n=t.stateNode,r=t.memoizedProps,n[bo]=t,(a=n.nodeValue!==r)&&(e=Li,e!==null))switch(e.tag){case 3:ax(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ax(n.nodeValue,r,(e.mode&1)!==0)}a&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[bo]=t,t.stateNode=n}return Mn(t),null;case 13:if(Qt(ar),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(er&&Ci!==null&&t.mode&1&&!(t.flags&128))w9(),xd(),t.flags|=98560,a=!1;else if(a=ox(t),n!==null&&n.dehydrated!==null){if(e===null){if(!a)throw Error(we(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(we(317));a[bo]=t}else xd(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Mn(t),a=!1}else Ra!==null&&(yk(Ra),Ra=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||ar.current&1?Hr===0&&(Hr=3):KE())),t.updateQueue!==null&&(t.flags|=4),Mn(t),null);case 4:return bd(),ck(e,t),e===null&&mm(t.stateNode.containerInfo),Mn(t),null;case 10:return DE(t.type._context),Mn(t),null;case 17:return li(t.type)&&jb(),Mn(t),null;case 19:if(Qt(ar),a=t.memoizedState,a===null)return Mn(t),null;if(n=(t.flags&128)!==0,o=a.rendering,o===null)if(n)wp(a,!1);else{if(Hr!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Gb(e),o!==null){for(t.flags|=128,wp(a,!1),n=o.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)a=r,e=n,a.flags&=14680066,o=a.alternate,o===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,e=o.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Yt(ar,ar.current&1|2),t.child}e=e.sibling}a.tail!==null&&Tr()>Sd&&(t.flags|=128,n=!0,wp(a,!1),t.lanes=4194304)}else{if(!n)if(e=Gb(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),wp(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!er)return Mn(t),null}else 2*Tr()-a.renderingStartTime>Sd&&r!==1073741824&&(t.flags|=128,n=!0,wp(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(r=a.last,r!==null?r.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Tr(),t.sibling=null,r=ar.current,Yt(ar,n?r&1|2:r&1),t):(Mn(t),null);case 22:case 23:return qE(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?yi&1073741824&&(Mn(t),t.subtreeFlags&6&&(t.flags|=8192)):Mn(t),null;case 24:return null;case 25:return null}throw Error(we(156,t.tag))}function Rle(e,t){switch(LE(t),t.tag){case 1:return li(t.type)&&jb(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return bd(),Qt(si),Qt(Bn),zE(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return BE(t),null;case 13:if(Qt(ar),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(we(340));xd()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Qt(ar),null;case 4:return bd(),null;case 10:return DE(t.type._context),null;case 22:case 23:return qE(),null;case 24:return null;default:return null}}var ux=!1,En=!1,Ble=typeof WeakSet=="function"?WeakSet:Set,$e=null;function Fh(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){hr(e,t,n)}else r.current=null}function fk(e,t,r){try{r()}catch(n){hr(e,t,n)}}var aB=!1;function zle(e,t){if(YP=Ob,e=u9(),PE(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var o=0,s=-1,l=-1,u=0,c=0,f=e,h=null;t:for(;;){for(var d;f!==r||i!==0&&f.nodeType!==3||(s=o+i),f!==a||n!==0&&f.nodeType!==3||(l=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(d=f.firstChild)!==null;)h=f,f=d;for(;;){if(f===e)break t;if(h===r&&++u===i&&(s=o),h===a&&++c===n&&(l=o),(d=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=d}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(XP={focusedElem:e,selectionRange:r},Ob=!1,$e=t;$e!==null;)if(t=$e,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$e=e;else for(;$e!==null;){t=$e;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var m=v.memoizedProps,y=v.memoizedState,x=t.stateNode,_=x.getSnapshotBeforeUpdate(t.elementType===t.type?m:Oa(t.type,m),y);x.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(we(163))}}catch(S){hr(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,$e=e;break}$e=t.return}return v=aB,aB=!1,v}function Rg(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&fk(t,r,a)}i=i.next}while(i!==n)}}function bS(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function hk(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function aZ(e){var t=e.alternate;t!==null&&(e.alternate=null,aZ(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[bo],delete t[xm],delete t[JP],delete t[ble],delete t[wle])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function oZ(e){return e.tag===5||e.tag===3||e.tag===4}function oB(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||oZ(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function dk(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Nb));else if(n!==4&&(e=e.child,e!==null))for(dk(e,t,r),e=e.sibling;e!==null;)dk(e,t,r),e=e.sibling}function vk(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(vk(e,t,r),e=e.sibling;e!==null;)vk(e,t,r),e=e.sibling}var dn=null,Da=!1;function sl(e,t,r){for(r=r.child;r!==null;)sZ(e,t,r),r=r.sibling}function sZ(e,t,r){if(Eo&&typeof Eo.onCommitFiberUnmount=="function")try{Eo.onCommitFiberUnmount(dS,r)}catch{}switch(r.tag){case 5:En||Fh(r,t);case 6:var n=dn,i=Da;dn=null,sl(e,t,r),dn=n,Da=i,dn!==null&&(Da?(e=dn,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):dn.removeChild(r.stateNode));break;case 18:dn!==null&&(Da?(e=dn,r=r.stateNode,e.nodeType===8?sA(e.parentNode,r):e.nodeType===1&&sA(e,r),vm(e)):sA(dn,r.stateNode));break;case 4:n=dn,i=Da,dn=r.stateNode.containerInfo,Da=!0,sl(e,t,r),dn=n,Da=i;break;case 0:case 11:case 14:case 15:if(!En&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&fk(r,t,o),i=i.next}while(i!==n)}sl(e,t,r);break;case 1:if(!En&&(Fh(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){hr(r,t,s)}sl(e,t,r);break;case 21:sl(e,t,r);break;case 22:r.mode&1?(En=(n=En)||r.memoizedState!==null,sl(e,t,r),En=n):sl(e,t,r);break;default:sl(e,t,r)}}function sB(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Ble),t.forEach(function(n){var i=Yle.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Ca(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var i=r[n];try{var a=e,o=t,s=o;e:for(;s!==null;){switch(s.tag){case 5:dn=s.stateNode,Da=!1;break e;case 3:dn=s.stateNode.containerInfo,Da=!0;break e;case 4:dn=s.stateNode.containerInfo,Da=!0;break e}s=s.return}if(dn===null)throw Error(we(160));sZ(a,o,i),dn=null,Da=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){hr(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)lZ(t,e),t=t.sibling}function lZ(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ca(t,e),lo(e),n&4){try{Rg(3,e,e.return),bS(3,e)}catch(m){hr(e,e.return,m)}try{Rg(5,e,e.return)}catch(m){hr(e,e.return,m)}}break;case 1:Ca(t,e),lo(e),n&512&&r!==null&&Fh(r,r.return);break;case 5:if(Ca(t,e),lo(e),n&512&&r!==null&&Fh(r,r.return),e.flags&32){var i=e.stateNode;try{cm(i,"")}catch(m){hr(e,e.return,m)}}if(n&4&&(i=e.stateNode,i!=null)){var a=e.memoizedProps,o=r!==null?r.memoizedProps:a,s=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{s==="input"&&a.type==="radio"&&a.name!=null&&L7(i,a),BP(s,o);var u=BP(s,a);for(o=0;o<l.length;o+=2){var c=l[o],f=l[o+1];c==="style"?N7(i,f):c==="dangerouslySetInnerHTML"?E7(i,f):c==="children"?cm(i,f):pE(i,c,f,u)}switch(s){case"input":EP(i,a);break;case"textarea":I7(i,a);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var d=a.value;d!=null?ed(i,!!a.multiple,d,!1):h!==!!a.multiple&&(a.defaultValue!=null?ed(i,!!a.multiple,a.defaultValue,!0):ed(i,!!a.multiple,a.multiple?[]:"",!1))}i[xm]=a}catch(m){hr(e,e.return,m)}}break;case 6:if(Ca(t,e),lo(e),n&4){if(e.stateNode===null)throw Error(we(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(m){hr(e,e.return,m)}}break;case 3:if(Ca(t,e),lo(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{vm(t.containerInfo)}catch(m){hr(e,e.return,m)}break;case 4:Ca(t,e),lo(e);break;case 13:Ca(t,e),lo(e),i=e.child,i.flags&8192&&(a=i.memoizedState!==null,i.stateNode.isHidden=a,!a||i.alternate!==null&&i.alternate.memoizedState!==null||(YE=Tr())),n&4&&sB(e);break;case 22:if(c=r!==null&&r.memoizedState!==null,e.mode&1?(En=(u=En)||c,Ca(t,e),En=u):Ca(t,e),lo(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for($e=e,c=e.child;c!==null;){for(f=$e=c;$e!==null;){switch(h=$e,d=h.child,h.tag){case 0:case 11:case 14:case 15:Rg(4,h,h.return);break;case 1:Fh(h,h.return);var v=h.stateNode;if(typeof v.componentWillUnmount=="function"){n=h,r=h.return;try{t=n,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(m){hr(n,r,m)}}break;case 5:Fh(h,h.return);break;case 22:if(h.memoizedState!==null){uB(f);continue}}d!==null?(d.return=h,$e=d):uB(f)}c=c.sibling}e:for(c=null,f=e;;){if(f.tag===5){if(c===null){c=f;try{i=f.stateNode,u?(a=i.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(s=f.stateNode,l=f.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,s.style.display=D7("display",o))}catch(m){hr(e,e.return,m)}}}else if(f.tag===6){if(c===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(m){hr(e,e.return,m)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;c===f&&(c=null),f=f.return}c===f&&(c=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Ca(t,e),lo(e),n&4&&sB(e);break;case 21:break;default:Ca(t,e),lo(e)}}function lo(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(oZ(r)){var n=r;break e}r=r.return}throw Error(we(160))}switch(n.tag){case 5:var i=n.stateNode;n.flags&32&&(cm(i,""),n.flags&=-33);var a=oB(e);vk(e,a,i);break;case 3:case 4:var o=n.stateNode.containerInfo,s=oB(e);dk(e,s,o);break;default:throw Error(we(161))}}catch(l){hr(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function $le(e,t,r){$e=e,uZ(e)}function uZ(e,t,r){for(var n=(e.mode&1)!==0;$e!==null;){var i=$e,a=i.child;if(i.tag===22&&n){var o=i.memoizedState!==null||ux;if(!o){var s=i.alternate,l=s!==null&&s.memoizedState!==null||En;s=ux;var u=En;if(ux=o,(En=l)&&!u)for($e=i;$e!==null;)o=$e,l=o.child,o.tag===22&&o.memoizedState!==null?cB(i):l!==null?(l.return=o,$e=l):cB(i);for(;a!==null;)$e=a,uZ(a),a=a.sibling;$e=i,ux=s,En=u}lB(e)}else i.subtreeFlags&8772&&a!==null?(a.return=i,$e=a):lB(e)}}function lB(e){for(;$e!==null;){var t=$e;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:En||bS(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!En)if(r===null)n.componentDidMount();else{var i=t.elementType===t.type?r.memoizedProps:Oa(t.type,r.memoizedProps);n.componentDidUpdate(i,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&U5(t,a,n);break;case 3:var o=t.updateQueue;if(o!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}U5(t,o,r)}break;case 5:var s=t.stateNode;if(r===null&&t.flags&4){r=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var f=c.dehydrated;f!==null&&vm(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(we(163))}En||t.flags&512&&hk(t)}catch(h){hr(t,t.return,h)}}if(t===e){$e=null;break}if(r=t.sibling,r!==null){r.return=t.return,$e=r;break}$e=t.return}}function uB(e){for(;$e!==null;){var t=$e;if(t===e){$e=null;break}var r=t.sibling;if(r!==null){r.return=t.return,$e=r;break}$e=t.return}}function cB(e){for(;$e!==null;){var t=$e;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{bS(4,t)}catch(l){hr(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var i=t.return;try{n.componentDidMount()}catch(l){hr(t,i,l)}}var a=t.return;try{hk(t)}catch(l){hr(t,a,l)}break;case 5:var o=t.return;try{hk(t)}catch(l){hr(t,o,l)}}}catch(l){hr(t,t.return,l)}if(t===e){$e=null;break}var s=t.sibling;if(s!==null){s.return=t.return,$e=s;break}$e=t.return}}var Fle=Math.ceil,Ub=Js.ReactCurrentDispatcher,UE=Js.ReactCurrentOwner,oa=Js.ReactCurrentBatchConfig,Tt=0,sn=null,Er=null,yn=0,yi=0,Vh=yu(0),Hr=0,Cm=null,rf=0,wS=0,ZE=0,Bg=null,ti=null,YE=0,Sd=1/0,fs=null,Zb=!1,pk=null,Ul=null,cx=!1,Ll=null,Yb=0,zg=0,gk=null,eb=-1,tb=0;function Un(){return Tt&6?Tr():eb!==-1?eb:eb=Tr()}function Zl(e){return e.mode&1?Tt&2&&yn!==0?yn&-yn:Tle.transition!==null?(tb===0&&(tb=Z7()),tb):(e=Nt,e!==0||(e=window.event,e=e===void 0?16:e9(e.type)),e):1}function Ga(e,t,r,n){if(50<zg)throw zg=0,gk=null,Error(we(185));Zy(e,r,n),(!(Tt&2)||e!==sn)&&(e===sn&&(!(Tt&2)&&(wS|=r),Hr===4&&Pl(e,yn)),ui(e,n),r===1&&Tt===0&&!(t.mode&1)&&(Sd=Tr()+500,yS&&xu()))}function ui(e,t){var r=e.callbackNode;Tse(e,t);var n=Ib(e,e===sn?yn:0);if(n===0)r!==null&&x5(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&x5(r),t===1)e.tag===0?Sle(fB.bind(null,e)):x9(fB.bind(null,e)),xle(function(){!(Tt&6)&&xu()}),r=null;else{switch(Y7(n)){case 1:r=_E;break;case 4:r=H7;break;case 16:r=Lb;break;case 536870912:r=U7;break;default:r=Lb}r=mZ(r,cZ.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function cZ(e,t){if(eb=-1,tb=0,Tt&6)throw Error(we(327));var r=e.callbackNode;if(ad()&&e.callbackNode!==r)return null;var n=Ib(e,e===sn?yn:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=Xb(e,n);else{t=n;var i=Tt;Tt|=2;var a=hZ();(sn!==e||yn!==t)&&(fs=null,Sd=Tr()+500,$c(e,t));do try{Wle();break}catch(s){fZ(e,s)}while(!0);EE(),Ub.current=a,Tt=i,Er!==null?t=0:(sn=null,yn=0,t=Hr)}if(t!==0){if(t===2&&(i=GP(e),i!==0&&(n=i,t=mk(e,i))),t===1)throw r=Cm,$c(e,0),Pl(e,n),ui(e,Tr()),r;if(t===6)Pl(e,n);else{if(i=e.current.alternate,!(n&30)&&!Vle(i)&&(t=Xb(e,n),t===2&&(a=GP(e),a!==0&&(n=a,t=mk(e,a))),t===1))throw r=Cm,$c(e,0),Pl(e,n),ui(e,Tr()),r;switch(e.finishedWork=i,e.finishedLanes=n,t){case 0:case 1:throw Error(we(345));case 2:fc(e,ti,fs);break;case 3:if(Pl(e,n),(n&130023424)===n&&(t=YE+500-Tr(),10<t)){if(Ib(e,0)!==0)break;if(i=e.suspendedLanes,(i&n)!==n){Un(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=KP(fc.bind(null,e,ti,fs),t);break}fc(e,ti,fs);break;case 4:if(Pl(e,n),(n&4194240)===n)break;for(t=e.eventTimes,i=-1;0<n;){var o=31-Va(n);a=1<<o,o=t[o],o>i&&(i=o),n&=~a}if(n=i,n=Tr()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Fle(n/1960))-n,10<n){e.timeoutHandle=KP(fc.bind(null,e,ti,fs),n);break}fc(e,ti,fs);break;case 5:fc(e,ti,fs);break;default:throw Error(we(329))}}}return ui(e,Tr()),e.callbackNode===r?cZ.bind(null,e):null}function mk(e,t){var r=Bg;return e.current.memoizedState.isDehydrated&&($c(e,t).flags|=256),e=Xb(e,t),e!==2&&(t=ti,ti=r,t!==null&&yk(t)),e}function yk(e){ti===null?ti=e:ti.push.apply(ti,e)}function Vle(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var i=r[n],a=i.getSnapshot;i=i.value;try{if(!Ya(a(),i))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Pl(e,t){for(t&=~ZE,t&=~wS,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Va(t),n=1<<r;e[r]=-1,t&=~n}}function fB(e){if(Tt&6)throw Error(we(327));ad();var t=Ib(e,0);if(!(t&1))return ui(e,Tr()),null;var r=Xb(e,t);if(e.tag!==0&&r===2){var n=GP(e);n!==0&&(t=n,r=mk(e,n))}if(r===1)throw r=Cm,$c(e,0),Pl(e,t),ui(e,Tr()),r;if(r===6)throw Error(we(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,fc(e,ti,fs),ui(e,Tr()),null}function XE(e,t){var r=Tt;Tt|=1;try{return e(t)}finally{Tt=r,Tt===0&&(Sd=Tr()+500,yS&&xu())}}function nf(e){Ll!==null&&Ll.tag===0&&!(Tt&6)&&ad();var t=Tt;Tt|=1;var r=oa.transition,n=Nt;try{if(oa.transition=null,Nt=1,e)return e()}finally{Nt=n,oa.transition=r,Tt=t,!(Tt&6)&&xu()}}function qE(){yi=Vh.current,Qt(Vh)}function $c(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,yle(r)),Er!==null)for(r=Er.return;r!==null;){var n=r;switch(LE(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&jb();break;case 3:bd(),Qt(si),Qt(Bn),zE();break;case 5:BE(n);break;case 4:bd();break;case 13:Qt(ar);break;case 19:Qt(ar);break;case 10:DE(n.type._context);break;case 22:case 23:qE()}r=r.return}if(sn=e,Er=e=Yl(e.current,null),yn=yi=t,Hr=0,Cm=null,ZE=wS=rf=0,ti=Bg=null,Ac!==null){for(t=0;t<Ac.length;t++)if(r=Ac[t],n=r.interleaved,n!==null){r.interleaved=null;var i=n.next,a=r.pending;if(a!==null){var o=a.next;a.next=i,n.next=o}r.pending=n}Ac=null}return e}function fZ(e,t){do{var r=Er;try{if(EE(),K_.current=Hb,Wb){for(var n=or.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}Wb=!1}if(tf=0,nn=Gr=or=null,jg=!1,wm=0,UE.current=null,r===null||r.return===null){Hr=1,Cm=t,Er=null;break}e:{var a=e,o=r.return,s=r,l=t;if(t=yn,s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=s,f=c.tag;if(!(c.mode&1)&&(f===0||f===11||f===15)){var h=c.alternate;h?(c.updateQueue=h.updateQueue,c.memoizedState=h.memoizedState,c.lanes=h.lanes):(c.updateQueue=null,c.memoizedState=null)}var d=J5(o);if(d!==null){d.flags&=-257,Q5(d,o,s,a,t),d.mode&1&&K5(a,u,t),t=d,l=u;var v=t.updateQueue;if(v===null){var m=new Set;m.add(l),t.updateQueue=m}else v.add(l);break e}else{if(!(t&1)){K5(a,u,t),KE();break e}l=Error(we(426))}}else if(er&&s.mode&1){var y=J5(o);if(y!==null){!(y.flags&65536)&&(y.flags|=256),Q5(y,o,s,a,t),IE(wd(l,s));break e}}a=l=wd(l,s),Hr!==4&&(Hr=2),Bg===null?Bg=[a]:Bg.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var x=Y9(a,l,t);H5(a,x);break e;case 1:s=l;var _=a.type,b=a.stateNode;if(!(a.flags&128)&&(typeof _.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Ul===null||!Ul.has(b)))){a.flags|=65536,t&=-t,a.lanes|=t;var S=X9(a,s,t);H5(a,S);break e}}a=a.return}while(a!==null)}vZ(r)}catch(T){t=T,Er===r&&r!==null&&(Er=r=r.return);continue}break}while(!0)}function hZ(){var e=Ub.current;return Ub.current=Hb,e===null?Hb:e}function KE(){(Hr===0||Hr===3||Hr===2)&&(Hr=4),sn===null||!(rf&268435455)&&!(wS&268435455)||Pl(sn,yn)}function Xb(e,t){var r=Tt;Tt|=2;var n=hZ();(sn!==e||yn!==t)&&(fs=null,$c(e,t));do try{Gle();break}catch(i){fZ(e,i)}while(!0);if(EE(),Tt=r,Ub.current=n,Er!==null)throw Error(we(261));return sn=null,yn=0,Hr}function Gle(){for(;Er!==null;)dZ(Er)}function Wle(){for(;Er!==null&&!pse();)dZ(Er)}function dZ(e){var t=gZ(e.alternate,e,yi);e.memoizedProps=e.pendingProps,t===null?vZ(e):Er=t,UE.current=null}function vZ(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=Rle(r,t),r!==null){r.flags&=32767,Er=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Hr=6,Er=null;return}}else if(r=jle(r,t,yi),r!==null){Er=r;return}if(t=t.sibling,t!==null){Er=t;return}Er=t=e}while(t!==null);Hr===0&&(Hr=5)}function fc(e,t,r){var n=Nt,i=oa.transition;try{oa.transition=null,Nt=1,Hle(e,t,r,n)}finally{oa.transition=i,Nt=n}return null}function Hle(e,t,r,n){do ad();while(Ll!==null);if(Tt&6)throw Error(we(327));r=e.finishedWork;var i=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(we(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(Cse(e,a),e===sn&&(Er=sn=null,yn=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||cx||(cx=!0,mZ(Lb,function(){return ad(),null})),a=(r.flags&15990)!==0,r.subtreeFlags&15990||a){a=oa.transition,oa.transition=null;var o=Nt;Nt=1;var s=Tt;Tt|=4,UE.current=null,zle(e,r),lZ(r,e),fle(XP),Ob=!!YP,XP=YP=null,e.current=r,$le(r),gse(),Tt=s,Nt=o,oa.transition=a}else e.current=r;if(cx&&(cx=!1,Ll=e,Yb=i),a=e.pendingLanes,a===0&&(Ul=null),xse(r.stateNode),ui(e,Tr()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)i=t[r],n(i.value,{componentStack:i.stack,digest:i.digest});if(Zb)throw Zb=!1,e=pk,pk=null,e;return Yb&1&&e.tag!==0&&ad(),a=e.pendingLanes,a&1?e===gk?zg++:(zg=0,gk=e):zg=0,xu(),null}function ad(){if(Ll!==null){var e=Y7(Yb),t=oa.transition,r=Nt;try{if(oa.transition=null,Nt=16>e?16:e,Ll===null)var n=!1;else{if(e=Ll,Ll=null,Yb=0,Tt&6)throw Error(we(331));var i=Tt;for(Tt|=4,$e=e.current;$e!==null;){var a=$e,o=a.child;if($e.flags&16){var s=a.deletions;if(s!==null){for(var l=0;l<s.length;l++){var u=s[l];for($e=u;$e!==null;){var c=$e;switch(c.tag){case 0:case 11:case 15:Rg(8,c,a)}var f=c.child;if(f!==null)f.return=c,$e=f;else for(;$e!==null;){c=$e;var h=c.sibling,d=c.return;if(aZ(c),c===u){$e=null;break}if(h!==null){h.return=d,$e=h;break}$e=d}}}var v=a.alternate;if(v!==null){var m=v.child;if(m!==null){v.child=null;do{var y=m.sibling;m.sibling=null,m=y}while(m!==null)}}$e=a}}if(a.subtreeFlags&2064&&o!==null)o.return=a,$e=o;else e:for(;$e!==null;){if(a=$e,a.flags&2048)switch(a.tag){case 0:case 11:case 15:Rg(9,a,a.return)}var x=a.sibling;if(x!==null){x.return=a.return,$e=x;break e}$e=a.return}}var _=e.current;for($e=_;$e!==null;){o=$e;var b=o.child;if(o.subtreeFlags&2064&&b!==null)b.return=o,$e=b;else e:for(o=_;$e!==null;){if(s=$e,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:bS(9,s)}}catch(T){hr(s,s.return,T)}if(s===o){$e=null;break e}var S=s.sibling;if(S!==null){S.return=s.return,$e=S;break e}$e=s.return}}if(Tt=i,xu(),Eo&&typeof Eo.onPostCommitFiberRoot=="function")try{Eo.onPostCommitFiberRoot(dS,e)}catch{}n=!0}return n}finally{Nt=r,oa.transition=t}}return!1}function hB(e,t,r){t=wd(r,t),t=Y9(e,t,1),e=Hl(e,t,1),t=Un(),e!==null&&(Zy(e,1,t),ui(e,t))}function hr(e,t,r){if(e.tag===3)hB(e,e,r);else for(;t!==null;){if(t.tag===3){hB(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Ul===null||!Ul.has(n))){e=wd(r,e),e=X9(t,e,1),t=Hl(t,e,1),e=Un(),t!==null&&(Zy(t,1,e),ui(t,e));break}}t=t.return}}function Ule(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Un(),e.pingedLanes|=e.suspendedLanes&r,sn===e&&(yn&r)===r&&(Hr===4||Hr===3&&(yn&130023424)===yn&&500>Tr()-YE?$c(e,0):ZE|=r),ui(e,t)}function pZ(e,t){t===0&&(e.mode&1?(t=ex,ex<<=1,!(ex&130023424)&&(ex=4194304)):t=1);var r=Un();e=Bs(e,t),e!==null&&(Zy(e,t,r),ui(e,r))}function Zle(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),pZ(e,r)}function Yle(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(we(314))}n!==null&&n.delete(t),pZ(e,r)}var gZ;gZ=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||si.current)ai=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return ai=!1,Nle(e,t,r);ai=!!(e.flags&131072)}else ai=!1,er&&t.flags&1048576&&_9(t,zb,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Q_(e,t),e=t.pendingProps;var i=yd(t,Bn.current);id(t,r),i=FE(null,t,n,e,i,r);var a=VE();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,li(n)?(a=!0,Rb(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,jE(t),i.updater=_S,t.stateNode=i,i._reactInternals=t,ik(t,n,e,r),t=sk(null,t,n,!0,a,r)):(t.tag=0,er&&a&&kE(t),Fn(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Q_(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=qle(n),e=Oa(n,e),i){case 0:t=ok(null,t,n,e,r);break e;case 1:t=rB(null,t,n,e,r);break e;case 11:t=eB(null,t,n,e,r);break e;case 14:t=tB(null,t,n,Oa(n.type,e),r);break e}throw Error(we(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Oa(n,i),ok(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Oa(n,i),rB(e,t,n,i,r);case 3:e:{if(Q9(t),e===null)throw Error(we(387));n=t.pendingProps,a=t.memoizedState,i=a.element,A9(e,t),Vb(t,n,null,r);var o=t.memoizedState;if(n=o.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=wd(Error(we(423)),t),t=nB(e,t,n,r,i);break e}else if(n!==i){i=wd(Error(we(424)),t),t=nB(e,t,n,r,i);break e}else for(Ci=Wl(t.stateNode.containerInfo.firstChild),Li=t,er=!0,Ra=null,r=T9(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(xd(),n===i){t=zs(e,t,r);break e}Fn(e,t,n,r)}t=t.child}return t;case 5:return M9(t),e===null&&tk(t),n=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,qP(n,i)?o=null:a!==null&&qP(n,a)&&(t.flags|=32),J9(e,t),Fn(e,t,o,r),t.child;case 6:return e===null&&tk(t),null;case 13:return eZ(e,t,r);case 4:return RE(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=_d(t,null,n,r):Fn(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Oa(n,i),eB(e,t,n,i,r);case 7:return Fn(e,t,t.pendingProps,r),t.child;case 8:return Fn(e,t,t.pendingProps.children,r),t.child;case 12:return Fn(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,Yt($b,n._currentValue),n._currentValue=o,a!==null)if(Ya(a.value,o)){if(a.children===i.children&&!si.current){t=zs(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(a.tag===1){l=As(-1,r&-r),l.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),rk(a.return,r,t),s.lanes|=r;break}l=l.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(we(341));o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),rk(o,r,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}Fn(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,id(t,r),i=fa(i),n=n(i),t.flags|=1,Fn(e,t,n,r),t.child;case 14:return n=t.type,i=Oa(n,t.pendingProps),i=Oa(n.type,i),tB(e,t,n,i,r);case 15:return q9(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Oa(n,i),Q_(e,t),t.tag=1,li(n)?(e=!0,Rb(t)):e=!1,id(t,r),Z9(t,n,i),ik(t,n,i,r),sk(null,t,n,!0,e,r);case 19:return tZ(e,t,r);case 22:return K9(e,t,r)}throw Error(we(156,t.tag))};function mZ(e,t){return W7(e,t)}function Xle(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function na(e,t,r,n){return new Xle(e,t,r,n)}function JE(e){return e=e.prototype,!(!e||!e.isReactComponent)}function qle(e){if(typeof e=="function")return JE(e)?1:0;if(e!=null){if(e=e.$$typeof,e===mE)return 11;if(e===yE)return 14}return 2}function Yl(e,t){var r=e.alternate;return r===null?(r=na(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function rb(e,t,r,n,i,a){var o=2;if(n=e,typeof e=="function")JE(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Oh:return Fc(r.children,i,a,t);case gE:o=8,i|=8;break;case PP:return e=na(12,r,t,i|2),e.elementType=PP,e.lanes=a,e;case kP:return e=na(13,r,t,i),e.elementType=kP,e.lanes=a,e;case LP:return e=na(19,r,t,i),e.elementType=LP,e.lanes=a,e;case M7:return SS(r,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case C7:o=10;break e;case A7:o=9;break e;case mE:o=11;break e;case yE:o=14;break e;case bl:o=16,n=null;break e}throw Error(we(130,e==null?e:typeof e,""))}return t=na(o,r,t,i),t.elementType=e,t.type=n,t.lanes=a,t}function Fc(e,t,r,n){return e=na(7,e,n,t),e.lanes=r,e}function SS(e,t,r,n){return e=na(22,e,n,t),e.elementType=M7,e.lanes=r,e.stateNode={isHidden:!1},e}function pA(e,t,r){return e=na(6,e,null,t),e.lanes=r,e}function gA(e,t,r){return t=na(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Kle(e,t,r,n,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=qC(0),this.expirationTimes=qC(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qC(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function QE(e,t,r,n,i,a,o,s,l){return e=new Kle(e,t,r,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=na(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},jE(a),e}function Jle(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ih,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function yZ(e){if(!e)return su;e=e._reactInternals;e:{if(wf(e)!==e||e.tag!==1)throw Error(we(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(li(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(we(171))}if(e.tag===1){var r=e.type;if(li(r))return y9(e,r,t)}return t}function xZ(e,t,r,n,i,a,o,s,l){return e=QE(r,n,!0,e,i,a,o,s,l),e.context=yZ(null),r=e.current,n=Un(),i=Zl(r),a=As(n,i),a.callback=t??null,Hl(r,a,i),e.current.lanes=i,Zy(e,i,n),ui(e,n),e}function TS(e,t,r,n){var i=t.current,a=Un(),o=Zl(i);return r=yZ(r),t.context===null?t.context=r:t.pendingContext=r,t=As(a,o),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Hl(i,t,o),e!==null&&(Ga(e,i,o,a),q_(e,i,o)),o}function qb(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function dB(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function eD(e,t){dB(e,t),(e=e.alternate)&&dB(e,t)}function Qle(){return null}var _Z=typeof reportError=="function"?reportError:function(e){console.error(e)};function tD(e){this._internalRoot=e}CS.prototype.render=tD.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(we(409));TS(e,t,null,null)};CS.prototype.unmount=tD.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;nf(function(){TS(null,e,null,null)}),t[Rs]=null}};function CS(e){this._internalRoot=e}CS.prototype.unstable_scheduleHydration=function(e){if(e){var t=K7();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Ml.length&&t!==0&&t<Ml[r].priority;r++);Ml.splice(r,0,e),r===0&&Q7(e)}};function rD(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function AS(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function vB(){}function eue(e,t,r,n,i){if(i){if(typeof n=="function"){var a=n;n=function(){var u=qb(o);a.call(u)}}var o=xZ(t,n,e,0,null,!1,!1,"",vB);return e._reactRootContainer=o,e[Rs]=o.current,mm(e.nodeType===8?e.parentNode:e),nf(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof n=="function"){var s=n;n=function(){var u=qb(l);s.call(u)}}var l=QE(e,0,!1,null,null,!1,!1,"",vB);return e._reactRootContainer=l,e[Rs]=l.current,mm(e.nodeType===8?e.parentNode:e),nf(function(){TS(t,l,r,n)}),l}function MS(e,t,r,n,i){var a=r._reactRootContainer;if(a){var o=a;if(typeof i=="function"){var s=i;i=function(){var l=qb(o);s.call(l)}}TS(t,o,e,i)}else o=eue(r,t,e,i,n);return qb(o)}X7=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=pg(t.pendingLanes);r!==0&&(bE(t,r|1),ui(t,Tr()),!(Tt&6)&&(Sd=Tr()+500,xu()))}break;case 13:nf(function(){var n=Bs(e,1);if(n!==null){var i=Un();Ga(n,e,1,i)}}),eD(e,1)}};wE=function(e){if(e.tag===13){var t=Bs(e,134217728);if(t!==null){var r=Un();Ga(t,e,134217728,r)}eD(e,134217728)}};q7=function(e){if(e.tag===13){var t=Zl(e),r=Bs(e,t);if(r!==null){var n=Un();Ga(r,e,t,n)}eD(e,t)}};K7=function(){return Nt};J7=function(e,t){var r=Nt;try{return Nt=e,t()}finally{Nt=r}};$P=function(e,t,r){switch(t){case"input":if(EP(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var i=mS(n);if(!i)throw Error(we(90));k7(n),EP(n,i)}}}break;case"textarea":I7(e,r);break;case"select":t=r.value,t!=null&&ed(e,!!r.multiple,t,!1)}};B7=XE;z7=nf;var tue={usingClientEntryPoint:!1,Events:[Xy,jh,mS,j7,R7,XE]},Sp={findFiberByHostInstance:Cc,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},rue={bundleType:Sp.bundleType,version:Sp.version,rendererPackageName:Sp.rendererPackageName,rendererConfig:Sp.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Js.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=V7(e),e===null?null:e.stateNode},findFiberByHostInstance:Sp.findFiberByHostInstance||Qle,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var fx=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fx.isDisabled&&fx.supportsFiber)try{dS=fx.inject(rue),Eo=fx}catch{}}Ei.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tue;Ei.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!rD(t))throw Error(we(200));return Jle(e,t,null,r)};Ei.createRoot=function(e,t){if(!rD(e))throw Error(we(299));var r=!1,n="",i=_Z;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=QE(e,1,!1,null,null,r,!1,n,i),e[Rs]=t.current,mm(e.nodeType===8?e.parentNode:e),new tD(t)};Ei.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(we(188)):(e=Object.keys(e).join(","),Error(we(268,e)));return e=V7(t),e=e===null?null:e.stateNode,e};Ei.flushSync=function(e){return nf(e)};Ei.hydrate=function(e,t,r){if(!AS(t))throw Error(we(200));return MS(null,e,t,!0,r)};Ei.hydrateRoot=function(e,t,r){if(!rD(e))throw Error(we(405));var n=r!=null&&r.hydratedSources||null,i=!1,a="",o=_Z;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(a=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),t=xZ(t,null,e,1,r??null,i,!1,a,o),e[Rs]=t.current,mm(e),n)for(e=0;e<n.length;e++)r=n[e],i=r._getVersion,i=i(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,i]:t.mutableSourceEagerHydrationData.push(r,i);return new CS(t)};Ei.render=function(e,t,r){if(!AS(t))throw Error(we(200));return MS(null,e,t,!1,r)};Ei.unmountComponentAtNode=function(e){if(!AS(e))throw Error(we(40));return e._reactRootContainer?(nf(function(){MS(null,null,e,!1,function(){e._reactRootContainer=null,e[Rs]=null})}),!0):!1};Ei.unstable_batchedUpdates=XE;Ei.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!AS(r))throw Error(we(200));if(e==null||e._reactInternals===void 0)throw Error(we(38));return MS(e,t,r,!1,n)};Ei.version="18.3.1-next-f1338f8080-20240426";function bZ(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(bZ)}catch(e){console.error(e)}}bZ(),b7.exports=Ei;var wZ=b7.exports,pB=wZ;AP.createRoot=pB.createRoot,AP.hydrateRoot=pB.hydrateRoot;/**
* @remix-run/router v1.23.2
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Am(){return Am=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Am.apply(this,arguments)}var Il;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Il||(Il={}));const gB="popstate";function nue(e){e===void 0&&(e={});function t(n,i){let{pathname:a,search:o,hash:s}=n.location;return xk("",{pathname:a,search:o,hash:s},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(n,i){return typeof i=="string"?i:Kb(i)}return aue(t,r,null,e)}function Nr(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function nD(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function iue(){return Math.random().toString(36).substr(2,8)}function mB(e,t){return{usr:e.state,key:e.key,idx:t}}function xk(e,t,r,n){return r===void 0&&(r=null),Am({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?pv(t):t,{state:r,key:t&&t.key||n||iue()})}function Kb(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function pv(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function aue(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,s=Il.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(Am({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function f(){s=Il.Pop;let y=c(),x=y==null?null:y-u;u=y,l&&l({action:s,location:m.location,delta:x})}function h(y,x){s=Il.Push;let _=xk(m.location,y,x);u=c()+1;let b=mB(_,u),S=m.createHref(_);try{o.pushState(b,"",S)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;i.location.assign(S)}a&&l&&l({action:s,location:m.location,delta:1})}function d(y,x){s=Il.Replace;let _=xk(m.location,y,x);u=c();let b=mB(_,u),S=m.createHref(_);o.replaceState(b,"",S),a&&l&&l({action:s,location:m.location,delta:0})}function v(y){let x=i.location.origin!=="null"?i.location.origin:i.location.href,_=typeof y=="string"?y:Kb(y);return _=_.replace(/ $/,"%20"),Nr(x,"No window.location.(origin|href) available to create URL for href: "+_),new URL(_,x)}let m={get action(){return s},get location(){return e(i,o)},listen(y){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(gB,f),l=y,()=>{i.removeEventListener(gB,f),l=null}},createHref(y){return t(i,y)},createURL:v,encodeLocation(y){let x=v(y);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:h,replace:d,go(y){return o.go(y)}};return m}var yB;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(yB||(yB={}));function oue(e,t,r){return r===void 0&&(r="/"),sue(e,t,r)}function sue(e,t,r,n){let i=typeof t=="string"?pv(t):t,a=iD(i.pathname||"/",r);if(a==null)return null;let o=SZ(e);lue(o);let s=null;for(let l=0;s==null&&l<o.length;++l){let u=_ue(a);s=mue(o[l],u)}return s}function SZ(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let i=(a,o,s)=>{let l={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};l.relativePath.startsWith("/")&&(Nr(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=Xl([n,l.relativePath]),c=r.concat(l);a.children&&a.children.length>0&&(Nr(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),SZ(a.children,t,c,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:pue(u,a.index),routesMeta:c})};return e.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,o);else for(let l of TZ(a.path))i(a,o,l)}),t}function TZ(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let o=TZ(n.join("/")),s=[];return s.push(...o.map(l=>l===""?a:[a,l].join("/"))),i&&s.push(...o),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function lue(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:gue(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const uue=/^:[\w-]+$/,cue=3,fue=2,hue=1,due=10,vue=-2,xB=e=>e==="*";function pue(e,t){let r=e.split("/"),n=r.length;return r.some(xB)&&(n+=vue),t&&(n+=fue),r.filter(i=>!xB(i)).reduce((i,a)=>i+(uue.test(a)?cue:a===""?hue:due),n)}function gue(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function mue(e,t,r){let{routesMeta:n}=e,i={},a="/",o=[];for(let s=0;s<n.length;++s){let l=n[s],u=s===n.length-1,c=a==="/"?t:t.slice(a.length)||"/",f=yue({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),h=l.route;if(!f)return null;Object.assign(i,f.params),o.push({params:i,pathname:Xl([a,f.pathname]),pathnameBase:Cue(Xl([a,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(a=Xl([a,f.pathnameBase]))}return o}function yue(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=xue(e.path,e.caseSensitive,e.end),i=t.match(r);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:n.reduce((u,c,f)=>{let{paramName:h,isOptional:d}=c;if(h==="*"){let m=s[f]||"";o=a.slice(0,a.length-m.length).replace(/(.)\/+$/,"$1")}const v=s[f];return d&&!v?u[h]=void 0:u[h]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:e}}function xue(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),nD(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,l)=>(n.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function _ue(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return nD(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function iD(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}const bue=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,wue=e=>bue.test(e);function Sue(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?pv(e):e,a;if(r)if(wue(r))a=r;else{if(r.includes("//")){let o=r;r=r.replace(/\/\/+/g,"/"),nD(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+r))}r.startsWith("/")?a=_B(r.substring(1),"/"):a=_B(r,t)}else a=t;return{pathname:a,search:Aue(n),hash:Mue(i)}}function _B(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function mA(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Tue(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function CZ(e,t){let r=Tue(e);return t?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function AZ(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=pv(e):(i=Am({},e),Nr(!i.pathname||!i.pathname.includes("?"),mA("?","pathname","search",i)),Nr(!i.pathname||!i.pathname.includes("#"),mA("#","pathname","hash",i)),Nr(!i.search||!i.search.includes("#"),mA("#","search","hash",i)));let a=e===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=r;else{let f=t.length-1;if(!n&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}s=f>=0?t[f]:"/"}let l=Sue(i,s),u=o&&o!=="/"&&o.endsWith("/"),c=(a||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const Xl=e=>e.join("/").replace(/\/\/+/g,"/"),Cue=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Aue=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Mue=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Pue(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const MZ=["post","put","patch","delete"];new Set(MZ);const kue=["get",...MZ];new Set(kue);/**
* React Router v6.30.3
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Mm(){return Mm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Mm.apply(this,arguments)}const aD=G.createContext(null),Lue=G.createContext(null),Sf=G.createContext(null),PS=G.createContext(null),Tf=G.createContext({outlet:null,matches:[],isDataRoute:!1}),PZ=G.createContext(null);function Iue(e,t){let{relative:r}=t===void 0?{}:t;Ky()||Nr(!1);let{basename:n,navigator:i}=G.useContext(Sf),{hash:a,pathname:o,search:s}=IZ(e,{relative:r}),l=o;return n!=="/"&&(l=o==="/"?n:Xl([n,o])),i.createHref({pathname:l,search:s,hash:a})}function Ky(){return G.useContext(PS)!=null}function gv(){return Ky()||Nr(!1),G.useContext(PS).location}function kZ(e){G.useContext(Sf).static||G.useLayoutEffect(e)}function LZ(){let{isDataRoute:e}=G.useContext(Tf);return e?Wue():Oue()}function Oue(){Ky()||Nr(!1);let e=G.useContext(aD),{basename:t,future:r,navigator:n}=G.useContext(Sf),{matches:i}=G.useContext(Tf),{pathname:a}=gv(),o=JSON.stringify(CZ(i,r.v7_relativeSplatPath)),s=G.useRef(!1);return kZ(()=>{s.current=!0}),G.useCallback(function(u,c){if(c===void 0&&(c={}),!s.current)return;if(typeof u=="number"){n.go(u);return}let f=AZ(u,JSON.parse(o),a,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Xl([t,f.pathname])),(c.replace?n.replace:n.push)(f,c.state,c)},[t,n,o,a,e])}function IZ(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=G.useContext(Sf),{matches:i}=G.useContext(Tf),{pathname:a}=gv(),o=JSON.stringify(CZ(i,n.v7_relativeSplatPath));return G.useMemo(()=>AZ(e,JSON.parse(o),a,r==="path"),[e,o,a,r])}function Eue(e,t){return Due(e,t)}function Due(e,t,r,n){Ky()||Nr(!1);let{navigator:i}=G.useContext(Sf),{matches:a}=G.useContext(Tf),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=gv(),c;if(t){var f;let y=typeof t=="string"?pv(t):t;l==="/"||(f=y.pathname)!=null&&f.startsWith(l)||Nr(!1),c=y}else c=u;let h=c.pathname||"/",d=h;if(l!=="/"){let y=l.replace(/^\//,"").split("/");d="/"+h.replace(/^\//,"").split("/").slice(y.length).join("/")}let v=oue(e,{pathname:d}),m=zue(v&&v.map(y=>Object.assign({},y,{params:Object.assign({},s,y.params),pathname:Xl([l,i.encodeLocation?i.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?l:Xl([l,i.encodeLocation?i.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),a,r,n);return t&&m?G.createElement(PS.Provider,{value:{location:Mm({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Il.Pop}},m):m}function Nue(){let e=Gue(),t=Pue(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return G.createElement(G.Fragment,null,G.createElement("h2",null,"Unexpected Application Error!"),G.createElement("h3",{style:{fontStyle:"italic"}},t),r?G.createElement("pre",{style:i},r):null,null)}const jue=G.createElement(Nue,null);class Rue extends G.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?G.createElement(Tf.Provider,{value:this.props.routeContext},G.createElement(PZ.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Bue(e){let{routeContext:t,match:r,children:n}=e,i=G.useContext(aD);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),G.createElement(Tf.Provider,{value:t},n)}function zue(e,t,r,n){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var a;if(!r)return null;if(r.errors)e=r.matches;else if((a=n)!=null&&a.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,s=(i=r)==null?void 0:i.errors;if(s!=null){let c=o.findIndex(f=>f.route.id&&(s==null?void 0:s[f.route.id])!==void 0);c>=0||Nr(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let c=0;c<o.length;c++){let f=o[c];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=c),f.route.id){let{loaderData:h,errors:d}=r,v=f.route.loader&&h[f.route.id]===void 0&&(!d||d[f.route.id]===void 0);if(f.route.lazy||v){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,f,h)=>{let d,v=!1,m=null,y=null;r&&(d=s&&f.route.id?s[f.route.id]:void 0,m=f.route.errorElement||jue,l&&(u<0&&h===0?(Hue("route-fallback"),v=!0,y=null):u===h&&(v=!0,y=f.route.hydrateFallbackElement||null)));let x=t.concat(o.slice(0,h+1)),_=()=>{let b;return d?b=m:v?b=y:f.route.Component?b=G.createElement(f.route.Component,null):f.route.element?b=f.route.element:b=c,G.createElement(Bue,{match:f,routeContext:{outlet:c,matches:x,isDataRoute:r!=null},children:b})};return r&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?G.createElement(Rue,{location:r.location,revalidation:r.revalidation,component:m,error:d,children:_(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):_()},null)}var OZ=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(OZ||{}),EZ=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(EZ||{});function $ue(e){let t=G.useContext(aD);return t||Nr(!1),t}function Fue(e){let t=G.useContext(Lue);return t||Nr(!1),t}function Vue(e){let t=G.useContext(Tf);return t||Nr(!1),t}function DZ(e){let t=Vue(),r=t.matches[t.matches.length-1];return r.route.id||Nr(!1),r.route.id}function Gue(){var e;let t=G.useContext(PZ),r=Fue(),n=DZ();return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function Wue(){let{router:e}=$ue(OZ.UseNavigateStable),t=DZ(EZ.UseNavigateStable),r=G.useRef(!1);return kZ(()=>{r.current=!0}),G.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Mm({fromRouteId:t},a)))},[e,t])}const bB={};function Hue(e,t,r){bB[e]||(bB[e]=!0)}function Uue(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Pa(e){Nr(!1)}function Zue(e){let{basename:t="/",children:r=null,location:n,navigationType:i=Il.Pop,navigator:a,static:o=!1,future:s}=e;Ky()&&Nr(!1);let l=t.replace(/^\/*/,"/"),u=G.useMemo(()=>({basename:l,navigator:a,static:o,future:Mm({v7_relativeSplatPath:!1},s)}),[l,s,a,o]);typeof n=="string"&&(n=pv(n));let{pathname:c="/",search:f="",hash:h="",state:d=null,key:v="default"}=n,m=G.useMemo(()=>{let y=iD(c,l);return y==null?null:{location:{pathname:y,search:f,hash:h,state:d,key:v},navigationType:i}},[l,c,f,h,d,v,i]);return m==null?null:G.createElement(Sf.Provider,{value:u},G.createElement(PS.Provider,{children:r,value:m}))}function Yue(e){let{children:t,location:r}=e;return Eue(_k(t),r)}new Promise(()=>{});function _k(e,t){t===void 0&&(t=[]);let r=[];return G.Children.forEach(e,(n,i)=>{if(!G.isValidElement(n))return;let a=[...t,i];if(n.type===G.Fragment){r.push.apply(r,_k(n.props.children,a));return}n.type!==Pa&&Nr(!1),!n.props.index||!n.props.children||Nr(!1);let o={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=_k(n.props.children,a)),r.push(o)}),r}/**
* React Router DOM v6.30.3
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function bk(){return bk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},bk.apply(this,arguments)}function Xue(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function que(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Kue(e,t){return e.button===0&&(!t||t==="_self")&&!que(e)}const Jue=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Que="6";try{window.__reactRouterVersion=Que}catch{}const ece="startTransition",wB=Uoe[ece];function tce(e){let{basename:t,children:r,future:n,window:i}=e,a=G.useRef();a.current==null&&(a.current=nue({window:i,v5Compat:!0}));let o=a.current,[s,l]=G.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},c=G.useCallback(f=>{u&&wB?wB(()=>l(f)):l(f)},[l,u]);return G.useLayoutEffect(()=>o.listen(c),[o,c]),G.useEffect(()=>Uue(n),[n]),G.createElement(Zue,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:o,future:n})}const rce=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",nce=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ice=G.forwardRef(function(t,r){let{onClick:n,relative:i,reloadDocument:a,replace:o,state:s,target:l,to:u,preventScrollReset:c,viewTransition:f}=t,h=Xue(t,Jue),{basename:d}=G.useContext(Sf),v,m=!1;if(typeof u=="string"&&nce.test(u)&&(v=u,rce))try{let b=new URL(window.location.href),S=u.startsWith("//")?new URL(b.protocol+u):new URL(u),T=iD(S.pathname,d);S.origin===b.origin&&T!=null?u=T+S.search+S.hash:m=!0}catch{}let y=Iue(u,{relative:i}),x=ace(u,{replace:o,state:s,target:l,preventScrollReset:c,relative:i,viewTransition:f});function _(b){n&&n(b),b.defaultPrevented||x(b)}return G.createElement("a",bk({},h,{href:v||y,onClick:m||a?n:_,ref:r,target:l}))});var SB;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(SB||(SB={}));var TB;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(TB||(TB={}));function ace(e,t){let{target:r,replace:n,state:i,preventScrollReset:a,relative:o,viewTransition:s}=t===void 0?{}:t,l=LZ(),u=gv(),c=IZ(e,{relative:o});return G.useCallback(f=>{if(Kue(f,r)){f.preventDefault();let h=n!==void 0?n:Kb(u)===Kb(c);l(e,{replace:h,state:i,preventScrollReset:a,relative:o,viewTransition:s})}},[u,l,c,n,i,r,e,a,o,s])}/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const oce=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),NZ=(...e)=>e.filter((t,r,n)=>!!t&&n.indexOf(t)===r).join(" ");/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var sce={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.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const lce=G.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:o,...s},l)=>G.createElement("svg",{ref:l,...sce,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:NZ("lucide",i),...s},[...o.map(([u,c])=>G.createElement(u,c)),...Array.isArray(a)?a:[a]]));/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ve=(e,t)=>{const r=G.forwardRef(({className:n,...i},a)=>G.createElement(lce,{ref:a,iconNode:t,className:NZ(`lucide-${oce(e)}`,n),...i}));return r.displayName=`${e}`,r};/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const mv=Ve("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.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yA=Ve("Battery",[["rect",{width:"16",height:"10",x:"2",y:"7",rx:"2",ry:"2",key:"1w10f2"}],["line",{x1:"22",x2:"22",y1:"11",y2:"13",key:"4dh1rd"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const uce=Ve("BellRing",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Pm=Ve("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const jZ=Ve("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const cce=Ve("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.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const fce=Ve("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const hce=Ve("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const kS=Ve("Car",[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Fo=Ve("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _u=Ve("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const dce=Ve("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const lu=Ve("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const vce=Ve("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const uu=Ve("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.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const oD=Ve("CircleCheckBig",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const af=Ve("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const pce=Ve("CloudLightning",[["path",{d:"M6 16.326A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 .5 8.973",key:"1cez44"}],["path",{d:"m13 12-3 5h4l-3 5",key:"1t22er"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const cu=Ve("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gce=Ve("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const RZ=Ve("Construction",[["rect",{x:"2",y:"6",width:"20",height:"8",rx:"1",key:"1estib"}],["path",{d:"M17 14v7",key:"7m2elx"}],["path",{d:"M7 14v7",key:"1cm7wv"}],["path",{d:"M17 3v3",key:"1v4jwn"}],["path",{d:"M7 3v3",key:"7o6guu"}],["path",{d:"M10 14 2.3 6.3",key:"1023jk"}],["path",{d:"m14 6 7.7 7.7",key:"1s8pl2"}],["path",{d:"m8 6 8 8",key:"hl96qh"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const mce=Ve("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.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const BZ=Ve("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yce=Ve("Crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const zZ=Ve("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.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const LS=Ve("Droplets",[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z",key:"1ptgy4"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97",key:"1sl1rz"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Td=Ve("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $Z=Ve("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const sD=Ve("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const lD=Ve("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const IS=Ve("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xce=Ve("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _ce=Ve("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const OS=Ve("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.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const FZ=Ve("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const VZ=Ve("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Jy=Ve("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const bce=Ve("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yv=Ve("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const wce=Ve("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const uD=Ve("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ES=Ve("Mountain",[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const GZ=Ve("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xv=Ve("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Xa=Ve("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const km=Ve("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const DS=Ve("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Sce=Ve("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const NS=Ve("Satellite",[["path",{d:"M13 7 9 3 5 7l4 4",key:"vyckw6"}],["path",{d:"m17 11 4 4-4 4-4-4",key:"rchckc"}],["path",{d:"m8 12 4 4 6-6-4-4Z",key:"1sshf7"}],["path",{d:"m16 8 3-3",key:"x428zp"}],["path",{d:"M9 21a6 6 0 0 0-6-6",key:"1iajcf"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const cD=Ve("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const jS=Ve("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const wk=Ve("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Tce=Ve("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const WZ=Ve("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const fD=Ve("SlidersVertical",[["line",{x1:"4",x2:"4",y1:"21",y2:"14",key:"1p332r"}],["line",{x1:"4",x2:"4",y1:"10",y2:"3",key:"gb41h5"}],["line",{x1:"12",x2:"12",y1:"21",y2:"12",key:"hf2csr"}],["line",{x1:"12",x2:"12",y1:"8",y2:"3",key:"1kfi7u"}],["line",{x1:"20",x2:"20",y1:"21",y2:"16",key:"1lhrwl"}],["line",{x1:"20",x2:"20",y1:"12",y2:"3",key:"16vvfq"}],["line",{x1:"2",x2:"6",y1:"14",y2:"14",key:"1uebub"}],["line",{x1:"10",x2:"14",y1:"8",y2:"8",key:"1yglbp"}],["line",{x1:"18",x2:"22",y1:"16",y2:"16",key:"1jxqpz"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Cce=Ve("Snowflake",[["line",{x1:"2",x2:"22",y1:"12",y2:"12",key:"1dnqot"}],["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"m20 16-4-4 4-4",key:"rquw4f"}],["path",{d:"m4 8 4 4-4 4",key:"12s3z9"}],["path",{d:"m16 4-4 4-4-4",key:"1tumq1"}],["path",{d:"m8 20 4-4 4 4",key:"9p200w"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const HZ=Ve("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.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const UZ=Ve("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Qy=Ve("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $s=Ve("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ace=Ve("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ZZ=Ve("WifiOff",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const RS=Ve("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const qa=Ve("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
* @license lucide-react v0.383.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Lm=Ve("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"}]]);async function Ni(e){const t=await fetch(e);if(!t.ok)throw new Error(`API error: ${t.status} ${t.statusText}`);return t.json()}async function CB(){return Ni("/api/status")}async function Mce(){return Ni("/api/health")}async function Pce(){return Ni("/api/nodes")}async function kce(){return Ni("/api/edges")}async function Lce(){return Ni("/api/sources")}async function YZ(){return Ni("/api/alerts/active")}async function AB(e=50,t=0,r,n){const i=new URLSearchParams;return i.set("limit",e.toString()),i.set("offset",t.toString()),r&&r!=="all"&&i.set("type",r),n&&n!=="all"&&i.set("severity",n),Ni(`/api/alerts/history?${i.toString()}`)}async function Ice(){return Ni("/api/subscriptions")}async function XZ(){return Ni("/api/env/status")}async function qZ(){return Ni("/api/env/active")}async function Oce(){return Ni("/api/env/swpc")}async function Ece(){return Ni("/api/env/ducting")}async function Dce(){return Ni("/api/regions")}function hD(){const[e,t]=G.useState(!1),[r,n]=G.useState(null),[i,a]=G.useState(null),[o,s]=G.useState(null),l=G.useRef(null),u=G.useRef(null),c=G.useRef(1e3),f=G.useCallback(()=>{var v;if(((v=l.current)==null?void 0:v.readyState)===WebSocket.OPEN)return;const d=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/live`;try{const m=new WebSocket(d);l.current=m,m.onopen=()=>{t(!0),c.current=1e3},m.onmessage=x=>{try{const _=JSON.parse(x.data);switch(s(_),_.type){case"health_update":n(_.data);break;case"alert_fired":a(_.data);break}}catch(_){console.error("Failed to parse WebSocket message:",_)}},m.onclose=()=>{t(!1),l.current=null;const x=Math.min(c.current,3e4);u.current=window.setTimeout(()=>{c.current=Math.min(x*2,3e4),f()},x)},m.onerror=()=>{m.close()};const y=setInterval(()=>{m.readyState===WebSocket.OPEN&&m.send("ping")},3e4);m.addEventListener("close",()=>{clearInterval(y)})}catch(m){console.error("Failed to create WebSocket:",m)}},[]);return G.useEffect(()=>(f(),()=>{u.current&&clearTimeout(u.current),l.current&&l.current.close()}),[f]),{connected:e,lastHealth:r,lastAlert:i,lastMessage:o}}const KZ=G.createContext(null);function Nce(){const e=G.useContext(KZ);if(!e)throw new Error("useToast must be used within a ToastProvider");return e}function jce(e){switch(e==null?void 0:e.toLowerCase()){case"critical":case"emergency":return{bg:"bg-red-500/10",border:"border-red-500",icon:uu,iconColor:"text-red-500"};case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:$s,iconColor:"text-amber-500"};default:return{bg:"bg-blue-500/10",border:"border-blue-500",icon:OS,iconColor:"text-blue-500"}}}function Rce({toast:e,onDismiss:t,onNavigate:r}){const n=jce(e.alert.severity),i=n.icon;return G.useEffect(()=>{const a=setTimeout(t,8e3);return()=>clearTimeout(a)},[t]),p.jsx("div",{className:`${n.bg} border ${n.border} rounded-lg shadow-lg overflow-hidden animate-slide-in cursor-pointer`,onClick:r,role:"alert",children:p.jsxs("div",{className:"flex items-start gap-3 p-4",children:[p.jsx("div",{className:`w-1 self-stretch -ml-4 -my-4 ${n.border.replace("border","bg")}`}),p.jsx(i,{size:18,className:n.iconColor}),p.jsxs("div",{className:"flex-1 min-w-0 pr-2",children:[p.jsx("div",{className:"text-sm font-medium text-slate-200 mb-0.5",children:e.alert.type.replace(/_/g," ").replace(/\b\w/g,a=>a.toUpperCase())}),p.jsx("div",{className:"text-sm text-slate-300 line-clamp-2",children:e.alert.message})]}),p.jsx("button",{onClick:a=>{a.stopPropagation(),t()},className:"text-slate-400 hover:text-slate-200 transition-colors",children:p.jsx(qa,{size:16})})]})})}function Bce({children:e}){const[t,r]=G.useState([]),n=LZ(),i=G.useCallback(s=>{const l=`${Date.now()}-${Math.random().toString(36).substr(2,9)}`;r(u=>[...u,{id:l,alert:s}])},[]),a=G.useCallback(s=>{r(l=>l.filter(u=>u.id!==s))},[]),o=G.useCallback(()=>{n("/alerts")},[n]);return p.jsxs(KZ.Provider,{value:{addToast:i},children:[e,p.jsx("div",{className:"fixed bottom-4 right-4 z-50 flex flex-col gap-2 max-w-sm w-full pointer-events-none",children:t.map(s=>p.jsx("div",{className:"pointer-events-auto",children:p.jsx(Rce,{toast:s,onDismiss:()=>a(s.id),onNavigate:o})},s.id))})]})}const BS="meshai.restartRequired.v1";function MB(){try{const e=localStorage.getItem(BS);if(!e)return{required:!1,changedKeys:[],ts:0};const t=JSON.parse(e);return{required:!!t.required,changedKeys:Array.isArray(t.changedKeys)?t.changedKeys:[],ts:Number(t.ts)||0}}catch{return{required:!1,changedKeys:[],ts:0}}}function zce(e){const t={required:!0,changedKeys:[...new Set(e)],ts:Date.now()};localStorage.setItem(BS,JSON.stringify(t)),window.dispatchEvent(new CustomEvent("meshai:restart-required",{detail:t}))}function PB(){localStorage.removeItem(BS),window.dispatchEvent(new CustomEvent("meshai:restart-required",{detail:{required:!1,changedKeys:[],ts:0}}))}function $ce(){const[e,t]=G.useState(()=>MB()),[r,n]=G.useState(!1),[i,a]=G.useState(null);G.useEffect(()=>{const l=c=>{const f=c.detail;t(f)},u=c=>{c.key===BS&&t(MB())};return window.addEventListener("meshai:restart-required",l),window.addEventListener("storage",u),()=>{window.removeEventListener("meshai:restart-required",l),window.removeEventListener("storage",u)}},[]);const o=G.useCallback(async()=>{n(!0),a(null);try{const l=await fetch("/api/system/restart",{method:"POST"});if(!l.ok&&l.status!==202){const u=await l.json().catch(()=>({}));throw new Error(u.detail||`HTTP ${l.status}`)}PB()}catch(l){a(String(l)),n(!1)}},[]),s=G.useCallback(()=>{PB()},[]);return e.required?p.jsxs("div",{className:"bg-yellow-900/40 border-b border-yellow-700 text-yellow-100 px-4 py-2 text-sm flex items-center gap-3",children:[p.jsx($s,{className:"w-4 h-4 flex-shrink-0 text-yellow-300"}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsx("strong",{children:"Container restart required"}),e.changedKeys.length>0&&p.jsxs("span",{className:"text-yellow-300 ml-2",children:["(",e.changedKeys.length," key",e.changedKeys.length===1?"":"s",":"," ",p.jsxs("span",{className:"font-mono text-xs",children:[e.changedKeys.slice(0,3).join(", "),e.changedKeys.length>3?", …":""]}),")"]}),p.jsx("span",{className:"ml-2 text-yellow-300/80",children:"for these changes to take effect. Until then the runtime keeps its boot-time configuration. Restart-required keys include anything under Config → environmental (feed_source, central URL), the LLM backend swap, and the dispatcher cold-start grace window. Other keys take effect on the next handler call."}),i&&p.jsx("div",{className:"text-red-400 text-xs mt-1",children:i})]}),p.jsxs("button",{onClick:o,disabled:r,className:"flex items-center gap-1 px-3 py-1 bg-yellow-700 hover:bg-yellow-600 disabled:opacity-50 rounded text-white text-xs",children:[p.jsx(Sce,{className:`w-3 h-3 ${r?"animate-spin":""}`}),r?"Restarting…":"Restart now"]}),p.jsx("button",{onClick:s,className:"text-yellow-300 hover:text-white px-1",title:"Dismiss (you can still restart later)",children:p.jsx(qa,{className:"w-4 h-4"})})]}):null}const JZ=[{path:"/",label:"Dashboard",icon:VZ},{path:"/mesh",label:"Mesh",icon:Xa},{path:"/environment",label:"Environment",icon:cu},{path:"/config",label:"Config",icon:WZ},{path:"/alerts",label:"Alerts",icon:Pm},{path:"/notifications",label:"Notifications",icon:uce},{path:"/reference",label:"Reference",icon:jZ},{path:"/adapter-config",label:"Adapter Config",icon:fD},{path:"/gauge-sites",label:"Gauge Sites",icon:LS},{path:"/town-anchors",label:"Town Anchors",icon:yv}];function Fce(e){const t=Math.floor(e/86400),r=Math.floor(e%86400/3600),n=Math.floor(e%3600/60);return t>0?`${t}d ${r}h`:r>0?`${r}h ${n}m`:`${n}m`}function Vce(e){const t=JZ.find(r=>r.path===e);return(t==null?void 0:t.label)||"Dashboard"}function Gce({children:e}){var h;const t=gv(),{connected:r,lastAlert:n}=hD(),{addToast:i}=Nce(),[a,o]=G.useState(null),[s,l]=G.useState(null);G.useEffect(()=>{if(n){const d=`${n.type}-${n.message}-${n.timestamp}`;d!==s&&(l(d),i(n))}},[n,s,i]);const[u,c]=G.useState(new Date);G.useEffect(()=>{CB().then(o).catch(console.error);const d=setInterval(()=>{CB().then(o).catch(console.error)},3e4);return()=>clearInterval(d)},[]),G.useEffect(()=>{const d=setInterval(()=>c(new Date),1e3);return()=>clearInterval(d)},[]);const f=u.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"});return p.jsxs("div",{className:"flex h-screen overflow-hidden bg-bg text-slate-200",children:[p.jsxs("aside",{className:"w-[220px] flex-shrink-0 bg-bg-card border-r border-border flex flex-col overflow-y-auto",children:[p.jsx("div",{className:"p-5 border-b border-border",children:p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("div",{className:"w-10 h-10 rounded-lg bg-gradient-to-br from-blue-500 to-blue-700 flex items-center justify-center text-white font-bold text-xl",children:"M"}),p.jsxs("div",{children:[p.jsx("div",{className:"font-semibold text-lg",children:"MeshAI"}),p.jsxs("div",{className:"text-xs text-slate-500 font-mono",children:["v",(a==null?void 0:a.version)||"..."]})]})]})}),p.jsx("nav",{className:"flex-1 py-4",children:JZ.map(d=>{const v=t.pathname===d.path,m=d.icon;return p.jsxs(ice,{to:d.path,className:`flex items-center gap-3 px-5 py-3 text-sm transition-colors relative ${v?"text-blue-400 bg-blue-500/10":"text-slate-400 hover:text-slate-200 hover:bg-bg-hover"}`,children:[v&&p.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-0.5 bg-blue-500"}),p.jsx(m,{size:18}),d.label]},d.path)})}),p.jsxs("div",{className:"p-5 border-t border-border",children:[p.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[p.jsx("div",{className:`w-2 h-2 rounded-full ${a!=null&&a.connected?"bg-green-500":"bg-red-500"}`}),p.jsx("span",{className:"text-xs text-slate-400",children:a!=null&&a.connected?"Connected":"Disconnected"})]}),p.jsxs("div",{className:"text-xs text-slate-500 font-mono truncate",children:[(h=a==null?void 0:a.connection_type)==null?void 0:h.toUpperCase(),": ",a==null?void 0:a.connection_target]}),p.jsxs("div",{className:"text-xs text-slate-500 mt-1",children:["Uptime: ",a?Fce(a.uptime_seconds):"..."]})]})]}),p.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[p.jsxs("header",{className:"h-14 flex-shrink-0 border-b border-border bg-bg-card flex items-center justify-between px-6",children:[p.jsx("h1",{className:"text-lg font-semibold",children:Vce(t.pathname)}),p.jsxs("div",{className:"flex items-center gap-6",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:`w-2 h-2 rounded-full ${r?"bg-green-500 animate-pulse-slow":"bg-slate-500"}`}),p.jsx("span",{className:"text-xs text-slate-400",children:r?"Live":"Offline"})]}),p.jsxs("div",{className:"text-sm font-mono text-slate-400",children:[f," MT"]})]})]}),p.jsxs("main",{className:"flex-1 overflow-y-auto p-6",children:[p.jsx($ce,{}),e]})]})]})}function QZ(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=QZ(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function _t(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=QZ(e))&&(n&&(n+=" "),n+=t);return n}var Wce=Array.isArray,hi=Wce,Hce=typeof hg=="object"&&hg&&hg.Object===Object&&hg,eY=Hce,Uce=eY,Zce=typeof self=="object"&&self&&self.Object===Object&&self,Yce=Uce||Zce||Function("return this")(),Ko=Yce,Xce=Ko,qce=Xce.Symbol,e0=qce,kB=e0,tY=Object.prototype,Kce=tY.hasOwnProperty,Jce=tY.toString,Tp=kB?kB.toStringTag:void 0;function Qce(e){var t=Kce.call(e,Tp),r=e[Tp];try{e[Tp]=void 0;var n=!0}catch{}var i=Jce.call(e);return n&&(t?e[Tp]=r:delete e[Tp]),i}var efe=Qce,tfe=Object.prototype,rfe=tfe.toString;function nfe(e){return rfe.call(e)}var ife=nfe,LB=e0,afe=efe,ofe=ife,sfe="[object Null]",lfe="[object Undefined]",IB=LB?LB.toStringTag:void 0;function ufe(e){return e==null?e===void 0?lfe:sfe:IB&&IB in Object(e)?afe(e):ofe(e)}var Qs=ufe;function cfe(e){return e!=null&&typeof e=="object"}var el=cfe,ffe=Qs,hfe=el,dfe="[object Symbol]";function vfe(e){return typeof e=="symbol"||hfe(e)&&ffe(e)==dfe}var _v=vfe,pfe=hi,gfe=_v,mfe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,yfe=/^\w*$/;function xfe(e,t){if(pfe(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||gfe(e)?!0:yfe.test(e)||!mfe.test(e)||t!=null&&e in Object(t)}var dD=xfe;function _fe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var bu=_fe;const bv=Ft(bu);var bfe=Qs,wfe=bu,Sfe="[object AsyncFunction]",Tfe="[object Function]",Cfe="[object GeneratorFunction]",Afe="[object Proxy]";function Mfe(e){if(!wfe(e))return!1;var t=bfe(e);return t==Tfe||t==Cfe||t==Sfe||t==Afe}var vD=Mfe;const ht=Ft(vD);var Pfe=Ko,kfe=Pfe["__core-js_shared__"],Lfe=kfe,xA=Lfe,OB=function(){var e=/[^.]+$/.exec(xA&&xA.keys&&xA.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ife(e){return!!OB&&OB in e}var Ofe=Ife,Efe=Function.prototype,Dfe=Efe.toString;function Nfe(e){if(e!=null){try{return Dfe.call(e)}catch{}try{return e+""}catch{}}return""}var rY=Nfe,jfe=vD,Rfe=Ofe,Bfe=bu,zfe=rY,$fe=/[\\^$.*+?()[\]{}|]/g,Ffe=/^\[object .+?Constructor\]$/,Vfe=Function.prototype,Gfe=Object.prototype,Wfe=Vfe.toString,Hfe=Gfe.hasOwnProperty,Ufe=RegExp("^"+Wfe.call(Hfe).replace($fe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Zfe(e){if(!Bfe(e)||Rfe(e))return!1;var t=jfe(e)?Ufe:Ffe;return t.test(zfe(e))}var Yfe=Zfe;function Xfe(e,t){return e==null?void 0:e[t]}var qfe=Xfe,Kfe=Yfe,Jfe=qfe;function Qfe(e,t){var r=Jfe(e,t);return Kfe(r)?r:void 0}var Cf=Qfe,ehe=Cf,the=ehe(Object,"create"),zS=the,EB=zS;function rhe(){this.__data__=EB?EB(null):{},this.size=0}var nhe=rhe;function ihe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ahe=ihe,ohe=zS,she="__lodash_hash_undefined__",lhe=Object.prototype,uhe=lhe.hasOwnProperty;function che(e){var t=this.__data__;if(ohe){var r=t[e];return r===she?void 0:r}return uhe.call(t,e)?t[e]:void 0}var fhe=che,hhe=zS,dhe=Object.prototype,vhe=dhe.hasOwnProperty;function phe(e){var t=this.__data__;return hhe?t[e]!==void 0:vhe.call(t,e)}var ghe=phe,mhe=zS,yhe="__lodash_hash_undefined__";function xhe(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=mhe&&t===void 0?yhe:t,this}var _he=xhe,bhe=nhe,whe=ahe,She=fhe,The=ghe,Che=_he;function wv(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}wv.prototype.clear=bhe;wv.prototype.delete=whe;wv.prototype.get=She;wv.prototype.has=The;wv.prototype.set=Che;var Ahe=wv;function Mhe(){this.__data__=[],this.size=0}var Phe=Mhe;function khe(e,t){return e===t||e!==e&&t!==t}var pD=khe,Lhe=pD;function Ihe(e,t){for(var r=e.length;r--;)if(Lhe(e[r][0],t))return r;return-1}var $S=Ihe,Ohe=$S,Ehe=Array.prototype,Dhe=Ehe.splice;function Nhe(e){var t=this.__data__,r=Ohe(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Dhe.call(t,r,1),--this.size,!0}var jhe=Nhe,Rhe=$S;function Bhe(e){var t=this.__data__,r=Rhe(t,e);return r<0?void 0:t[r][1]}var zhe=Bhe,$he=$S;function Fhe(e){return $he(this.__data__,e)>-1}var Vhe=Fhe,Ghe=$S;function Whe(e,t){var r=this.__data__,n=Ghe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Hhe=Whe,Uhe=Phe,Zhe=jhe,Yhe=zhe,Xhe=Vhe,qhe=Hhe;function Sv(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Sv.prototype.clear=Uhe;Sv.prototype.delete=Zhe;Sv.prototype.get=Yhe;Sv.prototype.has=Xhe;Sv.prototype.set=qhe;var FS=Sv,Khe=Cf,Jhe=Ko,Qhe=Khe(Jhe,"Map"),gD=Qhe,DB=Ahe,ede=FS,tde=gD;function rde(){this.size=0,this.__data__={hash:new DB,map:new(tde||ede),string:new DB}}var nde=rde;function ide(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var ade=ide,ode=ade;function sde(e,t){var r=e.__data__;return ode(t)?r[typeof t=="string"?"string":"hash"]:r.map}var VS=sde,lde=VS;function ude(e){var t=lde(this,e).delete(e);return this.size-=t?1:0,t}var cde=ude,fde=VS;function hde(e){return fde(this,e).get(e)}var dde=hde,vde=VS;function pde(e){return vde(this,e).has(e)}var gde=pde,mde=VS;function yde(e,t){var r=mde(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var xde=yde,_de=nde,bde=cde,wde=dde,Sde=gde,Tde=xde;function Tv(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Tv.prototype.clear=_de;Tv.prototype.delete=bde;Tv.prototype.get=wde;Tv.prototype.has=Sde;Tv.prototype.set=Tde;var mD=Tv,nY=mD,Cde="Expected a function";function yD(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Cde);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(yD.Cache||nY),r}yD.Cache=nY;var iY=yD;const Ade=Ft(iY);var Mde=iY,Pde=500;function kde(e){var t=Mde(e,function(n){return r.size===Pde&&r.clear(),n}),r=t.cache;return t}var Lde=kde,Ide=Lde,Ode=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ede=/\\(\\)?/g,Dde=Ide(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Ode,function(r,n,i,a){t.push(i?a.replace(Ede,"$1"):n||r)}),t}),Nde=Dde;function jde(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var xD=jde,NB=e0,Rde=xD,Bde=hi,zde=_v,jB=NB?NB.prototype:void 0,RB=jB?jB.toString:void 0;function aY(e){if(typeof e=="string")return e;if(Bde(e))return Rde(e,aY)+"";if(zde(e))return RB?RB.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var $de=aY,Fde=$de;function Vde(e){return e==null?"":Fde(e)}var oY=Vde,Gde=hi,Wde=dD,Hde=Nde,Ude=oY;function Zde(e,t){return Gde(e)?e:Wde(e,t)?[e]:Hde(Ude(e))}var sY=Zde,Yde=_v;function Xde(e){if(typeof e=="string"||Yde(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var GS=Xde,qde=sY,Kde=GS;function Jde(e,t){t=qde(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Kde(t[r++])];return r&&r==n?e:void 0}var _D=Jde,Qde=_D;function eve(e,t,r){var n=e==null?void 0:Qde(e,t);return n===void 0?r:n}var lY=eve;const sa=Ft(lY);function tve(e){return e==null}var rve=tve;const vt=Ft(rve);var nve=Qs,ive=hi,ave=el,ove="[object String]";function sve(e){return typeof e=="string"||!ive(e)&&ave(e)&&nve(e)==ove}var lve=sve;const of=Ft(lve);var uY={exports:{}},Rt={};/**
* @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 bD=Symbol.for("react.element"),wD=Symbol.for("react.portal"),WS=Symbol.for("react.fragment"),HS=Symbol.for("react.strict_mode"),US=Symbol.for("react.profiler"),ZS=Symbol.for("react.provider"),YS=Symbol.for("react.context"),uve=Symbol.for("react.server_context"),XS=Symbol.for("react.forward_ref"),qS=Symbol.for("react.suspense"),KS=Symbol.for("react.suspense_list"),JS=Symbol.for("react.memo"),QS=Symbol.for("react.lazy"),cve=Symbol.for("react.offscreen"),cY;cY=Symbol.for("react.module.reference");function ya(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case bD:switch(e=e.type,e){case WS:case US:case HS:case qS:case KS:return e;default:switch(e=e&&e.$$typeof,e){case uve:case YS:case XS:case QS:case JS:case ZS:return e;default:return t}}case wD:return t}}}Rt.ContextConsumer=YS;Rt.ContextProvider=ZS;Rt.Element=bD;Rt.ForwardRef=XS;Rt.Fragment=WS;Rt.Lazy=QS;Rt.Memo=JS;Rt.Portal=wD;Rt.Profiler=US;Rt.StrictMode=HS;Rt.Suspense=qS;Rt.SuspenseList=KS;Rt.isAsyncMode=function(){return!1};Rt.isConcurrentMode=function(){return!1};Rt.isContextConsumer=function(e){return ya(e)===YS};Rt.isContextProvider=function(e){return ya(e)===ZS};Rt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===bD};Rt.isForwardRef=function(e){return ya(e)===XS};Rt.isFragment=function(e){return ya(e)===WS};Rt.isLazy=function(e){return ya(e)===QS};Rt.isMemo=function(e){return ya(e)===JS};Rt.isPortal=function(e){return ya(e)===wD};Rt.isProfiler=function(e){return ya(e)===US};Rt.isStrictMode=function(e){return ya(e)===HS};Rt.isSuspense=function(e){return ya(e)===qS};Rt.isSuspenseList=function(e){return ya(e)===KS};Rt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===WS||e===US||e===HS||e===qS||e===KS||e===cve||typeof e=="object"&&e!==null&&(e.$$typeof===QS||e.$$typeof===JS||e.$$typeof===ZS||e.$$typeof===YS||e.$$typeof===XS||e.$$typeof===cY||e.getModuleId!==void 0)};Rt.typeOf=ya;uY.exports=Rt;var fve=uY.exports,hve=Qs,dve=el,vve="[object Number]";function pve(e){return typeof e=="number"||dve(e)&&hve(e)==vve}var fY=pve;const gve=Ft(fY);var mve=fY;function yve(e){return mve(e)&&e!=+e}var xve=yve;const Cv=Ft(xve);var za=function(t){return t===0?0:t>0?1:-1},Pc=function(t){return of(t)&&t.indexOf("%")===t.length-1},Pe=function(t){return gve(t)&&!Cv(t)},_ve=function(t){return vt(t)},Ur=function(t){return Pe(t)||of(t)},bve=0,Av=function(t){var r=++bve;return"".concat(t||"").concat(r)},sf=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Pe(t)&&!of(t))return n;var a;if(Pc(t)){var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return Cv(a)&&(a=n),i&&a>r&&(a=r),a},Ah=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},wve=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},i=0;i<r;i++)if(!n[t[i]])n[t[i]]=!0;else return!0;return!1},gn=function(t,r){return Pe(t)&&Pe(r)?function(n){return t+n*(r-t)}:function(){return r}};function Jb(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):sa(n,t))===r})}var Sve=function(t,r){return Pe(t)&&Pe(r)?t-r:of(t)&&of(r)?t.localeCompare(r):t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():String(t).localeCompare(String(r))};function od(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var n in t)if({}.hasOwnProperty.call(t,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function Sk(e){"@babel/helpers - typeof";return Sk=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},Sk(e)}var Tve=["viewBox","children"],Cve=["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"],BB=["points","pathLength"],_A={svg:Tve,polygon:BB,polyline:BB},SD=["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"],Qb=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(G.isValidElement(t)&&(n=t.props),!bv(n))return null;var i={};return Object.keys(n).forEach(function(a){SD.includes(a)&&(i[a]=r||function(o){return n[a](n,o)})}),i},Ave=function(t,r,n){return function(i){return t(r,n,i),null}},e1=function(t,r,n){if(!bv(t)||Sk(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(a){var o=t[a];SD.includes(a)&&typeof o=="function"&&(i||(i={}),i[a]=Ave(o,r,n))}),i},Mve=["children"],Pve=["children"];function zB(e,t){if(e==null)return{};var r=kve(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function kve(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Tk(e){"@babel/helpers - typeof";return Tk=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},Tk(e)}var $B={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"},Ms=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},FB=null,bA=null,TD=function e(t){if(t===FB&&Array.isArray(bA))return bA;var r=[];return G.Children.forEach(t,function(n){vt(n)||(fve.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),bA=r,FB=t,r};function la(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return Ms(i)}):n=[Ms(t)],TD(e).forEach(function(i){var a=sa(i,"type.displayName")||sa(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function xi(e,t){var r=la(e,t);return r&&r[0]}var VB=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!Pe(n)||n<=0||!Pe(i)||i<=0)},Lve=["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"],Ive=function(t){return t&&t.type&&of(t.type)&&Lve.indexOf(t.type)>=0},hY=function(t){return t&&Tk(t)==="object"&&"clipDot"in t},Ove=function(t,r,n,i){var a,o=(a=_A==null?void 0:_A[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!ht(t)&&(i&&o.includes(r)||Cve.includes(r))||n&&SD.includes(r)},ft=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(G.isValidElement(t)&&(i=t.props),!bv(i))return null;var a={};return Object.keys(i).forEach(function(o){var s;Ove((s=i)===null||s===void 0?void 0:s[o],o,r,n)&&(a[o]=i[o])}),a},Ck=function e(t,r){if(t===r)return!0;var n=G.Children.count(t);if(n!==G.Children.count(r))return!1;if(n===0)return!0;if(n===1)return GB(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i<n;i++){var a=t[i],o=r[i];if(Array.isArray(a)||Array.isArray(o)){if(!e(a,o))return!1}else if(!GB(a,o))return!1}return!0},GB=function(t,r){if(vt(t)&&vt(r))return!0;if(!vt(t)&&!vt(r)){var n=t.props||{},i=n.children,a=zB(n,Mve),o=r.props||{},s=o.children,l=zB(o,Pve);return i&&s?od(a,l)&&Ck(i,s):!i&&!s?od(a,l):!1}return!1},WB=function(t,r){var n=[],i={};return TD(t).forEach(function(a,o){if(Ive(a))n.push(a);else if(a){var s=Ms(a.type),l=r[s]||{},u=l.handler,c=l.once;if(u&&(!c||!i[s])){var f=u(a,s,o);n.push(f),i[s]=!0}}}),n},Eve=function(t){var r=t&&t.type;return r&&$B[r]?$B[r]:null},Dve=function(t,r){return TD(r).indexOf(t)},Nve=["children","width","height","viewBox","className","style","title","desc"];function Ak(){return Ak=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ak.apply(this,arguments)}function jve(e,t){if(e==null)return{};var r=Rve(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Rve(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Mk(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,a=e.className,o=e.style,s=e.title,l=e.desc,u=jve(e,Nve),c=i||{width:r,height:n,x:0,y:0},f=_t("recharts-surface",a);return ee.createElement("svg",Ak({},ft(u,!0,"svg"),{className:f,width:r,height:n,style:o,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),ee.createElement("title",null,s),ee.createElement("desc",null,l),t)}var Bve=["children","className"];function Pk(){return Pk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pk.apply(this,arguments)}function zve(e,t){if(e==null)return{};var r=$ve(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function $ve(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Xt=ee.forwardRef(function(e,t){var r=e.children,n=e.className,i=zve(e,Bve),a=_t("recharts-layer",n);return ee.createElement("g",Pk({className:a},ft(i,!0),{ref:t}),r)}),Vc=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a]};function Fve(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n<i;)a[n]=e[n+t];return a}var Vve=Fve,Gve=Vve;function Wve(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:Gve(e,t,r)}var Hve=Wve,Uve="\\ud800-\\udfff",Zve="\\u0300-\\u036f",Yve="\\ufe20-\\ufe2f",Xve="\\u20d0-\\u20ff",qve=Zve+Yve+Xve,Kve="\\ufe0e\\ufe0f",Jve="\\u200d",Qve=RegExp("["+Jve+Uve+qve+Kve+"]");function epe(e){return Qve.test(e)}var dY=epe;function tpe(e){return e.split("")}var rpe=tpe,vY="\\ud800-\\udfff",npe="\\u0300-\\u036f",ipe="\\ufe20-\\ufe2f",ape="\\u20d0-\\u20ff",ope=npe+ipe+ape,spe="\\ufe0e\\ufe0f",lpe="["+vY+"]",kk="["+ope+"]",Lk="\\ud83c[\\udffb-\\udfff]",upe="(?:"+kk+"|"+Lk+")",pY="[^"+vY+"]",gY="(?:\\ud83c[\\udde6-\\uddff]){2}",mY="[\\ud800-\\udbff][\\udc00-\\udfff]",cpe="\\u200d",yY=upe+"?",xY="["+spe+"]?",fpe="(?:"+cpe+"(?:"+[pY,gY,mY].join("|")+")"+xY+yY+")*",hpe=xY+yY+fpe,dpe="(?:"+[pY+kk+"?",kk,gY,mY,lpe].join("|")+")",vpe=RegExp(Lk+"(?="+Lk+")|"+dpe+hpe,"g");function ppe(e){return e.match(vpe)||[]}var gpe=ppe,mpe=rpe,ype=dY,xpe=gpe;function _pe(e){return ype(e)?xpe(e):mpe(e)}var bpe=_pe,wpe=Hve,Spe=dY,Tpe=bpe,Cpe=oY;function Ape(e){return function(t){t=Cpe(t);var r=Spe(t)?Tpe(t):void 0,n=r?r[0]:t.charAt(0),i=r?wpe(r,1).join(""):t.slice(1);return n[e]()+i}}var Mpe=Ape,Ppe=Mpe,kpe=Ppe("toUpperCase"),Lpe=kpe;const eT=Ft(Lpe);function Zt(e){return function(){return e}}const _Y=Math.cos,t1=Math.sin,eo=Math.sqrt,r1=Math.PI,tT=2*r1,Ik=Math.PI,Ok=2*Ik,hc=1e-6,Ipe=Ok-hc;function bY(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Ope(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return bY;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}let Epe=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?bY:Ope(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,a,o){this._append`C${+t},${+r},${+n},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,n,i,a){if(t=+t,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,l=n-t,u=i-r,c=o-t,f=s-r,h=c*c+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(h>hc)if(!(Math.abs(f*l-u*c)>hc)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let d=n-o,v=i-s,m=l*l+u*u,y=d*d+v*v,x=Math.sqrt(m),_=Math.sqrt(h),b=a*Math.tan((Ik-Math.acos((m+h-y)/(2*x*_)))/2),S=b/_,T=b/x;Math.abs(S-1)>hc&&this._append`L${t+S*c},${r+S*f}`,this._append`A${a},${a},0,0,${+(f*d>c*v)},${this._x1=t+T*l},${this._y1=r+T*u}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(i),l=n*Math.sin(i),u=t+s,c=r+l,f=1^o,h=o?i-a:a-i;this._x1===null?this._append`M${u},${c}`:(Math.abs(this._x1-u)>hc||Math.abs(this._y1-c)>hc)&&this._append`L${u},${c}`,n&&(h<0&&(h=h%Ok+Ok),h>Ipe?this._append`A${n},${n},0,1,${f},${t-s},${r-l}A${n},${n},0,1,${f},${this._x1=u},${this._y1=c}`:h>hc&&this._append`A${n},${n},0,${+(h>=Ik)},${f},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}};function CD(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new Epe(t)}function AD(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function wY(e){this._context=e}wY.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,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function rT(e){return new wY(e)}function SY(e){return e[0]}function TY(e){return e[1]}function CY(e,t){var r=Zt(!0),n=null,i=rT,a=null,o=CD(s);e=typeof e=="function"?e:e===void 0?SY:Zt(e),t=typeof t=="function"?t:t===void 0?TY:Zt(t);function s(l){var u,c=(l=AD(l)).length,f,h=!1,d;for(n==null&&(a=i(d=o())),u=0;u<=c;++u)!(u<c&&r(f=l[u],u,l))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+e(f,u,l),+t(f,u,l));if(d)return a=null,d+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:Zt(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:Zt(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Zt(!!l),s):r},s.curve=function(l){return arguments.length?(i=l,n!=null&&(a=i(n)),s):i},s.context=function(l){return arguments.length?(l==null?n=a=null:a=i(n=l),s):n},s}function hx(e,t,r){var n=null,i=Zt(!0),a=null,o=rT,s=null,l=CD(u);e=typeof e=="function"?e:e===void 0?SY:Zt(+e),t=typeof t=="function"?t:Zt(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?TY:Zt(+r);function u(f){var h,d,v,m=(f=AD(f)).length,y,x=!1,_,b=new Array(m),S=new Array(m);for(a==null&&(s=o(_=l())),h=0;h<=m;++h){if(!(h<m&&i(y=f[h],h,f))===x)if(x=!x)d=h,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),v=h-1;v>=d;--v)s.point(b[v],S[v]);s.lineEnd(),s.areaEnd()}x&&(b[h]=+e(y,h,f),S[h]=+t(y,h,f),s.point(n?+n(y,h,f):b[h],r?+r(y,h,f):S[h]))}if(_)return s=null,_+""||null}function c(){return CY().defined(i).curve(o).context(a)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:Zt(+f),n=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Zt(+f),u):e},u.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Zt(+f),u):n},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:Zt(+f),r=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Zt(+f),u):t},u.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Zt(+f),u):r},u.lineX0=u.lineY0=function(){return c().x(e).y(t)},u.lineY1=function(){return c().x(e).y(r)},u.lineX1=function(){return c().x(n).y(t)},u.defined=function(f){return arguments.length?(i=typeof f=="function"?f:Zt(!!f),u):i},u.curve=function(f){return arguments.length?(o=f,a!=null&&(s=o(a)),u):o},u.context=function(f){return arguments.length?(f==null?a=s=null:s=o(a=f),u):a},u}class AY{constructor(t,r){this._context=t,this._x=r}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(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function Dpe(e){return new AY(e,!0)}function Npe(e){return new AY(e,!1)}const MD={draw(e,t){const r=eo(t/r1);e.moveTo(r,0),e.arc(0,0,r,0,tT)}},jpe={draw(e,t){const r=eo(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},MY=eo(1/3),Rpe=MY*2,Bpe={draw(e,t){const r=eo(t/Rpe),n=r*MY;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},zpe={draw(e,t){const r=eo(t),n=-r/2;e.rect(n,n,r,r)}},$pe=.8908130915292852,PY=t1(r1/10)/t1(7*r1/10),Fpe=t1(tT/10)*PY,Vpe=-_Y(tT/10)*PY,Gpe={draw(e,t){const r=eo(t*$pe),n=Fpe*r,i=Vpe*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=tT*a/5,s=_Y(o),l=t1(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*i,l*n+s*i)}e.closePath()}},wA=eo(3),Wpe={draw(e,t){const r=-eo(t/(wA*3));e.moveTo(0,r*2),e.lineTo(-wA*r,-r),e.lineTo(wA*r,-r),e.closePath()}},Fi=-.5,Vi=eo(3)/2,Ek=1/eo(12),Hpe=(Ek/2+1)*3,Upe={draw(e,t){const r=eo(t/Hpe),n=r/2,i=r*Ek,a=n,o=r*Ek+r,s=-a,l=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(s,l),e.lineTo(Fi*n-Vi*i,Vi*n+Fi*i),e.lineTo(Fi*a-Vi*o,Vi*a+Fi*o),e.lineTo(Fi*s-Vi*l,Vi*s+Fi*l),e.lineTo(Fi*n+Vi*i,Fi*i-Vi*n),e.lineTo(Fi*a+Vi*o,Fi*o-Vi*a),e.lineTo(Fi*s+Vi*l,Fi*l-Vi*s),e.closePath()}};function Zpe(e,t){let r=null,n=CD(i);e=typeof e=="function"?e:Zt(e||MD),t=typeof t=="function"?t:Zt(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:Zt(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:Zt(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function n1(){}function i1(e,t,r){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+t)/6,(e._y0+4*e._y1+r)/6)}function kY(e){this._context=e}kY.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:i1(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,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);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:i1(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ype(e){return new kY(e)}function LY(e){this._context=e}LY.prototype={areaStart:n1,areaEnd:n1,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,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:i1(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Xpe(e){return new LY(e)}function IY(e){this._context=e}IY.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,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:i1(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function qpe(e){return new IY(e)}function OY(e){this._context=e}OY.prototype={areaStart:n1,areaEnd:n1,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Kpe(e){return new OY(e)}function HB(e){return e<0?-1:1}function UB(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(HB(a)+HB(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function ZB(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function SA(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-n)/3;e._context.bezierCurveTo(n+s,i+s*t,a-s,o-s*r,a,o)}function a1(e){this._context=e}a1.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:SA(this,this._t0,ZB(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,SA(this,ZB(this,r=UB(this,e,t)),r);break;default:SA(this,this._t0,r=UB(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function EY(e){this._context=new DY(e)}(EY.prototype=Object.create(a1.prototype)).point=function(e,t){a1.prototype.point.call(this,t,e)};function DY(e){this._context=e}DY.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function Jpe(e){return new a1(e)}function Qpe(e){return new EY(e)}function NY(e){this._context=e}NY.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=YB(e),i=YB(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function YB(e){var t,r=e.length-1,n,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,o[t]-=n*o[t-1];for(i[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function ege(e){return new NY(e)}function nT(e,t){this._context=e,this._t=t}nT.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,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function tge(e){return new nT(e,.5)}function rge(e){return new nT(e,0)}function nge(e){return new nT(e,1)}function Cd(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,s=a.length;r<o;++r)for(i=a,a=e[t[r]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function Dk(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function ige(e,t){return e[t]}function age(e){const t=[];return t.key=e,t}function oge(){var e=Zt([]),t=Dk,r=Cd,n=ige;function i(a){var o=Array.from(e.apply(this,arguments),age),s,l=o.length,u=-1,c;for(const f of a)for(s=0,++u;s<l;++s)(o[s][u]=[0,+n(f,o[s].key,u,a)]).data=f;for(s=0,c=AD(t(o));s<l;++s)o[c[s]].index=s;return r(o,c),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:Zt(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:Zt(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?Dk:typeof a=="function"?a:Zt(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??Cd,i):r},i}function sge(e,t){if((n=e.length)>0){for(var r,n,i=0,a=e[0].length,o;i<a;++i){for(o=r=0;r<n;++r)o+=e[r][i][1]||0;if(o)for(r=0;r<n;++r)e[r][i][1]/=o}Cd(e,t)}}function lge(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,a=n.length;r<a;++r){for(var o=0,s=0;o<i;++o)s+=e[o][r][1]||0;n[r][1]+=n[r][0]=-s/2}Cd(e,t)}}function uge(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n<a;++n){for(var s=0,l=0,u=0;s<o;++s){for(var c=e[t[s]],f=c[n][1]||0,h=c[n-1][1]||0,d=(f-h)/2,v=0;v<s;++v){var m=e[t[v]],y=m[n][1]||0,x=m[n-1][1]||0;d+=y-x}l+=f,u+=d*f}i[n-1][1]+=i[n-1][0]=r,l&&(r-=u/l)}i[n-1][1]+=i[n-1][0]=r,Cd(e,t)}}function Im(e){"@babel/helpers - typeof";return Im=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},Im(e)}var cge=["type","size","sizeType"];function Nk(){return Nk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Nk.apply(this,arguments)}function XB(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qB(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?XB(Object(r),!0).forEach(function(n){fge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):XB(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fge(e,t,r){return t=hge(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hge(e){var t=dge(e,"string");return Im(t)=="symbol"?t:t+""}function dge(e,t){if(Im(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Im(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vge(e,t){if(e==null)return{};var r=pge(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function pge(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var jY={symbolCircle:MD,symbolCross:jpe,symbolDiamond:Bpe,symbolSquare:zpe,symbolStar:Gpe,symbolTriangle:Wpe,symbolWye:Upe},gge=Math.PI/180,mge=function(t){var r="symbol".concat(eT(t));return jY[r]||MD},yge=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*gge;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},xge=function(t,r){jY["symbol".concat(eT(t))]=r},PD=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,a=i===void 0?64:i,o=t.sizeType,s=o===void 0?"area":o,l=vge(t,cge),u=qB(qB({},l),{},{type:n,size:a,sizeType:s}),c=function(){var y=mge(n),x=Zpe().type(y).size(yge(a,s,n));return x()},f=u.className,h=u.cx,d=u.cy,v=ft(u,!0);return h===+h&&d===+d&&a===+a?ee.createElement("path",Nk({},v,{className:_t("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(d,")"),d:c()})):null};PD.registerSymbol=xge;function Ad(e){"@babel/helpers - typeof";return Ad=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},Ad(e)}function jk(){return jk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},jk.apply(this,arguments)}function KB(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _ge(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?KB(Object(r),!0).forEach(function(n){Om(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KB(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wge(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,BY(n.key),n)}}function Sge(e,t,r){return t&&wge(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Tge(e,t,r){return t=o1(t),Cge(e,RY()?Reflect.construct(t,r||[],o1(e).constructor):t.apply(e,r))}function Cge(e,t){if(t&&(Ad(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Age(e)}function Age(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function RY(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(RY=function(){return!!e})()}function o1(e){return o1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},o1(e)}function Mge(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rk(e,t)}function Rk(e,t){return Rk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Rk(e,t)}function Om(e,t,r){return t=BY(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BY(e){var t=Pge(e,"string");return Ad(t)=="symbol"?t:t+""}function Pge(e,t){if(Ad(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ad(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Gi=32,kD=function(e){function t(){return bge(this,t),Tge(this,t,arguments)}return Mge(t,e),Sge(t,[{key:"renderIcon",value:function(n){var i=this.props.inactiveColor,a=Gi/2,o=Gi/6,s=Gi/3,l=n.inactive?i:n.color;if(n.type==="plainline")return ee.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:a,x2:Gi,y2:a,className:"recharts-legend-icon"});if(n.type==="line")return ee.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(a,"h").concat(s,`
A`).concat(o,",").concat(o,",0,1,1,").concat(2*s,",").concat(a,`
H`).concat(Gi,"M").concat(2*s,",").concat(a,`
A`).concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(a),className:"recharts-legend-icon"});if(n.type==="rect")return ee.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(Gi/8,"h").concat(Gi,"v").concat(Gi*3/4,"h").concat(-Gi,"z"),className:"recharts-legend-icon"});if(ee.isValidElement(n.legendIcon)){var u=_ge({},n);return delete u.legendIcon,ee.cloneElement(n.legendIcon,u)}return ee.createElement(PD,{fill:l,cx:a,cy:a,size:Gi,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,i=this.props,a=i.payload,o=i.iconSize,s=i.layout,l=i.formatter,u=i.inactiveColor,c={x:0,y:0,width:Gi,height:Gi},f={display:s==="horizontal"?"inline-block":"block",marginRight:10},h={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(d,v){var m=d.formatter||l,y=_t(Om(Om({"recharts-legend-item":!0},"legend-item-".concat(v),!0),"inactive",d.inactive));if(d.type==="none")return null;var x=ht(d.value)?null:d.value;Vc(!ht(d.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 _=d.inactive?u:d.color;return ee.createElement("li",jk({className:y,style:f,key:"legend-item-".concat(v)},e1(n.props,d,v)),ee.createElement(Mk,{width:o,height:o,viewBox:c,style:h},n.renderIcon(d)),ee.createElement("span",{className:"recharts-legend-item-text",style:{color:_}},m?m(x,d,v):x))})}},{key:"render",value:function(){var n=this.props,i=n.payload,a=n.layout,o=n.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return ee.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(G.PureComponent);Om(kD,"displayName","Legend");Om(kD,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var kge=FS;function Lge(){this.__data__=new kge,this.size=0}var Ige=Lge;function Oge(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var Ege=Oge;function Dge(e){return this.__data__.get(e)}var Nge=Dge;function jge(e){return this.__data__.has(e)}var Rge=jge,Bge=FS,zge=gD,$ge=mD,Fge=200;function Vge(e,t){var r=this.__data__;if(r instanceof Bge){var n=r.__data__;if(!zge||n.length<Fge-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new $ge(n)}return r.set(e,t),this.size=r.size,this}var Gge=Vge,Wge=FS,Hge=Ige,Uge=Ege,Zge=Nge,Yge=Rge,Xge=Gge;function Mv(e){var t=this.__data__=new Wge(e);this.size=t.size}Mv.prototype.clear=Hge;Mv.prototype.delete=Uge;Mv.prototype.get=Zge;Mv.prototype.has=Yge;Mv.prototype.set=Xge;var zY=Mv,qge="__lodash_hash_undefined__";function Kge(e){return this.__data__.set(e,qge),this}var Jge=Kge;function Qge(e){return this.__data__.has(e)}var eme=Qge,tme=mD,rme=Jge,nme=eme;function s1(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new tme;++t<r;)this.add(e[t])}s1.prototype.add=s1.prototype.push=rme;s1.prototype.has=nme;var $Y=s1;function ime(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var FY=ime;function ame(e,t){return e.has(t)}var VY=ame,ome=$Y,sme=FY,lme=VY,ume=1,cme=2;function fme(e,t,r,n,i,a){var o=r&ume,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var u=a.get(e),c=a.get(t);if(u&&c)return u==t&&c==e;var f=-1,h=!0,d=r&cme?new ome:void 0;for(a.set(e,t),a.set(t,e);++f<s;){var v=e[f],m=t[f];if(n)var y=o?n(m,v,f,t,e,a):n(v,m,f,e,t,a);if(y!==void 0){if(y)continue;h=!1;break}if(d){if(!sme(t,function(x,_){if(!lme(d,_)&&(v===x||i(v,x,r,n,a)))return d.push(_)})){h=!1;break}}else if(!(v===m||i(v,m,r,n,a))){h=!1;break}}return a.delete(e),a.delete(t),h}var GY=fme,hme=Ko,dme=hme.Uint8Array,vme=dme;function pme(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var gme=pme;function mme(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var LD=mme,JB=e0,QB=vme,yme=pD,xme=GY,_me=gme,bme=LD,wme=1,Sme=2,Tme="[object Boolean]",Cme="[object Date]",Ame="[object Error]",Mme="[object Map]",Pme="[object Number]",kme="[object RegExp]",Lme="[object Set]",Ime="[object String]",Ome="[object Symbol]",Eme="[object ArrayBuffer]",Dme="[object DataView]",ez=JB?JB.prototype:void 0,TA=ez?ez.valueOf:void 0;function Nme(e,t,r,n,i,a,o){switch(r){case Dme:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Eme:return!(e.byteLength!=t.byteLength||!a(new QB(e),new QB(t)));case Tme:case Cme:case Pme:return yme(+e,+t);case Ame:return e.name==t.name&&e.message==t.message;case kme:case Ime:return e==t+"";case Mme:var s=_me;case Lme:var l=n&wme;if(s||(s=bme),e.size!=t.size&&!l)return!1;var u=o.get(e);if(u)return u==t;n|=Sme,o.set(e,t);var c=xme(s(e),s(t),n,i,a,o);return o.delete(e),c;case Ome:if(TA)return TA.call(e)==TA.call(t)}return!1}var jme=Nme;function Rme(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var WY=Rme,Bme=WY,zme=hi;function $me(e,t,r){var n=t(e);return zme(e)?n:Bme(n,r(e))}var Fme=$me;function Vme(e,t){for(var r=-1,n=e==null?0:e.length,i=0,a=[];++r<n;){var o=e[r];t(o,r,e)&&(a[i++]=o)}return a}var Gme=Vme;function Wme(){return[]}var Hme=Wme,Ume=Gme,Zme=Hme,Yme=Object.prototype,Xme=Yme.propertyIsEnumerable,tz=Object.getOwnPropertySymbols,qme=tz?function(e){return e==null?[]:(e=Object(e),Ume(tz(e),function(t){return Xme.call(e,t)}))}:Zme,Kme=qme;function Jme(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var Qme=Jme,eye=Qs,tye=el,rye="[object Arguments]";function nye(e){return tye(e)&&eye(e)==rye}var iye=nye,rz=iye,aye=el,HY=Object.prototype,oye=HY.hasOwnProperty,sye=HY.propertyIsEnumerable,lye=rz(function(){return arguments}())?rz:function(e){return aye(e)&&oye.call(e,"callee")&&!sye.call(e,"callee")},ID=lye,l1={exports:{}};function uye(){return!1}var cye=uye;l1.exports;(function(e,t){var r=Ko,n=cye,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,s=o?r.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||n;e.exports=u})(l1,l1.exports);var UY=l1.exports,fye=9007199254740991,hye=/^(?:0|[1-9]\d*)$/;function dye(e,t){var r=typeof e;return t=t??fye,!!t&&(r=="number"||r!="symbol"&&hye.test(e))&&e>-1&&e%1==0&&e<t}var OD=dye,vye=9007199254740991;function pye(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=vye}var ED=pye,gye=Qs,mye=ED,yye=el,xye="[object Arguments]",_ye="[object Array]",bye="[object Boolean]",wye="[object Date]",Sye="[object Error]",Tye="[object Function]",Cye="[object Map]",Aye="[object Number]",Mye="[object Object]",Pye="[object RegExp]",kye="[object Set]",Lye="[object String]",Iye="[object WeakMap]",Oye="[object ArrayBuffer]",Eye="[object DataView]",Dye="[object Float32Array]",Nye="[object Float64Array]",jye="[object Int8Array]",Rye="[object Int16Array]",Bye="[object Int32Array]",zye="[object Uint8Array]",$ye="[object Uint8ClampedArray]",Fye="[object Uint16Array]",Vye="[object Uint32Array]",Kt={};Kt[Dye]=Kt[Nye]=Kt[jye]=Kt[Rye]=Kt[Bye]=Kt[zye]=Kt[$ye]=Kt[Fye]=Kt[Vye]=!0;Kt[xye]=Kt[_ye]=Kt[Oye]=Kt[bye]=Kt[Eye]=Kt[wye]=Kt[Sye]=Kt[Tye]=Kt[Cye]=Kt[Aye]=Kt[Mye]=Kt[Pye]=Kt[kye]=Kt[Lye]=Kt[Iye]=!1;function Gye(e){return yye(e)&&mye(e.length)&&!!Kt[gye(e)]}var Wye=Gye;function Hye(e){return function(t){return e(t)}}var ZY=Hye,u1={exports:{}};u1.exports;(function(e,t){var r=eY,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,o=a&&r.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s})(u1,u1.exports);var Uye=u1.exports,Zye=Wye,Yye=ZY,nz=Uye,iz=nz&&nz.isTypedArray,Xye=iz?Yye(iz):Zye,YY=Xye,qye=Qme,Kye=ID,Jye=hi,Qye=UY,e0e=OD,t0e=YY,r0e=Object.prototype,n0e=r0e.hasOwnProperty;function i0e(e,t){var r=Jye(e),n=!r&&Kye(e),i=!r&&!n&&Qye(e),a=!r&&!n&&!i&&t0e(e),o=r||n||i||a,s=o?qye(e.length,String):[],l=s.length;for(var u in e)(t||n0e.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||e0e(u,l)))&&s.push(u);return s}var a0e=i0e,o0e=Object.prototype;function s0e(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||o0e;return e===r}var l0e=s0e;function u0e(e,t){return function(r){return e(t(r))}}var XY=u0e,c0e=XY,f0e=c0e(Object.keys,Object),h0e=f0e,d0e=l0e,v0e=h0e,p0e=Object.prototype,g0e=p0e.hasOwnProperty;function m0e(e){if(!d0e(e))return v0e(e);var t=[];for(var r in Object(e))g0e.call(e,r)&&r!="constructor"&&t.push(r);return t}var y0e=m0e,x0e=vD,_0e=ED;function b0e(e){return e!=null&&_0e(e.length)&&!x0e(e)}var iT=b0e,w0e=a0e,S0e=y0e,T0e=iT;function C0e(e){return T0e(e)?w0e(e):S0e(e)}var DD=C0e,A0e=Fme,M0e=Kme,P0e=DD;function k0e(e){return A0e(e,P0e,M0e)}var L0e=k0e,az=L0e,I0e=1,O0e=Object.prototype,E0e=O0e.hasOwnProperty;function D0e(e,t,r,n,i,a){var o=r&I0e,s=az(e),l=s.length,u=az(t),c=u.length;if(l!=c&&!o)return!1;for(var f=l;f--;){var h=s[f];if(!(o?h in t:E0e.call(t,h)))return!1}var d=a.get(e),v=a.get(t);if(d&&v)return d==t&&v==e;var m=!0;a.set(e,t),a.set(t,e);for(var y=o;++f<l;){h=s[f];var x=e[h],_=t[h];if(n)var b=o?n(_,x,h,t,e,a):n(x,_,h,e,t,a);if(!(b===void 0?x===_||i(x,_,r,n,a):b)){m=!1;break}y||(y=h=="constructor")}if(m&&!y){var S=e.constructor,T=t.constructor;S!=T&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof T=="function"&&T instanceof T)&&(m=!1)}return a.delete(e),a.delete(t),m}var N0e=D0e,j0e=Cf,R0e=Ko,B0e=j0e(R0e,"DataView"),z0e=B0e,$0e=Cf,F0e=Ko,V0e=$0e(F0e,"Promise"),G0e=V0e,W0e=Cf,H0e=Ko,U0e=W0e(H0e,"Set"),qY=U0e,Z0e=Cf,Y0e=Ko,X0e=Z0e(Y0e,"WeakMap"),q0e=X0e,Bk=z0e,zk=gD,$k=G0e,Fk=qY,Vk=q0e,KY=Qs,Pv=rY,oz="[object Map]",K0e="[object Object]",sz="[object Promise]",lz="[object Set]",uz="[object WeakMap]",cz="[object DataView]",J0e=Pv(Bk),Q0e=Pv(zk),exe=Pv($k),txe=Pv(Fk),rxe=Pv(Vk),dc=KY;(Bk&&dc(new Bk(new ArrayBuffer(1)))!=cz||zk&&dc(new zk)!=oz||$k&&dc($k.resolve())!=sz||Fk&&dc(new Fk)!=lz||Vk&&dc(new Vk)!=uz)&&(dc=function(e){var t=KY(e),r=t==K0e?e.constructor:void 0,n=r?Pv(r):"";if(n)switch(n){case J0e:return cz;case Q0e:return oz;case exe:return sz;case txe:return lz;case rxe:return uz}return t});var nxe=dc,CA=zY,ixe=GY,axe=jme,oxe=N0e,fz=nxe,hz=hi,dz=UY,sxe=YY,lxe=1,vz="[object Arguments]",pz="[object Array]",dx="[object Object]",uxe=Object.prototype,gz=uxe.hasOwnProperty;function cxe(e,t,r,n,i,a){var o=hz(e),s=hz(t),l=o?pz:fz(e),u=s?pz:fz(t);l=l==vz?dx:l,u=u==vz?dx:u;var c=l==dx,f=u==dx,h=l==u;if(h&&dz(e)){if(!dz(t))return!1;o=!0,c=!1}if(h&&!c)return a||(a=new CA),o||sxe(e)?ixe(e,t,r,n,i,a):axe(e,t,l,r,n,i,a);if(!(r&lxe)){var d=c&&gz.call(e,"__wrapped__"),v=f&&gz.call(t,"__wrapped__");if(d||v){var m=d?e.value():e,y=v?t.value():t;return a||(a=new CA),i(m,y,r,n,a)}}return h?(a||(a=new CA),oxe(e,t,r,n,i,a)):!1}var fxe=cxe,hxe=fxe,mz=el;function JY(e,t,r,n,i){return e===t?!0:e==null||t==null||!mz(e)&&!mz(t)?e!==e&&t!==t:hxe(e,t,r,n,JY,i)}var ND=JY,dxe=zY,vxe=ND,pxe=1,gxe=2;function mxe(e,t,r,n){var i=r.length,a=i,o=!n;if(e==null)return!a;for(e=Object(e);i--;){var s=r[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=r[i];var l=s[0],u=e[l],c=s[1];if(o&&s[2]){if(u===void 0&&!(l in e))return!1}else{var f=new dxe;if(n)var h=n(u,c,l,e,t,f);if(!(h===void 0?vxe(c,u,pxe|gxe,n,f):h))return!1}}return!0}var yxe=mxe,xxe=bu;function _xe(e){return e===e&&!xxe(e)}var QY=_xe,bxe=QY,wxe=DD;function Sxe(e){for(var t=wxe(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,bxe(i)]}return t}var Txe=Sxe;function Cxe(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var eX=Cxe,Axe=yxe,Mxe=Txe,Pxe=eX;function kxe(e){var t=Mxe(e);return t.length==1&&t[0][2]?Pxe(t[0][0],t[0][1]):function(r){return r===e||Axe(r,e,t)}}var Lxe=kxe;function Ixe(e,t){return e!=null&&t in Object(e)}var Oxe=Ixe,Exe=sY,Dxe=ID,Nxe=hi,jxe=OD,Rxe=ED,Bxe=GS;function zxe(e,t,r){t=Exe(t,e);for(var n=-1,i=t.length,a=!1;++n<i;){var o=Bxe(t[n]);if(!(a=e!=null&&r(e,o)))break;e=e[o]}return a||++n!=i?a:(i=e==null?0:e.length,!!i&&Rxe(i)&&jxe(o,i)&&(Nxe(e)||Dxe(e)))}var $xe=zxe,Fxe=Oxe,Vxe=$xe;function Gxe(e,t){return e!=null&&Vxe(e,t,Fxe)}var Wxe=Gxe,Hxe=ND,Uxe=lY,Zxe=Wxe,Yxe=dD,Xxe=QY,qxe=eX,Kxe=GS,Jxe=1,Qxe=2;function e_e(e,t){return Yxe(e)&&Xxe(t)?qxe(Kxe(e),t):function(r){var n=Uxe(r,e);return n===void 0&&n===t?Zxe(r,e):Hxe(t,n,Jxe|Qxe)}}var t_e=e_e;function r_e(e){return e}var kv=r_e;function n_e(e){return function(t){return t==null?void 0:t[e]}}var i_e=n_e,a_e=_D;function o_e(e){return function(t){return a_e(t,e)}}var s_e=o_e,l_e=i_e,u_e=s_e,c_e=dD,f_e=GS;function h_e(e){return c_e(e)?l_e(f_e(e)):u_e(e)}var d_e=h_e,v_e=Lxe,p_e=t_e,g_e=kv,m_e=hi,y_e=d_e;function x_e(e){return typeof e=="function"?e:e==null?g_e:typeof e=="object"?m_e(e)?p_e(e[0],e[1]):v_e(e):y_e(e)}var Lv=x_e;function __e(e,t,r,n){for(var i=e.length,a=r+(n?1:-1);n?a--:++a<i;)if(t(e[a],a,e))return a;return-1}var b_e=__e;function w_e(e){return e!==e}var S_e=w_e;function T_e(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}var C_e=T_e,A_e=b_e,M_e=S_e,P_e=C_e;function k_e(e,t,r){return t===t?P_e(e,t,r):A_e(e,M_e,r)}var L_e=k_e,I_e=L_e;function O_e(e,t){var r=e==null?0:e.length;return!!r&&I_e(e,t,0)>-1}var E_e=O_e;function D_e(e,t,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}var N_e=D_e;function j_e(){}var R_e=j_e,AA=qY,B_e=R_e,z_e=LD,$_e=1/0,F_e=AA&&1/z_e(new AA([,-0]))[1]==$_e?function(e){return new AA(e)}:B_e,V_e=F_e,G_e=$Y,W_e=E_e,H_e=N_e,U_e=VY,Z_e=V_e,Y_e=LD,X_e=200;function q_e(e,t,r){var n=-1,i=W_e,a=e.length,o=!0,s=[],l=s;if(r)o=!1,i=H_e;else if(a>=X_e){var u=t?null:Z_e(e);if(u)return Y_e(u);o=!1,i=U_e,l=new G_e}else l=t?[]:s;e:for(;++n<a;){var c=e[n],f=t?t(c):c;if(c=r||c!==0?c:0,o&&f===f){for(var h=l.length;h--;)if(l[h]===f)continue e;t&&l.push(f),s.push(c)}else i(l,f,r)||(l!==s&&l.push(f),s.push(c))}return s}var K_e=q_e,J_e=Lv,Q_e=K_e;function ebe(e,t){return e&&e.length?Q_e(e,J_e(t)):[]}var tbe=ebe;const yz=Ft(tbe);function tX(e,t,r){return t===!0?yz(e,r):ht(t)?yz(e,t):e}function Md(e){"@babel/helpers - typeof";return Md=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},Md(e)}var rbe=["ref"];function xz(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function as(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xz(Object(r),!0).forEach(function(n){aT(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xz(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _z(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,nX(n.key),n)}}function ibe(e,t,r){return t&&_z(e.prototype,t),r&&_z(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function abe(e,t,r){return t=c1(t),obe(e,rX()?Reflect.construct(t,r||[],c1(e).constructor):t.apply(e,r))}function obe(e,t){if(t&&(Md(t)==="object"||typeof t=="function"))return t;if(t!==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 rX(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rX=function(){return!!e})()}function c1(e){return c1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},c1(e)}function lbe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gk(e,t)}function Gk(e,t){return Gk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Gk(e,t)}function aT(e,t,r){return t=nX(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nX(e){var t=ube(e,"string");return Md(t)=="symbol"?t:t+""}function ube(e,t){if(Md(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Md(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function cbe(e,t){if(e==null)return{};var r=fbe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function fbe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function hbe(e){return e.value}function dbe(e,t){if(ee.isValidElement(e))return ee.cloneElement(e,t);if(typeof e=="function")return ee.createElement(e,t);t.ref;var r=cbe(t,rbe);return ee.createElement(kD,r)}var bz=1,sd=function(e){function t(){var r;nbe(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=abe(this,t,[].concat(i)),aT(r,"lastBoundingBox",{width:-1,height:-1}),r}return lbe(t,e),ibe(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();return n.height=this.wrapperNode.offsetHeight,n.width=this.wrapperNode.offsetWidth,n}return null}},{key:"updateBBox",value:function(){var n=this.props.onBBoxUpdate,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>bz||Math.abs(i.height-this.lastBoundingBox.height)>bz)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,n&&n(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?as({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,o=i.align,s=i.verticalAlign,l=i.margin,u=i.chartWidth,c=i.chartHeight,f,h;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&a==="vertical"){var d=this.getBBoxSnapshot();f={left:((u||0)-d.width)/2}}else f=o==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(s==="middle"){var v=this.getBBoxSnapshot();h={top:((c||0)-v.height)/2}}else h=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return as(as({},f),h)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,o=i.width,s=i.height,l=i.wrapperStyle,u=i.payloadUniqBy,c=i.payload,f=as(as({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return ee.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(d){n.wrapperNode=d}},dbe(a,as(as({},this.props),{},{payload:tX(c,u,hbe)})))}}],[{key:"getWithHeight",value:function(n,i){var a=as(as({},this.defaultProps),n.props),o=a.layout;return o==="vertical"&&Pe(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||i}:null}}])}(G.PureComponent);aT(sd,"displayName","Legend");aT(sd,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var wz=e0,vbe=ID,pbe=hi,Sz=wz?wz.isConcatSpreadable:void 0;function gbe(e){return pbe(e)||vbe(e)||!!(Sz&&e&&e[Sz])}var mbe=gbe,ybe=WY,xbe=mbe;function iX(e,t,r,n,i){var a=-1,o=e.length;for(r||(r=xbe),i||(i=[]);++a<o;){var s=e[a];t>0&&r(s)?t>1?iX(s,t-1,r,n,i):ybe(i,s):n||(i[i.length]=s)}return i}var aX=iX;function _be(e){return function(t,r,n){for(var i=-1,a=Object(t),o=n(t),s=o.length;s--;){var l=o[e?s:++i];if(r(a[l],l,a)===!1)break}return t}}var bbe=_be,wbe=bbe,Sbe=wbe(),Tbe=Sbe,Cbe=Tbe,Abe=DD;function Mbe(e,t){return e&&Cbe(e,t,Abe)}var oX=Mbe,Pbe=iT;function kbe(e,t){return function(r,n){if(r==null)return r;if(!Pbe(r))return e(r,n);for(var i=r.length,a=t?i:-1,o=Object(r);(t?a--:++a<i)&&n(o[a],a,o)!==!1;);return r}}var Lbe=kbe,Ibe=oX,Obe=Lbe,Ebe=Obe(Ibe),jD=Ebe,Dbe=jD,Nbe=iT;function jbe(e,t){var r=-1,n=Nbe(e)?Array(e.length):[];return Dbe(e,function(i,a,o){n[++r]=t(i,a,o)}),n}var sX=jbe;function Rbe(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var Bbe=Rbe,Tz=_v;function zbe(e,t){if(e!==t){var r=e!==void 0,n=e===null,i=e===e,a=Tz(e),o=t!==void 0,s=t===null,l=t===t,u=Tz(t);if(!s&&!u&&!a&&e>t||a&&o&&l&&!s&&!u||n&&o&&l||!r&&l||!i)return 1;if(!n&&!a&&!u&&e<t||u&&r&&i&&!n&&!a||s&&r&&i||!o&&i||!l)return-1}return 0}var $be=zbe,Fbe=$be;function Vbe(e,t,r){for(var n=-1,i=e.criteria,a=t.criteria,o=i.length,s=r.length;++n<o;){var l=Fbe(i[n],a[n]);if(l){if(n>=s)return l;var u=r[n];return l*(u=="desc"?-1:1)}}return e.index-t.index}var Gbe=Vbe,MA=xD,Wbe=_D,Hbe=Lv,Ube=sX,Zbe=Bbe,Ybe=ZY,Xbe=Gbe,qbe=kv,Kbe=hi;function Jbe(e,t,r){t.length?t=MA(t,function(a){return Kbe(a)?function(o){return Wbe(o,a.length===1?a[0]:a)}:a}):t=[qbe];var n=-1;t=MA(t,Ybe(Hbe));var i=Ube(e,function(a,o,s){var l=MA(t,function(u){return u(a)});return{criteria:l,index:++n,value:a}});return Zbe(i,function(a,o){return Xbe(a,o,r)})}var Qbe=Jbe;function e1e(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var t1e=e1e,r1e=t1e,Cz=Math.max;function n1e(e,t,r){return t=Cz(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=Cz(n.length-t,0),o=Array(a);++i<a;)o[i]=n[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=n[i];return s[t]=r(o),r1e(e,this,s)}}var i1e=n1e;function a1e(e){return function(){return e}}var o1e=a1e,s1e=Cf,l1e=function(){try{var e=s1e(Object,"defineProperty");return e({},"",{}),e}catch{}}(),lX=l1e,u1e=o1e,Az=lX,c1e=kv,f1e=Az?function(e,t){return Az(e,"toString",{configurable:!0,enumerable:!1,value:u1e(t),writable:!0})}:c1e,h1e=f1e,d1e=800,v1e=16,p1e=Date.now;function g1e(e){var t=0,r=0;return function(){var n=p1e(),i=v1e-(n-r);if(r=n,i>0){if(++t>=d1e)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var m1e=g1e,y1e=h1e,x1e=m1e,_1e=x1e(y1e),b1e=_1e,w1e=kv,S1e=i1e,T1e=b1e;function C1e(e,t){return T1e(S1e(e,t,w1e),e+"")}var A1e=C1e,M1e=pD,P1e=iT,k1e=OD,L1e=bu;function I1e(e,t,r){if(!L1e(r))return!1;var n=typeof t;return(n=="number"?P1e(r)&&k1e(t,r.length):n=="string"&&t in r)?M1e(r[t],e):!1}var oT=I1e,O1e=aX,E1e=Qbe,D1e=A1e,Mz=oT,N1e=D1e(function(e,t){if(e==null)return[];var r=t.length;return r>1&&Mz(e,t[0],t[1])?t=[]:r>2&&Mz(t[0],t[1],t[2])&&(t=[t[0]]),E1e(e,O1e(t,1),[])}),j1e=N1e;const RD=Ft(j1e);function Em(e){"@babel/helpers - typeof";return Em=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},Em(e)}function Wk(){return Wk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wk.apply(this,arguments)}function R1e(e,t){return F1e(e)||$1e(e,t)||z1e(e,t)||B1e()}function B1e(){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 z1e(e,t){if(e){if(typeof e=="string")return Pz(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Pz(e,t)}}function Pz(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function $1e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function F1e(e){if(Array.isArray(e))return e}function kz(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function PA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kz(Object(r),!0).forEach(function(n){V1e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kz(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function V1e(e,t,r){return t=G1e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function G1e(e){var t=W1e(e,"string");return Em(t)=="symbol"?t:t+""}function W1e(e,t){if(Em(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Em(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function H1e(e){return Array.isArray(e)&&Ur(e[0])&&Ur(e[1])?e.join(" ~ "):e}var U1e=function(t){var r=t.separator,n=r===void 0?" : ":r,i=t.contentStyle,a=i===void 0?{}:i,o=t.itemStyle,s=o===void 0?{}:o,l=t.labelStyle,u=l===void 0?{}:l,c=t.payload,f=t.formatter,h=t.itemSorter,d=t.wrapperClassName,v=t.labelClassName,m=t.label,y=t.labelFormatter,x=t.accessibilityLayer,_=x===void 0?!1:x,b=function(){if(c&&c.length){var D={padding:0,margin:0},N=(h?RD(c,h):c).map(function(z,V){if(z.type==="none")return null;var F=PA({display:"block",paddingTop:4,paddingBottom:4,color:z.color||"#000"},s),$=z.formatter||f||H1e,B=z.value,H=z.name,U=B,Y=H;if($&&U!=null&&Y!=null){var Z=$(B,H,z,V,c);if(Array.isArray(Z)){var Q=R1e(Z,2);U=Q[0],Y=Q[1]}else U=Z}return ee.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(V),style:F},Ur(Y)?ee.createElement("span",{className:"recharts-tooltip-item-name"},Y):null,Ur(Y)?ee.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,ee.createElement("span",{className:"recharts-tooltip-item-value"},U),ee.createElement("span",{className:"recharts-tooltip-item-unit"},z.unit||""))});return ee.createElement("ul",{className:"recharts-tooltip-item-list",style:D},N)}return null},S=PA({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),T=PA({margin:0},u),C=!vt(m),A=C?m:"",P=_t("recharts-default-tooltip",d),I=_t("recharts-tooltip-label",v);C&&y&&c!==void 0&&c!==null&&(A=y(m,c));var k=_?{role:"status","aria-live":"assertive"}:{};return ee.createElement("div",Wk({className:P,style:S},k),ee.createElement("p",{className:I,style:T},ee.isValidElement(A)?A:"".concat(A)),b())};function Dm(e){"@babel/helpers - typeof";return Dm=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},Dm(e)}function vx(e,t,r){return t=Z1e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Z1e(e){var t=Y1e(e,"string");return Dm(t)=="symbol"?t:t+""}function Y1e(e,t){if(Dm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Dm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Cp="recharts-tooltip-wrapper",X1e={visibility:"hidden"};function q1e(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return _t(Cp,vx(vx(vx(vx({},"".concat(Cp,"-right"),Pe(r)&&t&&Pe(t.x)&&r>=t.x),"".concat(Cp,"-left"),Pe(r)&&t&&Pe(t.x)&&r<t.x),"".concat(Cp,"-bottom"),Pe(n)&&t&&Pe(t.y)&&n>=t.y),"".concat(Cp,"-top"),Pe(n)&&t&&Pe(t.y)&&n<t.y))}function Lz(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,i=e.offsetTopLeft,a=e.position,o=e.reverseDirection,s=e.tooltipDimension,l=e.viewBox,u=e.viewBoxDimension;if(a&&Pe(a[n]))return a[n];var c=r[n]-s-i,f=r[n]+i;if(t[n])return o[n]?c:f;if(o[n]){var h=c,d=l[n];return h<d?Math.max(f,l[n]):Math.max(c,l[n])}var v=f+s,m=l[n]+u;return v>m?Math.max(c,l[n]):Math.max(f,l[n])}function K1e(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function J1e(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,u,c,f;return o.height>0&&o.width>0&&r?(c=Lz({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),f=Lz({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),u=K1e({translateX:c,translateY:f,useTranslate3d:s})):u=X1e,{cssProperties:u,cssClasses:q1e({translateX:c,translateY:f,coordinate:r})}}function Pd(e){"@babel/helpers - typeof";return Pd=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},Pd(e)}function Iz(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Oz(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Iz(Object(r),!0).forEach(function(n){Uk(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Iz(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Q1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ewe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,cX(n.key),n)}}function twe(e,t,r){return t&&ewe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function rwe(e,t,r){return t=f1(t),nwe(e,uX()?Reflect.construct(t,r||[],f1(e).constructor):t.apply(e,r))}function nwe(e,t){if(t&&(Pd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return iwe(e)}function iwe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uX(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(uX=function(){return!!e})()}function f1(e){return f1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},f1(e)}function awe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hk(e,t)}function Hk(e,t){return Hk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Hk(e,t)}function Uk(e,t,r){return t=cX(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cX(e){var t=owe(e,"string");return Pd(t)=="symbol"?t:t+""}function owe(e,t){if(Pd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Pd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ez=1,swe=function(e){function t(){var r;Q1e(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=rwe(this,t,[].concat(i)),Uk(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),Uk(r,"handleKeyDown",function(o){if(o.key==="Escape"){var s,l,u,c;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(s=(l=r.props.coordinate)===null||l===void 0?void 0:l.x)!==null&&s!==void 0?s:0,y:(u=(c=r.props.coordinate)===null||c===void 0?void 0:c.y)!==null&&u!==void 0?u:0}})}}),r}return awe(t,e),twe(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>Ez||Math.abs(n.height-this.state.lastBoundingBox.height)>Ez)&&this.setState({lastBoundingBox:{width:n.width,height:n.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 n,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,u=i.children,c=i.coordinate,f=i.hasPayload,h=i.isAnimationActive,d=i.offset,v=i.position,m=i.reverseDirection,y=i.useTranslate3d,x=i.viewBox,_=i.wrapperStyle,b=J1e({allowEscapeViewBox:o,coordinate:c,offsetTopLeft:d,position:v,reverseDirection:m,tooltipBox:this.state.lastBoundingBox,useTranslate3d:y,viewBox:x}),S=b.cssClasses,T=b.cssProperties,C=Oz(Oz({transition:h&&a?"transform ".concat(s,"ms ").concat(l):void 0},T),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&f?"visible":"hidden",position:"absolute",top:0,left:0},_);return ee.createElement("div",{tabIndex:-1,className:S,style:C,ref:function(P){n.wrapperNode=P}},u)}}])}(G.PureComponent),lwe=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Af={isSsr:lwe()};function kd(e){"@babel/helpers - typeof";return kd=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},kd(e)}function Dz(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Nz(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Dz(Object(r),!0).forEach(function(n){BD(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dz(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uwe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cwe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,hX(n.key),n)}}function fwe(e,t,r){return t&&cwe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function hwe(e,t,r){return t=h1(t),dwe(e,fX()?Reflect.construct(t,r||[],h1(e).constructor):t.apply(e,r))}function dwe(e,t){if(t&&(kd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vwe(e)}function vwe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fX(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(fX=function(){return!!e})()}function h1(e){return h1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},h1(e)}function pwe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zk(e,t)}function Zk(e,t){return Zk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Zk(e,t)}function BD(e,t,r){return t=hX(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hX(e){var t=gwe(e,"string");return kd(t)=="symbol"?t:t+""}function gwe(e,t){if(kd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(kd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function mwe(e){return e.dataKey}function ywe(e,t){return ee.isValidElement(e)?ee.cloneElement(e,t):typeof e=="function"?ee.createElement(e,t):ee.createElement(U1e,t)}var hs=function(e){function t(){return uwe(this,t),hwe(this,t,arguments)}return pwe(t,e),fwe(t,[{key:"render",value:function(){var n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,u=i.content,c=i.coordinate,f=i.filterNull,h=i.isAnimationActive,d=i.offset,v=i.payload,m=i.payloadUniqBy,y=i.position,x=i.reverseDirection,_=i.useTranslate3d,b=i.viewBox,S=i.wrapperStyle,T=v??[];f&&T.length&&(T=tX(v.filter(function(A){return A.value!=null&&(A.hide!==!0||n.props.includeHidden)}),m,mwe));var C=T.length>0;return ee.createElement(swe,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:h,active:a,coordinate:c,hasPayload:C,offset:d,position:y,reverseDirection:x,useTranslate3d:_,viewBox:b,wrapperStyle:S},ywe(u,Nz(Nz({},this.props),{},{payload:T})))}}])}(G.PureComponent);BD(hs,"displayName","Tooltip");BD(hs,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Af.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 xwe=Ko,_we=function(){return xwe.Date.now()},bwe=_we,wwe=/\s/;function Swe(e){for(var t=e.length;t--&&wwe.test(e.charAt(t)););return t}var Twe=Swe,Cwe=Twe,Awe=/^\s+/;function Mwe(e){return e&&e.slice(0,Cwe(e)+1).replace(Awe,"")}var Pwe=Mwe,kwe=Pwe,jz=bu,Lwe=_v,Rz=NaN,Iwe=/^[-+]0x[0-9a-f]+$/i,Owe=/^0b[01]+$/i,Ewe=/^0o[0-7]+$/i,Dwe=parseInt;function Nwe(e){if(typeof e=="number")return e;if(Lwe(e))return Rz;if(jz(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=jz(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=kwe(e);var r=Owe.test(e);return r||Ewe.test(e)?Dwe(e.slice(2),r?2:8):Iwe.test(e)?Rz:+e}var dX=Nwe,jwe=bu,kA=bwe,Bz=dX,Rwe="Expected a function",Bwe=Math.max,zwe=Math.min;function $we(e,t,r){var n,i,a,o,s,l,u=0,c=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(Rwe);t=Bz(t)||0,jwe(r)&&(c=!!r.leading,f="maxWait"in r,a=f?Bwe(Bz(r.maxWait)||0,t):a,h="trailing"in r?!!r.trailing:h);function d(C){var A=n,P=i;return n=i=void 0,u=C,o=e.apply(P,A),o}function v(C){return u=C,s=setTimeout(x,t),c?d(C):o}function m(C){var A=C-l,P=C-u,I=t-A;return f?zwe(I,a-P):I}function y(C){var A=C-l,P=C-u;return l===void 0||A>=t||A<0||f&&P>=a}function x(){var C=kA();if(y(C))return _(C);s=setTimeout(x,m(C))}function _(C){return s=void 0,h&&n?d(C):(n=i=void 0,o)}function b(){s!==void 0&&clearTimeout(s),u=0,n=l=i=s=void 0}function S(){return s===void 0?o:_(kA())}function T(){var C=kA(),A=y(C);if(n=arguments,i=this,l=C,A){if(s===void 0)return v(l);if(f)return clearTimeout(s),s=setTimeout(x,t),d(l)}return s===void 0&&(s=setTimeout(x,t)),o}return T.cancel=b,T.flush=S,T}var Fwe=$we,Vwe=Fwe,Gwe=bu,Wwe="Expected a function";function Hwe(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(Wwe);return Gwe(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Vwe(e,t,{leading:n,maxWait:t,trailing:i})}var Uwe=Hwe;const vX=Ft(Uwe);function Nm(e){"@babel/helpers - typeof";return Nm=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},Nm(e)}function zz(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function px(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zz(Object(r),!0).forEach(function(n){Zwe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zz(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Zwe(e,t,r){return t=Ywe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ywe(e){var t=Xwe(e,"string");return Nm(t)=="symbol"?t:t+""}function Xwe(e,t){if(Nm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Nm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qwe(e,t){return eSe(e)||Qwe(e,t)||Jwe(e,t)||Kwe()}function Kwe(){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 Jwe(e,t){if(e){if(typeof e=="string")return $z(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $z(e,t)}}function $z(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Qwe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function eSe(e){if(Array.isArray(e))return e}var pX=G.forwardRef(function(e,t){var r=e.aspect,n=e.initialDimension,i=n===void 0?{width:-1,height:-1}:n,a=e.width,o=a===void 0?"100%":a,s=e.height,l=s===void 0?"100%":s,u=e.minWidth,c=u===void 0?0:u,f=e.minHeight,h=e.maxHeight,d=e.children,v=e.debounce,m=v===void 0?0:v,y=e.id,x=e.className,_=e.onResize,b=e.style,S=b===void 0?{}:b,T=G.useRef(null),C=G.useRef();C.current=_,G.useImperativeHandle(t,function(){return Object.defineProperty(T.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),T.current},configurable:!0})});var A=G.useState({containerWidth:i.width,containerHeight:i.height}),P=qwe(A,2),I=P[0],k=P[1],E=G.useCallback(function(N,z){k(function(V){var F=Math.round(N),$=Math.round(z);return V.containerWidth===F&&V.containerHeight===$?V:{containerWidth:F,containerHeight:$}})},[]);G.useEffect(function(){var N=function(H){var U,Y=H[0].contentRect,Z=Y.width,Q=Y.height;E(Z,Q),(U=C.current)===null||U===void 0||U.call(C,Z,Q)};m>0&&(N=vX(N,m,{trailing:!0,leading:!1}));var z=new ResizeObserver(N),V=T.current.getBoundingClientRect(),F=V.width,$=V.height;return E(F,$),z.observe(T.current),function(){z.disconnect()}},[E,m]);var D=G.useMemo(function(){var N=I.containerWidth,z=I.containerHeight;if(N<0||z<0)return null;Vc(Pc(o)||Pc(l),`The width(%s) and height(%s) are both fixed numbers,
maybe you don't need to use a ResponsiveContainer.`,o,l),Vc(!r||r>0,"The aspect(%s) must be greater than zero.",r);var V=Pc(o)?N:o,F=Pc(l)?z:l;r&&r>0&&(V?F=V/r:F&&(V=F*r),h&&F>h&&(F=h)),Vc(V>0||F>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.`,V,F,o,l,c,f,r);var $=!Array.isArray(d)&&Ms(d.type).endsWith("Chart");return ee.Children.map(d,function(B){return ee.isValidElement(B)?G.cloneElement(B,px({width:V,height:F},$?{style:px({height:"100%",width:"100%",maxHeight:F,maxWidth:V},B.props.style)}:{})):B})},[r,d,l,h,f,c,I,o]);return ee.createElement("div",{id:y?"".concat(y):void 0,className:_t("recharts-responsive-container",x),style:px(px({},S),{},{width:o,height:l,minWidth:c,minHeight:f,maxHeight:h}),ref:T},D)}),gX=function(t){return null};gX.displayName="Cell";function jm(e){"@babel/helpers - typeof";return jm=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},jm(e)}function Fz(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Yk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fz(Object(r),!0).forEach(function(n){tSe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fz(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tSe(e,t,r){return t=rSe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rSe(e){var t=nSe(e,"string");return jm(t)=="symbol"?t:t+""}function nSe(e,t){if(jm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(jm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var qf={widthCache:{},cacheCount:0},iSe=2e3,aSe={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Vz="recharts_measurement_span";function oSe(e){var t=Yk({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var $g=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Af.isSsr)return{width:0,height:0};var n=oSe(r),i=JSON.stringify({text:t,copyStyle:n});if(qf.widthCache[i])return qf.widthCache[i];try{var a=document.getElementById(Vz);a||(a=document.createElement("span"),a.setAttribute("id",Vz),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=Yk(Yk({},aSe),n);Object.assign(a.style,o),a.textContent="".concat(t);var s=a.getBoundingClientRect(),l={width:s.width,height:s.height};return qf.widthCache[i]=l,++qf.cacheCount>iSe&&(qf.cacheCount=0,qf.widthCache={}),l}catch{return{width:0,height:0}}},sSe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Rm(e){"@babel/helpers - typeof";return Rm=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},Rm(e)}function d1(e,t){return fSe(e)||cSe(e,t)||uSe(e,t)||lSe()}function lSe(){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 uSe(e,t){if(e){if(typeof e=="string")return Gz(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Gz(e,t)}}function Gz(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function cSe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function fSe(e){if(Array.isArray(e))return e}function hSe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wz(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,vSe(n.key),n)}}function dSe(e,t,r){return t&&Wz(e.prototype,t),r&&Wz(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function vSe(e){var t=pSe(e,"string");return Rm(t)=="symbol"?t:t+""}function pSe(e,t){if(Rm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Rm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Hz=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Uz=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,gSe=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,mSe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,mX={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},ySe=Object.keys(mX),Gh="NaN";function xSe(e,t){return e*mX[t]}var gx=function(){function e(t,r){hSe(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!gSe.test(r)&&(this.num=NaN,this.unit=""),ySe.includes(r)&&(this.num=xSe(t,r),this.unit="px")}return dSe(e,[{key:"add",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num+r.num,this.unit)}},{key:"subtract",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num-r.num,this.unit)}},{key:"multiply",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num*r.num,this.unit||r.unit)}},{key:"divide",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num/r.num,this.unit||r.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(r){var n,i=(n=mSe.exec(r))!==null&&n!==void 0?n:[],a=d1(i,3),o=a[1],s=a[2];return new e(parseFloat(o),s??"")}}])}();function yX(e){if(e.includes(Gh))return Gh;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=Hz.exec(t))!==null&&r!==void 0?r:[],i=d1(n,4),a=i[1],o=i[2],s=i[3],l=gx.parse(a??""),u=gx.parse(s??""),c=o==="*"?l.multiply(u):l.divide(u);if(c.isNaN())return Gh;t=t.replace(Hz,c.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,h=(f=Uz.exec(t))!==null&&f!==void 0?f:[],d=d1(h,4),v=d[1],m=d[2],y=d[3],x=gx.parse(v??""),_=gx.parse(y??""),b=m==="+"?x.add(_):x.subtract(_);if(b.isNaN())return Gh;t=t.replace(Uz,b.toString())}return t}var Zz=/\(([^()]*)\)/;function _Se(e){for(var t=e;t.includes("(");){var r=Zz.exec(t),n=d1(r,2),i=n[1];t=t.replace(Zz,yX(i))}return t}function bSe(e){var t=e.replace(/\s+/g,"");return t=_Se(t),t=yX(t),t}function wSe(e){try{return bSe(e)}catch{return Gh}}function LA(e){var t=wSe(e.slice(5,-1));return t===Gh?"":t}var SSe=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],TSe=["dx","dy","angle","className","breakAll"];function Xk(){return Xk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xk.apply(this,arguments)}function Yz(e,t){if(e==null)return{};var r=CSe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function CSe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Xz(e,t){return kSe(e)||PSe(e,t)||MSe(e,t)||ASe()}function ASe(){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 MSe(e,t){if(e){if(typeof e=="string")return qz(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return qz(e,t)}}function qz(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function PSe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function kSe(e){if(Array.isArray(e))return e}var xX=/[ \f\n\r\t\v\u2028\u2029]+/,_X=function(t){var r=t.children,n=t.breakAll,i=t.style;try{var a=[];vt(r)||(n?a=r.toString().split(""):a=r.toString().split(xX));var o=a.map(function(l){return{word:l,width:$g(l,i).width}}),s=n?0:$g(" ",i).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch{return null}},LSe=function(t,r,n,i,a){var o=t.maxLines,s=t.children,l=t.style,u=t.breakAll,c=Pe(o),f=s,h=function(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return V.reduce(function(F,$){var B=$.word,H=$.width,U=F[F.length-1];if(U&&(i==null||a||U.width+H+n<Number(i)))U.words.push(B),U.width+=H+n;else{var Y={words:[B],width:H};F.push(Y)}return F},[])},d=h(r),v=function(V){return V.reduce(function(F,$){return F.width>$.width?F:$})};if(!c)return d;for(var m="…",y=function(V){var F=f.slice(0,V),$=_X({breakAll:u,style:l,children:F+m}).wordsWithComputedWidth,B=h($),H=B.length>o||v(B).width>Number(i);return[H,B]},x=0,_=f.length-1,b=0,S;x<=_&&b<=f.length-1;){var T=Math.floor((x+_)/2),C=T-1,A=y(C),P=Xz(A,2),I=P[0],k=P[1],E=y(T),D=Xz(E,1),N=D[0];if(!I&&!N&&(x=T+1),I&&N&&(_=T-1),!I&&N){S=k;break}b++}return S||d},Kz=function(t){var r=vt(t)?[]:t.toString().split(xX);return[{words:r}]},ISe=function(t){var r=t.width,n=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,s=t.maxLines;if((r||n)&&!Af.isSsr){var l,u,c=_X({breakAll:o,children:i,style:a});if(c){var f=c.wordsWithComputedWidth,h=c.spaceWidth;l=f,u=h}else return Kz(i);return LSe({breakAll:o,children:i,maxLines:s,style:a},l,u,r,n)}return Kz(i)},Jz="#808080",v1=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.lineHeight,s=o===void 0?"1em":o,l=t.capHeight,u=l===void 0?"0.71em":l,c=t.scaleToFit,f=c===void 0?!1:c,h=t.textAnchor,d=h===void 0?"start":h,v=t.verticalAnchor,m=v===void 0?"end":v,y=t.fill,x=y===void 0?Jz:y,_=Yz(t,SSe),b=G.useMemo(function(){return ISe({breakAll:_.breakAll,children:_.children,maxLines:_.maxLines,scaleToFit:f,style:_.style,width:_.width})},[_.breakAll,_.children,_.maxLines,f,_.style,_.width]),S=_.dx,T=_.dy,C=_.angle,A=_.className,P=_.breakAll,I=Yz(_,TSe);if(!Ur(n)||!Ur(a))return null;var k=n+(Pe(S)?S:0),E=a+(Pe(T)?T:0),D;switch(m){case"start":D=LA("calc(".concat(u,")"));break;case"middle":D=LA("calc(".concat((b.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:D=LA("calc(".concat(b.length-1," * -").concat(s,")"));break}var N=[];if(f){var z=b[0].width,V=_.width;N.push("scale(".concat((Pe(V)?V/z:1)/z,")"))}return C&&N.push("rotate(".concat(C,", ").concat(k,", ").concat(E,")")),N.length&&(I.transform=N.join(" ")),ee.createElement("text",Xk({},ft(I,!0),{x:k,y:E,className:_t("recharts-text",A),textAnchor:d,fill:x.includes("url")?Jz:x}),b.map(function(F,$){var B=F.words.join(P?"":" ");return ee.createElement("tspan",{x:k,dy:$===0?D:s,key:"".concat(B,"-").concat($)},B)}))};function ql(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function OSe(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function zD(e){let t,r,n;e.length!==2?(t=ql,r=(s,l)=>ql(e(s),l),n=(s,l)=>e(s)-l):(t=e===ql||e===OSe?e:ESe,r=e,n=e);function i(s,l,u=0,c=s.length){if(u<c){if(t(l,l)!==0)return c;do{const f=u+c>>>1;r(s[f],l)<0?u=f+1:c=f}while(u<c)}return u}function a(s,l,u=0,c=s.length){if(u<c){if(t(l,l)!==0)return c;do{const f=u+c>>>1;r(s[f],l)<=0?u=f+1:c=f}while(u<c)}return u}function o(s,l,u=0,c=s.length){const f=i(s,l,u,c-1);return f>u&&n(s[f-1],l)>-n(s[f],l)?f-1:f}return{left:i,center:o,right:a}}function ESe(){return 0}function bX(e){return e===null?NaN:+e}function*DSe(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const NSe=zD(ql),t0=NSe.right;zD(bX).center;class Qz extends Map{constructor(t,r=BSe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(e4(this,t))}has(t){return super.has(e4(this,t))}set(t,r){return super.set(jSe(this,t),r)}delete(t){return super.delete(RSe(this,t))}}function e4({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function jSe({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function RSe({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function BSe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function zSe(e=ql){if(e===ql)return wX;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function wX(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const $Se=Math.sqrt(50),FSe=Math.sqrt(10),VSe=Math.sqrt(2);function p1(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=$Se?10:a>=FSe?5:a>=VSe?2:1;let s,l,u;return i<0?(u=Math.pow(10,-i)/o,s=Math.round(e*u),l=Math.round(t*u),s/u<e&&++s,l/u>t&&--l,u=-u):(u=Math.pow(10,i)*o,s=Math.round(e/u),l=Math.round(t/u),s*u<e&&++s,l*u>t&&--l),l<s&&.5<=r&&r<2?p1(e,t,r*2):[s,l,u]}function qk(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[i,a,o]=n?p1(t,e,r):p1(e,t,r);if(!(a>=i))return[];const s=a-i+1,l=new Array(s);if(n)if(o<0)for(let u=0;u<s;++u)l[u]=(a-u)/-o;else for(let u=0;u<s;++u)l[u]=(a-u)*o;else if(o<0)for(let u=0;u<s;++u)l[u]=(i+u)/-o;else for(let u=0;u<s;++u)l[u]=(i+u)*o;return l}function Kk(e,t,r){return t=+t,e=+e,r=+r,p1(e,t,r)[2]}function Jk(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?Kk(t,e,r):Kk(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function t4(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function r4(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function SX(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?wX:zSe(i);n>r;){if(n-r>600){const l=n-r+1,u=t-r+1,c=Math.log(l),f=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*f*(l-f)/l)*(u-l/2<0?-1:1),d=Math.max(r,Math.floor(t-u*f/l+h)),v=Math.min(n,Math.floor(t+(l-u)*f/l+h));SX(e,t,d,v,i)}const a=e[t];let o=r,s=n;for(Ap(e,r,t),i(e[n],a)>0&&Ap(e,r,n);o<s;){for(Ap(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[r],a)===0?Ap(e,r,s):(++s,Ap(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function Ap(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function GSe(e,t,r){if(e=Float64Array.from(DSe(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return r4(e);if(t>=1)return t4(e);var n,i=(n-1)*t,a=Math.floor(i),o=t4(SX(e,a).subarray(0,a+1)),s=r4(e.subarray(a+1));return o+(s-o)*(i-a)}}function WSe(e,t,r=bX){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),o=+r(e[a],a,e),s=+r(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function HSe(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n<i;)a[n]=e+n*r;return a}function xa(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function tl(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Qk=Symbol("implicit");function $D(){var e=new Qz,t=[],r=[],n=Qk;function i(a){let o=e.get(a);if(o===void 0){if(n!==Qk)return n;e.set(a,o=t.push(a)-1)}return r[o%r.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new Qz;for(const o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return $D(t,r).unknown(n)},xa.apply(i,arguments),i}function Bm(){var e=$D().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,a,o,s=!1,l=0,u=0,c=.5;delete e.unknown;function f(){var h=t().length,d=i<n,v=d?i:n,m=d?n:i;a=(m-v)/Math.max(1,h-l+u*2),s&&(a=Math.floor(a)),v+=(m-v-a*(h-l))*c,o=a*(1-l),s&&(v=Math.round(v),o=Math.round(o));var y=HSe(h).map(function(x){return v+a*x});return r(d?y.reverse():y)}return e.domain=function(h){return arguments.length?(t(h),f()):t()},e.range=function(h){return arguments.length?([n,i]=h,n=+n,i=+i,f()):[n,i]},e.rangeRound=function(h){return[n,i]=h,n=+n,i=+i,s=!0,f()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(h){return arguments.length?(s=!!h,f()):s},e.padding=function(h){return arguments.length?(l=Math.min(1,u=+h),f()):l},e.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),f()):l},e.paddingOuter=function(h){return arguments.length?(u=+h,f()):u},e.align=function(h){return arguments.length?(c=Math.max(0,Math.min(1,h)),f()):c},e.copy=function(){return Bm(t(),[n,i]).round(s).paddingInner(l).paddingOuter(u).align(c)},xa.apply(f(),arguments)}function TX(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return TX(t())},e}function Fg(){return TX(Bm.apply(null,arguments).paddingInner(1))}function FD(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function CX(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function r0(){}var zm=.7,g1=1/zm,ld="\\s*([+-]?\\d+)\\s*",$m="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",No="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",USe=/^#([0-9a-f]{3,8})$/,ZSe=new RegExp(`^rgb\\(${ld},${ld},${ld}\\)$`),YSe=new RegExp(`^rgb\\(${No},${No},${No}\\)$`),XSe=new RegExp(`^rgba\\(${ld},${ld},${ld},${$m}\\)$`),qSe=new RegExp(`^rgba\\(${No},${No},${No},${$m}\\)$`),KSe=new RegExp(`^hsl\\(${$m},${No},${No}\\)$`),JSe=new RegExp(`^hsla\\(${$m},${No},${No},${$m}\\)$`),n4={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};FD(r0,Fm,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:i4,formatHex:i4,formatHex8:QSe,formatHsl:eTe,formatRgb:a4,toString:a4});function i4(){return this.rgb().formatHex()}function QSe(){return this.rgb().formatHex8()}function eTe(){return AX(this).formatHsl()}function a4(){return this.rgb().formatRgb()}function Fm(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=USe.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?o4(t):r===3?new oi(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?mx(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?mx(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=ZSe.exec(e))?new oi(t[1],t[2],t[3],1):(t=YSe.exec(e))?new oi(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=XSe.exec(e))?mx(t[1],t[2],t[3],t[4]):(t=qSe.exec(e))?mx(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=KSe.exec(e))?u4(t[1],t[2]/100,t[3]/100,1):(t=JSe.exec(e))?u4(t[1],t[2]/100,t[3]/100,t[4]):n4.hasOwnProperty(e)?o4(n4[e]):e==="transparent"?new oi(NaN,NaN,NaN,0):null}function o4(e){return new oi(e>>16&255,e>>8&255,e&255,1)}function mx(e,t,r,n){return n<=0&&(e=t=r=NaN),new oi(e,t,r,n)}function tTe(e){return e instanceof r0||(e=Fm(e)),e?(e=e.rgb(),new oi(e.r,e.g,e.b,e.opacity)):new oi}function eL(e,t,r,n){return arguments.length===1?tTe(e):new oi(e,t,r,n??1)}function oi(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}FD(oi,eL,CX(r0,{brighter(e){return e=e==null?g1:Math.pow(g1,e),new oi(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?zm:Math.pow(zm,e),new oi(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new oi(Gc(this.r),Gc(this.g),Gc(this.b),m1(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:s4,formatHex:s4,formatHex8:rTe,formatRgb:l4,toString:l4}));function s4(){return`#${kc(this.r)}${kc(this.g)}${kc(this.b)}`}function rTe(){return`#${kc(this.r)}${kc(this.g)}${kc(this.b)}${kc((isNaN(this.opacity)?1:this.opacity)*255)}`}function l4(){const e=m1(this.opacity);return`${e===1?"rgb(":"rgba("}${Gc(this.r)}, ${Gc(this.g)}, ${Gc(this.b)}${e===1?")":`, ${e})`}`}function m1(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Gc(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function kc(e){return e=Gc(e),(e<16?"0":"")+e.toString(16)}function u4(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ba(e,t,r,n)}function AX(e){if(e instanceof Ba)return new Ba(e.h,e.s,e.l,e.opacity);if(e instanceof r0||(e=Fm(e)),!e)return new Ba;if(e instanceof Ba)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,s=a-i,l=(a+i)/2;return s?(t===a?o=(r-n)/s+(r<n)*6:r===a?o=(n-t)/s+2:o=(t-r)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=l>0&&l<1?0:o,new Ba(o,s,l,e.opacity)}function nTe(e,t,r,n){return arguments.length===1?AX(e):new Ba(e,t,r,n??1)}function Ba(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}FD(Ba,nTe,CX(r0,{brighter(e){return e=e==null?g1:Math.pow(g1,e),new Ba(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?zm:Math.pow(zm,e),new Ba(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new oi(IA(e>=240?e-240:e+120,i,n),IA(e,i,n),IA(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Ba(c4(this.h),yx(this.s),yx(this.l),m1(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=m1(this.opacity);return`${e===1?"hsl(":"hsla("}${c4(this.h)}, ${yx(this.s)*100}%, ${yx(this.l)*100}%${e===1?")":`, ${e})`}`}}));function c4(e){return e=(e||0)%360,e<0?e+360:e}function yx(e){return Math.max(0,Math.min(1,e||0))}function IA(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const VD=e=>()=>e;function iTe(e,t){return function(r){return e+r*t}}function aTe(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function oTe(e){return(e=+e)==1?MX:function(t,r){return r-t?aTe(t,r,e):VD(isNaN(t)?r:t)}}function MX(e,t){var r=t-e;return r?iTe(e,r):VD(isNaN(e)?t:e)}const f4=function e(t){var r=oTe(t);function n(i,a){var o=r((i=eL(i)).r,(a=eL(a)).r),s=r(i.g,a.g),l=r(i.b,a.b),u=MX(i.opacity,a.opacity);return function(c){return i.r=o(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+""}}return n.gamma=e,n}(1);function sTe(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=e[i]*(1-a)+t[i]*a;return n}}function lTe(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function uTe(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),o;for(o=0;o<n;++o)i[o]=Iv(e[o],t[o]);for(;o<r;++o)a[o]=t[o];return function(s){for(o=0;o<n;++o)a[o]=i[o](s);return a}}function cTe(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function y1(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function fTe(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=Iv(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var tL=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,OA=new RegExp(tL.source,"g");function hTe(e){return function(){return e}}function dTe(e){return function(t){return e(t)+""}}function vTe(e,t){var r=tL.lastIndex=OA.lastIndex=0,n,i,a,o=-1,s=[],l=[];for(e=e+"",t=t+"";(n=tL.exec(e))&&(i=OA.exec(t));)(a=i.index)>r&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:y1(n,i)})),r=OA.lastIndex;return r<t.length&&(a=t.slice(r),s[o]?s[o]+=a:s[++o]=a),s.length<2?l[0]?dTe(l[0].x):hTe(t):(t=l.length,function(u){for(var c=0,f;c<t;++c)s[(f=l[c]).i]=f.x(u);return s.join("")})}function Iv(e,t){var r=typeof t,n;return t==null||r==="boolean"?VD(t):(r==="number"?y1:r==="string"?(n=Fm(t))?(t=n,f4):vTe:t instanceof Fm?f4:t instanceof Date?cTe:lTe(t)?sTe:Array.isArray(t)?uTe:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?fTe:y1)(e,t)}function GD(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function pTe(e,t){t===void 0&&(t=e,e=Iv);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return function(o){var s=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return a[s](o-s)}}function gTe(e){return function(){return e}}function x1(e){return+e}var h4=[0,1];function Hn(e){return e}function rL(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:gTe(isNaN(t)?NaN:.5)}function mTe(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function yTe(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i<n?(n=rL(i,n),a=r(o,a)):(n=rL(n,i),a=r(a,o)),function(s){return a(n(s))}}function xTe(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),a=new Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)i[o]=rL(e[o],e[o+1]),a[o]=r(t[o],t[o+1]);return function(s){var l=t0(e,s,1,n)-1;return a[l](i[l](s))}}function n0(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function sT(){var e=h4,t=h4,r=Iv,n,i,a,o=Hn,s,l,u;function c(){var h=Math.min(e.length,t.length);return o!==Hn&&(o=mTe(e[0],e[h-1])),s=h>2?xTe:yTe,l=u=null,f}function f(h){return h==null||isNaN(h=+h)?a:(l||(l=s(e.map(n),t,r)))(n(o(h)))}return f.invert=function(h){return o(i((u||(u=s(t,e.map(n),y1)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,x1),c()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),c()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),r=GD,c()},f.clamp=function(h){return arguments.length?(o=h?!0:Hn,c()):o!==Hn},f.interpolate=function(h){return arguments.length?(r=h,c()):r},f.unknown=function(h){return arguments.length?(a=h,f):a},function(h,d){return n=h,i=d,c()}}function WD(){return sT()(Hn,Hn)}function _Te(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function _1(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Ld(e){return e=_1(Math.abs(e)),e?e[1]:NaN}function bTe(e,t){return function(r,n){for(var i=r.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),a.push(r.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function wTe(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var STe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Vm(e){if(!(t=STe.exec(e)))throw new Error("invalid format: "+e);var t;return new HD({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Vm.prototype=HD.prototype;function HD(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+""}HD.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 TTe(e){e:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var b1;function CTe(e,t){var r=_1(e,t);if(!r)return b1=void 0,e.toPrecision(t);var n=r[0],i=r[1],a=i-(b1=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+_1(e,Math.max(0,t+a-1))[0]}function d4(e,t){var r=_1(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const v4={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:_Te,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>d4(e*100,t),r:d4,s:CTe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function p4(e){return e}var g4=Array.prototype.map,m4=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ATe(e){var t=e.grouping===void 0||e.thousands===void 0?p4:bTe(g4.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?p4:wTe(g4.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(f,h){f=Vm(f);var d=f.fill,v=f.align,m=f.sign,y=f.symbol,x=f.zero,_=f.width,b=f.comma,S=f.precision,T=f.trim,C=f.type;C==="n"?(b=!0,C="g"):v4[C]||(S===void 0&&(S=12),T=!0,C="g"),(x||d==="0"&&v==="=")&&(x=!0,d="0",v="=");var A=(h&&h.prefix!==void 0?h.prefix:"")+(y==="$"?r:y==="#"&&/[boxX]/.test(C)?"0"+C.toLowerCase():""),P=(y==="$"?n:/[%p]/.test(C)?o:"")+(h&&h.suffix!==void 0?h.suffix:""),I=v4[C],k=/[defgprs%]/.test(C);S=S===void 0?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function E(D){var N=A,z=P,V,F,$;if(C==="c")z=I(D)+z,D="";else{D=+D;var B=D<0||1/D<0;if(D=isNaN(D)?l:I(Math.abs(D),S),T&&(D=TTe(D)),B&&+D==0&&m!=="+"&&(B=!1),N=(B?m==="("?m:s:m==="-"||m==="("?"":m)+N,z=(C==="s"&&!isNaN(D)&&b1!==void 0?m4[8+b1/3]:"")+z+(B&&m==="("?")":""),k){for(V=-1,F=D.length;++V<F;)if($=D.charCodeAt(V),48>$||$>57){z=($===46?i+D.slice(V+1):D.slice(V))+z,D=D.slice(0,V);break}}}b&&!x&&(D=t(D,1/0));var H=N.length+D.length+z.length,U=H<_?new Array(_-H+1).join(d):"";switch(b&&x&&(D=t(U+D,U.length?_-z.length:1/0),U=""),v){case"<":D=N+D+z+U;break;case"=":D=N+U+D+z;break;case"^":D=U.slice(0,H=U.length>>1)+N+D+z+U.slice(H);break;default:D=U+N+D+z;break}return a(D)}return E.toString=function(){return f+""},E}function c(f,h){var d=Math.max(-8,Math.min(8,Math.floor(Ld(h)/3)))*3,v=Math.pow(10,-d),m=u((f=Vm(f),f.type="f",f),{suffix:m4[8+d/3]});return function(y){return m(v*y)}}return{format:u,formatPrefix:c}}var xx,UD,PX;MTe({thousands:",",grouping:[3],currency:["$",""]});function MTe(e){return xx=ATe(e),UD=xx.format,PX=xx.formatPrefix,xx}function PTe(e){return Math.max(0,-Ld(Math.abs(e)))}function kTe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ld(t)/3)))*3-Ld(Math.abs(e)))}function LTe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ld(t)-Ld(e))+1}function kX(e,t,r,n){var i=Jk(e,t,r),a;switch(n=Vm(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=kTe(i,o))&&(n.precision=a),PX(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=LTe(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=PTe(i))&&(n.precision=a-(n.type==="%")*2);break}}return UD(n)}function wu(e){var t=e.domain;return e.ticks=function(r){var n=t();return qk(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return kX(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,o=n[i],s=n[a],l,u,c=10;for(s<o&&(u=o,o=s,s=u,u=i,i=a,a=u);c-- >0;){if(u=Kk(o,s,r),u===l)return n[i]=o,n[a]=s,t(n);if(u>0)o=Math.floor(o/u)*u,s=Math.ceil(s/u)*u;else if(u<0)o=Math.ceil(o*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function w1(){var e=WD();return e.copy=function(){return n0(e,w1())},xa.apply(e,arguments),wu(e)}function LX(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,x1),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return LX(e).unknown(t)},e=arguments.length?Array.from(e,x1):[0,1],wu(r)}function IX(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],o;return a<i&&(o=r,r=n,n=o,o=i,i=a,a=o),e[r]=t.floor(i),e[n]=t.ceil(a),e}function y4(e){return Math.log(e)}function x4(e){return Math.exp(e)}function ITe(e){return-Math.log(-e)}function OTe(e){return-Math.exp(-e)}function ETe(e){return isFinite(e)?+("1e"+e):e<0?0:e}function DTe(e){return e===10?ETe:e===Math.E?Math.exp:t=>Math.pow(e,t)}function NTe(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function _4(e){return(t,r)=>-e(-t,r)}function ZD(e){const t=e(y4,x4),r=t.domain;let n=10,i,a;function o(){return i=NTe(n),a=DTe(n),r()[0]<0?(i=_4(i),a=_4(a),e(ITe,OTe)):e(y4,x4),t}return t.base=function(s){return arguments.length?(n=+s,o()):n},t.domain=function(s){return arguments.length?(r(s),o()):r()},t.ticks=s=>{const l=r();let u=l[0],c=l[l.length-1];const f=c<u;f&&([u,c]=[c,u]);let h=i(u),d=i(c),v,m;const y=s==null?10:+s;let x=[];if(!(n%1)&&d-h<y){if(h=Math.floor(h),d=Math.ceil(d),u>0){for(;h<=d;++h)for(v=1;v<n;++v)if(m=h<0?v/a(-h):v*a(h),!(m<u)){if(m>c)break;x.push(m)}}else for(;h<=d;++h)for(v=n-1;v>=1;--v)if(m=h>0?v/a(-h):v*a(h),!(m<u)){if(m>c)break;x.push(m)}x.length*2<y&&(x=qk(u,c,y))}else x=qk(h,d,Math.min(d-h,y)).map(a);return f?x.reverse():x},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=Vm(l)).precision==null&&(l.trim=!0),l=UD(l)),s===1/0)return l;const u=Math.max(1,n*s/t.ticks().length);return c=>{let f=c/a(Math.round(i(c)));return f*n<n-.5&&(f*=n),f<=u?l(c):""}},t.nice=()=>r(IX(r(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function OX(){const e=ZD(sT()).domain([1,10]);return e.copy=()=>n0(e,OX()).base(e.base()),xa.apply(e,arguments),e}function b4(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function w4(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function YD(e){var t=1,r=e(b4(t),w4(t));return r.constant=function(n){return arguments.length?e(b4(t=+n),w4(t)):t},wu(r)}function EX(){var e=YD(sT());return e.copy=function(){return n0(e,EX()).constant(e.constant())},xa.apply(e,arguments)}function S4(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function jTe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function RTe(e){return e<0?-e*e:e*e}function XD(e){var t=e(Hn,Hn),r=1;function n(){return r===1?e(Hn,Hn):r===.5?e(jTe,RTe):e(S4(r),S4(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},wu(t)}function qD(){var e=XD(sT());return e.copy=function(){return n0(e,qD()).exponent(e.exponent())},xa.apply(e,arguments),e}function BTe(){return qD.apply(null,arguments).exponent(.5)}function T4(e){return Math.sign(e)*e*e}function zTe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function DX(){var e=WD(),t=[0,1],r=!1,n;function i(a){var o=zTe(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(T4(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,x1)).map(T4)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return DX(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},xa.apply(i,arguments),wu(i)}function NX(){var e=[],t=[],r=[],n;function i(){var o=0,s=Math.max(1,t.length);for(r=new Array(s-1);++o<s;)r[o-1]=WSe(e,o/s);return a}function a(o){return o==null||isNaN(o=+o)?n:t[t0(r,o)]}return a.invertExtent=function(o){var s=t.indexOf(o);return s<0?[NaN,NaN]:[s>0?r[s-1]:e[0],s<r.length?r[s]:e[e.length-1]]},a.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let s of o)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(ql),i()},a.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.quantiles=function(){return r.slice()},a.copy=function(){return NX().domain(e).range(t).unknown(n)},xa.apply(a,arguments)}function jX(){var e=0,t=1,r=1,n=[.5],i=[0,1],a;function o(l){return l!=null&&l<=l?i[t0(n,l,0,r)]:a}function s(){var l=-1;for(n=new Array(r);++l<r;)n[l]=((l+1)*t-(l-r)*e)/(r+1);return o}return o.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},o.range=function(l){return arguments.length?(r=(i=Array.from(l)).length-1,s()):i.slice()},o.invertExtent=function(l){var u=i.indexOf(l);return u<0?[NaN,NaN]:u<1?[e,n[0]]:u>=r?[n[r-1],t]:[n[u-1],n[u]]},o.unknown=function(l){return arguments.length&&(a=l),o},o.thresholds=function(){return n.slice()},o.copy=function(){return jX().domain([e,t]).range(i).unknown(a)},xa.apply(wu(o),arguments)}function RX(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[t0(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return RX().domain(e).range(t).unknown(r)},xa.apply(i,arguments)}const EA=new Date,DA=new Date;function Kr(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o<s-a?o:s},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const l=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a<o)||!(s>0))return l;let u;do l.push(u=new Date(+a)),t(a,s),e(a);while(u<a&&a<o);return l},i.filter=a=>Kr(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),r&&(i.count=(a,o)=>(EA.setTime(+a),DA.setTime(+o),e(EA),e(DA),Math.floor(r(EA,DA))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?o=>n(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const S1=Kr(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);S1.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Kr(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):S1);S1.range;const xs=1e3,ia=xs*60,_s=ia*60,Fs=_s*24,KD=Fs*7,C4=Fs*30,NA=Fs*365,Lc=Kr(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*xs)},(e,t)=>(t-e)/xs,e=>e.getUTCSeconds());Lc.range;const JD=Kr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*xs)},(e,t)=>{e.setTime(+e+t*ia)},(e,t)=>(t-e)/ia,e=>e.getMinutes());JD.range;const QD=Kr(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*ia)},(e,t)=>(t-e)/ia,e=>e.getUTCMinutes());QD.range;const eN=Kr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*xs-e.getMinutes()*ia)},(e,t)=>{e.setTime(+e+t*_s)},(e,t)=>(t-e)/_s,e=>e.getHours());eN.range;const tN=Kr(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*_s)},(e,t)=>(t-e)/_s,e=>e.getUTCHours());tN.range;const i0=Kr(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ia)/Fs,e=>e.getDate()-1);i0.range;const lT=Kr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Fs,e=>e.getUTCDate()-1);lT.range;const BX=Kr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Fs,e=>Math.floor(e/Fs));BX.range;function Mf(e){return Kr(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*ia)/KD)}const uT=Mf(0),T1=Mf(1),$Te=Mf(2),FTe=Mf(3),Id=Mf(4),VTe=Mf(5),GTe=Mf(6);uT.range;T1.range;$Te.range;FTe.range;Id.range;VTe.range;GTe.range;function Pf(e){return Kr(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/KD)}const cT=Pf(0),C1=Pf(1),WTe=Pf(2),HTe=Pf(3),Od=Pf(4),UTe=Pf(5),ZTe=Pf(6);cT.range;C1.range;WTe.range;HTe.range;Od.range;UTe.range;ZTe.range;const rN=Kr(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());rN.range;const nN=Kr(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());nN.range;const Vs=Kr(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Vs.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Kr(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});Vs.range;const Gs=Kr(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Gs.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Kr(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});Gs.range;function zX(e,t,r,n,i,a){const o=[[Lc,1,xs],[Lc,5,5*xs],[Lc,15,15*xs],[Lc,30,30*xs],[a,1,ia],[a,5,5*ia],[a,15,15*ia],[a,30,30*ia],[i,1,_s],[i,3,3*_s],[i,6,6*_s],[i,12,12*_s],[n,1,Fs],[n,2,2*Fs],[r,1,KD],[t,1,C4],[t,3,3*C4],[e,1,NA]];function s(u,c,f){const h=c<u;h&&([u,c]=[c,u]);const d=f&&typeof f.range=="function"?f:l(u,c,f),v=d?d.range(u,+c+1):[];return h?v.reverse():v}function l(u,c,f){const h=Math.abs(c-u)/f,d=zD(([,,y])=>y).right(o,h);if(d===o.length)return e.every(Jk(u/NA,c/NA,f));if(d===0)return S1.every(Math.max(Jk(u,c,f),1));const[v,m]=o[h/o[d-1][2]<o[d][2]/h?d-1:d];return v.every(m)}return[s,l]}const[YTe,XTe]=zX(Gs,nN,cT,BX,tN,QD),[qTe,KTe]=zX(Vs,rN,uT,i0,eN,JD);function jA(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function RA(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Mp(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function JTe(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,l=e.shortMonths,u=Pp(i),c=kp(i),f=Pp(a),h=kp(a),d=Pp(o),v=kp(o),m=Pp(s),y=kp(s),x=Pp(l),_=kp(l),b={a:$,A:B,b:H,B:U,c:null,d:I4,e:I4,f:bCe,g:ICe,G:ECe,H:yCe,I:xCe,j:_Ce,L:$X,m:wCe,M:SCe,p:Y,q:Z,Q:D4,s:N4,S:TCe,u:CCe,U:ACe,V:MCe,w:PCe,W:kCe,x:null,X:null,y:LCe,Y:OCe,Z:DCe,"%":E4},S={a:Q,A:re,b:ue,B:de,c:null,d:O4,e:O4,f:BCe,g:YCe,G:qCe,H:NCe,I:jCe,j:RCe,L:VX,m:zCe,M:$Ce,p:Re,q:xe,Q:D4,s:N4,S:FCe,u:VCe,U:GCe,V:WCe,w:HCe,W:UCe,x:null,X:null,y:ZCe,Y:XCe,Z:KCe,"%":E4},T={a:k,A:E,b:D,B:N,c:z,d:k4,e:k4,f:vCe,g:P4,G:M4,H:L4,I:L4,j:cCe,L:dCe,m:uCe,M:fCe,p:I,q:lCe,Q:gCe,s:mCe,S:hCe,u:nCe,U:iCe,V:aCe,w:rCe,W:oCe,x:V,X:F,y:P4,Y:M4,Z:sCe,"%":pCe};b.x=C(r,b),b.X=C(n,b),b.c=C(t,b),S.x=C(r,S),S.X=C(n,S),S.c=C(t,S);function C(ie,ve){return function(ce){var X=[],te=-1,pe=0,Te=ie.length,Me,Xe,At;for(ce instanceof Date||(ce=new Date(+ce));++te<Te;)ie.charCodeAt(te)===37&&(X.push(ie.slice(pe,te)),(Xe=A4[Me=ie.charAt(++te)])!=null?Me=ie.charAt(++te):Xe=Me==="e"?" ":"0",(At=ve[Me])&&(Me=At(ce,Xe)),X.push(Me),pe=te+1);return X.push(ie.slice(pe,te)),X.join("")}}function A(ie,ve){return function(ce){var X=Mp(1900,void 0,1),te=P(X,ie,ce+="",0),pe,Te;if(te!=ce.length)return null;if("Q"in X)return new Date(X.Q);if("s"in X)return new Date(X.s*1e3+("L"in X?X.L:0));if(ve&&!("Z"in X)&&(X.Z=0),"p"in X&&(X.H=X.H%12+X.p*12),X.m===void 0&&(X.m="q"in X?X.q:0),"V"in X){if(X.V<1||X.V>53)return null;"w"in X||(X.w=1),"Z"in X?(pe=RA(Mp(X.y,0,1)),Te=pe.getUTCDay(),pe=Te>4||Te===0?C1.ceil(pe):C1(pe),pe=lT.offset(pe,(X.V-1)*7),X.y=pe.getUTCFullYear(),X.m=pe.getUTCMonth(),X.d=pe.getUTCDate()+(X.w+6)%7):(pe=jA(Mp(X.y,0,1)),Te=pe.getDay(),pe=Te>4||Te===0?T1.ceil(pe):T1(pe),pe=i0.offset(pe,(X.V-1)*7),X.y=pe.getFullYear(),X.m=pe.getMonth(),X.d=pe.getDate()+(X.w+6)%7)}else("W"in X||"U"in X)&&("w"in X||(X.w="u"in X?X.u%7:"W"in X?1:0),Te="Z"in X?RA(Mp(X.y,0,1)).getUTCDay():jA(Mp(X.y,0,1)).getDay(),X.m=0,X.d="W"in X?(X.w+6)%7+X.W*7-(Te+5)%7:X.w+X.U*7-(Te+6)%7);return"Z"in X?(X.H+=X.Z/100|0,X.M+=X.Z%100,RA(X)):jA(X)}}function P(ie,ve,ce,X){for(var te=0,pe=ve.length,Te=ce.length,Me,Xe;te<pe;){if(X>=Te)return-1;if(Me=ve.charCodeAt(te++),Me===37){if(Me=ve.charAt(te++),Xe=T[Me in A4?ve.charAt(te++):Me],!Xe||(X=Xe(ie,ce,X))<0)return-1}else if(Me!=ce.charCodeAt(X++))return-1}return X}function I(ie,ve,ce){var X=u.exec(ve.slice(ce));return X?(ie.p=c.get(X[0].toLowerCase()),ce+X[0].length):-1}function k(ie,ve,ce){var X=d.exec(ve.slice(ce));return X?(ie.w=v.get(X[0].toLowerCase()),ce+X[0].length):-1}function E(ie,ve,ce){var X=f.exec(ve.slice(ce));return X?(ie.w=h.get(X[0].toLowerCase()),ce+X[0].length):-1}function D(ie,ve,ce){var X=x.exec(ve.slice(ce));return X?(ie.m=_.get(X[0].toLowerCase()),ce+X[0].length):-1}function N(ie,ve,ce){var X=m.exec(ve.slice(ce));return X?(ie.m=y.get(X[0].toLowerCase()),ce+X[0].length):-1}function z(ie,ve,ce){return P(ie,t,ve,ce)}function V(ie,ve,ce){return P(ie,r,ve,ce)}function F(ie,ve,ce){return P(ie,n,ve,ce)}function $(ie){return o[ie.getDay()]}function B(ie){return a[ie.getDay()]}function H(ie){return l[ie.getMonth()]}function U(ie){return s[ie.getMonth()]}function Y(ie){return i[+(ie.getHours()>=12)]}function Z(ie){return 1+~~(ie.getMonth()/3)}function Q(ie){return o[ie.getUTCDay()]}function re(ie){return a[ie.getUTCDay()]}function ue(ie){return l[ie.getUTCMonth()]}function de(ie){return s[ie.getUTCMonth()]}function Re(ie){return i[+(ie.getUTCHours()>=12)]}function xe(ie){return 1+~~(ie.getUTCMonth()/3)}return{format:function(ie){var ve=C(ie+="",b);return ve.toString=function(){return ie},ve},parse:function(ie){var ve=A(ie+="",!1);return ve.toString=function(){return ie},ve},utcFormat:function(ie){var ve=C(ie+="",S);return ve.toString=function(){return ie},ve},utcParse:function(ie){var ve=A(ie+="",!0);return ve.toString=function(){return ie},ve}}}var A4={"-":"",_:" ",0:"0"},cn=/^\s*\d+/,QTe=/^%/,eCe=/[\\^$*+?|[\]().{}]/g;function Pt(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(t)+i:i)}function tCe(e){return e.replace(eCe,"\\$&")}function Pp(e){return new RegExp("^(?:"+e.map(tCe).join("|")+")","i")}function kp(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function rCe(e,t,r){var n=cn.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function nCe(e,t,r){var n=cn.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function iCe(e,t,r){var n=cn.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function aCe(e,t,r){var n=cn.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function oCe(e,t,r){var n=cn.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function M4(e,t,r){var n=cn.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function P4(e,t,r){var n=cn.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function sCe(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function lCe(e,t,r){var n=cn.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function uCe(e,t,r){var n=cn.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function k4(e,t,r){var n=cn.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function cCe(e,t,r){var n=cn.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function L4(e,t,r){var n=cn.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function fCe(e,t,r){var n=cn.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function hCe(e,t,r){var n=cn.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function dCe(e,t,r){var n=cn.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function vCe(e,t,r){var n=cn.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function pCe(e,t,r){var n=QTe.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function gCe(e,t,r){var n=cn.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function mCe(e,t,r){var n=cn.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function I4(e,t){return Pt(e.getDate(),t,2)}function yCe(e,t){return Pt(e.getHours(),t,2)}function xCe(e,t){return Pt(e.getHours()%12||12,t,2)}function _Ce(e,t){return Pt(1+i0.count(Vs(e),e),t,3)}function $X(e,t){return Pt(e.getMilliseconds(),t,3)}function bCe(e,t){return $X(e,t)+"000"}function wCe(e,t){return Pt(e.getMonth()+1,t,2)}function SCe(e,t){return Pt(e.getMinutes(),t,2)}function TCe(e,t){return Pt(e.getSeconds(),t,2)}function CCe(e){var t=e.getDay();return t===0?7:t}function ACe(e,t){return Pt(uT.count(Vs(e)-1,e),t,2)}function FX(e){var t=e.getDay();return t>=4||t===0?Id(e):Id.ceil(e)}function MCe(e,t){return e=FX(e),Pt(Id.count(Vs(e),e)+(Vs(e).getDay()===4),t,2)}function PCe(e){return e.getDay()}function kCe(e,t){return Pt(T1.count(Vs(e)-1,e),t,2)}function LCe(e,t){return Pt(e.getFullYear()%100,t,2)}function ICe(e,t){return e=FX(e),Pt(e.getFullYear()%100,t,2)}function OCe(e,t){return Pt(e.getFullYear()%1e4,t,4)}function ECe(e,t){var r=e.getDay();return e=r>=4||r===0?Id(e):Id.ceil(e),Pt(e.getFullYear()%1e4,t,4)}function DCe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Pt(t/60|0,"0",2)+Pt(t%60,"0",2)}function O4(e,t){return Pt(e.getUTCDate(),t,2)}function NCe(e,t){return Pt(e.getUTCHours(),t,2)}function jCe(e,t){return Pt(e.getUTCHours()%12||12,t,2)}function RCe(e,t){return Pt(1+lT.count(Gs(e),e),t,3)}function VX(e,t){return Pt(e.getUTCMilliseconds(),t,3)}function BCe(e,t){return VX(e,t)+"000"}function zCe(e,t){return Pt(e.getUTCMonth()+1,t,2)}function $Ce(e,t){return Pt(e.getUTCMinutes(),t,2)}function FCe(e,t){return Pt(e.getUTCSeconds(),t,2)}function VCe(e){var t=e.getUTCDay();return t===0?7:t}function GCe(e,t){return Pt(cT.count(Gs(e)-1,e),t,2)}function GX(e){var t=e.getUTCDay();return t>=4||t===0?Od(e):Od.ceil(e)}function WCe(e,t){return e=GX(e),Pt(Od.count(Gs(e),e)+(Gs(e).getUTCDay()===4),t,2)}function HCe(e){return e.getUTCDay()}function UCe(e,t){return Pt(C1.count(Gs(e)-1,e),t,2)}function ZCe(e,t){return Pt(e.getUTCFullYear()%100,t,2)}function YCe(e,t){return e=GX(e),Pt(e.getUTCFullYear()%100,t,2)}function XCe(e,t){return Pt(e.getUTCFullYear()%1e4,t,4)}function qCe(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Od(e):Od.ceil(e),Pt(e.getUTCFullYear()%1e4,t,4)}function KCe(){return"+0000"}function E4(){return"%"}function D4(e){return+e}function N4(e){return Math.floor(+e/1e3)}var Kf,WX,HX;JCe({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 JCe(e){return Kf=JTe(e),WX=Kf.format,Kf.parse,HX=Kf.utcFormat,Kf.utcParse,Kf}function QCe(e){return new Date(e)}function eAe(e){return e instanceof Date?+e:+new Date(+e)}function iN(e,t,r,n,i,a,o,s,l,u){var c=WD(),f=c.invert,h=c.domain,d=u(".%L"),v=u(":%S"),m=u("%I:%M"),y=u("%I %p"),x=u("%a %d"),_=u("%b %d"),b=u("%B"),S=u("%Y");function T(C){return(l(C)<C?d:s(C)<C?v:o(C)<C?m:a(C)<C?y:n(C)<C?i(C)<C?x:_:r(C)<C?b:S)(C)}return c.invert=function(C){return new Date(f(C))},c.domain=function(C){return arguments.length?h(Array.from(C,eAe)):h().map(QCe)},c.ticks=function(C){var A=h();return e(A[0],A[A.length-1],C??10)},c.tickFormat=function(C,A){return A==null?T:u(A)},c.nice=function(C){var A=h();return(!C||typeof C.range!="function")&&(C=t(A[0],A[A.length-1],C??10)),C?h(IX(A,C)):c},c.copy=function(){return n0(c,iN(e,t,r,n,i,a,o,s,l,u))},c}function tAe(){return xa.apply(iN(qTe,KTe,Vs,rN,uT,i0,eN,JD,Lc,WX).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function rAe(){return xa.apply(iN(YTe,XTe,Gs,nN,cT,lT,tN,QD,Lc,HX).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function fT(){var e=0,t=1,r,n,i,a,o=Hn,s=!1,l;function u(f){return f==null||isNaN(f=+f)?l:o(i===0?.5:(f=(a(f)-r)*i,s?Math.max(0,Math.min(1,f)):f))}u.domain=function(f){return arguments.length?([e,t]=f,r=a(e=+e),n=a(t=+t),i=r===n?0:1/(n-r),u):[e,t]},u.clamp=function(f){return arguments.length?(s=!!f,u):s},u.interpolator=function(f){return arguments.length?(o=f,u):o};function c(f){return function(h){var d,v;return arguments.length?([d,v]=h,o=f(d,v),u):[o(0),o(1)]}}return u.range=c(Iv),u.rangeRound=c(GD),u.unknown=function(f){return arguments.length?(l=f,u):l},function(f){return a=f,r=f(e),n=f(t),i=r===n?0:1/(n-r),u}}function Su(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function UX(){var e=wu(fT()(Hn));return e.copy=function(){return Su(e,UX())},tl.apply(e,arguments)}function ZX(){var e=ZD(fT()).domain([1,10]);return e.copy=function(){return Su(e,ZX()).base(e.base())},tl.apply(e,arguments)}function YX(){var e=YD(fT());return e.copy=function(){return Su(e,YX()).constant(e.constant())},tl.apply(e,arguments)}function aN(){var e=XD(fT());return e.copy=function(){return Su(e,aN()).exponent(e.exponent())},tl.apply(e,arguments)}function nAe(){return aN.apply(null,arguments).exponent(.5)}function XX(){var e=[],t=Hn;function r(n){if(n!=null&&!isNaN(n=+n))return t((t0(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let i of n)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(ql),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,i)=>t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>GSe(e,a/n))},r.copy=function(){return XX(t).domain(e)},tl.apply(r,arguments)}function hT(){var e=0,t=.5,r=1,n=1,i,a,o,s,l,u=Hn,c,f=!1,h;function d(m){return isNaN(m=+m)?h:(m=.5+((m=+c(m))-a)*(n*m<n*a?s:l),u(f?Math.max(0,Math.min(1,m)):m))}d.domain=function(m){return arguments.length?([e,t,r]=m,i=c(e=+e),a=c(t=+t),o=c(r=+r),s=i===a?0:.5/(a-i),l=a===o?0:.5/(o-a),n=a<i?-1:1,d):[e,t,r]},d.clamp=function(m){return arguments.length?(f=!!m,d):f},d.interpolator=function(m){return arguments.length?(u=m,d):u};function v(m){return function(y){var x,_,b;return arguments.length?([x,_,b]=y,u=pTe(m,[x,_,b]),d):[u(0),u(.5),u(1)]}}return d.range=v(Iv),d.rangeRound=v(GD),d.unknown=function(m){return arguments.length?(h=m,d):h},function(m){return c=m,i=m(e),a=m(t),o=m(r),s=i===a?0:.5/(a-i),l=a===o?0:.5/(o-a),n=a<i?-1:1,d}}function qX(){var e=wu(hT()(Hn));return e.copy=function(){return Su(e,qX())},tl.apply(e,arguments)}function KX(){var e=ZD(hT()).domain([.1,1,10]);return e.copy=function(){return Su(e,KX()).base(e.base())},tl.apply(e,arguments)}function JX(){var e=YD(hT());return e.copy=function(){return Su(e,JX()).constant(e.constant())},tl.apply(e,arguments)}function oN(){var e=XD(hT());return e.copy=function(){return Su(e,oN()).exponent(e.exponent())},tl.apply(e,arguments)}function iAe(){return oN.apply(null,arguments).exponent(.5)}const j4=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Bm,scaleDiverging:qX,scaleDivergingLog:KX,scaleDivergingPow:oN,scaleDivergingSqrt:iAe,scaleDivergingSymlog:JX,scaleIdentity:LX,scaleImplicit:Qk,scaleLinear:w1,scaleLog:OX,scaleOrdinal:$D,scalePoint:Fg,scalePow:qD,scaleQuantile:NX,scaleQuantize:jX,scaleRadial:DX,scaleSequential:UX,scaleSequentialLog:ZX,scaleSequentialPow:aN,scaleSequentialQuantile:XX,scaleSequentialSqrt:nAe,scaleSequentialSymlog:YX,scaleSqrt:BTe,scaleSymlog:EX,scaleThreshold:RX,scaleTime:tAe,scaleUtc:rAe,tickFormat:kX},Symbol.toStringTag,{value:"Module"}));var aAe=_v;function oAe(e,t,r){for(var n=-1,i=e.length;++n<i;){var a=e[n],o=t(a);if(o!=null&&(s===void 0?o===o&&!aAe(o):r(o,s)))var s=o,l=a}return l}var QX=oAe;function sAe(e,t){return e>t}var lAe=sAe,uAe=QX,cAe=lAe,fAe=kv;function hAe(e){return e&&e.length?uAe(e,fAe,cAe):void 0}var dAe=hAe;const Ol=Ft(dAe);function vAe(e,t){return e<t}var pAe=vAe,gAe=QX,mAe=pAe,yAe=kv;function xAe(e){return e&&e.length?gAe(e,yAe,mAe):void 0}var _Ae=xAe;const dT=Ft(_Ae);var bAe=xD,wAe=Lv,SAe=sX,TAe=hi;function CAe(e,t){var r=TAe(e)?bAe:SAe;return r(e,wAe(t))}var AAe=CAe,MAe=aX,PAe=AAe;function kAe(e,t){return MAe(PAe(e,t),1)}var LAe=kAe;const IAe=Ft(LAe);var OAe=ND;function EAe(e,t){return OAe(e,t)}var DAe=EAe;const Ed=Ft(DAe);var Ov=1e9,NAe={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},lN,rr=!0,da="[DecimalError] ",Wc=da+"Invalid argument: ",sN=da+"Exponent out of range: ",Ev=Math.floor,vc=Math.pow,jAe=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,wi,rn=1e7,Jt=7,eq=9007199254740991,A1=Ev(eq/Jt),Fe={};Fe.absoluteValue=Fe.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Fe.comparedTo=Fe.cmp=function(e){var t,r,n,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=n<i?n:i;t<r;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};Fe.decimalPlaces=Fe.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Jt;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};Fe.dividedBy=Fe.div=function(e){return Ps(this,new this.constructor(e))};Fe.dividedToIntegerBy=Fe.idiv=function(e){var t=this,r=t.constructor;return Vt(Ps(t,new r(e),0,1),r.precision)};Fe.equals=Fe.eq=function(e){return!this.cmp(e)};Fe.exponent=function(){return jr(this)};Fe.greaterThan=Fe.gt=function(e){return this.cmp(e)>0};Fe.greaterThanOrEqualTo=Fe.gte=function(e){return this.cmp(e)>=0};Fe.isInteger=Fe.isint=function(){return this.e>this.d.length-2};Fe.isNegative=Fe.isneg=function(){return this.s<0};Fe.isPositive=Fe.ispos=function(){return this.s>0};Fe.isZero=function(){return this.s===0};Fe.lessThan=Fe.lt=function(e){return this.cmp(e)<0};Fe.lessThanOrEqualTo=Fe.lte=function(e){return this.cmp(e)<1};Fe.logarithm=Fe.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(wi))throw Error(da+"NaN");if(r.s<1)throw Error(da+(r.s?"NaN":"-Infinity"));return r.eq(wi)?new n(0):(rr=!1,t=Ps(Gm(r,a),Gm(e,a),a),rr=!0,Vt(t,i))};Fe.minus=Fe.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?nq(t,e):tq(t,(e.s=-e.s,e))};Fe.modulo=Fe.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(da+"NaN");return r.s?(rr=!1,t=Ps(r,e,0,1).times(e),rr=!0,r.minus(t)):Vt(new n(r),i)};Fe.naturalExponential=Fe.exp=function(){return rq(this)};Fe.naturalLogarithm=Fe.ln=function(){return Gm(this)};Fe.negated=Fe.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Fe.plus=Fe.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?tq(t,e):nq(t,(e.s=-e.s,e))};Fe.precision=Fe.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Wc+e);if(t=jr(i)+1,n=i.d.length-1,r=n*Jt+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};Fe.squareRoot=Fe.sqrt=function(){var e,t,r,n,i,a,o,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(da+"NaN")}for(e=jr(s),rr=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=Co(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Ev((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new l(t)):n=new l(i.toString()),r=l.precision,i=o=r+3;;)if(a=n,n=a.plus(Ps(s,a,o+2)).times(.5),Co(a.d).slice(0,o)===(t=Co(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(Vt(a,r+1,0),a.times(a).eq(s)){n=a;break}}else if(t!="9999")break;o+=4}return rr=!0,Vt(n,r)};Fe.times=Fe.mul=function(e){var t,r,n,i,a,o,s,l,u,c=this,f=c.constructor,h=c.d,d=(e=new f(e)).d;if(!c.s||!e.s)return new f(0);for(e.s*=c.s,r=c.e+e.e,l=h.length,u=d.length,l<u&&(a=h,h=d,d=a,o=l,l=u,u=o),a=[],o=l+u,n=o;n--;)a.push(0);for(n=u;--n>=0;){for(t=0,i=l+n;i>n;)s=a[i]+d[n]*h[i-n-1]+t,a[i--]=s%rn|0,t=s/rn|0;a[i]=(a[i]+t)%rn|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,rr?Vt(e,f.precision):e};Fe.toDecimalPlaces=Fe.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Vo(e,0,Ov),t===void 0?t=n.rounding:Vo(t,0,8),Vt(r,e+jr(r)+1,t))};Fe.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=lf(n,!0):(Vo(e,0,Ov),t===void 0?t=i.rounding:Vo(t,0,8),n=Vt(new i(n),e+1,t),r=lf(n,!0,e+1)),r};Fe.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?lf(i):(Vo(e,0,Ov),t===void 0?t=a.rounding:Vo(t,0,8),n=Vt(new a(i),e+jr(i)+1,t),r=lf(n.abs(),!1,e+jr(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};Fe.toInteger=Fe.toint=function(){var e=this,t=e.constructor;return Vt(new t(e),jr(e)+1,t.rounding)};Fe.toNumber=function(){return+this};Fe.toPower=Fe.pow=function(e){var t,r,n,i,a,o,s=this,l=s.constructor,u=12,c=+(e=new l(e));if(!e.s)return new l(wi);if(s=new l(s),!s.s){if(e.s<1)throw Error(da+"Infinity");return s}if(s.eq(wi))return s;if(n=l.precision,e.eq(wi))return Vt(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=s.s,o){if((r=c<0?-c:c)<=eq){for(i=new l(wi),t=Math.ceil(n/Jt+4),rr=!1;r%2&&(i=i.times(s),B4(i.d,t)),r=Ev(r/2),r!==0;)s=s.times(s),B4(s.d,t);return rr=!0,e.s<0?new l(wi).div(i):Vt(i,n)}}else if(a<0)throw Error(da+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,rr=!1,i=e.times(Gm(s,n+u)),rr=!0,i=rq(i),i.s=a,i};Fe.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=jr(i),n=lf(i,r<=a.toExpNeg||r>=a.toExpPos)):(Vo(e,1,Ov),t===void 0?t=a.rounding:Vo(t,0,8),i=Vt(new a(i),e,t),r=jr(i),n=lf(i,e<=r||r<=a.toExpNeg,e)),n};Fe.toSignificantDigits=Fe.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Vo(e,1,Ov),t===void 0?t=n.rounding:Vo(t,0,8)),Vt(new n(r),e,t)};Fe.toString=Fe.valueOf=Fe.val=Fe.toJSON=Fe[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=jr(e),r=e.constructor;return lf(e,t<=r.toExpNeg||t>=r.toExpPos)};function tq(e,t){var r,n,i,a,o,s,l,u,c=e.constructor,f=c.precision;if(!e.s||!t.s)return t.s||(t=new c(e)),rr?Vt(t,f):t;if(l=e.d,u=t.d,o=e.e,i=t.e,l=l.slice(),a=o-i,a){for(a<0?(n=l,a=-a,s=u.length):(n=u,i=o,s=l.length),o=Math.ceil(f/Jt),s=o>s?o+1:s+1,a>s&&(a=s,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(s=l.length,a=u.length,s-a<0&&(a=s,n=u,u=l,l=n),r=0;a;)r=(l[--a]=l[a]+u[a]+r)/rn|0,l[a]%=rn;for(r&&(l.unshift(r),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,rr?Vt(t,f):t}function Vo(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Wc+e)}function Co(e){var t,r,n,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)n=e[t]+"",r=Jt-n.length,r&&(a+=Sl(r)),a+=n;o=e[t],n=o+"",r=Jt-n.length,r&&(a+=Sl(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var Ps=function(){function e(n,i){var a,o=0,s=n.length;for(n=n.slice();s--;)a=n[s]*i+o,n[s]=a%rn|0,o=a/rn|0;return o&&n.unshift(o),n}function t(n,i,a,o){var s,l;if(a!=o)l=a>o?1:-1;else for(s=l=0;s<a;s++)if(n[s]!=i[s]){l=n[s]>i[s]?1:-1;break}return l}function r(n,i,a){for(var o=0;a--;)n[a]-=o,o=n[a]<i[a]?1:0,n[a]=o*rn+n[a]-i[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,a,o){var s,l,u,c,f,h,d,v,m,y,x,_,b,S,T,C,A,P,I=n.constructor,k=n.s==i.s?1:-1,E=n.d,D=i.d;if(!n.s)return new I(n);if(!i.s)throw Error(da+"Division by zero");for(l=n.e-i.e,A=D.length,T=E.length,d=new I(k),v=d.d=[],u=0;D[u]==(E[u]||0);)++u;if(D[u]>(E[u]||0)&&--l,a==null?_=a=I.precision:o?_=a+(jr(n)-jr(i))+1:_=a,_<0)return new I(0);if(_=_/Jt+2|0,u=0,A==1)for(c=0,D=D[0],_++;(u<T||c)&&_--;u++)b=c*rn+(E[u]||0),v[u]=b/D|0,c=b%D|0;else{for(c=rn/(D[0]+1)|0,c>1&&(D=e(D,c),E=e(E,c),A=D.length,T=E.length),S=A,m=E.slice(0,A),y=m.length;y<A;)m[y++]=0;P=D.slice(),P.unshift(0),C=D[0],D[1]>=rn/2&&++C;do c=0,s=t(D,m,A,y),s<0?(x=m[0],A!=y&&(x=x*rn+(m[1]||0)),c=x/C|0,c>1?(c>=rn&&(c=rn-1),f=e(D,c),h=f.length,y=m.length,s=t(f,m,h,y),s==1&&(c--,r(f,A<h?P:D,h))):(c==0&&(s=c=1),f=D.slice()),h=f.length,h<y&&f.unshift(0),r(m,f,y),s==-1&&(y=m.length,s=t(D,m,A,y),s<1&&(c++,r(m,A<y?P:D,y))),y=m.length):s===0&&(c++,m=[0]),v[u++]=c,s&&m[0]?m[y++]=E[S]||0:(m=[E[S]],y=1);while((S++<T||m[0]!==void 0)&&_--)}return v[0]||v.shift(),d.e=l,Vt(d,o?a+jr(d)+1:a)}}();function rq(e,t){var r,n,i,a,o,s,l=0,u=0,c=e.constructor,f=c.precision;if(jr(e)>16)throw Error(sN+jr(e));if(!e.s)return new c(wi);for(rr=!1,s=f,o=new c(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(n=Math.log(vc(2,u))/Math.LN10*2+5|0,s+=n,r=i=a=new c(wi),c.precision=s;;){if(i=Vt(i.times(e),s),r=r.times(++l),o=a.plus(Ps(i,r,s)),Co(o.d).slice(0,s)===Co(a.d).slice(0,s)){for(;u--;)a=Vt(a.times(a),s);return c.precision=f,t==null?(rr=!0,Vt(a,f)):a}a=o}}function jr(e){for(var t=e.e*Jt,r=e.d[0];r>=10;r/=10)t++;return t}function BA(e,t,r){if(t>e.LN10.sd())throw rr=!0,r&&(e.precision=r),Error(da+"LN10 precision limit exceeded");return Vt(new e(e.LN10),t)}function Sl(e){for(var t="";e--;)t+="0";return t}function Gm(e,t){var r,n,i,a,o,s,l,u,c,f=1,h=10,d=e,v=d.d,m=d.constructor,y=m.precision;if(d.s<1)throw Error(da+(d.s?"NaN":"-Infinity"));if(d.eq(wi))return new m(0);if(t==null?(rr=!1,u=y):u=t,d.eq(10))return t==null&&(rr=!0),BA(m,u);if(u+=h,m.precision=u,r=Co(v),n=r.charAt(0),a=jr(d),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)d=d.times(e),r=Co(d.d),n=r.charAt(0),f++;a=jr(d),n>1?(d=new m("0."+r),a++):d=new m(n+"."+r.slice(1))}else return l=BA(m,u+2,y).times(a+""),d=Gm(new m(n+"."+r.slice(1)),u-h).plus(l),m.precision=y,t==null?(rr=!0,Vt(d,y)):d;for(s=o=d=Ps(d.minus(wi),d.plus(wi),u),c=Vt(d.times(d),u),i=3;;){if(o=Vt(o.times(c),u),l=s.plus(Ps(o,new m(i),u)),Co(l.d).slice(0,u)===Co(s.d).slice(0,u))return s=s.times(2),a!==0&&(s=s.plus(BA(m,u+2,y).times(a+""))),s=Ps(s,new m(f),u),m.precision=y,t==null?(rr=!0,Vt(s,y)):s;s=l,i+=2}}function R4(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=Ev(r/Jt),e.d=[],n=(r+1)%Jt,r<0&&(n+=Jt),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=Jt;n<i;)e.d.push(+t.slice(n,n+=Jt));t=t.slice(n),n=Jt-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),rr&&(e.e>A1||e.e<-A1))throw Error(sN+r)}else e.s=0,e.e=0,e.d=[0];return e}function Vt(e,t,r){var n,i,a,o,s,l,u,c,f=e.d;for(o=1,a=f[0];a>=10;a/=10)o++;if(n=t-o,n<0)n+=Jt,i=t,u=f[c=0];else{if(c=Math.ceil((n+1)/Jt),a=f.length,c>=a)return e;for(u=a=f[c],o=1;a>=10;a/=10)o++;n%=Jt,i=n-Jt+o}if(r!==void 0&&(a=vc(10,o-i-1),s=u/a%10|0,l=t<0||f[c+1]!==void 0||u%a,l=r<4?(s||l)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||l||r==6&&(n>0?i>0?u/vc(10,o-i):0:f[c-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return l?(a=jr(e),f.length=1,t=t-a-1,f[0]=vc(10,(Jt-t%Jt)%Jt),e.e=Ev(-t/Jt)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(n==0?(f.length=c,a=1,c--):(f.length=c+1,a=vc(10,Jt-n),f[c]=i>0?(u/vc(10,o-i)%vc(10,i)|0)*a:0),l)for(;;)if(c==0){(f[0]+=a)==rn&&(f[0]=1,++e.e);break}else{if(f[c]+=a,f[c]!=rn)break;f[c--]=0,a=1}for(n=f.length;f[--n]===0;)f.pop();if(rr&&(e.e>A1||e.e<-A1))throw Error(sN+jr(e));return e}function nq(e,t){var r,n,i,a,o,s,l,u,c,f,h=e.constructor,d=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),rr?Vt(t,d):t;if(l=e.d,f=t.d,n=t.e,u=e.e,l=l.slice(),o=u-n,o){for(c=o<0,c?(r=l,o=-o,s=f.length):(r=f,n=u,s=l.length),i=Math.max(Math.ceil(d/Jt),s)+2,o>i&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for(i=l.length,s=f.length,c=i<s,c&&(s=i),i=0;i<s;i++)if(l[i]!=f[i]){c=l[i]<f[i];break}o=0}for(c&&(r=l,l=f,f=r,t.s=-t.s),s=l.length,i=f.length-s;i>0;--i)l[s++]=0;for(i=f.length;i>o;){if(l[--i]<f[i]){for(a=i;a&&l[--a]===0;)l[a]=rn-1;--l[a],l[i]+=rn}l[i]-=f[i]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--n;return l[0]?(t.d=l,t.e=n,rr?Vt(t,d):t):new h(0)}function lf(e,t,r){var n,i=jr(e),a=Co(e.d),o=a.length;return t?(r&&(n=r-o)>0?a=a.charAt(0)+"."+a.slice(1)+Sl(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Sl(-i-1)+a,r&&(n=r-o)>0&&(a+=Sl(n))):i>=o?(a+=Sl(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+Sl(n))):((n=i+1)<o&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-o)>0&&(i+1===o&&(a+="."),a+=Sl(n))),e.s<0?"-"+a:a}function B4(e,t){if(e.length>t)return e.length=t,!0}function iq(e){var t,r,n;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Wc+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return R4(o,a.toString())}else if(typeof a!="string")throw Error(Wc+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,jAe.test(a))R4(o,a);else throw Error(Wc+a)}if(i.prototype=Fe,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=iq,i.config=i.set=RAe,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return i.config(e),i}function RAe(e){if(!e||typeof e!="object")throw Error(da+"Object expected");var t,r,n,i=["precision",1,Ov,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((n=e[r=i[t]])!==void 0)if(Ev(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Wc+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Wc+r+": "+n);return this}var lN=iq(NAe);wi=new lN(1);const zt=lN;function BAe(e){return VAe(e)||FAe(e)||$Ae(e)||zAe()}function zAe(){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 $Ae(e,t){if(e){if(typeof e=="string")return nL(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nL(e,t)}}function FAe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function VAe(e){if(Array.isArray(e))return nL(e)}function nL(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var GAe=function(t){return t},aq={},oq=function(t){return t===aq},z4=function(t){return function r(){return arguments.length===0||arguments.length===1&&oq(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},WAe=function e(t,r){return t===1?r:z4(function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];var o=i.filter(function(s){return s!==aq}).length;return o>=t?r.apply(void 0,i):e(t-o,z4(function(){for(var s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];var c=i.map(function(f){return oq(f)?l.shift():f});return r.apply(void 0,BAe(c).concat(l))}))})},vT=function(t){return WAe(t.length,t)},iL=function(t,r){for(var n=[],i=t;i<r;++i)n[i-t]=i;return n},HAe=vT(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),UAe=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return GAe;var i=r.reverse(),a=i[0],o=i.slice(1);return function(){return o.reduce(function(s,l){return l(s)},a.apply(void 0,arguments))}},aL=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},sq=function(t){var r=null,n=null;return function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return r&&a.every(function(s,l){return s===r[l]})||(r=a,n=t.apply(void 0,a)),n}};function ZAe(e){var t;return e===0?t=1:t=Math.floor(new zt(e).abs().log(10).toNumber())+1,t}function YAe(e,t,r){for(var n=new zt(e),i=0,a=[];n.lt(t)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}var XAe=vT(function(e,t,r){var n=+e,i=+t;return n+r*(i-n)}),qAe=vT(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),KAe=vT(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const pT={rangeStep:YAe,getDigitCount:ZAe,interpolateNumber:XAe,uninterpolateNumber:qAe,uninterpolateTruncation:KAe};function oL(e){return e2e(e)||QAe(e)||lq(e)||JAe()}function JAe(){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 QAe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function e2e(e){if(Array.isArray(e))return sL(e)}function Wm(e,t){return n2e(e)||r2e(e,t)||lq(e,t)||t2e()}function t2e(){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 lq(e,t){if(e){if(typeof e=="string")return sL(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return sL(e,t)}}function sL(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function r2e(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(n=(s=o.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(l){i=!0,a=l}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r}}function n2e(e){if(Array.isArray(e))return e}function uq(e){var t=Wm(e,2),r=t[0],n=t[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function cq(e,t,r){if(e.lte(0))return new zt(0);var n=pT.getDigitCount(e.toNumber()),i=new zt(10).pow(n),a=e.div(i),o=n!==1?.05:.1,s=new zt(Math.ceil(a.div(o).toNumber())).add(r).mul(o),l=s.mul(i);return t?l:new zt(Math.ceil(l))}function i2e(e,t,r){var n=1,i=new zt(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new zt(10).pow(pT.getDigitCount(e)-1),i=new zt(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new zt(Math.floor(e)))}else e===0?i=new zt(Math.floor((t-1)/2)):r||(i=new zt(Math.floor(e)));var o=Math.floor((t-1)/2),s=UAe(HAe(function(l){return i.add(new zt(l-o).mul(n)).toNumber()}),iL);return s(0,t)}function fq(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new zt(0),tickMin:new zt(0),tickMax:new zt(0)};var a=cq(new zt(t).sub(e).div(r-1),n,i),o;e<=0&&t>=0?o=new zt(0):(o=new zt(e).add(t).div(2),o=o.sub(new zt(o).mod(a)));var s=Math.ceil(o.sub(e).div(a).toNumber()),l=Math.ceil(new zt(t).sub(o).div(a).toNumber()),u=s+l+1;return u>r?fq(e,t,r,n,i+1):(u<r&&(l=t>0?l+(r-u):l,s=t>0?s:s+(r-u)),{step:a,tickMin:o.sub(new zt(s).mul(a)),tickMax:o.add(new zt(l).mul(a))})}function a2e(e){var t=Wm(e,2),r=t[0],n=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),s=uq([r,n]),l=Wm(s,2),u=l[0],c=l[1];if(u===-1/0||c===1/0){var f=c===1/0?[u].concat(oL(iL(0,i-1).map(function(){return 1/0}))):[].concat(oL(iL(0,i-1).map(function(){return-1/0})),[c]);return r>n?aL(f):f}if(u===c)return i2e(u,i,a);var h=fq(u,c,o,a),d=h.step,v=h.tickMin,m=h.tickMax,y=pT.rangeStep(v,m.add(new zt(.1).mul(d)),d);return r>n?aL(y):y}function o2e(e,t){var r=Wm(e,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=uq([n,i]),s=Wm(o,2),l=s[0],u=s[1];if(l===-1/0||u===1/0)return[n,i];if(l===u)return[l];var c=Math.max(t,2),f=cq(new zt(u).sub(l).div(c-1),a,0),h=[].concat(oL(pT.rangeStep(new zt(l),new zt(u).sub(new zt(.99).mul(f)),f)),[u]);return n>i?aL(h):h}var s2e=sq(a2e),l2e=sq(o2e),u2e="Invariant failed";function uf(e,t){throw new Error(u2e)}var c2e=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Dd(e){"@babel/helpers - typeof";return Dd=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},Dd(e)}function M1(){return M1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},M1.apply(this,arguments)}function f2e(e,t){return p2e(e)||v2e(e,t)||d2e(e,t)||h2e()}function h2e(){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 d2e(e,t){if(e){if(typeof e=="string")return $4(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $4(e,t)}}function $4(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function v2e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function p2e(e){if(Array.isArray(e))return e}function g2e(e,t){if(e==null)return{};var r=m2e(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function m2e(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function y2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x2e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,vq(n.key),n)}}function _2e(e,t,r){return t&&x2e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function b2e(e,t,r){return t=P1(t),w2e(e,hq()?Reflect.construct(t,r||[],P1(e).constructor):t.apply(e,r))}function w2e(e,t){if(t&&(Dd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return S2e(e)}function S2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hq=function(){return!!e})()}function P1(e){return P1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},P1(e)}function T2e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lL(e,t)}function lL(e,t){return lL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},lL(e,t)}function dq(e,t,r){return t=vq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vq(e){var t=C2e(e,"string");return Dd(t)=="symbol"?t:t+""}function C2e(e,t){if(Dd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Dd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var a0=function(e){function t(){return y2e(this,t),b2e(this,t,arguments)}return T2e(t,e),_2e(t,[{key:"render",value:function(){var n=this.props,i=n.offset,a=n.layout,o=n.width,s=n.dataKey,l=n.data,u=n.dataPointFormatter,c=n.xAxis,f=n.yAxis,h=g2e(n,c2e),d=ft(h,!1);this.props.direction==="x"&&c.type!=="number"&&uf();var v=l.map(function(m){var y=u(m,s),x=y.x,_=y.y,b=y.value,S=y.errorVal;if(!S)return null;var T=[],C,A;if(Array.isArray(S)){var P=f2e(S,2);C=P[0],A=P[1]}else C=A=S;if(a==="vertical"){var I=c.scale,k=_+i,E=k+o,D=k-o,N=I(b-C),z=I(b+A);T.push({x1:z,y1:E,x2:z,y2:D}),T.push({x1:N,y1:k,x2:z,y2:k}),T.push({x1:N,y1:E,x2:N,y2:D})}else if(a==="horizontal"){var V=f.scale,F=x+i,$=F-o,B=F+o,H=V(b-C),U=V(b+A);T.push({x1:$,y1:U,x2:B,y2:U}),T.push({x1:F,y1:H,x2:F,y2:U}),T.push({x1:$,y1:H,x2:B,y2:H})}return ee.createElement(Xt,M1({className:"recharts-errorBar",key:"bar-".concat(T.map(function(Y){return"".concat(Y.x1,"-").concat(Y.x2,"-").concat(Y.y1,"-").concat(Y.y2)}))},d),T.map(function(Y){return ee.createElement("line",M1({},Y,{key:"line-".concat(Y.x1,"-").concat(Y.x2,"-").concat(Y.y1,"-").concat(Y.y2)}))}))});return ee.createElement(Xt,{className:"recharts-errorBars"},v)}}])}(ee.Component);dq(a0,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});dq(a0,"displayName","ErrorBar");function Hm(e){"@babel/helpers - typeof";return Hm=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},Hm(e)}function F4(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ru(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?F4(Object(r),!0).forEach(function(n){A2e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F4(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function A2e(e,t,r){return t=M2e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function M2e(e){var t=P2e(e,"string");return Hm(t)=="symbol"?t:t+""}function P2e(e,t){if(Hm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Hm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pq=function(t){var r=t.children,n=t.formattedGraphicalItems,i=t.legendWidth,a=t.legendContent,o=xi(r,sd);if(!o)return null;var s=sd.defaultProps,l=s!==void 0?Ru(Ru({},s),o.props):{},u;return o.props&&o.props.payload?u=o.props&&o.props.payload:a==="children"?u=(n||[]).reduce(function(c,f){var h=f.item,d=f.props,v=d.sectors||d.data||[];return c.concat(v.map(function(m){return{type:o.props.iconType||h.props.legendType,value:m.name,color:m.fill,payload:m}}))},[]):u=(n||[]).map(function(c){var f=c.item,h=f.type.defaultProps,d=h!==void 0?Ru(Ru({},h),f.props):{},v=d.dataKey,m=d.name,y=d.legendType,x=d.hide;return{inactive:x,dataKey:v,type:l.iconType||y||"square",color:uN(f),value:m||v,payload:d}}),Ru(Ru(Ru({},l),sd.getWithHeight(o,i)),{},{payload:u,item:o})};function Um(e){"@babel/helpers - typeof";return Um=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},Um(e)}function V4(e){return O2e(e)||I2e(e)||L2e(e)||k2e()}function k2e(){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 L2e(e,t){if(e){if(typeof e=="string")return uL(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return uL(e,t)}}function I2e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function O2e(e){if(Array.isArray(e))return uL(e)}function uL(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function G4(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function vr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?G4(Object(r),!0).forEach(function(n){ud(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):G4(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ud(e,t,r){return t=E2e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function E2e(e){var t=D2e(e,"string");return Um(t)=="symbol"?t:t+""}function D2e(e,t){if(Um(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Um(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Yn(e,t,r){return vt(e)||vt(t)?r:Ur(t)?sa(e,t,r):ht(t)?t(e):r}function Vg(e,t,r,n){var i=IAe(e,function(s){return Yn(s,t)});if(r==="number"){var a=i.filter(function(s){return Pe(s)||parseFloat(s)});return a.length?[dT(a),Ol(a)]:[1/0,-1/0]}var o=n?i.filter(function(s){return!vt(s)}):i;return o.map(function(s){return Ur(s)||s instanceof Date?s:""})}var N2e=function(t){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,s=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(s<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var l=a.range,u=0;u<s;u++){var c=u>0?i[u-1].coordinate:i[s-1].coordinate,f=i[u].coordinate,h=u>=s-1?i[0].coordinate:i[u+1].coordinate,d=void 0;if(za(f-c)!==za(h-f)){var v=[];if(za(h-f)===za(l[1]-l[0])){d=h;var m=f+l[1]-l[0];v[0]=Math.min(m,(m+c)/2),v[1]=Math.max(m,(m+c)/2)}else{d=c;var y=h+l[1]-l[0];v[0]=Math.min(f,(y+f)/2),v[1]=Math.max(f,(y+f)/2)}var x=[Math.min(f,(d+f)/2),Math.max(f,(d+f)/2)];if(t>x[0]&&t<=x[1]||t>=v[0]&&t<=v[1]){o=i[u].index;break}}else{var _=Math.min(c,h),b=Math.max(c,h);if(t>(_+f)/2&&t<=(b+f)/2){o=i[u].index;break}}}else for(var S=0;S<s;S++)if(S===0&&t<=(n[S].coordinate+n[S+1].coordinate)/2||S>0&&S<s-1&&t>(n[S].coordinate+n[S-1].coordinate)/2&&t<=(n[S].coordinate+n[S+1].coordinate)/2||S===s-1&&t>(n[S].coordinate+n[S-1].coordinate)/2){o=n[S].index;break}return o},uN=function(t){var r,n=t,i=n.type.displayName,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?vr(vr({},t.type.defaultProps),t.props):t.props,o=a.stroke,s=a.fill,l;switch(i){case"Line":l=o;break;case"Area":case"Radar":l=o&&o!=="none"?o:s;break;default:l=s;break}return l},j2e=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},s=Object.keys(a),l=0,u=s.length;l<u;l++)for(var c=a[s[l]].stackGroups,f=Object.keys(c),h=0,d=f.length;h<d;h++){var v=c[f[h]],m=v.items,y=v.cateAxisId,x=m.filter(function(A){return Ms(A.type).indexOf("Bar")>=0});if(x&&x.length){var _=x[0].type.defaultProps,b=_!==void 0?vr(vr({},_),x[0].props):x[0].props,S=b.barSize,T=b[y];o[T]||(o[T]=[]);var C=vt(S)?r:S;o[T].push({item:x[0],stackList:x.slice(1),barSize:vt(C)?void 0:sf(C,n,0)})}}return o},R2e=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,s=t.maxBarSize,l=o.length;if(l<1)return null;var u=sf(r,i,0,!0),c,f=[];if(o[0].barSize===+o[0].barSize){var h=!1,d=i/l,v=o.reduce(function(S,T){return S+T.barSize||0},0);v+=(l-1)*u,v>=i&&(v-=(l-1)*u,u=0),v>=i&&d>0&&(h=!0,d*=.9,v=l*d);var m=(i-v)/2>>0,y={offset:m-u,size:0};c=o.reduce(function(S,T){var C={item:T.item,position:{offset:y.offset+y.size+u,size:h?d:T.barSize}},A=[].concat(V4(S),[C]);return y=A[A.length-1].position,T.stackList&&T.stackList.length&&T.stackList.forEach(function(P){A.push({item:P,position:y})}),A},f)}else{var x=sf(n,i,0,!0);i-2*x-(l-1)*u<=0&&(u=0);var _=(i-2*x-(l-1)*u)/l;_>1&&(_>>=0);var b=s===+s?Math.min(_,s):_;c=o.reduce(function(S,T,C){var A=[].concat(V4(S),[{item:T.item,position:{offset:x+(_+u)*C+(_-b)/2,size:b}}]);return T.stackList&&T.stackList.length&&T.stackList.forEach(function(P){A.push({item:P,position:A[A.length-1].position})}),A},f)}return c},B2e=function(t,r,n,i){var a=n.children,o=n.width,s=n.margin,l=o-(s.left||0)-(s.right||0),u=pq({children:a,legendWidth:l});if(u){var c=i||{},f=c.width,h=c.height,d=u.align,v=u.verticalAlign,m=u.layout;if((m==="vertical"||m==="horizontal"&&v==="middle")&&d!=="center"&&Pe(t[d]))return vr(vr({},t),{},ud({},d,t[d]+(f||0)));if((m==="horizontal"||m==="vertical"&&d==="center")&&v!=="middle"&&Pe(t[v]))return vr(vr({},t),{},ud({},v,t[v]+(h||0)))}return t},z2e=function(t,r,n){return vt(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},gq=function(t,r,n,i,a){var o=r.props.children,s=la(o,a0).filter(function(u){return z2e(i,a,u.props.direction)});if(s&&s.length){var l=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,c){var f=Yn(c,n);if(vt(f))return u;var h=Array.isArray(f)?[dT(f),Ol(f)]:[f,f],d=l.reduce(function(v,m){var y=Yn(c,m,0),x=h[0]-Math.abs(Array.isArray(y)?y[0]:y),_=h[1]+Math.abs(Array.isArray(y)?y[1]:y);return[Math.min(x,v[0]),Math.max(_,v[1])]},[1/0,-1/0]);return[Math.min(d[0],u[0]),Math.max(d[1],u[1])]},[1/0,-1/0])}return null},$2e=function(t,r,n,i,a){var o=r.map(function(s){return gq(t,s,n,a,i)}).filter(function(s){return!vt(s)});return o&&o.length?o.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},mq=function(t,r,n,i,a){var o=r.map(function(l){var u=l.props.dataKey;return n==="number"&&u&&gq(t,l,u,i)||Vg(t,u,n,a)});if(n==="number")return o.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]);var s={};return o.reduce(function(l,u){for(var c=0,f=u.length;c<f;c++)s[u[c]]||(s[u[c]]=!0,l.push(u[c]));return l},[])},yq=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},Ic=function(t,r,n){if(!t)return null;var i=t.scale,a=t.duplicateDomain,o=t.type,s=t.range,l=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,u=(r||n)&&o==="category"&&i.bandwidth?i.bandwidth()/l:0;if(u=t.axisType==="angleAxis"&&(s==null?void 0:s.length)>=2?za(s[0]-s[1])*2*u:u,r&&(t.ticks||t.niceTicks)){var c=(t.ticks||t.niceTicks).map(function(f){var h=a?a.indexOf(f):f;return{coordinate:i(h)+u,value:f,offset:u}});return c.filter(function(f){return!Cv(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,h){return{coordinate:i(f)+u,value:f,index:h,offset:u}}):i.ticks&&!n?i.ticks(t.tickCount).map(function(f){return{coordinate:i(f)+u,value:f,offset:u}}):i.domain().map(function(f,h){return{coordinate:i(f)+u,value:a?a[f]:f,index:h,offset:u}})},zA=new WeakMap,_x=function(t,r){if(typeof r!="function")return t;zA.has(t)||zA.set(t,new WeakMap);var n=zA.get(t);if(n.has(r))return n.get(r);var i=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,i),i},F2e=function(t,r,n){var i=t.scale,a=t.type,o=t.layout,s=t.axisType;if(i==="auto")return o==="radial"&&s==="radiusAxis"?{scale:Bm(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:w1(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:Fg(),realScaleType:"point"}:a==="category"?{scale:Bm(),realScaleType:"band"}:{scale:w1(),realScaleType:"linear"};if(of(i)){var l="scale".concat(eT(i));return{scale:(j4[l]||Fg)(),realScaleType:j4[l]?l:"point"}}return ht(i)?{scale:i}:{scale:Fg(),realScaleType:"point"}},W4=1e-4,V2e=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,i=t.range(),a=Math.min(i[0],i[1])-W4,o=Math.max(i[0],i[1])+W4,s=t(r[0]),l=t(r[n-1]);(s<a||s>o||l<a||l>o)&&t.domain([r[0],r[n-1]])}},G2e=function(t,r){if(!t)return null;for(var n=0,i=t.length;n<i;n++)if(t[n].item===r)return t[n].position;return null},W2e=function(t,r){if(!r||r.length!==2||!Pe(r[0])||!Pe(r[1]))return t;var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]),a=[t[0],t[1]];return(!Pe(t[0])||t[0]<n)&&(a[0]=n),(!Pe(t[1])||t[1]>i)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]<n&&(a[1]=n),a},H2e=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n<i;++n)for(var a=0,o=0,s=0;s<r;++s){var l=Cv(t[s][n][1])?t[s][n][0]:t[s][n][1];l>=0?(t[s][n][0]=a,t[s][n][1]=a+l,a=t[s][n][1]):(t[s][n][0]=o,t[s][n][1]=o+l,o=t[s][n][1])}},U2e=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n<i;++n)for(var a=0,o=0;o<r;++o){var s=Cv(t[o][n][1])?t[o][n][0]:t[o][n][1];s>=0?(t[o][n][0]=a,t[o][n][1]=a+s,a=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},Z2e={sign:H2e,expand:sge,none:Cd,silhouette:lge,wiggle:uge,positive:U2e},Y2e=function(t,r,n){var i=r.map(function(s){return s.props.dataKey}),a=Z2e[n],o=oge().keys(i).value(function(s,l){return+Yn(s,l,0)}).order(Dk).offset(a);return o(t)},X2e=function(t,r,n,i,a,o){if(!t)return null;var s=o?r.reverse():r,l={},u=s.reduce(function(f,h){var d,v=(d=h.type)!==null&&d!==void 0&&d.defaultProps?vr(vr({},h.type.defaultProps),h.props):h.props,m=v.stackId,y=v.hide;if(y)return f;var x=v[n],_=f[x]||{hasStack:!1,stackGroups:{}};if(Ur(m)){var b=_.stackGroups[m]||{numericAxisId:n,cateAxisId:i,items:[]};b.items.push(h),_.hasStack=!0,_.stackGroups[m]=b}else _.stackGroups[Av("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[h]};return vr(vr({},f),{},ud({},x,_))},l),c={};return Object.keys(u).reduce(function(f,h){var d=u[h];if(d.hasStack){var v={};d.stackGroups=Object.keys(d.stackGroups).reduce(function(m,y){var x=d.stackGroups[y];return vr(vr({},m),{},ud({},y,{numericAxisId:n,cateAxisId:i,items:x.items,stackedData:Y2e(t,x.items,a)}))},v)}return vr(vr({},f),{},ud({},h,d))},c)},q2e=function(t,r){var n=r.realScaleType,i=r.type,a=r.tickCount,o=r.originalDomain,s=r.allowDecimals,l=n||r.scale;if(l!=="auto"&&l!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var u=t.domain();if(!u.length)return null;var c=s2e(u,a,s);return t.domain([dT(c),Ol(c)]),{niceTicks:c}}if(a&&i==="number"){var f=t.domain(),h=l2e(f,a,s);return{niceTicks:h}}return null};function k1(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!vt(i[t.dataKey])){var s=Jb(r,"value",i[t.dataKey]);if(s)return s.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var l=Yn(i,vt(o)?t.dataKey:o);return vt(l)?null:t.scale(l)}var H4=function(t){var r=t.axis,n=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,s=t.index;if(r.type==="category")return n[s]?n[s].coordinate+i:null;var l=Yn(o,r.dataKey,r.domain[s]);return vt(l)?null:r.scale(l)-a/2+i},K2e=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return i<=0&&a>=0?0:a<0?a:i}return n[0]},J2e=function(t,r){var n,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?vr(vr({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(Ur(a)){var o=r[a];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},Q2e=function(t){return t.reduce(function(r,n){return[dT(n.concat([r[0]]).filter(Pe)),Ol(n.concat([r[1]]).filter(Pe))]},[1/0,-1/0])},xq=function(t,r,n){return Object.keys(t).reduce(function(i,a){var o=t[a],s=o.stackedData,l=s.reduce(function(u,c){var f=Q2e(c.slice(r,n+1));return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);return[Math.min(l[0],i[0]),Math.max(l[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},U4=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Z4=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,cL=function(t,r,n){if(ht(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(Pe(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(U4.test(t[0])){var a=+U4.exec(t[0])[1];i[0]=r[0]-a}else ht(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(Pe(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(Z4.test(t[1])){var o=+Z4.exec(t[1])[1];i[1]=r[1]+o}else ht(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},L1=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!n||i>0)return i}if(t&&r&&r.length>=2){for(var a=RD(r,function(f){return f.coordinate}),o=1/0,s=1,l=a.length;s<l;s++){var u=a[s],c=a[s-1];o=Math.min((u.coordinate||0)-(c.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0},Y4=function(t,r,n){return!t||!t.length||Ed(t,sa(n,"type.defaultProps.domain"))?r:t},_q=function(t,r){var n=t.type.defaultProps?vr(vr({},t.type.defaultProps),t.props):t.props,i=n.dataKey,a=n.name,o=n.unit,s=n.formatter,l=n.tooltipType,u=n.chartType,c=n.hide;return vr(vr({},ft(t,!1)),{},{dataKey:i,unit:o,formatter:s,name:a||i,color:uN(t),value:Yn(r,i),type:l,payload:r,chartType:u,hide:c})};function Zm(e){"@babel/helpers - typeof";return Zm=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},Zm(e)}function X4(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function q4(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?X4(Object(r),!0).forEach(function(n){eMe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X4(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function eMe(e,t,r){return t=tMe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tMe(e){var t=rMe(e,"string");return Zm(t)=="symbol"?t:t+""}function rMe(e,t){if(Zm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Zm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var I1=Math.PI/180,nMe=function(t){return t*180/Math.PI},mn=function(t,r,n,i){return{x:t+Math.cos(-I1*i)*n,y:r+Math.sin(-I1*i)*n}},iMe=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return Math.sqrt(Math.pow(n-a,2)+Math.pow(i-o,2))},aMe=function(t,r){var n=t.x,i=t.y,a=r.cx,o=r.cy,s=iMe({x:n,y:i},{x:a,y:o});if(s<=0)return{radius:s};var l=(n-a)/s,u=Math.acos(l);return i>o&&(u=2*Math.PI-u),{radius:s,angle:nMe(u),angleInRadian:u}},oMe=function(t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),a=Math.floor(n/360),o=Math.min(i,a);return{startAngle:r-o*360,endAngle:n-o*360}},sMe=function(t,r){var n=r.startAngle,i=r.endAngle,a=Math.floor(n/360),o=Math.floor(i/360),s=Math.min(a,o);return t+s*360},K4=function(t,r){var n=t.x,i=t.y,a=aMe({x:n,y:i},r),o=a.radius,s=a.angle,l=r.innerRadius,u=r.outerRadius;if(o<l||o>u)return!1;if(o===0)return!0;var c=oMe(r),f=c.startAngle,h=c.endAngle,d=s,v;if(f<=h){for(;d>h;)d-=360;for(;d<f;)d+=360;v=d>=f&&d<=h}else{for(;d>f;)d-=360;for(;d<h;)d+=360;v=d>=h&&d<=f}return v?q4(q4({},r),{},{radius:o,angle:sMe(d,r)}):null};function Ym(e){"@babel/helpers - typeof";return Ym=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},Ym(e)}var lMe=["offset"];function uMe(e){return dMe(e)||hMe(e)||fMe(e)||cMe()}function cMe(){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 fMe(e,t){if(e){if(typeof e=="string")return fL(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return fL(e,t)}}function hMe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function dMe(e){if(Array.isArray(e))return fL(e)}function fL(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function vMe(e,t){if(e==null)return{};var r=pMe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function pMe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function J4(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Vr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?J4(Object(r),!0).forEach(function(n){gMe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):J4(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gMe(e,t,r){return t=mMe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mMe(e){var t=yMe(e,"string");return Ym(t)=="symbol"?t:t+""}function yMe(e,t){if(Ym(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ym(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xm(){return Xm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xm.apply(this,arguments)}var xMe=function(t){var r=t.value,n=t.formatter,i=vt(t.children)?r:t.children;return ht(n)?n(i):i},_Me=function(t,r){var n=za(r-t),i=Math.min(Math.abs(r-t),360);return n*i},bMe=function(t,r,n){var i=t.position,a=t.viewBox,o=t.offset,s=t.className,l=a,u=l.cx,c=l.cy,f=l.innerRadius,h=l.outerRadius,d=l.startAngle,v=l.endAngle,m=l.clockWise,y=(f+h)/2,x=_Me(d,v),_=x>=0?1:-1,b,S;i==="insideStart"?(b=d+_*o,S=m):i==="insideEnd"?(b=v-_*o,S=!m):i==="end"&&(b=v+_*o,S=m),S=x<=0?S:!S;var T=mn(u,c,y,b),C=mn(u,c,y,b+(S?1:-1)*359),A="M".concat(T.x,",").concat(T.y,`
A`).concat(y,",").concat(y,",0,1,").concat(S?0:1,`,
`).concat(C.x,",").concat(C.y),P=vt(t.id)?Av("recharts-radial-line-"):t.id;return ee.createElement("text",Xm({},n,{dominantBaseline:"central",className:_t("recharts-radial-bar-label",s)}),ee.createElement("defs",null,ee.createElement("path",{id:P,d:A})),ee.createElement("textPath",{xlinkHref:"#".concat(P)},r))},wMe=function(t){var r=t.viewBox,n=t.offset,i=t.position,a=r,o=a.cx,s=a.cy,l=a.innerRadius,u=a.outerRadius,c=a.startAngle,f=a.endAngle,h=(c+f)/2;if(i==="outside"){var d=mn(o,s,u+n,h),v=d.x,m=d.y;return{x:v,y:m,textAnchor:v>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var y=(l+u)/2,x=mn(o,s,y,h),_=x.x,b=x.y;return{x:_,y:b,textAnchor:"middle",verticalAnchor:"middle"}},SMe=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,a=t.position,o=r,s=o.x,l=o.y,u=o.width,c=o.height,f=c>=0?1:-1,h=f*i,d=f>0?"end":"start",v=f>0?"start":"end",m=u>=0?1:-1,y=m*i,x=m>0?"end":"start",_=m>0?"start":"end";if(a==="top"){var b={x:s+u/2,y:l-f*i,textAnchor:"middle",verticalAnchor:d};return Vr(Vr({},b),n?{height:Math.max(l-n.y,0),width:u}:{})}if(a==="bottom"){var S={x:s+u/2,y:l+c+h,textAnchor:"middle",verticalAnchor:v};return Vr(Vr({},S),n?{height:Math.max(n.y+n.height-(l+c),0),width:u}:{})}if(a==="left"){var T={x:s-y,y:l+c/2,textAnchor:x,verticalAnchor:"middle"};return Vr(Vr({},T),n?{width:Math.max(T.x-n.x,0),height:c}:{})}if(a==="right"){var C={x:s+u+y,y:l+c/2,textAnchor:_,verticalAnchor:"middle"};return Vr(Vr({},C),n?{width:Math.max(n.x+n.width-C.x,0),height:c}:{})}var A=n?{width:u,height:c}:{};return a==="insideLeft"?Vr({x:s+y,y:l+c/2,textAnchor:_,verticalAnchor:"middle"},A):a==="insideRight"?Vr({x:s+u-y,y:l+c/2,textAnchor:x,verticalAnchor:"middle"},A):a==="insideTop"?Vr({x:s+u/2,y:l+h,textAnchor:"middle",verticalAnchor:v},A):a==="insideBottom"?Vr({x:s+u/2,y:l+c-h,textAnchor:"middle",verticalAnchor:d},A):a==="insideTopLeft"?Vr({x:s+y,y:l+h,textAnchor:_,verticalAnchor:v},A):a==="insideTopRight"?Vr({x:s+u-y,y:l+h,textAnchor:x,verticalAnchor:v},A):a==="insideBottomLeft"?Vr({x:s+y,y:l+c-h,textAnchor:_,verticalAnchor:d},A):a==="insideBottomRight"?Vr({x:s+u-y,y:l+c-h,textAnchor:x,verticalAnchor:d},A):bv(a)&&(Pe(a.x)||Pc(a.x))&&(Pe(a.y)||Pc(a.y))?Vr({x:s+sf(a.x,u),y:l+sf(a.y,c),textAnchor:"end",verticalAnchor:"end"},A):Vr({x:s+u/2,y:l+c/2,textAnchor:"middle",verticalAnchor:"middle"},A)},TMe=function(t){return"cx"in t&&Pe(t.cx)};function Dn(e){var t=e.offset,r=t===void 0?5:t,n=vMe(e,lMe),i=Vr({offset:r},n),a=i.viewBox,o=i.position,s=i.value,l=i.children,u=i.content,c=i.className,f=c===void 0?"":c,h=i.textBreakAll;if(!a||vt(s)&&vt(l)&&!G.isValidElement(u)&&!ht(u))return null;if(G.isValidElement(u))return G.cloneElement(u,i);var d;if(ht(u)){if(d=G.createElement(u,i),G.isValidElement(d))return d}else d=xMe(i);var v=TMe(a),m=ft(i,!0);if(v&&(o==="insideStart"||o==="insideEnd"||o==="end"))return bMe(i,d,m);var y=v?wMe(i):SMe(i);return ee.createElement(v1,Xm({className:_t("recharts-label",f)},m,y,{breakAll:h}),d)}Dn.displayName="Label";var bq=function(t){var r=t.cx,n=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,s=t.r,l=t.radius,u=t.innerRadius,c=t.outerRadius,f=t.x,h=t.y,d=t.top,v=t.left,m=t.width,y=t.height,x=t.clockWise,_=t.labelViewBox;if(_)return _;if(Pe(m)&&Pe(y)){if(Pe(f)&&Pe(h))return{x:f,y:h,width:m,height:y};if(Pe(d)&&Pe(v))return{x:d,y:v,width:m,height:y}}return Pe(f)&&Pe(h)?{x:f,y:h,width:0,height:0}:Pe(r)&&Pe(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:o||i||0,innerRadius:u||0,outerRadius:c||l||s||0,clockWise:x}:t.viewBox?t.viewBox:{}},CMe=function(t,r){return t?t===!0?ee.createElement(Dn,{key:"label-implicit",viewBox:r}):Ur(t)?ee.createElement(Dn,{key:"label-implicit",viewBox:r,value:t}):G.isValidElement(t)?t.type===Dn?G.cloneElement(t,{key:"label-implicit",viewBox:r}):ee.createElement(Dn,{key:"label-implicit",content:t,viewBox:r}):ht(t)?ee.createElement(Dn,{key:"label-implicit",content:t,viewBox:r}):bv(t)?ee.createElement(Dn,Xm({viewBox:r},t,{key:"label-implicit"})):null:null},AMe=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var i=t.children,a=bq(t),o=la(i,Dn).map(function(l,u){return G.cloneElement(l,{viewBox:r||a,key:"label-".concat(u)})});if(!n)return o;var s=CMe(t.label,r||a);return[s].concat(uMe(o))};Dn.parseViewBox=bq;Dn.renderCallByParent=AMe;function MMe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var PMe=MMe;const kMe=Ft(PMe);function qm(e){"@babel/helpers - typeof";return qm=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},qm(e)}var LMe=["valueAccessor"],IMe=["data","dataKey","clockWise","id","textBreakAll"];function OMe(e){return jMe(e)||NMe(e)||DMe(e)||EMe()}function EMe(){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 DMe(e,t){if(e){if(typeof e=="string")return hL(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return hL(e,t)}}function NMe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jMe(e){if(Array.isArray(e))return hL(e)}function hL(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function O1(){return O1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},O1.apply(this,arguments)}function Q4(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function e$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Q4(Object(r),!0).forEach(function(n){RMe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Q4(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function RMe(e,t,r){return t=BMe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BMe(e){var t=zMe(e,"string");return qm(t)=="symbol"?t:t+""}function zMe(e,t){if(qm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(qm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function t$(e,t){if(e==null)return{};var r=$Me(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function $Me(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var FMe=function(t){return Array.isArray(t.value)?kMe(t.value):t.value};function ks(e){var t=e.valueAccessor,r=t===void 0?FMe:t,n=t$(e,LMe),i=n.data,a=n.dataKey,o=n.clockWise,s=n.id,l=n.textBreakAll,u=t$(n,IMe);return!i||!i.length?null:ee.createElement(Xt,{className:"recharts-label-list"},i.map(function(c,f){var h=vt(a)?r(c,f):Yn(c&&c.payload,a),d=vt(s)?{}:{id:"".concat(s,"-").concat(f)};return ee.createElement(Dn,O1({},ft(c,!0),u,d,{parentViewBox:c.parentViewBox,value:h,textBreakAll:l,viewBox:Dn.parseViewBox(vt(o)?c:e$(e$({},c),{},{clockWise:o})),key:"label-".concat(f),index:f}))}))}ks.displayName="LabelList";function VMe(e,t){return e?e===!0?ee.createElement(ks,{key:"labelList-implicit",data:t}):ee.isValidElement(e)||ht(e)?ee.createElement(ks,{key:"labelList-implicit",data:t,content:e}):bv(e)?ee.createElement(ks,O1({data:t},e,{key:"labelList-implicit"})):null:null}function GMe(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,i=la(n,ks).map(function(o,s){return G.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!r)return i;var a=VMe(e.label,t);return[a].concat(OMe(i))}ks.renderCallByParent=GMe;function Km(e){"@babel/helpers - typeof";return Km=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},Km(e)}function dL(){return dL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},dL.apply(this,arguments)}function r$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function n$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?r$(Object(r),!0).forEach(function(n){WMe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):r$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function WMe(e,t,r){return t=HMe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function HMe(e){var t=UMe(e,"string");return Km(t)=="symbol"?t:t+""}function UMe(e,t){if(Km(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Km(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ZMe=function(t,r){var n=za(r-t),i=Math.min(Math.abs(r-t),359.999);return n*i},bx=function(t){var r=t.cx,n=t.cy,i=t.radius,a=t.angle,o=t.sign,s=t.isExternal,l=t.cornerRadius,u=t.cornerIsExternal,c=l*(s?1:-1)+i,f=Math.asin(l/c)/I1,h=u?a:a+o*f,d=mn(r,n,c,h),v=mn(r,n,i,h),m=u?a-o*f:a,y=mn(r,n,c*Math.cos(f*I1),m);return{center:d,circleTangency:v,lineTangency:y,theta:f}},wq=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.startAngle,s=t.endAngle,l=ZMe(o,s),u=o+l,c=mn(r,n,a,o),f=mn(r,n,a,u),h="M ".concat(c.x,",").concat(c.y,`
A `).concat(a,",").concat(a,`,0,
`).concat(+(Math.abs(l)>180),",").concat(+(o>u),`,
`).concat(f.x,",").concat(f.y,`
`);if(i>0){var d=mn(r,n,i,o),v=mn(r,n,i,u);h+="L ".concat(v.x,",").concat(v.y,`
A `).concat(i,",").concat(i,`,0,
`).concat(+(Math.abs(l)>180),",").concat(+(o<=u),`,
`).concat(d.x,",").concat(d.y," Z")}else h+="L ".concat(r,",").concat(n," Z");return h},YMe=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,c=t.endAngle,f=za(c-u),h=bx({cx:r,cy:n,radius:a,angle:u,sign:f,cornerRadius:o,cornerIsExternal:l}),d=h.circleTangency,v=h.lineTangency,m=h.theta,y=bx({cx:r,cy:n,radius:a,angle:c,sign:-f,cornerRadius:o,cornerIsExternal:l}),x=y.circleTangency,_=y.lineTangency,b=y.theta,S=l?Math.abs(u-c):Math.abs(u-c)-m-b;if(S<0)return s?"M ".concat(v.x,",").concat(v.y,`
a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
`):wq({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:u,endAngle:c});var T="M ".concat(v.x,",").concat(v.y,`
A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(d.x,",").concat(d.y,`
A`).concat(a,",").concat(a,",0,").concat(+(S>180),",").concat(+(f<0),",").concat(x.x,",").concat(x.y,`
A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(_.x,",").concat(_.y,`
`);if(i>0){var C=bx({cx:r,cy:n,radius:i,angle:u,sign:f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),A=C.circleTangency,P=C.lineTangency,I=C.theta,k=bx({cx:r,cy:n,radius:i,angle:c,sign:-f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),E=k.circleTangency,D=k.lineTangency,N=k.theta,z=l?Math.abs(u-c):Math.abs(u-c)-I-N;if(z<0&&o===0)return"".concat(T,"L").concat(r,",").concat(n,"Z");T+="L".concat(D.x,",").concat(D.y,`
A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(E.x,",").concat(E.y,`
A`).concat(i,",").concat(i,",0,").concat(+(z>180),",").concat(+(f>0),",").concat(A.x,",").concat(A.y,`
A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(P.x,",").concat(P.y,"Z")}else T+="L".concat(r,",").concat(n,"Z");return T},XMe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Sq=function(t){var r=n$(n$({},XMe),t),n=r.cx,i=r.cy,a=r.innerRadius,o=r.outerRadius,s=r.cornerRadius,l=r.forceCornerRadius,u=r.cornerIsExternal,c=r.startAngle,f=r.endAngle,h=r.className;if(o<a||c===f)return null;var d=_t("recharts-sector",h),v=o-a,m=sf(s,v,0,!0),y;return m>0&&Math.abs(c-f)<360?y=YMe({cx:n,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(m,v/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:c,endAngle:f}):y=wq({cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:c,endAngle:f}),ee.createElement("path",dL({},ft(r,!0),{className:d,d:y,role:"img"}))};function Jm(e){"@babel/helpers - typeof";return Jm=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},Jm(e)}function vL(){return vL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vL.apply(this,arguments)}function i$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function a$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?i$(Object(r),!0).forEach(function(n){qMe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qMe(e,t,r){return t=KMe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KMe(e){var t=JMe(e,"string");return Jm(t)=="symbol"?t:t+""}function JMe(e,t){if(Jm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Jm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var o$={curveBasisClosed:Xpe,curveBasisOpen:qpe,curveBasis:Ype,curveBumpX:Dpe,curveBumpY:Npe,curveLinearClosed:Kpe,curveLinear:rT,curveMonotoneX:Jpe,curveMonotoneY:Qpe,curveNatural:ege,curveStep:tge,curveStepAfter:nge,curveStepBefore:rge},Sx=function(t){return t.x===+t.x&&t.y===+t.y},Lp=function(t){return t.x},Ip=function(t){return t.y},QMe=function(t,r){if(ht(t))return t;var n="curve".concat(eT(t));return(n==="curveMonotone"||n==="curveBump")&&r?o$["".concat(n).concat(r==="vertical"?"Y":"X")]:o$[n]||rT},ePe=function(t){var r=t.type,n=r===void 0?"linear":r,i=t.points,a=i===void 0?[]:i,o=t.baseLine,s=t.layout,l=t.connectNulls,u=l===void 0?!1:l,c=QMe(n,s),f=u?a.filter(function(m){return Sx(m)}):a,h;if(Array.isArray(o)){var d=u?o.filter(function(m){return Sx(m)}):o,v=f.map(function(m,y){return a$(a$({},m),{},{base:d[y]})});return s==="vertical"?h=hx().y(Ip).x1(Lp).x0(function(m){return m.base.x}):h=hx().x(Lp).y1(Ip).y0(function(m){return m.base.y}),h.defined(Sx).curve(c),h(v)}return s==="vertical"&&Pe(o)?h=hx().y(Ip).x1(Lp).x0(o):Pe(o)?h=hx().x(Lp).y1(Ip).y0(o):h=CY().x(Lp).y(Ip),h.defined(Sx).curve(c),h(f)},cd=function(t){var r=t.className,n=t.points,i=t.path,a=t.pathRef;if((!n||!n.length)&&!i)return null;var o=n&&n.length?ePe(t):i;return G.createElement("path",vL({},ft(t,!1),Qb(t),{className:_t("recharts-curve",r),d:o,ref:a}))},Tq={exports:{}},tPe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",rPe=tPe,nPe=rPe;function Cq(){}function Aq(){}Aq.resetWarningCache=Cq;var iPe=function(){function e(n,i,a,o,s,l){if(l!==nPe){var u=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 u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Aq,resetWarningCache:Cq};return r.PropTypes=r,r};Tq.exports=iPe();var aPe=Tq.exports;const Ot=Ft(aPe),{getOwnPropertyNames:oPe,getOwnPropertySymbols:sPe}=Object,{hasOwnProperty:lPe}=Object.prototype;function $A(e,t){return function(n,i,a){return e(n,i,a)&&t(n,i,a)}}function Tx(e){return function(r,n,i){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,i);const{cache:a}=i,o=a.get(r),s=a.get(n);if(o&&s)return o===n&&s===r;a.set(r,n),a.set(n,r);const l=e(r,n,i);return a.delete(r),a.delete(n),l}}function uPe(e){return e!=null?e[Symbol.toStringTag]:void 0}function s$(e){return oPe(e).concat(sPe(e))}const cPe=Object.hasOwn||((e,t)=>lPe.call(e,t));function kf(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const fPe="__v",hPe="__o",dPe="_owner",{getOwnPropertyDescriptor:l$,keys:u$}=Object;function vPe(e,t){return e.byteLength===t.byteLength&&E1(new Uint8Array(e),new Uint8Array(t))}function pPe(e,t,r){let n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function gPe(e,t){return e.byteLength===t.byteLength&&E1(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function mPe(e,t){return kf(e.getTime(),t.getTime())}function yPe(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function xPe(e,t){return e===t}function c$(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),a=e.entries();let o,s,l=0;for(;(o=a.next())&&!o.done;){const u=t.entries();let c=!1,f=0;for(;(s=u.next())&&!s.done;){if(i[f]){f++;continue}const h=o.value,d=s.value;if(r.equals(h[0],d[0],l,f,e,t,r)&&r.equals(h[1],d[1],h[0],d[0],e,t,r)){c=i[f]=!0;break}f++}if(!c)return!1;l++}return!0}const _Pe=kf;function bPe(e,t,r){const n=u$(e);let i=n.length;if(u$(t).length!==i)return!1;for(;i-- >0;)if(!Mq(e,t,r,n[i]))return!1;return!0}function Op(e,t,r){const n=s$(e);let i=n.length;if(s$(t).length!==i)return!1;let a,o,s;for(;i-- >0;)if(a=n[i],!Mq(e,t,r,a)||(o=l$(e,a),s=l$(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function wPe(e,t){return kf(e.valueOf(),t.valueOf())}function SPe(e,t){return e.source===t.source&&e.flags===t.flags}function f$(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),a=e.values();let o,s;for(;(o=a.next())&&!o.done;){const l=t.values();let u=!1,c=0;for(;(s=l.next())&&!s.done;){if(!i[c]&&r.equals(o.value,s.value,o.value,s.value,e,t,r)){u=i[c]=!0;break}c++}if(!u)return!1}return!0}function E1(e,t){let r=e.byteLength;if(t.byteLength!==r||e.byteOffset!==t.byteOffset)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function TPe(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function Mq(e,t,r,n){return(n===dPe||n===hPe||n===fPe)&&(e.$$typeof||t.$$typeof)?!0:cPe(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}const CPe="[object ArrayBuffer]",APe="[object Arguments]",MPe="[object Boolean]",PPe="[object DataView]",kPe="[object Date]",LPe="[object Error]",IPe="[object Map]",OPe="[object Number]",EPe="[object Object]",DPe="[object RegExp]",NPe="[object Set]",jPe="[object String]",RPe={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},BPe="[object URL]",zPe=Object.prototype.toString;function $Pe({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:l,arePrimitiveWrappersEqual:u,areRegExpsEqual:c,areSetsEqual:f,areTypedArraysEqual:h,areUrlsEqual:d,unknownTagComparators:v}){return function(y,x,_){if(y===x)return!0;if(y==null||x==null)return!1;const b=typeof y;if(b!==typeof x)return!1;if(b!=="object")return b==="number"?s(y,x,_):b==="function"?a(y,x,_):!1;const S=y.constructor;if(S!==x.constructor)return!1;if(S===Object)return l(y,x,_);if(Array.isArray(y))return t(y,x,_);if(S===Date)return n(y,x,_);if(S===RegExp)return c(y,x,_);if(S===Map)return o(y,x,_);if(S===Set)return f(y,x,_);const T=zPe.call(y);if(T===kPe)return n(y,x,_);if(T===DPe)return c(y,x,_);if(T===IPe)return o(y,x,_);if(T===NPe)return f(y,x,_);if(T===EPe)return typeof y.then!="function"&&typeof x.then!="function"&&l(y,x,_);if(T===BPe)return d(y,x,_);if(T===LPe)return i(y,x,_);if(T===APe)return l(y,x,_);if(RPe[T])return h(y,x,_);if(T===CPe)return e(y,x,_);if(T===PPe)return r(y,x,_);if(T===MPe||T===OPe||T===jPe)return u(y,x,_);if(v){let C=v[T];if(!C){const A=uPe(y);A&&(C=v[A])}if(C)return C(y,x,_)}return!1}}function FPe({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:vPe,areArraysEqual:r?Op:pPe,areDataViewsEqual:gPe,areDatesEqual:mPe,areErrorsEqual:yPe,areFunctionsEqual:xPe,areMapsEqual:r?$A(c$,Op):c$,areNumbersEqual:_Pe,areObjectsEqual:r?Op:bPe,arePrimitiveWrappersEqual:wPe,areRegExpsEqual:SPe,areSetsEqual:r?$A(f$,Op):f$,areTypedArraysEqual:r?$A(E1,Op):E1,areUrlsEqual:TPe,unknownTagComparators:void 0};if(t&&(n=Object.assign({},n,t(n))),e){const i=Tx(n.areArraysEqual),a=Tx(n.areMapsEqual),o=Tx(n.areObjectsEqual),s=Tx(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:s})}return n}function VPe(e){return function(t,r,n,i,a,o,s){return e(t,r,s)}}function GPe({circular:e,comparator:t,createState:r,equals:n,strict:i}){if(r)return function(s,l){const{cache:u=e?new WeakMap:void 0,meta:c}=r();return t(s,l,{cache:u,equals:n,meta:c,strict:i})};if(e)return function(s,l){return t(s,l,{cache:new WeakMap,equals:n,meta:void 0,strict:i})};const a={cache:void 0,equals:n,meta:void 0,strict:i};return function(s,l){return t(s,l,a)}}const WPe=Tu();Tu({strict:!0});Tu({circular:!0});Tu({circular:!0,strict:!0});Tu({createInternalComparator:()=>kf});Tu({strict:!0,createInternalComparator:()=>kf});Tu({circular:!0,createInternalComparator:()=>kf});Tu({circular:!0,createInternalComparator:()=>kf,strict:!0});function Tu(e={}){const{circular:t=!1,createInternalComparator:r,createState:n,strict:i=!1}=e,a=FPe(e),o=$Pe(a),s=r?r(o):VPe(o);return GPe({circular:t,comparator:o,createState:n,equals:s,strict:i})}function HPe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function h$(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(a){r<0&&(r=a),a-r>t?(e(a),r=-1):HPe(i)};requestAnimationFrame(n)}function pL(e){"@babel/helpers - typeof";return pL=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},pL(e)}function UPe(e){return qPe(e)||XPe(e)||YPe(e)||ZPe()}function ZPe(){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 YPe(e,t){if(e){if(typeof e=="string")return d$(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d$(e,t)}}function d$(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function XPe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function qPe(e){if(Array.isArray(e))return e}function KPe(){var e={},t=function(){return null},r=!1,n=function i(a){if(!r){if(Array.isArray(a)){if(!a.length)return;var o=a,s=UPe(o),l=s[0],u=s.slice(1);if(typeof l=="number"){h$(i.bind(null,u),l);return}i(l),h$(i.bind(null,u));return}pL(a)==="object"&&(e=a,t(e)),typeof a=="function"&&a()}};return{stop:function(){r=!0},start:function(a){r=!1,n(a)},subscribe:function(a){return t=a,function(){t=function(){return null}}}}}function Qm(e){"@babel/helpers - typeof";return Qm=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},Qm(e)}function v$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function p$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?v$(Object(r),!0).forEach(function(n){Pq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Pq(e,t,r){return t=JPe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function JPe(e){var t=QPe(e,"string");return Qm(t)==="symbol"?t:String(t)}function QPe(e,t){if(Qm(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Qm(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var eke=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,i){return n.filter(function(a){return i.includes(a)})})},tke=function(t){return t},rke=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},Gg=function(t,r){return Object.keys(r).reduce(function(n,i){return p$(p$({},n),{},Pq({},i,t(i,r[i])))},{})},g$=function(t,r,n){return t.map(function(i){return"".concat(rke(i)," ").concat(r,"ms ").concat(n)}).join(",")};function nke(e,t){return oke(e)||ake(e,t)||kq(e,t)||ike()}function ike(){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 ake(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function oke(e){if(Array.isArray(e))return e}function ske(e){return cke(e)||uke(e)||kq(e)||lke()}function lke(){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 kq(e,t){if(e){if(typeof e=="string")return gL(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return gL(e,t)}}function uke(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cke(e){if(Array.isArray(e))return gL(e)}function gL(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var D1=1e-4,Lq=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},Iq=function(t,r){return t.map(function(n,i){return n*Math.pow(r,i)}).reduce(function(n,i){return n+i})},m$=function(t,r){return function(n){var i=Lq(t,r);return Iq(i,n)}},fke=function(t,r){return function(n){var i=Lq(t,r),a=[].concat(ske(i.map(function(o,s){return o*s}).slice(1)),[0]);return Iq(a,n)}},y$=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r[0],a=r[1],o=r[2],s=r[3];if(r.length===1)switch(r[0]){case"linear":i=0,a=0,o=1,s=1;break;case"ease":i=.25,a=.1,o=.25,s=1;break;case"ease-in":i=.42,a=0,o=1,s=1;break;case"ease-out":i=.42,a=0,o=.58,s=1;break;case"ease-in-out":i=0,a=0,o=.58,s=1;break;default:{var l=r[0].split("(");if(l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4){var u=l[1].split(")")[0].split(",").map(function(y){return parseFloat(y)}),c=nke(u,4);i=c[0],a=c[1],o=c[2],s=c[3]}}}var f=m$(i,o),h=m$(a,s),d=fke(i,o),v=function(x){return x>1?1:x<0?0:x},m=function(x){for(var _=x>1?1:x,b=_,S=0;S<8;++S){var T=f(b)-_,C=d(b);if(Math.abs(T-_)<D1||C<D1)return h(b);b=v(b-T/C)}return h(b)};return m.isStepper=!1,m},hke=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,a=i===void 0?8:i,o=t.dt,s=o===void 0?17:o,l=function(c,f,h){var d=-(c-f)*n,v=h*a,m=h+(d-v)*s/1e3,y=h*s/1e3+c;return Math.abs(y-f)<D1&&Math.abs(m)<D1?[f,0]:[y,m]};return l.isStepper=!0,l.dt=s,l},dke=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return y$(i);case"spring":return hke();default:if(i.split("(")[0]==="cubic-bezier")return y$(i)}return typeof i=="function"?i:null};function ey(e){"@babel/helpers - typeof";return ey=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},ey(e)}function x$(e){return gke(e)||pke(e)||Oq(e)||vke()}function vke(){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 pke(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gke(e){if(Array.isArray(e))return yL(e)}function _$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function hn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_$(Object(r),!0).forEach(function(n){mL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mL(e,t,r){return t=mke(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mke(e){var t=yke(e,"string");return ey(t)==="symbol"?t:String(t)}function yke(e,t){if(ey(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ey(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xke(e,t){return wke(e)||bke(e,t)||Oq(e,t)||_ke()}function _ke(){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 Oq(e,t){if(e){if(typeof e=="string")return yL(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yL(e,t)}}function yL(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function bke(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function wke(e){if(Array.isArray(e))return e}var N1=function(t,r,n){return t+(r-t)*n},xL=function(t){var r=t.from,n=t.to;return r!==n},Ske=function e(t,r,n){var i=Gg(function(a,o){if(xL(o)){var s=t(o.from,o.to,o.velocity),l=xke(s,2),u=l[0],c=l[1];return hn(hn({},o),{},{from:u,velocity:c})}return o},r);return n<1?Gg(function(a,o){return xL(o)?hn(hn({},o),{},{velocity:N1(o.velocity,i[a].velocity,n),from:N1(o.from,i[a].from,n)}):o},r):e(t,i,n-1)};const Tke=function(e,t,r,n,i){var a=eke(e,t),o=a.reduce(function(y,x){return hn(hn({},y),{},mL({},x,[e[x],t[x]]))},{}),s=a.reduce(function(y,x){return hn(hn({},y),{},mL({},x,{from:e[x],velocity:0,to:t[x]}))},{}),l=-1,u,c,f=function(){return null},h=function(){return Gg(function(x,_){return _.from},s)},d=function(){return!Object.values(s).filter(xL).length},v=function(x){u||(u=x);var _=x-u,b=_/r.dt;s=Ske(r,s,b),i(hn(hn(hn({},e),t),h())),u=x,d()||(l=requestAnimationFrame(f))},m=function(x){c||(c=x);var _=(x-c)/n,b=Gg(function(T,C){return N1.apply(void 0,x$(C).concat([r(_)]))},o);if(i(hn(hn(hn({},e),t),b)),_<1)l=requestAnimationFrame(f);else{var S=Gg(function(T,C){return N1.apply(void 0,x$(C).concat([r(1)]))},o);i(hn(hn(hn({},e),t),S))}};return f=r.isStepper?v:m,function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(l)}}};function Nd(e){"@babel/helpers - typeof";return Nd=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},Nd(e)}var Cke=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function Ake(e,t){if(e==null)return{};var r=Mke(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Mke(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function FA(e){return Ike(e)||Lke(e)||kke(e)||Pke()}function Pke(){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 kke(e,t){if(e){if(typeof e=="string")return _L(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _L(e,t)}}function Lke(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ike(e){if(Array.isArray(e))return _L(e)}function _L(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function b$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Aa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?b$(Object(r),!0).forEach(function(n){mg(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mg(e,t,r){return t=Eq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Oke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Eke(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Eq(n.key),n)}}function Dke(e,t,r){return t&&Eke(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Eq(e){var t=Nke(e,"string");return Nd(t)==="symbol"?t:String(t)}function Nke(e,t){if(Nd(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Nd(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jke(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bL(e,t)}function bL(e,t){return bL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},bL(e,t)}function Rke(e){var t=Bke();return function(){var n=j1(e),i;if(t){var a=j1(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return wL(this,i)}}function wL(e,t){if(t&&(Nd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return SL(e)}function SL(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Bke(){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 j1(e){return j1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},j1(e)}var Go=function(e){jke(r,e);var t=Rke(r);function r(n,i){var a;Oke(this,r),a=t.call(this,n,i);var o=a.props,s=o.isActive,l=o.attributeName,u=o.from,c=o.to,f=o.steps,h=o.children,d=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(SL(a)),a.changeStyle=a.changeStyle.bind(SL(a)),!s||d<=0)return a.state={style:{}},typeof h=="function"&&(a.state={style:c}),wL(a);if(f&&f.length)a.state={style:f[0].style};else if(u){if(typeof h=="function")return a.state={style:u},wL(a);a.state={style:l?mg({},l,u):u}}else a.state={style:{}};return a}return Dke(r,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,s=a.canBegin,l=a.attributeName,u=a.shouldReAnimate,c=a.to,f=a.from,h=this.state.style;if(s){if(!o){var d={style:l?mg({},l,c):c};this.state&&h&&(l&&h[l]!==c||!l&&h!==c)&&this.setState(d);return}if(!(WPe(i.to,c)&&i.canBegin&&i.isActive)){var v=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var m=v||u?f:i.to;if(this.state&&h){var y={style:l?mg({},l,m):m};(l&&h[l]!==m||!l&&h!==m)&&this.setState(y)}this.runAnimation(Aa(Aa({},this.props),{},{from:m,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,o=i.from,s=i.to,l=i.duration,u=i.easing,c=i.begin,f=i.onAnimationEnd,h=i.onAnimationStart,d=Tke(o,s,dke(u),l,this.changeStyle),v=function(){a.stopJSAnimation=d()};this.manager.start([h,c,v,l,f])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,s=i.begin,l=i.onAnimationStart,u=o[0],c=u.style,f=u.duration,h=f===void 0?0:f,d=function(m,y,x){if(x===0)return m;var _=y.duration,b=y.easing,S=b===void 0?"ease":b,T=y.style,C=y.properties,A=y.onAnimationEnd,P=x>0?o[x-1]:y,I=C||Object.keys(T);if(typeof S=="function"||S==="spring")return[].concat(FA(m),[a.runJSAnimation.bind(a,{from:P.style,to:T,duration:_,easing:S}),_]);var k=g$(I,_,S),E=Aa(Aa(Aa({},P.style),T),{},{transition:k});return[].concat(FA(m),[E,_,A]).filter(tke)};return this.manager.start([l].concat(FA(o.reduce(d,[c,Math.max(h,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=KPe());var a=i.begin,o=i.duration,s=i.attributeName,l=i.to,u=i.easing,c=i.onAnimationStart,f=i.onAnimationEnd,h=i.steps,d=i.children,v=this.manager;if(this.unSubscribe=v.subscribe(this.handleStyleChange),typeof u=="function"||typeof d=="function"||u==="spring"){this.runJSAnimation(i);return}if(h.length>1){this.runStepAnimation(i);return}var m=s?mg({},s,l):l,y=g$(Object.keys(m),o,u);v.start([c,a,Aa(Aa({},m),{},{transition:y}),o,f])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var s=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var l=Ake(i,Cke),u=G.Children.count(a),c=this.state.style;if(typeof a=="function")return a(c);if(!s||u===0||o<=0)return a;var f=function(d){var v=d.props,m=v.style,y=m===void 0?{}:m,x=v.className,_=G.cloneElement(d,Aa(Aa({},l),{},{style:Aa(Aa({},y),c),className:x}));return _};return u===1?f(G.Children.only(a)):ee.createElement("div",null,G.Children.map(a,function(h){return f(h)}))}}]),r}(G.PureComponent);Go.displayName="Animate";Go.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Go.propTypes={from:Ot.oneOfType([Ot.object,Ot.string]),to:Ot.oneOfType([Ot.object,Ot.string]),attributeName:Ot.string,duration:Ot.number,begin:Ot.number,easing:Ot.oneOfType([Ot.string,Ot.func]),steps:Ot.arrayOf(Ot.shape({duration:Ot.number.isRequired,style:Ot.object.isRequired,easing:Ot.oneOfType([Ot.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Ot.func]),properties:Ot.arrayOf("string"),onAnimationEnd:Ot.func})),children:Ot.oneOfType([Ot.node,Ot.func]),isActive:Ot.bool,canBegin:Ot.bool,onAnimationEnd:Ot.func,shouldReAnimate:Ot.bool,onAnimationStart:Ot.func,onAnimationReStart:Ot.func};function ty(e){"@babel/helpers - typeof";return ty=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},ty(e)}function R1(){return R1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},R1.apply(this,arguments)}function zke(e,t){return Gke(e)||Vke(e,t)||Fke(e,t)||$ke()}function $ke(){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 Fke(e,t){if(e){if(typeof e=="string")return w$(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return w$(e,t)}}function w$(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Vke(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Gke(e){if(Array.isArray(e))return e}function S$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function T$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?S$(Object(r),!0).forEach(function(n){Wke(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Wke(e,t,r){return t=Hke(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hke(e){var t=Uke(e,"string");return ty(t)=="symbol"?t:t+""}function Uke(e,t){if(ty(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ty(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var C$=function(t,r,n,i,a){var o=Math.min(Math.abs(n)/2,Math.abs(i)/2),s=i>=0?1:-1,l=n>=0?1:-1,u=i>=0&&n>=0||i<0&&n<0?1:0,c;if(o>0&&a instanceof Array){for(var f=[0,0,0,0],h=0,d=4;h<d;h++)f[h]=a[h]>o?o:a[h];c="M".concat(t,",").concat(r+s*f[0]),f[0]>0&&(c+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(u,",").concat(t+l*f[0],",").concat(r)),c+="L ".concat(t+n-l*f[1],",").concat(r),f[1]>0&&(c+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(u,`,
`).concat(t+n,",").concat(r+s*f[1])),c+="L ".concat(t+n,",").concat(r+i-s*f[2]),f[2]>0&&(c+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(u,`,
`).concat(t+n-l*f[2],",").concat(r+i)),c+="L ".concat(t+l*f[3],",").concat(r+i),f[3]>0&&(c+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(u,`,
`).concat(t,",").concat(r+i-s*f[3])),c+="Z"}else if(o>0&&a===+a&&a>0){var v=Math.min(o,a);c="M ".concat(t,",").concat(r+s*v,`
A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+l*v,",").concat(r,`
L `).concat(t+n-l*v,",").concat(r,`
A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+n,",").concat(r+s*v,`
L `).concat(t+n,",").concat(r+i-s*v,`
A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+n-l*v,",").concat(r+i,`
L `).concat(t+l*v,",").concat(r+i,`
A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t,",").concat(r+i-s*v," Z")}else c="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return c},Zke=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,a=r.x,o=r.y,s=r.width,l=r.height;if(Math.abs(s)>0&&Math.abs(l)>0){var u=Math.min(a,a+s),c=Math.max(a,a+s),f=Math.min(o,o+l),h=Math.max(o,o+l);return n>=u&&n<=c&&i>=f&&i<=h}return!1},Yke={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},cN=function(t){var r=T$(T$({},Yke),t),n=G.useRef(),i=G.useState(-1),a=zke(i,2),o=a[0],s=a[1];G.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var S=n.current.getTotalLength();S&&s(S)}catch{}},[]);var l=r.x,u=r.y,c=r.width,f=r.height,h=r.radius,d=r.className,v=r.animationEasing,m=r.animationDuration,y=r.animationBegin,x=r.isAnimationActive,_=r.isUpdateAnimationActive;if(l!==+l||u!==+u||c!==+c||f!==+f||c===0||f===0)return null;var b=_t("recharts-rectangle",d);return _?ee.createElement(Go,{canBegin:o>0,from:{width:c,height:f,x:l,y:u},to:{width:c,height:f,x:l,y:u},duration:m,animationEasing:v,isActive:_},function(S){var T=S.width,C=S.height,A=S.x,P=S.y;return ee.createElement(Go,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:m,isActive:x,easing:v},ee.createElement("path",R1({},ft(r,!0),{className:b,d:C$(A,P,T,C,h),ref:n})))}):ee.createElement("path",R1({},ft(r,!0),{className:b,d:C$(l,u,c,f,h)}))};function TL(){return TL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},TL.apply(this,arguments)}var gT=function(t){var r=t.cx,n=t.cy,i=t.r,a=t.className,o=_t("recharts-dot",a);return r===+r&&n===+n&&i===+i?G.createElement("circle",TL({},ft(t,!1),Qb(t),{className:o,cx:r,cy:n,r:i})):null};function ry(e){"@babel/helpers - typeof";return ry=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},ry(e)}var Xke=["x","y","top","left","width","height","className"];function CL(){return CL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},CL.apply(this,arguments)}function A$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qke(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?A$(Object(r),!0).forEach(function(n){Kke(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Kke(e,t,r){return t=Jke(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Jke(e){var t=Qke(e,"string");return ry(t)=="symbol"?t:t+""}function Qke(e,t){if(ry(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ry(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eLe(e,t){if(e==null)return{};var r=tLe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function tLe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var rLe=function(t,r,n,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(r,"h").concat(n)},nLe=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.top,s=o===void 0?0:o,l=t.left,u=l===void 0?0:l,c=t.width,f=c===void 0?0:c,h=t.height,d=h===void 0?0:h,v=t.className,m=eLe(t,Xke),y=qke({x:n,y:a,top:s,left:u,width:f,height:d},m);return!Pe(n)||!Pe(a)||!Pe(f)||!Pe(d)||!Pe(s)||!Pe(u)?null:ee.createElement("path",CL({},ft(y,!0),{className:_t("recharts-cross",v),d:rLe(n,a,f,d,s,u)}))},iLe=XY,aLe=iLe(Object.getPrototypeOf,Object),oLe=aLe,sLe=Qs,lLe=oLe,uLe=el,cLe="[object Object]",fLe=Function.prototype,hLe=Object.prototype,Dq=fLe.toString,dLe=hLe.hasOwnProperty,vLe=Dq.call(Object);function pLe(e){if(!uLe(e)||sLe(e)!=cLe)return!1;var t=lLe(e);if(t===null)return!0;var r=dLe.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Dq.call(r)==vLe}var gLe=pLe;const mLe=Ft(gLe);var yLe=Qs,xLe=el,_Le="[object Boolean]";function bLe(e){return e===!0||e===!1||xLe(e)&&yLe(e)==_Le}var wLe=bLe;const SLe=Ft(wLe);function ny(e){"@babel/helpers - typeof";return ny=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},ny(e)}function B1(){return B1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},B1.apply(this,arguments)}function TLe(e,t){return PLe(e)||MLe(e,t)||ALe(e,t)||CLe()}function CLe(){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 ALe(e,t){if(e){if(typeof e=="string")return M$(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return M$(e,t)}}function M$(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function MLe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function PLe(e){if(Array.isArray(e))return e}function P$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function k$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?P$(Object(r),!0).forEach(function(n){kLe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kLe(e,t,r){return t=LLe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LLe(e){var t=ILe(e,"string");return ny(t)=="symbol"?t:t+""}function ILe(e,t){if(ny(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ny(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var L$=function(t,r,n,i,a){var o=n-i,s;return s="M ".concat(t,",").concat(r),s+="L ".concat(t+n,",").concat(r),s+="L ".concat(t+n-o/2,",").concat(r+a),s+="L ".concat(t+n-o/2-i,",").concat(r+a),s+="L ".concat(t,",").concat(r," Z"),s},OLe={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},ELe=function(t){var r=k$(k$({},OLe),t),n=G.useRef(),i=G.useState(-1),a=TLe(i,2),o=a[0],s=a[1];G.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var b=n.current.getTotalLength();b&&s(b)}catch{}},[]);var l=r.x,u=r.y,c=r.upperWidth,f=r.lowerWidth,h=r.height,d=r.className,v=r.animationEasing,m=r.animationDuration,y=r.animationBegin,x=r.isUpdateAnimationActive;if(l!==+l||u!==+u||c!==+c||f!==+f||h!==+h||c===0&&f===0||h===0)return null;var _=_t("recharts-trapezoid",d);return x?ee.createElement(Go,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:h,x:l,y:u},to:{upperWidth:c,lowerWidth:f,height:h,x:l,y:u},duration:m,animationEasing:v,isActive:x},function(b){var S=b.upperWidth,T=b.lowerWidth,C=b.height,A=b.x,P=b.y;return ee.createElement(Go,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:m,easing:v},ee.createElement("path",B1({},ft(r,!0),{className:_,d:L$(A,P,S,T,C),ref:n})))}):ee.createElement("g",null,ee.createElement("path",B1({},ft(r,!0),{className:_,d:L$(l,u,c,f,h)})))},DLe=["option","shapeType","propTransformer","activeClassName","isActive"];function iy(e){"@babel/helpers - typeof";return iy=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},iy(e)}function NLe(e,t){if(e==null)return{};var r=jLe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function jLe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function I$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function z1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?I$(Object(r),!0).forEach(function(n){RLe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):I$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function RLe(e,t,r){return t=BLe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BLe(e){var t=zLe(e,"string");return iy(t)=="symbol"?t:t+""}function zLe(e,t){if(iy(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(iy(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $Le(e,t){return z1(z1({},t),e)}function FLe(e,t){return e==="symbols"}function O$(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return ee.createElement(cN,r);case"trapezoid":return ee.createElement(ELe,r);case"sector":return ee.createElement(Sq,r);case"symbols":if(FLe(t))return ee.createElement(PD,r);break;default:return null}}function VLe(e){return G.isValidElement(e)?e.props:e}function GLe(e){var t=e.option,r=e.shapeType,n=e.propTransformer,i=n===void 0?$Le:n,a=e.activeClassName,o=a===void 0?"recharts-active-shape":a,s=e.isActive,l=NLe(e,DLe),u;if(G.isValidElement(t))u=G.cloneElement(t,z1(z1({},l),VLe(t)));else if(ht(t))u=t(l);else if(mLe(t)&&!SLe(t)){var c=i(t,l);u=ee.createElement(O$,{shapeType:r,elementProps:c})}else{var f=l;u=ee.createElement(O$,{shapeType:r,elementProps:f})}return s?ee.createElement(Xt,{className:o},u):u}function mT(e,t){return t!=null&&"trapezoids"in e.props}function yT(e,t){return t!=null&&"sectors"in e.props}function ay(e,t){return t!=null&&"points"in e.props}function WLe(e,t){var r,n,i=e.x===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.x)||e.x===t.x,a=e.y===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.y)||e.y===t.y;return i&&a}function HLe(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function ULe(e,t){var r=e.x===t.x,n=e.y===t.y,i=e.z===t.z;return r&&n&&i}function ZLe(e,t){var r;return mT(e,t)?r=WLe:yT(e,t)?r=HLe:ay(e,t)&&(r=ULe),r}function YLe(e,t){var r;return mT(e,t)?r="trapezoids":yT(e,t)?r="sectors":ay(e,t)&&(r="points"),r}function XLe(e,t){if(mT(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}if(yT(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}return ay(e,t)?t.payload:{}}function qLe(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,i=YLe(r,t),a=XLe(r,t),o=n.filter(function(l,u){var c=Ed(a,l),f=r.props[i].filter(function(v){var m=ZLe(r,t);return m(v,t)}),h=r.props[i].indexOf(f[f.length-1]),d=u===h;return c&&d}),s=n.indexOf(o[o.length-1]);return s}var KLe=Math.ceil,JLe=Math.max;function QLe(e,t,r,n){for(var i=-1,a=JLe(KLe((t-e)/(r||1)),0),o=Array(a);a--;)o[n?a:++i]=e,e+=r;return o}var eIe=QLe,tIe=dX,E$=1/0,rIe=17976931348623157e292;function nIe(e){if(!e)return e===0?e:0;if(e=tIe(e),e===E$||e===-E$){var t=e<0?-1:1;return t*rIe}return e===e?e:0}var iIe=nIe,aIe=eIe,oIe=oT,VA=iIe;function sIe(e){return function(t,r,n){return n&&typeof n!="number"&&oIe(t,r,n)&&(r=n=void 0),t=VA(t),r===void 0?(r=t,t=0):r=VA(r),n=n===void 0?t<r?1:-1:VA(n),aIe(t,r,n,e)}}var lIe=sIe,uIe=lIe,cIe=uIe(),fIe=cIe;const $1=Ft(fIe);function oy(e){"@babel/helpers - typeof";return oy=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},oy(e)}function D$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function N$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?D$(Object(r),!0).forEach(function(n){Nq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):D$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Nq(e,t,r){return t=hIe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hIe(e){var t=dIe(e,"string");return oy(t)=="symbol"?t:t+""}function dIe(e,t){if(oy(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(oy(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var vIe=["Webkit","Moz","O","ms"],pIe=function(t,r){var n=t.replace(/(\w)/,function(a){return a.toUpperCase()}),i=vIe.reduce(function(a,o){return N$(N$({},a),{},Nq({},o+n,r))},{});return i[t]=r,i};function jd(e){"@babel/helpers - typeof";return jd=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},jd(e)}function F1(){return F1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},F1.apply(this,arguments)}function j$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function GA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?j$(Object(r),!0).forEach(function(n){mi(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gIe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function R$(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Rq(n.key),n)}}function mIe(e,t,r){return t&&R$(e.prototype,t),r&&R$(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function yIe(e,t,r){return t=V1(t),xIe(e,jq()?Reflect.construct(t,r||[],V1(e).constructor):t.apply(e,r))}function xIe(e,t){if(t&&(jd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _Ie(e)}function _Ie(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jq=function(){return!!e})()}function V1(e){return V1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},V1(e)}function bIe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&AL(e,t)}function AL(e,t){return AL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},AL(e,t)}function mi(e,t,r){return t=Rq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Rq(e){var t=wIe(e,"string");return jd(t)=="symbol"?t:t+""}function wIe(e,t){if(jd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(jd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var SIe=function(t){var r=t.data,n=t.startIndex,i=t.endIndex,a=t.x,o=t.width,s=t.travellerWidth;if(!r||!r.length)return{};var l=r.length,u=Fg().domain($1(0,l)).range([a,a+o-s]),c=u.domain().map(function(f){return u(f)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(n),endX:u(i),scale:u,scaleValues:c}},B$=function(t){return t.changedTouches&&!!t.changedTouches.length},Rd=function(e){function t(r){var n;return gIe(this,t),n=yIe(this,t,[r]),mi(n,"handleDrag",function(i){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(i):n.state.isSlideMoving&&n.handleSlideDrag(i)}),mi(n,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&n.handleDrag(i.changedTouches[0])}),mi(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,a=i.endIndex,o=i.onDragEnd,s=i.startIndex;o==null||o({endIndex:a,startIndex:s})}),n.detachDragEndListener()}),mi(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),mi(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),mi(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),mi(n,"handleSlideDragStart",function(i){var a=B$(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return bIe(t,e),mIe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,a=n.endX,o=this.state.scaleValues,s=this.props,l=s.gap,u=s.data,c=u.length-1,f=Math.min(i,a),h=Math.max(i,a),d=t.getIndexInRange(o,f),v=t.getIndexInRange(o,h);return{startIndex:d-d%l,endIndex:v===c?c:v-v%l}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,o=i.tickFormatter,s=i.dataKey,l=Yn(a[n],s,n);return ht(o)?o(l,n):l}},{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(n){var i=this.state,a=i.slideMoveStartX,o=i.startX,s=i.endX,l=this.props,u=l.x,c=l.width,f=l.travellerWidth,h=l.startIndex,d=l.endIndex,v=l.onChange,m=n.pageX-a;m>0?m=Math.min(m,u+c-f-s,u+c-f-o):m<0&&(m=Math.max(m,u-o,u-s));var y=this.getIndex({startX:o+m,endX:s+m});(y.startIndex!==h||y.endIndex!==d)&&v&&v(y),this.setState({startX:o+m,endX:s+m,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=B$(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,s=i.endX,l=i.startX,u=this.state[o],c=this.props,f=c.x,h=c.width,d=c.travellerWidth,v=c.onChange,m=c.gap,y=c.data,x={startX:this.state.startX,endX:this.state.endX},_=n.pageX-a;_>0?_=Math.min(_,f+h-d-u):_<0&&(_=Math.max(_,f-u)),x[o]=u+_;var b=this.getIndex(x),S=b.startIndex,T=b.endIndex,C=function(){var P=y.length-1;return o==="startX"&&(s>l?S%m===0:T%m===0)||s<l&&T===P||o==="endX"&&(s>l?T%m===0:S%m===0)||s>l&&T===P};this.setState(mi(mi({},o,u+_),"brushMoveStartX",n.pageX),function(){v&&C()&&v(b)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,o=this.state,s=o.scaleValues,l=o.startX,u=o.endX,c=this.state[i],f=s.indexOf(c);if(f!==-1){var h=f+n;if(!(h===-1||h>=s.length)){var d=s[h];i==="startX"&&d>=u||i==="endX"&&d<=l||this.setState(mi({},i,d),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,l=n.fill,u=n.stroke;return ee.createElement("rect",{stroke:u,fill:l,x:i,y:a,width:o,height:s})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,l=n.data,u=n.children,c=n.padding,f=G.Children.only(u);return f?ee.cloneElement(f,{x:i,y:a,width:o,height:s,margin:c,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,o,s=this,l=this.props,u=l.y,c=l.travellerWidth,f=l.height,h=l.traveller,d=l.ariaLabel,v=l.data,m=l.startIndex,y=l.endIndex,x=Math.max(n,this.props.x),_=GA(GA({},ft(this.props,!1)),{},{x,y:u,width:c,height:f}),b=d||"Min value: ".concat((a=v[m])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=v[y])===null||o===void 0?void 0:o.name);return ee.createElement(Xt,{tabIndex:0,role:"slider","aria-label":b,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(T){["ArrowLeft","ArrowRight"].includes(T.key)&&(T.preventDefault(),T.stopPropagation(),s.handleTravellerMoveKeyboard(T.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,_))}},{key:"renderSlide",value:function(n,i){var a=this.props,o=a.y,s=a.height,l=a.stroke,u=a.travellerWidth,c=Math.min(n,i)+u,f=Math.max(Math.abs(i-n)-u,0);return ee.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:c,y:o,width:f,height:s})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,a=n.endIndex,o=n.y,s=n.height,l=n.travellerWidth,u=n.stroke,c=this.state,f=c.startX,h=c.endX,d=5,v={pointerEvents:"none",fill:u};return ee.createElement(Xt,{className:"recharts-brush-texts"},ee.createElement(v1,F1({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,h)-d,y:o+s/2},v),this.getTextOfTick(i)),ee.createElement(v1,F1({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,h)+l+d,y:o+s/2},v),this.getTextOfTick(a)))}},{key:"render",value:function(){var n=this.props,i=n.data,a=n.className,o=n.children,s=n.x,l=n.y,u=n.width,c=n.height,f=n.alwaysShowText,h=this.state,d=h.startX,v=h.endX,m=h.isTextActive,y=h.isSlideMoving,x=h.isTravellerMoving,_=h.isTravellerFocused;if(!i||!i.length||!Pe(s)||!Pe(l)||!Pe(u)||!Pe(c)||u<=0||c<=0)return null;var b=_t("recharts-brush",a),S=ee.Children.count(o)===1,T=pIe("userSelect","none");return ee.createElement(Xt,{className:b,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:T},this.renderBackground(),S&&this.renderPanorama(),this.renderSlide(d,v),this.renderTravellerLayer(d,"startX"),this.renderTravellerLayer(v,"endX"),(m||y||x||_||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,a=n.y,o=n.width,s=n.height,l=n.stroke,u=Math.floor(a+s/2)-1;return ee.createElement(ee.Fragment,null,ee.createElement("rect",{x:i,y:a,width:o,height:s,fill:l,stroke:"none"}),ee.createElement("line",{x1:i+1,y1:u,x2:i+o-1,y2:u,fill:"none",stroke:"#fff"}),ee.createElement("line",{x1:i+1,y1:u+2,x2:i+o-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var a;return ee.isValidElement(n)?a=ee.cloneElement(n,i):ht(n)?a=n(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(n,i){var a=n.data,o=n.width,s=n.x,l=n.travellerWidth,u=n.updateId,c=n.startIndex,f=n.endIndex;if(a!==i.prevData||u!==i.prevUpdateId)return GA({prevData:a,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o},a&&a.length?SIe({data:a,width:o,x:s,travellerWidth:l,startIndex:c,endIndex:f}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||s!==i.prevX||l!==i.prevTravellerWidth)){i.scale.range([s,s+o-l]);var h=i.scale.domain().map(function(d){return i.scale(d)});return{prevData:a,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(n,i){for(var a=n.length,o=0,s=a-1;s-o>1;){var l=Math.floor((o+s)/2);n[l]>i?s=l:o=l}return i>=n[s]?s:o}}])}(G.PureComponent);mi(Rd,"displayName","Brush");mi(Rd,"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 TIe=jD;function CIe(e,t){var r;return TIe(e,function(n,i,a){return r=t(n,i,a),!r}),!!r}var AIe=CIe,MIe=FY,PIe=Lv,kIe=AIe,LIe=hi,IIe=oT;function OIe(e,t,r){var n=LIe(e)?MIe:kIe;return r&&IIe(e,t,r)&&(t=void 0),n(e,PIe(t))}var EIe=OIe;const DIe=Ft(EIe);var jo=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},z$=lX;function NIe(e,t,r){t=="__proto__"&&z$?z$(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var jIe=NIe,RIe=jIe,BIe=oX,zIe=Lv;function $Ie(e,t){var r={};return t=zIe(t),BIe(e,function(n,i,a){RIe(r,i,t(n,i,a))}),r}var FIe=$Ie;const VIe=Ft(FIe);function GIe(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}var WIe=GIe,HIe=jD;function UIe(e,t){var r=!0;return HIe(e,function(n,i,a){return r=!!t(n,i,a),r}),r}var ZIe=UIe,YIe=WIe,XIe=ZIe,qIe=Lv,KIe=hi,JIe=oT;function QIe(e,t,r){var n=KIe(e)?YIe:XIe;return r&&JIe(e,t,r)&&(t=void 0),n(e,qIe(t))}var eOe=QIe;const tOe=Ft(eOe);var rOe=["x","y"];function sy(e){"@babel/helpers - typeof";return sy=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},sy(e)}function ML(){return ML=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ML.apply(this,arguments)}function $$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ep(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$$(Object(r),!0).forEach(function(n){nOe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nOe(e,t,r){return t=iOe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iOe(e){var t=aOe(e,"string");return sy(t)=="symbol"?t:t+""}function aOe(e,t){if(sy(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(sy(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oOe(e,t){if(e==null)return{};var r=sOe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function sOe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function lOe(e,t){var r=e.x,n=e.y,i=oOe(e,rOe),a="".concat(r),o=parseInt(a,10),s="".concat(n),l=parseInt(s,10),u="".concat(t.height||i.height),c=parseInt(u,10),f="".concat(t.width||i.width),h=parseInt(f,10);return Ep(Ep(Ep(Ep(Ep({},t),i),o?{x:o}:{}),l?{y:l}:{}),{},{height:c,width:h,name:t.name,radius:t.radius})}function F$(e){return ee.createElement(GLe,ML({shapeType:"rectangle",propTransformer:lOe,activeClassName:"recharts-active-bar"},e))}var uOe=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof t=="number")return t;var a=Pe(n)||_ve(n);return a?t(n,i):(a||uf(),r)}},cOe=["value","background"],Bq;function Bd(e){"@babel/helpers - typeof";return Bd=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},Bd(e)}function fOe(e,t){if(e==null)return{};var r=hOe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function hOe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function G1(){return G1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},G1.apply(this,arguments)}function V$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Or(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?V$(Object(r),!0).forEach(function(n){El(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dOe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function G$(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,$q(n.key),n)}}function vOe(e,t,r){return t&&G$(e.prototype,t),r&&G$(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function pOe(e,t,r){return t=W1(t),gOe(e,zq()?Reflect.construct(t,r||[],W1(e).constructor):t.apply(e,r))}function gOe(e,t){if(t&&(Bd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mOe(e)}function mOe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(zq=function(){return!!e})()}function W1(e){return W1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},W1(e)}function yOe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&PL(e,t)}function PL(e,t){return PL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},PL(e,t)}function El(e,t,r){return t=$q(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $q(e){var t=xOe(e,"string");return Bd(t)=="symbol"?t:t+""}function xOe(e,t){if(Bd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Bd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var o0=function(e){function t(){var r;dOe(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=pOe(this,t,[].concat(i)),El(r,"state",{isAnimationFinished:!1}),El(r,"id",Av("recharts-bar-")),El(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),El(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return yOe(t,e),vOe(t,[{key:"renderRectanglesStatically",value:function(n){var i=this,a=this.props,o=a.shape,s=a.dataKey,l=a.activeIndex,u=a.activeBar,c=ft(this.props,!1);return n&&n.map(function(f,h){var d=h===l,v=d?u:o,m=Or(Or(Or({},c),f),{},{isActive:d,option:v,index:h,dataKey:s,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return ee.createElement(Xt,G1({className:"recharts-bar-rectangle"},e1(i.props,f,h),{key:"rectangle-".concat(f==null?void 0:f.x,"-").concat(f==null?void 0:f.y,"-").concat(f==null?void 0:f.value,"-").concat(h)}),ee.createElement(F$,m))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,i=this.props,a=i.data,o=i.layout,s=i.isAnimationActive,l=i.animationBegin,u=i.animationDuration,c=i.animationEasing,f=i.animationId,h=this.state.prevData;return ee.createElement(Go,{begin:l,duration:u,isActive:s,easing:c,from:{t:0},to:{t:1},key:"bar-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(d){var v=d.t,m=a.map(function(y,x){var _=h&&h[x];if(_){var b=gn(_.x,y.x),S=gn(_.y,y.y),T=gn(_.width,y.width),C=gn(_.height,y.height);return Or(Or({},y),{},{x:b(v),y:S(v),width:T(v),height:C(v)})}if(o==="horizontal"){var A=gn(0,y.height),P=A(v);return Or(Or({},y),{},{y:y.y+y.height-P,height:P})}var I=gn(0,y.width),k=I(v);return Or(Or({},y),{},{width:k})});return ee.createElement(Xt,null,n.renderRectanglesStatically(m))})}},{key:"renderRectangles",value:function(){var n=this.props,i=n.data,a=n.isAnimationActive,o=this.state.prevData;return a&&i&&i.length&&(!o||!Ed(o,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var n=this,i=this.props,a=i.data,o=i.dataKey,s=i.activeIndex,l=ft(this.props.background,!1);return a.map(function(u,c){u.value;var f=u.background,h=fOe(u,cOe);if(!f)return null;var d=Or(Or(Or(Or(Or({},h),{},{fill:"#eee"},f),l),e1(n.props,u,c)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:o,index:c,className:"recharts-bar-background-rectangle"});return ee.createElement(F$,G1({key:"background-bar-".concat(c),option:n.props.background,isActive:c===s},d))})}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.data,s=a.xAxis,l=a.yAxis,u=a.layout,c=a.children,f=la(c,a0);if(!f)return null;var h=u==="vertical"?o[0].height/2:o[0].width/2,d=function(y,x){var _=Array.isArray(y.value)?y.value[1]:y.value;return{x:y.x,y:y.y,value:_,errorVal:Yn(y,x)}},v={clipPath:n?"url(#clipPath-".concat(i,")"):null};return ee.createElement(Xt,v,f.map(function(m){return ee.cloneElement(m,{key:"error-bar-".concat(i,"-").concat(m.props.dataKey),data:o,xAxis:s,yAxis:l,layout:u,offset:h,dataPointFormatter:d})}))}},{key:"render",value:function(){var n=this.props,i=n.hide,a=n.data,o=n.className,s=n.xAxis,l=n.yAxis,u=n.left,c=n.top,f=n.width,h=n.height,d=n.isAnimationActive,v=n.background,m=n.id;if(i||!a||!a.length)return null;var y=this.state.isAnimationFinished,x=_t("recharts-bar",o),_=s&&s.allowDataOverflow,b=l&&l.allowDataOverflow,S=_||b,T=vt(m)?this.id:m;return ee.createElement(Xt,{className:x},_||b?ee.createElement("defs",null,ee.createElement("clipPath",{id:"clipPath-".concat(T)},ee.createElement("rect",{x:_?u:u-f/2,y:b?c:c-h/2,width:_?f:f*2,height:b?h:h*2}))):null,ee.createElement(Xt,{className:"recharts-bar-rectangles",clipPath:S?"url(#clipPath-".concat(T,")"):null},v?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(S,T),(!d||y)&&ks.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:i.curData}:n.data!==i.curData?{curData:n.data}:null}}])}(G.PureComponent);Bq=o0;El(o0,"displayName","Bar");El(o0,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Af.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});El(o0,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,i=e.bandSize,a=e.xAxis,o=e.yAxis,s=e.xAxisTicks,l=e.yAxisTicks,u=e.stackedData,c=e.dataStartIndex,f=e.displayedData,h=e.offset,d=G2e(n,r);if(!d)return null;var v=t.layout,m=r.type.defaultProps,y=m!==void 0?Or(Or({},m),r.props):r.props,x=y.dataKey,_=y.children,b=y.minPointSize,S=v==="horizontal"?o:a,T=u?S.scale.domain():null,C=K2e({numericAxis:S}),A=la(_,gX),P=f.map(function(I,k){var E,D,N,z,V,F;u?E=W2e(u[c+k],T):(E=Yn(I,x),Array.isArray(E)||(E=[C,E]));var $=uOe(b,Bq.defaultProps.minPointSize)(E[1],k);if(v==="horizontal"){var B,H=[o.scale(E[0]),o.scale(E[1])],U=H[0],Y=H[1];D=H4({axis:a,ticks:s,bandSize:i,offset:d.offset,entry:I,index:k}),N=(B=Y??U)!==null&&B!==void 0?B:void 0,z=d.size;var Z=U-Y;if(V=Number.isNaN(Z)?0:Z,F={x:D,y:o.y,width:z,height:o.height},Math.abs($)>0&&Math.abs(V)<Math.abs($)){var Q=za(V||$)*(Math.abs($)-Math.abs(V));N-=Q,V+=Q}}else{var re=[a.scale(E[0]),a.scale(E[1])],ue=re[0],de=re[1];if(D=ue,N=H4({axis:o,ticks:l,bandSize:i,offset:d.offset,entry:I,index:k}),z=de-ue,V=d.size,F={x:a.x,y:N,width:a.width,height:V},Math.abs($)>0&&Math.abs(z)<Math.abs($)){var Re=za(z||$)*(Math.abs($)-Math.abs(z));z+=Re}}return Or(Or(Or({},I),{},{x:D,y:N,width:z,height:V,value:u?E:E[1],payload:I,background:F},A&&A[k]&&A[k].props),{},{tooltipPayload:[_q(r,I)],tooltipPosition:{x:D+z/2,y:N+V/2}})});return Or({data:P,layout:v},h)});function ly(e){"@babel/helpers - typeof";return ly=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},ly(e)}function _Oe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function W$(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Fq(n.key),n)}}function bOe(e,t,r){return t&&W$(e.prototype,t),r&&W$(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function H$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Na(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?H$(Object(r),!0).forEach(function(n){xT(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xT(e,t,r){return t=Fq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fq(e){var t=wOe(e,"string");return ly(t)=="symbol"?t:t+""}function wOe(e,t){if(ly(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ly(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Vq=function(t,r,n,i,a){var o=t.width,s=t.height,l=t.layout,u=t.children,c=Object.keys(r),f={left:n.left,leftMirror:n.left,right:o-n.right,rightMirror:o-n.right,top:n.top,topMirror:n.top,bottom:s-n.bottom,bottomMirror:s-n.bottom},h=!!xi(u,o0);return c.reduce(function(d,v){var m=r[v],y=m.orientation,x=m.domain,_=m.padding,b=_===void 0?{}:_,S=m.mirror,T=m.reversed,C="".concat(y).concat(S?"Mirror":""),A,P,I,k,E;if(m.type==="number"&&(m.padding==="gap"||m.padding==="no-gap")){var D=x[1]-x[0],N=1/0,z=m.categoricalDomain.sort(Sve);if(z.forEach(function(re,ue){ue>0&&(N=Math.min((re||0)-(z[ue-1]||0),N))}),Number.isFinite(N)){var V=N/D,F=m.layout==="vertical"?n.height:n.width;if(m.padding==="gap"&&(A=V*F/2),m.padding==="no-gap"){var $=sf(t.barCategoryGap,V*F),B=V*F/2;A=B-$-(B-$)/F*$}}}i==="xAxis"?P=[n.left+(b.left||0)+(A||0),n.left+n.width-(b.right||0)-(A||0)]:i==="yAxis"?P=l==="horizontal"?[n.top+n.height-(b.bottom||0),n.top+(b.top||0)]:[n.top+(b.top||0)+(A||0),n.top+n.height-(b.bottom||0)-(A||0)]:P=m.range,T&&(P=[P[1],P[0]]);var H=F2e(m,a,h),U=H.scale,Y=H.realScaleType;U.domain(x).range(P),V2e(U);var Z=q2e(U,Na(Na({},m),{},{realScaleType:Y}));i==="xAxis"?(E=y==="top"&&!S||y==="bottom"&&S,I=n.left,k=f[C]-E*m.height):i==="yAxis"&&(E=y==="left"&&!S||y==="right"&&S,I=f[C]-E*m.width,k=n.top);var Q=Na(Na(Na({},m),Z),{},{realScaleType:Y,x:I,y:k,scale:U,width:i==="xAxis"?n.width:m.width,height:i==="yAxis"?n.height:m.height});return Q.bandSize=L1(Q,Z),!m.hide&&i==="xAxis"?f[C]+=(E?-1:1)*Q.height:m.hide||(f[C]+=(E?-1:1)*Q.width),Na(Na({},d),{},xT({},v,Q))},{})},Gq=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return{x:Math.min(n,a),y:Math.min(i,o),width:Math.abs(a-n),height:Math.abs(o-i)}},SOe=function(t){var r=t.x1,n=t.y1,i=t.x2,a=t.y2;return Gq({x:r,y:n},{x:i,y:a})},Wq=function(){function e(t){_Oe(this,e),this.scale=t}return bOe(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(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.bandAware,a=n.position;if(r!==void 0){if(a)switch(a){case"start":return this.scale(r);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(r)+s}default:return this.scale(r)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+l}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],a=n[n.length-1];return i<=a?r>=i&&r<=a:r>=a&&r<=i}}],[{key:"create",value:function(r){return new e(r)}}])}();xT(Wq,"EPS",1e-4);var fN=function(t){var r=Object.keys(t).reduce(function(n,i){return Na(Na({},n),{},xT({},i,Wq.create(t[i])))},{});return Na(Na({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,s=a.position;return VIe(i,function(l,u){return r[u].apply(l,{bandAware:o,position:s})})},isInRange:function(i){return tOe(i,function(a,o){return r[o].isInRange(a)})}})};function TOe(e){return(e%180+180)%180}var COe=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=TOe(i),o=a*Math.PI/180,s=Math.atan(n/r),l=o>s&&o<Math.PI-s?n/Math.sin(o):r/Math.cos(o);return Math.abs(l)},AOe=Ade(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("")}),Hq=G.createContext(void 0),Uq=G.createContext(void 0),Zq=G.createContext(void 0),MOe=G.createContext({}),Yq=G.createContext(void 0),Xq=G.createContext(0),qq=G.createContext(0),U$=function(t){var r=t.state,n=r.xAxisMap,i=r.yAxisMap,a=r.offset,o=t.clipPathId,s=t.children,l=t.width,u=t.height,c=AOe(a);return ee.createElement(Hq.Provider,{value:n},ee.createElement(Uq.Provider,{value:i},ee.createElement(MOe.Provider,{value:a},ee.createElement(Zq.Provider,{value:c},ee.createElement(Yq.Provider,{value:o},ee.createElement(Xq.Provider,{value:u},ee.createElement(qq.Provider,{value:l},s)))))))},POe=function(){return G.useContext(Yq)},Kq=function(t){var r=G.useContext(Hq);r==null&&uf();var n=r[t];return n==null&&uf(),n},Jq=function(t){var r=G.useContext(Uq);r==null&&uf();var n=r[t];return n==null&&uf(),n},kOe=function(){var t=G.useContext(Zq);return t},Qq=function(){return G.useContext(qq)},eK=function(){return G.useContext(Xq)};function zd(e){"@babel/helpers - typeof";return zd=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},zd(e)}function LOe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IOe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,rK(n.key),n)}}function OOe(e,t,r){return t&&IOe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function EOe(e,t,r){return t=H1(t),DOe(e,tK()?Reflect.construct(t,r||[],H1(e).constructor):t.apply(e,r))}function DOe(e,t){if(t&&(zd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return NOe(e)}function NOe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(tK=function(){return!!e})()}function H1(e){return H1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},H1(e)}function jOe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kL(e,t)}function kL(e,t){return kL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},kL(e,t)}function Z$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Y$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Z$(Object(r),!0).forEach(function(n){hN(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hN(e,t,r){return t=rK(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rK(e){var t=ROe(e,"string");return zd(t)=="symbol"?t:t+""}function ROe(e,t){if(zd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(zd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function BOe(e,t){return VOe(e)||FOe(e,t)||$Oe(e,t)||zOe()}function zOe(){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 $Oe(e,t){if(e){if(typeof e=="string")return X$(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return X$(e,t)}}function X$(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function FOe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function VOe(e){if(Array.isArray(e))return e}function LL(){return LL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},LL.apply(this,arguments)}var GOe=function(t,r){var n;return ee.isValidElement(t)?n=ee.cloneElement(t,r):ht(t)?n=t(r):n=ee.createElement("line",LL({},r,{className:"recharts-reference-line-line"})),n},WOe=function(t,r,n,i,a,o,s,l,u){var c=a.x,f=a.y,h=a.width,d=a.height;if(n){var v=u.y,m=t.y.apply(v,{position:o});if(jo(u,"discard")&&!t.y.isInRange(m))return null;var y=[{x:c+h,y:m},{x:c,y:m}];return l==="left"?y.reverse():y}if(r){var x=u.x,_=t.x.apply(x,{position:o});if(jo(u,"discard")&&!t.x.isInRange(_))return null;var b=[{x:_,y:f+d},{x:_,y:f}];return s==="top"?b.reverse():b}if(i){var S=u.segment,T=S.map(function(C){return t.apply(C,{position:o})});return jo(u,"discard")&&DIe(T,function(C){return!t.isInRange(C)})?null:T}return null};function HOe(e){var t=e.x,r=e.y,n=e.segment,i=e.xAxisId,a=e.yAxisId,o=e.shape,s=e.className,l=e.alwaysShow,u=POe(),c=Kq(i),f=Jq(a),h=kOe();if(!u||!h)return null;Vc(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var d=fN({x:c.scale,y:f.scale}),v=Ur(t),m=Ur(r),y=n&&n.length===2,x=WOe(d,v,m,y,h,e.position,c.orientation,f.orientation,e);if(!x)return null;var _=BOe(x,2),b=_[0],S=b.x,T=b.y,C=_[1],A=C.x,P=C.y,I=jo(e,"hidden")?"url(#".concat(u,")"):void 0,k=Y$(Y$({clipPath:I},ft(e,!0)),{},{x1:S,y1:T,x2:A,y2:P});return ee.createElement(Xt,{className:_t("recharts-reference-line",s)},GOe(o,k),Dn.renderCallByParent(e,SOe({x1:S,y1:T,x2:A,y2:P})))}var uy=function(e){function t(){return LOe(this,t),EOe(this,t,arguments)}return jOe(t,e),OOe(t,[{key:"render",value:function(){return ee.createElement(HOe,this.props)}}])}(ee.Component);hN(uy,"displayName","ReferenceLine");hN(uy,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function IL(){return IL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},IL.apply(this,arguments)}function $d(e){"@babel/helpers - typeof";return $d=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},$d(e)}function q$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function K$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?q$(Object(r),!0).forEach(function(n){_T(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):q$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function UOe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZOe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,iK(n.key),n)}}function YOe(e,t,r){return t&&ZOe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function XOe(e,t,r){return t=U1(t),qOe(e,nK()?Reflect.construct(t,r||[],U1(e).constructor):t.apply(e,r))}function qOe(e,t){if(t&&($d(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return KOe(e)}function KOe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(nK=function(){return!!e})()}function U1(e){return U1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},U1(e)}function JOe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&OL(e,t)}function OL(e,t){return OL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},OL(e,t)}function _T(e,t,r){return t=iK(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iK(e){var t=QOe(e,"string");return $d(t)=="symbol"?t:t+""}function QOe(e,t){if($d(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if($d(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var eEe=function(t){var r=t.x,n=t.y,i=t.xAxis,a=t.yAxis,o=fN({x:i.scale,y:a.scale}),s=o.apply({x:r,y:n},{bandAware:!0});return jo(t,"discard")&&!o.isInRange(s)?null:s},bT=function(e){function t(){return UOe(this,t),XOe(this,t,arguments)}return JOe(t,e),YOe(t,[{key:"render",value:function(){var n=this.props,i=n.x,a=n.y,o=n.r,s=n.alwaysShow,l=n.clipPathId,u=Ur(i),c=Ur(a);if(Vc(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!c)return null;var f=eEe(this.props);if(!f)return null;var h=f.x,d=f.y,v=this.props,m=v.shape,y=v.className,x=jo(this.props,"hidden")?"url(#".concat(l,")"):void 0,_=K$(K$({clipPath:x},ft(this.props,!0)),{},{cx:h,cy:d});return ee.createElement(Xt,{className:_t("recharts-reference-dot",y)},t.renderDot(m,_),Dn.renderCallByParent(this.props,{x:h-o,y:d-o,width:2*o,height:2*o}))}}])}(ee.Component);_T(bT,"displayName","ReferenceDot");_T(bT,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});_T(bT,"renderDot",function(e,t){var r;return ee.isValidElement(e)?r=ee.cloneElement(e,t):ht(e)?r=e(t):r=ee.createElement(gT,IL({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function EL(){return EL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},EL.apply(this,arguments)}function Fd(e){"@babel/helpers - typeof";return Fd=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},Fd(e)}function J$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Q$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?J$(Object(r),!0).forEach(function(n){wT(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):J$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rEe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,oK(n.key),n)}}function nEe(e,t,r){return t&&rEe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function iEe(e,t,r){return t=Z1(t),aEe(e,aK()?Reflect.construct(t,r||[],Z1(e).constructor):t.apply(e,r))}function aEe(e,t){if(t&&(Fd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oEe(e)}function oEe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function aK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(aK=function(){return!!e})()}function Z1(e){return Z1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Z1(e)}function sEe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&DL(e,t)}function DL(e,t){return DL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},DL(e,t)}function wT(e,t,r){return t=oK(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oK(e){var t=lEe(e,"string");return Fd(t)=="symbol"?t:t+""}function lEe(e,t){if(Fd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Fd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var uEe=function(t,r,n,i,a){var o=a.x1,s=a.x2,l=a.y1,u=a.y2,c=a.xAxis,f=a.yAxis;if(!c||!f)return null;var h=fN({x:c.scale,y:f.scale}),d={x:t?h.x.apply(o,{position:"start"}):h.x.rangeMin,y:n?h.y.apply(l,{position:"start"}):h.y.rangeMin},v={x:r?h.x.apply(s,{position:"end"}):h.x.rangeMax,y:i?h.y.apply(u,{position:"end"}):h.y.rangeMax};return jo(a,"discard")&&(!h.isInRange(d)||!h.isInRange(v))?null:Gq(d,v)},ST=function(e){function t(){return tEe(this,t),iEe(this,t,arguments)}return sEe(t,e),nEe(t,[{key:"render",value:function(){var n=this.props,i=n.x1,a=n.x2,o=n.y1,s=n.y2,l=n.className,u=n.alwaysShow,c=n.clipPathId;Vc(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=Ur(i),h=Ur(a),d=Ur(o),v=Ur(s),m=this.props.shape;if(!f&&!h&&!d&&!v&&!m)return null;var y=uEe(f,h,d,v,this.props);if(!y&&!m)return null;var x=jo(this.props,"hidden")?"url(#".concat(c,")"):void 0;return ee.createElement(Xt,{className:_t("recharts-reference-area",l)},t.renderRect(m,Q$(Q$({clipPath:x},ft(this.props,!0)),y)),Dn.renderCallByParent(this.props,y))}}])}(ee.Component);wT(ST,"displayName","ReferenceArea");wT(ST,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});wT(ST,"renderRect",function(e,t){var r;return ee.isValidElement(e)?r=ee.cloneElement(e,t):ht(e)?r=e(t):r=ee.createElement(cN,EL({},t,{className:"recharts-reference-area-rect"})),r});function sK(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var n=[],i=0;i<e.length;i+=t)n.push(e[i]);return n}function cEe(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return COe(n,r)}function fEe(e,t,r){var n=r==="width",i=e.x,a=e.y,o=e.width,s=e.height;return t===1?{start:n?i:a,end:n?i+o:a+s}:{start:n?i+o:a+s,end:n?i:a}}function Y1(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function hEe(e,t){return sK(e,t+1)}function dEe(e,t,r,n,i){for(var a=(n||[]).slice(),o=t.start,s=t.end,l=0,u=1,c=o,f=function(){var v=n==null?void 0:n[l];if(v===void 0)return{v:sK(n,u)};var m=l,y,x=function(){return y===void 0&&(y=r(v,m)),y},_=v.coordinate,b=l===0||Y1(e,_,x,c,s);b||(l=0,c=o,u+=1),b&&(c=_+e*(x()/2+i),l+=u)},h;u<=a.length;)if(h=f(),h)return h.v;return[]}function cy(e){"@babel/helpers - typeof";return cy=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},cy(e)}function eF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ln(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eF(Object(r),!0).forEach(function(n){vEe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vEe(e,t,r){return t=pEe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pEe(e){var t=gEe(e,"string");return cy(t)=="symbol"?t:t+""}function gEe(e,t){if(cy(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(cy(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mEe(e,t,r,n,i){for(var a=(n||[]).slice(),o=a.length,s=t.start,l=t.end,u=function(h){var d=a[h],v,m=function(){return v===void 0&&(v=r(d,h)),v};if(h===o-1){var y=e*(d.coordinate+e*m()/2-l);a[h]=d=Ln(Ln({},d),{},{tickCoord:y>0?d.coordinate-y*e:d.coordinate})}else a[h]=d=Ln(Ln({},d),{},{tickCoord:d.coordinate});var x=Y1(e,d.tickCoord,m,s,l);x&&(l=d.tickCoord-e*(m()/2+i),a[h]=Ln(Ln({},d),{},{isShow:!0}))},c=o-1;c>=0;c--)u(c);return a}function yEe(e,t,r,n,i,a){var o=(n||[]).slice(),s=o.length,l=t.start,u=t.end;if(a){var c=n[s-1],f=r(c,s-1),h=e*(c.coordinate+e*f/2-u);o[s-1]=c=Ln(Ln({},c),{},{tickCoord:h>0?c.coordinate-h*e:c.coordinate});var d=Y1(e,c.tickCoord,function(){return f},l,u);d&&(u=c.tickCoord-e*(f/2+i),o[s-1]=Ln(Ln({},c),{},{isShow:!0}))}for(var v=a?s-1:s,m=function(_){var b=o[_],S,T=function(){return S===void 0&&(S=r(b,_)),S};if(_===0){var C=e*(b.coordinate-e*T()/2-l);o[_]=b=Ln(Ln({},b),{},{tickCoord:C<0?b.coordinate-C*e:b.coordinate})}else o[_]=b=Ln(Ln({},b),{},{tickCoord:b.coordinate});var A=Y1(e,b.tickCoord,T,l,u);A&&(l=b.tickCoord+e*(T()/2+i),o[_]=Ln(Ln({},b),{},{isShow:!0}))},y=0;y<v;y++)m(y);return o}function xEe(e,t,r){var n=e.tick,i=e.ticks,a=e.viewBox,o=e.minTickGap,s=e.orientation,l=e.interval,u=e.tickFormatter,c=e.unit,f=e.angle;if(!i||!i.length||!n)return[];if(Pe(l)||Af.isSsr)return hEe(i,typeof l=="number"&&Pe(l)?l:0);var h=[],d=s==="top"||s==="bottom"?"width":"height",v=c&&d==="width"?$g(c,{fontSize:t,letterSpacing:r}):{width:0,height:0},m=function(b,S){var T=ht(u)?u(b.value,S):b.value;return d==="width"?cEe($g(T,{fontSize:t,letterSpacing:r}),v,f):$g(T,{fontSize:t,letterSpacing:r})[d]},y=i.length>=2?za(i[1].coordinate-i[0].coordinate):1,x=fEe(a,y,d);return l==="equidistantPreserveStart"?dEe(y,x,m,i,o):(l==="preserveStart"||l==="preserveStartEnd"?h=yEe(y,x,m,i,o,l==="preserveStartEnd"):h=mEe(y,x,m,i,o),h.filter(function(_){return _.isShow}))}var _Ee=["viewBox"],bEe=["viewBox"],wEe=["ticks"];function Vd(e){"@babel/helpers - typeof";return Vd=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},Vd(e)}function Wh(){return Wh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wh.apply(this,arguments)}function tF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Fr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tF(Object(r),!0).forEach(function(n){dN(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function WA(e,t){if(e==null)return{};var r=SEe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function SEe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function TEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rF(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,uK(n.key),n)}}function CEe(e,t,r){return t&&rF(e.prototype,t),r&&rF(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function AEe(e,t,r){return t=X1(t),MEe(e,lK()?Reflect.construct(t,r||[],X1(e).constructor):t.apply(e,r))}function MEe(e,t){if(t&&(Vd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return PEe(e)}function PEe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(lK=function(){return!!e})()}function X1(e){return X1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},X1(e)}function kEe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&NL(e,t)}function NL(e,t){return NL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},NL(e,t)}function dN(e,t,r){return t=uK(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uK(e){var t=LEe(e,"string");return Vd(t)=="symbol"?t:t+""}function LEe(e,t){if(Vd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Vd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var TT=function(e){function t(r){var n;return TEe(this,t),n=AEe(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return kEe(t,e),CEe(t,[{key:"shouldComponentUpdate",value:function(n,i){var a=n.viewBox,o=WA(n,_Ee),s=this.props,l=s.viewBox,u=WA(s,bEe);return!od(a,l)||!od(o,u)||!od(i,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var i=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var i=this.props,a=i.x,o=i.y,s=i.width,l=i.height,u=i.orientation,c=i.tickSize,f=i.mirror,h=i.tickMargin,d,v,m,y,x,_,b=f?-1:1,S=n.tickSize||c,T=Pe(n.tickCoord)?n.tickCoord:n.coordinate;switch(u){case"top":d=v=n.coordinate,y=o+ +!f*l,m=y-b*S,_=m-b*h,x=T;break;case"left":m=y=n.coordinate,v=a+ +!f*s,d=v-b*S,x=d-b*h,_=T;break;case"right":m=y=n.coordinate,v=a+ +f*s,d=v+b*S,x=d+b*h,_=T;break;default:d=v=n.coordinate,y=o+ +f*l,m=y+b*S,_=m+b*h,x=T;break}return{line:{x1:d,y1:m,x2:v,y2:y},tick:{x,y:_}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,o;switch(i){case"left":o=a?"start":"end";break;case"right":o=a?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,o="end";switch(i){case"left":case"right":o="middle";break;case"top":o=a?"start":"end";break;default:o=a?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,l=n.orientation,u=n.mirror,c=n.axisLine,f=Fr(Fr(Fr({},ft(this.props,!1)),ft(c,!1)),{},{fill:"none"});if(l==="top"||l==="bottom"){var h=+(l==="top"&&!u||l==="bottom"&&u);f=Fr(Fr({},f),{},{x1:i,y1:a+h*s,x2:i+o,y2:a+h*s})}else{var d=+(l==="left"&&!u||l==="right"&&u);f=Fr(Fr({},f),{},{x1:i+d*o,y1:a,x2:i+d*o,y2:a+s})}return ee.createElement("line",Wh({},f,{className:_t("recharts-cartesian-axis-line",sa(c,"className"))}))}},{key:"renderTicks",value:function(n,i,a){var o=this,s=this.props,l=s.tickLine,u=s.stroke,c=s.tick,f=s.tickFormatter,h=s.unit,d=xEe(Fr(Fr({},this.props),{},{ticks:n}),i,a),v=this.getTickTextAnchor(),m=this.getTickVerticalAnchor(),y=ft(this.props,!1),x=ft(c,!1),_=Fr(Fr({},y),{},{fill:"none"},ft(l,!1)),b=d.map(function(S,T){var C=o.getTickLineCoord(S),A=C.line,P=C.tick,I=Fr(Fr(Fr(Fr({textAnchor:v,verticalAnchor:m},y),{},{stroke:"none",fill:u},x),P),{},{index:T,payload:S,visibleTicksCount:d.length,tickFormatter:f});return ee.createElement(Xt,Wh({className:"recharts-cartesian-axis-tick",key:"tick-".concat(S.value,"-").concat(S.coordinate,"-").concat(S.tickCoord)},e1(o.props,S,T)),l&&ee.createElement("line",Wh({},_,A,{className:_t("recharts-cartesian-axis-tick-line",sa(l,"className"))})),c&&t.renderTickItem(c,I,"".concat(ht(f)?f(S.value,T):S.value).concat(h||"")))});return ee.createElement("g",{className:"recharts-cartesian-axis-ticks"},b)}},{key:"render",value:function(){var n=this,i=this.props,a=i.axisLine,o=i.width,s=i.height,l=i.ticksGenerator,u=i.className,c=i.hide;if(c)return null;var f=this.props,h=f.ticks,d=WA(f,wEe),v=h;return ht(l)&&(v=h&&h.length>0?l(this.props):l(d)),o<=0||s<=0||!v||!v.length?null:ee.createElement(Xt,{className:_t("recharts-cartesian-axis",u),ref:function(y){n.layerReference=y}},a&&this.renderAxisLine(),this.renderTicks(v,this.state.fontSize,this.state.letterSpacing),Dn.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var o,s=_t(i.className,"recharts-cartesian-axis-tick-value");return ee.isValidElement(n)?o=ee.cloneElement(n,Fr(Fr({},i),{},{className:s})):ht(n)?o=n(Fr(Fr({},i),{},{className:s})):o=ee.createElement(v1,Wh({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])}(G.Component);dN(TT,"displayName","CartesianAxis");dN(TT,"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 IEe=["type","layout","connectNulls","ref"],OEe=["key"];function Gd(e){"@babel/helpers - typeof";return Gd=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},Gd(e)}function nF(e,t){if(e==null)return{};var r=EEe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function EEe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Wg(){return Wg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wg.apply(this,arguments)}function iF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function gi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?iF(Object(r),!0).forEach(function(n){ja(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Jf(e){return REe(e)||jEe(e)||NEe(e)||DEe()}function DEe(){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 NEe(e,t){if(e){if(typeof e=="string")return jL(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jL(e,t)}}function jEe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function REe(e){if(Array.isArray(e))return jL(e)}function jL(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function BEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aF(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,fK(n.key),n)}}function zEe(e,t,r){return t&&aF(e.prototype,t),r&&aF(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function $Ee(e,t,r){return t=q1(t),FEe(e,cK()?Reflect.construct(t,r||[],q1(e).constructor):t.apply(e,r))}function FEe(e,t){if(t&&(Gd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return VEe(e)}function VEe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(cK=function(){return!!e})()}function q1(e){return q1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},q1(e)}function GEe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&RL(e,t)}function RL(e,t){return RL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},RL(e,t)}function ja(e,t,r){return t=fK(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fK(e){var t=WEe(e,"string");return Gd(t)=="symbol"?t:t+""}function WEe(e,t){if(Gd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Gd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var s0=function(e){function t(){var r;BEe(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=$Ee(this,t,[].concat(i)),ja(r,"state",{isAnimationFinished:!0,totalLength:0}),ja(r,"generateSimpleStrokeDasharray",function(o,s){return"".concat(s,"px ").concat(o-s,"px")}),ja(r,"getStrokeDasharray",function(o,s,l){var u=l.reduce(function(x,_){return x+_});if(!u)return r.generateSimpleStrokeDasharray(s,o);for(var c=Math.floor(o/u),f=o%u,h=s-o,d=[],v=0,m=0;v<l.length;m+=l[v],++v)if(m+l[v]>f){d=[].concat(Jf(l.slice(0,v)),[f-m]);break}var y=d.length%2===0?[0,h]:[h];return[].concat(Jf(t.repeat(l,c)),Jf(d),y).map(function(x){return"".concat(x,"px")}).join(", ")}),ja(r,"id",Av("recharts-line-")),ja(r,"pathRef",function(o){r.mainCurve=o}),ja(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),ja(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return GEe(t,e),zEe(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.points,s=a.xAxis,l=a.yAxis,u=a.layout,c=a.children,f=la(c,a0);if(!f)return null;var h=function(m,y){return{x:m.x,y:m.y,value:m.value,errorVal:Yn(m.payload,y)}},d={clipPath:n?"url(#clipPath-".concat(i,")"):null};return ee.createElement(Xt,d,f.map(function(v){return ee.cloneElement(v,{key:"bar-".concat(v.props.dataKey),data:o,xAxis:s,yAxis:l,layout:u,dataPointFormatter:h})}))}},{key:"renderDots",value:function(n,i,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,u=s.points,c=s.dataKey,f=ft(this.props,!1),h=ft(l,!0),d=u.map(function(m,y){var x=gi(gi(gi({key:"dot-".concat(y),r:3},f),h),{},{index:y,cx:m.x,cy:m.y,value:m.value,dataKey:c,payload:m.payload,points:u});return t.renderDotItem(l,x)}),v={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return ee.createElement(Xt,Wg({className:"recharts-line-dots",key:"dots"},v),d)}},{key:"renderCurveStatically",value:function(n,i,a,o){var s=this.props,l=s.type,u=s.layout,c=s.connectNulls;s.ref;var f=nF(s,IEe),h=gi(gi(gi({},ft(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(a,")"):null,points:n},o),{},{type:l,layout:u,connectNulls:c});return ee.createElement(cd,Wg({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,i){var a=this,o=this.props,s=o.points,l=o.strokeDasharray,u=o.isAnimationActive,c=o.animationBegin,f=o.animationDuration,h=o.animationEasing,d=o.animationId,v=o.animateNewValues,m=o.width,y=o.height,x=this.state,_=x.prevPoints,b=x.totalLength;return ee.createElement(Go,{begin:c,duration:f,isActive:u,easing:h,from:{t:0},to:{t:1},key:"line-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(S){var T=S.t;if(_){var C=_.length/s.length,A=s.map(function(D,N){var z=Math.floor(N*C);if(_[z]){var V=_[z],F=gn(V.x,D.x),$=gn(V.y,D.y);return gi(gi({},D),{},{x:F(T),y:$(T)})}if(v){var B=gn(m*2,D.x),H=gn(y/2,D.y);return gi(gi({},D),{},{x:B(T),y:H(T)})}return gi(gi({},D),{},{x:D.x,y:D.y})});return a.renderCurveStatically(A,n,i)}var P=gn(0,b),I=P(T),k;if(l){var E="".concat(l).split(/[,\s]+/gim).map(function(D){return parseFloat(D)});k=a.getStrokeDasharray(I,b,E)}else k=a.generateSimpleStrokeDasharray(b,I);return a.renderCurveStatically(s,n,i,{strokeDasharray:k})})}},{key:"renderCurve",value:function(n,i){var a=this.props,o=a.points,s=a.isAnimationActive,l=this.state,u=l.prevPoints,c=l.totalLength;return s&&o&&o.length&&(!u&&c>0||!Ed(u,o))?this.renderCurveWithAnimation(n,i):this.renderCurveStatically(o,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,o=i.dot,s=i.points,l=i.className,u=i.xAxis,c=i.yAxis,f=i.top,h=i.left,d=i.width,v=i.height,m=i.isAnimationActive,y=i.id;if(a||!s||!s.length)return null;var x=this.state.isAnimationFinished,_=s.length===1,b=_t("recharts-line",l),S=u&&u.allowDataOverflow,T=c&&c.allowDataOverflow,C=S||T,A=vt(y)?this.id:y,P=(n=ft(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},I=P.r,k=I===void 0?3:I,E=P.strokeWidth,D=E===void 0?2:E,N=hY(o)?o:{},z=N.clipDot,V=z===void 0?!0:z,F=k*2+D;return ee.createElement(Xt,{className:b},S||T?ee.createElement("defs",null,ee.createElement("clipPath",{id:"clipPath-".concat(A)},ee.createElement("rect",{x:S?h:h-d/2,y:T?f:f-v/2,width:S?d:d*2,height:T?v:v*2})),!V&&ee.createElement("clipPath",{id:"clipPath-dots-".concat(A)},ee.createElement("rect",{x:h-F/2,y:f-F/2,width:d+F,height:v+F}))):null,!_&&this.renderCurve(C,A),this.renderErrorBar(C,A),(_||o)&&this.renderDots(C,V,A),(!m||x)&&ks.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:i.curPoints}:n.points!==i.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,i){for(var a=n.length%2!==0?[].concat(Jf(n),[0]):n,o=[],s=0;s<i;++s)o=[].concat(Jf(o),Jf(a));return o}},{key:"renderDotItem",value:function(n,i){var a;if(ee.isValidElement(n))a=ee.cloneElement(n,i);else if(ht(n))a=n(i);else{var o=i.key,s=nF(i,OEe),l=_t("recharts-line-dot",typeof n!="boolean"?n.className:"");a=ee.createElement(gT,Wg({key:o},s,{className:l}))}return a}}])}(G.PureComponent);ja(s0,"displayName","Line");ja(s0,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!Af.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});ja(s0,"getComposedData",function(e){var t=e.props,r=e.xAxis,n=e.yAxis,i=e.xAxisTicks,a=e.yAxisTicks,o=e.dataKey,s=e.bandSize,l=e.displayedData,u=e.offset,c=t.layout,f=l.map(function(h,d){var v=Yn(h,o);return c==="horizontal"?{x:k1({axis:r,ticks:i,bandSize:s,entry:h,index:d}),y:vt(v)?null:n.scale(v),value:v,payload:h}:{x:vt(v)?null:r.scale(v),y:k1({axis:n,ticks:a,bandSize:s,entry:h,index:d}),value:v,payload:h}});return gi({points:f,layout:c},u)});var HEe=["layout","type","stroke","connectNulls","isRange","ref"],UEe=["key"],hK;function Wd(e){"@babel/helpers - typeof";return Wd=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},Wd(e)}function dK(e,t){if(e==null)return{};var r=ZEe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ZEe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Oc(){return Oc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Oc.apply(this,arguments)}function oF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oF(Object(r),!0).forEach(function(n){Ao(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function YEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sF(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,pK(n.key),n)}}function XEe(e,t,r){return t&&sF(e.prototype,t),r&&sF(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function qEe(e,t,r){return t=K1(t),KEe(e,vK()?Reflect.construct(t,r||[],K1(e).constructor):t.apply(e,r))}function KEe(e,t){if(t&&(Wd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return JEe(e)}function JEe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vK=function(){return!!e})()}function K1(e){return K1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},K1(e)}function QEe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&BL(e,t)}function BL(e,t){return BL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},BL(e,t)}function Ao(e,t,r){return t=pK(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pK(e){var t=eDe(e,"string");return Wd(t)=="symbol"?t:t+""}function eDe(e,t){if(Wd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Wd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Cu=function(e){function t(){var r;YEe(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=qEe(this,t,[].concat(i)),Ao(r,"state",{isAnimationFinished:!0}),Ao(r,"id",Av("recharts-area-")),Ao(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),ht(o)&&o()}),Ao(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),ht(o)&&o()}),r}return QEe(t,e),XEe(t,[{key:"renderDots",value:function(n,i,a){var o=this.props.isAnimationActive,s=this.state.isAnimationFinished;if(o&&!s)return null;var l=this.props,u=l.dot,c=l.points,f=l.dataKey,h=ft(this.props,!1),d=ft(u,!0),v=c.map(function(y,x){var _=yl(yl(yl({key:"dot-".concat(x),r:3},h),d),{},{index:x,cx:y.x,cy:y.y,dataKey:f,value:y.value,payload:y.payload,points:c});return t.renderDotItem(u,_)}),m={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return ee.createElement(Xt,Oc({className:"recharts-area-dots"},m),v)}},{key:"renderHorizontalRect",value:function(n){var i=this.props,a=i.baseLine,o=i.points,s=i.strokeWidth,l=o[0].x,u=o[o.length-1].x,c=n*Math.abs(l-u),f=Ol(o.map(function(h){return h.y||0}));return Pe(a)&&typeof a=="number"?f=Math.max(a,f):a&&Array.isArray(a)&&a.length&&(f=Math.max(Ol(a.map(function(h){return h.y||0})),f)),Pe(f)?ee.createElement("rect",{x:l<u?l:l-c,y:0,width:c,height:Math.floor(f+(s?parseInt("".concat(s),10):1))}):null}},{key:"renderVerticalRect",value:function(n){var i=this.props,a=i.baseLine,o=i.points,s=i.strokeWidth,l=o[0].y,u=o[o.length-1].y,c=n*Math.abs(l-u),f=Ol(o.map(function(h){return h.x||0}));return Pe(a)&&typeof a=="number"?f=Math.max(a,f):a&&Array.isArray(a)&&a.length&&(f=Math.max(Ol(a.map(function(h){return h.x||0})),f)),Pe(f)?ee.createElement("rect",{x:0,y:l<u?l:l-c,width:f+(s?parseInt("".concat(s),10):1),height:Math.floor(c)}):null}},{key:"renderClipRect",value:function(n){var i=this.props.layout;return i==="vertical"?this.renderVerticalRect(n):this.renderHorizontalRect(n)}},{key:"renderAreaStatically",value:function(n,i,a,o){var s=this.props,l=s.layout,u=s.type,c=s.stroke,f=s.connectNulls,h=s.isRange;s.ref;var d=dK(s,HEe);return ee.createElement(Xt,{clipPath:a?"url(#clipPath-".concat(o,")"):null},ee.createElement(cd,Oc({},ft(d,!0),{points:n,connectNulls:f,type:u,baseLine:i,layout:l,stroke:"none",className:"recharts-area-area"})),c!=="none"&&ee.createElement(cd,Oc({},ft(this.props,!1),{className:"recharts-area-curve",layout:l,type:u,connectNulls:f,fill:"none",points:n})),c!=="none"&&h&&ee.createElement(cd,Oc({},ft(this.props,!1),{className:"recharts-area-curve",layout:l,type:u,connectNulls:f,fill:"none",points:i})))}},{key:"renderAreaWithAnimation",value:function(n,i){var a=this,o=this.props,s=o.points,l=o.baseLine,u=o.isAnimationActive,c=o.animationBegin,f=o.animationDuration,h=o.animationEasing,d=o.animationId,v=this.state,m=v.prevPoints,y=v.prevBaseLine;return ee.createElement(Go,{begin:c,duration:f,isActive:u,easing:h,from:{t:0},to:{t:1},key:"area-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(x){var _=x.t;if(m){var b=m.length/s.length,S=s.map(function(P,I){var k=Math.floor(I*b);if(m[k]){var E=m[k],D=gn(E.x,P.x),N=gn(E.y,P.y);return yl(yl({},P),{},{x:D(_),y:N(_)})}return P}),T;if(Pe(l)&&typeof l=="number"){var C=gn(y,l);T=C(_)}else if(vt(l)||Cv(l)){var A=gn(y,0);T=A(_)}else T=l.map(function(P,I){var k=Math.floor(I*b);if(y[k]){var E=y[k],D=gn(E.x,P.x),N=gn(E.y,P.y);return yl(yl({},P),{},{x:D(_),y:N(_)})}return P});return a.renderAreaStatically(S,T,n,i)}return ee.createElement(Xt,null,ee.createElement("defs",null,ee.createElement("clipPath",{id:"animationClipPath-".concat(i)},a.renderClipRect(_))),ee.createElement(Xt,{clipPath:"url(#animationClipPath-".concat(i,")")},a.renderAreaStatically(s,l,n,i)))})}},{key:"renderArea",value:function(n,i){var a=this.props,o=a.points,s=a.baseLine,l=a.isAnimationActive,u=this.state,c=u.prevPoints,f=u.prevBaseLine,h=u.totalLength;return l&&o&&o.length&&(!c&&h>0||!Ed(c,o)||!Ed(f,s))?this.renderAreaWithAnimation(n,i):this.renderAreaStatically(o,s,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,o=i.dot,s=i.points,l=i.className,u=i.top,c=i.left,f=i.xAxis,h=i.yAxis,d=i.width,v=i.height,m=i.isAnimationActive,y=i.id;if(a||!s||!s.length)return null;var x=this.state.isAnimationFinished,_=s.length===1,b=_t("recharts-area",l),S=f&&f.allowDataOverflow,T=h&&h.allowDataOverflow,C=S||T,A=vt(y)?this.id:y,P=(n=ft(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},I=P.r,k=I===void 0?3:I,E=P.strokeWidth,D=E===void 0?2:E,N=hY(o)?o:{},z=N.clipDot,V=z===void 0?!0:z,F=k*2+D;return ee.createElement(Xt,{className:b},S||T?ee.createElement("defs",null,ee.createElement("clipPath",{id:"clipPath-".concat(A)},ee.createElement("rect",{x:S?c:c-d/2,y:T?u:u-v/2,width:S?d:d*2,height:T?v:v*2})),!V&&ee.createElement("clipPath",{id:"clipPath-dots-".concat(A)},ee.createElement("rect",{x:c-F/2,y:u-F/2,width:d+F,height:v+F}))):null,_?null:this.renderArea(C,A),(o||_)&&this.renderDots(C,V,A),(!m||x)&&ks.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:n.points!==i.curPoints||n.baseLine!==i.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}])}(G.PureComponent);hK=Cu;Ao(Cu,"displayName","Area");Ao(Cu,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Af.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Ao(Cu,"getBaseValue",function(e,t,r,n){var i=e.layout,a=e.baseValue,o=t.props.baseValue,s=o??a;if(Pe(s)&&typeof s=="number")return s;var l=i==="horizontal"?n:r,u=l.scale.domain();if(l.type==="number"){var c=Math.max(u[0],u[1]),f=Math.min(u[0],u[1]);return s==="dataMin"?f:s==="dataMax"||c<0?c:Math.max(Math.min(u[0],u[1]),0)}return s==="dataMin"?u[0]:s==="dataMax"?u[1]:u[0]});Ao(Cu,"getComposedData",function(e){var t=e.props,r=e.item,n=e.xAxis,i=e.yAxis,a=e.xAxisTicks,o=e.yAxisTicks,s=e.bandSize,l=e.dataKey,u=e.stackedData,c=e.dataStartIndex,f=e.displayedData,h=e.offset,d=t.layout,v=u&&u.length,m=hK.getBaseValue(t,r,n,i),y=d==="horizontal",x=!1,_=f.map(function(S,T){var C;v?C=u[c+T]:(C=Yn(S,l),Array.isArray(C)?x=!0:C=[m,C]);var A=C[1]==null||v&&Yn(S,l)==null;return y?{x:k1({axis:n,ticks:a,bandSize:s,entry:S,index:T}),y:A?null:i.scale(C[1]),value:C,payload:S}:{x:A?null:n.scale(C[1]),y:k1({axis:i,ticks:o,bandSize:s,entry:S,index:T}),value:C,payload:S}}),b;return v||x?b=_.map(function(S){var T=Array.isArray(S.value)?S.value[0]:null;return y?{x:S.x,y:T!=null&&S.y!=null?i.scale(T):null}:{x:T!=null?n.scale(T):null,y:S.y}}):b=y?i.scale(m):n.scale(m),yl({points:_,baseLine:b,layout:d,isRange:x},h)});Ao(Cu,"renderDotItem",function(e,t){var r;if(ee.isValidElement(e))r=ee.cloneElement(e,t);else if(ht(e))r=e(t);else{var n=_t("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,a=dK(t,UEe);r=ee.createElement(gT,Oc({},a,{key:i,className:n}))}return r});function Hd(e){"@babel/helpers - typeof";return Hd=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},Hd(e)}function tDe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rDe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,yK(n.key),n)}}function nDe(e,t,r){return t&&rDe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function iDe(e,t,r){return t=J1(t),aDe(e,gK()?Reflect.construct(t,r||[],J1(e).constructor):t.apply(e,r))}function aDe(e,t){if(t&&(Hd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oDe(e)}function oDe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(gK=function(){return!!e})()}function J1(e){return J1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},J1(e)}function sDe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zL(e,t)}function zL(e,t){return zL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},zL(e,t)}function mK(e,t,r){return t=yK(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yK(e){var t=lDe(e,"string");return Hd(t)=="symbol"?t:t+""}function lDe(e,t){if(Hd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Hd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function $L(){return $L=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$L.apply(this,arguments)}function uDe(e){var t=e.xAxisId,r=Qq(),n=eK(),i=Kq(t);return i==null?null:G.createElement(TT,$L({},i,{className:_t("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(o){return Ic(o,!0)}}))}var Dv=function(e){function t(){return tDe(this,t),iDe(this,t,arguments)}return sDe(t,e),nDe(t,[{key:"render",value:function(){return G.createElement(uDe,this.props)}}])}(G.Component);mK(Dv,"displayName","XAxis");mK(Dv,"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 Ud(e){"@babel/helpers - typeof";return Ud=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},Ud(e)}function cDe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fDe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,bK(n.key),n)}}function hDe(e,t,r){return t&&fDe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function dDe(e,t,r){return t=Q1(t),vDe(e,xK()?Reflect.construct(t,r||[],Q1(e).constructor):t.apply(e,r))}function vDe(e,t){if(t&&(Ud(t)==="object"||typeof t=="function"))return t;if(t!==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 xK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(xK=function(){return!!e})()}function Q1(e){return Q1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Q1(e)}function gDe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&FL(e,t)}function FL(e,t){return FL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},FL(e,t)}function _K(e,t,r){return t=bK(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bK(e){var t=mDe(e,"string");return Ud(t)=="symbol"?t:t+""}function mDe(e,t){if(Ud(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ud(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function VL(){return VL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},VL.apply(this,arguments)}var yDe=function(t){var r=t.yAxisId,n=Qq(),i=eK(),a=Jq(r);return a==null?null:G.createElement(TT,VL({},a,{className:_t("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:i},ticksGenerator:function(s){return Ic(s,!0)}}))},Nv=function(e){function t(){return cDe(this,t),dDe(this,t,arguments)}return gDe(t,e),hDe(t,[{key:"render",value:function(){return G.createElement(yDe,this.props)}}])}(G.Component);_K(Nv,"displayName","YAxis");_K(Nv,"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 lF(e){return wDe(e)||bDe(e)||_De(e)||xDe()}function xDe(){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 _De(e,t){if(e){if(typeof e=="string")return GL(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return GL(e,t)}}function bDe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wDe(e){if(Array.isArray(e))return GL(e)}function GL(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var WL=function(t,r,n,i,a){var o=la(t,uy),s=la(t,bT),l=[].concat(lF(o),lF(s)),u=la(t,ST),c="".concat(i,"Id"),f=i[0],h=r;if(l.length&&(h=l.reduce(function(m,y){if(y.props[c]===n&&jo(y.props,"extendDomain")&&Pe(y.props[f])){var x=y.props[f];return[Math.min(m[0],x),Math.max(m[1],x)]}return m},h)),u.length){var d="".concat(f,"1"),v="".concat(f,"2");h=u.reduce(function(m,y){if(y.props[c]===n&&jo(y.props,"extendDomain")&&Pe(y.props[d])&&Pe(y.props[v])){var x=y.props[d],_=y.props[v];return[Math.min(m[0],x,_),Math.max(m[1],x,_)]}return m},h)}return a&&a.length&&(h=a.reduce(function(m,y){return Pe(y)?[Math.min(m[0],y),Math.max(m[1],y)]:m},h)),h},wK={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(l,u,c){this.fn=l,this.context=u,this.once=c||!1}function a(l,u,c,f,h){if(typeof c!="function")throw new TypeError("The listener must be a function");var d=new i(c,f||l,h),v=r?r+u:u;return l._events[v]?l._events[v].fn?l._events[v]=[l._events[v],d]:l._events[v].push(d):(l._events[v]=d,l._eventsCount++),l}function o(l,u){--l._eventsCount===0?l._events=new n:delete l._events[u]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var u=[],c,f;if(this._eventsCount===0)return u;for(f in c=this._events)t.call(c,f)&&u.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(c)):u},s.prototype.listeners=function(u){var c=r?r+u:u,f=this._events[c];if(!f)return[];if(f.fn)return[f.fn];for(var h=0,d=f.length,v=new Array(d);h<d;h++)v[h]=f[h].fn;return v},s.prototype.listenerCount=function(u){var c=r?r+u:u,f=this._events[c];return f?f.fn?1:f.length:0},s.prototype.emit=function(u,c,f,h,d,v){var m=r?r+u:u;if(!this._events[m])return!1;var y=this._events[m],x=arguments.length,_,b;if(y.fn){switch(y.once&&this.removeListener(u,y.fn,void 0,!0),x){case 1:return y.fn.call(y.context),!0;case 2:return y.fn.call(y.context,c),!0;case 3:return y.fn.call(y.context,c,f),!0;case 4:return y.fn.call(y.context,c,f,h),!0;case 5:return y.fn.call(y.context,c,f,h,d),!0;case 6:return y.fn.call(y.context,c,f,h,d,v),!0}for(b=1,_=new Array(x-1);b<x;b++)_[b-1]=arguments[b];y.fn.apply(y.context,_)}else{var S=y.length,T;for(b=0;b<S;b++)switch(y[b].once&&this.removeListener(u,y[b].fn,void 0,!0),x){case 1:y[b].fn.call(y[b].context);break;case 2:y[b].fn.call(y[b].context,c);break;case 3:y[b].fn.call(y[b].context,c,f);break;case 4:y[b].fn.call(y[b].context,c,f,h);break;default:if(!_)for(T=1,_=new Array(x-1);T<x;T++)_[T-1]=arguments[T];y[b].fn.apply(y[b].context,_)}}return!0},s.prototype.on=function(u,c,f){return a(this,u,c,f,!1)},s.prototype.once=function(u,c,f){return a(this,u,c,f,!0)},s.prototype.removeListener=function(u,c,f,h){var d=r?r+u:u;if(!this._events[d])return this;if(!c)return o(this,d),this;var v=this._events[d];if(v.fn)v.fn===c&&(!h||v.once)&&(!f||v.context===f)&&o(this,d);else{for(var m=0,y=[],x=v.length;m<x;m++)(v[m].fn!==c||h&&!v[m].once||f&&v[m].context!==f)&&y.push(v[m]);y.length?this._events[d]=y.length===1?y[0]:y:o(this,d)}return this},s.prototype.removeAllListeners=function(u){var c;return u?(c=r?r+u:u,this._events[c]&&o(this,c)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s})(wK);var SDe=wK.exports;const TDe=Ft(SDe);var HA=new TDe,UA="recharts.syncMouseEvents";function fy(e){"@babel/helpers - typeof";return fy=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},fy(e)}function CDe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ADe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,SK(n.key),n)}}function MDe(e,t,r){return t&&ADe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ZA(e,t,r){return t=SK(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function SK(e){var t=PDe(e,"string");return fy(t)=="symbol"?t:t+""}function PDe(e,t){if(fy(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(fy(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var kDe=function(){function e(){CDe(this,e),ZA(this,"activeIndex",0),ZA(this,"coordinateList",[]),ZA(this,"layout","horizontal")}return MDe(e,[{key:"setDetails",value:function(r){var n,i=r.coordinateList,a=i===void 0?null:i,o=r.container,s=o===void 0?null:o,l=r.layout,u=l===void 0?null:l,c=r.offset,f=c===void 0?null:c,h=r.mouseHandlerCallback,d=h===void 0?null:h;this.coordinateList=(n=a??this.coordinateList)!==null&&n!==void 0?n:[],this.container=s??this.container,this.layout=u??this.layout,this.offset=f??this.offset,this.mouseHandlerCallback=d??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(r){if(this.coordinateList.length!==0)switch(r.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(r){this.activeIndex=r}},{key:"spoofMouse",value:function(){var r,n;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),a=i.x,o=i.y,s=i.height,l=this.coordinateList[this.activeIndex].coordinate,u=((r=window)===null||r===void 0?void 0:r.scrollX)||0,c=((n=window)===null||n===void 0?void 0:n.scrollY)||0,f=a+l+u,h=o+this.offset.top+s/2+c;this.mouseHandlerCallback({pageX:f,pageY:h})}}}])}();function LDe(e,t,r){if(r==="number"&&t===!0&&Array.isArray(e)){var n=e==null?void 0:e[0],i=e==null?void 0:e[1];if(n&&i&&Pe(n)&&Pe(i))return!0}return!1}function IDe(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function TK(e){var t=e.cx,r=e.cy,n=e.radius,i=e.startAngle,a=e.endAngle,o=mn(t,r,n,i),s=mn(t,r,n,a);return{points:[o,s],cx:t,cy:r,radius:n,startAngle:i,endAngle:a}}function ODe(e,t,r){var n,i,a,o;if(e==="horizontal")n=t.x,a=n,i=r.top,o=r.top+r.height;else if(e==="vertical")i=t.y,o=i,n=r.left,a=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var s=t.cx,l=t.cy,u=t.innerRadius,c=t.outerRadius,f=t.angle,h=mn(s,l,u,f),d=mn(s,l,c,f);n=h.x,i=h.y,a=d.x,o=d.y}else return TK(t);return[{x:n,y:i},{x:a,y:o}]}function hy(e){"@babel/helpers - typeof";return hy=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},hy(e)}function uF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Cx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uF(Object(r),!0).forEach(function(n){EDe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function EDe(e,t,r){return t=DDe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function DDe(e){var t=NDe(e,"string");return hy(t)=="symbol"?t:t+""}function NDe(e,t){if(hy(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(hy(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jDe(e){var t,r,n=e.element,i=e.tooltipEventType,a=e.isActive,o=e.activeCoordinate,s=e.activePayload,l=e.offset,u=e.activeTooltipIndex,c=e.tooltipAxisBandSize,f=e.layout,h=e.chartName,d=(t=n.props.cursor)!==null&&t!==void 0?t:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!d||!a||!o||h!=="ScatterChart"&&i!=="axis")return null;var v,m=cd;if(h==="ScatterChart")v=o,m=nLe;else if(h==="BarChart")v=IDe(f,o,l,c),m=cN;else if(f==="radial"){var y=TK(o),x=y.cx,_=y.cy,b=y.radius,S=y.startAngle,T=y.endAngle;v={cx:x,cy:_,startAngle:S,endAngle:T,innerRadius:b,outerRadius:b},m=Sq}else v={points:ODe(f,o,l)},m=cd;var C=Cx(Cx(Cx(Cx({stroke:"#ccc",pointerEvents:"none"},l),v),ft(d,!1)),{},{payload:s,payloadIndex:u,className:_t("recharts-tooltip-cursor",d.className)});return G.isValidElement(d)?G.cloneElement(d,C):G.createElement(m,C)}var RDe=["item"],BDe=["children","className","width","height","style","compact","title","desc"];function Zd(e){"@babel/helpers - typeof";return Zd=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},Zd(e)}function Hh(){return Hh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hh.apply(this,arguments)}function cF(e,t){return FDe(e)||$De(e,t)||AK(e,t)||zDe()}function zDe(){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 $De(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function FDe(e){if(Array.isArray(e))return e}function fF(e,t){if(e==null)return{};var r=VDe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function VDe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function GDe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function WDe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,MK(n.key),n)}}function HDe(e,t,r){return t&&WDe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function UDe(e,t,r){return t=ew(t),ZDe(e,CK()?Reflect.construct(t,r||[],ew(e).constructor):t.apply(e,r))}function ZDe(e,t){if(t&&(Zd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return YDe(e)}function YDe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function CK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(CK=function(){return!!e})()}function ew(e){return ew=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ew(e)}function XDe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&HL(e,t)}function HL(e,t){return HL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},HL(e,t)}function Yd(e){return JDe(e)||KDe(e)||AK(e)||qDe()}function qDe(){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 AK(e,t){if(e){if(typeof e=="string")return UL(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return UL(e,t)}}function KDe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function JDe(e){if(Array.isArray(e))return UL(e)}function UL(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function hF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function he(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hF(Object(r),!0).forEach(function(n){Ke(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ke(e,t,r){return t=MK(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MK(e){var t=QDe(e,"string");return Zd(t)=="symbol"?t:t+""}function QDe(e,t){if(Zd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Zd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var eNe={xAxis:["bottom","top"],yAxis:["left","right"]},tNe={width:"100%",height:"100%"},PK={x:0,y:0};function Ax(e){return e}var rNe=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},nNe=function(t,r,n,i){var a=r.find(function(c){return c&&c.index===n});if(a){if(t==="horizontal")return{x:a.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:a.coordinate};if(t==="centric"){var o=a.coordinate,s=i.radius;return he(he(he({},i),mn(i.cx,i.cy,s,o)),{},{angle:o,radius:s})}var l=a.coordinate,u=i.angle;return he(he(he({},i),mn(i.cx,i.cy,l,u)),{},{angle:u,radius:l})}return PK},CT=function(t,r){var n=r.graphicalItems,i=r.dataStartIndex,a=r.dataEndIndex,o=(n??[]).reduce(function(s,l){var u=l.props.data;return u&&u.length?[].concat(Yd(s),Yd(u)):s},[]);return o.length>0?o:t&&t.length&&Pe(i)&&Pe(a)?t.slice(i,a+1):[]};function kK(e){return e==="number"?[0,"auto"]:void 0}var ZL=function(t,r,n,i){var a=t.graphicalItems,o=t.tooltipAxis,s=CT(r,t);return n<0||!a||!a.length||n>=s.length?null:a.reduce(function(l,u){var c,f=(c=u.props.data)!==null&&c!==void 0?c:r;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(o.dataKey&&!o.allowDuplicatedCategory){var d=f===void 0?s:f;h=Jb(d,o.dataKey,i)}else h=f&&f[n]||s[n];return h?[].concat(Yd(l),[_q(u,h)]):l},[])},dF=function(t,r,n,i){var a=i||{x:t.chartX,y:t.chartY},o=rNe(a,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,c=N2e(o,s,u,l);if(c>=0&&u){var f=u[c]&&u[c].value,h=ZL(t,r,c,f),d=nNe(n,s,c,a);return{activeTooltipIndex:c,activeLabel:f,activePayload:h,activeCoordinate:d}}return null},iNe=function(t,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.layout,f=t.children,h=t.stackOffset,d=yq(c,a);return n.reduce(function(v,m){var y,x=m.type.defaultProps!==void 0?he(he({},m.type.defaultProps),m.props):m.props,_=x.type,b=x.dataKey,S=x.allowDataOverflow,T=x.allowDuplicatedCategory,C=x.scale,A=x.ticks,P=x.includeHidden,I=x[o];if(v[I])return v;var k=CT(t.data,{graphicalItems:i.filter(function(Z){var Q,re=o in Z.props?Z.props[o]:(Q=Z.type.defaultProps)===null||Q===void 0?void 0:Q[o];return re===I}),dataStartIndex:l,dataEndIndex:u}),E=k.length,D,N,z;LDe(x.domain,S,_)&&(D=cL(x.domain,null,S),d&&(_==="number"||C!=="auto")&&(z=Vg(k,b,"category")));var V=kK(_);if(!D||D.length===0){var F,$=(F=x.domain)!==null&&F!==void 0?F:V;if(b){if(D=Vg(k,b,_),_==="category"&&d){var B=wve(D);T&&B?(N=D,D=$1(0,E)):T||(D=Y4($,D,m).reduce(function(Z,Q){return Z.indexOf(Q)>=0?Z:[].concat(Yd(Z),[Q])},[]))}else if(_==="category")T?D=D.filter(function(Z){return Z!==""&&!vt(Z)}):D=Y4($,D,m).reduce(function(Z,Q){return Z.indexOf(Q)>=0||Q===""||vt(Q)?Z:[].concat(Yd(Z),[Q])},[]);else if(_==="number"){var H=$2e(k,i.filter(function(Z){var Q,re,ue=o in Z.props?Z.props[o]:(Q=Z.type.defaultProps)===null||Q===void 0?void 0:Q[o],de="hide"in Z.props?Z.props.hide:(re=Z.type.defaultProps)===null||re===void 0?void 0:re.hide;return ue===I&&(P||!de)}),b,a,c);H&&(D=H)}d&&(_==="number"||C!=="auto")&&(z=Vg(k,b,"category"))}else d?D=$1(0,E):s&&s[I]&&s[I].hasStack&&_==="number"?D=h==="expand"?[0,1]:xq(s[I].stackGroups,l,u):D=mq(k,i.filter(function(Z){var Q=o in Z.props?Z.props[o]:Z.type.defaultProps[o],re="hide"in Z.props?Z.props.hide:Z.type.defaultProps.hide;return Q===I&&(P||!re)}),_,c,!0);if(_==="number")D=WL(f,D,I,a,A),$&&(D=cL($,D,S));else if(_==="category"&&$){var U=$,Y=D.every(function(Z){return U.indexOf(Z)>=0});Y&&(D=U)}}return he(he({},v),{},Ke({},I,he(he({},x),{},{axisType:a,domain:D,categoricalDomain:z,duplicateDomain:N,originalDomain:(y=x.domain)!==null&&y!==void 0?y:V,isCategorical:d,layout:c})))},{})},aNe=function(t,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.layout,f=t.children,h=CT(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:u}),d=h.length,v=yq(c,a),m=-1;return n.reduce(function(y,x){var _=x.type.defaultProps!==void 0?he(he({},x.type.defaultProps),x.props):x.props,b=_[o],S=kK("number");if(!y[b]){m++;var T;return v?T=$1(0,d):s&&s[b]&&s[b].hasStack?(T=xq(s[b].stackGroups,l,u),T=WL(f,T,b,a)):(T=cL(S,mq(h,n.filter(function(C){var A,P,I=o in C.props?C.props[o]:(A=C.type.defaultProps)===null||A===void 0?void 0:A[o],k="hide"in C.props?C.props.hide:(P=C.type.defaultProps)===null||P===void 0?void 0:P.hide;return I===b&&!k}),"number",c),i.defaultProps.allowDataOverflow),T=WL(f,T,b,a)),he(he({},y),{},Ke({},b,he(he({axisType:a},i.defaultProps),{},{hide:!0,orientation:sa(eNe,"".concat(a,".").concat(m%2),null),domain:T,originalDomain:S,isCategorical:v,layout:c})))}return y},{})},oNe=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,o=r.graphicalItems,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.children,f="".concat(i,"Id"),h=la(c,a),d={};return h&&h.length?d=iNe(t,{axes:h,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u}):o&&o.length&&(d=aNe(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u})),d},sNe=function(t){var r=Ah(t),n=Ic(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:RD(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:L1(r,n)}},vF=function(t){var r=t.children,n=t.defaultShowTooltip,i=xi(r,Rd),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},lNe=function(t){return!t||!t.length?!1:t.some(function(r){var n=Ms(r&&r.type);return n&&n.indexOf("Bar")>=0})},pF=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},uNe=function(t,r){var n=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,s=t.yAxisMap,l=s===void 0?{}:s,u=n.width,c=n.height,f=n.children,h=n.margin||{},d=xi(f,Rd),v=xi(f,sd),m=Object.keys(l).reduce(function(T,C){var A=l[C],P=A.orientation;return!A.mirror&&!A.hide?he(he({},T),{},Ke({},P,T[P]+A.width)):T},{left:h.left||0,right:h.right||0}),y=Object.keys(o).reduce(function(T,C){var A=o[C],P=A.orientation;return!A.mirror&&!A.hide?he(he({},T),{},Ke({},P,sa(T,"".concat(P))+A.height)):T},{top:h.top||0,bottom:h.bottom||0}),x=he(he({},y),m),_=x.bottom;d&&(x.bottom+=d.props.height||Rd.defaultProps.height),v&&r&&(x=B2e(x,i,n,r));var b=u-x.left-x.right,S=c-x.top-x.bottom;return he(he({brushBottom:_},x),{},{width:Math.max(b,0),height:Math.max(S,0)})},cNe=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},LK=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,s=o===void 0?["axis"]:o,l=t.axisComponents,u=t.legendContent,c=t.formatAxisMap,f=t.defaultProps,h=function(x,_){var b=_.graphicalItems,S=_.stackGroups,T=_.offset,C=_.updateId,A=_.dataStartIndex,P=_.dataEndIndex,I=x.barSize,k=x.layout,E=x.barGap,D=x.barCategoryGap,N=x.maxBarSize,z=pF(k),V=z.numericAxisName,F=z.cateAxisName,$=lNe(b),B=[];return b.forEach(function(H,U){var Y=CT(x.data,{graphicalItems:[H],dataStartIndex:A,dataEndIndex:P}),Z=H.type.defaultProps!==void 0?he(he({},H.type.defaultProps),H.props):H.props,Q=Z.dataKey,re=Z.maxBarSize,ue=Z["".concat(V,"Id")],de=Z["".concat(F,"Id")],Re={},xe=l.reduce(function(_r,Pr){var Cn=_["".concat(Pr.axisType,"Map")],no=Z["".concat(Pr.axisType,"Id")];Cn&&Cn[no]||Pr.axisType==="zAxis"||uf();var L0=Cn[no];return he(he({},_r),{},Ke(Ke({},Pr.axisType,L0),"".concat(Pr.axisType,"Ticks"),Ic(L0)))},Re),ie=xe[F],ve=xe["".concat(F,"Ticks")],ce=S&&S[ue]&&S[ue].hasStack&&J2e(H,S[ue].stackGroups),X=Ms(H.type).indexOf("Bar")>=0,te=L1(ie,ve),pe=[],Te=$&&j2e({barSize:I,stackGroups:S,totalSize:cNe(xe,F)});if(X){var Me,Xe,At=vt(re)?N:re,Wt=(Me=(Xe=L1(ie,ve,!0))!==null&&Xe!==void 0?Xe:At)!==null&&Me!==void 0?Me:0;pe=R2e({barGap:E,barCategoryGap:D,bandSize:Wt!==te?Wt:te,sizeList:Te[de],maxBarSize:At}),Wt!==te&&(pe=pe.map(function(_r){return he(he({},_r),{},{position:he(he({},_r.position),{},{offset:_r.position.offset-Wt/2})})}))}var $r=H&&H.type&&H.type.getComposedData;$r&&B.push({props:he(he({},$r(he(he({},xe),{},{displayedData:Y,props:x,dataKey:Q,item:H,bandSize:te,barPosition:pe,offset:T,stackedData:ce,layout:k,dataStartIndex:A,dataEndIndex:P}))),{},Ke(Ke(Ke({key:H.key||"item-".concat(U)},V,xe[V]),F,xe[F]),"animationId",C)),childIndex:Dve(H,x.children),item:H})}),B},d=function(x,_){var b=x.props,S=x.dataStartIndex,T=x.dataEndIndex,C=x.updateId;if(!VB({props:b}))return null;var A=b.children,P=b.layout,I=b.stackOffset,k=b.data,E=b.reverseStackOrder,D=pF(P),N=D.numericAxisName,z=D.cateAxisName,V=la(A,n),F=X2e(k,V,"".concat(N,"Id"),"".concat(z,"Id"),I,E),$=l.reduce(function(Z,Q){var re="".concat(Q.axisType,"Map");return he(he({},Z),{},Ke({},re,oNe(b,he(he({},Q),{},{graphicalItems:V,stackGroups:Q.axisType===N&&F,dataStartIndex:S,dataEndIndex:T}))))},{}),B=uNe(he(he({},$),{},{props:b,graphicalItems:V}),_==null?void 0:_.legendBBox);Object.keys($).forEach(function(Z){$[Z]=c(b,$[Z],B,Z.replace("Map",""),r)});var H=$["".concat(z,"Map")],U=sNe(H),Y=h(b,he(he({},$),{},{dataStartIndex:S,dataEndIndex:T,updateId:C,graphicalItems:V,stackGroups:F,offset:B}));return he(he({formattedGraphicalItems:Y,graphicalItems:V,offset:B,stackGroups:F},U),$)},v=function(y){function x(_){var b,S,T;return GDe(this,x),T=UDe(this,x,[_]),Ke(T,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Ke(T,"accessibilityManager",new kDe),Ke(T,"handleLegendBBoxUpdate",function(C){if(C){var A=T.state,P=A.dataStartIndex,I=A.dataEndIndex,k=A.updateId;T.setState(he({legendBBox:C},d({props:T.props,dataStartIndex:P,dataEndIndex:I,updateId:k},he(he({},T.state),{},{legendBBox:C}))))}}),Ke(T,"handleReceiveSyncEvent",function(C,A,P){if(T.props.syncId===C){if(P===T.eventEmitterSymbol&&typeof T.props.syncMethod!="function")return;T.applySyncEvent(A)}}),Ke(T,"handleBrushChange",function(C){var A=C.startIndex,P=C.endIndex;if(A!==T.state.dataStartIndex||P!==T.state.dataEndIndex){var I=T.state.updateId;T.setState(function(){return he({dataStartIndex:A,dataEndIndex:P},d({props:T.props,dataStartIndex:A,dataEndIndex:P,updateId:I},T.state))}),T.triggerSyncEvent({dataStartIndex:A,dataEndIndex:P})}}),Ke(T,"handleMouseEnter",function(C){var A=T.getMouseInfo(C);if(A){var P=he(he({},A),{},{isTooltipActive:!0});T.setState(P),T.triggerSyncEvent(P);var I=T.props.onMouseEnter;ht(I)&&I(P,C)}}),Ke(T,"triggeredAfterMouseMove",function(C){var A=T.getMouseInfo(C),P=A?he(he({},A),{},{isTooltipActive:!0}):{isTooltipActive:!1};T.setState(P),T.triggerSyncEvent(P);var I=T.props.onMouseMove;ht(I)&&I(P,C)}),Ke(T,"handleItemMouseEnter",function(C){T.setState(function(){return{isTooltipActive:!0,activeItem:C,activePayload:C.tooltipPayload,activeCoordinate:C.tooltipPosition||{x:C.cx,y:C.cy}}})}),Ke(T,"handleItemMouseLeave",function(){T.setState(function(){return{isTooltipActive:!1}})}),Ke(T,"handleMouseMove",function(C){C.persist(),T.throttleTriggeredAfterMouseMove(C)}),Ke(T,"handleMouseLeave",function(C){T.throttleTriggeredAfterMouseMove.cancel();var A={isTooltipActive:!1};T.setState(A),T.triggerSyncEvent(A);var P=T.props.onMouseLeave;ht(P)&&P(A,C)}),Ke(T,"handleOuterEvent",function(C){var A=Eve(C),P=sa(T.props,"".concat(A));if(A&&ht(P)){var I,k;/.*touch.*/i.test(A)?k=T.getMouseInfo(C.changedTouches[0]):k=T.getMouseInfo(C),P((I=k)!==null&&I!==void 0?I:{},C)}}),Ke(T,"handleClick",function(C){var A=T.getMouseInfo(C);if(A){var P=he(he({},A),{},{isTooltipActive:!0});T.setState(P),T.triggerSyncEvent(P);var I=T.props.onClick;ht(I)&&I(P,C)}}),Ke(T,"handleMouseDown",function(C){var A=T.props.onMouseDown;if(ht(A)){var P=T.getMouseInfo(C);A(P,C)}}),Ke(T,"handleMouseUp",function(C){var A=T.props.onMouseUp;if(ht(A)){var P=T.getMouseInfo(C);A(P,C)}}),Ke(T,"handleTouchMove",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&T.throttleTriggeredAfterMouseMove(C.changedTouches[0])}),Ke(T,"handleTouchStart",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&T.handleMouseDown(C.changedTouches[0])}),Ke(T,"handleTouchEnd",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&T.handleMouseUp(C.changedTouches[0])}),Ke(T,"handleDoubleClick",function(C){var A=T.props.onDoubleClick;if(ht(A)){var P=T.getMouseInfo(C);A(P,C)}}),Ke(T,"handleContextMenu",function(C){var A=T.props.onContextMenu;if(ht(A)){var P=T.getMouseInfo(C);A(P,C)}}),Ke(T,"triggerSyncEvent",function(C){T.props.syncId!==void 0&&HA.emit(UA,T.props.syncId,C,T.eventEmitterSymbol)}),Ke(T,"applySyncEvent",function(C){var A=T.props,P=A.layout,I=A.syncMethod,k=T.state.updateId,E=C.dataStartIndex,D=C.dataEndIndex;if(C.dataStartIndex!==void 0||C.dataEndIndex!==void 0)T.setState(he({dataStartIndex:E,dataEndIndex:D},d({props:T.props,dataStartIndex:E,dataEndIndex:D,updateId:k},T.state)));else if(C.activeTooltipIndex!==void 0){var N=C.chartX,z=C.chartY,V=C.activeTooltipIndex,F=T.state,$=F.offset,B=F.tooltipTicks;if(!$)return;if(typeof I=="function")V=I(B,C);else if(I==="value"){V=-1;for(var H=0;H<B.length;H++)if(B[H].value===C.activeLabel){V=H;break}}var U=he(he({},$),{},{x:$.left,y:$.top}),Y=Math.min(N,U.x+U.width),Z=Math.min(z,U.y+U.height),Q=B[V]&&B[V].value,re=ZL(T.state,T.props.data,V),ue=B[V]?{x:P==="horizontal"?B[V].coordinate:Y,y:P==="horizontal"?Z:B[V].coordinate}:PK;T.setState(he(he({},C),{},{activeLabel:Q,activeCoordinate:ue,activePayload:re,activeTooltipIndex:V}))}else T.setState(C)}),Ke(T,"renderCursor",function(C){var A,P=T.state,I=P.isTooltipActive,k=P.activeCoordinate,E=P.activePayload,D=P.offset,N=P.activeTooltipIndex,z=P.tooltipAxisBandSize,V=T.getTooltipEventType(),F=(A=C.props.active)!==null&&A!==void 0?A:I,$=T.props.layout,B=C.key||"_recharts-cursor";return ee.createElement(jDe,{key:B,activeCoordinate:k,activePayload:E,activeTooltipIndex:N,chartName:r,element:C,isActive:F,layout:$,offset:D,tooltipAxisBandSize:z,tooltipEventType:V})}),Ke(T,"renderPolarAxis",function(C,A,P){var I=sa(C,"type.axisType"),k=sa(T.state,"".concat(I,"Map")),E=C.type.defaultProps,D=E!==void 0?he(he({},E),C.props):C.props,N=k&&k[D["".concat(I,"Id")]];return G.cloneElement(C,he(he({},N),{},{className:_t(I,N.className),key:C.key||"".concat(A,"-").concat(P),ticks:Ic(N,!0)}))}),Ke(T,"renderPolarGrid",function(C){var A=C.props,P=A.radialLines,I=A.polarAngles,k=A.polarRadius,E=T.state,D=E.radiusAxisMap,N=E.angleAxisMap,z=Ah(D),V=Ah(N),F=V.cx,$=V.cy,B=V.innerRadius,H=V.outerRadius;return G.cloneElement(C,{polarAngles:Array.isArray(I)?I:Ic(V,!0).map(function(U){return U.coordinate}),polarRadius:Array.isArray(k)?k:Ic(z,!0).map(function(U){return U.coordinate}),cx:F,cy:$,innerRadius:B,outerRadius:H,key:C.key||"polar-grid",radialLines:P})}),Ke(T,"renderLegend",function(){var C=T.state.formattedGraphicalItems,A=T.props,P=A.children,I=A.width,k=A.height,E=T.props.margin||{},D=I-(E.left||0)-(E.right||0),N=pq({children:P,formattedGraphicalItems:C,legendWidth:D,legendContent:u});if(!N)return null;var z=N.item,V=fF(N,RDe);return G.cloneElement(z,he(he({},V),{},{chartWidth:I,chartHeight:k,margin:E,onBBoxUpdate:T.handleLegendBBoxUpdate}))}),Ke(T,"renderTooltip",function(){var C,A=T.props,P=A.children,I=A.accessibilityLayer,k=xi(P,hs);if(!k)return null;var E=T.state,D=E.isTooltipActive,N=E.activeCoordinate,z=E.activePayload,V=E.activeLabel,F=E.offset,$=(C=k.props.active)!==null&&C!==void 0?C:D;return G.cloneElement(k,{viewBox:he(he({},F),{},{x:F.left,y:F.top}),active:$,label:V,payload:$?z:[],coordinate:N,accessibilityLayer:I})}),Ke(T,"renderBrush",function(C){var A=T.props,P=A.margin,I=A.data,k=T.state,E=k.offset,D=k.dataStartIndex,N=k.dataEndIndex,z=k.updateId;return G.cloneElement(C,{key:C.key||"_recharts-brush",onChange:_x(T.handleBrushChange,C.props.onChange),data:I,x:Pe(C.props.x)?C.props.x:E.left,y:Pe(C.props.y)?C.props.y:E.top+E.height+E.brushBottom-(P.bottom||0),width:Pe(C.props.width)?C.props.width:E.width,startIndex:D,endIndex:N,updateId:"brush-".concat(z)})}),Ke(T,"renderReferenceElement",function(C,A,P){if(!C)return null;var I=T,k=I.clipPathId,E=T.state,D=E.xAxisMap,N=E.yAxisMap,z=E.offset,V=C.type.defaultProps||{},F=C.props,$=F.xAxisId,B=$===void 0?V.xAxisId:$,H=F.yAxisId,U=H===void 0?V.yAxisId:H;return G.cloneElement(C,{key:C.key||"".concat(A,"-").concat(P),xAxis:D[B],yAxis:N[U],viewBox:{x:z.left,y:z.top,width:z.width,height:z.height},clipPathId:k})}),Ke(T,"renderActivePoints",function(C){var A=C.item,P=C.activePoint,I=C.basePoint,k=C.childIndex,E=C.isRange,D=[],N=A.props.key,z=A.item.type.defaultProps!==void 0?he(he({},A.item.type.defaultProps),A.item.props):A.item.props,V=z.activeDot,F=z.dataKey,$=he(he({index:k,dataKey:F,cx:P.x,cy:P.y,r:4,fill:uN(A.item),strokeWidth:2,stroke:"#fff",payload:P.payload,value:P.value},ft(V,!1)),Qb(V));return D.push(x.renderActiveDot(V,$,"".concat(N,"-activePoint-").concat(k))),I?D.push(x.renderActiveDot(V,he(he({},$),{},{cx:I.x,cy:I.y}),"".concat(N,"-basePoint-").concat(k))):E&&D.push(null),D}),Ke(T,"renderGraphicChild",function(C,A,P){var I=T.filterFormatItem(C,A,P);if(!I)return null;var k=T.getTooltipEventType(),E=T.state,D=E.isTooltipActive,N=E.tooltipAxis,z=E.activeTooltipIndex,V=E.activeLabel,F=T.props.children,$=xi(F,hs),B=I.props,H=B.points,U=B.isRange,Y=B.baseLine,Z=I.item.type.defaultProps!==void 0?he(he({},I.item.type.defaultProps),I.item.props):I.item.props,Q=Z.activeDot,re=Z.hide,ue=Z.activeBar,de=Z.activeShape,Re=!!(!re&&D&&$&&(Q||ue||de)),xe={};k!=="axis"&&$&&$.props.trigger==="click"?xe={onClick:_x(T.handleItemMouseEnter,C.props.onClick)}:k!=="axis"&&(xe={onMouseLeave:_x(T.handleItemMouseLeave,C.props.onMouseLeave),onMouseEnter:_x(T.handleItemMouseEnter,C.props.onMouseEnter)});var ie=G.cloneElement(C,he(he({},I.props),xe));function ve(Pr){return typeof N.dataKey=="function"?N.dataKey(Pr.payload):null}if(Re)if(z>=0){var ce,X;if(N.dataKey&&!N.allowDuplicatedCategory){var te=typeof N.dataKey=="function"?ve:"payload.".concat(N.dataKey.toString());ce=Jb(H,te,V),X=U&&Y&&Jb(Y,te,V)}else ce=H==null?void 0:H[z],X=U&&Y&&Y[z];if(de||ue){var pe=C.props.activeIndex!==void 0?C.props.activeIndex:z;return[G.cloneElement(C,he(he(he({},I.props),xe),{},{activeIndex:pe})),null,null]}if(!vt(ce))return[ie].concat(Yd(T.renderActivePoints({item:I,activePoint:ce,basePoint:X,childIndex:z,isRange:U})))}else{var Te,Me=(Te=T.getItemByXY(T.state.activeCoordinate))!==null&&Te!==void 0?Te:{graphicalItem:ie},Xe=Me.graphicalItem,At=Xe.item,Wt=At===void 0?C:At,$r=Xe.childIndex,_r=he(he(he({},I.props),xe),{},{activeIndex:$r});return[G.cloneElement(Wt,_r),null,null]}return U?[ie,null,null]:[ie,null]}),Ke(T,"renderCustomized",function(C,A,P){return G.cloneElement(C,he(he({key:"recharts-customized-".concat(P)},T.props),T.state))}),Ke(T,"renderMap",{CartesianGrid:{handler:Ax,once:!0},ReferenceArea:{handler:T.renderReferenceElement},ReferenceLine:{handler:Ax},ReferenceDot:{handler:T.renderReferenceElement},XAxis:{handler:Ax},YAxis:{handler:Ax},Brush:{handler:T.renderBrush,once:!0},Bar:{handler:T.renderGraphicChild},Line:{handler:T.renderGraphicChild},Area:{handler:T.renderGraphicChild},Radar:{handler:T.renderGraphicChild},RadialBar:{handler:T.renderGraphicChild},Scatter:{handler:T.renderGraphicChild},Pie:{handler:T.renderGraphicChild},Funnel:{handler:T.renderGraphicChild},Tooltip:{handler:T.renderCursor,once:!0},PolarGrid:{handler:T.renderPolarGrid,once:!0},PolarAngleAxis:{handler:T.renderPolarAxis},PolarRadiusAxis:{handler:T.renderPolarAxis},Customized:{handler:T.renderCustomized}}),T.clipPathId="".concat((b=_.id)!==null&&b!==void 0?b:Av("recharts"),"-clip"),T.throttleTriggeredAfterMouseMove=vX(T.triggeredAfterMouseMove,(S=_.throttleDelay)!==null&&S!==void 0?S:1e3/60),T.state={},T}return XDe(x,y),HDe(x,[{key:"componentDidMount",value:function(){var b,S;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(b=this.props.margin.left)!==null&&b!==void 0?b:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var b=this.props,S=b.children,T=b.data,C=b.height,A=b.layout,P=xi(S,hs);if(P){var I=P.props.defaultIndex;if(!(typeof I!="number"||I<0||I>this.state.tooltipTicks.length-1)){var k=this.state.tooltipTicks[I]&&this.state.tooltipTicks[I].value,E=ZL(this.state,T,I,k),D=this.state.tooltipTicks[I].coordinate,N=(this.state.offset.top+C)/2,z=A==="horizontal",V=z?{x:D,y:N}:{y:D,x:N},F=this.state.formattedGraphicalItems.find(function(B){var H=B.item;return H.type.name==="Scatter"});F&&(V=he(he({},V),F.props.points[I].tooltipPosition),E=F.props.points[I].tooltipPayload);var $={activeTooltipIndex:I,isTooltipActive:!0,activeLabel:k,activePayload:E,activeCoordinate:V};this.setState($),this.renderCursor(P),this.accessibilityManager.setIndex(I)}}}},{key:"getSnapshotBeforeUpdate",value:function(b,S){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==S.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==b.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==b.margin){var T,C;this.accessibilityManager.setDetails({offset:{left:(T=this.props.margin.left)!==null&&T!==void 0?T:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0}})}return null}},{key:"componentDidUpdate",value:function(b){Ck([xi(b.children,hs)],[xi(this.props.children,hs)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var b=xi(this.props.children,hs);if(b&&typeof b.props.shared=="boolean"){var S=b.props.shared?"axis":"item";return s.indexOf(S)>=0?S:a}return a}},{key:"getMouseInfo",value:function(b){if(!this.container)return null;var S=this.container,T=S.getBoundingClientRect(),C=sSe(T),A={chartX:Math.round(b.pageX-C.left),chartY:Math.round(b.pageY-C.top)},P=T.width/S.offsetWidth||1,I=this.inRange(A.chartX,A.chartY,P);if(!I)return null;var k=this.state,E=k.xAxisMap,D=k.yAxisMap,N=this.getTooltipEventType(),z=dF(this.state,this.props.data,this.props.layout,I);if(N!=="axis"&&E&&D){var V=Ah(E).scale,F=Ah(D).scale,$=V&&V.invert?V.invert(A.chartX):null,B=F&&F.invert?F.invert(A.chartY):null;return he(he({},A),{},{xValue:$,yValue:B},z)}return z?he(he({},A),z):null}},{key:"inRange",value:function(b,S){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,C=this.props.layout,A=b/T,P=S/T;if(C==="horizontal"||C==="vertical"){var I=this.state.offset,k=A>=I.left&&A<=I.left+I.width&&P>=I.top&&P<=I.top+I.height;return k?{x:A,y:P}:null}var E=this.state,D=E.angleAxisMap,N=E.radiusAxisMap;if(D&&N){var z=Ah(D);return K4({x:A,y:P},z)}return null}},{key:"parseEventsOfWrapper",value:function(){var b=this.props.children,S=this.getTooltipEventType(),T=xi(b,hs),C={};T&&S==="axis"&&(T.props.trigger==="click"?C={onClick:this.handleClick}:C={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 A=Qb(this.props,this.handleOuterEvent);return he(he({},A),C)}},{key:"addListener",value:function(){HA.on(UA,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){HA.removeListener(UA,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(b,S,T){for(var C=this.state.formattedGraphicalItems,A=0,P=C.length;A<P;A++){var I=C[A];if(I.item===b||I.props.key===b.key||S===Ms(I.item.type)&&T===I.childIndex)return I}return null}},{key:"renderClipPath",value:function(){var b=this.clipPathId,S=this.state.offset,T=S.left,C=S.top,A=S.height,P=S.width;return ee.createElement("defs",null,ee.createElement("clipPath",{id:b},ee.createElement("rect",{x:T,y:C,height:A,width:P})))}},{key:"getXScales",value:function(){var b=this.state.xAxisMap;return b?Object.entries(b).reduce(function(S,T){var C=cF(T,2),A=C[0],P=C[1];return he(he({},S),{},Ke({},A,P.scale))},{}):null}},{key:"getYScales",value:function(){var b=this.state.yAxisMap;return b?Object.entries(b).reduce(function(S,T){var C=cF(T,2),A=C[0],P=C[1];return he(he({},S),{},Ke({},A,P.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(b){var S;return(S=this.state.xAxisMap)===null||S===void 0||(S=S[b])===null||S===void 0?void 0:S.scale}},{key:"getYScaleByAxisId",value:function(b){var S;return(S=this.state.yAxisMap)===null||S===void 0||(S=S[b])===null||S===void 0?void 0:S.scale}},{key:"getItemByXY",value:function(b){var S=this.state,T=S.formattedGraphicalItems,C=S.activeItem;if(T&&T.length)for(var A=0,P=T.length;A<P;A++){var I=T[A],k=I.props,E=I.item,D=E.type.defaultProps!==void 0?he(he({},E.type.defaultProps),E.props):E.props,N=Ms(E.type);if(N==="Bar"){var z=(k.data||[]).find(function(B){return Zke(b,B)});if(z)return{graphicalItem:I,payload:z}}else if(N==="RadialBar"){var V=(k.data||[]).find(function(B){return K4(b,B)});if(V)return{graphicalItem:I,payload:V}}else if(mT(I,C)||yT(I,C)||ay(I,C)){var F=qLe({graphicalItem:I,activeTooltipItem:C,itemData:D.data}),$=D.activeIndex===void 0?F:D.activeIndex;return{graphicalItem:he(he({},I),{},{childIndex:$}),payload:ay(I,C)?D.data[F]:I.props.data[F]}}}return null}},{key:"render",value:function(){var b=this;if(!VB(this))return null;var S=this.props,T=S.children,C=S.className,A=S.width,P=S.height,I=S.style,k=S.compact,E=S.title,D=S.desc,N=fF(S,BDe),z=ft(N,!1);if(k)return ee.createElement(U$,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},ee.createElement(Mk,Hh({},z,{width:A,height:P,title:E,desc:D}),this.renderClipPath(),WB(T,this.renderMap)));if(this.props.accessibilityLayer){var V,F;z.tabIndex=(V=this.props.tabIndex)!==null&&V!==void 0?V:0,z.role=(F=this.props.role)!==null&&F!==void 0?F:"application",z.onKeyDown=function(B){b.accessibilityManager.keyboardEvent(B)},z.onFocus=function(){b.accessibilityManager.focus()}}var $=this.parseEventsOfWrapper();return ee.createElement(U$,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},ee.createElement("div",Hh({className:_t("recharts-wrapper",C),style:he({position:"relative",cursor:"default",width:A,height:P},I)},$,{ref:function(H){b.container=H}}),ee.createElement(Mk,Hh({},z,{width:A,height:P,title:E,desc:D,style:tNe}),this.renderClipPath(),WB(T,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(G.Component);Ke(v,"displayName",r),Ke(v,"defaultProps",he({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),Ke(v,"getDerivedStateFromProps",function(y,x){var _=y.dataKey,b=y.data,S=y.children,T=y.width,C=y.height,A=y.layout,P=y.stackOffset,I=y.margin,k=x.dataStartIndex,E=x.dataEndIndex;if(x.updateId===void 0){var D=vF(y);return he(he(he({},D),{},{updateId:0},d(he(he({props:y},D),{},{updateId:0}),x)),{},{prevDataKey:_,prevData:b,prevWidth:T,prevHeight:C,prevLayout:A,prevStackOffset:P,prevMargin:I,prevChildren:S})}if(_!==x.prevDataKey||b!==x.prevData||T!==x.prevWidth||C!==x.prevHeight||A!==x.prevLayout||P!==x.prevStackOffset||!od(I,x.prevMargin)){var N=vF(y),z={chartX:x.chartX,chartY:x.chartY,isTooltipActive:x.isTooltipActive},V=he(he({},dF(x,b,A)),{},{updateId:x.updateId+1}),F=he(he(he({},N),z),V);return he(he(he({},F),d(he({props:y},F),x)),{},{prevDataKey:_,prevData:b,prevWidth:T,prevHeight:C,prevLayout:A,prevStackOffset:P,prevMargin:I,prevChildren:S})}if(!Ck(S,x.prevChildren)){var $,B,H,U,Y=xi(S,Rd),Z=Y&&($=(B=Y.props)===null||B===void 0?void 0:B.startIndex)!==null&&$!==void 0?$:k,Q=Y&&(H=(U=Y.props)===null||U===void 0?void 0:U.endIndex)!==null&&H!==void 0?H:E,re=Z!==k||Q!==E,ue=!vt(b),de=ue&&!re?x.updateId:x.updateId+1;return he(he({updateId:de},d(he(he({props:y},x),{},{updateId:de,dataStartIndex:Z,dataEndIndex:Q}),x)),{},{prevChildren:S,dataStartIndex:Z,dataEndIndex:Q})}return null}),Ke(v,"renderActiveDot",function(y,x,_){var b;return G.isValidElement(y)?b=G.cloneElement(y,x):ht(y)?b=y(x):b=ee.createElement(gT,x),ee.createElement(Xt,{className:"recharts-active-dot",key:_},b)});var m=G.forwardRef(function(x,_){return ee.createElement(v,Hh({},x,{ref:_}))});return m.displayName=v.displayName,m},fNe=LK({chartName:"LineChart",GraphicalChild:s0,axisComponents:[{axisType:"xAxis",AxisComp:Dv},{axisType:"yAxis",AxisComp:Nv}],formatAxisMap:Vq}),hNe=LK({chartName:"AreaChart",GraphicalChild:Cu,axisComponents:[{axisType:"xAxis",AxisComp:Dv},{axisType:"yAxis",AxisComp:Nv}],formatAxisMap:Vq});function dNe({health:e}){const t=e.score,r=e.tier,i=(s=>s>=80?"#22c55e":s>=60?"#f59e0b":"#ef4444")(t),a=2*Math.PI*45,o=t/100*a;return p.jsx("div",{className:"flex flex-col items-center",children:p.jsxs("svg",{width:"140",height:"140",viewBox:"0 0 100 100",children:[p.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:"#1e2a3a",strokeWidth:"8"}),p.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:i,strokeWidth:"8",strokeLinecap:"round",strokeDasharray:a,strokeDashoffset:a-o,transform:"rotate(-90 50 50)",className:"transition-all duration-500"}),p.jsx("text",{x:"50",y:"46",textAnchor:"middle",className:"fill-slate-100 font-mono text-2xl font-bold",style:{fontSize:"24px"},children:t.toFixed(1)}),p.jsx("text",{x:"50",y:"62",textAnchor:"middle",className:"fill-slate-400 text-xs",style:{fontSize:"10px"},children:r})]})})}function Mx({label:e,value:t}){const r=n=>n>=80?"bg-green-500":n>=60?"bg-amber-500":"bg-red-500";return p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("div",{className:"w-24 text-xs text-slate-400 truncate",children:e}),p.jsx("div",{className:"flex-1 h-2 bg-border rounded-full overflow-hidden",children:p.jsx("div",{className:`h-full ${r(t)} transition-all duration-300`,style:{width:`${t}%`}})}),p.jsx("div",{className:"w-12 text-right text-xs font-mono text-slate-300",children:t.toFixed(1)})]})}function vNe({alert:e}){const r=(i=>{switch(i.toLowerCase()){case"critical":case"emergency":case"immediate":return{bg:"bg-red-500/10",border:"border-red-500",icon:uu,iconColor:"text-red-500"};case"warning":case"priority":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:$s,iconColor:"text-amber-500"};case"routine":default:return{bg:"bg-blue-500/10",border:"border-blue-500",icon:OS,iconColor:"text-blue-500"}}})(e.severity),n=r.icon;return p.jsxs("div",{className:`p-3 rounded-lg ${r.bg} border-l-2 ${r.border} flex items-start gap-3`,children:[p.jsx(n,{size:16,className:r.iconColor}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsx("div",{className:"text-sm text-slate-200",children:e.message}),p.jsx("div",{className:"text-xs text-slate-500 mt-1",children:e.timestamp||"Just now"})]})]})}function pNe({source:e}){const t=()=>e.is_loaded?e.last_error?"bg-amber-500":"bg-green-500":"bg-red-500";return p.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-bg-hover",children:[p.jsx("div",{className:`w-2 h-2 rounded-full ${t()}`}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsx("div",{className:"text-sm text-slate-200 truncate",children:e.name}),p.jsxs("div",{className:"text-xs text-slate-500",children:[e.node_count," nodes · ",e.type]})]})]})}function Px({icon:e,label:t,value:r,subvalue:n}){return p.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-4",children:[p.jsxs("div",{className:"flex items-center gap-2 text-slate-400 mb-2",children:[p.jsx(e,{size:14}),p.jsx("span",{className:"text-xs",children:t})]}),p.jsx("div",{className:"font-mono text-xl text-slate-100",children:r}),n&&p.jsx("div",{className:"text-xs text-slate-500 mt-1",children:n})]})}function YA({label:e,value:t}){const r=()=>t===0?"bg-green-500/20 text-green-400 border-green-500/50":t<=2?"bg-amber-500/20 text-amber-400 border-amber-500/50":"bg-red-500/20 text-red-400 border-red-500/50";return p.jsxs("span",{className:`px-2 py-1 rounded text-xs font-mono font-medium border ${r()}`,children:[e,t]})}function gF({label:e,value:t,unit:r,getColor:n}){const i=t!==void 0?n(t):"text-slate-400";return p.jsxs("div",{className:"text-center",children:[p.jsx("div",{className:"text-xs text-slate-500 mb-1",children:e}),p.jsx("div",{className:`font-mono text-3xl font-bold ${i}`,children:(t==null?void 0:t.toFixed(0))??"—"}),r&&p.jsx("div",{className:"text-xs text-slate-500",children:r})]})}function gNe({history:e}){var a;const t=G.useMemo(()=>!e||e.length===0?[]:e.slice(-16).map((o,s)=>({idx:s,value:o.value,time:o.time})),[e]);if(t.length===0)return null;const r=Math.max(...t.map(o=>o.value),5),n=((a=t[t.length-1])==null?void 0:a.value)??0,i=()=>r>5?"kpGradientRed":r>3?"kpGradientAmber":"kpGradientGreen";return p.jsxs("div",{className:"h-20 w-full",children:[p.jsx(pX,{width:"100%",height:"100%",children:p.jsxs(hNe,{data:t,margin:{top:5,right:5,bottom:5,left:5},children:[p.jsxs("defs",{children:[p.jsxs("linearGradient",{id:"kpGradientGreen",x1:"0",y1:"0",x2:"0",y2:"1",children:[p.jsx("stop",{offset:"0%",stopColor:"#22c55e",stopOpacity:.4}),p.jsx("stop",{offset:"100%",stopColor:"#22c55e",stopOpacity:.05})]}),p.jsxs("linearGradient",{id:"kpGradientAmber",x1:"0",y1:"0",x2:"0",y2:"1",children:[p.jsx("stop",{offset:"0%",stopColor:"#f59e0b",stopOpacity:.4}),p.jsx("stop",{offset:"100%",stopColor:"#f59e0b",stopOpacity:.05})]}),p.jsxs("linearGradient",{id:"kpGradientRed",x1:"0",y1:"0",x2:"0",y2:"1",children:[p.jsx("stop",{offset:"0%",stopColor:"#ef4444",stopOpacity:.4}),p.jsx("stop",{offset:"100%",stopColor:"#ef4444",stopOpacity:.05})]})]}),p.jsx(Nv,{domain:[0,Math.ceil(r)],hide:!0}),p.jsx(Dv,{dataKey:"idx",hide:!0}),p.jsx(uy,{y:3,stroke:"#f59e0b",strokeDasharray:"3 3",strokeOpacity:.5}),p.jsx(uy,{y:5,stroke:"#ef4444",strokeDasharray:"3 3",strokeOpacity:.5}),p.jsx(Cu,{type:"monotone",dataKey:"value",stroke:n>5?"#ef4444":n>3?"#f59e0b":"#22c55e",fill:`url(#${i()})`,strokeWidth:2})]})}),p.jsxs("div",{className:"flex justify-between text-xs text-slate-600 px-1",children:[p.jsx("span",{children:"48h ago"}),p.jsx("span",{children:"now"})]})]})}function mNe({profile:e}){const t=G.useMemo(()=>!e||e.length===0?[]:[...e].sort((r,n)=>r.height_m-n.height_m).map(r=>({height:r.height_m,M:r.M})),[e]);return t.length===0?null:p.jsxs("div",{className:"h-24 w-full",children:[p.jsx(pX,{width:"100%",height:"100%",children:p.jsxs(fNe,{data:t,margin:{top:5,right:10,bottom:5,left:5},children:[p.jsx(Dv,{dataKey:"M",type:"number",domain:["dataMin - 20","dataMax + 20"],tick:{fontSize:10,fill:"#64748b"},tickLine:!1,axisLine:{stroke:"#334155"}}),p.jsx(Nv,{dataKey:"height",type:"number",domain:[0,"dataMax"],tick:{fontSize:10,fill:"#64748b"},tickLine:!1,axisLine:{stroke:"#334155"},tickFormatter:r=>`${(r/1e3).toFixed(1)}k`}),p.jsx(s0,{type:"monotone",dataKey:"M",stroke:"#3b82f6",strokeWidth:2,dot:{r:3,fill:"#3b82f6"}})]})}),p.jsx("div",{className:"text-center text-xs text-slate-600",children:"M-units vs Height (km)"})]})}function yNe({swpc:e,ducting:t}){const r=a=>a>=120?"text-green-400":a>=80?"text-amber-400":"text-red-400",n=a=>a<=3?"text-green-400":a<=5?"text-amber-400":"text-red-400",i=a=>{if(!a)return null;const o={normal:"bg-green-500/20 text-green-400 border-green-500/50",super_refraction:"bg-amber-500/20 text-amber-400 border-amber-500/50",surface_duct:"bg-blue-500/20 text-blue-400 border-blue-500/50",elevated_duct:"bg-blue-500/20 text-blue-400 border-blue-500/50"},s={normal:"Normal",super_refraction:"Super Refraction",surface_duct:"Surface Duct",elevated_duct:"Elevated Duct"};return p.jsx("span",{className:`px-2 py-1 rounded text-xs font-medium border ${o[a]||o.normal}`,children:s[a]||a})};return p.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-4 flex flex-col h-full",children:[p.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[p.jsx(Lm,{size:14}),p.jsx("span",{title:"R (Radio Blackouts), S (Solar Radiation Storms), G (Geomagnetic Storms) — NOAA SWPC scales. Kp 3 = quiet baseline, Kp >= 5 = aurora visible at mid-latitudes and HF degraded. See Reference → Solar & Geomagnetic.",children:"RF Propagation"})]}),p.jsxs("div",{className:"flex justify-around mb-4",children:[p.jsx(gF,{label:"SFI",value:e==null?void 0:e.sfi,getColor:r}),p.jsx("div",{className:"w-px bg-border"}),p.jsx(gF,{label:"Kp",value:e==null?void 0:e.kp_current,getColor:n})]}),p.jsxs("div",{className:"flex justify-center gap-2 mb-4",children:[p.jsx(YA,{label:"R",value:(e==null?void 0:e.r_scale)??0}),p.jsx(YA,{label:"S",value:(e==null?void 0:e.s_scale)??0}),p.jsx(YA,{label:"G",value:(e==null?void 0:e.g_scale)??0})]}),(e==null?void 0:e.kp_history)&&e.kp_history.length>0&&p.jsxs("div",{className:"mb-4",children:[p.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Kp Trend (48h)"}),p.jsx(gNe,{history:e.kp_history})]}),p.jsx("div",{className:"border-t border-border my-3"}),p.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[p.jsx(cu,{size:14,className:"text-slate-400"}),p.jsx("span",{className:"text-xs text-slate-500",children:"Tropospheric"}),i(t==null?void 0:t.condition)]}),(t==null?void 0:t.min_gradient)!==void 0&&p.jsxs("div",{className:"text-xs text-slate-400 font-mono mb-2",children:["dM/dz: ",t.min_gradient.toFixed(1)," M-units/km"]}),(t==null?void 0:t.profile)&&t.profile.length>0&&p.jsx(mNe,{profile:t.profile}),(e==null?void 0:e.active_warnings)&&e.active_warnings.length>0&&p.jsxs("div",{className:"mt-auto pt-3 border-t border-border",children:[p.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"SWPC Alerts"}),p.jsx("div",{className:"flex flex-wrap gap-1",children:e.active_warnings.slice(0,3).map((a,o)=>p.jsx("span",{className:"px-2 py-0.5 rounded text-xs bg-amber-500/20 text-amber-400 border border-amber-500/30 truncate max-w-full",children:a.replace("Space Weather Message Code: ","")},o))})]})]})}const xNe={nws:{icon:cu,color:"text-blue-400",label:"NWS"},swpc:{icon:HZ,color:"text-yellow-400",label:"SWPC"},ducting:{icon:Xa,color:"text-cyan-400",label:"Tropo"},nifc:{icon:IS,color:"text-orange-400",label:"NIFC"},firms:{icon:NS,color:"text-red-400",label:"FIRMS"},avalanche:{icon:ES,color:"text-slate-300",label:"Avy"},usgs:{icon:LS,color:"text-blue-300",label:"USGS"},traffic:{icon:kS,color:"text-purple-400",label:"Traffic"},roads:{icon:RZ,color:"text-amber-400",label:"511"}},mF={routine:"bg-blue-500/20 text-blue-400 border-blue-500/30",priority:"bg-amber-500/20 text-amber-400 border-amber-500/30",immediate:"bg-red-600/20 text-red-300 border-red-600/30",info:"bg-blue-500/20 text-blue-400 border-blue-500/30",advisory:"bg-blue-500/20 text-blue-400 border-blue-500/30",moderate:"bg-amber-500/20 text-amber-400 border-amber-500/30",watch:"bg-amber-500/20 text-amber-400 border-amber-500/30",warning:"bg-amber-500/20 text-amber-400 border-amber-500/30",severe:"bg-red-500/20 text-red-400 border-red-500/30",extreme:"bg-red-600/20 text-red-300 border-red-600/30",critical:"bg-red-600/20 text-red-300 border-red-600/30",emergency:"bg-red-700/20 text-red-200 border-red-700/30"};function _Ne({event:e,isLocal:t}){var f;const r=xNe[e.source]||{icon:OS,color:"text-slate-400",label:e.source},n=r.icon,i=mF[(f=e.severity)==null?void 0:f.toLowerCase()]||mF.info,a=h=>{const d=new Date(h*1e3),m=new Date().getTime()-d.getTime(),y=Math.floor(m/6e4);return y<1?"just now":y<60?`${y}m ago`:y<1440?`${Math.floor(y/60)}h ago`:d.toLocaleDateString(void 0,{month:"short",day:"numeric"})},o=e.event_type,s=e.area_desc,l=e.description;let u=e.headline;if(o&&s){const h=s.replace(/ County/g,"").split(";")[0];u=`${o} — ${h}`}else o&&(u=o);const c=l?l.split(". ")[0]:null;return p.jsxs("div",{className:`flex items-start gap-2 py-2 border-b border-border/50 last:border-0 ${t?"border-l-2 border-l-blue-500 pl-2 -ml-2":""}`,children:[p.jsx(n,{size:14,className:`mt-0.5 flex-shrink-0 ${r.color}`}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[p.jsx("span",{className:`px-1.5 py-0.5 rounded text-xs border ${i}`,children:e.severity||"info"}),t&&p.jsx("span",{className:"px-1.5 py-0.5 rounded text-xs bg-blue-500/20 text-blue-400 border border-blue-500/30",title:"LOCAL: event coordinates fall inside the mesh's monitoring area (per the adapter's bbox config on Environment) — operators in this region are directly affected.",children:"LOCAL"}),p.jsx("span",{className:"text-xs text-slate-500",children:r.label}),p.jsx("span",{className:"text-xs text-slate-600 ml-auto",children:a(e.fetched_at)})]}),p.jsx("div",{className:`text-sm truncate ${t?"text-slate-100":"text-slate-300"}`,children:u}),c&&p.jsx("div",{className:"text-xs text-slate-500 truncate mt-0.5",children:c})]})]})}function bNe({events:e,envStatus:t}){const r={immediate:0,priority:1,routine:2},n=G.useMemo(()=>{const a=new Set;return e.filter(s=>s.event_id?a.has(s.event_id)?!1:(a.add(s.event_id),!0):!0).sort((s,l)=>{var d,v;const u=s.is_local?1:0,c=l.is_local?1:0;if(u!==c)return c-u;const f=r[((d=s.severity)==null?void 0:d.toLowerCase())||"routine"]??2,h=r[((v=l.severity)==null?void 0:v.toLowerCase())||"routine"]??2;return f!==h?f-h:(l.fetched_at||0)-(s.fetched_at||0)})},[e]),i=G.useMemo(()=>{if(!(t!=null&&t.feeds))return null;const a=t.feeds.length,o=t.feeds.filter(c=>c.is_loaded&&!c.last_error).length,s=t.feeds.filter(c=>c.last_error).map(c=>c.source),l=Math.max(...t.feeds.map(c=>c.last_fetch||0)),u=l?Math.floor(Date.now()/1e3-l):null;return{total:a,active:o,errors:s,secAgo:u}},[t]);return p.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-4 flex flex-col h-full",children:[p.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-3 flex items-center gap-2",children:[p.jsx(mv,{size:14}),"Live Event Feed"]}),n.length>0?p.jsx("div",{className:"flex-1 overflow-y-auto max-h-80 pr-1 -mr-1",children:n.map((a,o)=>p.jsx(_Ne,{event:a,isLocal:a.is_local},a.event_id||o))}):p.jsx("div",{className:"flex-1 flex items-center justify-center",children:p.jsxs("div",{className:"text-center py-8",children:[p.jsx(oD,{size:24,className:"text-green-500 mx-auto mb-2"}),p.jsx("div",{className:"text-slate-400",children:"No active events"}),p.jsx("div",{className:"text-xs text-slate-500",children:"All clear"})]})}),i&&p.jsxs("div",{className:`text-xs mt-3 pt-3 border-t border-border ${i.errors.length>0?"text-amber-400":"text-slate-500"}`,children:[i.active," of ",i.total," feeds active",i.secAgo!==null&&` · Last update ${i.secAgo}s ago`,i.errors.length>0&&p.jsxs("span",{className:"text-amber-400",children:[" · ",i.errors.join(", "),": error"]})]})]})}function wNe(){var S,T,C,A,P;const[e,t]=G.useState(null),[r,n]=G.useState([]),[i,a]=G.useState([]),[o,s]=G.useState(null),[l,u]=G.useState([]),[c,f]=G.useState(null),[h,d]=G.useState(null),[v,m]=G.useState(!0),[y,x]=G.useState(null),{lastHealth:_,lastMessage:b}=hD();return G.useEffect(()=>{Promise.all([Mce(),Lce(),YZ(),XZ(),qZ().catch(()=>[]),Oce().catch(()=>null),Ece().catch(()=>null)]).then(([I,k,E,D,N,z,V])=>{t(I),n(k),a(E),s(D),u(N),f(z),d(V),m(!1),document.title="Dashboard — MeshAI"}).catch(I=>{x(I.message),m(!1),document.title="Dashboard — MeshAI"})},[]),G.useEffect(()=>{_&&t(_)},[_]),G.useEffect(()=>{(b==null?void 0:b.type)==="env_update"&&b.event&&u(I=>{const k=b.event,E=I.filter(D=>D.event_id!==k.event_id);return[k,...E].slice(0,100)})},[b]),v?p.jsx("div",{className:"flex items-center justify-center h-64",children:p.jsx("div",{className:"text-slate-400",children:"Loading..."})}):y?p.jsx("div",{className:"flex items-center justify-center h-64",children:p.jsxs("div",{className:"text-red-400",children:["Error: ",y]})}):p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[p.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[p.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Mesh Health"}),e&&p.jsxs(p.Fragment,{children:[p.jsx(dNe,{health:e}),p.jsxs("div",{className:"mt-6 space-y-3",children:[p.jsx(Mx,{label:"Infrastructure",value:((S=e.pillars)==null?void 0:S.infrastructure)??0}),p.jsx(Mx,{label:"Utilization",value:((T=e.pillars)==null?void 0:T.utilization)??0}),p.jsx(Mx,{label:"Behavior",value:((C=e.pillars)==null?void 0:C.behavior)??0}),p.jsx(Mx,{label:"Power",value:((A=e.pillars)==null?void 0:A.power)??0})]})]})]}),p.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[p.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[p.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Active Alerts"}),i.length>0?p.jsx("div",{className:"space-y-3 max-h-48 overflow-y-auto",children:i.map((I,k)=>p.jsx(vNe,{alert:I},k))}):p.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[p.jsx(oD,{size:16,className:"text-green-500"}),p.jsx("span",{children:"No active alerts"})]})]}),p.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[p.jsx(Px,{icon:Xa,label:"Nodes Online",value:(e==null?void 0:e.total_nodes)||0,subvalue:`${(e==null?void 0:e.unlocated_count)||0} unlocated`}),p.jsx(Px,{icon:BZ,label:"Infrastructure",value:`${(e==null?void 0:e.infra_online)||0}/${(e==null?void 0:e.infra_total)||0}`,subvalue:(e==null?void 0:e.infra_online)===(e==null?void 0:e.infra_total)?"All online":"Some offline"}),p.jsx(Px,{icon:mv,label:"Utilization",value:`${((P=e==null?void 0:e.util_percent)==null?void 0:P.toFixed(1))||0}%`,subvalue:`${(e==null?void 0:e.flagged_nodes)||0} flagged`}),p.jsx(Px,{icon:yv,label:"Regions",value:(e==null?void 0:e.total_regions)||0,subvalue:`${(e==null?void 0:e.battery_warnings)||0} battery warnings`})]})]})]}),p.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[p.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[p.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:["Mesh Sources (",r.length,")"]}),r.length>0?p.jsx("div",{className:"space-y-2",children:r.map((I,k)=>p.jsx(pNe,{source:I},k))}):p.jsx("div",{className:"text-slate-500 py-4",children:"No sources configured"})]}),p.jsx(yNe,{swpc:c,ducting:h}),p.jsx(bNe,{events:l,envStatus:o})]})]})}/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var YL=function(e,t){return YL=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},YL(e,t)};function K(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");YL(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Hg=function(){return Hg=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Hg.apply(this,arguments)};function SNe(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function yF(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(c){try{u(n.next(c))}catch(f){o(f)}}function l(c){try{u(n.throw(c))}catch(f){o(f)}}function u(c){c.done?a(c.value):i(c.value).then(s,l)}u((n=n.apply(e,[])).next())})}function xF(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(u){return function(c){return l([u,c])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){r.label=u[1];break}if(u[0]===6&&r.label<a[1]){r.label=a[1],a=u;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(u);break}a[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(c){u=[6,c],i=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var TNe=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),CNe=function(){function e(){this.browser=new TNe,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return e}(),it=new CNe;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(it.wxa=!0,it.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?it.worker=!0:!it.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(it.node=!0,it.svgSupported=!0):ANe(navigator.userAgent,it);function ANe(e,t){var r=t.browser,n=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);n&&(r.firefox=!0,r.version=n[1]),i&&(r.ie=!0,r.version=i[1]),a&&(r.edge=!0,r.version=a[1],r.newEdge=+a[1].split(".")[0]>18),o&&(r.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,t.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11);var s=t.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;t.transform3dSupported=(r.ie&&"transition"in l||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),t.transformSupported=t.transform3dSupported||r.ie&&+r.version>=9}}var vN=12,IK="sans-serif",Ws=vN+"px "+IK,MNe=20,PNe=100,kNe="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function LNe(e){var t={};if(typeof JSON>"u")return t;for(var r=0;r<e.length;r++){var n=String.fromCharCode(r+32),i=(e.charCodeAt(r)-MNe)/PNe;t[n]=i}return t}var INe=LNe(kNe),fi={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:function(){var e,t;return function(r,n){if(!e){var i=fi.createCanvas();e=i&&i.getContext("2d")}if(e)return t!==n&&(t=e.font=n||Ws),e.measureText(r);r=r||"",n=n||Ws;var a=/((?:\d+)?\.?\d*)px/.exec(n),o=a&&+a[1]||vN,s=0;if(n.indexOf("mono")>=0)s=o*r.length;else for(var l=0;l<r.length;l++){var u=INe[r[l]];s+=u==null?o:u*o}return{width:s}}}(),loadImage:function(e,t,r){var n=new Image;return n.onload=t,n.onerror=r,n.src=e,n}};function OK(e){for(var t in fi)e[t]&&(fi[t]=e[t])}var EK=va(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(e,t){return e["[object "+t+"]"]=!0,e},{}),DK=va(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(e,t){return e["[object "+t+"Array]"]=!0,e},{}),jv=Object.prototype.toString,AT=Array.prototype,ONe=AT.forEach,ENe=AT.filter,pN=AT.slice,DNe=AT.map,_F=(function(){}).constructor,kx=_F?_F.prototype:null,gN="__proto__",NNe=2311;function mN(){return NNe++}function MT(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];typeof console<"u"&&console.error.apply(console,e)}function Le(e){if(e==null||typeof e!="object")return e;var t=e,r=jv.call(e);if(r==="[object Array]"){if(!fd(e)){t=[];for(var n=0,i=e.length;n<i;n++)t[n]=Le(e[n])}}else if(DK[r]){if(!fd(e)){var a=e.constructor;if(a.from)t=a.from(e);else{t=new a(e.length);for(var n=0,i=e.length;n<i;n++)t[n]=e[n]}}}else if(!EK[r]&&!fd(e)&&!cf(e)){t={};for(var o in e)e.hasOwnProperty(o)&&o!==gN&&(t[o]=Le(e[o]))}return t}function Ue(e,t,r){if(!Ee(t)||!Ee(e))return r?Le(t):e;for(var n in t)if(t.hasOwnProperty(n)&&n!==gN){var i=e[n],a=t[n];Ee(a)&&Ee(i)&&!oe(a)&&!oe(i)&&!cf(a)&&!cf(i)&&!XL(a)&&!XL(i)&&!fd(a)&&!fd(i)?Ue(i,a,r):(r||!(n in e))&&(e[n]=Le(t[n]))}return e}function PT(e,t){for(var r=e[0],n=1,i=e.length;n<i;n++)r=Ue(r,e[n],t);return r}function ae(e,t){if(Object.assign)Object.assign(e,t);else for(var r in t)t.hasOwnProperty(r)&&r!==gN&&(e[r]=t[r]);return e}function Oe(e,t,r){for(var n=at(t),i=0,a=n.length;i<a;i++){var o=n[i];(r?t[o]!=null:e[o]==null)&&(e[o]=t[o])}return e}var jNe=fi.createCanvas;function He(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r}return-1}function yN(e,t){var r=e.prototype;function n(){}n.prototype=t.prototype,e.prototype=new n;for(var i in r)r.hasOwnProperty(i)&&(e.prototype[i]=r[i]);e.prototype.constructor=e,e.superClass=t}function cr(e,t,r){if(e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var a=n[i];a!=="constructor"&&(r?t[a]!=null:e[a]==null)&&(e[a]=t[a])}else Oe(e,t,r)}function bn(e){return!e||typeof e=="string"?!1:typeof e.length=="number"}function R(e,t,r){if(e&&t)if(e.forEach&&e.forEach===ONe)e.forEach(t,r);else if(e.length===+e.length)for(var n=0,i=e.length;n<i;n++)t.call(r,e[n],n,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(r,e[a],a,e)}function le(e,t,r){if(!e)return[];if(!t)return kT(e);if(e.map&&e.map===DNe)return e.map(t,r);for(var n=[],i=0,a=e.length;i<a;i++)n.push(t.call(r,e[i],i,e));return n}function va(e,t,r,n){if(e&&t){for(var i=0,a=e.length;i<a;i++)r=t.call(n,r,e[i],i,e);return r}}function dt(e,t,r){if(!e)return[];if(!t)return kT(e);if(e.filter&&e.filter===ENe)return e.filter(t,r);for(var n=[],i=0,a=e.length;i<a;i++)t.call(r,e[i],i,e)&&n.push(e[i]);return n}function Au(e,t,r){if(e&&t){for(var n=0,i=e.length;n<i;n++)if(t.call(r,e[n],n,e))return e[n]}}function at(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(r);return t}function RNe(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return function(){return e.apply(t,r.concat(pN.call(arguments)))}}var _e=kx&&ke(kx.bind)?kx.call.bind(kx.bind):RNe;function We(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return function(){return e.apply(this,t.concat(pN.call(arguments)))}}function oe(e){return Array.isArray?Array.isArray(e):jv.call(e)==="[object Array]"}function ke(e){return typeof e=="function"}function ye(e){return typeof e=="string"}function tw(e){return jv.call(e)==="[object String]"}function st(e){return typeof e=="number"}function Ee(e){var t=typeof e;return t==="function"||!!e&&t==="object"}function XL(e){return!!EK[jv.call(e)]}function Xn(e){return!!DK[jv.call(e)]}function cf(e){return typeof e=="object"&&typeof e.nodeType=="number"&&typeof e.ownerDocument=="object"}function l0(e){return e.colorStops!=null}function NK(e){return e.image!=null}function jK(e){return jv.call(e)==="[object RegExp]"}function xn(e){return e!==e}function on(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,n=e.length;r<n;r++)if(e[r]!=null)return e[r]}function Ae(e,t){return e??t}function ci(e,t,r){return e??t??r}function kT(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return pN.apply(e,t)}function u0(e){if(typeof e=="number")return[e,e,e,e];var t=e.length;return t===2?[e[0],e[1],e[0],e[1]]:t===3?[e[0],e[1],e[2],e[1]]:e}function wn(e,t){if(!e)throw new Error(t)}function Ai(e){return e==null?null:typeof e.trim=="function"?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var RK="__ec_primitive__";function dy(e){e[RK]=!0}function fd(e){return e[RK]}var BNe=function(){function e(){this.data={}}return e.prototype.delete=function(t){var r=this.has(t);return r&&delete this.data[t],r},e.prototype.has=function(t){return this.data.hasOwnProperty(t)},e.prototype.get=function(t){return this.data[t]},e.prototype.set=function(t,r){return this.data[t]=r,this},e.prototype.keys=function(){return at(this.data)},e.prototype.forEach=function(t){var r=this.data;for(var n in r)r.hasOwnProperty(n)&&t(r[n],n)},e}(),BK=typeof Map=="function";function zNe(){return BK?new Map:new BNe}var zK=function(){function e(t){var r=oe(t);this.data=zNe();var n=this;t instanceof e?t.each(i):t&&R(t,i);function i(a,o){r?n.set(a,o):n.set(o,a)}}return e.prototype.hasKey=function(t){return this.data.has(t)},e.prototype.get=function(t){return this.data.get(t)},e.prototype.set=function(t,r){return this.data.set(t,r),r},e.prototype.each=function(t,r){this.data.forEach(function(n,i){t.call(r,n,i)})},e.prototype.keys=function(){var t=this.data.keys();return BK?Array.from(t):t},e.prototype.removeKey=function(t){this.data.delete(t)},e}();function Ce(e){return new zK(e)}function Xd(e,t){for(var r=new e.constructor(e.length+t.length),n=0;n<e.length;n++)r[n]=e[n];for(var i=e.length,n=0;n<t.length;n++)r[n+i]=t[n];return r}function c0(e,t){var r;if(Object.create)r=Object.create(e);else{var n=function(){};n.prototype=e,r=new n}return t&&ae(r,t),r}function xN(e){var t=e.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function Se(e,t){return e.hasOwnProperty(t)}function sr(){}var Ug=180/Math.PI,$Ne=Number.EPSILON||Math.pow(2,-52);const FNe=Object.freeze(Object.defineProperty({__proto__:null,EPSILON:$Ne,HashMap:zK,RADIAN_TO_DEGREE:Ug,assert:wn,bind:_e,clone:Le,concatArray:Xd,createCanvas:jNe,createHashMap:Ce,createObject:c0,curry:We,defaults:Oe,disableUserSelect:xN,each:R,eqNaN:xn,extend:ae,filter:dt,find:Au,guid:mN,hasOwn:Se,indexOf:He,inherits:yN,isArray:oe,isArrayLike:bn,isBuiltInObject:XL,isDom:cf,isFunction:ke,isGradientObject:l0,isImagePatternObject:NK,isNumber:st,isObject:Ee,isPrimitive:fd,isRegExp:jK,isString:ye,isStringSafe:tw,isTypedArray:Xn,keys:at,logError:MT,map:le,merge:Ue,mergeAll:PT,mixin:cr,noop:sr,normalizeCssArray:u0,reduce:va,retrieve:on,retrieve2:Ae,retrieve3:ci,setAsPrimitive:dy,slice:kT,trim:Ai},Symbol.toStringTag,{value:"Module"}));function Mu(e,t){return e==null&&(e=0),t==null&&(t=0),[e,t]}function In(e,t){return e[0]=t[0],e[1]=t[1],e}function Ro(e){return[e[0],e[1]]}function LT(e,t,r){return e[0]=t,e[1]=r,e}function qL(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e}function rw(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e}function Dl(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e}function vy(e){return Math.sqrt(_N(e))}var VNe=vy;function _N(e){return e[0]*e[0]+e[1]*e[1]}var GNe=_N;function WNe(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e}function HNe(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e}function UNe(e,t){return e[0]*t[0]+e[1]*t[1]}function Zg(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e}function Lf(e,t){var r=vy(t);return r===0?(e[0]=0,e[1]=0):(e[0]=t[0]/r,e[1]=t[1]/r),e}function nw(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var bs=nw;function $K(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var Kl=$K;function ZNe(e,t){return e[0]=-t[0],e[1]=-t[1],e}function Yg(e,t,r,n){return e[0]=t[0]+n*(r[0]-t[0]),e[1]=t[1]+n*(r[1]-t[1]),e}function lr(e,t,r){var n=t[0],i=t[1];return e[0]=r[0]*n+r[2]*i+r[4],e[1]=r[1]*n+r[3]*i+r[5],e}function ws(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e}function Ss(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e}const YNe=Object.freeze(Object.defineProperty({__proto__:null,add:qL,applyTransform:lr,clone:Ro,copy:In,create:Mu,dist:bs,distSquare:Kl,distance:nw,distanceSquare:$K,div:HNe,dot:UNe,len:vy,lenSquare:_N,length:VNe,lengthSquare:GNe,lerp:Yg,max:Ss,min:ws,mul:WNe,negate:ZNe,normalize:Lf,scale:Zg,scaleAndAdd:rw,set:LT,sub:Dl},Symbol.toStringTag,{value:"Module"}));var Qf=function(){function e(t,r){this.target=t,this.topTarget=r&&r.topTarget}return e}(),XNe=function(){function e(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return e.prototype._dragStart=function(t){for(var r=t.target;r&&!r.draggable;)r=r.parent||r.__hostTarget;r&&(this._draggingTarget=r,r.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new Qf(r,t),"dragstart",t.event))},e.prototype._drag=function(t){var r=this._draggingTarget;if(r){var n=t.offsetX,i=t.offsetY,a=n-this._x,o=i-this._y;this._x=n,this._y=i,r.drift(a,o,t),this.handler.dispatchToElement(new Qf(r,t),"drag",t.event);var s=this.handler.findHover(n,i,r).target,l=this._dropTarget;this._dropTarget=s,r!==s&&(l&&s!==l&&this.handler.dispatchToElement(new Qf(l,t),"dragleave",t.event),s&&s!==l&&this.handler.dispatchToElement(new Qf(s,t),"dragenter",t.event))}},e.prototype._dragEnd=function(t){var r=this._draggingTarget;r&&(r.dragging=!1),this.handler.dispatchToElement(new Qf(r,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new Qf(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},e}(),_a=function(){function e(t){t&&(this._$eventProcessor=t)}return e.prototype.on=function(t,r,n,i){this._$handlers||(this._$handlers={});var a=this._$handlers;if(typeof r=="function"&&(i=n,n=r,r=null),!n||!t)return this;var o=this._$eventProcessor;r!=null&&o&&o.normalizeQuery&&(r=o.normalizeQuery(r)),a[t]||(a[t]=[]);for(var s=0;s<a[t].length;s++)if(a[t][s].h===n)return this;var l={h:n,query:r,ctx:i||this,callAtLast:n.zrEventfulCallAtLast},u=a[t].length-1,c=a[t][u];return c&&c.callAtLast?a[t].splice(u,0,l):a[t].push(l),this},e.prototype.isSilent=function(t){var r=this._$handlers;return!r||!r[t]||!r[t].length},e.prototype.off=function(t,r){var n=this._$handlers;if(!n)return this;if(!t)return this._$handlers={},this;if(r){if(n[t]){for(var i=[],a=0,o=n[t].length;a<o;a++)n[t][a].h!==r&&i.push(n[t][a]);n[t]=i}n[t]&&n[t].length===0&&delete n[t]}else delete n[t];return this},e.prototype.trigger=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[t],a=this._$eventProcessor;if(i)for(var o=r.length,s=i.length,l=0;l<s;l++){var u=i[l];if(!(a&&a.filter&&u.query!=null&&!a.filter(t,u.query)))switch(o){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,r[0]);break;case 2:u.h.call(u.ctx,r[0],r[1]);break;default:u.h.apply(u.ctx,r);break}}return a&&a.afterTrigger&&a.afterTrigger(t),this},e.prototype.triggerWithContext=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[t],a=this._$eventProcessor;if(i)for(var o=r.length,s=r[o-1],l=i.length,u=0;u<l;u++){var c=i[u];if(!(a&&a.filter&&c.query!=null&&!a.filter(t,c.query)))switch(o){case 0:c.h.call(s);break;case 1:c.h.call(s,r[0]);break;case 2:c.h.call(s,r[0],r[1]);break;default:c.h.apply(s,r.slice(1,o-1));break}}return a&&a.afterTrigger&&a.afterTrigger(t),this},e}(),qNe=Math.log(2);function KL(e,t,r,n,i,a){var o=n+"-"+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var l=Math.round(Math.log((1<<s)-1&~i)/qNe);return e[r][l]}for(var u=n|1<<r,c=r+1;n&1<<c;)c++;for(var f=0,h=0,d=0;h<s;h++){var v=1<<h;v&i||(f+=(d%2?-1:1)*e[r][h]*KL(e,t-1,c,u,i|v,a),d++)}return a[o]=f,f}function bF(e,t){var r=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],n={},i=KL(r,8,0,0,0,n);if(i!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]==null&&(a[s]=0),a[s]+=((o+s)%2?-1:1)*KL(r,7,o===0?1:0,1<<o,1<<s,n)/i*t[o];return function(l,u,c){var f=u*a[6]+c*a[7]+1;l[0]=(u*a[0]+c*a[1]+a[2])/f,l[1]=(u*a[3]+c*a[4]+a[5])/f}}}var iw="___zrEVENTSAVED",XA=[];function KNe(e,t,r,n,i){return JL(XA,t,n,i,!0)&&JL(e,r,XA[0],XA[1])}function JNe(e,t){e&&r(e),t&&r(t);function r(n){var i=n[iw];i&&(i.clearMarkers&&i.clearMarkers(),delete n[iw])}}function JL(e,t,r,n,i){if(t.getBoundingClientRect&&it.domSupported&&!FK(t)){var a=t[iw]||(t[iw]={}),o=QNe(t,a),s=eje(o,a,i);if(s)return s(e,r,n),!0}return!1}function QNe(e,t){var r=t.markers;if(r)return r;r=t.markers=[];for(var n=["left","right"],i=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),s=o.style,l=a%2,u=(a>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",i[u]+":0",n[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),e.appendChild(o),r.push(o)}return t.clearMarkers=function(){R(r,function(c){c.parentNode&&c.parentNode.removeChild(c)})},r}function eje(e,t,r){for(var n=r?"invTrans":"trans",i=t[n],a=t.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=e[u].getBoundingClientRect(),f=2*u,h=c.left,d=c.top;o.push(h,d),l=l&&a&&h===a[f]&&d===a[f+1],s.push(e[u].offsetLeft,e[u].offsetTop)}return l&&i?i:(t.srcCoords=o,t[n]=r?bF(s,o):bF(o,s))}function FK(e){return e.nodeName.toUpperCase()==="CANVAS"}var tje=/([&<>"'])/g,rje={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Nn(e){return e==null?"":(e+"").replace(tje,function(t,r){return rje[r]})}var nje=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,qA=[],ije=it.browser.firefox&&+it.browser.version.split(".")[0]<39;function QL(e,t,r,n){return r=r||{},n?wF(e,t,r):ije&&t.layerX!=null&&t.layerX!==t.offsetX?(r.zrX=t.layerX,r.zrY=t.layerY):t.offsetX!=null?(r.zrX=t.offsetX,r.zrY=t.offsetY):wF(e,t,r),r}function wF(e,t,r){if(it.domSupported&&e.getBoundingClientRect){var n=t.clientX,i=t.clientY;if(FK(e)){var a=e.getBoundingClientRect();r.zrX=n-a.left,r.zrY=i-a.top;return}else if(JL(qA,e,n,i)){r.zrX=qA[0],r.zrY=qA[1];return}}r.zrX=r.zrY=0}function bN(e){return e||window.event}function Yi(e,t,r){if(t=bN(t),t.zrX!=null)return t;var n=t.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&QL(e,o,t,r)}else{QL(e,t,t,r);var a=aje(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&nje.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function aje(e){var t=e.wheelDelta;if(t)return t;var r=e.deltaX,n=e.deltaY;if(r==null||n==null)return t;var i=Math.abs(n!==0?n:r),a=n>0?-1:n<0?1:r>0?-1:1;return 3*i*a}function eI(e,t,r,n){e.addEventListener(t,r,n)}function oje(e,t,r,n){e.removeEventListener(t,r,n)}var Hs=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function SF(e){return e.which===2||e.which===3}var sje=function(){function e(){this._track=[]}return e.prototype.recognize=function(t,r,n){return this._doTrack(t,r,n),this._recognize(t)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(t,r,n){var i=t.touches;if(i){for(var a={points:[],touches:[],target:r,event:t},o=0,s=i.length;o<s;o++){var l=i[o],u=QL(n,l,{});a.points.push([u.zrX,u.zrY]),a.touches.push(l)}this._track.push(a)}},e.prototype._recognize=function(t){for(var r in KA)if(KA.hasOwnProperty(r)){var n=KA[r](this._track,t);if(n)return n}},e}();function TF(e){var t=e[1][0]-e[0][0],r=e[1][1]-e[0][1];return Math.sqrt(t*t+r*r)}function lje(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var KA={pinch:function(e,t){var r=e.length;if(r){var n=(e[r-1]||{}).points,i=(e[r-2]||{}).points||n;if(i&&i.length>1&&n&&n.length>1){var a=TF(n)/TF(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=lje(n);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:e[0].target,event:t}}}}};function Yr(){return[1,0,0,1,0,0]}function f0(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function h0(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function Wa(e,t,r){var n=t[0]*r[0]+t[2]*r[1],i=t[1]*r[0]+t[3]*r[1],a=t[0]*r[2]+t[2]*r[3],o=t[1]*r[2]+t[3]*r[3],s=t[0]*r[4]+t[2]*r[5]+t[4],l=t[1]*r[4]+t[3]*r[5]+t[5];return e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e}function Ka(e,t,r){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+r[0],e[5]=t[5]+r[1],e}function rl(e,t,r,n){n===void 0&&(n=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],l=t[3],u=t[5],c=Math.sin(r),f=Math.cos(r);return e[0]=i*f+s*c,e[1]=-i*c+s*f,e[2]=a*f+l*c,e[3]=-a*c+f*l,e[4]=f*(o-n[0])+c*(u-n[1])+n[0],e[5]=f*(u-n[1])-c*(o-n[0])+n[1],e}function IT(e,t,r){var n=r[0],i=r[1];return e[0]=t[0]*n,e[1]=t[1]*i,e[2]=t[2]*n,e[3]=t[3]*i,e[4]=t[4]*n,e[5]=t[5]*i,e}function pa(e,t){var r=t[0],n=t[2],i=t[4],a=t[1],o=t[3],s=t[5],l=r*o-a*n;return l?(l=1/l,e[0]=o*l,e[1]=-a*l,e[2]=-n*l,e[3]=r*l,e[4]=(n*s-o*i)*l,e[5]=(a*i-r*s)*l,e):null}function VK(e){var t=Yr();return h0(t,e),t}const uje=Object.freeze(Object.defineProperty({__proto__:null,clone:VK,copy:h0,create:Yr,identity:f0,invert:pa,mul:Wa,rotate:rl,scale:IT,translate:Ka},Symbol.toStringTag,{value:"Module"}));var Ne=function(){function e(t,r){this.x=t||0,this.y=r||0}return e.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(t,r){return this.x=t,this.y=r,this},e.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},e.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},e.prototype.scale=function(t){this.x*=t,this.y*=t},e.prototype.scaleAndAdd=function(t,r){this.x+=t.x*r,this.y+=t.y*r},e.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},e.prototype.dot=function(t){return this.x*t.x+this.y*t.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},e.prototype.distance=function(t){var r=this.x-t.x,n=this.y-t.y;return Math.sqrt(r*r+n*n)},e.prototype.distanceSquare=function(t){var r=this.x-t.x,n=this.y-t.y;return r*r+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(t){if(t){var r=this.x,n=this.y;return this.x=t[0]*r+t[2]*n+t[4],this.y=t[1]*r+t[3]*n+t[5],this}},e.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},e.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},e.set=function(t,r,n){t.x=r,t.y=n},e.copy=function(t,r){t.x=r.x,t.y=r.y},e.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},e.lenSquare=function(t){return t.x*t.x+t.y*t.y},e.dot=function(t,r){return t.x*r.x+t.y*r.y},e.add=function(t,r,n){t.x=r.x+n.x,t.y=r.y+n.y},e.sub=function(t,r,n){t.x=r.x-n.x,t.y=r.y-n.y},e.scale=function(t,r,n){t.x=r.x*n,t.y=r.y*n},e.scaleAndAdd=function(t,r,n,i){t.x=r.x+n.x*i,t.y=r.y+n.y*i},e.lerp=function(t,r,n,i){var a=1-i;t.x=a*r.x+i*n.x,t.y=a*r.y+i*n.y},e}(),Ec=Math.min,Uh=Math.max,tI=Math.abs,CF=["x","y"],cje=["width","height"],Bu=new Ne,zu=new Ne,$u=new Ne,Fu=new Ne,bi=GK(),yg=bi.minTv,rI=bi.maxTv,Xg=[0,0],je=function(){function e(t,r,n,i){e.set(this,t,r,n,i)}return e.set=function(t,r,n,i,a){return i<0&&(r=r+i,i=-i),a<0&&(n=n+a,a=-a),t.x=r,t.y=n,t.width=i,t.height=a,t},e.prototype.union=function(t){var r=Ec(t.x,this.x),n=Ec(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Uh(t.x+t.width,this.x+this.width)-r:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=Uh(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=r,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(t){var r=this,n=t.width/r.width,i=t.height/r.height,a=Yr();return Ka(a,a,[-r.x,-r.y]),IT(a,a,[n,i]),Ka(a,a,[t.x,t.y]),a},e.prototype.intersect=function(t,r,n){return e.intersect(this,t,r,n)},e.intersect=function(t,r,n,i){n&&Ne.set(n,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!t||!r)return!1;t instanceof e||(t=e.set(fje,t.x,t.y,t.width,t.height)),r instanceof e||(r=e.set(hje,r.x,r.y,r.width,r.height));var s=!!n;bi.reset(i,s);var l=bi.touchThreshold,u=t.x+l,c=t.x+t.width-l,f=t.y+l,h=t.y+t.height-l,d=r.x+l,v=r.x+r.width-l,m=r.y+l,y=r.y+r.height-l;if(u>c||f>h||d>v||m>y)return!1;var x=!(c<d||v<u||h<m||y<f);return(s||a)&&(Xg[0]=1/0,Xg[1]=0,AF(u,c,d,v,0,s,a,o),AF(f,h,m,y,1,s,a,o),s&&Ne.copy(n,x?bi.useDir?bi.dirMinTv:yg:rI)),x},e.contain=function(t,r,n){return r>=t.x&&r<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},e.prototype.contain=function(t,r){return e.contain(this,t,r)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(t,r){return t.x=r.x,t.y=r.y,t.width=r.width,t.height=r.height,t},e.applyTransform=function(t,r,n){if(!n){t!==r&&e.copy(t,r);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var i=n[0],a=n[3],o=n[4],s=n[5];t.x=r.x*i+o,t.y=r.y*a+s,t.width=r.width*i,t.height=r.height*a,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}Bu.x=$u.x=r.x,Bu.y=Fu.y=r.y,zu.x=Fu.x=r.x+r.width,zu.y=$u.y=r.y+r.height,Bu.transform(n),Fu.transform(n),zu.transform(n),$u.transform(n),t.x=Ec(Bu.x,zu.x,$u.x,Fu.x),t.y=Ec(Bu.y,zu.y,$u.y,Fu.y);var l=Uh(Bu.x,zu.x,$u.x,Fu.x),u=Uh(Bu.y,zu.y,$u.y,Fu.y);t.width=l-t.x,t.height=u-t.y},e}(),fje=new je(0,0,0,0),hje=new je(0,0,0,0);function AF(e,t,r,n,i,a,o,s){var l=tI(t-r),u=tI(n-e),c=Ec(l,u),f=CF[i],h=CF[1-i],d=cje[i];t<r||n<e?l<u?(a&&(rI[f]=-l),s&&(o[f]=t,o[d]=0)):(a&&(rI[f]=u),s&&(o[f]=e,o[d]=0)):(o&&(o[f]=Uh(e,r),o[d]=Ec(t,n)-o[f]),a&&(c<Xg[0]||bi.useDir)&&(Xg[0]=Ec(c,Xg[0]),(l<u||!bi.bidirectional)&&(yg[f]=l,yg[h]=0,bi.useDir&&bi.calcDirMTV()),(l>=u||!bi.bidirectional)&&(yg[f]=-u,yg[h]=0,bi.useDir&&bi.calcDirMTV())))}function GK(){var e=0,t=new Ne,r=new Ne,n={minTv:new Ne,maxTv:new Ne,useDir:!1,dirMinTv:new Ne,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(a,o){n.touchThreshold=0,a&&a.touchThreshold!=null&&(n.touchThreshold=Uh(0,a.touchThreshold)),n.negativeSize=!1,o&&(n.minTv.set(1/0,1/0),n.maxTv.set(0,0),n.useDir=!1,a&&a.direction!=null&&(n.useDir=!0,n.dirMinTv.copy(n.minTv),r.copy(n.minTv),e=a.direction,n.bidirectional=a.bidirectional==null||!!a.bidirectional,n.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var a=n.minTv,o=n.dirMinTv,s=a.y*a.y+a.x*a.x,l=Math.sin(e),u=Math.cos(e),c=l*a.y+u*a.x;if(i(c)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(r.x=s*u/c,r.y=s*l/c,i(r.x)&&i(r.y)){o.set(0,0);return}(n.bidirectional||t.dot(r)>0)&&r.len()<o.len()&&o.copy(r)}};function i(a){return tI(a)<1e-10}return n}var WK="silent";function dje(e,t,r){return{type:e,event:r,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:r.zrX,offsetY:r.zrY,gestureEvent:r.gestureEvent,pinchX:r.pinchX,pinchY:r.pinchY,pinchScale:r.pinchScale,wheelDelta:r.zrDelta,zrByTouch:r.zrByTouch,which:r.which,stop:vje}}function vje(){Hs(this.event)}var pje=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.handler=null,r}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(_a),Dp=function(){function e(t,r){this.x=t,this.y=r}return e}(),gje=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],JA=new je(0,0,0,0),HK=function(e){K(t,e);function t(r,n,i,a,o){var s=e.call(this)||this;return s._hovered=new Dp(0,0),s.storage=r,s.painter=n,s.painterRoot=a,s._pointerSize=o,i=i||new pje,s.proxy=null,s.setHandlerProxy(i),s._draggingMgr=new XNe(s),s}return t.prototype.setHandlerProxy=function(r){this.proxy&&this.proxy.dispose(),r&&(R(gje,function(n){r.on&&r.on(n,this[n],this)},this),r.handler=this),this.proxy=r},t.prototype.mousemove=function(r){var n=r.zrX,i=r.zrY,a=UK(this,n,i),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=a?new Dp(n,i):this.findHover(n,i),u=l.target,c=this.proxy;c.setCursor&&c.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",r),this.dispatchToElement(l,"mousemove",r),u&&u!==s&&this.dispatchToElement(l,"mouseover",r)},t.prototype.mouseout=function(r){var n=r.zrEventControl;n!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",r),n!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:r})},t.prototype.resize=function(){this._hovered=new Dp(0,0)},t.prototype.dispatch=function(r,n){var i=this[r];i&&i.call(this,n)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(r){var n=this.proxy;n.setCursor&&n.setCursor(r)},t.prototype.dispatchToElement=function(r,n,i){r=r||{};var a=r.target;if(!(a&&a.silent)){for(var o="on"+n,s=dje(n,r,i);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(n,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(n,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(n,s)}))}},t.prototype.findHover=function(r,n,i){var a=this.storage.getDisplayList(),o=new Dp(r,n);if(MF(a,o,r,n,i),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,c=new je(r-u,n-u,l,l),f=a.length-1;f>=0;f--){var h=a[f];h!==i&&!h.ignore&&!h.ignoreCoarsePointer&&(!h.parent||!h.parent.ignoreCoarsePointer)&&(JA.copy(h.getBoundingRect()),h.transform&&JA.applyTransform(h.transform),JA.intersect(c)&&s.push(h))}if(s.length)for(var d=4,v=Math.PI/12,m=Math.PI*2,y=0;y<u;y+=d)for(var x=0;x<m;x+=v){var _=r+y*Math.cos(x),b=n+y*Math.sin(x);if(MF(s,o,_,b,i),o.target)return o}}return o},t.prototype.processGesture=function(r,n){this._gestureMgr||(this._gestureMgr=new sje);var i=this._gestureMgr;n==="start"&&i.clear();var a=i.recognize(r,this.findHover(r.zrX,r.zrY,null).target,this.proxy.dom);if(n==="end"&&i.clear(),a){var o=a.type;r.gestureEvent=o;var s=new Dp;s.target=a.target,this.dispatchToElement(s,o,a.event)}},t}(_a);R(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(e){HK.prototype[e]=function(t){var r=t.zrX,n=t.zrY,i=UK(this,r,n),a,o;if((e!=="mouseup"||!i)&&(a=this.findHover(r,n),o=a.target),e==="mousedown")this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(e==="mouseup")this._upEl=o;else if(e==="click"){if(this._downEl!==this._upEl||!this._downPoint||bs(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function mje(e,t,r){if(e[e.rectHover?"rectContain":"contain"](t,r)){for(var n=e,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(t,r))return!1}n.silent&&(i=!0);var s=n.__hostTarget;n=s?n.ignoreHostSilent?null:s:n.parent}return i?WK:!0}return!1}function MF(e,t,r,n,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=mje(o,r,n))&&(!t.topTarget&&(t.topTarget=o),s!==WK)){t.target=o;break}}}function UK(e,t,r){var n=e.painter;return t<0||t>n.getWidth()||r<0||r>n.getHeight()}var ZK=32,Np=7;function yje(e){for(var t=0;e>=ZK;)t|=e&1,e>>=1;return e+t}function PF(e,t,r,n){var i=t+1;if(i===r)return 1;if(n(e[i++],e[t])<0){for(;i<r&&n(e[i],e[i-1])<0;)i++;xje(e,t,i)}else for(;i<r&&n(e[i],e[i-1])>=0;)i++;return i-t}function xje(e,t,r){for(r--;t<r;){var n=e[t];e[t++]=e[r],e[r--]=n}}function kF(e,t,r,n,i){for(n===t&&n++;n<r;n++){for(var a=e[n],o=t,s=n,l;o<s;)l=o+s>>>1,i(a,e[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;u>0;)e[o+u]=e[o+u-1],u--}e[o]=a}}function QA(e,t,r,n,i,a){var o=0,s=0,l=1;if(a(e,t[r+i])>0){for(s=n-i;l<s&&a(e,t[r+i+l])>0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;l<s&&a(e,t[r+i-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o<l;){var c=o+(l-o>>>1);a(e,t[r+c])>0?o=c+1:l=c}return l}function e2(e,t,r,n,i,a){var o=0,s=0,l=1;if(a(e,t[r+i])<0){for(s=i+1;l<s&&a(e,t[r+i-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=n-i;l<s&&a(e,t[r+i+l])>=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o<l;){var c=o+(l-o>>>1);a(e,t[r+c])<0?l=c:o=c+1}return l}function _je(e,t){var r=Np,n,i,a=0,o=[];n=[],i=[];function s(d,v){n[a]=d,i[a]=v,a+=1}function l(){for(;a>1;){var d=a-2;if(d>=1&&i[d-1]<=i[d]+i[d+1]||d>=2&&i[d-2]<=i[d]+i[d-1])i[d-1]<i[d+1]&&d--;else if(i[d]>i[d+1])break;c(d)}}function u(){for(;a>1;){var d=a-2;d>0&&i[d-1]<i[d+1]&&d--,c(d)}}function c(d){var v=n[d],m=i[d],y=n[d+1],x=i[d+1];i[d]=m+x,d===a-3&&(n[d+1]=n[d+2],i[d+1]=i[d+2]),a--;var _=e2(e[y],e,v,m,0,t);v+=_,m-=_,m!==0&&(x=QA(e[v+m-1],e,y,x,x-1,t),x!==0&&(m<=x?f(v,m,y,x):h(v,m,y,x)))}function f(d,v,m,y){var x=0;for(x=0;x<v;x++)o[x]=e[d+x];var _=0,b=m,S=d;if(e[S++]=e[b++],--y===0){for(x=0;x<v;x++)e[S+x]=o[_+x];return}if(v===1){for(x=0;x<y;x++)e[S+x]=e[b+x];e[S+y]=o[_];return}for(var T=r,C,A,P;;){C=0,A=0,P=!1;do if(t(e[b],o[_])<0){if(e[S++]=e[b++],A++,C=0,--y===0){P=!0;break}}else if(e[S++]=o[_++],C++,A=0,--v===1){P=!0;break}while((C|A)<T);if(P)break;do{if(C=e2(e[b],o,_,v,0,t),C!==0){for(x=0;x<C;x++)e[S+x]=o[_+x];if(S+=C,_+=C,v-=C,v<=1){P=!0;break}}if(e[S++]=e[b++],--y===0){P=!0;break}if(A=QA(o[_],e,b,y,0,t),A!==0){for(x=0;x<A;x++)e[S+x]=e[b+x];if(S+=A,b+=A,y-=A,y===0){P=!0;break}}if(e[S++]=o[_++],--v===1){P=!0;break}T--}while(C>=Np||A>=Np);if(P)break;T<0&&(T=0),T+=2}if(r=T,r<1&&(r=1),v===1){for(x=0;x<y;x++)e[S+x]=e[b+x];e[S+y]=o[_]}else{if(v===0)throw new Error;for(x=0;x<v;x++)e[S+x]=o[_+x]}}function h(d,v,m,y){var x=0;for(x=0;x<y;x++)o[x]=e[m+x];var _=d+v-1,b=y-1,S=m+y-1,T=0,C=0;if(e[S--]=e[_--],--v===0){for(T=S-(y-1),x=0;x<y;x++)e[T+x]=o[x];return}if(y===1){for(S-=v,_-=v,C=S+1,T=_+1,x=v-1;x>=0;x--)e[C+x]=e[T+x];e[S]=o[b];return}for(var A=r;;){var P=0,I=0,k=!1;do if(t(o[b],e[_])<0){if(e[S--]=e[_--],P++,I=0,--v===0){k=!0;break}}else if(e[S--]=o[b--],I++,P=0,--y===1){k=!0;break}while((P|I)<A);if(k)break;do{if(P=v-e2(o[b],e,d,v,v-1,t),P!==0){for(S-=P,_-=P,v-=P,C=S+1,T=_+1,x=P-1;x>=0;x--)e[C+x]=e[T+x];if(v===0){k=!0;break}}if(e[S--]=o[b--],--y===1){k=!0;break}if(I=y-QA(e[_],o,0,y,y-1,t),I!==0){for(S-=I,b-=I,y-=I,C=S+1,T=b+1,x=0;x<I;x++)e[C+x]=o[T+x];if(y<=1){k=!0;break}}if(e[S--]=e[_--],--v===0){k=!0;break}A--}while(P>=Np||I>=Np);if(k)break;A<0&&(A=0),A+=2}if(r=A,r<1&&(r=1),y===1){for(S-=v,_-=v,C=S+1,T=_+1,x=v-1;x>=0;x--)e[C+x]=e[T+x];e[S]=o[b]}else{if(y===0)throw new Error;for(T=S-(y-1),x=0;x<y;x++)e[T+x]=o[x]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function nb(e,t,r,n){r||(r=0),n||(n=e.length);var i=n-r;if(!(i<2)){var a=0;if(i<ZK){a=PF(e,r,n,t),kF(e,r,n,r+a,t);return}var o=_je(e,t),s=yje(i);do{if(a=PF(e,r,n,t),a<s){var l=i;l>s&&(l=s),kF(e,r,r+l,r+a,t),a=l}o.pushRun(r,a),o.mergeRuns(),i-=a,r+=a}while(i!==0);o.forceMergeRuns()}}var Si=1,xg=2,Mh=4,LF=!1;function t2(){LF||(LF=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function IF(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var bje=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=IF}return e.prototype.traverse=function(t,r){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(t,r)},e.prototype.getDisplayList=function(t,r){r=r||!1;var n=this._displayList;return(t||!n.length)&&this.updateDisplayList(r),n},e.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var r=this._roots,n=this._displayList,i=0,a=r.length;i<a;i++)this._updateAndAddDisplayable(r[i],null,t);n.length=this._displayListLen,nb(n,IF)},e.prototype._updateAndAddDisplayable=function(t,r,n){if(!(t.ignore&&!n)){t.beforeUpdate(),t.update(),t.afterUpdate();var i=t.getClipPath(),a=r&&r.length,o=0,s=t.__clipPaths;if(!t.ignoreClip&&(a||i)){if(s||(s=t.__clipPaths=[]),a)for(var l=0;l<r.length;l++)s[o++]=r[l];for(var u=i,c=t;u;)u.parent=c,u.updateTransform(),s[o++]=u,c=u,u=u.getClipPath()}if(s&&(s.length=o),t.childrenRef){for(var f=t.childrenRef(),h=0;h<f.length;h++){var d=f[h];t.__dirty&&(d.__dirty|=Si),this._updateAndAddDisplayable(d,s,n)}t.__dirty=0}else{var v=t;isNaN(v.z)&&(t2(),v.z=0),isNaN(v.z2)&&(t2(),v.z2=0),isNaN(v.zlevel)&&(t2(),v.zlevel=0),this._displayList[this._displayListLen++]=v}var m=t.getDecalElement&&t.getDecalElement();m&&this._updateAndAddDisplayable(m,s,n);var y=t.getTextGuideLine();y&&this._updateAndAddDisplayable(y,s,n);var x=t.getTextContent();x&&this._updateAndAddDisplayable(x,s,n)}},e.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},e.prototype.delRoot=function(t){if(t instanceof Array){for(var r=0,n=t.length;r<n;r++)this.delRoot(t[r]);return}var i=He(this._roots,t);i>=0&&this._roots.splice(i,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),aw;aw=it.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};var qg={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:Math.pow(1024,e-1)},exponentialOut:function(e){return e===1?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,r=.1,n=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=n/4):t=n*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)))},elasticOut:function(e){var t,r=.1,n=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=n/4):t=n*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/n)+1)},elasticInOut:function(e){var t,r=.1,n=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=n/4):t=n*Math.asin(1/r)/(2*Math.PI),(e*=2)<1?-.5*(r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)):r*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-qg.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?qg.bounceIn(e*2)*.5:qg.bounceOut(e*2-1)*.5+.5}},Lx=Math.pow,Jl=Math.sqrt,ow=1e-8,YK=1e-4,OF=Jl(3),Ix=1/3,wo=Mu(),ea=Mu(),hd=Mu();function Nl(e){return e>-ow&&e<ow}function XK(e){return e>ow||e<-ow}function Wr(e,t,r,n,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*n+3*a*r)}function EF(e,t,r,n,i){var a=1-i;return 3*(((t-e)*a+2*(r-t)*i)*a+(n-r)*i*i)}function sw(e,t,r,n,i,a){var o=n+3*(t-r)-e,s=3*(r-t*2+e),l=3*(t-e),u=e-i,c=s*s-3*o*l,f=s*l-9*o*u,h=l*l-3*s*u,d=0;if(Nl(c)&&Nl(f))if(Nl(s))a[0]=0;else{var v=-l/s;v>=0&&v<=1&&(a[d++]=v)}else{var m=f*f-4*c*h;if(Nl(m)){var y=f/c,v=-s/o+y,x=-y/2;v>=0&&v<=1&&(a[d++]=v),x>=0&&x<=1&&(a[d++]=x)}else if(m>0){var _=Jl(m),b=c*s+1.5*o*(-f+_),S=c*s+1.5*o*(-f-_);b<0?b=-Lx(-b,Ix):b=Lx(b,Ix),S<0?S=-Lx(-S,Ix):S=Lx(S,Ix);var v=(-s-(b+S))/(3*o);v>=0&&v<=1&&(a[d++]=v)}else{var T=(2*c*s-3*o*f)/(2*Jl(c*c*c)),C=Math.acos(T)/3,A=Jl(c),P=Math.cos(C),v=(-s-2*A*P)/(3*o),x=(-s+A*(P+OF*Math.sin(C)))/(3*o),I=(-s+A*(P-OF*Math.sin(C)))/(3*o);v>=0&&v<=1&&(a[d++]=v),x>=0&&x<=1&&(a[d++]=x),I>=0&&I<=1&&(a[d++]=I)}}return d}function qK(e,t,r,n,i){var a=6*r-12*t+6*e,o=9*t+3*n-3*e-9*r,s=3*t-3*e,l=0;if(Nl(o)){if(XK(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var c=a*a-4*o*s;if(Nl(c))i[0]=-a/(2*o);else if(c>0){var f=Jl(c),u=(-a+f)/(2*o),h=(-a-f)/(2*o);u>=0&&u<=1&&(i[l++]=u),h>=0&&h<=1&&(i[l++]=h)}}return l}function fu(e,t,r,n,i,a){var o=(t-e)*i+e,s=(r-t)*i+t,l=(n-r)*i+r,u=(s-o)*i+o,c=(l-s)*i+s,f=(c-u)*i+u;a[0]=e,a[1]=o,a[2]=u,a[3]=f,a[4]=f,a[5]=c,a[6]=l,a[7]=n}function KK(e,t,r,n,i,a,o,s,l,u,c){var f,h=.005,d=1/0,v,m,y,x;wo[0]=l,wo[1]=u;for(var _=0;_<1;_+=.05)ea[0]=Wr(e,r,i,o,_),ea[1]=Wr(t,n,a,s,_),y=Kl(wo,ea),y<d&&(f=_,d=y);d=1/0;for(var b=0;b<32&&!(h<YK);b++)v=f-h,m=f+h,ea[0]=Wr(e,r,i,o,v),ea[1]=Wr(t,n,a,s,v),y=Kl(ea,wo),v>=0&&y<d?(f=v,d=y):(hd[0]=Wr(e,r,i,o,m),hd[1]=Wr(t,n,a,s,m),x=Kl(hd,wo),m<=1&&x<d?(f=m,d=x):h*=.5);return c&&(c[0]=Wr(e,r,i,o,f),c[1]=Wr(t,n,a,s,f)),Jl(d)}function wje(e,t,r,n,i,a,o,s,l){for(var u=e,c=t,f=0,h=1/l,d=1;d<=l;d++){var v=d*h,m=Wr(e,r,i,o,v),y=Wr(t,n,a,s,v),x=m-u,_=y-c;f+=Math.sqrt(x*x+_*_),u=m,c=y}return f}function an(e,t,r,n){var i=1-n;return i*(i*e+2*n*t)+n*n*r}function nI(e,t,r,n){return 2*((1-n)*(t-e)+n*(r-t))}function Sje(e,t,r,n,i){var a=e-2*t+r,o=2*(t-e),s=e-n,l=0;if(Nl(a)){if(XK(o)){var u=-s/o;u>=0&&u<=1&&(i[l++]=u)}}else{var c=o*o-4*a*s;if(Nl(c)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(c>0){var f=Jl(c),u=(-o+f)/(2*a),h=(-o-f)/(2*a);u>=0&&u<=1&&(i[l++]=u),h>=0&&h<=1&&(i[l++]=h)}}return l}function JK(e,t,r){var n=e+r-2*t;return n===0?.5:(e-t)/n}function py(e,t,r,n,i){var a=(t-e)*n+e,o=(r-t)*n+t,s=(o-a)*n+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=r}function QK(e,t,r,n,i,a,o,s,l){var u,c=.005,f=1/0;wo[0]=o,wo[1]=s;for(var h=0;h<1;h+=.05){ea[0]=an(e,r,i,h),ea[1]=an(t,n,a,h);var d=Kl(wo,ea);d<f&&(u=h,f=d)}f=1/0;for(var v=0;v<32&&!(c<YK);v++){var m=u-c,y=u+c;ea[0]=an(e,r,i,m),ea[1]=an(t,n,a,m);var d=Kl(ea,wo);if(m>=0&&d<f)u=m,f=d;else{hd[0]=an(e,r,i,y),hd[1]=an(t,n,a,y);var x=Kl(hd,wo);y<=1&&x<f?(u=y,f=x):c*=.5}}return l&&(l[0]=an(e,r,i,u),l[1]=an(t,n,a,u)),Jl(f)}function Tje(e,t,r,n,i,a,o){for(var s=e,l=t,u=0,c=1/o,f=1;f<=o;f++){var h=f*c,d=an(e,r,i,h),v=an(t,n,a,h),m=d-s,y=v-l;u+=Math.sqrt(m*m+y*y),s=d,l=v}return u}var Cje=/cubic-bezier\(([0-9,\.e ]+)\)/;function wN(e){var t=e&&Cje.exec(e);if(t){var r=t[1].split(","),n=+Ai(r[0]),i=+Ai(r[1]),a=+Ai(r[2]),o=+Ai(r[3]);if(isNaN(n+i+a+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:sw(0,n,a,1,l,s)&&Wr(0,i,o,1,s[0])}}}var Aje=function(){function e(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||sr,this.ondestroy=t.ondestroy||sr,this.onrestart=t.onrestart||sr,t.easing&&this.setEasing(t.easing)}return e.prototype.step=function(t,r){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=r;return}var n=this._life,i=t-this._startTime-this._pausedTime,a=i/n;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=i%n;this._startTime=t-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(t){this.easing=t,this.easingFunc=ke(t)?t:qg[t]||wN(t)},e}(),eJ=function(){function e(t){this.value=t}return e}(),Mje=function(){function e(){this._len=0}return e.prototype.insert=function(t){var r=new eJ(t);return this.insertEntry(r),r},e.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},e.prototype.remove=function(t){var r=t.prev,n=t.next;r?r.next=n:this.head=n,n?n.prev=r:this.tail=r,t.next=t.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),qd=function(){function e(t){this._list=new Mje,this._maxSize=10,this._map={},this._maxSize=t}return e.prototype.put=function(t,r){var n=this._list,i=this._map,a=null;if(i[t]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete i[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=r:s=new eJ(r),s.key=t,n.insertEntry(s),i[t]=s}return a},e.prototype.get=function(t){var r=this._map[t],n=this._list;if(r!=null)return r!==n.tail&&(n.remove(r),n.insertEntry(r)),r.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),DF={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],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 Ha(e){return e=Math.round(e),e<0?0:e>255?255:e}function Pje(e){return e=Math.round(e),e<0?0:e>360?360:e}function gy(e){return e<0?0:e>1?1:e}function ib(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?Ha(parseFloat(t)/100*255):Ha(parseInt(t,10))}function Ls(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?gy(parseFloat(t)/100):gy(parseFloat(t))}function r2(e,t,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?e+(t-e)*r*6:r*2<1?t:r*3<2?e+(t-e)*(2/3-r)*6:e}function jl(e,t,r){return e+(t-e)*r}function Zi(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}function iI(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var tJ=new qd(20),Ox=null;function eh(e,t){Ox&&iI(Ox,t),Ox=tJ.put(e,Ox||t.slice())}function jn(e,t){if(e){t=t||[];var r=tJ.get(e);if(r)return iI(t,r);e=e+"";var n=e.replace(/ /g,"").toLowerCase();if(n in DF)return iI(t,DF[n]),eh(e,t),t;var i=n.length;if(n.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(n.slice(1,4),16);if(!(a>=0&&a<=4095)){Zi(t,0,0,0,1);return}return Zi(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(n.slice(4),16)/15:1),eh(e,t),t}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){Zi(t,0,0,0,1);return}return Zi(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),eh(e,t),t}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){var l=n.substr(0,o),u=n.substr(o+1,s-(o+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Zi(t,+u[0],+u[1],+u[2],1):Zi(t,0,0,0,1);c=Ls(u.pop());case"rgb":if(u.length>=3)return Zi(t,ib(u[0]),ib(u[1]),ib(u[2]),u.length===3?c:Ls(u[3])),eh(e,t),t;Zi(t,0,0,0,1);return;case"hsla":if(u.length!==4){Zi(t,0,0,0,1);return}return u[3]=Ls(u[3]),aI(u,t),eh(e,t),t;case"hsl":if(u.length!==3){Zi(t,0,0,0,1);return}return aI(u,t),eh(e,t),t;default:return}}Zi(t,0,0,0,1)}}function aI(e,t){var r=(parseFloat(e[0])%360+360)%360/360,n=Ls(e[1]),i=Ls(e[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return t=t||[],Zi(t,Ha(r2(o,a,r+1/3)*255),Ha(r2(o,a,r)*255),Ha(r2(o,a,r-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function kje(e){if(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=a-i,s=(a+i)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+i):u=o/(2-a-i);var c=((a-t)/6+o/2)/o,f=((a-r)/6+o/2)/o,h=((a-n)/6+o/2)/o;t===a?l=h-f:r===a?l=1/3+c-h:n===a&&(l=2/3+f-c),l<0&&(l+=1),l>1&&(l-=1)}var d=[l*360,u,s];return e[3]!=null&&d.push(e[3]),d}}function lw(e,t){var r=jn(e);if(r){for(var n=0;n<3;n++)t<0?r[n]=r[n]*(1-t)|0:r[n]=(255-r[n])*t+r[n]|0,r[n]>255?r[n]=255:r[n]<0&&(r[n]=0);return ua(r,r.length===4?"rgba":"rgb")}}function Lje(e){var t=jn(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function Kg(e,t,r){if(!(!(t&&t.length)||!(e>=0&&e<=1))){r=r||[];var n=e*(t.length-1),i=Math.floor(n),a=Math.ceil(n),o=t[i],s=t[a],l=n-i;return r[0]=Ha(jl(o[0],s[0],l)),r[1]=Ha(jl(o[1],s[1],l)),r[2]=Ha(jl(o[2],s[2],l)),r[3]=gy(jl(o[3],s[3],l)),r}}var Ije=Kg;function SN(e,t,r){if(!(!(t&&t.length)||!(e>=0&&e<=1))){var n=e*(t.length-1),i=Math.floor(n),a=Math.ceil(n),o=jn(t[i]),s=jn(t[a]),l=n-i,u=ua([Ha(jl(o[0],s[0],l)),Ha(jl(o[1],s[1],l)),Ha(jl(o[2],s[2],l)),gy(jl(o[3],s[3],l))],"rgba");return r?{color:u,leftIndex:i,rightIndex:a,value:n}:u}}var Oje=SN;function Is(e,t,r,n){var i=jn(e);if(e)return i=kje(i),t!=null&&(i[0]=Pje(ke(t)?t(i[0]):t)),r!=null&&(i[1]=Ls(ke(r)?r(i[1]):r)),n!=null&&(i[2]=Ls(ke(n)?n(i[2]):n)),ua(aI(i),"rgba")}function my(e,t){var r=jn(e);if(r&&t!=null)return r[3]=gy(t),ua(r,"rgba")}function ua(e,t){if(!(!e||!e.length)){var r=e[0]+","+e[1]+","+e[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(r+=","+e[3]),t+"("+r+")"}}function yy(e,t){var r=jn(e);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*t:0}function Eje(){return ua([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],"rgb")}var NF=new qd(100);function uw(e){if(ye(e)){var t=NF.get(e);return t||(t=lw(e,-.1),NF.put(e,t)),t}else if(l0(e)){var r=ae({},e);return r.colorStops=le(e.colorStops,function(n){return{offset:n.offset,color:lw(n.color,-.1)}}),r}return e}const Dje=Object.freeze(Object.defineProperty({__proto__:null,fastLerp:Kg,fastMapToColor:Ije,lerp:SN,lift:lw,liftColor:uw,lum:yy,mapToColor:Oje,modifyAlpha:my,modifyHSL:Is,parse:jn,parseCssFloat:Ls,parseCssInt:ib,random:Eje,stringify:ua,toHex:Lje},Symbol.toStringTag,{value:"Module"}));var cw=Math.round;function xy(e){var t;if(!e||e==="transparent")e="none";else if(typeof e=="string"&&e.indexOf("rgba")>-1){var r=jn(e);r&&(e="rgb("+r[0]+","+r[1]+","+r[2]+")",t=r[3])}return{color:e,opacity:t??1}}var jF=1e-4;function Rl(e){return e<jF&&e>-jF}function Ex(e){return cw(e*1e3)/1e3}function oI(e){return cw(e*1e4)/1e4}function Nje(e){return"matrix("+Ex(e[0])+","+Ex(e[1])+","+Ex(e[2])+","+Ex(e[3])+","+oI(e[4])+","+oI(e[5])+")"}var jje={left:"start",right:"end",center:"middle",middle:"middle"};function Rje(e,t,r){return r==="top"?e+=t/2:r==="bottom"&&(e-=t/2),e}function Bje(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function zje(e){var t=e.style,r=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),r[0],r[1]].join(",")}function rJ(e){return e&&!!e.image}function $je(e){return e&&!!e.svgElement}function TN(e){return rJ(e)||$je(e)}function nJ(e){return e.type==="linear"}function iJ(e){return e.type==="radial"}function aJ(e){return e&&(e.type==="linear"||e.type==="radial")}function OT(e){return"url(#"+e+")"}function oJ(e){var t=e.getGlobalScale(),r=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(r)/Math.log(10)),1)}function sJ(e){var t=e.x||0,r=e.y||0,n=(e.rotation||0)*Ug,i=Ae(e.scaleX,1),a=Ae(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,l=[];return(t||r)&&l.push("translate("+t+"px,"+r+"px)"),n&&l.push("rotate("+n+")"),(i!==1||a!==1)&&l.push("scale("+i+","+a+")"),(o||s)&&l.push("skew("+cw(o*Ug)+"deg, "+cw(s*Ug)+"deg)"),l.join(" ")}var Fje=function(){return it.hasGlobalWindow&&ke(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:typeof Buffer<"u"?function(e){return Buffer.from(e).toString("base64")}:function(e){return null}}(),sI=Array.prototype.slice;function ds(e,t,r){return(t-e)*r+e}function n2(e,t,r,n){for(var i=t.length,a=0;a<i;a++)e[a]=ds(t[a],r[a],n);return e}function Vje(e,t,r,n){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=ds(t[o][s],r[o][s],n)}return e}function Dx(e,t,r,n){for(var i=t.length,a=0;a<i;a++)e[a]=t[a]+r[a]*n;return e}function RF(e,t,r,n){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=t[o][s]+r[o][s]*n}return e}function Gje(e,t){for(var r=e.length,n=t.length,i=r>n?t:e,a=Math.min(r,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(r,n);s++)i.push({offset:o.offset,color:o.color.slice()})}function Wje(e,t,r){var n=e,i=t;if(!(!n.push||!i.push)){var a=n.length,o=i.length;if(a!==o){var s=a>o;if(s)n.length=o;else for(var l=a;l<o;l++)n.push(r===1?i[l]:sI.call(i[l]))}for(var u=n[0]&&n[0].length,l=0;l<n.length;l++)if(r===1)isNaN(n[l])&&(n[l]=i[l]);else for(var c=0;c<u;c++)isNaN(n[l][c])&&(n[l][c]=i[l][c])}}function Jg(e){if(bn(e)){var t=e.length;if(bn(e[0])){for(var r=[],n=0;n<t;n++)r.push(sI.call(e[n]));return r}return sI.call(e)}return e}function ab(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=e[3]==null?1:e[3],"rgba("+e.join(",")+")"}function Hje(e){return bn(e&&e[0])?2:1}var Nx=0,ob=1,lJ=2,_g=3,lI=4,uI=5,BF=6;function zF(e){return e===lI||e===uI}function jx(e){return e===ob||e===lJ}var jp=[0,0,0,0],Uje=function(){function e(t){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=t}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(t,r,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=BF,l=r;if(bn(r)){var u=Hje(r);s=u,(u===1&&!st(r[0])||u===2&&!st(r[0][0]))&&(o=!0)}else if(st(r)&&!xn(r))s=Nx;else if(ye(r))if(!isNaN(+r))s=Nx;else{var c=jn(r);c&&(l=c,s=_g)}else if(l0(r)){var f=ae({},l);f.colorStops=le(r.colorStops,function(d){return{offset:d.offset,color:jn(d.color)}}),nJ(r)?s=lI:iJ(r)&&(s=uI),l=f}a===0?this.valType=s:(s!==this.valType||s===BF)&&(o=!0),this.discrete=this.discrete||o;var h={time:t,value:l,rawValue:r,percent:0};return n&&(h.easing=n,h.easingFunc=ke(n)?n:qg[n]||wN(n)),i.push(h),h},e.prototype.prepare=function(t,r){var n=this.keyframes;this._needsSort&&n.sort(function(m,y){return m.time-y.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,l=jx(i),u=zF(i),c=0;c<a;c++){var f=n[c],h=f.value,d=o.value;f.percent=f.time/t,s||(l&&c!==a-1?Wje(h,d,i):u&&Gje(h.colorStops,d.colorStops))}if(!s&&i!==uI&&r&&this.needsAnimate()&&r.needsAnimate()&&i===r.valType&&!r._finished){this._additiveTrack=r;for(var v=n[0].value,c=0;c<a;c++)i===Nx?n[c].additiveValue=n[c].value-v:i===_g?n[c].additiveValue=Dx([],n[c].value,v,-1):jx(i)&&(n[c].additiveValue=i===ob?Dx([],n[c].value,v,-1):RF([],n[c].value,v,-1))}},e.prototype.step=function(t,r){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,i=n?"additiveValue":"value",a=this.valType,o=this.keyframes,s=o.length,l=this.propName,u=a===_g,c,f=this._lastFr,h=Math.min,d,v;if(s===1)d=v=o[0];else{if(r<0)c=0;else if(r<this._lastFrP){var m=h(f+1,s-1);for(c=m;c>=0&&!(o[c].percent<=r);c--);c=h(c,s-2)}else{for(c=f;c<s&&!(o[c].percent>r);c++);c=h(c-1,s-2)}v=o[c+1],d=o[c]}if(d&&v){this._lastFr=c,this._lastFrP=r;var y=v.percent-d.percent,x=y===0?1:h((r-d.percent)/y,1);v.easingFunc&&(x=v.easingFunc(x));var _=n?this._additiveValue:u?jp:t[l];if((jx(a)||u)&&!_&&(_=this._additiveValue=[]),this.discrete)t[l]=x<1?d.rawValue:v.rawValue;else if(jx(a))a===ob?n2(_,d[i],v[i],x):Vje(_,d[i],v[i],x);else if(zF(a)){var b=d[i],S=v[i],T=a===lI;t[l]={type:T?"linear":"radial",x:ds(b.x,S.x,x),y:ds(b.y,S.y,x),colorStops:le(b.colorStops,function(A,P){var I=S.colorStops[P];return{offset:ds(A.offset,I.offset,x),color:ab(n2([],A.color,I.color,x))}}),global:S.global},T?(t[l].x2=ds(b.x2,S.x2,x),t[l].y2=ds(b.y2,S.y2,x)):t[l].r=ds(b.r,S.r,x)}else if(u)n2(_,d[i],v[i],x),n||(t[l]=ab(_));else{var C=ds(d[i],v[i],x);n?this._additiveValue=C:t[l]=C}n&&this._addToTarget(t)}}},e.prototype._addToTarget=function(t){var r=this.valType,n=this.propName,i=this._additiveValue;r===Nx?t[n]=t[n]+i:r===_g?(jn(t[n],jp),Dx(jp,jp,i,1),t[n]=ab(jp)):r===ob?Dx(t[n],t[n],i,1):r===lJ&&RF(t[n],t[n],i,1)},e}(),CN=function(){function e(t,r,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=r,r&&i){MT("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(t){this._target=t},e.prototype.when=function(t,r,n){return this.whenWithKeys(t,r,at(r),n)},e.prototype.whenWithKeys=function(t,r,n,i){for(var a=this._tracks,o=0;o<n.length;o++){var s=n[o],l=a[s];if(!l){l=a[s]=new Uje(s);var u=void 0,c=this._getAdditiveTrack(s);if(c){var f=c.keyframes,h=f[f.length-1];u=h&&h.value,c.valType===_g&&u&&(u=ab(u))}else u=this._target[s];if(u==null)continue;t>0&&l.addKeyframe(0,Jg(u),i),this._trackKeys.push(s)}l.addKeyframe(t,Jg(r[s]),i)}return this._maxTime=Math.max(this._maxTime,t),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var r=t.length,n=0;n<r;n++)t[n].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var t=this.animation,r=this._abortedCbs;if(t&&t.removeClip(this._clip),this._clip=null,r)for(var n=0;n<r.length;n++)r[n].call(this)},e.prototype._setTracksFinished=function(){for(var t=this._tracks,r=this._trackKeys,n=0;n<r.length;n++)t[r[n]].setFinished()},e.prototype._getAdditiveTrack=function(t){var r,n=this._additiveAnimators;if(n)for(var i=0;i<n.length;i++){var a=n[i].getTrack(t);a&&(r=a)}return r},e.prototype.start=function(t){if(!(this._started>0)){this._started=1;for(var r=this,n=[],i=this._maxTime||0,a=0;a<this._trackKeys.length;a++){var o=this._trackKeys[a],s=this._tracks[o],l=this._getAdditiveTrack(o),u=s.keyframes,c=u.length;if(s.prepare(i,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var f=u[c-1];f&&(r._target[s.propName]=f.rawValue),s.setFinished()}else n.push(s)}if(n.length||this._force){var h=new Aje({life:i,loop:this._loop,delay:this._delay||0,onframe:function(d){r._started=2;var v=r._additiveAnimators;if(v){for(var m=!1,y=0;y<v.length;y++)if(v[y]._clip){m=!0;break}m||(r._additiveAnimators=null)}for(var y=0;y<n.length;y++)n[y].step(r._target,d);var x=r._onframeCbs;if(x)for(var y=0;y<x.length;y++)x[y](r._target,d)},ondestroy:function(){r._doneCallback()}});this._clip=h,this.animation&&this.animation.addClip(h),t&&h.setEasing(t)}else this._doneCallback();return this}},e.prototype.stop=function(t){if(this._clip){var r=this._clip;t&&r.onframe(1),this._abortedCallback()}},e.prototype.delay=function(t){return this._delay=t,this},e.prototype.during=function(t){return t&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(t)),this},e.prototype.done=function(t){return t&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(t)),this},e.prototype.aborted=function(t){return t&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(t)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(t){return this._tracks[t]},e.prototype.getTracks=function(){var t=this;return le(this._trackKeys,function(r){return t._tracks[r]})},e.prototype.stopTracks=function(t,r){if(!t.length||!this._clip)return!0;for(var n=this._tracks,i=this._trackKeys,a=0;a<t.length;a++){var o=n[t[a]];o&&!o.isFinished()&&(r?o.step(this._target,1):this._started===1&&o.step(this._target,0),o.setFinished())}for(var s=!0,a=0;a<i.length;a++)if(!n[i[a]].isFinished()){s=!1;break}return s&&this._abortedCallback(),s},e.prototype.saveTo=function(t,r,n){if(t){r=r||this._trackKeys;for(var i=0;i<r.length;i++){var a=r[i],o=this._tracks[a];if(!(!o||o.isFinished())){var s=o.keyframes,l=s[n?0:s.length-1];l&&(t[a]=Jg(l.rawValue))}}}},e.prototype.__changeFinalValue=function(t,r){r=r||at(t);for(var n=0;n<r.length;n++){var i=r[n],a=this._tracks[i];if(a){var o=a.keyframes;if(o.length>1){var s=o.pop();a.addKeyframe(s.time,t[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},e}();function Zh(){return new Date().getTime()}var Zje=function(e){K(t,e);function t(r){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,r=r||{},n.stage=r.stage||{},n}return t.prototype.addClip=function(r){r.animation&&this.removeClip(r),this._head?(this._tail.next=r,r.prev=this._tail,r.next=null,this._tail=r):this._head=this._tail=r,r.animation=this},t.prototype.addAnimator=function(r){r.animation=this;var n=r.getClip();n&&this.addClip(n)},t.prototype.removeClip=function(r){if(r.animation){var n=r.prev,i=r.next;n?n.next=i:this._head=i,i?i.prev=n:this._tail=n,r.next=r.prev=r.animation=null}},t.prototype.removeAnimator=function(r){var n=r.getClip();n&&this.removeClip(n),r.animation=null},t.prototype.update=function(r){for(var n=Zh()-this._pausedTime,i=n-this._time,a=this._head;a;){var o=a.next,s=a.step(n,i);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=n,r||(this.trigger("frame",i),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var r=this;this._running=!0;function n(){r._running&&(aw(n),!r._paused&&r.update())}aw(n)},t.prototype.start=function(){this._running||(this._time=Zh(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=Zh(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=Zh()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var r=this._head;r;){var n=r.next;r.prev=r.next=r.animation=null,r=n}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(r,n){n=n||{},this.start();var i=new CN(r,n.loop);return this.addAnimator(i),i},t}(_a),Yje=300,i2=it.domSupported,a2=function(){var e=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],r={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=le(e,function(i){var a=i.replace("mouse","pointer");return r.hasOwnProperty(a)?a:i});return{mouse:e,touch:t,pointer:n}}(),$F={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},FF=!1;function cI(e){var t=e.pointerType;return t==="pen"||t==="touch"}function Xje(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function o2(e){e&&(e.zrByTouch=!0)}function qje(e,t){return Yi(e.dom,new Kje(e,t),!0)}function uJ(e,t){for(var r=t,n=!1;r&&r.nodeType!==9&&!(n=r.domBelongToZr||r!==t&&r===e.painterRoot);)r=r.parentNode;return n}var Kje=function(){function e(t,r){this.stopPropagation=sr,this.stopImmediatePropagation=sr,this.preventDefault=sr,this.type=r.type,this.target=this.currentTarget=t.dom,this.pointerType=r.pointerType,this.clientX=r.clientX,this.clientY=r.clientY}return e}(),La={mousedown:function(e){e=Yi(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=Yi(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",e)},mouseup:function(e){e=Yi(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){e=Yi(this.dom,e);var t=e.toElement||e.relatedTarget;uJ(this,t)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){FF=!0,e=Yi(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){FF||(e=Yi(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){e=Yi(this.dom,e),o2(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),La.mousemove.call(this,e),La.mousedown.call(this,e)},touchmove:function(e){e=Yi(this.dom,e),o2(e),this.handler.processGesture(e,"change"),La.mousemove.call(this,e)},touchend:function(e){e=Yi(this.dom,e),o2(e),this.handler.processGesture(e,"end"),La.mouseup.call(this,e),+new Date-+this.__lastTouchMoment<Yje&&La.click.call(this,e)},pointerdown:function(e){La.mousedown.call(this,e)},pointermove:function(e){cI(e)||La.mousemove.call(this,e)},pointerup:function(e){La.mouseup.call(this,e)},pointerout:function(e){cI(e)||La.mouseout.call(this,e)}};R(["click","dblclick","contextmenu"],function(e){La[e]=function(t){t=Yi(this.dom,t),this.trigger(e,t)}});var fI={pointermove:function(e){cI(e)||fI.mousemove.call(this,e)},pointerup:function(e){fI.mouseup.call(this,e)},mousemove:function(e){this.trigger("mousemove",e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",e),t&&(e.zrEventControl="only_globalout",this.trigger("mouseout",e))}};function Jje(e,t){var r=t.domHandlers;it.pointerEventsSupported?R(a2.pointer,function(n){sb(t,n,function(i){r[n].call(e,i)})}):(it.touchEventsSupported&&R(a2.touch,function(n){sb(t,n,function(i){r[n].call(e,i),Xje(t)})}),R(a2.mouse,function(n){sb(t,n,function(i){i=bN(i),t.touching||r[n].call(e,i)})}))}function Qje(e,t){it.pointerEventsSupported?R($F.pointer,r):it.touchEventsSupported||R($F.mouse,r);function r(n){function i(a){a=bN(a),uJ(e,a.target)||(a=qje(e,a),t.domHandlers[n].call(e,a))}sb(t,n,i,{capture:!0})}}function sb(e,t,r,n){e.mounted[t]=r,e.listenerOpts[t]=n,eI(e.domTarget,t,r,n)}function s2(e){var t=e.mounted;for(var r in t)t.hasOwnProperty(r)&&oje(e.domTarget,r,t[r],e.listenerOpts[r]);e.mounted={}}var VF=function(){function e(t,r){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=r}return e}(),eRe=function(e){K(t,e);function t(r,n){var i=e.call(this)||this;return i.__pointerCapturing=!1,i.dom=r,i.painterRoot=n,i._localHandlerScope=new VF(r,La),i2&&(i._globalHandlerScope=new VF(document,fI)),Jje(i,i._localHandlerScope),i}return t.prototype.dispose=function(){s2(this._localHandlerScope),i2&&s2(this._globalHandlerScope)},t.prototype.setCursor=function(r){this.dom.style&&(this.dom.style.cursor=r||"default")},t.prototype.__togglePointerCapture=function(r){if(this.__mayPointerCapture=null,i2&&+this.__pointerCapturing^+r){this.__pointerCapturing=r;var n=this._globalHandlerScope;r?Qje(this,n):s2(n)}},t}(_a),cJ=1;it.hasGlobalWindow&&(cJ=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var fw=cJ,hI=.4,dI="#333",vI="#ccc",tRe="#eee",GF=f0,WF=5e-5;function Vu(e){return e>WF||e<-WF}var Gu=[],th=[],l2=Yr(),u2=Math.abs,Ts=function(){function e(){}return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},e.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},e.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},e.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},e.prototype.needLocalTransform=function(){return Vu(this.rotation)||Vu(this.x)||Vu(this.y)||Vu(this.scaleX-1)||Vu(this.scaleY-1)||Vu(this.skewX)||Vu(this.skewY)},e.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,r=this.needLocalTransform(),n=this.transform;if(!(r||t)){n&&(GF(n),this.invTransform=null);return}n=n||Yr(),r?this.getLocalTransform(n):GF(n),t&&(r?Wa(n,t,n):h0(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)},e.prototype._resolveGlobalScaleRatio=function(t){var r=this.globalScaleRatio;if(r!=null&&r!==1){this.getGlobalScale(Gu);var n=Gu[0]<0?-1:1,i=Gu[1]<0?-1:1,a=((Gu[0]-n)*r+n)/Gu[0]||0,o=((Gu[1]-i)*r+i)/Gu[1]||0;t[0]*=a,t[1]*=a,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||Yr(),pa(this.invTransform,t)},e.prototype.getComputedTransform=function(){for(var t=this,r=[];t;)r.push(t),t=t.parent;for(;t=r.pop();)t.updateTransform();return this.transform},e.prototype.setLocalTransform=function(t){if(t){var r=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=Math.atan2(t[1],t[0]),a=Math.PI/2+i-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(a),r=Math.sqrt(r),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+t[4],this.y=+t[5],this.scaleX=r,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,r=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||Yr(),Wa(th,t.invTransform,r),r=th);var n=this.originX,i=this.originY;(n||i)&&(l2[4]=n,l2[5]=i,Wa(th,r,l2),th[4]-=n,th[5]-=i,r=th),this.setLocalTransform(r)}},e.prototype.getGlobalScale=function(t){var r=this.transform;return t=t||[],r?(t[0]=Math.sqrt(r[0]*r[0]+r[1]*r[1]),t[1]=Math.sqrt(r[2]*r[2]+r[3]*r[3]),r[0]<0&&(t[0]=-t[0]),r[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},e.prototype.transformCoordToLocal=function(t,r){var n=[t,r],i=this.invTransform;return i&&lr(n,n,i),n},e.prototype.transformCoordToGlobal=function(t,r){var n=[t,r],i=this.transform;return i&&lr(n,n,i),n},e.prototype.getLineScale=function(){var t=this.transform;return t&&u2(t[0]-1)>1e-10&&u2(t[3]-1)>1e-10?Math.sqrt(u2(t[0]*t[3]-t[2]*t[1])):1},e.prototype.copyTransform=function(t){hw(this,t)},e.getLocalTransform=function(t,r){r=r||[];var n=t.originX||0,i=t.originY||0,a=t.scaleX,o=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,c=t.x,f=t.y,h=t.skewX?Math.tan(t.skewX):0,d=t.skewY?Math.tan(-t.skewY):0;if(n||i||s||l){var v=n+s,m=i+l;r[4]=-v*a-h*m*o,r[5]=-m*o-d*v*a}else r[4]=r[5]=0;return r[0]=a,r[3]=o,r[1]=d*a,r[2]=h*o,u&&rl(r,r,u),r[4]+=n+c,r[5]+=i+f,r},e.initDefaultProps=function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0}(),e}(),Wo=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function hw(e,t){for(var r=0;r<Wo.length;r++){var n=Wo[r];e[n]=t[n]}}function Bo(e){Rx||(Rx=new qd(100)),e=e||Ws;var t=Rx.get(e);return t||(t={font:e,strWidthCache:new qd(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:fi.measureText("国",e).width,asciiCharWidth:fi.measureText("a",e).width},Rx.put(e,t)),t}var Rx;function rRe(e){if(!(c2>=HF)){e=e||Ws;for(var t=[],r=+new Date,n=0;n<=127;n++)t[n]=fi.measureText(String.fromCharCode(n),e).width;var i=+new Date-r;return i>16?c2=HF:i>2&&c2++,t}}var c2=0,HF=5;function fJ(e,t){return e.asciiWidthMapTried||(e.asciiWidthMap=rRe(e.font),e.asciiWidthMapTried=!0),0<=t&&t<=127?e.asciiWidthMap!=null?e.asciiWidthMap[t]:e.asciiCharWidth:e.stWideCharWidth}function zo(e,t){var r=e.strWidthCache,n=r.get(t);return n==null&&(n=fi.measureText(t,e.font).width,r.put(t,n)),n}function UF(e,t,r,n){var i=zo(Bo(t),e),a=d0(t),o=Kd(0,i,r),s=Hc(0,a,n),l=new je(o,s,i,a);return l}function ET(e,t,r,n){var i=((e||"")+"").split(`
`),a=i.length;if(a===1)return UF(i[0],t,r,n);for(var o=new je(0,0,0,0),s=0;s<i.length;s++){var l=UF(i[s],t,r,n);s===0?o.copy(l):o.union(l)}return o}function Kd(e,t,r,n){return r==="right"?n?e+=t:e-=t:r==="center"&&(n?e+=t/2:e-=t/2),e}function Hc(e,t,r,n){return r==="middle"?n?e+=t/2:e-=t/2:r==="bottom"&&(n?e+=t:e-=t),e}function d0(e){return Bo(e).stWideCharWidth}function Ja(e,t){return typeof e=="string"?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function dw(e,t,r){var n=t.position||"inside",i=t.distance!=null?t.distance:5,a=r.height,o=r.width,s=a/2,l=r.x,u=r.y,c="left",f="top";if(n instanceof Array)l+=Ja(n[0],r.width),u+=Ja(n[1],r.height),c=null,f=null;else switch(n){case"left":l-=i,u+=s,c="right",f="middle";break;case"right":l+=i+o,u+=s,f="middle";break;case"top":l+=o/2,u-=i,c="center",f="bottom";break;case"bottom":l+=o/2,u+=a+i,c="center";break;case"inside":l+=o/2,u+=s,c="center",f="middle";break;case"insideLeft":l+=i,u+=s,f="middle";break;case"insideRight":l+=o-i,u+=s,c="right",f="middle";break;case"insideTop":l+=o/2,u+=i,c="center";break;case"insideBottom":l+=o/2,u+=a-i,c="center",f="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,c="right";break;case"insideBottomLeft":l+=i,u+=a-i,f="bottom";break;case"insideBottomRight":l+=o-i,u+=a-i,c="right",f="bottom";break}return e=e||{},e.x=l,e.y=u,e.align=c,e.verticalAlign=f,e}var f2="__zr_normal__",h2=Wo.concat(["ignore"]),nRe=va(Wo,function(e,t){return e[t]=!0,e},{ignore:!1}),rh={},iRe=new je(0,0,0,0),Bx=[],DT=function(){function e(t){this.id=mN(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return e.prototype._init=function(t){this.attr(t)},e.prototype.drift=function(t,r,n){switch(this.draggable){case"horizontal":r=0;break;case"vertical":t=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=r,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(t){var r=this._textContent;if(r&&(!r.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,a=r.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=i?this:null;var u=!1;a.copyTransform(r);var c=n.position!=null,f=n.autoOverflowArea,h=void 0;if((f||c)&&(h=iRe,n.layoutRect?h.copy(n.layoutRect):h.copy(this.getBoundingRect()),i||h.applyTransform(this.transform)),c){this.calculateTextPosition?this.calculateTextPosition(rh,n,h):dw(rh,n,h),a.x=rh.x,a.y=rh.y,o=rh.align,s=rh.verticalAlign;var d=n.origin;if(d&&n.rotation!=null){var v=void 0,m=void 0;d==="center"?(v=h.width*.5,m=h.height*.5):(v=Ja(d[0],h.width),m=Ja(d[1],h.height)),u=!0,a.originX=-a.x+v+(i?0:h.x),a.originY=-a.y+m+(i?0:h.y)}}n.rotation!=null&&(a.rotation=n.rotation);var y=n.offset;y&&(a.x+=y[0],a.y+=y[1],u||(a.originX=-y[0],a.originY=-y[1]));var x=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(f){var _=x.overflowRect=x.overflowRect||new je(0,0,0,0);a.getLocalTransform(Bx),pa(Bx,Bx),je.copy(_,h),_.applyTransform(Bx)}else x.overflowRect=null;var b=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,S=void 0,T=void 0,C=void 0;b&&this.canBeInsideText()?(S=n.insideFill,T=n.insideStroke,(S==null||S==="auto")&&(S=this.getInsideTextFill()),(T==null||T==="auto")&&(T=this.getInsideTextStroke(S),C=!0)):(S=n.outsideFill,T=n.outsideStroke,(S==null||S==="auto")&&(S=this.getOutsideFill()),(T==null||T==="auto")&&(T=this.getOutsideStroke(S),C=!0)),S=S||"#000",(S!==x.fill||T!==x.stroke||C!==x.autoStroke||o!==x.align||s!==x.verticalAlign)&&(l=!0,x.fill=S,x.stroke=T,x.autoStroke=C,x.align=o,x.verticalAlign=s,r.setDefaultTextStyle(x)),r.__dirty|=Si,l&&r.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(t){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?vI:dI},e.prototype.getOutsideStroke=function(t){var r=this.__zr&&this.__zr.getBackgroundColor(),n=typeof r=="string"&&jn(r);n||(n=[255,255,255,1]);for(var i=n[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(a?0:255)*(1-i);return n[3]=1,ua(n,"rgba")},e.prototype.traverse=function(t,r){},e.prototype.attrKV=function(t,r){t==="textConfig"?this.setTextConfig(r):t==="textContent"?this.setTextContent(r):t==="clipPath"?this.setClipPath(r):t==="extra"?(this.extra=this.extra||{},ae(this.extra,r)):this[t]=r},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(t,r){if(typeof t=="string")this.attrKV(t,r);else if(Ee(t))for(var n=t,i=at(n),a=0;a<i.length;a++){var o=i[a];this.attrKV(o,t[o])}return this.markRedraw(),this},e.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var r=this._normalState,n=0;n<this.animators.length;n++){var i=this.animators[n],a=i.__fromStateTransition;if(!(i.getLoop()||a&&a!==f2)){var o=i.targetName,s=o?r[o]:r;i.saveTo(s)}}},e.prototype._innerSaveToNormal=function(t){var r=this._normalState;r||(r=this._normalState={}),t.textConfig&&!r.textConfig&&(r.textConfig=this.textConfig),this._savePrimaryToNormal(t,r,h2)},e.prototype._savePrimaryToNormal=function(t,r,n){for(var i=0;i<n.length;i++){var a=n[i];t[a]!=null&&!(a in r)&&(r[a]=this[a])}},e.prototype.hasState=function(){return this.currentStates.length>0},e.prototype.getState=function(t){return this.states[t]},e.prototype.ensureState=function(t){var r=this.states;return r[t]||(r[t]={}),r[t]},e.prototype.clearStates=function(t){this.useState(f2,!1,t)},e.prototype.useState=function(t,r,n,i){var a=t===f2,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(He(s,t)>=0&&(r||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(t)),u||(u=this.states&&this.states[t]),!u&&!a){MT("State "+t+" not exists.");return}a||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||i);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,u,this._normalState,r,!n&&!this.__inHover&&l&&l.duration>0,l);var f=this._textContent,h=this._textGuide;return f&&f.useState(t,r,n,c),h&&h.useState(t,r,n,c),a?(this.currentStates=[],this._normalState={}):r?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Si),u}}},e.prototype.useStates=function(t,r,n){if(!t.length)this.clearStates();else{var i=[],a=this.currentStates,o=t.length,s=o===a.length;if(s){for(var l=0;l<o;l++)if(t[l]!==a[l]){s=!1;break}}if(s)return;for(var l=0;l<o;l++){var u=t[l],c=void 0;this.stateProxy&&(c=this.stateProxy(u,t)),c||(c=this.states[u]),c&&i.push(c)}var f=i[o-1],h=!!(f&&f.hoverLayer||n);h&&this._toggleHoverLayerFlag(!0);var d=this._mergeStates(i),v=this.stateTransition;this.saveCurrentToNormalState(d),this._applyStateObj(t.join(","),d,this._normalState,!1,!r&&!this.__inHover&&v&&v.duration>0,v);var m=this._textContent,y=this._textGuide;m&&m.useStates(t,r,h),y&&y.useStates(t,r,h),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Si)}},e.prototype.isSilent=function(){for(var t=this;t;){if(t.silent)return!0;var r=t.__hostTarget;t=r?t.ignoreHostSilent?null:r:t.parent}return!1},e.prototype._updateAnimationTargets=function(){for(var t=0;t<this.animators.length;t++){var r=this.animators[t];r.targetName&&r.changeTarget(this[r.targetName])}},e.prototype.removeState=function(t){var r=He(this.currentStates,t);if(r>=0){var n=this.currentStates.slice();n.splice(r,1),this.useStates(n)}},e.prototype.replaceState=function(t,r,n){var i=this.currentStates.slice(),a=He(i,t),o=He(i,r)>=0;a>=0?o?i.splice(a,1):i[a]=r:n&&!o&&i.push(r),this.useStates(i)},e.prototype.toggleState=function(t,r){r?this.useState(t,!0):this.removeState(t)},e.prototype._mergeStates=function(t){for(var r={},n,i=0;i<t.length;i++){var a=t[i];ae(r,a),a.textConfig&&(n=n||{},ae(n,a.textConfig))}return n&&(r.textConfig=n),r},e.prototype._applyStateObj=function(t,r,n,i,a,o){var s=!(r&&i);r&&r.textConfig?(this.textConfig=ae({},i?this.textConfig:n.textConfig),ae(this.textConfig,r.textConfig)):s&&n.textConfig&&(this.textConfig=n.textConfig);for(var l={},u=!1,c=0;c<h2.length;c++){var f=h2[c],h=a&&nRe[f];r&&r[f]!=null?h?(u=!0,l[f]=r[f]):this[f]=r[f]:s&&n[f]!=null&&(h?(u=!0,l[f]=n[f]):this[f]=n[f])}if(!a)for(var c=0;c<this.animators.length;c++){var d=this.animators[c],v=d.targetName;d.getLoop()||d.__changeFinalValue(v?(r||n)[v]:r||n)}u&&this._transitionState(t,l,o)},e.prototype._attachComponent=function(t){if(!(t.__zr&&!t.__hostTarget)&&t!==this){var r=this.__zr;r&&t.addSelfToZr(r),t.__zr=r,t.__hostTarget=this}},e.prototype._detachComponent=function(t){t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__hostTarget=null},e.prototype.getClipPath=function(){return this._clipPath},e.prototype.setClipPath=function(t){this._clipPath&&this._clipPath!==t&&this.removeClipPath(),this._attachComponent(t),this._clipPath=t,this.markRedraw()},e.prototype.removeClipPath=function(){var t=this._clipPath;t&&(this._detachComponent(t),this._clipPath=null,this.markRedraw())},e.prototype.getTextContent=function(){return this._textContent},e.prototype.setTextContent=function(t){var r=this._textContent;r!==t&&(r&&r!==t&&this.removeTextContent(),t.innerTransformable=new Ts,this._attachComponent(t),this._textContent=t,this.markRedraw())},e.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),ae(this.textConfig,t),this.markRedraw()},e.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},e.prototype.removeTextContent=function(){var t=this._textContent;t&&(t.innerTransformable=null,this._detachComponent(t),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},e.prototype.getTextGuideLine=function(){return this._textGuide},e.prototype.setTextGuideLine=function(t){this._textGuide&&this._textGuide!==t&&this.removeTextGuideLine(),this._attachComponent(t),this._textGuide=t,this.markRedraw()},e.prototype.removeTextGuideLine=function(){var t=this._textGuide;t&&(this._detachComponent(t),this._textGuide=null,this.markRedraw())},e.prototype.markRedraw=function(){this.__dirty|=Si;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype._toggleHoverLayerFlag=function(t){this.__inHover=t;var r=this._textContent,n=this._textGuide;r&&(r.__inHover=t),n&&(n.__inHover=t)},e.prototype.addSelfToZr=function(t){if(this.__zr!==t){this.__zr=t;var r=this.animators;if(r)for(var n=0;n<r.length;n++)t.animation.addAnimator(r[n]);this._clipPath&&this._clipPath.addSelfToZr(t),this._textContent&&this._textContent.addSelfToZr(t),this._textGuide&&this._textGuide.addSelfToZr(t)}},e.prototype.removeSelfFromZr=function(t){if(this.__zr){this.__zr=null;var r=this.animators;if(r)for(var n=0;n<r.length;n++)t.animation.removeAnimator(r[n]);this._clipPath&&this._clipPath.removeSelfFromZr(t),this._textContent&&this._textContent.removeSelfFromZr(t),this._textGuide&&this._textGuide.removeSelfFromZr(t)}},e.prototype.animate=function(t,r,n){var i=t?this[t]:this,a=new CN(i,r,n);return t&&(a.targetName=t),this.addAnimator(a,t),a},e.prototype.addAnimator=function(t,r){var n=this.__zr,i=this;t.during(function(){i.updateDuringAnimation(r)}).done(function(){var a=i.animators,o=He(a,t);o>=0&&a.splice(o,1)}),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(t){this.markRedraw()},e.prototype.stopAnimation=function(t,r){for(var n=this.animators,i=n.length,a=[],o=0;o<i;o++){var s=n[o];!t||t===s.scope?s.stop(r):a.push(s)}return this.animators=a,this},e.prototype.animateTo=function(t,r,n){d2(this,t,r,n)},e.prototype.animateFrom=function(t,r,n){d2(this,t,r,n,!0)},e.prototype._transitionState=function(t,r,n,i){for(var a=d2(this,r,n,i),o=0;o<a.length;o++)a[o].__fromStateTransition=t},e.prototype.getBoundingRect=function(){return null},e.prototype.getPaintRect=function(){return null},e.initDefaultProps=function(){var t=e.prototype;t.type="element",t.name="",t.ignore=t.silent=t.ignoreHostSilent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=t.__inHover=!1,t.__dirty=Si;function r(n,i,a,o){Object.defineProperty(t,n,{get:function(){if(!this[i]){var l=this[i]=[];s(this,l)}return this[i]},set:function(l){this[a]=l[0],this[o]=l[1],this[i]=l,s(this,l)}});function s(l,u){Object.defineProperty(u,0,{get:function(){return l[a]},set:function(c){l[a]=c}}),Object.defineProperty(u,1,{get:function(){return l[o]},set:function(c){l[o]=c}})}}Object.defineProperty&&(r("position","_legacyPos","x","y"),r("scale","_legacyScale","scaleX","scaleY"),r("origin","_legacyOrigin","originX","originY"))}(),e}();cr(DT,_a);cr(DT,Ts);function d2(e,t,r,n,i){r=r||{};var a=[];hJ(e,"",e,t,r,n,a,i);var o=a.length,s=!1,l=r.done,u=r.aborted,c=function(){s=!0,o--,o<=0&&(s?l&&l():u&&u())},f=function(){o--,o<=0&&(s?l&&l():u&&u())};o||l&&l(),a.length>0&&r.during&&a[0].during(function(v,m){r.during(m)});for(var h=0;h<a.length;h++){var d=a[h];c&&d.done(c),f&&d.aborted(f),r.force&&d.duration(r.duration),d.start(r.easing)}return a}function v2(e,t,r){for(var n=0;n<r;n++)e[n]=t[n]}function aRe(e){return bn(e[0])}function oRe(e,t,r){if(bn(t[r]))if(bn(e[r])||(e[r]=[]),Xn(t[r])){var n=t[r].length;e[r].length!==n&&(e[r]=new t[r].constructor(n),v2(e[r],t[r],n))}else{var i=t[r],a=e[r],o=i.length;if(aRe(i))for(var s=i[0].length,l=0;l<o;l++)a[l]?v2(a[l],i[l],s):a[l]=Array.prototype.slice.call(i[l]);else v2(a,i,o);a.length=i.length}else e[r]=t[r]}function sRe(e,t){return e===t||bn(e)&&bn(t)&&lRe(e,t)}function lRe(e,t){var r=e.length;if(r!==t.length)return!1;for(var n=0;n<r;n++)if(e[n]!==t[n])return!1;return!0}function hJ(e,t,r,n,i,a,o,s){for(var l=at(n),u=i.duration,c=i.delay,f=i.additive,h=i.setToFinal,d=!Ee(a),v=e.animators,m=[],y=0;y<l.length;y++){var x=l[y],_=n[x];if(_!=null&&r[x]!=null&&(d||a[x]))if(Ee(_)&&!bn(_)&&!l0(_)){if(t){s||(r[x]=_,e.updateDuringAnimation(t));continue}hJ(e,x,r[x],_,i,a&&a[x],o,s)}else m.push(x);else s||(r[x]=_,e.updateDuringAnimation(t),m.push(x))}var b=m.length;if(!f&&b)for(var S=0;S<v.length;S++){var T=v[S];if(T.targetName===t){var C=T.stopTracks(m);if(C){var A=He(v,T);v.splice(A,1)}}}if(i.force||(m=dt(m,function(E){return!sRe(n[E],r[E])}),b=m.length),b>0||i.force&&!o.length){var P=void 0,I=void 0,k=void 0;if(s){I={},h&&(P={});for(var S=0;S<b;S++){var x=m[S];I[x]=r[x],h?P[x]=n[x]:r[x]=n[x]}}else if(h){k={};for(var S=0;S<b;S++){var x=m[S];k[x]=Jg(r[x]),oRe(r,n,x)}}var T=new CN(r,!1,!1,f?dt(v,function(D){return D.targetName===t}):null);T.targetName=t,i.scope&&(T.scope=i.scope),h&&P&&T.whenWithKeys(0,P,m),k&&T.whenWithKeys(0,k,m),T.whenWithKeys(u??500,s?I:n,m).delay(c||0),e.addAnimator(T,t),o.push(T)}}var Ie=function(e){K(t,e);function t(r){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(r),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(r){return this._children[r]},t.prototype.childOfName=function(r){for(var n=this._children,i=0;i<n.length;i++)if(n[i].name===r)return n[i]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(r){return r&&r!==this&&r.parent!==this&&(this._children.push(r),this._doAdd(r)),this},t.prototype.addBefore=function(r,n){if(r&&r!==this&&r.parent!==this&&n&&n.parent===this){var i=this._children,a=i.indexOf(n);a>=0&&(i.splice(a,0,r),this._doAdd(r))}return this},t.prototype.replace=function(r,n){var i=He(this._children,r);return i>=0&&this.replaceAt(n,i),this},t.prototype.replaceAt=function(r,n){var i=this._children,a=i[n];if(r&&r!==this&&r.parent!==this&&r!==a){i[n]=r,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(r)}return this},t.prototype._doAdd=function(r){r.parent&&r.parent.remove(r),r.parent=this;var n=this.__zr;n&&n!==r.__zr&&r.addSelfToZr(n),n&&n.refresh()},t.prototype.remove=function(r){var n=this.__zr,i=this._children,a=He(i,r);return a<0?this:(i.splice(a,1),r.parent=null,n&&r.removeSelfFromZr(n),n&&n.refresh(),this)},t.prototype.removeAll=function(){for(var r=this._children,n=this.__zr,i=0;i<r.length;i++){var a=r[i];n&&a.removeSelfFromZr(n),a.parent=null}return r.length=0,this},t.prototype.eachChild=function(r,n){for(var i=this._children,a=0;a<i.length;a++){var o=i[a];r.call(n,o,a)}return this},t.prototype.traverse=function(r,n){for(var i=0;i<this._children.length;i++){var a=this._children[i],o=r.call(n,a);a.isGroup&&!o&&a.traverse(r,n)}return this},t.prototype.addSelfToZr=function(r){e.prototype.addSelfToZr.call(this,r);for(var n=0;n<this._children.length;n++){var i=this._children[n];i.addSelfToZr(r)}},t.prototype.removeSelfFromZr=function(r){e.prototype.removeSelfFromZr.call(this,r);for(var n=0;n<this._children.length;n++){var i=this._children[n];i.removeSelfFromZr(r)}},t.prototype.getBoundingRect=function(r){for(var n=new je(0,0,0,0),i=r||this._children,a=[],o=null,s=0;s<i.length;s++){var l=i[s];if(!(l.ignore||l.invisible)){var u=l.getBoundingRect(),c=l.getLocalTransform(a);c?(je.applyTransform(n,u,c),o=o||n.clone(),o.union(n)):(o=o||u.clone(),o.union(u))}}return o||n},t}(DT);Ie.prototype.type="group";/*!
* ZRender, a high performance 2d drawing library.
*
* Copyright (c) 2013, Baidu Inc.
* All rights reserved.
*
* LICENSE
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
*/var lb={},Dc={};function uRe(e){delete Dc[e]}function cRe(e){if(!e)return!1;if(typeof e=="string")return yy(e,1)<hI;if(e.colorStops){for(var t=e.colorStops,r=0,n=t.length,i=0;i<n;i++)r+=yy(t[i].color,1);return r/=n,r<hI}return!1}var fRe=function(){function e(t,r,n){var i=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=r,this.id=t;var a=new bje,o=n.renderer||"canvas";lb[o]||(o=at(lb)[0]),n.useDirtyRect=n.useDirtyRect==null?!1:n.useDirtyRect;var s=new lb[o](r,a,n,t),l=n.ssr||s.ssrOnly;this.storage=a,this.painter=s;var u=!it.node&&!it.worker&&!l?new eRe(s.getViewportRoot(),s.root):null,c=n.useCoarsePointer,f=c==null||c==="auto"?it.touchEventsSupported:!!c,h=44,d;f&&(d=Ae(n.pointerSize,h)),this.handler=new HK(a,s,u,s.root,d),this.animation=new Zje({stage:{update:l?null:function(){return i._flush(!0)}}}),l||this.animation.start()}return e.prototype.add=function(t){this._disposed||!t||(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},e.prototype.remove=function(t){this._disposed||!t||(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(t,r){this._disposed||(this.painter.configLayer&&this.painter.configLayer(t,r),this.refresh())},e.prototype.setBackgroundColor=function(t){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=cRe(t))},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(t){this._darkMode=t},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(t){this._disposed||(t||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!1)},e.prototype._flush=function(t){var r,n=Zh();this._needsRefresh&&(r=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(r=!0,this.refreshHoverImmediately());var i=Zh();r?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:i-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},e.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},e.prototype.findHover=function(t,r){if(!this._disposed)return this.handler.findHover(t,r)},e.prototype.on=function(t,r,n){return this._disposed||this.handler.on(t,r,n),this},e.prototype.off=function(t,r){this._disposed||this.handler.off(t,r)},e.prototype.trigger=function(t,r){this._disposed||this.handler.trigger(t,r)},e.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),r=0;r<t.length;r++)t[r]instanceof Ie&&t[r].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},e.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,uRe(this.id))},e}();function pI(e,t){var r=new fRe(mN(),e,t);return Dc[r.id]=r,r}function hRe(e){e.dispose()}function dRe(){for(var e in Dc)Dc.hasOwnProperty(e)&&Dc[e].dispose();Dc={}}function vRe(e){return Dc[e]}function dJ(e,t){lb[e]=t}var gI;function vJ(e){if(typeof gI=="function")return gI(e)}function pJ(e){gI=e}var pRe="6.0.0";const gRe=Object.freeze(Object.defineProperty({__proto__:null,dispose:hRe,disposeAll:dRe,getElementSSRData:vJ,getInstance:vRe,init:pI,registerPainter:dJ,registerSSRDataGetter:pJ,version:pRe},Symbol.toStringTag,{value:"Module"}));var ZF=1e-4,gJ=20;function mRe(e){return e.replace(/^\s+|\s+$/g,"")}var Ii=Math.min,pr=Math.max,Mo=Math.abs;function gt(e,t,r,n){var i=t[0],a=t[1],o=r[0],s=r[1],l=a-i,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(n)if(l>0){if(e<=i)return o;if(e>=a)return s}else{if(e>=i)return o;if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/l*u+o}var me=yRe;function yRe(e,t,r){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%";break}return vw(e,t,r)}function vw(e,t,r){return ye(e)?mRe(e).match(/%$/)?parseFloat(e)/100*t+(r||0):parseFloat(e):e==null?NaN:+e}function gr(e,t,r){return t==null&&(t=10),t=Math.min(Math.max(0,t),gJ),e=(+e).toFixed(t),r?e:+e}function Mi(e){return e.sort(function(t,r){return t-r}),e}function $a(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,r=0;r<15;r++,t*=10)if(Math.round(e*t)/t===e)return r}return mJ(e)}function mJ(e){var t=e.toString().toLowerCase(),r=t.indexOf("e"),n=r>0?+t.slice(r+1):0,i=r>0?r:t.length,a=t.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-n)}function AN(e,t){var r=Math.log,n=Math.LN10,i=Math.floor(r(e[1]-e[0])/n),a=Math.round(r(Mo(t[1]-t[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function xRe(e,t,r){if(!e[t])return 0;var n=yJ(e,r);return n[t]||0}function yJ(e,t){var r=va(e,function(d,v){return d+(isNaN(v)?0:v)},0);if(r===0)return[];for(var n=Math.pow(10,t),i=le(e,function(d){return(isNaN(d)?0:d)/r*n*100}),a=n*100,o=le(i,function(d){return Math.floor(d)}),s=va(o,function(d,v){return d+v},0),l=le(i,function(d,v){return d-o[v]});s<a;){for(var u=Number.NEGATIVE_INFINITY,c=null,f=0,h=l.length;f<h;++f)l[f]>u&&(u=l[f],c=f);++o[c],l[c]=0,++s}return le(o,function(d){return d/n})}function _Re(e,t){var r=Math.max($a(e),$a(t)),n=e+t;return r>gJ?n:gr(n,r)}var mI=9007199254740991;function MN(e){var t=Math.PI*2;return(e%t+t)%t}function Jd(e){return e>-ZF&&e<ZF}var bRe=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Jo(e){if(e instanceof Date)return e;if(ye(e)){var t=bRe.exec(e);if(!t)return new Date(NaN);if(t[8]){var r=+t[4]||0;return t[8].toUpperCase()!=="Z"&&(r-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,r,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}else return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}else if(e==null)return new Date(NaN);return new Date(Math.round(e))}function xJ(e){return Math.pow(10,NT(e))}function NT(e){if(e===0)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/Math.pow(10,t)>=10&&t++,t}function PN(e,t){var r=NT(e),n=Math.pow(10,r),i=e/n,a;return t?i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10:i<1?a=1:i<2?a=2:i<3?a=3:i<5?a=5:a=10,e=a*n,r>=-20?+e.toFixed(r<0?-r:0):e}function ub(e,t){var r=(e.length-1)*t+1,n=Math.floor(r),i=+e[n-1],a=r-n;return a?i+a*(e[n]-i):i}function yI(e){e.sort(function(l,u){return s(l,u,0)?-1:1});for(var t=-1/0,r=1,n=0;n<e.length;){for(var i=e[n].interval,a=e[n].close,o=0;o<2;o++)i[o]<=t&&(i[o]=t,a[o]=o?1:1-r),t=i[o],r=a[o];i[0]===i[1]&&a[0]*a[1]!==1?e.splice(n,1):n++}return e;function s(l,u,c){return l.interval[c]<u.interval[c]||l.interval[c]===u.interval[c]&&(l.close[c]-u.close[c]===(c?-1:1)||!c&&s(l,u,1))}}function Ho(e){var t=parseFloat(e);return t==e&&(t!==0||!ye(e)||e.indexOf("x")<=0)?t:NaN}function kN(e){return!isNaN(Ho(e))}function _J(){return Math.round(Math.random()*9)}function bJ(e,t){return t===0?e:bJ(t,e%t)}function YF(e,t){return e==null?t:t==null?e:e*t/bJ(e,t)}var wRe="[ECharts] ",SRe=typeof console<"u"&&console.warn&&console.log;function TRe(e,t,r){SRe&&console[e](wRe+t)}function wJ(e,t){TRe("error",e)}function mt(e){throw new Error(e)}function XF(e,t,r){return(t-e)*r+e}var SJ="series\0",TJ="\0_ec_\0";function Lt(e){return e instanceof Array?e:e==null?[]:[e]}function ff(e,t,r){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var n=0,i=r.length;n<i;n++){var a=r[n];!e.emphasis[t].hasOwnProperty(a)&&e[t].hasOwnProperty(a)&&(e.emphasis[t][a]=e[t][a])}}}var qF=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function Rv(e){return Ee(e)&&!oe(e)&&!(e instanceof Date)?e.value:e}function CRe(e){return Ee(e)&&!(e instanceof Array)}function CJ(e,t,r){var n=r==="normalMerge",i=r==="replaceMerge",a=r==="replaceAll";e=e||[],t=(t||[]).slice();var o=Ce();R(t,function(l,u){if(!Ee(l)){t[u]=null;return}});var s=ARe(e,o,r);return(n||i)&&MRe(s,e,o,t),n&&PRe(s,t),n||i?kRe(s,t,i):a&&LRe(s,t),IRe(s),s}function ARe(e,t,r){var n=[];if(r==="replaceAll")return n;for(var i=0;i<e.length;i++){var a=e[i];a&&a.id!=null&&t.set(a.id,i),n.push({existing:r==="replaceMerge"||_y(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return n}function MRe(e,t,r,n){R(n,function(i,a){if(!(!i||i.id==null)){var o=Qg(i.id),s=r.get(o);if(s!=null){var l=e[s];wn(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=i,l.existing=t[s],n[a]=null}}})}function PRe(e,t){R(t,function(r,n){if(!(!r||r.name==null))for(var i=0;i<e.length;i++){var a=e[i].existing;if(!e[i].newOption&&a&&(a.id==null||r.id==null)&&!_y(r)&&!_y(a)&&AJ("name",a,r)){e[i].newOption=r,t[n]=null;return}}})}function kRe(e,t,r){R(t,function(n){if(n){for(var i,a=0;(i=e[a])&&(i.newOption||_y(i.existing)||i.existing&&n.id!=null&&!AJ("id",n,i.existing));)a++;i?(i.newOption=n,i.brandNew=r):e.push({newOption:n,brandNew:r,existing:null,keyInfo:null}),a++}})}function LRe(e,t){R(t,function(r){e.push({newOption:r,brandNew:!0,existing:null,keyInfo:null})})}function IRe(e){var t=Ce();R(e,function(r){var n=r.existing;n&&t.set(n.id,r)}),R(e,function(r){var n=r.newOption;wn(!n||n.id==null||!t.get(n.id)||t.get(n.id)===r,"id duplicates: "+(n&&n.id)),n&&n.id!=null&&t.set(n.id,r),!r.keyInfo&&(r.keyInfo={})}),R(e,function(r,n){var i=r.existing,a=r.newOption,o=r.keyInfo;if(Ee(a)){if(o.name=a.name!=null?Qg(a.name):i?i.name:SJ+n,i)o.id=Qg(i.id);else if(a.id!=null)o.id=Qg(a.id);else{var s=0;do o.id="\0"+o.name+"\0"+s++;while(t.get(o.id))}t.set(o.id,r)}})}function AJ(e,t,r){var n=Dr(t[e],null),i=Dr(r[e],null);return n!=null&&i!=null&&n===i}function Qg(e){return Dr(e,"")}function Dr(e,t){return e==null?t:ye(e)?e:st(e)||tw(e)?e+"":t}function LN(e){var t=e.name;return!!(t&&t.indexOf(SJ))}function _y(e){return e&&e.id!=null&&Qg(e.id).indexOf(TJ)===0}function ORe(e){return TJ+e}function ERe(e,t,r){R(e,function(n){var i=n.newOption;Ee(i)&&(n.keyInfo.mainType=t,n.keyInfo.subType=DRe(t,i,n.existing,r))})}function DRe(e,t,r,n){var i=t.type?t.type:r?r.subType:n.determineSubType(e,t);return i}function NRe(e,t){var r={},n={};return i(e||[],r),i(t||[],n,r),[a(r),a(n)];function i(o,s,l){for(var u=0,c=o.length;u<c;u++){var f=Dr(o[u].seriesId,null);if(f==null)return;for(var h=Lt(o[u].dataIndex),d=l&&l[f],v=0,m=h.length;v<m;v++){var y=h[v];d&&d[y]?d[y]=null:(s[f]||(s[f]={}))[y]=1}}}function a(o,s){var l=[];for(var u in o)if(o.hasOwnProperty(u)&&o[u]!=null)if(s)l.push(+u);else{var c=a(o[u],!0);c.length&&l.push({seriesId:u,dataIndex:c})}return l}}function hf(e,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return oe(t.dataIndex)?le(t.dataIndex,function(r){return e.indexOfRawIndex(r)}):e.indexOfRawIndex(t.dataIndex);if(t.name!=null)return oe(t.name)?le(t.name,function(r){return e.indexOfName(r)}):e.indexOfName(t.name)}function et(){var e="__ec_inner_"+jRe++;return function(t){return t[e]||(t[e]={})}}var jRe=_J();function dd(e,t,r){var n=IN(t,r),i=n.mainTypeSpecified,a=n.queryOptionMap,o=n.others,s=o,l=r?r.defaultMainType:null;return!i&&l&&a.set(l,{}),a.each(function(u,c){var f=Bv(e,c,u,{useDefault:l===c,enableAll:r&&r.enableAll!=null?r.enableAll:!0,enableNone:r&&r.enableNone!=null?r.enableNone:!0});s[c+"Models"]=f.models,s[c+"Model"]=f.models[0]}),s}function IN(e,t){var r;if(ye(e)){var n={};n[e+"Index"]=0,r=n}else r=e;var i=Ce(),a={},o=!1;return R(r,function(s,l){if(l==="dataIndex"||l==="dataIndexInside"){a[l]=s;return}var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],c=u[1],f=(u[2]||"").toLowerCase();if(!(!c||!f||t&&t.includeMainTypes&&He(t.includeMainTypes,c)<0)){o=o||!!c;var h=i.get(c)||i.set(c,{});h[f]=s}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var tr={useDefault:!0,enableAll:!1,enableNone:!1},RRe={useDefault:!1,enableAll:!0,enableNone:!0};function Bv(e,t,r,n){n=n||tr;var i=r.index,a=r.id,o=r.name,s={models:null,specified:i!=null||a!=null||o!=null};if(!s.specified){var l=void 0;return s.models=n.useDefault&&(l=e.getComponent(t))?[l]:[],s}if(i==="none"||i===!1){if(n.enableNone)return s.models=[],s;i=-1}return i==="all"&&(n.enableAll?i=a=o=null:i=-1),s.models=e.queryComponents({mainType:t,index:i,id:a,name:o}),s}function MJ(e,t,r){e.setAttribute?e.setAttribute(t,r):e[t]=r}function BRe(e,t){return e.getAttribute?e.getAttribute(t):e[t]}function zRe(e){return e==="auto"?it.domSupported?"html":"richText":e||"html"}function xI(e,t){var r=Ce(),n=[];return R(e,function(i){var a=t(i);(r.get(a)||(n.push(a),r.set(a,[]))).push(i)}),{keys:n,buckets:r}}function PJ(e,t,r,n,i){var a=t==null||t==="auto";if(n==null)return n;if(st(n)){var o=XF(r||0,n,i);return gr(o,a?Math.max($a(r||0),$a(n)):t)}else{if(ye(n))return i<1?r:n;for(var s=[],l=r,u=n,c=Math.max(l?l.length:0,u.length),f=0;f<c;++f){var h=e.getDimensionInfo(f);if(h&&h.type==="ordinal")s[f]=(i<1&&l?l:u)[f];else{var d=l&&l[f]?l[f]:0,v=u[f],o=XF(d,v,i);s[f]=gr(o,a?Math.max($a(d),$a(v)):t)}}return s}}var Ql=function(){function e(){}return e.prototype.reset=function(t,r,n,i){return this._list=t,this._step=i=i||1,this._idx=r,this._end=n??(i>0?t.length:0),this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx<this._end:this._idx>=this._end)?(this.item=this._list[this._idx],this.key=this._idx=this._idx+this._step,!0):!1},e}();function p2(e){e.option=e.parentModel=e.ecModel=null}var $Re=".",Wu="___EC__COMPONENT__CONTAINER___",kJ="___EC__EXTENDED_CLASS___";function Po(e){var t={main:"",sub:""};if(e){var r=e.split($Re);t.main=r[0]||"",t.sub=r[1]||""}return t}function FRe(e){wn(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),'componentType "'+e+'" illegal')}function VRe(e){return!!(e&&e[kJ])}function ON(e,t){e.$constructor=e,e.extend=function(r){var n=this,i;return GRe(n)?i=function(a){K(o,a);function o(){return a.apply(this,arguments)||this}return o}(n):(i=function(){(r.$constructor||n).apply(this,arguments)},yN(i,this)),ae(i.prototype,r),i[kJ]=!0,i.extend=this.extend,i.superCall=URe,i.superApply=ZRe,i.superClass=n,i}}function GRe(e){return ke(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function LJ(e,t){e.extend=t.extend}var WRe=Math.round(Math.random()*10);function HRe(e){var t=["__\0is_clz",WRe++].join("_");e.prototype[t]=!0,e.isInstance=function(r){return!!(r&&r[t])}}function URe(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return this.superClass.prototype[t].apply(e,r)}function ZRe(e,t,r){return this.superClass.prototype[t].apply(e,r)}function jT(e){var t={};e.registerClass=function(n){var i=n.type||n.prototype.type;if(i){FRe(i),n.prototype.type=i;var a=Po(i);if(!a.sub)t[a.main]=n;else if(a.sub!==Wu){var o=r(a);o[a.sub]=n}}return n},e.getClass=function(n,i,a){var o=t[n];if(o&&o[Wu]&&(o=i?o[i]:null),a&&!o)throw new Error(i?"Component "+n+"."+(i||"")+" is used but not imported.":n+".type should be specified.");return o},e.getClassesByMainType=function(n){var i=Po(n),a=[],o=t[i.main];return o&&o[Wu]?R(o,function(s,l){l!==Wu&&a.push(s)}):a.push(o),a},e.hasClass=function(n){var i=Po(n);return!!t[i.main]},e.getAllClassMainTypes=function(){var n=[];return R(t,function(i,a){n.push(a)}),n},e.hasSubTypes=function(n){var i=Po(n),a=t[i.main];return a&&a[Wu]};function r(n){var i=t[n.main];return(!i||!i[Wu])&&(i=t[n.main]={},i[Wu]=!0),i}}function df(e,t){for(var r=0;r<e.length;r++)e[r][1]||(e[r][1]=e[r][0]);return t=t||!1,function(n,i,a){for(var o={},s=0;s<e.length;s++){var l=e[s][1];if(!(i&&He(i,l)>=0||a&&He(a,l)<0)){var u=n.getShallow(l,t);u!=null&&(o[e[s][0]]=u)}}return o}}var YRe=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],XRe=df(YRe),qRe=function(){function e(){}return e.prototype.getAreaStyle=function(t,r){return XRe(this,t,r)},e}(),_I=new qd(50);function KRe(e){if(typeof e=="string"){var t=_I.get(e);return t&&t.image}else return e}function EN(e,t,r,n,i){if(e)if(typeof e=="string"){if(t&&t.__zrImageSrc===e||!r)return t;var a=_I.get(e),o={hostEl:r,cb:n,cbPayload:i};return a?(t=a.image,!RT(t)&&a.pending.push(o)):(t=fi.loadImage(e,KF,KF),t.__zrImageSrc=e,_I.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}else return e;else return t}function KF(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var r=e.pending[t],n=r.cb;n&&n(this,r.cbPayload),r.hostEl.dirty()}e.pending.length=0}function RT(e){return e&&e.width&&e.height}var g2=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function JRe(e,t,r,n,i){var a={};return IJ(a,e,t,r,n,i),a.text}function IJ(e,t,r,n,i,a){if(!r){e.text="",e.isTruncated=!1;return}var o=(t+"").split(`
`);a=OJ(r,n,i,a);for(var s=!1,l={},u=0,c=o.length;u<c;u++)EJ(l,o[u],a),o[u]=l.textLine,s=s||l.isTruncated;e.text=o.join(`
`),e.isTruncated=s}function OJ(e,t,r,n){n=n||{};var i=ae({},n);r=Ae(r,"..."),i.maxIterations=Ae(n.maxIterations,2);var a=i.minChar=Ae(n.minChar,0),o=i.fontMeasureInfo=Bo(t),s=o.asciiCharWidth;i.placeholder=Ae(n.placeholder,"");for(var l=e=Math.max(0,e-1),u=0;u<a&&l>=s;u++)l-=s;var c=zo(o,r);return c>l&&(r="",c=0),l=e-c,i.ellipsis=r,i.ellipsisWidth=c,i.contentWidth=l,i.containerWidth=e,i}function EJ(e,t,r){var n=r.containerWidth,i=r.contentWidth,a=r.fontMeasureInfo;if(!n){e.textLine="",e.isTruncated=!1;return}var o=zo(a,t);if(o<=n){e.textLine=t,e.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=r.maxIterations){t+=r.ellipsis;break}var l=s===0?QRe(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,l),o=zo(a,t)}t===""&&(t=r.placeholder),e.textLine=t,e.isTruncated=!0}function QRe(e,t,r){for(var n=0,i=0,a=e.length;i<a&&n<t;i++)n+=fJ(r,e.charCodeAt(i));return i}function e3e(e,t,r,n){var i=DN(e),a=t.overflow,o=t.padding,s=o?o[1]+o[3]:0,l=o?o[0]+o[2]:0,u=t.font,c=a==="truncate",f=d0(u),h=Ae(t.lineHeight,f),d=t.lineOverflow==="truncate",v=!1,m=t.width;m==null&&r!=null&&(m=r-s);var y=t.height;y==null&&n!=null&&(y=n-l);var x;m!=null&&(a==="break"||a==="breakAll")?x=i?DJ(i,t.font,m,a==="breakAll",0).lines:[]:x=i?i.split(`
`):[];var _=x.length*h;if(y==null&&(y=_),_>y&&d){var b=Math.floor(y/h);v=v||x.length>b,x=x.slice(0,b),_=x.length*h}if(i&&c&&m!=null)for(var S=OJ(m,u,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),T={},C=0;C<x.length;C++)EJ(T,x[C],S),x[C]=T.textLine,v=v||T.isTruncated;for(var A=y,P=0,I=Bo(u),C=0;C<x.length;C++)P=Math.max(zo(I,x[C]),P);m==null&&(m=P);var k=m;return A+=l,k+=s,{lines:x,height:y,outerWidth:k,outerHeight:A,lineHeight:h,calculatedLineHeight:f,contentWidth:P,contentHeight:_,width:m,isTruncated:v}}var t3e=function(){function e(){}return e}(),JF=function(){function e(t){this.tokens=[],t&&(this.tokens=t)}return e}(),r3e=function(){function e(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return e}();function n3e(e,t,r,n,i){var a=new r3e,o=DN(e);if(!o)return a;var s=t.padding,l=s?s[1]+s[3]:0,u=s?s[0]+s[2]:0,c=t.width;c==null&&r!=null&&(c=r-l);var f=t.height;f==null&&n!=null&&(f=n-u);for(var h=t.overflow,d=(h==="break"||h==="breakAll")&&c!=null?{width:c,accumWidth:0,breakAll:h==="breakAll"}:null,v=g2.lastIndex=0,m;(m=g2.exec(o))!=null;){var y=m.index;y>v&&m2(a,o.substring(v,y),t,d),m2(a,m[2],t,d,m[1]),v=g2.lastIndex}v<o.length&&m2(a,o.substring(v,o.length),t,d);var x=[],_=0,b=0,S=h==="truncate",T=t.lineOverflow==="truncate",C={};function A(de,Re,xe){de.width=Re,de.lineHeight=xe,_+=xe,b=Math.max(b,Re)}e:for(var P=0;P<a.lines.length;P++){for(var I=a.lines[P],k=0,E=0,D=0;D<I.tokens.length;D++){var N=I.tokens[D],z=N.styleName&&t.rich[N.styleName]||{},V=N.textPadding=z.padding,F=V?V[1]+V[3]:0,$=N.font=z.font||t.font;N.contentHeight=d0($);var B=Ae(z.height,N.contentHeight);if(N.innerHeight=B,V&&(B+=V[0]+V[2]),N.height=B,N.lineHeight=ci(z.lineHeight,t.lineHeight,B),N.align=z&&z.align||i,N.verticalAlign=z&&z.verticalAlign||"middle",T&&f!=null&&_+N.lineHeight>f){var H=a.lines.length;D>0?(I.tokens=I.tokens.slice(0,D),A(I,E,k),a.lines=a.lines.slice(0,P+1)):a.lines=a.lines.slice(0,P),a.isTruncated=a.isTruncated||a.lines.length<H;break e}var U=z.width,Y=U==null||U==="auto";if(typeof U=="string"&&U.charAt(U.length-1)==="%")N.percentWidth=U,x.push(N),N.contentWidth=zo(Bo($),N.text);else{if(Y){var Z=z.backgroundColor,Q=Z&&Z.image;Q&&(Q=KRe(Q),RT(Q)&&(N.width=Math.max(N.width,Q.width*B/Q.height)))}var re=S&&c!=null?c-E:null;re!=null&&re<N.width?!Y||re<F?(N.text="",N.width=N.contentWidth=0):(IJ(C,N.text,re-F,$,t.ellipsis,{minChar:t.truncateMinChar}),N.text=C.text,a.isTruncated=a.isTruncated||C.isTruncated,N.width=N.contentWidth=zo(Bo($),N.text)):N.contentWidth=zo(Bo($),N.text)}N.width+=F,E+=N.width,z&&(k=Math.max(k,N.lineHeight))}A(I,E,k)}a.outerWidth=a.width=Ae(c,b),a.outerHeight=a.height=Ae(f,_),a.contentHeight=_,a.contentWidth=b,a.outerWidth+=l,a.outerHeight+=u;for(var P=0;P<x.length;P++){var N=x[P],ue=N.percentWidth;N.width=parseInt(ue,10)/100*a.width}return a}function m2(e,t,r,n,i){var a=t==="",o=i&&r.rich[i]||{},s=e.lines,l=o.font||r.font,u=!1,c,f;if(n){var h=o.padding,d=h?h[1]+h[3]:0;if(o.width!=null&&o.width!=="auto"){var v=Ja(o.width,n.width)+d;s.length>0&&v+n.accumWidth>n.width&&(c=t.split(`
`),u=!0),n.accumWidth=v}else{var m=DJ(t,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=m.accumWidth+d,f=m.linesWidths,c=m.lines}}c||(c=t.split(`
`));for(var y=Bo(l),x=0;x<c.length;x++){var _=c[x],b=new t3e;if(b.styleName=i,b.text=_,b.isLineHolder=!_&&!a,typeof o.width=="number"?b.width=o.width:b.width=f?f[x]:zo(y,_),!x&&!u){var S=(s[s.length-1]||(s[0]=new JF)).tokens,T=S.length;T===1&&S[0].isLineHolder?S[0]=b:(_||!T||a)&&S.push(b)}else s.push(new JF([b]))}}function i3e(e){var t=e.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var a3e=va(",&?/;] ".split(""),function(e,t){return e[t]=!0,e},{});function o3e(e){return i3e(e)?!!a3e[e]:!0}function DJ(e,t,r,n,i){for(var a=[],o=[],s="",l="",u=0,c=0,f=Bo(t),h=0;h<e.length;h++){var d=e.charAt(h);if(d===`
`){l&&(s+=l,c+=u),a.push(s),o.push(c),s="",l="",u=0,c=0;continue}var v=fJ(f,d.charCodeAt(0)),m=n?!1:!o3e(d);if(a.length?c+v>r:i+c+v>r){c?(s||l)&&(m?(s||(s=l,l="",u=0,c=u),a.push(s),o.push(c-u),l+=d,u+=v,s="",c=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(c),s=d,c=v)):m?(a.push(l),o.push(u),l=d,u=v):(a.push(d),o.push(v));continue}c+=v,m?(l+=d,u+=v):(l&&(s+=l,l="",u=0),s+=d)}return l&&(s+=l),s&&(a.push(s),o.push(c)),a.length===1&&(c+=i),{accumWidth:c,lines:a,linesWidths:o}}function QF(e,t,r,n,i,a){if(e.baseX=r,e.baseY=n,e.outerWidth=e.outerHeight=null,!!t){var o=t.width*2,s=t.height*2;je.set(eV,Kd(r,o,i),Hc(n,s,a),o,s),je.intersect(t,eV,null,tV);var l=tV.outIntersectRect;e.outerWidth=l.width,e.outerHeight=l.height,e.baseX=Kd(l.x,l.width,i,!0),e.baseY=Hc(l.y,l.height,a,!0)}}var eV=new je(0,0,0,0),tV={outIntersectRect:{},clamp:!0};function DN(e){return e!=null?e+="":e=""}function s3e(e){var t=DN(e.text),r=e.font,n=zo(Bo(r),t),i=d0(r);return bI(e,n,i,null)}function bI(e,t,r,n){var i=new je(Kd(e.x||0,t,e.textAlign),Hc(e.y||0,r,e.textBaseline),t,r),a=n??(NJ(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function NJ(e){var t=e.stroke;return t!=null&&t!=="none"&&e.lineWidth>0}var wI="__zr_style_"+Math.round(Math.random()*10),Uc={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},BT={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Uc[wI]=!0;var rV=["z","z2","invisible"],l3e=["invisible"],ga=function(e){K(t,e);function t(r){return e.call(this,r)||this}return t.prototype._init=function(r){for(var n=at(r),i=0;i<n.length;i++){var a=n[i];a==="style"?this.useStyle(r[a]):e.prototype.attrKV.call(this,a,r[a])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(r,n,i,a){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&u3e(this,r,n)||o&&!o[0]&&!o[3])return!1;if(i&&this.__clipPaths&&this.__clipPaths.length){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(a&&this.parent)for(var l=this.parent;l;){if(l.ignore)return!1;l=l.parent}return!0},t.prototype.contain=function(r,n){return this.rectContain(r,n)},t.prototype.traverse=function(r,n){r.call(n,this)},t.prototype.rectContain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();return a.contain(i[0],i[1])},t.prototype.getPaintRect=function(){var r=this._paintRect;if(!this._paintRect||this.__dirty){var n=this.transform,i=this.getBoundingRect(),a=this.style,o=a.shadowBlur||0,s=a.shadowOffsetX||0,l=a.shadowOffsetY||0;r=this._paintRect||(this._paintRect=new je(0,0,0,0)),n?je.applyTransform(r,i,n):r.copy(i),(o||s||l)&&(r.width+=o*2+Math.abs(s),r.height+=o*2+Math.abs(l),r.x=Math.min(r.x,r.x+s-o),r.y=Math.min(r.y,r.y+l-o));var u=this.dirtyRectTolerance;r.isZero()||(r.x=Math.floor(r.x-u),r.y=Math.floor(r.y-u),r.width=Math.ceil(r.width+1+u*2),r.height=Math.ceil(r.height+1+u*2))}return r},t.prototype.setPrevPaintRect=function(r){r?(this._prevPaintRect=this._prevPaintRect||new je(0,0,0,0),this._prevPaintRect.copy(r)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(r){return this.animate("style",r)},t.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(r,n){r!=="style"?e.prototype.attrKV.call(this,r,n):this.style?this.setStyle(n):this.useStyle(n)},t.prototype.setStyle=function(r,n){return typeof r=="string"?this.style[r]=n:ae(this.style,r),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(r){r||this.markRedraw(),this.__dirty|=xg,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&xg)},t.prototype.styleUpdated=function(){this.__dirty&=~xg},t.prototype.createStyle=function(r){return c0(Uc,r)},t.prototype.useStyle=function(r){r[wI]||(r=this.createStyle(r)),this.__inHover?this.__hoverStyle=r:this.style=r,this.dirtyStyle()},t.prototype.isStyleObject=function(r){return r[wI]},t.prototype._innerSaveToNormal=function(r){e.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(r,n,rV)},t.prototype._applyStateObj=function(r,n,i,a,o,s){e.prototype._applyStateObj.call(this,r,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.style?o?a?u=n.style:(u=this._mergeStyle(this.createStyle(),i.style),this._mergeStyle(u,n.style)):(u=this._mergeStyle(this.createStyle(),a?this.style:i.style),this._mergeStyle(u,n.style)):l&&(u=i.style),u)if(o){var c=this.style;if(this.style=this.createStyle(l?{}:c),l)for(var f=at(c),h=0;h<f.length;h++){var d=f[h];d in u&&(u[d]=u[d],this.style[d]=c[d])}for(var v=at(u),h=0;h<v.length;h++){var d=v[h];this.style[d]=this.style[d]}this._transitionState(r,{style:u},s,this.getAnimationStyleProps())}else this.useStyle(u);for(var m=this.__inHover?l3e:rV,h=0;h<m.length;h++){var d=m[h];n&&n[d]!=null?this[d]=n[d]:l&&i[d]!=null&&(this[d]=i[d])}},t.prototype._mergeStates=function(r){for(var n=e.prototype._mergeStates.call(this,r),i,a=0;a<r.length;a++){var o=r[a];o.style&&(i=i||{},this._mergeStyle(i,o.style))}return i&&(n.style=i),n},t.prototype._mergeStyle=function(r,n){return ae(r,n),r},t.prototype.getAnimationStyleProps=function(){return BT},t.initDefaultProps=function(){var r=t.prototype;r.type="displayable",r.invisible=!1,r.z=0,r.z2=0,r.zlevel=0,r.culling=!1,r.cursor="pointer",r.rectHover=!1,r.incremental=!1,r._rect=null,r.dirtyRectTolerance=0,r.__dirty=Si|xg}(),t}(DT),y2=new je(0,0,0,0),x2=new je(0,0,0,0);function u3e(e,t,r){return y2.copy(e.getBoundingRect()),e.transform&&y2.applyTransform(e.transform),x2.width=t,x2.height=r,!y2.intersect(x2)}var ri=Math.min,ni=Math.max,_2=Math.sin,b2=Math.cos,Hu=Math.PI*2,zx=Mu(),$x=Mu(),Fx=Mu();function zT(e,t,r){if(e.length!==0){for(var n=e[0],i=n[0],a=n[0],o=n[1],s=n[1],l=1;l<e.length;l++)n=e[l],i=ri(i,n[0]),a=ni(a,n[0]),o=ri(o,n[1]),s=ni(s,n[1]);t[0]=i,t[1]=o,r[0]=a,r[1]=s}}function nV(e,t,r,n,i,a){i[0]=ri(e,r),i[1]=ri(t,n),a[0]=ni(e,r),a[1]=ni(t,n)}var iV=[],aV=[];function c3e(e,t,r,n,i,a,o,s,l,u){var c=qK,f=Wr,h=c(e,r,i,o,iV);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var d=0;d<h;d++){var v=f(e,r,i,o,iV[d]);l[0]=ri(v,l[0]),u[0]=ni(v,u[0])}h=c(t,n,a,s,aV);for(var d=0;d<h;d++){var m=f(t,n,a,s,aV[d]);l[1]=ri(m,l[1]),u[1]=ni(m,u[1])}l[0]=ri(e,l[0]),u[0]=ni(e,u[0]),l[0]=ri(o,l[0]),u[0]=ni(o,u[0]),l[1]=ri(t,l[1]),u[1]=ni(t,u[1]),l[1]=ri(s,l[1]),u[1]=ni(s,u[1])}function f3e(e,t,r,n,i,a,o,s){var l=JK,u=an,c=ni(ri(l(e,r,i),1),0),f=ni(ri(l(t,n,a),1),0),h=u(e,r,i,c),d=u(t,n,a,f);o[0]=ri(e,i,h),o[1]=ri(t,a,d),s[0]=ni(e,i,h),s[1]=ni(t,a,d)}function h3e(e,t,r,n,i,a,o,s,l){var u=ws,c=Ss,f=Math.abs(i-a);if(f%Hu<1e-4&&f>1e-4){s[0]=e-r,s[1]=t-n,l[0]=e+r,l[1]=t+n;return}if(zx[0]=b2(i)*r+e,zx[1]=_2(i)*n+t,$x[0]=b2(a)*r+e,$x[1]=_2(a)*n+t,u(s,zx,$x),c(l,zx,$x),i=i%Hu,i<0&&(i=i+Hu),a=a%Hu,a<0&&(a=a+Hu),i>a&&!o?a+=Hu:i<a&&o&&(i+=Hu),o){var h=a;a=i,i=h}for(var d=0;d<a;d+=Math.PI/2)d>i&&(Fx[0]=b2(d)*r+e,Fx[1]=_2(d)*n+t,u(s,Fx,s),c(l,Fx,l))}var Et={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Uu=[],Zu=[],uo=[],ll=[],co=[],fo=[],w2=Math.min,S2=Math.max,Yu=Math.cos,Xu=Math.sin,os=Math.abs,SI=Math.PI,xl=SI*2,T2=typeof Float32Array<"u",Rp=[];function C2(e){var t=Math.round(e/SI*1e8)/1e8;return t%2*SI}function $T(e,t){var r=C2(e[0]);r<0&&(r+=xl);var n=r-e[0],i=e[1];i+=n,!t&&i-r>=xl?i=r+xl:t&&r-i>=xl?i=r-xl:!t&&r>i?i=r+(xl-C2(r-i)):t&&r<i&&(i=r-(xl-C2(i-r))),e[0]=r,e[1]=i}var Uo=function(){function e(t){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}return e.prototype.increaseVersion=function(){this._version++},e.prototype.getVersion=function(){return this._version},e.prototype.setScale=function(t,r,n){n=n||0,n>0&&(this._ux=os(n/fw/t)||0,this._uy=os(n/fw/r)||0)},e.prototype.setDPR=function(t){this.dpr=t},e.prototype.setContext=function(t){this._ctx=t},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(t,r){return this._drawPendingPt(),this.addData(Et.M,t,r),this._ctx&&this._ctx.moveTo(t,r),this._x0=t,this._y0=r,this._xi=t,this._yi=r,this},e.prototype.lineTo=function(t,r){var n=os(t-this._xi),i=os(r-this._yi),a=n>this._ux||i>this._uy;if(this.addData(Et.L,t,r),this._ctx&&a&&this._ctx.lineTo(t,r),a)this._xi=t,this._yi=r,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=r,this._pendingPtDist=o)}return this},e.prototype.bezierCurveTo=function(t,r,n,i,a,o){return this._drawPendingPt(),this.addData(Et.C,t,r,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(t,r,n,i,a,o),this._xi=a,this._yi=o,this},e.prototype.quadraticCurveTo=function(t,r,n,i){return this._drawPendingPt(),this.addData(Et.Q,t,r,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,r,n,i),this._xi=n,this._yi=i,this},e.prototype.arc=function(t,r,n,i,a,o){this._drawPendingPt(),Rp[0]=i,Rp[1]=a,$T(Rp,o),i=Rp[0],a=Rp[1];var s=a-i;return this.addData(Et.A,t,r,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(t,r,n,i,a,o),this._xi=Yu(a)*n+t,this._yi=Xu(a)*n+r,this},e.prototype.arcTo=function(t,r,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,r,n,i,a),this},e.prototype.rect=function(t,r,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,r,n,i),this.addData(Et.R,t,r,n,i),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Et.Z);var t=this._ctx,r=this._x0,n=this._y0;return t&&t.closePath(),this._xi=r,this._yi=n,this},e.prototype.fill=function(t){t&&t.fill(),this.toStatic()},e.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(t){if(this._saveData){var r=t.length;!(this.data&&this.data.length===r)&&T2&&(this.data=new Float32Array(r));for(var n=0;n<r;n++)this.data[n]=t[n];this._len=r}},e.prototype.appendPath=function(t){if(this._saveData){t instanceof Array||(t=[t]);for(var r=t.length,n=0,i=this._len,a=0;a<r;a++)n+=t[a].len();var o=this.data;if(T2&&(o instanceof Float32Array||!o)&&(this.data=new Float32Array(i+n),i>0&&o))for(var s=0;s<i;s++)this.data[s]=o[s];for(var a=0;a<r;a++)for(var l=t[a].data,s=0;s<l.length;s++)this.data[i++]=l[s];this._len=i}},e.prototype.addData=function(t,r,n,i,a,o,s,l,u){if(this._saveData){var c=this.data;this._len+arguments.length>c.length&&(this._expandData(),c=this.data);for(var f=0;f<arguments.length;f++)c[this._len++]=arguments[f]}},e.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],r=0;r<this._len;r++)t[r]=this.data[r];this.data=t}},e.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var t=this.data;t instanceof Array&&(t.length=this._len,T2&&this._len>11&&(this.data=new Float32Array(t)))}},e.prototype.getBoundingRect=function(){uo[0]=uo[1]=co[0]=co[1]=Number.MAX_VALUE,ll[0]=ll[1]=fo[0]=fo[1]=-Number.MAX_VALUE;var t=this.data,r=0,n=0,i=0,a=0,o;for(o=0;o<this._len;){var s=t[o++],l=o===1;switch(l&&(r=t[o],n=t[o+1],i=r,a=n),s){case Et.M:r=i=t[o++],n=a=t[o++],co[0]=i,co[1]=a,fo[0]=i,fo[1]=a;break;case Et.L:nV(r,n,t[o],t[o+1],co,fo),r=t[o++],n=t[o++];break;case Et.C:c3e(r,n,t[o++],t[o++],t[o++],t[o++],t[o],t[o+1],co,fo),r=t[o++],n=t[o++];break;case Et.Q:f3e(r,n,t[o++],t[o++],t[o],t[o+1],co,fo),r=t[o++],n=t[o++];break;case Et.A:var u=t[o++],c=t[o++],f=t[o++],h=t[o++],d=t[o++],v=t[o++]+d;o+=1;var m=!t[o++];l&&(i=Yu(d)*f+u,a=Xu(d)*h+c),h3e(u,c,f,h,d,v,m,co,fo),r=Yu(v)*f+u,n=Xu(v)*h+c;break;case Et.R:i=r=t[o++],a=n=t[o++];var y=t[o++],x=t[o++];nV(i,a,i+y,a+x,co,fo);break;case Et.Z:r=i,n=a;break}ws(uo,uo,co),Ss(ll,ll,fo)}return o===0&&(uo[0]=uo[1]=ll[0]=ll[1]=0),new je(uo[0],uo[1],ll[0]-uo[0],ll[1]-uo[1])},e.prototype._calculateLength=function(){var t=this.data,r=this._len,n=this._ux,i=this._uy,a=0,o=0,s=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,c=0,f=0,h=0;h<r;){var d=t[h++],v=h===1;v&&(a=t[h],o=t[h+1],s=a,l=o);var m=-1;switch(d){case Et.M:a=s=t[h++],o=l=t[h++];break;case Et.L:{var y=t[h++],x=t[h++],_=y-a,b=x-o;(os(_)>n||os(b)>i||h===r-1)&&(m=Math.sqrt(_*_+b*b),a=y,o=x);break}case Et.C:{var S=t[h++],T=t[h++],y=t[h++],x=t[h++],C=t[h++],A=t[h++];m=wje(a,o,S,T,y,x,C,A,10),a=C,o=A;break}case Et.Q:{var S=t[h++],T=t[h++],y=t[h++],x=t[h++];m=Tje(a,o,S,T,y,x,10),a=y,o=x;break}case Et.A:var P=t[h++],I=t[h++],k=t[h++],E=t[h++],D=t[h++],N=t[h++],z=N+D;h+=1,v&&(s=Yu(D)*k+P,l=Xu(D)*E+I),m=S2(k,E)*w2(xl,Math.abs(N)),a=Yu(z)*k+P,o=Xu(z)*E+I;break;case Et.R:{s=a=t[h++],l=o=t[h++];var V=t[h++],F=t[h++];m=V*2+F*2;break}case Et.Z:{var _=s-a,b=l-o;m=Math.sqrt(_*_+b*b),a=s,o=l;break}}m>=0&&(u[f++]=m,c+=m)}return this._pathLen=c,c},e.prototype.rebuildPath=function(t,r){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,l,u,c,f,h,d=r<1,v,m,y=0,x=0,_,b=0,S,T;if(!(d&&(this._pathSegLen||this._calculateLength(),v=this._pathSegLen,m=this._pathLen,_=r*m,!_)))e:for(var C=0;C<o;){var A=n[C++],P=C===1;switch(P&&(u=n[C],c=n[C+1],s=u,l=c),A!==Et.L&&b>0&&(t.lineTo(S,T),b=0),A){case Et.M:s=u=n[C++],l=c=n[C++],t.moveTo(u,c);break;case Et.L:{f=n[C++],h=n[C++];var I=os(f-u),k=os(h-c);if(I>i||k>a){if(d){var E=v[x++];if(y+E>_){var D=(_-y)/E;t.lineTo(u*(1-D)+f*D,c*(1-D)+h*D);break e}y+=E}t.lineTo(f,h),u=f,c=h,b=0}else{var N=I*I+k*k;N>b&&(S=f,T=h,b=N)}break}case Et.C:{var z=n[C++],V=n[C++],F=n[C++],$=n[C++],B=n[C++],H=n[C++];if(d){var E=v[x++];if(y+E>_){var D=(_-y)/E;fu(u,z,F,B,D,Uu),fu(c,V,$,H,D,Zu),t.bezierCurveTo(Uu[1],Zu[1],Uu[2],Zu[2],Uu[3],Zu[3]);break e}y+=E}t.bezierCurveTo(z,V,F,$,B,H),u=B,c=H;break}case Et.Q:{var z=n[C++],V=n[C++],F=n[C++],$=n[C++];if(d){var E=v[x++];if(y+E>_){var D=(_-y)/E;py(u,z,F,D,Uu),py(c,V,$,D,Zu),t.quadraticCurveTo(Uu[1],Zu[1],Uu[2],Zu[2]);break e}y+=E}t.quadraticCurveTo(z,V,F,$),u=F,c=$;break}case Et.A:var U=n[C++],Y=n[C++],Z=n[C++],Q=n[C++],re=n[C++],ue=n[C++],de=n[C++],Re=!n[C++],xe=Z>Q?Z:Q,ie=os(Z-Q)>.001,ve=re+ue,ce=!1;if(d){var E=v[x++];y+E>_&&(ve=re+ue*(_-y)/E,ce=!0),y+=E}if(ie&&t.ellipse?t.ellipse(U,Y,Z,Q,de,re,ve,Re):t.arc(U,Y,xe,re,ve,Re),ce)break e;P&&(s=Yu(re)*Z+U,l=Xu(re)*Q+Y),u=Yu(ve)*Z+U,c=Xu(ve)*Q+Y;break;case Et.R:s=u=n[C],l=c=n[C+1],f=n[C++],h=n[C++];var X=n[C++],te=n[C++];if(d){var E=v[x++];if(y+E>_){var pe=_-y;t.moveTo(f,h),t.lineTo(f+w2(pe,X),h),pe-=X,pe>0&&t.lineTo(f+X,h+w2(pe,te)),pe-=te,pe>0&&t.lineTo(f+S2(X-pe,0),h+te),pe-=X,pe>0&&t.lineTo(f,h+S2(te-pe,0));break e}y+=E}t.rect(f,h,X,te);break;case Et.Z:if(d){var E=v[x++];if(y+E>_){var D=(_-y)/E;t.lineTo(u*(1-D)+s*D,c*(1-D)+l*D);break e}y+=E}t.closePath(),u=s,c=l}}},e.prototype.clone=function(){var t=new e,r=this.data;return t.data=r.slice?r.slice():Array.prototype.slice.call(r),t._len=this._len,t},e.prototype.canSave=function(){return!!this._saveData},e.CMD=Et,e.initDefaultProps=function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),e}();function Tl(e,t,r,n,i,a,o){if(i===0)return!1;var s=i,l=0,u=e;if(o>t+s&&o>n+s||o<t-s&&o<n-s||a>e+s&&a>r+s||a<e-s&&a<r-s)return!1;if(e!==r)l=(t-n)/(e-r),u=(e*n-r*t)/(e-r);else return Math.abs(a-e)<=s/2;var c=l*a-o+u,f=c*c/(l*l+1);return f<=s/2*s/2}function d3e(e,t,r,n,i,a,o,s,l,u,c){if(l===0)return!1;var f=l;if(c>t+f&&c>n+f&&c>a+f&&c>s+f||c<t-f&&c<n-f&&c<a-f&&c<s-f||u>e+f&&u>r+f&&u>i+f&&u>o+f||u<e-f&&u<r-f&&u<i-f&&u<o-f)return!1;var h=KK(e,t,r,n,i,a,o,s,u,c,null);return h<=f/2}function jJ(e,t,r,n,i,a,o,s,l){if(o===0)return!1;var u=o;if(l>t+u&&l>n+u&&l>a+u||l<t-u&&l<n-u&&l<a-u||s>e+u&&s>r+u&&s>i+u||s<e-u&&s<r-u&&s<i-u)return!1;var c=QK(e,t,r,n,i,a,s,l,null);return c<=u/2}var oV=Math.PI*2;function Pi(e){return e%=oV,e<0&&(e+=oV),e}var Bp=Math.PI*2;function v3e(e,t,r,n,i,a,o,s,l){if(o===0)return!1;var u=o;s-=e,l-=t;var c=Math.sqrt(s*s+l*l);if(c-u>r||c+u<r)return!1;if(Math.abs(n-i)%Bp<1e-4)return!0;if(a){var f=n;n=Pi(i),i=Pi(f)}else n=Pi(n),i=Pi(i);n>i&&(i+=Bp);var h=Math.atan2(l,s);return h<0&&(h+=Bp),h>=n&&h<=i||h+Bp>=n&&h+Bp<=i}function vs(e,t,r,n,i,a){if(a>t&&a>n||a<t&&a<n||n===t)return 0;var o=(a-t)/(n-t),s=n<t?1:-1;(o===1||o===0)&&(s=n<t?.5:-.5);var l=o*(r-e)+e;return l===i?1/0:l>i?s:0}var ul=Uo.CMD,qu=Math.PI*2,p3e=1e-4;function g3e(e,t){return Math.abs(e-t)<p3e}var Vn=[-1,-1,-1],qi=[-1,-1];function m3e(){var e=qi[0];qi[0]=qi[1],qi[1]=e}function y3e(e,t,r,n,i,a,o,s,l,u){if(u>t&&u>n&&u>a&&u>s||u<t&&u<n&&u<a&&u<s)return 0;var c=sw(t,n,a,s,u,Vn);if(c===0)return 0;for(var f=0,h=-1,d=void 0,v=void 0,m=0;m<c;m++){var y=Vn[m],x=y===0||y===1?.5:1,_=Wr(e,r,i,o,y);_<l||(h<0&&(h=qK(t,n,a,s,qi),qi[1]<qi[0]&&h>1&&m3e(),d=Wr(t,n,a,s,qi[0]),h>1&&(v=Wr(t,n,a,s,qi[1]))),h===2?y<qi[0]?f+=d<t?x:-x:y<qi[1]?f+=v<d?x:-x:f+=s<v?x:-x:y<qi[0]?f+=d<t?x:-x:f+=s<d?x:-x)}return f}function x3e(e,t,r,n,i,a,o,s){if(s>t&&s>n&&s>a||s<t&&s<n&&s<a)return 0;var l=Sje(t,n,a,s,Vn);if(l===0)return 0;var u=JK(t,n,a);if(u>=0&&u<=1){for(var c=0,f=an(t,n,a,u),h=0;h<l;h++){var d=Vn[h]===0||Vn[h]===1?.5:1,v=an(e,r,i,Vn[h]);v<o||(Vn[h]<u?c+=f<t?d:-d:c+=a<f?d:-d)}return c}else{var d=Vn[0]===0||Vn[0]===1?.5:1,v=an(e,r,i,Vn[0]);return v<o?0:a<t?d:-d}}function _3e(e,t,r,n,i,a,o,s){if(s-=t,s>r||s<-r)return 0;var l=Math.sqrt(r*r-s*s);Vn[0]=-l,Vn[1]=l;var u=Math.abs(n-i);if(u<1e-4)return 0;if(u>=qu-1e-4){n=0,i=qu;var c=a?1:-1;return o>=Vn[0]+e&&o<=Vn[1]+e?c:0}if(n>i){var f=n;n=i,i=f}n<0&&(n+=qu,i+=qu);for(var h=0,d=0;d<2;d++){var v=Vn[d];if(v+e>o){var m=Math.atan2(s,v),c=a?1:-1;m<0&&(m=qu+m),(m>=n&&m<=i||m+qu>=n&&m+qu<=i)&&(m>Math.PI/2&&m<Math.PI*1.5&&(c=-c),h+=c)}}return h}function RJ(e,t,r,n,i){for(var a=e.data,o=e.len(),s=0,l=0,u=0,c=0,f=0,h,d,v=0;v<o;){var m=a[v++],y=v===1;switch(m===ul.M&&v>1&&(r||(s+=vs(l,u,c,f,n,i))),y&&(l=a[v],u=a[v+1],c=l,f=u),m){case ul.M:c=a[v++],f=a[v++],l=c,u=f;break;case ul.L:if(r){if(Tl(l,u,a[v],a[v+1],t,n,i))return!0}else s+=vs(l,u,a[v],a[v+1],n,i)||0;l=a[v++],u=a[v++];break;case ul.C:if(r){if(d3e(l,u,a[v++],a[v++],a[v++],a[v++],a[v],a[v+1],t,n,i))return!0}else s+=y3e(l,u,a[v++],a[v++],a[v++],a[v++],a[v],a[v+1],n,i)||0;l=a[v++],u=a[v++];break;case ul.Q:if(r){if(jJ(l,u,a[v++],a[v++],a[v],a[v+1],t,n,i))return!0}else s+=x3e(l,u,a[v++],a[v++],a[v],a[v+1],n,i)||0;l=a[v++],u=a[v++];break;case ul.A:var x=a[v++],_=a[v++],b=a[v++],S=a[v++],T=a[v++],C=a[v++];v+=1;var A=!!(1-a[v++]);h=Math.cos(T)*b+x,d=Math.sin(T)*S+_,y?(c=h,f=d):s+=vs(l,u,h,d,n,i);var P=(n-x)*S/b+x;if(r){if(v3e(x,_,S,T,T+C,A,t,P,i))return!0}else s+=_3e(x,_,S,T,T+C,A,P,i);l=Math.cos(T+C)*b+x,u=Math.sin(T+C)*S+_;break;case ul.R:c=l=a[v++],f=u=a[v++];var I=a[v++],k=a[v++];if(h=c+I,d=f+k,r){if(Tl(c,f,h,f,t,n,i)||Tl(h,f,h,d,t,n,i)||Tl(h,d,c,d,t,n,i)||Tl(c,d,c,f,t,n,i))return!0}else s+=vs(h,f,h,d,n,i),s+=vs(c,d,c,f,n,i);break;case ul.Z:if(r){if(Tl(l,u,c,f,t,n,i))return!0}else s+=vs(l,u,c,f,n,i);l=c,u=f;break}}return!r&&!g3e(u,f)&&(s+=vs(l,u,c,f,n,i)||0),s!==0}function b3e(e,t,r){return RJ(e,0,!1,t,r)}function w3e(e,t,r,n){return RJ(e,t,!0,r,n)}var pw=Oe({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Uc),S3e={style:Oe({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},BT.style)},A2=Wo.concat(["invisible","culling","z","z2","zlevel","parent"]),nt=function(e){K(t,e);function t(r){return e.call(this,r)||this}return t.prototype.update=function(){var r=this;e.prototype.update.call(this);var n=this.style;if(n.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(l){r.buildPath(l,r.shape)}),i.silent=!0;var a=i.style;for(var o in n)a[o]!==n[o]&&(a[o]=n[o]);a.fill=n.fill?n.decal:null,a.decal=null,a.shadowColor=null,n.strokeFirst&&(a.stroke=null);for(var s=0;s<A2.length;++s)i[A2[s]]=this[A2[s]];i.__dirty|=Si}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(r){var n=at(r);this.shape=this.getDefaultShape();var i=this.getDefaultStyle();i&&this.useStyle(i);for(var a=0;a<n.length;a++){var o=n[a],s=r[o];o==="style"?this.style?ae(this.style,s):this.useStyle(s):o==="shape"?ae(this.shape,s):e.prototype.attrKV.call(this,o,s)}this.style||this.useStyle({})},t.prototype.getDefaultStyle=function(){return null},t.prototype.getDefaultShape=function(){return{}},t.prototype.canBeInsideText=function(){return this.hasFill()},t.prototype.getInsideTextFill=function(){var r=this.style.fill;if(r!=="none"){if(ye(r)){var n=yy(r,0);return n>.5?dI:n>.2?tRe:vI}else if(r)return vI}return dI},t.prototype.getInsideTextStroke=function(r){var n=this.style.fill;if(ye(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=yy(r,0)<hI;if(a===o)return n}},t.prototype.buildPath=function(r,n,i){},t.prototype.pathUpdated=function(){this.__dirty&=~Mh},t.prototype.getUpdatedPathProxy=function(r){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,r),this.path},t.prototype.createPathProxy=function(){this.path=new Uo(!1)},t.prototype.hasStroke=function(){var r=this.style,n=r.stroke;return!(n==null||n==="none"||!(r.lineWidth>0))},t.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},t.prototype.getBoundingRect=function(){var r=this._rect,n=this.style,i=!r;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&Mh)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),r=o.getBoundingRect()}if(this._rect=r,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=r.clone());if(this.__dirty||i){s.copy(r);var l=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;u=Math.max(u,c??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return r},t.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect(),o=this.style;if(r=i[0],n=i[1],a.contain(r,n)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),w3e(s,l/u,r,n)))return!0}if(this.hasFill())return b3e(s,r,n)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=Mh,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(r){return this.animate("shape",r)},t.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():r==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(r,n){r==="shape"?this.setShape(n):e.prototype.attrKV.call(this,r,n)},t.prototype.setShape=function(r,n){var i=this.shape;return i||(i=this.shape={}),typeof r=="string"?i[r]=n:ae(i,r),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&Mh)},t.prototype.createStyle=function(r){return c0(pw,r)},t.prototype._innerSaveToNormal=function(r){e.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.shape&&!n.shape&&(n.shape=ae({},this.shape))},t.prototype._applyStateObj=function(r,n,i,a,o,s){e.prototype._applyStateObj.call(this,r,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.shape?o?a?u=n.shape:(u=ae({},i.shape),ae(u,n.shape)):(u=ae({},a?this.shape:i.shape),ae(u,n.shape)):l&&(u=i.shape),u)if(o){this.shape=ae({},this.shape);for(var c={},f=at(u),h=0;h<f.length;h++){var d=f[h];typeof u[d]=="object"?this.shape[d]=u[d]:c[d]=u[d]}this._transitionState(r,{shape:c},s)}else this.shape=u,this.dirtyShape()},t.prototype._mergeStates=function(r){for(var n=e.prototype._mergeStates.call(this,r),i,a=0;a<r.length;a++){var o=r[a];o.shape&&(i=i||{},this._mergeStyle(i,o.shape))}return i&&(n.shape=i),n},t.prototype.getAnimationStyleProps=function(){return S3e},t.prototype.isZeroArea=function(){return!1},t.extend=function(r){var n=function(a){K(o,a);function o(s){var l=a.call(this,s)||this;return r.init&&r.init.call(l,s),l}return o.prototype.getDefaultStyle=function(){return Le(r.style)},o.prototype.getDefaultShape=function(){return Le(r.shape)},o}(t);for(var i in r)typeof r[i]=="function"&&(n.prototype[i]=r[i]);return n},t.initDefaultProps=function(){var r=t.prototype;r.type="path",r.strokeContainThreshold=5,r.segmentIgnoreThreshold=0,r.subPixelOptimize=!1,r.autoBatch=!1,r.__dirty=Si|xg|Mh}(),t}(ga),T3e=Oe({strokeFirst:!0,font:Ws,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},pw),Qd=function(e){K(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.hasStroke=function(){return NJ(this.style)},t.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},t.prototype.createStyle=function(r){return c0(T3e,r)},t.prototype.setBoundingRect=function(r){this._rect=r},t.prototype.getBoundingRect=function(){return this._rect||(this._rect=s3e(this.style)),this._rect},t.initDefaultProps=function(){var r=t.prototype;r.dirtyRectTolerance=10}(),t}(ga);Qd.prototype.type="tspan";var C3e=Oe({x:0,y:0},Uc),A3e={style:Oe({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},BT.style)};function M3e(e){return!!(e&&typeof e!="string"&&e.width&&e.height)}var Jr=function(e){K(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createStyle=function(r){return c0(C3e,r)},t.prototype._getSize=function(r){var n=this.style,i=n[r];if(i!=null)return i;var a=M3e(n.image)?n.image:this.__image;if(!a)return 0;var o=r==="width"?"height":"width",s=n[o];return s==null?a[r]:a[r]/a[o]*s},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return A3e},t.prototype.getBoundingRect=function(){var r=this.style;return this._rect||(this._rect=new je(r.x||0,r.y||0,this.getWidth(),this.getHeight())),this._rect},t}(ga);Jr.prototype.type="image";function P3e(e,t){var r=t.x,n=t.y,i=t.width,a=t.height,o=t.r,s,l,u,c;i<0&&(r=r+i,i=-i),a<0&&(n=n+a,a=-a),typeof o=="number"?s=l=u=c=o:o instanceof Array?o.length===1?s=l=u=c=o[0]:o.length===2?(s=u=o[0],l=c=o[1]):o.length===3?(s=o[0],l=c=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],c=o[3]):s=l=u=c=0;var f;s+l>i&&(f=s+l,s*=i/f,l*=i/f),u+c>i&&(f=u+c,u*=i/f,c*=i/f),l+u>a&&(f=l+u,l*=a/f,u*=a/f),s+c>a&&(f=s+c,s*=a/f,c*=a/f),e.moveTo(r+s,n),e.lineTo(r+i-l,n),l!==0&&e.arc(r+i-l,n+l,l,-Math.PI/2,0),e.lineTo(r+i,n+a-u),u!==0&&e.arc(r+i-u,n+a-u,u,0,Math.PI/2),e.lineTo(r+c,n+a),c!==0&&e.arc(r+c,n+a-c,c,Math.PI/2,Math.PI),e.lineTo(r,n+s),s!==0&&e.arc(r+s,n+s,s,Math.PI,Math.PI*1.5)}var Yh=Math.round;function FT(e,t,r){if(t){var n=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=n,e.x2=i,e.y1=a,e.y2=o;var s=r&&r.lineWidth;return s&&(Yh(n*2)===Yh(i*2)&&(e.x1=e.x2=ki(n,s,!0)),Yh(a*2)===Yh(o*2)&&(e.y1=e.y2=ki(a,s,!0))),e}}function BJ(e,t,r){if(t){var n=t.x,i=t.y,a=t.width,o=t.height;e.x=n,e.y=i,e.width=a,e.height=o;var s=r&&r.lineWidth;return s&&(e.x=ki(n,s,!0),e.y=ki(i,s,!0),e.width=Math.max(ki(n+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(ki(i+o,s,!1)-e.y,o===0?0:1)),e}}function ki(e,t,r){if(!t)return e;var n=Yh(e*2);return(n+Yh(t))%2===0?n/2:(n+(r?1:-1))/2}var k3e=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),L3e={},qe=function(e){K(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new k3e},t.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var l=BJ(L3e,n,this.style);i=l.x,a=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else i=n.x,a=n.y,o=n.width,s=n.height;n.r?P3e(r,n):r.rect(i,a,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(nt);qe.prototype.type="rect";var sV={fill:"#000"},lV=2,ho={},I3e={style:Oe({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},BT.style)},ot=function(e){K(t,e);function t(r){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=sV,n.attr(r),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var r=0;r<this._children.length;r++){var n=this._children[r];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},t.prototype.updateTransform=function(){var r=this.innerTransformable;r?(r.updateTransform(),r.transform&&(this.transform=r.transform)):e.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(r){var n=this.innerTransformable;return n?n.getLocalTransform(r):e.prototype.getLocalTransform.call(this,r)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),e.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){this._childCursor=0,D3e(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(r){e.prototype.addSelfToZr.call(this,r);for(var n=0;n<this._children.length;n++)this._children[n].__zr=r},t.prototype.removeSelfFromZr=function(r){e.prototype.removeSelfFromZr.call(this,r);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var r=new je(0,0,0,0),n=this._children,i=[],a=null,o=0;o<n.length;o++){var s=n[o],l=s.getBoundingRect(),u=s.getLocalTransform(i);u?(r.copy(l),r.applyTransform(u),a=a||r.clone(),a.union(r)):(a=a||l.clone(),a.union(l))}this._rect=a||r}return this._rect},t.prototype.setDefaultTextStyle=function(r){this._defaultStyle=r||sV},t.prototype.setTextContent=function(r){},t.prototype._mergeStyle=function(r,n){if(!n)return r;var i=n.rich,a=r.rich||i&&{};return ae(r,n),i&&a?(this._mergeRich(a,i),r.rich=a):a&&(r.rich=a),r},t.prototype._mergeRich=function(r,n){for(var i=at(n),a=0;a<i.length;a++){var o=i[a];r[o]=r[o]||{},ae(r[o],n[o])}},t.prototype.getAnimationStyleProps=function(){return I3e},t.prototype._getOrCreateChild=function(r){var n=this._children[this._childCursor];return(!n||!(n instanceof r))&&(n=new r),this._children[this._childCursor++]=n,n.__zr=this.__zr,n.parent=this,n},t.prototype._updatePlainTexts=function(){var r=this.style,n=r.font||Ws,i=r.padding,a=this._defaultStyle,o=r.x||0,s=r.y||0,l=r.align||a.align||"left",u=r.verticalAlign||a.verticalAlign||"top";QF(ho,a.overflowRect,o,s,l,u),o=ho.baseX,s=ho.baseY;var c=pV(r),f=e3e(c,r,ho.outerWidth,ho.outerHeight),h=M2(r),d=!!r.backgroundColor,v=f.outerHeight,m=f.outerWidth,y=f.lines,x=f.lineHeight;this.isTruncated=!!f.isTruncated;var _=o,b=Hc(s,f.contentHeight,u);if(h||i){var S=Kd(o,m,l),T=Hc(s,v,u);h&&this._renderBackground(r,r,S,T,m,v)}b+=x/2,i&&(_=vV(o,l,i),u==="top"?b+=i[0]:u==="bottom"&&(b-=i[2]));for(var C=0,A=!1,P=!1,I=dV("fill"in r?r.fill:(P=!0,a.fill)),k=hV("stroke"in r?r.stroke:!d&&(!a.autoStroke||P)?(C=lV,A=!0,a.stroke):null),E=r.textShadowBlur>0,D=0;D<y.length;D++){var N=this._getOrCreateChild(Qd),z=N.createStyle();N.useStyle(z),z.text=y[D],z.x=_,z.y=b,z.textAlign=l,z.textBaseline="middle",z.opacity=r.opacity,z.strokeFirst=!0,E&&(z.shadowBlur=r.textShadowBlur||0,z.shadowColor=r.textShadowColor||"transparent",z.shadowOffsetX=r.textShadowOffsetX||0,z.shadowOffsetY=r.textShadowOffsetY||0),z.stroke=k,z.fill=I,k&&(z.lineWidth=r.lineWidth||C,z.lineDash=r.lineDash,z.lineDashOffset=r.lineDashOffset||0),z.font=n,cV(z,r),b+=x,N.setBoundingRect(bI(z,f.contentWidth,f.calculatedLineHeight,A?0:null))}},t.prototype._updateRichTexts=function(){var r=this.style,n=this._defaultStyle,i=r.align||n.align,a=r.verticalAlign||n.verticalAlign,o=r.x||0,s=r.y||0;QF(ho,n.overflowRect,o,s,i,a),o=ho.baseX,s=ho.baseY;var l=pV(r),u=n3e(l,r,ho.outerWidth,ho.outerHeight,i),c=u.width,f=u.outerWidth,h=u.outerHeight,d=r.padding;this.isTruncated=!!u.isTruncated;var v=Kd(o,f,i),m=Hc(s,h,a),y=v,x=m;d&&(y+=d[3],x+=d[0]);var _=y+c;M2(r)&&this._renderBackground(r,r,v,m,f,h);for(var b=!!r.backgroundColor,S=0;S<u.lines.length;S++){for(var T=u.lines[S],C=T.tokens,A=C.length,P=T.lineHeight,I=T.width,k=0,E=y,D=_,N=A-1,z=void 0;k<A&&(z=C[k],!z.align||z.align==="left");)this._placeToken(z,r,P,x,E,"left",b),I-=z.width,E+=z.width,k++;for(;N>=0&&(z=C[N],z.align==="right");)this._placeToken(z,r,P,x,D,"right",b),I-=z.width,D-=z.width,N--;for(E+=(c-(E-y)-(_-D)-I)/2;k<=N;)z=C[k],this._placeToken(z,r,P,x,E+z.width/2,"center",b),E+=z.width,k++;x+=P}},t.prototype._placeToken=function(r,n,i,a,o,s,l){var u=n.rich[r.styleName]||{};u.text=r.text;var c=r.verticalAlign,f=a+i/2;c==="top"?f=a+r.height/2:c==="bottom"&&(f=a+i-r.height/2);var h=!r.isLineHolder&&M2(u);h&&this._renderBackground(u,n,s==="right"?o-r.width:s==="center"?o-r.width/2:o,f-r.height/2,r.width,r.height);var d=!!u.backgroundColor,v=r.textPadding;v&&(o=vV(o,s,v),f-=r.height/2-v[0]-r.innerHeight/2);var m=this._getOrCreateChild(Qd),y=m.createStyle();m.useStyle(y);var x=this._defaultStyle,_=!1,b=0,S=!1,T=dV("fill"in u?u.fill:"fill"in n?n.fill:(_=!0,x.fill)),C=hV("stroke"in u?u.stroke:"stroke"in n?n.stroke:!d&&!l&&(!x.autoStroke||_)?(b=lV,S=!0,x.stroke):null),A=u.textShadowBlur>0||n.textShadowBlur>0;y.text=r.text,y.x=o,y.y=f,A&&(y.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,y.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",y.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,y.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),y.textAlign=s,y.textBaseline="middle",y.font=r.font||Ws,y.opacity=ci(u.opacity,n.opacity,1),cV(y,u),C&&(y.lineWidth=ci(u.lineWidth,n.lineWidth,b),y.lineDash=Ae(u.lineDash,n.lineDash),y.lineDashOffset=n.lineDashOffset||0,y.stroke=C),T&&(y.fill=T),m.setBoundingRect(bI(y,r.contentWidth,r.contentHeight,S?0:null))},t.prototype._renderBackground=function(r,n,i,a,o,s){var l=r.backgroundColor,u=r.borderWidth,c=r.borderColor,f=l&&l.image,h=l&&!f,d=r.borderRadius,v=this,m,y;if(h||r.lineHeight||u&&c){m=this._getOrCreateChild(qe),m.useStyle(m.createStyle()),m.style.fill=null;var x=m.shape;x.x=i,x.y=a,x.width=o,x.height=s,x.r=d,m.dirtyShape()}if(h){var _=m.style;_.fill=l||null,_.fillOpacity=Ae(r.fillOpacity,1)}else if(f){y=this._getOrCreateChild(Jr),y.onload=function(){v.dirtyStyle()};var b=y.style;b.image=l.image,b.x=i,b.y=a,b.width=o,b.height=s}if(u&&c){var _=m.style;_.lineWidth=u,_.stroke=c,_.strokeOpacity=Ae(r.strokeOpacity,1),_.lineDash=r.borderDash,_.lineDashOffset=r.borderDashOffset||0,m.strokeContainThreshold=0,m.hasFill()&&m.hasStroke()&&(_.strokeFirst=!0,_.lineWidth*=2)}var S=(m||y).style;S.shadowBlur=r.shadowBlur||0,S.shadowColor=r.shadowColor||"transparent",S.shadowOffsetX=r.shadowOffsetX||0,S.shadowOffsetY=r.shadowOffsetY||0,S.opacity=ci(r.opacity,n.opacity,1)},t.makeFont=function(r){var n="";return $J(r)&&(n=[r.fontStyle,r.fontWeight,zJ(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),n&&Ai(n)||r.textFont||r.font},t}(ga),O3e={left:!0,right:1,center:1},E3e={top:1,bottom:1,middle:1},uV=["fontStyle","fontWeight","fontSize","fontFamily"];function zJ(e){return typeof e=="string"&&(e.indexOf("px")!==-1||e.indexOf("rem")!==-1||e.indexOf("em")!==-1)?e:isNaN(+e)?vN+"px":e+"px"}function cV(e,t){for(var r=0;r<uV.length;r++){var n=uV[r],i=t[n];i!=null&&(e[n]=i)}}function $J(e){return e.fontSize!=null||e.fontFamily||e.fontWeight}function D3e(e){return fV(e),R(e.rich,fV),e}function fV(e){if(e){e.font=ot.makeFont(e);var t=e.align;t==="middle"&&(t="center"),e.align=t==null||O3e[t]?t:"left";var r=e.verticalAlign;r==="center"&&(r="middle"),e.verticalAlign=r==null||E3e[r]?r:"top";var n=e.padding;n&&(e.padding=u0(e.padding))}}function hV(e,t){return e==null||t<=0||e==="transparent"||e==="none"?null:e.image||e.colorStops?"#000":e}function dV(e){return e==null||e==="none"?null:e.image||e.colorStops?"#000":e}function vV(e,t,r){return t==="right"?e-r[1]:t==="center"?e+r[3]/2-r[1]/2:e+r[3]}function pV(e){var t=e.text;return t!=null&&(t+=""),t}function M2(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var ze=et(),TI=function(e,t,r,n){if(n){var i=ze(n);i.dataIndex=r,i.dataType=t,i.seriesIndex=e,i.ssrType="chart",n.type==="group"&&n.traverse(function(a){var o=ze(a);o.seriesIndex=e,o.dataIndex=r,o.dataType=t,o.ssrType="chart"})}},gV=1,mV={},FJ=et(),NN=et(),jN=0,v0=1,VT=2,qn=["emphasis","blur","select"],by=["normal","emphasis","blur","select"],zv=10,N3e=9,Zc="highlight",cb="downplay",gw="select",CI="unselect",mw="toggleSelect",RN="selectchanged";function nh(e){return e!=null&&e!=="none"}function GT(e,t,r){e.onHoverStateChange&&(e.hoverState||0)!==r&&e.onHoverStateChange(t),e.hoverState=r}function VJ(e){GT(e,"emphasis",VT)}function GJ(e){e.hoverState===VT&&GT(e,"normal",jN)}function BN(e){GT(e,"blur",v0)}function WJ(e){e.hoverState===v0&&GT(e,"normal",jN)}function j3e(e){e.selected=!0}function R3e(e){e.selected=!1}function yV(e,t,r){t(e,r)}function nl(e,t,r){yV(e,t,r),e.isGroup&&e.traverse(function(n){yV(n,t,r)})}function yw(e,t){switch(t){case"emphasis":e.hoverState=VT;break;case"normal":e.hoverState=jN;break;case"blur":e.hoverState=v0;break;case"select":e.selected=!0}}function B3e(e,t,r,n){for(var i=e.style,a={},o=0;o<t.length;o++){var s=t[o],l=i[s];a[s]=l??(n&&n[s])}for(var o=0;o<e.animators.length;o++){var u=e.animators[o];u.__fromStateTransition&&u.__fromStateTransition.indexOf(r)<0&&u.targetName==="style"&&u.saveTo(a,t)}return a}function z3e(e,t,r,n){var i=r&&He(r,"select")>=0,a=!1;if(e instanceof nt){var o=FJ(e),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(nh(s)||nh(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(a=!0,n=ae({},n),u=ae({},u),u.fill=s):!nh(u.fill)&&nh(s)?(a=!0,n=ae({},n),u=ae({},u),u.fill=uw(s)):!nh(u.stroke)&&nh(l)&&(a||(n=ae({},n),u=ae({},u)),u.stroke=uw(l)),n.style=u}}if(n&&n.z2==null){a||(n=ae({},n));var c=e.z2EmphasisLift;n.z2=e.z2+(c??zv)}return n}function $3e(e,t,r){if(r&&r.z2==null){r=ae({},r);var n=e.z2SelectLift;r.z2=e.z2+(n??N3e)}return r}function F3e(e,t,r){var n=He(e.currentStates,t)>=0,i=e.style.opacity,a=n?null:B3e(e,["opacity"],t,{opacity:1});r=r||{};var o=r.style||{};return o.opacity==null&&(r=ae({},r),o=ae({opacity:n?i:a.opacity*.1},o),r.style=o),r}function P2(e,t){var r=this.states[e];if(this.style){if(e==="emphasis")return z3e(this,e,t,r);if(e==="blur")return F3e(this,e,r);if(e==="select")return $3e(this,e,r)}return r}function vf(e){e.stateProxy=P2;var t=e.getTextContent(),r=e.getTextGuideLine();t&&(t.stateProxy=P2),r&&(r.stateProxy=P2)}function xV(e,t){!YJ(e,t)&&!e.__highByOuter&&nl(e,VJ)}function _V(e,t){!YJ(e,t)&&!e.__highByOuter&&nl(e,GJ)}function Us(e,t){e.__highByOuter|=1<<(t||0),nl(e,VJ)}function Zs(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&nl(e,GJ)}function HJ(e){nl(e,BN)}function zN(e){nl(e,WJ)}function UJ(e){nl(e,j3e)}function ZJ(e){nl(e,R3e)}function YJ(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function XJ(e){var t=e.getModel(),r=[],n=[];t.eachComponent(function(i,a){var o=NN(a),s=i==="series",l=s?e.getViewOfSeriesModel(a):e.getViewOfComponentModel(a);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){WJ(u)}),s&&r.push(a)),o.isBlured=!1}),R(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(r,!1,t)})}function AI(e,t,r,n){var i=n.getModel();r=r||"coordinateSystem";function a(u,c){for(var f=0;f<c.length;f++){var h=u.getItemGraphicEl(c[f]);h&&zN(h)}}if(e!=null&&!(!t||t==="none")){var o=i.getSeriesByIndex(e),s=o.coordinateSystem;s&&s.master&&(s=s.master);var l=[];i.eachSeries(function(u){var c=o===u,f=u.coordinateSystem;f&&f.master&&(f=f.master);var h=f&&s?f===s:c;if(!(r==="series"&&!c||r==="coordinateSystem"&&!h||t==="series"&&c)){var d=n.getViewOfSeriesModel(u);if(d.group.traverse(function(y){y.__highByOuter&&c&&t==="self"||BN(y)}),bn(t))a(u.getData(),t);else if(Ee(t))for(var v=at(t),m=0;m<v.length;m++)a(u.getData(v[m]),t[v[m]]);l.push(u),NN(u).isBlured=!0}}),i.eachComponent(function(u,c){if(u!=="series"){var f=n.getViewOfComponentModel(c);f&&f.toggleBlurSeries&&f.toggleBlurSeries(l,!0,i)}})}}function MI(e,t,r){if(!(e==null||t==null)){var n=r.getModel().getComponent(e,t);if(n){NN(n).isBlured=!0;var i=r.getViewOfComponentModel(n);!i||!i.focusBlurEnabled||i.group.traverse(function(a){BN(a)})}}}function V3e(e,t,r){var n=e.seriesIndex,i=e.getData(t.dataType);if(i){var a=hf(i,t);a=(oe(a)?a[0]:a)||0;var o=i.getItemGraphicEl(a);if(!o)for(var s=i.count(),l=0;!o&&l<s;)o=i.getItemGraphicEl(l++);if(o){var u=ze(o);AI(n,u.focus,u.blurScope,r)}else{var c=e.get(["emphasis","focus"]),f=e.get(["emphasis","blurScope"]);c!=null&&AI(n,c,f,r)}}}function $N(e,t,r,n){var i={focusSelf:!1,dispatchers:null};if(e==null||e==="series"||t==null||r==null)return i;var a=n.getModel().getComponent(e,t);if(!a)return i;var o=n.getViewOfComponentModel(a);if(!o||!o.findHighDownDispatchers)return i;for(var s=o.findHighDownDispatchers(r),l,u=0;u<s.length;u++)if(ze(s[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:s}}function G3e(e,t,r){var n=ze(e),i=$N(n.componentMainType,n.componentIndex,n.componentHighDownName,r),a=i.dispatchers,o=i.focusSelf;a?(o&&MI(n.componentMainType,n.componentIndex,r),R(a,function(s){return xV(s,t)})):(AI(n.seriesIndex,n.focus,n.blurScope,r),n.focus==="self"&&MI(n.componentMainType,n.componentIndex,r),xV(e,t))}function W3e(e,t,r){XJ(r);var n=ze(e),i=$N(n.componentMainType,n.componentIndex,n.componentHighDownName,r).dispatchers;i?R(i,function(a){return _V(a,t)}):_V(e,t)}function H3e(e,t,r){if(kI(t)){var n=t.dataType,i=e.getData(n),a=hf(i,t);oe(a)||(a=[a]),e[t.type===mw?"toggleSelect":t.type===gw?"select":"unselect"](a,n)}}function bV(e){var t=e.getAllData();R(t,function(r){var n=r.data,i=r.type;n.eachItemGraphicEl(function(a,o){e.isSelected(o,i)?UJ(a):ZJ(a)})})}function U3e(e){var t=[];return e.eachSeries(function(r){var n=r.getAllData();R(n,function(i){i.data;var a=i.type,o=r.getSelectedDataIndices();if(o.length>0){var s={dataIndex:o,seriesIndex:r.seriesIndex};a!=null&&(s.dataType=a),t.push(s)}})}),t}function eu(e,t,r){Nc(e,!0),nl(e,vf),PI(e,t,r)}function Z3e(e){Nc(e,!1)}function Gt(e,t,r,n){n?Z3e(e):eu(e,t,r)}function PI(e,t,r){var n=ze(e);t!=null?(n.focus=t,n.blurScope=r):n.focus&&(n.focus=null)}var wV=["emphasis","blur","select"],Y3e={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Rr(e,t,r,n){r=r||"itemStyle";for(var i=0;i<wV.length;i++){var a=wV[i],o=t.getModel([a,r]),s=e.ensureState(a);s.style=n?n(o):o[Y3e[r]]()}}function Nc(e,t){var r=t===!1,n=e;e.highDownSilentOnTouch&&(n.__highDownSilentOnTouch=e.highDownSilentOnTouch),(!r||n.__highDownDispatcher)&&(n.__highByOuter=n.__highByOuter||0,n.__highDownDispatcher=!r)}function wy(e){return!!(e&&e.__highDownDispatcher)}function X3e(e,t,r){var n=ze(e);n.componentMainType=t.mainType,n.componentIndex=t.componentIndex,n.componentHighDownName=r}function q3e(e){var t=mV[e];return t==null&&gV<=32&&(t=mV[e]=gV++),t}function kI(e){var t=e.type;return t===gw||t===CI||t===mw}function SV(e){var t=e.type;return t===Zc||t===cb}function K3e(e){var t=FJ(e);t.normalFill=e.style.fill,t.normalStroke=e.style.stroke;var r=e.states.select||{};t.selectFill=r.style&&r.style.fill||null,t.selectStroke=r.style&&r.style.stroke||null}var ih=Uo.CMD,J3e=[[],[],[]],TV=Math.sqrt,Q3e=Math.atan2;function qJ(e,t){if(t){var r=e.data,n=e.len(),i,a,o,s,l,u,c=ih.M,f=ih.C,h=ih.L,d=ih.R,v=ih.A,m=ih.Q;for(o=0,s=0;o<n;){switch(i=r[o++],s=o,a=0,i){case c:a=1;break;case h:a=1;break;case f:a=3;break;case m:a=2;break;case v:var y=t[4],x=t[5],_=TV(t[0]*t[0]+t[1]*t[1]),b=TV(t[2]*t[2]+t[3]*t[3]),S=Q3e(-t[1]/b,t[0]/_);r[o]*=_,r[o++]+=y,r[o]*=b,r[o++]+=x,r[o++]*=_,r[o++]*=b,r[o++]+=S,r[o++]+=S,o+=2,s=o;break;case d:u[0]=r[o++],u[1]=r[o++],lr(u,u,t),r[s++]=u[0],r[s++]=u[1],u[0]+=r[o++],u[1]+=r[o++],lr(u,u,t),r[s++]=u[0],r[s++]=u[1]}for(l=0;l<a;l++){var T=J3e[l];T[0]=r[o++],T[1]=r[o++],lr(T,T,t),r[s++]=T[0],r[s++]=T[1]}}e.increaseVersion()}}var k2=Math.sqrt,Vx=Math.sin,Gx=Math.cos,zp=Math.PI;function CV(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function LI(e,t){return(e[0]*t[0]+e[1]*t[1])/(CV(e)*CV(t))}function AV(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(LI(e,t))}function MV(e,t,r,n,i,a,o,s,l,u,c){var f=l*(zp/180),h=Gx(f)*(e-r)/2+Vx(f)*(t-n)/2,d=-1*Vx(f)*(e-r)/2+Gx(f)*(t-n)/2,v=h*h/(o*o)+d*d/(s*s);v>1&&(o*=k2(v),s*=k2(v));var m=(i===a?-1:1)*k2((o*o*(s*s)-o*o*(d*d)-s*s*(h*h))/(o*o*(d*d)+s*s*(h*h)))||0,y=m*o*d/s,x=m*-s*h/o,_=(e+r)/2+Gx(f)*y-Vx(f)*x,b=(t+n)/2+Vx(f)*y+Gx(f)*x,S=AV([1,0],[(h-y)/o,(d-x)/s]),T=[(h-y)/o,(d-x)/s],C=[(-1*h-y)/o,(-1*d-x)/s],A=AV(T,C);if(LI(T,C)<=-1&&(A=zp),LI(T,C)>=1&&(A=0),A<0){var P=Math.round(A/zp*1e6)/1e6;A=zp*2+P%2*zp}c.addData(u,_,b,o,s,S,A,f,a)}var e5e=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,t5e=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function r5e(e){var t=new Uo;if(!e)return t;var r=0,n=0,i=r,a=n,o,s=Uo.CMD,l=e.match(e5e);if(!l)return t;for(var u=0;u<l.length;u++){for(var c=l[u],f=c.charAt(0),h=void 0,d=c.match(t5e)||[],v=d.length,m=0;m<v;m++)d[m]=parseFloat(d[m]);for(var y=0;y<v;){var x=void 0,_=void 0,b=void 0,S=void 0,T=void 0,C=void 0,A=void 0,P=r,I=n,k=void 0,E=void 0;switch(f){case"l":r+=d[y++],n+=d[y++],h=s.L,t.addData(h,r,n);break;case"L":r=d[y++],n=d[y++],h=s.L,t.addData(h,r,n);break;case"m":r+=d[y++],n+=d[y++],h=s.M,t.addData(h,r,n),i=r,a=n,f="l";break;case"M":r=d[y++],n=d[y++],h=s.M,t.addData(h,r,n),i=r,a=n,f="L";break;case"h":r+=d[y++],h=s.L,t.addData(h,r,n);break;case"H":r=d[y++],h=s.L,t.addData(h,r,n);break;case"v":n+=d[y++],h=s.L,t.addData(h,r,n);break;case"V":n=d[y++],h=s.L,t.addData(h,r,n);break;case"C":h=s.C,t.addData(h,d[y++],d[y++],d[y++],d[y++],d[y++],d[y++]),r=d[y-2],n=d[y-1];break;case"c":h=s.C,t.addData(h,d[y++]+r,d[y++]+n,d[y++]+r,d[y++]+n,d[y++]+r,d[y++]+n),r+=d[y-2],n+=d[y-1];break;case"S":x=r,_=n,k=t.len(),E=t.data,o===s.C&&(x+=r-E[k-4],_+=n-E[k-3]),h=s.C,P=d[y++],I=d[y++],r=d[y++],n=d[y++],t.addData(h,x,_,P,I,r,n);break;case"s":x=r,_=n,k=t.len(),E=t.data,o===s.C&&(x+=r-E[k-4],_+=n-E[k-3]),h=s.C,P=r+d[y++],I=n+d[y++],r+=d[y++],n+=d[y++],t.addData(h,x,_,P,I,r,n);break;case"Q":P=d[y++],I=d[y++],r=d[y++],n=d[y++],h=s.Q,t.addData(h,P,I,r,n);break;case"q":P=d[y++]+r,I=d[y++]+n,r+=d[y++],n+=d[y++],h=s.Q,t.addData(h,P,I,r,n);break;case"T":x=r,_=n,k=t.len(),E=t.data,o===s.Q&&(x+=r-E[k-4],_+=n-E[k-3]),r=d[y++],n=d[y++],h=s.Q,t.addData(h,x,_,r,n);break;case"t":x=r,_=n,k=t.len(),E=t.data,o===s.Q&&(x+=r-E[k-4],_+=n-E[k-3]),r+=d[y++],n+=d[y++],h=s.Q,t.addData(h,x,_,r,n);break;case"A":b=d[y++],S=d[y++],T=d[y++],C=d[y++],A=d[y++],P=r,I=n,r=d[y++],n=d[y++],h=s.A,MV(P,I,r,n,C,A,b,S,T,h,t);break;case"a":b=d[y++],S=d[y++],T=d[y++],C=d[y++],A=d[y++],P=r,I=n,r+=d[y++],n+=d[y++],h=s.A,MV(P,I,r,n,C,A,b,S,T,h,t);break}}(f==="z"||f==="Z")&&(h=s.Z,t.addData(h),r=i,n=a),o=h}return t.toStatic(),t}var KJ=function(e){K(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.applyTransform=function(r){},t}(nt);function JJ(e){return e.setData!=null}function QJ(e,t){var r=r5e(e),n=ae({},t);return n.buildPath=function(i){var a=JJ(i);if(a&&i.canSave()){i.appendPath(r);var o=i.getContext();o&&i.rebuildPath(o,1)}else{var o=a?i.getContext():i;o&&r.rebuildPath(o,1)}},n.applyTransform=function(i){qJ(r,i),this.dirtyShape()},n}function eQ(e,t){return new KJ(QJ(e,t))}function n5e(e,t){var r=QJ(e,t),n=function(i){K(a,i);function a(o){var s=i.call(this,o)||this;return s.applyTransform=r.applyTransform,s.buildPath=r.buildPath,s}return a}(KJ);return n}function i5e(e,t){for(var r=[],n=e.length,i=0;i<n;i++){var a=e[i];r.push(a.getUpdatedPathProxy(!0))}var o=new nt(t);return o.createPathProxy(),o.buildPath=function(s){if(JJ(s)){s.appendPath(r);var l=s.getContext();l&&s.rebuildPath(l,1)}},o}function FN(e,t){t=t||{};var r=new nt;return e.shape&&r.setShape(e.shape),r.setStyle(e.style),t.bakeTransform?qJ(r.path,e.getComputedTransform()):t.toLocal?r.setLocalTransform(e.getComputedTransform()):r.copyTransform(e),r.buildPath=e.buildPath,r.applyTransform=r.applyTransform,r.z=e.z,r.z2=e.z2,r.zlevel=e.zlevel,r}var a5e=function(){function e(){this.cx=0,this.cy=0,this.r=0}return e}(),Qo=function(e){K(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new a5e},t.prototype.buildPath=function(r,n){r.moveTo(n.cx+n.r,n.cy),r.arc(n.cx,n.cy,n.r,0,Math.PI*2)},t}(nt);Qo.prototype.type="circle";var o5e=function(){function e(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return e}(),p0=function(e){K(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new o5e},t.prototype.buildPath=function(r,n){var i=.5522848,a=n.cx,o=n.cy,s=n.rx,l=n.ry,u=s*i,c=l*i;r.moveTo(a-s,o),r.bezierCurveTo(a-s,o-c,a-u,o-l,a,o-l),r.bezierCurveTo(a+u,o-l,a+s,o-c,a+s,o),r.bezierCurveTo(a+s,o+c,a+u,o+l,a,o+l),r.bezierCurveTo(a-u,o+l,a-s,o+c,a-s,o),r.closePath()},t}(nt);p0.prototype.type="ellipse";var tQ=Math.PI,L2=tQ*2,Ku=Math.sin,ah=Math.cos,s5e=Math.acos,Pn=Math.atan2,PV=Math.abs,em=Math.sqrt,bg=Math.max,vo=Math.min,ka=1e-4;function l5e(e,t,r,n,i,a,o,s){var l=r-e,u=n-t,c=o-i,f=s-a,h=f*l-c*u;if(!(h*h<ka))return h=(c*(t-a)-f*(e-i))/h,[e+h*l,t+h*u]}function Wx(e,t,r,n,i,a,o){var s=e-r,l=t-n,u=(o?a:-a)/em(s*s+l*l),c=u*l,f=-u*s,h=e+c,d=t+f,v=r+c,m=n+f,y=(h+v)/2,x=(d+m)/2,_=v-h,b=m-d,S=_*_+b*b,T=i-a,C=h*m-v*d,A=(b<0?-1:1)*em(bg(0,T*T*S-C*C)),P=(C*b-_*A)/S,I=(-C*_-b*A)/S,k=(C*b+_*A)/S,E=(-C*_+b*A)/S,D=P-y,N=I-x,z=k-y,V=E-x;return D*D+N*N>z*z+V*V&&(P=k,I=E),{cx:P,cy:I,x0:-c,y0:-f,x1:P*(i/T-1),y1:I*(i/T-1)}}function u5e(e){var t;if(oe(e)){var r=e.length;if(!r)return e;r===1?t=[e[0],e[0],0,0]:r===2?t=[e[0],e[0],e[1],e[1]]:r===3?t=e.concat(e[2]):t=e}else t=[e,e,e,e];return t}function c5e(e,t){var r,n=bg(t.r,0),i=bg(t.r0||0,0),a=n>0,o=i>0;if(!(!a&&!o)){if(a||(n=i,i=0),i>n){var s=n;n=i,i=s}var l=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var c=t.cx,f=t.cy,h=!!t.clockwise,d=PV(u-l),v=d>L2&&d%L2;if(v>ka&&(d=v),!(n>ka))e.moveTo(c,f);else if(d>L2-ka)e.moveTo(c+n*ah(l),f+n*Ku(l)),e.arc(c,f,n,l,u,!h),i>ka&&(e.moveTo(c+i*ah(u),f+i*Ku(u)),e.arc(c,f,i,u,l,h));else{var m=void 0,y=void 0,x=void 0,_=void 0,b=void 0,S=void 0,T=void 0,C=void 0,A=void 0,P=void 0,I=void 0,k=void 0,E=void 0,D=void 0,N=void 0,z=void 0,V=n*ah(l),F=n*Ku(l),$=i*ah(u),B=i*Ku(u),H=d>ka;if(H){var U=t.cornerRadius;U&&(r=u5e(U),m=r[0],y=r[1],x=r[2],_=r[3]);var Y=PV(n-i)/2;if(b=vo(Y,x),S=vo(Y,_),T=vo(Y,m),C=vo(Y,y),I=A=bg(b,S),k=P=bg(T,C),(A>ka||P>ka)&&(E=n*ah(u),D=n*Ku(u),N=i*ah(l),z=i*Ku(l),d<tQ)){var Z=l5e(V,F,N,z,E,D,$,B);if(Z){var Q=V-Z[0],re=F-Z[1],ue=E-Z[0],de=D-Z[1],Re=1/Ku(s5e((Q*ue+re*de)/(em(Q*Q+re*re)*em(ue*ue+de*de)))/2),xe=em(Z[0]*Z[0]+Z[1]*Z[1]);I=vo(A,(n-xe)/(Re+1)),k=vo(P,(i-xe)/(Re-1))}}}if(!H)e.moveTo(c+V,f+F);else if(I>ka){var ie=vo(x,I),ve=vo(_,I),ce=Wx(N,z,V,F,n,ie,h),X=Wx(E,D,$,B,n,ve,h);e.moveTo(c+ce.cx+ce.x0,f+ce.cy+ce.y0),I<A&&ie===ve?e.arc(c+ce.cx,f+ce.cy,I,Pn(ce.y0,ce.x0),Pn(X.y0,X.x0),!h):(ie>0&&e.arc(c+ce.cx,f+ce.cy,ie,Pn(ce.y0,ce.x0),Pn(ce.y1,ce.x1),!h),e.arc(c,f,n,Pn(ce.cy+ce.y1,ce.cx+ce.x1),Pn(X.cy+X.y1,X.cx+X.x1),!h),ve>0&&e.arc(c+X.cx,f+X.cy,ve,Pn(X.y1,X.x1),Pn(X.y0,X.x0),!h))}else e.moveTo(c+V,f+F),e.arc(c,f,n,l,u,!h);if(!(i>ka)||!H)e.lineTo(c+$,f+B);else if(k>ka){var ie=vo(m,k),ve=vo(y,k),ce=Wx($,B,E,D,i,-ve,h),X=Wx(V,F,N,z,i,-ie,h);e.lineTo(c+ce.cx+ce.x0,f+ce.cy+ce.y0),k<P&&ie===ve?e.arc(c+ce.cx,f+ce.cy,k,Pn(ce.y0,ce.x0),Pn(X.y0,X.x0),!h):(ve>0&&e.arc(c+ce.cx,f+ce.cy,ve,Pn(ce.y0,ce.x0),Pn(ce.y1,ce.x1),!h),e.arc(c,f,i,Pn(ce.cy+ce.y1,ce.cx+ce.x1),Pn(X.cy+X.y1,X.cx+X.x1),h),ie>0&&e.arc(c+X.cx,f+X.cy,ie,Pn(X.y1,X.x1),Pn(X.y0,X.x0),!h))}else e.lineTo(c+$,f+B),e.arc(c,f,i,u,l,h)}e.closePath()}}}var f5e=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e}(),Sn=function(e){K(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new f5e},t.prototype.buildPath=function(r,n){c5e(r,n)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(nt);Sn.prototype.type="sector";var h5e=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),$v=function(e){K(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new h5e},t.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.PI*2;r.moveTo(i+n.r,a),r.arc(i,a,n.r,0,o,!1),r.moveTo(i+n.r0,a),r.arc(i,a,n.r0,0,o,!0)},t}(nt);$v.prototype.type="ring";function d5e(e,t,r,n){var i=[],a=[],o=[],s=[],l,u,c,f;if(n){c=[1/0,1/0],f=[-1/0,-1/0];for(var h=0,d=e.length;h<d;h++)ws(c,c,e[h]),Ss(f,f,e[h]);ws(c,c,n[0]),Ss(f,f,n[1])}for(var h=0,d=e.length;h<d;h++){var v=e[h];if(r)l=e[h?h-1:d-1],u=e[(h+1)%d];else if(h===0||h===d-1){i.push(Ro(e[h]));continue}else l=e[h-1],u=e[h+1];Dl(a,u,l),Zg(a,a,t);var m=nw(v,l),y=nw(v,u),x=m+y;x!==0&&(m/=x,y/=x),Zg(o,a,-m),Zg(s,a,y);var _=qL([],v,o),b=qL([],v,s);n&&(Ss(_,_,c),ws(_,_,f),Ss(b,b,c),ws(b,b,f)),i.push(_),i.push(b)}return r&&i.push(i.shift()),i}function rQ(e,t,r){var n=t.smooth,i=t.points;if(i&&i.length>=2){if(n){var a=d5e(i,n,r,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(r?o:o-1);s++){var l=a[s*2],u=a[s*2+1],c=i[(s+1)%o];e.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,f=i.length;s<f;s++)e.lineTo(i[s][0],i[s][1])}r&&e.closePath()}}var v5e=function(){function e(){this.points=null,this.smooth=0,this.smoothConstraint=null}return e}(),Tn=function(e){K(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new v5e},t.prototype.buildPath=function(r,n){rQ(r,n,!0)},t}(nt);Tn.prototype.type="polygon";var p5e=function(){function e(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return e}(),ln=function(e){K(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new p5e},t.prototype.buildPath=function(r,n){rQ(r,n,!1)},t}(nt);ln.prototype.type="polyline";var g5e={},m5e=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e}(),mr=function(e){K(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new m5e},t.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var l=FT(g5e,n,this.style);i=l.x1,a=l.y1,o=l.x2,s=l.y2}else i=n.x1,a=n.y1,o=n.x2,s=n.y2;var u=n.percent;u!==0&&(r.moveTo(i,a),u<1&&(o=i*(1-u)+o*u,s=a*(1-u)+s*u),r.lineTo(o,s))},t.prototype.pointAt=function(r){var n=this.shape;return[n.x1*(1-r)+n.x2*r,n.y1*(1-r)+n.y2*r]},t}(nt);mr.prototype.type="line";var ei=[],y5e=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return e}();function kV(e,t,r){var n=e.cpx2,i=e.cpy2;return n!=null||i!=null?[(r?EF:Wr)(e.x1,e.cpx1,e.cpx2,e.x2,t),(r?EF:Wr)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(r?nI:an)(e.x1,e.cpx1,e.x2,t),(r?nI:an)(e.y1,e.cpy1,e.y2,t)]}var Fv=function(e){K(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new y5e},t.prototype.buildPath=function(r,n){var i=n.x1,a=n.y1,o=n.x2,s=n.y2,l=n.cpx1,u=n.cpy1,c=n.cpx2,f=n.cpy2,h=n.percent;h!==0&&(r.moveTo(i,a),c==null||f==null?(h<1&&(py(i,l,o,h,ei),l=ei[1],o=ei[2],py(a,u,s,h,ei),u=ei[1],s=ei[2]),r.quadraticCurveTo(l,u,o,s)):(h<1&&(fu(i,l,c,o,h,ei),l=ei[1],c=ei[2],o=ei[3],fu(a,u,f,s,h,ei),u=ei[1],f=ei[2],s=ei[3]),r.bezierCurveTo(l,u,c,f,o,s)))},t.prototype.pointAt=function(r){return kV(this.shape,r,!1)},t.prototype.tangentAt=function(r){var n=kV(this.shape,r,!0);return Lf(n,n)},t}(nt);Fv.prototype.type="bezier-curve";var x5e=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),g0=function(e){K(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new x5e},t.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.max(n.r,0),s=n.startAngle,l=n.endAngle,u=n.clockwise,c=Math.cos(s),f=Math.sin(s);r.moveTo(c*o+i,f*o+a),r.arc(i,a,o,s,l,!u)},t}(nt);g0.prototype.type="arc";var m0=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="compound",r}return t.prototype._updatePathDirty=function(){for(var r=this.shape.paths,n=this.shapeChanged(),i=0;i<r.length;i++)n=n||r[i].shapeChanged();n&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var r=this.shape.paths||[],n=this.getGlobalScale(),i=0;i<r.length;i++)r[i].path||r[i].createPathProxy(),r[i].path.setScale(n[0],n[1],r[i].segmentIgnoreThreshold)},t.prototype.buildPath=function(r,n){for(var i=n.paths||[],a=0;a<i.length;a++)i[a].buildPath(r,i[a].shape,!0)},t.prototype.afterBrush=function(){for(var r=this.shape.paths||[],n=0;n<r.length;n++)r[n].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),nt.prototype.getBoundingRect.call(this)},t}(nt),nQ=function(){function e(t){this.colorStops=t||[]}return e.prototype.addColorStop=function(t,r){this.colorStops.push({offset:t,color:r})},e}(),If=function(e){K(t,e);function t(r,n,i,a,o,s){var l=e.call(this,o)||this;return l.x=r??0,l.y=n??0,l.x2=i??1,l.y2=a??0,l.type="linear",l.global=s||!1,l}return t}(nQ),VN=function(e){K(t,e);function t(r,n,i,a,o){var s=e.call(this,a)||this;return s.x=r??.5,s.y=n??.5,s.r=i??.5,s.type="radial",s.global=o||!1,s}return t}(nQ),I2=Math.min,_5e=Math.max,Hx=Math.abs,Ju=[0,0],Qu=[0,0],tn=GK(),Ux=tn.minTv,Zx=tn.maxTv,iQ=function(){function e(t,r){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new Ne;for(var n=0;n<2;n++)this._axes[n]=new Ne;t&&this.fromBoundingRect(t,r)}return e.prototype.fromBoundingRect=function(t,r){var n=this._corners,i=this._axes,a=t.x,o=t.y,s=a+t.width,l=o+t.height;if(n[0].set(a,o),n[1].set(s,o),n[2].set(s,l),n[3].set(a,l),r)for(var u=0;u<4;u++)n[u].transform(r);Ne.sub(i[0],n[1],n[0]),Ne.sub(i[1],n[3],n[0]),i[0].normalize(),i[1].normalize();for(var u=0;u<2;u++)this._origin[u]=i[u].dot(n[0])},e.prototype.intersect=function(t,r,n){var i=!0,a=!r;return r&&Ne.set(r,0,0),tn.reset(n,!a),!this._intersectCheckOneSide(this,t,a,1)&&(i=!1,a)||!this._intersectCheckOneSide(t,this,a,-1)&&(i=!1,a)||!a&&!tn.negativeSize&&Ne.copy(r,i?tn.useDir?tn.dirMinTv:Ux:Zx),i},e.prototype._intersectCheckOneSide=function(t,r,n,i){for(var a=!0,o=0;o<2;o++){var s=t._axes[o];if(t._getProjMinMaxOnAxis(o,t._corners,Ju),t._getProjMinMaxOnAxis(o,r._corners,Qu),tn.negativeSize||Ju[1]<Qu[0]||Ju[0]>Qu[1]){if(a=!1,tn.negativeSize||n)return a;var l=Hx(Qu[0]-Ju[1]),u=Hx(Ju[0]-Qu[1]);I2(l,u)>Zx.len()&&(l<u?Ne.scale(Zx,s,-l*i):Ne.scale(Zx,s,u*i))}else if(!n){var l=Hx(Qu[0]-Ju[1]),u=Hx(Ju[0]-Qu[1]);(tn.useDir||I2(l,u)<Ux.len())&&((l<u||!tn.bidirectional)&&(Ne.scale(Ux,s,l*i),tn.useDir&&tn.calcDirMTV()),(l>=u||!tn.bidirectional)&&(Ne.scale(Ux,s,-u*i),tn.useDir&&tn.calcDirMTV()))}}return a},e.prototype._getProjMinMaxOnAxis=function(t,r,n){for(var i=this._axes[t],a=this._origin,o=r[0].dot(i)+a[t],s=o,l=o,u=1;u<r.length;u++){var c=r[u].dot(i)+a[t];s=I2(c,s),l=_5e(c,l)}n[0]=s+tn.touchThreshold,n[1]=l-tn.touchThreshold,tn.negativeSize=n[1]<n[0]},e}(),b5e=[],aQ=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.notClear=!0,r.incremental=!0,r._displayables=[],r._temporaryDisplayables=[],r._cursor=0,r}return t.prototype.traverse=function(r,n){r.call(n,this)},t.prototype.useStyle=function(){this.style={}},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(r,n){n?this._temporaryDisplayables.push(r):this._displayables.push(r),this.markRedraw()},t.prototype.addDisplayables=function(r,n){n=n||!1;for(var i=0;i<r.length;i++)this.addDisplayable(r[i],n)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(r){for(var n=this._cursor;n<this._displayables.length;n++)r&&r(this._displayables[n]);for(var n=0;n<this._temporaryDisplayables.length;n++)r&&r(this._temporaryDisplayables[n])},t.prototype.update=function(){this.updateTransform();for(var r=this._cursor;r<this._displayables.length;r++){var n=this._displayables[r];n.parent=this,n.update(),n.parent=null}for(var r=0;r<this._temporaryDisplayables.length;r++){var n=this._temporaryDisplayables[r];n.parent=this,n.update(),n.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var r=new je(1/0,1/0,-1/0,-1/0),n=0;n<this._displayables.length;n++){var i=this._displayables[n],a=i.getBoundingRect().clone();i.needLocalTransform()&&a.applyTransform(i.getLocalTransform(b5e)),r.union(a)}this._rect=r}return this._rect},t.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(a.contain(i[0],i[1]))for(var o=0;o<this._displayables.length;o++){var s=this._displayables[o];if(s.contain(r,n))return!0}return!1},t}(ga),oQ=et();function Vv(e,t,r,n,i){var a;if(t&&t.ecModel){var o=t.ecModel.getUpdatePayload();a=o&&o.animation}var s=t&&t.isAnimationEnabled(),l=e==="update";if(s){var u=void 0,c=void 0,f=void 0;n?(u=Ae(n.duration,200),c=Ae(n.easing,"cubicOut"),f=0):(u=t.getShallow(l?"animationDurationUpdate":"animationDuration"),c=t.getShallow(l?"animationEasingUpdate":"animationEasing"),f=t.getShallow(l?"animationDelayUpdate":"animationDelay")),a&&(a.duration!=null&&(u=a.duration),a.easing!=null&&(c=a.easing),a.delay!=null&&(f=a.delay)),ke(f)&&(f=f(r,i)),ke(u)&&(u=u(r));var h={duration:u||0,delay:f,easing:c};return h}else return null}function GN(e,t,r,n,i,a,o){var s=!1,l;ke(i)?(o=a,a=i,i=null):Ee(i)&&(a=i.cb,o=i.during,s=i.isFrom,l=i.removeOpt,i=i.dataIndex);var u=e==="leave";u||t.stopAnimation("leave");var c=Vv(e,n,i,u?l||{}:null,n&&n.getAnimationDelayParams?n.getAnimationDelayParams(t,i):null);if(c&&c.duration>0){var f=c.duration,h=c.delay,d=c.easing,v={duration:f,delay:h||0,easing:d,done:a,force:!!a||!!o,setToFinal:!u,scope:e,during:o};s?t.animateFrom(r,v):t.animateTo(r,v)}else t.stopAnimation(),!s&&t.attr(r),o&&o(1),a&&a()}function ut(e,t,r,n,i,a){GN("update",e,t,r,n,i,a)}function jt(e,t,r,n,i,a){GN("enter",e,t,r,n,i,a)}function vd(e){if(!e.__zr)return!0;for(var t=0;t<e.animators.length;t++){var r=e.animators[t];if(r.scope==="leave")return!0}return!1}function hu(e,t,r,n,i,a){vd(e)||GN("leave",e,t,r,n,i,a)}function LV(e,t,r,n){e.removeTextContent(),e.removeTextGuideLine(),hu(e,{style:{opacity:0}},t,r,n)}function Os(e,t,r){function n(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse(function(i){i.isGroup||LV(i,t,r,n)}):LV(e,t,r,n)}function ma(e){oQ(e).oldStyle=e.style}function w5e(e){return oQ(e).oldStyle}var II={},Ge=["x","y"],Ar=["width","height"];function sQ(e){return nt.extend(e)}var S5e=n5e;function lQ(e,t){return S5e(e,t)}function ba(e,t){II[e]=t}function Sy(e){if(II.hasOwnProperty(e))return II[e]}function ev(e,t,r,n){var i=eQ(e,t);return r&&(n==="center"&&(r=uQ(r,i.getBoundingRect())),HN(i,r)),i}function WN(e,t,r){var n=new Jr({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(i){if(r==="center"){var a={width:i.width,height:i.height};n.setStyle(uQ(t,a))}}});return n}function uQ(e,t){var r=t.width/t.height,n=e.height*r,i;n<=e.width?i=e.height:(n=e.width,i=n/r);var a=e.x+e.width/2,o=e.y+e.height/2;return{x:a-n/2,y:o-i/2,width:n,height:i}}var Ti=i5e;function HN(e,t){if(e.applyTransform){var r=e.getBoundingRect(),n=r.calculateTransform(t);e.applyTransform(n)}}function tv(e,t){return FT(e,e,{lineWidth:t}),e}function T5e(e,t){return BJ(e,e,t),e}var fb=ki;function tu(e,t){for(var r=f0([]);e&&e!==t;)Wa(r,e.getLocalTransform(),r),e=e.parent;return r}function Ua(e,t,r){return t&&!bn(t)&&(t=Ts.getLocalTransform(t)),r&&(t=pa([],t)),lr([],e,t)}function WT(e,t,r){var n=t[4]===0||t[5]===0||t[0]===0?1:Mo(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:Mo(2*t[4]/t[2]),a=[e==="left"?-n:e==="right"?n:0,e==="top"?-i:e==="bottom"?i:0];return a=Ua(a,t,r),Mo(a[0])>Mo(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function IV(e){return!e.isGroup}function C5e(e){return e.shape!=null}function y0(e,t,r){if(!e||!t)return;function n(o){var s={};return o.traverse(function(l){IV(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return C5e(o)&&(s.shape=Le(o.shape)),s}var a=n(e);t.traverse(function(o){if(IV(o)&&o.anid){var s=a[o.anid];if(s){var l=i(o);o.attr(i(s)),ut(o,l,r,ze(o).dataIndex)}}})}function UN(e,t){return le(e,function(r){var n=r[0];n=pr(n,t.x),n=Ii(n,t.x+t.width);var i=r[1];return i=pr(i,t.y),i=Ii(i,t.y+t.height),[n,i]})}function cQ(e,t){var r=pr(e.x,t.x),n=Ii(e.x+e.width,t.x+t.width),i=pr(e.y,t.y),a=Ii(e.y+e.height,t.y+t.height);if(n>=r&&a>=i)return{x:r,y:i,width:n-r,height:a-i}}function Gv(e,t,r){var n=ae({rectHover:!0},t),i=n.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},e)return e.indexOf("image://")===0?(i.image=e.slice(8),Oe(i,r),new Jr(n)):ev(e.replace("path://",""),n,r,"center")}function wg(e,t,r,n,i){for(var a=0,o=i[i.length-1];a<i.length;a++){var s=i[a];if(fQ(e,t,r,n,s[0],s[1],o[0],o[1]))return!0;o=s}}function fQ(e,t,r,n,i,a,o,s){var l=r-e,u=n-t,c=o-i,f=s-a,h=O2(c,f,l,u);if(A5e(h))return!1;var d=e-i,v=t-a,m=O2(d,v,l,u)/h;if(m<0||m>1)return!1;var y=O2(d,v,c,f)/h;return!(y<0||y>1)}function O2(e,t,r,n){return e*n-r*t}function A5e(e){return e<=1e-6&&e>=-1e-6}function pf(e,t,r,n,i){return t==null||(st(t)?Ut[0]=Ut[1]=Ut[2]=Ut[3]=t:(Ut[0]=t[0],Ut[1]=t[1],Ut[2]=t[2],Ut[3]=t[3]),n&&(Ut[0]=pr(0,Ut[0]),Ut[1]=pr(0,Ut[1]),Ut[2]=pr(0,Ut[2]),Ut[3]=pr(0,Ut[3])),r&&(Ut[0]=-Ut[0],Ut[1]=-Ut[1],Ut[2]=-Ut[2],Ut[3]=-Ut[3]),OV(e,Ut,"x","width",3,1,i&&i[0]||0),OV(e,Ut,"y","height",0,2,i&&i[1]||0)),e}var Ut=[0,0,0,0];function OV(e,t,r,n,i,a,o){var s=t[a]+t[i],l=e[n];e[n]+=s,o=pr(0,Ii(o,l)),e[n]<o?(e[n]=o,e[r]+=t[i]>=0?-t[i]:t[a]>=0?l+t[a]:Mo(s)>1e-8?(l-o)*t[i]/s:0):e[r]-=t[i]}function il(e){var t=e.itemTooltipOption,r=e.componentModel,n=e.itemName,i=ye(t)?{formatter:t}:t,a=r.mainType,o=r.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var l=e.formatterParamsExtra;l&&R(at(l),function(c){Se(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=ze(e.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:n,option:Oe({content:n,encodeHTMLContent:!0,formatterParams:s},i)}}function OI(e,t){var r;e.isGroup&&(r=t(e)),r||e.traverse(t)}function Pu(e,t){if(e)if(oe(e))for(var r=0;r<e.length;r++)OI(e[r],t);else OI(e,t)}function ZN(e){return!e||Mo(e[1])<Yx&&Mo(e[2])<Yx||Mo(e[0])<Yx&&Mo(e[3])<Yx}var Yx=1e-5;function Ty(e,t){return e?je.copy(e,t):t.clone()}function YN(e,t){return t?h0(e||Yr(),t):void 0}function gf(e){return{z:e.get("z")||0,zlevel:e.get("zlevel")||0}}function hQ(e){var t=-1/0,r=1/0;OI(e,function(a){n(a),n(a.getTextContent()),n(a.getTextGuideLine())});function n(a){if(!(!a||a.isGroup)){var o=a.currentStates;if(o.length)for(var s=0;s<o.length;s++)i(a.states[o[s]]);i(a)}}function i(a){if(a){var o=a.z2;o>t&&(t=o),o<r&&(r=o)}}return r>t&&(r=t=0),{min:r,max:t}}function HT(e,t,r){dQ(e,t,r,-1/0)}function dQ(e,t,r,n){if(e.ignoreModelZ)return n;var i=e.getTextContent(),a=e.getTextGuideLine(),o=e.isGroup;if(o)for(var s=e.childrenRef(),l=0;l<s.length;l++)n=pr(dQ(s[l],t,r,n),n);else e.z=t,e.zlevel=r,n=pr(e.z2||0,n);if(i&&(i.z=t,i.zlevel=r,isFinite(n)&&(i.z2=n+2)),a){var u=e.textGuideLineConfig;a.z=t,a.zlevel=r,isFinite(n)&&(a.z2=n+(u&&u.showAbove?1:-1))}return n}ba("circle",Qo);ba("ellipse",p0);ba("sector",Sn);ba("ring",$v);ba("polygon",Tn);ba("polyline",ln);ba("rect",qe);ba("line",mr);ba("bezierCurve",Fv);ba("arc",g0);const Of=Object.freeze(Object.defineProperty({__proto__:null,Arc:g0,BezierCurve:Fv,BoundingRect:je,Circle:Qo,CompoundPath:m0,Ellipse:p0,Group:Ie,Image:Jr,IncrementalDisplayable:aQ,Line:mr,LinearGradient:If,OrientedBoundingRect:iQ,Path:nt,Point:Ne,Polygon:Tn,Polyline:ln,RadialGradient:VN,Rect:qe,Ring:$v,Sector:Sn,Text:ot,WH:Ar,XY:Ge,applyTransform:Ua,calcZ2Range:hQ,clipPointsByRect:UN,clipRectByRect:cQ,createIcon:Gv,ensureCopyRect:Ty,ensureCopyTransform:YN,expandOrShrinkRect:pf,extendPath:lQ,extendShape:sQ,getShapeClass:Sy,getTransform:tu,groupTransition:y0,initProps:jt,isBoundingRectAxisAligned:ZN,isElementRemoved:vd,lineLineIntersect:fQ,linePolygonIntersect:wg,makeImage:WN,makePath:ev,mergePath:Ti,registerShape:ba,removeElement:hu,removeElementWithFadeOut:Os,resizePath:HN,retrieveZInfo:gf,setTooltipConfig:il,subPixelOptimize:fb,subPixelOptimizeLine:tv,subPixelOptimizeRect:T5e,transformDirection:WT,traverseElements:Pu,traverseUpdateZ:HT,updateProps:ut},Symbol.toStringTag,{value:"Module"}));var UT={};function vQ(e,t){for(var r=0;r<qn.length;r++){var n=qn[r],i=t[n],a=e.ensureState(n);a.style=a.style||{},a.style.text=i}var o=e.currentStates.slice();e.clearStates(!0),e.setStyle({text:t.normal}),e.useStates(o,!0)}function EI(e,t,r){var n=e.labelFetcher,i=e.labelDataIndex,a=e.labelDimIndex,o=t.normal,s;n&&(s=n.getFormattedLabel(i,"normal",null,a,o&&o.get("formatter"),r!=null?{interpolatedValue:r}:null)),s==null&&(s=ke(e.defaultText)?e.defaultText(i,e,r):e.defaultText);for(var l={normal:s},u=0;u<qn.length;u++){var c=qn[u],f=t[c];l[c]=Ae(n?n.getFormattedLabel(i,c,null,a,f&&f.get("formatter")):null,s)}return l}function qr(e,t,r,n){r=r||UT;for(var i=e instanceof ot,a=!1,o=0;o<by.length;o++){var s=t[by[o]];if(s&&s.getShallow("show")){a=!0;break}}var l=i?e:e.getTextContent();if(a){i||(l||(l=new ot,e.setTextContent(l)),e.stateProxy&&(l.stateProxy=e.stateProxy));var u=EI(r,t),c=t.normal,f=!!c.getShallow("show"),h=kt(c,n&&n.normal,r,!1,!i);h.text=u.normal,i||e.setTextConfig(xw(c,r,!1));for(var o=0;o<qn.length;o++){var d=qn[o],s=t[d];if(s){var v=l.ensureState(d),m=!!Ae(s.getShallow("show"),f);if(m!==f&&(v.ignore=!m),v.style=kt(s,n&&n[d],r,!0,!i),v.style.text=u[d],!i){var y=e.ensureState(d);y.textConfig=xw(s,r,!0)}}}l.silent=!!c.getShallow("silent"),l.style.x!=null&&(h.x=l.style.x),l.style.y!=null&&(h.y=l.style.y),l.ignore=!f,l.useStyle(h),l.dirty(),r.enableTextSetter&&(Wv(l).setLabelText=function(x){var _=EI(r,t,x);vQ(l,_)})}else l&&(l.ignore=!0);e.dirty()}function Br(e,t){t=t||"label";for(var r={normal:e.getModel(t)},n=0;n<qn.length;n++){var i=qn[n];r[i]=e.getModel([i,t])}return r}function kt(e,t,r,n,i){var a={};return M5e(a,e,r,n,i),t&&ae(a,t),a}function xw(e,t,r){t=t||{};var n={},i,a=e.getShallow("rotate"),o=Ae(e.getShallow("distance"),r?null:5),s=e.getShallow("offset");return i=e.getShallow("position")||(r?null:"inside"),i==="outside"&&(i=t.defaultOutsidePosition||"top"),i!=null&&(n.position=i),s!=null&&(n.offset=s),a!=null&&(a*=Math.PI/180,n.rotation=a),o!=null&&(n.distance=o),n.outsideFill=e.get("color")==="inherit"?t.inheritColor||null:"auto",t.autoOverflowArea!=null&&(n.autoOverflowArea=t.autoOverflowArea),t.layoutRect!=null&&(n.layoutRect=t.layoutRect),n}function M5e(e,t,r,n,i){r=r||UT;var a=t.ecModel,o=a&&a.option.textStyle,s=P5e(t),l;if(s){l={};var u="richInheritPlainLabel",c=Ae(t.get(u),a?a.get(u):void 0);for(var f in s)if(s.hasOwnProperty(f)){var h=t.getModel(["rich",f]);jV(l[f]={},h,o,t,c,r,n,i,!1,!0)}}l&&(e.rich=l);var d=t.get("overflow");d&&(e.overflow=d);var v=t.get("lineOverflow");v&&(e.lineOverflow=v);var m=e,y=t.get("minMargin");if(y!=null)y=st(y)?y/2:0,m.margin=[y,y,y,y],m.__marginType=Xh.minMargin;else{var x=t.get("textMargin");x!=null&&(m.margin=u0(x),m.__marginType=Xh.textMargin)}jV(e,t,o,null,null,r,n,i,!0,!1)}function P5e(e){for(var t;e&&e!==e.ecModel;){var r=(e.option||UT).rich;if(r){t=t||{};for(var n=at(r),i=0;i<n.length;i++){var a=n[i];t[a]=1}}e=e.parentModel}return t}var EV=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],DV=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],NV=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function jV(e,t,r,n,i,a,o,s,l,u){r=!o&&r||UT;var c=a&&a.inheritColor,f=t.getShallow("color"),h=t.getShallow("textBorderColor"),d=Ae(t.getShallow("opacity"),r.opacity);(f==="inherit"||f==="auto")&&(c?f=c:f=null),(h==="inherit"||h==="auto")&&(c?h=c:h=null),s||(f=f||r.color,h=h||r.textBorderColor),f!=null&&(e.fill=f),h!=null&&(e.stroke=h);var v=Ae(t.getShallow("textBorderWidth"),r.textBorderWidth);v!=null&&(e.lineWidth=v);var m=Ae(t.getShallow("textBorderType"),r.textBorderType);m!=null&&(e.lineDash=m);var y=Ae(t.getShallow("textBorderDashOffset"),r.textBorderDashOffset);y!=null&&(e.lineDashOffset=y),!o&&d==null&&!u&&(d=a&&a.defaultOpacity),d!=null&&(e.opacity=d),!o&&!s&&e.fill==null&&a.inheritColor&&(e.fill=a.inheritColor);for(var x=0;x<EV.length;x++){var _=EV[x],b=i!==!1&&n?ci(t.getShallow(_),n.getShallow(_),r[_]):Ae(t.getShallow(_),r[_]);b!=null&&(e[_]=b)}for(var x=0;x<DV.length;x++){var _=DV[x],b=t.getShallow(_);b!=null&&(e[_]=b)}if(e.verticalAlign==null){var S=t.getShallow("baseline");S!=null&&(e.verticalAlign=S)}if(!l||!a.disableBox){for(var x=0;x<NV.length;x++){var _=NV[x],b=t.getShallow(_);b!=null&&(e[_]=b)}var T=t.getShallow("borderType");T!=null&&(e.borderDash=T),(e.backgroundColor==="auto"||e.backgroundColor==="inherit")&&c&&(e.backgroundColor=c),(e.borderColor==="auto"||e.borderColor==="inherit")&&c&&(e.borderColor=c)}}function XN(e,t){var r=t&&t.getModel("textStyle");return Ai([e.fontStyle||r&&r.getShallow("fontStyle")||"",e.fontWeight||r&&r.getShallow("fontWeight")||"",(e.fontSize||r&&r.getShallow("fontSize")||12)+"px",e.fontFamily||r&&r.getShallow("fontFamily")||"sans-serif"].join(" "))}var Wv=et();function pQ(e,t,r,n){if(e){var i=Wv(e);i.prevValue=i.value,i.value=r;var a=t.normal;i.valueAnimation=a.get("valueAnimation"),i.valueAnimation&&(i.precision=a.get("precision"),i.defaultInterpolatedText=n,i.statesModels=t)}}function gQ(e,t,r,n,i){var a=Wv(e);if(!a.valueAnimation||a.prevValue===a.value)return;var o=a.defaultInterpolatedText,s=Ae(a.interpolatedValue,a.prevValue),l=a.value;function u(c){var f=PJ(r,a.precision,s,l,c);a.interpolatedValue=c===1?null:f;var h=EI({labelDataIndex:t,labelFetcher:i,defaultText:o?o(f):f+""},a.statesModels,f);vQ(e,h)}e.percent=0,(a.prevValue==null?jt:ut)(e,{percent:1},n,t,null,u)}var Xh={minMargin:1,textMargin:2},k5e=["textStyle","color"],E2=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],D2=new ot,L5e=function(){function e(){}return e.prototype.getTextColor=function(t){var r=this.ecModel;return this.getShallow("color")||(!t&&r?r.get(k5e):null)},e.prototype.getFont=function(){return XN({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},e.prototype.getTextRect=function(t){for(var r={text:t,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<E2.length;n++)r[E2[n]]=this.getShallow(E2[n]);return D2.useStyle(r),D2.update(),D2.getBoundingRect()},e}(),mQ=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],I5e=df(mQ),O5e=function(){function e(){}return e.prototype.getLineStyle=function(t){return I5e(this,t)},e}(),yQ=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],E5e=df(yQ),D5e=function(){function e(){}return e.prototype.getItemStyle=function(t,r){return E5e(this,t,r)},e}(),rt=function(){function e(t,r,n){this.parentModel=r,this.ecModel=n,this.option=t}return e.prototype.init=function(t,r,n){},e.prototype.mergeOption=function(t,r){Ue(this.option,t,!0)},e.prototype.get=function(t,r){return t==null?this.option:this._doGet(this.parsePath(t),!r&&this.parentModel)},e.prototype.getShallow=function(t,r){var n=this.option,i=n==null?n:n[t];if(i==null&&!r){var a=this.parentModel;a&&(i=a.getShallow(t))}return i},e.prototype.getModel=function(t,r){var n=t!=null,i=n?this.parsePath(t):null,a=n?this._doGet(i):this.option;return r=r||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),new e(a,r,this.ecModel)},e.prototype.isEmpty=function(){return this.option==null},e.prototype.restoreData=function(){},e.prototype.clone=function(){var t=this.constructor;return new t(Le(this.option))},e.prototype.parsePath=function(t){return typeof t=="string"?t.split("."):t},e.prototype.resolveParentPath=function(t){return t},e.prototype.isAnimationEnabled=function(){if(!it.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},e.prototype._doGet=function(t,r){var n=this.option;if(!t)return n;for(var i=0;i<t.length&&!(t[i]&&(n=n&&typeof n=="object"?n[t[i]]:null,n==null));i++);return n==null&&r&&(n=r._doGet(this.resolveParentPath(t),r.parentModel)),n},e}();ON(rt);HRe(rt);cr(rt,O5e);cr(rt,D5e);cr(rt,qRe);cr(rt,L5e);var N5e=Math.round(Math.random()*10);function Hv(e){return[e||"",N5e++].join("_")}function j5e(e){var t={};e.registerSubTypeDefaulter=function(r,n){var i=Po(r);t[i.main]=n},e.determineSubType=function(r,n){var i=n.type;if(!i){var a=Po(r).main;e.hasSubTypes(r)&&t[a]&&(i=t[a](n))}return i}}function R5e(e,t){e.topologicalTravel=function(a,o,s,l){if(!a.length)return;var u=r(o),c=u.graph,f=u.noEntryList,h={};for(R(a,function(_){h[_]=!0});f.length;){var d=f.pop(),v=c[d],m=!!h[d];m&&(s.call(l,d,v.originalDeps.slice()),delete h[d]),R(v.successor,m?x:y)}R(h,function(){var _="";throw new Error(_)});function y(_){c[_].entryCount--,c[_].entryCount===0&&f.push(_)}function x(_){h[_]=!0,y(_)}};function r(a){var o={},s=[];return R(a,function(l){var u=n(o,l),c=u.originalDeps=t(l),f=i(c,a);u.entryCount=f.length,u.entryCount===0&&s.push(l),R(f,function(h){He(u.predecessor,h)<0&&u.predecessor.push(h);var d=n(o,h);He(d.successor,h)<0&&d.successor.push(l)})}),{graph:o,noEntryList:s}}function n(a,o){return a[o]||(a[o]={predecessor:[],successor:[]}),a[o]}function i(a,o){var s=[];return R(a,function(l){He(o,l)>=0&&s.push(l)}),s}}function ku(e,t){return Ue(Ue({},e,!0),t,!0)}const B5e={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},z5e={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType}",withoutName:"第{seriesId}个系列是一个{seriesType}",separator:{middle:"",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:"",end:""}}}};var _w="ZH",qN="EN",pd=qN,hb={},KN={},xQ=it.domSupported?function(){var e=(document.documentElement.lang||navigator.language||navigator.browserLanguage||pd).toUpperCase();return e.indexOf(_w)>-1?_w:pd}():pd;function JN(e,t){e=e.toUpperCase(),KN[e]=new rt(t),hb[e]=t}function $5e(e){if(ye(e)){var t=hb[e.toUpperCase()]||{};return e===_w||e===qN?Le(t):Ue(Le(t),Le(hb[pd]),!1)}else return Ue(Le(e),Le(hb[pd]),!1)}function DI(e){return KN[e]}function F5e(){return KN[pd]}JN(qN,B5e);JN(_w,z5e);var NI=null;function V5e(e){NI||(NI=e)}function Cr(){return NI}var QN=1e3,ej=QN*60,tm=ej*60,ra=tm*24,RV=ra*365,G5e={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},db={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},W5e="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",Xx="{yyyy}-{MM}-{dd}",BV={year:"{yyyy}",month:"{yyyy}-{MM}",day:Xx,hour:Xx+" "+db.hour,minute:Xx+" "+db.minute,second:Xx+" "+db.second,millisecond:W5e},_i=["year","month","day","hour","minute","second","millisecond"],H5e=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function U5e(e){return!ye(e)&&!ke(e)?Z5e(e):e}function Z5e(e){e=e||{};var t={},r=!0;return R(_i,function(n){r&&(r=e[n]==null)}),R(_i,function(n,i){var a=e[n];t[n]={};for(var o=null,s=i;s>=0;s--){var l=_i[s],u=Ee(a)&&!oe(a)?a[l]:a,c=void 0;oe(u)?(c=u.slice(),o=c[0]||""):ye(u)?(o=u,c=[o]):(o==null?o=db[n]:G5e[l].test(o)||(o=t[l][l][0]+" "+o),c=[o],r&&(c[1]="{primary|"+o+"}")),t[n][l]=c}}),t}function Gn(e,t){return e+="","0000".substr(0,t-e.length)+e}function rm(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function Y5e(e){return e===rm(e)}function X5e(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function x0(e,t,r,n){var i=Jo(e),a=i[_Q(r)](),o=i[tj(r)]()+1,s=Math.floor((o-1)/3)+1,l=i[rj(r)](),u=i["get"+(r?"UTC":"")+"Day"](),c=i[nj(r)](),f=(c-1)%12+1,h=i[ij(r)](),d=i[aj(r)](),v=i[oj(r)](),m=c>=12?"pm":"am",y=m.toUpperCase(),x=n instanceof rt?n:DI(n||xQ)||F5e(),_=x.getModel("time"),b=_.get("month"),S=_.get("monthAbbr"),T=_.get("dayOfWeek"),C=_.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,m+"").replace(/{A}/g,y+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,Gn(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,b[o-1]).replace(/{MMM}/g,S[o-1]).replace(/{MM}/g,Gn(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Gn(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,T[u]).replace(/{ee}/g,C[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Gn(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Gn(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,Gn(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,Gn(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,Gn(v,3)).replace(/{S}/g,v+"")}function q5e(e,t,r,n,i){var a=null;if(ye(r))a=r;else if(ke(r)){var o={time:e.time,level:e.time.level},s=Cr();s&&s.makeAxisLabelFormatterParamBreak(o,e.break),a=r(e.value,t,o)}else{var l=e.time;if(l){var u=r[l.lowerTimeUnit][l.upperTimeUnit];a=u[Math.min(l.level,u.length-1)]||""}else{var c=qh(e.value,i);a=r[c][c][0]}}return x0(new Date(e.value),a,i,n)}function qh(e,t){var r=Jo(e),n=r[tj(t)]()+1,i=r[rj(t)](),a=r[nj(t)](),o=r[ij(t)](),s=r[aj(t)](),l=r[oj(t)](),u=l===0,c=u&&s===0,f=c&&o===0,h=f&&a===0,d=h&&i===1,v=d&&n===1;return v?"year":d?"month":h?"day":f?"hour":c?"minute":u?"second":"millisecond"}function bw(e,t,r){switch(t){case"year":e[bQ(r)](0);case"month":e[wQ(r)](1);case"day":e[SQ(r)](0);case"hour":e[TQ(r)](0);case"minute":e[CQ(r)](0);case"second":e[AQ(r)](0)}return e}function _Q(e){return e?"getUTCFullYear":"getFullYear"}function tj(e){return e?"getUTCMonth":"getMonth"}function rj(e){return e?"getUTCDate":"getDate"}function nj(e){return e?"getUTCHours":"getHours"}function ij(e){return e?"getUTCMinutes":"getMinutes"}function aj(e){return e?"getUTCSeconds":"getSeconds"}function oj(e){return e?"getUTCMilliseconds":"getMilliseconds"}function K5e(e){return e?"setUTCFullYear":"setFullYear"}function bQ(e){return e?"setUTCMonth":"setMonth"}function wQ(e){return e?"setUTCDate":"setDate"}function SQ(e){return e?"setUTCHours":"setHours"}function TQ(e){return e?"setUTCMinutes":"setMinutes"}function CQ(e){return e?"setUTCSeconds":"setSeconds"}function AQ(e){return e?"setUTCMilliseconds":"setMilliseconds"}function J5e(e,t,r,n,i,a,o,s){var l=new ot({style:{text:e,font:t,align:r,verticalAlign:n,padding:i,rich:a,overflow:o?"truncate":null,lineHeight:s}});return l.getBoundingRect()}function sj(e){if(!kN(e))return ye(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function lj(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,function(r,n){return n.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var Uv=u0;function jI(e,t,r){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(c){return c&&Ai(c)?c:"-"}function a(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=t==="time",s=e instanceof Date;if(o||s){var l=o?Jo(e):e;if(isNaN(+l)){if(s)return"-"}else return x0(l,n,r)}if(t==="ordinal")return tw(e)?i(e):st(e)&&a(e)?e+"":"-";var u=Ho(e);return a(u)?sj(u):tw(e)?i(e):typeof e=="boolean"?e+"":"-"}var zV=["a","b","c","d","e","f","g"],N2=function(e,t){return"{"+e+(t??"")+"}"};function uj(e,t,r){oe(t)||(t=[t]);var n=t.length;if(!n)return"";for(var i=t[0].$vars||[],a=0;a<i.length;a++){var o=zV[a];e=e.replace(N2(o),N2(o,0))}for(var s=0;s<n;s++)for(var l=0;l<i.length;l++){var u=t[s][i[l]];e=e.replace(N2(zV[l],s),r?Nn(u):u)}return e}function Q5e(e,t,r){return R(t,function(n,i){e=e.replace("{"+i+"}",n)}),e}function MQ(e,t){var r=ye(e)?{color:e,extraCssText:t}:e||{},n=r.color,i=r.type;t=r.extraCssText;var a=r.renderMode||"html";if(!n)return"";if(a==="html")return i==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Nn(n)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+Nn(n)+";"+(t||"")+'"></span>';var o=r.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:i==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function eBe(e,t,r){(e==="week"||e==="month"||e==="quarter"||e==="half-year"||e==="year")&&(e=`MM-dd
yyyy`);var n=Jo(t),i=r?"getUTC":"get",a=n[i+"FullYear"](),o=n[i+"Month"]()+1,s=n[i+"Date"](),l=n[i+"Hours"](),u=n[i+"Minutes"](),c=n[i+"Seconds"](),f=n[i+"Milliseconds"]();return e=e.replace("MM",Gn(o,2)).replace("M",o).replace("yyyy",a).replace("yy",Gn(a%100+"",2)).replace("dd",Gn(s,2)).replace("d",s).replace("hh",Gn(l,2)).replace("h",l).replace("mm",Gn(u,2)).replace("m",u).replace("ss",Gn(c,2)).replace("s",c).replace("SSS",Gn(f,3)),e}function tBe(e){return e&&e.charAt(0).toUpperCase()+e.substr(1)}function mf(e,t){return t=t||"transparent",ye(e)?e:Ee(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function ww(e,t){if(t==="_blank"||t==="blank"){var r=window.open();r.opener=null,r.location.href=e}else window.open(e,t)}var vb={},j2={},Zv=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(t,r){this._nonSeriesBoxMasterList=n(vb),this._normalMasterList=n(j2);function n(i,a){var o=[];return R(i,function(s,l){var u=s.create(t,r);o=o.concat(u||[])}),o}},e.prototype.update=function(t,r){R(this._normalMasterList,function(n){n.update&&n.update(t,r)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(t,r){if(t==="matrix"||t==="calendar"){vb[t]=r;return}j2[t]=r},e.get=function(t){return j2[t]||vb[t]},e}();function rBe(e){return!!vb[e]}var RI={coord:1,coord2:2};function nBe(e){PQ.set(e.fullType,{getCoord2:void 0}).getCoord2=e.getCoord2}var PQ=Ce();function iBe(e){var t=e.getShallow("coord",!0),r=RI.coord;if(t==null){var n=PQ.get(e.type);n&&n.getCoord2&&(r=RI.coord2,t=n.getCoord2(e))}return{coord:t,from:r}}var So={none:0,dataCoordSys:1,boxCoordSys:2};function kQ(e,t){var r=e.getShallow("coordinateSystem"),n=e.getShallow("coordinateSystemUsage",!0),i=So.none;if(r){var a=e.mainType==="series";n==null&&(n=a?"data":"box"),n==="data"?(i=So.dataCoordSys,a||(i=So.none)):n==="box"&&(i=So.boxCoordSys,!a&&!rBe(r)&&(i=So.none))}return{coordSysType:r,kind:i}}function _0(e){var t=e.targetModel,r=e.coordSysType,n=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=kQ(t),o=a.kind,s=a.coordSysType;if(i&&o!==So.dataCoordSys&&(o=So.dataCoordSys,s=r),o===So.none||s!==r)return!1;var l=n(r,t);return l?(o===So.dataCoordSys?t.coordinateSystem=l:t.boxCoordinateSystem=l,!0):!1}var LQ=function(e,t){var r=t.getReferringComponents(e,tr).models[0];return r&&r.coordinateSystem},pb=R,IQ=["left","right","top","bottom","width","height"],jc=[["width","left","right"],["height","top","bottom"]];function cj(e,t,r,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=1/0);var s=0;t.eachChild(function(l,u){var c=l.getBoundingRect(),f=t.childAt(u+1),h=f&&f.getBoundingRect(),d,v;if(e==="horizontal"){var m=c.width+(h?-h.x+c.x:0);d=a+m,d>n||l.newline?(a=0,d=m,o+=s+r,s=c.height):s=Math.max(s,c.height)}else{var y=c.height+(h?-h.y+c.y:0);v=o+y,v>i||l.newline?(a+=s+r,o=0,v=y,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),e==="horizontal"?a=d+r:o=v+r)})}var Yc=cj;We(cj,"vertical");We(cj,"horizontal");function OQ(e,t){return{left:e.getShallow("left",t),top:e.getShallow("top",t),right:e.getShallow("right",t),bottom:e.getShallow("bottom",t),width:e.getShallow("width",t),height:e.getShallow("height",t)}}function aBe(e,t){var r=zr(e,t,{enableLayoutOnlyByCenter:!0}),n=e.getBoxLayoutParams(),i,a;if(r.type===Sg.point)a=r.refPoint,i=$t(n,{width:t.getWidth(),height:t.getHeight()});else{var o=e.get("center"),s=oe(o)?o:[o,o];i=$t(n,r.refContainer),a=r.boxCoordFrom===RI.coord2?r.refPoint:[me(s[0],i.width)+i.x,me(s[1],i.height)+i.y]}return{viewRect:i,center:a}}function EQ(e,t){var r=aBe(e,t),n=r.viewRect,i=r.center,a=e.get("radius");oe(a)||(a=[0,a]);var o=me(n.width,t.getWidth()),s=me(n.height,t.getHeight()),l=Math.min(o,s),u=me(a[0],l/2),c=me(a[1],l/2);return{cx:i[0],cy:i[1],r0:u,r:c,viewRect:n}}function $t(e,t,r){r=Uv(r||0);var n=t.width,i=t.height,a=me(e.left,n),o=me(e.top,i),s=me(e.right,n),l=me(e.bottom,i),u=me(e.width,n),c=me(e.height,i),f=r[2]+r[0],h=r[1]+r[3],d=e.aspect;switch(isNaN(u)&&(u=n-s-h-a),isNaN(c)&&(c=i-l-f-o),d!=null&&(isNaN(u)&&isNaN(c)&&(d>n/i?u=n*.8:c=i*.8),isNaN(u)&&(u=d*c),isNaN(c)&&(c=u/d)),isNaN(a)&&(a=n-s-u-h),isNaN(o)&&(o=i-l-c-f),e.left||e.right){case"center":a=n/2-u/2-r[3];break;case"right":a=n-u-h;break}switch(e.top||e.bottom){case"middle":case"center":o=i/2-c/2-r[0];break;case"bottom":o=i-c-f;break}a=a||0,o=o||0,isNaN(u)&&(u=n-h-a-(s||0)),isNaN(c)&&(c=i-f-o-(l||0));var v=new je((t.x||0)+a+r[3],(t.y||0)+o+r[0],u,c);return v.margin=r,v}function DQ(e,t,r){var n=e.getShallow("preserveAspect",!0);if(!n)return t;var i=t.width/t.height;if(Math.abs(Math.atan(r)-Math.atan(i))<1e-9)return t;var a=e.getShallow("preserveAspectAlign",!0),o=e.getShallow("preserveAspectVerticalAlign",!0),s={width:t.width,height:t.height},l=n==="cover";return i>r&&!l||i<r&&l?(s.width=t.height*r,a==="left"?s.left=0:a==="right"?s.right=0:s.left="center"):(s.height=t.width/r,o==="top"?s.top=0:o==="bottom"?s.bottom=0:s.top="middle"),$t(s,t)}var Sg={rect:1,point:2};function zr(e,t,r){var n,i,a,o=e.boxCoordinateSystem,s;if(o){var l=iBe(e),u=l.coord,c=l.from;if(o.dataToLayout){a=Sg.rect,s=c;var f=o.dataToLayout(u);n=f.contentRect||f.rect}else r&&r.enableLayoutOnlyByCenter&&o.dataToPoint&&(a=Sg.point,s=c,i=o.dataToPoint(u))}return a==null&&(a=Sg.rect),a===Sg.rect&&(n||(n={x:0,y:0,width:t.getWidth(),height:t.getHeight()}),i=[n.x+n.width/2,n.y+n.height/2]),{type:a,refContainer:n,refPoint:i,boxCoordFrom:s}}function ZT(e,t,r,n,i,a){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],l=i&&i.boundingMode||"all";if(a=a||e,a.x=e.x,a.y=e.y,!o&&!s)return!1;var u;if(l==="raw")u=e.type==="group"?new je(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(u=e.getBoundingRect(),e.needLocalTransform()){var c=e.getLocalTransform();u=u.clone(),u.applyTransform(c)}var f=$t(Oe({width:u.width,height:u.height},t),r,n),h=o?f.x-u.x:0,d=s?f.y-u.y:0;return l==="raw"?(a.x=h,a.y=d):(a.x+=h,a.y+=d),a===e&&e.markRedraw(),!0}function oBe(e,t){return e[jc[t][0]]!=null||e[jc[t][1]]!=null&&e[jc[t][2]]!=null}function Cy(e){var t=e.layoutMode||e.constructor.layoutMode;return Ee(t)?t:t?{type:t}:null}function Zo(e,t,r){var n=r&&r.ignoreSize;!oe(n)&&(n=[n,n]);var i=o(jc[0],0),a=o(jc[1],1);l(jc[0],e,i),l(jc[1],e,a);function o(u,c){var f={},h=0,d={},v=0,m=2;if(pb(u,function(_){d[_]=e[_]}),pb(u,function(_){Se(t,_)&&(f[_]=d[_]=t[_]),s(f,_)&&h++,s(d,_)&&v++}),n[c])return s(t,u[1])?d[u[2]]=null:s(t,u[2])&&(d[u[1]]=null),d;if(v===m||!h)return d;if(h>=m)return f;for(var y=0;y<u.length;y++){var x=u[y];if(!Se(f,x)&&Se(e,x)){f[x]=e[x];break}}return f}function s(u,c){return u[c]!=null&&u[c]!=="auto"}function l(u,c,f){pb(u,function(h){c[h]=f[h]})}}function Ef(e){return NQ({},e)}function NQ(e,t){return t&&e&&pb(IQ,function(r){Se(t,r)&&(e[r]=t[r])}),e}var sBe=et(),Qe=function(e){K(t,e);function t(r,n,i){var a=e.call(this,r,n,i)||this;return a.uid=Hv("ec_cpt_model"),a}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i)},t.prototype.mergeDefaultAndTheme=function(r,n){var i=Cy(this),a=i?Ef(r):{},o=n.getTheme();Ue(r,o.get(this.mainType)),Ue(r,this.getDefaultOption()),i&&Zo(r,a,i)},t.prototype.mergeOption=function(r,n){Ue(this.option,r,!0);var i=Cy(this);i&&Zo(this.option,r,i)},t.prototype.optionUpdated=function(r,n){},t.prototype.getDefaultOption=function(){var r=this.constructor;if(!VRe(r))return r.defaultOption;var n=sBe(this);if(!n.defaultOption){for(var i=[],a=r;a;){var o=a.prototype.defaultOption;o&&i.push(o),a=a.superClass}for(var s={},l=i.length-1;l>=0;l--)s=Ue(s,i[l],!0);n.defaultOption=s}return n.defaultOption},t.prototype.getReferringComponents=function(r,n){var i=r+"Index",a=r+"Id";return Bv(this.ecModel,r,{index:this.get(i,!0),id:this.get(a,!0)},n)},t.prototype.getBoxLayoutParams=function(){return OQ(this,!1)},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(r){this.option.zlevel=r},t.protoInitialize=function(){var r=t.prototype;r.type="component",r.id="",r.name="",r.mainType="",r.subType="",r.componentIndex=0}(),t}(rt);LJ(Qe,rt);jT(Qe);j5e(Qe);R5e(Qe,lBe);function lBe(e){var t=[];return R(Qe.getClassesByMainType(e),function(r){t=t.concat(r.dependencies||r.prototype.dependencies||[])}),t=le(t,function(r){return Po(r).main}),e!=="dataset"&&He(t,"dataset")<=0&&t.unshift("dataset"),t}var J={color:{},darkColor:{},size:{}},fr=J.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};ae(fr,{primary:fr.neutral80,secondary:fr.neutral70,tertiary:fr.neutral60,quaternary:fr.neutral50,disabled:fr.neutral20,border:fr.neutral30,borderTint:fr.neutral20,borderShade:fr.neutral40,background:fr.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:fr.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:fr.neutral70,axisLineTint:fr.neutral40,axisTick:fr.neutral70,axisTickMinor:fr.neutral60,axisLabel:fr.neutral70,axisSplitLine:fr.neutral15,axisMinorSplitLine:fr.neutral05});for(var ec in fr)if(fr.hasOwnProperty(ec)){var $V=fr[ec];ec==="theme"?J.darkColor.theme=fr.theme.slice():ec==="highlight"?J.darkColor.highlight="rgba(255,231,130,0.4)":ec.indexOf("accent")===0?J.darkColor[ec]=Is($V,null,function(e){return e*.5},function(e){return Math.min(1,1.3-e)}):J.darkColor[ec]=Is($V,null,function(e){return e*.9},function(e){return 1-Math.pow(e,1.5)})}J.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var jQ="";typeof navigator<"u"&&(jQ=navigator.platform||"");var oh="rgba(0, 0, 0, 0.2)",RQ=J.color.theme[0],uBe=Is(RQ,null,null,.9);const cBe={darkMode:"auto",colorBy:"series",color:J.color.theme,gradientColor:[uBe,RQ],aria:{decal:{decals:[{color:oh,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:oh,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:oh,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:oh,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:oh,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:oh,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:jQ.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var BQ=Ce(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),ji="original",un="arrayRows",Ri="objectRows",to="keyedColumns",ru="typedArray",zQ="unknown",Za="column",Df="row",vn={Must:1,Might:2,Not:3},$Q=et();function fBe(e){$Q(e).datasetMap=Ce()}function FQ(e,t,r){var n={},i=hj(t);if(!i||!e)return n;var a=[],o=[],s=t.ecModel,l=$Q(s).datasetMap,u=i.uid+"_"+r.seriesLayoutBy,c,f;e=e.slice(),R(e,function(m,y){var x=Ee(m)?m:e[y]={name:m};x.type==="ordinal"&&c==null&&(c=y,f=v(x)),n[x.name]=[]});var h=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});R(e,function(m,y){var x=m.name,_=v(m);if(c==null){var b=h.valueWayDim;d(n[x],b,_),d(o,b,_),h.valueWayDim+=_}else if(c===y)d(n[x],0,_),d(a,0,_);else{var b=h.categoryWayDim;d(n[x],b,_),d(o,b,_),h.categoryWayDim+=_}});function d(m,y,x){for(var _=0;_<x;_++)m.push(y+_)}function v(m){var y=m.dimsDef;return y?y.length:1}return a.length&&(n.itemName=a),o.length&&(n.seriesName=o),n}function fj(e,t,r){var n={},i=hj(e);if(!i)return n;var a=t.sourceFormat,o=t.dimensionsDefine,s;(a===Ri||a===to)&&R(o,function(c,f){(Ee(c)?c.name:c)==="name"&&(s=f)});var l=function(){for(var c={},f={},h=[],d=0,v=Math.min(5,r);d<v;d++){var m=GQ(t.data,a,t.seriesLayoutBy,o,t.startIndex,d);h.push(m);var y=m===vn.Not;if(y&&c.v==null&&d!==s&&(c.v=d),(c.n==null||c.n===c.v||!y&&h[c.n]===vn.Not)&&(c.n=d),x(c)&&h[c.n]!==vn.Not)return c;y||(m===vn.Might&&f.v==null&&d!==s&&(f.v=d),(f.n==null||f.n===f.v)&&(f.n=d))}function x(_){return _.v!=null&&_.n!=null}return x(c)?c:x(f)?f:null}();if(l){n.value=[l.v];var u=s??l.n;n.itemName=[u],n.seriesName=[u]}return n}function hj(e){var t=e.get("data",!0);if(!t)return Bv(e.ecModel,"dataset",{index:e.get("datasetIndex",!0),id:e.get("datasetId",!0)},tr).models[0]}function hBe(e){return!e.get("transform",!0)&&!e.get("fromTransformResult",!0)?[]:Bv(e.ecModel,"dataset",{index:e.get("fromDatasetIndex",!0),id:e.get("fromDatasetId",!0)},tr).models}function VQ(e,t){return GQ(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}function GQ(e,t,r,n,i,a){var o,s=5;if(Xn(e))return vn.Not;var l,u;if(n){var c=n[a];Ee(c)?(l=c.name,u=c.type):ye(c)&&(l=c)}if(u!=null)return u==="ordinal"?vn.Must:vn.Not;if(t===un){var f=e;if(r===Df){for(var h=f[a],d=0;d<(h||[]).length&&d<s;d++)if((o=S(h[i+d]))!=null)return o}else for(var d=0;d<f.length&&d<s;d++){var v=f[i+d];if(v&&(o=S(v[a]))!=null)return o}}else if(t===Ri){var m=e;if(!l)return vn.Not;for(var d=0;d<m.length&&d<s;d++){var y=m[d];if(y&&(o=S(y[l]))!=null)return o}}else if(t===to){var x=e;if(!l)return vn.Not;var h=x[l];if(!h||Xn(h))return vn.Not;for(var d=0;d<h.length&&d<s;d++)if((o=S(h[d]))!=null)return o}else if(t===ji)for(var _=e,d=0;d<_.length&&d<s;d++){var y=_[d],b=Rv(y);if(!oe(b))return vn.Not;if((o=S(b[a]))!=null)return o}function S(T){var C=ye(T);if(T!=null&&Number.isFinite(Number(T))&&T!=="")return C?vn.Might:vn.Not;if(C&&T!=="-")return vn.Must}return vn.Not}var BI=Ce();function dBe(e,t){wn(BI.get(e)==null&&t),BI.set(e,t)}function vBe(e,t,r){var n=BI.get(t);if(!n)return r;var i=n(e);return i?r.concat(i):r}var FV=et(),pBe=et(),dj=function(){function e(){}return e.prototype.getColorFromPalette=function(t,r,n){var i=Lt(this.get("color",!0)),a=this.get("colorLayer",!0);return WQ(this,FV,i,a,t,r,n)},e.prototype.clearColorPalette=function(){mBe(this,FV)},e}();function zI(e,t,r,n){var i=Lt(e.get(["aria","decal","decals"]));return WQ(e,pBe,i,null,t,r,n)}function gBe(e,t){for(var r=e.length,n=0;n<r;n++)if(e[n].length>t)return e[n];return e[r-1]}function WQ(e,t,r,n,i,a,o){a=a||e;var s=t(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=o==null||!n?r:gBe(n,o);if(c=c||r,!(!c||!c.length)){var f=c[l];return i&&(u[i]=f),s.paletteIdx=(l+1)%c.length,f}}function mBe(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var qx,$p,VV,GV="\0_ec_inner",yBe=1,vj=function(e){K(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(r,n,i,a,o,s){a=a||{},this.option=null,this._theme=new rt(a),this._locale=new rt(o),this._optionManager=s},t.prototype.setOption=function(r,n,i){var a=UV(n);this._optionManager.setOption(r,i,a),this._resetOption(null,a)},t.prototype.resetOption=function(r,n){return this._resetOption(r,UV(n))},t.prototype._resetOption=function(r,n){var i=!1,a=this._optionManager;if(!r||r==="recreate"){var o=a.mountOption(r==="recreate");!this.option||r==="recreate"?VV(this,o):(this.restoreData(),this._mergeOption(o,n)),i=!0}if((r==="timeline"||r==="media")&&this.restoreData(),!r||r==="recreate"||r==="timeline"){var s=a.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,n))}if(!r||r==="recreate"||r==="media"){var l=a.getMediaOption(this);l.length&&R(l,function(u){i=!0,this._mergeOption(u,n)},this)}return i},t.prototype.mergeOption=function(r){this._mergeOption(r,null)},t.prototype._mergeOption=function(r,n){var i=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=Ce(),u=n&&n.replaceMergeMainTypeMap;fBe(this),R(r,function(f,h){f!=null&&(Qe.hasClass(h)?h&&(s.push(h),l.set(h,!0)):i[h]=i[h]==null?Le(f):Ue(i[h],f,!0))}),u&&u.each(function(f,h){Qe.hasClass(h)&&!l.get(h)&&(s.push(h),l.set(h,!0))}),Qe.topologicalTravel(s,Qe.getAllClassMainTypes(),c,this);function c(f){var h=vBe(this,f,Lt(r[f])),d=a.get(f),v=d?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",m=CJ(d,h,v);ERe(m,f,Qe),i[f]=null,a.set(f,null),o.set(f,0);var y=[],x=[],_=0,b;R(m,function(S,T){var C=S.existing,A=S.newOption;if(!A)C&&(C.mergeOption({},this),C.optionUpdated({},!1));else{var P=f==="series",I=Qe.getClass(f,S.keyInfo.subType,!P);if(!I)return;if(f==="tooltip"){if(b)return;b=!0}if(C&&C.constructor===I)C.name=S.keyInfo.name,C.mergeOption(A,this),C.optionUpdated(A,!1);else{var k=ae({componentIndex:T},S.keyInfo);C=new I(A,this,this,k),ae(C,k),S.brandNew&&(C.__requireNewView=!0),C.init(A,this,this),C.optionUpdated(null,!0)}}C?(y.push(C.option),x.push(C),_++):(y.push(void 0),x.push(void 0))},this),i[f]=y,a.set(f,x),o.set(f,_),f==="series"&&qx(this)}this._seriesIndices||qx(this)},t.prototype.getOption=function(){var r=Le(this.option);return R(r,function(n,i){if(Qe.hasClass(i)){for(var a=Lt(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!_y(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,r[i]=a}}),delete r[GV],r},t.prototype.setTheme=function(r){this._theme=new rt(r),this._resetOption("recreate",null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(r){this._payload=r},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(r,n){var i=this._componentsMap.get(r);if(i){var a=i[n||0];if(a)return a;if(n==null){for(var o=0;o<i.length;o++)if(i[o])return i[o]}}},t.prototype.queryComponents=function(r){var n=r.mainType;if(!n)return[];var i=r.index,a=r.id,o=r.name,s=this._componentsMap.get(n);if(!s||!s.length)return[];var l;return i!=null?(l=[],R(Lt(i),function(u){s[u]&&l.push(s[u])})):a!=null?l=WV("id",a,s):o!=null?l=WV("name",o,s):l=dt(s,function(u){return!!u}),HV(l,r)},t.prototype.findComponents=function(r){var n=r.query,i=r.mainType,a=s(n),o=a?this.queryComponents(a):dt(this._componentsMap.get(i),function(u){return!!u});return l(HV(o,r));function s(u){var c=i+"Index",f=i+"Id",h=i+"Name";return u&&(u[c]!=null||u[f]!=null||u[h]!=null)?{mainType:i,index:u[c],id:u[f],name:u[h]}:null}function l(u){return r.filter?dt(u,r.filter):u}},t.prototype.eachComponent=function(r,n,i){var a=this._componentsMap;if(ke(r)){var o=n,s=r;a.each(function(f,h){for(var d=0;f&&d<f.length;d++){var v=f[d];v&&s.call(o,h,v,v.componentIndex)}})}else for(var l=ye(r)?a.get(r):Ee(r)?this.findComponents(r):null,u=0;l&&u<l.length;u++){var c=l[u];c&&n.call(i,c,c.componentIndex)}},t.prototype.getSeriesByName=function(r){var n=Dr(r,null);return dt(this._componentsMap.get("series"),function(i){return!!i&&n!=null&&i.name===n})},t.prototype.getSeriesByIndex=function(r){return this._componentsMap.get("series")[r]},t.prototype.getSeriesByType=function(r){return dt(this._componentsMap.get("series"),function(n){return!!n&&n.subType===r})},t.prototype.getSeries=function(){return dt(this._componentsMap.get("series"),function(r){return!!r})},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(r,n){$p(this),R(this._seriesIndices,function(i){var a=this._componentsMap.get("series")[i];r.call(n,a,i)},this)},t.prototype.eachRawSeries=function(r,n){R(this._componentsMap.get("series"),function(i){i&&r.call(n,i,i.componentIndex)})},t.prototype.eachSeriesByType=function(r,n,i){$p(this),R(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];o.subType===r&&n.call(i,o,a)},this)},t.prototype.eachRawSeriesByType=function(r,n,i){return R(this.getSeriesByType(r),n,i)},t.prototype.isSeriesFiltered=function(r){return $p(this),this._seriesIndicesMap.get(r.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(r,n){$p(this);var i=[];R(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];r.call(n,o,a)&&i.push(a)},this),this._seriesIndices=i,this._seriesIndicesMap=Ce(i)},t.prototype.restoreData=function(r){qx(this);var n=this._componentsMap,i=[];n.each(function(a,o){Qe.hasClass(o)&&i.push(o)}),Qe.topologicalTravel(i,Qe.getAllClassMainTypes(),function(a){R(n.get(a),function(o){o&&(a!=="series"||!xBe(o,r))&&o.restoreData()})})},t.internalField=function(){qx=function(r){var n=r._seriesIndices=[];R(r._componentsMap.get("series"),function(i){i&&n.push(i.componentIndex)}),r._seriesIndicesMap=Ce(n)},$p=function(r){},VV=function(r,n){r.option={},r.option[GV]=yBe,r._componentsMap=Ce({series:[]}),r._componentsCount=Ce();var i=n.aria;Ee(i)&&i.enabled==null&&(i.enabled=!0),_Be(n,r._theme.option),Ue(n,cBe,!1),r._mergeOption(n,null)}}(),t}(rt);function xBe(e,t){if(t){var r=t.seriesIndex,n=t.seriesId,i=t.seriesName;return r!=null&&e.componentIndex!==r||n!=null&&e.id!==n||i!=null&&e.name!==i}}function _Be(e,t){var r=e.color&&!e.colorLayer;R(t,function(n,i){i==="colorLayer"&&r||i==="color"&&e.color||Qe.hasClass(i)||(typeof n=="object"?e[i]=e[i]?Ue(e[i],n,!1):Le(n):e[i]==null&&(e[i]=n))})}function WV(e,t,r){if(oe(t)){var n=Ce();return R(t,function(a){if(a!=null){var o=Dr(a,null);o!=null&&n.set(a,!0)}}),dt(r,function(a){return a&&n.get(a[e])})}else{var i=Dr(t,null);return dt(r,function(a){return a&&i!=null&&a[e]===i})}}function HV(e,t){return t.hasOwnProperty("subType")?dt(e,function(r){return r&&r.subType===t.subType}):e}function UV(e){var t=Ce();return e&&R(Lt(e.replaceMerge),function(r){t.set(r,!0)}),{replaceMergeMainTypeMap:t}}cr(vj,dj);var bBe=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],HQ=function(){function e(t){R(bBe,function(r){this[r]=_e(t[r],t)},this)}return e}(),wBe=/^(min|max)?(.+)$/,SBe=function(){function e(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}return e.prototype.setOption=function(t,r,n){t&&(R(Lt(t.series),function(o){o&&o.data&&Xn(o.data)&&dy(o.data)}),R(Lt(t.dataset),function(o){o&&o.source&&Xn(o.source)&&dy(o.source)})),t=Le(t);var i=this._optionBackup,a=TBe(t,r,!i);this._newBaseOption=a.baseOption,i?(a.timelineOptions.length&&(i.timelineOptions=a.timelineOptions),a.mediaList.length&&(i.mediaList=a.mediaList),a.mediaDefault&&(i.mediaDefault=a.mediaDefault)):this._optionBackup=a},e.prototype.mountOption=function(t){var r=this._optionBackup;return this._timelineOptions=r.timelineOptions,this._mediaList=r.mediaList,this._mediaDefault=r.mediaDefault,this._currentMediaIndices=[],Le(t?r.baseOption:this._newBaseOption)},e.prototype.getTimelineOption=function(t){var r,n=this._timelineOptions;if(n.length){var i=t.getComponent("timeline");i&&(r=Le(n[i.getCurrentIndex()]))}return r},e.prototype.getMediaOption=function(t){var r=this._api.getWidth(),n=this._api.getHeight(),i=this._mediaList,a=this._mediaDefault,o=[],s=[];if(!i.length&&!a)return s;for(var l=0,u=i.length;l<u;l++)CBe(i[l].query,r,n)&&o.push(l);return!o.length&&a&&(o=[-1]),o.length&&!MBe(o,this._currentMediaIndices)&&(s=le(o,function(c){return Le(c===-1?a.option:i[c].option)})),this._currentMediaIndices=o,s},e}();function TBe(e,t,r){var n=[],i,a,o=e.baseOption,s=e.timeline,l=e.options,u=e.media,c=!!e.media,f=!!(l||s||o&&o.timeline);o?(a=o,a.timeline||(a.timeline=s)):((f||c)&&(e.options=e.media=null),a=e),c&&oe(u)&&R(u,function(d){d&&d.option&&(d.query?n.push(d):i||(i=d))}),h(a),R(l,function(d){return h(d)}),R(n,function(d){return h(d.option)});function h(d){R(t,function(v){v(d,r)})}return{baseOption:a,timelineOptions:l||[],mediaDefault:i,mediaList:n}}function CBe(e,t,r){var n={width:t,height:r,aspectratio:t/r},i=!0;return R(e,function(a,o){var s=o.match(wBe);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();ABe(n[u],a,l)||(i=!1)}}),i}function ABe(e,t,r){return r==="min"?e>=t:r==="max"?e<=t:e===t}function MBe(e,t){return e.join(",")===t.join(",")}var Ma=R,Ay=Ee,ZV=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function R2(e){var t=e&&e.itemStyle;if(t)for(var r=0,n=ZV.length;r<n;r++){var i=ZV[r],a=t.normal,o=t.emphasis;a&&a[i]&&(e[i]=e[i]||{},e[i].normal?Ue(e[i].normal,a[i]):e[i].normal=a[i],a[i]=null),o&&o[i]&&(e[i]=e[i]||{},e[i].emphasis?Ue(e[i].emphasis,o[i]):e[i].emphasis=o[i],o[i]=null)}}function On(e,t,r){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var n=e[t].normal,i=e[t].emphasis;n&&(r?(e[t].normal=e[t].emphasis=null,Oe(e[t],n)):e[t]=n),i&&(e.emphasis=e.emphasis||{},e.emphasis[t]=i,i.focus&&(e.emphasis.focus=i.focus),i.blurScope&&(e.emphasis.blurScope=i.blurScope))}}function Tg(e){On(e,"itemStyle"),On(e,"lineStyle"),On(e,"areaStyle"),On(e,"label"),On(e,"labelLine"),On(e,"upperLabel"),On(e,"edgeLabel")}function Sr(e,t){var r=Ay(e)&&e[t],n=Ay(r)&&r.textStyle;if(n)for(var i=0,a=qF.length;i<a;i++){var o=qF[i];n.hasOwnProperty(o)&&(r[o]=n[o])}}function Xi(e){e&&(Tg(e),Sr(e,"label"),e.emphasis&&Sr(e.emphasis,"label"))}function PBe(e){if(Ay(e)){R2(e),Tg(e),Sr(e,"label"),Sr(e,"upperLabel"),Sr(e,"edgeLabel"),e.emphasis&&(Sr(e.emphasis,"label"),Sr(e.emphasis,"upperLabel"),Sr(e.emphasis,"edgeLabel"));var t=e.markPoint;t&&(R2(t),Xi(t));var r=e.markLine;r&&(R2(r),Xi(r));var n=e.markArea;n&&Xi(n);var i=e.data;if(e.type==="graph"){i=i||e.nodes;var a=e.links||e.edges;if(a&&!Xn(a))for(var o=0;o<a.length;o++)Xi(a[o]);R(e.categories,function(u){Tg(u)})}if(i&&!Xn(i))for(var o=0;o<i.length;o++)Xi(i[o]);if(t=e.markPoint,t&&t.data)for(var s=t.data,o=0;o<s.length;o++)Xi(s[o]);if(r=e.markLine,r&&r.data)for(var l=r.data,o=0;o<l.length;o++)oe(l[o])?(Xi(l[o][0]),Xi(l[o][1])):Xi(l[o]);e.type==="gauge"?(Sr(e,"axisLabel"),Sr(e,"title"),Sr(e,"detail")):e.type==="treemap"?(On(e.breadcrumb,"itemStyle"),R(e.levels,function(u){Tg(u)})):e.type==="tree"&&Tg(e.leaves)}}function ss(e){return oe(e)?e:e?[e]:[]}function YV(e){return(oe(e)?e[0]:e)||{}}function kBe(e,t){Ma(ss(e.series),function(n){Ay(n)&&PBe(n)});var r=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&r.push("valueAxis","categoryAxis","logAxis","timeAxis"),Ma(r,function(n){Ma(ss(e[n]),function(i){i&&(Sr(i,"axisLabel"),Sr(i.axisPointer,"label"))})}),Ma(ss(e.parallel),function(n){var i=n&&n.parallelAxisDefault;Sr(i,"axisLabel"),Sr(i&&i.axisPointer,"label")}),Ma(ss(e.calendar),function(n){On(n,"itemStyle"),Sr(n,"dayLabel"),Sr(n,"monthLabel"),Sr(n,"yearLabel")}),Ma(ss(e.radar),function(n){Sr(n,"name"),n.name&&n.axisName==null&&(n.axisName=n.name,delete n.name),n.nameGap!=null&&n.axisNameGap==null&&(n.axisNameGap=n.nameGap,delete n.nameGap)}),Ma(ss(e.geo),function(n){Ay(n)&&(Xi(n),Ma(ss(n.regions),function(i){Xi(i)}))}),Ma(ss(e.timeline),function(n){Xi(n),On(n,"label"),On(n,"itemStyle"),On(n,"controlStyle",!0);var i=n.data;oe(i)&&R(i,function(a){Ee(a)&&(On(a,"label"),On(a,"itemStyle"))})}),Ma(ss(e.toolbox),function(n){On(n,"iconStyle"),Ma(n.feature,function(i){On(i,"iconStyle")})}),Sr(YV(e.axisPointer),"label"),Sr(YV(e.tooltip).axisPointer,"label")}function LBe(e,t){for(var r=t.split(","),n=e,i=0;i<r.length&&(n=n&&n[r[i]],n!=null);i++);return n}function IBe(e,t,r,n){for(var i=t.split(","),a=e,o,s=0;s<i.length-1;s++)o=i[s],a[o]==null&&(a[o]={}),a=a[o];a[i[s]]==null&&(a[i[s]]=r)}function XV(e){e&&R(OBe,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var OBe=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],EBe=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],B2=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Fp(e){var t=e&&e.itemStyle;if(t)for(var r=0;r<B2.length;r++){var n=B2[r][1],i=B2[r][0];t[n]!=null&&(t[i]=t[n])}}function qV(e){e&&e.alignTo==="edge"&&e.margin!=null&&e.edgeDistance==null&&(e.edgeDistance=e.margin)}function KV(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function DBe(e){e&&e.focusNodeAdjacency!=null&&(e.emphasis=e.emphasis||{},e.emphasis.focus==null&&(e.emphasis.focus="adjacency"))}function UQ(e,t){if(e)for(var r=0;r<e.length;r++)t(e[r]),e[r]&&UQ(e[r].children,t)}function ZQ(e,t){kBe(e,t),e.series=Lt(e.series),R(e.series,function(r){if(Ee(r)){var n=r.type;if(n==="line")r.clipOverflow!=null&&(r.clip=r.clipOverflow);else if(n==="pie"||n==="gauge"){r.clockWise!=null&&(r.clockwise=r.clockWise),qV(r.label);var i=r.data;if(i&&!Xn(i))for(var a=0;a<i.length;a++)qV(i[a]);r.hoverOffset!=null&&(r.emphasis=r.emphasis||{},(r.emphasis.scaleSize=null)&&(r.emphasis.scaleSize=r.hoverOffset))}else if(n==="gauge"){var o=LBe(r,"pointer.color");o!=null&&IBe(r,"itemStyle.color",o)}else if(n==="bar"){Fp(r),Fp(r.backgroundStyle),Fp(r.emphasis);var i=r.data;if(i&&!Xn(i))for(var a=0;a<i.length;a++)typeof i[a]=="object"&&(Fp(i[a]),Fp(i[a]&&i[a].emphasis))}else if(n==="sunburst"){var s=r.highlightPolicy;s&&(r.emphasis=r.emphasis||{},r.emphasis.focus||(r.emphasis.focus=s)),KV(r),UQ(r.data,KV)}else n==="graph"||n==="sankey"?DBe(r):n==="map"&&(r.mapType&&!r.map&&(r.map=r.mapType),r.mapLocation&&Oe(r,r.mapLocation));r.hoverAnimation!=null&&(r.emphasis=r.emphasis||{},r.emphasis&&r.emphasis.scale==null&&(r.emphasis.scale=r.hoverAnimation)),XV(r)}}),e.dataRange&&(e.visualMap=e.dataRange),R(EBe,function(r){var n=e[r];n&&(oe(n)||(n=[n]),R(n,function(i){XV(i)}))})}function NBe(e){var t=Ce();e.eachSeries(function(r){var n=r.get("stack");if(n){var i=t.get(n)||t.set(n,[]),a=r.getData(),o={stackResultDimension:a.getCalculationInfo("stackResultDimension"),stackedOverDimension:a.getCalculationInfo("stackedOverDimension"),stackedDimension:a.getCalculationInfo("stackedDimension"),stackedByDimension:a.getCalculationInfo("stackedByDimension"),isStackedByIndex:a.getCalculationInfo("isStackedByIndex"),data:a,seriesModel:r};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;i.push(o)}}),t.each(function(r){if(r.length!==0){var n=r[0].seriesModel,i=n.get("stackOrder")||"seriesAsc";i==="seriesDesc"&&r.reverse(),R(r,function(a,o){a.data.setCalculationInfo("stackedOnSeries",o>0?r[o-1].seriesModel:null)}),jBe(r)}})}function jBe(e){R(e,function(t,r){var n=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";o.modify(a,function(u,c,f){var h=o.get(t.stackedDimension,f);if(isNaN(h))return i;var d,v;s?v=o.getRawIndex(f):d=o.get(t.stackedByDimension,f);for(var m=NaN,y=r-1;y>=0;y--){var x=e[y];if(s||(v=x.data.rawIndexOf(x.stackedByDimension,d)),v>=0){var _=x.data.getByRawIndex(x.stackResultDimension,v);if(l==="all"||l==="positive"&&_>0||l==="negative"&&_<0||l==="samesign"&&h>=0&&_>0||l==="samesign"&&h<=0&&_<0){h=_Re(h,_),m=_;break}}}return n[0]=h,n[1]=m,n})})}var YT=function(){function e(t){this.data=t.data||(t.sourceFormat===to?{}:[]),this.sourceFormat=t.sourceFormat||zQ,this.seriesLayoutBy=t.seriesLayoutBy||Za,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var r=this.dimensionsDefine=t.dimensionsDefine;if(r)for(var n=0;n<r.length;n++){var i=r[n];i.type==null&&VQ(this,n)===vn.Must&&(i.type="ordinal")}}return e}();function pj(e){return e instanceof YT}function $I(e,t,r){r=r||YQ(e);var n=t.seriesLayoutBy,i=BBe(e,r,n,t.sourceHeader,t.dimensions),a=new YT({data:e,sourceFormat:r,seriesLayoutBy:n,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:Le(t)});return a}function gj(e){return new YT({data:e,sourceFormat:Xn(e)?ru:ji})}function RBe(e){return new YT({data:e.data,sourceFormat:e.sourceFormat,seriesLayoutBy:e.seriesLayoutBy,dimensionsDefine:Le(e.dimensionsDefine),startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount})}function YQ(e){var t=zQ;if(Xn(e))t=ru;else if(oe(e)){e.length===0&&(t=un);for(var r=0,n=e.length;r<n;r++){var i=e[r];if(i!=null){if(oe(i)||Xn(i)){t=un;break}else if(Ee(i)){t=Ri;break}}}}else if(Ee(e)){for(var a in e)if(Se(e,a)&&bn(e[a])){t=to;break}}return t}function BBe(e,t,r,n,i){var a,o;if(!e)return{dimensionsDefine:JV(i),startIndex:o,dimensionsDetectedCount:a};if(t===un){var s=e;n==="auto"||n==null?QV(function(u){u!=null&&u!=="-"&&(ye(u)?o==null&&(o=1):o=0)},r,s,10):o=st(n)?n:n?1:0,!i&&o===1&&(i=[],QV(function(u,c){i[c]=u!=null?u+"":""},r,s,1/0)),a=i?i.length:r===Df?s.length:s[0]?s[0].length:null}else if(t===Ri)i||(i=zBe(e));else if(t===to)i||(i=[],R(e,function(u,c){i.push(c)}));else if(t===ji){var l=Rv(e[0]);a=oe(l)&&l.length||1}return{startIndex:o,dimensionsDefine:JV(i),dimensionsDetectedCount:a}}function zBe(e){for(var t=0,r;t<e.length&&!(r=e[t++]););if(r)return at(r)}function JV(e){if(e){var t=Ce();return le(e,function(r,n){r=Ee(r)?r:{name:r};var i={name:r.name,displayName:r.displayName,type:r.type};if(i.name==null)return i;i.name+="",i.displayName==null&&(i.displayName=i.name);var a=t.get(i.name);return a?i.name+="-"+a.count++:t.set(i.name,{count:1}),i})}}function QV(e,t,r,n){if(t===Df)for(var i=0;i<r.length&&i<n;i++)e(r[i]?r[i][0]:null,i);else for(var a=r[0]||[],i=0;i<a.length&&i<n;i++)e(a[i],i)}function XQ(e){var t=e.sourceFormat;return t===Ri||t===to}var tc,rc,nc,ic,e6,t6,qQ=function(){function e(t,r){var n=pj(t)?t:gj(t);this._source=n;var i=this._data=n.data,a=n.sourceFormat;n.seriesLayoutBy,a===ru&&(this._offset=0,this._dimSize=r,this._data=i),t6(this,i,n)}return e.prototype.getSource=function(){return this._source},e.prototype.count=function(){return 0},e.prototype.getItem=function(t,r){},e.prototype.appendData=function(t){},e.prototype.clean=function(){},e.protoInitialize=function(){var t=e.prototype;t.pure=!1,t.persistent=!0}(),e.internalField=function(){var t;t6=function(o,s,l){var u=l.sourceFormat,c=l.seriesLayoutBy,f=l.startIndex,h=l.dimensionsDefine,d=e6[mj(u,c)];if(ae(o,d),u===ru)o.getItem=r,o.count=i,o.fillStorage=n;else{var v=KQ(u,c);o.getItem=_e(v,null,s,f,h);var m=JQ(u,c);o.count=_e(m,null,s,f,h)}};var r=function(o,s){o=o-this._offset,s=s||[];for(var l=this._data,u=this._dimSize,c=u*o,f=0;f<u;f++)s[f]=l[c+f];return s},n=function(o,s,l,u){for(var c=this._data,f=this._dimSize,h=0;h<f;h++){for(var d=u[h],v=d[0]==null?1/0:d[0],m=d[1]==null?-1/0:d[1],y=s-o,x=l[h],_=0;_<y;_++){var b=c[_*f+h];x[o+_]=b,b<v&&(v=b),b>m&&(m=b)}d[0]=v,d[1]=m}},i=function(){return this._data?this._data.length/this._dimSize:0};e6=(t={},t[un+"_"+Za]={pure:!0,appendData:a},t[un+"_"+Df]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[Ri]={pure:!0,appendData:a},t[to]={pure:!0,appendData:function(o){var s=this._data;R(o,function(l,u){for(var c=s[u]||(s[u]=[]),f=0;f<(l||[]).length;f++)c.push(l[f])})}},t[ji]={appendData:a},t[ru]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function a(o){for(var s=0;s<o.length;s++)this._data.push(o[s])}}(),e}(),Kx=function(e){oe(e)||wJ("series.data or dataset.source must be an array.")};tc={},tc[un+"_"+Za]=Kx,tc[un+"_"+Df]=Kx,tc[Ri]=Kx,tc[to]=function(e,t){for(var r=0;r<t.length;r++){var n=t[r].name;n==null&&wJ("dimension name must not be null/undefined.")}},tc[ji]=Kx;var r6=function(e,t,r,n){return e[n]},$Be=(rc={},rc[un+"_"+Za]=function(e,t,r,n){return e[n+t]},rc[un+"_"+Df]=function(e,t,r,n,i){n+=t;for(var a=i||[],o=e,s=0;s<o.length;s++){var l=o[s];a[s]=l?l[n]:null}return a},rc[Ri]=r6,rc[to]=function(e,t,r,n,i){for(var a=i||[],o=0;o<r.length;o++){var s=r[o].name,l=s!=null?e[s]:null;a[o]=l?l[n]:null}return a},rc[ji]=r6,rc);function KQ(e,t){var r=$Be[mj(e,t)];return r}var n6=function(e,t,r){return e.length},FBe=(nc={},nc[un+"_"+Za]=function(e,t,r){return Math.max(0,e.length-t)},nc[un+"_"+Df]=function(e,t,r){var n=e[0];return n?Math.max(0,n.length-t):0},nc[Ri]=n6,nc[to]=function(e,t,r){var n=r[0].name,i=n!=null?e[n]:null;return i?i.length:0},nc[ji]=n6,nc);function JQ(e,t){var r=FBe[mj(e,t)];return r}var z2=function(e,t,r){return e[t]},VBe=(ic={},ic[un]=z2,ic[Ri]=function(e,t,r){return e[r]},ic[to]=z2,ic[ji]=function(e,t,r){var n=Rv(e);return n instanceof Array?n[t]:n},ic[ru]=z2,ic);function QQ(e){var t=VBe[e];return t}function mj(e,t){return e===un?e+"_"+t:e}function rv(e,t,r){if(e){var n=e.getRawDataItem(t);if(n!=null){var i=e.getStore(),a=i.getSource().sourceFormat;if(r!=null){var o=e.getDimensionIndex(r),s=i.getDimensionProperty(o);return QQ(a)(n,o,s)}else{var l=n;return a===ji&&(l=Rv(n)),l}}}}var GBe=/\{@(.+?)\}/g,XT=function(){function e(){}return e.prototype.getDataParams=function(t,r){var n=this.getData(r),i=this.getRawValue(t,r),a=n.getRawIndex(t),o=n.getName(t),s=n.getRawDataItem(t),l=n.getItemVisual(t,"style"),u=l&&l[n.getItemVisual(t,"drawType")||"fill"],c=l&&l.stroke,f=this.mainType,h=f==="series",d=n.userOutput&&n.userOutput.get();return{componentType:f,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:h?this.subType:null,seriesIndex:this.seriesIndex,seriesId:h?this.id:null,seriesName:h?this.name:null,name:o,dataIndex:a,data:s,dataType:r,value:i,color:u,borderColor:c,dimensionNames:d?d.fullDimensions:null,encode:d?d.encode:null,$vars:["seriesName","name","value"]}},e.prototype.getFormattedLabel=function(t,r,n,i,a,o){r=r||"normal";var s=this.getData(n),l=this.getDataParams(t,n);if(o&&(l.value=o.interpolatedValue),i!=null&&oe(l.value)&&(l.value=l.value[i]),!a){var u=s.getItemModel(t);a=u.get(r==="normal"?["label","formatter"]:[r,"label","formatter"])}if(ke(a))return l.status=r,l.dimensionIndex=i,a(l);if(ye(a)){var c=uj(a,l);return c.replace(GBe,function(f,h){var d=h.length,v=h;v.charAt(0)==="["&&v.charAt(d-1)==="]"&&(v=+v.slice(1,d-1));var m=rv(s,t,v);if(o&&oe(o.interpolatedValue)){var y=s.getDimensionIndex(v);y>=0&&(m=o.interpolatedValue[y])}return m!=null?m+"":""})}},e.prototype.getRawValue=function(t,r){return rv(this.getData(r),t)},e.prototype.formatTooltip=function(t,r,n){},e}();function i6(e){var t,r;return Ee(e)?e.type&&(r=e):t=e,{text:t,frag:r}}function nm(e){return new WBe(e)}var WBe=function(){function e(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return e.prototype.perform=function(t){var r=this._upstream,n=t&&t.skip;if(this._dirty&&r){var i=this.context;i.data=i.outputData=r.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var o=c(this._modBy),s=this._modDataCount||0,l=c(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(a="reset");function c(_){return!(_>=1)&&(_=1),_}var f;(this._dirty||a==="reset")&&(this._dirty=!1,f=this._doReset(n)),this._modBy=l,this._modDataCount=u;var h=t&&t.step;if(r?this._dueEnd=r._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,v=Math.min(h!=null?this._dueIndex+h:1/0,this._dueEnd);if(!n&&(f||d<v)){var m=this._progress;if(oe(m))for(var y=0;y<m.length;y++)this._doProgress(m[y],d,v,l,u);else this._doProgress(m,d,v,l,u)}this._dueIndex=v;var x=this._settedOutputEnd!=null?this._settedOutputEnd:v;this._outputDueEnd=x}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},e.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},e.prototype._doProgress=function(t,r,n,i,a){a6.reset(r,n,i,a),this._callingProgress=t,this._callingProgress({start:r,end:n,count:n-r,next:a6.next},this.context)},e.prototype._doReset=function(t){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var r,n;!t&&this._reset&&(r=this._reset(this.context),r&&r.progress&&(n=r.forceFirstProgress,r=r.progress),oe(r)&&!r.length&&(r=null)),this._progress=r,this._modBy=this._modDataCount=null;var i=this._downstream;return i&&i.dirty(),n},e.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},e.prototype.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},e.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},e.prototype.getUpstream=function(){return this._upstream},e.prototype.getDownstream=function(){return this._downstream},e.prototype.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t},e}(),a6=function(){var e,t,r,n,i,a={reset:function(l,u,c,f){t=l,e=u,r=c,n=f,i=Math.ceil(n/r),a.next=r>1&&n>0?s:o}};return a;function o(){return t<e?t++:null}function s(){var l=t%i*r+Math.ceil(t/i),u=t>=e?null:l<n?l:t;return t++,u}}();function nu(e,t){var r=t&&t.type;return r==="ordinal"?e:(r==="time"&&!st(e)&&e!=null&&e!=="-"&&(e=+Jo(e)),e==null||e===""?NaN:Number(e))}var HBe=Ce({number:function(e){return parseFloat(e)},time:function(e){return+Jo(e)},trim:function(e){return ye(e)?Ai(e):e}});function eee(e){return HBe.get(e)}var tee={lt:function(e,t){return e<t},lte:function(e,t){return e<=t},gt:function(e,t){return e>t},gte:function(e,t){return e>=t}},UBe=function(){function e(t,r){if(!st(r)){var n="";mt(n)}this._opFn=tee[t],this._rvalFloat=Ho(r)}return e.prototype.evaluate=function(t){return st(t)?this._opFn(t,this._rvalFloat):this._opFn(Ho(t),this._rvalFloat)},e}(),ree=function(){function e(t,r){var n=t==="desc";this._resultLT=n?1:-1,r==null&&(r=n?"min":"max"),this._incomparable=r==="min"?-1/0:1/0}return e.prototype.evaluate=function(t,r){var n=st(t)?t:Ho(t),i=st(r)?r:Ho(r),a=isNaN(n),o=isNaN(i);if(a&&(n=this._incomparable),o&&(i=this._incomparable),a&&o){var s=ye(t),l=ye(r);s&&(n=l?t:0),l&&(i=s?r:0)}return n<i?this._resultLT:n>i?-this._resultLT:0},e}(),ZBe=function(){function e(t,r){this._rval=r,this._isEQ=t,this._rvalTypeof=typeof r,this._rvalFloat=Ho(r)}return e.prototype.evaluate=function(t){var r=t===this._rval;if(!r){var n=typeof t;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(r=Ho(t)===this._rvalFloat)}return this._isEQ?r:!r},e}();function YBe(e,t){return e==="eq"||e==="ne"?new ZBe(e==="eq",t):Se(tee,e)?new UBe(e,t):null}var XBe=function(){function e(){}return e.prototype.getRawData=function(){throw new Error("not supported")},e.prototype.getRawDataItem=function(t){throw new Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(t){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(t,r){},e.prototype.retrieveValueFromItem=function(t,r){},e.prototype.convertValue=function(t,r){return nu(t,r)},e}();function qBe(e,t){var r=new XBe,n=e.data,i=r.sourceFormat=e.sourceFormat,a=e.startIndex,o="";e.seriesLayoutBy!==Za&&mt(o);var s=[],l={},u=e.dimensionsDefine;if(u)R(u,function(m,y){var x=m.name,_={index:y,name:x,displayName:m.displayName};if(s.push(_),x!=null){var b="";Se(l,x)&&mt(b),l[x]=_}});else for(var c=0;c<e.dimensionsDetectedCount;c++)s.push({index:c});var f=KQ(i,Za);t.__isBuiltIn&&(r.getRawDataItem=function(m){return f(n,a,s,m)},r.getRawData=_e(KBe,null,e)),r.cloneRawData=_e(JBe,null,e);var h=JQ(i,Za);r.count=_e(h,null,n,a,s);var d=QQ(i);r.retrieveValue=function(m,y){var x=f(n,a,s,m);return v(x,y)};var v=r.retrieveValueFromItem=function(m,y){if(m!=null){var x=s[y];if(x)return d(m,y,x.name)}};return r.getDimensionInfo=_e(QBe,null,s,l),r.cloneAllDimensionInfo=_e(eze,null,s),r}function KBe(e){var t=e.sourceFormat;if(!yj(t)){var r="";mt(r)}return e.data}function JBe(e){var t=e.sourceFormat,r=e.data;if(!yj(t)){var n="";mt(n)}if(t===un){for(var i=[],a=0,o=r.length;a<o;a++)i.push(r[a].slice());return i}else if(t===Ri){for(var i=[],a=0,o=r.length;a<o;a++)i.push(ae({},r[a]));return i}}function QBe(e,t,r){if(r!=null){if(st(r)||!isNaN(r)&&!Se(t,r))return e[r];if(Se(t,r))return t[r]}}function eze(e){return Le(e)}var nee=Ce();function tze(e){e=Le(e);var t=e.type,r="";t||mt(r);var n=t.split(":");n.length!==2&&mt(r);var i=!1;n[0]==="echarts"&&(t=n[1],i=!0),e.__isBuiltIn=i,nee.set(t,e)}function rze(e,t,r){var n=Lt(e),i=n.length,a="";i||mt(a);for(var o=0,s=i;o<s;o++){var l=n[o];t=nze(l,t),o!==s-1&&(t.length=Math.max(t.length,1))}return t}function nze(e,t,r,n){var i="";t.length||mt(i),Ee(e)||mt(i);var a=e.type,o=nee.get(a);o||mt(i);var s=le(t,function(u){return qBe(u,o)}),l=Lt(o.transform({upstream:s[0],upstreamList:s,config:Le(e.config)}));return le(l,function(u,c){var f="";Ee(u)||mt(f),u.data||mt(f);var h=YQ(u.data);yj(h)||mt(f);var d,v=t[0];if(v&&c===0&&!u.dimensions){var m=v.startIndex;m&&(u.data=v.data.slice(0,m).concat(u.data)),d={seriesLayoutBy:Za,sourceHeader:m,dimensions:v.metaRawOption.dimensions}}else d={seriesLayoutBy:Za,sourceHeader:0,dimensions:u.dimensions};return $I(u.data,d,null)})}function yj(e){return e===un||e===Ri}var qT="undefined",ize=typeof Uint32Array===qT?Array:Uint32Array,aze=typeof Uint16Array===qT?Array:Uint16Array,iee=typeof Int32Array===qT?Array:Int32Array,o6=typeof Float64Array===qT?Array:Float64Array,aee={float:o6,int:iee,ordinal:Array,number:Array,time:o6},$2;function sh(e){return e>65535?ize:aze}function lh(){return[1/0,-1/0]}function oze(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function s6(e,t,r,n,i){var a=aee[r||"float"];if(i){var o=e[t],s=o&&o.length;if(s!==n){for(var l=new a(n),u=0;u<s;u++)l[u]=o[u];e[t]=l}}else e[t]=new a(n)}var FI=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Ce()}return e.prototype.initData=function(t,r,n){this._provider=t,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var i=t.getSource(),a=this.defaultDimValueGetter=$2[i.sourceFormat];this._dimValueGetter=n||a,this._rawExtent=[],XQ(i),this._dimensions=le(r,function(o){return{type:o.type,property:o.property}}),this._initDataFromProvider(0,t.count())},e.prototype.getProvider=function(){return this._provider},e.prototype.getSource=function(){return this._provider.getSource()},e.prototype.ensureCalculationDimension=function(t,r){var n=this._calcDimNameToIdx,i=this._dimensions,a=n.get(t);if(a!=null){if(i[a].type===r)return a}else a=i.length;return i[a]={type:r},n.set(t,a),this._chunks[a]=new aee[r||"float"](this._rawCount),this._rawExtent[a]=lh(),a},e.prototype.collectOrdinalMeta=function(t,r){var n=this._chunks[t],i=this._dimensions[t],a=this._rawExtent,o=i.ordinalOffset||0,s=n.length;o===0&&(a[t]=lh());for(var l=a[t],u=o;u<s;u++){var c=n[u]=r.parseAndCollect(n[u]);isNaN(c)||(l[0]=Math.min(c,l[0]),l[1]=Math.max(c,l[1]))}i.ordinalMeta=r,i.ordinalOffset=s,i.type="ordinal"},e.prototype.getOrdinalMeta=function(t){var r=this._dimensions[t],n=r.ordinalMeta;return n},e.prototype.getDimensionProperty=function(t){var r=this._dimensions[t];return r&&r.property},e.prototype.appendData=function(t){var r=this._provider,n=this.count();r.appendData(t);var i=r.count();return r.persistent||(i+=n),n<i&&this._initDataFromProvider(n,i,!0),[n,i]},e.prototype.appendValues=function(t,r){for(var n=this._chunks,i=this._dimensions,a=i.length,o=this._rawExtent,s=this.count(),l=s+Math.max(t.length,r||0),u=0;u<a;u++){var c=i[u];s6(n,u,c.type,l,!0)}for(var f=[],h=s;h<l;h++)for(var d=h-s,v=0;v<a;v++){var c=i[v],m=$2.arrayRows.call(this,t[d]||f,c.property,d,v);n[v][h]=m;var y=o[v];m<y[0]&&(y[0]=m),m>y[1]&&(y[1]=m)}return this._rawCount=this._count=l,{start:s,end:l}},e.prototype._initDataFromProvider=function(t,r,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=le(o,function(_){return _.property}),c=0;c<s;c++){var f=o[c];l[c]||(l[c]=lh()),s6(a,c,f.type,r,n)}if(i.fillStorage)i.fillStorage(t,r,a,l);else for(var h=[],d=t;d<r;d++){h=i.getItem(d,h);for(var v=0;v<s;v++){var m=a[v],y=this._dimValueGetter(h,u[v],d,v);m[d]=y;var x=l[v];y<x[0]&&(x[0]=y),y>x[1]&&(x[1]=y)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=r,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(t,r){if(!(r>=0&&r<this._count))return NaN;var n=this._chunks[t];return n?n[this.getRawIndex(r)]:NaN},e.prototype.getValues=function(t,r){var n=[],i=[];if(r==null){r=t,t=[];for(var a=0;a<this._dimensions.length;a++)i.push(a)}else i=t;for(var a=0,o=i.length;a<o;a++)n.push(this.get(i[a],r));return n},e.prototype.getByRawIndex=function(t,r){if(!(r>=0&&r<this._rawCount))return NaN;var n=this._chunks[t];return n?n[r]:NaN},e.prototype.getSum=function(t){var r=this._chunks[t],n=0;if(r)for(var i=0,a=this.count();i<a;i++){var o=this.get(t,i);isNaN(o)||(n+=o)}return n},e.prototype.getMedian=function(t){var r=[];this.each([t],function(a){isNaN(a)||r.push(a)});var n=r.sort(function(a,o){return a-o}),i=this.count();return i===0?0:i%2===1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},e.prototype.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var r=this._indices,n=r[t];if(n!=null&&n<this._count&&n===t)return t;for(var i=0,a=this._count-1;i<=a;){var o=(i+a)/2|0;if(r[o]<t)i=o+1;else if(r[o]>t)a=o-1;else return o}return-1},e.prototype.getIndices=function(){var t,r=this._indices;if(r){var n=r.constructor,i=this._count;if(n===Array){t=new n(i);for(var a=0;a<i;a++)t[a]=r[a]}else t=new n(r.buffer,0,i)}else{var n=sh(this._rawCount);t=new n(this.count());for(var a=0;a<t.length;a++)t[a]=a}return t},e.prototype.filter=function(t,r){if(!this._count)return this;for(var n=this.clone(),i=n.count(),a=sh(n._rawCount),o=new a(i),s=[],l=t.length,u=0,c=t[0],f=n._chunks,h=0;h<i;h++){var d=void 0,v=n.getRawIndex(h);if(l===0)d=r(h);else if(l===1){var m=f[c][v];d=r(m,h)}else{for(var y=0;y<l;y++)s[y]=f[t[y]][v];s[y]=h,d=r.apply(null,s)}d&&(o[u++]=v)}return u<i&&(n._indices=o),n._count=u,n._extent=[],n._updateGetRawIdx(),n},e.prototype.selectRange=function(t){var r=this.clone(),n=r._count;if(!n)return this;var i=at(t),a=i.length;if(!a)return this;var o=r.count(),s=sh(r._rawCount),l=new s(o),u=0,c=i[0],f=t[c][0],h=t[c][1],d=r._chunks,v=!1;if(!r._indices){var m=0;if(a===1){for(var y=d[i[0]],x=0;x<n;x++){var _=y[x];(_>=f&&_<=h||isNaN(_))&&(l[u++]=m),m++}v=!0}else if(a===2){for(var y=d[i[0]],b=d[i[1]],S=t[i[1]][0],T=t[i[1]][1],x=0;x<n;x++){var _=y[x],C=b[x];(_>=f&&_<=h||isNaN(_))&&(C>=S&&C<=T||isNaN(C))&&(l[u++]=m),m++}v=!0}}if(!v)if(a===1)for(var x=0;x<o;x++){var A=r.getRawIndex(x),_=d[i[0]][A];(_>=f&&_<=h||isNaN(_))&&(l[u++]=A)}else for(var x=0;x<o;x++){for(var P=!0,A=r.getRawIndex(x),I=0;I<a;I++){var k=i[I],_=d[k][A];(_<t[k][0]||_>t[k][1])&&(P=!1)}P&&(l[u++]=r.getRawIndex(x))}return u<o&&(r._indices=l),r._count=u,r._extent=[],r._updateGetRawIdx(),r},e.prototype.map=function(t,r){var n=this.clone(t);return this._updateDims(n,t,r),n},e.prototype.modify=function(t,r){this._updateDims(this,t,r)},e.prototype._updateDims=function(t,r,n){for(var i=t._chunks,a=[],o=r.length,s=t.count(),l=[],u=t._rawExtent,c=0;c<r.length;c++)u[r[c]]=lh();for(var f=0;f<s;f++){for(var h=t.getRawIndex(f),d=0;d<o;d++)l[d]=i[r[d]][h];l[o]=f;var v=n&&n.apply(null,l);if(v!=null){typeof v!="object"&&(a[0]=v,v=a);for(var c=0;c<v.length;c++){var m=r[c],y=v[c],x=u[m],_=i[m];_&&(_[h]=y),y<x[0]&&(x[0]=y),y>x[1]&&(x[1]=y)}}}},e.prototype.lttbDownSample=function(t,r){var n=this.clone([t],!0),i=n._chunks,a=i[t],o=this.count(),s=0,l=Math.floor(1/r),u=this.getRawIndex(0),c,f,h,d=new(sh(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));d[s++]=u;for(var v=1;v<o-1;v+=l){for(var m=Math.min(v+l,o-1),y=Math.min(v+l*2,o),x=(y+m)/2,_=0,b=m;b<y;b++){var S=this.getRawIndex(b),T=a[S];isNaN(T)||(_+=T)}_/=y-m;var C=v,A=Math.min(v+l,o),P=v-1,I=a[u];c=-1,h=C;for(var k=-1,E=0,b=C;b<A;b++){var S=this.getRawIndex(b),T=a[S];if(isNaN(T)){E++,k<0&&(k=S);continue}f=Math.abs((P-x)*(T-I)-(P-b)*(_-I)),f>c&&(c=f,h=S)}E>0&&E<A-C&&(d[s++]=Math.min(k,h),h=Math.max(k,h)),d[s++]=h,u=h}return d[s++]=this.getRawIndex(o-1),n._count=s,n._indices=d,n.getRawIndex=this._getRawIdx,n},e.prototype.minmaxDownSample=function(t,r){for(var n=this.clone([t],!0),i=n._chunks,a=Math.floor(1/r),o=i[t],s=this.count(),l=new(sh(this._rawCount))(Math.ceil(s/a)*2),u=0,c=0;c<s;c+=a){var f=c,h=o[this.getRawIndex(f)],d=c,v=o[this.getRawIndex(d)],m=a;c+a>s&&(m=s-c);for(var y=0;y<m;y++){var x=this.getRawIndex(c+y),_=o[x];_<h&&(h=_,f=c+y),_>v&&(v=_,d=c+y)}var b=this.getRawIndex(f),S=this.getRawIndex(d);f<d?(l[u++]=b,l[u++]=S):(l[u++]=S,l[u++]=b)}return n._count=u,n._indices=l,n._updateGetRawIdx(),n},e.prototype.downSample=function(t,r,n,i){for(var a=this.clone([t],!0),o=a._chunks,s=[],l=Math.floor(1/r),u=o[t],c=this.count(),f=a._rawExtent[t]=lh(),h=new(sh(this._rawCount))(Math.ceil(c/l)),d=0,v=0;v<c;v+=l){l>c-v&&(l=c-v,s.length=l);for(var m=0;m<l;m++){var y=this.getRawIndex(v+m);s[m]=u[y]}var x=n(s),_=this.getRawIndex(Math.min(v+i(s,x)||0,c-1));u[_]=x,x<f[0]&&(f[0]=x),x>f[1]&&(f[1]=x),h[d++]=_}return a._count=d,a._indices=h,a._updateGetRawIdx(),a},e.prototype.each=function(t,r){if(this._count)for(var n=t.length,i=this._chunks,a=0,o=this.count();a<o;a++){var s=this.getRawIndex(a);switch(n){case 0:r(a);break;case 1:r(i[t[0]][s],a);break;case 2:r(i[t[0]][s],i[t[1]][s],a);break;default:for(var l=0,u=[];l<n;l++)u[l]=i[t[l]][s];u[l]=a,r.apply(null,u)}}},e.prototype.getDataExtent=function(t){var r=this._chunks[t],n=lh();if(!r)return n;var i=this.count(),a=!this._indices,o;if(a)return this._rawExtent[t].slice();if(o=this._extent[t],o)return o.slice();o=n;for(var s=o[0],l=o[1],u=0;u<i;u++){var c=this.getRawIndex(u),f=r[c];f<s&&(s=f),f>l&&(l=f)}return o=[s,l],this._extent[t]=o,o},e.prototype.getRawDataItem=function(t){var r=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(r);for(var n=[],i=this._chunks,a=0;a<i.length;a++)n.push(i[a][r]);return n},e.prototype.clone=function(t,r){var n=new e,i=this._chunks,a=t&&va(t,function(s,l){return s[l]=!0,s},{});if(a)for(var o=0;o<i.length;o++)n._chunks[o]=a[o]?oze(i[o]):i[o];else n._chunks=i;return this._copyCommonProps(n),r||(n._indices=this._cloneIndices()),n._updateGetRawIdx(),n},e.prototype._copyCommonProps=function(t){t._count=this._count,t._rawCount=this._rawCount,t._provider=this._provider,t._dimensions=this._dimensions,t._extent=Le(this._extent),t._rawExtent=Le(this._rawExtent)},e.prototype._cloneIndices=function(){if(this._indices){var t=this._indices.constructor,r=void 0;if(t===Array){var n=this._indices.length;r=new t(n);for(var i=0;i<n;i++)r[i]=this._indices[i]}else r=new t(this._indices);return r}return null},e.prototype._getRawIdxIdentity=function(t){return t},e.prototype._getRawIdx=function(t){return t<this._count&&t>=0?this._indices[t]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function t(r,n,i,a){return nu(r[a],this._dimensions[a])}$2={arrayRows:t,objectRows:function(r,n,i,a){return nu(r[n],this._dimensions[a])},keyedColumns:t,original:function(r,n,i,a){var o=r&&(r.value==null?r:r.value);return nu(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(r,n,i,a){return r[a]}}}(),e}(),oee=function(){function e(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(t,r){this._sourceList=t,this._upstreamSignList=r,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var t=this._sourceHost,r=this._getUpstreamSourceManagers(),n=!!r.length,i,a;if(Jx(t)){var o=t,s=void 0,l=void 0,u=void 0;if(n){var c=r[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,a=[c._getVersionSign()]}else s=o.get("data",!0),l=Xn(s)?ru:ji,a=[];var f=this._getSourceMetaRawOption()||{},h=u&&u.metaRawOption||{},d=Ae(f.seriesLayoutBy,h.seriesLayoutBy)||null,v=Ae(f.sourceHeader,h.sourceHeader),m=Ae(f.dimensions,h.dimensions),y=d!==h.seriesLayoutBy||!!v!=!!h.sourceHeader||m;i=y?[$I(s,{seriesLayoutBy:d,sourceHeader:v,dimensions:m},l)]:[]}else{var x=t;if(n){var _=this._applyTransform(r);i=_.sourceList,a=_.upstreamSignList}else{var b=x.get("source",!0);i=[$I(b,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(i,a)},e.prototype._applyTransform=function(t){var r=this._sourceHost,n=r.get("transform",!0),i=r.get("fromTransformResult",!0);if(i!=null){var a="";t.length!==1&&u6(a)}var o,s=[],l=[];return R(t,function(u){u.prepareSource();var c=u.getSource(i||0),f="";i!=null&&!c&&u6(f),s.push(c),l.push(u._getVersionSign())}),n?o=rze(n,s,{datasetIndex:r.componentIndex}):i!=null&&(o=[RBe(s[0])]),{sourceList:o,upstreamSignList:l}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),r=0;r<t.length;r++){var n=t[r];if(n._isDirty()||this._upstreamSignList[r]!==n._getVersionSign())return!0}},e.prototype.getSource=function(t){t=t||0;var r=this._sourceList[t];if(!r){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(t)}return r},e.prototype.getSharedDataStore=function(t){var r=t.makeStoreSchema();return this._innerGetDataStore(r.dimensions,t.source,r.hash)},e.prototype._innerGetDataStore=function(t,r,n){var i=0,a=this._storeList,o=a[i];o||(o=a[i]={});var s=o[n];if(!s){var l=this._getUpstreamSourceManagers()[0];Jx(this._sourceHost)&&l?s=l._innerGetDataStore(t,r,n):(s=new FI,s.initData(new qQ(r,t.length),t)),o[n]=s}return s},e.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if(Jx(t)){var r=hj(t);return r?[r.getSourceManager()]:[]}else return le(hBe(t),function(n){return n.getSourceManager()})},e.prototype._getSourceMetaRawOption=function(){var t=this._sourceHost,r,n,i;if(Jx(t))r=t.get("seriesLayoutBy",!0),n=t.get("sourceHeader",!0),i=t.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var a=t;r=a.get("seriesLayoutBy",!0),n=a.get("sourceHeader",!0),i=a.get("dimensions",!0)}return{seriesLayoutBy:r,sourceHeader:n,dimensions:i}},e}();function l6(e){var t=e.option.transform;t&&dy(e.option.transform)}function Jx(e){return e.mainType==="series"}function u6(e){throw new Error(e)}var sze="line-height:1";function see(e){var t=e.lineHeight;return t==null?sze:"line-height:"+Nn(t+"")+"px"}function lee(e,t){var r=e.color||J.color.tertiary,n=e.fontSize||12,i=e.fontWeight||"400",a=e.color||J.color.secondary,o=e.fontSize||14,s=e.fontWeight||"900";return t==="html"?{nameStyle:"font-size:"+Nn(n+"")+"px;color:"+Nn(r)+";font-weight:"+Nn(i+""),valueStyle:"font-size:"+Nn(o+"")+"px;color:"+Nn(a)+";font-weight:"+Nn(s+"")}:{nameStyle:{fontSize:n,fill:r,fontWeight:i},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var lze=[0,10,20,30],uze=["",`
`,`
`,`
`];function Mr(e,t){return t.type=e,t}function VI(e){return e.type==="section"}function uee(e){return VI(e)?cze:fze}function cee(e){if(VI(e)){var t=0,r=e.blocks.length,n=r>1||r>0&&!e.noHeader;return R(e.blocks,function(i){var a=cee(i);a>=t&&(t=a+ +(n&&(!a||VI(i)&&!i.noHeader)))}),t}return 0}function cze(e,t,r,n){var i=t.noHeader,a=hze(cee(t)),o=[],s=t.blocks||[];wn(!s||oe(s)),s=s||[];var l=e.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(Se(u,l)){var c=new ree(u[l],null);s.sort(function(m,y){return c.evaluate(m.sortParam,y.sortParam)})}else l==="seriesDesc"&&s.reverse()}R(s,function(m,y){var x=t.valueFormatter,_=uee(m)(x?ae(ae({},e),{valueFormatter:x}):e,m,y>0?a.html:0,n);_!=null&&o.push(_)});var f=e.renderMode==="richText"?o.join(a.richText):GI(n,o.join(""),i?r:a.html);if(i)return f;var h=jI(t.header,"ordinal",e.useUTC),d=lee(n,e.renderMode).nameStyle,v=see(n);return e.renderMode==="richText"?fee(e,h,d)+a.richText+f:GI(n,'<div style="'+d+";"+v+';">'+Nn(h)+"</div>"+f,r)}function fze(e,t,r,n){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=e.useUTC,c=t.valueFormatter||e.valueFormatter||function(S){return S=oe(S)?S:[S],le(S,function(T,C){return jI(T,oe(d)?d[C]:d,u)})};if(!(a&&o)){var f=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||J.color.secondary,i),h=a?"":jI(l,"ordinal",u),d=t.valueType,v=o?[]:c(t.value,t.dataIndex),m=!s||!a,y=!s&&a,x=lee(n,i),_=x.nameStyle,b=x.valueStyle;return i==="richText"?(s?"":f)+(a?"":fee(e,h,_))+(o?"":pze(e,v,m,y,b)):GI(n,(s?"":f)+(a?"":dze(h,!s,_))+(o?"":vze(v,m,y,b)),r)}}function c6(e,t,r,n,i,a){if(e){var o=uee(e),s={useUTC:i,renderMode:r,orderMode:n,markupStyleCreator:t,valueFormatter:e.valueFormatter};return o(s,e,0,a)}}function hze(e){return{html:lze[e],richText:uze[e]}}function GI(e,t,r){var n='<div style="clear:both"></div>',i="margin: "+r+"px 0 0",a=see(e);return'<div style="'+i+";"+a+';">'+t+n+"</div>"}function dze(e,t,r){var n=t?"margin-left:2px":"";return'<span style="'+r+";"+n+'">'+Nn(e)+"</span>"}function vze(e,t,r,n){var i=r?"10px":"20px",a=t?"float:right;margin-left:"+i:"";return e=oe(e)?e:[e],'<span style="'+a+";"+n+'">'+le(e,function(o){return Nn(o)}).join("&nbsp;&nbsp;")+"</span>"}function fee(e,t,r){return e.markupStyleCreator.wrapRichTextStyle(t,r)}function pze(e,t,r,n,i){var a=[i],o=n?10:20;return r&&a.push({padding:[0,0,0,o],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(oe(t)?t.join(" "):t,a)}function hee(e,t){var r=e.getData().getItemVisual(t,"style"),n=r[e.visualDrawType];return mf(n)}function dee(e,t){var r=e.get("padding");return r??(t==="richText"?[8,10]:10)}var F2=function(){function e(){this.richTextStyles={},this._nextStyleNameId=_J()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(t,r,n){var i=n==="richText"?this._generateStyleName():null,a=MQ({color:r,type:t,renderMode:n,markerId:i});return ye(a)?a:(this.richTextStyles[i]=a.style,a.content)},e.prototype.wrapRichTextStyle=function(t,r){var n={};oe(r)?R(r,function(a){return ae(n,a)}):ae(n,r);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},e}();function vee(e){var t=e.series,r=e.dataIndex,n=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=t.getRawValue(r),l=oe(s),u=hee(t,r),c,f,h,d;if(o>1||l&&!o){var v=gze(s,t,r,a,u);c=v.inlineValues,f=v.inlineValueTypes,h=v.blocks,d=v.inlineValues[0]}else if(o){var m=i.getDimensionInfo(a[0]);d=c=rv(i,r,a[0]),f=m.type}else d=c=l?s[0]:s;var y=LN(t),x=y&&t.name||"",_=i.getName(r),b=n?x:_;return Mr("section",{header:x,noHeader:n||!y,sortParam:d,blocks:[Mr("nameValue",{markerType:"item",markerColor:u,name:b,noName:!Ai(b),value:c,valueType:f,dataIndex:r})].concat(h||[])})}function gze(e,t,r,n,i){var a=t.getData(),o=va(e,function(f,h,d){var v=a.getDimensionInfo(d);return f=f||v&&v.tooltip!==!1&&v.displayName!=null},!1),s=[],l=[],u=[];n.length?R(n,function(f){c(rv(a,r,f),f)}):R(e,c);function c(f,h){var d=a.getDimensionInfo(h);!d||d.otherDims.tooltip===!1||(o?u.push(Mr("nameValue",{markerType:"subItem",markerColor:i,name:d.displayName,value:f,valueType:d.type})):(s.push(f),l.push(d.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var cl=et();function Qx(e,t){return e.getName(t)||e.getId(t)}var gb="__universalTransitionEnabled",Ct=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return t.prototype.init=function(r,n,i){this.seriesIndex=this.componentIndex,this.dataTask=nm({count:yze,reset:xze}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=cl(this).sourceManager=new oee(this);a.prepareSource();var o=this.getInitialData(r,i);h6(o,this),this.dataTask.context.data=o,cl(this).dataBeforeProcessed=o,f6(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(r,n){var i=Cy(this),a=i?Ef(r):{},o=this.subType;Qe.hasClass(o)&&(o+="Series"),Ue(r,n.getTheme().get(this.subType)),Ue(r,this.getDefaultOption()),ff(r,"label",["show"]),this.fillDataTextStyle(r.data),i&&Zo(r,a,i)},t.prototype.mergeOption=function(r,n){r=Ue(this.option,r,!0),this.fillDataTextStyle(r.data);var i=Cy(this);i&&Zo(this.option,r,i);var a=cl(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,n);h6(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,cl(this).dataBeforeProcessed=o,f6(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(r){if(r&&!Xn(r))for(var n=["show"],i=0;i<r.length;i++)r[i]&&r[i].label&&ff(r[i],"label",n)},t.prototype.getInitialData=function(r,n){},t.prototype.appendData=function(r){var n=this.getRawData();n.appendData(r.data)},t.prototype.getData=function(r){var n=WI(this);if(n){var i=n.context.data;return r==null||!i.getLinkedData?i:i.getLinkedData(r)}else return cl(this).data},t.prototype.getAllData=function(){var r=this.getData();return r&&r.getLinkedDataAll?r.getLinkedDataAll():[{data:r}]},t.prototype.setData=function(r){var n=WI(this);if(n){var i=n.context;i.outputData=r,n!==this.dataTask&&(i.data=r)}cl(this).data=r},t.prototype.getEncode=function(){var r=this.get("encode",!0);if(r)return Ce(r)},t.prototype.getSourceManager=function(){return cl(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return cl(this).dataBeforeProcessed},t.prototype.getColorBy=function(){var r=this.get("colorBy");return r||"series"},t.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},t.prototype.getBaseAxis=function(){var r=this.coordinateSystem;return r&&r.getBaseAxis&&r.getBaseAxis()},t.prototype.indicesOfNearest=function(r,n,i,a){var o=this.getData(),s=this.coordinateSystem,l=s&&s.getAxis(r);if(!s||!l)return[];var u=l.dataToCoord(i);a==null&&(a=1/0);var c=[],f=1/0,h=-1,d=0;return o.each(n,function(v,m){var y=l.dataToCoord(v),x=u-y,_=Math.abs(x);_<=a&&((_<f||_===f&&x>=0&&h<0)&&(f=_,h=x,d=0),x===h&&(c[d++]=m))}),c.length=d,c},t.prototype.formatTooltip=function(r,n,i){return vee({series:this,dataIndex:r,multipleSeries:n})},t.prototype.isAnimationEnabled=function(){var r=this.ecModel;if(it.node&&!(r&&r.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(r,n,i){var a=this.ecModel,o=dj.prototype.getColorFromPalette.call(this,r,n,i);return o||(o=a.getColorFromPalette(r,n,i)),o},t.prototype.coordDimToDataDim=function(r){return this.getRawData().mapDimensionsAll(r)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(r,n){this._innerSelect(this.getData(n),r)},t.prototype.unselect=function(r,n){var i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<r.length;s++){var l=r[s],u=Qx(o,l);i[u]=!1,this._selectedDataIndicesMap[u]=-1}}},t.prototype.toggleSelect=function(r,n){for(var i=[],a=0;a<r.length;a++)i[0]=r[a],this.isSelected(r[a],n)?this.unselect(i,n):this.select(i,n)},t.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var r=this._selectedDataIndicesMap,n=at(r),i=[],a=0;a<n.length;a++){var o=r[n[a]];o>=0&&i.push(o)}return i},t.prototype.isSelected=function(r,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[Qx(a,r)])&&!a.getItemModel(r).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[gb])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},t.prototype._innerSelect=function(r,n){var i,a,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){Ee(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c<l;c++){var f=n[c],h=Qx(r,f);u[h]=!0,this._selectedDataIndicesMap[h]=r.getRawIndex(f)}}else if(s==="single"||s===!0){var d=n[l-1],h=Qx(r,d);o.selectedMap=(i={},i[h]=!0,i),this._selectedDataIndicesMap=(a={},a[h]=r.getRawIndex(d),a)}}},t.prototype._initSelectedMapFromData=function(r){if(!this.option.selectedMap){var n=[];r.hasItemOption&&r.each(function(i){var a=r.getRawDataItem(i);a&&a.selected&&n.push(i)}),n.length>0&&this._innerSelect(r,n)}},t.registerClass=function(r){return Qe.registerClass(r)},t.protoInitialize=function(){var r=t.prototype;r.type="series.__base__",r.seriesIndex=0,r.ignoreStyleOnData=!1,r.hasSymbolVisual=!1,r.defaultSymbol="circle",r.visualStyleAccessPath="itemStyle",r.visualDrawType="fill"}(),t}(Qe);cr(Ct,XT);cr(Ct,dj);LJ(Ct,Qe);function f6(e){var t=e.name;LN(e)||(e.name=mze(e)||t)}function mze(e){var t=e.getRawData(),r=t.mapDimensionsAll("seriesName"),n=[];return R(r,function(i){var a=t.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function yze(e){return e.model.getRawData().count()}function xze(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),_ze}function _ze(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function h6(e,t){R(Xd(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(r){e.wrapMethod(r,We(bze,t))})}function bze(e,t){var r=WI(e);return r&&r.setOutputEnd((t||this).count()),t}function WI(e){var t=(e.ecModel||{}).scheduler,r=t&&t.getPipeline(e.uid);if(r){var n=r.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(e.uid))}return n}}var It=function(){function e(){this.group=new Ie,this.uid=Hv("viewComponent")}return e.prototype.init=function(t,r){},e.prototype.render=function(t,r,n,i){},e.prototype.dispose=function(t,r){},e.prototype.updateView=function(t,r,n,i){},e.prototype.updateLayout=function(t,r,n,i){},e.prototype.updateVisual=function(t,r,n,i){},e.prototype.toggleBlurSeries=function(t,r,n){},e.prototype.eachRendered=function(t){var r=this.group;r&&r.traverse(t)},e}();ON(It);jT(It);function Yv(){var e=et();return function(t){var r=e(t),n=t.pipelineContext,i=!!r.large,a=!!r.progressiveRender,o=r.large=!!(n&&n.large),s=r.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var pee=et(),wze=Yv(),bt=function(){function e(){this.group=new Ie,this.uid=Hv("viewChart"),this.renderTask=nm({plan:Sze,reset:Tze}),this.renderTask.context={view:this}}return e.prototype.init=function(t,r){},e.prototype.render=function(t,r,n,i){},e.prototype.highlight=function(t,r,n,i){var a=t.getData(i&&i.dataType);a&&v6(a,i,"emphasis")},e.prototype.downplay=function(t,r,n,i){var a=t.getData(i&&i.dataType);a&&v6(a,i,"normal")},e.prototype.remove=function(t,r){this.group.removeAll()},e.prototype.dispose=function(t,r){},e.prototype.updateView=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.updateLayout=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.updateVisual=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.eachRendered=function(t){Pu(this.group,t)},e.markUpdateMethod=function(t,r){pee(t).updateMethod=r},e.protoInitialize=function(){var t=e.prototype;t.type="chart"}(),e}();function d6(e,t,r){e&&wy(e)&&(t==="emphasis"?Us:Zs)(e,r)}function v6(e,t,r){var n=hf(e,t),i=t&&t.highlightKey!=null?q3e(t.highlightKey):null;n!=null?R(Lt(n),function(a){d6(e.getItemGraphicEl(a),r,i)}):e.eachItemGraphicEl(function(a){d6(a,r,i)})}ON(bt);jT(bt);function Sze(e){return wze(e.model)}function Tze(e){var t=e.model,r=e.ecModel,n=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&pee(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,r,n,i),Cze[l]}var Cze={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},Sw="\0__throttleOriginMethod",p6="\0__throttleRate",g6="\0__throttleType";function KT(e,t,r){var n,i=0,a=0,o=null,s,l,u,c;t=t||0;function f(){a=new Date().getTime(),o=null,e.apply(l,u||[])}var h=function(){for(var d=[],v=0;v<arguments.length;v++)d[v]=arguments[v];n=new Date().getTime(),l=this,u=d;var m=c||t,y=c||r;c=null,s=n-(y?i:a)-m,clearTimeout(o),y?o=setTimeout(f,m):s>=0?f():o=setTimeout(f,-s),i=n};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(d){c=d},h}function Xv(e,t,r,n){var i=e[t];if(i){var a=i[Sw]||i,o=i[g6],s=i[p6];if(s!==r||o!==n){if(r==null||!n)return e[t]=a;i=e[t]=KT(a,r,n==="debounce"),i[Sw]=a,i[g6]=n,i[p6]=r}return i}}function My(e,t){var r=e[t];r&&r[Sw]&&(r.clear&&r.clear(),e[t]=r[Sw])}var m6=et(),y6={itemStyle:df(yQ,!0),lineStyle:df(mQ,!0)},Aze={lineStyle:"stroke",itemStyle:"fill"};function gee(e,t){var r=e.visualStyleMapper||y6[t];return r||(console.warn("Unknown style type '"+t+"'."),y6.itemStyle)}function mee(e,t){var r=e.visualDrawType||Aze[t];return r||(console.warn("Unknown style type '"+t+"'."),"fill")}var Mze={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var r=e.getData(),n=e.visualStyleAccessPath||"itemStyle",i=e.getModel(n),a=gee(e,n),o=a(i),s=i.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var l=mee(e,n),u=o[l],c=ke(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||f){var h=e.getColorFromPalette(e.name,null,t.getSeriesCount());o[l]||(o[l]=h,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||ke(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||ke(o.stroke)?h:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",l),!t.isSeriesFiltered(e)&&c)return r.setVisual("colorFromPalette",!1),{dataEach:function(d,v){var m=e.getDataParams(v),y=ae({},o);y[l]=c(m),d.setItemVisual(v,"style",y)}}}},Vp=new rt,Pze={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!(e.ignoreStyleOnData||t.isSeriesFiltered(e))){var r=e.getData(),n=e.visualStyleAccessPath||"itemStyle",i=gee(e,n),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){Vp.option=l[n];var u=i(Vp),c=o.ensureUniqueItemVisual(s,"style");ae(c,u),Vp.option.decal&&(o.setItemVisual(s,"decal",Vp.option.decal),Vp.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},kze={performRawSeries:!0,overallReset:function(e){var t=Ce();e.eachSeries(function(r){var n=r.getColorBy();if(!r.isColorBySeries()){var i=r.type+"-"+n,a=t.get(i);a||(a={},t.set(i,a)),m6(r).scope=a}}),e.eachSeries(function(r){if(!(r.isColorBySeries()||e.isSeriesFiltered(r))){var n=r.getRawData(),i={},a=r.getData(),o=m6(r).scope,s=r.visualStyleAccessPath||"itemStyle",l=mee(r,s);a.each(function(u){var c=a.getRawIndex(u);i[c]=u}),n.each(function(u){var c=i[u],f=a.getItemVisual(c,"colorFromPalette");if(f){var h=a.ensureUniqueItemVisual(c,"style"),d=n.getName(u)||u+"",v=n.count();h[l]=r.getColorFromPalette(d,o,v)}})}})}},e_=Math.PI;function Lze(e,t){t=t||{},Oe(t,{text:"loading",textColor:J.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:J.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var r=new Ie,n=new qe({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});r.add(n);var i=new ot({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new qe({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});r.add(a);var o;return t.showSpinner&&(o=new g0({shape:{startAngle:-e_/2,endAngle:-e_/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:e_*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:e_*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var s=i.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(e.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),c=e.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:c}),a.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},r.resize(),r}var yee=function(){function e(t,r,n,i){this._stageTaskMap=Ce(),this.ecInstance=t,this.api=r,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return e.prototype.restoreData=function(t,r){t.restoreData(r),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},e.prototype.getPerformArgs=function(t,r){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,a=!r&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},e.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},e.prototype.updateStreamModes=function(t,r){var n=this._pipelineMap.get(t.uid),i=t.getData(),a=i.count(),o=n.progressiveEnabled&&r.incrementalPrepareRender&&a>=n.threshold,s=t.get("large")&&a>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?a:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},e.prototype.restorePipelines=function(t){var r=this,n=r._pipelineMap=Ce();t.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),r._pipe(i,i.dataTask)})},e.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,r=this.api.getModel(),n=this.api;R(this._allHandlers,function(i){var a=t.get(i.uid)||t.set(i.uid,{}),o="";wn(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,r,n),i.overallReset&&this._createOverallStageTask(i,a,r,n)},this)},e.prototype.prepareView=function(t,r,n,i){var a=t.renderTask,o=a.context;o.model=r,o.ecModel=n,o.api=i,a.__block=!t.incrementalPrepareRender,this._pipe(r,a)},e.prototype.performDataProcessorTasks=function(t,r){this._performStageTasks(this._dataProcessorHandlers,t,r,{block:!0})},e.prototype.performVisualTasks=function(t,r,n){this._performStageTasks(this._visualHandlers,t,r,n)},e.prototype._performStageTasks=function(t,r,n,i){i=i||{};var a=!1,o=this;R(t,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),f=c.seriesTaskMap,h=c.overallTask;if(h){var d,v=h.agentStubMap;v.each(function(y){s(i,y)&&(y.dirty(),d=!0)}),d&&h.dirty(),o.updatePayload(h,n);var m=o.getPerformArgs(h,i.block);v.each(function(y){y.perform(m)}),h.perform(m)&&(a=!0)}else f&&f.each(function(y,x){s(i,y)&&y.dirty();var _=o.getPerformArgs(y,i.block);_.skip=!l.performRawSeries&&r.isSeriesFiltered(y.context.model),o.updatePayload(y,n),y.perform(_)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},e.prototype.performSeriesTasks=function(t){var r;t.eachSeries(function(n){r=n.dataTask.perform()||r}),this.unfinished=r||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(t){var r=t.tail;do{if(r.__block){t.blockIndex=r.__idxInPipeline;break}r=r.getUpstream()}while(r)})},e.prototype.updatePayload=function(t,r){r!=="remain"&&(t.context.payload=r)},e.prototype._createSeriesStageTask=function(t,r,n,i){var a=this,o=r.seriesTaskMap,s=r.seriesTaskMap=Ce(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,i).each(c);function c(f){var h=f.uid,d=s.set(h,o&&o.get(h)||nm({plan:Nze,reset:jze,count:Bze}));d.context={model:f,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:a},a._pipe(f,d)}},e.prototype._createOverallStageTask=function(t,r,n,i){var a=this,o=r.overallTask=r.overallTask||nm({reset:Ize});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=Ce(),u=t.seriesType,c=t.getTargetSeries,f=!0,h=!1,d="";wn(!t.createOnAllSeries,d),u?n.eachRawSeriesByType(u,v):c?c(n,i).each(v):(f=!1,R(n.getSeries(),v));function v(m){var y=m.uid,x=l.set(y,s&&s.get(y)||(h=!0,nm({reset:Oze,onDirty:Dze})));x.context={model:m,overallProgress:f},x.agent=o,x.__block=f,a._pipe(m,x)}h&&o.dirty()},e.prototype._pipe=function(t,r){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=r),i.tail&&i.tail.pipe(r),i.tail=r,r.__idxInPipeline=i.count++,r.__pipeline=i},e.wrapStageHandler=function(t,r){return ke(t)&&(t={overallReset:t,seriesType:zze(t)}),t.uid=Hv("stageHandler"),r&&(t.visualType=r),t},e}();function Ize(e){e.overallReset(e.ecModel,e.api,e.payload)}function Oze(e){return e.overallProgress&&Eze}function Eze(){this.agent.dirty(),this.getDownstream().dirty()}function Dze(){this.agent&&this.agent.dirty()}function Nze(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function jze(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=Lt(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?le(t,function(r,n){return xee(n)}):Rze}var Rze=xee(0);function xee(e){return function(t,r){var n=r.data,i=r.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a<t.end;a++)i.dataEach(n,a);else i&&i.progress&&i.progress(t,n)}}function Bze(e){return e.data.count()}function zze(e){Tw=null;try{e(Py,_ee)}catch{}return Tw}var Py={},_ee={},Tw;bee(Py,vj);bee(_ee,HQ);Py.eachSeriesByType=Py.eachRawSeriesByType=function(e){Tw=e};Py.eachComponent=function(e){e.mainType==="series"&&e.subType&&(Tw=e.subType)};function bee(e,t){for(var r in t.prototype)e[r]=sr}var De=J.darkColor,$ze=De.background,Gp=function(){return{axisLine:{lineStyle:{color:De.axisLine}},splitLine:{lineStyle:{color:De.axisSplitLine}},splitArea:{areaStyle:{color:[De.backgroundTint,De.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:De.axisMinorSplitLine}},axisLabel:{color:De.axisLabel},axisName:{}}},x6={label:{color:De.secondary},itemStyle:{borderColor:De.borderTint},dividerLineStyle:{color:De.border}},wee={darkMode:!0,color:De.theme,backgroundColor:$ze,axisPointer:{lineStyle:{color:De.border},crossStyle:{color:De.borderShade},label:{color:De.tertiary}},legend:{textStyle:{color:De.secondary},pageTextStyle:{color:De.tertiary}},textStyle:{color:De.secondary},title:{textStyle:{color:De.primary},subtextStyle:{color:De.quaternary}},toolbox:{iconStyle:{borderColor:De.accent50}},tooltip:{backgroundColor:De.neutral20,defaultBorderColor:De.border,textStyle:{color:De.tertiary}},dataZoom:{borderColor:De.accent10,textStyle:{color:De.tertiary},brushStyle:{color:De.backgroundTint},handleStyle:{color:De.neutral00,borderColor:De.accent20},moveHandleStyle:{color:De.accent40},emphasis:{handleStyle:{borderColor:De.accent50}},dataBackground:{lineStyle:{color:De.accent30},areaStyle:{color:De.accent20}},selectedDataBackground:{lineStyle:{color:De.accent50},areaStyle:{color:De.accent30}}},visualMap:{textStyle:{color:De.secondary},handleStyle:{borderColor:De.neutral30}},timeline:{lineStyle:{color:De.accent10},label:{color:De.tertiary},controlStyle:{color:De.accent30,borderColor:De.accent30}},calendar:{itemStyle:{color:De.neutral00,borderColor:De.neutral20},dayLabel:{color:De.tertiary},monthLabel:{color:De.secondary},yearLabel:{color:De.secondary}},matrix:{x:x6,y:x6,backgroundColor:{borderColor:De.axisLine},body:{itemStyle:{borderColor:De.borderTint}}},timeAxis:Gp(),logAxis:Gp(),valueAxis:Gp(),categoryAxis:Gp(),line:{symbol:"circle"},graph:{color:De.theme},gauge:{title:{color:De.secondary},axisLine:{lineStyle:{color:[[1,De.neutral05]]}},axisLabel:{color:De.axisLabel},detail:{color:De.primary}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}},funnel:{itemStyle:{borderColor:De.background}},radar:function(){var e=Gp();return e.axisName={color:De.axisLabel},e.axisLine.lineStyle.color=De.neutral20,e}(),treemap:{breadcrumb:{itemStyle:{color:De.neutral20,textStyle:{color:De.secondary}},emphasis:{itemStyle:{color:De.neutral30}}}},sunburst:{itemStyle:{borderColor:De.background}},map:{itemStyle:{borderColor:De.border,areaColor:De.neutral10},label:{color:De.tertiary},emphasis:{label:{color:De.primary},itemStyle:{areaColor:De.highlight}},select:{label:{color:De.primary},itemStyle:{areaColor:De.highlight}}},geo:{itemStyle:{borderColor:De.border,areaColor:De.neutral10},emphasis:{label:{color:De.primary},itemStyle:{areaColor:De.highlight}},select:{label:{color:De.primary},itemStyle:{color:De.highlight}}}};wee.categoryAxis.splitLine.show=!1;var Fze=function(){function e(){}return e.prototype.normalizeQuery=function(t){var r={},n={},i={};if(ye(t)){var a=Po(t);r.mainType=a.main||null,r.subType=a.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};R(t,function(l,u){for(var c=!1,f=0;f<o.length;f++){var h=o[f],d=u.lastIndexOf(h);if(d>0&&d===u.length-h.length){var v=u.slice(0,d);v!=="data"&&(r.mainType=v,r[h.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(n[u]=l,c=!0),c||(i[u]=l)})}return{cptQuery:r,dataQuery:n,otherQuery:i}},e.prototype.filter=function(t,r){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=r.cptQuery,u=r.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,a,"name")&&c(u,a,"dataIndex")&&c(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,r.otherQuery,i,a));function c(f,h,d,v){return f[d]==null||h[v||d]===f[d]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),HI=["symbol","symbolSize","symbolRotate","symbolOffset"],_6=HI.concat(["symbolKeepAspect"]),Vze={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var r=e.getData();if(e.legendIcon&&r.setVisual("legendIcon",e.legendIcon),!e.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o<HI.length;o++){var s=HI[o],l=e.get(s);ke(l)?(a=!0,i[s]=l):n[s]=l}if(n.symbol=n.symbol||e.defaultSymbol,r.setVisual(ae({legendIcon:e.legendIcon||n.symbol,symbolKeepAspect:e.get("symbolKeepAspect")},n)),t.isSeriesFiltered(e))return;var u=at(i);function c(f,h){for(var d=e.getRawValue(h),v=e.getDataParams(h),m=0;m<u.length;m++){var y=u[m];f.setItemVisual(h,y,i[y](d,v))}}return{dataEach:a?c:null}}},Gze={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.hasSymbolVisual||t.isSeriesFiltered(e))return;var r=e.getData();function n(i,a){for(var o=i.getItemModel(a),s=0;s<_6.length;s++){var l=_6[s],u=o.getShallow(l,!0);u!=null&&i.setItemVisual(a,l,u)}}return{dataEach:r.hasItemOption?n:null}}};function xj(e,t,r){switch(r){case"color":var n=e.getItemVisual(t,"style");return n[e.getVisual("drawType")];case"opacity":return e.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getItemVisual(t,r)}}function b0(e,t){switch(t){case"color":var r=e.getVisual("style");return r[e.getVisual("drawType")];case"opacity":return e.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getVisual(t)}}function See(e,t,r,n){switch(r){case"color":var i=e.ensureUniqueItemVisual(t,"style");i[e.getVisual("drawType")]=n,e.setItemVisual(t,"colorFromPalette",!1);break;case"opacity":e.ensureUniqueItemVisual(t,"style").opacity=n;break;case"symbol":case"symbolSize":case"liftZ":e.setItemVisual(t,r,n);break}}function Tee(e,t){function r(n,i){var a=[];return n.eachComponent({mainType:"series",subType:e,query:i},function(o){a.push(o.seriesIndex)}),a}R([[e+"ToggleSelect","toggleSelect"],[e+"Select","select"],[e+"UnSelect","unselect"]],function(n){t(n[0],function(i,a,o){i=ae({},i),o.dispatchAction(ae(i,{type:n[1],seriesIndex:r(a,i)}))})})}function uh(e,t,r,n,i){var a=e+t;r.isSilent(a)||n.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=i.selected,c=0;c<u.length;c++)if(u[c].seriesIndex===s){var f=o.getData(),h=hf(f,i.fromActionPayload);r.trigger(a,{type:a,seriesId:o.id,name:oe(h)?f.getName(h[0]):f.getName(h),selected:ye(l)?l:ae({},l)})}})}function Wze(e,t,r){e.on("selectchanged",function(n){var i=r.getModel();n.isFromClick?(uh("map","selectchanged",t,i,n),uh("pie","selectchanged",t,i,n)):n.fromAction==="select"?(uh("map","selected",t,i,n),uh("pie","selected",t,i,n)):n.fromAction==="unselect"&&(uh("map","unselected",t,i,n),uh("pie","unselected",t,i,n))})}function Rc(e,t,r){for(var n;e&&!(t(e)&&(n=e,r));)e=e.__hostTarget||e.parent;return n}var Hze=Math.round(Math.random()*9),Uze=typeof Object.defineProperty=="function",Zze=function(){function e(){this._id="__ec_inner_"+Hze++}return e.prototype.get=function(t){return this._guard(t)[this._id]},e.prototype.set=function(t,r){var n=this._guard(t);return Uze?Object.defineProperty(n,this._id,{value:r,enumerable:!1,configurable:!0}):n[this._id]=r,this},e.prototype.delete=function(t){return this.has(t)?(delete this._guard(t)[this._id],!0):!1},e.prototype.has=function(t){return!!this._guard(t)[this._id]},e.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},e}(),Yze=nt.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var r=t.cx,n=t.cy,i=t.width/2,a=t.height/2;e.moveTo(r,n-a),e.lineTo(r+i,n+a),e.lineTo(r-i,n+a),e.closePath()}}),Xze=nt.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var r=t.cx,n=t.cy,i=t.width/2,a=t.height/2;e.moveTo(r,n-a),e.lineTo(r+i,n),e.lineTo(r,n+a),e.lineTo(r-i,n),e.closePath()}}),qze=nt.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var r=t.x,n=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,s=o*o/(a-o),l=n-a+o+s,u=Math.asin(s/o),c=Math.cos(u)*o,f=Math.sin(u),h=Math.cos(u),d=o*.6,v=o*.7;e.moveTo(r-c,l+s),e.arc(r,l,o,Math.PI-u,Math.PI*2+u),e.bezierCurveTo(r+c-f*d,l+s+h*d,r,n-v,r,n),e.bezierCurveTo(r,n-v,r-c+f*d,l+s+h*d,r-c,l+s),e.closePath()}}),Kze=nt.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var r=t.height,n=t.width,i=t.x,a=t.y,o=n/3*2;e.moveTo(i,a),e.lineTo(i+o,a+r),e.lineTo(i,a+r/4*3),e.lineTo(i-o,a+r),e.lineTo(i,a),e.closePath()}}),Jze={line:mr,rect:qe,roundRect:qe,square:qe,circle:Qo,diamond:Xze,pin:qze,arrow:Kze,triangle:Yze},Qze={line:function(e,t,r,n,i){i.x1=e,i.y1=t+n/2,i.x2=e+r,i.y2=t+n/2},rect:function(e,t,r,n,i){i.x=e,i.y=t,i.width=r,i.height=n},roundRect:function(e,t,r,n,i){i.x=e,i.y=t,i.width=r,i.height=n,i.r=Math.min(r,n)/4},square:function(e,t,r,n,i){var a=Math.min(r,n);i.x=e,i.y=t,i.width=a,i.height=a},circle:function(e,t,r,n,i){i.cx=e+r/2,i.cy=t+n/2,i.r=Math.min(r,n)/2},diamond:function(e,t,r,n,i){i.cx=e+r/2,i.cy=t+n/2,i.width=r,i.height=n},pin:function(e,t,r,n,i){i.x=e+r/2,i.y=t+n/2,i.width=r,i.height=n},arrow:function(e,t,r,n,i){i.x=e+r/2,i.y=t+n/2,i.width=r,i.height=n},triangle:function(e,t,r,n,i){i.cx=e+r/2,i.cy=t+n/2,i.width=r,i.height=n}},Cw={};R(Jze,function(e,t){Cw[t]=new e});var e4e=nt.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,r){var n=dw(e,t,r),i=this.shape;return i&&i.symbolType==="pin"&&t.position==="inside"&&(n.y=r.y+r.height*.4),n},buildPath:function(e,t,r){var n=t.symbolType;if(n!=="none"){var i=Cw[n];i||(n="rect",i=Cw[n]),Qze[n](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,r)}}});function t4e(e,t){if(this.type!=="image"){var r=this.style;this.__isEmptyBrush?(r.stroke=e,r.fill=t||J.color.neutral00,r.lineWidth=2):this.shape.symbolType==="line"?r.stroke=e:r.fill=e,this.markRedraw()}}function xr(e,t,r,n,i,a,o){var s=e.indexOf("empty")===0;s&&(e=e.substr(5,1).toLowerCase()+e.substr(6));var l;return e.indexOf("image://")===0?l=WN(e.slice(8),new je(t,r,n,i),o?"center":"cover"):e.indexOf("path://")===0?l=ev(e.slice(7),{},new je(t,r,n,i),o?"center":"cover"):l=new e4e({shape:{symbolType:e,x:t,y:r,width:n,height:i}}),l.__isEmptyBrush=s,l.setColor=t4e,a&&l.setColor(a),l}function qv(e){return oe(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function Nf(e,t){if(e!=null)return oe(e)||(e=[e,e]),[me(e[0],t[0])||0,me(Ae(e[1],e[0]),t[1])||0]}function Bc(e){return isFinite(e)}function r4e(e,t,r){var n=t.x==null?0:t.x,i=t.x2==null?1:t.x2,a=t.y==null?0:t.y,o=t.y2==null?0:t.y2;t.global||(n=n*r.width+r.x,i=i*r.width+r.x,a=a*r.height+r.y,o=o*r.height+r.y),n=Bc(n)?n:0,i=Bc(i)?i:1,a=Bc(a)?a:0,o=Bc(o)?o:0;var s=e.createLinearGradient(n,a,i,o);return s}function n4e(e,t,r){var n=r.width,i=r.height,a=Math.min(n,i),o=t.x==null?.5:t.x,s=t.y==null?.5:t.y,l=t.r==null?.5:t.r;t.global||(o=o*n+r.x,s=s*i+r.y,l=l*a),o=Bc(o)?o:.5,s=Bc(s)?s:.5,l=l>=0&&Bc(l)?l:.5;var u=e.createRadialGradient(o,s,0,o,s,l);return u}function UI(e,t,r){for(var n=t.type==="radial"?n4e(e,t,r):r4e(e,t,r),i=t.colorStops,a=0;a<i.length;a++)n.addColorStop(i[a].offset,i[a].color);return n}function i4e(e,t){if(e===t||!e&&!t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!0;return!1}function t_(e){return parseInt(e,10)}function Kh(e,t,r){var n=["width","height"][t],i=["clientWidth","clientHeight"][t],a=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(r[n]!=null&&r[n]!=="auto")return parseFloat(r[n]);var s=document.defaultView.getComputedStyle(e);return(e[i]||t_(s[n])||t_(e.style[n]))-(t_(s[a])||0)-(t_(s[o])||0)|0}function a4e(e,t){return!e||e==="solid"||!(t>0)?null:e==="dashed"?[4*t,2*t]:e==="dotted"?[t]:st(e)?[e]:oe(e)?e:null}function _j(e){var t=e.style,r=t.lineDash&&t.lineWidth>0&&a4e(t.lineDash,t.lineWidth),n=t.lineDashOffset;if(r){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(r=le(r,function(a){return a/i}),n/=i)}return[r,n]}var o4e=new Uo(!0);function Aw(e){var t=e.stroke;return!(t==null||t==="none"||!(e.lineWidth>0))}function b6(e){return typeof e=="string"&&e!=="none"}function Mw(e){var t=e.fill;return t!=null&&t!=="none"}function w6(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var r=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=r}else e.fill()}function S6(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var r=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=r}else e.stroke()}function ZI(e,t,r){var n=EN(t.image,t.__image,r);if(RT(n)){var i=e.createPattern(n,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*Ug),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function s4e(e,t,r,n){var i,a=Aw(r),o=Mw(r),s=r.strokePercent,l=s<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var c=t.path||o4e,f=t.__dirty;if(!n){var h=r.fill,d=r.stroke,v=o&&!!h.colorStops,m=a&&!!d.colorStops,y=o&&!!h.image,x=a&&!!d.image,_=void 0,b=void 0,S=void 0,T=void 0,C=void 0;(v||m)&&(C=t.getBoundingRect()),v&&(_=f?UI(e,h,C):t.__canvasFillGradient,t.__canvasFillGradient=_),m&&(b=f?UI(e,d,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),y&&(S=f||!t.__canvasFillPattern?ZI(e,h,t):t.__canvasFillPattern,t.__canvasFillPattern=S),x&&(T=f||!t.__canvasStrokePattern?ZI(e,d,t):t.__canvasStrokePattern,t.__canvasStrokePattern=T),v?e.fillStyle=_:y&&(S?e.fillStyle=S:o=!1),m?e.strokeStyle=b:x&&(T?e.strokeStyle=T:a=!1)}var A=t.getGlobalScale();c.setScale(A[0],A[1],t.segmentIgnoreThreshold);var P,I;e.setLineDash&&r.lineDash&&(i=_j(t),P=i[0],I=i[1]);var k=!0;(u||f&Mh)&&(c.setDPR(e.dpr),l?c.setContext(null):(c.setContext(e),k=!1),c.reset(),t.buildPath(c,t.shape,n),c.toStatic(),t.pathUpdated()),k&&c.rebuildPath(e,l?s:1),P&&(e.setLineDash(P),e.lineDashOffset=I),n||(r.strokeFirst?(a&&S6(e,r),o&&w6(e,r)):(o&&w6(e,r),a&&S6(e,r))),P&&e.setLineDash([])}function l4e(e,t,r){var n=t.__image=EN(r.image,t.__image,t,t.onload);if(!(!n||!RT(n))){var i=r.x||0,a=r.y||0,o=t.getWidth(),s=t.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),r.sWidth&&r.sHeight){var u=r.sx||0,c=r.sy||0;e.drawImage(n,u,c,r.sWidth,r.sHeight,i,a,o,s)}else if(r.sx&&r.sy){var u=r.sx,c=r.sy,f=o-u,h=s-c;e.drawImage(n,u,c,f,h,i,a,o,s)}else e.drawImage(n,i,a,o,s)}}function u4e(e,t,r){var n,i=r.text;if(i!=null&&(i+=""),i){e.font=r.font||Ws,e.textAlign=r.textAlign,e.textBaseline=r.textBaseline;var a=void 0,o=void 0;e.setLineDash&&r.lineDash&&(n=_j(t),a=n[0],o=n[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),r.strokeFirst?(Aw(r)&&e.strokeText(i,r.x,r.y),Mw(r)&&e.fillText(i,r.x,r.y)):(Mw(r)&&e.fillText(i,r.x,r.y),Aw(r)&&e.strokeText(i,r.x,r.y)),a&&e.setLineDash([])}}var T6=["shadowBlur","shadowOffsetX","shadowOffsetY"],C6=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function Cee(e,t,r,n,i){var a=!1;if(!n&&(r=r||{},t===r))return!1;if(n||t.opacity!==r.opacity){ii(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?Uc.opacity:o}(n||t.blend!==r.blend)&&(a||(ii(e,i),a=!0),e.globalCompositeOperation=t.blend||Uc.blend);for(var s=0;s<T6.length;s++){var l=T6[s];(n||t[l]!==r[l])&&(a||(ii(e,i),a=!0),e[l]=e.dpr*(t[l]||0))}return(n||t.shadowColor!==r.shadowColor)&&(a||(ii(e,i),a=!0),e.shadowColor=t.shadowColor||Uc.shadowColor),a}function A6(e,t,r,n,i){var a=ky(t,i.inHover),o=n?null:r&&ky(r,i.inHover)||{};if(a===o)return!1;var s=Cee(e,a,o,n,i);if((n||a.fill!==o.fill)&&(s||(ii(e,i),s=!0),b6(a.fill)&&(e.fillStyle=a.fill)),(n||a.stroke!==o.stroke)&&(s||(ii(e,i),s=!0),b6(a.stroke)&&(e.strokeStyle=a.stroke)),(n||a.opacity!==o.opacity)&&(s||(ii(e,i),s=!0),e.globalAlpha=a.opacity==null?1:a.opacity),t.hasStroke()){var l=a.lineWidth,u=l/(a.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==u&&(s||(ii(e,i),s=!0),e.lineWidth=u)}for(var c=0;c<C6.length;c++){var f=C6[c],h=f[0];(n||a[h]!==o[h])&&(s||(ii(e,i),s=!0),e[h]=a[h]||f[1])}return s}function c4e(e,t,r,n,i){return Cee(e,ky(t,i.inHover),r&&ky(r,i.inHover),n,i)}function Aee(e,t){var r=t.transform,n=e.dpr||1;r?e.setTransform(n*r[0],n*r[1],n*r[2],n*r[3],n*r[4],n*r[5]):e.setTransform(n,0,0,n,0,0)}function f4e(e,t,r){for(var n=!1,i=0;i<e.length;i++){var a=e[i];n=n||a.isZeroArea(),Aee(t,a),t.beginPath(),a.buildPath(t,a.shape),t.clip()}r.allClipped=n}function h4e(e,t){return e&&t?e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||e[4]!==t[4]||e[5]!==t[5]:!(!e&&!t)}var M6=1,P6=2,k6=3,L6=4;function d4e(e){var t=Mw(e),r=Aw(e);return!(e.lineDash||!(+t^+r)||t&&typeof e.fill!="string"||r&&typeof e.stroke!="string"||e.strokePercent<1||e.strokeOpacity<1||e.fillOpacity<1)}function ii(e,t){t.batchFill&&e.fill(),t.batchStroke&&e.stroke(),t.batchFill="",t.batchStroke=""}function ky(e,t){return t&&e.__hoverStyle||e.style}function bj(e,t){zc(e,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function zc(e,t,r,n){var i=t.transform;if(!t.shouldBePainted(r.viewWidth,r.viewHeight,!1,!1)){t.__dirty&=~Si,t.__isRendered=!1;return}var a=t.__clipPaths,o=r.prevElClipPaths,s=!1,l=!1;if((!o||i4e(a,o))&&(o&&o.length&&(ii(e,r),e.restore(),l=s=!0,r.prevElClipPaths=null,r.allClipped=!1,r.prevEl=null),a&&a.length&&(ii(e,r),e.save(),f4e(a,e,r),s=!0),r.prevElClipPaths=a),r.allClipped){t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var u=r.prevEl;u||(l=s=!0);var c=t instanceof nt&&t.autoBatch&&d4e(t.style);s||h4e(i,u.transform)?(ii(e,r),Aee(e,t)):c||ii(e,r);var f=ky(t,r.inHover);t instanceof nt?(r.lastDrawType!==M6&&(l=!0,r.lastDrawType=M6),A6(e,t,u,l,r),(!c||!r.batchFill&&!r.batchStroke)&&e.beginPath(),s4e(e,t,f,c),c&&(r.batchFill=f.fill||"",r.batchStroke=f.stroke||"")):t instanceof Qd?(r.lastDrawType!==k6&&(l=!0,r.lastDrawType=k6),A6(e,t,u,l,r),u4e(e,t,f)):t instanceof Jr?(r.lastDrawType!==P6&&(l=!0,r.lastDrawType=P6),c4e(e,t,u,l,r),l4e(e,t,f)):t.getTemporalDisplayables&&(r.lastDrawType!==L6&&(l=!0,r.lastDrawType=L6),v4e(e,t,r)),c&&n&&ii(e,r),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),r.prevEl=t,t.__dirty=0,t.__isRendered=!0}function v4e(e,t,r){var n=t.getDisplayables(),i=t.getTemporalDisplayables();e.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:r.viewWidth,viewHeight:r.viewHeight,inHover:r.inHover},o,s;for(o=t.getCursor(),s=n.length;o<s;o++){var l=n[o];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),zc(e,l,a,o===s-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}for(var u=0,c=i.length;u<c;u++){var l=i[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),zc(e,l,a,u===c-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}var V2=new Zze,I6=new qd(100),O6=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function nv(e,t){if(e==="none")return null;var r=t.getDevicePixelRatio(),n=t.getZr(),i=n.painter.type==="svg";e.dirty&&V2.delete(e);var a=V2.get(e);if(a)return a;var o=Oe(e,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});o.backgroundColor==="none"&&(o.backgroundColor=null);var s={repeat:"repeat"};return l(s),s.rotation=o.rotation,s.scaleX=s.scaleY=i?1:1/r,V2.set(e,s),e.dirty=!1,s;function l(u){for(var c=[r],f=!0,h=0;h<O6.length;++h){var d=o[O6[h]];if(d!=null&&!oe(d)&&!ye(d)&&!st(d)&&typeof d!="boolean"){f=!1;break}c.push(d)}var v;if(f){v=c.join(",")+(i?"-svg":"");var m=I6.get(v);m&&(i?u.svgElement=m:u.image=m)}var y=Pee(o.dashArrayX),x=p4e(o.dashArrayY),_=Mee(o.symbol),b=g4e(y),S=kee(x),T=!i&&fi.createCanvas(),C=i&&{tag:"g",attrs:{},key:"dcl",children:[]},A=I(),P;T&&(T.width=A.width*r,T.height=A.height*r,P=T.getContext("2d")),k(),f&&I6.put(v,T||C),u.image=T,u.svgElement=C,u.svgWidth=A.width,u.svgHeight=A.height;function I(){for(var E=1,D=0,N=b.length;D<N;++D)E=YF(E,b[D]);for(var z=1,D=0,N=_.length;D<N;++D)z=YF(z,_[D].length);E*=z;var V=S*b.length*_.length;return{width:Math.max(1,Math.min(E,o.maxTileWidth)),height:Math.max(1,Math.min(V,o.maxTileHeight))}}function k(){P&&(P.clearRect(0,0,T.width,T.height),o.backgroundColor&&(P.fillStyle=o.backgroundColor,P.fillRect(0,0,T.width,T.height)));for(var E=0,D=0;D<x.length;++D)E+=x[D];if(E<=0)return;for(var N=-S,z=0,V=0,F=0;N<A.height;){if(z%2===0){for(var $=V/2%_.length,B=0,H=0,U=0;B<A.width*2;){for(var Y=0,D=0;D<y[F].length;++D)Y+=y[F][D];if(Y<=0)break;if(H%2===0){var Z=(1-o.symbolSize)*.5,Q=B+y[F][H]*Z,re=N+x[z]*Z,ue=y[F][H]*o.symbolSize,de=x[z]*o.symbolSize,Re=U/2%_[$].length;xe(Q,re,ue,de,_[$][Re])}B+=y[F][H],++U,++H,H===y[F].length&&(H=0)}++F,F===y.length&&(F=0)}N+=x[z],++V,++z,z===x.length&&(z=0)}function xe(ie,ve,ce,X,te){var pe=i?1:r,Te=xr(te,ie*pe,ve*pe,ce*pe,X*pe,o.color,o.symbolKeepAspect);if(i){var Me=n.painter.renderOneToVNode(Te);Me&&C.children.push(Me)}else bj(P,Te)}}}}function Mee(e){if(!e||e.length===0)return[["rect"]];if(ye(e))return[[e]];for(var t=!0,r=0;r<e.length;++r)if(!ye(e[r])){t=!1;break}if(t)return Mee([e]);for(var n=[],r=0;r<e.length;++r)ye(e[r])?n.push([e[r]]):n.push(e[r]);return n}function Pee(e){if(!e||e.length===0)return[[0,0]];if(st(e)){var t=Math.ceil(e);return[[t,t]]}for(var r=!0,n=0;n<e.length;++n)if(!st(e[n])){r=!1;break}if(r)return Pee([e]);for(var i=[],n=0;n<e.length;++n)if(st(e[n])){var t=Math.ceil(e[n]);i.push([t,t])}else{var t=le(e[n],function(s){return Math.ceil(s)});t.length%2===1?i.push(t.concat(t)):i.push(t)}return i}function p4e(e){if(!e||typeof e=="object"&&e.length===0)return[0,0];if(st(e)){var t=Math.ceil(e);return[t,t]}var r=le(e,function(n){return Math.ceil(n)});return e.length%2?r.concat(r):r}function g4e(e){return le(e,function(t){return kee(t)})}function kee(e){for(var t=0,r=0;r<e.length;++r)t+=e[r];return e.length%2===1?t*2:t}function m4e(e,t){e.eachRawSeries(function(r){if(!e.isSeriesFiltered(r)){var n=r.getData();n.hasItemVisual()&&n.each(function(o){var s=n.getItemVisual(o,"decal");if(s){var l=n.ensureUniqueItemVisual(o,"style");l.decal=nv(s,t)}});var i=n.getVisual("decal");if(i){var a=n.getVisual("style");a.decal=nv(i,t)}}})}var Ia=new _a,Lee={};function y4e(e,t){Lee[e]=t}function Iee(e){return Lee[e]}var Oee={};function Eee(e,t){Oee[e]=t}function x4e(e){return Oee[e]}var _4e="6.0.0",b4e={zrender:"6.0.0"},w4e=1,S4e=800,T4e=900,C4e=1e3,A4e=2e3,M4e=5e3,Dee=1e3,P4e=1100,wj=2e3,Nee=3e3,k4e=4e3,JT=4500,L4e=4600,I4e=5e3,O4e=6e3,jee=7e3,Ree={PROCESSOR:{FILTER:C4e,SERIES_FILTER:S4e,STATISTIC:M4e},VISUAL:{LAYOUT:Dee,PROGRESSIVE_LAYOUT:P4e,GLOBAL:wj,CHART:Nee,POST_CHART_LAYOUT:L4e,COMPONENT:k4e,BRUSH:I4e,CHART_ITEM:JT,ARIA:O4e,DECAL:jee}},Ir="__flagInMainProcess",r_="__mainProcessVersion",en="__pendingUpdate",G2="__needsUpdateStatus",E6=/^[a-zA-Z0-9_]+$/,W2="__connectUpdateStatus",D6=0,E4e=1,D4e=2;function Bee(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(this.isDisposed()){this.id;return}return $ee(this,e,t)}}function zee(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return $ee(this,e,t)}}function $ee(e,t,r){return r[0]=r[0]&&r[0].toLowerCase(),_a.prototype[t].apply(e,r)}var Fee=function(e){K(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(_a),Vee=Fee.prototype;Vee.on=zee("on");Vee.off=zee("off");var ac,H2,n_,ls,i_,U2,Z2,ch,fh,N6,j6,Y2,R6,a_,B6,Gee,Wi,z6,hh,Pw=function(e){K(t,e);function t(r,n,i){var a=e.call(this,new Fze)||this;a._chartsViews=[],a._chartsMap={},a._componentsViews=[],a._componentsMap={},a._pendingActions=[],i=i||{},a._dom=r;var o="canvas",s="auto",l=!1;a[r_]=1,i.ssr&&pJ(function(h){var d=ze(h),v=d.dataIndex;if(v!=null){var m=Ce();return m.set("series_index",d.seriesIndex),m.set("data_index",v),d.ssrType&&m.set("ssr_type",d.ssrType),m}});var u=a._zr=pI(r,{renderer:i.renderer||o,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height,ssr:i.ssr,useDirtyRect:Ae(i.useDirtyRect,l),useCoarsePointer:Ae(i.useCoarsePointer,s),pointerSize:i.pointerSize});a._ssr=i.ssr,a._throttledZrFlush=KT(_e(u.flush,u),17),a._updateTheme(n),a._locale=$5e(i.locale||xQ),a._coordSysMgr=new Zv;var c=a._api=B6(a);function f(h,d){return h.__prio-d.__prio}return nb(Lw,f),nb(qI,f),a._scheduler=new yee(a,c,qI,Lw),a._messageCenter=new Fee,a._initEvents(),a.resize=_e(a.resize,a),u.animation.on("frame",a._onframe,a),N6(u,a),j6(u,a),dy(a),a}return t.prototype._onframe=function(){if(!this._disposed){z6(this);var r=this._scheduler;if(this[en]){var n=this[en].silent;this[Ir]=!0,hh(this);try{ac(this),ls.update.call(this,null,this[en].updateParams)}catch(l){throw this[Ir]=!1,this[en]=null,l}this._zr.flush(),this[Ir]=!1,this[en]=null,ch.call(this,n),fh.call(this,n)}else if(r.unfinished){var i=w4e,a=this._model,o=this._api;r.unfinished=!1;do{var s=+new Date;r.performSeriesTasks(a),r.performDataProcessorTasks(a),U2(this,a),r.performVisualTasks(a),a_(this,this._model,o,"remain",{}),i-=+new Date-s}while(i>0&&r.unfinished);r.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(r,n,i){if(!this[Ir]){if(this._disposed){this.id;return}var a,o,s;if(Ee(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[Ir]=!0,hh(this),!this._model||n){var l=new SBe(this._api),u=this._theme,c=this._model=new vj;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(r,{replaceMerge:o},KI);var f={seriesTransition:s,optionChanged:!0};if(i)this[en]={silent:a,updateParams:f},this[Ir]=!1,this.getZr().wakeUp();else{try{ac(this),ls.update.call(this,null,f)}catch(h){throw this[en]=null,this[Ir]=!1,h}this._ssr||this._zr.flush(),this[en]=null,this[Ir]=!1,ch.call(this,a),fh.call(this,a)}}},t.prototype.setTheme=function(r,n){if(!this[Ir]){if(this._disposed){this.id;return}var i=this._model;if(i){var a=n&&n.silent,o=null;this[en]&&(a==null&&(a=this[en].silent),o=this[en].updateParams,this[en]=null),this[Ir]=!0,hh(this);try{this._updateTheme(r),i.setTheme(this._theme),ac(this),ls.update.call(this,{type:"setTheme"},o)}catch(s){throw this[Ir]=!1,s}this[Ir]=!1,ch.call(this,a),fh.call(this,a)}}},t.prototype._updateTheme=function(r){ye(r)&&(r=Wee[r]),r&&(r=Le(r),r&&ZQ(r,!0),this._theme=r)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||it.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(r){return this.renderToCanvas(r)},t.prototype.renderToCanvas=function(r){r=r||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:r.backgroundColor||this._model.get("backgroundColor"),pixelRatio:r.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(r){r=r||{};var n=this._zr.painter;return n.renderToString({useViewBox:r.useViewBox})},t.prototype.getSvgDataURL=function(){var r=this._zr,n=r.storage.getDisplayList();return R(n,function(i){i.stopAnimation(null,!0)}),r.painter.toDataURL()},t.prototype.getDataURL=function(r){if(this._disposed){this.id;return}r=r||{};var n=r.excludeComponents,i=this._model,a=[],o=this;R(n,function(l){i.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(a.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(r).toDataURL("image/"+(r&&r.type||"png"));return R(a,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(r){if(this._disposed){this.id;return}var n=r.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(Iw[i]){var l=s,u=s,c=-s,f=-s,h=[],d=r&&r.pixelRatio||this.getDevicePixelRatio();R(Xc,function(b,S){if(b.group===i){var T=n?b.getZr().painter.getSvgDom().innerHTML:b.renderToCanvas(Le(r)),C=b.getDom().getBoundingClientRect();l=a(C.left,l),u=a(C.top,u),c=o(C.right,c),f=o(C.bottom,f),h.push({dom:T,left:C.left,top:C.top})}}),l*=d,u*=d,c*=d,f*=d;var v=c-l,m=f-u,y=fi.createCanvas(),x=pI(y,{renderer:n?"svg":"canvas"});if(x.resize({width:v,height:m}),n){var _="";return R(h,function(b){var S=b.left-l,T=b.top-u;_+='<g transform="translate('+S+","+T+')">'+b.dom+"</g>"}),x.painter.getSvgRoot().innerHTML=_,r.connectedBackgroundColor&&x.painter.setBackgroundColor(r.connectedBackgroundColor),x.refreshImmediately(),x.painter.toDataURL()}else return r.connectedBackgroundColor&&x.add(new qe({shape:{x:0,y:0,width:v,height:m},style:{fill:r.connectedBackgroundColor}})),R(h,function(b){var S=new Jr({style:{x:b.left*d-l,y:b.top*d-u,image:b.dom}});x.add(S)}),x.refreshImmediately(),y.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},t.prototype.convertToPixel=function(r,n,i){return i_(this,"convertToPixel",r,n,i)},t.prototype.convertToLayout=function(r,n,i){return i_(this,"convertToLayout",r,n,i)},t.prototype.convertFromPixel=function(r,n,i){return i_(this,"convertFromPixel",r,n,i)},t.prototype.containPixel=function(r,n){if(this._disposed){this.id;return}var i=this._model,a,o=dd(i,r);return R(o,function(s,l){l.indexOf("Models")>=0&&R(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)a=a||!!c.containPoint(n);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint&&(a=a||f.containPoint(n,u))}},this)},this),!!a},t.prototype.getVisual=function(r,n){var i=this._model,a=dd(i,r,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?xj(s,l,n):b0(s,n)},t.prototype.getViewOfComponentModel=function(r){return this._componentsMap[r.__viewId]},t.prototype.getViewOfSeriesModel=function(r){return this._chartsMap[r.__viewId]},t.prototype._initEvents=function(){var r=this;R(N4e,function(i){var a=function(o){var s=r.getModel(),l=o.target,u,c=i==="globalout";if(c?u={}:l&&Rc(l,function(m){var y=ze(m);if(y&&y.dataIndex!=null){var x=y.dataModel||s.getSeriesByIndex(y.seriesIndex);return u=x&&x.getDataParams(y.dataIndex,y.dataType,l)||{},!0}else if(y.eventData)return u=ae({},y.eventData),!0},!0),u){var f=u.componentType,h=u.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",h=u.seriesIndex);var d=f&&h!=null&&s.getComponent(f,h),v=d&&r[d.mainType==="series"?"_chartsMap":"_componentsMap"][d.__viewId];u.event=o,u.type=i,r._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:d,view:v},r.trigger(i,u)}};a.zrEventfulCallAtLast=!0,r._zr.on(i,a,r)});var n=this._messageCenter;R(XI,function(i,a){n.on(a,function(o){r.trigger(a,o)})}),Wze(n,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var r=this.getDom();r&&MJ(this.getDom(),Tj,"");var n=this,i=n._api,a=n._model;R(n._componentsViews,function(o){o.dispose(a,i)}),R(n._chartsViews,function(o){o.dispose(a,i)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete Xc[n.id]},t.prototype.resize=function(r){if(!this[Ir]){if(this._disposed){this.id;return}this._zr.resize(r);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=r&&r.silent;this[en]&&(a==null&&(a=this[en].silent),i=!0,this[en]=null),this[Ir]=!0,hh(this);try{i&&ac(this),ls.update.call(this,{type:"resize",animation:ae({duration:0},r&&r.animation)})}catch(o){throw this[Ir]=!1,o}this[Ir]=!1,ch.call(this,a),fh.call(this,a)}}},t.prototype.showLoading=function(r,n){if(this._disposed){this.id;return}if(Ee(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!!JI[r]){var i=JI[r](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(r){var n=ae({},r);return n.type=YI[r.type],n},t.prototype.dispatchAction=function(r,n){if(this._disposed){this.id;return}if(Ee(n)||(n={silent:!!n}),!!kw[r.type]&&this._model){if(this[Ir]){this._pendingActions.push(r);return}var i=n.silent;Z2.call(this,r,i);var a=n.flush;a?this._zr.flush():a!==!1&&it.browser.weChat&&this._throttledZrFlush(),ch.call(this,i),fh.call(this,i)}},t.prototype.updateLabelLayout=function(){Ia.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(r){if(this._disposed){this.id;return}var n=r.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);a.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){ac=function(f){var h=f._scheduler;h.restorePipelines(f._model),h.prepareStageTasks(),H2(f,!0),H2(f,!1),h.plan()},H2=function(f,h){for(var d=f._model,v=f._scheduler,m=h?f._componentsViews:f._chartsViews,y=h?f._componentsMap:f._chartsMap,x=f._zr,_=f._api,b=0;b<m.length;b++)m[b].__alive=!1;h?d.eachComponent(function(C,A){C!=="series"&&S(A)}):d.eachSeries(S);function S(C){var A=C.__requireNewView;C.__requireNewView=!1;var P="_ec_"+C.id+"_"+C.type,I=!A&&y[P];if(!I){var k=Po(C.type),E=h?It.getClass(k.main,k.sub):bt.getClass(k.sub);I=new E,I.init(d,_),y[P]=I,m.push(I),x.add(I.group)}C.__viewId=I.__id=P,I.__alive=!0,I.__model=C,I.group.__ecComponentInfo={mainType:C.mainType,index:C.componentIndex},!h&&v.prepareView(I,C,d,_)}for(var b=0;b<m.length;){var T=m[b];T.__alive?b++:(!h&&T.renderTask.dispose(),x.remove(T.group),T.dispose(d,_),m.splice(b,1),y[T.__id]===T&&delete y[T.__id],T.__id=T.group.__ecComponentInfo=null)}},n_=function(f,h,d,v,m){var y=f._model;if(y.setUpdatePayload(d),!v){R([].concat(f._componentsViews).concat(f._chartsViews),T);return}var x={};x[v+"Id"]=d[v+"Id"],x[v+"Index"]=d[v+"Index"],x[v+"Name"]=d[v+"Name"];var _={mainType:v,query:x};m&&(_.subType=m);var b=d.excludeSeriesId,S;b!=null&&(S=Ce(),R(Lt(b),function(C){var A=Dr(C,null);A!=null&&S.set(A,!0)})),y&&y.eachComponent(_,function(C){var A=S&&S.get(C.id)!=null;if(!A)if(SV(d))if(C instanceof Ct)d.type===Zc&&!d.notBlur&&!C.get(["emphasis","disabled"])&&V3e(C,d,f._api);else{var P=$N(C.mainType,C.componentIndex,d.name,f._api),I=P.focusSelf,k=P.dispatchers;d.type===Zc&&I&&!d.notBlur&&MI(C.mainType,C.componentIndex,f._api),k&&R(k,function(E){d.type===Zc?Us(E):Zs(E)})}else kI(d)&&C instanceof Ct&&(H3e(C,d,f._api),bV(C),Wi(f))},f),y&&y.eachComponent(_,function(C){var A=S&&S.get(C.id)!=null;A||T(f[v==="series"?"_chartsMap":"_componentsMap"][C.__viewId])},f);function T(C){C&&C.__alive&&C[h]&&C[h](C.__model,y,f._api,d)}},ls={prepareAndUpdate:function(f){ac(this),ls.update.call(this,f,f&&{optionChanged:f.newOption!=null})},update:function(f,h){var d=this._model,v=this._api,m=this._zr,y=this._coordSysMgr,x=this._scheduler;if(d){d.setUpdatePayload(f),x.restoreData(d,f),x.performSeriesTasks(d),y.create(d,v),x.performDataProcessorTasks(d,f),U2(this,d),y.update(d,v),n(d),x.performVisualTasks(d,f);var _=d.get("backgroundColor")||"transparent";m.setBackgroundColor(_);var b=d.get("darkMode");b!=null&&b!=="auto"&&m.setDarkMode(b),Y2(this,d,v,f,h),Ia.trigger("afterupdate",d,v)}},updateTransform:function(f){var h=this,d=this._model,v=this._api;if(d){d.setUpdatePayload(f);var m=[];d.eachComponent(function(x,_){if(x!=="series"){var b=h.getViewOfComponentModel(_);if(b&&b.__alive)if(b.updateTransform){var S=b.updateTransform(_,d,v,f);S&&S.update&&m.push(b)}else m.push(b)}});var y=Ce();d.eachSeries(function(x){var _=h._chartsMap[x.__viewId];if(_.updateTransform){var b=_.updateTransform(x,d,v,f);b&&b.update&&y.set(x.uid,1)}else y.set(x.uid,1)}),n(d),this._scheduler.performVisualTasks(d,f,{setDirty:!0,dirtyMap:y}),a_(this,d,v,f,{},y),Ia.trigger("afterupdate",d,v)}},updateView:function(f){var h=this._model;h&&(h.setUpdatePayload(f),bt.markUpdateMethod(f,"updateView"),n(h),this._scheduler.performVisualTasks(h,f,{setDirty:!0}),Y2(this,h,this._api,f,{}),Ia.trigger("afterupdate",h,this._api))},updateVisual:function(f){var h=this,d=this._model;d&&(d.setUpdatePayload(f),d.eachSeries(function(v){v.getData().clearAllVisual()}),bt.markUpdateMethod(f,"updateVisual"),n(d),this._scheduler.performVisualTasks(d,f,{visualType:"visual",setDirty:!0}),d.eachComponent(function(v,m){if(v!=="series"){var y=h.getViewOfComponentModel(m);y&&y.__alive&&y.updateVisual(m,d,h._api,f)}}),d.eachSeries(function(v){var m=h._chartsMap[v.__viewId];m.updateVisual(v,d,h._api,f)}),Ia.trigger("afterupdate",d,this._api))},updateLayout:function(f){ls.update.call(this,f)}};function r(f,h,d,v,m){if(f._disposed){f.id;return}for(var y=f._model,x=f._coordSysMgr.getCoordinateSystems(),_,b=dd(y,d),S=0;S<x.length;S++){var T=x[S];if(T[h]&&(_=T[h](y,b,v,m))!=null)return _}}i_=r,U2=function(f,h){var d=f._chartsMap,v=f._scheduler;h.eachSeries(function(m){v.updateStreamModes(m,d[m.__viewId])})},Z2=function(f,h){var d=this,v=this.getModel(),m=f.type,y=f.escapeConnect,x=kw[m],_=(x.update||"update").split(":"),b=_.pop(),S=_[0]!=null&&Po(_[0]);this[Ir]=!0,hh(this);var T=[f],C=!1;f.batch&&(C=!0,T=le(f.batch,function(F){return F=Oe(ae({},F),f),F.batch=null,F}));var A=[],P,I=[],k=x.nonRefinedEventType,E=kI(f),D=SV(f);if(D&&XJ(this._api),R(T,function(F){var $=x.action(F,v,d._api);if(x.refineEvent?I.push($):P=$,P=P||ae({},F),P.type=k,A.push(P),D){var B=IN(f),H=B.queryOptionMap,U=B.mainTypeSpecified,Y=U?H.keys()[0]:"series";n_(d,b,F,Y),Wi(d)}else E?(n_(d,b,F,"series"),Wi(d)):S&&n_(d,b,F,S.main,S.sub)}),b!=="none"&&!D&&!E&&!S)try{this[en]?(ac(this),ls.update.call(this,f),this[en]=null):ls[b].call(this,f)}catch(F){throw this[Ir]=!1,F}if(C?P={type:k,escapeConnect:y,batch:A}:P=A[0],this[Ir]=!1,!h){var N=void 0;if(x.refineEvent){var z=x.refineEvent(I,f,v,this._api).eventContent;wn(Ee(z)),N=Oe({type:x.refinedEventType},z),N.fromAction=f.type,N.fromActionPayload=f,N.escapeConnect=!0}var V=this._messageCenter;V.trigger(P.type,P),N&&V.trigger(N.type,N)}},ch=function(f){for(var h=this._pendingActions;h.length;){var d=h.shift();Z2.call(this,d,f)}},fh=function(f){!f&&this.trigger("updated")},N6=function(f,h){f.on("rendered",function(d){h.trigger("rendered",d),f.animation.isFinished()&&!h[en]&&!h._scheduler.unfinished&&!h._pendingActions.length&&h.trigger("finished")})},j6=function(f,h){f.on("mouseover",function(d){var v=d.target,m=Rc(v,wy);m&&(G3e(m,d,h._api),Wi(h))}).on("mouseout",function(d){var v=d.target,m=Rc(v,wy);m&&(W3e(m,d,h._api),Wi(h))}).on("click",function(d){var v=d.target,m=Rc(v,function(_){return ze(_).dataIndex!=null},!0);if(m){var y=m.selected?"unselect":"select",x=ze(m);h._api.dispatchAction({type:y,dataType:x.dataType,dataIndexInside:x.dataIndex,seriesIndex:x.seriesIndex,isFromClick:!0})}})};function n(f){f.clearColorPalette(),f.eachSeries(function(h){h.clearColorPalette()})}function i(f){var h=[],d=[],v=!1;if(f.eachComponent(function(_,b){var S=b.get("zlevel")||0,T=b.get("z")||0,C=b.getZLevelKey();v=v||!!C,(_==="series"?d:h).push({zlevel:S,z:T,idx:b.componentIndex,type:_,key:C})}),v){var m=h.concat(d),y,x;nb(m,function(_,b){return _.zlevel===b.zlevel?_.z-b.z:_.zlevel-b.zlevel}),R(m,function(_){var b=f.getComponent(_.type,_.idx),S=_.zlevel,T=_.key;y!=null&&(S=Math.max(y,S)),T?(S===y&&T!==x&&S++,x=T):x&&(S===y&&S++,x=""),y=S,b.setZLevel(S)})}}Y2=function(f,h,d,v,m){i(h),R6(f,h,d,v,m),R(f._chartsViews,function(y){y.__alive=!1}),a_(f,h,d,v,m),R(f._chartsViews,function(y){y.__alive||y.remove(h,d)})},R6=function(f,h,d,v,m,y){R(y||f._componentsViews,function(x){var _=x.__model;u(_,x),x.render(_,h,d,v),l(_,x),c(_,x)})},a_=function(f,h,d,v,m,y){var x=f._scheduler;m=ae(m||{},{updatedSeries:h.getSeries()}),Ia.trigger("series:beforeupdate",h,d,m);var _=!1;h.eachSeries(function(b){var S=f._chartsMap[b.__viewId];S.__alive=!0;var T=S.renderTask;x.updatePayload(T,v),u(b,S),y&&y.get(b.uid)&&T.dirty(),T.perform(x.getPerformArgs(T))&&(_=!0),S.group.silent=!!b.get("silent"),s(b,S),bV(b)}),x.unfinished=_||x.unfinished,Ia.trigger("series:layoutlabels",h,d,m),Ia.trigger("series:transition",h,d,m),h.eachSeries(function(b){var S=f._chartsMap[b.__viewId];l(b,S),c(b,S)}),o(f,h),Ia.trigger("series:afterupdate",h,d,m)},Wi=function(f){f[G2]=!0,f.getZr().wakeUp()},hh=function(f){f[r_]=(f[r_]+1)%1e3},z6=function(f){f[G2]&&(f.getZr().storage.traverse(function(h){vd(h)||a(h)}),f[G2]=!1)};function a(f){for(var h=[],d=f.currentStates,v=0;v<d.length;v++){var m=d[v];m==="emphasis"||m==="blur"||m==="select"||h.push(m)}f.selected&&f.states.select&&h.push("select"),f.hoverState===VT&&f.states.emphasis?h.push("emphasis"):f.hoverState===v0&&f.states.blur&&h.push("blur"),f.useStates(h)}function o(f,h){var d=f._zr,v=d.storage,m=0;v.traverse(function(y){y.isGroup||m++}),m>h.get("hoverLayerThreshold")&&!it.node&&!it.worker&&h.eachSeries(function(y){if(!y.preventUsingHoverLayer){var x=f._chartsMap[y.__viewId];x.__alive&&x.eachRendered(function(_){_.states.emphasis&&(_.states.emphasis.hoverLayer=!0)})}})}function s(f,h){var d=f.get("blendMode")||null;h.eachRendered(function(v){v.isGroup||(v.style.blend=d)})}function l(f,h){if(!f.preventAutoZ){var d=gf(f);h.eachRendered(function(v){return HT(v,d.z,d.zlevel),!0})}}function u(f,h){h.eachRendered(function(d){if(!vd(d)){var v=d.getTextContent(),m=d.getTextGuideLine();d.stateTransition&&(d.stateTransition=null),v&&v.stateTransition&&(v.stateTransition=null),m&&m.stateTransition&&(m.stateTransition=null),d.hasState()?(d.prevStates=d.currentStates,d.clearStates()):d.prevStates&&(d.prevStates=null)}})}function c(f,h){var d=f.getModel("stateAnimation"),v=f.isAnimationEnabled(),m=d.get("duration"),y=m>0?{duration:m,delay:d.get("delay"),easing:d.get("easing")}:null;h.eachRendered(function(x){if(x.states&&x.states.emphasis){if(vd(x))return;if(x instanceof nt&&K3e(x),x.__dirty){var _=x.prevStates;_&&x.useStates(_)}if(v){x.stateTransition=y;var b=x.getTextContent(),S=x.getTextGuideLine();b&&(b.stateTransition=y),S&&(S.stateTransition=y)}x.__dirty&&a(x)}})}B6=function(f){return new(function(h){K(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},d.prototype.getComponentByElement=function(v){for(;v;){var m=v.__ecComponentInfo;if(m!=null)return f._model.getComponent(m.mainType,m.index);v=v.parent}},d.prototype.enterEmphasis=function(v,m){Us(v,m),Wi(f)},d.prototype.leaveEmphasis=function(v,m){Zs(v,m),Wi(f)},d.prototype.enterBlur=function(v){HJ(v),Wi(f)},d.prototype.leaveBlur=function(v){zN(v),Wi(f)},d.prototype.enterSelect=function(v){UJ(v),Wi(f)},d.prototype.leaveSelect=function(v){ZJ(v),Wi(f)},d.prototype.getModel=function(){return f.getModel()},d.prototype.getViewOfComponentModel=function(v){return f.getViewOfComponentModel(v)},d.prototype.getViewOfSeriesModel=function(v){return f.getViewOfSeriesModel(v)},d.prototype.getMainProcessVersion=function(){return f[r_]},d}(HQ))(f)},Gee=function(f){function h(d,v){for(var m=0;m<d.length;m++){var y=d[m];y[W2]=v}}R(YI,function(d,v){f._messageCenter.on(v,function(m){if(Iw[f.group]&&f[W2]!==D6){if(m&&m.escapeConnect)return;var y=f.makeActionFromEvent(m),x=[];R(Xc,function(_){_!==f&&_.group===f.group&&x.push(_)}),h(x,D6),R(x,function(_){_[W2]!==E4e&&_.dispatchAction(y)}),h(x,D4e)}})})}}(),t}(_a),Sj=Pw.prototype;Sj.on=Bee("on");Sj.off=Bee("off");Sj.one=function(e,t,r){var n=this;function i(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];t&&t.apply&&t.apply(this,a),n.off(e,i)}this.on.call(this,e,i,r)};var N4e=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var kw={},YI={},XI={},qI=[],KI=[],Lw=[],Wee={},JI={},Xc={},Iw={},j4e=+new Date-0,R4e=+new Date-0,Tj="_echarts_instance_";function B4e(e,t,r){var n=!(r&&r.ssr);if(n){var i=Cj(e);if(i)return i}var a=new Pw(e,t,r);return a.id="ec_"+j4e++,Xc[a.id]=a,n&&MJ(e,Tj,a.id),Gee(a),Ia.trigger("afterinit",a),a}function z4e(e){if(oe(e)){var t=e;e=null,R(t,function(r){r.group!=null&&(e=r.group)}),e=e||"g_"+R4e++,R(t,function(r){r.group=e})}return Iw[e]=!0,e}function Hee(e){Iw[e]=!1}var $4e=Hee;function F4e(e){ye(e)?e=Xc[e]:e instanceof Pw||(e=Cj(e)),e instanceof Pw&&!e.isDisposed()&&e.dispose()}function Cj(e){return Xc[BRe(e,Tj)]}function V4e(e){return Xc[e]}function Aj(e,t){Wee[e]=t}function Mj(e){He(KI,e)<0&&KI.push(e)}function Pj(e,t){kj(qI,e,t,A4e)}function Uee(e){QT("afterinit",e)}function Zee(e){QT("afterupdate",e)}function QT(e,t){Ia.on(e,t)}function ro(e,t,r){var n,i,a,o,s;ke(t)&&(r=t,t=""),Ee(e)?(n=e.type,i=e.event,o=e.update,s=e.publishNonRefinedEvent,r||(r=e.action),a=e.refineEvent):(n=e,i=t);function l(c){return c.toLowerCase()}i=l(i||n);var u=a?l(n):i;kw[n]||(wn(E6.test(n)&&E6.test(i)),a&&wn(i!==n),kw[n]={actionType:n,refinedEventType:i,nonRefinedEventType:u,update:o,action:r,refineEvent:a},XI[i]=1,a&&s&&(XI[u]=1),YI[u]=n)}function Yee(e,t){Zv.register(e,t)}function G4e(e){var t=Zv.get(e);if(t)return t.getDimensionsInfo?t.getDimensionsInfo():t.dimensions.slice()}function W4e(e,t){Eee(e,t)}function Xee(e,t){kj(Lw,e,t,Dee,"layout")}function Lu(e,t){kj(Lw,e,t,Nee,"visual")}var $6=[];function kj(e,t,r,n,i){if((ke(t)||Ee(t))&&(r=t,t=n),!(He($6,r)>=0)){$6.push(r);var a=yee.wrapStageHandler(r,i);a.__prio=t,a.__raw=r,e.push(a)}}function Lj(e,t){JI[e]=t}function H4e(e){OK({createCanvas:e})}function qee(e,t,r){var n=Iee("registerMap");n&&n(e,t,r)}function U4e(e){var t=Iee("getMap");return t&&t(e)}var Kee=tze;Lu(wj,Mze);Lu(JT,Pze);Lu(JT,kze);Lu(wj,Vze);Lu(JT,Gze);Lu(jee,m4e);Mj(ZQ);Pj(T4e,NBe);Lj("default",Lze);ro({type:Zc,event:Zc,update:Zc},sr);ro({type:cb,event:cb,update:cb},sr);ro({type:gw,event:RN,update:gw,action:sr,refineEvent:Ij,publishNonRefinedEvent:!0});ro({type:CI,event:RN,update:CI,action:sr,refineEvent:Ij,publishNonRefinedEvent:!0});ro({type:mw,event:RN,update:mw,action:sr,refineEvent:Ij,publishNonRefinedEvent:!0});function Ij(e,t,r,n){return{eventContent:{selected:U3e(r),isFromClick:t.isFromClick||!1}}}Aj("default",{});Aj("dark",wee);var Z4e={},F6=[],Y4e={registerPreprocessor:Mj,registerProcessor:Pj,registerPostInit:Uee,registerPostUpdate:Zee,registerUpdateLifecycle:QT,registerAction:ro,registerCoordinateSystem:Yee,registerLayout:Xee,registerVisual:Lu,registerTransform:Kee,registerLoading:Lj,registerMap:qee,registerImpl:y4e,PRIORITY:Ree,ComponentModel:Qe,ComponentView:It,SeriesModel:Ct,ChartView:bt,registerComponentModel:function(e){Qe.registerClass(e)},registerComponentView:function(e){It.registerClass(e)},registerSeriesModel:function(e){Ct.registerClass(e)},registerChartView:function(e){bt.registerClass(e)},registerCustomSeries:function(e,t){Eee(e,t)},registerSubTypeDefaulter:function(e,t){Qe.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){dJ(e,t)}};function Ye(e){if(oe(e)){R(e,function(t){Ye(t)});return}He(F6,e)>=0||(F6.push(e),ke(e)&&(e={install:e}),e.install(Y4e))}function Wp(e){return e==null?0:e.length||1}function V6(e){return e}var Ys=function(){function e(t,r,n,i,a,o){this._old=t,this._new=r,this._oldKeyGetter=n||V6,this._newKeyGetter=i||V6,this.context=a,this._diffModeMultiple=o==="multiple"}return e.prototype.add=function(t){return this._add=t,this},e.prototype.update=function(t){return this._update=t,this},e.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},e.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},e.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},e.prototype.remove=function(t){return this._remove=t,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var t=this._old,r=this._new,n={},i=new Array(t.length),a=new Array(r.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(r,n,a,"_newKeyGetter");for(var o=0;o<t.length;o++){var s=i[o],l=n[s],u=Wp(l);if(u>1){var c=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(c,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},e.prototype._executeMultiple=function(){var t=this._old,r=this._new,n={},i={},a=[],o=[];this._initIndexMap(t,n,a,"_oldKeyGetter"),this._initIndexMap(r,i,o,"_newKeyGetter");for(var s=0;s<a.length;s++){var l=a[s],u=n[l],c=i[l],f=Wp(u),h=Wp(c);if(f>1&&h===1)this._updateManyToOne&&this._updateManyToOne(c,u),i[l]=null;else if(f===1&&h>1)this._updateOneToMany&&this._updateOneToMany(c,u),i[l]=null;else if(f===1&&h===1)this._update&&this._update(c,u),i[l]=null;else if(f>1&&h>1)this._updateManyToMany&&this._updateManyToMany(c,u),i[l]=null;else if(f>1)for(var d=0;d<f;d++)this._remove&&this._remove(u[d]);else this._remove&&this._remove(u)}this._performRestAdd(o,i)},e.prototype._performRestAdd=function(t,r){for(var n=0;n<t.length;n++){var i=t[n],a=r[i],o=Wp(a);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(a[s]);else o===1&&this._add&&this._add(a);r[i]=null}},e.prototype._initIndexMap=function(t,r,n,i){for(var a=this._diffModeMultiple,o=0;o<t.length;o++){var s="_ec_"+this[i](t[o],o);if(a||(n[o]=s),!!r){var l=r[s],u=Wp(l);u===0?(r[s]=o,a&&n.push(s)):u===1?r[s]=[l,o]:l.push(o)}}},e}(),X4e=function(){function e(t,r){this._encode=t,this._schema=r}return e.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},e.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},e}();function q4e(e,t){var r={},n=r.encode={},i=Ce(),a=[],o=[],s={};R(e.dimensions,function(h){var d=e.getDimensionInfo(h),v=d.coordDim;if(v){var m=d.coordDimIndex;X2(n,v)[m]=h,d.isExtraCoord||(i.set(v,1),K4e(d.type)&&(a[0]=h),X2(s,v)[m]=e.getDimensionIndex(d.name)),d.defaultTooltip&&o.push(h)}BQ.each(function(y,x){var _=X2(n,x),b=d.otherDims[x];b!=null&&b!==!1&&(_[b]=d.name)})});var l=[],u={};i.each(function(h,d){var v=n[d];u[d]=v[0],l=l.concat(v)}),r.dataDimsOnCoord=l,r.dataDimIndicesOnCoord=le(l,function(h){return e.getDimensionInfo(h).storeDimIndex}),r.encodeFirstDimNotExtra=u;var c=n.label;c&&c.length&&(a=c.slice());var f=n.tooltip;return f&&f.length?o=f.slice():o.length||(o=a.slice()),n.defaultedLabel=a,n.defaultedTooltip=o,r.userOutput=new X4e(s,t),r}function X2(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}function Ow(e){return e==="category"?"ordinal":e==="time"?"time":"float"}function K4e(e){return!(e==="ordinal"||e==="time")}var mb=function(){function e(t){this.otherDims={},t!=null&&ae(this,t)}return e}(),J4e=et(),Q4e={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},Jee=function(){function e(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=tte(this.source)))},e.prototype.getSourceDimensionIndex=function(t){return Ae(this._dimNameMap.get(t),-1)},e.prototype.getSourceDimension=function(t){var r=this.source.dimensionsDefine;if(r)return r[t]},e.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,r=XQ(this.source),n=!rte(t),i="",a=[],o=0,s=0;o<t;o++){var l=void 0,u=void 0,c=void 0,f=this.dimensions[s];if(f&&f.storeDimIndex===o)l=r?f.name:null,u=f.type,c=f.ordinalMeta,s++;else{var h=this.getSourceDimension(o);h&&(l=r?h.name:null,u=h.type)}a.push({property:l,type:u,ordinalMeta:c}),r&&l!=null&&(!f||!f.isCalculationCoord)&&(i+=n?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),i+="$",i+=Q4e[u]||"f",c&&(i+=c.uid),i+="$"}var d=this.source,v=[d.seriesLayoutBy,d.startIndex,i].join("$$");return{dimensions:a,hash:v}},e.prototype.makeOutputDimensionNames=function(){for(var t=[],r=0,n=0;r<this._fullDimCount;r++){var i=void 0,a=this.dimensions[n];if(a&&a.storeDimIndex===r)a.isCalculationCoord||(i=a.name),n++;else{var o=this.getSourceDimension(r);o&&(i=o.name)}t.push(i)}return t},e.prototype.appendCalculationDimension=function(t){this.dimensions.push(t),t.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},e}();function Qee(e){return e instanceof Jee}function ete(e){for(var t=Ce(),r=0;r<(e||[]).length;r++){var n=e[r],i=Ee(n)?n.name:n;i!=null&&t.get(i)==null&&t.set(i,r)}return t}function tte(e){var t=J4e(e);return t.dimNameMap||(t.dimNameMap=ete(e.dimensionsDefine))}function rte(e){return e>30}var Hp=Ee,fl=le,e$e=typeof Int32Array>"u"?Array:Int32Array,t$e="e\0\0",G6=-1,r$e=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],n$e=["_approximateExtent"],W6,o_,Up,Zp,q2,Yp,K2,Rn=function(){function e(t,r){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var n,i=!1;Qee(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(i=!0,n=t),n=n||["x","y"];for(var a={},o=[],s={},l=!1,u={},c=0;c<n.length;c++){var f=n[c],h=ye(f)?new mb({name:f}):f instanceof mb?f:new mb(f),d=h.name;h.type=h.type||"float",h.coordDim||(h.coordDim=d,h.coordDimIndex=0);var v=h.otherDims=h.otherDims||{};o.push(d),a[d]=h,u[d]!=null&&(l=!0),h.createInvertedIndices&&(s[d]=[]);var m=c;st(h.storeDimIndex)&&(m=h.storeDimIndex),v.itemName===0&&(this._nameDimIdx=m),v.itemId===0&&(this._idDimIdx=m),i&&(h.storeDimIndex=c)}if(this.dimensions=o,this._dimInfos=a,this._initGetDimensionInfo(l),this.hostModel=r,this._invertedIndicesMap=s,this._dimOmitted){var y=this._dimIdxToName=Ce();R(o,function(x){y.set(a[x].storeDimIndex,x)})}}return e.prototype.getDimension=function(t){var r=this._recognizeDimIndex(t);if(r==null)return t;if(r=t,!this._dimOmitted)return this.dimensions[r];var n=this._dimIdxToName.get(r);if(n!=null)return n;var i=this._schema.getSourceDimension(r);if(i)return i.name},e.prototype.getDimensionIndex=function(t){var r=this._recognizeDimIndex(t);if(r!=null)return r;if(t==null)return-1;var n=this._getDimInfo(t);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(t):-1},e.prototype._recognizeDimIndex=function(t){if(st(t)||t!=null&&!isNaN(t)&&!this._getDimInfo(t)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(t)<0))return+t},e.prototype._getStoreDimIndex=function(t){var r=this.getDimensionIndex(t);return r},e.prototype.getDimensionInfo=function(t){return this._getDimInfo(this.getDimension(t))},e.prototype._initGetDimensionInfo=function(t){var r=this._dimInfos;this._getDimInfo=t?function(n){return r.hasOwnProperty(n)?r[n]:void 0}:function(n){return r[n]}},e.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},e.prototype.mapDimension=function(t,r){var n=this._dimSummary;if(r==null)return n.encodeFirstDimNotExtra[t];var i=n.encode[t];return i?i[r]:null},e.prototype.mapDimensionsAll=function(t){var r=this._dimSummary,n=r.encode[t];return(n||[]).slice()},e.prototype.getStore=function(){return this._store},e.prototype.initData=function(t,r,n){var i=this,a;if(t instanceof FI&&(a=t),!a){var o=this.dimensions,s=pj(t)||bn(t)?new qQ(t,o.length):t;a=new FI;var l=fl(o,function(u){return{type:i._dimInfos[u].type,property:u}});a.initData(s,l,n)}this._store=a,this._nameList=(r||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,a.count()),this._dimSummary=q4e(this,this._schema),this.userOutput=this._dimSummary.userOutput},e.prototype.appendData=function(t){var r=this._store.appendData(t);this._doInit(r[0],r[1])},e.prototype.appendValues=function(t,r){var n=this._store.appendValues(t,r&&r.length),i=n.start,a=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),r)for(var s=i;s<a;s++){var l=s-i;this._nameList[s]=r[l],o&&K2(this,s)}},e.prototype._updateOrdinalMeta=function(){for(var t=this._store,r=this.dimensions,n=0;n<r.length;n++){var i=this._dimInfos[r[n]];i.ordinalMeta&&t.collectOrdinalMeta(i.storeDimIndex,i.ordinalMeta)}},e.prototype._shouldMakeIdFromName=function(){var t=this._store.getProvider();return this._idDimIdx==null&&t.getSource().sourceFormat!==ru&&!t.fillStorage},e.prototype._doInit=function(t,r){if(!(t>=r)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===ji;if(l&&!i.pure)for(var u=[],c=t;c<r;c++){var f=i.getItem(c,u);if(!this.hasItemOption&&CRe(f)&&(this.hasItemOption=!0),f){var h=f.name;a[c]==null&&h!=null&&(a[c]=Dr(h,null));var d=f.id;o[c]==null&&d!=null&&(o[c]=Dr(d,null))}}if(this._shouldMakeIdFromName())for(var c=t;c<r;c++)K2(this,c);W6(this)}},e.prototype.getApproximateExtent=function(t){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t))},e.prototype.setApproximateExtent=function(t,r){r=this.getDimension(r),this._approximateExtent[r]=t.slice()},e.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},e.prototype.setCalculationInfo=function(t,r){Hp(t)?ae(this._calculationInfo,t):this._calculationInfo[t]=r},e.prototype.getName=function(t){var r=this.getRawIndex(t),n=this._nameList[r];return n==null&&this._nameDimIdx!=null&&(n=Up(this,this._nameDimIdx,r)),n==null&&(n=""),n},e.prototype._getCategory=function(t,r){var n=this._store.get(t,r),i=this._store.getOrdinalMeta(t);return i?i.categories[n]:n},e.prototype.getId=function(t){return o_(this,this.getRawIndex(t))},e.prototype.count=function(){return this._store.count()},e.prototype.get=function(t,r){var n=this._store,i=this._dimInfos[t];if(i)return n.get(i.storeDimIndex,r)},e.prototype.getByRawIndex=function(t,r){var n=this._store,i=this._dimInfos[t];if(i)return n.getByRawIndex(i.storeDimIndex,r)},e.prototype.getIndices=function(){return this._store.getIndices()},e.prototype.getDataExtent=function(t){return this._store.getDataExtent(this._getStoreDimIndex(t))},e.prototype.getSum=function(t){return this._store.getSum(this._getStoreDimIndex(t))},e.prototype.getMedian=function(t){return this._store.getMedian(this._getStoreDimIndex(t))},e.prototype.getValues=function(t,r){var n=this,i=this._store;return oe(t)?i.getValues(fl(t,function(a){return n._getStoreDimIndex(a)}),r):i.getValues(t)},e.prototype.hasValue=function(t){for(var r=this._dimSummary.dataDimIndicesOnCoord,n=0,i=r.length;n<i;n++)if(isNaN(this._store.get(r[n],t)))return!1;return!0},e.prototype.indexOfName=function(t){for(var r=0,n=this._store.count();r<n;r++)if(this.getName(r)===t)return r;return-1},e.prototype.getRawIndex=function(t){return this._store.getRawIndex(t)},e.prototype.indexOfRawIndex=function(t){return this._store.indexOfRawIndex(t)},e.prototype.rawIndexOf=function(t,r){var n=t&&this._invertedIndicesMap[t],i=n&&n[r];return i==null||isNaN(i)?G6:i},e.prototype.each=function(t,r,n){ke(t)&&(n=r,r=t,t=[]);var i=n||this,a=fl(Zp(t),this._getStoreDimIndex,this);this._store.each(a,i?_e(r,i):r)},e.prototype.filterSelf=function(t,r,n){ke(t)&&(n=r,r=t,t=[]);var i=n||this,a=fl(Zp(t),this._getStoreDimIndex,this);return this._store=this._store.filter(a,i?_e(r,i):r),this},e.prototype.selectRange=function(t){var r=this,n={},i=at(t);return R(i,function(a){var o=r._getStoreDimIndex(a);n[o]=t[a]}),this._store=this._store.selectRange(n),this},e.prototype.mapArray=function(t,r,n){ke(t)&&(n=r,r=t,t=[]),n=n||this;var i=[];return this.each(t,function(){i.push(r&&r.apply(this,arguments))},n),i},e.prototype.map=function(t,r,n,i){var a=n||i||this,o=fl(Zp(t),this._getStoreDimIndex,this),s=Yp(this);return s._store=this._store.map(o,a?_e(r,a):r),s},e.prototype.modify=function(t,r,n,i){var a=n||i||this,o=fl(Zp(t),this._getStoreDimIndex,this);this._store.modify(o,a?_e(r,a):r)},e.prototype.downSample=function(t,r,n,i){var a=Yp(this);return a._store=this._store.downSample(this._getStoreDimIndex(t),r,n,i),a},e.prototype.minmaxDownSample=function(t,r){var n=Yp(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(t),r),n},e.prototype.lttbDownSample=function(t,r){var n=Yp(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(t),r),n},e.prototype.getRawDataItem=function(t){return this._store.getRawDataItem(t)},e.prototype.getItemModel=function(t){var r=this.hostModel,n=this.getRawDataItem(t);return new rt(n,r,r&&r.ecModel)},e.prototype.diff=function(t){var r=this;return new Ys(t?t.getStore().getIndices():[],this.getStore().getIndices(),function(n){return o_(t,n)},function(n){return o_(r,n)})},e.prototype.getVisual=function(t){var r=this._visual;return r&&r[t]},e.prototype.setVisual=function(t,r){this._visual=this._visual||{},Hp(t)?ae(this._visual,t):this._visual[t]=r},e.prototype.getItemVisual=function(t,r){var n=this._itemVisuals[t],i=n&&n[r];return i??this.getVisual(r)},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(t,r){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var a=i[r];return a==null&&(a=this.getVisual(r),oe(a)?a=a.slice():Hp(a)&&(a=ae({},a)),i[r]=a),a},e.prototype.setItemVisual=function(t,r,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,Hp(r)?ae(i,r):i[r]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(t,r){Hp(t)?ae(this._layout,t):this._layout[t]=r},e.prototype.getLayout=function(t){return this._layout[t]},e.prototype.getItemLayout=function(t){return this._itemLayouts[t]},e.prototype.setItemLayout=function(t,r,n){this._itemLayouts[t]=n?ae(this._itemLayouts[t]||{},r):r},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(t,r){var n=this.hostModel&&this.hostModel.seriesIndex;TI(n,this.dataType,t,r),this._graphicEls[t]=r},e.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},e.prototype.eachItemGraphicEl=function(t,r){R(this._graphicEls,function(n,i){n&&t&&t.call(r,n,i)})},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:fl(this.dimensions,this._getDimInfo,this),this.hostModel)),q2(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(t,r){var n=this[t];ke(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var i=n.apply(this,arguments);return r.apply(this,[i].concat(kT(arguments)))})},e.internalField=function(){W6=function(t){var r=t._invertedIndicesMap;R(r,function(n,i){var a=t._dimInfos[i],o=a.ordinalMeta,s=t._store;if(o){n=r[i]=new e$e(o.categories.length);for(var l=0;l<n.length;l++)n[l]=G6;for(var l=0;l<s.count();l++)n[s.get(a.storeDimIndex,l)]=l}})},Up=function(t,r,n){return Dr(t._getCategory(r,n),null)},o_=function(t,r){var n=t._idList[r];return n==null&&t._idDimIdx!=null&&(n=Up(t,t._idDimIdx,r)),n==null&&(n=t$e+r),n},Zp=function(t){return oe(t)||(t=t!=null?[t]:[]),t},Yp=function(t){var r=new e(t._schema?t._schema:fl(t.dimensions,t._getDimInfo,t),t.hostModel);return q2(r,t),r},q2=function(t,r){R(r$e.concat(r.__wrappedMethods||[]),function(n){r.hasOwnProperty(n)&&(t[n]=r[n])}),t.__wrappedMethods=r.__wrappedMethods,R(n$e,function(n){t[n]=Le(r[n])}),t._calculationInfo=ae({},r._calculationInfo)},K2=function(t,r){var n=t._nameList,i=t._idList,a=t._nameDimIdx,o=t._idDimIdx,s=n[r],l=i[r];if(s==null&&a!=null&&(n[r]=s=Up(t,a,r)),l==null&&o!=null&&(i[r]=l=Up(t,o,r)),l==null&&s!=null){var u=t._nameRepeatCount,c=u[s]=(u[s]||0)+1;l=s,c>1&&(l+="__ec__"+c),i[r]=l}}}(),e}();function i$e(e,t){return Kv(e,t).dimensions}function Kv(e,t){pj(e)||(e=gj(e)),t=t||{};var r=t.coordDimensions||[],n=t.dimensionsDefine||e.dimensionsDefine||[],i=Ce(),a=[],o=o$e(e,r,n,t.dimensionsCount),s=t.canOmitUnusedDimensions&&rte(o),l=n===e.dimensionsDefine,u=l?tte(e):ete(n),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(e,o));for(var f=Ce(c),h=new iee(o),d=0;d<h.length;d++)h[d]=-1;function v(I){var k=h[I];if(k<0){var E=n[I],D=Ee(E)?E:{name:E},N=new mb,z=D.name;z!=null&&u.get(z)!=null&&(N.name=N.displayName=z),D.type!=null&&(N.type=D.type),D.displayName!=null&&(N.displayName=D.displayName);var V=a.length;return h[I]=V,N.storeDimIndex=I,a.push(N),N}return a[k]}if(!s)for(var d=0;d<o;d++)v(d);f.each(function(I,k){var E=Lt(I).slice();if(E.length===1&&!ye(E[0])&&E[0]<0){f.set(k,!1);return}var D=f.set(k,[]);R(E,function(N,z){var V=ye(N)?u.get(N):N;V!=null&&V<o&&(D[z]=V,y(v(V),k,z))})});var m=0;R(r,function(I){var k,E,D,N;if(ye(I))k=I,N={};else{N=I,k=N.name;var z=N.ordinalMeta;N.ordinalMeta=null,N=ae({},N),N.ordinalMeta=z,E=N.dimsDef,D=N.otherDims,N.name=N.coordDim=N.coordDimIndex=N.dimsDef=N.otherDims=null}var V=f.get(k);if(V!==!1){if(V=Lt(V),!V.length)for(var F=0;F<(E&&E.length||1);F++){for(;m<o&&v(m).coordDim!=null;)m++;m<o&&V.push(m++)}R(V,function($,B){var H=v($);if(l&&N.type!=null&&(H.type=N.type),y(Oe(H,N),k,B),H.name==null&&E){var U=E[B];!Ee(U)&&(U={name:U}),H.name=H.displayName=U.name,H.defaultTooltip=U.defaultTooltip}D&&Oe(H.otherDims,D)})}});function y(I,k,E){BQ.get(k)!=null?I.otherDims[k]=E:(I.coordDim=k,I.coordDimIndex=E,i.set(k,!0))}var x=t.generateCoord,_=t.generateCoordCount,b=_!=null;_=x?_||1:0;var S=x||"value";function T(I){I.name==null&&(I.name=I.coordDim)}if(s)R(a,function(I){T(I)}),a.sort(function(I,k){return I.storeDimIndex-k.storeDimIndex});else for(var C=0;C<o;C++){var A=v(C),P=A.coordDim;P==null&&(A.coordDim=s$e(S,i,b),A.coordDimIndex=0,(!x||_<=0)&&(A.isExtraCoord=!0),_--),T(A),A.type==null&&(VQ(e,C)===vn.Must||A.isExtraCoord&&(A.otherDims.itemName!=null||A.otherDims.seriesName!=null))&&(A.type="ordinal")}return a$e(a),new Jee({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function a$e(e){for(var t=Ce(),r=0;r<e.length;r++){var n=e[r],i=n.name,a=t.get(i)||0;a>0&&(n.name=i+(a-1)),a++,t.set(i,a)}}function o$e(e,t,r,n){var i=Math.max(e.dimensionsDetectedCount||1,t.length,r.length,n||0);return R(t,function(a){var o;Ee(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function s$e(e,t,r){if(r||t.hasKey(e)){for(var n=0;t.hasKey(e+n);)n++;e+=n}return t.set(e,!0),e}var l$e=function(){function e(t){this.coordSysDims=[],this.axisMap=Ce(),this.categoryAxisMap=Ce(),this.coordSysName=t}return e}();function u$e(e){var t=e.get("coordinateSystem"),r=new l$e(t),n=c$e[t];if(n)return n(e,r,r.axisMap,r.categoryAxisMap),r}var c$e={cartesian2d:function(e,t,r,n){var i=e.getReferringComponents("xAxis",tr).models[0],a=e.getReferringComponents("yAxis",tr).models[0];t.coordSysDims=["x","y"],r.set("x",i),r.set("y",a),dh(i)&&(n.set("x",i),t.firstCategoryDimIndex=0),dh(a)&&(n.set("y",a),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,r,n){var i=e.getReferringComponents("singleAxis",tr).models[0];t.coordSysDims=["single"],r.set("single",i),dh(i)&&(n.set("single",i),t.firstCategoryDimIndex=0)},polar:function(e,t,r,n){var i=e.getReferringComponents("polar",tr).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],r.set("radius",a),r.set("angle",o),dh(a)&&(n.set("radius",a),t.firstCategoryDimIndex=0),dh(o)&&(n.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(e,t,r,n){t.coordSysDims=["lng","lat"]},parallel:function(e,t,r,n){var i=e.ecModel,a=i.getComponent("parallel",e.get("parallelIndex")),o=t.coordSysDims=a.dimensions.slice();R(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),c=o[l];r.set(c,u),dh(u)&&(n.set(c,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})},matrix:function(e,t,r,n){var i=e.getReferringComponents("matrix",tr).models[0];t.coordSysDims=["x","y"];var a=i.getDimensionModel("x"),o=i.getDimensionModel("y");r.set("x",a),r.set("y",o),n.set("x",a),n.set("y",o)}};function dh(e){return e.get("type")==="category"}function nte(e,t,r){r=r||{};var n=r.byIndex,i=r.stackedCoordDimension,a,o,s;f$e(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var l=!!(e&&e.get("stack")),u,c,f,h;if(R(a,function(_,b){ye(_)&&(a[b]=_={name:_}),l&&!_.isExtraCoord&&(!n&&!u&&_.ordinalMeta&&(u=_),!c&&_.type!=="ordinal"&&_.type!=="time"&&(!i||i===_.coordDim)&&(c=_))}),c&&!n&&!u&&(n=!0),c){f="__\0ecstackresult_"+e.id,h="__\0ecstackedover_"+e.id,u&&(u.createInvertedIndices=!0);var d=c.coordDim,v=c.type,m=0;R(a,function(_){_.coordDim===d&&m++});var y={name:f,coordDim:d,coordDimIndex:m,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},x={name:h,coordDim:h,coordDimIndex:m+1,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(y.storeDimIndex=s.ensureCalculationDimension(h,v),x.storeDimIndex=s.ensureCalculationDimension(f,v)),o.appendCalculationDimension(y),o.appendCalculationDimension(x)):(a.push(y),a.push(x))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:h,stackResultDimension:f}}function f$e(e){return!Qee(e.schema)}function Xs(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function Oj(e,t){return Xs(e,t)?e.getCalculationInfo("stackResultDimension"):t}function h$e(e,t){var r=e.get("coordinateSystem"),n=Zv.get(r),i;return t&&t.coordSysDims&&(i=le(t.coordSysDims,function(a){var o={name:a},s=t.axisMap.get(a);if(s){var l=s.get("type");o.type=Ow(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function d$e(e,t,r){var n,i;return r&&R(e,function(a,o){var s=a.coordDim,l=r.categoryAxisMap.get(s);l&&(n==null&&(n=o),a.ordinalMeta=l.getOrdinalMeta(),t&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(e[n].otherDims.itemName=0),n}function es(e,t,r){r=r||{};var n=t.getSourceManager(),i,a=!1;e?(a=!0,i=gj(e)):(i=n.getSource(),a=i.sourceFormat===ji);var o=u$e(t),s=h$e(t,o),l=r.useEncodeDefaulter,u=ke(l)?l:l?We(FQ,s,t):null,c={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},f=Kv(i,c),h=d$e(f.dimensions,r.createInvertedIndices,o),d=a?null:n.getSharedDataStore(f),v=nte(t,{schema:f,store:d}),m=new Rn(f,t);m.setCalculationInfo(v);var y=h!=null&&v$e(i)?function(x,_,b,S){return S===h?b:this.defaultDimValueGetter(x,_,b,S)}:null;return m.hasItemOption=!1,m.initData(a?i:d,null,y),m}function v$e(e){if(e.sourceFormat===ji){var t=p$e(e.data||[]);return!oe(Rv(t))}}function p$e(e){for(var t=0;t<e.length&&e[t]==null;)t++;return e[t]}function QI(e){return e.type==="interval"||e.type==="log"}function g$e(e,t,r,n,i){var a={},o=a.interval=PN(t/r,!0);n!=null&&o<n&&(o=a.interval=n),i!=null&&o>i&&(o=a.interval=i);var s=a.intervalPrecision=Ly(o),l=a.niceTickExtent=[gr(Math.ceil(e[0]/o)*o,s),gr(Math.floor(e[1]/o)*o,s)];return m$e(l,e),a}function J2(e){var t=Math.pow(10,NT(e)),r=e/t;return r?r===2?r=3:r===3?r=5:r*=2:r=1,gr(r*t)}function Ly(e){return $a(e)+2}function H6(e,t,r){e[t]=Math.max(Math.min(e[t],r[1]),r[0])}function m$e(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),H6(e,0,t),H6(e,1,t),e[0]>e[1]&&(e[0]=e[1])}function Ej(e,t){return e>=t[0]&&e<=t[1]}var y$e=function(){function e(){this.normalize=U6,this.scale=Z6}return e.prototype.updateMethods=function(t){t.hasBreaks()?(this.normalize=_e(t.normalize,t),this.scale=_e(t.scale,t)):(this.normalize=U6,this.scale=Z6)},e}();function U6(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function Z6(e,t){return e*(t[1]-t[0])+t[0]}function eO(e,t,r){var n=Math.log(e);return[Math.log(r?t[0]:Math.max(0,t[0]))/n,Math.log(r?t[1]:Math.max(0,t[1]))/n]}var Iu=function(){function e(t){this._calculator=new y$e,this._setting=t||{},this._extent=[1/0,-1/0];var r=Cr();r&&(this._brkCtx=r.createScaleBreakContext(),this._brkCtx.update(this._extent))}return e.prototype.getSetting=function(t){return this._setting[t]},e.prototype._innerUnionExtent=function(t){var r=this._extent;this._innerSetExtent(t[0]<r[0]?t[0]:r[0],t[1]>r[1]?t[1]:r[1])},e.prototype.unionExtentFromData=function(t,r){this._innerUnionExtent(t.getApproximateExtent(r))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(t,r){this._innerSetExtent(t,r)},e.prototype._innerSetExtent=function(t,r){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(r)||(n[1]=r),this._brkCtx&&this._brkCtx.update(n)},e.prototype.setBreaksFromOption=function(t){var r=Cr();r&&this._innerSetBreak(r.parseAxisBreakOption(t,_e(this.parse,this)))},e.prototype._innerSetBreak=function(t){this._brkCtx&&(this._brkCtx.setBreaks(t),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},e.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},e.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},e.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},e.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(t){this._isBlank=t},e}();jT(Iu);var x$e=0,Iy=function(){function e(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++x$e,this._onCollect=t.onCollect}return e.createByAxisModel=function(t){var r=t.option,n=r.data,i=n&&le(n,_$e);return new e({categories:i,needCollect:!i,deduplication:r.dedplication!==!1})},e.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},e.prototype.parseAndCollect=function(t){var r,n=this._needCollect;if(!ye(t)&&!n)return t;if(n&&!this._deduplication)return r=this.categories.length,this.categories[r]=t,this._onCollect&&this._onCollect(t,r),r;var i=this._getOrCreateMap();return r=i.get(t),r==null&&(n?(r=this.categories.length,this.categories[r]=t,i.set(t,r),this._onCollect&&this._onCollect(t,r)):r=NaN),r},e.prototype._getOrCreateMap=function(){return this._map||(this._map=Ce(this.categories))},e}();function _$e(e){return Ee(e)&&e.value!=null?e.value:e+""}var iv=function(e){K(t,e);function t(r){var n=e.call(this,r)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new Iy({})),oe(i)&&(i=new Iy({categories:le(i,function(a){return Ee(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return t.prototype.parse=function(r){return r==null?NaN:ye(r)?this._ordinalMeta.getOrdinal(r):Math.round(r)},t.prototype.contain=function(r){return Ej(r,this._extent)&&r>=0&&r<this._ordinalMeta.categories.length},t.prototype.normalize=function(r){return r=this._getTickNumber(r),this._calculator.normalize(r,this._extent)},t.prototype.scale=function(r){return r=Math.round(this._calculator.scale(r,this._extent)),this.getRawOrdinalNumber(r)},t.prototype.getTicks=function(){for(var r=[],n=this._extent,i=n[0];i<=n[1];)r.push({value:i}),i++;return r},t.prototype.getMinorTicks=function(r){},t.prototype.setSortInfo=function(r){if(r==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=r.ordinalNumbers,i=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,n.length);o<l;++o){var u=n[o];i[o]=u,a[u]=o}for(var c=0;o<s;++o){for(;a[c]!=null;)c++;i.push(c),a[c]=o}},t.prototype._getTickNumber=function(r){var n=this._ticksByOrdinalNumber;return n&&r>=0&&r<n.length?n[r]:r},t.prototype.getRawOrdinalNumber=function(r){var n=this._ordinalNumbersByTick;return n&&r>=0&&r<n.length?n[r]:r},t.prototype.getLabel=function(r){if(!this.isBlank()){var n=this.getRawOrdinalNumber(r.value),i=this._ordinalMeta.categories[n];return i==null?"":i+""}},t.prototype.count=function(){return this._extent[1]-this._extent[0]+1},t.prototype.isInExtentRange=function(r){return r=this._getTickNumber(r),this._extent[0]<=r&&this._extent[1]>=r},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(Iu);Iu.registerClass(iv);var hl=gr,qs=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="interval",r._interval=0,r._intervalPrecision=2,r}return t.prototype.parse=function(r){return r==null||r===""?NaN:Number(r)},t.prototype.contain=function(r){return Ej(r,this._extent)},t.prototype.normalize=function(r){return this._calculator.normalize(r,this._extent)},t.prototype.scale=function(r){return this._calculator.scale(r,this._extent)},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(r){this._interval=r,this._niceExtent=this._extent.slice(),this._intervalPrecision=Ly(r)},t.prototype.getTicks=function(r){r=r||{};var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=Cr(),l=[];if(!n)return l;if(r.breakTicks==="only_break"&&s)return s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l;var u=1e4;i[0]<a[0]&&(r.expandToNicedExtent?l.push({value:hl(a[0]-n,o)}):l.push({value:i[0]}));for(var c=function(v,m){return Math.round((m-v)/n)},f=a[0];f<=a[1];){if(l.push({value:f}),f=hl(f+n,o),this._brkCtx){var h=this._brkCtx.calcNiceTickMultiple(f,c);h>=0&&(f=hl(f+h*n,o))}if(l.length>0&&f===l[l.length-1].value)break;if(l.length>u)return[]}var d=l.length?l[l.length-1].value:a[1];return i[1]>d&&(r.expandToNicedExtent?l.push({value:hl(d+n,o)}):l.push({value:i[1]})),s&&s.pruneTicksByBreak(r.pruneByBreak,l,this._brkCtx.breaks,function(v){return v.value},this._interval,this._extent),r.breakTicks!=="none"&&s&&s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l},t.prototype.getMinorTicks=function(r){for(var n=this.getTicks({expandToNicedExtent:!0}),i=[],a=this.getExtent(),o=1;o<n.length;o++){var s=n[o],l=n[o-1];if(!(l.break||s.break)){for(var u=0,c=[],f=s.value-l.value,h=f/r,d=Ly(h);u<r-1;){var v=hl(l.value+(u+1)*h,d);v>a[0]&&v<a[1]&&c.push(v),u++}var m=Cr();m&&m.pruneTicksByBreak("auto",c,this._getNonTransBreaks(),function(y){return y},this._interval,a),i.push(c)}}return i},t.prototype._getNonTransBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},t.prototype.getLabel=function(r,n){if(r==null)return"";var i=n&&n.precision;i==null?i=$a(r.value)||0:i==="auto"&&(i=this._intervalPrecision);var a=hl(r.value,i,!0);return sj(a)},t.prototype.calcNiceTicks=function(r,n,i){r=r||5;var a=this._extent.slice(),o=this._getExtentSpanWithBreaks();if(isFinite(o)){o<0&&(o=-o,a.reverse(),this._innerSetExtent(a[0],a[1]),a=this._extent.slice());var s=g$e(a,o,r,n,i);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},t.prototype.calcNiceExtent=function(r){var n=this._extent.slice();if(n[0]===n[1])if(n[0]!==0){var i=Math.abs(n[0]);r.fixMax||(n[1]+=i/2),n[0]-=i/2}else n[1]=1;var a=n[1]-n[0];isFinite(a)||(n[0]=0,n[1]=1),this._innerSetExtent(n[0],n[1]),n=this._extent.slice(),this.calcNiceTicks(r.splitNumber,r.minInterval,r.maxInterval);var o=this._interval,s=this._intervalPrecision;r.fixMin||(n[0]=hl(Math.floor(n[0]/o)*o,s)),r.fixMax||(n[1]=hl(Math.ceil(n[1]/o)*o,s)),this._innerSetExtent(n[0],n[1])},t.prototype.setNiceExtent=function(r,n){this._niceExtent=[r,n]},t.type="interval",t}(Iu);Iu.registerClass(qs);var ite=typeof Float32Array<"u",b$e=ite?Float32Array:Array;function ko(e){return oe(e)?ite?new Float32Array(e):e:new b$e(e)}var tO="__ec_stack_";function ate(e){return e.get("stack")||tO+e.seriesIndex}function Dj(e){return e.dim+e.index}function w$e(e){var t=[],r=e.axis,n="axis0";if(r.type==="category"){for(var i=r.getBandWidth(),a=0;a<e.count;a++)t.push(Oe({bandWidth:i,axisKey:n,stackId:tO+a},e));for(var o=lte(t),s=[],a=0;a<e.count;a++){var l=o[n][tO+a];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}function ote(e,t){var r=[];return t.eachSeriesByType(e,function(n){fte(n)&&r.push(n)}),r}function S$e(e){var t={};R(e,function(l){var u=l.coordinateSystem,c=u.getBaseAxis();if(!(c.type!=="time"&&c.type!=="value"))for(var f=l.getData(),h=c.dim+"_"+c.index,d=f.getDimensionIndex(f.mapDimension(c.dim)),v=f.getStore(),m=0,y=v.count();m<y;++m){var x=v.get(d,m);t[h]?t[h].push(x):t[h]=[x]}});var r={};for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];if(i){i.sort(function(l,u){return l-u});for(var a=null,o=1;o<i.length;++o){var s=i[o]-i[o-1];s>0&&(a=a===null?s:Math.min(a,s))}r[n]=a}}return r}function ste(e){var t=S$e(e),r=[];return R(e,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=t[l],c=Math.abs(o[1]-o[0]),f=a.scale.getExtent(),h=Math.abs(f[1]-f[0]);s=u?c/h*u:c}else{var d=n.getData();s=Math.abs(o[1]-o[0])/d.count()}var v=me(n.get("barWidth"),s),m=me(n.get("barMaxWidth"),s),y=me(n.get("barMinWidth")||(hte(n)?.5:1),s),x=n.get("barGap"),_=n.get("barCategoryGap"),b=n.get("defaultBarGap");r.push({bandWidth:s,barWidth:v,barMaxWidth:m,barMinWidth:y,barGap:x,barCategoryGap:_,defaultBarGap:b,axisKey:Dj(a),stackId:ate(n)})}),lte(r)}function lte(e){var t={};R(e,function(n,i){var a=n.axisKey,o=n.bandWidth,s=t[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:n.defaultBarGap||0,stacks:{}},l=s.stacks;t[a]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=n.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var f=n.barMaxWidth;f&&(l[u].maxWidth=f);var h=n.barMinWidth;h&&(l[u].minWidth=h);var d=n.barGap;d!=null&&(s.gap=d);var v=n.barCategoryGap;v!=null&&(s.categoryGap=v)});var r={};return R(t,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=at(a).length;s=Math.max(35-l*4,15)+"%"}var u=me(s,o),c=me(n.gap,1),f=n.remainedWidth,h=n.autoWidthCount,d=(f-u)/(h+(h-1)*c);d=Math.max(d,0),R(a,function(x){var _=x.maxWidth,b=x.minWidth;if(x.width){var S=x.width;_&&(S=Math.min(S,_)),b&&(S=Math.max(S,b)),x.width=S,f-=S+c*S,h--}else{var S=d;_&&_<S&&(S=Math.min(_,f)),b&&b>S&&(S=b),S!==d&&(x.width=S,f-=S+c*S,h--)}}),d=(f-u)/(h+(h-1)*c),d=Math.max(d,0);var v=0,m;R(a,function(x,_){x.width||(x.width=d),m=x,v+=x.width*(1+c)}),m&&(v-=m.width*c);var y=-v/2;R(a,function(x,_){r[i][_]=r[i][_]||{bandWidth:o,offset:y,width:x.width},y+=x.width*(1+c)})}),r}function T$e(e,t,r){if(e&&t){var n=e[Dj(t)];return n}}function ute(e,t){var r=ote(e,t),n=ste(r);R(r,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=ate(i),u=n[Dj(s)][l],c=u.offset,f=u.width;a.setLayout({bandWidth:u.bandWidth,offset:c,size:f})})}function cte(e){return{seriesType:e,plan:Yv(),reset:function(t){if(fte(t)){var r=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=r.getDimensionIndex(r.mapDimension(a.dim)),s=r.getDimensionIndex(r.mapDimension(i.dim)),l=t.get("showBackground",!0),u=r.mapDimension(a.dim),c=r.getCalculationInfo("stackResultDimension"),f=Xs(r,u)&&!!r.getCalculationInfo("stackedOnSeries"),h=a.isHorizontal(),d=C$e(i,a),v=hte(t),m=t.get("barMinHeight")||0,y=c&&r.getDimensionIndex(c),x=r.getLayout("size"),_=r.getLayout("offset");return{progress:function(b,S){for(var T=b.count,C=v&&ko(T*3),A=v&&l&&ko(T*3),P=v&&ko(T),I=n.master.getRect(),k=h?I.width:I.height,E,D=S.getStore(),N=0;(E=b.next())!=null;){var z=D.get(f?y:o,E),V=D.get(s,E),F=d,$=void 0;f&&($=+z-D.get(o,E));var B=void 0,H=void 0,U=void 0,Y=void 0;if(h){var Z=n.dataToPoint([z,V]);if(f){var Q=n.dataToPoint([$,V]);F=Q[0]}B=F,H=Z[1]+_,U=Z[0]-F,Y=x,Math.abs(U)<m&&(U=(U<0?-1:1)*m)}else{var Z=n.dataToPoint([V,z]);if(f){var Q=n.dataToPoint([V,$]);F=Q[1]}B=Z[0]+_,H=F,U=x,Y=Z[1]-F,Math.abs(Y)<m&&(Y=(Y<=0?-1:1)*m)}v?(C[N]=B,C[N+1]=H,C[N+2]=h?U:Y,A&&(A[N]=h?I.x:B,A[N+1]=h?H:I.y,A[N+2]=k),P[E]=E):S.setItemLayout(E,{x:B,y:H,width:U,height:Y}),N+=3}v&&S.setLayout({largePoints:C,largeDataIndices:P,largeBackgroundPoints:A,valueAxisHorizontal:h})}}}}}}function fte(e){return e.coordinateSystem&&e.coordinateSystem.type==="cartesian2d"}function hte(e){return e.pipelineContext&&e.pipelineContext.large}function C$e(e,t){var r=t.model.get("startValue");return r||(r=0),t.toGlobalCoord(t.dataToCoord(t.type==="log"?r>0?r:1:r))}var A$e=function(e,t,r,n){for(;r<n;){var i=r+n>>>1;e[i][1]<t?r=i+1:n=i}return r},Nj=function(e){K(t,e);function t(r){var n=e.call(this,r)||this;return n.type="time",n}return t.prototype.getLabel=function(r){var n=this.getSetting("useUTC");return x0(r.value,BV[X5e(rm(this._minLevelUnit))]||BV.second,n,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(r,n,i){var a=this.getSetting("useUTC"),o=this.getSetting("locale");return q5e(r,n,i,o,a)},t.prototype.getTicks=function(r){r=r||{};var n=this._interval,i=this._extent,a=Cr(),o=[];if(!n)return o;var s=this.getSetting("useUTC");if(a&&r.breakTicks==="only_break")return Cr().addBreaksToTicks(o,this._brkCtx.breaks,this._extent),o;var l=qh(i[1],s);o.push({value:i[0],time:{level:0,upperTimeUnit:l,lowerTimeUnit:l}});var u=E$e(this._minLevelUnit,this._approxInterval,s,i,this._getExtentSpanWithBreaks(),this._brkCtx);o=o.concat(u);var c=qh(i[1],s);o.push({value:i[1],time:{level:0,upperTimeUnit:c,lowerTimeUnit:c}});var f=this.getSetting("useUTC"),h=_i.length-1,d=0;return R(o,function(v){h=Math.min(h,He(_i,v.time.upperTimeUnit)),d=Math.max(d,v.time.level)}),a&&Cr().pruneTicksByBreak(r.pruneByBreak,o,this._brkCtx.breaks,function(v){return v.value},this._approxInterval,this._extent),a&&r.breakTicks!=="none"&&Cr().addBreaksToTicks(o,this._brkCtx.breaks,this._extent,function(v){for(var m=Math.max(He(_i,qh(v.vmin,f)),He(_i,qh(v.vmax,f))),y=0,x=0;x<_i.length;x++)if(!dte(_i[x],v.vmin,v.vmax,f)){y=x;break}var _=Math.min(y,h),b=Math.max(_,m);return{level:d,lowerTimeUnit:_i[b],upperTimeUnit:_i[_]}}),o},t.prototype.calcNiceExtent=function(r){var n=this.getExtent();if(n[0]===n[1]&&(n[0]-=ra,n[1]+=ra),n[1]===-1/0&&n[0]===1/0){var i=new Date;n[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),n[0]=n[1]-ra}this._innerSetExtent(n[0],n[1]),this.calcNiceTicks(r.splitNumber,r.minInterval,r.maxInterval)},t.prototype.calcNiceTicks=function(r,n,i){r=r||10;var a=this._getExtentSpanWithBreaks();this._approxInterval=a/r,n!=null&&this._approxInterval<n&&(this._approxInterval=n),i!=null&&this._approxInterval>i&&(this._approxInterval=i);var o=s_.length,s=Math.min(A$e(s_,this._approxInterval,0,o),o-1);this._interval=s_[s][1],this._intervalPrecision=Ly(this._interval),this._minLevelUnit=s_[Math.max(s-1,0)][0]},t.prototype.parse=function(r){return st(r)?r:+Jo(r)},t.prototype.contain=function(r){return Ej(r,this._extent)},t.prototype.normalize=function(r){return this._calculator.normalize(r,this._extent)},t.prototype.scale=function(r){return this._calculator.scale(r,this._extent)},t.type="time",t}(qs),s_=[["second",QN],["minute",ej],["hour",tm],["quarter-day",tm*6],["half-day",tm*12],["day",ra*1.2],["half-week",ra*3.5],["week",ra*7],["month",ra*31],["quarter",ra*95],["half-year",RV/2],["year",RV]];function dte(e,t,r,n){return bw(new Date(t),e,n).getTime()===bw(new Date(r),e,n).getTime()}function M$e(e,t){return e/=ra,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function P$e(e){var t=30*ra;return e/=t,e>6?6:e>3?3:e>2?2:1}function k$e(e){return e/=tm,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function Y6(e,t){return e/=t?ej:QN,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function L$e(e){return PN(e,!0)}function I$e(e,t,r){var n=Math.max(0,He(_i,t)-1);return bw(new Date(e),_i[n],r).getTime()}function O$e(e,t){var r=new Date(0);r[e](1);var n=r.getTime();r[e](1+t);var i=r.getTime()-n;return function(a,o){return Math.max(0,Math.round((o-a)/i))}}function E$e(e,t,r,n,i,a){var o=1e4,s=H5e,l=0;function u(N,z,V,F,$,B,H){for(var U=O$e($,N),Y=z,Z=new Date(Y);Y<V&&Y<=n[1]&&(H.push({value:Y}),!(l++>o));)if(Z[$](Z[F]()+N),Y=Z.getTime(),a){var Q=a.calcNiceTickMultiple(Y,U);Q>0&&(Z[$](Z[F]()+Q*N),Y=Z.getTime())}H.push({value:Y,notAdd:!0})}function c(N,z,V){var F=[],$=!z.length;if(!dte(rm(N),n[0],n[1],r)){$&&(z=[{value:I$e(n[0],N,r)},{value:n[1]}]);for(var B=0;B<z.length-1;B++){var H=z[B].value,U=z[B+1].value;if(H!==U){var Y=void 0,Z=void 0,Q=void 0,re=!1;switch(N){case"year":Y=Math.max(1,Math.round(t/ra/365)),Z=_Q(r),Q=K5e(r);break;case"half-year":case"quarter":case"month":Y=P$e(t),Z=tj(r),Q=bQ(r);break;case"week":case"half-week":case"day":Y=M$e(t),Z=rj(r),Q=wQ(r),re=!0;break;case"half-day":case"quarter-day":case"hour":Y=k$e(t),Z=nj(r),Q=SQ(r);break;case"minute":Y=Y6(t,!0),Z=ij(r),Q=TQ(r);break;case"second":Y=Y6(t,!1),Z=aj(r),Q=CQ(r);break;case"millisecond":Y=L$e(t),Z=oj(r),Q=AQ(r);break}U>=n[0]&&H<=n[1]&&u(Y,H,U,Z,Q,re,F),N==="year"&&V.length>1&&B===0&&V.unshift({value:V[0].value-Y})}}for(var B=0;B<F.length;B++)V.push(F[B])}}for(var f=[],h=[],d=0,v=0,m=0;m<s.length;++m){var y=rm(s[m]);if(Y5e(s[m])){c(s[m],f[f.length-1]||[],h);var x=s[m+1]?rm(s[m+1]):null;if(y!==x){if(h.length){v=d,h.sort(function(N,z){return N.value-z.value});for(var _=[],b=0;b<h.length;++b){var S=h[b].value;(b===0||h[b-1].value!==S)&&(_.push(h[b]),S>=n[0]&&S<=n[1]&&d++)}var T=i/t;if(d>T*1.5&&v>T/1.5||(f.push(_),d>T||e===s[m]))break}h=[]}}}for(var C=dt(le(f,function(N){return dt(N,function(z){return z.value>=n[0]&&z.value<=n[1]&&!z.notAdd})}),function(N){return N.length>0}),A=[],P=C.length-1,m=0;m<C.length;++m)for(var I=C[m],k=0;k<I.length;++k){var E=qh(I[k].value,r);A.push({value:I[k].value,time:{level:P-m,upperTimeUnit:E,lowerTimeUnit:E}})}A.sort(function(N,z){return N.value-z.value});for(var D=[],m=0;m<A.length;++m)(m===0||A[m].value!==A[m-1].value)&&D.push(A[m]);return D}Iu.registerClass(Nj);var rO=gr,D$e=Math.floor,N$e=Math.ceil,l_=Math.pow,u_=Math.log,vte=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="log",r.base=10,r._originalScale=new qs,r}return t.prototype.getTicks=function(r){r=r||{};var n=this._extent.slice(),i=this._originalScale.getExtent(),a=e.prototype.getTicks.call(this,r),o=this.base,s=this._originalScale._innerGetBreaks(),l=Cr();return le(a,function(u){var c=u.value,f=null,h=l_(o,c);c===n[0]&&this._fixMin?f=i[0]:c===n[1]&&this._fixMax&&(f=i[1]);var d;if(l){var v=l.getTicksLogTransformBreak(u,o,s,c_);d=v.vBreak,f==null&&(f=v.brkRoundingCriterion)}return f!=null&&(h=c_(h,f)),{value:h,break:d}},this)},t.prototype._getNonTransBreaks=function(){return this._originalScale._innerGetBreaks()},t.prototype.setExtent=function(r,n){this._originalScale.setExtent(r,n);var i=eO(this.base,[r,n]);e.prototype.setExtent.call(this,i[0],i[1])},t.prototype.getExtent=function(){var r=this.base,n=e.prototype.getExtent.call(this);n[0]=l_(r,n[0]),n[1]=l_(r,n[1]);var i=this._originalScale.getExtent();return this._fixMin&&(n[0]=c_(n[0],i[0])),this._fixMax&&(n[1]=c_(n[1],i[1])),n},t.prototype.unionExtentFromData=function(r,n){this._originalScale.unionExtentFromData(r,n);var i=eO(this.base,r.getApproximateExtent(n),!0);this._innerUnionExtent(i)},t.prototype.calcNiceTicks=function(r){r=r||10;var n=this._extent.slice(),i=this._getExtentSpanWithBreaks();if(!(!isFinite(i)||i<=0)){var a=xJ(i),o=r/i*a;for(o<=.5&&(a*=10);!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0;)a*=10;var s=[rO(N$e(n[0]/a)*a),rO(D$e(n[1]/a)*a)];this._interval=a,this._intervalPrecision=Ly(a),this._niceExtent=s}},t.prototype.calcNiceExtent=function(r){e.prototype.calcNiceExtent.call(this,r),this._fixMin=r.fixMin,this._fixMax=r.fixMax},t.prototype.contain=function(r){return r=u_(r)/u_(this.base),e.prototype.contain.call(this,r)},t.prototype.normalize=function(r){return r=u_(r)/u_(this.base),e.prototype.normalize.call(this,r)},t.prototype.scale=function(r){return r=e.prototype.scale.call(this,r),l_(this.base,r)},t.prototype.setBreaksFromOption=function(r){var n=Cr();if(n){var i=n.logarithmicParseBreaksFromOption(r,this.base,_e(this.parse,this)),a=i.parsedOriginal,o=i.parsedLogged;this._originalScale._innerSetBreak(a),this._innerSetBreak(o)}},t.type="log",t}(qs);function c_(e,t){return rO(e,$a(t))}Iu.registerClass(vte);var j$e=function(){function e(t,r,n){this._prepareParams(t,r,n)}return e.prototype._prepareParams=function(t,r,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var i=this._isOrdinal=t.type==="ordinal";this._needCrossZero=t.type==="interval"&&r.getNeedCrossZero&&r.getNeedCrossZero();var a=r.get("min",!0);a==null&&(a=r.get("startValue",!0));var o=this._modelMinRaw=a;ke(o)?this._modelMinNum=f_(t,o({min:n[0],max:n[1]})):o!=="dataMin"&&(this._modelMinNum=f_(t,o));var s=this._modelMaxRaw=r.get("max",!0);if(ke(s)?this._modelMaxNum=f_(t,s({min:n[0],max:n[1]})):s!=="dataMax"&&(this._modelMaxNum=f_(t,s)),i)this._axisDataLen=r.getCategories().length;else{var l=r.get("boundaryGap"),u=oe(l)?l:[l||0,l||0];typeof u[0]=="boolean"||typeof u[1]=="boolean"?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[Ja(u[0],1),Ja(u[1],1)]}},e.prototype.calculate=function(){var t=this._isOrdinal,r=this._dataMin,n=this._dataMax,i=this._axisDataLen,a=this._boundaryGapInner,o=t?null:n-r||Math.abs(r),s=this._modelMinRaw==="dataMin"?r:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?n:this._modelMaxNum,u=s!=null,c=l!=null;s==null&&(s=t?i?0:NaN:r-a[0]*o),l==null&&(l=t?i?i-1:NaN:n+a[1]*o),(s==null||!isFinite(s))&&(s=NaN),(l==null||!isFinite(l))&&(l=NaN);var f=xn(s)||xn(l)||t&&!i;this._needCrossZero&&(s>0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var h=this._determinedMin,d=this._determinedMax;return h!=null&&(s=h,u=!0),d!=null&&(l=d,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:f}},e.prototype.modifyDataMinMax=function(t,r){this[B$e[t]]=r},e.prototype.setDeterminedMinMax=function(t,r){var n=R$e[t];this[n]=r},e.prototype.freeze=function(){this.frozen=!0},e}(),R$e={min:"_determinedMin",max:"_determinedMax"},B$e={min:"_dataMin",max:"_dataMax"};function pte(e,t,r){var n=e.rawExtentInfo;return n||(n=new j$e(e,t,r),e.rawExtentInfo=n,n)}function f_(e,t){return t==null?null:xn(t)?NaN:e.parse(t)}function gte(e,t){var r=e.type,n=pte(e,t,e.getExtent()).calculate();e.setBlank(n.isBlank);var i=n.min,a=n.max,o=t.ecModel;if(o&&r==="time"){var s=ote("bar",o),l=!1;if(R(s,function(f){l=l||f.getBaseAxis()===t.axis}),l){var u=ste(s),c=z$e(i,a,t,u);i=c.min,a=c.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function z$e(e,t,r,n){var i=r.axis.getExtent(),a=Math.abs(i[1]-i[0]),o=T$e(n,r.axis);if(o===void 0)return{min:e,max:t};var s=1/0;R(o,function(d){s=Math.min(d.offset,s)});var l=-1/0;R(o,function(d){l=Math.max(d.offset+d.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=t-e,f=1-(s+l)/a,h=c/f-c;return t+=h*(l/u),e-=h*(s/u),{min:e,max:t}}function yf(e,t){var r=t,n=gte(e,r),i=n.extent,a=r.get("splitNumber");e instanceof vte&&(e.base=r.get("logBase"));var o=e.type,s=r.get("interval"),l=o==="interval"||o==="time";e.setBreaksFromOption(yte(r)),e.setExtent(i[0],i[1]),e.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?r.get("minInterval"):null,maxInterval:l?r.get("maxInterval"):null}),s!=null&&e.setInterval&&e.setInterval(s)}function w0(e,t){if(t=t||e.get("type"),t)switch(t){case"category":return new iv({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new Nj({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(Iu.getClass(t)||qs)}}function $$e(e){var t=e.scale.getExtent(),r=t[0],n=t[1];return!(r>0&&n>0||r<0&&n<0)}function Jv(e){var t=e.getLabelModel().get("formatter");if(e.type==="time"){var r=U5e(t);return function(i,a){return e.scale.getFormattedLabel(i,a,r)}}else{if(ye(t))return function(i){var a=e.scale.getLabel(i),o=t.replace("{value}",a??"");return o};if(ke(t)){if(e.type==="category")return function(i,a){return t(Ew(e,i),i.value-e.scale.getExtent()[0],null)};var n=Cr();return function(i,a){var o=null;return n&&(o=n.makeAxisLabelFormatterParamBreak(o,i.break)),t(Ew(e,i),a,o)}}else return function(i){return e.scale.getLabel(i)}}}function Ew(e,t){return e.type==="category"?e.scale.getLabel(t):t.value}function jj(e){var t=e.get("interval");return t??"auto"}function mte(e){return e.type==="category"&&jj(e.getLabelModel())===0}function Dw(e,t){var r={};return R(e.mapDimensionsAll(t),function(n){r[Oj(e,n)]=!0}),at(r)}function F$e(e,t,r){t&&R(Dw(t,r),function(n){var i=t.getApproximateExtent(n);i[0]<e[0]&&(e[0]=i[0]),i[1]>e[1]&&(e[1]=i[1])})}function av(e){return e==="middle"||e==="center"}function Oy(e){return e.getShallow("show")}function yte(e){var t=e.get("breaks",!0);if(t!=null)return!Cr()||!V$e(e.axis)?void 0:t}function V$e(e){return(e.dim==="x"||e.dim==="y"||e.dim==="z"||e.dim==="single")&&e.type!=="category"}var Qv=function(){function e(){}return e.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},e.prototype.getCoordSysModel=function(){},e}();function G$e(e){return es(null,e)}var W$e={isDimensionStacked:Xs,enableDataStack:nte,getStackedDimension:Oj};function H$e(e,t){var r=t;t instanceof rt||(r=new rt(t));var n=w0(r);return n.setExtent(e[0],e[1]),yf(n,r),n}function U$e(e){cr(e,Qv)}function Z$e(e,t){return t=t||{},kt(e,null,null,t.state!=="normal")}const Y$e=Object.freeze(Object.defineProperty({__proto__:null,createDimensions:i$e,createList:G$e,createScale:H$e,createSymbol:xr,createTextStyle:Z$e,dataStack:W$e,enableHoverEmphasis:eu,getECData:ze,getLayoutRect:$t,mixinAxisModelCommonMethods:U$e},Symbol.toStringTag,{value:"Module"}));var X$e=1e-8;function X6(e,t){return Math.abs(e-t)<X$e}function bc(e,t,r){var n=0,i=e[0];if(!i)return!1;for(var a=1;a<e.length;a++){var o=e[a];n+=vs(i[0],i[1],o[0],o[1],t,r),i=o}var s=e[0];return(!X6(i[0],s[0])||!X6(i[1],s[1]))&&(n+=vs(i[0],i[1],s[0],s[1],t,r)),n!==0}var q$e=[];function Q2(e,t){for(var r=0;r<e.length;r++)lr(e[r],e[r],t)}function q6(e,t,r,n){for(var i=0;i<e.length;i++){var a=e[i];n&&(a=n.project(a)),a&&isFinite(a[0])&&isFinite(a[1])&&(ws(t,t,a),Ss(r,r,a))}}function K$e(e){for(var t=0,r=0,n=0,i=e.length,a=e[i-1][0],o=e[i-1][1],s=0;s<i;s++){var l=e[s][0],u=e[s][1],c=a*u-l*o;t+=c,r+=(a+l)*c,n+=(o+u)*c,a=l,o=u}return t?[r/t/3,n/t/3,t]:[e[0][0]||0,e[0][1]||0]}var xte=function(){function e(t){this.name=t}return e.prototype.setCenter=function(t){this._center=t},e.prototype.getCenter=function(){var t=this._center;return t||(t=this._center=this.calcCenter()),t},e}(),K6=function(){function e(t,r){this.type="polygon",this.exterior=t,this.interiors=r}return e}(),J6=function(){function e(t){this.type="linestring",this.points=t}return e}(),_te=function(e){K(t,e);function t(r,n,i){var a=e.call(this,r)||this;return a.type="geoJSON",a.geometries=n,a._center=i&&[i[0],i[1]],a}return t.prototype.calcCenter=function(){for(var r=this.geometries,n,i=0,a=0;a<r.length;a++){var o=r[a],s=o.exterior,l=s&&s.length;l>i&&(n=o,i=l)}if(n)return K$e(n.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},t.prototype.getBoundingRect=function(r){var n=this._rect;if(n&&!r)return n;var i=[1/0,1/0],a=[-1/0,-1/0],o=this.geometries;return R(o,function(s){s.type==="polygon"?q6(s.exterior,i,a,r):R(s.points,function(l){q6(l,i,a,r)})}),isFinite(i[0])&&isFinite(i[1])&&isFinite(a[0])&&isFinite(a[1])||(i[0]=i[1]=a[0]=a[1]=0),n=new je(i[0],i[1],a[0]-i[0],a[1]-i[1]),r||(this._rect=n),n},t.prototype.contain=function(r){var n=this.getBoundingRect(),i=this.geometries;if(!n.contain(r[0],r[1]))return!1;e:for(var a=0,o=i.length;a<o;a++){var s=i[a];if(s.type==="polygon"){var l=s.exterior,u=s.interiors;if(bc(l,r[0],r[1])){for(var c=0;c<(u?u.length:0);c++)if(bc(u[c],r[0],r[1]))continue e;return!0}}}return!1},t.prototype.transformTo=function(r,n,i,a){var o=this.getBoundingRect(),s=o.width/o.height;i?a||(a=i/s):i=s*a;for(var l=new je(r,n,i,a),u=o.calculateTransform(l),c=this.geometries,f=0;f<c.length;f++){var h=c[f];h.type==="polygon"?(Q2(h.exterior,u),R(h.interiors,function(d){Q2(d,u)})):R(h.points,function(d){Q2(d,u)})}o=this._rect,o.copy(l),this._center=[o.x+o.width/2,o.y+o.height/2]},t.prototype.cloneShallow=function(r){r==null&&(r=this.name);var n=new t(r,this.geometries,this._center);return n._rect=this._rect,n.transformTo=null,n},t}(xte),J$e=function(e){K(t,e);function t(r,n){var i=e.call(this,r)||this;return i.type="geoSVG",i._elOnlyForCalculate=n,i}return t.prototype.calcCenter=function(){for(var r=this._elOnlyForCalculate,n=r.getBoundingRect(),i=[n.x+n.width/2,n.y+n.height/2],a=f0(q$e),o=r;o&&!o.isGeoSVGGraphicRoot;)Wa(a,o.getLocalTransform(),a),o=o.parent;return pa(a,a),lr(i,i,a),i},t}(xte);function Q$e(e){if(!e.UTF8Encoding)return e;var t=e,r=t.UTF8Scale;r==null&&(r=1024);var n=t.features;return R(n,function(i){var a=i.geometry,o=a.encodeOffsets,s=a.coordinates;if(o)switch(a.type){case"LineString":a.coordinates=bte(s,o,r);break;case"Polygon":eM(s,o,r);break;case"MultiLineString":eM(s,o,r);break;case"MultiPolygon":R(s,function(l,u){return eM(l,o[u],r)})}}),t.UTF8Encoding=!1,t}function eM(e,t,r){for(var n=0;n<e.length;n++)e[n]=bte(e[n],t[n],r)}function bte(e,t,r){for(var n=[],i=t[0],a=t[1],o=0;o<e.length;o+=2){var s=e.charCodeAt(o)-64,l=e.charCodeAt(o+1)-64;s=s>>1^-(s&1),l=l>>1^-(l&1),s+=i,l+=a,i=s,a=l,n.push([s/r,l/r])}return n}function nO(e,t){return e=Q$e(e),le(dt(e.features,function(r){return r.geometry&&r.properties&&r.geometry.coordinates.length>0}),function(r){var n=r.properties,i=r.geometry,a=[];switch(i.type){case"Polygon":var o=i.coordinates;a.push(new K6(o[0],o.slice(1)));break;case"MultiPolygon":R(i.coordinates,function(l){l[0]&&a.push(new K6(l[0],l.slice(1)))});break;case"LineString":a.push(new J6([i.coordinates]));break;case"MultiLineString":a.push(new J6(i.coordinates))}var s=new _te(n[t||"name"],a,n.cp);return s.properties=n,s})}const eFe=Object.freeze(Object.defineProperty({__proto__:null,MAX_SAFE_INTEGER:mI,asc:Mi,getPercentWithPrecision:xRe,getPixelPrecision:AN,getPrecision:$a,getPrecisionSafe:mJ,isNumeric:kN,isRadianAroundZero:Jd,linearMap:gt,nice:PN,numericToNumber:Ho,parseDate:Jo,parsePercent:me,quantile:ub,quantity:xJ,quantityExponent:NT,reformIntervals:yI,remRadian:MN,round:gr},Symbol.toStringTag,{value:"Module"})),tFe=Object.freeze(Object.defineProperty({__proto__:null,format:x0,parse:Jo,roundTime:bw},Symbol.toStringTag,{value:"Module"})),rFe=Object.freeze(Object.defineProperty({__proto__:null,Arc:g0,BezierCurve:Fv,BoundingRect:je,Circle:Qo,CompoundPath:m0,Ellipse:p0,Group:Ie,Image:Jr,IncrementalDisplayable:aQ,Line:mr,LinearGradient:If,Polygon:Tn,Polyline:ln,RadialGradient:VN,Rect:qe,Ring:$v,Sector:Sn,Text:ot,clipPointsByRect:UN,clipRectByRect:cQ,createIcon:Gv,extendPath:lQ,extendShape:sQ,getShapeClass:Sy,getTransform:tu,initProps:jt,makeImage:WN,makePath:ev,mergePath:Ti,registerShape:ba,resizePath:HN,updateProps:ut},Symbol.toStringTag,{value:"Module"})),nFe=Object.freeze(Object.defineProperty({__proto__:null,addCommas:sj,capitalFirst:tBe,encodeHTML:Nn,formatTime:eBe,formatTpl:uj,getTextRect:J5e,getTooltipMarker:MQ,normalizeCssArray:Uv,toCamelCase:lj,truncateText:JRe},Symbol.toStringTag,{value:"Module"})),iFe=Object.freeze(Object.defineProperty({__proto__:null,bind:_e,clone:Le,curry:We,defaults:Oe,each:R,extend:ae,filter:dt,indexOf:He,inherits:yN,isArray:oe,isFunction:ke,isObject:Ee,isString:ye,map:le,merge:Ue,reduce:va},Symbol.toStringTag,{value:"Module"}));var aFe=et(),im=et(),Qa={estimate:1,determine:2};function Nw(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function wte(e,t){var r=le(t,function(n){return e.scale.parse(n)});return e.type==="time"&&r.length>0&&(r.sort(),r.unshift(r[0]),r.push(r[r.length-1])),r}function oFe(e,t){var r=e.getLabelModel().get("customValues");if(r){var n=Jv(e),i=e.scale.getExtent(),a=wte(e,r),o=dt(a,function(s){return s>=i[0]&&s<=i[1]});return{labels:le(o,function(s){var l={value:s};return{formattedLabel:n(l),rawLabel:e.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return e.type==="category"?lFe(e,t):cFe(e)}function sFe(e,t,r){var n=e.getTickModel().get("customValues");if(n){var i=e.scale.getExtent(),a=wte(e,n);return{ticks:dt(a,function(o){return o>=i[0]&&o<=i[1]})}}return e.type==="category"?uFe(e,t):{ticks:le(e.scale.getTicks(r),function(o){return o.value})}}function lFe(e,t){var r=e.getLabelModel(),n=Ste(e,r,t);return!r.get("show")||e.scale.isBlank()?{labels:[]}:n}function Ste(e,t,r){var n=hFe(e),i=jj(t),a=r.kind===Qa.estimate;if(!a){var o=Cte(n,i);if(o)return o}var s,l;ke(i)?s=Pte(e,i):(l=i==="auto"?dFe(e,r):i,s=Mte(e,l));var u={labels:s,labelCategoryInterval:l};return a?r.out.noPxChangeTryDetermine.push(function(){return iO(n,i,u),!0}):iO(n,i,u),u}function uFe(e,t){var r=fFe(e),n=jj(t),i=Cte(r,n);if(i)return i;var a,o;if((!t.get("show")||e.scale.isBlank())&&(a=[]),ke(n))a=Pte(e,n,!0);else if(n==="auto"){var s=Ste(e,e.getLabelModel(),Nw(Qa.determine));o=s.labelCategoryInterval,a=le(s.labels,function(l){return l.tickValue})}else o=n,a=Mte(e,o,!0);return iO(r,n,{ticks:a,tickCategoryInterval:o})}function cFe(e){var t=e.scale.getTicks(),r=Jv(e);return{labels:le(t,function(n,i){return{formattedLabel:r(n,i),rawLabel:e.scale.getLabel(n),tickValue:n.value,time:n.time,break:n.break}})}}var fFe=Tte("axisTick"),hFe=Tte("axisLabel");function Tte(e){return function(r){return im(r)[e]||(im(r)[e]={list:[]})}}function Cte(e,t){for(var r=0;r<e.list.length;r++)if(e.list[r].key===t)return e.list[r].value}function iO(e,t,r){return e.list.push({key:t,value:r}),r}function dFe(e,t){if(t.kind===Qa.estimate){var r=e.calculateCategoryInterval(t);return t.out.noPxChangeTryDetermine.push(function(){return im(e).autoInterval=r,!0}),r}var n=im(e).autoInterval;return n??(im(e).autoInterval=e.calculateCategoryInterval(t))}function vFe(e,t){var r=t.kind,n=gFe(e),i=Jv(e),a=(n.axisRotate-n.labelRotate)/180*Math.PI,o=e.scale,s=o.getExtent(),l=o.count();if(s[1]-s[0]<1)return 0;var u=1,c=40;l>c&&(u=Math.max(1,Math.floor(l/c)));for(var f=s[0],h=e.dataToCoord(f+1)-e.dataToCoord(f),d=Math.abs(h*Math.cos(a)),v=Math.abs(h*Math.sin(a)),m=0,y=0;f<=s[1];f+=u){var x=0,_=0,b=ET(i({value:f}),n.font,"center","top");x=b.width*1.3,_=b.height*1.3,m=Math.max(m,x,7),y=Math.max(y,_,7)}var S=m/d,T=y/v;isNaN(S)&&(S=1/0),isNaN(T)&&(T=1/0);var C=Math.max(0,Math.floor(Math.min(S,T)));if(r===Qa.estimate)return t.out.noPxChangeTryDetermine.push(_e(pFe,null,e,C,l)),C;var A=Ate(e,C,l);return A??C}function pFe(e,t,r){return Ate(e,t,r)==null}function Ate(e,t,r){var n=aFe(e.model),i=e.getExtent(),a=n.lastAutoInterval,o=n.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-r)<=1&&a>t&&n.axisExtent0===i[0]&&n.axisExtent1===i[1])return a;n.lastTickCount=r,n.lastAutoInterval=t,n.axisExtent0=i[0],n.axisExtent1=i[1]}function gFe(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function Mte(e,t,r){var n=Jv(e),i=e.scale,a=i.getExtent(),o=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=a[0],c=i.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=mte(e),h=o.get("showMinLabel")||f,d=o.get("showMaxLabel")||f;h&&u!==a[0]&&m(a[0]);for(var v=u;v<=a[1];v+=l)m(v);d&&v-l!==a[1]&&m(a[1]);function m(y){var x={value:y};s.push(r?y:{formattedLabel:n(x),rawLabel:i.getLabel(x),tickValue:y,time:void 0,break:void 0})}return s}function Pte(e,t,r){var n=e.scale,i=Jv(e),a=[];return R(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;t(o.value,s)&&a.push(r?l:{formattedLabel:i(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),a}var Q6=[0,1],wa=function(){function e(t,r,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=r,this._extent=n||[0,0]}return e.prototype.contain=function(t){var r=this._extent,n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return t>=n&&t<=i},e.prototype.containData=function(t){return this.scale.contain(this.scale.parse(t))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(t){return AN(t||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(t,r){var n=this._extent;n[0]=t,n[1]=r},e.prototype.dataToCoord=function(t,r){var n=this._extent,i=this.scale;return t=i.normalize(i.parse(t)),this.onBand&&i.type==="ordinal"&&(n=n.slice(),eG(n,i.count())),gt(t,Q6,n,r)},e.prototype.coordToData=function(t,r){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),eG(n,i.count()));var a=gt(t,n,Q6,r);return this.scale.scale(a)},e.prototype.pointToData=function(t,r){},e.prototype.getTicksCoords=function(t){t=t||{};var r=t.tickModel||this.getTickModel(),n=sFe(this,r,{breakTicks:t.breakTicks,pruneByBreak:t.pruneByBreak}),i=n.ticks,a=le(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=r.get("alignWithLabel");return mFe(this,a,o,t.clamp),a},e.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),r=t.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),i=le(n,function(a){return le(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},e.prototype.getViewLabels=function(t){return t=t||Nw(Qa.determine),oFe(this,t).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var t=this._extent,r=this.scale.getExtent(),n=r[1]-r[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},e.prototype.calculateCategoryInterval=function(t){return t=t||Nw(Qa.determine),vFe(this,t)},e}();function eG(e,t){var r=e[1]-e[0],n=t,i=r/n/2;e[0]+=i,e[1]-=i}function mFe(e,t,r,n){var i=t.length;if(!e.onBand||r||!i)return;var a=e.getExtent(),o,s;if(i===1)t[0].coord=a[0],t[0].onBand=!0,o=t[1]={coord:a[1],tickValue:t[0].tickValue,onBand:!0};else{var l=t[i-1].tickValue-t[0].tickValue,u=(t[i-1].coord-t[0].coord)/l;R(t,function(d){d.coord-=u/2,d.onBand=!0});var c=e.scale.getExtent();s=1+c[1]-t[i-1].tickValue,o={coord:t[i-1].coord+u*s,tickValue:c[1]+1,onBand:!0},t.push(o)}var f=a[0]>a[1];h(t[0].coord,a[0])&&(n?t[0].coord=a[0]:t.shift()),n&&h(a[0],t[0].coord)&&t.unshift({coord:a[0],onBand:!0}),h(a[1],o.coord)&&(n?o.coord=a[1]:t.pop()),n&&h(o.coord,a[1])&&t.push({coord:a[1],onBand:!0});function h(d,v){return d=gr(d),v=gr(v),f?d>v:d<v}}function yFe(e){var t=Qe.extend(e);return Qe.registerClass(t),t}function xFe(e){var t=It.extend(e);return It.registerClass(t),t}function _Fe(e){var t=Ct.extend(e);return Ct.registerClass(t),t}function bFe(e){var t=bt.extend(e);return bt.registerClass(t),t}var Xp=Math.PI*2,oc=Uo.CMD,wFe=["top","right","bottom","left"];function SFe(e,t,r,n,i){var a=r.width,o=r.height;switch(e){case"top":n.set(r.x+a/2,r.y-t),i.set(0,-1);break;case"bottom":n.set(r.x+a/2,r.y+o+t),i.set(0,1);break;case"left":n.set(r.x-t,r.y+o/2),i.set(-1,0);break;case"right":n.set(r.x+a+t,r.y+o/2),i.set(1,0);break}}function TFe(e,t,r,n,i,a,o,s,l){o-=e,s-=t;var u=Math.sqrt(o*o+s*s);o/=u,s/=u;var c=o*r+e,f=s*r+t;if(Math.abs(n-i)%Xp<1e-4)return l[0]=c,l[1]=f,u-r;if(a){var h=n;n=Pi(i),i=Pi(h)}else n=Pi(n),i=Pi(i);n>i&&(i+=Xp);var d=Math.atan2(s,o);if(d<0&&(d+=Xp),d>=n&&d<=i||d+Xp>=n&&d+Xp<=i)return l[0]=c,l[1]=f,u-r;var v=r*Math.cos(n)+e,m=r*Math.sin(n)+t,y=r*Math.cos(i)+e,x=r*Math.sin(i)+t,_=(v-o)*(v-o)+(m-s)*(m-s),b=(y-o)*(y-o)+(x-s)*(x-s);return _<b?(l[0]=v,l[1]=m,Math.sqrt(_)):(l[0]=y,l[1]=x,Math.sqrt(b))}function jw(e,t,r,n,i,a,o,s){var l=i-e,u=a-t,c=r-e,f=n-t,h=Math.sqrt(c*c+f*f);c/=h,f/=h;var d=l*c+u*f,v=d/h;s&&(v=Math.min(Math.max(v,0),1)),v*=h;var m=o[0]=e+v*c,y=o[1]=t+v*f;return Math.sqrt((m-i)*(m-i)+(y-a)*(y-a))}function kte(e,t,r,n,i,a,o){r<0&&(e=e+r,r=-r),n<0&&(t=t+n,n=-n);var s=e+r,l=t+n,u=o[0]=Math.min(Math.max(i,e),s),c=o[1]=Math.min(Math.max(a,t),l);return Math.sqrt((u-i)*(u-i)+(c-a)*(c-a))}var Ea=[];function CFe(e,t,r){var n=kte(t.x,t.y,t.width,t.height,e.x,e.y,Ea);return r.set(Ea[0],Ea[1]),n}function AFe(e,t,r){for(var n=0,i=0,a=0,o=0,s,l,u=1/0,c=t.data,f=e.x,h=e.y,d=0;d<c.length;){var v=c[d++];d===1&&(n=c[d],i=c[d+1],a=n,o=i);var m=u;switch(v){case oc.M:a=c[d++],o=c[d++],n=a,i=o;break;case oc.L:m=jw(n,i,c[d],c[d+1],f,h,Ea,!0),n=c[d++],i=c[d++];break;case oc.C:m=KK(n,i,c[d++],c[d++],c[d++],c[d++],c[d],c[d+1],f,h,Ea),n=c[d++],i=c[d++];break;case oc.Q:m=QK(n,i,c[d++],c[d++],c[d],c[d+1],f,h,Ea),n=c[d++],i=c[d++];break;case oc.A:var y=c[d++],x=c[d++],_=c[d++],b=c[d++],S=c[d++],T=c[d++];d+=1;var C=!!(1-c[d++]);s=Math.cos(S)*_+y,l=Math.sin(S)*b+x,d<=1&&(a=s,o=l);var A=(f-y)*b/_+y;m=TFe(y,x,b,S,S+T,C,A,h,Ea),n=Math.cos(S+T)*_+y,i=Math.sin(S+T)*b+x;break;case oc.R:a=n=c[d++],o=i=c[d++];var P=c[d++],I=c[d++];m=kte(a,o,P,I,f,h,Ea);break;case oc.Z:m=jw(n,i,a,o,f,h,Ea,!0),n=a,i=o;break}m<u&&(u=m,r.set(Ea[0],Ea[1]))}return u}var Fa=new Ne,Dt=new Ne,dr=new Ne,Lo=new Ne,To=new Ne;function tG(e,t){if(e){var r=e.getTextGuideLine(),n=e.getTextContent();if(n&&r){var i=e.textGuideLineConfig||{},a=[[0,0],[0,0],[0,0]],o=i.candidates||wFe,s=n.getBoundingRect().clone();s.applyTransform(n.getComputedTransform());var l=1/0,u=i.anchor,c=e.getComputedTransform(),f=c&&pa([],c),h=t.get("length2")||0;u&&dr.copy(u);for(var d=0;d<o.length;d++){var v=o[d];SFe(v,0,s,Fa,Lo),Ne.scaleAndAdd(Dt,Fa,Lo,h),Dt.transform(f);var m=e.getBoundingRect(),y=u?u.distance(Dt):e instanceof nt?AFe(Dt,e.path,dr):CFe(Dt,m,dr);y<l&&(l=y,Dt.transform(c),dr.transform(c),dr.toArray(a[0]),Dt.toArray(a[1]),Fa.toArray(a[2]))}Lte(a,t.get("minTurnAngle")),r.setShape({points:a})}}}var Rw=[],Wn=new Ne;function Lte(e,t){if(t<=180&&t>0){t=t/180*Math.PI,Fa.fromArray(e[0]),Dt.fromArray(e[1]),dr.fromArray(e[2]),Ne.sub(Lo,Fa,Dt),Ne.sub(To,dr,Dt);var r=Lo.len(),n=To.len();if(!(r<.001||n<.001)){Lo.scale(1/r),To.scale(1/n);var i=Lo.dot(To),a=Math.cos(t);if(a<i){var o=jw(Dt.x,Dt.y,dr.x,dr.y,Fa.x,Fa.y,Rw,!1);Wn.fromArray(Rw),Wn.scaleAndAdd(To,o/Math.tan(Math.PI-t));var s=dr.x!==Dt.x?(Wn.x-Dt.x)/(dr.x-Dt.x):(Wn.y-Dt.y)/(dr.y-Dt.y);if(isNaN(s))return;s<0?Ne.copy(Wn,Dt):s>1&&Ne.copy(Wn,dr),Wn.toArray(e[1])}}}}function MFe(e,t,r){if(r<=180&&r>0){r=r/180*Math.PI,Fa.fromArray(e[0]),Dt.fromArray(e[1]),dr.fromArray(e[2]),Ne.sub(Lo,Dt,Fa),Ne.sub(To,dr,Dt);var n=Lo.len(),i=To.len();if(!(n<.001||i<.001)){Lo.scale(1/n),To.scale(1/i);var a=Lo.dot(t),o=Math.cos(r);if(a<o){var s=jw(Dt.x,Dt.y,dr.x,dr.y,Fa.x,Fa.y,Rw,!1);Wn.fromArray(Rw);var l=Math.PI/2,u=Math.acos(To.dot(t)),c=l+u-r;if(c>=l)Ne.copy(Wn,dr);else{Wn.scaleAndAdd(To,s/Math.tan(Math.PI/2-c));var f=dr.x!==Dt.x?(Wn.x-Dt.x)/(dr.x-Dt.x):(Wn.y-Dt.y)/(dr.y-Dt.y);if(isNaN(f))return;f<0?Ne.copy(Wn,Dt):f>1&&Ne.copy(Wn,dr)}Wn.toArray(e[1])}}}}function tM(e,t,r,n){var i=r==="normal",a=i?e:e.ensureState(r);a.ignore=t;var o=n.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();i?e.useStyle(s):a.style=s}function PFe(e,t){var r=t.smooth,n=t.points;if(n)if(e.moveTo(n[0][0],n[0][1]),r>0&&n.length>=3){var i=bs(n[0],n[1]),a=bs(n[1],n[2]);if(!i||!a){e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*r,s=Yg([],n[1],n[0],o/i),l=Yg([],n[1],n[2],o/a),u=Yg([],s,l,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),e.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var c=1;c<n.length;c++)e.lineTo(n[c][0],n[c][1])}function Rj(e,t,r){var n=e.getTextGuideLine(),i=e.getTextContent();if(!i){n&&e.removeTextGuideLine();return}for(var a=t.normal,o=a.get("show"),s=i.ignore,l=0;l<by.length;l++){var u=by[l],c=t[u],f=u==="normal";if(c){var h=c.get("show"),d=f?s:Ae(i.states[u]&&i.states[u].ignore,s);if(d||!Ae(h,o)){var v=f?n:n&&n.states[u];v&&(v.ignore=!0),n&&tM(n,!0,u,c);continue}n||(n=new ln,e.setTextGuideLine(n),!f&&(s||!o)&&tM(n,!0,"normal",t.normal),e.stateProxy&&(n.stateProxy=e.stateProxy)),tM(n,!1,u,c)}}if(n){Oe(n.style,r),n.style.fill=null;var m=a.get("showAbove"),y=e.textGuideLineConfig=e.textGuideLineConfig||{};y.showAbove=m||!1,n.buildPath=PFe}}function Bj(e,t){t=t||"labelLine";for(var r={normal:e.getModel(t)},n=0;n<qn.length;n++){var i=qn[n];r[i]=e.getModel([i,t])}return r}var rG=["label","labelLine","layoutOption","priority","defaultAttr","marginForce","minMarginForce","marginDefault","suggestIgnore"],kFe=1,Bw=2,Ite=kFe|Bw;function zw(e,t,r){r=r||Ite,t?e.dirty|=r:e.dirty&=~r}function Ote(e,t){return t=t||Ite,e.dirty==null||!!(e.dirty&t)}function Yo(e){if(e)return Ote(e)&&Ete(e,e.label,e),e}function Ete(e,t,r){var n=t.getComputedTransform();e.transform=YN(e.transform,n);var i=e.localRect=Ty(e.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=r&&r.marginForce,l=r&&r.minMarginForce,u=r&&r.marginDefault,c=a.__marginType;c==null&&u&&(o=u,c=Xh.textMargin);for(var f=0;f<4;f++)rM[f]=c===Xh.minMargin&&l&&l[f]!=null?l[f]:s&&s[f]!=null?s[f]:o?o[f]:0;c===Xh.textMargin&&pf(i,rM,!1,!1);var h=e.rect=Ty(e.rect,i);return n&&h.applyTransform(n),c===Xh.minMargin&&pf(h,rM,!1,!1),e.axisAligned=ZN(n),(e.label=e.label||{}).ignore=t.ignore,zw(e,!1),zw(e,!0,Bw),e}var rM=[0,0,0,0];function LFe(e,t,r){return e.transform=YN(e.transform,r),e.localRect=Ty(e.localRect,t),e.rect=Ty(e.rect,t),r&&e.rect.applyTransform(r),e.axisAligned=ZN(r),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function aO(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var r=e.transform;r&&(r[4]+=t.x,r[5]+=t.y);var n=e.rect;n&&(n.x+=t.x,n.y+=t.y);var i=e.obb;i&&i.fromBoundingRect(e.localRect,r)}}function oO(e,t){for(var r=0;r<rG.length;r++){var n=rG[r];e[n]==null&&(e[n]=t[n])}return Yo(e)}function nG(e){var t=e.obb;return(!t||Ote(e,Bw))&&(e.obb=t=t||new iQ,t.fromBoundingRect(e.localRect,e.transform),zw(e,!1,Bw)),t}function sO(e,t,r,n,i){var a=e.length,o=Ge[t],s=Ar[t];if(a<2)return!1;e.sort(function(A,P){return A.rect[o]-P.rect[o]});for(var l=0,u,c=!1,f=0;f<a;f++){var h=e[f],d=h.rect;u=d[o]-l,u<0&&(d[o]-=u,h.label[o]-=u,c=!0),l=d[o]+d[s]}var v=e[0],m=e[a-1],y,x;_(),y<0&&T(-y,.8),x<0&&T(x,.8),_(),b(y,x,1),b(x,y,-1),_(),y<0&&C(-y),x<0&&C(x);function _(){y=v.rect[o]-r,x=n-m.rect[o]-m.rect[s]}function b(A,P,I){if(A<0){var k=Math.min(P,-A);if(k>0){S(k*I,0,a);var E=k+A;E<0&&T(-E*I,1)}else T(-A*I,1)}}function S(A,P,I){A!==0&&(c=!0);for(var k=P;k<I;k++){var E=e[k],D=E.rect;D[o]+=A,E.label[o]+=A}}function T(A,P){for(var I=[],k=0,E=1;E<a;E++){var D=e[E-1].rect,N=Math.max(e[E].rect[o]-D[o]-D[s],0);I.push(N),k+=N}if(k){var z=Math.min(Math.abs(A)/k,P);if(A>0)for(var E=0;E<a-1;E++){var V=I[E]*z;S(V,0,E+1)}else for(var E=a-1;E>0;E--){var V=I[E-1]*z;S(-V,E,a)}}}function C(A){var P=A<0?-1:1;A=Math.abs(A);for(var I=Math.ceil(A/(a-1)),k=0;k<a-1;k++)if(P>0?S(I,0,k+1):S(-I,a-k-1,a),A-=I,A<=0)return}return c}function IFe(e){for(var t=0;t<e.length;t++){var r=e[t],n=r.defaultAttr,i=r.labelLine;r.label.attr("ignore",n.ignore),i&&i.attr("ignore",n.labelGuideIgnore)}}function Dte(e){var t=[];e.sort(function(u,c){return(c.suggestIgnore?1:0)-(u.suggestIgnore?1:0)||c.priority-u.priority});function r(u){if(!u.ignore){var c=u.ensureState("emphasis");c.ignore==null&&(c.ignore=!1)}u.ignore=!0}for(var n=0;n<e.length;n++){var i=Yo(e[n]);if(!i.label.ignore){for(var a=i.label,o=i.labelLine,s=!1,l=0;l<t.length;l++)if(eC(i,t[l],null,{touchThreshold:.05})){s=!0;break}s?(r(a),o&&r(o)):t.push(i)}}}function eC(e,t,r,n){return!e||!t||e.label&&e.label.ignore||t.label&&t.label.ignore||!e.rect.intersect(t.rect,r,n)?!1:e.axisAligned&&t.axisAligned?!0:nG(e).intersect(nG(t),r,n)}function OFe(e){if(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r].slice());return t}}function EFe(e,t){var r=e.label,n=t&&t.getTextGuideLine();return{dataIndex:e.dataIndex,dataType:e.dataType,seriesIndex:e.seriesModel.seriesIndex,text:e.label.style.text,rect:e.hostRect,labelRect:e.rect,align:r.style.align,verticalAlign:r.style.verticalAlign,labelLinePoints:OFe(n&&n.shape.points)}}var iG=["align","verticalAlign","width","height","fontSize"],$n=new Ts,nM=et(),DFe=et();function h_(e,t,r){for(var n=0;n<r.length;n++){var i=r[n];t[i]!=null&&(e[i]=t[i])}}var d_=["x","y","rotation"],NFe=function(){function e(){this._labelList=[],this._chartViewList=[]}return e.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},e.prototype._addLabel=function(t,r,n,i,a){var o=i.style,s=i.__hostTarget,l=s.textConfig||{},u=i.getComputedTransform(),c=i.getBoundingRect().plain();je.applyTransform(c,c,u),u?$n.setLocalTransform(u):($n.x=$n.y=$n.rotation=$n.originX=$n.originY=0,$n.scaleX=$n.scaleY=1),$n.rotation=Pi($n.rotation);var f=i.__hostTarget,h;if(f){h=f.getBoundingRect().plain();var d=f.getComputedTransform();je.applyTransform(h,h,d)}var v=h&&f.getTextGuideLine();this._labelList.push({label:i,labelLine:v,seriesModel:n,dataIndex:t,dataType:r,layoutOptionOrCb:a,layoutOption:null,rect:c,hostRect:h,priority:h?h.width*h.height:0,defaultAttr:{ignore:i.ignore,labelGuideIgnore:v&&v.ignore,x:$n.x,y:$n.y,scaleX:$n.scaleX,scaleY:$n.scaleY,rotation:$n.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:i.cursor,attachedPos:l.position,attachedRot:l.rotation}})},e.prototype.addLabelsOfSeries=function(t){var r=this;this._chartViewList.push(t);var n=t.__model,i=n.get("labelLayout");(ke(i)||at(i).length)&&t.group.traverse(function(a){if(a.ignore)return!0;var o=a.getTextContent(),s=ze(a);o&&!o.disableLabelLayout&&r._addLabel(s.dataIndex,s.dataType,n,o,i)})},e.prototype.updateLayoutConfig=function(t){var r=t.getWidth(),n=t.getHeight();function i(b,S){return function(){tG(b,S)}}for(var a=0;a<this._labelList.length;a++){var o=this._labelList[a],s=o.label,l=s.__hostTarget,u=o.defaultAttr,c=void 0;ke(o.layoutOptionOrCb)?c=o.layoutOptionOrCb(EFe(o,l)):c=o.layoutOptionOrCb,c=c||{},o.layoutOption=c;var f=Math.PI/180;l&&l.setTextConfig({local:!1,position:c.x!=null||c.y!=null?null:u.attachedPos,rotation:c.rotate!=null?c.rotate*f:u.attachedRot,offset:[c.dx||0,c.dy||0]});var h=!1;if(c.x!=null?(s.x=me(c.x,r),s.setStyle("x",0),h=!0):(s.x=u.x,s.setStyle("x",u.style.x)),c.y!=null?(s.y=me(c.y,n),s.setStyle("y",0),h=!0):(s.y=u.y,s.setStyle("y",u.style.y)),c.labelLinePoints){var d=l.getTextGuideLine();d&&(d.setShape({points:c.labelLinePoints}),h=!1)}var v=nM(s);v.needsUpdateLabelLine=h,s.rotation=c.rotate!=null?c.rotate*f:u.rotation,s.scaleX=u.scaleX,s.scaleY=u.scaleY;for(var m=0;m<iG.length;m++){var y=iG[m];s.setStyle(y,c[y]!=null?c[y]:u.style[y])}if(c.draggable){if(s.draggable=!0,s.cursor="move",l){var x=o.seriesModel;if(o.dataIndex!=null){var _=o.seriesModel.getData(o.dataType);x=_.getItemModel(o.dataIndex)}s.on("drag",i(l,x.getModel("labelLine")))}}else s.off("drag"),s.cursor=u.cursor}},e.prototype.layout=function(t){var r=t.getWidth(),n=t.getHeight(),i=[];R(this._labelList,function(l){l.defaultAttr.ignore||i.push(oO({},l))});var a=dt(i,function(l){return l.layoutOption.moveOverlap==="shiftX"}),o=dt(i,function(l){return l.layoutOption.moveOverlap==="shiftY"});sO(a,0,0,r),sO(o,1,0,n);var s=dt(i,function(l){return l.layoutOption.hideOverlap});IFe(s),Dte(s)},e.prototype.processLabelsOverall=function(){var t=this;R(this._chartViewList,function(r){var n=r.__model,i=r.ignoreLabelLineUpdate,a=n.isAnimationEnabled();r.group.traverse(function(o){if(o.ignore&&!o.forceLabelAnimation)return!0;var s=!i,l=o.getTextContent();!s&&l&&(s=nM(l).needsUpdateLabelLine),s&&t._updateLabelLine(o,n),a&&t._animateLabels(o,n)})})},e.prototype._updateLabelLine=function(t,r){var n=t.getTextContent(),i=ze(t),a=i.dataIndex;if(n&&a!=null){var o=r.getData(i.dataType),s=o.getItemModel(a),l={},u=o.getItemVisual(a,"style");if(u){var c=o.getVisual("drawType");l.stroke=u[c]}var f=s.getModel("labelLine");Rj(t,Bj(s),l),tG(t,f)}},e.prototype._animateLabels=function(t,r){var n=t.getTextContent(),i=t.getTextGuideLine();if(n&&(t.forceLabelAnimation||!n.ignore&&!n.invisible&&!t.disableLabelAnimation&&!vd(t))){var a=nM(n),o=a.oldLayout,s=ze(t),l=s.dataIndex,u={x:n.x,y:n.y,rotation:n.rotation},c=r.getData(s.dataType);if(o){n.attr(o);var h=t.prevStates;h&&(He(h,"select")>=0&&n.attr(a.oldLayoutSelect),He(h,"emphasis")>=0&&n.attr(a.oldLayoutEmphasis)),ut(n,u,r,l)}else if(n.attr(u),!Wv(n).valueAnimation){var f=Ae(n.style.opacity,1);n.style.opacity=0,jt(n,{style:{opacity:f}},r,l)}if(a.oldLayout=u,n.states.select){var d=a.oldLayoutSelect={};h_(d,u,d_),h_(d,n.states.select,d_)}if(n.states.emphasis){var v=a.oldLayoutEmphasis={};h_(v,u,d_),h_(v,n.states.emphasis,d_)}gQ(n,l,c,r,r)}if(i&&!i.ignore&&!i.invisible){var a=DFe(i),o=a.oldLayout,m={points:i.shape.points};o?(i.attr({shape:o}),ut(i,{shape:m},r)):(i.setShape(m),i.style.strokePercent=0,jt(i,{style:{strokePercent:1}},r)),a.oldLayout=m}},e}(),iM=et();function jFe(e){e.registerUpdateLifecycle("series:beforeupdate",function(t,r,n){var i=iM(r).labelManager;i||(i=iM(r).labelManager=new NFe),i.clearLabels()}),e.registerUpdateLifecycle("series:layoutlabels",function(t,r,n){var i=iM(r).labelManager;n.updatedSeries.forEach(function(a){i.addLabelsOfSeries(r.getViewOfSeriesModel(a))}),i.updateLayoutConfig(r),i.layout(r),i.processLabelsOverall()})}var aM=Math.sin,oM=Math.cos,Nte=Math.PI,sc=Math.PI*2,RFe=180/Nte,jte=function(){function e(){}return e.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},e.prototype.moveTo=function(t,r){this._add("M",t,r)},e.prototype.lineTo=function(t,r){this._add("L",t,r)},e.prototype.bezierCurveTo=function(t,r,n,i,a,o){this._add("C",t,r,n,i,a,o)},e.prototype.quadraticCurveTo=function(t,r,n,i){this._add("Q",t,r,n,i)},e.prototype.arc=function(t,r,n,i,a,o){this.ellipse(t,r,n,n,0,i,a,o)},e.prototype.ellipse=function(t,r,n,i,a,o,s,l){var u=s-o,c=!l,f=Math.abs(u),h=Rl(f-sc)||(c?u>=sc:-u>=sc),d=u>0?u%sc:u%sc+sc,v=!1;h?v=!0:Rl(f)?v=!1:v=d>=Nte==!!c;var m=t+n*oM(o),y=r+i*aM(o);this._start&&this._add("M",m,y);var x=Math.round(a*RFe);if(h){var _=1/this._p,b=(c?1:-1)*(sc-_);this._add("A",n,i,x,1,+c,t+n*oM(o+b),r+i*aM(o+b)),_>.01&&this._add("A",n,i,x,0,+c,m,y)}else{var S=t+n*oM(s),T=r+i*aM(s);this._add("A",n,i,x,+v,+c,S,T)}},e.prototype.rect=function(t,r,n,i){this._add("M",t,r),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},e.prototype.closePath=function(){this._d.length>0&&this._add("Z")},e.prototype._add=function(t,r,n,i,a,o,s,l,u){for(var c=[],f=this._p,h=1;h<arguments.length;h++){var d=arguments[h];if(isNaN(d)){this._invalid=!0;return}c.push(Math.round(d*f)/f)}this._d.push(t+c.join(" ")),this._start=t==="Z"},e.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},e.prototype.getStr=function(){return this._str},e}(),zj="none",BFe=Math.round;function zFe(e){var t=e.fill;return t!=null&&t!==zj}function $Fe(e){var t=e.stroke;return t!=null&&t!==zj}var lO=["lineCap","miterLimit","lineJoin"],FFe=le(lO,function(e){return"stroke-"+e.toLowerCase()});function VFe(e,t,r,n){var i=t.opacity==null?1:t.opacity;if(r instanceof Jr){e("opacity",i);return}if(zFe(t)){var a=xy(t.fill);e("fill",a.color);var o=t.fillOpacity!=null?t.fillOpacity*a.opacity*i:a.opacity*i;o<1&&e("fill-opacity",o)}else e("fill",zj);if($Fe(t)){var s=xy(t.stroke);e("stroke",s.color);var l=t.strokeNoScale?r.getLineScale():1,u=l?(t.lineWidth||0)/l:0,c=t.strokeOpacity!=null?t.strokeOpacity*s.opacity*i:s.opacity*i,f=t.strokeFirst;if(u!==1&&e("stroke-width",u),f&&e("paint-order",f?"stroke":"fill"),c<1&&e("stroke-opacity",c),t.lineDash){var h=_j(r),d=h[0],v=h[1];d&&(v=BFe(v||0),e("stroke-dasharray",d.join(",")),(v||n)&&e("stroke-dashoffset",v))}for(var m=0;m<lO.length;m++){var y=lO[m];if(t[y]!==pw[y]){var x=t[y]||pw[y];x&&e(FFe[m],x)}}}}var Rte="http://www.w3.org/2000/svg",Bte="http://www.w3.org/1999/xlink",GFe="http://www.w3.org/2000/xmlns/",WFe="http://www.w3.org/XML/1998/namespace",aG="ecmeta_";function zte(e){return document.createElementNS(Rte,e)}function Zr(e,t,r,n,i){return{tag:e,attrs:r||{},children:n,text:i,key:t}}function HFe(e,t){var r=[];if(t)for(var n in t){var i=t[n],a=n;i!==!1&&(i!==!0&&i!=null&&(a+='="'+i+'"'),r.push(a))}return"<"+e+" "+r.join(" ")+">"}function UFe(e){return"</"+e+">"}function $j(e,t){t=t||{};var r=t.newline?`
`:"";function n(i){var a=i.children,o=i.tag,s=i.attrs,l=i.text;return HFe(o,s)+(o!=="style"?Nn(l):l||"")+(a?""+r+le(a,function(u){return n(u)}).join(r)+r:"")+UFe(o)}return n(e)}function ZFe(e,t,r){r=r||{};var n=r.newline?`
`:"",i=" {"+n,a=n+"}",o=le(at(e),function(l){return l+i+le(at(e[l]),function(u){return u+":"+e[l][u]+";"}).join(n)+a}).join(n),s=le(at(t),function(l){return"@keyframes "+l+i+le(at(t[l]),function(u){return u+i+le(at(t[l][u]),function(c){var f=t[l][u][c];return c==="d"&&(f='path("'+f+'")'),c+":"+f+";"}).join(n)+a}).join(n)+a}).join(n);return!o&&!s?"":["<![CDATA[",o,s,"]]>"].join(n)}function uO(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function oG(e,t,r,n){return Zr("svg","root",{width:e,height:t,xmlns:Rte,"xmlns:xlink":Bte,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+e+" "+t:!1},r)}var YFe=0;function $te(){return YFe++}var sG={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},pc="transform-origin";function XFe(e,t,r){var n=ae({},e.shape);ae(n,t),e.buildPath(r,n);var i=new jte;return i.reset(oJ(e)),r.rebuildPath(i,1),i.generateStr(),i.getStr()}function qFe(e,t){var r=t.originX,n=t.originY;(r||n)&&(e[pc]=r+"px "+n+"px")}var KFe={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function Fte(e,t){var r=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[r]=e,r}function JFe(e,t,r){var n=e.shape.paths,i={},a,o;if(R(n,function(l){var u=uO(r.zrId);u.animation=!0,tC(l,{},u,!0);var c=u.cssAnims,f=u.cssNodes,h=at(c),d=h.length;if(d){o=h[d-1];var v=c[o];for(var m in v){var y=v[m];i[m]=i[m]||{d:""},i[m].d+=y.d||""}for(var x in f){var _=f[x].animation;_.indexOf(o)>=0&&(a=_)}}}),!!a){t.d=!1;var s=Fte(i,r);return a.replace(o,s)}}function lG(e){return ye(e)?sG[e]?"cubic-bezier("+sG[e]+")":wN(e)?e:"":""}function tC(e,t,r,n){var i=e.animators,a=i.length,o=[];if(e instanceof m0){var s=JFe(e,t,r);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var l={},u=0;u<a;u++){var c=i[u],f=[c.getMaxTime()/1e3+"s"],h=lG(c.getClip().easing),d=c.getDelay();h?f.push(h):f.push("linear"),d&&f.push(d/1e3+"s"),c.getLoop()&&f.push("infinite");var v=f.join(" ");l[v]=l[v]||[v,[]],l[v][1].push(c)}function m(_){var b=_[1],S=b.length,T={},C={},A={},P="animation-timing-function";function I(xe,ie,ve){for(var ce=xe.getTracks(),X=xe.getMaxTime(),te=0;te<ce.length;te++){var pe=ce[te];if(pe.needsAnimate()){var Te=pe.keyframes,Me=pe.propName;if(ve&&(Me=ve(Me)),Me)for(var Xe=0;Xe<Te.length;Xe++){var At=Te[Xe],Wt=Math.round(At.time/X*100)+"%",$r=lG(At.easing),_r=At.rawValue;(ye(_r)||st(_r))&&(ie[Wt]=ie[Wt]||{},ie[Wt][Me]=At.rawValue,$r&&(ie[Wt][P]=$r))}}}}for(var k=0;k<S;k++){var E=b[k],D=E.targetName;D?D==="shape"&&I(E,C):!n&&I(E,T)}for(var N in T){var z={};hw(z,e),ae(z,T[N]);var V=sJ(z),F=T[N][P];A[N]=V?{transform:V}:{},qFe(A[N],z),F&&(A[N][P]=F)}var $,B=!0;for(var N in C){A[N]=A[N]||{};var H=!$,F=C[N][P];H&&($=new Uo);var U=$.len();$.reset(),A[N].d=XFe(e,C[N],$);var Y=$.len();if(!H&&U!==Y){B=!1;break}F&&(A[N][P]=F)}if(!B)for(var N in A)delete A[N].d;if(!n)for(var k=0;k<S;k++){var E=b[k],D=E.targetName;D==="style"&&I(E,A,function(ce){return KFe[ce]})}for(var Z=at(A),Q=!0,re,k=1;k<Z.length;k++){var ue=Z[k-1],de=Z[k];if(A[ue][pc]!==A[de][pc]){Q=!1;break}re=A[ue][pc]}if(Q&&re){for(var N in A)A[N][pc]&&delete A[N][pc];t[pc]=re}if(dt(Z,function(xe){return at(A[xe]).length>0}).length){var Re=Fte(A,r);return Re+" "+_[0]+" both"}}for(var y in l){var s=m(l[y]);s&&o.push(s)}if(o.length){var x=r.zrId+"-cls-"+$te();r.cssNodes["."+x]={animation:o.join(",")},t.class=x}}function QFe(e,t,r){if(!e.ignore)if(e.isSilent()){var n={"pointer-events":"none"};uG(n,t,r)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,l=e.currentStates.indexOf("select")>=0&&s||o;l&&(a=uw(l))}var u=i.lineWidth;if(u){var c=!i.strokeNoScale&&e.transform?e.transform[0]:1;u=u/c}var n={cursor:"pointer"};a&&(n.fill=a),i.stroke&&(n.stroke=i.stroke),u&&(n["stroke-width"]=u),uG(n,t,r)}}function uG(e,t,r,n){var i=JSON.stringify(e),a=r.cssStyleCache[i];a||(a=r.zrId+"-cls-"+$te(),r.cssStyleCache[i]=a,r.cssNodes["."+a+":hover"]=e),t.class=t.class?t.class+" "+a:a}var Ey=Math.round;function Vte(e){return e&&ye(e.src)}function Gte(e){return e&&ke(e.toDataURL)}function Fj(e,t,r,n){VFe(function(i,a){var o=i==="fill"||i==="stroke";o&&aJ(a)?Hte(t,e,i,n):o&&TN(a)?Ute(r,e,i,n):e[i]=a,o&&n.ssr&&a==="none"&&(e["pointer-events"]="visible")},t,r,!1),oVe(r,e,n)}function Vj(e,t){var r=vJ(t);r&&(r.each(function(n,i){n!=null&&(e[(aG+i).toLowerCase()]=n+"")}),t.isSilent()&&(e[aG+"silent"]="true"))}function cG(e){return Rl(e[0]-1)&&Rl(e[1])&&Rl(e[2])&&Rl(e[3]-1)}function eVe(e){return Rl(e[4])&&Rl(e[5])}function Gj(e,t,r){if(t&&!(eVe(t)&&cG(t))){var n=1e4;e.transform=cG(t)?"translate("+Ey(t[4]*n)/n+" "+Ey(t[5]*n)/n+")":Nje(t)}}function fG(e,t,r){for(var n=e.points,i=[],a=0;a<n.length;a++)i.push(Ey(n[a][0]*r)/r),i.push(Ey(n[a][1]*r)/r);t.points=i.join(" ")}function hG(e){return!e.smooth}function tVe(e){var t=le(e,function(r){return typeof r=="string"?[r,r]:r});return function(r,n,i){for(var a=0;a<t.length;a++){var o=t[a],s=r[o[0]];s!=null&&(n[o[1]]=Ey(s*i)/i)}}}var rVe={circle:[tVe(["cx","cy","r"])],polyline:[fG,hG],polygon:[fG,hG]};function nVe(e){for(var t=e.animators,r=0;r<t.length;r++)if(t[r].targetName==="shape")return!0;return!1}function Wte(e,t){var r=e.style,n=e.shape,i=rVe[e.type],a={},o=t.animation,s="path",l=e.style.strokePercent,u=t.compress&&oJ(e)||4;if(i&&!t.willUpdate&&!(i[1]&&!i[1](n))&&!(o&&nVe(e))&&!(l<1)){s=e.type;var c=Math.pow(10,u);i[0](n,a,c)}else{var f=!e.path||e.shapeChanged();e.path||e.createPathProxy();var h=e.path;f&&(h.beginPath(),e.buildPath(h,e.shape),e.pathUpdated());var d=h.getVersion(),v=e,m=v.__svgPathBuilder;(v.__svgPathVersion!==d||!m||l!==v.__svgPathStrokePercent)&&(m||(m=v.__svgPathBuilder=new jte),m.reset(u),h.rebuildPath(m,l),m.generateStr(),v.__svgPathVersion=d,v.__svgPathStrokePercent=l),a.d=m.getStr()}return Gj(a,e.transform),Fj(a,r,e,t),Vj(a,e),t.animation&&tC(e,a,t),t.emphasis&&QFe(e,a,t),Zr(s,e.id+"",a)}function iVe(e,t){var r=e.style,n=r.image;if(n&&!ye(n)&&(Vte(n)?n=n.src:Gte(n)&&(n=n.toDataURL())),!!n){var i=r.x||0,a=r.y||0,o=r.width,s=r.height,l={href:n,width:o,height:s};return i&&(l.x=i),a&&(l.y=a),Gj(l,e.transform),Fj(l,r,e,t),Vj(l,e),t.animation&&tC(e,l,t),Zr("image",e.id+"",l)}}function aVe(e,t){var r=e.style,n=r.text;if(n!=null&&(n+=""),!(!n||isNaN(r.x)||isNaN(r.y))){var i=r.font||Ws,a=r.x||0,o=Rje(r.y||0,d0(i),r.textBaseline),s=jje[r.textAlign]||r.textAlign,l={"dominant-baseline":"central","text-anchor":s};if($J(r)){var u="",c=r.fontStyle,f=zJ(r.fontSize);if(!parseFloat(f))return;var h=r.fontFamily||IK,d=r.fontWeight;u+="font-size:"+f+";font-family:"+h+";",c&&c!=="normal"&&(u+="font-style:"+c+";"),d&&d!=="normal"&&(u+="font-weight:"+d+";"),l.style=u}else l.style="font: "+i;return n.match(/\s/)&&(l["xml:space"]="preserve"),a&&(l.x=a),o&&(l.y=o),Gj(l,e.transform),Fj(l,r,e,t),Vj(l,e),t.animation&&tC(e,l,t),Zr("text",e.id+"",l,void 0,n)}}function dG(e,t){if(e instanceof nt)return Wte(e,t);if(e instanceof Jr)return iVe(e,t);if(e instanceof Qd)return aVe(e,t)}function oVe(e,t,r){var n=e.style;if(Bje(n)){var i=zje(e),a=r.shadowCache,o=a[i];if(!o){var s=e.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var c=n.shadowOffsetX||0,f=n.shadowOffsetY||0,h=n.shadowBlur,d=xy(n.shadowColor),v=d.opacity,m=d.color,y=h/2/l,x=h/2/u,_=y+" "+x;o=r.zrId+"-s"+r.shadowIdx++,r.defs[o]=Zr("filter",o,{id:o,x:"-100%",y:"-100%",width:"300%",height:"300%"},[Zr("feDropShadow","",{dx:c/l,dy:f/u,stdDeviation:_,"flood-color":m,"flood-opacity":v})]),a[i]=o}t.filter=OT(o)}}function Hte(e,t,r,n){var i=e[r],a,o={gradientUnits:i.global?"userSpaceOnUse":"objectBoundingBox"};if(nJ(i))a="linearGradient",o.x1=i.x,o.y1=i.y,o.x2=i.x2,o.y2=i.y2;else if(iJ(i))a="radialGradient",o.cx=Ae(i.x,.5),o.cy=Ae(i.y,.5),o.r=Ae(i.r,.5);else return;for(var s=i.colorStops,l=[],u=0,c=s.length;u<c;++u){var f=oI(s[u].offset)*100+"%",h=s[u].color,d=xy(h),v=d.color,m=d.opacity,y={offset:f};y["stop-color"]=v,m<1&&(y["stop-opacity"]=m),l.push(Zr("stop",u+"",y))}var x=Zr(a,"",o,l),_=$j(x),b=n.gradientCache,S=b[_];S||(S=n.zrId+"-g"+n.gradientIdx++,b[_]=S,o.id=S,n.defs[S]=Zr(a,S,o,l)),t[r]=OT(S)}function Ute(e,t,r,n){var i=e.style[r],a=e.getBoundingRect(),o={},s=i.repeat,l=s==="no-repeat",u=s==="repeat-x",c=s==="repeat-y",f;if(rJ(i)){var h=i.imageWidth,d=i.imageHeight,v=void 0,m=i.image;if(ye(m)?v=m:Vte(m)?v=m.src:Gte(m)&&(v=m.toDataURL()),typeof Image>"u"){var y="Image width/height must been given explictly in svg-ssr renderer.";wn(h,y),wn(d,y)}else if(h==null||d==null){var x=function(k,E){if(k){var D=k.elm,N=h||E.width,z=d||E.height;k.tag==="pattern"&&(u?(z=1,N/=a.width):c&&(N=1,z/=a.height)),k.attrs.width=N,k.attrs.height=z,D&&(D.setAttribute("width",N),D.setAttribute("height",z))}},_=EN(v,null,e,function(k){l||x(C,k),x(f,k)});_&&_.width&&_.height&&(h=h||_.width,d=d||_.height)}f=Zr("image","img",{href:v,width:h,height:d}),o.width=h,o.height=d}else i.svgElement&&(f=Le(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(f){var b,S;l?b=S=1:u?(S=1,b=o.width/a.width):c?(b=1,S=o.height/a.height):o.patternUnits="userSpaceOnUse",b!=null&&!isNaN(b)&&(o.width=b),S!=null&&!isNaN(S)&&(o.height=S);var T=sJ(i);T&&(o.patternTransform=T);var C=Zr("pattern","",o,[f]),A=$j(C),P=n.patternCache,I=P[A];I||(I=n.zrId+"-p"+n.patternIdx++,P[A]=I,o.id=I,C=n.defs[I]=Zr("pattern",I,o,[f])),t[r]=OT(I)}}function sVe(e,t,r){var n=r.clipPathCache,i=r.defs,a=n[e.id];if(!a){a=r.zrId+"-c"+r.clipPathIdx++;var o={id:a};n[e.id]=a,i[a]=Zr("clipPath",a,o,[Wte(e,r)])}t["clip-path"]=OT(a)}function vG(e){return document.createTextNode(e)}function wc(e,t,r){e.insertBefore(t,r)}function pG(e,t){e.removeChild(t)}function gG(e,t){e.appendChild(t)}function Zte(e){return e.parentNode}function Yte(e){return e.nextSibling}function sM(e,t){e.textContent=t}var mG=58,lVe=120,uVe=Zr("","");function cO(e){return e===void 0}function _o(e){return e!==void 0}function cVe(e,t,r){for(var n={},i=t;i<=r;++i){var a=e[i].key;a!==void 0&&(n[a]=i)}return n}function Cg(e,t){var r=e.key===t.key,n=e.tag===t.tag;return n&&r}function Dy(e){var t,r=e.children,n=e.tag;if(_o(n)){var i=e.elm=zte(n);if(Wj(uVe,e),oe(r))for(t=0;t<r.length;++t){var a=r[t];a!=null&&gG(i,Dy(a))}else _o(e.text)&&!Ee(e.text)&&gG(i,vG(e.text))}else e.elm=vG(e.text);return e.elm}function Xte(e,t,r,n,i){for(;n<=i;++n){var a=r[n];a!=null&&wc(e,Dy(a),t)}}function $w(e,t,r,n){for(;r<=n;++r){var i=t[r];if(i!=null)if(_o(i.tag)){var a=Zte(i.elm);pG(a,i.elm)}else pG(e,i.elm)}}function Wj(e,t){var r,n=t.elm,i=e&&e.attrs||{},a=t.attrs||{};if(i!==a){for(r in a){var o=a[r],s=i[r];s!==o&&(o===!0?n.setAttribute(r,""):o===!1?n.removeAttribute(r):r==="style"?n.style.cssText=o:r.charCodeAt(0)!==lVe?n.setAttribute(r,o):r==="xmlns:xlink"||r==="xmlns"?n.setAttributeNS(GFe,r,o):r.charCodeAt(3)===mG?n.setAttributeNS(WFe,r,o):r.charCodeAt(5)===mG?n.setAttributeNS(Bte,r,o):n.setAttribute(r,o))}for(r in i)r in a||n.removeAttribute(r)}}function fVe(e,t,r){for(var n=0,i=0,a=t.length-1,o=t[0],s=t[a],l=r.length-1,u=r[0],c=r[l],f,h,d,v;n<=a&&i<=l;)o==null?o=t[++n]:s==null?s=t[--a]:u==null?u=r[++i]:c==null?c=r[--l]:Cg(o,u)?(Ph(o,u),o=t[++n],u=r[++i]):Cg(s,c)?(Ph(s,c),s=t[--a],c=r[--l]):Cg(o,c)?(Ph(o,c),wc(e,o.elm,Yte(s.elm)),o=t[++n],c=r[--l]):Cg(s,u)?(Ph(s,u),wc(e,s.elm,o.elm),s=t[--a],u=r[++i]):(cO(f)&&(f=cVe(t,n,a)),h=f[u.key],cO(h)?wc(e,Dy(u),o.elm):(d=t[h],d.tag!==u.tag?wc(e,Dy(u),o.elm):(Ph(d,u),t[h]=void 0,wc(e,d.elm,o.elm))),u=r[++i]);(n<=a||i<=l)&&(n>a?(v=r[l+1]==null?null:r[l+1].elm,Xte(e,v,r,i,l)):$w(e,t,n,a))}function Ph(e,t){var r=t.elm=e.elm,n=e.children,i=t.children;e!==t&&(Wj(e,t),cO(t.text)?_o(n)&&_o(i)?n!==i&&fVe(r,n,i):_o(i)?(_o(e.text)&&sM(r,""),Xte(r,null,i,0,i.length-1)):_o(n)?$w(r,n,0,n.length-1):_o(e.text)&&sM(r,""):e.text!==t.text&&(_o(n)&&$w(r,n,0,n.length-1),sM(r,t.text)))}function hVe(e,t){if(Cg(e,t))Ph(e,t);else{var r=e.elm,n=Zte(r);Dy(t),n!==null&&(wc(n,t.elm,Yte(r)),$w(n,[e],0,0))}return t}var dVe=0,vVe=function(){function e(t,r,n){if(this.type="svg",this.refreshHover=yG(),this.configLayer=yG(),this.storage=r,this._opts=n=ae({},n),this.root=t,this._id="zr"+dVe++,this._oldVNode=oG(n.width,n.height),t&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=zte("svg");Wj(null,this._oldVNode),i.appendChild(a),t.appendChild(i)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",hVe(this._oldVNode,t),this._oldVNode=t}},e.prototype.renderOneToVNode=function(t){return dG(t,uO(this._id))},e.prototype.renderToVNode=function(t){t=t||{};var r=this.storage.getDisplayList(!0),n=this._width,i=this._height,a=uO(this._id);a.animation=t.animation,a.willUpdate=t.willUpdate,a.compress=t.compress,a.emphasis=t.emphasis,a.ssr=this._opts.ssr;var o=[],s=this._bgVNode=pVe(n,i,this._backgroundColor,a);s&&o.push(s);var l=t.compress?null:this._mainVNode=Zr("g","main",{},[]);this._paintList(r,a,l?l.children:o),l&&o.push(l);var u=le(at(a.defs),function(h){return a.defs[h]});if(u.length&&o.push(Zr("defs","defs",{},u)),t.animation){var c=ZFe(a.cssNodes,a.cssAnims,{newline:!0});if(c){var f=Zr("style","stl",{},[],c);o.push(f)}}return oG(n,i,o,t.useViewBox)},e.prototype.renderToString=function(t){return t=t||{},$j(this.renderToVNode({animation:Ae(t.cssAnimation,!0),emphasis:Ae(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Ae(t.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(t){this._backgroundColor=t},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(t,r,n){for(var i=t.length,a=[],o=0,s,l,u=0,c=0;c<i;c++){var f=t[c];if(!f.invisible){var h=f.__clipPaths,d=h&&h.length||0,v=l&&l.length||0,m=void 0;for(m=Math.max(d-1,v-1);m>=0&&!(h&&l&&h[m]===l[m]);m--);for(var y=v-1;y>m;y--)o--,s=a[o-1];for(var x=m+1;x<d;x++){var _={};sVe(h[x],_,r);var b=Zr("g","clip-g-"+u++,_,[]);(s?s.children:n).push(b),a[o++]=b,s=b}l=h;var S=dG(f,r);S&&(s?s.children:n).push(S)}}},e.prototype.resize=function(t,r){var n=this._opts,i=this.root,a=this._viewport;if(t!=null&&(n.width=t),r!=null&&(n.height=r),i&&a&&(a.style.display="none",t=Kh(i,0,n),r=Kh(i,1,n),a.style.display=""),this._width!==t||this._height!==r){if(this._width=t,this._height=r,a){var o=a.style;o.width=t+"px",o.height=r+"px"}if(TN(this._backgroundColor))this.refresh();else{var s=this._svgDom;s&&(s.setAttribute("width",t),s.setAttribute("height",r));var l=this._bgVNode&&this._bgVNode.elm;l&&(l.setAttribute("width",t),l.setAttribute("height",r))}}},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},e.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},e.prototype.toDataURL=function(t){var r=this.renderToString(),n="data:image/svg+xml;";return t?(r=Fje(r),r&&n+"base64,"+r):n+"charset=UTF-8,"+encodeURIComponent(r)},e}();function yG(e){return function(){}}function pVe(e,t,r,n){var i;if(r&&r!=="none")if(i=Zr("rect","bg",{width:e,height:t,x:"0",y:"0"}),aJ(r))Hte({fill:r},i.attrs,"fill",n);else if(TN(r))Ute({style:{fill:r},dirty:sr,getBoundingRect:function(){return{width:e,height:t}}},i.attrs,"fill",n);else{var a=xy(r),o=a.color,s=a.opacity;i.attrs.fill=o,s<1&&(i.attrs["fill-opacity"]=s)}return i}function gVe(e){e.registerPainter("svg",vVe)}function xG(e,t,r){var n=fi.createCanvas(),i=t.getWidth(),a=t.getHeight(),o=n.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=i+"px",o.height=a+"px",n.setAttribute("data-zr-dom-id",e)),n.width=i*r,n.height=a*r,n}var lM=function(e){K(t,e);function t(r,n,i){var a=e.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.incremental=!1,a.zlevel=0,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__used=!1,a.__drawIndex=0,a.__startIndex=0,a.__endIndex=0,a.__prevStartIndex=null,a.__prevEndIndex=null;var o;i=i||fw,typeof r=="string"?o=xG(r,n,i):Ee(r)&&(o=r,r=o.id),a.id=r,a.dom=o;var s=o.style;return s&&(xN(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),a.painter=n,a.dpr=i,a}return t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var r=this.dpr;this.domBack=xG("back-"+this.id,this.painter,r),this.ctxBack=this.domBack.getContext("2d"),r!==1&&this.ctxBack.scale(r,r)},t.prototype.createRepaintRects=function(r,n,i,a){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new je(0,0,0,0);function c(_){if(!(!_.isFinite()||_.isZero()))if(o.length===0){var b=new je(0,0,0,0);b.copy(_),o.push(b)}else{for(var S=!1,T=1/0,C=0,A=0;A<o.length;++A){var P=o[A];if(P.intersect(_)){var I=new je(0,0,0,0);I.copy(P),I.union(_),o[A]=I,S=!0;break}else if(l){u.copy(_),u.union(P);var k=_.width*_.height,E=P.width*P.height,D=u.width*u.height,N=D-k-E;N<T&&(T=N,C=A)}}if(l&&(o[C].union(_),S=!0),!S){var b=new je(0,0,0,0);b.copy(_),o.push(b)}l||(l=o.length>=s)}}for(var f=this.__startIndex;f<this.__endIndex;++f){var h=r[f];if(h){var d=h.shouldBePainted(i,a,!0,!0),v=h.__isRendered&&(h.__dirty&Si||!d)?h.getPrevPaintRect():null;v&&c(v);var m=d&&(h.__dirty&Si||!h.__isRendered)?h.getPaintRect():null;m&&c(m)}}for(var f=this.__prevStartIndex;f<this.__prevEndIndex;++f){var h=n[f],d=h&&h.shouldBePainted(i,a,!0,!0);if(h&&(!d||!h.__zr)&&h.__isRendered){var v=h.getPrevPaintRect();v&&c(v)}}var y;do{y=!1;for(var f=0;f<o.length;){if(o[f].isZero()){o.splice(f,1);continue}for(var x=f+1;x<o.length;)o[f].intersect(o[x])?(y=!0,o[f].union(o[x]),o.splice(x,1)):x++;f++}}while(y);return this._paintRects=o,o},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(r,n){var i=this.dpr,a=this.dom,o=a.style,s=this.domBack;o&&(o.width=r+"px",o.height=n+"px"),a.width=r*i,a.height=n*i,s&&(s.width=r*i,s.height=n*i,i!==1&&this.ctxBack.scale(i,i))},t.prototype.clear=function(r,n,i){var a=this.dom,o=this.ctx,s=a.width,l=a.height;n=n||this.clearColor;var u=this.motionBlur&&!r,c=this.lastFrameAlpha,f=this.dpr,h=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(a,0,0,s/f,l/f));var d=this.domBack;function v(m,y,x,_){if(o.clearRect(m,y,x,_),n&&n!=="transparent"){var b=void 0;if(l0(n)){var S=n.global||n.__width===x&&n.__height===_;b=S&&n.__canvasGradient||UI(o,n,{x:0,y:0,width:x,height:_}),n.__canvasGradient=b,n.__width=x,n.__height=_}else NK(n)&&(n.scaleX=n.scaleX||f,n.scaleY=n.scaleY||f,b=ZI(o,n,{dirty:function(){h.setUnpainted(),h.painter.refresh()}}));o.save(),o.fillStyle=b||n,o.fillRect(m,y,x,_),o.restore()}u&&(o.save(),o.globalAlpha=c,o.drawImage(d,m,y,x,_),o.restore())}!i||u?v(0,0,s,l):i.length&&R(i,function(m){v(m.x*f,m.y*f,m.width*f,m.height*f)})},t}(_a),_G=1e5,lc=314159,v_=.01,mVe=.001;function yVe(e){return e?e.__builtin__?!0:!(typeof e.resize!="function"||typeof e.refresh!="function"):!1}function xVe(e,t){var r=document.createElement("div");return r.style.cssText=["position:relative","width:"+e+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",r}var _Ve=function(){function e(t,r,n,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var a=!t.nodeName||t.nodeName.toUpperCase()==="CANVAS";this._opts=n=ae({},n||{}),this.dpr=n.devicePixelRatio||fw,this._singleCanvas=a,this.root=t;var o=t.style;o&&(xN(t),t.innerHTML=""),this.storage=r;var s=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(a){var c=t,f=c.width,h=c.height;n.width!=null&&(f=n.width),n.height!=null&&(h=n.height),this.dpr=n.devicePixelRatio||1,c.width=f*this.dpr,c.height=h*this.dpr,this._width=f,this._height=h;var d=new lM(c,this,this.dpr);d.__builtin__=!0,d.initContext(),l[lc]=d,d.zlevel=lc,s.push(lc),this._domRoot=t}else{this._width=Kh(t,0,n),this._height=Kh(t,1,n);var u=this._domRoot=xVe(this._width,this._height);t.appendChild(u)}}return e.prototype.getType=function(){return"canvas"},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},e.prototype.refresh=function(t){var r=this.storage.getDisplayList(!0),n=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(r,n,t,this._redrawId);for(var a=0;a<i.length;a++){var o=i[a],s=this._layers[o];if(!s.__builtin__&&s.refresh){var l=a===0?this._backgroundColor:null;s.refresh(l)}}return this._opts.useDirtyRect&&(this._prevDisplayList=r.slice()),this},e.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},e.prototype._paintHoverList=function(t){var r=t.length,n=this._hoverlayer;if(n&&n.clear(),!!r){for(var i={inHover:!0,viewWidth:this._width,viewHeight:this._height},a,o=0;o<r;o++){var s=t[o];s.__inHover&&(n||(n=this._hoverlayer=this.getLayer(_G)),a||(a=n.ctx,a.save()),zc(a,s,i,o===r-1))}a&&a.restore()}},e.prototype.getHoverLayer=function(){return this.getLayer(_G)},e.prototype.paintOne=function(t,r){bj(t,r)},e.prototype._paintList=function(t,r,n,i){if(this._redrawId===i){n=n||!1,this._updateLayerStatus(t);var a=this._doPaintList(t,r,n),o=a.finished,s=a.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(t),o)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var l=this;aw(function(){l._paintList(t,r,n,i)})}}},e.prototype._compositeManually=function(){var t=this.getLayer(lc).ctx,r=this._domRoot.width,n=this._domRoot.height;t.clearRect(0,0,r,n),this.eachBuiltinLayer(function(i){i.virtual&&t.drawImage(i.dom,0,0,r,n)})},e.prototype._doPaintList=function(t,r,n){for(var i=this,a=[],o=this._opts.useDirtyRect,s=0;s<this._zlevelList.length;s++){var l=this._zlevelList[s],u=this._layers[l];u.__builtin__&&u!==this._hoverlayer&&(u.__dirty||n)&&a.push(u)}for(var c=!0,f=!1,h=function(m){var y=a[m],x=y.ctx,_=o&&y.createRepaintRects(t,r,d._width,d._height),b=n?y.__startIndex:y.__drawIndex,S=!n&&y.incremental&&Date.now,T=S&&Date.now(),C=y.zlevel===d._zlevelList[0]?d._backgroundColor:null;if(y.__startIndex===y.__endIndex)y.clear(!1,C,_);else if(b===y.__startIndex){var A=t[b];(!A.incremental||!A.notClear||n)&&y.clear(!1,C,_)}b===-1&&(console.error("For some unknown reason. drawIndex is -1"),b=y.__startIndex);var P,I=function(N){var z={inHover:!1,allClipped:!1,prevEl:null,viewWidth:i._width,viewHeight:i._height};for(P=b;P<y.__endIndex;P++){var V=t[P];if(V.__inHover&&(f=!0),i._doPaintEl(V,y,o,N,z,P===y.__endIndex-1),S){var F=Date.now()-T;if(F>15)break}}z.prevElClipPaths&&x.restore()};if(_)if(_.length===0)P=y.__endIndex;else for(var k=d.dpr,E=0;E<_.length;++E){var D=_[E];x.save(),x.beginPath(),x.rect(D.x*k,D.y*k,D.width*k,D.height*k),x.clip(),I(D),x.restore()}else x.save(),I(),x.restore();y.__drawIndex=P,y.__drawIndex<y.__endIndex&&(c=!1)},d=this,v=0;v<a.length;v++)h(v);return it.wxa&&R(this._layers,function(m){m&&m.ctx&&m.ctx.draw&&m.ctx.draw()}),{finished:c,needsRefreshHover:f}},e.prototype._doPaintEl=function(t,r,n,i,a,o){var s=r.ctx;if(n){var l=t.getPaintRect();(!i||l&&l.intersect(i))&&(zc(s,t,a,o),t.setPrevPaintRect(l))}else zc(s,t,a,o)},e.prototype.getLayer=function(t,r){this._singleCanvas&&!this._needsManuallyCompositing&&(t=lc);var n=this._layers[t];return n||(n=new lM("zr_"+t,this,this.dpr),n.zlevel=t,n.__builtin__=!0,this._layerConfig[t]?Ue(n,this._layerConfig[t],!0):this._layerConfig[t-v_]&&Ue(n,this._layerConfig[t-v_],!0),r&&(n.virtual=r),this.insertLayer(t,n),n.initContext()),n},e.prototype.insertLayer=function(t,r){var n=this._layers,i=this._zlevelList,a=i.length,o=this._domRoot,s=null,l=-1;if(!n[t]&&yVe(r)){if(a>0&&t>i[0]){for(l=0;l<a-1&&!(i[l]<t&&i[l+1]>t);l++);s=n[i[l]]}if(i.splice(l+1,0,t),n[t]=r,!r.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(r.dom,u.nextSibling):o.appendChild(r.dom)}else o.firstChild?o.insertBefore(r.dom,o.firstChild):o.appendChild(r.dom);r.painter||(r.painter=this)}},e.prototype.eachLayer=function(t,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i];t.call(r,this._layers[a],a)}},e.prototype.eachBuiltinLayer=function(t,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__&&t.call(r,o,a)}},e.prototype.eachOtherLayer=function(t,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__||t.call(r,o,a)}},e.prototype.getLayers=function(){return this._layers},e.prototype._updateLayerStatus=function(t){this.eachBuiltinLayer(function(f,h){f.__dirty=f.__used=!1});function r(f){a&&(a.__endIndex!==f&&(a.__dirty=!0),a.__endIndex=f)}if(this._singleCanvas)for(var n=1;n<t.length;n++){var i=t[n];if(i.zlevel!==t[n-1].zlevel||i.incremental){this._needsManuallyCompositing=!0;break}}var a=null,o=0,s,l;for(l=0;l<t.length;l++){var i=t[l],u=i.zlevel,c=void 0;s!==u&&(s=u,o=0),i.incremental?(c=this.getLayer(u+mVe,this._needsManuallyCompositing),c.incremental=!0,o=1):c=this.getLayer(u+(o>0?v_:0),this._needsManuallyCompositing),c.__builtin__||MT("ZLevel "+u+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,r(l),a=c),i.__dirty&Si&&!i.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}r(l),this.eachBuiltinLayer(function(f,h){!f.__used&&f.getElementCount()>0&&(f.__dirty=!0,f.__startIndex=f.__endIndex=f.__drawIndex=0),f.__dirty&&f.__drawIndex<0&&(f.__drawIndex=f.__startIndex)})},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(t){t.clear()},e.prototype.setBackgroundColor=function(t){this._backgroundColor=t,R(this._layers,function(r){r.setUnpainted()})},e.prototype.configLayer=function(t,r){if(r){var n=this._layerConfig;n[t]?Ue(n[t],r,!0):n[t]=r;for(var i=0;i<this._zlevelList.length;i++){var a=this._zlevelList[i];if(a===t||a===t+v_){var o=this._layers[a];Ue(o,n[t],!0)}}}},e.prototype.delLayer=function(t){var r=this._layers,n=this._zlevelList,i=r[t];i&&(i.dom.parentNode.removeChild(i.dom),delete r[t],n.splice(He(n,t),1))},e.prototype.resize=function(t,r){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts,a=this.root;if(t!=null&&(i.width=t),r!=null&&(i.height=r),t=Kh(a,0,i),r=Kh(a,1,i),n.style.display="",this._width!==t||r!==this._height){n.style.width=t+"px",n.style.height=r+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(t,r);this.refresh(!0)}this._width=t,this._height=r}else{if(t==null||r==null)return;this._width=t,this._height=r,this.getLayer(lc).resize(t,r)}return this},e.prototype.clearLayer=function(t){var r=this._layers[t];r&&r.clear()},e.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},e.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[lc].dom;var r=new lM("image",this,t.pixelRatio||this.dpr);r.initContext(),r.clear(!1,t.backgroundColor||this._backgroundColor);var n=r.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var i=r.dom.width,a=r.dom.height;this.eachLayer(function(f){f.__builtin__?n.drawImage(f.dom,0,0,i,a):f.renderToCanvas&&(n.save(),f.renderToCanvas(n),n.restore())})}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),l=0,u=s.length;l<u;l++){var c=s[l];zc(n,c,o,l===u-1)}return r.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}();function bVe(e){e.registerPainter("canvas",_Ve)}var wVe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.getInitialData=function(r){return es(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(r){var n=new Ie,i=xr("line",0,r.itemHeight/2,r.itemWidth,0,r.lineStyle.stroke,!1);n.add(i),i.setStyle(r.lineStyle);var a=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=a==="none"?"circle":a,l=r.itemHeight*.8,u=xr(s,(r.itemWidth-l)/2,(r.itemHeight-l)/2,l,l,r.itemStyle.fill);n.add(u),u.setStyle(r.itemStyle);var c=r.iconRotate==="inherit"?o:r.iconRotate||0;return u.rotation=c*Math.PI/180,u.setOrigin([r.itemWidth/2,r.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill=J.color.neutral00,u.style.lineWidth=2),n},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(Ct);function ov(e,t){var r=e.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=rv(e,t,r[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o<r.length;o++)a.push(rv(e,t,r[o]));return a.join(" ")}}function qte(e,t){var r=e.mapDimensionsAll("defaultedLabel");if(!oe(t))return t+"";for(var n=[],i=0;i<r.length;i++){var a=e.getDimensionIndex(r[i]);a>=0&&n.push(t[a])}return n.join(" ")}var S0=function(e){K(t,e);function t(r,n,i,a){var o=e.call(this)||this;return o.updateData(r,n,i,a),o}return t.prototype._createSymbol=function(r,n,i,a,o,s){this.removeAll();var l=xr(r,-1,-1,2,2,null,s);l.attr({z2:Ae(o,100),culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),l.drift=SVe,this._symbolType=r,this.add(l)},t.prototype.stopSymbolAnimation=function(r){this.childAt(0).stopAnimation(null,r)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Us(this.childAt(0))},t.prototype.downplay=function(){Zs(this.childAt(0))},t.prototype.setZ=function(r,n){var i=this.childAt(0);i.zlevel=r,i.z=n},t.prototype.setDraggable=function(r,n){var i=this.childAt(0);i.draggable=r,i.cursor=!n&&r?"move":i.cursor},t.prototype.updateData=function(r,n,i,a){this.silent=!1;var o=r.getItemVisual(n,"symbol")||"circle",s=r.hostModel,l=t.getSymbolSize(r,n),u=t.getSymbolZ2(r,n),c=o!==this._symbolType,f=a&&a.disableAnimation;if(c){var h=r.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,r,n,l,u,h)}else{var d=this.childAt(0);d.silent=!1;var v={scaleX:l[0]/2,scaleY:l[1]/2};f?d.attr(v):ut(d,v,s,n),ma(d)}if(this._updateCommon(r,n,l,i,a),c){var d=this.childAt(0);if(!f){var v={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:d.style.opacity}};d.scaleX=d.scaleY=0,d.style.opacity=0,jt(d,v,s,n)}}f&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(r,n,i,a,o){var s=this.childAt(0),l=r.hostModel,u,c,f,h,d,v,m,y,x;if(a&&(u=a.emphasisItemStyle,c=a.blurItemStyle,f=a.selectItemStyle,h=a.focus,d=a.blurScope,m=a.labelStatesModels,y=a.hoverScale,x=a.cursorStyle,v=a.emphasisDisabled),!a||r.hasItemOption){var _=a&&a.itemModel?a.itemModel:r.getItemModel(n),b=_.getModel("emphasis");u=b.getModel("itemStyle").getItemStyle(),f=_.getModel(["select","itemStyle"]).getItemStyle(),c=_.getModel(["blur","itemStyle"]).getItemStyle(),h=b.get("focus"),d=b.get("blurScope"),v=b.get("disabled"),m=Br(_),y=b.getShallow("scale"),x=_.getShallow("cursor")}var S=r.getItemVisual(n,"symbolRotate");s.attr("rotation",(S||0)*Math.PI/180||0);var T=Nf(r.getItemVisual(n,"symbolOffset"),i);T&&(s.x=T[0],s.y=T[1]),x&&s.attr("cursor",x);var C=r.getItemVisual(n,"style"),A=C.fill;if(s instanceof Jr){var P=s.style;s.useStyle(ae({image:P.image,x:P.x,y:P.y,width:P.width,height:P.height},C))}else s.__isEmptyBrush?s.useStyle(ae({},C)):s.useStyle(C),s.style.decal=null,s.setColor(A,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var I=r.getItemVisual(n,"liftZ"),k=this._z2;I!=null?k==null&&(this._z2=s.z2,s.z2+=I):k!=null&&(s.z2=k,this._z2=null);var E=o&&o.useNameLabel;qr(s,m,{labelFetcher:l,labelDataIndex:n,defaultText:D,inheritColor:A,defaultOpacity:C.opacity});function D(V){return E?r.getName(V):ov(r,V)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var N=s.ensureState("emphasis");N.style=u,s.ensureState("select").style=f,s.ensureState("blur").style=c;var z=y==null||y===!0?Math.max(1.1,3/this._sizeY):isFinite(y)&&y>0?+y:1;N.scaleX=this._sizeX*z,N.scaleY=this._sizeY*z,this.setSymbolScale(1),Gt(this,h,d,v)},t.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},t.prototype.fadeOut=function(r,n,i){var a=this.childAt(0),o=ze(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var l=a.getTextContent();l&&hu(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();hu(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:r,removeOpt:s})},t.getSymbolSize=function(r,n){return qv(r.getItemVisual(n,"symbolSize"))},t.getSymbolZ2=function(r,n){return r.getItemVisual(n,"z2")},t}(Ie);function SVe(e,t){this.parent.drift(e,t)}function uM(e,t,r,n){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(n.isIgnore&&n.isIgnore(r))&&!(n.clipShape&&!n.clipShape.contain(t[0],t[1]))&&e.getItemVisual(r,"symbol")!=="none"}function bG(e){return e!=null&&!Ee(e)&&(e={isIgnore:e}),e||{}}function wG(e){var t=e.hostModel,r=t.getModel("emphasis");return{emphasisItemStyle:r.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:r.get("focus"),blurScope:r.get("blurScope"),emphasisDisabled:r.get("disabled"),hoverScale:r.get("scale"),labelStatesModels:Br(t),cursorStyle:t.get("cursor")}}var T0=function(){function e(t){this.group=new Ie,this._SymbolCtor=t||S0}return e.prototype.updateData=function(t,r){this._progressiveEls=null,r=bG(r);var n=this.group,i=t.hostModel,a=this._data,o=this._SymbolCtor,s=r.disableAnimation,l=wG(t),u={disableAnimation:s},c=r.getSymbolPoint||function(f){return t.getItemLayout(f)};a||n.removeAll(),t.diff(a).add(function(f){var h=c(f);if(uM(t,h,f,r)){var d=new o(t,f,l,u);d.setPosition(h),t.setItemGraphicEl(f,d),n.add(d)}}).update(function(f,h){var d=a.getItemGraphicEl(h),v=c(f);if(!uM(t,v,f,r)){n.remove(d);return}var m=t.getItemVisual(f,"symbol")||"circle",y=d&&d.getSymbolType&&d.getSymbolType();if(!d||y&&y!==m)n.remove(d),d=new o(t,f,l,u),d.setPosition(v);else{d.updateData(t,f,l,u);var x={x:v[0],y:v[1]};s?d.attr(x):ut(d,x,i)}n.add(d),t.setItemGraphicEl(f,d)}).remove(function(f){var h=a.getItemGraphicEl(f);h&&h.fadeOut(function(){n.remove(h)},i)}).execute(),this._getSymbolPoint=c,this._data=t},e.prototype.updateLayout=function(){var t=this,r=this._data;r&&r.eachItemGraphicEl(function(n,i){var a=t._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},e.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=wG(t),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(t,r,n){this._progressiveEls=[],n=bG(n);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=t.start;a<t.end;a++){var o=r.getItemLayout(a);if(uM(r,o,a,n)){var s=new this._SymbolCtor(r,a,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),r.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},e.prototype.eachRendered=function(t){Pu(this._progressiveEls||this.group,t)},e.prototype.remove=function(t){var r=this.group,n=this._data;n&&t?n.eachItemGraphicEl(function(i){i.fadeOut(function(){r.remove(i)},n.hostModel)}):r.removeAll()},e}();function Kte(e,t,r){var n=e.getBaseAxis(),i=e.getOtherAxis(n),a=TVe(i,r),o=n.dim,s=i.dim,l=t.mapDimension(s),u=t.mapDimension(o),c=s==="x"||s==="radius"?1:0,f=le(e.dimensions,function(v){return t.mapDimension(v)}),h=!1,d=t.getCalculationInfo("stackResultDimension");return Xs(t,f[0])&&(h=!0,f[0]=d),Xs(t,f[1])&&(h=!0,f[1]=d),{dataDimsForPoint:f,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!h,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function TVe(e,t){var r=0,n=e.scale.getExtent();return t==="start"?r=n[0]:t==="end"?r=n[1]:st(t)&&!isNaN(t)?r=t:n[0]>0?r=n[0]:n[1]<0&&(r=n[1]),r}function Jte(e,t,r,n){var i=NaN;e.stacked&&(i=r.get(r.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=r.get(e.baseDim,n),o[1-a]=i,t.dataToPoint(o)}function CVe(e,t){var r=[];return t.diff(e).add(function(n){r.push({cmd:"+",idx:n})}).update(function(n,i){r.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){r.push({cmd:"-",idx:n})}).execute(),r}function AVe(e,t,r,n,i,a,o,s){for(var l=CVe(e,t),u=[],c=[],f=[],h=[],d=[],v=[],m=[],y=Kte(i,t,o),x=e.getLayout("points")||[],_=t.getLayout("points")||[],b=0;b<l.length;b++){var S=l[b],T=!0,C=void 0,A=void 0;switch(S.cmd){case"=":C=S.idx*2,A=S.idx1*2;var P=x[C],I=x[C+1],k=_[A],E=_[A+1];(isNaN(P)||isNaN(I))&&(P=k,I=E),u.push(P,I),c.push(k,E),f.push(r[C],r[C+1]),h.push(n[A],n[A+1]),m.push(t.getRawIndex(S.idx1));break;case"+":var D=S.idx,N=y.dataDimsForPoint,z=i.dataToPoint([t.get(N[0],D),t.get(N[1],D)]);A=D*2,u.push(z[0],z[1]),c.push(_[A],_[A+1]);var V=Jte(y,i,t,D);f.push(V[0],V[1]),h.push(n[A],n[A+1]),m.push(t.getRawIndex(D));break;case"-":T=!1}T&&(d.push(S),v.push(v.length))}v.sort(function(ue,de){return m[ue]-m[de]});for(var F=u.length,$=ko(F),B=ko(F),H=ko(F),U=ko(F),Y=[],b=0;b<v.length;b++){var Z=v[b],Q=b*2,re=Z*2;$[Q]=u[re],$[Q+1]=u[re+1],B[Q]=c[re],B[Q+1]=c[re+1],H[Q]=f[re],H[Q+1]=f[re+1],U[Q]=h[re],U[Q+1]=h[re+1],Y[b]=d[Z]}return{current:$,next:B,stackedOnCurrent:H,stackedOnNext:U,status:Y}}var dl=Math.min,vl=Math.max;function qc(e,t){return isNaN(e)||isNaN(t)}function fO(e,t,r,n,i,a,o,s,l){for(var u,c,f,h,d,v,m=r,y=0;y<n;y++){var x=t[m*2],_=t[m*2+1];if(m>=i||m<0)break;if(qc(x,_)){if(l){m+=a;continue}break}if(m===r)e[a>0?"moveTo":"lineTo"](x,_),f=x,h=_;else{var b=x-u,S=_-c;if(b*b+S*S<.5){m+=a;continue}if(o>0){for(var T=m+a,C=t[T*2],A=t[T*2+1];C===x&&A===_&&y<n;)y++,T+=a,m+=a,C=t[T*2],A=t[T*2+1],x=t[m*2],_=t[m*2+1],b=x-u,S=_-c;var P=y+1;if(l)for(;qc(C,A)&&P<n;)P++,T+=a,C=t[T*2],A=t[T*2+1];var I=.5,k=0,E=0,D=void 0,N=void 0;if(P>=n||qc(C,A))d=x,v=_;else{k=C-u,E=A-c;var z=x-u,V=C-x,F=_-c,$=A-_,B=void 0,H=void 0;if(s==="x"){B=Math.abs(z),H=Math.abs(V);var U=k>0?1:-1;d=x-U*B*o,v=_,D=x+U*H*o,N=_}else if(s==="y"){B=Math.abs(F),H=Math.abs($);var Y=E>0?1:-1;d=x,v=_-Y*B*o,D=x,N=_+Y*H*o}else B=Math.sqrt(z*z+F*F),H=Math.sqrt(V*V+$*$),I=H/(H+B),d=x-k*o*(1-I),v=_-E*o*(1-I),D=x+k*o*I,N=_+E*o*I,D=dl(D,vl(C,x)),N=dl(N,vl(A,_)),D=vl(D,dl(C,x)),N=vl(N,dl(A,_)),k=D-x,E=N-_,d=x-k*B/H,v=_-E*B/H,d=dl(d,vl(u,x)),v=dl(v,vl(c,_)),d=vl(d,dl(u,x)),v=vl(v,dl(c,_)),k=x-d,E=_-v,D=x+k*H/B,N=_+E*H/B}e.bezierCurveTo(f,h,d,v,x,_),f=D,h=N}else e.lineTo(x,_)}u=x,c=_,m+=a}return y}var Qte=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),MVe=function(e){K(t,e);function t(r){var n=e.call(this,r)||this;return n.type="ec-polyline",n}return t.prototype.getDefaultStyle=function(){return{stroke:J.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new Qte},t.prototype.buildPath=function(r,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&qc(i[o*2-2],i[o*2-1]);o--);for(;a<o&&qc(i[a*2],i[a*2+1]);a++);}for(;a<o;)a+=fO(r,i,a,o,o,1,n.smooth,n.smoothMonotone,n.connectNulls)+1},t.prototype.getPointOn=function(r,n){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var i=this.path,a=i.data,o=Uo.CMD,s,l,u=n==="x",c=[],f=0;f<a.length;){var h=a[f++],d=void 0,v=void 0,m=void 0,y=void 0,x=void 0,_=void 0,b=void 0;switch(h){case o.M:s=a[f++],l=a[f++];break;case o.L:if(d=a[f++],v=a[f++],b=u?(r-s)/(d-s):(r-l)/(v-l),b<=1&&b>=0){var S=u?(v-l)*b+l:(d-s)*b+s;return u?[r,S]:[S,r]}s=d,l=v;break;case o.C:d=a[f++],v=a[f++],m=a[f++],y=a[f++],x=a[f++],_=a[f++];var T=u?sw(s,d,m,x,r,c):sw(l,v,y,_,r,c);if(T>0)for(var C=0;C<T;C++){var A=c[C];if(A<=1&&A>=0){var S=u?Wr(l,v,y,_,A):Wr(s,d,m,x,A);return u?[r,S]:[S,r]}}s=x,l=_;break}}},t}(nt),PVe=function(e){K(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Qte),ere=function(e){K(t,e);function t(r){var n=e.call(this,r)||this;return n.type="ec-polygon",n}return t.prototype.getDefaultShape=function(){return new PVe},t.prototype.buildPath=function(r,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&qc(i[s*2-2],i[s*2-1]);s--);for(;o<s&&qc(i[o*2],i[o*2+1]);o++);}for(;o<s;){var u=fO(r,i,o,s,s,1,n.smooth,l,n.connectNulls);fO(r,a,o+u-1,u,s,-1,n.stackedOnSmooth,l,n.connectNulls),o+=u+1,r.closePath()}},t}(nt);function tre(e,t,r,n,i){var a=e.getArea(),o=a.x,s=a.y,l=a.width,u=a.height,c=r.get(["lineStyle","width"])||0;o-=c/2,s-=c/2,l+=c,u+=c,l=Math.ceil(l),o!==Math.floor(o)&&(o=Math.floor(o),l++);var f=new qe({shape:{x:o,y:s,width:l,height:u}});if(t){var h=e.getBaseAxis(),d=h.isHorizontal(),v=h.inverse;d?(v&&(f.shape.x+=l),f.shape.width=0):(v||(f.shape.y+=u),f.shape.height=0);var m=ke(i)?function(y){i(y,f)}:null;jt(f,{shape:{width:l,height:u,x:o,y:s}},r,null,n,m)}return f}function rre(e,t,r){var n=e.getArea(),i=gr(n.r0,1),a=gr(n.r,1),o=new Sn({shape:{cx:gr(e.cx,1),cy:gr(e.cy,1),r0:i,r:a,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});if(t){var s=e.getBaseAxis().dim==="angle";s?o.shape.endAngle=n.startAngle:o.shape.r=i,jt(o,{shape:{endAngle:n.endAngle,r:a}},r)}return o}function C0(e,t,r,n,i){if(e){if(e.type==="polar")return rre(e,t,r);if(e.type==="cartesian2d")return tre(e,t,r,n,i)}else return null;return null}function du(e,t){return e.type===t}function SG(e,t){if(e.length===t.length){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return;return!0}}function TG(e){for(var t=1/0,r=1/0,n=-1/0,i=-1/0,a=0;a<e.length;){var o=e[a++],s=e[a++];isNaN(o)||(t=Math.min(o,t),n=Math.max(o,n)),isNaN(s)||(r=Math.min(s,r),i=Math.max(s,i))}return[[t,r],[n,i]]}function CG(e,t){var r=TG(e),n=r[0],i=r[1],a=TG(t),o=a[0],s=a[1];return Math.max(Math.abs(n[0]-o[0]),Math.abs(n[1]-o[1]),Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]))}function AG(e){return st(e)?e:e?.5:0}function kVe(e,t,r){if(!r.valueDim)return[];for(var n=t.count(),i=ko(n*2),a=0;a<n;a++){var o=Jte(r,e,t,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function pl(e,t,r,n,i){var a=r.getBaseAxis(),o=a.dim==="x"||a.dim==="radius"?0:1,s=[],l=0,u=[],c=[],f=[],h=[];if(i){for(l=0;l<e.length;l+=2){var d=t||e;!isNaN(d[l])&&!isNaN(d[l+1])&&h.push(e[l],e[l+1])}e=h}for(l=0;l<e.length-2;l+=2)switch(f[0]=e[l+2],f[1]=e[l+3],c[0]=e[l],c[1]=e[l+1],s.push(c[0],c[1]),n){case"end":u[o]=f[o],u[1-o]=c[1-o],s.push(u[0],u[1]);break;case"middle":var v=(c[o]+f[o])/2,m=[];u[o]=m[o]=v,u[1-o]=c[1-o],m[1-o]=f[1-o],s.push(u[0],u[1]),s.push(m[0],m[1]);break;default:u[o]=c[o],u[1-o]=f[1-o],s.push(u[0],u[1])}return s.push(e[l++],e[l++]),s}function LVe(e,t){var r=[],n=e.length,i,a;function o(c,f,h){var d=c.coord,v=(h-d)/(f.coord-d),m=SN(v,[c.color,f.color]);return{coord:h,color:m}}for(var s=0;s<n;s++){var l=e[s],u=l.coord;if(u<0)i=l;else if(u>t){a?r.push(o(a,l,t)):i&&r.push(o(i,l,0),o(i,l,t));break}else i&&(r.push(o(i,l,0)),i=null),r.push(l),a=l}return r}function IVe(e,t,r){var n=e.getVisual("visualMeta");if(!(!n||!n.length||!e.count())&&t.type==="cartesian2d"){for(var i,a,o=n.length-1;o>=0;o--){var s=e.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(a){var l=t.getAxis(i),u=le(a.stops,function(b){return{coord:l.toGlobalCoord(l.dataToCoord(b.value)),color:b.color}}),c=u.length,f=a.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),f.reverse());var h=LVe(u,i==="x"?r.getWidth():r.getHeight()),d=h.length;if(!d&&c)return u[0].coord<0?f[1]?f[1]:u[c-1].color:f[0]?f[0]:u[0].color;var v=10,m=h[0].coord-v,y=h[d-1].coord+v,x=y-m;if(x<.001)return"transparent";R(h,function(b){b.offset=(b.coord-m)/x}),h.push({offset:d?h[d-1].offset:.5,color:f[1]||"transparent"}),h.unshift({offset:d?h[0].offset:.5,color:f[0]||"transparent"});var _=new If(0,0,0,0,h,!0);return _[i]=m,_[i+"2"]=y,_}}}function OVe(e,t,r){var n=e.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=r.getAxesByScale("ordinal")[0];if(a&&!(i&&EVe(a,t))){var o=t.mapDimension(a.dim),s={};return R(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function EVe(e,t){var r=e.getExtent(),n=Math.abs(r[1]-r[0])/e.scale.count();isNaN(n)&&(n=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;o<i;o+=a)if(S0.getSymbolSize(t,o)[e.isHorizontal()?1:0]*1.5>n)return!1;return!0}function DVe(e,t){return isNaN(e)||isNaN(t)}function NVe(e){for(var t=e.length/2;t>0&&DVe(e[t*2-2],e[t*2-1]);t--);return t-1}function MG(e,t){return[e[t*2],e[t*2+1]]}function jVe(e,t,r){for(var n=e.length/2,i=r==="x"?0:1,a,o,s=0,l=-1,u=0;u<n;u++)if(o=e[u*2+i],!(isNaN(o)||isNaN(e[u*2+1-i]))){if(u===0){a=o;continue}if(a<=t&&o>=t||a>=t&&o<=t){l=u;break}s=u,a=o}return{range:[s,l],t:(t-a)/(o-a)}}function nre(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t<qn.length;t++)if(e.get([qn[t],"endLabel","show"]))return!0;return!1}function cM(e,t,r,n){if(du(t,"cartesian2d")){var i=n.getModel("endLabel"),a=i.get("valueAnimation"),o=n.getData(),s={lastFrameIndex:0},l=nre(n)?function(d,v){e._endLabelOnDuring(d,v,o,s,a,i,t)}:null,u=t.getBaseAxis().isHorizontal(),c=tre(t,r,n,function(){var d=e._endLabel;d&&r&&s.originalX!=null&&d.attr({x:s.originalX,y:s.originalY})},l);if(!n.get("clip",!0)){var f=c.shape,h=Math.max(f.width,f.height);u?(f.y-=h,f.height+=h*2):(f.x-=h,f.width+=h*2)}return l&&l(1,c),c}else return rre(t,r,n)}function RVe(e,t){var r=t.getBaseAxis(),n=r.isHorizontal(),i=r.inverse,a=n?i?"right":"left":"center",o=n?"middle":i?"top":"bottom";return{normal:{align:e.get("align")||a,verticalAlign:e.get("verticalAlign")||o}}}var BVe=function(e){K(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(){var r=new Ie,n=new T0;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=r,this._changePolyState=_e(this._changePolyState,this)},t.prototype.render=function(r,n,i){var a=r.coordinateSystem,o=this.group,s=r.getData(),l=r.getModel("lineStyle"),u=r.getModel("areaStyle"),c=s.getLayout("points")||[],f=a.type==="polar",h=this._coordSys,d=this._symbolDraw,v=this._polyline,m=this._polygon,y=this._lineGroup,x=!n.ssr&&r.get("animation"),_=!u.isEmpty(),b=u.get("origin"),S=Kte(a,s,b),T=_&&kVe(a,s,S),C=r.get("showSymbol"),A=r.get("connectNulls"),P=C&&!f&&OVe(r,s,a),I=this._data;I&&I.eachItemGraphicEl(function(ue,de){ue.__temp&&(o.remove(ue),I.setItemGraphicEl(de,null))}),C||d.remove(),o.add(y);var k=f?!1:r.get("step"),E;a&&a.getArea&&r.get("clip",!0)&&(E=a.getArea(),E.width!=null?(E.x-=.1,E.y-=.1,E.width+=.2,E.height+=.2):E.r0&&(E.r0-=.5,E.r+=.5)),this._clipShapeForSymbol=E;var D=IVe(s,a,i)||s.getVisual("style")[s.getVisual("drawType")];if(!(v&&h.type===a.type&&k===this._step))C&&d.updateData(s,{isIgnore:P,clipShape:E,disableAnimation:!0,getSymbolPoint:function(ue){return[c[ue*2],c[ue*2+1]]}}),x&&this._initSymbolLabelAnimation(s,a,E),k&&(T&&(T=pl(T,c,a,k,A)),c=pl(c,null,a,k,A)),v=this._newPolyline(c),_?m=this._newPolygon(c,T):m&&(y.remove(m),m=this._polygon=null),f||this._initOrUpdateEndLabel(r,a,mf(D)),y.setClipPath(cM(this,a,!0,r));else{_&&!m?m=this._newPolygon(c,T):m&&!_&&(y.remove(m),m=this._polygon=null),f||this._initOrUpdateEndLabel(r,a,mf(D));var N=y.getClipPath();if(N){var z=cM(this,a,!1,r);jt(N,{shape:z.shape},r)}else y.setClipPath(cM(this,a,!0,r));C&&d.updateData(s,{isIgnore:P,clipShape:E,disableAnimation:!0,getSymbolPoint:function(ue){return[c[ue*2],c[ue*2+1]]}}),(!SG(this._stackedOnPoints,T)||!SG(this._points,c))&&(x?this._doUpdateAnimation(s,T,a,i,k,b,A):(k&&(T&&(T=pl(T,c,a,k,A)),c=pl(c,null,a,k,A)),v.setShape({points:c}),m&&m.setShape({points:c,stackedOnPoints:T})))}var V=r.getModel("emphasis"),F=V.get("focus"),$=V.get("blurScope"),B=V.get("disabled");if(v.useStyle(Oe(l.getLineStyle(),{fill:"none",stroke:D,lineJoin:"bevel"})),Rr(v,r,"lineStyle"),v.style.lineWidth>0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var H=v.getState("emphasis").style;H.lineWidth=+v.style.lineWidth+1}ze(v).seriesIndex=r.seriesIndex,Gt(v,F,$,B);var U=AG(r.get("smooth")),Y=r.get("smoothMonotone");if(v.setShape({smooth:U,smoothMonotone:Y,connectNulls:A}),m){var Z=s.getCalculationInfo("stackedOnSeries"),Q=0;m.useStyle(Oe(u.getAreaStyle(),{fill:D,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),Z&&(Q=AG(Z.get("smooth"))),m.setShape({smooth:U,stackedOnSmooth:Q,smoothMonotone:Y,connectNulls:A}),Rr(m,r,"areaStyle"),ze(m).seriesIndex=r.seriesIndex,Gt(m,F,$,B)}var re=this._changePolyState;s.eachItemGraphicEl(function(ue){ue&&(ue.onHoverStateChange=re)}),this._polyline.onHoverStateChange=re,this._data=s,this._coordSys=a,this._stackedOnPoints=T,this._points=c,this._step=k,this._valueOrigin=b,r.get("triggerLineEvent")&&(this.packEventData(r,v),m&&this.packEventData(r,m))},t.prototype.packEventData=function(r,n){ze(n).eventData={componentType:"series",componentSubType:"line",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"line"}},t.prototype.highlight=function(r,n,i,a){var o=r.getData(),s=hf(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var c=l[s*2],f=l[s*2+1];if(isNaN(c)||isNaN(f)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,f))return;var h=r.get("zlevel")||0,d=r.get("z")||0;u=new S0(o,s),u.x=c,u.y=f,u.setZ(h,d);var v=u.getSymbolPath().getTextContent();v&&(v.zlevel=h,v.z=d,v.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else bt.prototype.highlight.call(this,r,n,i,a)},t.prototype.downplay=function(r,n,i,a){var o=r.getData(),s=hf(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else bt.prototype.downplay.call(this,r,n,i,a)},t.prototype._changePolyState=function(r){var n=this._polygon;yw(this._polyline,r),n&&yw(n,r)},t.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new MVe({shape:{points:r},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},t.prototype._newPolygon=function(r,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new ere({shape:{points:r,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},t.prototype._initSymbolLabelAnimation=function(r,n,i){var a,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var u=r.hostModel,c=u.get("animationDuration");ke(c)&&(c=c(null));var f=u.get("animationDelay")||0,h=ke(f)?f(null):f;r.eachItemGraphicEl(function(d,v){var m=d;if(m){var y=[d.x,d.y],x=void 0,_=void 0,b=void 0;if(i)if(o){var S=i,T=n.pointToCoord(y);a?(x=S.startAngle,_=S.endAngle,b=-T[1]/180*Math.PI):(x=S.r0,_=S.r,b=T[0])}else{var C=i;a?(x=C.x,_=C.x+C.width,b=d.x):(x=C.y+C.height,_=C.y,b=d.y)}var A=_===x?0:(b-x)/(_-x);l&&(A=1-A);var P=ke(f)?f(v):c*A+h,I=m.getSymbolPath(),k=I.getTextContent();m.attr({scaleX:0,scaleY:0}),m.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:P}),k&&k.animateFrom({style:{opacity:0}},{duration:300,delay:P}),I.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(r,n,i){var a=r.getModel("endLabel");if(nre(r)){var o=r.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new ot({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=NVe(l);c>=0&&(qr(s,Br(r,"endLabel"),{inheritColor:i,labelFetcher:r,labelDataIndex:c,defaultText:function(f,h,d){return d!=null?qte(o,d):ov(o,f)},enableTextSetter:!0},RVe(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(r,n,i,a,o,s,l){var u=this._endLabel,c=this._polyline;if(u){r<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var f=i.getLayout("points"),h=i.hostModel,d=h.get("connectNulls"),v=s.get("precision"),m=s.get("distance")||0,y=l.getBaseAxis(),x=y.isHorizontal(),_=y.inverse,b=n.shape,S=_?x?b.x:b.y+b.height:x?b.x+b.width:b.y,T=(x?m:0)*(_?-1:1),C=(x?0:-m)*(_?-1:1),A=x?"x":"y",P=jVe(f,S,A),I=P.range,k=I[1]-I[0],E=void 0;if(k>=1){if(k>1&&!d){var D=MG(f,I[0]);u.attr({x:D[0]+T,y:D[1]+C}),o&&(E=h.getRawValue(I[0]))}else{var D=c.getPointOn(S,A);D&&u.attr({x:D[0]+T,y:D[1]+C});var N=h.getRawValue(I[0]),z=h.getRawValue(I[1]);o&&(E=PJ(i,v,N,z,P.t))}a.lastFrameIndex=I[0]}else{var V=r===1||a.lastFrameIndex>0?I[0]:0,D=MG(f,V);o&&(E=h.getRawValue(V)),u.attr({x:D[0]+T,y:D[1]+C})}if(o){var F=Wv(u);typeof F.setLabelText=="function"&&F.setLabelText(E)}}},t.prototype._doUpdateAnimation=function(r,n,i,a,o,s,l){var u=this._polyline,c=this._polygon,f=r.hostModel,h=AVe(this._data,r,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),d=h.current,v=h.stackedOnCurrent,m=h.next,y=h.stackedOnNext;if(o&&(v=pl(h.stackedOnCurrent,h.current,i,o,l),d=pl(h.current,null,i,o,l),y=pl(h.stackedOnNext,h.next,i,o,l),m=pl(h.next,null,i,o,l)),CG(d,m)>3e3||c&&CG(v,y)>3e3){u.stopAnimation(),u.setShape({points:m}),c&&(c.stopAnimation(),c.setShape({points:m,stackedOnPoints:y}));return}u.shape.__points=h.current,u.shape.points=d;var x={shape:{points:m}};h.current!==d&&(x.shape.__points=h.next),u.stopAnimation(),ut(u,x,f),c&&(c.setShape({points:d,stackedOnPoints:v}),c.stopAnimation(),ut(c,{shape:{stackedOnPoints:y}},f),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var _=[],b=h.status,S=0;S<b.length;S++){var T=b[S].cmd;if(T==="="){var C=r.getItemGraphicEl(b[S].idx1);C&&_.push({el:C,ptIdx:S})}}u.animators&&u.animators.length&&u.animators[0].during(function(){c&&c.dirtyShape();for(var A=u.shape.__points,P=0;P<_.length;P++){var I=_[P].el,k=_[P].ptIdx*2;I.x=A[k],I.y=A[k+1],I.markRedraw()}})},t.prototype.remove=function(r){var n=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(a,o){a.__temp&&(n.remove(a),i.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t}(bt);function A0(e,t){return{seriesType:e,plan:Yv(),reset:function(r){var n=r.getData(),i=r.coordinateSystem,a=r.pipelineContext,o=t||a.large;if(i){var s=le(i.dimensions,function(d){return n.mapDimension(d)}).slice(0,2),l=s.length,u=n.getCalculationInfo("stackResultDimension");Xs(n,s[0])&&(s[0]=u),Xs(n,s[1])&&(s[1]=u);var c=n.getStore(),f=n.getDimensionIndex(s[0]),h=n.getDimensionIndex(s[1]);return l&&{progress:function(d,v){for(var m=d.end-d.start,y=o&&ko(m*l),x=[],_=[],b=d.start,S=0;b<d.end;b++){var T=void 0;if(l===1){var C=c.get(f,b);T=i.dataToPoint(C,null,_)}else x[0]=c.get(f,b),x[1]=c.get(h,b),T=i.dataToPoint(x,null,_);o?(y[S++]=T[0],y[S++]=T[1]):v.setItemLayout(b,T.slice())}o&&v.setLayout("points",y)}}}}}}var zVe={average:function(e){for(var t=0,r=0,n=0;n<e.length;n++)isNaN(e[n])||(t+=e[n],r++);return r===0?NaN:t/r},sum:function(e){for(var t=0,r=0;r<e.length;r++)t+=e[r]||0;return t},max:function(e){for(var t=-1/0,r=0;r<e.length;r++)e[r]>t&&(t=e[r]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,r=0;r<e.length;r++)e[r]<t&&(t=e[r]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},$Ve=function(e){return Math.round(e.length/2)};function ire(e){return{seriesType:e,reset:function(t,r,n){var i=t.getData(),a=t.get("sampling"),o=t.coordinateSystem,s=i.count();if(s>10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),f=n.getDevicePixelRatio(),h=Math.abs(c[1]-c[0])*(f||1),d=Math.round(s/h);if(isFinite(d)&&d>1){a==="lttb"?t.setData(i.lttbDownSample(i.mapDimension(u.dim),1/d)):a==="minmax"&&t.setData(i.minmaxDownSample(i.mapDimension(u.dim),1/d));var v=void 0;ye(a)?v=zVe[a]:ke(a)&&(v=a),v&&t.setData(i.downSample(i.mapDimension(u.dim),1/d,v,$Ve))}}}}}function FVe(e){e.registerChartView(BVe),e.registerSeriesModel(wVe),e.registerLayout(A0("line",!0)),e.registerVisual({seriesType:"line",reset:function(t){var r=t.getData(),n=t.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=r.getVisual("style").fill),r.setVisual("legendLineStyle",n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,ire("line"))}var Ny=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(r,n){return es(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(r,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(r),s=a.dataToPoint(o);if(i)R(a.getAxes(),function(h,d){if(h.type==="category"&&n!=null){var v=h.getTicksCoords(),m=h.getTickModel().get("alignWithLabel"),y=o[d],x=n[d]==="x1"||n[d]==="y1";if(x&&!m&&(y+=1),v.length<2)return;if(v.length===2){s[d]=h.toGlobalCoord(h.getExtent()[x?1:0]);return}for(var _=void 0,b=void 0,S=1,T=0;T<v.length;T++){var C=v[T].coord,A=T===v.length-1?v[T-1].tickValue+S:v[T].tickValue;if(A===y){b=C;break}else if(A<y)_=C;else if(_!=null&&A>y){b=(C+_)/2;break}T===1&&(S=A-v[0].tickValue)}b==null&&(_?_&&(b=v[v.length-1].coord):b=v[0].coord),s[d]=h.toGlobalCoord(b)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),f=a.getBaseAxis().isHorizontal()?0:1;s[f]+=u+c/2}return s}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},t}(Ct);Ct.registerClass(Ny);var VVe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(){return es(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var r=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>r&&(r=n),r},t.prototype.brushSelector=function(r,n,i){return i.rect(n.getItemLayout(r))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=ku(Ny.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:J.color.primary,borderWidth:2}},realtimeSort:!1}),t}(Ny),GVe=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),Fw=function(e){K(t,e);function t(r){var n=e.call(this,r)||this;return n.type="sausage",n}return t.prototype.getDefaultShape=function(){return new GVe},t.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,c=n.startAngle,f=n.endAngle,h=n.clockwise,d=Math.PI*2,v=h?f-c<d:c-f<d;v||(c=f-(h?d:-d));var m=Math.cos(c),y=Math.sin(c),x=Math.cos(f),_=Math.sin(f);v?(r.moveTo(m*o+i,y*o+a),r.arc(m*u+i,y*u+a,l,-Math.PI+c,c,!h)):r.moveTo(m*s+i,y*s+a),r.arc(i,a,s,c,f,!h),r.arc(x*u+i,_*u+a,l,f-Math.PI*2,f-Math.PI,!h),o!==0&&r.arc(i,a,o,f,c,h)},t}(nt);function WVe(e,t){t=t||{};var r=t.isRoundCap;return function(n,i,a){var o=i.position;if(!o||o instanceof Array)return dw(n,i,a);var s=e(o),l=i.distance!=null?i.distance:5,u=this.shape,c=u.cx,f=u.cy,h=u.r,d=u.r0,v=(h+d)/2,m=u.startAngle,y=u.endAngle,x=(m+y)/2,_=r?Math.abs(h-d)/2:0,b=Math.cos,S=Math.sin,T=c+h*b(m),C=f+h*S(m),A="left",P="top";switch(s){case"startArc":T=c+(d-l)*b(x),C=f+(d-l)*S(x),A="center",P="top";break;case"insideStartArc":T=c+(d+l)*b(x),C=f+(d+l)*S(x),A="center",P="bottom";break;case"startAngle":T=c+v*b(m)+p_(m,l+_,!1),C=f+v*S(m)+g_(m,l+_,!1),A="right",P="middle";break;case"insideStartAngle":T=c+v*b(m)+p_(m,-l+_,!1),C=f+v*S(m)+g_(m,-l+_,!1),A="left",P="middle";break;case"middle":T=c+v*b(x),C=f+v*S(x),A="center",P="middle";break;case"endArc":T=c+(h+l)*b(x),C=f+(h+l)*S(x),A="center",P="bottom";break;case"insideEndArc":T=c+(h-l)*b(x),C=f+(h-l)*S(x),A="center",P="top";break;case"endAngle":T=c+v*b(y)+p_(y,l+_,!0),C=f+v*S(y)+g_(y,l+_,!0),A="left",P="middle";break;case"insideEndAngle":T=c+v*b(y)+p_(y,-l+_,!0),C=f+v*S(y)+g_(y,-l+_,!0),A="right",P="middle";break;default:return dw(n,i,a)}return n=n||{},n.x=T,n.y=C,n.align=A,n.verticalAlign=P,n}}function HVe(e,t,r,n){if(st(n)){e.setTextConfig({rotation:n});return}else if(oe(t)){e.setTextConfig({rotation:0});return}var i=e.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(a+o)/2,l,u=r(t);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":l=s;break;case"startAngle":case"insideStartAngle":l=a;break;case"endAngle":case"insideEndAngle":l=o;break;default:e.setTextConfig({rotation:0});return}var c=Math.PI*1.5-l;u==="middle"&&c>Math.PI/2&&c<Math.PI*1.5&&(c-=Math.PI),e.setTextConfig({rotation:c})}function p_(e,t,r){return t*Math.sin(e)*(r?-1:1)}function g_(e,t,r){return t*Math.cos(e)*(r?1:-1)}function Io(e,t,r){var n=e.get("borderRadius");if(n==null)return r?{cornerRadius:0}:null;oe(n)||(n=[n,n,n,n]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:le(n,function(a){return Ja(a,i)})}}var fM=Math.max,hM=Math.min;function UVe(e,t){var r=e.getArea&&e.getArea();if(du(e,"cartesian2d")){var n=e.getBaseAxis();if(n.type!=="category"||!n.onBand){var i=t.getLayout("bandWidth");n.isHorizontal()?(r.x-=i,r.width+=i*2):(r.y-=i,r.height+=i*2)}}return r}var ZVe=function(e){K(t,e);function t(){var r=e.call(this)||this;return r.type=t.type,r._isFirstFrame=!0,r}return t.prototype.render=function(r,n,i,a){this._model=r,this._removeOnRenderedListener(i),this._updateDrawMode(r);var o=r.get("coordinateSystem");(o==="cartesian2d"||o==="polar")&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(r,n,i):this._renderNormal(r,n,i,a))},t.prototype.incrementalPrepareRender=function(r){this._clear(),this._updateDrawMode(r),this._updateLargeClip(r)},t.prototype.incrementalRender=function(r,n){this._progressiveEls=[],this._incrementalRenderLarge(r,n)},t.prototype.eachRendered=function(r){Pu(this._progressiveEls||this.group,r)},t.prototype._updateDrawMode=function(r){var n=r.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},t.prototype._renderNormal=function(r,n,i,a){var o=this.group,s=r.getData(),l=this._data,u=r.coordinateSystem,c=u.getBaseAxis(),f;u.type==="cartesian2d"?f=c.isHorizontal():u.type==="polar"&&(f=c.dim==="angle");var h=r.isAnimationEnabled()?r:null,d=YVe(r,u);d&&this._enableRealtimeSort(d,s,i);var v=r.get("clip",!0)||d,m=UVe(u,s);o.removeClipPath();var y=r.get("roundCap",!0),x=r.get("showBackground",!0),_=r.getModel("backgroundStyle"),b=_.get("borderRadius")||0,S=[],T=this._backgroundEls,C=a&&a.isInitSort,A=a&&a.type==="changeAxisOrder";function P(E){var D=m_[u.type](s,E);if(!D)return null;var N=t6e(u,f,D);return N.useStyle(_.getItemStyle()),u.type==="cartesian2d"?N.setShape("r",b):N.setShape("cornerRadius",b),S[E]=N,N}s.diff(l).add(function(E){var D=s.getItemModel(E),N=m_[u.type](s,E,D);if(N&&(x&&P(E),!(!s.hasValue(E)||!OG[u.type](N)))){var z=!1;v&&(z=PG[u.type](m,N));var V=kG[u.type](r,s,E,N,f,h,c.model,!1,y);d&&(V.forceLabelAnimation=!0),EG(V,s,E,D,N,r,f,u.type==="polar"),C?V.attr({shape:N}):d?LG(d,h,V,N,E,f,!1,!1):jt(V,{shape:N},r,E),s.setItemGraphicEl(E,V),o.add(V),V.ignore=z}}).update(function(E,D){var N=s.getItemModel(E),z=m_[u.type](s,E,N);if(z){if(x){var V=void 0;T.length===0?V=P(D):(V=T[D],V.useStyle(_.getItemStyle()),u.type==="cartesian2d"?V.setShape("r",b):V.setShape("cornerRadius",b),S[E]=V);var F=m_[u.type](s,E),$=ore(f,F,u);ut(V,{shape:$},h,E)}var B=l.getItemGraphicEl(D);if(!s.hasValue(E)||!OG[u.type](z)){o.remove(B);return}var H=!1;v&&(H=PG[u.type](m,z),H&&o.remove(B));var U=B&&(B.type==="sector"&&y||B.type==="sausage"&&!y);if(U&&(B&&Os(B,r,D),B=null),B?ma(B):B=kG[u.type](r,s,E,z,f,h,c.model,!0,y),d&&(B.forceLabelAnimation=!0),A){var Y=B.getTextContent();if(Y){var Z=Wv(Y);Z.prevValue!=null&&(Z.prevValue=Z.value)}}else EG(B,s,E,N,z,r,f,u.type==="polar");C?B.attr({shape:z}):d?LG(d,h,B,z,E,f,!0,A):ut(B,{shape:z},r,E,null),s.setItemGraphicEl(E,B),B.ignore=H,o.add(B)}}).remove(function(E){var D=l.getItemGraphicEl(E);D&&Os(D,r,E)}).execute();var I=this._backgroundGroup||(this._backgroundGroup=new Ie);I.removeAll();for(var k=0;k<S.length;++k)I.add(S[k]);o.add(I),this._backgroundEls=S,this._data=s},t.prototype._renderLarge=function(r,n,i){this._clear(),NG(r,this.group),this._updateLargeClip(r)},t.prototype._incrementalRenderLarge=function(r,n){this._removeBackground(),NG(n,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(r){var n=r.get("clip",!0)&&C0(r.coordinateSystem,!1,r),i=this.group;n?i.setClipPath(n):i.removeClipPath()},t.prototype._enableRealtimeSort=function(r,n,i){var a=this;if(n.count()){var o=r.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(n,r,i),this._isFirstFrame=!1;else{var s=function(l){var u=n.getItemGraphicEl(l),c=u&&u.shape;return c&&Math.abs(o.isHorizontal()?c.height:c.width)||0};this._onRendered=function(){a._updateSortWithinSameData(n,s,o,i)},i.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(r,n,i){var a=[];return r.each(r.mapDimension(n.dim),function(o,s){var l=i(s);l=l??NaN,a.push({dataIndex:s,mappedValue:l,ordinalNumber:o})}),a.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:le(a,function(o){return o.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(r,n,i){for(var a=i.scale,o=r.mapDimension(i.dim),s=Number.MAX_VALUE,l=0,u=a.getOrdinalMeta().categories.length;l<u;++l){var c=r.rawIndexOf(o,a.getRawOrdinalNumber(l)),f=c<0?Number.MIN_VALUE:n(r.indexOfRawIndex(c));if(f>s)return!0;s=f}return!1},t.prototype._isOrderDifferentInView=function(r,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(r.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(r,n,i,a){if(this._isOrderChangedWithinSameData(r,n,i)){var o=this._dataSort(r,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(r,n,i){var a=n.baseAxis,o=this._dataSort(r,a,function(s){return r.get(r.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},t.prototype.remove=function(r,n){this._clear(this._model),this._removeOnRenderedListener(n)},t.prototype.dispose=function(r,n){this._removeOnRenderedListener(n)},t.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(r){var n=this.group,i=this._data;r&&r.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){Os(a,r,ze(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(bt),PG={cartesian2d:function(e,t){var r=t.width<0?-1:1,n=t.height<0?-1:1;r<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=fM(t.x,e.x),s=hM(t.x+t.width,i),l=fM(t.y,e.y),u=hM(t.y+t.height,a),c=s<o,f=u<l;return t.x=c&&o>i?s:o,t.y=f&&l>a?u:l,t.width=c?0:s-o,t.height=f?0:u-l,r<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height),c||f},polar:function(e,t){var r=t.r0<=t.r?1:-1;if(r<0){var n=t.r;t.r=t.r0,t.r0=n}var i=hM(t.r,e.r),a=fM(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(r<0){var n=t.r;t.r=t.r0,t.r0=n}return o}},kG={cartesian2d:function(e,t,r,n,i,a,o,s,l){var u=new qe({shape:ae({},n),z2:1});if(u.__dataIndex=r,u.name="item",a){var c=u.shape,f=i?"height":"width";c[f]=0}return u},polar:function(e,t,r,n,i,a,o,s,l){var u=!i&&l?Fw:Sn,c=new u({shape:n,z2:1});c.name="item";var f=are(i);if(c.calculateTextPosition=WVe(f,{isRoundCap:u===Fw}),a){var h=c.shape,d=i?"r":"endAngle",v={};h[d]=i?n.r0:n.startAngle,v[d]=n[d],(s?ut:jt)(c,{shape:v},a)}return c}};function YVe(e,t){var r=e.get("realtimeSort",!0),n=t.getBaseAxis();if(r&&n.type==="category"&&t.type==="cartesian2d")return{baseAxis:n,otherAxis:t.getOtherAxis(n)}}function LG(e,t,r,n,i,a,o,s){var l,u;a?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?ut:jt)(r,{shape:l},t,i,null);var c=t?e.baseAxis.model:null;(o?ut:jt)(r,{shape:u},c,i)}function IG(e,t){for(var r=0;r<t.length;r++)if(!isFinite(e[t[r]]))return!0;return!1}var XVe=["x","y","width","height"],qVe=["cx","cy","r","startAngle","endAngle"],OG={cartesian2d:function(e){return!IG(e,XVe)},polar:function(e){return!IG(e,qVe)}},m_={cartesian2d:function(e,t,r){var n=e.getItemLayout(t);if(!n)return null;var i=r?JVe(r,n):0,a=n.width>0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(e,t,r){var n=e.getItemLayout(t);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function KVe(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function are(e){return function(t){var r=t?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+r;default:return n}}}(e)}function EG(e,t,r,n,i,a,o,s){var l=t.getItemVisual(r,"style");if(s){if(!a.get("roundCap")){var c=e.shape,f=Io(n.getModel("itemStyle"),c,!0);ae(c,f),e.setShape(c)}}else{var u=n.get(["itemStyle","borderRadius"])||0;e.setShape("r",u)}e.useStyle(l);var h=n.getShallow("cursor");h&&e.attr("cursor",h);var d=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",v=Br(n);qr(e,v,{labelFetcher:a,labelDataIndex:r,defaultText:ov(a.getData(),r),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:d});var m=e.getTextContent();if(s&&m){var y=n.get(["label","position"]);e.textConfig.inside=y==="middle"?!0:null,HVe(e,y==="outside"?d:y,are(o),n.get(["label","rotate"]))}pQ(m,v,a.getRawValue(r),function(_){return qte(t,_)});var x=n.getModel(["emphasis"]);Gt(e,x.get("focus"),x.get("blurScope"),x.get("disabled")),Rr(e,n),KVe(i)&&(e.style.fill="none",e.style.stroke="none",R(e.states,function(_){_.style&&(_.style.fill=_.style.stroke="none")}))}function JVe(e,t){var r=e.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var n=e.get(["itemStyle","borderWidth"])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(n,i,a)}var QVe=function(){function e(){}return e}(),DG=function(e){K(t,e);function t(r){var n=e.call(this,r)||this;return n.type="largeBar",n}return t.prototype.getDefaultShape=function(){return new QVe},t.prototype.buildPath=function(r,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c<i.length;c+=3)l[a]=u,l[o]=i[c+2],s[a]=i[c+a],s[o]=i[c+o],r.rect(s[0],s[1],l[0],l[1])},t}(nt);function NG(e,t,r,n){var i=e.getData(),a=i.getLayout("valueAxisHorizontal")?1:0,o=i.getLayout("largeDataIndices"),s=i.getLayout("size"),l=e.getModel("backgroundStyle"),u=i.getLayout("largeBackgroundPoints");if(u){var c=new DG({shape:{points:u},incremental:!!n,silent:!0,z2:0});c.baseDimIdx=a,c.largeDataIndices=o,c.barWidth=s,c.useStyle(l.getItemStyle()),t.add(c),r&&r.push(c)}var f=new DG({shape:{points:i.getLayout("largePoints")},incremental:!!n,ignoreCoarsePointer:!0,z2:1});f.baseDimIdx=a,f.largeDataIndices=o,f.barWidth=s,t.add(f),f.useStyle(i.getVisual("style")),f.style.stroke=null,ze(f).seriesIndex=e.seriesIndex,e.get("silent")||(f.on("mousedown",jG),f.on("mousemove",jG)),r&&r.push(f)}var jG=KT(function(e){var t=this,r=e6e(t,e.offsetX,e.offsetY);ze(t).dataIndex=r>=0?r:null},30,!1);function e6e(e,t,r){for(var n=e.baseDimIdx,i=1-n,a=e.shape.points,o=e.largeDataIndices,s=[],l=[],u=e.barWidth,c=0,f=a.length/3;c<f;c++){var h=c*3;if(l[n]=u,l[i]=a[h+2],s[n]=a[h+n],s[i]=a[h+i],l[i]<0&&(s[i]+=l[i],l[i]=-l[i]),t>=s[0]&&t<=s[0]+l[0]&&r>=s[1]&&r<=s[1]+l[1])return o[c]}return-1}function ore(e,t,r){if(du(r,"cartesian2d")){var n=t,i=r.getArea();return{x:e?n.x:i.x,y:e?i.y:n.y,width:e?n.width:i.width,height:e?i.height:n.height}}else{var i=r.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}}function t6e(e,t,r){var n=e.type==="polar"?Sn:qe;return new n({shape:ore(t,r,e),silent:!0,z2:0})}function r6e(e){e.registerChartView(ZVe),e.registerSeriesModel(VVe),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,We(ute,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,cte("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,ire("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,r){var n=t.componentType||"series";r.eachComponent({mainType:n,query:t},function(i){t.sortInfo&&i.axis.setCategorySortInfo(t.sortInfo)})})}var RG=Math.PI*2,y_=Math.PI/180;function n6e(e,t,r){t.eachSeriesByType(e,function(n){var i=n.getData(),a=i.mapDimension("value"),o=EQ(n,r),s=o.cx,l=o.cy,u=o.r,c=o.r0,f=o.viewRect,h=-n.get("startAngle")*y_,d=n.get("endAngle"),v=n.get("padAngle")*y_;d=d==="auto"?h-RG:-d*y_;var m=n.get("minAngle")*y_,y=m+v,x=0;i.each(a,function($){!isNaN($)&&x++});var _=i.getSum(a),b=Math.PI/(_||x)*2,S=n.get("clockwise"),T=n.get("roseType"),C=n.get("stillShowZeroSum"),A=i.getDataExtent(a);A[0]=0;var P=S?1:-1,I=[h,d],k=P*v/2;$T(I,!S),h=I[0],d=I[1];var E=sre(n);E.startAngle=h,E.endAngle=d,E.clockwise=S,E.cx=s,E.cy=l,E.r=u,E.r0=c;var D=Math.abs(d-h),N=D,z=0,V=h;if(i.setLayout({viewRect:f,r:u}),i.each(a,function($,B){var H;if(isNaN($)){i.setItemLayout(B,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:S,cx:s,cy:l,r0:c,r:T?NaN:u});return}T!=="area"?H=_===0&&C?b:$*b:H=D/x,H<y?(H=y,N-=y):z+=$;var U=V+P*H,Y=0,Z=0;v>H?(Y=V+P*H/2,Z=Y):(Y=V+k,Z=U-k),i.setItemLayout(B,{angle:H,startAngle:Y,endAngle:Z,clockwise:S,cx:s,cy:l,r0:c,r:T?gt($,A,[c,u]):u}),V=U}),N<RG&&x)if(N<=.001){var F=D/x;i.each(a,function($,B){if(!isNaN($)){var H=i.getItemLayout(B);H.angle=F;var U=0,Y=0;F<v?(U=h+P*(B+1/2)*F,Y=U):(U=h+P*B*F+k,Y=h+P*(B+1)*F-k),H.startAngle=U,H.endAngle=Y}})}else b=N/z,V=h,i.each(a,function($,B){if(!isNaN($)){var H=i.getItemLayout(B),U=H.angle===y?y:$*b,Y=0,Z=0;U<v?(Y=V+P*U/2,Z=Y):(Y=V+k,Z=V+P*U-k),H.startAngle=Y,H.endAngle=Z,V+=P*U}})})}var sre=et();function ep(e){return{seriesType:e,reset:function(t,r){var n=r.findComponents({mainType:"legend"});if(!(!n||!n.length)){var i=t.getData();i.filterSelf(function(a){for(var o=i.getName(a),s=0;s<n.length;s++)if(!n[s].isSelected(o))return!1;return!0})}}}}var i6e=Math.PI/180;function BG(e,t,r,n,i,a,o,s,l,u){if(e.length<2)return;function c(m){for(var y=m.rB,x=y*y,_=0;_<m.list.length;_++){var b=m.list[_],S=Math.abs(b.label.y-r),T=n+b.len,C=T*T,A=Math.sqrt(Math.abs((1-S*S/x)*C)),P=t+(A+b.len2)*i,I=P-b.label.x,k=b.targetTextWidth-I*i;lre(b,k,!0),b.label.x=P}}function f(m){for(var y={list:[],maxY:0},x={list:[],maxY:0},_=0;_<m.length;_++)if(m[_].labelAlignTo==="none"){var b=m[_],S=b.label.y>r?x:y,T=Math.abs(b.label.y-r);if(T>=S.maxY){var C=b.label.x-t-b.len2*i,A=n+b.len,P=Math.abs(C)<A?Math.sqrt(T*T/(1-C*C/A/A)):A;S.rB=P,S.maxY=T}S.list.push(b)}c(y),c(x)}for(var h=e.length,d=0;d<h;d++)if(e[d].position==="outer"&&e[d].labelAlignTo==="labelLine"){var v=e[d].label.x-u;e[d].linePoints[1][0]+=v,e[d].label.x=u}sO(e,1,l,l+o)&&f(e)}function a6e(e,t,r,n,i,a,o,s){for(var l=[],u=[],c=Number.MAX_VALUE,f=-Number.MAX_VALUE,h=0;h<e.length;h++){var d=e[h].label;dM(e[h])||(d.x<t?(c=Math.min(c,d.x),l.push(e[h])):(f=Math.max(f,d.x),u.push(e[h])))}for(var h=0;h<e.length;h++){var v=e[h];if(!dM(v)&&v.linePoints){if(v.labelStyleWidth!=null)continue;var d=v.label,m=v.linePoints,y=void 0;v.labelAlignTo==="edge"?d.x<t?y=m[2][0]-v.labelDistance-o-v.edgeDistance:y=o+i-v.edgeDistance-m[2][0]-v.labelDistance:v.labelAlignTo==="labelLine"?d.x<t?y=c-o-v.bleedMargin:y=o+i-f-v.bleedMargin:d.x<t?y=d.x-o-v.bleedMargin:y=o+i-d.x-v.bleedMargin,v.targetTextWidth=y,lre(v,y,!1)}}BG(u,t,r,n,1,i,a,o,s,f),BG(l,t,r,n,-1,i,a,o,s,c);for(var h=0;h<e.length;h++){var v=e[h];if(!dM(v)&&v.linePoints){var d=v.label,m=v.linePoints,x=v.labelAlignTo==="edge",_=d.style.padding,b=_?_[1]+_[3]:0,S=d.style.backgroundColor?0:b,T=v.rect.width+S,C=m[1][0]-m[2][0];x?d.x<t?m[2][0]=o+v.edgeDistance+T+v.labelDistance:m[2][0]=o+i-v.edgeDistance-T-v.labelDistance:(d.x<t?m[2][0]=d.x+v.labelDistance:m[2][0]=d.x-v.labelDistance,m[1][0]=m[2][0]+C),m[1][1]=m[2][1]=d.y}}}function lre(e,t,r){if(e.labelStyleWidth==null){var n=e.label,i=n.style,a=e.rect,o=i.backgroundColor,s=i.padding,l=s?s[1]+s[3]:0,u=i.overflow,c=a.width+(o?0:l);if(t<c||r){if(u&&u.match("break")){n.setStyle("backgroundColor",null),n.setStyle("width",t-l);var f=n.getBoundingRect();n.setStyle("width",Math.ceil(f.width)),n.setStyle("backgroundColor",o)}else{var h=t-l,d=t<c?h:r?h>e.unconstrainedWidth?null:h:null;n.setStyle("width",d)}ure(a,n)}}}function ure(e,t){zG.rect=e,Ete(zG,t,o6e)}var o6e={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},zG={};function dM(e){return e.position==="center"}function s6e(e){var t=e.getData(),r=[],n,i,a=!1,o=(e.get("minShowLabelAngle")||0)*i6e,s=t.getLayout("viewRect"),l=t.getLayout("r"),u=s.width,c=s.x,f=s.y,h=s.height;function d(C){C.ignore=!0}function v(C){if(!C.ignore)return!0;for(var A in C.states)if(C.states[A].ignore===!1)return!0;return!1}t.each(function(C){var A=t.getItemGraphicEl(C),P=A.shape,I=A.getTextContent(),k=A.getTextGuideLine(),E=t.getItemModel(C),D=E.getModel("label"),N=D.get("position")||E.get(["emphasis","label","position"]),z=D.get("distanceToLabelLine"),V=D.get("alignTo"),F=me(D.get("edgeDistance"),u),$=D.get("bleedMargin");$==null&&($=Math.min(u,h)>200?10:2);var B=E.getModel("labelLine"),H=B.get("length");H=me(H,u);var U=B.get("length2");if(U=me(U,u),Math.abs(P.endAngle-P.startAngle)<o){R(I.states,d),I.ignore=!0,k&&(R(k.states,d),k.ignore=!0);return}if(v(I)){var Y=(P.startAngle+P.endAngle)/2,Z=Math.cos(Y),Q=Math.sin(Y),re,ue,de,Re;n=P.cx,i=P.cy;var xe=N==="inside"||N==="inner";if(N==="center")re=P.cx,ue=P.cy,Re="center";else{var ie=(xe?(P.r+P.r0)/2*Z:P.r*Z)+n,ve=(xe?(P.r+P.r0)/2*Q:P.r*Q)+i;if(re=ie+Z*3,ue=ve+Q*3,!xe){var ce=ie+Z*(H+l-P.r),X=ve+Q*(H+l-P.r),te=ce+(Z<0?-1:1)*U,pe=X;V==="edge"?re=Z<0?c+F:c+u-F:re=te+(Z<0?-z:z),ue=pe,de=[[ie,ve],[ce,X],[te,pe]]}Re=xe?"center":V==="edge"?Z>0?"right":"left":Z>0?"left":"right"}var Te=Math.PI,Me=0,Xe=D.get("rotate");if(st(Xe))Me=Xe*(Te/180);else if(N==="center")Me=0;else if(Xe==="radial"||Xe===!0){var At=Z<0?-Y+Te:-Y;Me=At}else if(Xe==="tangential"&&N!=="outside"&&N!=="outer"){var Wt=Math.atan2(Z,Q);Wt<0&&(Wt=Te*2+Wt);var $r=Q>0;$r&&(Wt=Te+Wt),Me=Wt-Te}if(a=!!Me,I.x=re,I.y=ue,I.rotation=Me,I.setStyle({verticalAlign:"middle"}),xe){I.setStyle({align:Re});var Pr=I.states.select;Pr&&(Pr.x+=I.x,Pr.y+=I.y)}else{var _r=new je(0,0,0,0);ure(_r,I),r.push({label:I,labelLine:k,position:N,len:H,len2:U,minTurnAngle:B.get("minTurnAngle"),maxSurfaceAngle:B.get("maxSurfaceAngle"),surfaceNormal:new Ne(Z,Q),linePoints:de,textAlign:Re,labelDistance:z,labelAlignTo:V,edgeDistance:F,bleedMargin:$,rect:_r,unconstrainedWidth:_r.width,labelStyleWidth:I.style.width})}A.setTextConfig({inside:xe})}}),!a&&e.get("avoidLabelOverlap")&&a6e(r,n,i,l,u,h,c,f);for(var m=0;m<r.length;m++){var y=r[m],x=y.label,_=y.labelLine,b=isNaN(x.x)||isNaN(x.y);if(x){x.setStyle({align:y.textAlign}),b&&(R(x.states,d),x.ignore=!0);var S=x.states.select;S&&(S.x+=x.x,S.y+=x.y)}if(_){var T=y.linePoints;b||!T?(R(_.states,d),_.ignore=!0):(Lte(T,y.minTurnAngle),MFe(T,y.surfaceNormal,y.maxSurfaceAngle),_.setShape({points:T}),x.__hostTarget.textGuideLineConfig={anchor:new Ne(T[0][0],T[0][1])})}}}var l6e=function(e){K(t,e);function t(r,n,i){var a=e.call(this)||this;a.z2=2;var o=new ot;return a.setTextContent(o),a.updateData(r,n,i,!0),a}return t.prototype.updateData=function(r,n,i,a){var o=this,s=r.hostModel,l=r.getItemModel(n),u=l.getModel("emphasis"),c=r.getItemLayout(n),f=ae(Io(l.getModel("itemStyle"),c,!0),c);if(isNaN(f.startAngle)){o.setShape(f);return}if(a){o.setShape(f);var h=s.getShallow("animationType");s.ecModel.ssr?(jt(o,{scaleX:0,scaleY:0},s,{dataIndex:n,isFrom:!0}),o.originX=f.cx,o.originY=f.cy):h==="scale"?(o.shape.r=c.r0,jt(o,{shape:{r:c.r}},s,n)):i!=null?(o.setShape({startAngle:i,endAngle:i}),jt(o,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},s,n)):(o.shape.endAngle=c.startAngle,ut(o,{shape:{endAngle:c.endAngle}},s,n))}else ma(o),ut(o,{shape:f},s,n);o.useStyle(r.getItemVisual(n,"style")),Rr(o,l);var d=(c.startAngle+c.endAngle)/2,v=s.get("selectedOffset"),m=Math.cos(d)*v,y=Math.sin(d)*v,x=l.getShallow("cursor");x&&o.attr("cursor",x),this._updateLabel(s,r,n),o.ensureState("emphasis").shape=ae({r:c.r+(u.get("scale")&&u.get("scaleSize")||0)},Io(u.getModel("itemStyle"),c)),ae(o.ensureState("select"),{x:m,y,shape:Io(l.getModel(["select","itemStyle"]),c)}),ae(o.ensureState("blur"),{shape:Io(l.getModel(["blur","itemStyle"]),c)});var _=o.getTextGuideLine(),b=o.getTextContent();_&&ae(_.ensureState("select"),{x:m,y}),ae(b.ensureState("select"),{x:m,y}),Gt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(r,n,i){var a=this,o=n.getItemModel(i),s=o.getModel("labelLine"),l=n.getItemVisual(i,"style"),u=l&&l.fill,c=l&&l.opacity;qr(a,Br(o),{labelFetcher:n.hostModel,labelDataIndex:i,inheritColor:u,defaultOpacity:c,defaultText:r.getFormattedLabel(i,"normal")||n.getName(i)});var f=a.getTextContent();a.setTextConfig({position:null,rotation:null}),f.attr({z2:10});var h=o.get(["label","position"]);if(h!=="outside"&&h!=="outer")a.removeTextGuideLine();else{var d=this.getTextGuideLine();d||(d=new ln,this.setTextGuideLine(d)),Rj(this,Bj(o),{stroke:u,opacity:ci(s.get(["lineStyle","opacity"]),c,1)})}},t}(Sn),u6e=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.ignoreLabelLineUpdate=!0,r}return t.prototype.render=function(r,n,i,a){var o=r.getData(),s=this._data,l=this.group,u;if(!s&&o.count()>0){for(var c=o.getItemLayout(0),f=1;isNaN(c&&c.startAngle)&&f<o.count();++f)c=o.getItemLayout(f);c&&(u=c.startAngle)}if(this._emptyCircleSector&&l.remove(this._emptyCircleSector),o.count()===0&&r.get("showEmptyCircle")){var h=sre(r),d=new Sn({shape:Le(h)});d.useStyle(r.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=d,l.add(d)}o.diff(s).add(function(v){var m=new l6e(o,v,u);o.setItemGraphicEl(v,m),l.add(m)}).update(function(v,m){var y=s.getItemGraphicEl(m);y.updateData(o,v,u),y.off("click"),l.add(y),o.setItemGraphicEl(v,y)}).remove(function(v){var m=s.getItemGraphicEl(v);Os(m,r,v)}).execute(),s6e(r),r.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},t.prototype.dispose=function(){},t.prototype.containPoint=function(r,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=r[0]-a.cx,s=r[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},t.type="pie",t}(bt);function tp(e,t,r){t=oe(t)&&{coordDimensions:t}||ae({encodeDefine:e.getEncode()},t);var n=e.getSource(),i=Kv(n,t).dimensions,a=new Rn(i,e);return a.initData(n,r),a}var rp=function(){function e(t,r){this._getDataWithEncodedVisual=t,this._getRawData=r}return e.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},e.prototype.containName=function(t){var r=this._getRawData();return r.indexOfName(t)>=0},e.prototype.indexOfName=function(t){var r=this._getDataWithEncodedVisual();return r.indexOfName(t)},e.prototype.getItemVisual=function(t,r){var n=this._getDataWithEncodedVisual();return n.getItemVisual(t,r)},e}(),c6e=et(),cre=function(e){K(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new rp(_e(this.getData,this),_e(this.getRawData,this)),this._defaultLabelLine(r)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return tp(this,{coordDimensions:["value"],encodeDefaulter:We(fj,this)})},t.prototype.getDataParams=function(r){var n=this.getData(),i=c6e(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=yJ(o,n.hostModel.get("percentPrecision"))}var s=e.prototype.getDataParams.call(this,r);return s.percent=a[r]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(r){ff(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},t}(Ct);nBe({fullType:cre.type,getCoord2:function(e){return e.getShallow("center")}});function f6e(e){return{seriesType:e,reset:function(t,r){var n=t.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(st(o)&&!isNaN(o)&&o<0)})}}}function h6e(e){e.registerChartView(u6e),e.registerSeriesModel(cre),Tee("pie",e.registerAction),e.registerLayout(We(n6e,"pie")),e.registerProcessor(ep("pie")),e.registerProcessor(f6e("pie"))}var d6e=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.getInitialData=function(r,n){return es(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?5e3:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?1e4:this.get("progressiveThreshold"))},t.prototype.brushSelector=function(r,n,i){return i.point(n.getItemLayout(r))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:J.color.primary}},universalTransition:{divideShape:"clone"}},t}(Ct),fre=4,v6e=function(){function e(){}return e}(),p6e=function(e){K(t,e);function t(r){var n=e.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.getDefaultShape=function(){return new v6e},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(r,n){var i=n.points,a=n.size,o=this.symbolProxy,s=o.shape,l=r.getContext?r.getContext():r,u=l&&a[0]<fre,c=this.softClipShape,f;if(u){this._ctx=l;return}for(this._ctx=null,f=this._off;f<i.length;){var h=i[f++],d=i[f++];isNaN(h)||isNaN(d)||c&&!c.contain(h,d)||(s.x=h-a[0]/2,s.y=d-a[1]/2,s.width=a[0],s.height=a[1],o.buildPath(r,s,!0))}this.incremental&&(this._off=f,this.notClear=!0)},t.prototype.afterBrush=function(){var r=this.shape,n=r.points,i=r.size,a=this._ctx,o=this.softClipShape,s;if(a){for(s=this._off;s<n.length;){var l=n[s++],u=n[s++];isNaN(l)||isNaN(u)||o&&!o.contain(l,u)||a.fillRect(l-i[0]/2,u-i[1]/2,i[0],i[1])}this.incremental&&(this._off=s,this.notClear=!0)}},t.prototype.findDataIndex=function(r,n){for(var i=this.shape,a=i.points,o=i.size,s=Math.max(o[0],4),l=Math.max(o[1],4),u=a.length/2-1;u>=0;u--){var c=u*2,f=a[c]-s/2,h=a[c+1]-l/2;if(r>=f&&n>=h&&r<=f+s&&n<=h+l)return u}return-1},t.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.points,a=n.size,o=a[0],s=a[1],l=1/0,u=1/0,c=-1/0,f=-1/0,h=0;h<i.length;){var d=i[h++],v=i[h++];l=Math.min(d,l),c=Math.max(d,c),u=Math.min(v,u),f=Math.max(v,f)}r=this._rect=new je(l-o/2,u-s/2,c-l+o,f-u+s)}return r},t}(nt),g6e=function(){function e(){this.group=new Ie}return e.prototype.updateData=function(t,r){this._clear();var n=this._create();n.setShape({points:t.getLayout("points")}),this._setCommon(n,t,r)},e.prototype.updateLayout=function(t){var r=t.getLayout("points");this.group.eachChild(function(n){if(n.startIndex!=null){var i=(n.endIndex-n.startIndex)*2,a=n.startIndex*4*2;r=new Float32Array(r.buffer,a,i)}n.setShape("points",r),n.reset()})},e.prototype.incrementalPrepareUpdate=function(t){this._clear()},e.prototype.incrementalUpdate=function(t,r,n){var i=this._newAdded[0],a=r.getLayout("points"),o=i&&i.shape.points;if(o&&o.length<2e4){var s=o.length,l=new Float32Array(s+a.length);l.set(o),l.set(a,s),i.endIndex=t.end,i.setShape({points:l})}else{this._newAdded=[];var u=this._create();u.startIndex=t.start,u.endIndex=t.end,u.incremental=!0,u.setShape({points:a}),this._setCommon(u,r,n)}},e.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},e.prototype._create=function(){var t=new p6e({cursor:"default"});return t.ignoreCoarsePointer=!0,this.group.add(t),this._newAdded.push(t),t},e.prototype._setCommon=function(t,r,n){var i=r.hostModel;n=n||{};var a=r.getVisual("symbolSize");t.setShape("size",a instanceof Array?a:[a,a]),t.softClipShape=n.clipShape||null,t.symbolProxy=xr(r.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var o=t.shape.size[0]<fre;t.useStyle(i.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=r.getVisual("style"),l=s&&s.fill;l&&t.setColor(l);var u=ze(t);u.seriesIndex=i.seriesIndex,t.on("mousemove",function(c){u.dataIndex=null;var f=t.hoverDataIdx;f>=0&&(u.dataIndex=f+(t.startIndex||0))})},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),m6e=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.updateData(a,{clipShape:this._getClipShape(r)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.incrementalPrepareUpdate(a),this._finished=!1},t.prototype.incrementalRender=function(r,n,i){this._symbolDraw.incrementalUpdate(r,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=r.end===n.getData().count()},t.prototype.updateTransform=function(r,n,i){var a=r.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=A0("").reset(r,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},t.prototype.eachRendered=function(r){this._symbolDraw&&this._symbolDraw.eachRendered(r)},t.prototype._getClipShape=function(r){if(r.get("clip",!0)){var n=r.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},t.prototype._updateSymbolDraw=function(r,n){var i=this._symbolDraw,a=n.pipelineContext,o=a.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new g6e:new T0,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},t.prototype.remove=function(r,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t}(bt),hre={left:0,right:0,top:0,bottom:0},Vw=["25%","25%"],y6e=function(e){K(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(r,n){var i=Ef(r.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),i&&r.outerBounds&&Zo(r.outerBounds,i)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&r.outerBounds&&Zo(this.option.outerBounds,r.outerBounds)},t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:hre,outerBoundsContain:"all",outerBoundsClampWidth:Vw[0],outerBoundsClampHeight:Vw[1],backgroundColor:J.color.transparent,borderWidth:1,borderColor:J.color.neutral30},t}(Qe),hO=function(e){K(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",tr).models[0]},t.type="cartesian2dAxis",t}(Qe);cr(hO,Qv);var dre={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:J.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:J.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:J.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[J.color.backgroundTint,J.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:J.color.neutral00,borderColor:J.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},x6e=Ue({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},dre),Hj=Ue({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:J.color.axisMinorSplitLine,width:1}}},dre),_6e=Ue({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Hj),b6e=Oe({logBase:10},Hj);const vre={category:x6e,value:Hj,time:_6e,log:b6e};var w6e={value:1,category:1,time:1,log:1},dO=null;function S6e(e){dO||(dO=e)}function M0(){return dO}function sv(e,t,r,n){R(w6e,function(i,a){var o=Ue(Ue({},vre[a],!0),n,!0),s=function(l){K(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=t+"Axis."+a,c}return u.prototype.mergeDefaultAndTheme=function(c,f){var h=Cy(this),d=h?Ef(c):{},v=f.getTheme();Ue(c,v.get(a+"Axis")),Ue(c,this.getDefaultOption()),c.type=$G(c),h&&Zo(c,d,h)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=Iy.createByAxisModel(this))},u.prototype.getCategories=function(c){var f=this.option;if(f.type==="category")return c?f.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(c){var f=M0();return f?f.updateModelAxisBreak(this,c):{breaks:[]}},u.type=t+"Axis."+a,u.defaultOption=o,u}(r);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+"Axis",$G)}function $G(e){return e.type||(e.data?"category":"value")}var T6e=function(){function e(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return e.prototype.getAxis=function(t){return this._axes[t]},e.prototype.getAxes=function(){return le(this._dimList,function(t){return this._axes[t]},this)},e.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),dt(this.getAxes(),function(r){return r.scale.type===t})},e.prototype.addAxis=function(t){var r=t.dim;this._axes[r]=t,this._dimList.push(r)},e}(),vO=["x","y"];function FG(e){return(e.type==="interval"||e.type==="time")&&!e.hasBreaks()}var C6e=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=vO,r}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!FG(r)||!FG(n))){var i=r.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),l=i[1]-i[0],u=a[1]-a[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,f=(s[1]-o[1])/u,h=o[0]-i[0]*c,d=o[1]-a[0]*f,v=this._transform=[c,0,0,f,h,d];this._invTransform=pa([],v)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(r){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(r[0]))&&i.contain(i.toLocalCoord(r[1]))},t.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},t.prototype.containZone=function(r,n){var i=this.dataToPoint(r),a=this.dataToPoint(n),o=this.getArea(),s=new je(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},t.prototype.dataToPoint=function(r,n,i){i=i||[];var a=r[0],o=r[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return lr(i,r,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=l.toGlobalCoord(l.dataToCoord(o,n)),i},t.prototype.clampData=function(r,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),l=i.parse(r[0]),u=a.parse(r[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},t.prototype.pointToData=function(r,n,i){if(i=i||[],this._invTransform)return lr(i,r,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(r[0]),n),i[1]=o.coordToData(o.toLocalCoord(r[1]),n),i},t.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},t.prototype.getArea=function(r){r=r||0;var n=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(n[0],n[1])-r,o=Math.min(i[0],i[1])-r,s=Math.max(n[0],n[1])-a+r,l=Math.max(i[0],i[1])-o+r;return new je(a,o,s,l)},t}(T6e),pre=function(e){K(t,e);function t(r,n,i,a,o){var s=e.call(this,r,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},t.prototype.getGlobalExtent=function(r){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),r&&n[0]>n[1]&&n.reverse(),n},t.prototype.pointToData=function(r,n){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),n)},t.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},t}(wa),rC="expandAxisBreak",gre="collapseAxisBreak",mre="toggleAxisBreak",Uj="axisbreakchanged",A6e={type:rC,event:Uj,update:"update",refineEvent:Zj},M6e={type:gre,event:Uj,update:"update",refineEvent:Zj},P6e={type:mre,event:Uj,update:"update",refineEvent:Zj};function Zj(e,t,r,n){var i=[];return R(e,function(a){i=i.concat(a.eventBreaks)}),{eventContent:{breaks:i}}}function k6e(e){e.registerAction(A6e,t),e.registerAction(M6e,t),e.registerAction(P6e,t);function t(r,n){var i=[],a=dd(n,r);function o(s,l){R(a[s],function(u){var c=u.updateAxisBreaks(r);R(c.breaks,function(f){var h;i.push(Oe((h={},h[l]=u.componentIndex,h),f))})})}return o("xAxisModels","xAxisIndex"),o("yAxisModels","yAxisIndex"),o("singleAxisModels","singleAxisIndex"),{eventBreaks:i}}}var Bl=Math.PI,L6e=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],I6e=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],lv=et(),yre=et(),xre=function(){function e(t){this.recordMap={},this.resolveAxisNameOverlap=t}return e.prototype.ensureRecord=function(t){var r=t.axis.dim,n=t.componentIndex,i=this.recordMap,a=i[r]||(i[r]=[]);return a[n]||(a[n]={ready:{}})},e}();function O6e(e,t,r,n){var i=r.axis,a=t.ensureRecord(r),o=[],s,l=Yj(e.axisName)&&av(e.nameLocation);R(n,function(v){var m=Yo(v);if(!(!m||m.label.ignore)){o.push(m);var y=a.transGroup;l&&(y.transform?pa(qp,y.transform):f0(qp),m.transform&&Wa(qp,qp,m.transform),je.copy(x_,m.localRect),x_.applyTransform(qp),s?s.union(x_):je.copy(s=new je(0,0,0,0),x_))}});var u=Math.abs(a.dirVec.x)>.1?"x":"y",c=a.transGroup[u];if(o.sort(function(v,m){return Math.abs(v.label[u]-c)-Math.abs(m.label[u]-c)}),l&&s){var f=i.getExtent(),h=Math.min(f[0],f[1]),d=Math.max(f[0],f[1])-h;s.union(new je(h,0,d,1))}a.stOccupiedRect=s,a.labelInfoList=o}var qp=Yr(),x_=new je(0,0,0,0),_re=function(e,t,r,n,i,a){if(av(e.nameLocation)){var o=a.stOccupiedRect;o&&bre(LFe({},o,a.transGroup.transform),n,i)}else wre(a.labelInfoList,a.dirVec,n,i)};function bre(e,t,r){var n=new Ne;eC(e,t,n,{direction:Math.atan2(r.y,r.x),bidirectional:!1,touchThreshold:.05})&&aO(t,n)}function wre(e,t,r,n){for(var i=Ne.dot(n,t)>=0,a=0,o=e.length;a<o;a++){var s=e[i?a:o-1-a];s.label.ignore||bre(s,r,n)}}var Zn=function(){function e(t,r,n,i){this.group=new Ie,this._axisModel=t,this._api=r,this._local={},this._shared=i||new xre(_re),this._resetCfgDetermined(n)}return e.prototype.updateCfg=function(t){var r=this._cfg.raw;r.position=t.position,r.labelOffset=t.labelOffset,this._resetCfgDetermined(r)},e.prototype.__getRawCfg=function(){return this._cfg.raw},e.prototype._resetCfgDetermined=function(t){var r=this._axisModel,n=r.getDefaultOption?r.getDefaultOption():{},i=Ae(t.axisName,r.get("name")),a=r.get("nameMoveOverlap");(a==null||a==="auto")&&(a=Ae(t.defaultNameMoveOverlap,!0));var o={raw:t,position:t.position,rotation:t.rotation,nameDirection:Ae(t.nameDirection,1),tickDirection:Ae(t.tickDirection,1),labelDirection:Ae(t.labelDirection,1),labelOffset:Ae(t.labelOffset,0),silent:Ae(t.silent,!0),axisName:i,nameLocation:ci(r.get("nameLocation"),n.nameLocation,"end"),shouldNameMoveOverlap:Yj(i)&&a,optionHideOverlap:r.get(["axisLabel","hideOverlap"]),showMinorTicks:r.get(["minorTick","show"])};this._cfg=o;var s=new Ie({x:o.position[0],y:o.position[1],rotation:o.rotation});s.updateTransform(),this._transformGroup=s;var l=this._shared.ensureRecord(r);l.transGroup=this._transformGroup,l.dirVec=new Ne(Math.cos(-o.rotation),Math.sin(-o.rotation))},e.prototype.build=function(t,r){var n=this;return t||(t={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0}),R(E6e,function(i){t[i]&&D6e[i](n._cfg,n._local,n._shared,n._axisModel,n.group,n._transformGroup,n._api,r||{})}),this},e.innerTextLayout=function(t,r,n){var i=MN(r-t),a,o;return Jd(i)?(o=n>0?"top":"bottom",a="center"):Jd(i-Bl)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i<Bl?a=n>0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},e.makeAxisEventDataBase=function(t){var r={componentType:t.mainType,componentIndex:t.componentIndex};return r[t.mainType+"Index"]=t.componentIndex,r},e.isLabelSilent=function(t){var r=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||r&&r.show)},e}(),E6e=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],D6e={axisLine:function(e,t,r,n,i,a,o){var s=n.get(["axisLine","show"]);if(s==="auto"&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),!!s){var l=n.axis.getExtent(),u=a.transform,c=[l[0],0],f=[l[1],0],h=c[0]>f[0];u&&(lr(c,c,u),lr(f,f,u));var d=ae({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),v={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:d};if(n.get(["axisLine","breakLine"])&&n.axis.scale.hasBreaks())M0().buildAxisBreakLine(n,i,a,v);else{var m=new mr(ae({shape:{x1:c[0],y1:c[1],x2:f[0],y2:f[1]}},v));tv(m.shape,m.style.lineWidth),m.anid="line",i.add(m)}var y=n.get(["axisLine","symbol"]);if(y!=null){var x=n.get(["axisLine","symbolSize"]);ye(y)&&(y=[y,y]),(ye(x)||st(x))&&(x=[x,x]);var _=Nf(n.get(["axisLine","symbolOffset"])||0,x),b=x[0],S=x[1];R([{rotate:e.rotation+Math.PI/2,offset:_[0],r:0},{rotate:e.rotation-Math.PI/2,offset:_[1],r:Math.sqrt((c[0]-f[0])*(c[0]-f[0])+(c[1]-f[1])*(c[1]-f[1]))}],function(T,C){if(y[C]!=="none"&&y[C]!=null){var A=xr(y[C],-b/2,-S/2,b,S,d.stroke,!0),P=T.r+T.offset,I=h?f:c;A.attr({rotation:T.rotate,x:I[0]+P*Math.cos(e.rotation),y:I[1]-P*Math.sin(e.rotation),silent:!0,z2:11}),i.add(A)}})}}},axisTickLabelEstimate:function(e,t,r,n,i,a,o,s){var l=GG(t,i,s);l&&VG(e,t,r,n,i,a,o,Qa.estimate)},axisTickLabelDetermine:function(e,t,r,n,i,a,o,s){var l=GG(t,i,s);l&&VG(e,t,r,n,i,a,o,Qa.determine);var u=B6e(e,i,a,n);R6e(e,t.labelLayoutList,u),z6e(e,i,a,n,e.tickDirection)},axisName:function(e,t,r,n,i,a,o,s){var l=r.ensureRecord(n);t.nameEl&&(i.remove(t.nameEl),t.nameEl=l.nameLayout=l.nameLocation=null);var u=e.axisName;if(Yj(u)){var c=e.nameLocation,f=e.nameDirection,h=n.getModel("nameTextStyle"),d=n.get("nameGap")||0,v=n.axis.getExtent(),m=n.axis.inverse?-1:1,y=new Ne(0,0),x=new Ne(0,0);c==="start"?(y.x=v[0]-m*d,x.x=-m):c==="end"?(y.x=v[1]+m*d,x.x=m):(y.x=(v[0]+v[1])/2,y.y=e.labelOffset+f*d,x.y=f);var _=Yr();x.transform(rl(_,_,e.rotation));var b=n.get("nameRotate");b!=null&&(b=b*Bl/180);var S,T;av(c)?S=Zn.innerTextLayout(e.rotation,b??e.rotation,f):(S=N6e(e.rotation,c,b||0,v),T=e.raw.axisNameAvailableWidth,T!=null&&(T=Math.abs(T/Math.sin(S.rotation)),!isFinite(T)&&(T=null)));var C=h.getFont(),A=n.get("nameTruncate",!0)||{},P=A.ellipsis,I=on(e.raw.nameTruncateMaxWidth,A.maxWidth,T),k=s.nameMarginLevel||0,E=new ot({x:y.x,y:y.y,rotation:S.rotation,silent:Zn.isLabelSilent(n),style:kt(h,{text:u,font:C,overflow:"truncate",width:I,ellipsis:P,fill:h.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:h.get("align")||S.textAlign,verticalAlign:h.get("verticalAlign")||S.textVerticalAlign}),z2:1});if(il({el:E,componentModel:n,itemName:u}),E.__fullText=u,E.anid="name",n.get("triggerEvent")){var D=Zn.makeAxisEventDataBase(n);D.targetType="axisName",D.name=u,ze(E).eventData=D}a.add(E),E.updateTransform(),t.nameEl=E;var N=l.nameLayout=Yo({label:E,priority:E.z2,defaultAttr:{ignore:E.ignore},marginDefault:av(c)?L6e[k]:I6e[k]});if(l.nameLocation=c,i.add(E),E.decomposeTransform(),e.shouldNameMoveOverlap&&N){var z=r.ensureRecord(n);r.resolveAxisNameOverlap(e,r,n,N,x,z)}}}};function VG(e,t,r,n,i,a,o,s){Tre(t)||$6e(e,t,i,s,n,o);var l=t.labelLayoutList;F6e(e,n,l,a),W6e(n,e.rotation,l);var u=e.optionHideOverlap;j6e(n,l,u),u&&Dte(dt(l,function(c){return c&&!c.label.ignore})),O6e(e,r,n,l)}function N6e(e,t,r,n){var i=MN(r-e),a,o,s=n[0]>n[1],l=t==="start"&&!s||t!=="start"&&s;return Jd(i-Bl/2)?(o=l?"bottom":"top",a="center"):Jd(i-Bl*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",i<Bl*1.5&&i>Bl/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function j6e(e,t,r){if(mte(e.axis))return;function n(s,l,u){var c=Yo(t[l]),f=Yo(t[u]);if(!(!c||!f)){if(s===!1||c.suggestIgnore){Ag(c.label);return}if(f.suggestIgnore){Ag(f.label);return}var h=.1;if(!r){var d=[0,0,0,0];c=oO({marginForce:d},c),f=oO({marginForce:d},f)}eC(c,f,null,{touchThreshold:h})&&Ag(s?f.label:c.label)}}var i=e.get(["axisLabel","showMinLabel"]),a=e.get(["axisLabel","showMaxLabel"]),o=t.length;n(i,0,1),n(a,o-1,o-2)}function R6e(e,t,r){e.showMinorTicks||R(t,function(n){if(n&&n.label.ignore)for(var i=0;i<r.length;i++){var a=r[i],o=yre(a),s=lv(n.label);if(o.tickValue!=null&&!o.onBand&&o.tickValue===s.tickValue){Ag(a);return}}})}function Ag(e){e&&(e.ignore=!0)}function Sre(e,t,r,n,i){for(var a=[],o=[],s=[],l=0;l<e.length;l++){var u=e[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=r,t&&(lr(o,o,t),lr(s,s,t));var c=new mr({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,autoBatch:!0,silent:!0});tv(c.shape,c.style.lineWidth),c.anid=i+"_"+e[l].tickValue,a.push(c);var f=yre(c);f.onBand=!!e[l].onBand,f.tickValue=e[l].tickValue}return a}function B6e(e,t,r,n){var i=n.axis,a=n.getModel("axisTick"),o=a.get("show");if(o==="auto"&&(o=!0,e.raw.axisTickAutoShow!=null&&(o=!!e.raw.axisTickAutoShow)),!o||i.scale.isBlank())return[];for(var s=a.getModel("lineStyle"),l=e.tickDirection*a.get("length"),u=i.getTicksCoords(),c=Sre(u,r.transform,l,Oe(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),f=0;f<c.length;f++)t.add(c[f]);return c}function z6e(e,t,r,n,i){var a=n.axis,o=n.getModel("minorTick");if(!(!e.showMinorTicks||a.scale.isBlank())){var s=a.getMinorTicksCoords();if(s.length)for(var l=o.getModel("lineStyle"),u=i*o.get("length"),c=Oe(l.getLineStyle(),Oe(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),f=0;f<s.length;f++)for(var h=Sre(s[f],r.transform,u,c,"minorticks_"+f),d=0;d<h.length;d++)t.add(h[d])}}function GG(e,t,r){if(Tre(e)){var n=e.axisLabelsCreationContext,i=n.out.noPxChangeTryDetermine;if(r.noPxChange){for(var a=!0,o=0;o<i.length;o++)a=a&&i[o]();if(a)return!1}i.length&&(t.remove(e.labelGroup),pO(e,null,null,null))}return!0}function $6e(e,t,r,n,i,a){var o=i.axis,s=on(e.raw.axisLabelShow,i.get(["axisLabel","show"])),l=new Ie;r.add(l);var u=Nw(n);if(!s||o.scale.isBlank()){pO(t,[],l,u);return}var c=i.getModel("axisLabel"),f=o.getViewLabels(u),h=(on(e.raw.labelRotate,c.get("rotate"))||0)*Bl/180,d=Zn.innerTextLayout(e.rotation,h,e.labelDirection),v=i.getCategories&&i.getCategories(!0),m=[],y=i.get("triggerEvent"),x=1/0,_=-1/0;R(f,function(S,T){var C,A=o.scale.type==="ordinal"?o.scale.getRawOrdinalNumber(S.tickValue):S.tickValue,P=S.formattedLabel,I=S.rawLabel,k=c;if(v&&v[A]){var E=v[A];Ee(E)&&E.textStyle&&(k=new rt(E.textStyle,c,i.ecModel))}var D=k.getTextColor()||i.get(["axisLine","lineStyle","color"]),N=k.getShallow("align",!0)||d.textAlign,z=Ae(k.getShallow("alignMinLabel",!0),N),V=Ae(k.getShallow("alignMaxLabel",!0),N),F=k.getShallow("verticalAlign",!0)||k.getShallow("baseline",!0)||d.textVerticalAlign,$=Ae(k.getShallow("verticalAlignMinLabel",!0),F),B=Ae(k.getShallow("verticalAlignMaxLabel",!0),F),H=10+(((C=S.time)===null||C===void 0?void 0:C.level)||0);x=Math.min(x,H),_=Math.max(_,H);var U=new ot({x:0,y:0,rotation:0,silent:Zn.isLabelSilent(i),z2:H,style:kt(k,{text:P,align:T===0?z:T===f.length-1?V:N,verticalAlign:T===0?$:T===f.length-1?B:F,fill:ke(D)?D(o.type==="category"?I:o.type==="value"?A+"":A,T):D})});U.anid="label_"+A;var Y=lv(U);if(Y.break=S.break,Y.tickValue=A,Y.layoutRotation=d.rotation,il({el:U,componentModel:i,itemName:P,formatterParamsExtra:{isTruncated:function(){return U.isTruncated},value:I,tickIndex:T}}),y){var Z=Zn.makeAxisEventDataBase(i);Z.targetType="axisLabel",Z.value=I,Z.tickIndex=T,S.break&&(Z.break={start:S.break.parsedBreak.vmin,end:S.break.parsedBreak.vmax}),o.type==="category"&&(Z.dataIndex=A),ze(U).eventData=Z,S.break&&G6e(i,a,U,S.break)}m.push(U),l.add(U)});var b=le(m,function(S){return{label:S,priority:lv(S).break?S.z2+(_-x+1):S.z2,defaultAttr:{ignore:S.ignore}}});pO(t,b,l,u)}function Tre(e){return!!e.labelLayoutList}function pO(e,t,r,n){e.labelLayoutList=t,e.labelGroup=r,e.axisLabelsCreationContext=n}function F6e(e,t,r,n){var i=t.get(["axisLabel","margin"]);R(r,function(a,o){var s=Yo(a);if(s){var l=s.label,u=lv(l);s.suggestIgnore=l.ignore,l.ignore=!1,hw(us,V6e),us.x=t.axis.dataToCoord(u.tickValue),us.y=e.labelOffset+e.labelDirection*i,us.rotation=u.layoutRotation,n.add(us),us.updateTransform(),n.remove(us),us.decomposeTransform(),hw(l,us),l.markRedraw(),zw(s,!0),Yo(s)}})}var us=new qe,V6e=new qe;function Yj(e){return!!e}function G6e(e,t,r,n){r.on("click",function(i){var a={type:rC,breaks:[{start:n.parsedBreak.breakOption.start,end:n.parsedBreak.breakOption.end}]};a[e.axis.dim+"AxisIndex"]=e.componentIndex,t.dispatchAction(a)})}function W6e(e,t,r){var n=Cr();if(n){var i=n.retrieveAxisBreakPairs(r,function(o){return o&&lv(o.label).break},!0),a=e.get(["breakLabelLayout","moveOverlap"],!0);(a===!0||a==="auto")&&R(i,function(o){M0().adjustBreakLabelPair(e.axis.inverse,t,[Yo(r[o[0]]),Yo(r[o[1]])])})}}function Gw(e,t,r){r=r||{};var n=t.axis,i={},a=n.getAxesOnZeroOf()[0],o=n.position,s=a?"onZero":o,l=n.dim,u=[e.x,e.x+e.width,e.y,e.y+e.height],c={left:0,right:1,top:0,bottom:1,onZero:2},f=t.get("offset")||0,h=l==="x"?[u[2]-f,u[3]+f]:[u[0]-f,u[1]+f];if(a){var d=a.toGlobalCoord(a.dataToCoord(0));h[c.onZero]=Math.max(Math.min(d,h[1]),h[0])}i.position=[l==="y"?h[c[s]]:u[0],l==="x"?h[c[s]]:u[3]],i.rotation=Math.PI/2*(l==="x"?0:1);var v={top:-1,bottom:1,left:-1,right:1};i.labelDirection=i.tickDirection=i.nameDirection=v[o],i.labelOffset=a?h[c[o]]-h[c.onZero]:0,t.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),on(r.labelInside,t.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var m=t.get(["axisLabel","rotate"]);return i.labelRotate=s==="top"?-m:m,i.z2=1,i}function H6e(e){return e.coordinateSystem&&e.coordinateSystem.type==="cartesian2d"}function WG(e){var t={xAxisModel:null,yAxisModel:null};return R(t,function(r,n){var i=n.replace(/Model$/,""),a=e.getReferringComponents(i,tr).models[0];t[n]=a}),t}function U6e(e,t,r,n,i,a){for(var o=Gw(e,r),s=!1,l=!1,u=0;u<t.length;u++)QI(t[u].getOtherAxis(r.axis).scale)&&(s=l=!0,r.axis.type==="category"&&r.axis.onBand&&(l=!1));return o.axisLineAutoShow=s,o.axisTickAutoShow=l,o.defaultNameMoveOverlap=a,new Zn(r,n,o,i)}function Z6e(e,t,r){var n=Gw(t,r);e.updateCfg(n)}function Cre(e,t,r){var n=qs.prototype,i=n.getTicks.call(r),a=n.getTicks.call(r,{expandToNicedExtent:!0}),o=i.length-1,s=n.getInterval.call(r),l=gte(e,t),u=l.extent,c=l.fixMin,f=l.fixMax;e.type==="log"&&(u=eO(e.base,u,!0)),e.setBreaksFromOption(yte(t)),e.setExtent(u[0],u[1]),e.calcNiceExtent({splitNumber:o,fixMin:c,fixMax:f});var h=n.getExtent.call(e);c&&(u[0]=h[0]),f&&(u[1]=h[1]);var d=n.getInterval.call(e),v=u[0],m=u[1];if(c&&f)d=(m-v)/o;else if(c)for(m=u[0]+d*o;m<u[1]&&isFinite(m)&&isFinite(u[1]);)d=J2(d),m=u[0]+d*o;else if(f)for(v=u[1]-d*o;v>u[0]&&isFinite(v)&&isFinite(u[0]);)d=J2(d),v=u[1]-d*o;else{var y=e.getTicks().length-1;y>o&&(d=J2(d));var x=d*o;m=Math.ceil(u[1]/d)*d,v=gr(m-x),v<0&&u[0]>=0?(v=0,m=gr(x)):m>0&&u[1]<=0&&(m=0,v=-gr(x))}var _=(i[0].value-a[0].value)/s,b=(i[o].value-a[o].value)/s;n.setExtent.call(e,v+d*_,m+d*b),n.setInterval.call(e,d),(_||b)&&n.setNiceExtent.call(e,v+d,m-d)}var HG=[[3,1],[0,2]],Y6e=function(){function e(t,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=vO,this._initCartesian(t,r,n),this.model=t}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(t,r){var n=this._axesMap;this._updateScale(t,this.model);function i(o){var s,l=at(o),u=l.length;if(u){for(var c=[],f=u-1;f>=0;f--){var h=+l[f],d=o[h],v=d.model,m=d.scale;QI(m)&&v.get("alignTicks")&&v.get("interval")==null?c.push(d):(yf(m,v),QI(m)&&(s=d))}c.length&&(s||(s=c.pop(),yf(s.scale,s.model)),R(c,function(y){Cre(y.scale,y.model,s.scale)}))}}i(n.x),i(n.y);var a={};R(n.x,function(o){UG(n,"y",o,a)}),R(n.y,function(o){UG(n,"x",o,a)}),this.resize(this.model,r)},e.prototype.resize=function(t,r,n){var i=zr(t,r),a=this._rect=$t(t.getBoxLayoutParams(),i.refContainer),o=this._axesMap,s=this._coordsList,l=t.get("containLabel");if(gO(o,a),!n){var u=K6e(a,s,o,l,r),c=void 0;if(l)mO?(mO(this._axesList,a),gO(o,a)):c=XG(a.clone(),"axisLabel",null,a,o,u,i);else{var f=J6e(t,a,i),h=f.outerBoundsRect,d=f.parsedOuterBoundsContain,v=f.outerBoundsClamp;h&&(c=XG(h,d,v,a,o,u,i))}Are(a,o,Qa.determine,null,c,i)}R(this._coordsList,function(m){m.calcAffineTransform()})},e.prototype.getAxis=function(t,r){var n=this._axesMap[t];if(n!=null)return n[r||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(t,r){if(t!=null&&r!=null){var n="x"+t+"y"+r;return this._coordsMap[n]}Ee(t)&&(r=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,a=this._coordsList;i<a.length;i++)if(a[i].getAxis("x").index===t||a[i].getAxis("y").index===r)return a[i]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.prototype.convertToPixel=function(t,r,n){var i=this._findConvertTarget(r);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},e.prototype.convertFromPixel=function(t,r,n){var i=this._findConvertTarget(r);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},e.prototype._findConvertTarget=function(t){var r=t.seriesModel,n=t.xAxisModel||r&&r.getReferringComponents("xAxis",tr).models[0],i=t.yAxisModel||r&&r.getReferringComponents("yAxis",tr).models[0],a=t.gridModel,o=this._coordsList,s,l;if(r)s=r.coordinateSystem,He(o,s)<0&&(s=null);else if(n&&i)s=this.getCartesian(n.componentIndex,i.componentIndex);else if(n)l=this.getAxis("x",n.componentIndex);else if(i)l=this.getAxis("y",i.componentIndex);else if(a){var u=a.coordinateSystem;u===this&&(s=this._coordsList[0])}return{cartesian:s,axis:l}},e.prototype.containPoint=function(t){var r=this._coordsList[0];if(r)return r.containPoint(t)},e.prototype._initCartesian=function(t,r,n){var i=this,a=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},l={x:0,y:0};if(r.eachComponent("xAxis",u("x"),this),r.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,R(s.x,function(c,f){R(s.y,function(h,d){var v="x"+f+"y"+d,m=new C6e(v);m.master=i,m.model=t,i._coordsMap[v]=m,i._coordsList.push(m),m.addAxis(c),m.addAxis(h)})});function u(c){return function(f,h){if(vM(f,t)){var d=f.get("position");c==="x"?d!=="top"&&d!=="bottom"&&(d=o.bottom?"top":"bottom"):d!=="left"&&d!=="right"&&(d=o.left?"right":"left"),o[d]=!0;var v=new pre(c,w0(f),[0,0],f.get("type"),d),m=v.type==="category";v.onBand=m&&f.get("boundaryGap"),v.inverse=f.get("inverse"),f.axis=v,v.model=f,v.grid=a,v.index=h,a._axesList.push(v),s[c][h]=v,l[c]++}}}},e.prototype._updateScale=function(t,r){R(this._axesList,function(i){if(i.scale.setExtent(1/0,-1/0),i.type==="category"){var a=i.model.get("categorySortInfo");i.scale.setSortInfo(a)}}),t.eachSeries(function(i){if(H6e(i)){var a=WG(i),o=a.xAxisModel,s=a.yAxisModel;if(!vM(o,r)||!vM(s,r))return;var l=this.getCartesian(o.componentIndex,s.componentIndex),u=i.getData(),c=l.getAxis("x"),f=l.getAxis("y");n(u,c),n(u,f)}},this);function n(i,a){R(Dw(i,a.dim),function(o){a.scale.unionExtentFromData(i,o)})}},e.prototype.getTooltipAxes=function(t){var r=[],n=[];return R(this.getCartesians(),function(i){var a=t!=null&&t!=="auto"?i.getAxis(t):i.getBaseAxis(),o=i.getOtherAxis(a);He(r,a)<0&&r.push(a),He(n,o)<0&&n.push(o)}),{baseAxes:r,otherAxes:n}},e.create=function(t,r){var n=[];return t.eachComponent("grid",function(i,a){var o=new e(i,t,r);o.name="grid_"+a,o.resize(i,r,!0),i.coordinateSystem=o,n.push(o)}),t.eachSeries(function(i){_0({targetModel:i,coordSysType:"cartesian2d",coordSysProvider:a});function a(){var o=WG(i),s=o.xAxisModel,l=o.yAxisModel,u=s.getCoordSysModel(),c=u.coordinateSystem;return c.getCartesian(s.componentIndex,l.componentIndex)}}),n},e.dimensions=vO,e}();function vM(e,t){return e.getCoordSysModel()===t}function UG(e,t,r,n){r.getAxesOnZeroOf=function(){return a?[a]:[]};var i=e[t],a,o=r.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)ZG(i[l])&&(a=i[l]);else for(var u in i)if(i.hasOwnProperty(u)&&ZG(i[u])&&!n[c(i[u])]){a=i[u];break}a&&(n[c(a)]=!0);function c(f){return f.dim+"_"+f.index}}function ZG(e){return e&&e.type!=="category"&&e.type!=="time"&&$$e(e)}function X6e(e,t){var r=e.getExtent(),n=r[0]+r[1];e.toGlobalCoord=e.dim==="x"?function(i){return i+t}:function(i){return n-i+t},e.toLocalCoord=e.dim==="x"?function(i){return i-t}:function(i){return n-i+t}}function gO(e,t){R(e.x,function(r){return YG(r,t.x,t.width)}),R(e.y,function(r){return YG(r,t.y,t.height)})}function YG(e,t,r){var n=[0,r],i=e.inverse?1:0;e.setExtent(n[i],n[1-i]),X6e(e,t)}var mO;function q6e(e){mO=e}function XG(e,t,r,n,i,a,o){Are(n,i,Qa.estimate,t,!1,o);var s=[0,0,0,0];u(0),u(1),c(n,0,NaN),c(n,1,NaN);var l=Au(s,function(h){return h>0})==null;return pf(n,s,!0,!0,r),gO(i,n),l;function u(h){R(i[Ge[h]],function(d){if(Oy(d.model)){var v=a.ensureRecord(d.model),m=v.labelInfoList;if(m)for(var y=0;y<m.length;y++){var x=m[y],_=d.scale.normalize(lv(x.label).tickValue);_=h===1?1-_:_,c(x.rect,h,_),c(x.rect,1-h,NaN)}var b=v.nameLayout;if(b){var _=av(v.nameLocation)?.5:NaN;c(b.rect,h,_),c(b.rect,1-h,NaN)}}})}function c(h,d,v){var m=e[Ge[d]]-h[Ge[d]],y=h[Ar[d]]+h[Ge[d]]-(e[Ar[d]]+e[Ge[d]]);m=f(m,1-v),y=f(y,v);var x=HG[d][0],_=HG[d][1];s[x]=pr(s[x],m),s[_]=pr(s[_],y)}function f(h,d){return h>0&&!xn(d)&&d>1e-4&&(h/=d),h}}function K6e(e,t,r,n,i){var a=new xre(Q6e);return R(r,function(o){return R(o,function(s){if(Oy(s.model)){var l=!n;s.axisBuilder=U6e(e,t,s.model,i,a,l)}})}),a}function Are(e,t,r,n,i,a){var o=r===Qa.determine;R(t,function(u){return R(u,function(c){Oy(c.model)&&(Z6e(c.axisBuilder,e,c.model),c.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[Ge[1-u]]=e[Ar[u]]<=a.refContainer[Ar[u]]*.5?0:1-u===1?2:1}R(t,function(u,c){return R(u,function(f){Oy(f.model)&&((n==="all"||o)&&f.axisBuilder.build({axisName:!0},{nameMarginLevel:s[c]}),o&&f.axisBuilder.build({axisLine:!0}))})})}function J6e(e,t,r){var n,i=e.get("outerBoundsMode",!0);i==="same"?n=t.clone():(i==null||i==="auto")&&(n=$t(e.get("outerBounds",!0)||hre,r.refContainer));var a=e.get("outerBoundsContain",!0),o;a==null||a==="auto"||He(["all","axisLabel"],a)<0?o="all":o=a;var s=[vw(Ae(e.get("outerBoundsClampWidth",!0),Vw[0]),t.width),vw(Ae(e.get("outerBoundsClampHeight",!0),Vw[1]),t.height)];return{outerBoundsRect:n,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var Q6e=function(e,t,r,n,i,a){var o=r.axis.dim==="x"?"y":"x";_re(e,t,r,n,i,a),av(e.nameLocation)||R(t.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&wre(s.labelInfoList,s.dirVec,n,i)})};function eGe(e,t){var r={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return tGe(r,e,t),r.seriesInvolved&&nGe(r,e),r}function tGe(e,t,r){var n=t.getComponent("tooltip"),i=t.getComponent("axisPointer"),a=i.get("link",!0)||[],o=[];R(r.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=jy(s.model),u=e.coordSysAxesInfo[l]={};e.coordSysMap[l]=s;var c=s.model,f=c.getModel("tooltip",n);if(R(s.getAxes(),We(m,!1,null)),s.getTooltipAxes&&n&&f.get("show")){var h=f.get("trigger")==="axis",d=f.get(["axisPointer","type"])==="cross",v=s.getTooltipAxes(f.get(["axisPointer","axis"]));(h||d)&&R(v.baseAxes,We(m,d?"cross":!0,h)),d&&R(v.otherAxes,We(m,"cross",!1))}function m(y,x,_){var b=_.model.getModel("axisPointer",i),S=b.get("show");if(!(!S||S==="auto"&&!y&&!yO(b))){x==null&&(x=b.get("triggerTooltip")),b=y?rGe(_,f,i,t,y,x):b;var T=b.get("snap"),C=b.get("triggerEmphasis"),A=jy(_.model),P=x||T||_.type==="category",I=e.axesInfo[A]={key:A,axis:_,coordSys:s,axisPointerModel:b,triggerTooltip:x,triggerEmphasis:C,involveSeries:P,snap:T,useHandle:yO(b),seriesModels:[],linkGroup:null};u[A]=I,e.seriesInvolved=e.seriesInvolved||P;var k=iGe(a,_);if(k!=null){var E=o[k]||(o[k]={axesInfo:{}});E.axesInfo[A]=I,E.mapper=a[k].mapper,I.linkGroup=E}}}})}function rGe(e,t,r,n,i,a){var o=t.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};R(s,function(h){l[h]=Le(o.get(h))}),l.snap=e.type!=="category"&&!!a,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),i==="cross"){var c=o.get(["label","show"]);if(u.show=c??!0,!a){var f=l.lineStyle=o.get("crossStyle");f&&Oe(u,f.textStyle)}}return e.model.getModel("axisPointer",new rt(l,r,n))}function nGe(e,t){t.eachSeries(function(r){var n=r.coordinateSystem,i=r.get(["tooltip","trigger"],!0),a=r.get(["tooltip","show"],!0);!n||!n.model||i==="none"||i===!1||i==="item"||a===!1||r.get(["axisPointer","show"],!0)===!1||R(e.coordSysAxesInfo[jy(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(r),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=r.getData().count())})})}function iGe(e,t){for(var r=t.model,n=t.dim,i=0;i<e.length;i++){var a=e[i]||{};if(pM(a[n+"AxisId"],r.id)||pM(a[n+"AxisIndex"],r.componentIndex)||pM(a[n+"AxisName"],r.name))return i}}function pM(e,t){return e==="all"||oe(e)&&He(e,t)>=0||e===t}function aGe(e){var t=Xj(e);if(t){var r=t.axisPointerModel,n=t.axis.scale,i=r.option,a=r.get("status"),o=r.get("value");o!=null&&(o=n.parse(o));var s=yO(r);a==null&&(i.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),i.value=o,s&&(i.status=t.axis.scale.isBlank()?"hide":"show")}}function Xj(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[jy(e)]}function oGe(e){var t=Xj(e);return t&&t.axisPointerModel}function yO(e){return!!e.get(["handle","show"])}function jy(e){return e.type+"||"+e.id}var qG={},jf=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i,a){this.axisPointerClass&&aGe(r),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(r,i,!0)},t.prototype.updateAxisPointer=function(r,n,i,a){this._doUpdateAxisPointerClass(r,i,!1)},t.prototype.remove=function(r,n){var i=this._axisPointer;i&&i.remove(n)},t.prototype.dispose=function(r,n){this._disposeAxisPointer(n),e.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(r,n,i){var a=t.getAxisPointerClass(this.axisPointerClass);if(a){var o=oGe(r);o?(this._axisPointer||(this._axisPointer=new a)).render(r,o,n,i):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(r){this._axisPointer&&this._axisPointer.dispose(r),this._axisPointer=null},t.registerAxisPointerClass=function(r,n){qG[r]=n},t.getAxisPointerClass=function(r){return r&&qG[r]},t.type="axis",t}(It),xO=et();function Mre(e,t,r,n){var i=r.axis;if(!i.scale.isBlank()){var a=r.getModel("splitArea"),o=a.getModel("areaStyle"),s=o.get("color"),l=n.coordinateSystem.getRect(),u=i.getTicksCoords({tickModel:a,clamp:!0,breakTicks:"none",pruneByBreak:"preserve_extent_bound"});if(u.length){var c=s.length,f=xO(e).splitAreaColors,h=Ce(),d=0;if(f)for(var v=0;v<u.length;v++){var m=f.get(u[v].tickValue);if(m!=null){d=(m+(c-1)*v)%c;break}}var y=i.toGlobalCoord(u[0].coord),x=o.getAreaStyle();s=oe(s)?s:[s];for(var v=1;v<u.length;v++){var _=i.toGlobalCoord(u[v].coord),b=void 0,S=void 0,T=void 0,C=void 0;i.isHorizontal()?(b=y,S=l.y,T=_-b,C=l.height,y=b+T):(b=l.x,S=y,T=l.width,C=_-S,y=S+C);var A=u[v-1].tickValue;A!=null&&h.set(A,d),t.add(new qe({anid:A!=null?"area_"+A:null,shape:{x:b,y:S,width:T,height:C},style:Oe({fill:s[d]},x),autoBatch:!0,silent:!0})),d=(d+1)%c}xO(e).splitAreaColors=h}}}function Pre(e){xO(e).splitAreaColors=null}var sGe=["splitArea","splitLine","minorSplitLine","breakArea"],kre=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.axisPointerClass="CartesianAxisPointer",r}return t.prototype.render=function(r,n,i,a){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Ie,this.group.add(this._axisGroup),!!Oy(r)){this._axisGroup.add(r.axis.axisBuilder.group),R(sGe,function(l){r.get([l,"show"])&&lGe[l](this,this._axisGroup,r,r.getCoordSysModel(),i)},this);var s=a&&a.type==="changeAxisOrder"&&a.isInitSort;s||y0(o,this._axisGroup,r),e.prototype.render.call(this,r,n,i,a)}},t.prototype.remove=function(){Pre(this)},t.type="cartesianAxis",t}(jf),lGe={splitLine:function(e,t,r,n,i){var a=r.axis;if(!a.scale.isBlank()){var o=r.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=o.get("showMinLine")!==!1,c=o.get("showMaxLine")!==!1;l=oe(l)?l:[l];for(var f=n.coordinateSystem.getRect(),h=a.isHorizontal(),d=0,v=a.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),m=[],y=[],x=s.getLineStyle(),_=0;_<v.length;_++){var b=a.toGlobalCoord(v[_].coord);if(!(_===0&&!u||_===v.length-1&&!c)){var S=v[_].tickValue;h?(m[0]=b,m[1]=f.y,y[0]=b,y[1]=f.y+f.height):(m[0]=f.x,m[1]=b,y[0]=f.x+f.width,y[1]=b);var T=d++%l.length,C=new mr({anid:S!=null?"line_"+S:null,autoBatch:!0,shape:{x1:m[0],y1:m[1],x2:y[0],y2:y[1]},style:Oe({stroke:l[T]},x),silent:!0});tv(C.shape,x.lineWidth),t.add(C)}}}},minorSplitLine:function(e,t,r,n,i){var a=r.axis,o=r.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=n.coordinateSystem.getRect(),u=a.isHorizontal(),c=a.getMinorTicksCoords();if(c.length)for(var f=[],h=[],d=s.getLineStyle(),v=0;v<c.length;v++)for(var m=0;m<c[v].length;m++){var y=a.toGlobalCoord(c[v][m].coord);u?(f[0]=y,f[1]=l.y,h[0]=y,h[1]=l.y+l.height):(f[0]=l.x,f[1]=y,h[0]=l.x+l.width,h[1]=y);var x=new mr({anid:"minor_line_"+c[v][m].tickValue,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:h[0],y2:h[1]},style:d,silent:!0});tv(x.shape,d.lineWidth),t.add(x)}},splitArea:function(e,t,r,n,i){Mre(e,t,r,n)},breakArea:function(e,t,r,n,i){var a=M0(),o=r.axis.scale;a&&o.type!=="ordinal"&&a.rectCoordBuildBreakAxis(t,e,r,n.coordinateSystem.getRect(),i)}},Lre=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="xAxis",t}(kre),uGe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=Lre.type,r}return t.type="yAxis",t}(kre),cGe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="grid",r}return t.prototype.render=function(r,n){this.group.removeAll(),r.get("show")&&this.group.add(new qe({shape:r.coordinateSystem.getRect(),style:Oe({fill:r.get("backgroundColor")},r.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t}(It),KG={offset:0};function Ire(e){e.registerComponentView(cGe),e.registerComponentModel(y6e),e.registerCoordinateSystem("cartesian2d",Y6e),sv(e,"x",hO,KG),sv(e,"y",hO,KG),e.registerComponentView(Lre),e.registerComponentView(uGe),e.registerPreprocessor(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})}function fGe(e,t){var r=e.coordinateSystem,n=r&&r.type,i=r&&r.getBaseAxis&&r.getBaseAxis(),a=i&&i.scale&&i.scale.type,o=n==="cartesian2d"&&a==="ordinal"||n==="single",s=t.model.get("jitter")>0;return o&&s}var hGe=et();function JG(e,t,r,n){if(e instanceof pre){var i=e.scale.type;if(i!=="category"&&i!=="ordinal")return r}var a=e.model,o=a.get("jitter"),s=a.get("jitterOverlap"),l=a.get("jitterMargin")||0,u=e.scale.type==="ordinal"?e.getBandWidth():null;return o>0?s?Ore(r,o,u,n):dGe(e,t,r,n,o,l):r}function Ore(e,t,r,n){if(r===null)return e+(Math.random()-.5)*t;var i=r-n*2,a=Math.min(Math.max(0,t),i);return e+(Math.random()-.5)*a}function dGe(e,t,r,n,i,a){var o=hGe(e);o.items||(o.items=[]);var s=o.items,l=QG(s,t,r,n,i,a,1),u=QG(s,t,r,n,i,a,-1),c=Math.abs(l-r)<Math.abs(u-r)?l:u,f=e.scale.type==="ordinal"?e.getBandWidth():null,h=Math.abs(c-r);return h>i/2||f&&h>f/2-n?Ore(r,i,f,n):(s.push({fixedCoord:t,floatCoord:c,r:n}),c)}function QG(e,t,r,n,i,a,o){for(var s=r,l=0;l<e.length;l++){var u=e[l],c=t-u.fixedCoord,f=s-u.floatCoord,h=c*c+f*f,d=n+u.r+a;if(h<d*d){var v=u.floatCoord+Math.sqrt(d*d-c*c)*o;if(Math.abs(v-r)>i/2)return Number.MAX_VALUE;if(o===1&&v>s||o===-1&&v<s){s=v,l=-1;continue}}}return s}function vGe(e){e.eachSeriesByType("scatter",function(t){var r=t.coordinateSystem;if(r&&(r.type==="cartesian2d"||r.type==="single")){var n=r.getBaseAxis?r.getBaseAxis():null,i=n&&fGe(t,n);if(i){var a=t.getData();a.each(function(o){var s=n.dim,l=n.orient,u=l==="horizontal"&&n.type!=="category"||l==="vertical"&&n.type==="category",c=a.getItemLayout(o),f=a.getItemVisual(o,"symbolSize"),h=f instanceof Array?(f[1]+f[0])/2:f;if(s==="y"||s==="single"&&u){var d=JG(n,c[0],c[1],h/2);a.setItemLayout(o,[c[0],d])}else if(s==="x"||s==="single"&&!u){var d=JG(n,c[1],c[0],h/2);a.setItemLayout(o,[d,c[1]])}})}}})}function pGe(e){Ye(Ire),e.registerSeriesModel(d6e),e.registerChartView(m6e),e.registerLayout(A0("scatter"))}function gGe(e){e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,vGe)}function mGe(e){e.eachSeriesByType("radar",function(t){var r=t.getData(),n=[],i=t.coordinateSystem;if(i){var a=i.getIndicatorAxes();R(a,function(o,s){r.each(r.mapDimension(a[s].dim),function(l,u){n[u]=n[u]||[];var c=i.dataToPoint(l,s);n[u][s]=eW(c)?c:tW(i)})}),r.each(function(o){var s=Au(n[o],function(l){return eW(l)})||tW(i);n[o].push(s.slice()),r.setItemLayout(o,n[o])})}})}function eW(e){return!isNaN(e[0])&&!isNaN(e[1])}function tW(e){return[e.cx,e.cy]}function yGe(e){var t=e.polar;if(t){oe(t)||(t=[t]);var r=[];R(t,function(n,i){n.indicator?(n.type&&!n.shape&&(n.shape=n.type),e.radar=e.radar||[],oe(e.radar)||(e.radar=[e.radar]),e.radar.push(n)):r.push(n)}),e.polar=r}R(e.series,function(n){n&&n.type==="radar"&&n.polarIndex&&(n.radarIndex=n.polarIndex)})}var xGe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=r.coordinateSystem,o=this.group,s=r.getData(),l=this._data;function u(h,d){var v=h.getItemVisual(d,"symbol")||"circle";if(v!=="none"){var m=qv(h.getItemVisual(d,"symbolSize")),y=xr(v,-1,-1,2,2),x=h.getItemVisual(d,"symbolRotate")||0;return y.attr({style:{strokeNoScale:!0},z2:100,scaleX:m[0]/2,scaleY:m[1]/2,rotation:x*Math.PI/180||0}),y}}function c(h,d,v,m,y,x){v.removeAll();for(var _=0;_<d.length-1;_++){var b=u(m,y);b&&(b.__dimIdx=_,h[_]?(b.setPosition(h[_]),Of[x?"initProps":"updateProps"](b,{x:d[_][0],y:d[_][1]},r,y)):b.setPosition(d[_]),v.add(b))}}function f(h){return le(h,function(d){return[a.cx,a.cy]})}s.diff(l).add(function(h){var d=s.getItemLayout(h);if(d){var v=new Tn,m=new ln,y={shape:{points:d}};v.shape.points=f(d),m.shape.points=f(d),jt(v,y,r,h),jt(m,y,r,h);var x=new Ie,_=new Ie;x.add(m),x.add(v),x.add(_),c(m.shape.points,d,_,s,h,!0),s.setItemGraphicEl(h,x)}}).update(function(h,d){var v=l.getItemGraphicEl(d),m=v.childAt(0),y=v.childAt(1),x=v.childAt(2),_={shape:{points:s.getItemLayout(h)}};_.shape.points&&(c(m.shape.points,_.shape.points,x,s,h,!1),ma(y),ma(m),ut(m,_,r),ut(y,_,r),s.setItemGraphicEl(h,v))}).remove(function(h){o.remove(l.getItemGraphicEl(h))}).execute(),s.eachItemGraphicEl(function(h,d){var v=s.getItemModel(d),m=h.childAt(0),y=h.childAt(1),x=h.childAt(2),_=s.getItemVisual(d,"style"),b=_.fill;o.add(h),m.useStyle(Oe(v.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:b})),Rr(m,v,"lineStyle"),Rr(y,v,"areaStyle");var S=v.getModel("areaStyle"),T=S.isEmpty()&&S.parentModel.isEmpty();y.ignore=T,R(["emphasis","select","blur"],function(A){var P=v.getModel([A,"areaStyle"]),I=P.isEmpty()&&P.parentModel.isEmpty();y.ensureState(A).ignore=I&&T;var k=v.getModel([A,"lineStyle"]).getLineStyle();m.ensureState(A).style=k;var E=P.getAreaStyle();y.ensureState(A).style=E;var D=v.getModel([A,"itemStyle"]).getItemStyle();x.eachChild(function(N){N.ensureState(A).style=Le(D)})}),y.useStyle(Oe(v.getModel("areaStyle").getAreaStyle(),{fill:b,opacity:.7,decal:_.decal}));var C=v.getModel("emphasis");x.eachChild(function(A){if(A instanceof Jr){var P=A.style;A.useStyle(ae({image:P.image,x:P.x,y:P.y,width:P.width,height:P.height},_))}else A.useStyle(_),A.setColor(b),A.style.strokeNoScale=!0;var I=s.getStore().get(s.getDimensionIndex(A.__dimIdx),d);(I==null||isNaN(I))&&(I=""),qr(A,Br(v),{labelFetcher:s.hostModel,labelDataIndex:d,labelDimIndex:A.__dimIdx,defaultText:I,inheritColor:b,defaultOpacity:_.opacity})}),Gt(h,C.get("focus"),C.get("blurScope"),C.get("disabled"))}),this._data=s},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.type="radar",t}(bt),_Ge=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new rp(_e(this.getData,this),_e(this.getRawData,this))},t.prototype.getInitialData=function(r,n){return tp(this,{generateCoord:"indicator_",generateCoordCount:1/0})},t.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=this.coordinateSystem,s=o.getIndicatorAxes(),l=this.getData().getName(r),u=l===""?this.name:l,c=hee(this,r);return Mr("section",{header:u,sortBlocks:!0,blocks:le(s,function(f){var h=a.get(a.mapDimension(f.dim),r);return Mr("nameValue",{markerType:"subItem",markerColor:c,name:f.name,value:h,sortParam:h})})})},t.prototype.getTooltipPosition=function(r){if(r!=null){for(var n=this.getData(),i=this.coordinateSystem,a=n.getValues(le(i.dimensions,function(u){return n.mapDimension(u)}),r),o=0,s=a.length;o<s;o++)if(!isNaN(a[o])){var l=i.getIndicatorAxes();return i.coordToPoint(l[o].dataToCoord(a[o]),o)}}},t.type="series.radar",t.dependencies=["radar"],t.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},t}(Ct),Kp=vre.value;function __(e,t){return Oe({show:t},e)}var bGe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(){var r=this.get("boundaryGap"),n=this.get("splitNumber"),i=this.get("scale"),a=this.get("axisLine"),o=this.get("axisTick"),s=this.get("axisLabel"),l=this.get("axisName"),u=this.get(["axisName","show"]),c=this.get(["axisName","formatter"]),f=this.get("axisNameGap"),h=this.get("triggerEvent"),d=le(this.get("indicator")||[],function(v){v.max!=null&&v.max>0&&!v.min?v.min=0:v.min!=null&&v.min<0&&!v.max&&(v.max=0);var m=l;v.color!=null&&(m=Oe({color:v.color},l));var y=Ue(Le(v),{boundaryGap:r,splitNumber:n,scale:i,axisLine:a,axisTick:o,axisLabel:s,name:v.text,showName:u,nameLocation:"end",nameGap:f,nameTextStyle:m,triggerEvent:h},!1);if(ye(c)){var x=y.name;y.name=c.replace("{value}",x??"")}else ke(c)&&(y.name=c(y.name,y));var _=new rt(y,null,this.ecModel);return cr(_,Qv.prototype),_.mainType="radar",_.componentIndex=this.componentIndex,_},this);this._indicatorModels=d},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type="radar",t.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,axisName:{show:!0,color:J.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:Ue({lineStyle:{color:J.color.neutral20}},Kp.axisLine),axisLabel:__(Kp.axisLabel,!1),axisTick:__(Kp.axisTick,!1),splitLine:__(Kp.splitLine,!0),splitArea:__(Kp.splitArea,!0),indicator:[]},t}(Qe),wGe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=this.group;a.removeAll(),this._buildAxes(r,i),this._buildSplitLineAndArea(r)},t.prototype._buildAxes=function(r,n){var i=r.coordinateSystem,a=i.getIndicatorAxes(),o=le(a,function(s){var l=s.model.get("showName")?s.name:"",u=new Zn(s.model,n,{axisName:l,position:[i.cx,i.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});R(o,function(s){s.build(),this.group.add(s.group)},this)},t.prototype._buildSplitLineAndArea=function(r){var n=r.coordinateSystem,i=n.getIndicatorAxes();if(!i.length)return;var a=r.get("shape"),o=r.getModel("splitLine"),s=r.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),c=o.get("show"),f=s.get("show"),h=l.get("color"),d=u.get("color"),v=oe(h)?h:[h],m=oe(d)?d:[d],y=[],x=[];function _(V,F,$){var B=$%F.length;return V[B]=V[B]||[],B}if(a==="circle")for(var b=i[0].getTicksCoords(),S=n.cx,T=n.cy,C=0;C<b.length;C++){if(c){var A=_(y,v,C);y[A].push(new Qo({shape:{cx:S,cy:T,r:b[C].coord}}))}if(f&&C<b.length-1){var A=_(x,m,C);x[A].push(new $v({shape:{cx:S,cy:T,r0:b[C].coord,r:b[C+1].coord}}))}}else for(var P,I=le(i,function(V,F){var $=V.getTicksCoords();return P=P==null?$.length-1:Math.min($.length-1,P),le($,function(B){return n.coordToPoint(B.coord,F)})}),k=[],C=0;C<=P;C++){for(var E=[],D=0;D<i.length;D++)E.push(I[D][C]);if(E[0]&&E.push(E[0].slice()),c){var A=_(y,v,C);y[A].push(new ln({shape:{points:E}}))}if(f&&k){var A=_(x,m,C-1);x[A].push(new Tn({shape:{points:E.concat(k)}}))}k=E.slice().reverse()}var N=l.getLineStyle(),z=u.getAreaStyle();R(x,function(V,F){this.group.add(Ti(V,{style:Oe({stroke:"none",fill:m[F%m.length]},z),silent:!0}))},this),R(y,function(V,F){this.group.add(Ti(V,{style:Oe({fill:"none",stroke:v[F%v.length]},N),silent:!0}))},this)},t.type="radar",t}(It),SGe=function(e){K(t,e);function t(r,n,i){var a=e.call(this,r,n,i)||this;return a.type="value",a.angle=0,a.name="",a}return t}(wa),TGe=function(){function e(t,r,n){this.dimensions=[],this._model=t,this._indicatorAxes=le(t.getIndicatorModels(),function(i,a){var o="indicator_"+a,s=new SGe(o,new qs);return s.name=i.get("name"),s.model=i,i.axis=s,this.dimensions.push(o),s},this),this.resize(t,n)}return e.prototype.getIndicatorAxes=function(){return this._indicatorAxes},e.prototype.dataToPoint=function(t,r){var n=this._indicatorAxes[r];return this.coordToPoint(n.dataToCoord(t),r)},e.prototype.coordToPoint=function(t,r){var n=this._indicatorAxes[r],i=n.angle,a=this.cx+t*Math.cos(i),o=this.cy-t*Math.sin(i);return[a,o]},e.prototype.pointToData=function(t){var r=t[0]-this.cx,n=t[1]-this.cy,i=Math.sqrt(r*r+n*n);r/=i,n/=i;for(var a=Math.atan2(-n,r),o=1/0,s,l=-1,u=0;u<this._indicatorAxes.length;u++){var c=this._indicatorAxes[u],f=Math.abs(a-c.angle);f<o&&(s=c,l=u,o=f)}return[l,+(s&&s.coordToData(i))]},e.prototype.resize=function(t,r){var n=zr(t,r).refContainer,i=t.get("center"),a=Math.min(n.width,n.height)/2;this.cx=me(i[0],n.width)+n.x,this.cy=me(i[1],n.height)+n.y,this.startAngle=t.get("startAngle")*Math.PI/180;var o=t.get("radius");(ye(o)||st(o))&&(o=[0,o]),this.r0=me(o[0],a),this.r=me(o[1],a),R(this._indicatorAxes,function(s,l){s.setExtent(this.r0,this.r);var u=this.startAngle+l*Math.PI*2/this._indicatorAxes.length;u=Math.atan2(Math.sin(u),Math.cos(u)),s.angle=u},this)},e.prototype.update=function(t,r){var n=this._indicatorAxes,i=this._model;R(n,function(s){s.scale.setExtent(1/0,-1/0)}),t.eachSeriesByType("radar",function(s,l){if(!(s.get("coordinateSystem")!=="radar"||t.getComponent("radar",s.get("radarIndex"))!==i)){var u=s.getData();R(n,function(c){c.scale.unionExtentFromData(u,u.mapDimension(c.dim))})}},this);var a=i.get("splitNumber"),o=new qs;o.setExtent(0,a),o.setInterval(1),R(n,function(s,l){Cre(s.scale,s.model,o)})},e.prototype.convertToPixel=function(t,r,n){return console.warn("Not implemented."),null},e.prototype.convertFromPixel=function(t,r,n){return console.warn("Not implemented."),null},e.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},e.create=function(t,r){var n=[];return t.eachComponent("radar",function(i){var a=new e(i,t,r);n.push(a),i.coordinateSystem=a}),t.eachSeriesByType("radar",function(i){i.get("coordinateSystem")==="radar"&&(i.coordinateSystem=n[i.get("radarIndex")||0])}),n},e.dimensions=[],e}();function CGe(e){e.registerCoordinateSystem("radar",TGe),e.registerComponentModel(bGe),e.registerComponentView(wGe),e.registerVisual({seriesType:"radar",reset:function(t){var r=t.getData();r.each(function(n){r.setItemVisual(n,"legendIcon","roundRect")}),r.setVisual("legendIcon","roundRect")}})}function AGe(e){Ye(CGe),e.registerChartView(xGe),e.registerSeriesModel(_Ge),e.registerLayout(mGe),e.registerProcessor(ep("radar")),e.registerPreprocessor(yGe)}var qj=et();function MGe(e,t,r){qj(e)[t]=r}function PGe(e,t,r){var n=qj(e),i=n[t];i===r&&(n[t]=null)}function rW(e,t){return!!qj(e)[t]}ro({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},sr);var kGe={axisPointer:1,tooltip:1,brush:1};function Ere(e,t,r){var n=t.getComponentByElement(e.topTarget);if(!n||n===r||kGe.hasOwnProperty(n.mainType))return!1;var i=n.coordinateSystem;if(!i||i.model===r)return!1;var a=gf(n),o=gf(r);return!((a.zlevel-o.zlevel||a.z-o.z)<=0)}var Rf=function(e){K(t,e);function t(r){var n=e.call(this)||this;n._zr=r;var i=_e(n._mousedownHandler,n),a=_e(n._mousemoveHandler,n),o=_e(n._mouseupHandler,n),s=_e(n._mousewheelHandler,n),l=_e(n._pinchHandler,n);return n.enable=function(u,c){var f=c.zInfo,h=gf(f.component),d=h.z,v=h.zlevel,m={component:f.component,z:d,zlevel:v,z2:Ae(f.z2,-1/0)},y=ae({},c.triggerInfo);this._opt=Oe(ae({},c),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:m,triggerInfo:y}),u==null&&(u=!0),(!this._enabled||this._controlType!==u)&&(this._enabled=!0,this.disable(),(u===!0||u==="move"||u==="pan")&&(Qp(r,"mousedown",i,m),Qp(r,"mousemove",a,m),Qp(r,"mouseup",o,m)),(u===!0||u==="scale"||u==="zoom")&&(Qp(r,"mousewheel",s,m),Qp(r,"pinch",l,m)))},n.disable=function(){this._enabled=!1,eg(r,"mousedown",i),eg(r,"mousemove",a),eg(r,"mouseup",o),eg(r,"mousewheel",s),eg(r,"pinch",l)},n}return t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype._checkPointer=function(r,n,i){var a=this._opt,o=a.zInfoParsed;if(Ere(r,a.api,o.component))return!1;var s=a.triggerInfo,l=s.roamTrigger,u=!1;return l==="global"&&(u=!0),u||(u=s.isInSelf(r,n,i)),u&&s.isInClip&&!s.isInClip(r,n,i)&&(u=!1),u},t.prototype._decideCursorStyle=function(r,n,i,a){var o=r.target;if(!o&&this._checkPointer(r,n,i))return"grab";if(a)return o&&o.cursor||"default"},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(r){if(!(SF(r)||Jp(r))){for(var n=r.target;n;){if(n.draggable)return;n=n.__hostTarget||n.parent}var i=r.offsetX,a=r.offsetY;this._checkPointer(r,i,a)&&(this._x=i,this._y=a,this._dragging=!0)}},t.prototype._mousemoveHandler=function(r){var n=this._zr;if(!(r.gestureEvent==="pinch"||rW(n,"globalPan")||Jp(r))){var i=r.offsetX,a=r.offsetY;if(!this._dragging||!yb("moveOnMouseMove",r,this._opt)){var o=this._decideCursorStyle(r,i,a,!1);o&&n.setCursorStyle(o);return}n.setCursorStyle("grabbing");var s=this._x,l=this._y,u=i-s,c=a-l;this._x=i,this._y=a,this._opt.preventDefaultMouseMove&&Hs(r.event),r.__ecRoamConsumed=!0,nW(this,"pan","moveOnMouseMove",r,{dx:u,dy:c,oldX:s,oldY:l,newX:i,newY:a,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(r){if(!Jp(r)){var n=this._zr;if(!SF(r)){this._dragging=!1;var i=this._decideCursorStyle(r,r.offsetX,r.offsetY,!0);i&&n.setCursorStyle(i)}}},t.prototype._mousewheelHandler=function(r){if(!Jp(r)){var n=yb("zoomOnMouseWheel",r,this._opt),i=yb("moveOnMouseWheel",r,this._opt),a=r.wheelDelta,o=Math.abs(a),s=r.offsetX,l=r.offsetY;if(!(a===0||!n&&!i)){if(n){var u=o>3?1.4:o>1?1.2:1.1,c=a>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",r,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(i){var f=Math.abs(a),h=(a>0?1:-1)*(f>3?.4:f>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",r,{scrollDelta:h,originX:s,originY:l,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(r){if(!(rW(this._zr,"globalPan")||Jp(r))){var n=r.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,r,{scale:n,originX:r.pinchX,originY:r.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(r,n,i,a,o){r._checkPointer(a,o.originX,o.originY)&&(Hs(a.event),a.__ecRoamConsumed=!0,nW(r,n,i,a,o))},t}(_a);function Jp(e){return e.__ecRoamConsumed}var LGe=et();function nC(e){var t=LGe(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function Qp(e,t,r,n){for(var i=nC(e),a=i.roam,o=a[t]=a[t]||[],s=0;s<o.length;s++){var l=o[s].zInfoParsed;if((l.zlevel-n.zlevel||l.z-n.z||l.z2-n.z2)<=0)break}o.splice(s,0,{listener:r,zInfoParsed:n}),IGe(e,t)}function eg(e,t,r){for(var n=nC(e),i=n.roam[t]||[],a=0;a<i.length;a++)if(i[a].listener===r){i.splice(a,1),i.length||OGe(e,t);return}}function IGe(e,t){var r=nC(e);r.uniform[t]||e.on(t,r.uniform[t]=function(n){var i=r.roam[t];if(i)for(var a=0;a<i.length;a++)i[a].listener(n)})}function OGe(e,t){var r=nC(e),n=r.uniform;n[t]&&(e.off(t,n[t]),n[t]=null)}function nW(e,t,r,n,i){i.isAvailableBehavior=_e(yb,null,r,n),e.trigger(t,i)}function yb(e,t,r){var n=r[e];return!e||n&&(!ye(n)||t.event[n+"Key"])}function Kj(e,t,r){var n=e.target;n.x+=t,n.y+=r,n.dirty()}function Jj(e,t,r,n){var i=e.target,a=e.zoomLimit,o=e.zoom=e.zoom||1;o*=t,o=Qj(o,a);var s=o/e.zoom;e.zoom=o,Nre(i,r,n,s),i.dirty()}function Dre(e,t,r,n,i,a){var o=new je(0,0,0,0);n.enable(e.get("roam"),{api:t,zInfo:{component:e},triggerInfo:{roamTrigger:e.get("roamTrigger"),isInSelf:function(u,c,f){return o.copy(r.getBoundingRect()),o.applyTransform(r.getComputedTransform()),o.contain(c,f)},isInClip:function(u,c,f){return!a||a.contain(c,f)}}}),i.zoomLimit=e.get("scaleLimit");var s=e.coordinateSystem;i.zoom=s?s.getZoom():1;var l=e.subType+"Roam";n.off("pan").off("zoom").on("pan",function(u){Kj(i,u.dx,u.dy),t.dispatchAction({seriesId:e.id,type:l,dx:u.dx,dy:u.dy})}).on("zoom",function(u){Jj(i,u.scale,u.originX,u.originY),t.dispatchAction({seriesId:e.id,type:l,zoom:u.scale,originX:u.originX,originY:u.originY}),t.updateLabelLayout()})}function iW(e,t){return e.pointToProjected?e.pointToProjected(t):e.pointToData(t)}function iC(e,t,r){var n=e.getZoom(),i=e.getCenter(),a=t.zoom,o=e.projectedToPoint?e.projectedToPoint(i):e.dataToPoint(i);return t.dx!=null&&t.dy!=null&&(o[0]-=t.dx,o[1]-=t.dy,e.setCenter(iW(e,o))),a!=null&&(a=Qj(n*a,r)/n,Nre(e,t.originX,t.originY,a),e.updateTransform(),e.setCenter(iW(e,o)),e.setZoom(a*n)),{center:e.getCenter(),zoom:e.getZoom()}}function Nre(e,t,r,n){e.x-=(t-e.x)*(n-1),e.y-=(r-e.y)*(n-1),e.scaleX*=n,e.scaleY*=n}function Qj(e,t){if(t){var r=t.min||0,n=t.max||1/0;e=Math.max(Math.min(n,e),r)}return e}function jre(e){if(ye(e)){var t=new DOMParser;e=t.parseFromString(e,"text/xml")}var r=e;for(r.nodeType===9&&(r=r.firstChild);r.nodeName.toLowerCase()!=="svg"||r.nodeType!==1;)r=r.nextSibling;return r}var gM,Ww={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},aW=at(Ww),Hw={"alignment-baseline":"textBaseline","stop-color":"stopColor"},oW=at(Hw),EGe=function(){function e(){this._defs={},this._root=null}return e.prototype.parse=function(t,r){r=r||{};var n=jre(t);this._defsUsePending=[];var i=new Ie;this._root=i;var a=[],o=n.getAttribute("viewBox")||"",s=parseFloat(n.getAttribute("width")||r.width),l=parseFloat(n.getAttribute("height")||r.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),pi(n,i,null,!0,!1);for(var u=n.firstChild;u;)this._parseNode(u,i,a,null,!1,!1),u=u.nextSibling;jGe(this._defs,this._defsUsePending),this._defsUsePending=[];var c,f;if(o){var h=aC(o);h.length>=4&&(c={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(c&&s!=null&&l!=null&&(f=Bre(c,{x:0,y:0,width:s,height:l}),!r.ignoreViewBox)){var d=i;i=new Ie,i.add(d),d.scaleX=d.scaleY=f.scale,d.x=f.x,d.y=f.y}return!r.ignoreRootClip&&s!=null&&l!=null&&i.setClipPath(new qe({shape:{x:0,y:0,width:s,height:l}})),{root:i,width:s,height:l,viewBoxRect:c,viewBoxTransform:f,named:a}},e.prototype._parseNode=function(t,r,n,i,a,o){var s=t.nodeName.toLowerCase(),l,u=i;if(s==="defs"&&(a=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=r;else{if(!a){var c=gM[s];if(c&&Se(gM,s)){l=c.call(this,t,r);var f=t.getAttribute("name");if(f){var h={name:f,namedFrom:null,svgNodeTagLower:s,el:l};n.push(h),s==="g"&&(u=h)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:l});r.add(l)}}var d=sW[s];if(d&&Se(sW,s)){var v=d.call(this,t),m=t.getAttribute("id");m&&(this._defs[m]=v)}}if(l&&l.isGroup)for(var y=t.firstChild;y;)y.nodeType===1?this._parseNode(y,l,n,u,a,o):y.nodeType===3&&o&&this._parseText(y,l),y=y.nextSibling},e.prototype._parseText=function(t,r){var n=new Qd({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Hi(r,n),pi(t,n,this._defsUsePending,!1,!1),DGe(n,r);var i=n.style,a=i.fontSize;a&&a<9&&(i.fontSize=9,n.scaleX*=a/9,n.scaleY*=a/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var s=n.getBoundingRect();return this._textX+=s.width,r.add(n),n},e.internalField=function(){gM={g:function(t,r){var n=new Ie;return Hi(r,n),pi(t,n,this._defsUsePending,!1,!1),n},rect:function(t,r){var n=new qe;return Hi(r,n),pi(t,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(t,r){var n=new Qo;return Hi(r,n),pi(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),n.silent=!0,n},line:function(t,r){var n=new mr;return Hi(r,n),pi(t,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(t,r){var n=new p0;return Hi(r,n),pi(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(t,r){var n=t.getAttribute("points"),i;n&&(i=cW(n));var a=new Tn({shape:{points:i||[]},silent:!0});return Hi(r,a),pi(t,a,this._defsUsePending,!1,!1),a},polyline:function(t,r){var n=t.getAttribute("points"),i;n&&(i=cW(n));var a=new ln({shape:{points:i||[]},silent:!0});return Hi(r,a),pi(t,a,this._defsUsePending,!1,!1),a},image:function(t,r){var n=new Jr;return Hi(r,n),pi(t,n,this._defsUsePending,!1,!1),n.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),n.silent=!0,n},text:function(t,r){var n=t.getAttribute("x")||"0",i=t.getAttribute("y")||"0",a=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(a),this._textY=parseFloat(i)+parseFloat(o);var s=new Ie;return Hi(r,s),pi(t,s,this._defsUsePending,!1,!0),s},tspan:function(t,r){var n=t.getAttribute("x"),i=t.getAttribute("y");n!=null&&(this._textX=parseFloat(n)),i!=null&&(this._textY=parseFloat(i));var a=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",s=new Ie;return Hi(r,s),pi(t,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(a),this._textY+=parseFloat(o),s},path:function(t,r){var n=t.getAttribute("d")||"",i=eQ(n);return Hi(r,i),pi(t,i,this._defsUsePending,!1,!1),i.silent=!0,i}}}(),e}(),sW={lineargradient:function(e){var t=parseInt(e.getAttribute("x1")||"0",10),r=parseInt(e.getAttribute("y1")||"0",10),n=parseInt(e.getAttribute("x2")||"10",10),i=parseInt(e.getAttribute("y2")||"0",10),a=new If(t,r,n,i);return lW(e,a),uW(e,a),a},radialgradient:function(e){var t=parseInt(e.getAttribute("cx")||"0",10),r=parseInt(e.getAttribute("cy")||"0",10),n=parseInt(e.getAttribute("r")||"0",10),i=new VN(t,r,n);return lW(e,i),uW(e,i),i}};function lW(e,t){var r=e.getAttribute("gradientUnits");r==="userSpaceOnUse"&&(t.global=!0)}function uW(e,t){for(var r=e.firstChild;r;){if(r.nodeType===1&&r.nodeName.toLocaleLowerCase()==="stop"){var n=r.getAttribute("offset"),i=void 0;n&&n.indexOf("%")>0?i=parseInt(n,10)/100:n?i=parseFloat(n):i=0;var a={};Rre(r,a,a);var o=a.stopColor||r.getAttribute("stop-color")||"#000000",s=a.stopOpacity||r.getAttribute("stop-opacity");if(s){var l=jn(o),u=l&&l[3];u&&(l[3]*=Ls(s),o=ua(l,"rgba"))}t.colorStops.push({offset:i,color:o})}r=r.nextSibling}}function Hi(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),Oe(t.__inheritedStyle,e.__inheritedStyle))}function cW(e){for(var t=aC(e),r=[],n=0;n<t.length;n+=2){var i=parseFloat(t[n]),a=parseFloat(t[n+1]);r.push([i,a])}return r}function pi(e,t,r,n,i){var a=t,o=a.__inheritedStyle=a.__inheritedStyle||{},s={};e.nodeType===1&&(zGe(e,t),Rre(e,o,s),n||$Ge(e,o,s)),a.style=a.style||{},o.fill!=null&&(a.style.fill=fW(a,"fill",o.fill,r)),o.stroke!=null&&(a.style.stroke=fW(a,"stroke",o.stroke,r)),R(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(l){o[l]!=null&&(a.style[l]=parseFloat(o[l]))}),R(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(l){o[l]!=null&&(a.style[l]=o[l])}),i&&(a.__selfStyle=s),o.lineDash&&(a.style.lineDash=le(aC(o.lineDash),function(l){return parseFloat(l)})),(o.visibility==="hidden"||o.visibility==="collapse")&&(a.invisible=!0),o.display==="none"&&(a.ignore=!0)}function DGe(e,t){var r=t.__selfStyle;if(r){var n=r.textBaseline,i=n;!n||n==="auto"||n==="baseline"?i="alphabetic":n==="before-edge"||n==="text-before-edge"?i="top":n==="after-edge"||n==="text-after-edge"?i="bottom":(n==="central"||n==="mathematical")&&(i="middle"),e.style.textBaseline=i}var a=t.__inheritedStyle;if(a){var o=a.textAlign,s=o;o&&(o==="middle"&&(s="center"),e.style.textAlign=s)}}var NGe=/^url\(\s*#(.*?)\)/;function fW(e,t,r,n){var i=r&&r.match(NGe);if(i){var a=Ai(i[1]);n.push([e,t,a]);return}return r==="none"&&(r=null),r}function jGe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n[0].style[n[1]]=e[n[2]]}}var RGe=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function aC(e){return e.match(RGe)||[]}var BGe=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,mM=Math.PI/180;function zGe(e,t){var r=e.getAttribute("transform");if(r){r=r.replace(/,/g," ");var n=[],i=null;r.replace(BGe,function(f,h,d){return n.push(h,d),""});for(var a=n.length-1;a>0;a-=2){var o=n[a],s=n[a-1],l=aC(o);switch(i=i||Yr(),s){case"translate":Ka(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":IT(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":rl(i,i,-parseFloat(l[0])*mM,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*mM);Wa(i,[1,0,u,1,0,0],i);break;case"skewY":var c=Math.tan(parseFloat(l[0])*mM);Wa(i,[1,c,0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5]);break}}t.setLocalTransform(i)}}var hW=/([^\s:;]+)\s*:\s*([^:;]+)/g;function Rre(e,t,r){var n=e.getAttribute("style");if(n){hW.lastIndex=0;for(var i;(i=hW.exec(n))!=null;){var a=i[1],o=Se(Ww,a)?Ww[a]:null;o&&(t[o]=i[2]);var s=Se(Hw,a)?Hw[a]:null;s&&(r[s]=i[2])}}}function $Ge(e,t,r){for(var n=0;n<aW.length;n++){var i=aW[n],a=e.getAttribute(i);a!=null&&(t[Ww[i]]=a)}for(var n=0;n<oW.length;n++){var i=oW[n],a=e.getAttribute(i);a!=null&&(r[Hw[i]]=a)}}function Bre(e,t){var r=t.width/e.width,n=t.height/e.height,i=Math.min(r,n);return{scale:i,x:-(e.x+e.width/2)*i+(t.x+t.width/2),y:-(e.y+e.height/2)*i+(t.y+t.height/2)}}function FGe(e,t){var r=new EGe;return r.parse(e,t)}var VGe=Ce(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),GGe=function(){function e(t,r){this.type="geoSVG",this._usedGraphicMap=Ce(),this._freedGraphics=[],this._mapName=t,this._parsedXML=jre(r)}return e.prototype.load=function(){var t=this._firstGraphic;if(!t){t=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(t),this._boundingRect=this._firstGraphic.boundingRect.clone();var r=HGe(t.named),n=r.regions,i=r.regionsMap;this._regions=n,this._regionsMap=i}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},e.prototype._buildGraphic=function(t){var r,n;try{r=t&&FGe(t,{ignoreViewBox:!0,ignoreRootClip:!0})||{},n=r.root,wn(n!=null)}catch(y){throw new Error(`Invalid svg format
`+y.message)}var i=new Ie;i.add(n),i.isGeoSVGGraphicRoot=!0;var a=r.width,o=r.height,s=r.viewBoxRect,l=this._boundingRect;if(!l){var u=void 0,c=void 0,f=void 0,h=void 0;if(a!=null?(u=0,f=a):s&&(u=s.x,f=s.width),o!=null?(c=0,h=o):s&&(c=s.y,h=s.height),u==null||c==null){var d=n.getBoundingRect();u==null&&(u=d.x,f=d.width),c==null&&(c=d.y,h=d.height)}l=this._boundingRect=new je(u,c,f,h)}if(s){var v=Bre(s,l);n.scaleX=n.scaleY=v.scale,n.x=v.x,n.y=v.y}i.setClipPath(new qe({shape:l.plain()}));var m=[];return R(r.named,function(y){VGe.get(y.svgNodeTagLower)!=null&&(m.push(y),WGe(y.el))}),{root:i,boundingRect:l,named:m}},e.prototype.useGraphic=function(t){var r=this._usedGraphicMap,n=r.get(t);return n||(n=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),r.set(t,n),n)},e.prototype.freeGraphic=function(t){var r=this._usedGraphicMap,n=r.get(t);n&&(r.removeKey(t),this._freedGraphics.push(n))},e}();function WGe(e){e.silent=!1,e.isGroup&&e.traverse(function(t){t.silent=!1})}function HGe(e){var t=[],r=Ce();return R(e,function(n){if(n.namedFrom==null){var i=new J$e(n.name,n.el);t.push(i),r.set(n.name,i)}}),{regions:t,regionsMap:r}}var _O=[126,25],dW="南海诸岛",gc=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]];for(var uc=0;uc<gc.length;uc++)for(var vh=0;vh<gc[uc].length;vh++)gc[uc][vh][0]/=10.5,gc[uc][vh][1]/=-10.5/.75,gc[uc][vh][0]+=_O[0],gc[uc][vh][1]+=_O[1];function UGe(e,t){if(e==="china"){for(var r=0;r<t.length;r++)if(t[r].name===dW)return;t.push(new _te(dW,le(gc,function(n){return{type:"polygon",exterior:n}}),_O))}}var ZGe={南海诸岛:[32,80],广东:[0,-10],香港:[10,5],澳门:[-10,10],天津:[5,5]};function YGe(e,t){if(e==="china"){var r=ZGe[t.name];if(r){var n=t.getCenter();n[0]+=r[0]/10.5,n[1]+=-r[1]/(10.5/.75),t.setCenter(n)}}}var XGe=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function qGe(e,t){e==="china"&&t.name==="台湾"&&t.geometries.push({type:"polygon",exterior:XGe[0]})}var KGe="name",JGe=function(){function e(t,r,n){this.type="geoJSON",this._parsedMap=Ce(),this._mapName=t,this._specialAreas=n,this._geoJSON=eWe(r)}return e.prototype.load=function(t,r){r=r||KGe;var n=this._parsedMap.get(r);if(!n){var i=this._parseToRegions(r);n=this._parsedMap.set(r,{regions:i,boundingRect:QGe(i)})}var a=Ce(),o=[];return R(n.regions,function(s){var l=s.name;t&&Se(t,l)&&(s=s.cloneShallow(l=t[l])),o.push(s),a.set(l,s)}),{regions:o,boundingRect:n.boundingRect||new je(0,0,0,0),regionsMap:a}},e.prototype._parseToRegions=function(t){var r=this._mapName,n=this._geoJSON,i;try{i=n?nO(n,t):[]}catch(a){throw new Error(`Invalid geoJson format
`+a.message)}return UGe(r,i),R(i,function(a){var o=a.name;YGe(r,a),qGe(r,a);var s=this._specialAreas&&this._specialAreas[o];s&&a.transformTo(s.left,s.top,s.width,s.height)},this),i},e.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},e}();function QGe(e){for(var t,r=0;r<e.length;r++){var n=e[r].getBoundingRect();t=t||n.clone(),t.union(n)}return t}function eWe(e){return ye(e)?typeof JSON<"u"&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e}var tg=Ce();const Ks={registerMap:function(e,t,r){if(t.svg){var n=new GGe(e,t.svg);tg.set(e,n)}else{var i=t.geoJson||t.geoJSON;i&&!t.features?r=t.specialAreas:i=t;var n=new JGe(e,i,r);tg.set(e,n)}},getGeoResource:function(e){return tg.get(e)},getMapForUser:function(e){var t=tg.get(e);return t&&t.type==="geoJSON"&&t.getMapForUser()},load:function(e,t,r){var n=tg.get(e);if(n)return n.load(t,r)}};var eR=["rect","circle","line","ellipse","polygon","polyline","path"],tWe=Ce(eR),rWe=Ce(eR.concat(["g"])),nWe=Ce(eR.concat(["g"])),zre=et();function b_(e){var t=e.getItemStyle(),r=e.get("areaColor");return r!=null&&(t.fill=r),t}function vW(e){var t=e.style;t&&(t.stroke=t.stroke||t.fill,t.fill=null)}var $re=function(){function e(t){var r=this.group=new Ie,n=this._transformGroup=new Ie;r.add(n),this.uid=Hv("ec_map_draw"),this._controller=new Rf(t.getZr()),this._controllerHost={target:n},n.add(this._regionsGroup=new Ie),n.add(this._svgGroup=new Ie)}return e.prototype.draw=function(t,r,n,i,a){var o=t.mainType==="geo",s=t.getData&&t.getData();o&&r.eachComponent({mainType:"series",subType:"map"},function(b){!s&&b.getHostGeoModel()===t&&(s=b.getData())});var l=t.coordinateSystem,u=this._regionsGroup,c=this._transformGroup,f=l.getTransformInfo(),h=f.raw,d=f.roam,v=!u.childAt(0)||a,m=t.getShallow("clip",!0),y;m?(y=l.getViewRect().clone(),this.group.setClipPath(new qe({shape:y.clone()}))):this.group.removeClipPath(),v?(c.x=d.x,c.y=d.y,c.scaleX=d.scaleX,c.scaleY=d.scaleY,c.dirty()):ut(c,d,t);var x=s&&s.getVisual("visualMeta")&&s.getVisual("visualMeta").length>0,_={api:n,geo:l,mapOrGeoModel:t,data:s,isVisualEncodedByVisualMap:x,isGeo:o,transformInfoRaw:h};l.resourceType==="geoJSON"?this._buildGeoJSON(_):l.resourceType==="geoSVG"&&this._buildSVG(_),this._updateController(t,y,r,n),this._updateMapSelectHandler(t,u,n,i)},e.prototype._buildGeoJSON=function(t){var r=this._regionsGroupByName=Ce(),n=Ce(),i=this._regionsGroup,a=t.transformInfoRaw,o=t.mapOrGeoModel,s=t.data,l=t.geo.projection,u=l&&l.stream;function c(d,v){return v&&(d=v(d)),d&&[d[0]*a.scaleX+a.x,d[1]*a.scaleY+a.y]}function f(d){for(var v=[],m=!u&&l&&l.project,y=0;y<d.length;++y){var x=c(d[y],m);x&&v.push(x)}return v}function h(d){return{shape:{points:f(d)}}}i.removeAll(),R(t.geo.regions,function(d){var v=d.name,m=r.get(v),y=n.get(v)||{},x=y.dataIdx,_=y.regionModel;if(!m){m=r.set(v,new Ie),i.add(m),x=s?s.indexOfName(v):null,_=t.isGeo?o.getRegionModel(v):s?s.getItemModel(x):null;var b=_.get("silent",!0);b!=null&&(m.silent=b),n.set(v,{dataIdx:x,regionModel:_})}var S=[],T=[];R(d.geometries,function(P){if(P.type==="polygon"){var I=[P.exterior].concat(P.interiors||[]);u&&(I=_W(I,u)),R(I,function(E){S.push(new Tn(h(E)))})}else{var k=P.points;u&&(k=_W(k,u,!0)),R(k,function(E){T.push(new ln(h(E)))})}});var C=c(d.getCenter(),l&&l.project);function A(P,I){if(P.length){var k=new m0({culling:!0,segmentIgnoreThreshold:1,shape:{paths:P}});m.add(k),pW(t,k,x,_),gW(t,k,v,_,o,x,C),I&&(vW(k),R(k.states,vW))}}A(S),A(T,!0)}),r.each(function(d,v){var m=n.get(v),y=m.dataIdx,x=m.regionModel;mW(t,d,v,x,o,y),yW(t,d,v,x,o),xW(t,d,v,x,o)},this)},e.prototype._buildSVG=function(t){var r=t.geo.map,n=t.transformInfoRaw;this._svgGroup.x=n.x,this._svgGroup.y=n.y,this._svgGroup.scaleX=n.scaleX,this._svgGroup.scaleY=n.scaleY,this._svgResourceChanged(r)&&(this._freeSVG(),this._useSVG(r));var i=this._svgDispatcherMap=Ce(),a=!1;R(this._svgGraphicRecord.named,function(o){var s=o.name,l=t.mapOrGeoModel,u=t.data,c=o.svgNodeTagLower,f=o.el,h=u?u.indexOfName(s):null,d=l.getRegionModel(s);tWe.get(c)!=null&&f instanceof ga&&pW(t,f,h,d),f instanceof ga&&(f.culling=!0);var v=d.get("silent",!0);if(v!=null&&(f.silent=v),f.z2EmphasisLift=0,!o.namedFrom&&(nWe.get(c)!=null&&gW(t,f,s,d,l,h,null),mW(t,f,s,d,l,h),yW(t,f,s,d,l),rWe.get(c)!=null)){var m=xW(t,f,s,d,l);m==="self"&&(a=!0);var y=i.get(s)||i.set(s,[]);y.push(f)}},this),this._enableBlurEntireSVG(a,t)},e.prototype._enableBlurEntireSVG=function(t,r){if(t&&r.isGeo){var n=r.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle(),i=n.opacity;this._svgGraphicRecord.root.traverse(function(a){if(!a.isGroup){vf(a);var o=a.ensureState("blur").style||{};o.opacity==null&&i!=null&&(o.opacity=i),a.ensureState("emphasis")}})}},e.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},e.prototype.findHighDownDispatchers=function(t,r){if(t==null)return[];var n=r.coordinateSystem;if(n.resourceType==="geoJSON"){var i=this._regionsGroupByName;if(i){var a=i.get(t);return a?[a]:[]}}else if(n.resourceType==="geoSVG")return this._svgDispatcherMap&&this._svgDispatcherMap.get(t)||[]},e.prototype._svgResourceChanged=function(t){return this._svgMapName!==t},e.prototype._useSVG=function(t){var r=Ks.getGeoResource(t);if(r&&r.type==="geoSVG"){var n=r.useGraphic(this.uid);this._svgGroup.add(n.root),this._svgGraphicRecord=n,this._svgMapName=t}},e.prototype._freeSVG=function(){var t=this._svgMapName;if(t!=null){var r=Ks.getGeoResource(t);r&&r.type==="geoSVG"&&r.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},e.prototype._updateController=function(t,r,n,i){var a=t.coordinateSystem,o=this._controller,s=this._controllerHost;s.zoomLimit=t.get("scaleLimit"),s.zoom=a.getZoom(),o.enable(t.get("roam")||!1,{api:i,zInfo:{component:t},triggerInfo:{roamTrigger:t.get("roamTrigger"),isInSelf:function(c,f,h){return a.containPoint([f,h])},isInClip:function(c,f,h){return!r||r.contain(f,h)}}});var l=t.mainType;function u(){var c={type:"geoRoam",componentType:l};return c[l+"Id"]=t.id,c}o.off("pan").on("pan",function(c){this._mouseDownFlag=!1,Kj(s,c.dx,c.dy),i.dispatchAction(ae(u(),{dx:c.dx,dy:c.dy,animation:{duration:0}}))},this),o.off("zoom").on("zoom",function(c){this._mouseDownFlag=!1,Jj(s,c.scale,c.originX,c.originY),i.dispatchAction(ae(u(),{totalZoom:s.zoom,zoom:c.scale,originX:c.originX,originY:c.originY,animation:{duration:0}}))},this)},e.prototype.resetForLabelLayout=function(){this.group.traverse(function(t){var r=t.getTextContent();r&&(r.ignore=zre(r).ignore)})},e.prototype._updateMapSelectHandler=function(t,r,n,i){var a=this;r.off("mousedown"),r.off("click"),t.get("selectedMode")&&(r.on("mousedown",function(){a._mouseDownFlag=!0}),r.on("click",function(o){a._mouseDownFlag&&(a._mouseDownFlag=!1)}))},e}();function pW(e,t,r,n){var i=n.getModel("itemStyle"),a=n.getModel(["emphasis","itemStyle"]),o=n.getModel(["blur","itemStyle"]),s=n.getModel(["select","itemStyle"]),l=b_(i),u=b_(a),c=b_(s),f=b_(o),h=e.data;if(h){var d=h.getItemVisual(r,"style"),v=h.getItemVisual(r,"decal");e.isVisualEncodedByVisualMap&&d.fill&&(l.fill=d.fill),v&&(l.decal=nv(v,e.api))}t.setStyle(l),t.style.strokeNoScale=!0,t.ensureState("emphasis").style=u,t.ensureState("select").style=c,t.ensureState("blur").style=f,vf(t)}function gW(e,t,r,n,i,a,o){var s=e.data,l=e.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),a)),c=s&&s.getItemLayout(a);if(l||u||c&&c.showLabel){var f=l?r:a,h=void 0;(!s||a>=0)&&(h=i);var d=o?{normal:{align:"center",verticalAlign:"middle"}}:null;qr(t,Br(n),{labelFetcher:h,labelDataIndex:f,defaultText:r},d);var v=t.getTextContent();if(v&&(zre(v).ignore=v.ignore,t.textConfig&&o)){var m=t.getBoundingRect().clone();t.textConfig.layoutRect=m,t.textConfig.position=[(o[0]-m.x)/m.width*100+"%",(o[1]-m.y)/m.height*100+"%"]}t.disableLabelAnimation=!0}else t.removeTextContent(),t.removeTextConfig(),t.disableLabelAnimation=null}function mW(e,t,r,n,i,a){e.data?e.data.setItemGraphicEl(a,t):ze(t).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:r,region:n&&n.option||{}}}function yW(e,t,r,n,i){e.data||il({el:t,componentModel:i,itemName:r,itemTooltipOption:n.get("tooltip")})}function xW(e,t,r,n,i){t.highDownSilentOnTouch=!!i.get("selectedMode");var a=n.getModel("emphasis"),o=a.get("focus");return Gt(t,o,a.get("blurScope"),a.get("disabled")),e.isGeo&&X3e(t,i,r),o}function _W(e,t,r){var n=[],i;function a(){i=[]}function o(){i.length&&(n.push(i),i=[])}var s=t({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&i.push([l,u])},sphere:function(){}});return!r&&s.polygonStart(),R(e,function(l){s.lineStart();for(var u=0;u<l.length;u++)s.point(l[u][0],l[u][1]);s.lineEnd()}),!r&&s.polygonEnd(),n}var iWe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i,a){if(!(a&&a.type==="mapToggleSelect"&&a.from===this.uid)){var o=this.group;if(o.removeAll(),!r.getHostGeoModel()){if(this._mapDraw&&a&&a.type==="geoRoam"&&this._mapDraw.resetForLabelLayout(),a&&a.type==="geoRoam"&&a.componentType==="series"&&a.seriesId===r.id){var s=this._mapDraw;s&&o.add(s.group)}else if(r.needsDrawMap){var s=this._mapDraw||new $re(i);o.add(s.group),s.draw(r,n,i,this,a),this._mapDraw=s}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;r.get("showLegendSymbol")&&n.getComponent("legend")&&this._renderSymbols(r,n,i)}}},t.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},t.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},t.prototype._renderSymbols=function(r,n,i){var a=r.originalData,o=this.group;a.each(a.mapDimension("value"),function(s,l){if(!isNaN(s)){var u=a.getItemLayout(l);if(!(!u||!u.point)){var c=u.point,f=u.offset,h=new Qo({style:{fill:r.getData().getVisual("style").fill},shape:{cx:c[0]+f*9,cy:c[1],r:3},silent:!0,z2:8+(f?0:zv+1)});if(!f){var d=r.mainSeries.getData(),v=a.getName(l),m=d.indexOfName(v),y=a.getItemModel(l),x=y.getModel("label"),_=d.getItemGraphicEl(m);qr(h,Br(y),{labelFetcher:{getFormattedLabel:function(b,S){return r.getFormattedLabel(m,S)}},defaultText:v}),h.disableLabelAnimation=!0,x.get("position")||h.setTextConfig({position:"bottom"}),_.onHoverStateChange=function(b){yw(h,b)}}o.add(h)}}})},t.type="map",t}(bt),aWe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.needsDrawMap=!1,r.seriesGroup=[],r.getTooltipPosition=function(n){if(n!=null){var i=this.getData().getName(n),a=this.coordinateSystem,o=a.getRegion(i);return o&&a.dataToPoint(o.getCenter())}},r}return t.prototype.getInitialData=function(r){for(var n=tp(this,{coordDimensions:["value"],encodeDefaulter:We(fj,this)}),i=Ce(),a=[],o=0,s=n.count();o<s;o++){var l=n.getName(o);i.set(l,o)}var u=Ks.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return R(u.regions,function(c){var f=c.name,h=i.get(f),d=c.properties&&c.properties.echartsStyle,v;h==null?(v={name:f},a.push(v)):v=n.getRawDataItem(h),d&&Ue(v,d)}),n.appendData(a),n},t.prototype.getHostGeoModel=function(){if(kQ(this).kind!==So.boxCoordSys)return this.getReferringComponents("geo",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0]},t.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},t.prototype.getRawValue=function(r){var n=this.getData();return n.get(n.mapDimension("value"),r)},t.prototype.getRegionModel=function(r){var n=this.getData();return n.getItemModel(n.indexOfName(r))},t.prototype.formatTooltip=function(r,n,i){for(var a=this.getData(),o=this.getRawValue(r),s=a.getName(r),l=this.seriesGroup,u=[],c=0;c<l.length;c++){var f=l[c].originalData.indexOfName(s),h=a.mapDimension("value");isNaN(l[c].originalData.get(h,f))||u.push(l[c].name)}return Mr("section",{header:u.join(", "),noHeader:!u.length,blocks:[Mr("nameValue",{name:s,value:o})]})},t.prototype.setZoom=function(r){this.option.zoom=r},t.prototype.setCenter=function(r){this.option.center=r},t.prototype.getLegendIcon=function(r){var n=r.icon||"roundRect",i=xr(n,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill);return i.setStyle(r.itemStyle),i.style.stroke="none",n.indexOf("empty")>-1&&(i.style.stroke=i.style.fill,i.style.fill=J.color.neutral00,i.style.lineWidth=2),i},t.type="series.map",t.dependencies=["geo"],t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:J.color.tertiary},itemStyle:{borderWidth:.5,borderColor:J.color.border,areaColor:J.color.background},emphasis:{label:{show:!0,color:J.color.primary},itemStyle:{areaColor:J.color.highlight}},select:{label:{show:!0,color:J.color.primary},itemStyle:{color:J.color.highlight}},nameProperty:"name"},t}(Ct);function oWe(e,t){var r={};return R(e,function(n){n.each(n.mapDimension("value"),function(i,a){var o="ec-"+n.getName(a);r[o]=r[o]||[],isNaN(i)||r[o].push(i)})}),e[0].map(e[0].mapDimension("value"),function(n,i){for(var a="ec-"+e[0].getName(i),o=0,s=1/0,l=-1/0,u=r[a].length,c=0;c<u;c++)s=Math.min(s,r[a][c]),l=Math.max(l,r[a][c]),o+=r[a][c];var f;return t==="min"?f=s:t==="max"?f=l:t==="average"?f=o/u:f=o,u===0?NaN:f})}function sWe(e){var t={};e.eachSeriesByType("map",function(r){var n=r.getHostGeoModel(),i=n?"o"+n.id:"i"+r.getMapType();(t[i]=t[i]||[]).push(r)}),R(t,function(r,n){for(var i=oWe(le(r,function(o){return o.getData()}),r[0].get("mapValueCalculation")),a=0;a<r.length;a++)r[a].originalData=r[a].getData();for(var a=0;a<r.length;a++)r[a].seriesGroup=r,r[a].needsDrawMap=a===0&&!r[a].getHostGeoModel(),r[a].setData(i.cloneShallow()),r[a].mainSeries=r[0]})}function lWe(e){var t={};e.eachSeriesByType("map",function(r){var n=r.getMapType();if(!(r.getHostGeoModel()||t[n])){var i={};R(r.seriesGroup,function(o){var s=o.coordinateSystem,l=o.originalData;o.get("showLegendSymbol")&&e.getComponent("legend")&&l.each(l.mapDimension("value"),function(u,c){var f=l.getName(c),h=s.getRegion(f);if(!(!h||isNaN(u))){var d=i[f]||0,v=s.dataToPoint(h.getCenter());i[f]=d+1,l.setItemLayout(c,{point:v,offset:d})}})});var a=r.getData();a.each(function(o){var s=a.getName(o),l=a.getItemLayout(o)||{};l.showLabel=!i[s],a.setItemLayout(o,l)}),t[n]=!0}})}var bW=lr,Bf=function(e){K(t,e);function t(r,n){var i=e.call(this)||this;return i.type="view",i.dimensions=["x","y"],i._roamTransformable=new Ts,i._rawTransformable=new Ts,i.name=r,i._opt=n,i}return t.prototype.setBoundingRect=function(r,n,i,a){return this._rect=new je(r,n,i,a),this._updateCenterAndZoom(),this._rect},t.prototype.getBoundingRect=function(){return this._rect},t.prototype.setViewRect=function(r,n,i,a){this._transformTo(r,n,i,a),this._viewRect=new je(r,n,i,a)},t.prototype._transformTo=function(r,n,i,a){var o=this.getBoundingRect(),s=this._rawTransformable;s.transform=o.calculateTransform(new je(r,n,i,a));var l=s.parent;s.parent=null,s.decomposeTransform(),s.parent=l,this._updateTransform()},t.prototype.setCenter=function(r){var n=this._opt;n&&n.api&&n.ecModel&&n.ecModel.getShallow("legacyViewCoordSysCenterBase")&&r&&(r=[me(r[0],n.api.getWidth()),me(r[1],n.api.getWidth())]),this._centerOption=Le(r),this._updateCenterAndZoom()},t.prototype.setZoom=function(r){this._zoom=Qj(r||1,this.zoomLimit),this._updateCenterAndZoom()},t.prototype.getDefaultCenter=function(){var r=this.getBoundingRect(),n=r.x+r.width/2,i=r.y+r.height/2;return[n,i]},t.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},t.prototype.getZoom=function(){return this._zoom||1},t.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},t.prototype._updateCenterAndZoom=function(){var r=this._centerOption,n=this._rect;r&&n&&(this._center=[me(r[0],n.width,n.x),me(r[1],n.height,n.y)]);var i=this._rawTransformable.getLocalTransform(),a=this._roamTransformable,o=this.getDefaultCenter(),s=this.getCenter(),l=this.getZoom();s=lr([],s,i),o=lr([],o,i),a.originX=s[0],a.originY=s[1],a.x=o[0]-s[0],a.y=o[1]-s[1],a.scaleX=a.scaleY=l,this._updateTransform()},t.prototype._updateTransform=function(){var r=this._roamTransformable,n=this._rawTransformable;n.parent=r,r.updateTransform(),n.updateTransform(),h0(this.transform||(this.transform=[]),n.transform||Yr()),this._rawTransform=n.getLocalTransform(),this.invTransform=this.invTransform||[],pa(this.invTransform,this.transform),this.decomposeTransform()},t.prototype.getTransformInfo=function(){var r=this._rawTransformable,n=this._roamTransformable,i=new Ts;return i.transform=n.transform,i.decomposeTransform(),{roam:{x:i.x,y:i.y,scaleX:i.scaleX,scaleY:i.scaleY},raw:{x:r.x,y:r.y,scaleX:r.scaleX,scaleY:r.scaleY}}},t.prototype.getViewRect=function(){return this._viewRect},t.prototype.getViewRectAfterRoam=function(){var r=this.getBoundingRect().clone();return r.applyTransform(this.transform),r},t.prototype.dataToPoint=function(r,n,i){var a=n?this._rawTransform:this.transform;return i=i||[],a?bW(i,r,a):In(i,r)},t.prototype.pointToData=function(r,n,i){i=i||[];var a=this.invTransform;return a?bW(i,r,a):(i[0]=r[0],i[1]=r[1],i)},t.prototype.convertToPixel=function(r,n,i){var a=wW(n);return a===this?a.dataToPoint(i):null},t.prototype.convertFromPixel=function(r,n,i){var a=wW(n);return a===this?a.pointToData(i):null},t.prototype.containPoint=function(r){return this.getViewRectAfterRoam().contain(r[0],r[1])},t.dimensions=["x","y"],t}(Ts);function wW(e){var t=e.seriesModel;return t?t.coordinateSystem:null}var uWe={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},Fre=["lng","lat"],bO=function(e){K(t,e);function t(r,n,i){var a=e.call(this,r,{api:i.api,ecModel:i.ecModel})||this;a.dimensions=Fre,a.type="geo",a._nameCoordMap=Ce(),a.map=n;var o=i.projection,s=Ks.load(n,i.nameMap,i.nameProperty),l=Ks.getGeoResource(n);a.resourceType=l?l.type:null;var u=a.regions=s.regions,c=uWe[l.type];a._regionsMap=s.regionsMap,a.regions=s.regions,a.projection=o;var f;if(o)for(var h=0;h<u.length;h++){var d=u[h].getBoundingRect(o);f=f||d.clone(),f.union(d)}else f=s.boundingRect;return a.setBoundingRect(f.x,f.y,f.width,f.height),a.aspectScale=o?1:Ae(i.aspectScale,c.aspectScale),a._invertLongitute=o?!1:c.invertLongitute,a}return t.prototype._transformTo=function(r,n,i,a){var o=this.getBoundingRect(),s=this._invertLongitute;o=o.clone(),s&&(o.y=-o.y-o.height);var l=this._rawTransformable;l.transform=o.calculateTransform(new je(r,n,i,a));var u=l.parent;l.parent=null,l.decomposeTransform(),l.parent=u,s&&(l.scaleY=-l.scaleY),this._updateTransform()},t.prototype.getRegion=function(r){return this._regionsMap.get(r)},t.prototype.getRegionByCoord=function(r){for(var n=this.regions,i=0;i<n.length;i++){var a=n[i];if(a.type==="geoJSON"&&a.contain(r))return n[i]}},t.prototype.addGeoCoord=function(r,n){this._nameCoordMap.set(r,n)},t.prototype.getGeoCoord=function(r){var n=this._regionsMap.get(r);return this._nameCoordMap.get(r)||n&&n.getCenter()},t.prototype.dataToPoint=function(r,n,i){if(ye(r)&&(r=this.getGeoCoord(r)),r){var a=this.projection;return a&&(r=a.project(r)),r&&this.projectedToPoint(r,n,i)}},t.prototype.pointToData=function(r,n,i){var a=this.projection;return a&&(r=a.unproject(r)),r&&this.pointToProjected(r,i)},t.prototype.pointToProjected=function(r,n){return e.prototype.pointToData.call(this,r,0,n)},t.prototype.projectedToPoint=function(r,n,i){return e.prototype.dataToPoint.call(this,r,n,i)},t.prototype.convertToPixel=function(r,n,i){var a=SW(n);return a===this?a.dataToPoint(i):null},t.prototype.convertFromPixel=function(r,n,i){var a=SW(n);return a===this?a.pointToData(i):null},t}(Bf);cr(bO,Bf);function SW(e){var t=e.geoModel,r=e.seriesModel;return t?t.coordinateSystem:r?r.coordinateSystem||(r.getReferringComponents("geo",tr).models[0]||{}).coordinateSystem:null}function TW(e,t){var r=e.get("boundingCoords");if(r!=null){var n=r[0],i=r[1];if(isFinite(n[0])&&isFinite(n[1])&&isFinite(i[0])&&isFinite(i[1])){var a=this.projection;if(a){var o=n[0],s=n[1],l=i[0],u=i[1];n=[1/0,1/0],i=[-1/0,-1/0];var c=function(T,C,A,P){for(var I=A-T,k=P-C,E=0;E<=100;E++){var D=E/100,N=a.project([T+I*D,C+k*D]);ws(n,n,N),Ss(i,i,N)}};c(o,s,l,s),c(l,s,l,u),c(l,u,o,u),c(o,u,l,s)}this.setBoundingRect(n[0],n[1],i[0]-n[0],i[1]-n[1])}}var f=this.getBoundingRect(),h=e.get("layoutCenter"),d=e.get("layoutSize"),v=zr(e,t).refContainer,m=f.width/f.height*this.aspectScale,y=!1,x,_;h&&d&&(x=[me(h[0],v.width)+v.x,me(h[1],v.height)+v.y],_=me(d,Math.min(v.width,v.height)),!isNaN(x[0])&&!isNaN(x[1])&&!isNaN(_)&&(y=!0));var b;if(y)b={},m>1?(b.width=_,b.height=_/m):(b.height=_,b.width=_*m),b.y=x[1]-b.height/2,b.x=x[0]-b.width/2;else{var S=e.getBoxLayoutParams();S.aspect=m,b=$t(S,v),b=DQ(e,b,m)}this.setViewRect(b.x,b.y,b.width,b.height),this.setCenter(e.get("center")),this.setZoom(e.get("zoom"))}function cWe(e,t){R(t.get("geoCoord"),function(r,n){e.addGeoCoord(n,r)})}var fWe=function(){function e(){this.dimensions=Fre}return e.prototype.create=function(t,r){var n=[];function i(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}t.eachComponent("geo",function(o,s){var l=o.get("map"),u=new bO(l+s,l,ae({nameMap:o.get("nameMap"),api:r,ecModel:t},i(o)));u.zoomLimit=o.get("scaleLimit"),n.push(u),o.coordinateSystem=u,u.model=o,u.resize=TW,u.resize(o,r)}),t.eachSeries(function(o){_0({targetModel:o,coordSysType:"geo",coordSysProvider:function(){var s=o.subType==="map"?o.getHostGeoModel():o.getReferringComponents("geo",tr).models[0];return s&&s.coordinateSystem},allowNotFound:!0})});var a={};return t.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();a[s]=a[s]||[],a[s].push(o)}}),R(a,function(o,s){var l=le(o,function(c){return c.get("nameMap")}),u=new bO(s,s,ae({nameMap:PT(l),api:r,ecModel:t},i(o[0])));u.zoomLimit=on.apply(null,le(o,function(c){return c.get("scaleLimit")})),n.push(u),u.resize=TW,u.resize(o[0],r),R(o,function(c){c.coordinateSystem=u,cWe(u,c)})}),n},e.prototype.getFilledRegions=function(t,r,n,i){for(var a=(t||[]).slice(),o=Ce(),s=0;s<a.length;s++)o.set(a[s].name,a[s]);var l=Ks.load(r,n,i);return R(l.regions,function(u){var c=u.name,f=o.get(c),h=u.properties&&u.properties.echartsStyle;f||(f={name:c},a.push(f)),h&&Ue(f,h)}),a},e}(),Vre=new fWe,hWe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i);var a=Ks.getGeoResource(r.map);if(a&&a.type==="geoJSON"){var o=r.itemStyle=r.itemStyle||{};"color"in o||(o.color=r.defaultItemStyleColor||J.color.backgroundTint)}ff(r,"label",["show"])},t.prototype.optionUpdated=function(){var r=this,n=this.option;n.regions=Vre.getFilledRegions(n.regions,n.map,n.nameMap,n.nameProperty);var i={};this._optionModelMap=va(n.regions||[],function(a,o){var s=o.name;return s&&(a.set(s,new rt(o,r,r.ecModel)),o.selected&&(i[s]=!0)),a},Ce()),n.selectedMap||(n.selectedMap=i)},t.prototype.getRegionModel=function(r){return this._optionModelMap.get(r)||new rt(null,this,this.ecModel)},t.prototype.getFormattedLabel=function(r,n){var i=this.getRegionModel(r),a=n==="normal"?i.get(["label","formatter"]):i.get(["emphasis","label","formatter"]),o={name:r};if(ke(a))return o.status=n,a(o);if(ye(a))return a.replace("{a}",r??"")},t.prototype.setZoom=function(r){this.option.zoom=r},t.prototype.setCenter=function(r){this.option.center=r},t.prototype.select=function(r){var n=this.option,i=n.selectedMode;if(i){i!=="multiple"&&(n.selectedMap=null);var a=n.selectedMap||(n.selectedMap={});a[r]=!0}},t.prototype.unSelect=function(r){var n=this.option.selectedMap;n&&(n[r]=!1)},t.prototype.toggleSelected=function(r){this[this.isSelected(r)?"unSelect":"select"](r)},t.prototype.isSelected=function(r){var n=this.option.selectedMap;return!!(n&&n[r])},t.type="geo",t.layoutMode="box",t.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:J.color.tertiary},itemStyle:{borderWidth:.5,borderColor:J.color.border},emphasis:{label:{show:!0,color:J.color.primary},itemStyle:{color:J.color.highlight}},select:{label:{show:!0,color:J.color.primary},itemStyle:{color:J.color.highlight}},regions:[]},t}(Qe),dWe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.focusBlurEnabled=!0,r}return t.prototype.init=function(r,n){this._api=n},t.prototype.render=function(r,n,i,a){if(this._model=r,!r.get("show")){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||(this._mapDraw=new $re(i));var o=this._mapDraw;o.draw(r,n,i,this,a),o.group.on("click",this._handleRegionClick,this),o.group.silent=r.get("silent"),this.group.add(o.group),this.updateSelectStatus(r,n,i)},t.prototype._handleRegionClick=function(r){var n;Rc(r.target,function(i){return(n=ze(i).eventData)!=null},!0),n&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:n.name})},t.prototype.updateSelectStatus=function(r,n,i){var a=this;this._mapDraw.group.traverse(function(o){var s=ze(o).eventData;if(s)return a._model.isSelected(s.name)?i.enterSelect(o):i.leaveSelect(o),!0})},t.prototype.findHighDownDispatchers=function(r){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(r,this._model)},t.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},t.type="geo",t}(It);function vWe(e,t,r){Ks.registerMap(e,t,r)}function Gre(e){e.registerCoordinateSystem("geo",Vre),e.registerComponentModel(hWe),e.registerComponentView(dWe),e.registerImpl("registerMap",vWe),e.registerImpl("getMap",function(r){return Ks.getMapForUser(r)});function t(r,n){n.update="geo:updateSelectStatus",e.registerAction(n,function(i,a){var o={},s=[];return a.eachComponent({mainType:"geo",query:i},function(l){l[r](i.name);var u=l.coordinateSystem;R(u.regions,function(f){o[f.name]=l.isSelected(f.name)||!1});var c=[];R(o,function(f,h){o[h]&&c.push(h)}),s.push({geoIndex:l.componentIndex,name:c})}),{selected:o,allSelected:s,name:i.name}})}t("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),t("select",{type:"geoSelect",event:"geoselected"}),t("unSelect",{type:"geoUnSelect",event:"geounselected"}),e.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(r,n,i){var a=r.componentType;a||(r.geoId!=null?a="geo":r.seriesId!=null&&(a="series")),a||(a="series"),n.eachComponent({mainType:a,query:r},function(o){var s=o.coordinateSystem;if(s.type==="geo"){var l=iC(s,r,o.get("scaleLimit"));o.setCenter&&o.setCenter(l.center),o.setZoom&&o.setZoom(l.zoom),a==="series"&&R(o.seriesGroup,function(u){u.setCenter(l.center),u.setZoom(l.zoom)})}})})}function pWe(e){Ye(Gre),e.registerChartView(iWe),e.registerSeriesModel(aWe),e.registerLayout(lWe),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,sWe),Tee("map",e.registerAction)}function gWe(e){var t=e;t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var r=[t],n,i;n=r.pop();)if(i=n.children,n.isExpand&&i.length)for(var a=i.length,o=a-1;o>=0;o--){var s=i[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(s)}}function mWe(e,t){var r=e.isExpand?e.children:[],n=e.parentNode.children,i=e.hierNode.i?n[e.hierNode.i-1]:null;if(r.length){xWe(e);var a=(r[0].hierNode.prelim+r[r.length-1].hierNode.prelim)/2;i?(e.hierNode.prelim=i.hierNode.prelim+t(e,i),e.hierNode.modifier=e.hierNode.prelim-a):e.hierNode.prelim=a}else i&&(e.hierNode.prelim=i.hierNode.prelim+t(e,i));e.parentNode.hierNode.defaultAncestor=_We(e,i,e.parentNode.hierNode.defaultAncestor||n[0],t)}function yWe(e){var t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier}function CW(e){return arguments.length?e:SWe}function Mg(e,t){return e-=Math.PI/2,{x:t*Math.cos(e),y:t*Math.sin(e)}}function xWe(e){for(var t=e.children,r=t.length,n=0,i=0;--r>=0;){var a=t[r];a.hierNode.prelim+=n,a.hierNode.modifier+=n,i+=a.hierNode.change,n+=a.hierNode.shift+i}}function _We(e,t,r,n){if(t){for(var i=e,a=e,o=a.parentNode.children[0],s=t,l=i.hierNode.modifier,u=a.hierNode.modifier,c=o.hierNode.modifier,f=s.hierNode.modifier;s=yM(s),a=xM(a),s&&a;){i=yM(i),o=xM(o),i.hierNode.ancestor=e;var h=s.hierNode.prelim+f-a.hierNode.prelim-u+n(s,a);h>0&&(wWe(bWe(s,e,r),e,h),u+=h,l+=h),f+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=i.hierNode.modifier,c+=o.hierNode.modifier}s&&!yM(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=f-l),a&&!xM(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=u-c,r=e)}return r}function yM(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function xM(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function bWe(e,t,r){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:r}function wWe(e,t,r){var n=r/(t.hierNode.i-e.hierNode.i);t.hierNode.change-=n,t.hierNode.shift+=r,t.hierNode.modifier+=r,t.hierNode.prelim+=r,e.hierNode.change+=n}function SWe(e,t){return e.parentNode===t.parentNode?1:2}var TWe=function(){function e(){this.parentPoint=[],this.childPoints=[]}return e}(),CWe=function(e){K(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultStyle=function(){return{stroke:J.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new TWe},t.prototype.buildPath=function(r,n){var i=n.childPoints,a=i.length,o=n.parentPoint,s=i[0],l=i[a-1];if(a===1){r.moveTo(o[0],o[1]),r.lineTo(s[0],s[1]);return}var u=n.orient,c=u==="TB"||u==="BT"?0:1,f=1-c,h=me(n.forkPosition,1),d=[];d[c]=o[c],d[f]=o[f]+(l[f]-o[f])*h,r.moveTo(o[0],o[1]),r.lineTo(d[0],d[1]),r.moveTo(s[0],s[1]),d[c]=s[c],r.lineTo(d[0],d[1]),d[c]=l[c],r.lineTo(d[0],d[1]),r.lineTo(l[0],l[1]);for(var v=1;v<a-1;v++){var m=i[v];r.moveTo(m[0],m[1]),d[c]=m[c],r.lineTo(d[0],d[1])}},t}(nt),AWe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._mainGroup=new Ie,r}return t.prototype.init=function(r,n){this._controller=new Rf(n.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},t.prototype.render=function(r,n,i){var a=r.getData(),o=r.layoutInfo,s=this._mainGroup,l=r.get("layout");l==="radial"?(s.x=o.x+o.width/2,s.y=o.y+o.height/2):(s.x=o.x,s.y=o.y),this._updateViewCoordSys(r,i),this._updateController(r,null,n,i);var u=this._data;a.diff(u).add(function(c){AW(a,c)&&MW(a,c,null,s,r)}).update(function(c,f){var h=u.getItemGraphicEl(f);if(!AW(a,c)){h&&kW(u,f,h,s,r);return}MW(a,c,h,s,r)}).remove(function(c){var f=u.getItemGraphicEl(c);f&&kW(u,c,f,s,r)}).execute(),this._nodeScaleRatio=r.get("nodeScaleRatio"),this._updateNodeAndLinkScale(r),r.get("expandAndCollapse")===!0&&a.eachItemGraphicEl(function(c,f){c.off("click").on("click",function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:r.id,dataIndex:f})})}),this._data=a},t.prototype._updateViewCoordSys=function(r,n){var i=r.getData(),a=[];i.each(function(f){var h=i.getItemLayout(f);h&&!isNaN(h.x)&&!isNaN(h.y)&&a.push([+h.x,+h.y])});var o=[],s=[];zT(a,o,s);var l=this._min,u=this._max;s[0]-o[0]===0&&(o[0]=l?l[0]:o[0]-1,s[0]=u?u[0]:s[0]+1),s[1]-o[1]===0&&(o[1]=l?l[1]:o[1]-1,s[1]=u?u[1]:s[1]+1);var c=r.coordinateSystem=new Bf(null,{api:n,ecModel:r.ecModel});c.zoomLimit=r.get("scaleLimit"),c.setBoundingRect(o[0],o[1],s[0]-o[0],s[1]-o[1]),c.setCenter(r.get("center")),c.setZoom(r.get("zoom")),this.group.attr({x:c.x,y:c.y,scaleX:c.scaleX,scaleY:c.scaleY}),this._min=o,this._max=s},t.prototype._updateController=function(r,n,i,a){var o=this;Dre(r,a,this.group,this._controller,this._controllerHost,n),this._controller.on("zoom",function(s){o._updateNodeAndLinkScale(r)})},t.prototype._updateNodeAndLinkScale=function(r){var n=r.getData(),i=this._getNodeGlobalScale(r);n.eachItemGraphicEl(function(a,o){a.setSymbolScale(i)})},t.prototype._getNodeGlobalScale=function(r){var n=r.coordinateSystem;if(n.type!=="view")return 1;var i=this._nodeScaleRatio,a=n.scaleX||1,o=n.getZoom(),s=(o-1)*i+1;return s/a},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},t.type="tree",t}(bt);function AW(e,t){var r=e.getItemLayout(t);return r&&!isNaN(r.x)&&!isNaN(r.y)}function MW(e,t,r,n,i){var a=!r,o=e.tree.getNodeByDataIndex(t),s=o.getModel(),l=o.getVisual("style").fill,u=o.isExpand===!1&&o.children.length!==0?l:J.color.neutral00,c=e.tree.root,f=o.parentNode===c?o:o.parentNode||o,h=e.getItemGraphicEl(f.dataIndex),d=f.getLayout(),v=h?{x:h.__oldX,y:h.__oldY,rawX:h.__radialOldRawX,rawY:h.__radialOldRawY}:d,m=o.getLayout();a?(r=new S0(e,t,null,{symbolInnerColor:u,useNameLabel:!0}),r.x=v.x,r.y=v.y):r.updateData(e,t,null,{symbolInnerColor:u,useNameLabel:!0}),r.__radialOldRawX=r.__radialRawX,r.__radialOldRawY=r.__radialRawY,r.__radialRawX=m.rawX,r.__radialRawY=m.rawY,n.add(r),e.setItemGraphicEl(t,r),r.__oldX=r.x,r.__oldY=r.y,ut(r,{x:m.x,y:m.y},i);var y=r.getSymbolPath();if(i.get("layout")==="radial"){var x=c.children[0],_=x.getLayout(),b=x.children.length,S=void 0,T=void 0;if(m.x===_.x&&o.isExpand===!0&&x.children.length){var C={x:(x.children[0].getLayout().x+x.children[b-1].getLayout().x)/2,y:(x.children[0].getLayout().y+x.children[b-1].getLayout().y)/2};S=Math.atan2(C.y-_.y,C.x-_.x),S<0&&(S=Math.PI*2+S),T=C.x<_.x,T&&(S=S-Math.PI)}else S=Math.atan2(m.y-_.y,m.x-_.x),S<0&&(S=Math.PI*2+S),o.children.length===0||o.children.length!==0&&o.isExpand===!1?(T=m.x<_.x,T&&(S=S-Math.PI)):(T=m.x>_.x,T||(S=S-Math.PI));var A=T?"left":"right",P=s.getModel("label"),I=P.get("rotate"),k=I*(Math.PI/180),E=y.getTextContent();E&&(y.setTextConfig({position:P.get("position")||A,rotation:I==null?-S:k,origin:"center"}),E.setStyle("verticalAlign","middle"))}var D=s.get(["emphasis","focus"]),N=D==="relative"?Xd(o.getAncestorsIndices(),o.getDescendantIndices()):D==="ancestor"?o.getAncestorsIndices():D==="descendant"?o.getDescendantIndices():null;N&&(ze(r).focus=N),MWe(i,o,c,r,v,d,m,n),r.__edge&&(r.onHoverStateChange=function(z){if(z!=="blur"){var V=o.parentNode&&e.getItemGraphicEl(o.parentNode.dataIndex);V&&V.hoverState===v0||yw(r.__edge,z)}})}function MWe(e,t,r,n,i,a,o,s){var l=t.getModel(),u=e.get("edgeShape"),c=e.get("layout"),f=e.getOrient(),h=e.get(["lineStyle","curveness"]),d=e.get("edgeForkPosition"),v=l.getModel("lineStyle").getLineStyle(),m=n.__edge;if(u==="curve")t.parentNode&&t.parentNode!==r&&(m||(m=n.__edge=new Fv({shape:wO(c,f,h,i,i)})),ut(m,{shape:wO(c,f,h,a,o)},e));else if(u==="polyline"&&c==="orthogonal"&&t!==r&&t.children&&t.children.length!==0&&t.isExpand===!0){for(var y=t.children,x=[],_=0;_<y.length;_++){var b=y[_].getLayout();x.push([b.x,b.y])}m||(m=n.__edge=new CWe({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:f,forkPosition:d}})),ut(m,{shape:{parentPoint:[o.x,o.y],childPoints:x}},e)}m&&!(u==="polyline"&&!t.isExpand)&&(m.useStyle(Oe({strokeNoScale:!0,fill:null},v)),Rr(m,l,"lineStyle"),vf(m),s.add(m))}function PW(e,t,r,n,i){var a=t.tree.root,o=Wre(a,e),s=o.source,l=o.sourceLayout,u=t.getItemGraphicEl(e.dataIndex);if(u){var c=t.getItemGraphicEl(s.dataIndex),f=c.__edge,h=u.__edge||(s.isExpand===!1||s.children.length===1?f:void 0),d=n.get("edgeShape"),v=n.get("layout"),m=n.get("orient"),y=n.get(["lineStyle","curveness"]);h&&(d==="curve"?hu(h,{shape:wO(v,m,y,l,l),style:{opacity:0}},n,{cb:function(){r.remove(h)},removeOpt:i}):d==="polyline"&&n.get("layout")==="orthogonal"&&hu(h,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},n,{cb:function(){r.remove(h)},removeOpt:i}))}}function Wre(e,t){for(var r=t.parentNode===e?t:t.parentNode||t,n;n=r.getLayout(),n==null;)r=r.parentNode===e?r:r.parentNode||r;return{source:r,sourceLayout:n}}function kW(e,t,r,n,i){var a=e.tree.getNodeByDataIndex(t),o=e.tree.root,s=Wre(o,a).sourceLayout,l={duration:i.get("animationDurationUpdate"),easing:i.get("animationEasingUpdate")};hu(r,{x:s.x+1,y:s.y+1},i,{cb:function(){n.remove(r),e.setItemGraphicEl(t,null)},removeOpt:l}),r.fadeOut(null,e.hostModel,{fadeLabel:!0,animation:l}),a.children.forEach(function(u){PW(u,e,n,i,l)}),PW(a,e,n,i,l)}function wO(e,t,r,n,i){var a,o,s,l,u,c,f,h;if(e==="radial"){u=n.rawX,f=n.rawY,c=i.rawX,h=i.rawY;var d=Mg(u,f),v=Mg(u,f+(h-f)*r),m=Mg(c,h+(f-h)*r),y=Mg(c,h);return{x1:d.x||0,y1:d.y||0,x2:y.x||0,y2:y.y||0,cpx1:v.x||0,cpy1:v.y||0,cpx2:m.x||0,cpy2:m.y||0}}else u=n.x,f=n.y,c=i.x,h=i.y,(t==="LR"||t==="RL")&&(a=u+(c-u)*r,o=f,s=c+(u-c)*r,l=h),(t==="TB"||t==="BT")&&(a=u,o=f+(h-f)*r,s=c,l=h+(f-h)*r);return{x1:u,y1:f,x2:c,y2:h,cpx1:a,cpy1:o,cpx2:s,cpy2:l}}var ca=et();function Hre(e){var t=e.mainData,r=e.datas;r||(r={main:t},e.datasAttr={main:"data"}),e.datas=e.mainData=null,Ure(t,r,e),R(r,function(n){R(t.TRANSFERABLE_METHODS,function(i){n.wrapMethod(i,We(PWe,e))})}),t.wrapMethod("cloneShallow",We(LWe,e)),R(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,We(kWe,e))}),wn(r[t.dataType]===t)}function PWe(e,t){if(EWe(this)){var r=ae({},ca(this).datas);r[this.dataType]=t,Ure(t,r,e)}else tR(t,this.dataType,ca(this).mainData,e);return t}function kWe(e,t){return e.struct&&e.struct.update(),t}function LWe(e,t){return R(ca(t).datas,function(r,n){r!==t&&tR(r.cloneShallow(),n,t,e)}),t}function IWe(e){var t=ca(this).mainData;return e==null||t==null?t:ca(t).datas[e]}function OWe(){var e=ca(this).mainData;return e==null?[{data:e}]:le(at(ca(e).datas),function(t){return{type:t,data:ca(e).datas[t]}})}function EWe(e){return ca(e).mainData===e}function Ure(e,t,r){ca(e).datas={},R(t,function(n,i){tR(n,i,e,r)})}function tR(e,t,r,n){ca(r).datas[t]=e,ca(e).mainData=r,e.dataType=t,n.struct&&(e[n.structAttr]=n.struct,n.struct[n.datasAttr[t]]=e),e.getLinkedData=IWe,e.getLinkedDataAll=OWe}var DWe=function(){function e(t,r){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=t||"",this.hostTree=r}return e.prototype.isRemoved=function(){return this.dataIndex<0},e.prototype.eachNode=function(t,r,n){ke(t)&&(n=r,r=t,t=null),t=t||{},ye(t)&&(t={order:t});var i=t.order||"preorder",a=this[t.attr||"children"],o;i==="preorder"&&(o=r.call(n,this));for(var s=0;!o&&s<a.length;s++)a[s].eachNode(t,r,n);i==="postorder"&&r.call(n,this)},e.prototype.updateDepthAndHeight=function(t){var r=0;this.depth=t;for(var n=0;n<this.children.length;n++){var i=this.children[n];i.updateDepthAndHeight(t+1),i.height>r&&(r=i.height)}this.height=r+1},e.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var r=0,n=this.children,i=n.length;r<i;r++){var a=n[r].getNodeById(t);if(a)return a}},e.prototype.contains=function(t){if(t===this)return!0;for(var r=0,n=this.children,i=n.length;r<i;r++){var a=n[r].contains(t);if(a)return a}},e.prototype.getAncestors=function(t){for(var r=[],n=t?this:this.parentNode;n;)r.push(n),n=n.parentNode;return r.reverse(),r},e.prototype.getAncestorsIndices=function(){for(var t=[],r=this;r;)t.push(r.dataIndex),r=r.parentNode;return t.reverse(),t},e.prototype.getDescendantIndices=function(){var t=[];return this.eachNode(function(r){t.push(r.dataIndex)}),t},e.prototype.getValue=function(t){var r=this.hostTree.data;return r.getStore().get(r.getDimensionIndex(t||"value"),this.dataIndex)},e.prototype.setLayout=function(t,r){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,r)},e.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},e.prototype.getModel=function(t){if(!(this.dataIndex<0)){var r=this.hostTree,n=r.data.getItemModel(this.dataIndex);return n.getModel(t)}},e.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},e.prototype.setVisual=function(t,r){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,r)},e.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},e.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},e.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},e.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,r=0;r<t.length;++r)if(t[r]===this)return r;return-1}return-1},e.prototype.isAncestorOf=function(t){for(var r=t.parentNode;r;){if(r===this)return!0;r=r.parentNode}return!1},e.prototype.isDescendantOf=function(t){return t!==this&&t.isAncestorOf(this)},e}(),rR=function(){function e(t){this.type="tree",this._nodes=[],this.hostModel=t}return e.prototype.eachNode=function(t,r,n){this.root.eachNode(t,r,n)},e.prototype.getNodeByDataIndex=function(t){var r=this.data.getRawIndex(t);return this._nodes[r]},e.prototype.getNodeById=function(t){return this.root.getNodeById(t)},e.prototype.update=function(){for(var t=this.data,r=this._nodes,n=0,i=r.length;n<i;n++)r[n].dataIndex=-1;for(var n=0,i=t.count();n<i;n++)r[t.getRawIndex(n)].dataIndex=n},e.prototype.clearLayouts=function(){this.data.clearItemLayouts()},e.createTree=function(t,r,n){var i=new e(r),a=[],o=1;s(t);function s(c,f){var h=c.value;o=Math.max(o,oe(h)?h.length:1),a.push(c);var d=new DWe(Dr(c.name,""),i);f?NWe(d,f):i.root=d,i._nodes.push(d);var v=c.children;if(v)for(var m=0;m<v.length;m++)s(v[m],d)}i.root.updateDepthAndHeight(0);var l=Kv(a,{coordDimensions:["value"],dimensionsCount:o}).dimensions,u=new Rn(l,r);return u.initData(a),n&&n(u),Hre({mainData:u,struct:i,structAttr:"tree"}),i.update(),i},e}();function NWe(e,t){var r=t.children;e.parentNode!==t&&(r.push(e),e.parentNode=t)}function Ry(e,t,r){if(e&&He(t,e.type)>=0){var n=r.getData().tree.root,i=e.targetNode;if(ye(i)&&(i=n.getNodeById(i)),i&&n.contains(i))return{node:i};var a=e.targetNodeId;if(a!=null&&(i=n.getNodeById(a)))return{node:i}}}function Zre(e){for(var t=[];e;)e=e.parentNode,e&&t.push(e);return t.reverse()}function nR(e,t){var r=Zre(e);return He(r,t)>=0}function oC(e,t){for(var r=[];e;){var n=e.dataIndex;r.push({name:e.name,dataIndex:n,value:t.getRawValue(n)}),e=e.parentNode}return r.reverse(),r}var jWe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.hasSymbolVisual=!0,r.ignoreStyleOnData=!0,r}return t.prototype.getInitialData=function(r){var n={name:r.name,children:r.data},i=r.leaves||{},a=new rt(i,this,this.ecModel),o=rR.createTree(n,this,s);function s(f){f.wrapMethod("getItemModel",function(h,d){var v=o.getNodeByDataIndex(d);return v&&v.children.length&&v.isExpand||(h.parentModel=a),h})}var l=0;o.eachNode("preorder",function(f){f.depth>l&&(l=f.depth)});var u=r.expandAndCollapse,c=u&&r.initialTreeDepth>=0?r.initialTreeDepth:l;return o.root.eachNode("preorder",function(f){var h=f.hostTree.data.getRawDataItem(f.dataIndex);f.isExpand=h&&h.collapsed!=null?!h.collapsed:f.depth<=c}),o.data},t.prototype.getOrient=function(){var r=this.get("orient");return r==="horizontal"?r="LR":r==="vertical"&&(r="TB"),r},t.prototype.setZoom=function(r){this.option.zoom=r},t.prototype.setCenter=function(r){this.option.center=r},t.prototype.formatTooltip=function(r,n,i){for(var a=this.getData().tree,o=a.root.children[0],s=a.getNodeByDataIndex(r),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return Mr("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},t.prototype.getDataParams=function(r){var n=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=oC(i,this),n.collapsed=!i.isExpand,n},t.type="series.tree",t.layoutMode="box",t.defaultOption={z:2,coordinateSystemUsage:"box",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,roamTrigger:"global",nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:J.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},t}(Ct);function RWe(e,t,r){for(var n=[e],i=[],a;a=n.pop();)if(i.push(a),a.isExpand){var o=a.children;if(o.length)for(var s=0;s<o.length;s++)n.push(o[s])}for(;a=i.pop();)t(a,r)}function rg(e,t){for(var r=[e],n;n=r.pop();)if(t(n),n.isExpand){var i=n.children;if(i.length)for(var a=i.length-1;a>=0;a--)r.push(i[a])}}function BWe(e,t){e.eachSeriesByType("tree",function(r){zWe(r,t)})}function zWe(e,t){var r=zr(e,t).refContainer,n=$t(e.getBoxLayoutParams(),r);e.layoutInfo=n;var i=e.get("layout"),a=0,o=0,s=null;i==="radial"?(a=2*Math.PI,o=Math.min(n.height,n.width)/2,s=CW(function(S,T){return(S.parentNode===T.parentNode?1:2)/S.depth})):(a=n.width,o=n.height,s=CW());var l=e.getData().tree.root,u=l.children[0];if(u){gWe(l),RWe(u,mWe,s),l.hierNode.modifier=-u.hierNode.prelim,rg(u,yWe);var c=u,f=u,h=u;rg(u,function(S){var T=S.getLayout().x;T<c.getLayout().x&&(c=S),T>f.getLayout().x&&(f=S),S.depth>h.depth&&(h=S)});var d=c===f?1:s(c,f)/2,v=d-c.getLayout().x,m=0,y=0,x=0,_=0;if(i==="radial")m=a/(f.getLayout().x+d+v),y=o/(h.depth-1||1),rg(u,function(S){x=(S.getLayout().x+v)*m,_=(S.depth-1)*y;var T=Mg(x,_);S.setLayout({x:T.x,y:T.y,rawX:x,rawY:_},!0)});else{var b=e.getOrient();b==="RL"||b==="LR"?(y=o/(f.getLayout().x+d+v),m=a/(h.depth-1||1),rg(u,function(S){_=(S.getLayout().x+v)*y,x=b==="LR"?(S.depth-1)*m:a-(S.depth-1)*m,S.setLayout({x,y:_},!0)})):(b==="TB"||b==="BT")&&(m=a/(f.getLayout().x+d+v),y=o/(h.depth-1||1),rg(u,function(S){x=(S.getLayout().x+v)*m,_=b==="TB"?(S.depth-1)*y:o-(S.depth-1)*y,S.setLayout({x,y:_},!0)}))}}}function $We(e){e.eachSeriesByType("tree",function(t){var r=t.getData(),n=r.tree;n.eachNode(function(i){var a=i.getModel(),o=a.getModel("itemStyle").getItemStyle(),s=r.ensureUniqueItemVisual(i.dataIndex,"style");ae(s,o)})})}function FWe(e){e.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,r){r.eachComponent({mainType:"series",subType:"tree",query:t},function(n){var i=t.dataIndex,a=n.getData().tree,o=a.getNodeByDataIndex(i);o.isExpand=!o.isExpand})}),e.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(t,r,n){r.eachComponent({mainType:"series",subType:"tree",query:t},function(i){var a=i.coordinateSystem,o=iC(a,t,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}function VWe(e){e.registerChartView(AWe),e.registerSeriesModel(jWe),e.registerLayout(BWe),e.registerVisual($We),FWe(e)}var LW=["treemapZoomToNode","treemapRender","treemapMove"];function GWe(e){for(var t=0;t<LW.length;t++)e.registerAction({type:LW[t],update:"updateView"},sr);e.registerAction({type:"treemapRootToNode",update:"updateView"},function(r,n){n.eachComponent({mainType:"series",subType:"treemap",query:r},i);function i(a,o){var s=["treemapZoomToNode","treemapRootToNode"],l=Ry(r,s,a);if(l){var u=a.getViewRoot();u&&(r.direction=nR(u,l.node)?"rollUp":"drillDown"),a.resetViewRoot(l.node)}}})}function Yre(e){var t=e.getData(),r=t.tree,n={};r.eachNode(function(i){for(var a=i;a&&a.depth>1;)a=a.parentNode;var o=zI(e.ecModel,a.name||a.dataIndex+"",n);i.setVisual("decal",o)})}var WWe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.preventUsingHoverLayer=!0,r}return t.prototype.getInitialData=function(r,n){var i={name:r.name,children:r.data};Xre(i);var a=r.levels||[],o=this.designatedVisualItemStyle={},s=new rt({itemStyle:o},this,n);a=r.levels=HWe(a,n);var l=le(a||[],function(f){return new rt(f,s,n)},this),u=rR.createTree(i,this,c);function c(f){f.wrapMethod("getItemModel",function(h,d){var v=u.getNodeByDataIndex(d),m=v?l[v.depth]:null;return h.parentModel=m||s,h})}return u.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=this.getRawValue(r),s=a.getName(r);return Mr("nameValue",{name:s,value:o})},t.prototype.getDataParams=function(r){var n=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=oC(i,this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(r){this.layoutInfo=this.layoutInfo||{},ae(this.layoutInfo,r)},t.prototype.mapIdToIndex=function(r){var n=this._idIndexMap;n||(n=this._idIndexMap=Ce(),this._idIndexMapCount=0);var i=n.get(r);return i==null&&n.set(r,i=this._idIndexMapCount++),i},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var n=this.getRawData().tree.root;(!r||r!==n&&!n.contains(r))&&(this._viewRoot=n)},t.prototype.enableAriaDecal=function(){Yre(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,coordinateSystemUsage:"box",left:J.size.l,top:J.size.xxxl,right:J.size.l,bottom:J.size.xxxl,sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:"global",nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",bottom:J.size.m,emptyItemWidth:25,itemStyle:{color:J.color.backgroundShade,textStyle:{color:J.color.secondary}},emphasis:{itemStyle:{color:J.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:J.color.neutral00,overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:J.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},t}(Ct);function Xre(e){var t=0;R(e.children,function(n){Xre(n);var i=n.value;oe(i)&&(i=i[0]),t+=i});var r=e.value;oe(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=t),r<0&&(r=0),oe(e.value)?e.value[0]=r:e.value=r}function HWe(e,t){var r=Lt(t.get("color")),n=Lt(t.get(["aria","decal","decals"]));if(r){e=e||[];var i,a;R(e,function(s){var l=new rt(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(a=!0)});var o=e[0]||(e[0]={});return i||(o.color=r.slice()),!a&&n&&(o.decal=n.slice()),e}}var UWe=8,IW=8,_M=5,ZWe=function(){function e(t){this.group=new Ie,t.add(this.group)}return e.prototype.render=function(t,r,n,i){var a=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!a.get("show")||!n)){var s=a.getModel("itemStyle"),l=a.getModel("emphasis"),u=s.getModel("textStyle"),c=l.getModel(["itemStyle","textStyle"]),f=zr(t,r).refContainer,h={left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},d={emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]},v=$t(h,f);this._prepare(n,d,u),this._renderContent(t,d,v,s,l,u,c,i),ZT(o,h,f)}},e.prototype._prepare=function(t,r,n){for(var i=t;i;i=i.parentNode){var a=Dr(i.getModel().get("name"),""),o=n.getTextRect(a),s=Math.max(o.width+UWe*2,r.emptyItemWidth);r.totalWidth+=s+IW,r.renderList.push({node:i,text:a,width:s})}},e.prototype._renderContent=function(t,r,n,i,a,o,s,l){for(var u=0,c=r.emptyItemWidth,f=t.get(["breadcrumb","height"]),h=r.totalWidth,d=r.renderList,v=a.getModel("itemStyle").getItemStyle(),m=d.length-1;m>=0;m--){var y=d[m],x=y.node,_=y.width,b=y.text;h>n.width&&(h-=_-c,_=c,b=null);var S=new Tn({shape:{points:YWe(u,0,_,f,m===d.length-1,m===0)},style:Oe(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new ot({style:kt(o,{text:b})}),textConfig:{position:"inside"},z2:zv*1e4,onclick:We(l,x)});S.disableLabelAnimation=!0,S.getTextContent().ensureState("emphasis").style=kt(s,{text:b}),S.ensureState("emphasis").style=v,Gt(S,a.get("focus"),a.get("blurScope"),a.get("disabled")),this.group.add(S),XWe(S,t,x),u+=_+IW}},e.prototype.remove=function(){this.group.removeAll()},e}();function YWe(e,t,r,n,i,a){var o=[[i?e:e-_M,t],[e+r,t],[e+r,t+n],[i?e:e-_M,t+n]];return!a&&o.splice(2,0,[e+r+_M,t+n/2]),!i&&o.push([e,t+n/2]),o}function XWe(e,t,r){ze(e).eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:r&&r.dataIndex,name:r&&r.name},treePathInfo:r&&oC(r,t)}}var qWe=function(){function e(){this._storage=[],this._elExistsMap={}}return e.prototype.add=function(t,r,n,i,a){return this._elExistsMap[t.id]?!1:(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:r,duration:n,delay:i,easing:a}),!0)},e.prototype.finished=function(t){return this._finishedCallback=t,this},e.prototype.start=function(){for(var t=this,r=this._storage.length,n=function(){r--,r<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},i=0,a=this._storage.length;i<a;i++){var o=this._storage[i];o.el.animateTo(o.target,{duration:o.duration,delay:o.delay,easing:o.easing,setToFinal:!0,done:n,aborted:n})}return this},e}();function KWe(){return new qWe}var SO=Ie,OW=qe,EW=3,DW="label",NW="upperLabel",JWe=zv*10,QWe=zv*2,e8e=zv*3,mc=df([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),jW=function(e){var t=mc(e);return t.stroke=t.fill=t.lineWidth=null,t},Uw=et(),t8e=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._state="ready",r._storage=ng(),r}return t.prototype.render=function(r,n,i,a){var o=n.findComponents({mainType:"series",subType:"treemap",query:a});if(!(He(o,r)<0)){this.seriesModel=r,this.api=i,this.ecModel=n;var s=["treemapZoomToNode","treemapRootToNode"],l=Ry(a,s,r),u=a&&a.type,c=r.layoutInfo,f=!this._oldTree,h=this._storage,d=u==="treemapRootToNode"&&l&&h?{rootNodeGroup:h.nodeGroup[l.node.getRawIndex()],direction:a.direction}:null,v=this._giveContainerGroup(c),m=r.get("animation"),y=this._doRender(v,r,d);m&&!f&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(v,y,r,d):y.renderFinally(),this._resetController(i),this._renderBreadcrumb(r,i,l)}},t.prototype._giveContainerGroup=function(r){var n=this._containerGroup;return n||(n=this._containerGroup=new SO,this._initEvents(n),this.group.add(n)),n.x=r.x,n.y=r.y,n},t.prototype._doRender=function(r,n,i){var a=n.getData().tree,o=this._oldTree,s=ng(),l=ng(),u=this._storage,c=[];function f(_,b,S,T){return r8e(n,l,u,i,s,c,_,b,S,T)}m(a.root?[a.root]:[],o&&o.root?[o.root]:[],r,a===o||!o,0);var h=y(u);if(this._oldTree=a,this._storage=l,this._controllerHost){var d=this.seriesModel.layoutInfo,v=a.root.getLayout();v.width===d.width&&v.height===d.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:s,willDeleteEls:h,renderFinally:x};function m(_,b,S,T,C){T?(b=_,R(_,function(I,k){!I.isRemoved()&&P(k,k)})):new Ys(b,_,A,A).add(P).update(P).remove(We(P,null)).execute();function A(I){return I.getId()}function P(I,k){var E=I!=null?_[I]:null,D=k!=null?b[k]:null,N=f(E,D,S,C);N&&m(E&&E.viewChildren||[],D&&D.viewChildren||[],N,T,C+1)}}function y(_){var b=ng();return _&&R(_,function(S,T){var C=b[T];R(S,function(A){A&&(C.push(A),Uw(A).willDelete=!0)})}),b}function x(){R(h,function(_){R(_,function(b){b.parent&&b.parent.remove(b)})}),R(c,function(_){_.invisible=!0,_.dirty()})}},t.prototype._doAnimation=function(r,n,i,a){var o=i.get("animationDurationUpdate"),s=i.get("animationEasing"),l=(ke(o)?0:o)||0,u=(ke(s)?null:s)||"cubicOut",c=KWe();R(n.willDeleteEls,function(f,h){R(f,function(d,v){if(!d.invisible){var m=d.parent,y,x=Uw(m);if(a&&a.direction==="drillDown")y=m===a.rootNodeGroup?{shape:{x:0,y:0,width:x.nodeWidth,height:x.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var _=0,b=0;x.willDelete||(_=x.nodeWidth/2,b=x.nodeHeight/2),y=h==="nodeGroup"?{x:_,y:b,style:{opacity:0}}:{shape:{x:_,y:b,width:0,height:0},style:{opacity:0}}}y&&c.add(d,y,l,0,u)}})}),R(this._storage,function(f,h){R(f,function(d,v){var m=n.lastsForAnimation[h][v],y={};m&&(d instanceof Ie?m.oldX!=null&&(y.x=d.x,y.y=d.y,d.x=m.oldX,d.y=m.oldY):(m.oldShape&&(y.shape=ae({},d.shape),d.setShape(m.oldShape)),m.fadein?(d.setStyle("opacity",0),y.style={opacity:1}):d.style.opacity!==1&&(y.style={opacity:1})),c.add(d,y,l,0,u))})},this),this._state="animating",c.finished(_e(function(){this._state="ready",n.renderFinally()},this)).start()},t.prototype._resetController=function(r){var n=this,i=this._controller,a=this._controllerHost;a||(this._controllerHost={target:this.group},a=this._controllerHost);var o=this.seriesModel;i||(i=this._controller=new Rf(r.getZr()),i.on("pan",_e(this._onPan,this)),i.on("zoom",_e(this._onZoom,this))),i.enable(o.get("roam"),{api:r,zInfo:{component:o},triggerInfo:{roamTrigger:o.get("roamTrigger"),isInSelf:function(s,l,u){var c=n._containerGroup;return c?c.getBoundingRect().contain(l-c.x,u-c.y):!1}}}),a.zoomLimit=o.get("scaleLimit"),a.zoom=o.get("zoom")},t.prototype._clearController=function(){var r=this._controller;this._controllerHost=null,r&&(r.dispose(),r=null)},t.prototype._onPan=function(r){if(this._state!=="animating"&&(Math.abs(r.dx)>EW||Math.abs(r.dy)>EW)){var n=this.seriesModel.getData().tree.root;if(!n)return;var i=n.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+r.dx,y:i.y+r.dy,width:i.width,height:i.height}})}},t.prototype._onZoom=function(r){var n=r.originX,i=r.originY,a=r.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new je(s.x,s.y,s.width,s.height),u=null,c=this._controllerHost;u=c.zoomLimit;var f=c.zoom=c.zoom||1;if(f*=a,u){var h=u.min||0,d=u.max||1/0;f=Math.max(Math.min(d,f),h)}var v=f/c.zoom;c.zoom=f;var m=this.seriesModel.layoutInfo;n-=m.x,i-=m.y;var y=Yr();Ka(y,y,[-n,-i]),IT(y,y,[v,v]),Ka(y,y,[n,i]),l.applyTransform(y),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},t.prototype._initEvents=function(r){var n=this;r.on("click",function(i){if(n._state==="ready"){var a=n.seriesModel.get("nodeClick",!0);if(a){var o=n.findTarget(i.offsetX,i.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)n._rootToNode(o);else if(a==="zoomToNode")n._zoomToNode(o);else if(a==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),c=l.get("target",!0)||"blank";u&&ww(u,c)}}}}},this)},t.prototype._renderBreadcrumb=function(r,n,i){var a=this;i||(i=r.get("leafDepth",!0)!=null?{node:r.getViewRoot()}:this.findTarget(n.getWidth()/2,n.getHeight()/2),i||(i={node:r.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new ZWe(this.group))).render(r,n,i.node,function(o){a._state!=="animating"&&(nR(r.getViewRoot(),o)?a._rootToNode({node:o}):a._zoomToNode({node:o}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=ng(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(r){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},t.prototype._rootToNode=function(r){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},t.prototype.findTarget=function(r,n){var i,a=this.seriesModel.getViewRoot();return a.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(r,n),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)i={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),i},t.type="treemap",t}(bt);function ng(){return{nodeGroup:[],background:[],content:[]}}function r8e(e,t,r,n,i,a,o,s,l,u){if(!o)return;var c=o.getLayout(),f=e.getData(),h=o.getModel();if(f.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var d=c.width,v=c.height,m=c.borderWidth,y=c.invisible,x=o.getRawIndex(),_=s&&s.getRawIndex(),b=o.viewChildren,S=c.upperHeight,T=b&&b.length,C=h.getModel("itemStyle"),A=h.getModel(["emphasis","itemStyle"]),P=h.getModel(["blur","itemStyle"]),I=h.getModel(["select","itemStyle"]),k=C.get("borderRadius")||0,E=ue("nodeGroup",SO);if(!E)return;if(l.add(E),E.x=c.x||0,E.y=c.y||0,E.markRedraw(),Uw(E).nodeWidth=d,Uw(E).nodeHeight=v,c.isAboveViewRoot)return E;var D=ue("background",OW,u,QWe);D&&U(E,D,T&&c.upperLabelHeight);var N=h.getModel("emphasis"),z=N.get("focus"),V=N.get("blurScope"),F=N.get("disabled"),$=z==="ancestor"?o.getAncestorsIndices():z==="descendant"?o.getDescendantIndices():z;if(T)wy(E)&&Nc(E,!1),D&&(Nc(D,!F),f.setItemGraphicEl(o.dataIndex,D),PI(D,$,V));else{var B=ue("content",OW,u,e8e);B&&Y(E,B),D.disableMorphing=!0,D&&wy(D)&&Nc(D,!1),Nc(E,!F),f.setItemGraphicEl(o.dataIndex,E);var H=h.getShallow("cursor");H&&B.attr("cursor",H),PI(E,$,V)}return E;function U(xe,ie,ve){var ce=ze(ie);if(ce.dataIndex=o.dataIndex,ce.seriesIndex=e.seriesIndex,ie.setShape({x:0,y:0,width:d,height:v,r:k}),y)Z(ie);else{ie.invisible=!1;var X=o.getVisual("style"),te=X.stroke,pe=jW(C);pe.fill=te;var Te=mc(A);Te.fill=A.get("borderColor");var Me=mc(P);Me.fill=P.get("borderColor");var Xe=mc(I);if(Xe.fill=I.get("borderColor"),ve){var At=d-2*m;Q(ie,te,X.opacity,{x:m,y:0,width:At,height:S})}else ie.removeTextContent();ie.setStyle(pe),ie.ensureState("emphasis").style=Te,ie.ensureState("blur").style=Me,ie.ensureState("select").style=Xe,vf(ie)}xe.add(ie)}function Y(xe,ie){var ve=ze(ie);ve.dataIndex=o.dataIndex,ve.seriesIndex=e.seriesIndex;var ce=Math.max(d-2*m,0),X=Math.max(v-2*m,0);if(ie.culling=!0,ie.setShape({x:m,y:m,width:ce,height:X,r:k}),y)Z(ie);else{ie.invisible=!1;var te=o.getVisual("style"),pe=te.fill,Te=jW(C);Te.fill=pe,Te.decal=te.decal;var Me=mc(A),Xe=mc(P),At=mc(I);Q(ie,pe,te.opacity,null),ie.setStyle(Te),ie.ensureState("emphasis").style=Me,ie.ensureState("blur").style=Xe,ie.ensureState("select").style=At,vf(ie)}xe.add(ie)}function Z(xe){!xe.invisible&&a.push(xe)}function Q(xe,ie,ve,ce){var X=h.getModel(ce?NW:DW),te=Dr(h.get("name"),null),pe=X.getShallow("show");qr(xe,Br(h,ce?NW:DW),{defaultText:pe?te:null,inheritColor:ie,defaultOpacity:ve,labelFetcher:e,labelDataIndex:o.dataIndex});var Te=xe.getTextContent();if(Te){var Me=Te.style,Xe=u0(Me.padding||0);ce&&(xe.setTextConfig({layoutRect:ce}),Te.disableLabelLayout=!0),Te.beforeUpdate=function(){var Wt=Math.max((ce?ce.width:xe.shape.width)-Xe[1]-Xe[3],0),$r=Math.max((ce?ce.height:xe.shape.height)-Xe[0]-Xe[2],0);(Me.width!==Wt||Me.height!==$r)&&Te.setStyle({width:Wt,height:$r})},Me.truncateMinChar=2,Me.lineOverflow="truncate",re(Me,ce,c);var At=Te.getState("emphasis");re(At?At.style:null,ce,c)}}function re(xe,ie,ve){var ce=xe?xe.text:null;if(!ie&&ve.isLeafRoot&&ce!=null){var X=e.get("drillDownIcon",!0);xe.text=X?X+" "+ce:ce}}function ue(xe,ie,ve,ce){var X=_!=null&&r[xe][_],te=i[xe];return X?(r[xe][_]=null,de(te,X)):y||(X=new ie,X instanceof ga&&(X.z2=n8e(ve,ce)),Re(te,X)),t[xe][x]=X}function de(xe,ie){var ve=xe[x]={};ie instanceof SO?(ve.oldX=ie.x,ve.oldY=ie.y):ve.oldShape=ae({},ie.shape)}function Re(xe,ie){var ve=xe[x]={},ce=o.parentNode,X=ie instanceof Ie;if(ce&&(!n||n.direction==="drillDown")){var te=0,pe=0,Te=i.background[ce.getRawIndex()];!n&&Te&&Te.oldShape&&(te=Te.oldShape.width,pe=Te.oldShape.height),X?(ve.oldX=0,ve.oldY=pe):ve.oldShape={x:te,y:pe,width:0,height:0}}ve.fadein=!X}}function n8e(e,t){return e*JWe+t}var By=R,i8e=Ee,Zw=-1,Xr=function(){function e(t){var r=t.mappingMethod,n=t.type,i=this.option=Le(t);this.type=n,this.mappingMethod=r,this._normalizeData=s8e[r];var a=e.visualHandlers[n];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[r],r==="piecewise"?(bM(i),a8e(i)):r==="category"?i.categories?o8e(i):bM(i,!0):(wn(r!=="linear"||i.dataExtent),bM(i))}return e.prototype.mapValueToVisual=function(t){var r=this._normalizeData(t);return this._normalizedToVisual(r,t)},e.prototype.getNormalizer=function(){return _e(this._normalizeData,this)},e.listVisualTypes=function(){return at(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(t,r,n){Ee(t)?R(t,r,n):r.call(n,t)},e.mapVisual=function(t,r,n){var i,a=oe(t)?[]:Ee(t)?{}:(i=!0,null);return e.eachVisual(t,function(o,s){var l=r.call(n,o,s);i?a=l:a[s]=l}),a},e.retrieveVisuals=function(t){var r={},n;return t&&By(e.visualHandlers,function(i,a){t.hasOwnProperty(a)&&(r[a]=t[a],n=!0)}),n?r:null},e.prepareVisualTypes=function(t){if(oe(t))t=t.slice();else if(i8e(t)){var r=[];By(t,function(n,i){r.push(i)}),t=r}else return[];return t.sort(function(n,i){return i==="color"&&n!=="color"&&n.indexOf("color")===0?1:-1}),t},e.dependsOn=function(t,r){return r==="color"?!!(t&&t.indexOf(r)===0):t===r},e.findPieceIndex=function(t,r,n){for(var i,a=1/0,o=0,s=r.length;o<s;o++){var l=r[o].value;if(l!=null){if(l===t||ye(l)&&l===t+"")return o;n&&h(l,o)}}for(var o=0,s=r.length;o<s;o++){var u=r[o],c=u.interval,f=u.close;if(c){if(c[0]===-1/0){if(S_(f[1],t,c[1]))return o}else if(c[1]===1/0){if(S_(f[0],c[0],t))return o}else if(S_(f[0],c[0],t)&&S_(f[1],t,c[1]))return o;n&&h(c[0],o),n&&h(c[1],o)}}if(n)return t===1/0?r.length-1:t===-1/0?0:i;function h(d,v){var m=Math.abs(d-t);m<a&&(a=m,i=v)}},e.visualHandlers={color:{applyVisual:ig("color"),getColorMapper:function(){var t=this.option;return _e(t.mappingMethod==="category"?function(r,n){return!n&&(r=this._normalizeData(r)),Pg.call(this,r)}:function(r,n,i){var a=!!i;return!n&&(r=this._normalizeData(r)),i=Kg(r,t.parsedVisual,i),a?i:ua(i,"rgba")},this)},_normalizedToVisual:{linear:function(t){return ua(Kg(t,this.option.parsedVisual),"rgba")},category:Pg,piecewise:function(t,r){var n=CO.call(this,r);return n==null&&(n=ua(Kg(t,this.option.parsedVisual),"rgba")),n},fixed:yc}},colorHue:w_(function(t,r){return Is(t,r)}),colorSaturation:w_(function(t,r){return Is(t,null,r)}),colorLightness:w_(function(t,r){return Is(t,null,null,r)}),colorAlpha:w_(function(t,r){return my(t,r)}),decal:{applyVisual:ig("decal"),_normalizedToVisual:{linear:null,category:Pg,piecewise:null,fixed:null}},opacity:{applyVisual:ig("opacity"),_normalizedToVisual:TO([0,1])},liftZ:{applyVisual:ig("liftZ"),_normalizedToVisual:{linear:yc,category:yc,piecewise:yc,fixed:yc}},symbol:{applyVisual:function(t,r,n){var i=this.mapValueToVisual(t);n("symbol",i)},_normalizedToVisual:{linear:RW,category:Pg,piecewise:function(t,r){var n=CO.call(this,r);return n==null&&(n=RW.call(this,t)),n},fixed:yc}},symbolSize:{applyVisual:ig("symbolSize"),_normalizedToVisual:TO([0,1])}},e}();function a8e(e){var t=e.pieceList;e.hasSpecialVisual=!1,R(t,function(r,n){r.originIndex=n,r.visual!=null&&(e.hasSpecialVisual=!0)})}function o8e(e){var t=e.categories,r=e.categoryMap={},n=e.visual;if(By(t,function(o,s){r[o]=s}),!oe(n)){var i=[];Ee(n)?By(n,function(o,s){var l=r[s];i[l??Zw]=o}):i[Zw]=n,n=qre(e,i)}for(var a=t.length-1;a>=0;a--)n[a]==null&&(delete r[t[a]],t.pop())}function bM(e,t){var r=e.visual,n=[];Ee(r)?By(r,function(a){n.push(a)}):r!=null&&n.push(r);var i={color:1,symbol:1};!t&&n.length===1&&!i.hasOwnProperty(e.type)&&(n[1]=n[0]),qre(e,n)}function w_(e){return{applyVisual:function(t,r,n){var i=this.mapValueToVisual(t);n("color",e(r("color"),i))},_normalizedToVisual:TO([0,1])}}function RW(e){var t=this.option.visual;return t[Math.round(gt(e,[0,1],[0,t.length-1],!0))]||{}}function ig(e){return function(t,r,n){n(e,this.mapValueToVisual(t))}}function Pg(e){var t=this.option.visual;return t[this.option.loop&&e!==Zw?e%t.length:e]}function yc(){return this.option.visual[0]}function TO(e){return{linear:function(t){return gt(t,e,this.option.visual,!0)},category:Pg,piecewise:function(t,r){var n=CO.call(this,r);return n==null&&(n=gt(t,e,this.option.visual,!0)),n},fixed:yc}}function CO(e){var t=this.option,r=t.pieceList;if(t.hasSpecialVisual){var n=Xr.findPieceIndex(e,r),i=r[n];if(i&&i.visual)return i.visual[this.type]}}function qre(e,t){return e.visual=t,e.type==="color"&&(e.parsedVisual=le(t,function(r){var n=jn(r);return n||[0,0,0,1]})),t}var s8e={linear:function(e){return gt(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,r=Xr.findPieceIndex(e,t,!0);if(r!=null)return gt(r,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return t??Zw},fixed:sr};function S_(e,t,r){return e?t<=r:t<r}var l8e="itemStyle",Kre=et();const u8e={seriesType:"treemap",reset:function(e){var t=e.getData().tree,r=t.root;r.isRemoved()||Jre(r,{},e.getViewRoot().getAncestors(),e)}};function Jre(e,t,r,n){var i=e.getModel(),a=e.getLayout(),o=e.hostTree.data;if(!(!a||a.invisible||!a.isInView)){var s=i.getModel(l8e),l=c8e(s,t,n),u=o.ensureUniqueItemVisual(e.dataIndex,"style"),c=s.get("borderColor"),f=s.get("borderColorSaturation"),h;f!=null&&(h=BW(l),c=f8e(f,h)),u.stroke=c;var d=e.viewChildren;if(!d||!d.length)h=BW(l),u.fill=h;else{var v=h8e(e,i,a,s,l,d);R(d,function(m,y){if(m.depth>=r.length||m===r[m.depth]){var x=d8e(i,l,m,y,v,n);Jre(m,x,r,n)}})}}}function c8e(e,t,r){var n=ae({},t),i=r.designatedVisualItemStyle;return R(["color","colorAlpha","colorSaturation"],function(a){i[a]=t[a];var o=e.get(a);i[a]=null,o!=null&&(n[a]=o)}),n}function BW(e){var t=wM(e,"color");if(t){var r=wM(e,"colorAlpha"),n=wM(e,"colorSaturation");return n&&(t=Is(t,null,null,n)),r&&(t=my(t,r)),t}}function f8e(e,t){return t!=null?Is(t,null,null,e):null}function wM(e,t){var r=e[t];if(r!=null&&r!=="none")return r}function h8e(e,t,r,n,i,a){if(!(!a||!a.length)){var o=SM(t,"color")||i.color!=null&&i.color!=="none"&&(SM(t,"colorAlpha")||SM(t,"colorSaturation"));if(o){var s=t.get("visualMin"),l=t.get("visualMax"),u=r.dataExtent.slice();s!=null&&s<u[0]&&(u[0]=s),l!=null&&l>u[1]&&(u[1]=l);var c=t.get("colorMappingBy"),f={type:o.name,dataExtent:u,visual:o.range};f.type==="color"&&(c==="index"||c==="id")?(f.mappingMethod="category",f.loop=!0):f.mappingMethod="linear";var h=new Xr(f);return Kre(h).drColorMappingBy=c,h}}}function SM(e,t){var r=e.get(t);return oe(r)&&r.length?{name:t,range:r}:null}function d8e(e,t,r,n,i,a){var o=ae({},t);if(i){var s=i.type,l=s==="color"&&Kre(i).drColorMappingBy,u=l==="index"?n:l==="id"?a.mapIdToIndex(r.getId()):r.getValue(e.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var zy=Math.max,Yw=Math.min,zW=on,iR=R,Qre=["itemStyle","borderWidth"],v8e=["itemStyle","gapWidth"],p8e=["upperLabel","show"],g8e=["upperLabel","height"];const m8e={seriesType:"treemap",reset:function(e,t,r,n){var i=e.option,a=zr(e,r).refContainer,o=$t(e.getBoxLayoutParams(),a),s=i.size||[],l=me(zW(o.width,s[0]),a.width),u=me(zW(o.height,s[1]),a.height),c=n&&n.type,f=["treemapZoomToNode","treemapRootToNode"],h=Ry(n,f,e),d=c==="treemapRender"||c==="treemapMove"?n.rootRect:null,v=e.getViewRoot(),m=Zre(v);if(c!=="treemapMove"){var y=c==="treemapZoomToNode"?S8e(e,h,v,l,u):d?[d.width,d.height]:[l,u],x=i.sort;x&&x!=="asc"&&x!=="desc"&&(x="desc");var _={squareRatio:i.squareRatio,sort:x,leafDepth:i.leafDepth};v.hostTree.clearLayouts();var b={x:0,y:0,width:y[0],height:y[1],area:y[0]*y[1]};v.setLayout(b),ene(v,_,!1,0),b=v.getLayout(),iR(m,function(T,C){var A=(m[C+1]||v).getValue();T.setLayout(ae({dataExtent:[A,A],borderWidth:0,upperHeight:0},b))})}var S=e.getData().tree.root;S.setLayout(T8e(o,d,h),!0),e.setLayoutInfo(o),tne(S,new je(-o.x,-o.y,r.getWidth(),r.getHeight()),m,v,0)}};function ene(e,t,r,n){var i,a;if(!e.isRemoved()){var o=e.getLayout();i=o.width,a=o.height;var s=e.getModel(),l=s.get(Qre),u=s.get(v8e)/2,c=rne(s),f=Math.max(l,c),h=l-u,d=f-u;e.setLayout({borderWidth:l,upperHeight:f,upperLabelHeight:c},!0),i=zy(i-2*h,0),a=zy(a-h-d,0);var v=i*a,m=y8e(e,s,v,t,r,n);if(m.length){var y={x:h,y:d,width:i,height:a},x=Yw(i,a),_=1/0,b=[];b.area=0;for(var S=0,T=m.length;S<T;){var C=m[S];b.push(C),b.area+=C.getLayout().area;var A=w8e(b,x,t.squareRatio);A<=_?(S++,_=A):(b.area-=b.pop().getLayout().area,$W(b,x,y,u,!1),x=Yw(y.width,y.height),b.length=b.area=0,_=1/0)}if(b.length&&$W(b,x,y,u,!0),!r){var P=s.get("childrenVisibleMin");P!=null&&v<P&&(r=!0)}for(var S=0,T=m.length;S<T;S++)ene(m[S],t,r,n+1)}}}function y8e(e,t,r,n,i,a){var o=e.children||[],s=n.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=n.leafDepth!=null&&n.leafDepth<=a;if(i&&!l)return e.viewChildren=[];o=dt(o,function(d){return!d.isRemoved()}),_8e(o,s);var u=b8e(t,o,s);if(u.sum===0)return e.viewChildren=[];if(u.sum=x8e(t,r,u.sum,s,o),u.sum===0)return e.viewChildren=[];for(var c=0,f=o.length;c<f;c++){var h=o[c].getValue()/u.sum*r;o[c].setLayout({area:h})}return l&&(o.length&&e.setLayout({isLeafRoot:!0},!0),o.length=0),e.viewChildren=o,e.setLayout({dataExtent:u.dataExtent},!0),o}function x8e(e,t,r,n,i){if(!n)return r;for(var a=e.get("visibleMin"),o=i.length,s=o,l=o-1;l>=0;l--){var u=i[n==="asc"?o-l-1:l].getValue();u/r*t<a&&(s=l,r-=u)}return n==="asc"?i.splice(0,o-s):i.splice(s,o-s),r}function _8e(e,t){return t&&e.sort(function(r,n){var i=t==="asc"?r.getValue()-n.getValue():n.getValue()-r.getValue();return i===0?t==="asc"?r.dataIndex-n.dataIndex:n.dataIndex-r.dataIndex:i}),e}function b8e(e,t,r){for(var n=0,i=0,a=t.length;i<a;i++)n+=t[i].getValue();var o=e.get("visualDimension"),s;return!t||!t.length?s=[NaN,NaN]:o==="value"&&r?(s=[t[t.length-1].getValue(),t[0].getValue()],r==="asc"&&s.reverse()):(s=[1/0,-1/0],iR(t,function(l){var u=l.getValue(o);u<s[0]&&(s[0]=u),u>s[1]&&(s[1]=u)})),{sum:n,dataExtent:s}}function w8e(e,t,r){for(var n=0,i=1/0,a=0,o=void 0,s=e.length;a<s;a++)o=e[a].getLayout().area,o&&(o<i&&(i=o),o>n&&(n=o));var l=e.area*e.area,u=t*t*r;return l?zy(u*n/l,l/(u*i)):1/0}function $W(e,t,r,n,i){var a=t===r.width?0:1,o=1-a,s=["x","y"],l=["width","height"],u=r[s[a]],c=t?e.area/t:0;(i||c>r[l[o]])&&(c=r[l[o]]);for(var f=0,h=e.length;f<h;f++){var d=e[f],v={},m=c?d.getLayout().area/c:0,y=v[l[o]]=zy(c-2*n,0),x=r[s[a]]+r[l[a]]-u,_=f===h-1||x<m?x:m,b=v[l[a]]=zy(_-2*n,0);v[s[o]]=r[s[o]]+Yw(n,y/2),v[s[a]]=u+Yw(n,b/2),u+=_,d.setLayout(v,!0)}r[s[o]]+=c,r[l[o]]-=c}function S8e(e,t,r,n,i){var a=(t||{}).node,o=[n,i];if(!a||a===r)return o;for(var s,l=n*i,u=l*e.option.zoomToNodeRatio;s=a.parentNode;){for(var c=0,f=s.children,h=0,d=f.length;h<d;h++)c+=f[h].getValue();var v=a.getValue();if(v===0)return o;u*=c/v;var m=s.getModel(),y=m.get(Qre),x=Math.max(y,rne(m));u+=4*y*y+(3*y+x)*Math.pow(u,.5),u>mI&&(u=mI),a=s}u<l&&(u=l);var _=Math.pow(u/l,.5);return[n*_,i*_]}function T8e(e,t,r){if(t)return{x:t.x,y:t.y};var n={x:0,y:0};if(!r)return n;var i=r.node,a=i.getLayout();if(!a)return n;for(var o=[a.width/2,a.height/2],s=i;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:e.width/2-o[0],y:e.height/2-o[1]}}function tne(e,t,r,n,i){var a=e.getLayout(),o=r[i],s=o&&o===e;if(!(o&&!s||i===r.length&&e!==n)){e.setLayout({isInView:!0,invisible:!s&&!t.intersect(a),isAboveViewRoot:s},!0);var l=new je(t.x-a.x,t.y-a.y,t.width,t.height);iR(e.viewChildren||[],function(u){tne(u,l,r,n,i+1)})}}function rne(e){return e.get(p8e)?e.get(g8e):0}function C8e(e){e.registerSeriesModel(WWe),e.registerChartView(t8e),e.registerVisual(u8e),e.registerLayout(m8e),GWe(e)}function A8e(e){var t=e.findComponents({mainType:"legend"});!t||!t.length||e.eachSeriesByType("graph",function(r){var n=r.getCategoriesData(),i=r.getGraph(),a=i.data,o=n.mapArray(n.getName);a.filterSelf(function(s){var l=a.getItemModel(s),u=l.getShallow("category");if(u!=null){st(u)&&(u=o[u]);for(var c=0;c<t.length;c++)if(!t[c].isSelected(u))return!1}return!0})})}function M8e(e){var t={};e.eachSeriesByType("graph",function(r){var n=r.getCategoriesData(),i=r.getData(),a={};n.each(function(o){var s=n.getName(o);a["ec-"+s]=o;var l=n.getItemModel(o),u=l.getModel("itemStyle").getItemStyle();u.fill||(u.fill=r.getColorFromPalette(s,t)),n.setItemVisual(o,"style",u);for(var c=["symbol","symbolSize","symbolKeepAspect"],f=0;f<c.length;f++){var h=l.getShallow(c[f],!0);h!=null&&n.setItemVisual(o,c[f],h)}}),n.count()&&i.each(function(o){var s=i.getItemModel(o),l=s.getShallow("category");if(l!=null){ye(l)&&(l=a["ec-"+l]);var u=n.getItemVisual(l,"style"),c=i.ensureUniqueItemVisual(o,"style");ae(c,u);for(var f=["symbol","symbolSize","symbolKeepAspect"],h=0;h<f.length;h++)i.setItemVisual(o,f[h],n.getItemVisual(l,f[h]))}})})}function T_(e){return e instanceof Array||(e=[e,e]),e}function P8e(e){e.eachSeriesByType("graph",function(t){var r=t.getGraph(),n=t.getEdgeData(),i=T_(t.get("edgeSymbol")),a=T_(t.get("edgeSymbolSize"));n.setVisual("fromSymbol",i&&i[0]),n.setVisual("toSymbol",i&&i[1]),n.setVisual("fromSymbolSize",a&&a[0]),n.setVisual("toSymbolSize",a&&a[1]),n.setVisual("style",t.getModel("lineStyle").getLineStyle()),n.each(function(o){var s=n.getItemModel(o),l=r.getEdgeByIndex(o),u=T_(s.getShallow("symbol",!0)),c=T_(s.getShallow("symbolSize",!0)),f=s.getModel("lineStyle").getLineStyle(),h=n.ensureUniqueItemVisual(o,"style");switch(ae(h,f),h.stroke){case"source":{var d=l.node1.getVisual("style");h.stroke=d&&d.fill;break}case"target":{var d=l.node2.getVisual("style");h.stroke=d&&d.fill;break}}u[0]&&l.setVisual("fromSymbol",u[0]),u[1]&&l.setVisual("toSymbol",u[1]),c[0]&&l.setVisual("fromSymbolSize",c[0]),c[1]&&l.setVisual("toSymbolSize",c[1])})})}var AO="-->",sC=function(e){return e.get("autoCurveness")||null},nne=function(e,t){var r=sC(e),n=20,i=[];if(st(r))n=r;else if(oe(r)){e.__curvenessList=r;return}t>n&&(n=t);var a=n%2?n+2:n+3;i=[];for(var o=0;o<a;o++)i.push((o%2?o+1:o)/10*(o%2?-1:1));e.__curvenessList=i},$y=function(e,t,r){var n=[e.id,e.dataIndex].join("."),i=[t.id,t.dataIndex].join(".");return[r.uid,n,i].join(AO)},ine=function(e){var t=e.split(AO);return[t[0],t[2],t[1]].join(AO)},k8e=function(e,t){var r=$y(e.node1,e.node2,t);return t.__edgeMap[r]},L8e=function(e,t){var r=MO($y(e.node1,e.node2,t),t),n=MO($y(e.node2,e.node1,t),t);return r+n},MO=function(e,t){var r=t.__edgeMap;return r[e]?r[e].length:0};function I8e(e){sC(e)&&(e.__curvenessList=[],e.__edgeMap={},nne(e))}function O8e(e,t,r,n){if(sC(r)){var i=$y(e,t,r),a=r.__edgeMap,o=a[ine(i)];a[i]&&!o?a[i].isForward=!0:o&&a[i]&&(o.isForward=!0,a[i].isForward=!1),a[i]=a[i]||[],a[i].push(n)}}function aR(e,t,r,n){var i=sC(t),a=oe(i);if(!i)return null;var o=k8e(e,t);if(!o)return null;for(var s=-1,l=0;l<o.length;l++)if(o[l]===r){s=l;break}var u=L8e(e,t);nne(t,u),e.lineStyle=e.lineStyle||{};var c=$y(e.node1,e.node2,t),f=t.__curvenessList,h=a||u%2?0:1;if(o.isForward)return f[h+s];var d=ine(c),v=MO(d,t),m=f[s+v+h];return n?a?i&&i[0]===0?(v+h)%2?m:-m:((v%2?0:1)+h)%2?m:-m:(v+h)%2?m:-m:f[s+v+h]}function ane(e){var t=e.coordinateSystem;if(!(t&&t.type!=="view")){var r=e.getGraph();r.eachNode(function(n){var i=n.getModel();n.setLayout([+i.get("x"),+i.get("y")])}),oR(r,e)}}function oR(e,t){e.eachEdge(function(r,n){var i=ci(r.getModel().get(["lineStyle","curveness"]),-aR(r,t,n,!0),0),a=Ro(r.node1.getLayout()),o=Ro(r.node2.getLayout()),s=[a,o];+i&&s.push([(a[0]+o[0])/2-(a[1]-o[1])*i,(a[1]+o[1])/2-(o[0]-a[0])*i]),r.setLayout(s)})}function E8e(e,t){e.eachSeriesByType("graph",function(r){var n=r.get("layout"),i=r.coordinateSystem;if(i&&i.type!=="view"){var a=r.getData(),o=[];R(i.dimensions,function(h){o=o.concat(a.mapDimensionsAll(h))});for(var s=0;s<a.count();s++){for(var l=[],u=!1,c=0;c<o.length;c++){var f=a.get(o[c],s);isNaN(f)||(u=!0),l.push(f)}u?a.setItemLayout(s,i.dataToPoint(l)):a.setItemLayout(s,[NaN,NaN])}oR(a.graph,r)}else(!n||n==="none")&&ane(r)})}function kg(e){var t=e.coordinateSystem;if(t.type!=="view")return 1;var r=e.option.nodeScaleRatio,n=t.scaleX,i=t.getZoom(),a=(i-1)*r+1;return a/n}function Lg(e){var t=e.getVisual("symbolSize");return t instanceof Array&&(t=(t[0]+t[1])/2),+t}var FW=Math.PI,TM=[];function sR(e,t,r,n){var i=e.coordinateSystem;if(!(i&&i.type!=="view")){var a=i.getBoundingRect(),o=e.getData(),s=o.graph,l=a.width/2+a.x,u=a.height/2+a.y,c=Math.min(a.width,a.height)/2,f=o.count();if(o.setLayout({cx:l,cy:u}),!!f){if(r){var h=i.pointToData(n),d=h[0],v=h[1],m=[d-l,v-u];Lf(m,m),Zg(m,m,c),r.setLayout([l+m[0],u+m[1]],!0);var y=e.get(["circular","rotateLabel"]);one(r,y,l,u)}D8e[t](e,s,o,c,l,u,f),s.eachEdge(function(x,_){var b=ci(x.getModel().get(["lineStyle","curveness"]),aR(x,e,_),0),S=Ro(x.node1.getLayout()),T=Ro(x.node2.getLayout()),C,A=(S[0]+T[0])/2,P=(S[1]+T[1])/2;+b&&(b*=3,C=[l*b+A*(1-b),u*b+P*(1-b)]),x.setLayout([S,T,C])})}}}var D8e={value:function(e,t,r,n,i,a,o){var s=0,l=r.getSum("value"),u=Math.PI*2/(l||o);t.eachNode(function(c){var f=c.getValue("value"),h=u*(l?f:1)/2;s+=h,c.setLayout([n*Math.cos(s)+i,n*Math.sin(s)+a]),s+=h})},symbolSize:function(e,t,r,n,i,a,o){var s=0;TM.length=o;var l=kg(e);t.eachNode(function(f){var h=Lg(f);isNaN(h)&&(h=2),h<0&&(h=0),h*=l;var d=Math.asin(h/2/n);isNaN(d)&&(d=FW/2),TM[f.dataIndex]=d,s+=d*2});var u=(2*FW-s)/o/2,c=0;t.eachNode(function(f){var h=u+TM[f.dataIndex];c+=h,(!f.getLayout()||!f.getLayout().fixed)&&f.setLayout([n*Math.cos(c)+i,n*Math.sin(c)+a]),c+=h})}};function one(e,t,r,n){var i=e.getGraphicEl();if(i){var a=e.getModel(),o=a.get(["label","rotate"])||0,s=i.getSymbolPath();if(t){var l=e.getLayout(),u=Math.atan2(l[1]-n,l[0]-r);u<0&&(u=Math.PI*2+u);var c=l[0]<r;c&&(u=u-Math.PI);var f=c?"left":"right";s.setTextConfig({rotation:-u,position:f,origin:"center"});var h=s.ensureState("emphasis");ae(h.textConfig||(h.textConfig={}),{position:f})}else s.setTextConfig({rotation:o*=Math.PI/180})}}function N8e(e){e.eachSeriesByType("graph",function(t){t.get("layout")==="circular"&&sR(t,"symbolSize")})}var ph=rw;function j8e(e,t,r){for(var n=e,i=t,a=r.rect,o=a.width,s=a.height,l=[a.x+o/2,a.y+s/2],u=r.gravity==null?.1:r.gravity,c=0;c<n.length;c++){var f=n[c];f.p||(f.p=Mu(o*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),f.pp=Ro(f.p),f.edges=null}var h=r.friction==null?.6:r.friction,d=h,v,m;return{warmUp:function(){d=h*.8},setFixed:function(y){n[y].fixed=!0},setUnfixed:function(y){n[y].fixed=!1},beforeStep:function(y){v=y},afterStep:function(y){m=y},step:function(y){v&&v(n,i);for(var x=[],_=n.length,b=0;b<i.length;b++){var S=i[b];if(!S.ignoreForceLayout){var T=S.n1,C=S.n2;Dl(x,C.p,T.p);var A=vy(x)-S.d,P=C.w/(T.w+C.w);isNaN(P)&&(P=0),Lf(x,x),!T.fixed&&ph(T.p,T.p,x,P*A*d),!C.fixed&&ph(C.p,C.p,x,-(1-P)*A*d)}}for(var b=0;b<_;b++){var I=n[b];I.fixed||(Dl(x,l,I.p),ph(I.p,I.p,x,u*d))}for(var b=0;b<_;b++)for(var T=n[b],k=b+1;k<_;k++){var C=n[k];Dl(x,C.p,T.p);var A=vy(x);A===0&&(LT(x,Math.random()-.5,Math.random()-.5),A=1);var E=(T.rep+C.rep)/A/A;!T.fixed&&ph(T.pp,T.pp,x,E),!C.fixed&&ph(C.pp,C.pp,x,-E)}for(var D=[],b=0;b<_;b++){var I=n[b];I.fixed||(Dl(D,I.p,I.pp),ph(I.p,I.p,D,d),In(I.pp,I.p))}d=d*.992;var N=d<.01;m&&m(n,i,N),y&&y(N)}}}function R8e(e){e.eachSeriesByType("graph",function(t){var r=t.coordinateSystem;if(!(r&&r.type!=="view"))if(t.get("layout")==="force"){var n=t.preservedPoints||{},i=t.getGraph(),a=i.data,o=i.edgeData,s=t.getModel("force"),l=s.get("initLayout");t.preservedPoints?a.each(function(b){var S=a.getId(b);a.setItemLayout(b,n[S]||[NaN,NaN])}):!l||l==="none"?ane(t):l==="circular"&&sR(t,"value");var u=a.getDataExtent("value"),c=o.getDataExtent("value"),f=s.get("repulsion"),h=s.get("edgeLength"),d=oe(f)?f:[f,f],v=oe(h)?h:[h,h];v=[v[1],v[0]];var m=a.mapArray("value",function(b,S){var T=a.getItemLayout(S),C=gt(b,u,d);return isNaN(C)&&(C=(d[0]+d[1])/2),{w:C,rep:C,fixed:a.getItemModel(S).get("fixed"),p:!T||isNaN(T[0])||isNaN(T[1])?null:T}}),y=o.mapArray("value",function(b,S){var T=i.getEdgeByIndex(S),C=gt(b,c,v);isNaN(C)&&(C=(v[0]+v[1])/2);var A=T.getModel(),P=ci(T.getModel().get(["lineStyle","curveness"]),-aR(T,t,S,!0),0);return{n1:m[T.node1.dataIndex],n2:m[T.node2.dataIndex],d:C,curveness:P,ignoreForceLayout:A.get("ignoreForceLayout")}}),x=r.getBoundingRect(),_=j8e(m,y,{rect:x,gravity:s.get("gravity"),friction:s.get("friction")});_.beforeStep(function(b,S){for(var T=0,C=b.length;T<C;T++)b[T].fixed&&In(b[T].p,i.getNodeByIndex(T).getLayout())}),_.afterStep(function(b,S,T){for(var C=0,A=b.length;C<A;C++)b[C].fixed||i.getNodeByIndex(C).setLayout(b[C].p),n[a.getId(C)]=b[C].p;for(var C=0,A=S.length;C<A;C++){var P=S[C],I=i.getEdgeByIndex(C),k=P.n1.p,E=P.n2.p,D=I.getLayout();D=D?D.slice():[],D[0]=D[0]||[],D[1]=D[1]||[],In(D[0],k),In(D[1],E),+P.curveness&&(D[2]=[(k[0]+E[0])/2-(k[1]-E[1])*P.curveness,(k[1]+E[1])/2-(E[0]-k[0])*P.curveness]),I.setLayout(D)}}),t.forceLayout=_,t.preservedPoints=n,_.step()}else t.forceLayout=null})}function B8e(e,t,r){var n=zr(e,t),i=ae(e.getBoxLayoutParams(),{aspect:r}),a=$t(i,n.refContainer);return DQ(e,a,r)}function z8e(e,t){var r=[];return e.eachSeriesByType("graph",function(n){_0({targetModel:n,coordSysType:"view",coordSysProvider:i,isDefaultDataCoordSys:!0});function i(){var a=n.getData(),o=a.mapArray(function(v){var m=a.getItemModel(v);return[+m.get("x"),+m.get("y")]}),s=[],l=[];zT(o,s,l),l[0]-s[0]===0&&(l[0]+=1,s[0]-=1),l[1]-s[1]===0&&(l[1]+=1,s[1]-=1);var u=(l[0]-s[0])/(l[1]-s[1]),c=B8e(n,t,u);isNaN(u)&&(s=[c.x,c.y],l=[c.x+c.width,c.y+c.height]);var f=l[0]-s[0],h=l[1]-s[1],d=new Bf(null,{api:t,ecModel:e});return d.zoomLimit=n.get("scaleLimit"),d.setBoundingRect(s[0],s[1],f,h),d.setViewRect(c.x,c.y,c.width,c.height),d.setCenter(n.get("center")),d.setZoom(n.get("zoom")),r.push(d),d}}),r}var VW=mr.prototype,CM=Fv.prototype,sne=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e}();(function(e){K(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(sne);function AM(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}var lne=function(e){K(t,e);function t(r){var n=e.call(this,r)||this;return n.type="ec-line",n}return t.prototype.getDefaultStyle=function(){return{stroke:J.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new sne},t.prototype.buildPath=function(r,n){AM(n)?VW.buildPath.call(this,r,n):CM.buildPath.call(this,r,n)},t.prototype.pointAt=function(r){return AM(this.shape)?VW.pointAt.call(this,r):CM.pointAt.call(this,r)},t.prototype.tangentAt=function(r){var n=this.shape,i=AM(n)?[n.x2-n.x1,n.y2-n.y1]:CM.tangentAt.call(this,r);return Lf(i,i)},t}(nt),MM=["fromSymbol","toSymbol"];function GW(e){return"_"+e+"Type"}function WW(e,t,r){var n=t.getItemVisual(r,e);if(!n||n==="none")return n;var i=t.getItemVisual(r,e+"Size"),a=t.getItemVisual(r,e+"Rotate"),o=t.getItemVisual(r,e+"Offset"),s=t.getItemVisual(r,e+"KeepAspect"),l=qv(i),u=Nf(o||0,l);return n+l+u+(a||"")+(s||"")}function HW(e,t,r){var n=t.getItemVisual(r,e);if(!(!n||n==="none")){var i=t.getItemVisual(r,e+"Size"),a=t.getItemVisual(r,e+"Rotate"),o=t.getItemVisual(r,e+"Offset"),s=t.getItemVisual(r,e+"KeepAspect"),l=qv(i),u=Nf(o||0,l),c=xr(n,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return c.__specifiedRotation=a==null||isNaN(a)?void 0:+a*Math.PI/180||0,c.name=e,c}}function $8e(e){var t=new lne({name:"line",subPixelOptimize:!0});return PO(t.shape,e),t}function PO(e,t){e.x1=t[0][0],e.y1=t[0][1],e.x2=t[1][0],e.y2=t[1][1],e.percent=1;var r=t[2];r?(e.cpx1=r[0],e.cpy1=r[1]):(e.cpx1=NaN,e.cpy1=NaN)}var lR=function(e){K(t,e);function t(r,n,i){var a=e.call(this)||this;return a._createLine(r,n,i),a}return t.prototype._createLine=function(r,n,i){var a=r.hostModel,o=r.getItemLayout(n),s=r.getItemVisual(n,"z2"),l=$8e(o);l.shape.percent=0,jt(l,{z2:Ae(s,0),shape:{percent:1}},a,n),this.add(l),R(MM,function(u){var c=HW(u,r,n);this.add(c),this[GW(u)]=WW(u,r,n)},this),this._updateCommonStl(r,n,i)},t.prototype.updateData=function(r,n,i){var a=r.hostModel,o=this.childOfName("line"),s=r.getItemLayout(n),l={shape:{}};PO(l.shape,s),ut(o,l,a,n),R(MM,function(u){var c=WW(u,r,n),f=GW(u);if(this[f]!==c){this.remove(this.childOfName(u));var h=HW(u,r,n);this.add(h)}this[f]=c},this),this._updateCommonStl(r,n,i)},t.prototype.getLinePath=function(){return this.childAt(0)},t.prototype._updateCommonStl=function(r,n,i){var a=r.hostModel,o=this.childOfName("line"),s=i&&i.emphasisLineStyle,l=i&&i.blurLineStyle,u=i&&i.selectLineStyle,c=i&&i.labelStatesModels,f=i&&i.emphasisDisabled,h=i&&i.focus,d=i&&i.blurScope;if(!i||r.hasItemOption){var v=r.getItemModel(n),m=v.getModel("emphasis");s=m.getModel("lineStyle").getLineStyle(),l=v.getModel(["blur","lineStyle"]).getLineStyle(),u=v.getModel(["select","lineStyle"]).getLineStyle(),f=m.get("disabled"),h=m.get("focus"),d=m.get("blurScope"),c=Br(v)}var y=r.getItemVisual(n,"style"),x=y.stroke;o.useStyle(y),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=s,o.ensureState("blur").style=l,o.ensureState("select").style=u,R(MM,function(C){var A=this.childOfName(C);if(A){A.setColor(x),A.style.opacity=y.opacity;for(var P=0;P<qn.length;P++){var I=qn[P],k=o.getState(I);if(k){var E=k.style||{},D=A.ensureState(I),N=D.style||(D.style={});E.stroke!=null&&(N[A.__isEmptyBrush?"stroke":"fill"]=E.stroke),E.opacity!=null&&(N.opacity=E.opacity)}}A.markRedraw()}},this);var _=a.getRawValue(n);qr(this,c,{labelDataIndex:n,labelFetcher:{getFormattedLabel:function(C,A){return a.getFormattedLabel(C,A,r.dataType)}},inheritColor:x||J.color.neutral99,defaultOpacity:y.opacity,defaultText:(_==null?r.getName(n):isFinite(_)?gr(_):_)+""});var b=this.getTextContent();if(b){var S=c.normal;b.__align=b.style.align,b.__verticalAlign=b.style.verticalAlign,b.__position=S.get("position")||"middle";var T=S.get("distance");oe(T)||(T=[T,T]),b.__labelDistance=T}this.setTextConfig({position:null,local:!0,inside:!1}),Gt(this,h,d,f)},t.prototype.highlight=function(){Us(this)},t.prototype.downplay=function(){Zs(this)},t.prototype.updateLayout=function(r,n){this.setLinePoints(r.getItemLayout(n))},t.prototype.setLinePoints=function(r){var n=this.childOfName("line");PO(n.shape,r),n.dirty()},t.prototype.beforeUpdate=function(){var r=this,n=r.childOfName("fromSymbol"),i=r.childOfName("toSymbol"),a=r.getTextContent();if(!n&&!i&&(!a||a.ignore))return;for(var o=1,s=this.parent;s;)s.scaleX&&(o/=s.scaleX),s=s.parent;var l=r.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,c=l.pointAt(0),f=l.pointAt(u),h=Dl([],f,c);Lf(h,h);function d(k,E){var D=k.__specifiedRotation;if(D==null){var N=l.tangentAt(E);k.attr("rotation",(E===1?-1:1)*Math.PI/2-Math.atan2(N[1],N[0]))}else k.attr("rotation",D)}if(n&&(n.setPosition(c),d(n,0),n.scaleX=n.scaleY=o*u,n.markRedraw()),i&&(i.setPosition(f),d(i,1),i.scaleX=i.scaleY=o*u,i.markRedraw()),a&&!a.ignore){a.x=a.y=0,a.originX=a.originY=0;var v=void 0,m=void 0,y=a.__labelDistance,x=y[0]*o,_=y[1]*o,b=u/2,S=l.tangentAt(b),T=[S[1],-S[0]],C=l.pointAt(b);T[1]>0&&(T[0]=-T[0],T[1]=-T[1]);var A=S[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var P=-Math.atan2(S[1],S[0]);f[0]<c[0]&&(P=Math.PI+P),a.rotation=P}var I=void 0;switch(a.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":I=-_,m="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":I=_,m="top";break;default:I=0,m="middle"}switch(a.__position){case"end":a.x=h[0]*x+f[0],a.y=h[1]*_+f[1],v=h[0]>.8?"left":h[0]<-.8?"right":"center",m=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":a.x=-h[0]*x+c[0],a.y=-h[1]*_+c[1],v=h[0]>.8?"right":h[0]<-.8?"left":"center",m=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=x*A+c[0],a.y=c[1]+I,v=S[0]<0?"right":"left",a.originX=-x*A,a.originY=-I;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=C[0],a.y=C[1]+I,v="center",a.originY=-I;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-x*A+f[0],a.y=f[1]+I,v=S[0]>=0?"right":"left",a.originX=x*A,a.originY=-I;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||m,align:a.__align||v})}},t}(Ie),uR=function(){function e(t){this.group=new Ie,this._LineCtor=t||lR}return e.prototype.updateData=function(t){var r=this;this._progressiveEls=null;var n=this,i=n.group,a=n._lineData;n._lineData=t,a||i.removeAll();var o=UW(t);t.diff(a).add(function(s){r._doAdd(t,s,o)}).update(function(s,l){r._doUpdate(a,t,l,s,o)}).remove(function(s){i.remove(a.getItemGraphicEl(s))}).execute()},e.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(r,n){r.updateLayout(t,n)},this)},e.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=UW(t),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(t,r){this._progressiveEls=[];function n(s){!s.isGroup&&!F8e(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i<t.end;i++){var a=r.getItemLayout(i);if(PM(a)){var o=new this._LineCtor(r,i,this._seriesScope);o.traverse(n),this.group.add(o),r.setItemGraphicEl(i,o),this._progressiveEls.push(o)}}},e.prototype.remove=function(){this.group.removeAll()},e.prototype.eachRendered=function(t){Pu(this._progressiveEls||this.group,t)},e.prototype._doAdd=function(t,r,n){var i=t.getItemLayout(r);if(PM(i)){var a=new this._LineCtor(t,r,n);t.setItemGraphicEl(r,a),this.group.add(a)}},e.prototype._doUpdate=function(t,r,n,i,a){var o=t.getItemGraphicEl(n);if(!PM(r.getItemLayout(i))){this.group.remove(o);return}o?o.updateData(r,i,a):o=new this._LineCtor(r,i,a),r.setItemGraphicEl(i,o),this.group.add(o)},e}();function F8e(e){return e.animators&&e.animators.length>0}function UW(e){var t=e.hostModel,r=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:r.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:r.get("disabled"),blurScope:r.get("blurScope"),focus:r.get("focus"),labelStatesModels:Br(t)}}function ZW(e){return isNaN(e[0])||isNaN(e[1])}function PM(e){return e&&!ZW(e[0])&&!ZW(e[1])}var kM=[],LM=[],IM=[],gh=an,OM=Kl,YW=Math.abs;function XW(e,t,r){for(var n=e[0],i=e[1],a=e[2],o=1/0,s,l=r*r,u=.1,c=.1;c<=.9;c+=.1){kM[0]=gh(n[0],i[0],a[0],c),kM[1]=gh(n[1],i[1],a[1],c);var f=YW(OM(kM,t)-l);f<o&&(o=f,s=c)}for(var h=0;h<32;h++){var d=s+u;LM[0]=gh(n[0],i[0],a[0],s),LM[1]=gh(n[1],i[1],a[1],s),IM[0]=gh(n[0],i[0],a[0],d),IM[1]=gh(n[1],i[1],a[1],d);var f=OM(LM,t)-l;if(YW(f)<.01)break;var v=OM(IM,t)-l;u/=2,f<0?v>=0?s=s+u:s=s-u:v>=0?s=s-u:s=s+u}return s}function EM(e,t){var r=[],n=py,i=[[],[],[]],a=[[],[]],o=[];t/=2,e.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),f=s.getVisual("toSymbol");u.__original||(u.__original=[Ro(u[0]),Ro(u[1])],u[2]&&u.__original.push(Ro(u[2])));var h=u.__original;if(u[2]!=null){if(In(i[0],h[0]),In(i[1],h[2]),In(i[2],h[1]),c&&c!=="none"){var d=Lg(s.node1),v=XW(i,h[0],d*t);n(i[0][0],i[1][0],i[2][0],v,r),i[0][0]=r[3],i[1][0]=r[4],n(i[0][1],i[1][1],i[2][1],v,r),i[0][1]=r[3],i[1][1]=r[4]}if(f&&f!=="none"){var d=Lg(s.node2),v=XW(i,h[1],d*t);n(i[0][0],i[1][0],i[2][0],v,r),i[1][0]=r[1],i[2][0]=r[2],n(i[0][1],i[1][1],i[2][1],v,r),i[1][1]=r[1],i[2][1]=r[2]}In(u[0],i[0]),In(u[1],i[2]),In(u[2],i[1])}else{if(In(a[0],h[0]),In(a[1],h[1]),Dl(o,a[1],a[0]),Lf(o,o),c&&c!=="none"){var d=Lg(s.node1);rw(a[0],a[0],o,d*t)}if(f&&f!=="none"){var d=Lg(s.node2);rw(a[1],a[1],o,-d*t)}In(u[0],a[0]),In(u[1],a[1])}})}var une=et();function V8e(e){if(e)return une(e).bridge}function qW(e,t){e&&(une(e).bridge=t)}function KW(e){return e.type==="view"}var G8e=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){var i=new T0,a=new uR,o=this.group,s=new Ie;this._controller=new Rf(n.getZr()),this._controllerHost={target:s},s.add(i.group),s.add(a.group),o.add(s),this._symbolDraw=i,this._lineDraw=a,this._mainGroup=s,this._firstRender=!0},t.prototype.render=function(r,n,i){var a=this,o=r.coordinateSystem,s=!1;this._model=r,this._api=i,this._active=!0;var l=this._getThumbnailInfo();l&&l.bridge.reset(i);var u=this._symbolDraw,c=this._lineDraw;if(KW(o)){var f={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?this._mainGroup.attr(f):ut(this._mainGroup,f,r)}EM(r.getGraph(),kg(r));var h=r.getData();u.updateData(h);var d=r.getEdgeData();c.updateData(d),this._updateNodeAndLinkScale(),this._updateController(null,r,i),clearTimeout(this._layoutTimeout);var v=r.forceLayout,m=r.get(["force","layoutAnimation"]);v&&(s=!0,this._startForceLayoutIteration(v,i,m));var y=r.get("layout");h.graph.eachNode(function(S){var T=S.dataIndex,C=S.getGraphicEl(),A=S.getModel();if(C){C.off("drag").off("dragend");var P=A.get("draggable");P&&C.on("drag",function(k){switch(y){case"force":v.warmUp(),!a._layouting&&a._startForceLayoutIteration(v,i,m),v.setFixed(T),h.setItemLayout(T,[C.x,C.y]);break;case"circular":h.setItemLayout(T,[C.x,C.y]),S.setLayout({fixed:!0},!0),sR(r,"symbolSize",S,[k.offsetX,k.offsetY]),a.updateLayout(r);break;case"none":default:h.setItemLayout(T,[C.x,C.y]),oR(r.getGraph(),r),a.updateLayout(r);break}}).on("dragend",function(){v&&v.setUnfixed(T)}),C.setDraggable(P,!!A.get("cursor"));var I=A.get(["emphasis","focus"]);I==="adjacency"&&(ze(C).focus=S.getAdjacentDataIndices())}}),h.graph.eachEdge(function(S){var T=S.getGraphicEl(),C=S.getModel().get(["emphasis","focus"]);T&&C==="adjacency"&&(ze(T).focus={edge:[S.dataIndex],node:[S.node1.dataIndex,S.node2.dataIndex]})});var x=r.get("layout")==="circular"&&r.get(["circular","rotateLabel"]),_=h.getLayout("cx"),b=h.getLayout("cy");h.graph.eachNode(function(S){one(S,x,_,b)}),this._firstRender=!1,s||this._renderThumbnail(r,i,this._symbolDraw,this._lineDraw)},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._startForceLayoutIteration=function(r,n,i){var a=this,o=!1;(function s(){r.step(function(l){a.updateLayout(a._model),(l||!o)&&(o=!0,a._renderThumbnail(a._model,n,a._symbolDraw,a._lineDraw)),(a._layouting=!l)&&(i?a._layoutTimeout=setTimeout(s,16):s())})})()},t.prototype._updateController=function(r,n,i){var a=this._controller,o=this._controllerHost,s=n.coordinateSystem;if(!KW(s)){a.disable();return}a.enable(n.get("roam"),{api:i,zInfo:{component:n},triggerInfo:{roamTrigger:n.get("roamTrigger"),isInSelf:function(l,u,c){return s.containPoint([u,c])},isInClip:function(l,u,c){return!r||r.contain(u,c)}}}),o.zoomLimit=n.get("scaleLimit"),o.zoom=s.getZoom(),a.off("pan").off("zoom").on("pan",function(l){i.dispatchAction({seriesId:n.id,type:"graphRoam",dx:l.dx,dy:l.dy})}).on("zoom",function(l){i.dispatchAction({seriesId:n.id,type:"graphRoam",zoom:l.scale,originX:l.originX,originY:l.originY})})},t.prototype.updateViewOnPan=function(r,n,i){this._active&&(Kj(this._controllerHost,i.dx,i.dy),this._updateThumbnailWindow())},t.prototype.updateViewOnZoom=function(r,n,i){this._active&&(Jj(this._controllerHost,i.zoom,i.originX,i.originY),this._updateNodeAndLinkScale(),EM(r.getGraph(),kg(r)),this._lineDraw.updateLayout(),n.updateLabelLayout(),this._updateThumbnailWindow())},t.prototype._updateNodeAndLinkScale=function(){var r=this._model,n=r.getData(),i=kg(r);n.eachItemGraphicEl(function(a,o){a&&a.setSymbolScale(i)})},t.prototype.updateLayout=function(r){this._active&&(EM(r.getGraph(),kg(r)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},t.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},t.prototype._getThumbnailInfo=function(){var r=this._model,n=r.coordinateSystem;if(n.type==="view"){var i=V8e(r);if(i)return{bridge:i,coordSys:n}}},t.prototype._updateThumbnailWindow=function(){var r=this._getThumbnailInfo();r&&r.bridge.updateWindow(r.coordSys.transform,this._api)},t.prototype._renderThumbnail=function(r,n,i,a){var o=this._getThumbnailInfo();if(o){var s=new Ie,l=i.group.children(),u=a.group.children(),c=new Ie,f=new Ie;s.add(f),s.add(c);for(var h=0;h<l.length;h++){var d=l[h],v=d.children()[0],m=d.x,y=d.y,x=Le(v.shape),_=ae(x,{width:v.scaleX,height:v.scaleY,x:m-v.scaleX/2,y:y-v.scaleY/2}),b=Le(v.style),S=new v.constructor({shape:_,style:b,z2:151});f.add(S)}for(var h=0;h<u.length;h++){var d=u[h],T=d.children()[0],b=Le(T.style),_=Le(T.shape),C=new lne({style:b,shape:_,z2:151});c.add(C)}o.bridge.renderContent({api:n,roamType:r.get("roam"),viewportRect:null,group:s,targetTrans:o.coordSys.transform})}},t.type="graph",t}(bt);function mh(e){return"_EC_"+e}var W8e=function(){function e(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return e.prototype.isDirected=function(){return this._directed},e.prototype.addNode=function(t,r){t=t==null?""+r:""+t;var n=this._nodesMap;if(!n[mh(t)]){var i=new xc(t,r);return i.hostGraph=this,this.nodes.push(i),n[mh(t)]=i,i}},e.prototype.getNodeByIndex=function(t){var r=this.data.getRawIndex(t);return this.nodes[r]},e.prototype.getNodeById=function(t){return this._nodesMap[mh(t)]},e.prototype.addEdge=function(t,r,n){var i=this._nodesMap,a=this._edgesMap;if(st(t)&&(t=this.nodes[t]),st(r)&&(r=this.nodes[r]),t instanceof xc||(t=i[mh(t)]),r instanceof xc||(r=i[mh(r)]),!(!t||!r)){var o=t.id+"-"+r.id,s=new cne(t,r,n);return s.hostGraph=this,this._directed&&(t.outEdges.push(s),r.inEdges.push(s)),t.edges.push(s),t!==r&&r.edges.push(s),this.edges.push(s),a[o]=s,s}},e.prototype.getEdgeByIndex=function(t){var r=this.edgeData.getRawIndex(t);return this.edges[r]},e.prototype.getEdge=function(t,r){t instanceof xc&&(t=t.id),r instanceof xc&&(r=r.id);var n=this._edgesMap;return this._directed?n[t+"-"+r]:n[t+"-"+r]||n[r+"-"+t]},e.prototype.eachNode=function(t,r){for(var n=this.nodes,i=n.length,a=0;a<i;a++)n[a].dataIndex>=0&&t.call(r,n[a],a)},e.prototype.eachEdge=function(t,r){for(var n=this.edges,i=n.length,a=0;a<i;a++)n[a].dataIndex>=0&&n[a].node1.dataIndex>=0&&n[a].node2.dataIndex>=0&&t.call(r,n[a],a)},e.prototype.breadthFirstTraverse=function(t,r,n,i){if(r instanceof xc||(r=this._nodesMap[mh(r)]),!!r){for(var a=n==="out"?"outEdges":n==="in"?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!t.call(i,r,null))for(var s=[r];s.length;)for(var l=s.shift(),u=l[a],o=0;o<u.length;o++){var c=u[o],f=c.node1===l?c.node2:c.node1;if(!f.__visited){if(t.call(i,f,l))return;s.push(f),f.__visited=!0}}}},e.prototype.update=function(){for(var t=this.data,r=this.edgeData,n=this.nodes,i=this.edges,a=0,o=n.length;a<o;a++)n[a].dataIndex=-1;for(var a=0,o=t.count();a<o;a++)n[t.getRawIndex(a)].dataIndex=a;r.filterSelf(function(s){var l=i[r.getRawIndex(s)];return l.node1.dataIndex>=0&&l.node2.dataIndex>=0});for(var a=0,o=i.length;a<o;a++)i[a].dataIndex=-1;for(var a=0,o=r.count();a<o;a++)i[r.getRawIndex(a)].dataIndex=a},e.prototype.clone=function(){for(var t=new e(this._directed),r=this.nodes,n=this.edges,i=0;i<r.length;i++)t.addNode(r[i].id,r[i].dataIndex);for(var i=0;i<n.length;i++){var a=n[i];t.addEdge(a.node1.id,a.node2.id,a.dataIndex)}return t},e}(),xc=function(){function e(t,r){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=t??"",this.dataIndex=r??-1}return e.prototype.degree=function(){return this.edges.length},e.prototype.inDegree=function(){return this.inEdges.length},e.prototype.outDegree=function(){return this.outEdges.length},e.prototype.getModel=function(t){if(!(this.dataIndex<0)){var r=this.hostGraph,n=r.data.getItemModel(this.dataIndex);return n.getModel(t)}},e.prototype.getAdjacentDataIndices=function(){for(var t={edge:[],node:[]},r=0;r<this.edges.length;r++){var n=this.edges[r];n.dataIndex<0||(t.edge.push(n.dataIndex),t.node.push(n.node1.dataIndex,n.node2.dataIndex))}return t},e.prototype.getTrajectoryDataIndices=function(){for(var t=Ce(),r=Ce(),n=0,i=this.edges.length;n<i;n++){var a=this.edges[n];if(!(a.dataIndex<0)){t.set(a.dataIndex,!0);for(var o=[a.node1],s=[a.node2],l=0;l<o.length;){var u=o[l];l++,r.set(u.dataIndex,!0);for(var c=u.inEdges,f=0,h=c.length,d=void 0,v=void 0;f<h;f++)d=c[f],v=d.dataIndex,v>=0&&!t.hasKey(v)&&(t.set(v,!0),o.push(d.node1))}for(l=0;l<s.length;){var m=s[l];l++,r.set(m.dataIndex,!0);for(var y=m.outEdges,f=0,x=y.length,_=void 0,b=void 0;f<x;f++)_=y[f],b=_.dataIndex,b>=0&&!t.hasKey(b)&&(t.set(b,!0),s.push(_.node2))}}}return{edge:t.keys(),node:r.keys()}},e}(),cne=function(){function e(t,r,n){this.dataIndex=-1,this.node1=t,this.node2=r,this.dataIndex=n??-1}return e.prototype.getModel=function(t){if(!(this.dataIndex<0)){var r=this.hostGraph,n=r.edgeData.getItemModel(this.dataIndex);return n.getModel(t)}},e.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},e.prototype.getTrajectoryDataIndices=function(){var t=Ce(),r=Ce();t.set(this.dataIndex,!0);for(var n=[this.node1],i=[this.node2],a=0;a<n.length;){var o=n[a];a++,r.set(o.dataIndex,!0);for(var s=o.inEdges,l=0,u=s.length,c=void 0,f=void 0;l<u;l++)c=o.inEdges[l],f=c.dataIndex,f>=0&&!t.hasKey(f)&&(t.set(f,!0),n.push(c.node1))}for(a=0;a<i.length;){var h=i[a];a++,r.set(h.dataIndex,!0);for(var d=h.outEdges,l=0,u=d.length,v=void 0,m=void 0;l<u;l++)v=h.outEdges[l],m=v.dataIndex,m>=0&&!t.hasKey(m)&&(t.set(m,!0),i.push(v.node2))}return{edge:t.keys(),node:r.keys()}},e}();function fne(e,t){return{getValue:function(r){var n=this[e][t];return n.getStore().get(n.getDimensionIndex(r||"value"),this.dataIndex)},setVisual:function(r,n){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,r,n)},getVisual:function(r){return this[e][t].getItemVisual(this.dataIndex,r)},setLayout:function(r,n){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,r,n)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}cr(xc,fne("hostGraph","data"));cr(cne,fne("hostGraph","edgeData"));function cR(e,t,r,n,i){for(var a=new W8e(n),o=0;o<e.length;o++)a.addNode(on(e[o].id,e[o].name,o),o);for(var s=[],l=[],u=0,o=0;o<t.length;o++){var c=t[o],f=c.source,h=c.target;a.addEdge(f,h,u)&&(l.push(c),s.push(on(Dr(c.id,null),f+" > "+h)),u++)}var d=r.get("coordinateSystem"),v;if(d==="cartesian2d"||d==="polar"||d==="matrix")v=es(e,r);else{var m=Zv.get(d),y=m?m.dimensions||[]:[];He(y,"value")<0&&y.concat(["value"]);var x=Kv(e,{coordDimensions:y,encodeDefine:r.getEncode()}).dimensions;v=new Rn(x,r),v.initData(e)}var _=new Rn(["value"],r);return _.initData(l,s),i&&i(v,_),Hre({mainData:v,struct:a,structAttr:"graph",datas:{node:v,edge:_},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var H8e=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new rp(i,i),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},t.prototype.mergeOption=function(r){e.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},t.prototype.mergeDefaultAndTheme=function(r){e.prototype.mergeDefaultAndTheme.apply(this,arguments),ff(r,"edgeLabel",["show"])},t.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[],o=this;if(a&&i){I8e(this);var s=cR(a,i,this,!0,l);return R(s.edges,function(u){O8e(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(v){var m=o._categoriesModels,y=v.getShallow("category"),x=m[y];return x&&(x.parentModel=v.parentModel,v.parentModel=x),v});var f=rt.prototype.getModel;function h(v,m){var y=f.call(this,v,m);return y.resolveParentPath=d,y}c.wrapMethod("getItemModel",function(v){return v.resolveParentPath=d,v.getModel=h,v});function d(v){if(v&&(v[0]==="label"||v[1]==="label")){var m=v.slice();return v[0]==="label"?m[0]="edgeLabel":v[1]==="label"&&(m[1]="edgeLabel"),m}return v}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.getCategoriesData=function(){return this._categoriesData},t.prototype.formatTooltip=function(r,n,i){if(i==="edge"){var a=this.getData(),o=this.getDataParams(r,i),s=a.graph.getEdgeByIndex(r),l=a.getName(s.node1.dataIndex),u=a.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Mr("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var f=vee({series:this,dataIndex:r,multipleSeries:n});return f},t.prototype._updateCategoriesData=function(){var r=le(this.option.categories||[],function(i){return i.value!=null?i:ae({value:0},i)}),n=new Rn(["value"],this);n.initData(r),this._categoriesData=n,this._categoriesModels=n.mapArray(function(i){return n.getItemModel(i)})},t.prototype.setZoom=function(r){this.option.zoom=r},t.prototype.setCenter=function(r){this.option.center=r},t.prototype.isAnimationEnabled=function(){return e.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},t.type="series.graph",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:J.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:J.color.primary}}},t}(Ct);function U8e(e){e.registerChartView(G8e),e.registerSeriesModel(H8e),e.registerProcessor(A8e),e.registerVisual(M8e),e.registerVisual(P8e),e.registerLayout(E8e),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,N8e),e.registerLayout(R8e),e.registerCoordinateSystem("graphView",{dimensions:Bf.dimensions,create:z8e}),e.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},sr),e.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},sr),e.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},function(t,r,n){r.eachComponent({mainType:"series",query:t},function(i){var a=n.getViewOfSeriesModel(i);a&&(t.dx!=null&&t.dy!=null&&a.updateViewOnPan(i,n,t),t.zoom!=null&&t.originX!=null&&t.originY!=null&&a.updateViewOnZoom(i,n,t));var o=i.coordinateSystem,s=iC(o,t,i.get("scaleLimit"));i.setCenter&&i.setCenter(s.center),i.setZoom&&i.setZoom(s.zoom)})})}var JW=function(e){K(t,e);function t(r,n,i){var a=e.call(this)||this;ze(a).dataType="node",a.z2=2;var o=new ot;return a.setTextContent(o),a.updateData(r,n,i,!0),a}return t.prototype.updateData=function(r,n,i,a){var o=this,s=r.graph.getNodeByIndex(n),l=r.hostModel,u=s.getModel(),c=u.getModel("emphasis"),f=r.getItemLayout(n),h=ae(Io(u.getModel("itemStyle"),f,!0),f),d=this;if(isNaN(h.startAngle)){d.setShape(h);return}a?d.setShape(h):ut(d,{shape:h},l,n);var v=ae(Io(u.getModel("itemStyle"),f,!0),f);o.setShape(v),o.useStyle(r.getItemVisual(n,"style")),Rr(o,u),this._updateLabel(l,u,s),r.setItemGraphicEl(n,d),Rr(d,u,"itemStyle");var m=c.get("focus");Gt(this,m==="adjacency"?s.getAdjacentDataIndices():m,c.get("blurScope"),c.get("disabled"))},t.prototype._updateLabel=function(r,n,i){var a=this.getTextContent(),o=i.getLayout(),s=(o.startAngle+o.endAngle)/2,l=Math.cos(s),u=Math.sin(s),c=n.getModel("label");a.ignore=!c.get("show");var f=Br(n),h=i.getVisual("style");qr(a,f,{labelFetcher:{getFormattedLabel:function(_,b,S,T,C,A){return r.getFormattedLabel(_,b,"node",T,ci(C,f.normal&&f.normal.get("formatter"),n.get("name")),A)}},labelDataIndex:i.dataIndex,defaultText:i.dataIndex+"",inheritColor:h.fill,defaultOpacity:h.opacity,defaultOutsidePosition:"startArc"});var d=c.get("position")||"outside",v=c.get("distance")||0,m;d==="outside"?m=o.r+v:m=(o.r+o.r0)/2,this.textConfig={inside:d!=="outside"};var y=d!=="outside"?c.get("align")||"center":l>0?"left":"right",x=d!=="outside"?c.get("verticalAlign")||"middle":u>0?"top":"bottom";a.attr({x:l*m+o.cx,y:u*m+o.cy,rotation:0,style:{align:y,verticalAlign:x}})},t}(Sn),Z8e=function(e){K(t,e);function t(r,n,i,a){var o=e.call(this)||this;return ze(o).dataType="edge",o.updateData(r,n,i,a,!0),o}return t.prototype.buildPath=function(r,n){r.moveTo(n.s1[0],n.s1[1]);var i=.7,a=n.clockwise;r.arc(n.cx,n.cy,n.r,n.sStartAngle,n.sEndAngle,!a),r.bezierCurveTo((n.cx-n.s2[0])*i+n.s2[0],(n.cy-n.s2[1])*i+n.s2[1],(n.cx-n.t1[0])*i+n.t1[0],(n.cy-n.t1[1])*i+n.t1[1],n.t1[0],n.t1[1]),r.arc(n.cx,n.cy,n.r,n.tStartAngle,n.tEndAngle,!a),r.bezierCurveTo((n.cx-n.t2[0])*i+n.t2[0],(n.cy-n.t2[1])*i+n.t2[1],(n.cx-n.s1[0])*i+n.s1[0],(n.cy-n.s1[1])*i+n.s1[1],n.s1[0],n.s1[1]),r.closePath()},t.prototype.updateData=function(r,n,i,a,o){var s=r.hostModel,l=n.graph.getEdgeByIndex(i),u=l.getLayout(),c=l.node1.getModel(),f=n.getItemModel(l.dataIndex),h=f.getModel("lineStyle"),d=f.getModel("emphasis"),v=d.get("focus"),m=ae(Io(c.getModel("itemStyle"),u,!0),u),y=this;if(isNaN(m.sStartAngle)||isNaN(m.tStartAngle)){y.setShape(m);return}o?(y.setShape(m),QW(y,l,r,h)):(ma(y),QW(y,l,r,h),ut(y,{shape:m},s,i)),Gt(this,v==="adjacency"?l.getAdjacentDataIndices():v,d.get("blurScope"),d.get("disabled")),Rr(y,f,"lineStyle"),n.setItemGraphicEl(l.dataIndex,y)},t}(nt);function QW(e,t,r,n){var i=t.node1,a=t.node2,o=e.style;e.setStyle(n.getLineStyle());var s=n.get("color");switch(s){case"source":o.fill=r.getItemVisual(i.dataIndex,"style").fill,o.decal=i.getVisual("style").decal;break;case"target":o.fill=r.getItemVisual(a.dataIndex,"style").fill,o.decal=a.getVisual("style").decal;break;case"gradient":var l=r.getItemVisual(i.dataIndex,"style").fill,u=r.getItemVisual(a.dataIndex,"style").fill;if(ye(l)&&ye(u)){var c=e.shape,f=(c.s1[0]+c.s2[0])/2,h=(c.s1[1]+c.s2[1])/2,d=(c.t1[0]+c.t2[0])/2,v=(c.t1[1]+c.t2[1])/2;o.fill=new If(f,h,d,v,[{offset:0,color:l},{offset:1,color:u}],!0)}break}}var Y8e=Math.PI/180,X8e=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){},t.prototype.render=function(r,n,i){var a=r.getData(),o=this._data,s=this.group,l=-r.get("startAngle")*Y8e;if(a.diff(o).add(function(c){var f=a.getItemLayout(c);if(f){var h=new JW(a,c,l);ze(h).dataIndex=c,s.add(h)}}).update(function(c,f){var h=o.getItemGraphicEl(f),d=a.getItemLayout(c);if(!d){h&&Os(h,r,f);return}h?h.updateData(a,c,l):h=new JW(a,c,l),s.add(h)}).remove(function(c){var f=o.getItemGraphicEl(c);f&&Os(f,r,c)}).execute(),!o){var u=r.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=me(u[0],i.getWidth()),this.group.originY=me(u[1],i.getHeight()),jt(this.group,{scaleX:1,scaleY:1},r)}this._data=a,this.renderEdges(r,l)},t.prototype.renderEdges=function(r,n){var i=r.getData(),a=r.getEdgeData(),o=this._edgeData,s=this.group;a.diff(o).add(function(l){var u=new Z8e(i,a,l,n);ze(u).dataIndex=l,s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(i,a,l,n),s.add(c)}).remove(function(l){var u=o.getItemGraphicEl(l);u&&Os(u,r,l)}).execute(),this._edgeData=a},t.prototype.dispose=function(){},t.type="chord",t}(bt),q8e=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links),this.legendVisualProvider=new rp(_e(this.getData,this),_e(this.getRawData,this))},t.prototype.mergeOption=function(r){e.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links)},t.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[];if(a&&i){var o=cR(a,i,this,!0,s);return o.data}function s(l,u){var c=rt.prototype.getModel;function f(d,v){var m=c.call(this,d,v);return m.resolveParentPath=h,m}u.wrapMethod("getItemModel",function(d){return d.resolveParentPath=h,d.getModel=f,d});function h(d){if(d&&(d[0]==="label"||d[1]==="label")){var v=d.slice();return d[0]==="label"?v[0]="edgeLabel":d[1]==="label"&&(v[1]="edgeLabel"),v}return d}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(r,n,i){var a=this.getDataParams(r,i);if(i==="edge"){var o=this.getData(),s=o.graph.getEdgeByIndex(r),l=o.getName(s.node1.dataIndex),u=o.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Mr("nameValue",{name:c.join(" > "),value:a.value,noValue:a.value==null})}return Mr("nameValue",{name:a.name,value:a.value,noValue:a.value==null})},t.prototype.getDataParams=function(r,n){var i=e.prototype.getDataParams.call(this,r,n);if(n==="node"){var a=this.getData(),o=this.getGraph().getNodeByIndex(r);if(i.name==null&&(i.name=a.getName(r)),i.value==null){var s=o.getLayout().value;i.value=s}}return i},t.type="series.chord",t.defaultOption={z:2,coordinateSystem:"none",legendHoverLink:!0,colorBy:"data",left:0,top:0,right:0,bottom:0,width:null,height:null,center:["50%","50%"],radius:["70%","80%"],clockwise:!0,startAngle:90,endAngle:"auto",minAngle:0,padAngle:3,itemStyle:{borderRadius:[0,0,5,5]},lineStyle:{width:0,color:"source",opacity:.2},label:{show:!0,position:"outside",distance:5},emphasis:{focus:"adjacency",lineStyle:{opacity:.5}}},t}(Ct),DM=Math.PI/180;function K8e(e,t){e.eachSeriesByType("chord",function(r){J8e(r,t)})}function J8e(e,t){var r=e.getData(),n=r.graph,i=e.getEdgeData(),a=i.count();if(a){var o=EQ(e,t),s=o.cx,l=o.cy,u=o.r,c=o.r0,f=Math.max((e.get("padAngle")||0)*DM,0),h=Math.max((e.get("minAngle")||0)*DM,0),d=-e.get("startAngle")*DM,v=d+Math.PI*2,m=e.get("clockwise"),y=m?1:-1,x=[d,v];$T(x,!m);var _=x[0],b=x[1],S=b-_,T=r.getSum("value")===0&&i.getSum("value")===0,C=[],A=0;n.eachEdge(function(B){var H=T?1:B.getValue("value");T&&(H>0||h)&&(A+=2);var U=B.node1.dataIndex,Y=B.node2.dataIndex;C[U]=(C[U]||0)+H,C[Y]=(C[Y]||0)+H});var P=0;if(n.eachNode(function(B){var H=B.getValue("value");isNaN(H)||(C[B.dataIndex]=Math.max(H,C[B.dataIndex]||0)),!T&&(C[B.dataIndex]>0||h)&&A++,P+=C[B.dataIndex]||0}),!(A===0||P===0)){f*A>=Math.abs(S)&&(f=Math.max(0,(Math.abs(S)-h*A)/A)),(f+h)*A>=Math.abs(S)&&(h=(Math.abs(S)-f*A)/A);var I=(S-f*A*y)/P,k=0,E=0,D=0;n.eachNode(function(B){var H=C[B.dataIndex]||0,U=I*(P?H:1)*y;Math.abs(U)<h?k+=h-Math.abs(U):(E+=Math.abs(U)-h,D+=Math.abs(U)),B.setLayout({angle:U,value:H})});var N=!1;if(k>E){var z=k/E;n.eachNode(function(B){var H=B.getLayout().angle;Math.abs(H)>=h?B.setLayout({angle:H*z,ratio:z},!0):B.setLayout({angle:h,ratio:h===0?1:H/h},!0)})}else n.eachNode(function(B){if(!N){var H=B.getLayout().angle,U=Math.min(H/D,1),Y=U*k;H-Y<h&&(N=!0)}});var V=k;n.eachNode(function(B){if(!(V<=0)){var H=B.getLayout().angle;if(H>h&&h>0){var U=N?1:Math.min(H/D,1),Y=H-h,Z=Math.min(Y,Math.min(V,k*U));V-=Z,B.setLayout({angle:H-Z,ratio:(H-Z)/H},!0)}else h>0&&B.setLayout({angle:h,ratio:H===0?1:h/H},!0)}});var F=_,$=[];n.eachNode(function(B){var H=Math.max(B.getLayout().angle,h);B.setLayout({cx:s,cy:l,r0:c,r:u,startAngle:F,endAngle:F+H*y,clockwise:m},!0),$[B.dataIndex]=F,F+=(H+f)*y}),n.eachEdge(function(B){var H=T?1:B.getValue("value"),U=I*(P?H:1)*y,Y=B.node1.dataIndex,Z=$[Y]||0,Q=Math.abs((B.node1.getLayout().ratio||1)*U),re=Z+Q*y,ue=[s+c*Math.cos(Z),l+c*Math.sin(Z)],de=[s+c*Math.cos(re),l+c*Math.sin(re)],Re=B.node2.dataIndex,xe=$[Re]||0,ie=Math.abs((B.node2.getLayout().ratio||1)*U),ve=xe+ie*y,ce=[s+c*Math.cos(xe),l+c*Math.sin(xe)],X=[s+c*Math.cos(ve),l+c*Math.sin(ve)];B.setLayout({s1:ue,s2:de,sStartAngle:Z,sEndAngle:re,t1:ce,t2:X,tStartAngle:xe,tEndAngle:ve,cx:s,cy:l,r:c,value:H,clockwise:m}),$[Y]=re,$[Re]=ve})}}}function Q8e(e){e.registerChartView(X8e),e.registerSeriesModel(q8e),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,K8e),e.registerProcessor(ep("chord"))}var eHe=function(){function e(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return e}(),tHe=function(e){K(t,e);function t(r){var n=e.call(this,r)||this;return n.type="pointer",n}return t.prototype.getDefaultShape=function(){return new eHe},t.prototype.buildPath=function(r,n){var i=Math.cos,a=Math.sin,o=n.r,s=n.width,l=n.angle,u=n.x-i(l)*s*(s>=o/3?1:2),c=n.y-a(l)*s*(s>=o/3?1:2);l=n.angle-Math.PI/2,r.moveTo(u,c),r.lineTo(n.x+i(l)*s,n.y+a(l)*s),r.lineTo(n.x+i(n.angle)*o,n.y+a(n.angle)*o),r.lineTo(n.x-i(l)*s,n.y-a(l)*s),r.lineTo(u,c)},t}(nt);function rHe(e,t){var r=e.get("center"),n=t.getWidth(),i=t.getHeight(),a=Math.min(n,i),o=me(r[0],t.getWidth()),s=me(r[1],t.getHeight()),l=me(e.get("radius"),a/2);return{cx:o,cy:s,r:l}}function C_(e,t){var r=e==null?"":e+"";return t&&(ye(t)?r=t.replace("{value}",r):ke(t)&&(r=t(e))),r}var nHe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){this.group.removeAll();var a=r.get(["axisLine","lineStyle","color"]),o=rHe(r,i);this._renderMain(r,n,i,a,o),this._data=r.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(r,n,i,a,o){var s=this.group,l=r.get("clockwise"),u=-r.get("startAngle")/180*Math.PI,c=-r.get("endAngle")/180*Math.PI,f=r.getModel("axisLine"),h=f.get("roundCap"),d=h?Fw:Sn,v=f.get("show"),m=f.getModel("lineStyle"),y=m.get("width"),x=[u,c];$T(x,!l),u=x[0],c=x[1];for(var _=c-u,b=u,S=[],T=0;v&&T<a.length;T++){var C=Math.min(Math.max(a[T][0],0),1);c=u+_*C;var A=new d({shape:{startAngle:b,endAngle:c,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-y,r:o.r},silent:!0});A.setStyle({fill:a[T][1]}),A.setStyle(m.getLineStyle(["color","width"])),S.push(A),b=c}S.reverse(),R(S,function(I){return s.add(I)});var P=function(I){if(I<=0)return a[0][1];var k;for(k=0;k<a.length;k++)if(a[k][0]>=I&&(k===0?0:a[k-1][0])<I)return a[k][1];return a[k-1][1]};this._renderTicks(r,n,i,P,o,u,c,l,y),this._renderTitleAndDetail(r,n,i,P,o),this._renderAnchor(r,o),this._renderPointer(r,n,i,P,o,u,c,l,y)},t.prototype._renderTicks=function(r,n,i,a,o,s,l,u,c){for(var f=this.group,h=o.cx,d=o.cy,v=o.r,m=+r.get("min"),y=+r.get("max"),x=r.getModel("splitLine"),_=r.getModel("axisTick"),b=r.getModel("axisLabel"),S=r.get("splitNumber"),T=_.get("splitNumber"),C=me(x.get("length"),v),A=me(_.get("length"),v),P=s,I=(l-s)/S,k=I/T,E=x.getModel("lineStyle").getLineStyle(),D=_.getModel("lineStyle").getLineStyle(),N=x.get("distance"),z,V,F=0;F<=S;F++){if(z=Math.cos(P),V=Math.sin(P),x.get("show")){var $=N?N+c:c,B=new mr({shape:{x1:z*(v-$)+h,y1:V*(v-$)+d,x2:z*(v-C-$)+h,y2:V*(v-C-$)+d},style:E,silent:!0});E.stroke==="auto"&&B.setStyle({stroke:a(F/S)}),f.add(B)}if(b.get("show")){var $=b.get("distance")+N,H=C_(gr(F/S*(y-m)+m),b.get("formatter")),U=a(F/S),Y=z*(v-C-$)+h,Z=V*(v-C-$)+d,Q=b.get("rotate"),re=0;Q==="radial"?(re=-P+2*Math.PI,re>Math.PI/2&&(re+=Math.PI)):Q==="tangential"?re=-P-Math.PI/2:st(Q)&&(re=Q*Math.PI/180),re===0?f.add(new ot({style:kt(b,{text:H,x:Y,y:Z,verticalAlign:V<-.8?"top":V>.8?"bottom":"middle",align:z<-.4?"left":z>.4?"right":"center"},{inheritColor:U}),silent:!0})):f.add(new ot({style:kt(b,{text:H,x:Y,y:Z,verticalAlign:"middle",align:"center"},{inheritColor:U}),silent:!0,originX:Y,originY:Z,rotation:re}))}if(_.get("show")&&F!==S){var $=_.get("distance");$=$?$+c:c;for(var ue=0;ue<=T;ue++){z=Math.cos(P),V=Math.sin(P);var de=new mr({shape:{x1:z*(v-$)+h,y1:V*(v-$)+d,x2:z*(v-A-$)+h,y2:V*(v-A-$)+d},silent:!0,style:D});D.stroke==="auto"&&de.setStyle({stroke:a((F+ue/T)/S)}),f.add(de),P+=k}P-=k}else P+=I}},t.prototype._renderPointer=function(r,n,i,a,o,s,l,u,c){var f=this.group,h=this._data,d=this._progressEls,v=[],m=r.get(["pointer","show"]),y=r.getModel("progress"),x=y.get("show"),_=r.getData(),b=_.mapDimension("value"),S=+r.get("min"),T=+r.get("max"),C=[S,T],A=[s,l];function P(k,E){var D=_.getItemModel(k),N=D.getModel("pointer"),z=me(N.get("width"),o.r),V=me(N.get("length"),o.r),F=r.get(["pointer","icon"]),$=N.get("offsetCenter"),B=me($[0],o.r),H=me($[1],o.r),U=N.get("keepAspect"),Y;return F?Y=xr(F,B-z/2,H-V,z,V,null,U):Y=new tHe({shape:{angle:-Math.PI/2,width:z,r:V,x:B,y:H}}),Y.rotation=-(E+Math.PI/2),Y.x=o.cx,Y.y=o.cy,Y}function I(k,E){var D=y.get("roundCap"),N=D?Fw:Sn,z=y.get("overlap"),V=z?y.get("width"):c/_.count(),F=z?o.r-V:o.r-(k+1)*V,$=z?o.r:o.r-k*V,B=new N({shape:{startAngle:s,endAngle:E,cx:o.cx,cy:o.cy,clockwise:u,r0:F,r:$}});return z&&(B.z2=gt(_.get(b,k),[S,T],[100,0],!0)),B}(x||m)&&(_.diff(h).add(function(k){var E=_.get(b,k);if(m){var D=P(k,s);jt(D,{rotation:-((isNaN(+E)?A[0]:gt(E,C,A,!0))+Math.PI/2)},r),f.add(D),_.setItemGraphicEl(k,D)}if(x){var N=I(k,s),z=y.get("clip");jt(N,{shape:{endAngle:gt(E,C,A,z)}},r),f.add(N),TI(r.seriesIndex,_.dataType,k,N),v[k]=N}}).update(function(k,E){var D=_.get(b,k);if(m){var N=h.getItemGraphicEl(E),z=N?N.rotation:s,V=P(k,z);V.rotation=z,ut(V,{rotation:-((isNaN(+D)?A[0]:gt(D,C,A,!0))+Math.PI/2)},r),f.add(V),_.setItemGraphicEl(k,V)}if(x){var F=d[E],$=F?F.shape.endAngle:s,B=I(k,$),H=y.get("clip");ut(B,{shape:{endAngle:gt(D,C,A,H)}},r),f.add(B),TI(r.seriesIndex,_.dataType,k,B),v[k]=B}}).execute(),_.each(function(k){var E=_.getItemModel(k),D=E.getModel("emphasis"),N=D.get("focus"),z=D.get("blurScope"),V=D.get("disabled");if(m){var F=_.getItemGraphicEl(k),$=_.getItemVisual(k,"style"),B=$.fill;if(F instanceof Jr){var H=F.style;F.useStyle(ae({image:H.image,x:H.x,y:H.y,width:H.width,height:H.height},$))}else F.useStyle($),F.type!=="pointer"&&F.setColor(B);F.setStyle(E.getModel(["pointer","itemStyle"]).getItemStyle()),F.style.fill==="auto"&&F.setStyle("fill",a(gt(_.get(b,k),C,[0,1],!0))),F.z2EmphasisLift=0,Rr(F,E),Gt(F,N,z,V)}if(x){var U=v[k];U.useStyle(_.getItemVisual(k,"style")),U.setStyle(E.getModel(["progress","itemStyle"]).getItemStyle()),U.z2EmphasisLift=0,Rr(U,E),Gt(U,N,z,V)}}),this._progressEls=v)},t.prototype._renderAnchor=function(r,n){var i=r.getModel("anchor"),a=i.get("show");if(a){var o=i.get("size"),s=i.get("icon"),l=i.get("offsetCenter"),u=i.get("keepAspect"),c=xr(s,n.cx-o/2+me(l[0],n.r),n.cy-o/2+me(l[1],n.r),o,o,null,u);c.z2=i.get("showAbove")?1:0,c.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(c)}},t.prototype._renderTitleAndDetail=function(r,n,i,a,o){var s=this,l=r.getData(),u=l.mapDimension("value"),c=+r.get("min"),f=+r.get("max"),h=new Ie,d=[],v=[],m=r.isAnimationEnabled(),y=r.get(["pointer","showAbove"]);l.diff(this._data).add(function(x){d[x]=new ot({silent:!0}),v[x]=new ot({silent:!0})}).update(function(x,_){d[x]=s._titleEls[_],v[x]=s._detailEls[_]}).execute(),l.each(function(x){var _=l.getItemModel(x),b=l.get(u,x),S=new Ie,T=a(gt(b,[c,f],[0,1],!0)),C=_.getModel("title");if(C.get("show")){var A=C.get("offsetCenter"),P=o.cx+me(A[0],o.r),I=o.cy+me(A[1],o.r),k=d[x];k.attr({z2:y?0:2,style:kt(C,{x:P,y:I,text:l.getName(x),align:"center",verticalAlign:"middle"},{inheritColor:T})}),S.add(k)}var E=_.getModel("detail");if(E.get("show")){var D=E.get("offsetCenter"),N=o.cx+me(D[0],o.r),z=o.cy+me(D[1],o.r),V=me(E.get("width"),o.r),F=me(E.get("height"),o.r),$=r.get(["progress","show"])?l.getItemVisual(x,"style").fill:T,k=v[x],B=E.get("formatter");k.attr({z2:y?0:2,style:kt(E,{x:N,y:z,text:C_(b,B),width:isNaN(V)?null:V,height:isNaN(F)?null:F,align:"center",verticalAlign:"middle"},{inheritColor:$})}),pQ(k,{normal:E},b,function(U){return C_(U,B)}),m&&gQ(k,x,l,r,{getFormattedLabel:function(U,Y,Z,Q,re,ue){return C_(ue?ue.interpolatedValue:b,B)}}),S.add(k)}h.add(S)}),this.group.add(h),this._titleEls=d,this._detailEls=v},t.type="gauge",t}(bt),iHe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.visualStyleAccessPath="itemStyle",r}return t.prototype.getInitialData=function(r,n){return tp(this,["value"])},t.type="series.gauge",t.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,J.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:J.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:J.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:J.color.axisLabel,fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:J.color.neutral00,borderWidth:0,borderColor:J.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:J.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:J.color.transparent,borderWidth:0,borderColor:J.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:J.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t}(Ct);function aHe(e){e.registerChartView(nHe),e.registerSeriesModel(iHe)}var oHe=["itemStyle","opacity"],sHe=function(e){K(t,e);function t(r,n){var i=e.call(this)||this,a=i,o=new ln,s=new ot;return a.setTextContent(s),i.setTextGuideLine(o),i.updateData(r,n,!0),i}return t.prototype.updateData=function(r,n,i){var a=this,o=r.hostModel,s=r.getItemModel(n),l=r.getItemLayout(n),u=s.getModel("emphasis"),c=s.get(oHe);c=c??1,i||ma(a),a.useStyle(r.getItemVisual(n,"style")),a.style.lineJoin="round",i?(a.setShape({points:l.points}),a.style.opacity=0,jt(a,{style:{opacity:c}},o,n)):ut(a,{style:{opacity:c},shape:{points:l.points}},o,n),Rr(a,s),this._updateLabel(r,n),Gt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(r,n){var i=this,a=this.getTextGuideLine(),o=i.getTextContent(),s=r.hostModel,l=r.getItemModel(n),u=r.getItemLayout(n),c=u.label,f=r.getItemVisual(n,"style"),h=f.fill;qr(o,Br(l),{labelFetcher:r.hostModel,labelDataIndex:n,defaultOpacity:f.opacity,defaultText:r.getName(n)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}});var d=l.getModel("label"),v=d.get("color"),m=v==="inherit"?h:null;i.setTextConfig({local:!0,inside:!!c.inside,insideStroke:m,outsideFill:m});var y=c.linePoints;a.setShape({points:y}),i.textGuideLineConfig={anchor:y?new Ne(y[0][0],y[0][1]):null},ut(o,{style:{x:c.x,y:c.y}},s,n),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),Rj(i,Bj(l),{stroke:h})},t}(Tn),lHe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.ignoreLabelLineUpdate=!0,r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this._data,s=this.group;a.diff(o).add(function(l){var u=new sHe(a,l);a.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(a,l),s.add(c),a.setItemGraphicEl(l,c)}).remove(function(l){var u=o.getItemGraphicEl(l);Os(u,r,l)}).execute(),this._data=a},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type="funnel",t}(bt),uHe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new rp(_e(this.getData,this),_e(this.getRawData,this)),this._defaultLabelLine(r)},t.prototype.getInitialData=function(r,n){return tp(this,{coordDimensions:["value"],encodeDefaulter:We(fj,this)})},t.prototype._defaultLabelLine=function(r){ff(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},t.prototype.getDataParams=function(r){var n=this.getData(),i=e.prototype.getDataParams.call(this,r),a=n.mapDimension("value"),o=n.getSum(a);return i.percent=o?+(n.get(a,r)/o*100).toFixed(2):0,i.$vars.push("percent"),i},t.type="series.funnel",t.defaultOption={coordinateSystemUsage:"box",z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:65,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:J.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:J.color.primary}}},t}(Ct);function cHe(e,t){for(var r=e.mapDimension("value"),n=e.mapArray(r,function(l){return l}),i=[],a=t==="ascending",o=0,s=e.count();o<s;o++)i[o]=o;return ke(t)?i.sort(t):t!=="none"&&i.sort(function(l,u){return a?n[l]-n[u]:n[u]-n[l]}),i}function fHe(e){var t=e.hostModel,r=t.get("orient");e.each(function(n){var i=e.getItemModel(n),a=i.getModel("label"),o=a.get("position"),s=i.getModel("labelLine"),l=e.getItemLayout(n),u=l.points,c=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",f,h,d,v;if(c)o==="insideLeft"?(h=(u[0][0]+u[3][0])/2+5,d=(u[0][1]+u[3][1])/2,f="left"):o==="insideRight"?(h=(u[1][0]+u[2][0])/2-5,d=(u[1][1]+u[2][1])/2,f="right"):(h=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,d=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,f="center"),v=[[h,d],[h,d]];else{var m=void 0,y=void 0,x=void 0,_=void 0,b=s.get("length");o==="left"?(m=(u[3][0]+u[0][0])/2,y=(u[3][1]+u[0][1])/2,x=m-b,h=x-5,f="right"):o==="right"?(m=(u[1][0]+u[2][0])/2,y=(u[1][1]+u[2][1])/2,x=m+b,h=x+5,f="left"):o==="top"?(m=(u[3][0]+u[0][0])/2,y=(u[3][1]+u[0][1])/2,_=y-b,d=_-5,f="center"):o==="bottom"?(m=(u[1][0]+u[2][0])/2,y=(u[1][1]+u[2][1])/2,_=y+b,d=_+5,f="center"):o==="rightTop"?(m=r==="horizontal"?u[3][0]:u[1][0],y=r==="horizontal"?u[3][1]:u[1][1],r==="horizontal"?(_=y-b,d=_-5,f="center"):(x=m+b,h=x+5,f="top")):o==="rightBottom"?(m=u[2][0],y=u[2][1],r==="horizontal"?(_=y+b,d=_+5,f="center"):(x=m+b,h=x+5,f="bottom")):o==="leftTop"?(m=u[0][0],y=r==="horizontal"?u[0][1]:u[1][1],r==="horizontal"?(_=y-b,d=_-5,f="center"):(x=m-b,h=x-5,f="right")):o==="leftBottom"?(m=r==="horizontal"?u[1][0]:u[3][0],y=r==="horizontal"?u[1][1]:u[2][1],r==="horizontal"?(_=y+b,d=_+5,f="center"):(x=m-b,h=x-5,f="right")):(m=(u[1][0]+u[2][0])/2,y=(u[1][1]+u[2][1])/2,r==="horizontal"?(_=y+b,d=_+5,f="center"):(x=m+b,h=x+5,f="left")),r==="horizontal"?(x=m,h=x):(_=y,d=_),v=[[m,y],[x,_]]}l.label={linePoints:v,x:h,y:d,verticalAlign:"middle",textAlign:f,inside:c}})}function hHe(e,t){e.eachSeriesByType("funnel",function(r){var n=r.getData(),i=n.mapDimension("value"),a=r.get("sort"),o=zr(r,t),s=$t(r.getBoxLayoutParams(),o.refContainer),l=r.get("orient"),u=s.width,c=s.height,f=cHe(n,a),h=s.x,d=s.y,v=l==="horizontal"?[me(r.get("minSize"),c),me(r.get("maxSize"),c)]:[me(r.get("minSize"),u),me(r.get("maxSize"),u)],m=n.getDataExtent(i),y=r.get("min"),x=r.get("max");y==null&&(y=Math.min(m[0],0)),x==null&&(x=m[1]);var _=r.get("funnelAlign"),b=r.get("gap"),S=l==="horizontal"?u:c,T=(S-b*(n.count()-1))/n.count(),C=function(V,F){if(l==="horizontal"){var $=n.get(i,V)||0,B=gt($,[y,x],v,!0),H=void 0;switch(_){case"top":H=d;break;case"center":H=d+(c-B)/2;break;case"bottom":H=d+(c-B);break}return[[F,H],[F,H+B]]}var U=n.get(i,V)||0,Y=gt(U,[y,x],v,!0),Z;switch(_){case"left":Z=h;break;case"center":Z=h+(u-Y)/2;break;case"right":Z=h+u-Y;break}return[[Z,F],[Z+Y,F]]};a==="ascending"&&(T=-T,b=-b,l==="horizontal"?h+=u:d+=c,f=f.reverse());for(var A=0;A<f.length;A++){var P=f[A],I=f[A+1],k=n.getItemModel(P);if(l==="horizontal"){var E=k.get(["itemStyle","width"]);E==null?E=T:(E=me(E,u),a==="ascending"&&(E=-E));var D=C(P,h),N=C(I,h+E);h+=E+b,n.setItemLayout(P,{points:D.concat(N.slice().reverse())})}else{var z=k.get(["itemStyle","height"]);z==null?z=T:(z=me(z,c),a==="ascending"&&(z=-z));var D=C(P,d),N=C(I,d+z);d+=z+b,n.setItemLayout(P,{points:D.concat(N.slice().reverse())})}}fHe(n)})}function dHe(e){e.registerChartView(lHe),e.registerSeriesModel(uHe),e.registerLayout(hHe),e.registerProcessor(ep("funnel"))}var vHe=.3,pHe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._dataGroup=new Ie,r._initialized=!1,r}return t.prototype.init=function(){this.group.add(this._dataGroup)},t.prototype.render=function(r,n,i,a){this._progressiveEls=null;var o=this._dataGroup,s=r.getData(),l=this._data,u=r.coordinateSystem,c=u.dimensions,f=t8(r);s.diff(l).add(h).update(d).remove(v).execute();function h(y){var x=e8(s,o,y,c,u);NM(x,s,y,f)}function d(y,x){var _=l.getItemGraphicEl(x),b=hne(s,y,c,u);s.setItemGraphicEl(y,_),ut(_,{shape:{points:b}},r,y),ma(_),NM(_,s,y,f)}function v(y){var x=l.getItemGraphicEl(y);o.remove(x)}if(!this._initialized){this._initialized=!0;var m=gHe(u,r,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(m)}this._data=s},t.prototype.incrementalPrepareRender=function(r,n,i){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},t.prototype.incrementalRender=function(r,n,i){for(var a=n.getData(),o=n.coordinateSystem,s=o.dimensions,l=t8(n),u=this._progressiveEls=[],c=r.start;c<r.end;c++){var f=e8(a,this._dataGroup,c,s,o);f.incremental=!0,NM(f,a,c,l),u.push(f)}},t.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},t.type="parallel",t}(bt);function gHe(e,t,r){var n=e.model,i=e.getRect(),a=new qe({shape:{x:i.x,y:i.y,width:i.width,height:i.height}}),o=n.get("layout")==="horizontal"?"width":"height";return a.setShape(o,0),jt(a,{shape:{width:i.width,height:i.height}},t,r),a}function hne(e,t,r,n){for(var i=[],a=0;a<r.length;a++){var o=r[a],s=e.get(e.mapDimension(o),t);mHe(s,n.getAxis(o).type)||i.push(n.dataToPoint(s,o))}return i}function e8(e,t,r,n,i){var a=hne(e,r,n,i),o=new ln({shape:{points:a},z2:10});return t.add(o),e.setItemGraphicEl(r,o),o}function t8(e){var t=e.get("smooth",!0);return t===!0&&(t=vHe),t=Ho(t),xn(t)&&(t=0),{smooth:t}}function NM(e,t,r,n){e.useStyle(t.getItemVisual(r,"style")),e.style.fill=null,e.setShape("smooth",n.smooth);var i=t.getItemModel(r),a=i.getModel("emphasis");Rr(e,i,"lineStyle"),Gt(e,a.get("focus"),a.get("blurScope"),a.get("disabled"))}function mHe(e,t){return t==="category"?e==null:e==null||isNaN(e)}var yHe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.visualStyleAccessPath="lineStyle",r.visualDrawType="stroke",r}return t.prototype.getInitialData=function(r,n){return es(null,this,{useEncodeDefaulter:_e(xHe,null,this)})},t.prototype.getRawIndicesByActiveState=function(r){var n=this.coordinateSystem,i=this.getData(),a=[];return n.eachActiveState(i,function(o,s){r===o&&a.push(i.getRawIndex(s))}),a},t.type="series.parallel",t.dependencies=["parallel"],t.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},t}(Ct);function xHe(e){var t=e.ecModel.getComponent("parallel",e.get("parallelIndex"));if(t){var r={};return R(t.dimensions,function(n){var i=_He(n);r[n]=i}),r}}function _He(e){return+e.replace("dim","")}var bHe=["lineStyle","opacity"],wHe={seriesType:"parallel",reset:function(e,t){var r=e.coordinateSystem,n={normal:e.get(["lineStyle","opacity"]),active:e.get("activeOpacity"),inactive:e.get("inactiveOpacity")};return{progress:function(i,a){r.eachActiveState(a,function(o,s){var l=n[o];if(o==="normal"&&a.hasItemOption){var u=a.getItemModel(s).get(bHe,!0);u!=null&&(l=u)}var c=a.ensureUniqueItemVisual(s,"style");c.opacity=l},i.start,i.end)}}}};function SHe(e){THe(e),CHe(e)}function THe(e){if(!e.parallel){var t=!1;R(e.series,function(r){r&&r.type==="parallel"&&(t=!0)}),t&&(e.parallel=[{}])}}function CHe(e){var t=Lt(e.parallelAxis);R(t,function(r){if(Ee(r)){var n=r.parallelIndex||0,i=Lt(e.parallel)[n];i&&i.parallelAxisDefault&&Ue(r,i.parallelAxisDefault,!1)}})}var AHe=5,MHe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){this._model=r,this._api=i,this._handlers||(this._handlers={},R(PHe,function(a,o){i.getZr().on(o,this._handlers[o]=_e(a,this))},this)),Xv(this,"_throttledDispatchExpand",r.get("axisExpandRate"),"fixRate")},t.prototype.dispose=function(r,n){My(this,"_throttledDispatchExpand"),R(this._handlers,function(i,a){n.getZr().off(a,i)}),this._handlers=null},t.prototype._throttledDispatchExpand=function(r){this._dispatchExpand(r)},t.prototype._dispatchExpand=function(r){r&&this._api.dispatchAction(ae({type:"parallelAxisExpand"},r))},t.type="parallel",t}(It),PHe={mousedown:function(e){jM(this,"click")&&(this._mouseDownPoint=[e.offsetX,e.offsetY])},mouseup:function(e){var t=this._mouseDownPoint;if(jM(this,"click")&&t){var r=[e.offsetX,e.offsetY],n=Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2);if(n>AHe)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(e){if(!(this._mouseDownPoint||!jM(this,"mousemove"))){var t=this._model,r=t.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]),n=r.behavior;n==="jump"&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand(n==="none"?null:{axisExpandWindow:r.axisExpandWindow,animation:n==="jump"?null:{duration:0}})}}};function jM(e,t){var r=e._model;return r.get("axisExpandable")&&r.get("axisExpandTriggerOn")===t}var kHe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(){e.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(r){var n=this.option;r&&Ue(n,r,!0),this._initDimensions()},t.prototype.contains=function(r,n){var i=r.get("parallelIndex");return i!=null&&n.getComponent("parallel",i)===this},t.prototype.setAxisExpand=function(r){R(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(n){r.hasOwnProperty(n)&&(this.option[n]=r[n])},this)},t.prototype._initDimensions=function(){var r=this.dimensions=[],n=this.parallelAxisIndex=[],i=dt(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);R(i,function(a){r.push("dim"+a.get("dim")),n.push(a.componentIndex)})},t.type="parallel",t.dependencies=["parallelAxis"],t.layoutMode="box",t.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},t}(Qe),LHe=function(e){K(t,e);function t(r,n,i,a,o){var s=e.call(this,r,n,i)||this;return s.type=a||"value",s.axisIndex=o,s}return t.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},t}(wa);function vu(e,t,r,n,i,a){e=e||0;var o=r[1]-r[0];if(i!=null&&(i=yh(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),n==="all"){var s=Math.abs(t[1]-t[0]);s=yh(s,[0,o]),i=a=yh(s,[i,a]),n=0}t[0]=yh(t[0],r),t[1]=yh(t[1],r);var l=RM(t,n);t[n]+=e;var u=i||0,c=r.slice();l.sign<0?c[0]+=u:c[1]-=u,t[n]=yh(t[n],c);var f;return f=RM(t,n),i!=null&&(f.sign!==l.sign||f.span<i)&&(t[1-n]=t[n]+l.sign*i),f=RM(t,n),a!=null&&f.span>a&&(t[1-n]=t[n]+f.sign*a),t}function RM(e,t){var r=e[t]-e[1-t];return{span:Math.abs(r),sign:r>0?-1:r<0?1:t?-1:1}}function yh(e,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,e))}var BM=R,dne=Math.min,vne=Math.max,r8=Math.floor,IHe=Math.ceil,n8=gr,OHe=Math.PI,EHe=function(){function e(t,r,n){this.type="parallel",this._axesMap=Ce(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,r,n)}return e.prototype._init=function(t,r,n){var i=t.dimensions,a=t.parallelAxisIndex;BM(i,function(o,s){var l=a[s],u=r.getComponent("parallelAxis",l),c=this._axesMap.set(o,new LHe(o,w0(u),[0,0],u.get("type"),l)),f=c.type==="category";c.onBand=f&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},e.prototype.update=function(t,r){this._updateAxesFromSeries(this._model,t)},e.prototype.containPoint=function(t){var r=this._makeLayoutInfo(),n=r.axisBase,i=r.layoutBase,a=r.pixelDimIndex,o=t[1-a],s=t[a];return o>=n&&o<=n+r.axisLength&&s>=i&&s<=i+r.layoutLength},e.prototype.getModel=function(){return this._model},e.prototype._updateAxesFromSeries=function(t,r){r.eachSeries(function(n){if(t.contains(n,r)){var i=n.getData();BM(this.dimensions,function(a){var o=this._axesMap.get(a);o.scale.unionExtentFromData(i,i.mapDimension(a)),yf(o.scale,o.model)},this)}},this)},e.prototype.resize=function(t,r){var n=zr(t,r).refContainer;this._rect=$t(t.getBoxLayoutParams(),n),this._layoutAxes()},e.prototype.getRect=function(){return this._rect},e.prototype._makeLayoutInfo=function(){var t=this._model,r=this._rect,n=["x","y"],i=["width","height"],a=t.get("layout"),o=a==="horizontal"?0:1,s=r[i[o]],l=[0,s],u=this.dimensions.length,c=A_(t.get("axisExpandWidth"),l),f=A_(t.get("axisExpandCount")||0,[0,u]),h=t.get("axisExpandable")&&u>3&&u>f&&f>1&&c>0&&s>0,d=t.get("axisExpandWindow"),v;if(d)v=A_(d[1]-d[0],l),d[1]=d[0]+v;else{v=A_(c*(f-1),l);var m=t.get("axisExpandCenter")||r8(u/2);d=[c*m-v/2],d[1]=d[0]+v}var y=(s-v)/(u-f);y<3&&(y=0);var x=[r8(n8(d[0]/c,1))+1,IHe(n8(d[1]/c,1))-1],_=y/c*d[0];return{layout:a,pixelDimIndex:o,layoutBase:r[n[o]],layoutLength:s,axisBase:r[n[1-o]],axisLength:r[i[1-o]],axisExpandable:h,axisExpandWidth:c,axisCollapseWidth:y,axisExpandWindow:d,axisCount:u,winInnerIndices:x,axisExpandWindow0Pos:_}},e.prototype._layoutAxes=function(){var t=this._rect,r=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),a=i.layout;r.each(function(o){var s=[0,i.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),BM(n,function(o,s){var l=(i.axisExpandable?NHe:DHe)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},c={horizontal:OHe/2,vertical:0},f=[u[a].x+t.x,u[a].y+t.y],h=c[a],d=Yr();rl(d,d,h),Ka(d,d,f),this._axesLayout[o]={position:f,rotation:h,transform:d,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},e.prototype.getAxis=function(t){return this._axesMap.get(t)},e.prototype.dataToPoint=function(t,r){return this.axisCoordToPoint(this._axesMap.get(r).dataToCoord(t),r)},e.prototype.eachActiveState=function(t,r,n,i){n==null&&(n=0),i==null&&(i=t.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];R(o,function(y){s.push(t.mapDimension(y)),l.push(a.get(y).model)});for(var u=this.hasAxisBrushed(),c=n;c<i;c++){var f=void 0;if(!u)f="normal";else{f="active";for(var h=t.getValues(s,c),d=0,v=o.length;d<v;d++){var m=l[d].getActiveState(h[d]);if(m==="inactive"){f="inactive";break}}}r(f,c)}},e.prototype.hasAxisBrushed=function(){for(var t=this.dimensions,r=this._axesMap,n=!1,i=0,a=t.length;i<a;i++)r.get(t[i]).model.getActiveState()!=="normal"&&(n=!0);return n},e.prototype.axisCoordToPoint=function(t,r){var n=this._axesLayout[r];return Ua([t,0],n.transform)},e.prototype.getAxisLayout=function(t){return Le(this._axesLayout[t])},e.prototype.getSlidedAxisExpandWindow=function(t){var r=this._makeLayoutInfo(),n=r.pixelDimIndex,i=r.axisExpandWindow.slice(),a=i[1]-i[0],o=[0,r.axisExpandWidth*(r.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:i};var s=t[n]-r.layoutBase-r.axisExpandWindow0Pos,l,u="slide",c=r.axisCollapseWidth,f=this._model.get("axisExpandSlideTriggerArea"),h=f[0]!=null;if(c)h&&c&&s<a*f[0]?(u="jump",l=s-a*f[2]):h&&c&&s>a*(1-f[0])?(u="jump",l=s-a*(1-f[2])):(l=s-a*f[1])>=0&&(l=s-a*(1-f[1]))<=0&&(l=0),l*=r.axisExpandWidth/c,l?vu(l,i,o,"all"):u="none";else{var d=i[1]-i[0],v=o[1]*s/d;i=[vne(0,v-d/2)],i[1]=dne(o[1],i[0]+d),i[0]=i[1]-d}return{axisExpandWindow:i,behavior:u}},e}();function A_(e,t){return dne(vne(e,t[0]),t[1])}function DHe(e,t){var r=t.layoutLength/(t.axisCount-1);return{position:r*e,axisNameAvailableWidth:r,axisLabelShow:!0}}function NHe(e,t){var r=t.layoutLength,n=t.axisExpandWidth,i=t.axisCount,a=t.axisCollapseWidth,o=t.winInnerIndices,s,l=a,u=!1,c;return e<o[0]?(s=e*a,c=a):e<=o[1]?(s=t.axisExpandWindow0Pos+e*n-t.axisExpandWindow[0],l=n,u=!0):(s=r-(i-1-e)*a,c=a),{position:s,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:c}}function jHe(e,t){var r=[];return e.eachComponent("parallel",function(n,i){var a=new EHe(n,e,t);a.name="parallel_"+i,a.resize(n,t),n.coordinateSystem=a,a.model=n,r.push(a)}),e.eachSeries(function(n){if(n.get("coordinateSystem")==="parallel"){var i=n.getReferringComponents("parallel",tr).models[0];n.coordinateSystem=i.coordinateSystem}}),r}var RHe={create:jHe},kO=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.activeIntervals=[],r}return t.prototype.getAreaSelectStyle=function(){return df([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},t.prototype.setActiveIntervals=function(r){var n=this.activeIntervals=Le(r);if(n)for(var i=n.length-1;i>=0;i--)Mi(n[i])},t.prototype.getActiveState=function(r){var n=this.activeIntervals;if(!n.length)return"normal";if(r==null||isNaN(+r))return"inactive";if(n.length===1){var i=n[0];if(i[0]<=r&&r<=i[1])return"active"}else for(var a=0,o=n.length;a<o;a++)if(n[a][0]<=r&&r<=n[a][1])return"active";return"inactive"},t}(Qe);cr(kO,Qv);var xf=!0,Fy=Math.min,uv=Math.max,BHe=Math.pow,zHe=1e4,$He=6,FHe=6,i8="globalPan",VHe={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},GHe={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},a8={brushStyle:{lineWidth:2,stroke:J.color.backgroundTint,fill:J.color.borderTint},transformable:!0,brushMode:"single",removeOnClick:!1},WHe=0,fR=function(e){K(t,e);function t(r){var n=e.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=r,n.group=new Ie,n._uid="brushController_"+WHe++,R(KHe,function(i,a){this._handlers[a]=_e(i,this)},n),n}return t.prototype.enableBrush=function(r){return this._brushType&&this._doDisableBrush(),r.brushType&&this._doEnableBrush(r),this},t.prototype._doEnableBrush=function(r){var n=this._zr;this._enableGlobalPan||MGe(n,i8,this._uid),R(this._handlers,function(i,a){n.on(a,i)}),this._brushType=r.brushType,this._brushOption=Ue(Le(a8),r,!0)},t.prototype._doDisableBrush=function(){var r=this._zr;PGe(r,i8,this._uid),R(this._handlers,function(n,i){r.off(i,n)}),this._brushType=this._brushOption=null},t.prototype.setPanels=function(r){if(r&&r.length){var n=this._panels={};R(r,function(i){n[i.panelId]=Le(i)})}else this._panels=null;return this},t.prototype.mount=function(r){r=r||{},this._enableGlobalPan=r.enableGlobalPan;var n=this.group;return this._zr.add(n),n.attr({x:r.x||0,y:r.y||0,rotation:r.rotation||0,scaleX:r.scaleX||1,scaleY:r.scaleY||1}),this._transform=n.getLocalTransform(),this},t.prototype.updateCovers=function(r){r=le(r,function(h){return Ue(Le(a8),h,!0)});var n="\0-brush-index-",i=this._covers,a=this._covers=[],o=this,s=this._creatingCover;return new Ys(i,r,u,l).add(c).update(c).remove(f).execute(),this;function l(h,d){return(h.id!=null?h.id:n+d)+"-"+h.brushType}function u(h,d){return l(h.__brushOption,d)}function c(h,d){var v=r[h];if(d!=null&&i[d]===s)a[h]=i[d];else{var m=a[h]=d!=null?(i[d].__brushOption=v,i[d]):gne(o,pne(o,v));hR(o,m)}}function f(h){i[h]!==s&&o.group.remove(i[h])}},t.prototype.unmount=function(){return this.enableBrush(!1),LO(this),this._zr.remove(this.group),this},t.prototype.dispose=function(){this.unmount(),this.off()},t}(_a);function pne(e,t){var r=lC[t.brushType].createCover(e,t);return r.__brushOption=t,yne(r,t),e.group.add(r),r}function gne(e,t){var r=dR(t);return r.endCreating&&(r.endCreating(e,t),yne(t,t.__brushOption)),t}function mne(e,t){var r=t.__brushOption;dR(t).updateCoverShape(e,t,r.range,r)}function yne(e,t){var r=t.z;r==null&&(r=zHe),e.traverse(function(n){n.z=r,n.z2=r})}function hR(e,t){dR(t).updateCommon(e,t),mne(e,t)}function dR(e){return lC[e.__brushOption.brushType]}function vR(e,t,r){var n=e._panels;if(!n)return xf;var i,a=e._transform;return R(n,function(o){o.isTargetByCursor(t,r,a)&&(i=o)}),i}function xne(e,t){var r=e._panels;if(!r)return xf;var n=t.__brushOption.panelId;return n!=null?r[n]:xf}function LO(e){var t=e._covers,r=t.length;return R(t,function(n){e.group.remove(n)},e),t.length=0,!!r}function _f(e,t){var r=le(e._covers,function(n){var i=n.__brushOption,a=Le(i.range);return{brushType:i.brushType,panelId:i.panelId,range:a}});e.trigger("brush",{areas:r,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function HHe(e){var t=e._track;if(!t.length)return!1;var r=t[t.length-1],n=t[0],i=r[0]-n[0],a=r[1]-n[1],o=BHe(i*i+a*a,.5);return o>$He}function _ne(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function bne(e,t,r,n){var i=new Ie;return i.add(new qe({name:"main",style:pR(r),silent:!0,draggable:!0,cursor:"move",drift:We(o8,e,t,i,["n","s","w","e"]),ondragend:We(_f,t,{isEnd:!0})})),R(n,function(a){i.add(new qe({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:We(o8,e,t,i,a),ondragend:We(_f,t,{isEnd:!0})}))}),i}function wne(e,t,r,n){var i=n.brushStyle.lineWidth||0,a=uv(i,FHe),o=r[0][0],s=r[1][0],l=o-i/2,u=s-i/2,c=r[0][1],f=r[1][1],h=c-a+i/2,d=f-a+i/2,v=c-o,m=f-s,y=v+i,x=m+i;cs(e,t,"main",o,s,v,m),n.transformable&&(cs(e,t,"w",l,u,a,x),cs(e,t,"e",h,u,a,x),cs(e,t,"n",l,u,y,a),cs(e,t,"s",l,d,y,a),cs(e,t,"nw",l,u,a,a),cs(e,t,"ne",h,u,a,a),cs(e,t,"sw",l,d,a,a),cs(e,t,"se",h,d,a,a))}function IO(e,t){var r=t.__brushOption,n=r.transformable,i=t.childAt(0);i.useStyle(pR(r)),i.attr({silent:!n,cursor:n?"move":"default"}),R([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=t.childOfName(a.join("")),s=a.length===1?OO(e,a[0]):ZHe(e,a);o&&o.attr({silent:!n,invisible:!n,cursor:n?GHe[s]+"-resize":null})})}function cs(e,t,r,n,i,a,o){var s=t.childOfName(r);s&&s.setShape(XHe(gR(e,t,[[n,i],[n+a,i+o]])))}function pR(e){return Oe({strokeNoScale:!0},e.brushStyle)}function Sne(e,t,r,n){var i=[Fy(e,r),Fy(t,n)],a=[uv(e,r),uv(t,n)];return[[i[0],a[0]],[i[1],a[1]]]}function UHe(e){return tu(e.group)}function OO(e,t){var r={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},i=WT(r[t],UHe(e));return n[i]}function ZHe(e,t){var r=[OO(e,t[0]),OO(e,t[1])];return(r[0]==="e"||r[0]==="w")&&r.reverse(),r.join("")}function o8(e,t,r,n,i,a){var o=r.__brushOption,s=e.toRectRange(o.range),l=Tne(t,i,a);R(n,function(u){var c=VHe[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=e.fromRectRange(Sne(s[0][0],s[1][0],s[0][1],s[1][1])),hR(t,r),_f(t,{isEnd:!1})}function YHe(e,t,r,n){var i=t.__brushOption.range,a=Tne(e,r,n);R(i,function(o){o[0]+=a[0],o[1]+=a[1]}),hR(e,t),_f(e,{isEnd:!1})}function Tne(e,t,r){var n=e.group,i=n.transformCoordToLocal(t,r),a=n.transformCoordToLocal(0,0);return[i[0]-a[0],i[1]-a[1]]}function gR(e,t,r){var n=xne(e,t);return n&&n!==xf?n.clipPath(r,e._transform):Le(r)}function XHe(e){var t=Fy(e[0][0],e[1][0]),r=Fy(e[0][1],e[1][1]),n=uv(e[0][0],e[1][0]),i=uv(e[0][1],e[1][1]);return{x:t,y:r,width:n-t,height:i-r}}function qHe(e,t,r){if(!(!e._brushType||JHe(e,t.offsetX,t.offsetY))){var n=e._zr,i=e._covers,a=vR(e,t,r);if(!e._dragging)for(var o=0;o<i.length;o++){var s=i[o].__brushOption;if(a&&(a===xf||s.panelId===a.panelId)&&lC[s.brushType].contain(i[o],r[0],r[1]))return}a&&n.setCursorStyle("crosshair")}}function EO(e){var t=e.event;t.preventDefault&&t.preventDefault()}function DO(e,t,r){return e.childOfName("main").contain(t,r)}function Cne(e,t,r,n){var i=e._creatingCover,a=e._creatingPanel,o=e._brushOption,s;if(e._track.push(r.slice()),HHe(e)||i){if(a&&!i){o.brushMode==="single"&&LO(e);var l=Le(o);l.brushType=s8(l.brushType,a),l.panelId=a===xf?null:a.panelId,i=e._creatingCover=pne(e,l),e._covers.push(i)}if(i){var u=lC[s8(e._brushType,a)],c=i.__brushOption;c.range=u.getCreatingRange(gR(e,i,e._track)),n&&(gne(e,i),u.updateCommon(e,i)),mne(e,i),s={isEnd:n}}}else n&&o.brushMode==="single"&&o.removeOnClick&&vR(e,t,r)&&LO(e)&&(s={isEnd:n,removeOnClick:!0});return s}function s8(e,t){return e==="auto"?t.defaultBrushType:e}var KHe={mousedown:function(e){if(this._dragging)l8(this,e);else if(!e.target||!e.target.draggable){EO(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null;var r=this._creatingPanel=vR(this,e,t);r&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(e){var t=e.offsetX,r=e.offsetY,n=this.group.transformCoordToLocal(t,r);if(qHe(this,e,n),this._dragging){EO(e);var i=Cne(this,e,n,!1);i&&_f(this,i)}},mouseup:function(e){l8(this,e)}};function l8(e,t){if(e._dragging){EO(t);var r=t.offsetX,n=t.offsetY,i=e.group.transformCoordToLocal(r,n),a=Cne(e,t,i,!0);e._dragging=!1,e._track=[],e._creatingCover=null,a&&_f(e,a)}}function JHe(e,t,r){var n=e._zr;return t<0||t>n.getWidth()||r<0||r>n.getHeight()}var lC={lineX:u8(0),lineY:u8(1),rect:{createCover:function(e,t){function r(n){return n}return bne({toRectRange:r,fromRectRange:r},e,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(e){var t=_ne(e);return Sne(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,r,n){wne(e,t,r,n)},updateCommon:IO,contain:DO},polygon:{createCover:function(e,t){var r=new Ie;return r.add(new ln({name:"main",style:pR(t),silent:!0})),r},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new Tn({name:"main",draggable:!0,drift:We(YHe,e,t),ondragend:We(_f,e,{isEnd:!0})}))},updateCoverShape:function(e,t,r,n){t.childAt(0).setShape({points:gR(e,t,r)})},updateCommon:IO,contain:DO}};function u8(e){return{createCover:function(t,r){return bne({toRectRange:function(n){var i=[n,[0,100]];return e&&i.reverse(),i},fromRectRange:function(n){return n[e]}},t,r,[[["w"],["e"]],[["n"],["s"]]][e])},getCreatingRange:function(t){var r=_ne(t),n=Fy(r[0][e],r[1][e]),i=uv(r[0][e],r[1][e]);return[n,i]},updateCoverShape:function(t,r,n,i){var a,o=xne(t,r);if(o!==xf&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(e);else{var s=t._zr;a=[0,[s.getWidth(),s.getHeight()][1-e]]}var l=[n,a];e&&l.reverse(),wne(t,r,l,i)},updateCommon:IO,contain:DO}}function Ane(e){return e=mR(e),function(t){return UN(t,e)}}function Mne(e,t){return e=mR(e),function(r){var n=t??r,i=n?e.width:e.height,a=n?e.x:e.y;return[a,a+(i||0)]}}function Pne(e,t,r){var n=mR(e);return function(i,a){return n.contain(a[0],a[1])&&!Ere(i,t,r)}}function mR(e){return je.create(e)}var QHe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){e.prototype.init.apply(this,arguments),(this._brushController=new fR(n.getZr())).on("brush",_e(this._onBrush,this))},t.prototype.render=function(r,n,i,a){if(!eUe(r,n,a)){this.axisModel=r,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Ie,this.group.add(this._axisGroup),!!r.get("show")){var s=rUe(r,n),l=s.coordinateSystem,u=r.getAreaSelectStyle(),c=u.width,f=r.axis.dim,h=l.getAxisLayout(f),d=ae({strokeContainThreshold:c},h),v=new Zn(r,i,d);v.build(),this._axisGroup.add(v.group),this._refreshBrushController(d,u,r,s,c,i),y0(o,this._axisGroup,r)}}},t.prototype._refreshBrushController=function(r,n,i,a,o,s){var l=i.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),f=je.create({x:l[0],y:-o/2,width:u,height:o});f.x-=c,f.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:r.rotation,x:r.position[0],y:r.position[1]}).setPanels([{panelId:"pl",clipPath:Ane(f),isTargetByCursor:Pne(f,s,a),getLinearBrushOtherExtent:Mne(f,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(tUe(i))},t.prototype._onBrush=function(r){var n=r.areas,i=this.axisModel,a=i.axis,o=le(n,function(s){return[a.coordToData(s.range[0],!0),a.coordToData(s.range[1],!0)]});(!i.option.realtime===r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},t.prototype.dispose=function(){this._brushController.dispose()},t.type="parallelAxis",t}(It);function eUe(e,t,r){return r&&r.type==="axisAreaSelect"&&t.findComponents({mainType:"parallelAxis",query:r})[0]===e}function tUe(e){var t=e.axis;return le(e.activeIntervals,function(r){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(r[0],!0),t.dataToCoord(r[1],!0)]}})}function rUe(e,t){return t.getComponent("parallel",e.get("parallelIndex"))}var nUe={type:"axisAreaSelect",event:"axisAreaSelected"};function iUe(e){e.registerAction(nUe,function(t,r){r.eachComponent({mainType:"parallelAxis",query:t},function(n){n.axis.model.setActiveIntervals(t.intervals)})}),e.registerAction("parallelAxisExpand",function(t,r){r.eachComponent({mainType:"parallel",query:t},function(n){n.setAxisExpand(t)})})}var aUe={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function kne(e){e.registerComponentView(MHe),e.registerComponentModel(kHe),e.registerCoordinateSystem("parallel",RHe),e.registerPreprocessor(SHe),e.registerComponentModel(kO),e.registerComponentView(QHe),sv(e,"parallel",kO,aUe),iUe(e)}function oUe(e){Ye(kne),e.registerChartView(pHe),e.registerSeriesModel(yHe),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,wHe)}var sUe=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return e}(),lUe=function(e){K(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new sUe},t.prototype.buildPath=function(r,n){var i=n.extent;r.moveTo(n.x1,n.y1),r.bezierCurveTo(n.cpx1,n.cpy1,n.cpx2,n.cpy2,n.x2,n.y2),n.orient==="vertical"?(r.lineTo(n.x2+i,n.y2),r.bezierCurveTo(n.cpx2+i,n.cpy2,n.cpx1+i,n.cpy1,n.x1+i,n.y1)):(r.lineTo(n.x2,n.y2+i),r.bezierCurveTo(n.cpx2,n.cpy2+i,n.cpx1,n.cpy1+i,n.x1,n.y1+i)),r.closePath()},t.prototype.highlight=function(){Us(this)},t.prototype.downplay=function(){Zs(this)},t}(nt),uUe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._mainGroup=new Ie,r._focusAdjacencyDisabled=!1,r}return t.prototype.init=function(r,n){this._controller=new Rf(n.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},t.prototype.render=function(r,n,i){var a=this,o=r.getGraph(),s=this._mainGroup,l=r.layoutInfo,u=l.width,c=l.height,f=r.getData(),h=r.getData("edge"),d=r.get("orient");this._model=r,s.removeAll(),s.x=l.x,s.y=l.y,this._updateViewCoordSys(r,i),Dre(r,i,s,this._controller,this._controllerHost,null),o.eachEdge(function(v){var m=new lUe,y=ze(m);y.dataIndex=v.dataIndex,y.seriesIndex=r.seriesIndex,y.dataType="edge";var x=v.getModel(),_=x.getModel("lineStyle"),b=_.get("curveness"),S=v.node1.getLayout(),T=v.node1.getModel(),C=T.get("localX"),A=T.get("localY"),P=v.node2.getLayout(),I=v.node2.getModel(),k=I.get("localX"),E=I.get("localY"),D=v.getLayout(),N,z,V,F,$,B,H,U;m.shape.extent=Math.max(1,D.dy),m.shape.orient=d,d==="vertical"?(N=(C!=null?C*u:S.x)+D.sy,z=(A!=null?A*c:S.y)+S.dy,V=(k!=null?k*u:P.x)+D.ty,F=E!=null?E*c:P.y,$=N,B=z*(1-b)+F*b,H=V,U=z*b+F*(1-b)):(N=(C!=null?C*u:S.x)+S.dx,z=(A!=null?A*c:S.y)+D.sy,V=k!=null?k*u:P.x,F=(E!=null?E*c:P.y)+D.ty,$=N*(1-b)+V*b,B=z,H=N*b+V*(1-b),U=F),m.setShape({x1:N,y1:z,x2:V,y2:F,cpx1:$,cpy1:B,cpx2:H,cpy2:U}),m.useStyle(_.getItemStyle()),c8(m.style,d,v);var Y=""+x.get("value"),Z=Br(x,"edgeLabel");qr(m,Z,{labelFetcher:{getFormattedLabel:function(ue,de,Re,xe,ie,ve){return r.getFormattedLabel(ue,de,"edge",xe,ci(ie,Z.normal&&Z.normal.get("formatter"),Y),ve)}},labelDataIndex:v.dataIndex,defaultText:Y}),m.setTextConfig({position:"inside"});var Q=x.getModel("emphasis");Rr(m,x,"lineStyle",function(ue){var de=ue.getItemStyle();return c8(de,d,v),de}),s.add(m),h.setItemGraphicEl(v.dataIndex,m);var re=Q.get("focus");Gt(m,re==="adjacency"?v.getAdjacentDataIndices():re==="trajectory"?v.getTrajectoryDataIndices():re,Q.get("blurScope"),Q.get("disabled"))}),o.eachNode(function(v){var m=v.getLayout(),y=v.getModel(),x=y.get("localX"),_=y.get("localY"),b=y.getModel("emphasis"),S=y.get(["itemStyle","borderRadius"])||0,T=new qe({shape:{x:x!=null?x*u:m.x,y:_!=null?_*c:m.y,width:m.dx,height:m.dy,r:S},style:y.getModel("itemStyle").getItemStyle(),z2:10});qr(T,Br(y),{labelFetcher:{getFormattedLabel:function(A,P){return r.getFormattedLabel(A,P,"node")}},labelDataIndex:v.dataIndex,defaultText:v.id}),T.disableLabelAnimation=!0,T.setStyle("fill",v.getVisual("color")),T.setStyle("decal",v.getVisual("style").decal),Rr(T,y),s.add(T),f.setItemGraphicEl(v.dataIndex,T),ze(T).dataType="node";var C=b.get("focus");Gt(T,C==="adjacency"?v.getAdjacentDataIndices():C==="trajectory"?v.getTrajectoryDataIndices():C,b.get("blurScope"),b.get("disabled"))}),f.eachItemGraphicEl(function(v,m){var y=f.getItemModel(m);y.get("draggable")&&(v.drift=function(x,_){a._focusAdjacencyDisabled=!0,this.shape.x+=x,this.shape.y+=_,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:r.id,dataIndex:f.getRawIndex(m),localX:this.shape.x/u,localY:this.shape.y/c})},v.ondragend=function(){a._focusAdjacencyDisabled=!1},v.draggable=!0,v.cursor="move")}),!this._data&&r.isAnimationEnabled()&&s.setClipPath(cUe(s.getBoundingRect(),r,function(){s.removeClipPath()})),this._data=r.getData()},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._updateViewCoordSys=function(r,n){var i=r.layoutInfo,a=i.width,o=i.height,s=r.coordinateSystem=new Bf(null,{api:n,ecModel:r.ecModel});s.zoomLimit=r.get("scaleLimit"),s.setBoundingRect(0,0,a,o),s.setCenter(r.get("center")),s.setZoom(r.get("zoom")),this._controllerHost.target.attr({x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY})},t.type="sankey",t}(bt);function c8(e,t,r){switch(e.fill){case"source":e.fill=r.node1.getVisual("color"),e.decal=r.node1.getVisual("style").decal;break;case"target":e.fill=r.node2.getVisual("color"),e.decal=r.node2.getVisual("style").decal;break;case"gradient":var n=r.node1.getVisual("color"),i=r.node2.getVisual("color");ye(n)&&ye(i)&&(e.fill=new If(0,0,+(t==="horizontal"),+(t==="vertical"),[{color:n,offset:0},{color:i,offset:1}]))}}function cUe(e,t,r){var n=new qe({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return jt(n,{shape:{width:e.width+20}},t,r),n}var fUe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[],o=r.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l<o.length;l++)o[l].depth!=null&&o[l].depth>=0&&(s[o[l].depth]=new rt(o[l],this,n));var u=cR(a,i,this,!0,c);return u.data;function c(f,h){f.wrapMethod("getItemModel",function(d,v){var m=d.parentModel,y=m.getData().getItemLayout(v);if(y){var x=y.depth,_=m.levelModels[x];_&&(d.parentModel=_)}return d}),h.wrapMethod("getItemModel",function(d,v){var m=d.parentModel,y=m.getGraph().getEdgeByIndex(v),x=y.node1.getLayout();if(x){var _=x.depth,b=m.levelModels[_];b&&(d.parentModel=b)}return d})}},t.prototype.setNodePosition=function(r,n){var i=this.option.data||this.option.nodes,a=i[r];a.localX=n[0],a.localY=n[1]},t.prototype.setCenter=function(r){this.option.center=r},t.prototype.setZoom=function(r){this.option.zoom=r},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(r,n,i){function a(d){return isNaN(d)||d==null}if(i==="edge"){var o=this.getDataParams(r,i),s=o.data,l=o.value,u=s.source+" -- "+s.target;return Mr("nameValue",{name:u,value:l,noValue:a(l)})}else{var c=this.getGraph().getNodeByIndex(r),f=c.getLayout().value,h=this.getDataParams(r,i).data.name;return Mr("nameValue",{name:h!=null?h+"":null,value:f,noValue:a(f)})}},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(r,n){var i=e.prototype.getDataParams.call(this,r,n);if(i.value==null&&n==="node"){var a=this.getGraph().getNodeByIndex(r),o=a.getLayout().value;i.value=o}return i},t.type="series.sankey",t.layoutMode="box",t.defaultOption={z:2,coordinateSystemUsage:"box",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:"global",center:null,zoom:1,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:J.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:J.color.primary}},animationEasing:"linear",animationDuration:1e3},t}(Ct);function hUe(e,t){e.eachSeriesByType("sankey",function(r){var n=r.get("nodeWidth"),i=r.get("nodeGap"),a=zr(r,t).refContainer,o=$t(r.getBoxLayoutParams(),a);r.layoutInfo=o;var s=o.width,l=o.height,u=r.getGraph(),c=u.nodes,f=u.edges;vUe(c);var h=dt(c,function(y){return y.getLayout().value===0}),d=h.length!==0?0:r.get("layoutIterations"),v=r.get("orient"),m=r.get("nodeAlign");dUe(c,f,n,i,s,l,d,v,m)})}function dUe(e,t,r,n,i,a,o,s,l){pUe(e,t,r,i,a,s,l),xUe(e,t,a,i,n,o,s),PUe(e,s)}function vUe(e){R(e,function(t){var r=iu(t.outEdges,Xw),n=iu(t.inEdges,Xw),i=t.getValue()||0,a=Math.max(r,n,i);t.setLayout({value:a},!0)})}function pUe(e,t,r,n,i,a,o){for(var s=[],l=[],u=[],c=[],f=0,h=0;h<t.length;h++)s[h]=1;for(var h=0;h<e.length;h++)l[h]=e[h].inEdges.length,l[h]===0&&u.push(e[h]);for(var d=-1;u.length;){for(var v=0;v<u.length;v++){var m=u[v],y=m.hostGraph.data.getRawDataItem(m.dataIndex),x=y.depth!=null&&y.depth>=0;x&&y.depth>d&&(d=y.depth),m.setLayout({depth:x?y.depth:f},!0),a==="vertical"?m.setLayout({dy:r},!0):m.setLayout({dx:r},!0);for(var _=0;_<m.outEdges.length;_++){var b=m.outEdges[_],S=t.indexOf(b);s[S]=0;var T=b.node2,C=e.indexOf(T);--l[C]===0&&c.indexOf(T)<0&&c.push(T)}}++f,u=c,c=[]}for(var h=0;h<s.length;h++)if(s[h]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var A=d>f-1?d:f-1;o&&o!=="left"&&gUe(e,o,a,A);var P=a==="vertical"?(i-r)/A:(n-r)/A;yUe(e,P,a)}function Lne(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return t.depth!=null&&t.depth>=0}function gUe(e,t,r,n){if(t==="right"){for(var i=[],a=e,o=0;a.length;){for(var s=0;s<a.length;s++){var l=a[s];l.setLayout({skNodeHeight:o},!0);for(var u=0;u<l.inEdges.length;u++){var c=l.inEdges[u];i.indexOf(c.node1)<0&&i.push(c.node1)}}a=i,i=[],++o}R(e,function(f){Lne(f)||f.setLayout({depth:Math.max(0,n-f.getLayout().skNodeHeight)},!0)})}else t==="justify"&&mUe(e,n)}function mUe(e,t){R(e,function(r){!Lne(r)&&!r.outEdges.length&&r.setLayout({depth:t},!0)})}function yUe(e,t,r){R(e,function(n){var i=n.getLayout().depth*t;r==="vertical"?n.setLayout({y:i},!0):n.setLayout({x:i},!0)})}function xUe(e,t,r,n,i,a,o){var s=_Ue(e,o);bUe(s,t,r,n,i,o),zM(s,i,r,n,o);for(var l=1;a>0;a--)l*=.99,wUe(s,l,o),zM(s,i,r,n,o),MUe(s,l,o),zM(s,i,r,n,o)}function _Ue(e,t){var r=[],n=t==="vertical"?"y":"x",i=xI(e,function(a){return a.getLayout()[n]});return i.keys.sort(function(a,o){return a-o}),R(i.keys,function(a){r.push(i.buckets.get(a))}),r}function bUe(e,t,r,n,i,a){var o=1/0;R(e,function(s){var l=s.length,u=0;R(s,function(f){u+=f.getLayout().value});var c=a==="vertical"?(n-(l-1)*i)/u:(r-(l-1)*i)/u;c<o&&(o=c)}),R(e,function(s){R(s,function(l,u){var c=l.getLayout().value*o;a==="vertical"?(l.setLayout({x:u},!0),l.setLayout({dx:c},!0)):(l.setLayout({y:u},!0),l.setLayout({dy:c},!0))})}),R(t,function(s){var l=+s.getValue()*o;s.setLayout({dy:l},!0)})}function zM(e,t,r,n,i){var a=i==="vertical"?"x":"y";R(e,function(o){o.sort(function(m,y){return m.getLayout()[a]-y.getLayout()[a]});for(var s,l,u,c=0,f=o.length,h=i==="vertical"?"dx":"dy",d=0;d<f;d++)l=o[d],u=c-l.getLayout()[a],u>0&&(s=l.getLayout()[a]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]+l.getLayout()[h]+t;var v=i==="vertical"?n:r;if(u=c-t-v,u>0){s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var d=f-2;d>=0;--d)l=o[d],u=l.getLayout()[a]+l.getLayout()[h]+t-c,u>0&&(s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]}})}function wUe(e,t,r){R(e.slice().reverse(),function(n){R(n,function(i){if(i.outEdges.length){var a=iu(i.outEdges,SUe,r)/iu(i.outEdges,Xw);if(isNaN(a)){var o=i.outEdges.length;a=o?iu(i.outEdges,TUe,r)/o:0}if(r==="vertical"){var s=i.getLayout().x+(a-pu(i,r))*t;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(a-pu(i,r))*t;i.setLayout({y:l},!0)}}})})}function SUe(e,t){return pu(e.node2,t)*e.getValue()}function TUe(e,t){return pu(e.node2,t)}function CUe(e,t){return pu(e.node1,t)*e.getValue()}function AUe(e,t){return pu(e.node1,t)}function pu(e,t){return t==="vertical"?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function Xw(e){return e.getValue()}function iu(e,t,r){for(var n=0,i=e.length,a=-1;++a<i;){var o=+t(e[a],r);isNaN(o)||(n+=o)}return n}function MUe(e,t,r){R(e,function(n){R(n,function(i){if(i.inEdges.length){var a=iu(i.inEdges,CUe,r)/iu(i.inEdges,Xw);if(isNaN(a)){var o=i.inEdges.length;a=o?iu(i.inEdges,AUe,r)/o:0}if(r==="vertical"){var s=i.getLayout().x+(a-pu(i,r))*t;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(a-pu(i,r))*t;i.setLayout({y:l},!0)}}})})}function PUe(e,t){var r=t==="vertical"?"x":"y";R(e,function(n){n.outEdges.sort(function(i,a){return i.node2.getLayout()[r]-a.node2.getLayout()[r]}),n.inEdges.sort(function(i,a){return i.node1.getLayout()[r]-a.node1.getLayout()[r]})}),R(e,function(n){var i=0,a=0;R(n.outEdges,function(o){o.setLayout({sy:i},!0),i+=o.getLayout().dy}),R(n.inEdges,function(o){o.setLayout({ty:a},!0),a+=o.getLayout().dy})})}function kUe(e){e.eachSeriesByType("sankey",function(t){var r=t.getGraph(),n=r.nodes,i=r.edges;if(n.length){var a=1/0,o=-1/0;R(n,function(s){var l=s.getLayout().value;l<a&&(a=l),l>o&&(o=l)}),R(n,function(s){var l=new Xr({type:"color",mappingMethod:"linear",dataExtent:[a,o],visual:t.get("color")}),u=l.mapValueToVisual(s.getLayout().value),c=s.getModel().get(["itemStyle","color"]);c!=null?(s.setVisual("color",c),s.setVisual("style",{fill:c})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}i.length&&R(i,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function LUe(e){e.registerChartView(uUe),e.registerSeriesModel(fUe),e.registerLayout(hUe),e.registerVisual(kUe),e.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(t,r){r.eachComponent({mainType:"series",subType:"sankey",query:t},function(n){n.setNodePosition(t.dataIndex,[t.localX,t.localY])})}),e.registerAction({type:"sankeyRoam",event:"sankeyRoam",update:"none"},function(t,r,n){r.eachComponent({mainType:"series",subType:"sankey",query:t},function(i){var a=i.coordinateSystem,o=iC(a,t,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}var Ine=function(){function e(){}return e.prototype._hasEncodeRule=function(t){var r=this.getEncode();return r&&r.get(t)!=null},e.prototype.getInitialData=function(t,r){var n,i=r.getComponent("xAxis",this.get("xAxisIndex")),a=r.getComponent("yAxis",this.get("yAxisIndex")),o=i.get("type"),s=a.get("type"),l;o==="category"?(t.layout="horizontal",n=i.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(t.layout="vertical",n=a.getOrdinalMeta(),l=!this._hasEncodeRule("y")):t.layout=t.layout||"horizontal";var u=["x","y"],c=t.layout==="horizontal"?0:1,f=this._baseAxisDim=u[c],h=u[1-c],d=[i,a],v=d[c].get("type"),m=d[1-c].get("type"),y=t.data;if(y&&l){var x=[];R(y,function(S,T){var C;oe(S)?(C=S.slice(),S.unshift(T)):oe(S.value)?(C=ae({},S),C.value=C.value.slice(),S.value.unshift(T)):C=S,x.push(C)}),t.data=x}var _=this.defaultValueDimensions,b=[{name:f,type:Ow(v),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:Ow(m),dimsDef:_.slice()}];return tp(this,{coordDimensions:b,dimensionsCount:_.length+1,encodeDefaulter:We(FQ,b,this)})},e.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},e}(),One=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],r.visualDrawType="stroke",r}return t.type="series.boxplot",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:J.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:J.color.shadow}},animationDuration:800},t}(Ct);cr(One,Ine,!0);var IUe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=r.get("layout")==="horizontal"?1:0;a.diff(s).add(function(u){if(a.hasValue(u)){var c=a.getItemLayout(u),f=f8(c,a,u,l,!0);a.setItemGraphicEl(u,f),o.add(f)}}).update(function(u,c){var f=s.getItemGraphicEl(c);if(!a.hasValue(u)){o.remove(f);return}var h=a.getItemLayout(u);f?(ma(f),Ene(h,f,a,u)):f=f8(h,a,u,l),o.add(f),a.setItemGraphicEl(u,f)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).execute(),this._data=a},t.prototype.remove=function(r){var n=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(a){a&&n.remove(a)})},t.type="boxplot",t}(bt),OUe=function(){function e(){}return e}(),EUe=function(e){K(t,e);function t(r){var n=e.call(this,r)||this;return n.type="boxplotBoxPath",n}return t.prototype.getDefaultShape=function(){return new OUe},t.prototype.buildPath=function(r,n){var i=n.points,a=0;for(r.moveTo(i[a][0],i[a][1]),a++;a<4;a++)r.lineTo(i[a][0],i[a][1]);for(r.closePath();a<i.length;a++)r.moveTo(i[a][0],i[a][1]),a++,r.lineTo(i[a][0],i[a][1])},t}(nt);function f8(e,t,r,n,i){var a=e.ends,o=new EUe({shape:{points:i?DUe(a,n,e):a}});return Ene(e,o,t,r,i),o}function Ene(e,t,r,n,i){var a=r.hostModel,o=Of[i?"initProps":"updateProps"];o(t,{shape:{points:e.ends}},a,n),t.useStyle(r.getItemVisual(n,"style")),t.style.strokeNoScale=!0,t.z2=100;var s=r.getItemModel(n),l=s.getModel("emphasis");Rr(t,s),Gt(t,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function DUe(e,t,r){return le(e,function(n){return n=n.slice(),n[t]=r.initBaseline,n})}var am=R;function NUe(e){var t=jUe(e);am(t,function(r){var n=r.seriesModels;n.length&&(RUe(r),am(n,function(i,a){BUe(i,r.boxOffsetList[a],r.boxWidthList[a])}))})}function jUe(e){var t=[],r=[];return e.eachSeriesByType("boxplot",function(n){var i=n.getBaseAxis(),a=He(r,i);a<0&&(a=r.length,r[a]=i,t[a]={axis:i,seriesModels:[]}),t[a].seriesModels.push(n)}),t}function RUe(e){var t=e.axis,r=e.seriesModels,n=r.length,i=e.boxWidthList=[],a=e.boxOffsetList=[],o=[],s;if(t.type==="category")s=t.getBandWidth();else{var l=0;am(r,function(v){l=Math.max(l,v.getData().count())});var u=t.getExtent();s=Math.abs(u[1]-u[0])/l}am(r,function(v){var m=v.get("boxWidth");oe(m)||(m=[m,m]),o.push([me(m[0],s)||0,me(m[1],s)||0])});var c=s*.8-2,f=c/n*.3,h=(c-f*(n-1))/n,d=h/2-c/2;am(r,function(v,m){a.push(d),d+=f+h,i.push(Math.min(Math.max(h,o[m][0]),o[m][1]))})}function BUe(e,t,r){var n=e.coordinateSystem,i=e.getData(),a=r/2,o=e.get("layout")==="horizontal"?0:1,s=1-o,l=["x","y"],u=i.mapDimension(l[o]),c=i.mapDimensionsAll(l[s]);if(u==null||c.length<5)return;for(var f=0;f<i.count();f++){var h=i.get(u,f),d=b(h,c[2],f),v=b(h,c[0],f),m=b(h,c[1],f),y=b(h,c[3],f),x=b(h,c[4],f),_=[];S(_,m,!1),S(_,y,!0),_.push(v,m,x,y),T(_,v),T(_,x),T(_,d),i.setItemLayout(f,{initBaseline:d[s],ends:_})}function b(C,A,P){var I=i.get(A,P),k=[];k[o]=C,k[s]=I;var E;return isNaN(C)||isNaN(I)?E=[NaN,NaN]:(E=n.dataToPoint(k),E[o]+=t),E}function S(C,A,P){var I=A.slice(),k=A.slice();I[o]+=a,k[o]-=a,P?C.push(I,k):C.push(k,I)}function T(C,A){var P=A.slice(),I=A.slice();P[o]-=a,I[o]+=a,C.push(P,I)}}function zUe(e,t){t=t||{};for(var r=[],n=[],i=t.boundIQR,a=i==="none"||i===0,o=0;o<e.length;o++){var s=Mi(e[o].slice()),l=ub(s,.25),u=ub(s,.5),c=ub(s,.75),f=s[0],h=s[s.length-1],d=(i??1.5)*(c-l),v=a?f:Math.max(f,l-d),m=a?h:Math.min(h,c+d),y=t.itemNameFormatter,x=ke(y)?y({value:o}):ye(y)?y.replace("{value}",o+""):o+"";r.push([x,v,l,u,c,m]);for(var _=0;_<s.length;_++){var b=s[_];if(b<v||b>m){var S=[x,b];n.push(S)}}}return{boxData:r,outliers:n}}var $Ue={type:"echarts:boxplot",transform:function(t){var r=t.upstream;if(r.sourceFormat!==un){var n="";mt(n)}var i=zUe(r.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function FUe(e){e.registerSeriesModel(One),e.registerChartView(IUe),e.registerLayout(NUe),e.registerTransform($Ue)}var VUe=["itemStyle","borderColor"],GUe=["itemStyle","borderColor0"],WUe=["itemStyle","borderColorDoji"],HUe=["itemStyle","color"],UUe=["itemStyle","color0"];function yR(e,t){return t.get(e>0?HUe:UUe)}function xR(e,t){return t.get(e===0?WUe:e>0?VUe:GUe)}var ZUe={seriesType:"candlestick",plan:Yv(),performRawSeries:!0,reset:function(e,t){if(!t.isSeriesFiltered(e)){var r=e.pipelineContext.large;return!r&&{progress:function(n,i){for(var a;(a=n.next())!=null;){var o=i.getItemModel(a),s=i.getItemLayout(a).sign,l=o.getItemStyle();l.fill=yR(s,o),l.stroke=xR(s,o)||l.fill;var u=i.ensureUniqueItemVisual(a,"style");ae(u,l)}}}}}},YUe=["color","borderColor"],XUe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(r),this._isLargeDraw?this._renderLarge(r):this._renderNormal(r)},t.prototype.incrementalPrepareRender=function(r,n,i){this._clear(),this._updateDrawMode(r)},t.prototype.incrementalRender=function(r,n,i,a){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(r,n):this._incrementalRenderNormal(r,n)},t.prototype.eachRendered=function(r){Pu(this._progressiveEls||this.group,r)},t.prototype._updateDrawMode=function(r){var n=r.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},t.prototype._renderNormal=function(r){var n=r.getData(),i=this._data,a=this.group,o=n.getLayout("isSimpleBox"),s=r.get("clip",!0),l=r.coordinateSystem,u=l.getArea&&l.getArea();this._data||a.removeAll(),n.diff(i).add(function(c){if(n.hasValue(c)){var f=n.getItemLayout(c);if(s&&h8(u,f))return;var h=$M(f,c,!0);jt(h,{shape:{points:f.ends}},r,c),FM(h,n,c,o),a.add(h),n.setItemGraphicEl(c,h)}}).update(function(c,f){var h=i.getItemGraphicEl(f);if(!n.hasValue(c)){a.remove(h);return}var d=n.getItemLayout(c);if(s&&h8(u,d)){a.remove(h);return}h?(ut(h,{shape:{points:d.ends}},r,c),ma(h)):h=$M(d),FM(h,n,c,o),a.add(h),n.setItemGraphicEl(c,h)}).remove(function(c){var f=i.getItemGraphicEl(c);f&&a.remove(f)}).execute(),this._data=n},t.prototype._renderLarge=function(r){this._clear(),d8(r,this.group);var n=r.get("clip",!0)?C0(r.coordinateSystem,!1,r):null;n?this.group.setClipPath(n):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(r,n){for(var i=n.getData(),a=i.getLayout("isSimpleBox"),o;(o=r.next())!=null;){var s=i.getItemLayout(o),l=$M(s);FM(l,i,o,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},t.prototype._incrementalRenderLarge=function(r,n){d8(n,this.group,this._progressiveEls,!0)},t.prototype.remove=function(r){this._clear()},t.prototype._clear=function(){this.group.removeAll(),this._data=null},t.type="candlestick",t}(bt),qUe=function(){function e(){}return e}(),KUe=function(e){K(t,e);function t(r){var n=e.call(this,r)||this;return n.type="normalCandlestickBox",n}return t.prototype.getDefaultShape=function(){return new qUe},t.prototype.buildPath=function(r,n){var i=n.points;this.__simpleBox?(r.moveTo(i[4][0],i[4][1]),r.lineTo(i[6][0],i[6][1])):(r.moveTo(i[0][0],i[0][1]),r.lineTo(i[1][0],i[1][1]),r.lineTo(i[2][0],i[2][1]),r.lineTo(i[3][0],i[3][1]),r.closePath(),r.moveTo(i[4][0],i[4][1]),r.lineTo(i[5][0],i[5][1]),r.moveTo(i[6][0],i[6][1]),r.lineTo(i[7][0],i[7][1]))},t}(nt);function $M(e,t,r){var n=e.ends;return new KUe({shape:{points:r?JUe(n,e):n},z2:100})}function h8(e,t){for(var r=!0,n=0;n<t.ends.length;n++)if(e.contain(t.ends[n][0],t.ends[n][1])){r=!1;break}return r}function FM(e,t,r,n){var i=t.getItemModel(r);e.useStyle(t.getItemVisual(r,"style")),e.style.strokeNoScale=!0,e.__simpleBox=n,Rr(e,i);var a=t.getItemLayout(r).sign;R(e.states,function(s,l){var u=i.getModel(l),c=yR(a,u),f=xR(a,u)||c,h=s.style||(s.style={});c&&(h.fill=c),f&&(h.stroke=f)});var o=i.getModel("emphasis");Gt(e,o.get("focus"),o.get("blurScope"),o.get("disabled"))}function JUe(e,t){return le(e,function(r){return r=r.slice(),r[1]=t.initBaseline,r})}var QUe=function(){function e(){}return e}(),VM=function(e){K(t,e);function t(r){var n=e.call(this,r)||this;return n.type="largeCandlestickBox",n}return t.prototype.getDefaultShape=function(){return new QUe},t.prototype.buildPath=function(r,n){for(var i=n.points,a=0;a<i.length;)if(this.__sign===i[a++]){var o=i[a++];r.moveTo(o,i[a++]),r.lineTo(o,i[a++])}else a+=3},t}(nt);function d8(e,t,r,n){var i=e.getData(),a=i.getLayout("largePoints"),o=new VM({shape:{points:a},__sign:1,ignoreCoarsePointer:!0});t.add(o);var s=new VM({shape:{points:a},__sign:-1,ignoreCoarsePointer:!0});t.add(s);var l=new VM({shape:{points:a},__sign:0,ignoreCoarsePointer:!0});t.add(l),GM(1,o,e),GM(-1,s,e),GM(0,l,e),n&&(o.incremental=!0,s.incremental=!0),r&&r.push(o,s)}function GM(e,t,r,n){var i=xR(e,r)||yR(e,r),a=r.getModel("itemStyle").getItemStyle(YUe);t.useStyle(a),t.style.fill=null,t.style.stroke=i}var Dne=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],r}return t.prototype.getShadowDim=function(){return"open"},t.prototype.brushSelector=function(r,n,i){var a=n.getItemLayout(r);return a&&i.rect(a.brushRect)},t.type="series.candlestick",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},t}(Ct);cr(Dne,Ine,!0);function e7e(e){!e||!oe(e.series)||R(e.series,function(t){Ee(t)&&t.type==="k"&&(t.type="candlestick")})}var t7e={seriesType:"candlestick",plan:Yv(),reset:function(e){var t=e.coordinateSystem,r=e.getData(),n=r7e(e,r),i=0,a=1,o=["x","y"],s=r.getDimensionIndex(r.mapDimension(o[i])),l=le(r.mapDimensionsAll(o[a]),r.getDimensionIndex,r),u=l[0],c=l[1],f=l[2],h=l[3];if(r.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),s<0||l.length<4)return;return{progress:e.pipelineContext.large?v:d};function d(m,y){for(var x,_=y.getStore();(x=m.next())!=null;){var b=_.get(s,x),S=_.get(u,x),T=_.get(c,x),C=_.get(f,x),A=_.get(h,x),P=Math.min(S,T),I=Math.max(S,T),k=$(P,b),E=$(I,b),D=$(C,b),N=$(A,b),z=[];B(z,E,0),B(z,k,1),z.push(U(N),U(E),U(D),U(k));var V=y.getItemModel(x),F=!!V.get(["itemStyle","borderColorDoji"]);y.setItemLayout(x,{sign:v8(_,x,S,T,c,F),initBaseline:S>T?E[a]:k[a],ends:z,brushRect:H(C,A,b)})}function $(Y,Z){var Q=[];return Q[i]=Z,Q[a]=Y,isNaN(Z)||isNaN(Y)?[NaN,NaN]:t.dataToPoint(Q)}function B(Y,Z,Q){var re=Z.slice(),ue=Z.slice();re[i]=fb(re[i]+n/2,1,!1),ue[i]=fb(ue[i]-n/2,1,!0),Q?Y.push(re,ue):Y.push(ue,re)}function H(Y,Z,Q){var re=$(Y,Q),ue=$(Z,Q);return re[i]-=n/2,ue[i]-=n/2,{x:re[0],y:re[1],width:n,height:ue[1]-re[1]}}function U(Y){return Y[i]=fb(Y[i],1),Y}}function v(m,y){for(var x=ko(m.count*4),_=0,b,S=[],T=[],C,A=y.getStore(),P=!!e.get(["itemStyle","borderColorDoji"]);(C=m.next())!=null;){var I=A.get(s,C),k=A.get(u,C),E=A.get(c,C),D=A.get(f,C),N=A.get(h,C);if(isNaN(I)||isNaN(D)||isNaN(N)){x[_++]=NaN,_+=3;continue}x[_++]=v8(A,C,k,E,c,P),S[i]=I,S[a]=D,b=t.dataToPoint(S,null,T),x[_++]=b?b[0]:NaN,x[_++]=b?b[1]:NaN,S[a]=N,b=t.dataToPoint(S,null,T),x[_++]=b?b[1]:NaN}y.setLayout("largePoints",x)}}};function v8(e,t,r,n,i,a){var o;return r>n?o=-1:r<n?o=1:o=a?0:t>0?e.get(i,t-1)<=n?1:-1:1,o}function r7e(e,t){var r=e.getBaseAxis(),n,i=r.type==="category"?r.getBandWidth():(n=r.getExtent(),Math.abs(n[1]-n[0])/t.count()),a=me(Ae(e.get("barMaxWidth"),i),i),o=me(Ae(e.get("barMinWidth"),1),i),s=e.get("barWidth");return s!=null?me(s,i):Math.max(Math.min(i/2,a),o)}function n7e(e){e.registerChartView(XUe),e.registerSeriesModel(Dne),e.registerPreprocessor(e7e),e.registerVisual(ZUe),e.registerLayout(t7e)}function p8(e,t){var r=t.rippleEffectColor||t.color;e.eachChild(function(n){n.attr({z:t.z,zlevel:t.zlevel,style:{stroke:t.brushType==="stroke"?r:null,fill:t.brushType==="fill"?r:null}})})}var i7e=function(e){K(t,e);function t(r,n){var i=e.call(this)||this,a=new S0(r,n),o=new Ie;return i.add(a),i.add(o),i.updateData(r,n),i}return t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(r){for(var n=r.symbolType,i=r.color,a=r.rippleNumber,o=this.childAt(1),s=0;s<a;s++){var l=xr(n,-1,-1,2,2,i);l.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var u=-s/a*r.period+r.effectOffset;l.animate("",!0).when(r.period,{scaleX:r.rippleScale/2,scaleY:r.rippleScale/2}).delay(u).start(),l.animateStyle(!0).when(r.period,{opacity:0}).delay(u).start(),o.add(l)}p8(o,r)},t.prototype.updateEffectAnimation=function(r){for(var n=this._effectCfg,i=this.childAt(1),a=["symbolType","period","rippleScale","rippleNumber"],o=0;o<a.length;o++){var s=a[o];if(n[s]!==r[s]){this.stopEffectAnimation(),this.startEffectAnimation(r);return}}p8(i,r)},t.prototype.highlight=function(){Us(this)},t.prototype.downplay=function(){Zs(this)},t.prototype.getSymbolType=function(){var r=this.childAt(0);return r&&r.getSymbolType()},t.prototype.updateData=function(r,n){var i=this,a=r.hostModel;this.childAt(0).updateData(r,n);var o=this.childAt(1),s=r.getItemModel(n),l=r.getItemVisual(n,"symbol"),u=qv(r.getItemVisual(n,"symbolSize")),c=r.getItemVisual(n,"style"),f=c&&c.fill,h=s.getModel("emphasis");o.setScale(u),o.traverse(function(y){y.setStyle("fill",f)});var d=Nf(r.getItemVisual(n,"symbolOffset"),u);d&&(o.x=d[0],o.y=d[1]);var v=r.getItemVisual(n,"symbolRotate");o.rotation=(v||0)*Math.PI/180||0;var m={};m.showEffectOn=a.get("showEffectOn"),m.rippleScale=s.get(["rippleEffect","scale"]),m.brushType=s.get(["rippleEffect","brushType"]),m.period=s.get(["rippleEffect","period"])*1e3,m.effectOffset=n/r.count(),m.z=a.getShallow("z")||0,m.zlevel=a.getShallow("zlevel")||0,m.symbolType=l,m.color=f,m.rippleEffectColor=s.get(["rippleEffect","color"]),m.rippleNumber=s.get(["rippleEffect","number"]),m.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(m):this.startEffectAnimation(m),this._effectCfg=m):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(y){y==="emphasis"?m.showEffectOn!=="render"&&i.startEffectAnimation(m):y==="normal"&&m.showEffectOn!=="render"&&i.stopEffectAnimation()}),this._effectCfg=m,Gt(this,h.get("focus"),h.get("blurScope"),h.get("disabled"))},t.prototype.fadeOut=function(r){r&&r()},t}(Ie),a7e=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(){this._symbolDraw=new T0(i7e)},t.prototype.render=function(r,n,i){var a=r.getData(),o=this._symbolDraw;o.updateData(a,{clipShape:this._getClipShape(r)}),this.group.add(o.group)},t.prototype._getClipShape=function(r){var n=r.coordinateSystem,i=n&&n.getArea&&n.getArea();return r.get("clip",!0)?i:null},t.prototype.updateTransform=function(r,n,i){var a=r.getData();this.group.dirty();var o=A0("").reset(r,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout()},t.prototype._updateGroupTransform=function(r){var n=r.coordinateSystem;n&&n.getRoamTransform&&(this.group.transform=VK(n.getRoamTransform()),this.group.decomposeTransform())},t.prototype.remove=function(r,n){this._symbolDraw&&this._symbolDraw.remove(!0)},t.type="effectScatter",t}(bt),o7e=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.getInitialData=function(r,n){return es(null,this,{useEncodeDefaulter:!0})},t.prototype.brushSelector=function(r,n,i){return i.point(n.getItemLayout(r))},t.type="series.effectScatter",t.dependencies=["grid","polar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},t}(Ct);function s7e(e){e.registerChartView(a7e),e.registerSeriesModel(o7e),e.registerLayout(A0("effectScatter"))}var Nne=function(e){K(t,e);function t(r,n,i){var a=e.call(this)||this;return a.add(a.createLine(r,n,i)),a._updateEffectSymbol(r,n),a}return t.prototype.createLine=function(r,n,i){return new lR(r,n,i)},t.prototype._updateEffectSymbol=function(r,n){var i=r.getItemModel(n),a=i.getModel("effect"),o=a.get("symbolSize"),s=a.get("symbol");oe(o)||(o=[o,o]);var l=r.getItemVisual(n,"style"),u=a.get("color")||l&&l.stroke,c=this.childAt(1);this._symbolType!==s&&(this.remove(c),c=xr(s,-.5,-.5,1,1,u),c.z2=100,c.culling=!0,this.add(c)),c&&(c.setStyle("shadowColor",u),c.setStyle(a.getItemStyle(["color"])),c.scaleX=o[0],c.scaleY=o[1],c.setColor(u),this._symbolType=s,this._symbolScale=o,this._updateEffectAnimation(r,a,n))},t.prototype._updateEffectAnimation=function(r,n,i){var a=this.childAt(1);if(a){var o=r.getItemLayout(i),s=n.get("period")*1e3,l=n.get("loop"),u=n.get("roundTrip"),c=n.get("constantSpeed"),f=on(n.get("delay"),function(d){return d/r.count()*s/3});if(a.ignore=!0,this._updateAnimationPoints(a,o),c>0&&(s=this._getLineLength(a)/c*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){a.stopAnimation();var h=void 0;ke(f)?h=f(i):h=f,a.__t>0&&(h=-s*a.__t),this._animateSymbol(a,s,h,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},t.prototype._animateSymbol=function(r,n,i,a,o){if(n>0){r.__t=0;var s=this,l=r.animate("",a).when(o?n*2:n,{__t:o?2:1}).delay(i).during(function(){s._updateSymbolPosition(r)});a||l.done(function(){s.remove(r)}),l.start()}},t.prototype._getLineLength=function(r){return bs(r.__p1,r.__cp1)+bs(r.__cp1,r.__p2)},t.prototype._updateAnimationPoints=function(r,n){r.__p1=n[0],r.__p2=n[1],r.__cp1=n[2]||[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]},t.prototype.updateData=function(r,n,i){this.childAt(0).updateData(r,n,i),this._updateEffectSymbol(r,n)},t.prototype._updateSymbolPosition=function(r){var n=r.__p1,i=r.__p2,a=r.__cp1,o=r.__t<1?r.__t:2-r.__t,s=[r.x,r.y],l=s.slice(),u=an,c=nI;s[0]=u(n[0],a[0],i[0],o),s[1]=u(n[1],a[1],i[1],o);var f=r.__t<1?c(n[0],a[0],i[0],o):c(i[0],a[0],n[0],1-o),h=r.__t<1?c(n[1],a[1],i[1],o):c(i[1],a[1],n[1],1-o);r.rotation=-Math.atan2(h,f)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(r.__lastT!==void 0&&r.__lastT<r.__t?(r.scaleY=bs(l,s)*1.05,o===1&&(s[0]=l[0]+(s[0]-l[0])/2,s[1]=l[1]+(s[1]-l[1])/2)):r.__lastT===1?r.scaleY=2*bs(n,s):r.scaleY=this._symbolScale[1]),r.__lastT=r.__t,r.ignore=!1,r.x=s[0],r.y=s[1]},t.prototype.updateLayout=function(r,n){this.childAt(0).updateLayout(r,n);var i=r.getItemModel(n).getModel("effect");this._updateEffectAnimation(r,i,n)},t}(Ie),jne=function(e){K(t,e);function t(r,n,i){var a=e.call(this)||this;return a._createPolyline(r,n,i),a}return t.prototype._createPolyline=function(r,n,i){var a=r.getItemLayout(n),o=new ln({shape:{points:a}});this.add(o),this._updateCommonStl(r,n,i)},t.prototype.updateData=function(r,n,i){var a=r.hostModel,o=this.childAt(0),s={shape:{points:r.getItemLayout(n)}};ut(o,s,a,n),this._updateCommonStl(r,n,i)},t.prototype._updateCommonStl=function(r,n,i){var a=this.childAt(0),o=r.getItemModel(n),s=i&&i.emphasisLineStyle,l=i&&i.focus,u=i&&i.blurScope,c=i&&i.emphasisDisabled;if(!i||r.hasItemOption){var f=o.getModel("emphasis");s=f.getModel("lineStyle").getLineStyle(),c=f.get("disabled"),l=f.get("focus"),u=f.get("blurScope")}a.useStyle(r.getItemVisual(n,"style")),a.style.fill=null,a.style.strokeNoScale=!0;var h=a.ensureState("emphasis");h.style=s,Gt(this,l,u,c)},t.prototype.updateLayout=function(r,n){var i=this.childAt(0);i.setShape("points",r.getItemLayout(n))},t}(Ie),l7e=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._lastFrame=0,r._lastFramePercent=0,r}return t.prototype.createLine=function(r,n,i){return new jne(r,n,i)},t.prototype._updateAnimationPoints=function(r,n){this._points=n;for(var i=[0],a=0,o=1;o<n.length;o++){var s=n[o-1],l=n[o];a+=bs(s,l),i.push(a)}if(a===0){this._length=0;return}for(var o=0;o<i.length;o++)i[o]/=a;this._offsets=i,this._length=a},t.prototype._getLineLength=function(){return this._length},t.prototype._updateSymbolPosition=function(r){var n=r.__t<1?r.__t:2-r.__t,i=this._points,a=this._offsets,o=i.length;if(a){var s=this._lastFrame,l;if(n<this._lastFramePercent){var u=Math.min(s+1,o-1);for(l=u;l>=0&&!(a[l]<=n);l--);l=Math.min(l,o-2)}else{for(l=s;l<o&&!(a[l]>n);l++);l=Math.min(l-1,o-2)}var c=(n-a[l])/(a[l+1]-a[l]),f=i[l],h=i[l+1];r.x=f[0]*(1-c)+c*h[0],r.y=f[1]*(1-c)+c*h[1];var d=r.__t<1?h[0]-f[0]:f[0]-h[0],v=r.__t<1?h[1]-f[1]:f[1]-h[1];r.rotation=-Math.atan2(v,d)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=n,r.ignore=!1}},t}(Nne),u7e=function(){function e(){this.polyline=!1,this.curveness=0,this.segs=[]}return e}(),c7e=function(e){K(t,e);function t(r){var n=e.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.getDefaultStyle=function(){return{stroke:J.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new u7e},t.prototype.buildPath=function(r,n){var i=n.segs,a=n.curveness,o;if(n.polyline)for(o=this._off;o<i.length;){var s=i[o++];if(s>0){r.moveTo(i[o++],i[o++]);for(var l=1;l<s;l++)r.lineTo(i[o++],i[o++])}}else for(o=this._off;o<i.length;){var u=i[o++],c=i[o++],f=i[o++],h=i[o++];if(r.moveTo(u,c),a>0){var d=(u+f)/2-(c-h)*a,v=(c+h)/2-(f-u)*a;r.quadraticCurveTo(d,v,f,h)}else r.lineTo(f,h)}this.incremental&&(this._off=o,this.notClear=!0)},t.prototype.findDataIndex=function(r,n){var i=this.shape,a=i.segs,o=i.curveness,s=this.style.lineWidth;if(i.polyline)for(var l=0,u=0;u<a.length;){var c=a[u++];if(c>0)for(var f=a[u++],h=a[u++],d=1;d<c;d++){var v=a[u++],m=a[u++];if(Tl(f,h,v,m,s,r,n))return l}l++}else for(var l=0,u=0;u<a.length;){var f=a[u++],h=a[u++],v=a[u++],m=a[u++];if(o>0){var y=(f+v)/2-(h-m)*o,x=(h+m)/2-(v-f)*o;if(jJ(f,h,y,x,v,m,s,r,n))return l}else if(Tl(f,h,v,m,s,r,n))return l;l++}return-1},t.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.segs,a=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u<i.length;){var c=i[u++],f=i[u++];a=Math.min(c,a),s=Math.max(c,s),o=Math.min(f,o),l=Math.max(f,l)}r=this._rect=new je(a,o,s,l)}return r},t}(nt),f7e=function(){function e(){this.group=new Ie}return e.prototype.updateData=function(t){this._clear();var r=this._create();r.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(r,t)},e.prototype.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clear()},e.prototype.incrementalUpdate=function(t,r){var n=this._newAdded[0],i=r.getLayout("linesPoints"),a=n&&n.shape.segs;if(a&&a.length<2e4){var o=a.length,s=new Float32Array(o+i.length);s.set(a),s.set(i,o),n.setShape({segs:s})}else{this._newAdded=[];var l=this._create();l.incremental=!0,l.setShape({segs:i}),this._setCommon(l,r),l.__startIndex=t.start}},e.prototype.remove=function(){this._clear()},e.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},e.prototype._create=function(){var t=new c7e({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(t),this.group.add(t),t},e.prototype._setCommon=function(t,r,n){var i=r.hostModel;t.setShape({polyline:i.get("polyline"),curveness:i.get(["lineStyle","curveness"])}),t.useStyle(i.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var a=r.getVisual("style");a&&a.stroke&&t.setStyle("stroke",a.stroke),t.setStyle("fill",null);var o=ze(t);o.seriesIndex=i.seriesIndex,t.on("mousemove",function(s){o.dataIndex=null;var l=t.hoverDataIdx;l>0&&(o.dataIndex=l+t.__startIndex)})},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),Rne={seriesType:"lines",plan:Yv(),reset:function(e){var t=e.coordinateSystem;if(t){var r=e.get("polyline"),n=e.pipelineContext.large;return{progress:function(i,a){var o=[];if(n){var s=void 0,l=i.end-i.start;if(r){for(var u=0,c=i.start;c<i.end;c++)u+=e.getLineCoordsCount(c);s=new Float32Array(l+u*2)}else s=new Float32Array(l*4);for(var f=0,h=[],c=i.start;c<i.end;c++){var d=e.getLineCoords(c,o);r&&(s[f++]=d);for(var v=0;v<d;v++)h=t.dataToPoint(o[v],!1,h),s[f++]=h[0],s[f++]=h[1]}a.setLayout("linesPoints",s)}else for(var c=i.start;c<i.end;c++){var m=a.getItemModel(c),d=e.getLineCoords(c,o),y=[];if(r)for(var x=0;x<d;x++)y.push(t.dataToPoint(o[x]));else{y[0]=t.dataToPoint(o[0]),y[1]=t.dataToPoint(o[1]);var _=m.get(["lineStyle","curveness"]);+_&&(y[2]=[(y[0][0]+y[1][0])/2-(y[0][1]-y[1][1])*_,(y[0][1]+y[1][1])/2-(y[1][0]-y[0][0])*_])}a.setItemLayout(c,y)}}}}}},h7e=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this._updateLineDraw(a,r),s=r.get("zlevel"),l=r.get(["effect","trailLength"]),u=i.getZr(),c=u.painter.getType()==="svg";c||u.painter.getLayer(s).clear(!0),this._lastZlevel!=null&&!c&&u.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(r)&&l>0&&(c||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(a);var f=r.get("clip",!0)&&C0(r.coordinateSystem,!1,r);f?this.group.setClipPath(f):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},t.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateLineDraw(a,r);o.incrementalPrepareUpdate(a),this._clearLayer(i),this._finished=!1},t.prototype.incrementalRender=function(r,n,i){this._lineDraw.incrementalUpdate(r,n.getData()),this._finished=r.end===n.getData().count()},t.prototype.eachRendered=function(r){this._lineDraw&&this._lineDraw.eachRendered(r)},t.prototype.updateTransform=function(r,n,i){var a=r.getData(),o=r.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=Rne.reset(r,n,i);s.progress&&s.progress({start:0,end:a.count(),count:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(i)},t.prototype._updateLineDraw=function(r,n){var i=this._lineDraw,a=this._showEffect(n),o=!!n.get("polyline"),s=n.pipelineContext,l=s.large;return(!i||a!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=l?new f7e:new uR(o?a?l7e:jne:a?Nne:lR),this._hasEffet=a,this._isPolyline=o,this._isLargeDraw=l),this.group.add(i.group),i},t.prototype._showEffect=function(r){return!!r.get(["effect","show"])},t.prototype._clearLayer=function(r){var n=r.getZr(),i=n.painter.getType()==="svg";!i&&this._lastZlevel!=null&&n.painter.getLayer(this._lastZlevel).clear(!0)},t.prototype.remove=function(r,n){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(n)},t.prototype.dispose=function(r,n){this.remove(r,n)},t.type="lines",t}(bt),d7e=typeof Uint32Array>"u"?Array:Uint32Array,v7e=typeof Float64Array>"u"?Array:Float64Array;function g8(e){var t=e.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(e.data=le(t,function(r){var n=[r[0].coord,r[1].coord],i={coords:n};return r[0].name&&(i.fromName=r[0].name),r[1].name&&(i.toName=r[1].name),PT([i,r[0],r[1]])}))}var p7e=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.visualStyleAccessPath="lineStyle",r.visualDrawType="stroke",r}return t.prototype.init=function(r){r.data=r.data||[],g8(r);var n=this._processFlatCoordsArray(r.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(r.data=new Float32Array(n.count)),e.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(r){if(g8(r),r.data){var n=this._processFlatCoordsArray(r.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(r.data=new Float32Array(n.count))}e.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(r){var n=this._processFlatCoordsArray(r.data);n.flatCoords&&(this._flatCoords?(this._flatCoords=Xd(this._flatCoords,n.flatCoords),this._flatCoordsOffset=Xd(this._flatCoordsOffset,n.flatCoordsOffset)):(this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset),r.data=new Float32Array(n.count)),this.getRawData().appendData(r.data)},t.prototype._getCoordsFromItemModel=function(r){var n=this.getData().getItemModel(r),i=n.option instanceof Array?n.option:n.getShallow("coords");return i},t.prototype.getLineCoordsCount=function(r){return this._flatCoordsOffset?this._flatCoordsOffset[r*2+1]:this._getCoordsFromItemModel(r).length},t.prototype.getLineCoords=function(r,n){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[r*2],a=this._flatCoordsOffset[r*2+1],o=0;o<a;o++)n[o]=n[o]||[],n[o][0]=this._flatCoords[i+o*2],n[o][1]=this._flatCoords[i+o*2+1];return a}else{for(var s=this._getCoordsFromItemModel(r),o=0;o<s.length;o++)n[o]=n[o]||[],n[o][0]=s[o][0],n[o][1]=s[o][1];return s.length}},t.prototype._processFlatCoordsArray=function(r){var n=0;if(this._flatCoords&&(n=this._flatCoords.length),st(r[0])){for(var i=r.length,a=new d7e(i),o=new v7e(i),s=0,l=0,u=0,c=0;c<i;){u++;var f=r[c++];a[l++]=s+n,a[l++]=f;for(var h=0;h<f;h++){var d=r[c++],v=r[c++];o[s++]=d,o[s++]=v}}return{flatCoordsOffset:new Uint32Array(a.buffer,0,l),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:r.length}},t.prototype.getInitialData=function(r,n){var i=new Rn(["value"],this);return i.hasItemOption=!1,i.initData(r.data,[],function(a,o,s,l){if(a instanceof Array)return NaN;i.hasItemOption=!0;var u=a.value;if(u!=null)return u instanceof Array?u[l]:u}),i},t.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=a.getItemModel(r),s=o.get("name");if(s)return s;var l=o.get("fromName"),u=o.get("toName"),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Mr("nameValue",{name:c.join(" > ")})},t.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},t.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?1e4:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?2e4:this.get("progressiveThreshold"))},t.prototype.getZLevelKey=function(){var r=this.getModel("effect"),n=r.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:r.get("show")&&n>0?n+"":""},t.type="series.lines",t.dependencies=["grid","polar","geo","calendar"],t.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},t}(Ct);function M_(e){return e instanceof Array||(e=[e,e]),e}var g7e={seriesType:"lines",reset:function(e){var t=M_(e.get("symbol")),r=M_(e.get("symbolSize")),n=e.getData();n.setVisual("fromSymbol",t&&t[0]),n.setVisual("toSymbol",t&&t[1]),n.setVisual("fromSymbolSize",r&&r[0]),n.setVisual("toSymbolSize",r&&r[1]);function i(a,o){var s=a.getItemModel(o),l=M_(s.getShallow("symbol",!0)),u=M_(s.getShallow("symbolSize",!0));l[0]&&a.setItemVisual(o,"fromSymbol",l[0]),l[1]&&a.setItemVisual(o,"toSymbol",l[1]),u[0]&&a.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&a.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:n.hasItemOption?i:null}}};function m7e(e){e.registerChartView(h7e),e.registerSeriesModel(p7e),e.registerLayout(Rne),e.registerVisual(g7e)}var y7e=256,x7e=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=fi.createCanvas();this.canvas=t}return e.prototype.update=function(t,r,n,i,a,o){var s=this._getBrush(),l=this._getGradient(a,"inRange"),u=this._getGradient(a,"outOfRange"),c=this.pointSize+this.blurSize,f=this.canvas,h=f.getContext("2d"),d=t.length;f.width=r,f.height=n;for(var v=0;v<d;++v){var m=t[v],y=m[0],x=m[1],_=m[2],b=i(_);h.globalAlpha=b,h.drawImage(s,y-c,x-c)}if(!f.width||!f.height)return f;for(var S=h.getImageData(0,0,f.width,f.height),T=S.data,C=0,A=T.length,P=this.minOpacity,I=this.maxOpacity,k=I-P;C<A;){var b=T[C+3]/256,E=Math.floor(b*(y7e-1))*4;if(b>0){var D=o(b)?l:u;b>0&&(b=b*k+P),T[C++]=D[E],T[C++]=D[E+1],T[C++]=D[E+2],T[C++]=D[E+3]*b*256}else C+=4}return h.putImageData(S,0,0),f},e.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=fi.createCanvas()),r=this.pointSize+this.blurSize,n=r*2;t.width=n,t.height=n;var i=t.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor=J.color.neutral99,i.beginPath(),i.arc(-r,r,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),t},e.prototype._getGradient=function(t,r){for(var n=this._gradientPixels,i=n[r]||(n[r]=new Uint8ClampedArray(256*4)),a=[0,0,0,0],o=0,s=0;s<256;s++)t[r](s/255,!0,a),i[o++]=a[0],i[o++]=a[1],i[o++]=a[2],i[o++]=a[3];return i},e}();function _7e(e,t,r){var n=e[1]-e[0];t=le(t,function(o){return{interval:[(o.interval[0]-e[0])/n,(o.interval[1]-e[0])/n]}});var i=t.length,a=0;return function(o){var s;for(s=a;s<i;s++){var l=t[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}if(s===i)for(s=a-1;s>=0;s--){var l=t[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}return s>=0&&s<i&&r[s]}}function b7e(e,t){var r=e[1]-e[0];return t=[(t[0]-e[0])/r,(t[1]-e[0])/r],function(n){return n>=t[0]&&n<=t[1]}}function m8(e){var t=e.dimensions;return t[0]==="lng"&&t[1]==="lat"}var w7e=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a;n.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===r&&(a=s)})}),this._progressiveEls=null,this.group.removeAll();var o=r.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"||o.type==="matrix"?this._renderOnGridLike(r,i,0,r.getData().count()):m8(o)&&this._renderOnGeo(o,r,a,i)},t.prototype.incrementalPrepareRender=function(r,n,i){this.group.removeAll()},t.prototype.incrementalRender=function(r,n,i,a){var o=n.coordinateSystem;o&&(m8(o)?this.render(n,i,a):(this._progressiveEls=[],this._renderOnGridLike(n,a,r.start,r.end,!0)))},t.prototype.eachRendered=function(r){Pu(this._progressiveEls||this.group,r)},t.prototype._renderOnGridLike=function(r,n,i,a,o){var s=r.coordinateSystem,l=du(s,"cartesian2d"),u=du(s,"matrix"),c,f,h,d;if(l){var v=s.getAxis("x"),m=s.getAxis("y");c=v.getBandWidth()+.5,f=m.getBandWidth()+.5,h=v.scale.getExtent(),d=m.scale.getExtent()}for(var y=this.group,x=r.getData(),_=r.getModel(["emphasis","itemStyle"]).getItemStyle(),b=r.getModel(["blur","itemStyle"]).getItemStyle(),S=r.getModel(["select","itemStyle"]).getItemStyle(),T=r.get(["itemStyle","borderRadius"]),C=Br(r),A=r.getModel("emphasis"),P=A.get("focus"),I=A.get("blurScope"),k=A.get("disabled"),E=l||u?[x.mapDimension("x"),x.mapDimension("y"),x.mapDimension("value")]:[x.mapDimension("time"),x.mapDimension("value")],D=i;D<a;D++){var N=void 0,z=x.getItemVisual(D,"style");if(l){var V=x.get(E[0],D),F=x.get(E[1],D);if(isNaN(x.get(E[2],D))||isNaN(V)||isNaN(F)||V<h[0]||V>h[1]||F<d[0]||F>d[1])continue;var $=s.dataToPoint([V,F]);N=new qe({shape:{x:$[0]-c/2,y:$[1]-f/2,width:c,height:f},style:z})}else if(u){var B=s.dataToLayout([x.get(E[0],D),x.get(E[1],D)]).rect;if(xn(B.x))continue;N=new qe({z2:1,shape:B,style:z})}else{if(isNaN(x.get(E[1],D)))continue;var H=s.dataToLayout([x.get(E[0],D)]),B=H.contentRect||H.rect;if(xn(B.x)||xn(B.y))continue;N=new qe({z2:1,shape:B,style:z})}if(x.hasItemOption){var U=x.getItemModel(D),Y=U.getModel("emphasis");_=Y.getModel("itemStyle").getItemStyle(),b=U.getModel(["blur","itemStyle"]).getItemStyle(),S=U.getModel(["select","itemStyle"]).getItemStyle(),T=U.get(["itemStyle","borderRadius"]),P=Y.get("focus"),I=Y.get("blurScope"),k=Y.get("disabled"),C=Br(U)}N.shape.r=T;var Z=r.getRawValue(D),Q="-";Z&&Z[2]!=null&&(Q=Z[2]+""),qr(N,C,{labelFetcher:r,labelDataIndex:D,defaultOpacity:z.opacity,defaultText:Q}),N.ensureState("emphasis").style=_,N.ensureState("blur").style=b,N.ensureState("select").style=S,Gt(N,P,I,k),N.incremental=o,o&&(N.states.emphasis.hoverLayer=!0),y.add(N),x.setItemGraphicEl(D,N),this._progressiveEls&&this._progressiveEls.push(N)}},t.prototype._renderOnGeo=function(r,n,i,a){var o=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=n.getData(),u=this._hmLayer||this._hmLayer||new x7e;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var c=r.getViewRect().clone(),f=r.getRoamTransform();c.applyTransform(f);var h=Math.max(c.x,0),d=Math.max(c.y,0),v=Math.min(c.width+c.x,a.getWidth()),m=Math.min(c.height+c.y,a.getHeight()),y=v-h,x=m-d,_=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],b=l.mapArray(_,function(A,P,I){var k=r.dataToPoint([A,P]);return k[0]-=h,k[1]-=d,k.push(I),k}),S=i.getExtent(),T=i.type==="visualMap.continuous"?b7e(S,i.option.range):_7e(S,i.getPieceList(),i.option.selected);u.update(b,y,x,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},T);var C=new Jr({style:{width:y,height:x,x:h,y:d,image:u.canvas},silent:!0});this.group.add(C)},t.type="heatmap",t}(bt),S7e=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(r,n){return es(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var r=Zv.get(this.get("coordinateSystem"));if(r&&r.dimensions)return r.dimensions[0]==="lng"&&r.dimensions[1]==="lat"},t.type="series.heatmap",t.dependencies=["grid","geo","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:J.color.primary}}},t}(Ct);function T7e(e){e.registerChartView(w7e),e.registerSeriesModel(S7e)}var C7e=["itemStyle","borderWidth"],y8=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],WM=new Qo,A7e=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=this.group,o=r.getData(),s=this._data,l=r.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),f=l.master.getRect(),h={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:r,coordSys:l,coordSysExtent:[[f.x,f.x+f.width],[f.y,f.y+f.height]],isHorizontal:c,valueDim:y8[+c],categoryDim:y8[1-+c]};o.diff(s).add(function(v){if(o.hasValue(v)){var m=_8(o,v),y=x8(o,v,m,h),x=b8(o,h,y);o.setItemGraphicEl(v,x),a.add(x),S8(x,h,y)}}).update(function(v,m){var y=s.getItemGraphicEl(m);if(!o.hasValue(v)){a.remove(y);return}var x=_8(o,v),_=x8(o,v,x,h),b=Gne(o,_);y&&b!==y.__pictorialShapeStr&&(a.remove(y),o.setItemGraphicEl(v,null),y=null),y?E7e(y,h,_):y=b8(o,h,_,!0),o.setItemGraphicEl(v,y),y.__pictorialSymbolMeta=_,a.add(y),S8(y,h,_)}).remove(function(v){var m=s.getItemGraphicEl(v);m&&w8(s,v,m.__pictorialSymbolMeta.animationModel,m)}).execute();var d=r.get("clip",!0)?C0(r.coordinateSystem,!1,r):null;return d?a.setClipPath(d):a.removeClipPath(),this._data=o,this.group},t.prototype.remove=function(r,n){var i=this.group,a=this._data;r.get("animation")?a&&a.eachItemGraphicEl(function(o){w8(a,ze(o).dataIndex,r,o)}):i.removeAll()},t.type="pictorialBar",t}(bt);function x8(e,t,r,n){var i=e.getItemLayout(t),a=r.get("symbolRepeat"),o=r.get("symbolClip"),s=r.get("symbolPosition")||"start",l=r.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=r.get("symbolPatternSize")||2,f=r.isAnimationEnabled(),h={dataIndex:t,layout:i,itemModel:r,symbolType:e.getItemVisual(t,"symbol")||"circle",style:e.getItemVisual(t,"style"),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:r.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:f?r:null,hoverScale:f&&r.get(["emphasis","scale"]),z2:r.getShallow("z",!0)||0};M7e(r,a,i,n,h),P7e(e,t,i,a,o,h.boundingLength,h.pxSign,c,n,h),k7e(r,h.symbolScale,u,n,h);var d=h.symbolSize,v=Nf(r.get("symbolOffset"),d);return L7e(r,d,i,a,o,v,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,n,h),h}function M7e(e,t,r,n,i){var a=n.valueDim,o=e.get("symbolBoundingData"),s=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(r[a.wh]<=0),c;if(oe(o)){var f=[HM(s,o[0])-l,HM(s,o[1])-l];f[1]<f[0]&&f.reverse(),c=f[u]}else o!=null?c=HM(s,o)-l:t?c=n.coordSysExtent[a.index][u]-l:c=r[a.wh];i.boundingLength=c,t&&(i.repeatCutLength=r[a.wh]);var h=a.xy==="x",d=s.inverse;i.pxSign=h&&!d||!h&&d?c>=0?1:-1:c>0?1:-1}function HM(e,t){return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))}function P7e(e,t,r,n,i,a,o,s,l,u){var c=l.valueDim,f=l.categoryDim,h=Math.abs(r[f.wh]),d=e.getItemVisual(t,"symbolSize"),v;oe(d)?v=d.slice():d==null?v=["100%","100%"]:v=[d,d],v[f.index]=me(v[f.index],h),v[c.index]=me(v[c.index],n?h:Math.abs(a)),u.symbolSize=v;var m=u.symbolScale=[v[0]/s,v[1]/s];m[c.index]*=(l.isHorizontal?-1:1)*o}function k7e(e,t,r,n,i){var a=e.get(C7e)||0;a&&(WM.attr({scaleX:t[0],scaleY:t[1],rotation:r}),WM.updateTransform(),a/=WM.getLineScale(),a*=t[n.valueDim.index]),i.valueLineWidth=a||0}function L7e(e,t,r,n,i,a,o,s,l,u,c,f){var h=c.categoryDim,d=c.valueDim,v=f.pxSign,m=Math.max(t[d.index]+s,0),y=m;if(n){var x=Math.abs(l),_=on(e.get("symbolMargin"),"15%")+"",b=!1;_.lastIndexOf("!")===_.length-1&&(b=!0,_=_.slice(0,_.length-1));var S=me(_,t[d.index]),T=Math.max(m+S*2,0),C=b?0:S*2,A=kN(n),P=A?n:T8((x+C)/T),I=x-P*m;S=I/2/(b?P:Math.max(P-1,1)),T=m+S*2,C=b?0:S*2,!A&&n!=="fixed"&&(P=u?T8((Math.abs(u)+C)/T):0),y=P*T-C,f.repeatTimes=P,f.symbolMargin=S}var k=v*(y/2),E=f.pathPosition=[];E[h.index]=r[h.wh]/2,E[d.index]=o==="start"?k:o==="end"?l-k:l/2,a&&(E[0]+=a[0],E[1]+=a[1]);var D=f.bundlePosition=[];D[h.index]=r[h.xy],D[d.index]=r[d.xy];var N=f.barRectShape=ae({},r);N[d.wh]=v*Math.max(Math.abs(r[d.wh]),Math.abs(E[d.index]+k)),N[h.wh]=r[h.wh];var z=f.clipShape={};z[h.xy]=-r[h.xy],z[h.wh]=c.ecSize[h.wh],z[d.xy]=0,z[d.wh]=r[d.wh]}function Bne(e){var t=e.symbolPatternSize,r=xr(e.symbolType,-t/2,-t/2,t,t);return r.attr({culling:!0}),r.type!=="image"&&r.setStyle({strokeNoScale:!0}),r}function zne(e,t,r,n){var i=e.__pictorialBundle,a=r.symbolSize,o=r.valueLineWidth,s=r.pathPosition,l=t.valueDim,u=r.repeatTimes||0,c=0,f=a[t.valueDim.index]+o+r.symbolMargin*2;for(_R(e,function(m){m.__pictorialAnimationIndex=c,m.__pictorialRepeatTimes=u,c<u?gd(m,null,v(c),r,n):gd(m,null,{scaleX:0,scaleY:0},r,n,function(){i.remove(m)}),c++});c<u;c++){var h=Bne(r);h.__pictorialAnimationIndex=c,h.__pictorialRepeatTimes=u,i.add(h);var d=v(c);gd(h,{x:d.x,y:d.y,scaleX:0,scaleY:0},{scaleX:d.scaleX,scaleY:d.scaleY,rotation:d.rotation},r,n)}function v(m){var y=s.slice(),x=r.pxSign,_=m;return(r.symbolRepeatDirection==="start"?x>0:x<0)&&(_=u-1-m),y[l.index]=f*(_-u/2+.5)+s[l.index],{x:y[0],y:y[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation}}}function $ne(e,t,r,n){var i=e.__pictorialBundle,a=e.__pictorialMainPath;a?gd(a,null,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation},r,n):(a=e.__pictorialMainPath=Bne(r),i.add(a),gd(a,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:0,scaleY:0,rotation:r.rotation},{scaleX:r.symbolScale[0],scaleY:r.symbolScale[1]},r,n))}function Fne(e,t,r){var n=ae({},t.barRectShape),i=e.__pictorialBarRect;i?gd(i,null,{shape:n},t,r):(i=e.__pictorialBarRect=new qe({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),i.disableMorphing=!0,e.add(i))}function Vne(e,t,r,n){if(r.symbolClip){var i=e.__pictorialClipPath,a=ae({},r.clipShape),o=t.valueDim,s=r.animationModel,l=r.dataIndex;if(i)ut(i,{shape:a},s,l);else{a[o.wh]=0,i=new qe({shape:a}),e.__pictorialBundle.setClipPath(i),e.__pictorialClipPath=i;var u={};u[o.wh]=r.clipShape[o.wh],Of[n?"updateProps":"initProps"](i,{shape:u},s,l)}}}function _8(e,t){var r=e.getItemModel(t);return r.getAnimationDelayParams=I7e,r.isAnimationEnabled=O7e,r}function I7e(e){return{index:e.__pictorialAnimationIndex,count:e.__pictorialRepeatTimes}}function O7e(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function b8(e,t,r,n){var i=new Ie,a=new Ie;return i.add(a),i.__pictorialBundle=a,a.x=r.bundlePosition[0],a.y=r.bundlePosition[1],r.symbolRepeat?zne(i,t,r):$ne(i,t,r),Fne(i,r,n),Vne(i,t,r,n),i.__pictorialShapeStr=Gne(e,r),i.__pictorialSymbolMeta=r,i}function E7e(e,t,r){var n=r.animationModel,i=r.dataIndex,a=e.__pictorialBundle;ut(a,{x:r.bundlePosition[0],y:r.bundlePosition[1]},n,i),r.symbolRepeat?zne(e,t,r,!0):$ne(e,t,r,!0),Fne(e,r,!0),Vne(e,t,r,!0)}function w8(e,t,r,n){var i=n.__pictorialBarRect;i&&i.removeTextContent();var a=[];_R(n,function(o){a.push(o)}),n.__pictorialMainPath&&a.push(n.__pictorialMainPath),n.__pictorialClipPath&&(r=null),R(a,function(o){hu(o,{scaleX:0,scaleY:0},r,t,function(){n.parent&&n.parent.remove(n)})}),e.setItemGraphicEl(t,null)}function Gne(e,t){return[e.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function _R(e,t,r){R(e.__pictorialBundle.children(),function(n){n!==e.__pictorialBarRect&&t.call(r,n)})}function gd(e,t,r,n,i,a){t&&e.attr(t),n.symbolClip&&!i?r&&e.attr(r):r&&Of[i?"updateProps":"initProps"](e,r,n.animationModel,n.dataIndex,a)}function S8(e,t,r){var n=r.dataIndex,i=r.itemModel,a=i.getModel("emphasis"),o=a.getModel("itemStyle").getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),l=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),c=a.get("focus"),f=a.get("blurScope"),h=a.get("scale");_R(e,function(m){if(m instanceof Jr){var y=m.style;m.useStyle(ae({image:y.image,x:y.x,y:y.y,width:y.width,height:y.height},r.style))}else m.useStyle(r.style);var x=m.ensureState("emphasis");x.style=o,h&&(x.scaleX=m.scaleX*1.1,x.scaleY=m.scaleY*1.1),m.ensureState("blur").style=s,m.ensureState("select").style=l,u&&(m.cursor=u),m.z2=r.z2});var d=t.valueDim.posDesc[+(r.boundingLength>0)],v=e.__pictorialBarRect;v.ignoreClip=!0,qr(v,Br(i),{labelFetcher:t.seriesModel,labelDataIndex:n,defaultText:ov(t.seriesModel.getData(),n),inheritColor:r.style.fill,defaultOpacity:r.style.opacity,defaultOutsidePosition:d}),Gt(e,c,f,a.get("disabled"))}function T8(e){var t=Math.round(e);return Math.abs(e-t)<1e-4?t:Math.ceil(e)}var D7e=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r.defaultSymbol="roundRect",r}return t.prototype.getInitialData=function(r){return r.stack=null,e.prototype.getInitialData.apply(this,arguments)},t.type="series.pictorialBar",t.dependencies=["grid"],t.defaultOption=ku(Ny.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:J.color.primary}}}),t}(Ny);function N7e(e){e.registerChartView(A7e),e.registerSeriesModel(D7e),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,We(ute,"pictorialBar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,cte("pictorialBar"))}var j7e=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._layers=[],r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this,s=this.group,l=r.getLayerSeries(),u=a.getLayout("layoutInfo"),c=u.rect,f=u.boundaryGap;s.x=0,s.y=c.y+f[0];function h(y){return y.name}var d=new Ys(this._layersSeries||[],l,h,h),v=[];d.add(_e(m,this,"add")).update(_e(m,this,"update")).remove(_e(m,this,"remove")).execute();function m(y,x,_){var b=o._layers;if(y==="remove"){s.remove(b[x]);return}for(var S=[],T=[],C,A=l[x].indices,P=0;P<A.length;P++){var I=a.getItemLayout(A[P]),k=I.x,E=I.y0,D=I.y;S.push(k,E),T.push(k,E+D),C=a.getItemVisual(A[P],"style")}var N,z=a.getItemLayout(A[0]),V=r.getModel("label"),F=V.get("margin"),$=r.getModel("emphasis");if(y==="add"){var B=v[x]=new Ie;N=new ere({shape:{points:S,stackedOnPoints:T,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),B.add(N),s.add(B),r.isAnimationEnabled()&&N.setClipPath(R7e(N.getBoundingRect(),r,function(){N.removeClipPath()}))}else{var B=b[_];N=B.childAt(0),s.add(B),v[x]=B,ut(N,{shape:{points:S,stackedOnPoints:T}},r),ma(N)}qr(N,Br(r),{labelDataIndex:A[P-1],defaultText:a.getName(A[P-1]),inheritColor:C.fill},{normal:{verticalAlign:"middle"}}),N.setTextConfig({position:null,local:!0});var H=N.getTextContent();H&&(H.x=z.x-F,H.y=z.y0+z.y/2),N.useStyle(C),a.setItemGraphicEl(x,N),Rr(N,r),Gt(N,$.get("focus"),$.get("blurScope"),$.get("disabled"))}this._layersSeries=l,this._layers=v},t.type="themeRiver",t}(bt);function R7e(e,t,r){var n=new qe({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return jt(n,{shape:{x:e.x-50,width:e.width+100,height:e.height+20}},t,r),n}var UM=2,B7e=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new rp(_e(this.getData,this),_e(this.getRawData,this))},t.prototype.fixData=function(r){var n=r.length,i={},a=xI(r,function(h){return i.hasOwnProperty(h[0]+"")||(i[h[0]+""]=-1),h[2]}),o=[];a.buckets.each(function(h,d){o.push({name:d,dataList:h})});for(var s=o.length,l=0;l<s;++l){for(var u=o[l].name,c=0;c<o[l].dataList.length;++c){var f=o[l].dataList[c][0]+"";i[f]=l}for(var f in i)i.hasOwnProperty(f)&&i[f]!==l&&(i[f]=l,r[n]=[f,0,u],n++)}return r},t.prototype.getInitialData=function(r,n){for(var i=this.getReferringComponents("singleAxis",tr).models[0],a=i.get("type"),o=dt(r.data,function(v){return v[2]!==void 0}),s=this.fixData(o||[]),l=[],u=this.nameMap=Ce(),c=0,f=0;f<s.length;++f)l.push(s[f][UM]),u.get(s[f][UM])||(u.set(s[f][UM],c),c++);var h=Kv(s,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:Ow(a)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,d=new Rn(h,this);return d.initData(s),d},t.prototype.getLayerSeries=function(){for(var r=this.getData(),n=r.count(),i=[],a=0;a<n;++a)i[a]=a;var o=r.mapDimension("single"),s=xI(i,function(u){return r.get("name",u)}),l=[];return s.buckets.each(function(u,c){u.sort(function(f,h){return r.get(o,f)-r.get(o,h)}),l.push({name:c,indices:u})}),l},t.prototype.getAxisTooltipData=function(r,n,i){oe(r)||(r=r?[r]:[]);for(var a=this.getData(),o=this.getLayerSeries(),s=[],l=o.length,u,c=0;c<l;++c){for(var f=Number.MAX_VALUE,h=-1,d=o[c].indices.length,v=0;v<d;++v){var m=a.get(r[0],o[c].indices[v]),y=Math.abs(m-n);y<=f&&(u=m,f=y,h=o[c].indices[v])}s.push(h)}return{dataIndices:s,nestestValue:u}},t.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=a.getName(r),s=a.get(a.mapDimension("value"),r);return Mr("nameValue",{name:o,value:s})},t.type="series.themeRiver",t.dependencies=["singleAxis"],t.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},t}(Ct);function z7e(e,t){e.eachSeriesByType("themeRiver",function(r){var n=r.getData(),i=r.coordinateSystem,a={},o=i.getRect();a.rect=o;var s=r.get("boundaryGap"),l=i.getAxis();if(a.boundaryGap=s,l.orient==="horizontal"){s[0]=me(s[0],o.height),s[1]=me(s[1],o.height);var u=o.height-s[0]-s[1];C8(n,r,u)}else{s[0]=me(s[0],o.width),s[1]=me(s[1],o.width);var c=o.width-s[0]-s[1];C8(n,r,c)}n.setLayout("layoutInfo",a)})}function C8(e,t,r){if(e.count())for(var n=t.coordinateSystem,i=t.getLayerSeries(),a=e.mapDimension("single"),o=e.mapDimension("value"),s=le(i,function(y){return le(y.indices,function(x){var _=n.dataToPoint(e.get(a,x));return _[1]=e.get(o,x),_})}),l=$7e(s),u=l.y0,c=r/l.max,f=i.length,h=i[0].indices.length,d,v=0;v<h;++v){d=u[v]*c,e.setItemLayout(i[0].indices[v],{layerIndex:0,x:s[0][v][0],y0:d,y:s[0][v][1]*c});for(var m=1;m<f;++m)d+=s[m-1][v][1]*c,e.setItemLayout(i[m].indices[v],{layerIndex:m,x:s[m][v][0],y0:d,y:s[m][v][1]*c})}}function $7e(e){for(var t=e.length,r=e[0].length,n=[],i=[],a=0,o=0;o<r;++o){for(var s=0,l=0;l<t;++l)s+=e[l][o][1];s>a&&(a=s),n.push(s)}for(var u=0;u<r;++u)i[u]=(a-n[u])/2;a=0;for(var c=0;c<r;++c){var f=n[c]+i[c];f>a&&(a=f)}return{y0:i,max:a}}function F7e(e){e.registerChartView(j7e),e.registerSeriesModel(B7e),e.registerLayout(z7e),e.registerProcessor(ep("themeRiver"))}var V7e=2,G7e=4,A8=function(e){K(t,e);function t(r,n,i,a){var o=e.call(this)||this;o.z2=V7e,o.textConfig={inside:!0},ze(o).seriesIndex=n.seriesIndex;var s=new ot({z2:G7e,silent:r.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,r,n,i,a),o}return t.prototype.updateData=function(r,n,i,a,o){this.node=n,n.piece=this,i=i||this._seriesModel,a=a||this._ecModel;var s=this;ze(s).dataIndex=n.dataIndex;var l=n.getModel(),u=l.getModel("emphasis"),c=n.getLayout(),f=ae({},c);f.label=null;var h=n.getVisual("style");h.lineJoin="bevel";var d=n.getVisual("decal");d&&(h.decal=nv(d,o));var v=Io(l.getModel("itemStyle"),f,!0);ae(f,v),R(qn,function(_){var b=s.ensureState(_),S=l.getModel([_,"itemStyle"]);b.style=S.getItemStyle();var T=Io(S,f);T&&(b.shape=T)}),r?(s.setShape(f),s.shape.r=c.r0,jt(s,{shape:{r:c.r}},i,n.dataIndex)):(ut(s,{shape:f},i),ma(s)),s.useStyle(h),this._updateLabel(i);var m=l.getShallow("cursor");m&&s.attr("cursor",m),this._seriesModel=i||this._seriesModel,this._ecModel=a||this._ecModel;var y=u.get("focus"),x=y==="relative"?Xd(n.getAncestorsIndices(),n.getDescendantIndices()):y==="ancestor"?n.getAncestorsIndices():y==="descendant"?n.getDescendantIndices():y;Gt(this,x,u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(r){var n=this,i=this.node.getModel(),a=i.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),c=Math.sin(l),f=this,h=f.getTextContent(),d=this.node.dataIndex,v=a.get("minAngle")/180*Math.PI,m=a.get("show")&&!(v!=null&&Math.abs(s)<v);h.ignore=!m,R(by,function(x){var _=x==="normal"?i.getModel("label"):i.getModel([x,"label"]),b=x==="normal",S=b?h:h.ensureState(x),T=r.getFormattedLabel(d,x);b&&(T=T||n.node.name),S.style=kt(_,{},null,x!=="normal",!0),T&&(S.style.text=T);var C=_.get("show");C!=null&&!b&&(S.ignore=!C);var A=y(_,"position"),P=b?f:f.states[x],I=P.style.fill;P.textConfig={outsideFill:_.get("color")==="inherit"?I:null,inside:A!=="outside"};var k,E=y(_,"distance")||0,D=y(_,"align"),N=y(_,"rotate"),z=Math.PI*.5,V=Math.PI*1.5,F=Pi(N==="tangential"?Math.PI/2-l:l),$=F>z&&!Jd(F-z)&&F<V;A==="outside"?(k=o.r+E,D=$?"right":"left"):!D||D==="center"?(s===2*Math.PI&&o.r0===0?k=0:k=(o.r+o.r0)/2,D="center"):D==="left"?(k=o.r0+E,D=$?"right":"left"):D==="right"&&(k=o.r-E,D=$?"left":"right"),S.style.align=D,S.style.verticalAlign=y(_,"verticalAlign")||"middle",S.x=k*u+o.cx,S.y=k*c+o.cy;var B=0;N==="radial"?B=Pi(-l)+($?Math.PI:0):N==="tangential"?B=Pi(Math.PI/2-l)+($?Math.PI:0):st(N)&&(B=N*Math.PI/180),S.rotation=Pi(B)});function y(x,_){var b=x.get(_);return b??a.get(_)}h.dirtyStyle()},t}(Sn),NO="sunburstRootToNode",M8="sunburstHighlight",W7e="sunburstUnhighlight";function H7e(e){e.registerAction({type:NO,update:"updateView"},function(t,r){r.eachComponent({mainType:"series",subType:"sunburst",query:t},n);function n(i,a){var o=Ry(t,[NO],i);if(o){var s=i.getViewRoot();s&&(t.direction=nR(s,o.node)?"rollUp":"drillDown"),i.resetViewRoot(o.node)}}}),e.registerAction({type:M8,update:"none"},function(t,r,n){t=ae({},t),r.eachComponent({mainType:"series",subType:"sunburst",query:t},i);function i(a){var o=Ry(t,[M8],a);o&&(t.dataIndex=o.node.dataIndex)}n.dispatchAction(ae(t,{type:"highlight"}))}),e.registerAction({type:W7e,update:"updateView"},function(t,r,n){t=ae({},t),n.dispatchAction(ae(t,{type:"downplay"}))})}var U7e=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i,a){var o=this;this.seriesModel=r,this.api=i,this.ecModel=n;var s=r.getData(),l=s.tree.root,u=r.getViewRoot(),c=this.group,f=r.get("renderLabelForZeroData"),h=[];u.eachNode(function(_){h.push(_)});var d=this._oldChildren||[];v(h,d),x(l,u),this._initEvents(),this._oldChildren=h;function v(_,b){if(_.length===0&&b.length===0)return;new Ys(b,_,S,S).add(T).update(T).remove(We(T,null)).execute();function S(C){return C.getId()}function T(C,A){var P=C==null?null:_[C],I=A==null?null:b[A];m(P,I)}}function m(_,b){if(!f&&_&&!_.getValue()&&(_=null),_!==l&&b!==l){if(b&&b.piece)_?(b.piece.updateData(!1,_,r,n,i),s.setItemGraphicEl(_.dataIndex,b.piece)):y(b);else if(_){var S=new A8(_,r,n,i);c.add(S),s.setItemGraphicEl(_.dataIndex,S)}}}function y(_){_&&_.piece&&(c.remove(_.piece),_.piece=null)}function x(_,b){b.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,_,r,n,i):(o.virtualPiece=new A8(_,r,n,i),c.add(o.virtualPiece)),b.piece.off("click"),o.virtualPiece.on("click",function(S){o._rootToNode(b.parentNode)})):o.virtualPiece&&(c.remove(o.virtualPiece),o.virtualPiece=null)}},t.prototype._initEvents=function(){var r=this;this.group.off("click"),this.group.on("click",function(n){var i=!1,a=r.seriesModel.getViewRoot();a.eachNode(function(o){if(!i&&o.piece&&o.piece===n.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")r._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var c=l.get("target",!0)||"_blank";ww(u,c)}}i=!0}})})},t.prototype._rootToNode=function(r){r!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:NO,from:this.uid,seriesId:this.seriesModel.id,targetNode:r})},t.prototype.containPoint=function(r,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=r[0]-a.cx,s=r[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},t.type="sunburst",t}(bt),Z7e=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.ignoreStyleOnData=!0,r}return t.prototype.getInitialData=function(r,n){var i={name:r.name,children:r.data};Wne(i);var a=this._levelModels=le(r.levels||[],function(l){return new rt(l,this,n)},this),o=rR.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var f=o.getNodeByDataIndex(c),h=a[f.depth];return h&&(u.parentModel=h),u})}return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(r){var n=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treePathInfo=oC(i,this),n},t.prototype.getLevelModel=function(r){return this._levelModels&&this._levelModels[r.depth]},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var n=this.getRawData().tree.root;(!r||r!==n&&!n.contains(r))&&(this._viewRoot=n)},t.prototype.enableAriaDecal=function(){Yre(this)},t.type="series.sunburst",t.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},t}(Ct);function Wne(e){var t=0;R(e.children,function(n){Wne(n);var i=n.value;oe(i)&&(i=i[0]),t+=i});var r=e.value;oe(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=t),r<0&&(r=0),oe(e.value)?e.value[0]=r:e.value=r}var P8=Math.PI/180;function Y7e(e,t,r){t.eachSeriesByType(e,function(n){var i=n.get("center"),a=n.get("radius");oe(a)||(a=[0,a]),oe(i)||(i=[i,i]);var o=r.getWidth(),s=r.getHeight(),l=Math.min(o,s),u=me(i[0],o),c=me(i[1],s),f=me(a[0],l/2),h=me(a[1],l/2),d=-n.get("startAngle")*P8,v=n.get("minAngle")*P8,m=n.getData().tree.root,y=n.getViewRoot(),x=y.depth,_=n.get("sort");_!=null&&Hne(y,_);var b=0;R(y.children,function(F){!isNaN(F.getValue())&&b++});var S=y.getValue(),T=Math.PI/(S||b)*2,C=y.depth>0,A=y.height-(C?-1:1),P=(h-f)/(A||1),I=n.get("clockwise"),k=n.get("stillShowZeroSum"),E=I?1:-1,D=function(F,$){if(F){var B=$;if(F!==m){var H=F.getValue(),U=S===0&&k?T:H*T;U<v&&(U=v),B=$+E*U;var Y=F.depth-x-(C?-1:1),Z=f+P*Y,Q=f+P*(Y+1),re=n.getLevelModel(F);if(re){var ue=re.get("r0",!0),de=re.get("r",!0),Re=re.get("radius",!0);Re!=null&&(ue=Re[0],de=Re[1]),ue!=null&&(Z=me(ue,l/2)),de!=null&&(Q=me(de,l/2))}F.setLayout({angle:U,startAngle:$,endAngle:B,clockwise:I,cx:u,cy:c,r0:Z,r:Q})}if(F.children&&F.children.length){var xe=0;R(F.children,function(ie){xe+=D(ie,$+xe)})}return B-$}};if(C){var N=f,z=f+P,V=Math.PI*2;m.setLayout({angle:V,startAngle:d,endAngle:d+V,clockwise:I,cx:u,cy:c,r0:N,r:z})}D(y,d)})}function Hne(e,t){var r=e.children||[];e.children=X7e(r,t),r.length&&R(e.children,function(n){Hne(n,t)})}function X7e(e,t){if(ke(t)){var r=le(e,function(i,a){var o=i.getValue();return{params:{depth:i.depth,height:i.height,dataIndex:i.dataIndex,getValue:function(){return o}},index:a}});return r.sort(function(i,a){return t(i.params,a.params)}),le(r,function(i){return e[i.index]})}else{var n=t==="asc";return e.sort(function(i,a){var o=(i.getValue()-a.getValue())*(n?1:-1);return o===0?(i.dataIndex-a.dataIndex)*(n?-1:1):o})}}function q7e(e){var t={};function r(n,i,a){if(n.depth===0)return J.color.neutral50;for(var o=n;o&&o.depth>1;)o=o.parentNode;var s=i.getColorFromPalette(o.name||o.dataIndex+"",t);return n.depth>1&&ye(s)&&(s=lw(s,(n.depth-1)/(a-1)*.5)),s}e.eachSeriesByType("sunburst",function(n){var i=n.getData(),a=i.tree;a.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=r(o,n,a.root.height));var u=i.ensureUniqueItemVisual(o.dataIndex,"style");ae(u,l)})})}function K7e(e){e.registerChartView(U7e),e.registerSeriesModel(Z7e),e.registerLayout(We(Y7e,"sunburst")),e.registerProcessor(We(ep,"sunburst")),e.registerVisual(q7e),H7e(e)}var k8={color:"fill",borderColor:"stroke"},J7e={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Es=et(),Q7e=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},t.prototype.getInitialData=function(r,n){return es(null,this)},t.prototype.getDataParams=function(r,n,i){var a=e.prototype.getDataParams.call(this,r,n);return i&&(a.info=Es(i).info),a},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},t}(Ct);function e9e(e,t){return t=t||[0,0],le(["x","y"],function(r,n){var i=this.getAxis(r),a=t[n],o=e[n]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(a-o)-i.dataToCoord(a+o))},this)}function t9e(e){var t=e.master.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(r){return e.dataToPoint(r)},size:_e(e9e,e)}}}function r9e(e,t){return t=t||[0,0],le([0,1],function(r){var n=t[r],i=e[r]/2,a=[],o=[];return a[r]=n-i,o[r]=n+i,a[1-r]=o[1-r]=t[1-r],Math.abs(this.dataToPoint(a)[r]-this.dataToPoint(o)[r])},this)}function n9e(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:e.getZoom()},api:{coord:function(r){return e.dataToPoint(r)},size:_e(r9e,e)}}}function i9e(e,t){var r=this.getAxis(),n=t instanceof Array?t[0]:t,i=(e instanceof Array?e[0]:e)/2;return r.type==="category"?r.getBandWidth():Math.abs(r.dataToCoord(n-i)-r.dataToCoord(n+i))}function a9e(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(r){return e.dataToPoint(r)},size:_e(i9e,e)}}}function o9e(e,t){return t=t||[0,0],le(["Radius","Angle"],function(r,n){var i="get"+r+"Axis",a=this[i](),o=t[n],s=e[n]/2,l=a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s));return r==="Angle"&&(l=l*Math.PI/180),l},this)}function s9e(e){var t=e.getRadiusAxis(),r=e.getAngleAxis(),n=t.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:e.cx,cy:e.cy,r:n[1],r0:n[0]},api:{coord:function(i){var a=t.dataToRadius(i[0]),o=r.dataToAngle(i[1]),s=e.coordToPoint([a,o]);return s.push(a,o*Math.PI/180),s},size:_e(o9e,e)}}}function l9e(e){var t=e.getRect(),r=e.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:r.start,end:r.end,weeks:r.weeks,dayCount:r.allDay}},api:{coord:function(n,i){return e.dataToPoint(n,i)},layout:function(n,i){return e.dataToLayout(n,i)}}}}function u9e(e){var t=e.getRect();return{coordSys:{type:"matrix",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(r,n){return e.dataToPoint(r,n)},layout:function(r,n){return e.dataToLayout(r,n)}}}}function Une(e,t,r,n){return e&&(e.legacy||e.legacy!==!1&&!r&&!n&&t!=="tspan"&&(t==="text"||Se(e,"text")))}function Zne(e,t,r){var n=e,i,a,o;if(t==="text")o=n;else{o={},Se(n,"text")&&(o.text=n.text),Se(n,"rich")&&(o.rich=n.rich),Se(n,"textFill")&&(o.fill=n.textFill),Se(n,"textStroke")&&(o.stroke=n.textStroke),Se(n,"fontFamily")&&(o.fontFamily=n.fontFamily),Se(n,"fontSize")&&(o.fontSize=n.fontSize),Se(n,"fontStyle")&&(o.fontStyle=n.fontStyle),Se(n,"fontWeight")&&(o.fontWeight=n.fontWeight),a={type:"text",style:o,silent:!0},i={};var s=Se(n,"textPosition");r?i.position=s?n.textPosition:"inside":s&&(i.position=n.textPosition),Se(n,"textPosition")&&(i.position=n.textPosition),Se(n,"textOffset")&&(i.offset=n.textOffset),Se(n,"textRotation")&&(i.rotation=n.textRotation),Se(n,"textDistance")&&(i.distance=n.textDistance)}return L8(o,e),R(o.rich,function(l){L8(l,l)}),{textConfig:i,textContent:a}}function L8(e,t){t&&(t.font=t.textFont||t.font,Se(t,"textStrokeWidth")&&(e.lineWidth=t.textStrokeWidth),Se(t,"textAlign")&&(e.align=t.textAlign),Se(t,"textVerticalAlign")&&(e.verticalAlign=t.textVerticalAlign),Se(t,"textLineHeight")&&(e.lineHeight=t.textLineHeight),Se(t,"textWidth")&&(e.width=t.textWidth),Se(t,"textHeight")&&(e.height=t.textHeight),Se(t,"textBackgroundColor")&&(e.backgroundColor=t.textBackgroundColor),Se(t,"textPadding")&&(e.padding=t.textPadding),Se(t,"textBorderColor")&&(e.borderColor=t.textBorderColor),Se(t,"textBorderWidth")&&(e.borderWidth=t.textBorderWidth),Se(t,"textBorderRadius")&&(e.borderRadius=t.textBorderRadius),Se(t,"textBoxShadowColor")&&(e.shadowColor=t.textBoxShadowColor),Se(t,"textBoxShadowBlur")&&(e.shadowBlur=t.textBoxShadowBlur),Se(t,"textBoxShadowOffsetX")&&(e.shadowOffsetX=t.textBoxShadowOffsetX),Se(t,"textBoxShadowOffsetY")&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}function I8(e,t,r){var n=e;n.textPosition=n.textPosition||r.position||"inside",r.offset!=null&&(n.textOffset=r.offset),r.rotation!=null&&(n.textRotation=r.rotation),r.distance!=null&&(n.textDistance=r.distance);var i=n.textPosition.indexOf("inside")>=0,a=e.fill||J.color.neutral99;O8(n,t);var o=n.textFill==null;return i?o&&(n.textFill=r.insideFill||J.color.neutral00,!n.textStroke&&r.insideStroke&&(n.textStroke=r.insideStroke),!n.textStroke&&(n.textStroke=a),n.textStrokeWidth==null&&(n.textStrokeWidth=2)):(o&&(n.textFill=e.fill||r.outsideFill||J.color.neutral00),!n.textStroke&&r.outsideStroke&&(n.textStroke=r.outsideStroke)),n.text=t.text,n.rich=t.rich,R(t.rich,function(s){O8(s,s)}),n}function O8(e,t){t&&(Se(t,"fill")&&(e.textFill=t.fill),Se(t,"stroke")&&(e.textStroke=t.fill),Se(t,"lineWidth")&&(e.textStrokeWidth=t.lineWidth),Se(t,"font")&&(e.font=t.font),Se(t,"fontStyle")&&(e.fontStyle=t.fontStyle),Se(t,"fontWeight")&&(e.fontWeight=t.fontWeight),Se(t,"fontSize")&&(e.fontSize=t.fontSize),Se(t,"fontFamily")&&(e.fontFamily=t.fontFamily),Se(t,"align")&&(e.textAlign=t.align),Se(t,"verticalAlign")&&(e.textVerticalAlign=t.verticalAlign),Se(t,"lineHeight")&&(e.textLineHeight=t.lineHeight),Se(t,"width")&&(e.textWidth=t.width),Se(t,"height")&&(e.textHeight=t.height),Se(t,"backgroundColor")&&(e.textBackgroundColor=t.backgroundColor),Se(t,"padding")&&(e.textPadding=t.padding),Se(t,"borderColor")&&(e.textBorderColor=t.borderColor),Se(t,"borderWidth")&&(e.textBorderWidth=t.borderWidth),Se(t,"borderRadius")&&(e.textBorderRadius=t.borderRadius),Se(t,"shadowColor")&&(e.textBoxShadowColor=t.shadowColor),Se(t,"shadowBlur")&&(e.textBoxShadowBlur=t.shadowBlur),Se(t,"shadowOffsetX")&&(e.textBoxShadowOffsetX=t.shadowOffsetX),Se(t,"shadowOffsetY")&&(e.textBoxShadowOffsetY=t.shadowOffsetY),Se(t,"textShadowColor")&&(e.textShadowColor=t.textShadowColor),Se(t,"textShadowBlur")&&(e.textShadowBlur=t.textShadowBlur),Se(t,"textShadowOffsetX")&&(e.textShadowOffsetX=t.textShadowOffsetX),Se(t,"textShadowOffsetY")&&(e.textShadowOffsetY=t.textShadowOffsetY))}var Yne={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},E8=at(Yne);va(Wo,function(e,t){return e[t]=1,e},{});Wo.join(", ");var qw=["","style","shape","extra"],cv=et();function bR(e,t,r,n,i){var a=e+"Animation",o=Vv(e,n,i)||{},s=cv(t).userDuring;return o.duration>0&&(o.during=s?_e(v9e,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=e),ae(o,r[a]),o}function xb(e,t,r,n){n=n||{};var i=n.dataIndex,a=n.isInit,o=n.clearStyle,s=r.isAnimationEnabled(),l=cv(e),u=t.style;l.userDuring=t.during;var c={},f={};if(g9e(e,t,f),e.type==="compound")for(var h=e.shape.paths,d=t.shape.paths,v=0;v<d.length;v++){var m=d[v];ZM("shape",m,h[v])}else ZM("shape",t,f),ZM("extra",t,f);if(!a&&s&&(p9e(e,t,c),D8("shape",e,t,c),D8("extra",e,t,c),m9e(e,t,u,c)),f.style=u,c9e(e,f,o),h9e(e,t),s)if(a){var y={};R(qw,function(_){var b=_?t[_]:t;b&&b.enterFrom&&(_&&(y[_]=y[_]||{}),ae(_?y[_]:y,b.enterFrom))});var x=bR("enter",e,t,r,i);x.duration>0&&e.animateFrom(y,x)}else f9e(e,t,i||0,r,c);Xne(e,t),u?e.dirty():e.markRedraw()}function Xne(e,t){for(var r=cv(e).leaveToProps,n=0;n<qw.length;n++){var i=qw[n],a=i?t[i]:t;a&&a.leaveTo&&(r||(r=cv(e).leaveToProps={}),i&&(r[i]=r[i]||{}),ae(i?r[i]:r,a.leaveTo))}}function uC(e,t,r,n){if(e){var i=e.parent,a=cv(e).leaveToProps;if(a){var o=bR("update",e,t,r,0);o.done=function(){i&&i.remove(e)},e.animateTo(a,o)}else i&&i.remove(e)}}function Kc(e){return e==="all"}function c9e(e,t,r){var n=t.style;if(!e.isGroup&&n){if(r){e.useStyle({});for(var i=e.animators,a=0;a<i.length;a++){var o=i[a];o.targetName==="style"&&o.changeTarget(e.style)}}e.setStyle(n)}t&&(t.style=null,t&&e.attr(t),t.style=n)}function f9e(e,t,r,n,i){if(i){var a=bR("update",e,t,n,r);a.duration>0&&e.animateFrom(i,a)}}function h9e(e,t){Se(t,"silent")&&(e.silent=t.silent),Se(t,"ignore")&&(e.ignore=t.ignore),e instanceof ga&&Se(t,"invisible")&&(e.invisible=t.invisible),e instanceof nt&&Se(t,"autoBatch")&&(e.autoBatch=t.autoBatch)}var mo={},d9e={setTransform:function(e,t){return mo.el[e]=t,this},getTransform:function(e){return mo.el[e]},setShape:function(e,t){var r=mo.el,n=r.shape||(r.shape={});return n[e]=t,r.dirtyShape&&r.dirtyShape(),this},getShape:function(e){var t=mo.el.shape;if(t)return t[e]},setStyle:function(e,t){var r=mo.el,n=r.style;return n&&(n[e]=t,r.dirtyStyle&&r.dirtyStyle()),this},getStyle:function(e){var t=mo.el.style;if(t)return t[e]},setExtra:function(e,t){var r=mo.el.extra||(mo.el.extra={});return r[e]=t,this},getExtra:function(e){var t=mo.el.extra;if(t)return t[e]}};function v9e(){var e=this,t=e.el;if(t){var r=cv(t).userDuring,n=e.userDuring;if(r!==n){e.el=e.userDuring=null;return}mo.el=t,n(d9e)}}function D8(e,t,r,n){var i=r[e];if(i){var a=t[e],o;if(a){var s=r.transition,l=i.transition;if(l)if(!o&&(o=n[e]={}),Kc(l))ae(o,a);else for(var u=Lt(l),c=0;c<u.length;c++){var f=u[c],h=a[f];o[f]=h}else if(Kc(s)||He(s,e)>=0){!o&&(o=n[e]={});for(var d=at(a),c=0;c<d.length;c++){var f=d[c],h=a[f];y9e(i[f],h)&&(o[f]=h)}}}}}function ZM(e,t,r){var n=t[e];if(n)for(var i=r[e]={},a=at(n),o=0;o<a.length;o++){var s=a[o];i[s]=Jg(n[s])}}function p9e(e,t,r){for(var n=t.transition,i=Kc(n)?Wo:Lt(n||[]),a=0;a<i.length;a++){var o=i[a];if(!(o==="style"||o==="shape"||o==="extra")){var s=e[o];r[o]=s}}}function g9e(e,t,r){for(var n=0;n<E8.length;n++){var i=E8[n],a=Yne[i],o=t[i];o&&(r[a[0]]=o[0],r[a[1]]=o[1])}for(var n=0;n<Wo.length;n++){var s=Wo[n];t[s]!=null&&(r[s]=t[s])}}function m9e(e,t,r,n){if(r){var i=e.style,a;if(i){var o=r.transition,s=t.transition;if(o&&!Kc(o)){var l=Lt(o);!a&&(a=n.style={});for(var u=0;u<l.length;u++){var c=l[u],f=i[c];a[c]=f}}else if(e.getAnimationStyleProps&&(Kc(s)||Kc(o)||He(s,"style")>=0)){var h=e.getAnimationStyleProps(),d=h?h.style:null;if(d){!a&&(a=n.style={});for(var v=at(r),u=0;u<v.length;u++){var c=v[u];if(d[c]){var f=i[c];a[c]=f}}}}}}}function y9e(e,t){return bn(e)?e!==t:e!=null&&isFinite(e)}var qne=et(),x9e=["percent","easing","shape","style","extra"];function Kne(e){e.stopAnimation("keyframe"),e.attr(qne(e))}function Kw(e,t,r){if(!(!r.isAnimationEnabled()||!t)){if(oe(t)){R(t,function(s){Kw(e,s,r)});return}var n=t.keyframes,i=t.duration;if(r&&i==null){var a=Vv("enter",r,0);i=a&&a.duration}if(!(!n||!i)){var o=qne(e);R(qw,function(s){if(!(s&&!e[s])){var l;n.sort(function(u,c){return u.percent-c.percent}),R(n,function(u){var c=e.animators,f=s?u[s]:u;if(f){var h=at(f);if(s||(h=dt(h,function(m){return He(x9e,m)<0})),!!h.length){l||(l=e.animate(s,t.loop,!0),l.scope="keyframe");for(var d=0;d<c.length;d++)c[d]!==l&&c[d].targetName===l.targetName&&c[d].stopTracks(h);s&&(o[s]=o[s]||{});var v=s?o[s]:o;R(h,function(m){v[m]=((s?e[s]:e)||{})[m]}),l.whenWithKeys(i*u.percent,f,h,u.easing)}}}),l&&l.delay(t.delay||0).duration(i).start(t.easing)}})}}}var Ds="emphasis",zl="normal",wR="blur",SR="select",gu=[zl,Ds,wR,SR],YM={normal:["itemStyle"],emphasis:[Ds,"itemStyle"],blur:[wR,"itemStyle"],select:[SR,"itemStyle"]},XM={normal:["label"],emphasis:[Ds,"label"],blur:[wR,"label"],select:[SR,"label"]},_9e=["x","y"],b9e="e\0\0",Ui={normal:{},emphasis:{},blur:{},select:{}},w9e={cartesian2d:t9e,geo:n9e,single:a9e,polar:s9e,calendar:l9e,matrix:u9e};function jO(e){return e instanceof nt}function RO(e){return e instanceof ga}function S9e(e,t){t.copyTransform(e),RO(t)&&RO(e)&&(t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel,t.invisible=e.invisible,t.ignore=e.ignore,jO(t)&&jO(e)&&t.setShape(e.shape))}var T9e=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i,a){this._progressiveEls=null;var o=this._data,s=r.getData(),l=this.group,u=N8(r,s,n,i);o||l.removeAll(),s.diff(o).add(function(f){qM(i,null,f,u(f,a),r,l,s)}).remove(function(f){var h=o.getItemGraphicEl(f);h&&uC(h,Es(h).option,r)}).update(function(f,h){var d=o.getItemGraphicEl(h);qM(i,d,f,u(f,a),r,l,s)}).execute();var c=r.get("clip",!0)?C0(r.coordinateSystem,!1,r):null;c?l.setClipPath(c):l.removeClipPath(),this._data=s},t.prototype.incrementalPrepareRender=function(r,n,i){this.group.removeAll(),this._data=null},t.prototype.incrementalRender=function(r,n,i,a,o){var s=n.getData(),l=N8(n,s,i,a),u=this._progressiveEls=[];function c(d){d.isGroup||(d.incremental=!0,d.ensureState("emphasis").hoverLayer=!0)}for(var f=r.start;f<r.end;f++){var h=qM(null,null,f,l(f,o),n,this.group,s);h&&(h.traverse(c),u.push(h))}},t.prototype.eachRendered=function(r){Pu(this._progressiveEls||this.group,r)},t.prototype.filterForExposedEvent=function(r,n,i,a){var o=n.element;if(o==null||i.name===o)return!0;for(;(i=i.__hostTarget||i.parent)&&i!==this.group;)if(i.name===o)return!0;return!1},t.type="custom",t}(bt);function TR(e){var t=e.type,r;if(t==="path"){var n=e.shape,i=n.width!=null&&n.height!=null?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,a=eie(n);r=ev(a,null,i,n.layout||"center"),Es(r).customPathData=a}else if(t==="image")r=new Jr({}),Es(r).customImagePath=e.style.image;else if(t==="text")r=new ot({});else if(t==="group")r=new Ie;else if(t==="compoundPath"){var n=e.shape;if(!n||!n.paths){var o="";mt(o)}var s=le(n.paths,function(c){if(c.type==="path")return ev(c.shape.pathData,c,null);var f=Sy(c.type);if(!f){var h="";mt(h)}return new f});r=new m0({shape:{paths:s}})}else{var l=Sy(t);if(!l){var o="";mt(o)}r=new l}return Es(r).customGraphicType=t,r.name=e.name,r.z2EmphasisLift=1,r.z2SelectLift=1,r}function CR(e,t,r,n,i,a,o){Kne(t);var s=i&&i.normal.cfg;s&&t.setTextConfig(s),n&&n.transition==null&&(n.transition=_9e);var l=n&&n.style;if(l){if(t.type==="text"){var u=l;Se(u,"textFill")&&(u.fill=u.textFill),Se(u,"textStroke")&&(u.stroke=u.textStroke)}var c=void 0,f=jO(t)?l.decal:null;e&&f&&(f.dirty=!0,c=nv(f,e)),l.__decalPattern=c}if(RO(t)&&l){var c=l.__decalPattern;c&&(l.decal=c)}xb(t,n,a,{dataIndex:r,isInit:o,clearStyle:!0}),Kw(t,n.keyframeAnimation,a)}function Jne(e,t,r,n,i){var a=t.isGroup?null:t,o=i&&i[e].cfg;if(a){var s=a.ensureState(e);if(n===!1){var l=a.getState(e);l&&(l.style=null)}else s.style=n||null;o&&(s.textConfig=o),vf(a)}}function C9e(e,t,r){if(!e.isGroup){var n=e,i=r.currentZ,a=r.currentZLevel;n.z=i,n.zlevel=a;var o=t.z2;o!=null&&(n.z2=o||0);for(var s=0;s<gu.length;s++)A9e(n,t,gu[s])}}function A9e(e,t,r){var n=r===zl,i=n?t:Jw(t,r),a=i?i.z2:null,o;a!=null&&(o=n?e:e.ensureState(r),o.z2=a||0)}function N8(e,t,r,n){var i=e.get("renderItem");if(typeof i=="string"){var a=x4e(i);a&&(i=a)}var o=e.coordinateSystem,s={};o&&(s=o.prepareCustoms?o.prepareCustoms(o):w9e[o.type](o));for(var l=Oe({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:T,style:A,ordinalRawValue:C,styleEmphasis:P,visual:E,barLayout:D,currentSeriesIndices:N,font:z},s.api||{}),u={context:{},seriesId:e.id,seriesName:e.name,seriesIndex:e.seriesIndex,coordSys:s.coordSys,dataInsideLength:t.count(),encode:M9e(e.getData()),itemPayload:e.get("itemPayload")||{}},c,f,h={},d={},v={},m={},y=0;y<gu.length;y++){var x=gu[y];v[x]=e.getModel(YM[x]),m[x]=e.getModel(XM[x])}function _(V){return V===c?f||(f=t.getItemModel(V)):t.getItemModel(V)}function b(V,F){return t.hasItemOption?V===c?h[F]||(h[F]=_(V).getModel(YM[F])):_(V).getModel(YM[F]):v[F]}function S(V,F){return t.hasItemOption?V===c?d[F]||(d[F]=_(V).getModel(XM[F])):_(V).getModel(XM[F]):m[F]}return function(V,F){return c=V,f=null,h={},d={},i&&i(Oe({dataIndexInside:V,dataIndex:t.getRawIndex(V),actionType:F?F.type:null},u),l)};function T(V,F){return F==null&&(F=c),t.getStore().get(t.getDimensionIndex(V||0),F)}function C(V,F){F==null&&(F=c),V=V||0;var $=t.getDimensionInfo(V);if(!$){var B=t.getDimensionIndex(V);return B>=0?t.getStore().get(B,F):void 0}var H=t.get($.name,F),U=$&&$.ordinalMeta;return U?U.categories[H]:H}function A(V,F){F==null&&(F=c);var $=t.getItemVisual(F,"style"),B=$&&$.fill,H=$&&$.opacity,U=b(F,zl).getItemStyle();B!=null&&(U.fill=B),H!=null&&(U.opacity=H);var Y={inheritColor:ye(B)?B:J.color.neutral99},Z=S(F,zl),Q=kt(Z,null,Y,!1,!0);Q.text=Z.getShallow("show")?Ae(e.getFormattedLabel(F,zl),ov(t,F)):null;var re=xw(Z,Y,!1);return k(V,U),U=I8(U,Q,re),V&&I(U,V),U.legacy=!0,U}function P(V,F){F==null&&(F=c);var $=b(F,Ds).getItemStyle(),B=S(F,Ds),H=kt(B,null,null,!0,!0);H.text=B.getShallow("show")?ci(e.getFormattedLabel(F,Ds),e.getFormattedLabel(F,zl),ov(t,F)):null;var U=xw(B,null,!0);return k(V,$),$=I8($,H,U),V&&I($,V),$.legacy=!0,$}function I(V,F){for(var $ in F)Se(F,$)&&(V[$]=F[$])}function k(V,F){V&&(V.textFill&&(F.textFill=V.textFill),V.textPosition&&(F.textPosition=V.textPosition))}function E(V,F){if(F==null&&(F=c),Se(k8,V)){var $=t.getItemVisual(F,"style");return $?$[k8[V]]:null}if(Se(J7e,V))return t.getItemVisual(F,V)}function D(V){if(o.type==="cartesian2d"){var F=o.getBaseAxis();return w$e(Oe({axis:F},V))}}function N(){return r.getCurrentSeriesIndices()}function z(V){return XN(V,r)}}function M9e(e){var t={};return R(e.dimensions,function(r){var n=e.getDimensionInfo(r);if(!n.isExtraCoord){var i=n.coordDim,a=t[i]=t[i]||[];a[n.coordDimIndex]=e.getDimensionIndex(r)}}),t}function qM(e,t,r,n,i,a,o){if(!n){a.remove(t);return}var s=AR(e,t,r,n,i,a);return s&&o.setItemGraphicEl(r,s),s&&Gt(s,n.focus,n.blurScope,n.emphasisDisabled),s}function AR(e,t,r,n,i,a){var o=-1,s=t;t&&Qne(t,n,i)&&(o=He(a.childrenRef(),t),t=null);var l=!t,u=t;u?u.clearStates():(u=TR(n),s&&S9e(s,u)),n.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),n.tooltipDisabled&&(u.tooltipDisabled=!0),Ui.normal.cfg=Ui.normal.conOpt=Ui.emphasis.cfg=Ui.emphasis.conOpt=Ui.blur.cfg=Ui.blur.conOpt=Ui.select.cfg=Ui.select.conOpt=null,Ui.isLegacy=!1,k9e(u,r,n,i,l,Ui),P9e(u,r,n,i,l),CR(e,u,r,n,Ui,i,l),Se(n,"info")&&(Es(u).info=n.info);for(var c=0;c<gu.length;c++){var f=gu[c];if(f!==zl){var h=Jw(n,f),d=MR(n,h,f);Jne(f,u,h,d,Ui)}}return C9e(u,n,i),n.type==="group"&&L9e(e,u,r,n,i),o>=0?a.replaceAt(u,o):a.add(u),u}function Qne(e,t,r){var n=Es(e),i=t.type,a=t.shape,o=t.style;return r.isUniversalTransitionEnabled()||i!=null&&i!==n.customGraphicType||i==="path"&&D9e(a)&&eie(a)!==n.customPathData||i==="image"&&Se(o,"image")&&o.image!==n.customImagePath}function P9e(e,t,r,n,i){var a=r.clipPath;if(a===!1)e&&e.getClipPath()&&e.removeClipPath();else if(a){var o=e.getClipPath();o&&Qne(o,a,n)&&(o=null),o||(o=TR(a),e.setClipPath(o)),CR(null,o,t,a,null,n,i)}}function k9e(e,t,r,n,i,a){if(!(e.isGroup||e.type==="compoundPath")){j8(r,null,a),j8(r,Ds,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,l=a.blur.conOpt,u=a.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var c=e.getTextContent();if(o===!1)c&&e.removeTextContent();else{o=a.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=TR(o),e.setTextContent(c)),CR(null,c,t,o,null,n,i);for(var f=o&&o.style,h=0;h<gu.length;h++){var d=gu[h];if(d!==zl){var v=a[d].conOpt;Jne(d,c,v,MR(o,v,d),null)}}f?c.dirty():c.markRedraw()}}}}function j8(e,t,r){var n=t?Jw(e,t):e,i=t?MR(e,n,Ds):e.style,a=e.type,o=n?n.textConfig:null,s=e.textContent,l=s?t?Jw(s,t):s:null;if(i&&(r.isLegacy||Une(i,a,!!o,!!l))){r.isLegacy=!0;var u=Zne(i,a,!t);!o&&u.textConfig&&(o=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!t&&l){var c=l;!c.type&&(c.type="text")}var f=t?r[t]:r.normal;f.cfg=o,f.conOpt=l}function Jw(e,t){return t?e?e[t]:null:e}function MR(e,t,r){var n=t&&t.style;return n==null&&r===Ds&&e&&(n=e.styleEmphasis),n}function L9e(e,t,r,n,i){var a=n.children,o=a?a.length:0,s=n.$mergeChildren,l=s==="byName"||n.diffChildrenByName,u=s===!1;if(!(!o&&!l&&!u)){if(l){O9e({api:e,oldChildren:t.children()||[],newChildren:a||[],dataIndex:r,seriesModel:i,group:t});return}u&&t.removeAll();for(var c=0;c<o;c++){var f=a[c],h=t.childAt(c);f?(f.ignore==null&&(f.ignore=!1),AR(e,h,r,f,i,t)):h.ignore=!0}for(var d=t.childCount()-1;d>=c;d--){var v=t.childAt(d);I9e(t,v,i)}}}function I9e(e,t,r){t&&uC(t,Es(e).option,r)}function O9e(e){new Ys(e.oldChildren,e.newChildren,R8,R8,e).add(B8).update(B8).remove(E9e).execute()}function R8(e,t){var r=e&&e.name;return r??b9e+t}function B8(e,t){var r=this.context,n=e!=null?r.newChildren[e]:null,i=t!=null?r.oldChildren[t]:null;AR(r.api,i,r.dataIndex,n,r.seriesModel,r.group)}function E9e(e){var t=this.context,r=t.oldChildren[e];r&&uC(r,Es(r).option,t.seriesModel)}function eie(e){return e&&(e.pathData||e.d)}function D9e(e){return e&&(Se(e,"pathData")||Se(e,"d"))}function N9e(e){e.registerChartView(T9e),e.registerSeriesModel(Q7e)}var Sc=et(),z8=Le,KM=_e,PR=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(t,r,n,i){var a=r.get("value"),o=r.get("status");if(this._axisModel=t,this._axisPointerModel=r,this._api=n,!(!i&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,a,t,r,n);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var f=this._moveAnimation=this.determineAnimation(t,r);if(!s)s=this._group=new Ie,this.createPointerEl(s,u,t,r),this.createLabelEl(s,u,t,r),n.getZr().add(s);else{var h=We($8,r,f);this.updatePointerEl(s,u,h),this.updateLabelEl(s,u,h,r)}V8(s,r,!0),this._renderHandle(a)}},e.prototype.remove=function(t){this.clear(t)},e.prototype.dispose=function(t){this.clear(t)},e.prototype.determineAnimation=function(t,r){var n=r.get("animation"),i=t.axis,a=i.type==="category",o=r.get("snap");if(!o&&!a)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(a&&i.getBandWidth()>s)return!0;if(o){var l=Xj(t).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},e.prototype.makeElOption=function(t,r,n,i,a){},e.prototype.createPointerEl=function(t,r,n,i){var a=r.pointer;if(a){var o=Sc(t).pointerEl=new Of[a.type](z8(r.pointer));t.add(o)}},e.prototype.createLabelEl=function(t,r,n,i){if(r.label){var a=Sc(t).labelEl=new ot(z8(r.label));t.add(a),F8(a,i)}},e.prototype.updatePointerEl=function(t,r,n){var i=Sc(t).pointerEl;i&&r.pointer&&(i.setStyle(r.pointer.style),n(i,{shape:r.pointer.shape}))},e.prototype.updateLabelEl=function(t,r,n,i){var a=Sc(t).labelEl;a&&(a.setStyle(r.label.style),n(a,{x:r.label.x,y:r.label.y}),F8(a,i))},e.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var r=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=r.getModel("handle"),o=r.get("status");if(!a.get("show")||!o||o==="hide"){i&&n.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=Gv(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Hs(u.event)},onmousedown:KM(this._onHandleDragMove,this,0,0),drift:KM(this._onHandleDragMove,this),ondragend:KM(this._onHandleDragEnd,this)}),n.add(i)),V8(i,r,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");oe(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,Xv(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},e.prototype._moveHandleToValue=function(t,r){$8(this._axisPointerModel,!r&&this._moveAnimation,this._handle,JM(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(t,r){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(JM(n),[t,r],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(JM(i)),Sc(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var r=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:r.cursorPoint[0],y:r.cursorPoint[1],tooltipOption:r.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var r=t.getZr(),n=this._group,i=this._handle;r&&n&&(this._lastGraphicKey=null,n&&r.remove(n),i&&r.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),My(this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(t,r,n){return n=n||0,{x:t[n],y:t[1-n],width:r[n],height:r[1-n]}},e}();function $8(e,t,r,n){tie(Sc(r).lastProp,n)||(Sc(r).lastProp=n,t?ut(r,n,e):(r.stopAnimation(),r.attr(n)))}function tie(e,t){if(Ee(e)&&Ee(t)){var r=!0;return R(t,function(n,i){r=r&&tie(e[i],n)}),!!r}else return e===t}function F8(e,t){e[t.get(["label","show"])?"show":"hide"]()}function JM(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function V8(e,t,r){var n=t.get("z"),i=t.get("zlevel");e&&e.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=r)})}function kR(e){var t=e.get("type"),r=e.getModel(t+"Style"),n;return t==="line"?(n=r.getLineStyle(),n.fill=null):t==="shadow"&&(n=r.getAreaStyle(),n.stroke=null),n}function rie(e,t,r,n,i){var a=r.get("value"),o=nie(a,t.axis,t.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),l=Uv(s.get("padding")||0),u=s.getFont(),c=ET(o,u),f=i.position,h=c.width+l[1]+l[3],d=c.height+l[0]+l[2],v=i.align;v==="right"&&(f[0]-=h),v==="center"&&(f[0]-=h/2);var m=i.verticalAlign;m==="bottom"&&(f[1]-=d),m==="middle"&&(f[1]-=d/2),j9e(f,h,d,n);var y=s.get("backgroundColor");(!y||y==="auto")&&(y=t.get(["axisLine","lineStyle","color"])),e.label={x:f[0],y:f[1],style:kt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:y}),z2:10}}function j9e(e,t,r,n){var i=n.getWidth(),a=n.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+r,a)-r,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function nie(e,t,r,n,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:Ew(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};R(n,function(l){var u=r.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,f=u&&u.getDataParams(c);f&&s.seriesData.push(f)}),ye(o)?a=o.replace("{value}",a):ke(o)&&(a=o(s))}return a}function LR(e,t,r){var n=Yr();return rl(n,n,r.rotation),Ka(n,n,r.position),Ua([e.dataToCoord(t),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],n)}function iie(e,t,r,n,i,a){var o=Zn.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get(["label","margin"]),rie(t,n,i,a,{position:LR(n.axis,e,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function IR(e,t,r){return r=r||0,{x1:e[r],y1:e[1-r],x2:t[r],y2:t[1-r]}}function aie(e,t,r){return r=r||0,{x:e[r],y:e[1-r],width:t[r],height:t[1-r]}}function G8(e,t,r,n,i,a){return{cx:e,cy:t,r0:r,r:n,startAngle:i,endAngle:a,clockwise:!0}}var R9e=function(e){K(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.grid,u=a.get("type"),c=W8(l,s).getOtherAxis(s).getGlobalExtent(),f=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var h=kR(a),d=B9e[u](s,f,c);d.style=h,r.graphicKey=d.type,r.pointer=d}var v=Gw(l.getRect(),i);iie(n,r,v,i,a,o)},t.prototype.getHandleTransform=function(r,n,i){var a=Gw(n.axis.grid.getRect(),n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=LR(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=W8(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,f=[r.x,r.y];f[c]+=n[c],f[c]=Math.min(l[1],f[c]),f[c]=Math.max(l[0],f[c]);var h=(u[1]+u[0])/2,d=[h,h];d[c]=f[c];var v=[{verticalAlign:"middle"},{align:"center"}];return{x:f[0],y:f[1],rotation:r.rotation,cursorPoint:d,tooltipOption:v[c]}},t}(PR);function W8(e,t){var r={};return r[t.dim+"AxisIndex"]=t.index,e.getCartesian(r)}var B9e={line:function(e,t,r){var n=IR([t,r[0]],[t,r[1]],H8(e));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(e,t,r){var n=Math.max(1,e.getBandWidth()),i=r[1]-r[0];return{type:"Rect",shape:aie([t-n/2,r[0]],[n,i],H8(e))}}};function H8(e){return e.dim==="x"?0:1}var z9e=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:J.color.border,width:1,type:"dashed"},shadowStyle:{color:J.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:J.color.neutral00,padding:[5,7,5,7],backgroundColor:J.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:J.color.accent40,throttle:40}},t}(Qe),Cs=et(),$9e=R;function oie(e,t,r){if(!it.node){var n=t.getZr();Cs(n).records||(Cs(n).records={}),F9e(n,t);var i=Cs(n).records[e]||(Cs(n).records[e]={});i.handler=r}}function F9e(e,t){if(Cs(e).initialized)return;Cs(e).initialized=!0,r("click",We(U8,"click")),r("mousemove",We(U8,"mousemove")),r("globalout",G9e);function r(n,i){e.on(n,function(a){var o=W9e(t);$9e(Cs(e).records,function(s){s&&i(s,a,o.dispatchAction)}),V9e(o.pendings,t)})}}function V9e(e,t){var r=e.showTip.length,n=e.hideTip.length,i;r?i=e.showTip[r-1]:n&&(i=e.hideTip[n-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function G9e(e,t,r){e.handler("leave",null,r)}function U8(e,t,r,n){t.handler(e,r,n)}function W9e(e){var t={showTip:[],hideTip:[]},r=function(n){var i=t[n.type];i?i.push(n):(n.dispatchAction=r,e.dispatchAction(n))};return{dispatchAction:r,pendings:t}}function BO(e,t){if(!it.node){var r=t.getZr(),n=(Cs(r).records||{})[e];n&&(Cs(r).records[e]=null)}}var H9e=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=n.getComponent("tooltip"),o=r.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";oie("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},t.prototype.remove=function(r,n){BO("axisPointer",n)},t.prototype.dispose=function(r,n){BO("axisPointer",n)},t.type="axisPointer",t}(It);function sie(e,t){var r=[],n=e.seriesIndex,i;if(n==null||!(i=t.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=hf(a,e);if(o==null||o<0||oe(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)r=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(e.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),f=c.dim,h=u.dim,d=f==="x"||f==="radius"?1:0,v=a.mapDimension(h),m=[];m[d]=a.get(v,o),m[1-d]=a.get(a.getCalculationInfo("stackResultDimension"),o),r=l.dataToPoint(m)||[]}else r=l.dataToPoint(a.getValues(le(l.dimensions,function(x){return a.mapDimension(x)}),o))||[];else if(s){var y=s.getBoundingRect().clone();y.applyTransform(s.transform),r=[y.x+y.width/2,y.y+y.height/2]}return{point:r,el:s}}var Z8=et();function U9e(e,t,r){var n=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||_e(r.dispatchAction,r),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){_b(i)&&(i=sie({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var l=_b(i),u=a.axesInfo,c=s.axesInfo,f=n==="leave"||_b(i),h={},d={},v={list:[],map:{}},m={showPointer:We(Y9e,d),showTooltip:We(X9e,v)};R(s.coordSysMap,function(x,_){var b=l||x.containPoint(i);R(s.coordSysAxesInfo[_],function(S,T){var C=S.axis,A=Q9e(u,S);if(!f&&b&&(!u||A)){var P=A&&A.value;P==null&&!l&&(P=C.pointToData(i)),P!=null&&Y8(S,P,m,!1,h)}})});var y={};return R(c,function(x,_){var b=x.linkGroup;b&&!d[_]&&R(b.axesInfo,function(S,T){var C=d[T];if(S!==x&&C){var A=C.value;b.mapper&&(A=x.axis.scale.parse(b.mapper(A,X8(S),X8(x)))),y[x.key]=A}})}),R(y,function(x,_){Y8(c[_],x,m,!0,h)}),q9e(d,c,h),K9e(v,i,e,o),J9e(c,o,r),h}}function Y8(e,t,r,n,i){var a=e.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!e.involveSeries){r.showPointer(e,t);return}var o=Z9e(t,e),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&ae(i,s[0]),!n&&e.snap&&a.containData(l)&&l!=null&&(t=l),r.showPointer(e,t,s),r.showTooltip(e,o,l)}}function Z9e(e,t){var r=t.axis,n=r.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return R(t.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(n),f,h;if(l.getAxisTooltipData){var d=l.getAxisTooltipData(c,e,r);h=d.dataIndices,f=d.nestestValue}else{if(h=l.indicesOfNearest(n,c[0],e,r.type==="category"?.5:null),!h.length)return;f=l.getData().get(c[0],h[0])}if(!(f==null||!isFinite(f))){var v=e-f,m=Math.abs(v);m<=o&&((m<o||v>=0&&s<0)&&(o=m,s=v,i=f,a.length=0),R(h,function(y){a.push({seriesIndex:l.seriesIndex,dataIndexInside:y,dataIndex:l.getData().getRawIndex(y)})}))}}),{payloadBatch:a,snapToValue:i}}function Y9e(e,t,r,n){e[t.key]={value:r,payloadBatch:n}}function X9e(e,t,r,n){var i=r.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!i.length)){var l=t.coordSys.model,u=jy(l),c=e.map[u];c||(c=e.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(c)),c.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function q9e(e,t,r){var n=r.axesInfo=[];R(t,function(i,a){var o=i.axisPointerModel.option,s=e[a];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function K9e(e,t,r,n){if(_b(t)||!e.list.length){n({type:"hideTip"});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function J9e(e,t,r){var n=r.getZr(),i="axisPointerLastHighlights",a=Z8(n)[i]||{},o=Z8(n)[i]={};R(e,function(u,c){var f=u.axisPointerModel.option;f.status==="show"&&u.triggerEmphasis&&R(f.seriesDataIndices,function(h){var d=h.seriesIndex+" | "+h.dataIndex;o[d]=h})});var s=[],l=[];R(a,function(u,c){!o[c]&&l.push(u)}),R(o,function(u,c){!a[c]&&s.push(u)}),l.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function Q9e(e,t){for(var r=0;r<(e||[]).length;r++){var n=e[r];if(t.axis.dim===n.axisDim&&t.axis.model.componentIndex===n.axisIndex)return n}}function X8(e){var t=e.axis.model,r={},n=r.axisDim=e.axis.dim;return r.axisIndex=r[n+"AxisIndex"]=t.componentIndex,r.axisName=r[n+"AxisName"]=t.name,r.axisId=r[n+"AxisId"]=t.id,r}function _b(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function P0(e){jf.registerAxisPointerClass("CartesianAxisPointer",R9e),e.registerComponentModel(z9e),e.registerComponentView(H9e),e.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var r=t.axisPointer.link;r&&!oe(r)&&(t.axisPointer.link=[r])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,function(t,r){t.getComponent("axisPointer").coordSysAxesInfo=eGe(t,r)}),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},U9e)}function eZe(e){Ye(Ire),Ye(P0)}var tZe=function(e){K(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),c=u.getExtent(),f=s.dataToCoord(n),h=a.get("type");if(h&&h!=="none"){var d=kR(a),v=nZe[h](s,l,f,c);v.style=d,r.graphicKey=v.type,r.pointer=v}var m=a.get(["label","margin"]),y=rZe(n,i,a,l,m);rie(r,i,a,o,y)},t}(PR);function rZe(e,t,r,n,i){var a=t.axis,o=a.dataToCoord(e),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=n.getRadiusAxis().getExtent(),u,c,f;if(a.dim==="radius"){var h=Yr();rl(h,h,s),Ka(h,h,[n.cx,n.cy]),u=Ua([o,-i],h);var d=t.getModel("axisLabel").get("rotate")||0,v=Zn.innerTextLayout(s,d*Math.PI/180,-1);c=v.textAlign,f=v.textVerticalAlign}else{var m=l[1];u=n.coordToPoint([m+i,o]);var y=n.cx,x=n.cy;c=Math.abs(u[0]-y)/m<.3?"center":u[0]>y?"left":"right",f=Math.abs(u[1]-x)/m<.3?"middle":u[1]>x?"top":"bottom"}return{position:u,align:c,verticalAlign:f}}var nZe={line:function(e,t,r,n){return e.dim==="angle"?{type:"Line",shape:IR(t.coordToPoint([n[0],r]),t.coordToPoint([n[1],r]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r}}},shadow:function(e,t,r,n){var i=Math.max(1,e.getBandWidth()),a=Math.PI/180;return e.dim==="angle"?{type:"Sector",shape:G8(t.cx,t.cy,n[0],n[1],(-r-i/2)*a,(-r+i/2)*a)}:{type:"Sector",shape:G8(t.cx,t.cy,r-i/2,r+i/2,0,Math.PI*2)}}},iZe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.findAxisModel=function(r){var n,i=this.ecModel;return i.eachComponent(r,function(a){a.getCoordSysModel()===this&&(n=a)},this),n},t.type="polar",t.dependencies=["radiusAxis","angleAxis"],t.defaultOption={z:0,center:["50%","50%"],radius:"80%"},t}(Qe),OR=function(e){K(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",tr).models[0]},t.type="polarAxis",t}(Qe);cr(OR,Qv);var aZe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="angleAxis",t}(OR),oZe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="radiusAxis",t}(OR),ER=function(e){K(t,e);function t(r,n){return e.call(this,"radius",r,n)||this}return t.prototype.pointToData=function(r,n){return this.polar.pointToData(r,n)[this.dim==="radius"?0:1]},t}(wa);ER.prototype.dataToRadius=wa.prototype.dataToCoord;ER.prototype.radiusToData=wa.prototype.coordToData;var sZe=et(),DR=function(e){K(t,e);function t(r,n){return e.call(this,"angle",r,n||[0,360])||this}return t.prototype.pointToData=function(r,n){return this.polar.pointToData(r,n)[this.dim==="radius"?0:1]},t.prototype.calculateCategoryInterval=function(){var r=this,n=r.getLabelModel(),i=r.scale,a=i.getExtent(),o=i.count();if(a[1]-a[0]<1)return 0;var s=a[0],l=r.dataToCoord(s+1)-r.dataToCoord(s),u=Math.abs(l),c=ET(s==null?"":s+"",n.getFont(),"center","top"),f=Math.max(c.height,7),h=f/u;isNaN(h)&&(h=1/0);var d=Math.max(0,Math.floor(h)),v=sZe(r.model),m=v.lastAutoInterval,y=v.lastTickCount;return m!=null&&y!=null&&Math.abs(m-d)<=1&&Math.abs(y-o)<=1&&m>d?d=m:(v.lastTickCount=o,v.lastAutoInterval=d),d},t}(wa);DR.prototype.dataToAngle=wa.prototype.dataToCoord;DR.prototype.angleToData=wa.prototype.coordToData;var lie=["radius","angle"],lZe=function(){function e(t){this.dimensions=lie,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new ER,this._angleAxis=new DR,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return e.prototype.containPoint=function(t){var r=this.pointToCoord(t);return this._radiusAxis.contain(r[0])&&this._angleAxis.contain(r[1])},e.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},e.prototype.getAxis=function(t){var r="_"+t+"Axis";return this[r]},e.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},e.prototype.getAxesByScale=function(t){var r=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===t&&r.push(n),i.scale.type===t&&r.push(i),r},e.prototype.getAngleAxis=function(){return this._angleAxis},e.prototype.getRadiusAxis=function(){return this._radiusAxis},e.prototype.getOtherAxis=function(t){var r=this._angleAxis;return t===r?this._radiusAxis:r},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},e.prototype.getTooltipAxes=function(t){var r=t!=null&&t!=="auto"?this.getAxis(t):this.getBaseAxis();return{baseAxes:[r],otherAxes:[this.getOtherAxis(r)]}},e.prototype.dataToPoint=function(t,r,n){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],r),this._angleAxis.dataToAngle(t[1],r)],n)},e.prototype.pointToData=function(t,r,n){n=n||[];var i=this.pointToCoord(t);return n[0]=this._radiusAxis.radiusToData(i[0],r),n[1]=this._angleAxis.angleToData(i[1],r),n},e.prototype.pointToCoord=function(t){var r=t[0]-this.cx,n=t[1]-this.cy,i=this.getAngleAxis(),a=i.getExtent(),o=Math.min(a[0],a[1]),s=Math.max(a[0],a[1]);i.inverse?o=s-360:s=o+360;var l=Math.sqrt(r*r+n*n);r/=l,n/=l;for(var u=Math.atan2(-n,r)/Math.PI*180,c=u<o?1:-1;u<o||u>s;)u+=c*360;return[l,u]},e.prototype.coordToPoint=function(t,r){r=r||[];var n=t[0],i=t[1]/180*Math.PI;return r[0]=Math.cos(i)*n+this.cx,r[1]=-Math.sin(i)*n+this.cy,r},e.prototype.getArea=function(){var t=this.getAngleAxis(),r=this.getRadiusAxis(),n=r.getExtent().slice();n[0]>n[1]&&n.reverse();var i=t.getExtent(),a=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-i[0]*a,endAngle:-i[1]*a,clockwise:t.inverse,contain:function(s,l){var u=s-this.cx,c=l-this.cy,f=u*u+c*c,h=this.r,d=this.r0;return h!==d&&f-o<=h*h&&f+o>=d*d},x:this.cx-n[1],y:this.cy-n[1],width:n[1]*2,height:n[1]*2}},e.prototype.convertToPixel=function(t,r,n){var i=q8(r);return i===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,r,n){var i=q8(r);return i===this?this.pointToData(n):null},e}();function q8(e){var t=e.seriesModel,r=e.polarModel;return r&&r.coordinateSystem||t&&t.coordinateSystem}function uZe(e,t,r){var n=t.get("center"),i=zr(t,r).refContainer;e.cx=me(n[0],i.width)+i.x,e.cy=me(n[1],i.height)+i.y;var a=e.getRadiusAxis(),o=Math.min(i.width,i.height)/2,s=t.get("radius");s==null?s=[0,"100%"]:oe(s)||(s=[0,s]);var l=[me(s[0],o),me(s[1],o)];a.inverse?a.setExtent(l[1],l[0]):a.setExtent(l[0],l[1])}function cZe(e,t){var r=this,n=r.getAngleAxis(),i=r.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),e.eachSeries(function(s){if(s.coordinateSystem===r){var l=s.getData();R(Dw(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),R(Dw(l,"angle"),function(u){n.scale.unionExtentFromData(l,u)})}}),yf(n.scale,n.model),yf(i.scale,i.model),n.type==="category"&&!n.onBand){var a=n.getExtent(),o=360/n.scale.count();n.inverse?a[1]+=o:a[1]-=o,n.setExtent(a[0],a[1])}}function fZe(e){return e.mainType==="angleAxis"}function K8(e,t){var r;if(e.type=t.get("type"),e.scale=w0(t),e.onBand=t.get("boundaryGap")&&e.type==="category",e.inverse=t.get("inverse"),fZe(t)){e.inverse=e.inverse!==t.get("clockwise");var n=t.get("startAngle"),i=(r=t.get("endAngle"))!==null&&r!==void 0?r:n+(e.inverse?-360:360);e.setExtent(n,i)}t.axis=e,e.model=t}var hZe={dimensions:lie,create:function(e,t){var r=[];return e.eachComponent("polar",function(n,i){var a=new lZe(i+"");a.update=cZe;var o=a.getRadiusAxis(),s=a.getAngleAxis(),l=n.findAxisModel("radiusAxis"),u=n.findAxisModel("angleAxis");K8(o,l),K8(s,u),uZe(a,n,t),r.push(a),n.coordinateSystem=a,a.model=n}),e.eachSeries(function(n){if(n.get("coordinateSystem")==="polar"){var i=n.getReferringComponents("polar",tr).models[0];n.coordinateSystem=i.coordinateSystem}}),r}},dZe=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function P_(e,t,r){t[1]>t[0]&&(t=t.slice().reverse());var n=e.coordToPoint([t[0],r]),i=e.coordToPoint([t[1],r]);return{x1:n[0],y1:n[1],x2:i[0],y2:i[1]}}function k_(e){var t=e.getRadiusAxis();return t.inverse?0:1}function J8(e){var t=e[0],r=e[e.length-1];t&&r&&Math.abs(Math.abs(t.coord-r.coord)-360)<1e-4&&e.pop()}var vZe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.axisPointerClass="PolarAxisPointer",r}return t.prototype.render=function(r,n){if(this.group.removeAll(),!!r.get("show")){var i=r.axis,a=i.polar,o=a.getRadiusAxis().getExtent(),s=i.getTicksCoords({breakTicks:"none"}),l=i.getMinorTicksCoords(),u=le(i.getViewLabels(),function(c){c=Le(c);var f=i.scale,h=f.type==="ordinal"?f.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=i.dataToCoord(h),c});J8(u),J8(s),R(dZe,function(c){r.get([c,"show"])&&(!i.scale.isBlank()||c==="axisLine")&&pZe[c](this.group,r,a,s,l,o,u)},this)}},t.type="angleAxis",t}(jf),pZe={axisLine:function(e,t,r,n,i,a){var o=t.getModel(["axisLine","lineStyle"]),s=r.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),c=k_(r),f=c?0:1,h,d=Math.abs(u[1]-u[0])===360?"Circle":"Arc";a[f]===0?h=new Of[d]({shape:{cx:r.cx,cy:r.cy,r:a[c],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):h=new $v({shape:{cx:r.cx,cy:r.cy,r:a[c],r0:a[f]},style:o.getLineStyle(),z2:1,silent:!0}),h.style.fill=null,e.add(h)},axisTick:function(e,t,r,n,i,a){var o=t.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=a[k_(r)],u=le(n,function(c){return new mr({shape:P_(r,[l,l+s],c.coord)})});e.add(Ti(u,{style:Oe(o.getModel("lineStyle").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})}))},minorTick:function(e,t,r,n,i,a){if(i.length){for(var o=t.getModel("axisTick"),s=t.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=a[k_(r)],c=[],f=0;f<i.length;f++)for(var h=0;h<i[f].length;h++)c.push(new mr({shape:P_(r,[u,u+l],i[f][h].coord)}));e.add(Ti(c,{style:Oe(s.getModel("lineStyle").getLineStyle(),Oe(o.getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(e,t,r,n,i,a,o){var s=t.getCategories(!0),l=t.getModel("axisLabel"),u=l.get("margin"),c=t.get("triggerEvent");R(o,function(f,h){var d=l,v=f.tickValue,m=a[k_(r)],y=r.coordToPoint([m+u,f.coord]),x=r.cx,_=r.cy,b=Math.abs(y[0]-x)/m<.3?"center":y[0]>x?"left":"right",S=Math.abs(y[1]-_)/m<.3?"middle":y[1]>_?"top":"bottom";if(s&&s[v]){var T=s[v];Ee(T)&&T.textStyle&&(d=new rt(T.textStyle,l,l.ecModel))}var C=new ot({silent:Zn.isLabelSilent(t),style:kt(d,{x:y[0],y:y[1],fill:d.getTextColor()||t.get(["axisLine","lineStyle","color"]),text:f.formattedLabel,align:b,verticalAlign:S})});if(e.add(C),il({el:C,componentModel:t,itemName:f.formattedLabel,formatterParamsExtra:{isTruncated:function(){return C.isTruncated},value:f.rawLabel,tickIndex:h}}),c){var A=Zn.makeAxisEventDataBase(t);A.targetType="axisLabel",A.value=f.rawLabel,ze(C).eventData=A}},this)},splitLine:function(e,t,r,n,i,a){var o=t.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=0;f<n.length;f++){var h=u++%l.length;c[h]=c[h]||[],c[h].push(new mr({shape:P_(r,a,n[f].coord)}))}for(var f=0;f<c.length;f++)e.add(Ti(c[f],{style:Oe({stroke:l[f%l.length]},s.getLineStyle()),silent:!0,z:t.get("z")}))},minorSplitLine:function(e,t,r,n,i,a){if(i.length){for(var o=t.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=[],u=0;u<i.length;u++)for(var c=0;c<i[u].length;c++)l.push(new mr({shape:P_(r,a,i[u][c].coord)}));e.add(Ti(l,{style:s.getLineStyle(),silent:!0,z:t.get("z")}))}},splitArea:function(e,t,r,n,i,a){if(n.length){var o=t.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=Math.PI/180,h=-n[0].coord*f,d=Math.min(a[0],a[1]),v=Math.max(a[0],a[1]),m=t.get("clockwise"),y=1,x=n.length;y<=x;y++){var _=y===x?n[0].coord:n[y].coord,b=u++%l.length;c[b]=c[b]||[],c[b].push(new Sn({shape:{cx:r.cx,cy:r.cy,r0:d,r:v,startAngle:h,endAngle:-_*f,clockwise:m},silent:!0})),h=-_*f}for(var y=0;y<c.length;y++)e.add(Ti(c[y],{style:Oe({fill:l[y%l.length]},s.getAreaStyle()),silent:!0}))}}},gZe=["splitLine","splitArea","minorSplitLine"],mZe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.axisPointerClass="PolarAxisPointer",r}return t.prototype.render=function(r,n,i){if(this.group.removeAll(),!!r.get("show")){var a=this._axisGroup,o=this._axisGroup=new Ie;this.group.add(o);var s=r.axis,l=s.polar,u=l.getAngleAxis(),c=s.getTicksCoords(),f=s.getMinorTicksCoords(),h=u.getExtent()[0],d=s.getExtent(),v=xZe(l,r,h),m=new Zn(r,i,v);m.build(),o.add(m.group),y0(a,o,r),R(gZe,function(y){r.get([y,"show"])&&!s.scale.isBlank()&&yZe[y](this.group,r,l,h,d,c,f)},this)}},t.type="radiusAxis",t}(jf),yZe={splitLine:function(e,t,r,n,i,a){var o=t.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0,c=r.getAngleAxis(),f=Math.PI/180,h=c.getExtent(),d=Math.abs(h[1]-h[0])===360?"Circle":"Arc";l=l instanceof Array?l:[l];for(var v=[],m=0;m<a.length;m++){var y=u++%l.length;v[y]=v[y]||[],v[y].push(new Of[d]({shape:{cx:r.cx,cy:r.cy,r:Math.max(a[m].coord,0),startAngle:-h[0]*f,endAngle:-h[1]*f,clockwise:c.inverse}}))}for(var m=0;m<v.length;m++)e.add(Ti(v[m],{style:Oe({stroke:l[m%l.length],fill:null},s.getLineStyle()),silent:!0}))},minorSplitLine:function(e,t,r,n,i,a,o){if(o.length){for(var s=t.getModel("minorSplitLine"),l=s.getModel("lineStyle"),u=[],c=0;c<o.length;c++)for(var f=0;f<o[c].length;f++)u.push(new Qo({shape:{cx:r.cx,cy:r.cy,r:o[c][f].coord}}));e.add(Ti(u,{style:Oe({fill:null},l.getLineStyle()),silent:!0}))}},splitArea:function(e,t,r,n,i,a){if(a.length){var o=t.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=a[0].coord,h=1;h<a.length;h++){var d=u++%l.length;c[d]=c[d]||[],c[d].push(new Sn({shape:{cx:r.cx,cy:r.cy,r0:f,r:a[h].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),f=a[h].coord}for(var h=0;h<c.length;h++)e.add(Ti(c[h],{style:Oe({fill:l[h%l.length]},s.getAreaStyle()),silent:!0}))}}};function xZe(e,t,r){return{position:[e.cx,e.cy],rotation:r/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:t.getModel("axisLabel").get("rotate"),z2:1}}function uie(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function cie(e,t){return t.dim+e.model.componentIndex}function _Ze(e,t,r){var n={},i=bZe(dt(t.getSeriesByType(e),function(a){return!t.isSeriesFiltered(a)&&a.coordinateSystem&&a.coordinateSystem.type==="polar"}));t.eachSeriesByType(e,function(a){if(a.coordinateSystem.type==="polar"){var o=a.getData(),s=a.coordinateSystem,l=s.getBaseAxis(),u=cie(s,l),c=uie(a),f=i[u][c],h=f.offset,d=f.width,v=s.getOtherAxis(l),m=a.coordinateSystem.cx,y=a.coordinateSystem.cy,x=a.get("barMinHeight")||0,_=a.get("barMinAngle")||0;n[c]=n[c]||[];for(var b=o.mapDimension(v.dim),S=o.mapDimension(l.dim),T=Xs(o,b),C=l.dim!=="radius"||!a.get("roundCap",!0),A=v.model,P=A.get("startValue"),I=v.dataToCoord(P||0),k=0,E=o.count();k<E;k++){var D=o.get(b,k),N=o.get(S,k),z=D>=0?"p":"n",V=I;T&&(n[c][N]||(n[c][N]={p:I,n:I}),V=n[c][N][z]);var F=void 0,$=void 0,B=void 0,H=void 0;if(v.dim==="radius"){var U=v.dataToCoord(D)-I,Y=l.dataToCoord(N);Math.abs(U)<x&&(U=(U<0?-1:1)*x),F=V,$=V+U,B=Y-h,H=B-d,T&&(n[c][N][z]=$)}else{var Z=v.dataToCoord(D,C)-I,Q=l.dataToCoord(N);Math.abs(Z)<_&&(Z=(Z<0?-1:1)*_),F=Q+h,$=F+d,B=V,H=V+Z,T&&(n[c][N][z]=H)}o.setItemLayout(k,{cx:m,cy:y,r0:F,r:$,startAngle:-B*Math.PI/180,endAngle:-H*Math.PI/180,clockwise:B>=H})}}})}function bZe(e){var t={};R(e,function(n,i){var a=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=cie(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/a.count(),f=t[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},h=f.stacks;t[l]=f;var d=uie(n);h[d]||f.autoWidthCount++,h[d]=h[d]||{width:0,maxWidth:0};var v=me(n.get("barWidth"),c),m=me(n.get("barMaxWidth"),c),y=n.get("barGap"),x=n.get("barCategoryGap");v&&!h[d].width&&(v=Math.min(f.remainedWidth,v),h[d].width=v,f.remainedWidth-=v),m&&(h[d].maxWidth=m),y!=null&&(f.gap=y),x!=null&&(f.categoryGap=x)});var r={};return R(t,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=me(n.categoryGap,o),l=me(n.gap,1),u=n.remainedWidth,c=n.autoWidthCount,f=(u-s)/(c+(c-1)*l);f=Math.max(f,0),R(a,function(m,y){var x=m.maxWidth;x&&x<f&&(x=Math.min(x,u),m.width&&(x=Math.min(x,m.width)),u-=x,m.width=x,c--)}),f=(u-s)/(c+(c-1)*l),f=Math.max(f,0);var h=0,d;R(a,function(m,y){m.width||(m.width=f),d=m,h+=m.width*(1+l)}),d&&(h-=d.width*l);var v=-h/2;R(a,function(m,y){r[i][y]=r[i][y]||{offset:v,width:m.width},v+=m.width*(1+l)})}),r}var wZe={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},SZe={splitNumber:5},TZe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="polar",t}(It);function CZe(e){Ye(P0),jf.registerAxisPointerClass("PolarAxisPointer",tZe),e.registerCoordinateSystem("polar",hZe),e.registerComponentModel(iZe),e.registerComponentView(TZe),sv(e,"angle",aZe,wZe),sv(e,"radius",oZe,SZe),e.registerComponentView(vZe),e.registerComponentView(mZe),e.registerLayout(We(_Ze,"bar"))}function zO(e,t){t=t||{};var r=e.coordinateSystem,n=e.axis,i={},a=n.position,o=n.orient,s=r.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};i.position=[o==="vertical"?u.vertical[a]:l[0],o==="horizontal"?u.horizontal[a]:l[3]];var c={horizontal:0,vertical:1};i.rotation=Math.PI/2*c[o];var f={top:-1,bottom:1,right:1,left:-1};i.labelDirection=i.tickDirection=i.nameDirection=f[a],e.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),on(t.labelInside,e.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var h=e.get(["axisLabel","rotate"]);return i.labelRotate=a==="top"?-h:h,i.z2=1,i}var AZe=["splitArea","splitLine","breakArea"],MZe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.axisPointerClass="SingleAxisPointer",r}return t.prototype.render=function(r,n,i,a){var o=this.group;o.removeAll();var s=this._axisGroup;this._axisGroup=new Ie;var l=zO(r),u=new Zn(r,i,l);u.build(),o.add(this._axisGroup),o.add(u.group),R(AZe,function(c){r.get([c,"show"])&&PZe[c](this,this.group,this._axisGroup,r,i)},this),y0(s,this._axisGroup,r),e.prototype.render.call(this,r,n,i,a)},t.prototype.remove=function(){Pre(this)},t.type="singleAxis",t}(jf),PZe={splitLine:function(e,t,r,n,i){var a=n.axis;if(!a.scale.isBlank()){var o=n.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color");l=l instanceof Array?l:[l];for(var u=s.get("width"),c=n.coordinateSystem.getRect(),f=a.isHorizontal(),h=[],d=0,v=a.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),m=[],y=[],x=0;x<v.length;++x){var _=a.toGlobalCoord(v[x].coord);f?(m[0]=_,m[1]=c.y,y[0]=_,y[1]=c.y+c.height):(m[0]=c.x,m[1]=_,y[0]=c.x+c.width,y[1]=_);var b=new mr({shape:{x1:m[0],y1:m[1],x2:y[0],y2:y[1]},silent:!0});tv(b.shape,u);var S=d++%l.length;h[S]=h[S]||[],h[S].push(b)}for(var T=s.getLineStyle(["color"]),x=0;x<h.length;++x)t.add(Ti(h[x],{style:Oe({stroke:l[x%l.length]},T),silent:!0}))}},splitArea:function(e,t,r,n,i){Mre(e,r,n,n)},breakArea:function(e,t,r,n,i){var a=M0(),o=n.axis.scale;a&&o.type!=="ordinal"&&a.rectCoordBuildBreakAxis(t,e,n,n.coordinateSystem.getRect(),i)}},bb=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getCoordSysModel=function(){return this},t.type="singleAxis",t.layoutMode="box",t.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}},jitter:0,jitterOverlap:!0,jitterMargin:2},t}(Qe);cr(bb,Qv.prototype);var kZe=function(e){K(t,e);function t(r,n,i,a,o){var s=e.call(this,r,n,i)||this;return s.type=a||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},t.prototype.pointToData=function(r,n){return this.coordinateSystem.pointToData(r)[0]},t}(wa),fie=["single"],LZe=function(){function e(t,r,n){this.type="single",this.dimension="single",this.dimensions=fie,this.axisPointerEnabled=!0,this.model=t,this._init(t,r,n)}return e.prototype._init=function(t,r,n){var i=this.dimension,a=new kZe(i,w0(t),[0,0],t.get("type"),t.get("position")),o=a.type==="category";a.onBand=o&&t.get("boundaryGap"),a.inverse=t.get("inverse"),a.orient=t.get("orient"),t.axis=a,a.model=t,a.coordinateSystem=this,this._axis=a},e.prototype.update=function(t,r){t.eachSeries(function(n){if(n.coordinateSystem===this){var i=n.getData();R(i.mapDimensionsAll(this.dimension),function(a){this._axis.scale.unionExtentFromData(i,a)},this),yf(this._axis.scale,this._axis.model)}},this)},e.prototype.resize=function(t,r){var n=zr(t,r).refContainer;this._rect=$t(t.getBoxLayoutParams(),n),this._adjustAxis()},e.prototype.getRect=function(){return this._rect},e.prototype._adjustAxis=function(){var t=this._rect,r=this._axis,n=r.isHorizontal(),i=n?[0,t.width]:[0,t.height],a=r.inverse?1:0;r.setExtent(i[a],i[1-a]),this._updateAxisTransform(r,n?t.x:t.y)},e.prototype._updateAxisTransform=function(t,r){var n=t.getExtent(),i=n[0]+n[1],a=t.isHorizontal();t.toGlobalCoord=a?function(o){return o+r}:function(o){return i-o+r},t.toLocalCoord=a?function(o){return o-r}:function(o){return i-o+r}},e.prototype.getAxis=function(){return this._axis},e.prototype.getBaseAxis=function(){return this._axis},e.prototype.getAxes=function(){return[this._axis]},e.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},e.prototype.containPoint=function(t){var r=this.getRect(),n=this.getAxis(),i=n.orient;return i==="horizontal"?n.contain(n.toLocalCoord(t[0]))&&t[1]>=r.y&&t[1]<=r.y+r.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=r.y&&t[0]<=r.y+r.height},e.prototype.pointToData=function(t,r,n){n=n||[];var i=this.getAxis();return n[0]=i.coordToData(i.toLocalCoord(t[i.orient==="horizontal"?0:1])),n},e.prototype.dataToPoint=function(t,r,n){var i=this.getAxis(),a=this.getRect();n=n||[];var o=i.orient==="horizontal"?0:1;return t instanceof Array&&(t=t[0]),n[o]=i.toGlobalCoord(i.dataToCoord(+t)),n[1-o]=o===0?a.y+a.height/2:a.x+a.width/2,n},e.prototype.convertToPixel=function(t,r,n){var i=Q8(r);return i===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,r,n){var i=Q8(r);return i===this?this.pointToData(n):null},e}();function Q8(e){var t=e.seriesModel,r=e.singleAxisModel;return r&&r.coordinateSystem||t&&t.coordinateSystem}function IZe(e,t){var r=[];return e.eachComponent("singleAxis",function(n,i){var a=new LZe(n,e,t);a.name="single_"+i,a.resize(n,t),n.coordinateSystem=a,r.push(a)}),e.eachSeries(function(n){if(n.get("coordinateSystem")==="singleAxis"){var i=n.getReferringComponents("singleAxis",tr).models[0];n.coordinateSystem=i&&i.coordinateSystem}}),r}var OZe={create:IZe,dimensions:fie},eH=["x","y"],EZe=["width","height"],DZe=function(e){K(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.coordinateSystem,u=QM(l,1-Qw(s)),c=l.dataToPoint(n)[0],f=a.get("type");if(f&&f!=="none"){var h=kR(a),d=NZe[f](s,c,u);d.style=h,r.graphicKey=d.type,r.pointer=d}var v=zO(i);iie(n,r,v,i,a,o)},t.prototype.getHandleTransform=function(r,n,i){var a=zO(n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=LR(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.coordinateSystem,l=Qw(o),u=QM(s,l),c=[r.x,r.y];c[l]+=n[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var f=QM(s,1-l),h=(f[1]+f[0])/2,d=[h,h];return d[l]=c[l],{x:c[0],y:c[1],rotation:r.rotation,cursorPoint:d,tooltipOption:{verticalAlign:"middle"}}},t}(PR),NZe={line:function(e,t,r){var n=IR([t,r[0]],[t,r[1]],Qw(e));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(e,t,r){var n=e.getBandWidth(),i=r[1]-r[0];return{type:"Rect",shape:aie([t-n/2,r[0]],[n,i],Qw(e))}}};function Qw(e){return e.isHorizontal()?0:1}function QM(e,t){var r=e.getRect();return[r[eH[t]],r[eH[t]]+r[EZe[t]]]}var jZe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="single",t}(It);function RZe(e){Ye(P0),jf.registerAxisPointerClass("SingleAxisPointer",DZe),e.registerComponentView(jZe),e.registerComponentView(MZe),e.registerComponentModel(bb),sv(e,"single",bb,bb.defaultOption),e.registerCoordinateSystem("single",OZe)}var BZe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n,i){var a=Ef(r);e.prototype.init.apply(this,arguments),tH(r,a)},t.prototype.mergeOption=function(r){e.prototype.mergeOption.apply(this,arguments),tH(this.option,r)},t.prototype.getCellSize=function(){return this.option.cellSize},t.type="calendar",t.layoutMode="box",t.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:J.color.axisLine,width:1,type:"solid"}},itemStyle:{color:J.color.neutral00,borderWidth:1,borderColor:J.color.neutral10},dayLabel:{show:!0,firstDay:0,position:"start",margin:J.size.s,color:J.color.secondary},monthLabel:{show:!0,position:"start",margin:J.size.s,align:"center",formatter:null,color:J.color.secondary},yearLabel:{show:!0,position:null,margin:J.size.xl,formatter:null,color:J.color.quaternary,fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},t}(Qe);function tH(e,t){var r=e.cellSize,n;oe(r)?n=r:n=e.cellSize=[r,r],n.length===1&&(n[1]=n[0]);var i=le([0,1],function(a){return oBe(t,a)&&(n[a]="auto"),n[a]!=null&&n[a]!=="auto"});Zo(e,t,{type:"box",ignoreSize:i})}var zZe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=this.group;a.removeAll();var o=r.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=n.getLocaleModel();this._renderDayRect(r,s,a),this._renderLines(r,s,l,a),this._renderYearText(r,s,l,a),this._renderMonthText(r,u,l,a),this._renderWeekText(r,u,s,l,a)},t.prototype._renderDayRect=function(r,n,i){for(var a=r.coordinateSystem,o=r.getModel("itemStyle").getItemStyle(),s=a.getCellWidth(),l=a.getCellHeight(),u=n.start.time;u<=n.end.time;u=a.getNextNDay(u,1).time){var c=a.dataToCalendarLayout([u],!1).tl,f=new qe({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});i.add(f)}},t.prototype._renderLines=function(r,n,i,a){var o=this,s=r.coordinateSystem,l=r.getModel(["splitLine","lineStyle"]).getLineStyle(),u=r.get(["splitLine","show"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var f=n.start,h=0;f.time<=n.end.time;h++){v(f.formatedDate),h===0&&(f=s.getDateInfo(n.start.y+"-"+n.start.m));var d=f.date;d.setMonth(d.getMonth()+1),f=s.getDateInfo(d)}v(s.getNextNDay(n.end.time,1).formatedDate);function v(m){o._firstDayOfMonth.push(s.getDateInfo(m)),o._firstDayPoints.push(s.dataToCalendarLayout([m],!1).tl);var y=o._getLinePointsOfOneWeek(r,m,i);o._tlpoints.push(y[0]),o._blpoints.push(y[y.length-1]),u&&o._drawSplitline(y,l,a)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,c,i),l,a),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,i),l,a)},t.prototype._getEdgesPoints=function(r,n,i){var a=[r[0].slice(),r[r.length-1].slice()],o=i==="horizontal"?0:1;return a[0][o]=a[0][o]-n/2,a[1][o]=a[1][o]+n/2,a},t.prototype._drawSplitline=function(r,n,i){var a=new ln({z2:20,shape:{points:r},style:n});i.add(a)},t.prototype._getLinePointsOfOneWeek=function(r,n,i){for(var a=r.coordinateSystem,o=a.getDateInfo(n),s=[],l=0;l<7;l++){var u=a.getNextNDay(o.time,l),c=a.dataToCalendarLayout([u.time],!1);s[2*u.day]=c.tl,s[2*u.day+1]=c[i==="horizontal"?"bl":"tr"]}return s},t.prototype._formatterLabel=function(r,n){return ye(r)&&r?Q5e(r,n):ke(r)?r(n):n.nameMap},t.prototype._yearTextPositionControl=function(r,n,i,a,o){var s=n[0],l=n[1],u=["center","bottom"];a==="bottom"?(l+=o,u=["center","top"]):a==="left"?s-=o:a==="right"?(s+=o,u=["center","top"]):l-=o;var c=0;return(a==="left"||a==="right")&&(c=Math.PI/2),{rotation:c,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},t.prototype._renderYearText=function(r,n,i,a){var o=r.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=i!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(u[0][0]+u[1][0])/2,f=(u[0][1]+u[1][1])/2,h=i==="horizontal"?0:1,d={top:[c,u[h][1]],bottom:[c,u[1-h][1]],left:[u[1-h][0],f],right:[u[h][0],f]},v=n.start.y;+n.end.y>+n.start.y&&(v=v+"-"+n.end.y);var m=o.get("formatter"),y={start:n.start.y,end:n.end.y,nameMap:v},x=this._formatterLabel(m,y),_=new ot({z2:30,style:kt(o,{text:x}),silent:o.get("silent")});_.attr(this._yearTextPositionControl(_,d[l],i,l,s)),a.add(_)}},t.prototype._monthTextPositionControl=function(r,n,i,a,o){var s="left",l="top",u=r[0],c=r[1];return i==="horizontal"?(c=c+o,n&&(s="center"),a==="start"&&(l="bottom")):(u=u+o,n&&(l="middle"),a==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},t.prototype._renderMonthText=function(r,n,i,a){var o=r.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),c=o.get("align"),f=[this._tlpoints,this._blpoints];(!s||ye(s))&&(s&&(n=DI(s)||n),s=n.get(["time","monthAbbr"])||[]);var h=u==="start"?0:1,d=i==="horizontal"?0:1;l=u==="start"?-l:l;for(var v=c==="center",m=o.get("silent"),y=0;y<f[h].length-1;y++){var x=f[h][y].slice(),_=this._firstDayOfMonth[y];if(v){var b=this._firstDayPoints[y];x[d]=(b[d]+f[0][y+1][d])/2}var S=o.get("formatter"),T=s[+_.m-1],C={yyyy:_.y,yy:(_.y+"").slice(2),MM:_.m,M:+_.m,nameMap:T},A=this._formatterLabel(S,C),P=new ot({z2:30,style:ae(kt(o,{text:A}),this._monthTextPositionControl(x,v,i,u,l)),silent:m});a.add(P)}}},t.prototype._weekTextPositionControl=function(r,n,i,a,o){var s="center",l="middle",u=r[0],c=r[1],f=i==="start";return n==="horizontal"?(u=u+a+(f?1:-1)*o[0]/2,s=f?"right":"left"):(c=c+a+(f?1:-1)*o[1]/2,l=f?"bottom":"top"),{x:u,y:c,align:s,verticalAlign:l}},t.prototype._renderWeekText=function(r,n,i,a,o){var s=r.getModel("dayLabel");if(s.get("show")){var l=r.coordinateSystem,u=s.get("position"),c=s.get("nameMap"),f=s.get("margin"),h=l.getFirstDayOfWeek();if(!c||ye(c)){c&&(n=DI(c)||n);var d=n.get(["time","dayOfWeekShort"]);c=d||le(n.get(["time","dayOfWeekAbbr"]),function(C){return C[0]})}var v=l.getNextNDay(i.end.time,7-i.lweek).time,m=[l.getCellWidth(),l.getCellHeight()];f=me(f,Math.min(m[1],m[0])),u==="start"&&(v=l.getNextNDay(i.start.time,-(7+i.fweek)).time,f=-f);for(var y=s.get("silent"),x=0;x<7;x++){var _=l.getNextNDay(v,x),b=l.dataToCalendarLayout([_.time],!1).center,S=x;S=Math.abs((x+h)%7);var T=new ot({z2:30,style:ae(kt(s,{text:c[S]}),this._weekTextPositionControl(b,a,u,f,m)),silent:y});o.add(T)}}},t.type="calendar",t}(It),eP=864e5,$Ze=function(){function e(t,r,n){this.type="calendar",this.dimensions=e.dimensions,this.getDimensionsInfo=e.getDimensionsInfo,this._model=t,this._update(r,n)}return e.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},e.prototype.getRangeInfo=function(){return this._rangeInfo},e.prototype.getModel=function(){return this._model},e.prototype.getRect=function(){return this._rect},e.prototype.getCellWidth=function(){return this._sw},e.prototype.getCellHeight=function(){return this._sh},e.prototype.getOrient=function(){return this._orient},e.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},e.prototype.getDateInfo=function(t){t=Jo(t);var r=t.getFullYear(),n=t.getMonth()+1,i=n<10?"0"+n:""+n,a=t.getDate(),o=a<10?"0"+a:""+a,s=t.getDay();return s=Math.abs((s+7-this.getFirstDayOfWeek())%7),{y:r+"",m:i,d:o,day:s,time:t.getTime(),formatedDate:r+"-"+i+"-"+o,date:t}},e.prototype.getNextNDay=function(t,r){return r=r||0,r===0?this.getDateInfo(t):(t=new Date(this.getDateInfo(t).time),t.setDate(t.getDate()+r),this.getDateInfo(t))},e.prototype._update=function(t,r){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,i=["width","height"],a=this._model.getCellSize().slice(),o=this._model.getBoxLayoutParams(),s=this._orient==="horizontal"?[n,7]:[7,n];R([0,1],function(f){c(a,f)&&(o[i[f]]=a[f]*s[f])});var l={width:r.getWidth(),height:r.getHeight()},u=this._rect=$t(o,l);R([0,1],function(f){c(a,f)||(a[f]=u[i[f]]/s[f])});function c(f,h){return f[h]!=null&&f[h]!=="auto"}this._sw=a[0],this._sh=a[1]},e.prototype.dataToPoint=function(t,r,n){n=n||[],oe(t)&&(t=t[0]),r==null&&(r=!0);var i=this.getDateInfo(t),a=this._rangeInfo,o=i.formatedDate;if(r&&!(i.time>=a.start.time&&i.time<a.end.time+eP))return n[0]=n[1]=NaN,n;var s=i.day,l=this._getRangeInfo([a.start.time,o]).nthWeek;return this._orient==="vertical"?(n[0]=this._rect.x+s*this._sw+this._sw/2,n[1]=this._rect.y+l*this._sh+this._sh/2):(n[0]=this._rect.x+l*this._sw+this._sw/2,n[1]=this._rect.y+s*this._sh+this._sh/2),n},e.prototype.pointToData=function(t){var r=this.pointToDate(t);return r&&r.time},e.prototype.dataToLayout=function(t,r,n){n=n||{};var i=n.rect=n.rect||{},a=n.contentRect=n.contentRect||{},o=this.dataToPoint(t,r);return i.x=o[0]-this._sw/2,i.y=o[1]-this._sh/2,i.width=this._sw,i.height=this._sh,je.copy(a,i),pf(a,this._lineWidth/2,!0,!0),n},e.prototype.dataToCalendarLayout=function(t,r){var n=this.dataToPoint(t,r);return{center:n,tl:[n[0]-this._sw/2,n[1]-this._sh/2],tr:[n[0]+this._sw/2,n[1]-this._sh/2],br:[n[0]+this._sw/2,n[1]+this._sh/2],bl:[n[0]-this._sw/2,n[1]+this._sh/2]}},e.prototype.pointToDate=function(t){var r=Math.floor((t[0]-this._rect.x)/this._sw)+1,n=Math.floor((t[1]-this._rect.y)/this._sh)+1,i=this._rangeInfo.range;return this._orient==="vertical"?this._getDateByWeeksAndDay(n,r-1,i):this._getDateByWeeksAndDay(r,n-1,i)},e.prototype.convertToPixel=function(t,r,n){var i=tP(r);return i===this?i.dataToPoint(n):null},e.prototype.convertToLayout=function(t,r,n){var i=tP(r);return i===this?i.dataToLayout(n):null},e.prototype.convertFromPixel=function(t,r,n){var i=tP(r);return i===this?i.pointToData(n):null},e.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},e.prototype._initRangeOption=function(){var t=this._model.get("range"),r;if(oe(t)&&t.length===1&&(t=t[0]),oe(t))r=t;else{var n=t.toString();if(/^\d{4}$/.test(n)&&(r=[n+"-01-01",n+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(n)){var i=this.getDateInfo(n),a=i.date;a.setMonth(a.getMonth()+1);var o=this.getNextNDay(a,-1);r=[i.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n)&&(r=[n,n])}if(!r)return t;var s=this._getRangeInfo(r);return s.start.time>s.end.time&&r.reverse(),r},e.prototype._getRangeInfo=function(t){var r=[this.getDateInfo(t[0]),this.getDateInfo(t[1])],n;r[0].time>r[1].time&&(n=!0,r.reverse());var i=Math.floor(r[1].time/eP)-Math.floor(r[0].time/eP)+1,a=new Date(r[0].time),o=a.getDate(),s=r[1].date.getDate();a.setDate(o+i-1);var l=a.getDate();if(l!==s)for(var u=a.getTime()-r[1].time>0?1:-1;(l=a.getDate())!==s&&(a.getTime()-r[1].time)*u>0;)i-=u,a.setDate(l-u);var c=Math.floor((i+r[0].day+6)/7),f=n?-c+1:c-1;return n&&r.reverse(),{range:[r[0].formatedDate,r[1].formatedDate],start:r[0],end:r[1],allDay:i,weeks:c,nthWeek:f,fweek:r[0].day,lweek:r[1].day}},e.prototype._getDateByWeeksAndDay=function(t,r,n){var i=this._getRangeInfo(n);if(t>i.weeks||t===0&&r<i.fweek||t===i.weeks&&r>i.lweek)return null;var a=(t-1)*7-i.fweek+r,o=new Date(i.start.time);return o.setDate(+i.start.d+a),this.getDateInfo(o)},e.create=function(t,r){var n=[];return t.eachComponent("calendar",function(i){var a=new e(i,t,r);n.push(a),i.coordinateSystem=a}),t.eachComponent(function(i,a){_0({targetModel:a,coordSysType:"calendar",coordSysProvider:LQ})}),n},e.dimensions=["time","value"],e}();function tP(e){var t=e.calendarModel,r=e.seriesModel,n=t?t.coordinateSystem:r?r.coordinateSystem:null;return n}function FZe(e){e.registerComponentModel(BZe),e.registerComponentView(zZe),e.registerCoordinateSystem("calendar",$Ze)}var gs={level:1,leaf:2,nonLeaf:3},Ns={none:0,all:1,body:2,corner:3};function $O(e,t,r){var n=t[Ge[r]].getCell(e);return!n&&st(e)&&e<0&&(n=t[Ge[1-r]].getUnitLayoutInfo(r,Math.round(e))),n}function hie(e){var t=e||[];return t[0]=t[0]||[],t[1]=t[1]||[],t[0][0]=t[0][1]=t[1][0]=t[1][1]=NaN,t}function die(e,t,r,n,i){rH(e[0],t,i,r,n,0),rH(e[1],t,i,r,n,1)}function rH(e,t,r,n,i,a){e[0]=1/0,e[1]=-1/0;var o=n[a],s=oe(o)?o:[o],l=s.length,u=!!r;if(l>=1?(nH(e,t,s,u,i,a,0),l>1&&nH(e,t,s,u,i,a,l-1)):e[0]=e[1]=NaN,u){var c=-i[Ge[1-a]].getLocatorCount(a),f=i[Ge[a]].getLocatorCount(a)-1;r===Ns.body?c=pr(0,c):r===Ns.corner&&(f=Ii(-1,f)),f<c&&(c=f=NaN),xn(e[0])&&(e[0]=c),xn(e[1])&&(e[1]=f),e[0]=pr(Ii(e[0],f),c),e[1]=pr(Ii(e[1],f),c)}}function nH(e,t,r,n,i,a,o){var s=$O(r[o],i,a);if(!s){e[0]=e[1]=NaN;return}var l=s.id[Ge[a]],u=l,c=HZe(s);c&&(u+=c.span[Ge[a]]-1),e[0]=Ii(e[0],l,u),e[1]=pr(e[1],l,u)}function L_(e,t){return xn(e[t][0])||xn(e[t][1])}function iH(e,t,r,n){t=t||VZe;for(var i=0;i<n;i++)t[i]=!1;for(;;){for(var a=!1,i=0;i<n;i++){var o=r[i];!t[i]&&o.cellMergeOwner&&GZe(e,o.locatorRange)&&(t[i]=!0,a=!0)}if(!a)break}}var VZe=[];function GZe(e,t){return!aH(e[0],t[0])||!aH(e[1],t[1])?!1:(e[0][0]=Ii(e[0][0],t[0][0]),e[0][1]=pr(e[0][1],t[0][1]),e[1][0]=Ii(e[1][0],t[1][0]),e[1][1]=pr(e[1][1],t[1][1]),!0)}function aH(e,t){return e[1]>=t[0]&&e[0]<=t[1]}function oH(e,t){e.id.set(t[0][0],t[1][0]),e.span.set(t[0][1]-e.id.x+1,t[1][1]-e.id.y+1)}function WZe(e,t){e[0][0]=t[0][0],e[0][1]=t[0][1],e[1][0]=t[1][0],e[1][1]=t[1][1]}function sH(e,t,r,n){var i=$O(t[n][0],r,n),a=$O(t[n][1],r,n);e[Ge[n]]=e[Ar[n]]=NaN,i&&a&&(e[Ge[n]]=i.xy,e[Ar[n]]=a.xy+a.wh-i.xy)}function ag(e,t,r,n){return e[Ge[t]]=r,e[Ge[1-t]]=n,e}function HZe(e){return e&&(e.type===gs.leaf||e.type===gs.nonLeaf)?e:null}function eS(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var lH=function(){function e(t,r){this._cells=[],this._levels=[],this.dim=t,this.dimIdx=t==="x"?0:1,this._model=r,this._uniqueValueGen=UZe(t);var n=r.get("data",!0);n!=null&&!oe(n)&&(n=[]),n?this._initByDimModelData(n):this._initBySeriesData()}return e.prototype._initByDimModelData=function(t){var r=this,n=r._cells,i=r._levels,a=[],o=0;r._leavesCount=s(t,0,0),l();return;function s(u,c,f){var h=0;return u&&R(u,function(d,v){var m;ye(d)?m={value:d}:Ee(d)?(m=d,d.value!=null&&!ye(d.value)&&(m={value:null})):m={value:null};var y={type:gs.nonLeaf,ordinal:NaN,level:f,firstLeafLocator:c,id:new Ne,span:ag(new Ne,r.dimIdx,1,1),option:m,xy:NaN,wh:NaN,dim:r,rect:eS()};o++,(a[c]||(a[c]=[])).push(y),i[f]||(i[f]={type:gs.level,xy:NaN,wh:NaN,option:null,id:new Ne,dim:r});var x=s(m.children,c,f+1),_=Math.max(1,x);y.span[Ge[r.dimIdx]]=_,h+=_,c+=_}),h}function l(){for(var u=[];n.length<o;)for(var c=0;c<a.length;c++){var f=a[c].pop();if(f){f.ordinal=u.length;var h=f.option.value;u.push(h),n.push(f),r._uniqueValueGen.calcDupBase(h)}}r._uniqueValueGen.ensureValueUnique(u,n);var d=r._ordinalMeta=new Iy({categories:u,needCollect:!1,deduplication:!1});r._scale=new iv({ordinalMeta:d});for(var v=0;v<r._leavesCount;v++){var m=r._cells[v];m.type=gs.leaf,m.span[Ge[1-r.dimIdx]]=r._levels.length-m.level}r._initCellsId(),r._initLevelIdOptions()}},e.prototype._initBySeriesData=function(){var t=this;t._leavesCount=0,t._levels=[{type:gs.level,xy:NaN,wh:NaN,option:null,id:new Ne,dim:t}],t._initLevelIdOptions();var r=t._ordinalMeta=new Iy({needCollect:!0,deduplication:!0,onCollect:function(n,i){var a=t._cells[i]={type:gs.leaf,ordinal:i,level:0,firstLeafLocator:i,id:new Ne,span:ag(new Ne,t.dimIdx,1,1),option:{value:n+""},xy:NaN,wh:NaN,dim:t,rect:eS()};t._leavesCount++,t._setCellId(a)}});t._scale=new iv({ordinalMeta:r})},e.prototype._setCellId=function(t){var r=this._levels.length,n=this.dimIdx;ag(t.id,n,t.firstLeafLocator,t.level-r)},e.prototype._initCellsId=function(){var t=this._levels.length,r=this.dimIdx;R(this._cells,function(n){ag(n.id,r,n.firstLeafLocator,n.level-t)})},e.prototype._initLevelIdOptions=function(){var t=this._levels.length,r=this.dimIdx,n=this._model.get("levels",!0);n=oe(n)?n:[],R(this._levels,function(i,a){ag(i.id,r,0,a-t),i.option=n[a]})},e.prototype.shouldShow=function(){return!!this._model.getShallow("show",!0)},e.prototype.resetLayoutIterator=function(t,r,n,i){if(t=t||new Ql,r===this.dimIdx){var a=this._leavesCount,o=n!=null?Math.max(0,n):0;i=i!=null?Math.min(i,a):a,t.reset(this._cells,o,o+i)}else{var a=this._levels.length,o=n!=null?Math.max(0,n+a):0;i=i!=null?Math.min(i,a):a,t.reset(this._levels,o,o+i)}return t},e.prototype.resetCellIterator=function(t){return(t||new Ql).reset(this._cells,0)},e.prototype.resetLevelIterator=function(t){return(t||new Ql).reset(this._levels,0)},e.prototype.getLayout=function(t,r,n){var i=this.getUnitLayoutInfo(r,n);t[Ge[r]]=i?i.xy:NaN,t[Ar[r]]=i?i.wh:NaN},e.prototype.getUnitLayoutInfo=function(t,r){return t===this.dimIdx?r<this._leavesCount?this._cells[r]:void 0:this._levels[r+this._levels.length]},e.prototype.getCell=function(t){var r=this._scale.parse(t);return xn(r)?void 0:this._cells[r]},e.prototype.getLocatorCount=function(t){return t===this.dimIdx?this._leavesCount:this._levels.length},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e}();function UZe(e){var t=e.toUpperCase(),r=new RegExp("^"+t+"([0-9]+)$"),n=0;function i(s){var l;s!=null&&(l=s.match(r))&&(n=pr(n,+l[1]+1))}function a(){return""+t+n++}function o(s,l){for(var u=Ce(),c=0;c<s.length;c++){var f=s[c];(f==null||u.get(f)!=null)&&(s[c]=f=a(),l[c].option=Oe({value:f},l[c].option)),u.set(f,!0)}}return{calcDupBase:i,ensureValueUnique:o}}var uH=function(){function e(t,r,n){this._model=r,this._dims=n,this._kind=t,this._cellMergeOwnerList=[]}return e.prototype._ensureCellMap=function(){var t=this,r=t._cellMap;return r||(r=t._cellMap=Ce(),n()),r;function n(){var a=[],o=t._model.getShallow("data");o&&!oe(o)&&(o=null),R(o,function(v,m){if(!(!Ee(v)||!oe(v.coord))){var y=hie([]),x=null;if(die(y,x,v.coord,t._dims,v.coordClamp?Ns[t._kind]:Ns.none),!(L_(y,0)||L_(y,1))){var _=v&&v.mergeCells,b={id:new Ne,span:new Ne,locatorRange:y,option:v,cellMergeOwner:_};oH(b,y),a.push(b)}}});for(var s=[],l=0;l<a.length;l++){var u=a[l];if(u.cellMergeOwner){var c=u.locatorRange;iH(c,s,a,l);for(var f=0;f<l;f++)s[f]&&(a[f].cellMergeOwner=!1);if(c[0][0]!==u.id.x||c[1][0]!==u.id.y){u.cellMergeOwner=!1;var h=ae({},u.option);h.coord=null;var d={id:new Ne,span:new Ne,locatorRange:c,option:h,cellMergeOwner:!0};oH(d,c),a.push(d)}}}R(a,function(v){var m=i(v.id.x,v.id.y);if(v.cellMergeOwner&&(m.cellMergeOwner=!0,m.span=v.span,m.locatorRange=v.locatorRange,m.spanRect=eS(),t._cellMergeOwnerList.push(m)),!(!v.cellMergeOwner&&!v.option))for(var y=0;y<v.span.y;y++)for(var x=0;x<v.span.x;x++){var _=i(v.id.x+x,v.id.y+y);_.option=v.option,v.cellMergeOwner&&(_.inSpanOf=m)}})}function i(a,o){var s=cH(a,o),l=r.get(s);return l||(l=r.set(s,{id:new Ne(a,o),option:null,inSpanOf:null,span:null,spanRect:null,locatorRange:null,cellMergeOwner:!1})),l}},e.prototype.getCell=function(t){return this._ensureCellMap().get(cH(t[0],t[1]))},e.prototype.travelExistingCells=function(t){this._ensureCellMap().each(t)},e.prototype.expandRangeByCellMerge=function(t){if(!L_(t,0)&&!L_(t,1)&&t[0][0]===t[0][1]&&t[1][0]===t[1][1]){rP[0]=t[0][0],rP[1]=t[1][0];var r=this.getCell(rP),n=r&&r.inSpanOf;if(n){WZe(t,n.locatorRange);return}}var i=this._cellMergeOwnerList;iH(t,null,i,i.length)},e}(),rP=[];function cH(e,t){return e+"|"+t}var NR={show:!0,color:J.color.secondary,overflow:"break",lineOverflow:"truncate",padding:[2,3,2,3],distance:0};function jR(e){return{color:"none",borderWidth:1,borderColor:e?"none":J.color.borderTint}}var fH={show:!0,label:NR,itemStyle:jR(!1),silent:void 0,dividerLineStyle:{width:1,color:J.color.border}},ZZe={label:NR,itemStyle:jR(!1),silent:void 0},YZe={label:NR,itemStyle:jR(!0),silent:void 0},XZe={z:-50,left:"10%",top:"10%",right:"10%",bottom:"10%",x:fH,y:fH,body:ZZe,corner:YZe,backgroundStyle:{color:"none",borderColor:J.color.axisLine,borderWidth:1}},qZe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(){var r=this._dimModels={x:new hH(this.get("x",!0)||{}),y:new hH(this.get("y",!0)||{})};r.x.option.type=r.y.option.type="category";var n=r.x.dim=new lH("x",r.x),i=r.y.dim=new lH("y",r.y),a={x:n,y:i};this._body=new uH("body",new rt(this.getShallow("body")),a),this._corner=new uH("corner",new rt(this.getShallow("corner")),a)},t.prototype.getDimensionModel=function(r){return this._dimModels[r]},t.prototype.getBody=function(){return this._body},t.prototype.getCorner=function(){return this._corner},t.type="matrix",t.layoutMode="box",t.defaultOption=XZe,t}(Qe),hH=function(e){K(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getOrdinalMeta=function(){return this.dim.getOrdinalMeta()},t}(rt),I_=Math.round,KZe=0,JZe=99,QZe={normal:25,special:100},eYe={normal:50,special:125},tYe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n){this.group.removeAll();var i=this.group,a=r.coordinateSystem,o=a.getRect(),s=r.getDimensionModel("x"),l=r.getDimensionModel("y"),u=s.dim,c=l.dim;rYe(i,r,n),nYe(i,r,u,c,n);var f=r.getShallow("borderZ2",!0),h=Ae(f,JZe),d=h-1,v=r.getModel("backgroundStyle").getItemStyle(["borderWidth"]);v.lineWidth=0;var m=r.getModel("backgroundStyle").getItemStyle(["color","decal","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]);m.fill="none";var y=FO(o.clone(),v,KZe),x=FO(o.clone(),m,h);y.silent=!0,x.silent=!0,i.add(y),i.add(x);var _=u.getUnitLayoutInfo(0,0),b=c.getUnitLayoutInfo(1,0);_&&b&&(u.shouldShow()&&i.add(dH({x1:o.x,y1:b.xy,x2:o.x+o.width,y2:b.xy},s.getModel("dividerLineStyle").getLineStyle(),d)),c.shouldShow()&&i.add(dH({x1:_.xy,y1:o.y,x2:_.xy,y2:o.y+o.height},l.getModel("dividerLineStyle").getLineStyle(),d)))},t.type="matrix",t}(It);function rYe(e,t,r){n(0),n(1);function n(i){var a=t.getDimensionModel(Ge[i]),o=a.dim;if(o.shouldShow())for(var s=a.getModel("itemStyle"),l=a.getModel("label"),u=t.getShallow("tooltip",!0),c=[],f=o.resetCellIterator();f.next();){var h=f.item,d={};je.copy(d,h.rect),LT(c,h.id.x,h.id.y),vie(c,t,e,r,h.option,s,l,a,d,h.option.value,eYe,u)}}}function nYe(e,t,r,n,i){a("body",t.getBody(),r,n),r.shouldShow()&&n.shouldShow()&&a("corner",t.getCorner(),n,r);function a(o,s,l,u){var c=new rt(t.getShallow(o,!0)),f=c.getModel("itemStyle"),h=c.getModel("label"),d=new Ql,v=new Ql,m=[],y=t.getShallow("tooltip",!0);for(u.resetLayoutIterator(v,1);v.next();)for(l.resetLayoutIterator(d,0);d.next();){var x=d.item,_=v.item;LT(m,x.id.x,_.id.y);var b=s.getCell(m);if(!(b&&b.inSpanOf&&b.inSpanOf!==b)){var S={};b&&b.span?je.copy(S,b.spanRect):(x.dim.getLayout(S,0,m[0]),_.dim.getLayout(S,1,m[1]));var T=b?b.option:null;vie(m,t,e,i,T,f,h,c,S,T?T.value:null,QZe,y)}}}}function vie(e,t,r,n,i,a,o,s,l,u,c,f){var h;O_.option=i?i.itemStyle:null,O_.parentModel=a,xh.option=i,xh.parentModel=s;var d=Ae(xh.getShallow("z2"),i&&i.itemStyle?c.special:c.normal),v=f&&f.show,m=FO(l,O_.getItemStyle(),d);r.add(m);var y=xh.get("cursor");y!=null&&m.attr("cursor",y);var x;if(u!=null){var _=u+"";if(_h.option=i?i.label:null,_h.parentModel=o,_h.ecModel=n,qr(m,{normal:_h},{defaultText:_,autoOverflowArea:!0,layoutRect:Le(m.shape)}),x=m.getTextContent(),x){x.z2=d+1;var b=x.style;if(b&&b.overflow&&b.overflow!=="none"&&b.lineOverflow){var S={};je.copy(S,l),pf(S,(((h=m.style)===null||h===void 0?void 0:h.lineWidth)||0)/2,!0,!0),m.updateInnerText(),x.getLocalTransform(E_),pa(E_,E_),je.applyTransform(S,S,E_),x.setClipPath(new qe({shape:S}))}}il({el:m,componentModel:t,itemName:_,itemTooltipOption:f,formatterParamsExtra:{xyLocator:e.slice()}})}if(x){var T=_h.get("silent");T==null&&(T=!v),x.silent=T,x.ignoreHostSilent=!0}var C=xh.get("silent");C==null&&(C=!m.style||m.style.fill==="none"||!m.style.fill),m.silent=C,p2(xh),p2(O_),p2(_h)}var xh=new rt,O_=new rt,_h=new rt,E_=[];function FO(e,t,r){var n=t.lineWidth;if(n){var i=e.x+e.width,a=e.y+e.height;e.x=ki(e.x,n,!0),e.y=ki(e.y,n,!0),e.width=ki(i,n,!0)-e.x,e.height=ki(a,n,!0)-e.y}return new qe({shape:e,style:t,z2:r})}function dH(e,t,r){var n=t.lineWidth;return n&&(I_(e.x1*2)===I_(e.x2*2)&&(e.x1=e.x2=ki(e.x1,n,!0)),I_(e.y1*2)===I_(e.y2*2)&&(e.y1=e.y2=ki(e.y1,n,!0))),new mr({shape:e,style:t,silent:!0,z2:r})}var iYe=function(){function e(t,r,n){this.dimensions=e.dimensions,this.type="matrix",this._model=t;var i=this._dimModels={x:t.getDimensionModel("x"),y:t.getDimensionModel("y")};this._dims={x:i.x.dim,y:i.y.dim},this._resize(t,n)}return e.getDimensionsInfo=function(){return[{name:"x",type:"ordinal"},{name:"y",type:"ordinal"},{name:"value"}]},e.create=function(t,r){var n=[];return t.eachComponent("matrix",function(i){var a=new e(i,t,r);n.push(a),i.coordinateSystem=a}),t.eachComponent(function(i,a){_0({targetModel:a,coordSysType:"matrix",coordSysProvider:LQ})}),n},e.prototype.getRect=function(){return this._rect},e.prototype._resize=function(t,r){var n=this._dims,i=this._dimModels,a=this._rect=$t(t.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()});vH(i,n,a,0),vH(i,n,a,1),pH(0,n),pH(1,n),gH(this._model.getBody(),n),gH(this._model.getCorner(),n)},e.prototype.dataToPoint=function(t,r,n){return n=n||[],this.dataToLayout(t,r,og),n[0]=og.rect.x+og.rect.width/2,n[1]=og.rect.y+og.rect.height/2,n},e.prototype.dataToLayout=function(t,r,n){var i=this._dims;n=n||{};var a=n.rect=n.rect||{};a.x=a.y=a.width=a.height=NaN;var o=n.matrixXYLocatorRange=hie(n.matrixXYLocatorRange);return oe(t)&&(die(o,null,t,i,Ae(r&&r.clamp,Ns.none)),(!r||!r.ignoreMergeCells)&&((!r||r.clamp!==Ns.corner)&&this._model.getBody().expandRangeByCellMerge(o),(!r||r.clamp!==Ns.body)&&this._model.getCorner().expandRangeByCellMerge(o)),sH(a,o,i,0),sH(a,o,i,1)),n},e.prototype.pointToData=function(t,r,n){var i=this._dims;return mH(po,0,i,t,r&&r.clamp),mH(po,1,i,t,r&&r.clamp),n=n||[],n[0]=n[1]=NaN,po.y===pn.inCorner&&po.x===pn.inBody?yH(po,n,0,i):po.x===pn.inCorner&&po.y===pn.inBody?yH(po,n,1,i):(xH(po,n,0,i),xH(po,n,1,i)),n},e.prototype.convertToPixel=function(t,r,n,i){var a=iP(r);return a===this?a.dataToPoint(n,i):void 0},e.prototype.convertToLayout=function(t,r,n,i){var a=iP(r);return a===this?a.dataToLayout(n,i):void 0},e.prototype.convertFromPixel=function(t,r,n,i){var a=iP(r);return a===this?a.pointToData(n,i):void 0},e.prototype.containPoint=function(t){return this._rect.contain(t[0],t[1])},e.dimensions=["x","y","value"],e}(),og={rect:eS()},D_=new Ql,nP=new Ql;function vH(e,t,r,n){for(var i=1-n,a=t[Ge[n]],o=t[Ge[i]],s=o.shouldShow(),l=a.resetCellIterator();l.next();)l.item.wh=l.item.xy=NaN;for(var u=o.resetLayoutIterator(null,n);u.next();)u.item.wh=u.item.xy=NaN;for(var c=r[Ar[n]],f=a.getLocatorCount(n)+o.getLocatorCount(n),h=new rt,d=o.resetLevelIterator();d.next();)h.option=d.item.option,h.parentModel=e[Ge[i]],y(d.item,s?h.get("levelSize"):0);for(var v=new rt,m=a.resetCellIterator();m.next();)m.item.type===gs.leaf&&(v.option=m.item.option,v.parentModel=void 0,y(m.item,v.get("size")));function y(A,P){var I=aYe(P,n,r);xn(I)||(A.wh=VO(I,c),c=VO(c-A.wh),f--)}var x=f?c/f:0,_=!f&&c>=1,b=r[Ge[n]],S=a.getLocatorCount(n)-1,T=new Ql;for(o.resetLayoutIterator(T,n);T.next();)C(T.item);for(a.resetLayoutIterator(T,n);T.next();)C(T.item);function C(A){xn(A.wh)&&(A.wh=x),A.xy=b,A.id[Ge[n]]===S&&!_&&(A.wh=r[Ge[n]]+r[Ar[n]]-A.xy),b+=A.wh}}function pH(e,t){for(var r=t[Ge[e]].resetCellIterator();r.next();){var n=r.item;tS(n.rect,e,n.id,n.span,t),tS(n.rect,1-e,n.id,n.span,t),n.type===gs.nonLeaf&&(n.xy=n.rect[Ge[e]],n.wh=n.rect[Ar[e]])}}function gH(e,t){e.travelExistingCells(function(r){var n=r.span;if(n){var i=r.spanRect,a=r.id;tS(i,0,a,n,t),tS(i,1,a,n,t)}})}function tS(e,t,r,n,i){e[Ar[t]]=0;var a=r[Ge[t]],o=a<0?i[Ge[1-t]]:i[Ge[t]],s=o.getUnitLayoutInfo(t,r[Ge[t]]);if(e[Ge[t]]=s.xy,e[Ar[t]]=s.wh,n[Ge[t]]>1){var l=o.getUnitLayoutInfo(t,r[Ge[t]]+n[Ge[t]]-1);e[Ar[t]]=l.xy+l.wh-s.xy}}function aYe(e,t,r){var n=vw(e,r[Ar[t]]);return VO(n,r[Ar[t]])}function VO(e,t){return Math.max(Math.min(e,Ae(t,1/0)),0)}function iP(e){var t=e.matrixModel,r=e.seriesModel,n=t?t.coordinateSystem:r?r.coordinateSystem:null;return n}var pn={inBody:1,inCorner:2,outside:3},po={x:null,y:null,point:[]};function mH(e,t,r,n,i){var a=r[Ge[t]],o=r[Ge[1-t]],s=a.getUnitLayoutInfo(t,a.getLocatorCount(t)-1),l=a.getUnitLayoutInfo(t,0),u=o.getUnitLayoutInfo(t,-o.getLocatorCount(t)),c=o.shouldShow()?o.getUnitLayoutInfo(t,-1):null,f=e.point[t]=n[t];if(!l&&!c){e[Ge[t]]=pn.outside;return}if(i===Ns.body){l?(e[Ge[t]]=pn.inBody,f=Ii(s.xy+s.wh,pr(l.xy,f)),e.point[t]=f):e[Ge[t]]=pn.outside;return}else if(i===Ns.corner){c?(e[Ge[t]]=pn.inCorner,f=Ii(c.xy+c.wh,pr(u.xy,f)),e.point[t]=f):e[Ge[t]]=pn.outside;return}var h=l?l.xy:c?c.xy+c.wh:NaN,d=u?u.xy:h,v=s?s.xy+s.wh:h;if(f<d){if(!i){e[Ge[t]]=pn.outside;return}f=d}else if(f>v){if(!i){e[Ge[t]]=pn.outside;return}f=v}e.point[t]=f,e[Ge[t]]=h<=f&&f<=v?pn.inBody:d<=f&&f<=h?pn.inCorner:pn.outside}function yH(e,t,r,n){var i=1-r;if(e[Ge[r]]!==pn.outside)for(n[Ge[r]].resetCellIterator(nP);nP.next();){var a=nP.item;if(_H(e.point[r],a.rect,r)&&_H(e.point[i],a.rect,i)){t[r]=a.ordinal,t[i]=a.id[Ge[i]];return}}}function xH(e,t,r,n){if(e[Ge[r]]!==pn.outside){var i=e[Ge[r]]===pn.inCorner?n[Ge[1-r]]:n[Ge[r]];for(i.resetLayoutIterator(D_,r);D_.next();)if(oYe(e.point[r],D_.item)){t[r]=D_.item.id[Ge[r]];return}}}function oYe(e,t){return t.xy<=e&&e<=t.xy+t.wh}function _H(e,t,r){return t[Ge[r]]<=e&&e<=t[Ge[r]]+t[Ar[r]]}function sYe(e){e.registerComponentModel(qZe),e.registerComponentView(tYe),e.registerCoordinateSystem("matrix",iYe)}function lYe(e,t){var r=e.existing;if(t.id=e.keyInfo.id,!t.type&&r&&(t.type=r.type),t.parentId==null){var n=t.parentOption;n?t.parentId=n.id:r&&(t.parentId=r.parentId)}t.parentOption=null}function bH(e,t){var r;return R(t,function(n){e[n]!=null&&e[n]!=="auto"&&(r=!0)}),r}function uYe(e,t,r){var n=ae({},r),i=e[t],a=r.$action||"merge";a==="merge"?i?(Ue(i,n,!0),Zo(i,n,{ignoreSize:!0}),NQ(r,i),N_(r,i),N_(r,i,"shape"),N_(r,i,"style"),N_(r,i,"extra"),r.clipPath=i.clipPath):e[t]=n:a==="replace"?e[t]=n:a==="remove"&&i&&(e[t]=null)}var pie=["transition","enterFrom","leaveTo"],cYe=pie.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function N_(e,t,r){if(r&&(!e[r]&&t[r]&&(e[r]={}),e=e[r],t=t[r]),!(!e||!t))for(var n=r?pie:cYe,i=0;i<n.length;i++){var a=n[i];e[a]==null&&t[a]!=null&&(e[a]=t[a])}}function fYe(e,t){if(e&&(e.hv=t.hv=[bH(t,["left","right"]),bH(t,["top","bottom"])],e.type==="group")){var r=e,n=t;r.width==null&&(r.width=n.width=0),r.height==null&&(r.height=n.height=0)}}var hYe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.preventAutoZ=!0,r}return t.prototype.mergeOption=function(r,n){var i=this.option.elements;this.option.elements=null,e.prototype.mergeOption.call(this,r,n),this.option.elements=i},t.prototype.optionUpdated=function(r,n){var i=this.option,a=(n?i:r).elements,o=i.elements=n?[]:i.elements,s=[];this._flatten(a,s,null);var l=CJ(o,s,"normalMerge"),u=this._elOptionsToUpdate=[];R(l,function(c,f){var h=c.newOption;h&&(u.push(h),lYe(c,h),uYe(o,f,h),fYe(o[f],h))},this),i.elements=dt(o,function(c){return c&&delete c.$action,c!=null})},t.prototype._flatten=function(r,n,i){R(r,function(a){if(a){i&&(a.parentOption=i),n.push(a);var o=a.children;o&&o.length&&this._flatten(o,n,a),delete a.children}},this)},t.prototype.useElOptionsToUpdate=function(){var r=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,r},t.type="graphic",t.defaultOption={elements:[]},t}(Qe),wH={path:null,compoundPath:null,group:Ie,image:Jr,text:ot},Ki=et(),dYe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(){this._elMap=Ce()},t.prototype.render=function(r,n,i){r!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=r,this._updateElements(r),this._relocate(r,i)},t.prototype._updateElements=function(r){var n=r.useElOptionsToUpdate();if(n){var i=this._elMap,a=this.group,o=r.get("z"),s=r.get("zlevel");R(n,function(l){var u=Dr(l.id,null),c=u!=null?i.get(u):null,f=Dr(l.parentId,null),h=f!=null?i.get(f):a,d=l.type,v=l.style;d==="text"&&v&&l.hv&&l.hv[1]&&(v.textVerticalAlign=v.textBaseline=v.verticalAlign=v.align=null);var m=l.textContent,y=l.textConfig;if(v&&Une(v,d,!!y,!!m)){var x=Zne(v,d,!0);!y&&x.textConfig&&(y=l.textConfig=x.textConfig),!m&&x.textContent&&(m=x.textContent)}var _=vYe(l),b=l.$action||"merge",S=b==="merge",T=b==="replace";if(S){var C=!c,A=c;C?A=SH(u,h,l.type,i):(A&&(Ki(A).isNew=!1),Kne(A)),A&&(xb(A,_,r,{isInit:C}),TH(A,l,o,s))}else if(T){wb(c,l,i,r);var P=SH(u,h,l.type,i);P&&(xb(P,_,r,{isInit:!0}),TH(P,l,o,s))}else b==="remove"&&(Xne(c,l),wb(c,l,i,r));var I=i.get(u);if(I&&m)if(S){var k=I.getTextContent();k?k.attr(m):I.setTextContent(new ot(m))}else T&&I.setTextContent(new ot(m));if(I){var E=l.clipPath;if(E){var D=E.type,N=void 0,C=!1;if(S){var z=I.getClipPath();C=!z||Ki(z).type!==D,N=C?GO(D):z}else T&&(C=!0,N=GO(D));I.setClipPath(N),xb(N,E,r,{isInit:C}),Kw(N,E.keyframeAnimation,r)}var V=Ki(I);I.setTextConfig(y),V.option=l,pYe(I,r,l),il({el:I,componentModel:r,itemName:I.name,itemTooltipOption:l.tooltip}),Kw(I,l.keyframeAnimation,r)}})}},t.prototype._relocate=function(r,n){for(var i=r.option.elements,a=this.group,o=this._elMap,s=n.getWidth(),l=n.getHeight(),u=["x","y"],c=0;c<i.length;c++){var f=i[c],h=Dr(f.id,null),d=h!=null?o.get(h):null;if(!(!d||!d.isGroup)){var v=d.parent,m=v===a,y=Ki(d),x=Ki(v);y.width=me(y.option.width,m?s:x.width)||0,y.height=me(y.option.height,m?l:x.height)||0}}for(var c=i.length-1;c>=0;c--){var f=i[c],h=Dr(f.id,null),d=h!=null?o.get(h):null;if(d){var v=d.parent,x=Ki(v),_=v===a?{width:s,height:l}:{width:x.width,height:x.height},b={},S=ZT(d,f,_,null,{hv:f.hv,boundingMode:f.bounding},b);if(!Ki(d).isNew&&S){for(var T=f.transition,C={},A=0;A<u.length;A++){var P=u[A],I=b[P];T&&(Kc(T)||He(T,P)>=0)?C[P]=I:d[P]=I}ut(d,C,r,0)}else d.attr(b)}}},t.prototype._clear=function(){var r=this,n=this._elMap;n.each(function(i){wb(i,Ki(i).option,n,r._lastGraphicModel)}),this._elMap=Ce()},t.prototype.dispose=function(){this._clear()},t.type="graphic",t}(It);function GO(e){var t=Se(wH,e)?wH[e]:Sy(e),r=new t({});return Ki(r).type=e,r}function SH(e,t,r,n){var i=GO(r);return t.add(i),n.set(e,i),Ki(i).id=e,Ki(i).isNew=!0,i}function wb(e,t,r,n){var i=e&&e.parent;i&&(e.type==="group"&&e.traverse(function(a){wb(a,t,r,n)}),uC(e,t,n),r.removeKey(Ki(e).id))}function TH(e,t,r,n){e.isGroup||R([["cursor",ga.prototype.cursor],["zlevel",n||0],["z",r||0],["z2",0]],function(i){var a=i[0];Se(t,a)?e[a]=Ae(t[a],i[1]):e[a]==null&&(e[a]=i[1])}),R(at(t),function(i){if(i.indexOf("on")===0){var a=t[i];e[i]=ke(a)?a:null}}),Se(t,"draggable")&&(e.draggable=t.draggable),t.name!=null&&(e.name=t.name),t.id!=null&&(e.id=t.id)}function vYe(e){return e=ae({},e),R(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(IQ),function(t){delete e[t]}),e}function pYe(e,t,r){var n=ze(e).eventData;!e.silent&&!e.ignore&&!n&&(n=ze(e).eventData={componentType:"graphic",componentIndex:t.componentIndex,name:e.name}),n&&(n.info=r.info)}function gYe(e){e.registerComponentModel(hYe),e.registerComponentView(dYe),e.registerPreprocessor(function(t){var r=t.graphic;oe(r)?!r[0]||!r[0].elements?t.graphic=[{elements:r}]:t.graphic=[t.graphic[0]]:r&&!r.elements&&(t.graphic=[{elements:[r]}])})}var CH=["x","y","radius","angle","single"],mYe=["cartesian2d","polar","singleAxis"];function yYe(e){var t=e.get("coordinateSystem");return He(mYe,t)>=0}function $l(e){return e+"Axis"}function xYe(e,t){var r=Ce(),n=[],i=Ce();e.eachComponent({mainType:"dataZoom",query:t},function(c){i.get(c.uid)||s(c)});var a;do a=!1,e.eachComponent("dataZoom",o);while(a);function o(c){!i.get(c.uid)&&l(c)&&(s(c),a=!0)}function s(c){i.set(c.uid,!0),n.push(c),u(c)}function l(c){var f=!1;return c.eachTargetAxis(function(h,d){var v=r.get(h);v&&v[d]&&(f=!0)}),f}function u(c){c.eachTargetAxis(function(f,h){(r.get(f)||r.set(f,[]))[h]=!0})}return n}function gie(e){var t=e.ecModel,r={infoList:[],infoMap:Ce()};return e.eachTargetAxis(function(n,i){var a=t.getComponent($l(n),i);if(a){var o=a.getCoordSysModel();if(o){var s=o.uid,l=r.infoMap.get(s);l||(l={model:o,axisModels:[]},r.infoList.push(l),r.infoMap.set(s,l)),l.axisModels.push(a)}}}),r}var aP=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},e}(),Vy=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._autoThrottle=!0,r._noTarget=!0,r._rangePropMode=["percent","percent"],r}return t.prototype.init=function(r,n,i){var a=AH(r);this.settledOption=a,this.mergeDefaultAndTheme(r,i),this._doInit(a)},t.prototype.mergeOption=function(r){var n=AH(r);Ue(this.option,r,!0),Ue(this.settledOption,n,!0),this._doInit(n)},t.prototype._doInit=function(r){var n=this.option;this._setDefaultThrottle(r),this._updateRangeUse(r);var i=this.settledOption;R([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(n[a[0]]=i[a[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var r=this.get("orient",!0),n=this._targetAxisInfoMap=Ce(),i=this._fillSpecifiedTargetAxis(n);i?this._orient=r||this._makeAutoOrientByTargetAxis():(this._orient=r||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(r){var n=!1;return R(CH,function(i){var a=this.getReferringComponents($l(i),RRe);if(a.specified){n=!0;var o=new aP;R(a.models,function(s){o.add(s.componentIndex)}),r.set(i,o)}},this),n},t.prototype._fillAutoTargetAxisByOrient=function(r,n){var i=this.ecModel,a=!0;if(a){var o=n==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=i.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===n}});l(s,"single")}function l(u,c){var f=u[0];if(f){var h=new aP;if(h.add(f.componentIndex),r.set(c,h),a=!1,c==="x"||c==="y"){var d=f.getReferringComponents("grid",tr).models[0];d&&R(u,function(v){f.componentIndex!==v.componentIndex&&d===v.getReferringComponents("grid",tr).models[0]&&h.add(v.componentIndex)})}}}a&&R(CH,function(u){if(a){var c=i.findComponents({mainType:$l(u),filter:function(h){return h.get("type",!0)==="category"}});if(c[0]){var f=new aP;f.add(c[0].componentIndex),r.set(u,f),a=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var r;return this.eachTargetAxis(function(n){!r&&(r=n)},this),r==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(r){if(r.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(r){var n=this._rangePropMode,i=this.get("rangeMode");R([["start","startValue"],["end","endValue"]],function(a,o){var s=r[a[0]]!=null,l=r[a[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":i?n[o]=i[o]:s&&(n[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var r;return this.eachTargetAxis(function(n,i){r==null&&(r=this.ecModel.getComponent($l(n),i))},this),r},t.prototype.eachTargetAxis=function(r,n){this._targetAxisInfoMap.each(function(i,a){R(i.indexList,function(o){r.call(n,a,o)})})},t.prototype.getAxisProxy=function(r,n){var i=this.getAxisModel(r,n);if(i)return i.__dzAxisProxy},t.prototype.getAxisModel=function(r,n){var i=this._targetAxisInfoMap.get(r);if(i&&i.indexMap[n])return this.ecModel.getComponent($l(r),n)},t.prototype.setRawRange=function(r){var n=this.option,i=this.settledOption;R([["start","startValue"],["end","endValue"]],function(a){(r[a[0]]!=null||r[a[1]]!=null)&&(n[a[0]]=i[a[0]]=r[a[0]],n[a[1]]=i[a[1]]=r[a[1]])},this),this._updateRangeUse(r)},t.prototype.setCalculatedRange=function(r){var n=this.option;R(["start","startValue","end","endValue"],function(i){n[i]=r[i]})},t.prototype.getPercentRange=function(){var r=this.findRepresentativeAxisProxy();if(r)return r.getDataPercentWindow()},t.prototype.getValueRange=function(r,n){if(r==null&&n==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(r,n).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(r){if(r)return r.__dzAxisProxy;for(var n,i=this._targetAxisInfoMap.keys(),a=0;a<i.length;a++)for(var o=i[a],s=this._targetAxisInfoMap.get(o),l=0;l<s.indexList.length;l++){var u=this.getAxisProxy(o,s.indexList[l]);if(u.hostedBy(this))return u;n||(n=u)}return n},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return this._orient},t.type="dataZoom",t.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],t.defaultOption={z:4,filterMode:"filter",start:0,end:100},t}(Qe);function AH(e){var t={};return R(["start","end","startValue","endValue","throttle"],function(r){e.hasOwnProperty(r)&&(t[r]=e[r])}),t}var _Ye=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="dataZoom.select",t}(Vy),RR=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i,a){this.dataZoomModel=r,this.ecModel=n,this.api=i},t.type="dataZoom",t}(It),bYe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="dataZoom.select",t}(RR),kh=R,MH=Mi,wYe=function(){function e(t,r,n,i){this._dimName=t,this._axisIndex=r,this.ecModel=i,this._dataZoomModel=n}return e.prototype.hostedBy=function(t){return this._dataZoomModel===t},e.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},e.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},e.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries(function(r){if(yYe(r)){var n=$l(this._dimName),i=r.getReferringComponents(n,tr).models[0];i&&this._axisIndex===i.componentIndex&&t.push(r)}},this),t},e.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},e.prototype.getMinMaxSpan=function(){return Le(this._minMaxSpan)},e.prototype.calculateDataWindow=function(t){var r=this._dataExtent,n=this.getAxisModel(),i=n.axis.scale,a=this._dataZoomModel.getRangePropMode(),o=[0,100],s=[],l=[],u;kh(["start","end"],function(h,d){var v=t[h],m=t[h+"Value"];a[d]==="percent"?(v==null&&(v=o[d]),m=i.parse(gt(v,o,r))):(u=!0,m=m==null?r[d]:i.parse(m),v=gt(m,r,o)),l[d]=m==null||isNaN(m)?r[d]:m,s[d]=v==null||isNaN(v)?o[d]:v}),MH(l),MH(s);var c=this._minMaxSpan;u?f(l,s,r,o,!1):f(s,l,o,r,!0);function f(h,d,v,m,y){var x=y?"Span":"ValueSpan";vu(0,h,v,"all",c["min"+x],c["max"+x]);for(var _=0;_<2;_++)d[_]=gt(h[_],v,m,!0),y&&(d[_]=i.parse(d[_]))}return{valueWindow:l,percentWindow:s}},e.prototype.reset=function(t){if(t===this._dataZoomModel){var r=this.getTargetSeriesModels();this._dataExtent=SYe(this,this._dimName,r),this._updateMinMaxSpan();var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},e.prototype.filterData=function(t,r){if(t!==this._dataZoomModel)return;var n=this._dimName,i=this.getTargetSeriesModels(),a=t.get("filterMode"),o=this._valueWindow;if(a==="none")return;kh(i,function(l){var u=l.getData(),c=u.mapDimensionsAll(n);if(c.length){if(a==="weakFilter"){var f=u.getStore(),h=le(c,function(d){return u.getDimensionIndex(d)},u);u.filterSelf(function(d){for(var v,m,y,x=0;x<c.length;x++){var _=f.get(h[x],d),b=!isNaN(_),S=_<o[0],T=_>o[1];if(b&&!S&&!T)return!0;b&&(y=!0),S&&(v=!0),T&&(m=!0)}return y&&v&&m})}else kh(c,function(d){if(a==="empty")l.setData(u=u.map(d,function(m){return s(m)?m:NaN}));else{var v={};v[d]=o,u.selectRange(v)}});kh(c,function(d){u.setApproximateExtent(o,d)})}});function s(l){return l>=o[0]&&l<=o[1]}},e.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},r=this._dataZoomModel,n=this._dataExtent;kh(["min","max"],function(i){var a=r.get(i+"Span"),o=r.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=gt(n[0]+o,n,[0,100],!0):a!=null&&(o=gt(a,[0,100],n,!0)-n[0]),t[i+"Span"]=a,t[i+"ValueSpan"]=o},this)},e.prototype._setAxisModel=function(){var t=this.getAxisModel(),r=this._percentWindow,n=this._valueWindow;if(r){var i=AN(n,[0,500]);i=Math.min(i,20);var a=t.axis.scale.rawExtentInfo;r[0]!==0&&a.setDeterminedMinMax("min",+n[0].toFixed(i)),r[1]!==100&&a.setDeterminedMinMax("max",+n[1].toFixed(i)),a.freeze()}},e}();function SYe(e,t,r){var n=[1/0,-1/0];kh(r,function(o){F$e(n,o.getData(),t)});var i=e.getAxisModel(),a=pte(i.axis.scale,i,n).calculate();return[a.min,a.max]}var TYe={getTargetSeries:function(e){function t(i){e.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=e.getComponent($l(o),s);i(o,s,l,a)})})}t(function(i,a,o,s){o.__dzAxisProxy=null});var r=[];t(function(i,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new wYe(i,a,s,e),r.push(o.__dzAxisProxy))});var n=Ce();return R(r,function(i){R(i.getTargetSeriesModels(),function(a){n.set(a.uid,a)})}),n},overallReset:function(e,t){e.eachComponent("dataZoom",function(r){r.eachTargetAxis(function(n,i){r.getAxisProxy(n,i).reset(r)}),r.eachTargetAxis(function(n,i){r.getAxisProxy(n,i).filterData(r,t)})}),e.eachComponent("dataZoom",function(r){var n=r.findRepresentativeAxisProxy();if(n){var i=n.getDataPercentWindow(),a=n.getDataValueWindow();r.setCalculatedRange({start:i[0],end:i[1],startValue:a[0],endValue:a[1]})}})}};function CYe(e){e.registerAction("dataZoom",function(t,r){var n=xYe(r,t);R(n,function(i){i.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var PH=!1;function BR(e){PH||(PH=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,TYe),CYe(e),e.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function AYe(e){e.registerComponentModel(_Ye),e.registerComponentView(bYe),BR(e)}var ta=function(){function e(){}return e}(),mie={};function Lh(e,t){mie[e]=t}function yie(e){return mie[e]}var MYe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(){e.prototype.optionUpdated.apply(this,arguments);var r=this.ecModel;R(this.option.feature,function(n,i){var a=yie(i);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(r)),Ue(n,a.defaultOption))})},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:J.color.border,borderRadius:0,borderWidth:0,padding:J.size.m,itemSize:15,itemGap:J.size.s,showTitle:!0,iconStyle:{borderColor:J.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:J.color.accent50}},tooltip:{show:!1,position:"bottom"}},t}(Qe);function xie(e,t){var r=Uv(t.get("padding")),n=t.getItemStyle(["color","opacity"]);n.fill=t.get("backgroundColor");var i=new qe({shape:{x:e.x-r[3],y:e.y-r[0],width:e.width+r[1]+r[3],height:e.height+r[0]+r[2],r:t.get("borderRadius")},style:n,silent:!0,z2:-1});return i}var PYe=function(e){K(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(r,n,i,a){var o=this.group;if(o.removeAll(),!r.get("show"))return;var s=+r.get("itemSize"),l=r.get("orient")==="vertical",u=r.get("feature")||{},c=this._features||(this._features={}),f=[];R(u,function(_,b){f.push(b)}),new Ys(this._featureNames||[],f).add(h).update(h).remove(We(h,null)).execute(),this._featureNames=f;function h(_,b){var S=f[_],T=f[b],C=u[S],A=new rt(C,r,r.ecModel),P;if(a&&a.newTitle!=null&&a.featureName===S&&(C.title=a.newTitle),S&&!T){if(kYe(S))P={onclick:A.option.onclick,featureName:S};else{var I=yie(S);if(!I)return;P=new I}c[S]=P}else if(P=c[T],!P)return;P.uid=Hv("toolbox-feature"),P.model=A,P.ecModel=n,P.api=i;var k=P instanceof ta;if(!S&&T){k&&P.dispose&&P.dispose(n,i);return}if(!A.get("show")||k&&P.unusable){k&&P.remove&&P.remove(n,i);return}d(A,P,S),A.setIconStatus=function(E,D){var N=this.option,z=this.iconPaths;N.iconStatus=N.iconStatus||{},N.iconStatus[E]=D,z[E]&&(D==="emphasis"?Us:Zs)(z[E])},P instanceof ta&&P.render&&P.render(A,n,i,a)}function d(_,b,S){var T=_.getModel("iconStyle"),C=_.getModel(["emphasis","iconStyle"]),A=b instanceof ta&&b.getIcons?b.getIcons():_.get("icon"),P=_.get("title")||{},I,k;ye(A)?(I={},I[S]=A):I=A,ye(P)?(k={},k[S]=P):k=P;var E=_.iconPaths={};R(I,function(D,N){var z=Gv(D,{},{x:-s/2,y:-s/2,width:s,height:s});z.setStyle(T.getItemStyle());var V=z.ensureState("emphasis");V.style=C.getItemStyle();var F=new ot({style:{text:k[N],align:C.get("textAlign"),borderRadius:C.get("textBorderRadius"),padding:C.get("textPadding"),fill:null,font:XN({fontStyle:C.get("textFontStyle"),fontFamily:C.get("textFontFamily"),fontSize:C.get("textFontSize"),fontWeight:C.get("textFontWeight")},n)},ignore:!0});z.setTextContent(F),il({el:z,componentModel:r,itemName:N,formatterParamsExtra:{title:k[N]}}),z.__title=k[N],z.on("mouseover",function(){var $=C.getItemStyle(),B=l?r.get("right")==null&&r.get("left")!=="right"?"right":"left":r.get("bottom")==null&&r.get("top")!=="bottom"?"bottom":"top";F.setStyle({fill:C.get("textFill")||$.fill||$.stroke||J.color.neutral99,backgroundColor:C.get("textBackgroundColor")}),z.setTextConfig({position:C.get("textPosition")||B}),F.ignore=!r.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){_.get(["iconStatus",N])!=="emphasis"&&i.leaveEmphasis(this),F.hide()}),(_.get(["iconStatus",N])==="emphasis"?Us:Zs)(z),o.add(z),z.on("click",_e(b.onclick,b,n,i,N)),E[N]=z})}var v=zr(r,i).refContainer,m=r.getBoxLayoutParams(),y=r.get("padding"),x=$t(m,v,y);Yc(r.get("orient"),o,r.get("itemGap"),x.width,x.height),ZT(o,m,v,y),o.add(xie(o.getBoundingRect(),r)),l||o.eachChild(function(_){var b=_.__title,S=_.ensureState("emphasis"),T=S.textConfig||(S.textConfig={}),C=_.getTextContent(),A=C&&C.ensureState("emphasis");if(A&&!ke(A)&&b){var P=A.style||(A.style={}),I=ET(b,ot.makeFont(P)),k=_.x+o.x,E=_.y+o.y+s,D=!1;E+I.height>i.getHeight()&&(T.position="top",D=!0);var N=D?-5-I.height:s+10;k+I.width/2>i.getWidth()?(T.position=["100%",N],P.align="right"):k-I.width/2<0&&(T.position=[0,N],P.align="left")}})},t.prototype.updateView=function(r,n,i,a){R(this._features,function(o){o instanceof ta&&o.updateView&&o.updateView(o.model,n,i,a)})},t.prototype.remove=function(r,n){R(this._features,function(i){i instanceof ta&&i.remove&&i.remove(r,n)}),this.group.removeAll()},t.prototype.dispose=function(r,n){R(this._features,function(i){i instanceof ta&&i.dispose&&i.dispose(r,n)})},t.type="toolbox",t}(It);function kYe(e){return e.indexOf("my")===0}var LYe=function(e){K(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(r,n){var i=this.model,a=i.get("name")||r.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":i.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:i.get("backgroundColor",!0)||r.get("backgroundColor")||J.color.neutral00,connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),u=it.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=a+"."+s,c.target="_blank",c.href=l;var f=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(f)}else if(window.navigator.msSaveOrOpenBlob||o){var h=l.split(","),d=h[0].indexOf("base64")>-1,v=o?decodeURIComponent(h[1]):h[1];d&&(v=window.atob(v));var m=a+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var y=v.length,x=new Uint8Array(y);y--;)x[y]=v.charCodeAt(y);var _=new Blob([x]);window.navigator.msSaveOrOpenBlob(_,m)}else{var b=document.createElement("iframe");document.body.appendChild(b);var S=b.contentWindow,T=S.document;T.open("image/svg+xml","replace"),T.write(v),T.close(),S.focus(),T.execCommand("SaveAs",!0,m),document.body.removeChild(b)}}else{var C=i.get("lang"),A='<body style="margin:0;"><img src="'+l+'" style="max-width:100%;" title="'+(C&&C[0]||"")+'" /></body>',P=window.open();P.document.write(A),P.document.title=a}},t.getDefaultOption=function(r){var n={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:r.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:J.color.neutral00,name:"",excludeComponents:["toolbox"],lang:r.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},t}(ta),kH="__ec_magicType_stack__",IYe=[["line","bar"],["stack"]],OYe=function(e){K(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getIcons=function(){var r=this.model,n=r.get("icon"),i={};return R(r.get("type"),function(a){n[a]&&(i[a]=n[a])}),i},t.getDefaultOption=function(r){var n={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:r.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},t.prototype.onclick=function(r,n,i){var a=this.model,o=a.get(["seriesIndex",i]);if(LH[i]){var s={series:[]},l=function(f){var h=f.subType,d=f.id,v=LH[i](h,d,f,a);v&&(Oe(v,f.option),s.series.push(v));var m=f.coordinateSystem;if(m&&m.type==="cartesian2d"&&(i==="line"||i==="bar")){var y=m.getAxesByScale("ordinal")[0];if(y){var x=y.dim,_=x+"Axis",b=f.getReferringComponents(_,tr).models[0],S=b.componentIndex;s[_]=s[_]||[];for(var T=0;T<=S;T++)s[_][S]=s[_][S]||{};s[_][S].boundaryGap=i==="bar"}}};R(IYe,function(f){He(f,i)>=0&&R(f,function(h){a.setIconStatus(h,"normal")})}),a.setIconStatus(i,"emphasis"),r.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=i;i==="stack"&&(u=Ue({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",i])!=="emphasis"&&(c="tiled")),n.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},t}(ta),LH={line:function(e,t,r,n){if(e==="bar")return Ue({id:t,type:"line",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(e,t,r,n){if(e==="line")return Ue({id:t,type:"bar",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(e,t,r,n){var i=r.get("stack")===kH;if(e==="line"||e==="bar")return n.setIconStatus("stack",i?"normal":"emphasis"),Ue({id:t,stack:i?"":kH},n.get(["option","stack"])||{},!0)}};ro({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(e,t){t.mergeOption(e.newOption)});var cC=new Array(60).join("-"),fv=" ";function EYe(e){var t={},r=[],n=[];return e.eachRawSeries(function(i){var a=i.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var o=a.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;t[s]||(t[s]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),t[s].series.push(i)}else r.push(i)}else r.push(i)}),{seriesGroupByCategoryAxis:t,other:r,meta:n}}function DYe(e){var t=[];return R(e,function(r,n){var i=r.categoryAxis,a=r.valueAxis,o=a.dim,s=[" "].concat(le(r.series,function(d){return d.name})),l=[i.model.getCategories()];R(r.series,function(d){var v=d.getRawData();l.push(d.getRawData().mapArray(v.mapDimension(o),function(m){return m}))});for(var u=[s.join(fv)],c=0;c<l[0].length;c++){for(var f=[],h=0;h<l.length;h++)f.push(l[h][c]);u.push(f.join(fv))}t.push(u.join(`
`))}),t.join(`
`+cC+`
`)}function NYe(e){return le(e,function(t){var r=t.getRawData(),n=[t.name],i=[];return r.each(r.dimensions,function(){for(var a=arguments.length,o=arguments[a-1],s=r.getName(o),l=0;l<a-1;l++)i[l]=arguments[l];n.push((s?s+fv:"")+i.join(fv))}),n.join(`
`)}).join(`
`+cC+`
`)}function jYe(e){var t=EYe(e);return{value:dt([DYe(t.seriesGroupByCategoryAxis),NYe(t.other)],function(r){return!!r.replace(/[\n\t\s]/g,"")}).join(`
`+cC+`
`),meta:t.meta}}function rS(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function RYe(e){var t=e.slice(0,e.indexOf(`
`));if(t.indexOf(fv)>=0)return!0}var WO=new RegExp("["+fv+"]+","g");function BYe(e){for(var t=e.split(/\n+/g),r=rS(t.shift()).split(WO),n=[],i=le(r,function(l){return{name:l,data:[]}}),a=0;a<t.length;a++){var o=rS(t[a]).split(WO);n.push(o.shift());for(var s=0;s<o.length;s++)i[s]&&(i[s].data[a]=o[s])}return{series:i,categories:n}}function zYe(e){for(var t=e.split(/\n+/g),r=rS(t.shift()),n=[],i=0;i<t.length;i++){var a=rS(t[i]);if(a){var o=a.split(WO),s="",l=void 0,u=!1;isNaN(o[0])?(u=!0,s=o[0],o=o.slice(1),n[i]={name:s,value:[]},l=n[i].value):l=n[i]=[];for(var c=0;c<o.length;c++)l.push(+o[c]);l.length===1&&(u?n[i].value=l[0]:n[i]=l[0])}}return{name:r,data:n}}function $Ye(e,t){var r=e.split(new RegExp(`
*`+cC+`
*`,"g")),n={series:[]};return R(r,function(i,a){if(RYe(i)){var o=BYe(i),s=t[a],l=s.axisDim+"Axis";s&&(n[l]=n[l]||[],n[l][s.axisIndex]={data:o.categories},n.series=n.series.concat(o.series))}else{var o=zYe(i);n.series.push(o)}}),n}var FYe=function(e){K(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(r,n){setTimeout(function(){n.dispatchAction({type:"hideTip"})});var i=n.getDom(),a=this.model;this._dom&&i.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",o.style.backgroundColor=a.get("backgroundColor")||J.color.neutral00;var s=document.createElement("h4"),l=a.get("lang")||[];s.innerHTML=l[0]||a.get("title"),s.style.cssText="margin:10px 20px",s.style.color=a.get("textColor");var u=document.createElement("div"),c=document.createElement("textarea");u.style.cssText="overflow:auto";var f=a.get("optionToContent"),h=a.get("contentToOption"),d=jYe(r);if(ke(f)){var v=f(n.getOption());ye(v)?u.innerHTML=v:cf(v)&&u.appendChild(v)}else{c.readOnly=a.get("readOnly");var m=c.style;m.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",m.color=a.get("textColor"),m.borderColor=a.get("textareaBorderColor"),m.backgroundColor=a.get("textareaColor"),c.value=d.value,u.appendChild(c)}var y=d.meta,x=document.createElement("div");x.style.cssText="position:absolute;bottom:5px;left:0;right:0";var _="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",b=document.createElement("div"),S=document.createElement("div");_+=";background-color:"+a.get("buttonColor"),_+=";color:"+a.get("buttonTextColor");var T=this;function C(){i.removeChild(o),T._dom=null}eI(b,"click",C),eI(S,"click",function(){if(h==null&&f!=null||h!=null&&f==null){C();return}var A;try{ke(h)?A=h(u,n.getOption()):A=$Ye(c.value,y)}catch(P){throw C(),new Error("Data view format error "+P)}A&&n.dispatchAction({type:"changeDataView",newOption:A}),C()}),b.innerHTML=l[1],S.innerHTML=l[2],S.style.cssText=b.style.cssText=_,!a.get("readOnly")&&x.appendChild(S),x.appendChild(b),o.appendChild(s),o.appendChild(u),o.appendChild(x),u.style.height=i.clientHeight-80+"px",i.appendChild(o),this._dom=o},t.prototype.remove=function(r,n){this._dom&&n.getDom().removeChild(this._dom)},t.prototype.dispose=function(r,n){this.remove(r,n)},t.getDefaultOption=function(r){var n={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:r.getLocaleModel().get(["toolbox","dataView","title"]),lang:r.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:J.color.background,textColor:J.color.primary,textareaColor:J.color.background,textareaBorderColor:J.color.border,buttonColor:J.color.accent50,buttonTextColor:J.color.neutral00};return n},t}(ta);function VYe(e,t){return le(e,function(r,n){var i=t&&t[n];if(Ee(i)&&!oe(i)){var a=Ee(r)&&!oe(r);a||(r={value:r});var o=i.name!=null&&r.name==null;return r=Oe(r,i),o&&delete r.name,r}else return r})}ro({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(e,t){var r=[];R(e.newOption.series,function(n){var i=t.getSeriesByName(n.name)[0];if(!i)r.push(ae({type:"scatter"},n));else{var a=i.get("data");r.push({name:n.name,data:VYe(n.data,a)})}}),t.mergeOption(Oe({series:r},e.newOption))});var _ie=R,bie=et();function GYe(e,t){var r=zR(e);_ie(t,function(n,i){for(var a=r.length-1;a>=0;a--){var o=r[a];if(o[i])break}if(a<0){var s=e.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();r[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),r.push(t)}function WYe(e){var t=zR(e),r=t[t.length-1];t.length>1&&t.pop();var n={};return _ie(r,function(i,a){for(var o=t.length-1;o>=0;o--)if(i=t[o][a],i){n[a]=i;break}}),n}function HYe(e){bie(e).snapshots=null}function UYe(e){return zR(e).length}function zR(e){var t=bie(e);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var ZYe=function(e){K(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(r,n){HYe(r),n.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(r){var n={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:r.getLocaleModel().get(["toolbox","restore","title"])};return n},t}(ta);ro({type:"restore",event:"restore",update:"prepareAndUpdate"},function(e,t){t.resetOption("recreate")});var YYe=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],$R=function(){function e(t,r,n){var i=this;this._targetInfoList=[];var a=IH(r,t);R(XYe,function(o,s){(!n||!n.include||He(n.include,s)>=0)&&o(a,i._targetInfoList)})}return e.prototype.setOutputRanges=function(t,r){return this.matchOutputRanges(t,r,function(n,i,a){if((n.coordRanges||(n.coordRanges=[])).push(i),!n.coordRange){n.coordRange=i;var o=oP[n.brushType](0,a,i);n.__rangeOffset={offset:NH[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),t},e.prototype.matchOutputRanges=function(t,r,n){R(t,function(i){var a=this.findTargetInfo(i,r);a&&a!==!0&&R(a.coordSyses,function(o){var s=oP[i.brushType](1,o,i.range,!0);n(i,s.values,o,r)})},this)},e.prototype.setInputRanges=function(t,r){R(t,function(n){var i=this.findTargetInfo(n,r);if(n.range=n.range||[],i&&i!==!0){n.panelId=i.panelId;var a=oP[n.brushType](0,i.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?NH[n.brushType](a.values,o.offset,qYe(a.xyMinMax,o.xyMinMax)):a.values}},this)},e.prototype.makePanelOpts=function(t,r){return le(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:r?r(n):null,clipPath:Ane(i),isTargetByCursor:Pne(i,t,n.coordSysModel),getLinearBrushOtherExtent:Mne(i)}})},e.prototype.controlSeries=function(t,r,n){var i=this.findTargetInfo(t,n);return i===!0||i&&He(i.coordSyses,r.coordinateSystem)>=0},e.prototype.findTargetInfo=function(t,r){for(var n=this._targetInfoList,i=IH(r,t),a=0;a<n.length;a++){var o=n[a],s=t.panelId;if(s){if(o.panelId===s)return o}else for(var l=0;l<OH.length;l++)if(OH[l](i,o))return o}return!0},e}();function HO(e){return e[0]>e[1]&&e.reverse(),e}function IH(e,t){return dd(e,t,{includeMainTypes:YYe})}var XYe={grid:function(e,t){var r=e.xAxisModels,n=e.yAxisModels,i=e.gridModels,a=Ce(),o={},s={};!r&&!n&&!i||(R(r,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),R(n,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),R(i,function(l){a.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,c=[];R(u.getCartesians(),function(f,h){(He(r,f.getAxis("x").model)>=0||He(n,f.getAxis("y").model)>=0)&&c.push(f)}),t.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:EH.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(e,t){R(e.geoModels,function(r){var n=r.coordinateSystem;t.push({panelId:"geo--"+r.id,geoModel:r,coordSysModel:r,coordSys:n,coordSyses:[n],getPanelRect:EH.geo})})}},OH=[function(e,t){var r=e.xAxisModel,n=e.yAxisModel,i=e.gridModel;return!i&&r&&(i=r.axis.grid.model),!i&&n&&(i=n.axis.grid.model),i&&i===t.gridModel},function(e,t){var r=e.geoModel;return r&&r===t.geoModel}],EH={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(tu(e)),t}},oP={lineX:We(DH,0),lineY:We(DH,1),rect:function(e,t,r,n){var i=e?t.pointToData([r[0][0],r[1][0]],n):t.dataToPoint([r[0][0],r[1][0]],n),a=e?t.pointToData([r[0][1],r[1][1]],n):t.dataToPoint([r[0][1],r[1][1]],n),o=[HO([i[0],a[0]]),HO([i[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(e,t,r,n){var i=[[1/0,-1/0],[1/0,-1/0]],a=le(r,function(o){var s=e?t.pointToData(o,n):t.dataToPoint(o,n);return i[0][0]=Math.min(i[0][0],s[0]),i[1][0]=Math.min(i[1][0],s[1]),i[0][1]=Math.max(i[0][1],s[0]),i[1][1]=Math.max(i[1][1],s[1]),s});return{values:a,xyMinMax:i}}};function DH(e,t,r,n){var i=r.getAxis(["x","y"][e]),a=HO(le([0,1],function(s){return t?i.coordToData(i.toLocalCoord(n[s]),!0):i.toGlobalCoord(i.dataToCoord(n[s]))})),o=[];return o[e]=a,o[1-e]=[NaN,NaN],{values:a,xyMinMax:o}}var NH={lineX:We(jH,0),lineY:We(jH,1),rect:function(e,t,r){return[[e[0][0]-r[0]*t[0][0],e[0][1]-r[0]*t[0][1]],[e[1][0]-r[1]*t[1][0],e[1][1]-r[1]*t[1][1]]]},polygon:function(e,t,r){return le(e,function(n,i){return[n[0]-r[0]*t[i][0],n[1]-r[1]*t[i][1]]})}};function jH(e,t,r,n){return[t[0]-n[e]*r[0],t[1]-n[e]*r[1]]}function qYe(e,t){var r=RH(e),n=RH(t),i=[r[0]/n[0],r[1]/n[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function RH(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var UO=R,KYe=ORe("toolbox-dataZoom_"),JYe=function(e){K(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(r,n,i,a){this._brushController||(this._brushController=new fR(i.getZr()),this._brushController.on("brush",_e(this._onBrush,this)).mount()),tXe(r,n,this,a,i),eXe(r,n)},t.prototype.onclick=function(r,n,i){QYe[i].call(this)},t.prototype.remove=function(r,n){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(r,n){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(r){var n=r.areas;if(!r.isEnd||!n.length)return;var i={},a=this.ecModel;this._brushController.updateCovers([]);var o=new $R(FR(this.model),a,{include:["grid"]});o.matchOutputRanges(n,a,function(u,c,f){if(f.type==="cartesian2d"){var h=u.brushType;h==="rect"?(s("x",f,c[0]),s("y",f,c[1])):s({lineX:"x",lineY:"y"}[h],f,c)}}),GYe(a,i),this._dispatchZoomAction(i);function s(u,c,f){var h=c.getAxis(u),d=h.model,v=l(u,d,a),m=v.findRepresentativeAxisProxy(d).getMinMaxSpan();(m.minValueSpan!=null||m.maxValueSpan!=null)&&(f=vu(0,f.slice(),h.scale.getExtent(),0,m.minValueSpan,m.maxValueSpan)),v&&(i[v.id]={dataZoomId:v.id,startValue:f[0],endValue:f[1]})}function l(u,c,f){var h;return f.eachComponent({mainType:"dataZoom",subType:"select"},function(d){var v=d.getAxisModel(u,c.componentIndex);v&&(h=d)}),h}},t.prototype._dispatchZoomAction=function(r){var n=[];UO(r,function(i,a){n.push(Le(i))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},t.getDefaultOption=function(r){var n={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:r.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:J.color.backgroundTint}};return n},t}(ta),QYe={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(WYe(this.ecModel))}};function FR(e){var t={xAxisIndex:e.get("xAxisIndex",!0),yAxisIndex:e.get("yAxisIndex",!0),xAxisId:e.get("xAxisId",!0),yAxisId:e.get("yAxisId",!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex="all"),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex="all"),t}function eXe(e,t){e.setIconStatus("back",UYe(t)>1?"emphasis":"normal")}function tXe(e,t,r,n,i){var a=r._isZoomActive;n&&n.type==="takeGlobalCursor"&&(a=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),r._isZoomActive=a,e.setIconStatus("zoom",a?"emphasis":"normal");var o=new $R(FR(e),t,{include:["grid"]}),s=o.makePanelOpts(i,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});r._brushController.setPanels(s).enableBrush(a&&s.length?{brushType:"auto",brushStyle:e.getModel("brushStyle").getItemStyle()}:!1)}dBe("dataZoom",function(e){var t=e.getComponent("toolbox",0),r=["feature","dataZoom"];if(!t||t.get(r)==null)return;var n=t.getModel(r),i=[],a=FR(n),o=dd(e,a);UO(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),UO(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var f=l.componentIndex,h={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:KYe+u+f};h[c]=f,i.push(h)}return i});function rXe(e){e.registerComponentModel(MYe),e.registerComponentView(PYe),Lh("saveAsImage",LYe),Lh("magicType",OYe),Lh("dataView",FYe),Lh("dataZoom",JYe),Lh("restore",ZYe),Ye(AYe)}var nXe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:J.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:J.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:J.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:J.color.tertiary,fontSize:14}},t}(Qe);function wie(e){var t=e.get("confine");return t!=null?!!t:e.get("renderMode")==="richText"}function Sie(e){if(it.domSupported){for(var t=document.documentElement.style,r=0,n=e.length;r<n;r++)if(e[r]in t)return e[r]}}var Tie=Sie(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),iXe=Sie(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function Cie(e,t){if(!e)return t;t=lj(t,!0);var r=e.indexOf(t);return e=r===-1?t:"-"+e.slice(0,r)+"-"+t,e.toLowerCase()}function aXe(e,t){var r=e.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(e);return r?r[t]:null}var oXe=Cie(iXe,"transition"),VR=Cie(Tie,"transform"),sXe="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(it.transform3dSupported?"will-change:transform;":"");function lXe(e){return e=e==="left"?"right":e==="right"?"left":e==="top"?"bottom":"top",e}function uXe(e,t,r){if(!ye(r)||r==="inside")return"";var n=e.get("backgroundColor"),i=e.get("borderWidth");t=mf(t);var a=lXe(r),o=Math.max(Math.round(i)*1.5,6),s="",l=VR+":",u;He(["left","right"],a)>-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var c=u*Math.PI/180,f=o+i,h=f*Math.abs(Math.cos(c))+f*Math.abs(Math.sin(c)),d=Math.round(((h-Math.SQRT2*i)/2+Math.SQRT2*i-(h-f)/2)*100)/100;s+=";"+a+":-"+d+"px";var v=t+" solid "+i+"px;",m=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+v,"border-right:"+v,"background-color:"+n+";"];return'<div style="'+m.join("")+'"></div>'}function cXe(e,t,r){var n="cubic-bezier(0.23,1,0.32,1)",i="",a="";return r&&(i=" "+e/2+"s "+n,a="opacity"+i+",visibility"+i),t||(i=" "+e+"s "+n,a+=(a.length?",":"")+(it.transformSupported?""+VR+i:",left"+i+",top"+i)),oXe+":"+a}function BH(e,t,r){var n=e.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!it.transformSupported)return r?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=it.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return r?"top:0;left:0;"+VR+":"+o+";":[["top",0],["left",0],[Tie,o]]}function fXe(e){var t=[],r=e.get("fontSize"),n=e.getTextColor();n&&t.push("color:"+n),t.push("font:"+e.getFont());var i=Ae(e.get("lineHeight"),Math.round(r*3/2));r&&t.push("line-height:"+i+"px");var a=e.get("textShadowColor"),o=e.get("textShadowBlur")||0,s=e.get("textShadowOffsetX")||0,l=e.get("textShadowOffsetY")||0;return a&&o&&t.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),R(["decoration","align"],function(u){var c=e.get(u);c&&t.push("text-"+u+":"+c)}),t.join(";")}function hXe(e,t,r,n){var i=[],a=e.get("transitionDuration"),o=e.get("backgroundColor"),s=e.get("shadowBlur"),l=e.get("shadowColor"),u=e.get("shadowOffsetX"),c=e.get("shadowOffsetY"),f=e.getModel("textStyle"),h=dee(e,"html"),d=u+"px "+c+"px "+s+"px "+l;return i.push("box-shadow:"+d),t&&a>0&&i.push(cXe(a,r,n)),o&&i.push("background-color:"+o),R(["width","color","radius"],function(v){var m="border-"+v,y=lj(m),x=e.get(y);x!=null&&i.push(m+":"+x+(v==="color"?"":"px"))}),i.push(fXe(f)),h!=null&&i.push("padding:"+Uv(h).join("px ")+"px"),i.join(";")+";"}function zH(e,t,r,n,i){var a=t&&t.painter;if(r){var o=a&&a.getViewportRoot();o&&KNe(e,o,r,n,i)}else{e[0]=n,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var dXe=function(){function e(t,r){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,it.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=t.getZr(),a=r.appendTo,o=a&&(ye(a)?document.querySelector(a):cf(a)?a:ke(a)&&a(t.getDom()));zH(this._styleCoord,i,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(n),this._api=t,this._container=o;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=i.handler,c=i.painter.getViewportRoot();Yi(c,l,!0),u.dispatch("mousemove",l)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return e.prototype.update=function(t){if(!this._container){var r=this._api.getDom(),n=aXe(r,"position"),i=r.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative")}var a=t.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this._enableDisplayTransition=t.get("displayTransition")&&t.get("transitionDuration")>0,this.el.className=t.get("className")||""},e.prototype.show=function(t,r){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=sXe+hXe(t,!this._firstShow,this._longHide,this._enableDisplayTransition)+BH(a[0],a[1],!0)+("border-color:"+mf(r)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(t,r,n,i,a){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(ye(a)&&n.get("trigger")==="item"&&!wie(n)&&(s=uXe(n,i,a)),ye(t))o.innerHTML=t+s;else if(t){o.innerHTML="",oe(t)||(t=[t]);for(var l=0;l<t.length;l++)cf(t[l])&&t[l].parentNode!==o&&o.appendChild(t[l]);if(s&&o.childNodes.length){var u=document.createElement("div");u.innerHTML=s,o.appendChild(u)}}},e.prototype.setEnterable=function(t){this._enterable=t},e.prototype.getSize=function(){var t=this.el;return t?[t.offsetWidth,t.offsetHeight]:[0,0]},e.prototype.moveTo=function(t,r){if(this.el){var n=this._styleCoord;if(zH(n,this._zr,this._container,t,r),n[0]!=null&&n[1]!=null){var i=this.el.style,a=BH(n[0],n[1]);R(a,function(o){i[o[0]]=o[1]})}}},e.prototype._moveIfResized=function(){var t=this._styleCoord[2],r=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),r*this._zr.getHeight())},e.prototype.hide=function(){var t=this,r=this.el.style;this._enableDisplayTransition?(r.visibility="hidden",r.opacity="0"):r.display="none",it.transform3dSupported&&(r.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return t._longHide=!0},500)},e.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(_e(this.hide,this),t)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var t=this._zr;JNe(t&&t.painter&&t.painter.getViewportRoot(),this._container);var r=this.el;if(r){r.onmouseenter=r.onmousemove=r.onmouseleave=null;var n=r.parentNode;n&&n.removeChild(r)}this.el=this._container=null},e}(),vXe=function(){function e(t){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=t.getZr(),FH(this._styleCoord,this._zr,t.getWidth()/2,t.getHeight()/2)}return e.prototype.update=function(t){var r=t.get("alwaysShowContent");r&&this._moveIfResized(),this._alwaysShowContent=r},e.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},e.prototype.setContent=function(t,r,n,i,a){var o=this;Ee(t)&&mt(""),this.el&&this._zr.remove(this.el);var s=n.getModel("textStyle");this.el=new ot({style:{rich:r.richTextStyles,text:t,lineHeight:22,borderWidth:1,borderColor:i,textShadowColor:s.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:dee(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),R(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){o.el.style[u]=n.get(u)}),R(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(u){o.el.style[u]=s.get(u)||0}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},e.prototype.setEnterable=function(t){this._enterable=t},e.prototype.getSize=function(){var t=this.el,r=this.el.getBoundingRect(),n=$H(t.style);return[r.width+n.left+n.right,r.height+n.top+n.bottom]},e.prototype.moveTo=function(t,r){var n=this.el;if(n){var i=this._styleCoord;FH(i,this._zr,t,r),t=i[0],r=i[1];var a=n.style,o=_l(a.borderWidth||0),s=$H(a);n.x=t+o+s.left,n.y=r+o+s.top,n.markRedraw()}},e.prototype._moveIfResized=function(){var t=this._styleCoord[2],r=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),r*this._zr.getHeight())},e.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},e.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(_e(this.hide,this),t)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}();function _l(e){return Math.max(0,e)}function $H(e){var t=_l(e.shadowBlur||0),r=_l(e.shadowOffsetX||0),n=_l(e.shadowOffsetY||0);return{left:_l(t-r),right:_l(t+r),top:_l(t-n),bottom:_l(t+n)}}function FH(e,t,r,n){e[0]=r,e[1]=n,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var pXe=new qe({shape:{x:-1,y:-1,width:2,height:2}}),gXe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){if(!(it.node||!n.getDom())){var i=r.getComponent("tooltip"),a=this._renderMode=zRe(i.get("renderMode"));this._tooltipContent=a==="richText"?new vXe(n):new dXe(n,{appendTo:i.get("appendToBody",!0)?"body":i.get("appendTo",!0)})}},t.prototype.render=function(r,n,i){if(!(it.node||!i.getDom())){this.group.removeAll(),this._tooltipModel=r,this._ecModel=n,this._api=i;var a=this._tooltipContent;a.update(r),a.setEnterable(r.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&r.get("transitionDuration")?Xv(this,"_updatePosition",50,"fixRate"):My(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var r=this._tooltipModel,n=r.get("triggerOn");oie("itemTooltip",this._api,_e(function(i,a,o){n!=="none"&&(n.indexOf(i)>=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var r=this._tooltipModel,n=this._ecModel,i=this._api,a=r.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(r,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(r,n,i,a){if(!(a.from===this.uid||it.node||!i.getDom())){var o=VH(a,i);this._ticket="";var s=a.dataByCoordSys,l=_Xe(a,n,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var c=pXe;c.x=a.x,c.y=a.y,c.update(),ze(c).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:c},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(r,n,i,a))return;var f=sie(a,n),h=f.point[0],d=f.point[1];h!=null&&d!=null&&this._tryShow({offsetX:h,offsetY:d,target:f.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:i.getZr().findHover(a.x,a.y).target},o))}},t.prototype.manuallyHideTip=function(r,n,i,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(VH(a,i))},t.prototype._manuallyAxisShowTip=function(r,n,i,a){var o=a.seriesIndex,s=a.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var c=u.getData(),f=sg([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(f.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},t.prototype._tryShow=function(r,n){var i=r.target,a=this._tooltipModel;if(a){this._lastX=r.offsetX,this._lastY=r.offsetY;var o=r.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,r);else if(i){var s=ze(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Rc(i,function(c){if(c.tooltipDisabled)return l=u=null,!0;l||u||(ze(c).dataIndex!=null?l=c:ze(c).tooltipConfig!=null&&(u=c))},!0),l?this._showSeriesItemTooltip(r,l,n):u?this._showComponentItemTooltip(r,u,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},t.prototype._showOrMove=function(r,n){var i=r.get("showDelay");n=_e(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},t.prototype._showAxisTooltip=function(r,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=sg([n.tooltipOption],a),l=this._renderMode,u=[],c=Mr("section",{blocks:[],noHeader:!0}),f=[],h=new F2;R(r,function(_){R(_.dataByAxis,function(b){var S=i.getComponent(b.axisDim+"Axis",b.axisIndex),T=b.value;if(!(!S||T==null)){var C=nie(T,S.axis,i,b.seriesDataIndices,b.valueLabelOpt),A=Mr("section",{header:C,noHeader:!Ai(C),sortBlocks:!0,blocks:[]});c.blocks.push(A),R(b.seriesDataIndices,function(P){var I=i.getSeriesByIndex(P.seriesIndex),k=P.dataIndexInside,E=I.getDataParams(k);if(!(E.dataIndex<0)){E.axisDim=b.axisDim,E.axisIndex=b.axisIndex,E.axisType=b.axisType,E.axisId=b.axisId,E.axisValue=Ew(S.axis,{value:T}),E.axisValueLabel=C,E.marker=h.makeTooltipMarker("item",mf(E.color),l);var D=i6(I.formatTooltip(k,!0,null)),N=D.frag;if(N){var z=sg([I],a).get("valueFormatter");A.blocks.push(z?ae({valueFormatter:z},N):N)}D.text&&f.push(D.text),u.push(E)}})}})}),c.blocks.reverse(),f.reverse();var d=n.position,v=s.get("order"),m=c6(c,h,l,v,i.get("useUTC"),s.get("textStyle"));m&&f.unshift(m);var y=l==="richText"?`
`:"<br/>",x=f.join(y);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,u)?this._updatePosition(s,d,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,x,u,Math.random()+"",o[0],o[1],d,null,h)})},t.prototype._showSeriesItemTooltip=function(r,n,i){var a=this._ecModel,o=ze(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,f=o.dataType,h=u.getData(f),d=this._renderMode,v=r.positionDefault,m=sg([h.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,v?{position:v}:null),y=m.get("trigger");if(!(y!=null&&y!=="item")){var x=u.getDataParams(c,f),_=new F2;x.marker=_.makeTooltipMarker("item",mf(x.color),d);var b=i6(u.formatTooltip(c,!1,f)),S=m.get("order"),T=m.get("valueFormatter"),C=b.frag,A=C?c6(T?ae({valueFormatter:T},C):C,_,d,S,a.get("useUTC"),m.get("textStyle")):b.text,P="item_"+u.name+"_"+c;this._showOrMove(m,function(){this._showTooltipContent(m,A,x,P,r.offsetX,r.offsetY,r.position,r.target,_)}),i({type:"showTip",dataIndexInside:c,dataIndex:h.getRawIndex(c),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(r,n,i){var a=this._renderMode==="html",o=ze(n),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(ye(l)){var c=l;l={content:c,formatter:c},u=!0}u&&a&&l.content&&(l=Le(l),l.content=Nn(l.content));var f=[l],h=this._ecModel.getComponent(o.componentMainType,o.componentIndex);h&&f.push(h),f.push({formatter:l.content});var d=r.positionDefault,v=sg(f,this._tooltipModel,d?{position:d}:null),m=v.get("content"),y=Math.random()+"",x=new F2;this._showOrMove(v,function(){var _=Le(v.get("formatterParams")||{});this._showTooltipContent(v,m,_,y,r.offsetX,r.offsetY,r.position,n,x)}),i({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(r,n,i,a,o,s,l,u,c){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var f=this._tooltipContent;f.setEnterable(r.get("enterable"));var h=r.get("formatter");l=l||r.get("position");var d=n,v=this._getNearestPoint([o,s],i,r.get("trigger"),r.get("borderColor"),r.get("defaultBorderColor",!0)),m=v.color;if(h)if(ye(h)){var y=r.ecModel.get("useUTC"),x=oe(i)?i[0]:i,_=x&&x.axisType&&x.axisType.indexOf("time")>=0;d=h,_&&(d=x0(x.axisValue,d,y)),d=uj(d,i,!0)}else if(ke(h)){var b=_e(function(S,T){S===this._ticket&&(f.setContent(T,c,r,m,l),this._updatePosition(r,l,o,s,f,i,u))},this);this._ticket=a,d=h(i,a,b)}else d=h;f.setContent(d,c,r,m,l),f.show(r,m),this._updatePosition(r,l,o,s,f,i,u)}},t.prototype._getNearestPoint=function(r,n,i,a,o){if(i==="axis"||oe(n))return{color:a||o};if(!oe(n))return{color:a||n.color||n.borderColor}},t.prototype._updatePosition=function(r,n,i,a,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();n=n||r.get("position");var f=o.getSize(),h=r.get("align"),d=r.get("verticalAlign"),v=l&&l.getBoundingRect().clone();if(l&&v.applyTransform(l.transform),ke(n)&&(n=n([i,a],s,o.el,v,{viewSize:[u,c],contentSize:f.slice()})),oe(n))i=me(n[0],u),a=me(n[1],c);else if(Ee(n)){var m=n;m.width=f[0],m.height=f[1];var y=$t(m,{width:u,height:c});i=y.x,a=y.y,h=null,d=null}else if(ye(n)&&l){var x=xXe(n,v,f,r.get("borderWidth"));i=x[0],a=x[1]}else{var x=mXe(i,a,o,u,c,h?null:20,d?null:20);i=x[0],a=x[1]}if(h&&(i-=GH(h)?f[0]/2:h==="right"?f[0]:0),d&&(a-=GH(d)?f[1]/2:d==="bottom"?f[1]:0),wie(r)){var x=yXe(i,a,o,u,c);i=x[0],a=x[1]}o.moveTo(i,a)},t.prototype._updateContentNotChangedOnAxis=function(r,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===r.length;return o&&R(i,function(s,l){var u=s.dataByAxis||[],c=r[l]||{},f=c.dataByAxis||[];o=o&&u.length===f.length,o&&R(u,function(h,d){var v=f[d]||{},m=h.seriesDataIndices||[],y=v.seriesDataIndices||[];o=o&&h.value===v.value&&h.axisType===v.axisType&&h.axisId===v.axisId&&m.length===y.length,o&&R(m,function(x,_){var b=y[_];o=o&&x.seriesIndex===b.seriesIndex&&x.dataIndex===b.dataIndex}),a&&R(h.seriesDataIndices,function(x){var _=x.seriesIndex,b=n[_],S=a[_];b&&S&&S.data!==b.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},t.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},t.prototype.dispose=function(r,n){it.node||!n.getDom()||(My(this,"_updatePosition"),this._tooltipContent.dispose(),BO("itemTooltip",n))},t.type="tooltip",t}(It);function sg(e,t,r){var n=t.ecModel,i;r?(i=new rt(r,n,n),i=new rt(t.option,i,n)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof rt&&(o=o.get("tooltip",!0)),ye(o)&&(o={formatter:o}),o&&(i=new rt(o,i,n)))}return i}function VH(e,t){return e.dispatchAction||_e(t.dispatchAction,t)}function mXe(e,t,r,n,i,a,o){var s=r.getSize(),l=s[0],u=s[1];return a!=null&&(e+l+a+2>n?e-=l+a:e+=a),o!=null&&(t+u+o>i?t-=u+o:t+=o),[e,t]}function yXe(e,t,r,n,i){var a=r.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,n)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function xXe(e,t,r,n){var i=r[0],a=r[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=t.width,c=t.height;switch(e){case"inside":s=t.x+u/2-i/2,l=t.y+c/2-a/2;break;case"top":s=t.x+u/2-i/2,l=t.y-a-o;break;case"bottom":s=t.x+u/2-i/2,l=t.y+c+o;break;case"left":s=t.x-i-o,l=t.y+c/2-a/2;break;case"right":s=t.x+u+o,l=t.y+c/2-a/2}return[s,l]}function GH(e){return e==="center"||e==="middle"}function _Xe(e,t,r){var n=IN(e).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=Bv(t,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=r.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=ze(u).tooltipConfig;if(c&&c.name===e.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}function bXe(e){Ye(P0),e.registerComponentModel(nXe),e.registerComponentView(gXe),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},sr),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},sr)}var wXe=["rect","polygon","keep","clear"];function SXe(e,t){var r=Lt(e?e.brush:[]);if(r.length){var n=[];R(r,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(n=n.concat(u))});var i=e&&e.toolbox;oe(i)&&(i=i[0]),i||(i={feature:{}},e.toolbox=[i]);var a=i.feature||(i.feature={}),o=a.brush||(a.brush={}),s=o.type||(o.type=[]);s.push.apply(s,n),TXe(s),t&&!s.length&&s.push.apply(s,wXe)}}function TXe(e){var t={};R(e,function(r){t[r]=1}),e.length=0,R(t,function(r,n){e.push(n)})}var WH=R;function HH(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function ZO(e,t,r){var n={};return WH(t,function(a){var o=n[a]=i();WH(e[a],function(s,l){if(Xr.isValidType(l)){var u={type:l,visual:s};r&&r(u,a),o[l]=new Xr(u),l==="opacity"&&(u=Le(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new Xr(u))}})}),n;function i(){var a=function(){};a.prototype.__hidden=a.prototype;var o=new a;return o}}function Aie(e,t,r){var n;R(r,function(i){t.hasOwnProperty(i)&&HH(t[i])&&(n=!0)}),n&&R(r,function(i){t.hasOwnProperty(i)&&HH(t[i])?e[i]=Le(t[i]):delete e[i]})}function CXe(e,t,r,n,i,a){var o={};R(e,function(f){var h=Xr.prepareVisualTypes(t[f]);o[f]=h});var s;function l(f){return xj(r,s,f)}function u(f,h){See(r,s,f,h)}r.each(c);function c(f,h){s=f;var d=r.getRawDataItem(s);if(!(d&&d.visualMap===!1))for(var v=n.call(i,f),m=t[v],y=o[v],x=0,_=y.length;x<_;x++){var b=y[x];m[b]&&m[b].applyVisual(f,l,u)}}}function AXe(e,t,r,n){var i={};return R(e,function(a){var o=Xr.prepareVisualTypes(t[a]);i[a]=o}),{progress:function(o,s){var l;n!=null&&(l=s.getDimensionIndex(n));function u(T){return xj(s,f,T)}function c(T,C){See(s,f,T,C)}for(var f,h=s.getStore();(f=o.next())!=null;){var d=s.getRawDataItem(f);if(!(d&&d.visualMap===!1))for(var v=n!=null?h.get(l,f):f,m=r(v),y=t[m],x=i[m],_=0,b=x.length;_<b;_++){var S=x[_];y[S]&&y[S].applyVisual(v,u,c)}}}}}function MXe(e){var t=e.brushType,r={point:function(n){return UH[t].point(n,r,e)},rect:function(n){return UH[t].rect(n,r,e)}};return r}var UH={lineX:ZH(0),lineY:ZH(1),rect:{point:function(e,t,r){return e&&r.boundingRect.contain(e[0],e[1])},rect:function(e,t,r){return e&&r.boundingRect.intersect(e)}},polygon:{point:function(e,t,r){return e&&r.boundingRect.contain(e[0],e[1])&&bc(r.range,e[0],e[1])},rect:function(e,t,r){var n=r.range;if(!e||n.length<=1)return!1;var i=e.x,a=e.y,o=e.width,s=e.height,l=n[0];if(bc(n,i,a)||bc(n,i+o,a)||bc(n,i,a+s)||bc(n,i+o,a+s)||je.create(e).contain(l[0],l[1])||wg(i,a,i+o,a,n)||wg(i,a,i,a+s,n)||wg(i+o,a,i+o,a+s,n)||wg(i,a+s,i+o,a+s,n))return!0}}};function ZH(e){var t=["x","y"],r=["width","height"];return{point:function(n,i,a){if(n){var o=a.range,s=n[e];return lg(s,o)}},rect:function(n,i,a){if(n){var o=a.range,s=[n[t[e]],n[t[e]]+n[r[e]]];return s[1]<s[0]&&s.reverse(),lg(s[0],o)||lg(s[1],o)||lg(o[0],s)||lg(o[1],s)}}}}function lg(e,t){return t[0]<=e&&e<=t[1]}var YH=["inBrush","outOfBrush"],sP="__ecBrushSelect",YO="__ecInBrushSelectEvent";function Mie(e){e.eachComponent({mainType:"brush"},function(t){var r=t.brushTargetManager=new $R(t.option,e);r.setInputRanges(t.areas,e)})}function PXe(e,t,r){var n=[],i,a;e.eachComponent({mainType:"brush"},function(o){r&&r.type==="takeGlobalCursor"&&o.setBrushOption(r.key==="brush"?r.brushOption:{brushType:!1})}),Mie(e),e.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:Le(o.areas),selected:[]};n.push(l);var u=o.option,c=u.brushLink,f=[],h=[],d=[],v=!1;s||(i=u.throttleType,a=u.throttleDelay);var m=le(o.areas,function(T){var C=OXe[T.brushType],A=Oe({boundingRect:C?C(T):void 0},T);return A.selectors=MXe(A),A}),y=ZO(o.option,YH,function(T){T.mappingMethod="fixed"});oe(c)&&R(c,function(T){f[T]=1});function x(T){return c==="all"||!!f[T]}function _(T){return!!T.length}e.eachSeries(function(T,C){var A=d[C]=[];T.subType==="parallel"?b(T,C):S(T,C,A)});function b(T,C){var A=T.coordinateSystem;v=v||A.hasAxisBrushed(),x(C)&&A.eachActiveState(T.getData(),function(P,I){P==="active"&&(h[I]=1)})}function S(T,C,A){if(!(!T.brushSelector||IXe(o,C))&&(R(m,function(I){o.brushTargetManager.controlSeries(I,T,e)&&A.push(I),v=v||_(A)}),x(C)&&_(A))){var P=T.getData();P.each(function(I){XH(T,A,P,I)&&(h[I]=1)})}}e.eachSeries(function(T,C){var A={seriesId:T.id,seriesIndex:C,seriesName:T.name,dataIndex:[]};l.selected.push(A);var P=d[C],I=T.getData(),k=x(C)?function(E){return h[E]?(A.dataIndex.push(I.getRawIndex(E)),"inBrush"):"outOfBrush"}:function(E){return XH(T,P,I,E)?(A.dataIndex.push(I.getRawIndex(E)),"inBrush"):"outOfBrush"};(x(C)?v:_(P))&&CXe(YH,y,I,k)})}),kXe(t,i,a,n,r)}function kXe(e,t,r,n,i){if(i){var a=e.getZr();if(!a[YO]){a[sP]||(a[sP]=LXe);var o=Xv(a,sP,r,t);o(e,n)}}}function LXe(e,t){if(!e.isDisposed()){var r=e.getZr();r[YO]=!0,e.dispatchAction({type:"brushSelect",batch:t}),r[YO]=!1}}function XH(e,t,r,n){for(var i=0,a=t.length;i<a;i++){var o=t[i];if(e.brushSelector(n,r,o.selectors,o))return!0}}function IXe(e,t){var r=e.option.seriesIndex;return r!=null&&r!=="all"&&(oe(r)?He(r,t)<0:t!==r)}var OXe={rect:function(e){return qH(e.range)},polygon:function(e){for(var t,r=e.range,n=0,i=r.length;n<i;n++){t=t||[[1/0,-1/0],[1/0,-1/0]];var a=r[n];a[0]<t[0][0]&&(t[0][0]=a[0]),a[0]>t[0][1]&&(t[0][1]=a[0]),a[1]<t[1][0]&&(t[1][0]=a[1]),a[1]>t[1][1]&&(t[1][1]=a[1])}return t&&qH(t)}};function qH(e){return new je(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var EXe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){this.ecModel=r,this.api=n,this.model,(this._brushController=new fR(n.getZr())).on("brush",_e(this._onBrush,this)).mount()},t.prototype.render=function(r,n,i,a){this.model=r,this._updateController(r,n,i,a)},t.prototype.updateTransform=function(r,n,i,a){Mie(n),this._updateController(r,n,i,a)},t.prototype.updateVisual=function(r,n,i,a){this.updateTransform(r,n,i,a)},t.prototype.updateView=function(r,n,i,a){this._updateController(r,n,i,a)},t.prototype._updateController=function(r,n,i,a){(!a||a.$from!==r.id)&&this._brushController.setPanels(r.brushTargetManager.makePanelOpts(i)).enableBrush(r.brushOption).updateCovers(r.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(r){var n=this.model.id,i=this.model.brushTargetManager.setOutputRanges(r.areas,this.ecModel);(!r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:Le(i),$from:n}),r.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:Le(i),$from:n})},t.type="brush",t}(It),DXe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.areas=[],r.brushOption={},r}return t.prototype.optionUpdated=function(r,n){var i=this.option;!n&&Aie(i,r,["inBrush","outOfBrush"]);var a=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:this.option.defaultOutOfBrushColor},a.hasOwnProperty("liftZ")||(a.liftZ=5)},t.prototype.setAreas=function(r){r&&(this.areas=le(r,function(n){return KH(this.option,n)},this))},t.prototype.setBrushOption=function(r){this.brushOption=KH(this.option,r),this.brushType=this.brushOption.brushType},t.type="brush",t.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],t.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:J.color.backgroundTint,borderColor:J.color.borderTint},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:J.color.disabled},t}(Qe);function KH(e,t){return Ue({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new rt(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var NXe=["rect","polygon","lineX","lineY","keep","clear"],jXe=function(e){K(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(r,n,i){var a,o,s;n.eachComponent({mainType:"brush"},function(l){a=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=a,this._brushMode=o,R(r.get("type",!0),function(l){r.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===a)?"emphasis":"normal")})},t.prototype.updateView=function(r,n,i){this.render(r,n,i)},t.prototype.getIcons=function(){var r=this.model,n=r.get("icon",!0),i={};return R(r.get("type",!0),function(a){n[a]&&(i[a]=n[a])}),i},t.prototype.onclick=function(r,n,i){var a=this._brushType,o=this._brushMode;i==="clear"?(n.dispatchAction({type:"axisAreaSelect",intervals:[]}),n.dispatchAction({type:"brush",command:"clear",areas:[]})):n.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?a:a===i?!1:i,brushMode:i==="keep"?o==="multiple"?"single":"multiple":o}})},t.getDefaultOption=function(r){var n={show:!0,type:NXe.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:r.getLocaleModel().get(["toolbox","brush","title"])};return n},t}(ta);function RXe(e){e.registerComponentView(EXe),e.registerComponentModel(DXe),e.registerPreprocessor(SXe),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,PXe),e.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(t,r){r.eachComponent({mainType:"brush",query:t},function(n){n.setAreas(t.areas)})}),e.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},sr),e.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},sr),Lh("brush",jXe)}var BXe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode={type:"box",ignoreSize:!0},r}return t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:J.size.m,backgroundColor:J.color.transparent,borderColor:J.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:J.color.primary},subtextStyle:{fontSize:12,color:J.color.quaternary}},t}(Qe),zXe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){if(this.group.removeAll(),!!r.get("show")){var a=this.group,o=r.getModel("textStyle"),s=r.getModel("subtextStyle"),l=r.get("textAlign"),u=Ae(r.get("textBaseline"),r.get("textVerticalAlign")),c=new ot({style:kt(o,{text:r.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),f=c.getBoundingRect(),h=r.get("subtext"),d=new ot({style:kt(s,{text:h,fill:s.getTextColor(),y:f.height+r.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),v=r.get("link"),m=r.get("sublink"),y=r.get("triggerEvent",!0);c.silent=!v&&!y,d.silent=!m&&!y,v&&c.on("click",function(){ww(v,"_"+r.get("target"))}),m&&d.on("click",function(){ww(m,"_"+r.get("subtarget"))}),ze(c).eventData=ze(d).eventData=y?{componentType:"title",componentIndex:r.componentIndex}:null,a.add(c),h&&a.add(d);var x=a.getBoundingRect(),_=r.getBoxLayoutParams();_.width=x.width,_.height=x.height;var b=zr(r,i),S=$t(_,b.refContainer,r.get("padding"));l||(l=r.get("left")||r.get("right"),l==="middle"&&(l="center"),l==="right"?S.x+=S.width:l==="center"&&(S.x+=S.width/2)),u||(u=r.get("top")||r.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?S.y+=S.height:u==="middle"&&(S.y+=S.height/2),u=u||"top"),a.x=S.x,a.y=S.y,a.markRedraw();var T={align:l,verticalAlign:u};c.setStyle(T),d.setStyle(T),x=a.getBoundingRect();var C=S.margin,A=r.getItemStyle(["color","opacity"]);A.fill=r.get("backgroundColor");var P=new qe({shape:{x:x.x-C[3],y:x.y-C[0],width:x.width+C[1]+C[3],height:x.height+C[0]+C[2],r:r.get("borderRadius")},style:A,subPixelOptimize:!0,silent:!0});a.add(P)}},t.type="title",t}(It);function $Xe(e){e.registerComponentModel(BXe),e.registerComponentView(zXe)}var JH=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode="box",r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),this._initData()},t.prototype.mergeOption=function(r){e.prototype.mergeOption.apply(this,arguments),this._initData()},t.prototype.setCurrentIndex=function(r){r==null&&(r=this.option.currentIndex);var n=this._data.count();this.option.loop?r=(r%n+n)%n:(r>=n&&(r=n-1),r<0&&(r=0)),this.option.currentIndex=r},t.prototype.getCurrentIndex=function(){return this.option.currentIndex},t.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},t.prototype.setPlayState=function(r){this.option.autoPlay=!!r},t.prototype.getPlayState=function(){return!!this.option.autoPlay},t.prototype._initData=function(){var r=this.option,n=r.data||[],i=r.axisType,a=this._names=[],o;i==="category"?(o=[],R(n,function(u,c){var f=Dr(Rv(u),""),h;Ee(u)?(h=Le(u),h.value=c):h=c,o.push(h),a.push(f)})):o=n;var s={category:"ordinal",time:"time",value:"number"}[i]||"number",l=this._data=new Rn([{name:"value",type:s}],this);l.initData(o,a)},t.prototype.getData=function(){return this._data},t.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},t.type="timeline",t.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:J.size.m,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:J.color.secondary},data:[]},t}(Qe),Pie=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="timeline.slider",t.defaultOption=ku(JH.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:J.color.border,borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:J.color.accent10},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:J.color.tertiary},itemStyle:{color:J.color.accent20,borderWidth:0},checkpointStyle:{symbol:"circle",symbolSize:15,color:J.color.accent50,borderColor:J.color.accent50,borderWidth:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10.6699C11.5 9.90014 12.3333 9.41887 13 9.80371L20.5 14.1338C21.1667 14.5187 21.1667 15.4813 20.5 15.8662L13 20.1963C12.3333 20.5811 11.5 20.0999 11.5 19.3301V10.6699Z",stopIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10C12.3284 10 13 10.6716 13 11.5V18.5C13 19.3284 12.3284 20 11.5 20C10.6716 20 10 19.3284 10 18.5V11.5C10 10.6716 10.6716 10 11.5 10ZM18.5 10C19.3284 10 20 10.6716 20 11.5V18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5V11.5C17 10.6716 17.6716 10 18.5 10Z",nextIcon:"path://M0.838834 18.7383C0.253048 18.1525 0.253048 17.2028 0.838834 16.617L7.55635 9.89949L0.838834 3.18198C0.253048 2.59619 0.253048 1.64645 0.838834 1.06066C1.42462 0.474874 2.37437 0.474874 2.96015 1.06066L10.7383 8.83883L10.8412 8.95277C11.2897 9.50267 11.2897 10.2963 10.8412 10.8462L10.7383 10.9602L2.96015 18.7383C2.37437 19.3241 1.42462 19.3241 0.838834 18.7383Z",prevIcon:"path://M10.9602 1.06066C11.5459 1.64645 11.5459 2.59619 10.9602 3.18198L4.24264 9.89949L10.9602 16.617C11.5459 17.2028 11.5459 18.1525 10.9602 18.7383C10.3744 19.3241 9.42462 19.3241 8.83883 18.7383L1.06066 10.9602L0.957771 10.8462C0.509245 10.2963 0.509245 9.50267 0.957771 8.95277L1.06066 8.83883L8.83883 1.06066C9.42462 0.474874 10.3744 0.474874 10.9602 1.06066Z",prevBtnSize:18,nextBtnSize:18,color:J.color.accent50,borderColor:J.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:J.color.accent60},itemStyle:{color:J.color.accent60,borderColor:J.color.accent60},controlStyle:{color:J.color.accent70,borderColor:J.color.accent70}},progress:{lineStyle:{color:J.color.accent30},itemStyle:{color:J.color.accent40}},data:[]}),t}(JH);cr(Pie,XT.prototype);var FXe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="timeline",t}(It),VXe=function(e){K(t,e);function t(r,n,i,a){var o=e.call(this,r,n,i)||this;return o.type=a||"value",o}return t.prototype.getLabelModel=function(){return this.model.getModel("label")},t.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},t}(wa),lP=Math.PI,QH=et(),GXe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){this.api=n},t.prototype.render=function(r,n,i){if(this.model=r,this.api=i,this.ecModel=n,this.group.removeAll(),r.get("show",!0)){var a=this._layout(r,i),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(a,r);r.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return Mr("nameValue",{noName:!0,value:c})},R(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](a,o,l,r)},this),this._renderAxisLabel(a,s,l,r),this._position(a,r)}this._doPlayStop(),this._updateTicksStatus()},t.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},t.prototype.dispose=function(){this._clearTimer()},t.prototype._layout=function(r,n){var i=r.get(["label","position"]),a=r.get("orient"),o=HXe(r,n),s;i==null||i==="auto"?s=a==="horizontal"?o.y+o.height/2<n.getHeight()/2?"-":"+":o.x+o.width/2<n.getWidth()/2?"+":"-":ye(i)?s={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[a][i]:s=i;var l={horizontal:"center",vertical:s>=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:lP/2},f=a==="vertical"?o.height:o.width,h=r.getModel("controlStyle"),d=h.get("show",!0),v=d?h.get("itemSize"):0,m=d?h.get("itemGap"):0,y=v+m,x=r.get(["label","rotate"])||0;x=x*lP/180;var _,b,S,T=h.get("position",!0),C=d&&h.get("showPlayBtn",!0),A=d&&h.get("showPrevBtn",!0),P=d&&h.get("showNextBtn",!0),I=0,k=f;T==="left"||T==="bottom"?(C&&(_=[0,0],I+=y),A&&(b=[I,0],I+=y),P&&(S=[k-v,0],k-=y)):(C&&(_=[k-v,0],k-=y),A&&(b=[0,0],I+=y),P&&(S=[k-v,0],k-=y));var E=[I,k];return r.get("inverse")&&E.reverse(),{viewRect:o,mainLength:f,orient:a,rotation:c[a],labelRotation:x,labelPosOpt:s,labelAlign:r.get(["label","align"])||l[a],labelBaseline:r.get(["label","verticalAlign"])||r.get(["label","baseline"])||u[a],playPosition:_,prevBtnPosition:b,nextBtnPosition:S,axisExtent:E,controlSize:v,controlGap:m}},t.prototype._position=function(r,n){var i=this._mainGroup,a=this._labelGroup,o=r.viewRect;if(r.orient==="vertical"){var s=Yr(),l=o.x,u=o.y+o.height;Ka(s,s,[-l,-u]),rl(s,s,-lP/2),Ka(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=_(o),f=_(i.getBoundingRect()),h=_(a.getBoundingRect()),d=[i.x,i.y],v=[a.x,a.y];v[0]=d[0]=c[0][0];var m=r.labelPosOpt;if(m==null||ye(m)){var y=m==="+"?0:1;b(d,f,c,1,y),b(v,h,c,1,1-y)}else{var y=m>=0?0:1;b(d,f,c,1,y),v[1]=d[1]+m}i.setPosition(d),a.setPosition(v),i.rotation=a.rotation=r.rotation,x(i),x(a);function x(S){S.originX=c[0][0]-S.x,S.originY=c[1][0]-S.y}function _(S){return[[S.x,S.x+S.width],[S.y,S.y+S.height]]}function b(S,T,C,A,P){S[A]+=C[A][P]-T[A][P]}},t.prototype._createAxis=function(r,n){var i=n.getData(),a=n.get("axisType"),o=WXe(n,a);o.getTicks=function(){return i.mapArray(["value"],function(u){return{value:u}})};var s=i.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new VXe("value",o,r.axisExtent,a);return l.model=n,l},t.prototype._createGroup=function(r){var n=this[r]=new Ie;return this.group.add(n),n},t.prototype._renderAxisLine=function(r,n,i,a){var o=i.getExtent();if(a.get(["lineStyle","show"])){var s=new mr({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:ae({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(s);var l=this._progressLine=new mr({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:Oe({lineCap:"round",lineWidth:s.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});n.add(l)}},t.prototype._renderAxisTick=function(r,n,i,a){var o=this,s=a.getData(),l=i.scale.getTicks();this._tickSymbols=[],R(l,function(u){var c=i.dataToCoord(u.value),f=s.getItemModel(u.value),h=f.getModel("itemStyle"),d=f.getModel(["emphasis","itemStyle"]),v=f.getModel(["progress","itemStyle"]),m={x:c,y:0,onclick:_e(o._changeTimeline,o,u.value)},y=eU(f,h,n,m);y.ensureState("emphasis").style=d.getItemStyle(),y.ensureState("progress").style=v.getItemStyle(),eu(y);var x=ze(y);f.get("tooltip")?(x.dataIndex=u.value,x.dataModel=a):x.dataIndex=x.dataModel=null,o._tickSymbols.push(y)})},t.prototype._renderAxisLabel=function(r,n,i,a){var o=this,s=i.getLabelModel();if(s.get("show")){var l=a.getData(),u=i.getViewLabels();this._tickLabels=[],R(u,function(c){var f=c.tickValue,h=l.getItemModel(f),d=h.getModel("label"),v=h.getModel(["emphasis","label"]),m=h.getModel(["progress","label"]),y=i.dataToCoord(c.tickValue),x=new ot({x:y,y:0,rotation:r.labelRotation-r.rotation,onclick:_e(o._changeTimeline,o,f),silent:!1,style:kt(d,{text:c.formattedLabel,align:r.labelAlign,verticalAlign:r.labelBaseline})});x.ensureState("emphasis").style=kt(v),x.ensureState("progress").style=kt(m),n.add(x),eu(x),QH(x).dataIndex=f,o._tickLabels.push(x)})}},t.prototype._renderControl=function(r,n,i,a){var o=r.controlSize,s=r.rotation,l=a.getModel("controlStyle").getItemStyle(),u=a.getModel(["emphasis","controlStyle"]).getItemStyle(),c=a.getPlayState(),f=a.get("inverse",!0);h(r.nextBtnPosition,"next",_e(this._changeTimeline,this,f?"-":"+")),h(r.prevBtnPosition,"prev",_e(this._changeTimeline,this,f?"+":"-")),h(r.playPosition,c?"stop":"play",_e(this._handlePlayClick,this,!c),!0);function h(d,v,m,y){if(d){var x=Ja(Ae(a.get(["controlStyle",v+"BtnSize"]),o),o),_=[0,-x/2,x,x],b=UXe(a,v+"Icon",_,{x:d[0],y:d[1],originX:o/2,originY:0,rotation:y?-s:0,rectHover:!0,style:l,onclick:m});b.ensureState("emphasis").style=u,n.add(b),eu(b)}}},t.prototype._renderCurrentPointer=function(r,n,i,a){var o=a.getData(),s=a.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(f){f.draggable=!0,f.drift=_e(u._handlePointerDrag,u),f.ondragend=_e(u._handlePointerDragend,u),tU(f,u._progressLine,s,i,a,!0)},onUpdate:function(f){tU(f,u._progressLine,s,i,a)}};this._currentPointer=eU(l,l,this._mainGroup,{},this._currentPointer,c)},t.prototype._handlePlayClick=function(r){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:r,from:this.uid})},t.prototype._handlePointerDrag=function(r,n,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},t.prototype._handlePointerDragend=function(r){this._pointerChangeTimeline([r.offsetX,r.offsetY],!0)},t.prototype._pointerChangeTimeline=function(r,n){var i=this._toAxisCoord(r)[0],a=this._axis,o=Mi(a.getExtent().slice());i>o[1]&&(i=o[1]),i<o[0]&&(i=o[0]),this._currentPointer.x=i,this._currentPointer.markRedraw();var s=this._progressLine;s&&(s.shape.x2=i,s.dirty());var l=this._findNearestTick(i),u=this.model;(n||l!==u.getCurrentIndex()&&u.get("realtime"))&&this._changeTimeline(l)},t.prototype._doPlayStop=function(){var r=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var n=r.model;r._changeTimeline(n.getCurrentIndex()+(n.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},t.prototype._toAxisCoord=function(r){var n=this._mainGroup.getLocalTransform();return Ua(r,n,!0)},t.prototype._findNearestTick=function(r){var n=this.model.getData(),i=1/0,a,o=this._axis;return n.each(["value"],function(s,l){var u=o.dataToCoord(s),c=Math.abs(u-r);c<i&&(i=c,a=l)}),a},t.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},t.prototype._changeTimeline=function(r){var n=this.model.getCurrentIndex();r==="+"?r=n+1:r==="-"&&(r=n-1),this.api.dispatchAction({type:"timelineChange",currentIndex:r,from:this.uid})},t.prototype._updateTicksStatus=function(){var r=this.model.getCurrentIndex(),n=this._tickSymbols,i=this._tickLabels;if(n)for(var a=0;a<n.length;a++)n&&n[a]&&n[a].toggleState("progress",a<r);if(i)for(var a=0;a<i.length;a++)i&&i[a]&&i[a].toggleState("progress",QH(i[a]).dataIndex<=r)},t.type="timeline.slider",t}(FXe);function WXe(e,t){if(t=t||e.get("type"),t)switch(t){case"category":return new iv({ordinalMeta:e.getCategories(),extent:[1/0,-1/0]});case"time":return new Nj({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new qs}}function HXe(e,t){return $t(e.getBoxLayoutParams(),zr(e,t).refContainer,e.get("padding"))}function UXe(e,t,r,n){var i=n.style,a=Gv(e.get(["controlStyle",t]),n||{},new je(r[0],r[1],r[2],r[3]));return i&&a.setStyle(i),a}function eU(e,t,r,n,i,a){var o=t.get("color");if(i)i.setColor(o),r.add(i),a&&a.onUpdate(i);else{var s=e.get("symbol");i=xr(s,-1,-1,2,2,o),i.setStyle("strokeNoScale",!0),r.add(i),a&&a.onCreate(i)}var l=t.getItemStyle(["color"]);i.setStyle(l),n=Ue({rectHover:!0,z2:100},n,!0);var u=qv(e.get("symbolSize"));n.scaleX=u[0]/2,n.scaleY=u[1]/2;var c=Nf(e.get("symbolOffset"),u);c&&(n.x=(n.x||0)+c[0],n.y=(n.y||0)+c[1]);var f=e.get("symbolRotate");return n.rotation=(f||0)*Math.PI/180||0,i.attr(n),i.updateTransform(),i}function tU(e,t,r,n,i,a){if(!e.dragging){var o=i.getModel("checkpointStyle"),s=n.dataToCoord(i.getData().get("value",r));if(a||!o.get("animation",!0))e.attr({x:s,y:0}),t&&t.attr({shape:{x2:s}});else{var l={duration:o.get("animationDuration",!0),easing:o.get("animationEasing",!0)};e.stopAnimation(null,!0),e.animateTo({x:s,y:0},l),t&&t.animateTo({shape:{x2:s}},l)}}}function ZXe(e){e.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,r,n){var i=r.getComponent("timeline");return i&&t.currentIndex!=null&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.getPlayState()&&(i.setPlayState(!1),n.dispatchAction({type:"timelinePlayChange",playState:!1,from:t.from}))),r.resetOption("timeline",{replaceMerge:i.get("replaceMerge",!0)}),Oe({currentIndex:i.option.currentIndex},t)}),e.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,r){var n=r.getComponent("timeline");n&&t.playState!=null&&n.setPlayState(t.playState)})}function YXe(e){var t=e&&e.timeline;oe(t)||(t=t?[t]:[]),R(t,function(r){r&&XXe(r)})}function XXe(e){var t=e.type,r={number:"value",time:"time"};if(r[t]&&(e.axisType=r[t],delete e.type),rU(e),Tc(e,"controlPosition")){var n=e.controlStyle||(e.controlStyle={});Tc(n,"position")||(n.position=e.controlPosition),n.position==="none"&&!Tc(n,"show")&&(n.show=!1,delete n.position),delete e.controlPosition}R(e.data||[],function(i){Ee(i)&&!oe(i)&&(!Tc(i,"value")&&Tc(i,"name")&&(i.value=i.name),rU(i))})}function rU(e){var t=e.itemStyle||(e.itemStyle={}),r=t.emphasis||(t.emphasis={}),n=e.label||e.label||{},i=n.normal||(n.normal={}),a={normal:1,emphasis:1};R(n,function(o,s){!a[s]&&!Tc(i,s)&&(i[s]=o)}),r.label&&!Tc(n,"emphasis")&&(n.emphasis=r.label,delete r.label)}function Tc(e,t){return e.hasOwnProperty(t)}function qXe(e){e.registerComponentModel(Pie),e.registerComponentView(GXe),e.registerSubTypeDefaulter("timeline",function(){return"slider"}),ZXe(e),e.registerPreprocessor(YXe)}function GR(e,t){if(!e)return!1;for(var r=oe(e)?e:[e],n=0;n<r.length;n++)if(r[n]&&r[n][t])return!0;return!1}function j_(e){ff(e,"label",["show"])}var R_=et(),Xo=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.createdBySelf=!1,r.preventAutoZ=!0,r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),this._mergeOption(r,i,!1,!0)},t.prototype.isAnimationEnabled=function(){if(it.node)return!1;var r=this.__hostSeries;return this.getShallow("animation")&&r&&r.isAnimationEnabled()},t.prototype.mergeOption=function(r,n){this._mergeOption(r,n,!1,!1)},t.prototype._mergeOption=function(r,n,i,a){var o=this.mainType;i||n.eachSeries(function(s){var l=s.get(this.mainType,!0),u=R_(s)[o];if(!l||!l.data){R_(s)[o]=null;return}u?u._mergeOption(l,n,!0):(a&&j_(l),R(l.data,function(c){c instanceof Array?(j_(c[0]),j_(c[1])):j_(c)}),u=this.createMarkerModelFromSeries(l,this,n),ae(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),R_(s)[o]=u},this)},t.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=this.getRawValue(r),s=a.getName(r);return Mr("section",{header:this.name,blocks:[Mr("nameValue",{name:s,value:o,noName:!s,noValue:o==null})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(r){this._data=r},t.prototype.getDataParams=function(r,n){var i=XT.prototype.getDataParams.call(this,r,n),a=this.__hostSeries;return a&&(i.seriesId=a.id,i.seriesName=a.name,i.seriesType=a.subType),i},t.getMarkerModelFromSeries=function(r,n){return R_(r)[n]},t.type="marker",t.dependencies=["series","grid","polar","geo"],t}(Qe);cr(Xo,XT.prototype);var KXe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.createMarkerModelFromSeries=function(r,n,i){return new t(r,n,i)},t.type="markPoint",t.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},t}(Xo);function XO(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function JXe(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}function B_(e,t,r,n,i,a,o){var s=[],l=Xs(t,i),u=l?t.getCalculationInfo("stackResultDimension"):i,c=nS(t,u,e),f=t.hostModel,h=f.indicesOfNearest(r,u,c)[0];s[a]=t.get(n,h),s[o]=t.get(u,h);var d=t.get(i,h),v=$a(t.get(i,h));return v=Math.min(v,20),v>=0&&(s[o]=+s[o].toFixed(v)),[s,d]}var z_={min:We(B_,"min"),max:We(B_,"max"),average:We(B_,"average"),median:We(B_,"median")};function Gy(e,t){if(t){var r=e.getData(),n=e.coordinateSystem,i=n&&n.dimensions;if(!JXe(t)&&!oe(t.coord)&&oe(i)){var a=kie(t,r,n,e);if(t=Le(t),t.type&&z_[t.type]&&a.baseAxis&&a.valueAxis){var o=He(i,a.baseAxis.dim),s=He(i,a.valueAxis.dim),l=z_[t.type](r,a.valueAxis.dim,a.baseDataDim,a.valueDataDim,o,s);t.coord=l[0],t.value=l[1]}else t.coord=[t.xAxis!=null?t.xAxis:t.radiusAxis,t.yAxis!=null?t.yAxis:t.angleAxis]}if(t.coord==null||!oe(i)){t.coord=[];var u=e.getBaseAxis();if(u&&t.type&&z_[t.type]){var c=n.getOtherAxis(u);c&&(t.value=nS(r,r.mapDimension(c.dim),t.type))}}else for(var f=t.coord,h=0;h<2;h++)z_[f[h]]&&(f[h]=nS(r,r.mapDimension(i[h]),f[h]));return t}}function kie(e,t,r,n){var i={};return e.valueIndex!=null||e.valueDim!=null?(i.valueDataDim=e.valueIndex!=null?t.getDimension(e.valueIndex):e.valueDim,i.valueAxis=r.getAxis(QXe(n,i.valueDataDim)),i.baseAxis=r.getOtherAxis(i.valueAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim)):(i.baseAxis=n.getBaseAxis(),i.valueAxis=r.getOtherAxis(i.baseAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim),i.valueDataDim=t.mapDimension(i.valueAxis.dim)),i}function QXe(e,t){var r=e.getData().getDimensionInfo(t);return r&&r.coordDim}function Wy(e,t){return e&&e.containData&&t.coord&&!XO(t)?e.containData(t.coord):!0}function eqe(e,t,r){return e&&e.containZone&&t.coord&&r.coord&&!XO(t)&&!XO(r)?e.containZone(t.coord,r.coord):!0}function Lie(e,t){return e?function(r,n,i,a){var o=a<2?r.coord&&r.coord[a]:r.value;return nu(o,t[a])}:function(r,n,i,a){return nu(r.value,t[a])}}function nS(e,t,r){if(r==="average"){var n=0,i=0;return e.each(t,function(a,o){isNaN(a)||(n+=a,i++)}),n/i}else return r==="median"?e.getMedian(t):e.getDataExtent(t)[r==="max"?1:0]}var uP=et(),WR=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(){this.markerGroupMap=Ce()},t.prototype.render=function(r,n,i){var a=this,o=this.markerGroupMap;o.each(function(s){uP(s).keep=!1}),n.eachSeries(function(s){var l=Xo.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,n,i)}),o.each(function(s){!uP(s).keep&&a.group.remove(s.group)}),tqe(n,o,this.type)},t.prototype.markKeep=function(r){uP(r).keep=!0},t.prototype.toggleBlurSeries=function(r,n){var i=this;R(r,function(a){var o=Xo.getMarkerModelFromSeries(a,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?HJ(l):zN(l))})}})},t.type="marker",t}(It);function tqe(e,t,r){e.eachSeries(function(n){var i=Xo.getMarkerModelFromSeries(n,r),a=t.get(n.id);if(i&&a&&a.group){var o=gf(i),s=o.z,l=o.zlevel;HT(a.group,s,l)}})}function nU(e,t,r){var n=t.coordinateSystem,i=r.getWidth(),a=r.getHeight(),o=n&&n.getArea&&n.getArea();e.each(function(s){var l=e.getItemModel(s),u=l.get("relativeTo")==="coordinate",c=u?o?o.width:0:i,f=u?o?o.height:0:a,h=u&&o?o.x:0,d=u&&o?o.y:0,v,m=me(l.get("x"),c)+h,y=me(l.get("y"),f)+d;if(!isNaN(m)&&!isNaN(y))v=[m,y];else if(t.getMarkerPosition)v=t.getMarkerPosition(e.getValues(e.dimensions,s));else if(n){var x=e.get(n.dimensions[0],s),_=e.get(n.dimensions[1],s);v=n.dataToPoint([x,_])}isNaN(m)||(v[0]=m),isNaN(y)||(v[1]=y),e.setItemLayout(s,v)})}var rqe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=Xo.getMarkerModelFromSeries(a,"markPoint");o&&(nU(o.getData(),a,i),this.markerGroupMap.get(a.id).updateLayout())},this)},t.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new T0),f=nqe(o,r,n);n.setData(f),nU(n.getData(),r,a),f.each(function(h){var d=f.getItemModel(h),v=d.getShallow("symbol"),m=d.getShallow("symbolSize"),y=d.getShallow("symbolRotate"),x=d.getShallow("symbolOffset"),_=d.getShallow("symbolKeepAspect");if(ke(v)||ke(m)||ke(y)||ke(x)){var b=n.getRawValue(h),S=n.getDataParams(h);ke(v)&&(v=v(b,S)),ke(m)&&(m=m(b,S)),ke(y)&&(y=y(b,S)),ke(x)&&(x=x(b,S))}var T=d.getModel("itemStyle").getItemStyle(),C=d.get("z2"),A=b0(l,"color");T.fill||(T.fill=A),f.setItemVisual(h,{z2:Ae(C,0),symbol:v,symbolSize:m,symbolRotate:y,symbolOffset:x,symbolKeepAspect:_,style:T})}),c.updateData(f),this.group.add(c.group),f.eachItemGraphicEl(function(h){h.traverse(function(d){ze(d).dataModel=n})}),this.markKeep(c),c.group.silent=n.get("silent")||r.get("silent")},t.type="markPoint",t}(WR);function nqe(e,t,r){var n;e?n=le(e&&e.dimensions,function(s){var l=t.getData().getDimensionInfo(t.getData().mapDimension(s))||{};return ae(ae({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new Rn(n,r),a=le(r.get("data"),We(Gy,t));e&&(a=dt(a,We(Wy,e)));var o=Lie(!!e,n);return i.initData(a,null,o),i}function iqe(e){e.registerComponentModel(KXe),e.registerComponentView(rqe),e.registerPreprocessor(function(t){GR(t.series,"markPoint")&&(t.markPoint=t.markPoint||{})})}var aqe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.createMarkerModelFromSeries=function(r,n,i){return new t(r,n,i)},t.type="markLine",t.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},t}(Xo),$_=et(),oqe=function(e,t,r,n){var i=e.getData(),a;if(oe(n))a=n;else{var o=n.type;if(o==="min"||o==="max"||o==="average"||o==="median"||n.xAxis!=null||n.yAxis!=null){var s=void 0,l=void 0;if(n.yAxis!=null||n.xAxis!=null)s=t.getAxis(n.yAxis!=null?"y":"x"),l=on(n.yAxis,n.xAxis);else{var u=kie(n,i,t,e);s=u.valueAxis;var c=Oj(i,u.valueDataDim);l=nS(i,c,o)}var f=s.dim==="x"?0:1,h=1-f,d=Le(n),v={coord:[]};d.type=null,d.coord=[],d.coord[h]=-1/0,v.coord[h]=1/0;var m=r.get("precision");m>=0&&st(l)&&(l=+l.toFixed(Math.min(m,20))),d.coord[f]=v.coord[f]=l,a=[d,v,{type:o,valueIndex:n.valueIndex,value:l}]}else a=[]}var y=[Gy(e,a[0]),Gy(e,a[1]),ae({},a[2])];return y[2].type=y[2].type||null,Ue(y[2],y[0]),Ue(y[2],y[1]),y};function iS(e){return!isNaN(e)&&!isFinite(e)}function iU(e,t,r,n){var i=1-e,a=n.dimensions[e];return iS(t[i])&&iS(r[i])&&t[e]===r[e]&&n.getAxis(a).containData(t[e])}function sqe(e,t){if(e.type==="cartesian2d"){var r=t[0].coord,n=t[1].coord;if(r&&n&&(iU(1,r,n,e)||iU(0,r,n,e)))return!0}return Wy(e,t[0])&&Wy(e,t[1])}function cP(e,t,r,n,i){var a=n.coordinateSystem,o=e.getItemModel(t),s,l=me(o.get("x"),i.getWidth()),u=me(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition)s=n.getMarkerPosition(e.getValues(e.dimensions,t));else{var c=a.dimensions,f=e.get(c[0],t),h=e.get(c[1],t);s=a.dataToPoint([f,h])}if(du(a,"cartesian2d")){var d=a.getAxis("x"),v=a.getAxis("y"),c=a.dimensions;iS(e.get(c[0],t))?s[0]=d.toGlobalCoord(d.getExtent()[r?0:1]):iS(e.get(c[1],t))&&(s[1]=v.toGlobalCoord(v.getExtent()[r?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}e.setItemLayout(t,s)}var lqe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=Xo.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=$_(o).from,u=$_(o).to;l.each(function(c){cP(l,c,!0,a,i),cP(u,c,!1,a,i)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},t.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new uR);this.group.add(c.group);var f=uqe(o,r,n),h=f.from,d=f.to,v=f.line;$_(n).from=h,$_(n).to=d,n.setData(v);var m=n.get("symbol"),y=n.get("symbolSize"),x=n.get("symbolRotate"),_=n.get("symbolOffset");oe(m)||(m=[m,m]),oe(y)||(y=[y,y]),oe(x)||(x=[x,x]),oe(_)||(_=[_,_]),f.from.each(function(S){b(h,S,!0),b(d,S,!1)}),v.each(function(S){var T=v.getItemModel(S),C=T.getModel("lineStyle").getLineStyle();v.setItemLayout(S,[h.getItemLayout(S),d.getItemLayout(S)]);var A=T.get("z2");C.stroke==null&&(C.stroke=h.getItemVisual(S,"style").fill),v.setItemVisual(S,{z2:Ae(A,0),fromSymbolKeepAspect:h.getItemVisual(S,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(S,"symbolOffset"),fromSymbolRotate:h.getItemVisual(S,"symbolRotate"),fromSymbolSize:h.getItemVisual(S,"symbolSize"),fromSymbol:h.getItemVisual(S,"symbol"),toSymbolKeepAspect:d.getItemVisual(S,"symbolKeepAspect"),toSymbolOffset:d.getItemVisual(S,"symbolOffset"),toSymbolRotate:d.getItemVisual(S,"symbolRotate"),toSymbolSize:d.getItemVisual(S,"symbolSize"),toSymbol:d.getItemVisual(S,"symbol"),style:C})}),c.updateData(v),f.line.eachItemGraphicEl(function(S){ze(S).dataModel=n,S.traverse(function(T){ze(T).dataModel=n})});function b(S,T,C){var A=S.getItemModel(T);cP(S,T,C,r,a);var P=A.getModel("itemStyle").getItemStyle();P.fill==null&&(P.fill=b0(l,"color")),S.setItemVisual(T,{symbolKeepAspect:A.get("symbolKeepAspect"),symbolOffset:Ae(A.get("symbolOffset",!0),_[C?0:1]),symbolRotate:Ae(A.get("symbolRotate",!0),x[C?0:1]),symbolSize:Ae(A.get("symbolSize"),y[C?0:1]),symbol:Ae(A.get("symbol",!0),m[C?0:1]),style:P})}this.markKeep(c),c.group.silent=n.get("silent")||r.get("silent")},t.type="markLine",t}(WR);function uqe(e,t,r){var n;e?n=le(e&&e.dimensions,function(u){var c=t.getData().getDimensionInfo(t.getData().mapDimension(u))||{};return ae(ae({},c),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new Rn(n,r),a=new Rn(n,r),o=new Rn([],r),s=le(r.get("data"),We(oqe,t,e,r));e&&(s=dt(s,We(sqe,e)));var l=Lie(!!e,n);return i.initData(le(s,function(u){return u[0]}),null,l),a.initData(le(s,function(u){return u[1]}),null,l),o.initData(le(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function cqe(e){e.registerComponentModel(aqe),e.registerComponentView(lqe),e.registerPreprocessor(function(t){GR(t.series,"markLine")&&(t.markLine=t.markLine||{})})}var fqe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.createMarkerModelFromSeries=function(r,n,i){return new t(r,n,i)},t.type="markArea",t.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},t}(Xo),F_=et(),hqe=function(e,t,r,n){var i=n[0],a=n[1];if(!(!i||!a)){var o=Gy(e,i),s=Gy(e,a),l=o.coord,u=s.coord;l[0]=on(l[0],-1/0),l[1]=on(l[1],-1/0),u[0]=on(u[0],1/0),u[1]=on(u[1],1/0);var c=PT([{},o,s]);return c.coord=[o.coord,s.coord],c.x0=o.x,c.y0=o.y,c.x1=s.x,c.y1=s.y,c}};function aS(e){return!isNaN(e)&&!isFinite(e)}function aU(e,t,r,n){var i=1-e;return aS(t[i])&&aS(r[i])}function dqe(e,t){var r=t.coord[0],n=t.coord[1],i={coord:r,x:t.x0,y:t.y0},a={coord:n,x:t.x1,y:t.y1};return du(e,"cartesian2d")?r&&n&&(aU(1,r,n)||aU(0,r,n))?!0:eqe(e,i,a):Wy(e,i)||Wy(e,a)}function oU(e,t,r,n,i){var a=n.coordinateSystem,o=e.getItemModel(t),s,l=me(o.get(r[0]),i.getWidth()),u=me(o.get(r[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition){var c=e.getValues(["x0","y0"],t),f=e.getValues(["x1","y1"],t),h=a.clampData(c),d=a.clampData(f),v=[];r[0]==="x0"?v[0]=h[0]>d[0]?f[0]:c[0]:v[0]=h[0]>d[0]?c[0]:f[0],r[1]==="y0"?v[1]=h[1]>d[1]?f[1]:c[1]:v[1]=h[1]>d[1]?c[1]:f[1],s=n.getMarkerPosition(v,r,!0)}else{var m=e.get(r[0],t),y=e.get(r[1],t),x=[m,y];a.clampData&&a.clampData(x,x),s=a.dataToPoint(x,!0)}if(du(a,"cartesian2d")){var _=a.getAxis("x"),b=a.getAxis("y"),m=e.get(r[0],t),y=e.get(r[1],t);aS(m)?s[0]=_.toGlobalCoord(_.getExtent()[r[0]==="x0"?0:1]):aS(y)&&(s[1]=b.toGlobalCoord(b.getExtent()[r[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var sU=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],vqe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=Xo.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=le(sU,function(f){return oU(s,l,f,a,i)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},t.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new Ie});this.group.add(c.group),this.markKeep(c);var f=pqe(o,r,n);n.setData(f),f.each(function(h){var d=le(sU,function(k){return oU(f,h,k,r,a)}),v=o.getAxis("x").scale,m=o.getAxis("y").scale,y=v.getExtent(),x=m.getExtent(),_=[v.parse(f.get("x0",h)),v.parse(f.get("x1",h))],b=[m.parse(f.get("y0",h)),m.parse(f.get("y1",h))];Mi(_),Mi(b);var S=!(y[0]>_[1]||y[1]<_[0]||x[0]>b[1]||x[1]<b[0]),T=!S;f.setItemLayout(h,{points:d,allClipped:T});var C=f.getItemModel(h),A=C.getModel("itemStyle").getItemStyle(),P=C.get("z2"),I=b0(l,"color");A.fill||(A.fill=I,ye(A.fill)&&(A.fill=my(A.fill,.4))),A.stroke||(A.stroke=I),f.setItemVisual(h,"style",A),f.setItemVisual(h,"z2",Ae(P,0))}),f.diff(F_(c).data).add(function(h){var d=f.getItemLayout(h),v=f.getItemVisual(h,"z2");if(!d.allClipped){var m=new Tn({z2:Ae(v,0),shape:{points:d.points}});f.setItemGraphicEl(h,m),c.group.add(m)}}).update(function(h,d){var v=F_(c).data.getItemGraphicEl(d),m=f.getItemLayout(h),y=f.getItemVisual(h,"z2");m.allClipped?v&&c.group.remove(v):(v?ut(v,{z2:Ae(y,0),shape:{points:m.points}},n,h):v=new Tn({shape:{points:m.points}}),f.setItemGraphicEl(h,v),c.group.add(v))}).remove(function(h){var d=F_(c).data.getItemGraphicEl(h);c.group.remove(d)}).execute(),f.eachItemGraphicEl(function(h,d){var v=f.getItemModel(d),m=f.getItemVisual(d,"style");h.useStyle(f.getItemVisual(d,"style")),qr(h,Br(v),{labelFetcher:n,labelDataIndex:d,defaultText:f.getName(d)||"",inheritColor:ye(m.fill)?my(m.fill,1):J.color.neutral99}),Rr(h,v),Gt(h,null,null,v.get(["emphasis","disabled"])),ze(h).dataModel=n}),F_(c).data=f,c.group.silent=n.get("silent")||r.get("silent")},t.type="markArea",t}(WR);function pqe(e,t,r){var n,i,a=["x0","y0","x1","y1"];if(e){var o=le(e&&e.dimensions,function(u){var c=t.getData(),f=c.getDimensionInfo(c.mapDimension(u))||{};return ae(ae({},f),{name:u,ordinalMeta:null})});i=le(a,function(u,c){return{name:u,type:o[c%2].type}}),n=new Rn(i,r)}else i=[{name:"value",type:"float"}],n=new Rn(i,r);var s=le(r.get("data"),We(hqe,t,e,r));e&&(s=dt(s,We(dqe,e)));var l=e?function(u,c,f,h){var d=u.coord[Math.floor(h/2)][h%2];return nu(d,i[h])}:function(u,c,f,h){return nu(u.value,i[h])};return n.initData(s,null,l),n.hasItemOption=!0,n}function gqe(e){e.registerComponentModel(fqe),e.registerComponentView(vqe),e.registerPreprocessor(function(t){GR(t.series,"markArea")&&(t.markArea=t.markArea||{})})}var mqe=function(e,t){if(t==="all")return{type:"all",title:e.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:e.getLocaleModel().get(["legend","selector","inverse"])}},qO=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode={type:"box",ignoreSize:!0},r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),r.selected=r.selected||{},this._updateSelector(r)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),this._updateSelector(r)},t.prototype._updateSelector=function(r){var n=r.selector,i=this.ecModel;n===!0&&(n=r.selector=["all","inverse"]),oe(n)&&R(n,function(a,o){ye(a)&&(a={type:a}),n[o]=Ue(a,mqe(i,a.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var r=this._data;if(r[0]&&this.get("selectedMode")==="single"){for(var n=!1,i=0;i<r.length;i++){var a=r[i].get("name");if(this.isSelected(a)){this.select(a),n=!0;break}}!n&&this.select(r[0].get("name"))}},t.prototype._updateData=function(r){var n=[],i=[];r.eachRawSeries(function(l){var u=l.name;i.push(u);var c;if(l.legendVisualProvider){var f=l.legendVisualProvider,h=f.getAllNames();r.isSeriesFiltered(l)||(i=i.concat(h)),h.length?n=n.concat(h):c=!0}else c=!0;c&&LN(l)&&n.push(l.name)}),this._availableNames=i;var a=this.get("data")||n,o=Ce(),s=le(a,function(l){return(ye(l)||st(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new rt(l,this,this.ecModel))},this);this._data=dt(s,function(l){return!!l})},t.prototype.getData=function(){return this._data},t.prototype.select=function(r){var n=this.option.selected,i=this.get("selectedMode");if(i==="single"){var a=this._data;R(a,function(o){n[o.get("name")]=!1})}n[r]=!0},t.prototype.unSelect=function(r){this.get("selectedMode")!=="single"&&(this.option.selected[r]=!1)},t.prototype.toggleSelected=function(r){var n=this.option.selected;n.hasOwnProperty(r)||(n[r]=!0),this[n[r]?"unSelect":"select"](r)},t.prototype.allSelect=function(){var r=this._data,n=this.option.selected;R(r,function(i){n[i.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var r=this._data,n=this.option.selected;R(r,function(i){var a=i.get("name",!0);n.hasOwnProperty(a)||(n[a]=!0),n[a]=!n[a]})},t.prototype.isSelected=function(r){var n=this.option.selected;return!(n.hasOwnProperty(r)&&!n[r])&&He(this._availableNames,r)>=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:J.size.m,align:"auto",backgroundColor:J.color.transparent,borderColor:J.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:J.color.disabled,inactiveBorderColor:J.color.disabled,inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:J.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:J.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:J.color.tertiary,borderWidth:1,borderColor:J.color.border},emphasis:{selectorLabel:{show:!0,color:J.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(Qe),bh=We,KO=R,V_=Ie,Iie=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!1,r}return t.prototype.init=function(){this.group.add(this._contentGroup=new V_),this.group.add(this._selectorGroup=new V_),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(r,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),s=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&s==="vertical"?"right":"left");var l=r.get("selector",!0),u=r.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,r,n,i,l,s,u);var c=zr(r,i).refContainer,f=r.getBoxLayoutParams(),h=r.get("padding"),d=$t(f,c,h),v=this.layoutInner(r,o,d,a,l,u),m=$t(Oe({width:v.width,height:v.height},f),c,h);this.group.x=m.x-v.x,this.group.y=m.y-v.y,this.group.markRedraw(),this.group.add(this._backgroundEl=xie(v,r))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this.getContentGroup(),c=Ce(),f=n.get("selectedMode"),h=n.get("triggerEvent"),d=[];i.eachRawSeries(function(v){!v.get("legendHoverLink")&&d.push(v.id)}),KO(n.getData(),function(v,m){var y=this,x=v.get("name");if(!this.newlineDisabled&&(x===""||x===`
`)){var _=new V_;_.newline=!0,u.add(_);return}var b=i.getSeriesByName(x)[0];if(!c.get(x))if(b){var S=b.getData(),T=S.getVisual("legendLineStyle")||{},C=S.getVisual("legendIcon"),A=S.getVisual("style"),P=this._createItem(b,x,m,v,n,r,T,A,C,f,a);P.on("click",bh(lU,x,null,a,d)).on("mouseover",bh(JO,b.name,null,a,d)).on("mouseout",bh(QO,b.name,null,a,d)),i.ssr&&P.eachChild(function(I){var k=ze(I);k.seriesIndex=b.seriesIndex,k.dataIndex=m,k.ssrType="legend"}),h&&P.eachChild(function(I){y.packEventData(I,n,b,m,x)}),c.set(x,!0)}else i.eachRawSeries(function(I){var k=this;if(!c.get(x)&&I.legendVisualProvider){var E=I.legendVisualProvider;if(!E.containName(x))return;var D=E.indexOfName(x),N=E.getItemVisual(D,"style"),z=E.getItemVisual(D,"legendIcon"),V=jn(N.fill);V&&V[3]===0&&(V[3]=.2,N=ae(ae({},N),{fill:ua(V,"rgba")}));var F=this._createItem(I,x,m,v,n,r,{},N,z,f,a);F.on("click",bh(lU,null,x,a,d)).on("mouseover",bh(JO,null,x,a,d)).on("mouseout",bh(QO,null,x,a,d)),i.ssr&&F.eachChild(function($){var B=ze($);B.seriesIndex=I.seriesIndex,B.dataIndex=m,B.ssrType="legend"}),h&&F.eachChild(function($){k.packEventData($,n,I,m,x)}),c.set(x,!0)}},this)},this),o&&this._createSelector(o,n,a,s,l)},t.prototype.packEventData=function(r,n,i,a,o){var s={componentType:"legend",componentIndex:n.componentIndex,dataIndex:a,value:o,seriesIndex:i.seriesIndex};ze(r).eventData=s},t.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();KO(r,function(u){var c=u.type,f=new ot({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});s.add(f);var h=n.getModel("selectorLabel"),d=n.getModel(["emphasis","selectorLabel"]);qr(f,{normal:h,emphasis:d},{defaultText:u.title}),eu(f)})},t.prototype._createItem=function(r,n,i,a,o,s,l,u,c,f,h){var d=r.visualDrawType,v=o.get("itemWidth"),m=o.get("itemHeight"),y=o.isSelected(n),x=a.get("symbolRotate"),_=a.get("symbolKeepAspect"),b=a.get("icon");c=b||c||"roundRect";var S=yqe(c,a,l,u,d,y,h),T=new V_,C=a.getModel("textStyle");if(ke(r.getLegendIcon)&&(!b||b==="inherit"))T.add(r.getLegendIcon({itemWidth:v,itemHeight:m,icon:c,iconRotate:x,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:_}));else{var A=b==="inherit"&&r.getData().getVisual("symbol")?x==="inherit"?r.getData().getVisual("symbolRotate"):x:0;T.add(xqe({itemWidth:v,itemHeight:m,icon:c,iconRotate:A,itemStyle:S.itemStyle,symbolKeepAspect:_}))}var P=s==="left"?v+5:-5,I=s,k=o.get("formatter"),E=n;ye(k)&&k?E=k.replace("{name}",n??""):ke(k)&&(E=k(n));var D=y?C.getTextColor():a.get("inactiveColor");T.add(new ot({style:kt(C,{text:E,x:P,y:m/2,fill:D,align:I,verticalAlign:"middle"},{inheritColor:D})}));var N=new qe({shape:T.getBoundingRect(),style:{fill:"transparent"}}),z=a.getModel("tooltip");return z.get("show")&&il({el:N,componentModel:o,itemName:n,itemTooltipOption:z.option}),T.add(N),T.eachChild(function(V){V.silent=!0}),N.silent=!f,this.getContentGroup().add(T),eu(T),T.__legendDataIndex=i,T},t.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Yc(r.get("orient"),l,r.get("itemGap"),i.width,i.height);var c=l.getBoundingRect(),f=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){Yc("horizontal",u,r.get("selectorItemGap",!0));var h=u.getBoundingRect(),d=[-h.x,-h.y],v=r.get("selectorButtonGap",!0),m=r.getOrient().index,y=m===0?"width":"height",x=m===0?"height":"width",_=m===0?"y":"x";s==="end"?d[m]+=c[y]+v:f[m]+=h[y]+v,d[1-m]+=c[x]/2-h[x]/2,u.x=d[0],u.y=d[1],l.x=f[0],l.y=f[1];var b={x:0,y:0};return b[y]=c[y]+v+h[y],b[x]=Math.max(c[x],h[x]),b[_]=Math.min(0,h[_]+d[1-m]),b}else return l.x=f[0],l.y=f[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(It);function yqe(e,t,r,n,i,a,o){function s(y,x){y.lineWidth==="auto"&&(y.lineWidth=x.lineWidth>0?2:0),KO(y,function(_,b){y[b]==="inherit"&&(y[b]=x[b])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),c=e.lastIndexOf("empty",0)===0?"fill":"stroke",f=l.getShallow("decal");u.decal=!f||f==="inherit"?n.decal:nv(f,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[c]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:r).opacity),s(u,n);var h=t.getModel("lineStyle"),d=h.getLineStyle();if(s(d,r),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),d.stroke==="auto"&&(d.stroke=n.fill),!a){var v=t.get("inactiveBorderWidth"),m=u[c];u.lineWidth=v==="auto"?n.lineWidth>0&&m?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),d.stroke=h.get("inactiveColor"),d.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:d}}function xqe(e){var t=e.icon||"roundRect",r=xr(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return r.setStyle(e.itemStyle),r.rotation=(e.iconRotate||0)*Math.PI/180,r.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill=J.color.neutral00,r.style.lineWidth=2),r}function lU(e,t,r,n){QO(e,t,r,n),r.dispatchAction({type:"legendToggleSelect",name:e??t}),JO(e,t,r,n)}function Oie(e){for(var t=e.getZr().storage.getDisplayList(),r,n=0,i=t.length;n<i&&!(r=t[n].states.emphasis);)n++;return r&&r.hoverLayer}function JO(e,t,r,n){Oie(r)||r.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:n})}function QO(e,t,r,n){Oie(r)||r.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:n})}function _qe(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries(function(r){for(var n=0;n<t.length;n++)if(!t[n].isSelected(r.name))return!1;return!0})}function ug(e,t,r){var n=e==="allSelect"||e==="inverseSelect",i={},a=[];r.eachComponent({mainType:"legend",query:t},function(s){n?s[e]():s[e](t.name),uU(s,i),a.push(s.componentIndex)});var o={};return r.eachComponent("legend",function(s){R(i,function(l,u){s[l?"select":"unSelect"](u)}),uU(s,o)}),n?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function uU(e,t){var r=t||{};return R(e.getData(),function(n){var i=n.get("name");if(!(i===`
`||i==="")){var a=e.isSelected(i);Se(r,i)?r[i]=r[i]&&a:r[i]=a}}),r}function bqe(e){e.registerAction("legendToggleSelect","legendselectchanged",We(ug,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",We(ug,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",We(ug,"inverseSelect")),e.registerAction("legendSelect","legendselected",We(ug,"select")),e.registerAction("legendUnSelect","legendunselected",We(ug,"unSelect"))}function Eie(e){e.registerComponentModel(qO),e.registerComponentView(Iie),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,_qe),e.registerSubTypeDefaulter("legend",function(){return"plain"}),bqe(e)}var wqe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.setScrollDataIndex=function(r){this.option.scrollDataIndex=r},t.prototype.init=function(r,n,i){var a=Ef(r);e.prototype.init.call(this,r,n,i),cU(this,r,a)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),cU(this,this.option,r)},t.type="legend.scroll",t.defaultOption=ku(qO.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:J.color.accent50,pageIconInactiveColor:J.color.accent10,pageIconSize:15,pageTextStyle:{color:J.color.tertiary},animationDurationUpdate:800}),t}(qO);function cU(e,t,r){var n=e.getOrient(),i=[1,1];i[n.index]=0,Zo(t,r,{type:"box",ignoreSize:!!i})}var fU=Ie,fP=["width","height"],hP=["x","y"],Sqe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!0,r._currentIndex=0,r}return t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new fU),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new fU)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this;e.prototype.renderInner.call(this,r,n,i,a,o,s,l);var c=this._controllerGroup,f=n.get("pageIconSize",!0),h=oe(f)?f:[f,f];v("pagePrev",0);var d=n.getModel("pageTextStyle");c.add(new ot({name:"pageText",style:{text:"xx/xx",fill:d.getTextColor(),font:d.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),v("pageNext",1);function v(m,y){var x=m+"DataIndex",_=Gv(n.get("pageIcons",!0)[n.getOrient().name][y],{onclick:_e(u._pageGo,u,x,n,a)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});_.name=m,c.add(_)}},t.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getSelectorGroup(),u=r.getOrient().index,c=fP[u],f=hP[u],h=fP[1-u],d=hP[1-u];o&&Yc("horizontal",l,r.get("selectorItemGap",!0));var v=r.get("selectorButtonGap",!0),m=l.getBoundingRect(),y=[-m.x,-m.y],x=Le(i);o&&(x[c]=i[c]-m[c]-v);var _=this._layoutContentAndController(r,a,x,u,c,h,d,f);if(o){if(s==="end")y[u]+=_[c]+v;else{var b=m[c]+v;y[u]-=b,_[f]-=b}_[c]+=m[c]+v,y[1-u]+=_[d]+_[h]/2-m[h]/2,_[h]=Math.max(_[h],m[h]),_[d]=Math.min(_[d],m[d]+y[1-u]),l.x=y[0],l.y=y[1],l.markRedraw()}return _},t.prototype._layoutContentAndController=function(r,n,i,a,o,s,l,u){var c=this.getContentGroup(),f=this._containerGroup,h=this._controllerGroup;Yc(r.get("orient"),c,r.get("itemGap"),a?i.width:null,a?null:i.height),Yc("horizontal",h,r.get("pageButtonItemGap",!0));var d=c.getBoundingRect(),v=h.getBoundingRect(),m=this._showController=d[o]>i[o],y=[-d.x,-d.y];n||(y[a]=c[u]);var x=[0,0],_=[-v.x,-v.y],b=Ae(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(m){var S=r.get("pageButtonPosition",!0);S==="end"?_[a]+=i[o]-v[o]:x[a]+=v[o]+b}_[1-a]+=d[s]/2-v[s]/2,c.setPosition(y),f.setPosition(x),h.setPosition(_);var T={x:0,y:0};if(T[o]=m?i[o]:d[o],T[s]=Math.max(d[s],v[s]),T[l]=Math.min(0,v[l]+_[1-a]),f.__rectSize=i[o],m){var C={x:0,y:0};C[o]=Math.max(i[o]-v[o]-b,0),C[s]=T[s],f.setClipPath(new qe({shape:C})),f.__rectSize=C[o]}else h.eachChild(function(P){P.attr({invisible:!0,silent:!0})});var A=this._getPageInfo(r);return A.pageIndex!=null&&ut(c,{x:A.contentPosition[0],y:A.contentPosition[1]},m?r:null),this._updatePageInfoView(r,A),T},t.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},t.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;R(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",h=n[f]!=null,d=i.childOfName(c);d&&(d.setStyle("fill",h?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),d.cursor=h?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",ye(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=fP[o],l=hP[o],u=this._findTargetItemIndex(n),c=i.children(),f=c[u],h=c.length,d=h?1:0,v={contentPosition:[i.x,i.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return v;var m=S(f);v.contentPosition[o]=-m.s;for(var y=u+1,x=m,_=m,b=null;y<=h;++y)b=S(c[y]),(!b&&_.e>x.s+a||b&&!T(b,x.s))&&(_.i>x.i?x=_:x=b,x&&(v.pageNextDataIndex==null&&(v.pageNextDataIndex=x.i),++v.pageCount)),_=b;for(var y=u-1,x=m,_=m,b=null;y>=-1;--y)b=S(c[y]),(!b||!T(_,b.s))&&x.i<_.i&&(_=x,v.pagePrevDataIndex==null&&(v.pagePrevDataIndex=x.i),++v.pageCount,++v.pageIndex),x=b;return v;function S(C){if(C){var A=C.getBoundingRect(),P=A[l]+C[l];return{s:P,e:P+A[s],i:C.__legendDataIndex}}}function T(C,A){return C.e>=A&&C.s<=A+a}},t.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===r&&(n=s)}),n??a},t.type="legend.scroll",t}(Iie);function Tqe(e){e.registerAction("legendScroll","legendscroll",function(t,r){var n=t.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:t},function(i){i.setScrollDataIndex(n)})})}function Cqe(e){Ye(Eie),e.registerComponentModel(wqe),e.registerComponentView(Sqe),Tqe(e)}function Aqe(e){Ye(Eie),Ye(Cqe)}var Mqe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="dataZoom.inside",t.defaultOption=ku(Vy.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(Vy),HR=et();function Pqe(e,t,r){HR(e).coordSysRecordMap.each(function(n){var i=n.dataZoomInfoMap.get(t.uid);i&&(i.getRange=r)})}function kqe(e,t){for(var r=HR(e).coordSysRecordMap,n=r.keys(),i=0;i<n.length;i++){var a=n[i],o=r.get(a),s=o.dataZoomInfoMap;if(s){var l=t.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||Die(r,o))}}}function Die(e,t){if(t){e.removeKey(t.model.uid);var r=t.controller;r&&r.dispose()}}function Lqe(e,t){var r={model:t,containsPoint:We(Oqe,t),dispatchAction:We(Iqe,e),dataZoomInfoMap:null,controller:null},n=r.controller=new Rf(e.getZr());return R(["pan","zoom","scrollMove"],function(i){n.on(i,function(a){var o=[];r.dataZoomInfoMap.each(function(s){if(a.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[i],u=l&&l(s.dzReferCoordSysInfo,r.model.mainType,r.controller,a);!s.model.get("disabled",!0)&&u&&o.push({dataZoomId:s.model.id,start:u[0],end:u[1]})}}),o.length&&r.dispatchAction(o)})}),r}function Iqe(e,t){e.isDisposed()||e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function Oqe(e,t,r,n){return e.coordinateSystem.containPoint([r,n])}function Eqe(e,t,r){var n,i="type_",a={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;return e.each(function(s){var l=s.model,u=l.get("disabled",!0)?!1:l.get("zoomLock",!0)?"move":!0;a[i+u]>a[i+n]&&(n=u),o=o&&l.get("preventDefaultMouseMove",!0)}),{controlType:n,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:r,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint}}}}function Dqe(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,function(t,r){var n=HR(r),i=n.coordSysRecordMap||(n.coordSysRecordMap=Ce());i.each(function(a){a.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=gie(a);R(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,Lqe(r,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=Ce());c.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),i.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){Die(i,a);return}var c=Eqe(l,a,r);o.enable(c.controlType,c.opt),Xv(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var Nqe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="dataZoom.inside",r}return t.prototype.render=function(r,n,i){if(e.prototype.render.apply(this,arguments),r.noTarget()){this._clear();return}this.range=r.getPercentRange(),Pqe(i,r,{pan:_e(dP.pan,this),zoom:_e(dP.zoom,this),scrollMove:_e(dP.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){kqe(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(RR),dP={zoom:function(e,t,r,n){var i=this.range,a=i.slice(),o=e.axisModels[0];if(o){var s=vP[t](null,[n.originX,n.originY],o,r,e),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(vu(0,a,[0,100],0,c.minSpan,c.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:hU(function(e,t,r,n,i,a){var o=vP[n]([a.oldX,a.oldY],[a.newX,a.newY],t,i,r);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength}),scrollMove:hU(function(e,t,r,n,i,a){var o=vP[n]([0,0],[a.scrollDelta,a.scrollDelta],t,i,r);return o.signal*(e[1]-e[0])*a.scrollDelta})};function hU(e){return function(t,r,n,i){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s){var l=e(o,s,t,r,n,i);if(vu(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var vP={grid:function(e,t,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem.getRect();return e=e||[0,0],a.dim==="x"?(o.pixel=t[0]-e[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(e,t,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),r.mainType==="radiusAxis"?(o.pixel=t[0]-e[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(e,t,r,n,i){var a=r.axis,o=i.model.coordinateSystem.getRect(),s={};return e=e||[0,0],a.orient==="horizontal"?(s.pixel=t[0]-e[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function Nie(e){BR(e),e.registerComponentModel(Mqe),e.registerComponentView(Nqe),Dqe(e)}var jqe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=ku(Vy.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:J.color.accent10,borderRadius:0,backgroundColor:J.color.transparent,dataBackground:{lineStyle:{color:J.color.accent30,width:.5},areaStyle:{color:J.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:J.color.accent40,width:.5},areaStyle:{color:J.color.accent20,opacity:.3}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:J.color.neutral00,borderColor:J.color.accent20},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:J.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:J.color.tertiary},brushSelect:!0,brushStyle:{color:J.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:J.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t}(Vy),cg=qe,Rqe=1,pP=30,Bqe=7,fg="horizontal",dU="vertical",zqe=5,$qe=["line","bar","candlestick","scatter"],Fqe={easing:"cubicOut",duration:100,delay:0},Vqe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._displayables={},r}return t.prototype.init=function(r,n){this.api=n,this._onBrush=_e(this._onBrush,this),this._onBrushEnd=_e(this._onBrushEnd,this)},t.prototype.render=function(r,n,i,a){if(e.prototype.render.apply(this,arguments),Xv(this,"_dispatchZoomAction",r.get("throttle"),"fixRate"),this._orient=r.getOrient(),r.get("show")===!1){this.group.removeAll();return}if(r.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){My(this,"_dispatchZoomAction");var r=this.api.getZr();r.off("mousemove",this._onBrush),r.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var r=this.group;r.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new Ie;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),r.add(n),this._positionGroup()},t.prototype._resetLocation=function(){var r=this.dataZoomModel,n=this.api,i=r.get("brushSelect"),a=i?Bqe:0,o=zr(r,n).refContainer,s=this._findCoordRect(),l=r.get("defaultLocationEdgeGap",!0)||0,u=this._orient===fg?{right:o.width-s.x-s.width,top:o.height-pP-l-a,width:s.width,height:pP}:{right:l,top:s.y,width:pP,height:s.height},c=Ef(r.option);R(["right","top","width","height"],function(h){c[h]==="ph"&&(c[h]=u[h])});var f=$t(c,o);this._location={x:f.x,y:f.y},this._size=[f.width,f.height],this._orient===dU&&this._size.reverse()},t.prototype._positionGroup=function(){var r=this.group,n=this._location,i=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===fg&&!o?{scaleY:l?1:-1,scaleX:1}:i===fg&&o?{scaleY:l?1:-1,scaleX:-1}:i===dU&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=r.getBoundingRect([s]);r.x=n.x-u.x,r.y=n.y-u.y,r.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var r=this.dataZoomModel,n=this._size,i=this._displayables.sliderGroup,a=r.get("brushSelect");i.add(new cg({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:r.get("backgroundColor")},z2:-40}));var o=new cg({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:_e(this._onClickPanel,this)}),s=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),i.add(o)},t.prototype._renderDataShadow=function(){var r=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!r)return;var n=this._size,i=this._shadowSize||[],a=r.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():r.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==i[0]||n[1]!==i[1]){var f=o.getDataExtent(r.thisDim),h=o.getDataExtent(l),d=(h[1]-h[0])*.3;h=[h[0]-d,h[1]+d];var v=[0,n[1]],m=[0,n[0]],y=[[n[0],0],[0,0]],x=[],_=m[1]/Math.max(1,o.count()-1),b=n[0]/(f[1]-f[0]),S=r.thisAxis.type==="time",T=-_,C=Math.round(o.count()/n[0]),A;o.each([r.thisDim,l],function(D,N,z){if(C>0&&z%C){S||(T+=_);return}T=S?(+D-f[0])*b:T+_;var V=N==null||isNaN(N)||N==="",F=V?0:gt(N,h,v,!0);V&&!A&&z?(y.push([y[y.length-1][0],0]),x.push([x[x.length-1][0],0])):!V&&A&&(y.push([T,0]),x.push([T,0])),V||(y.push([T,F]),x.push([T,F])),A=V}),u=this._shadowPolygonPts=y,c=this._shadowPolylinePts=x}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var P=this.dataZoomModel;function I(D){var N=P.getModel(D?"selectedDataBackground":"dataBackground"),z=new Ie,V=new Tn({shape:{points:u},segmentIgnoreThreshold:1,style:N.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),F=new ln({shape:{points:c},segmentIgnoreThreshold:1,style:N.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return z.add(V),z.add(F),z}for(var k=0;k<3;k++){var E=I(k===1);this._displayables.sliderGroup.add(E),this._displayables.dataShadowSegs.push(E)}},t.prototype._prepareDataShadowInfo=function(){var r=this.dataZoomModel,n=r.get("showDataShadow");if(n!==!1){var i,a=this.ecModel;return r.eachTargetAxis(function(o,s){var l=r.getAxisProxy(o,s).getTargetSeriesModels();R(l,function(u){if(!i&&!(n!==!0&&He($qe,u.get("type"))<0)){var c=a.getComponent($l(o),s).axis,f=Gqe(o),h,d=u.coordinateSystem;f!=null&&d.getOtherAxis&&(h=d.getOtherAxis(c).inverse),f=u.getData().mapDimension(f);var v=u.getData().mapDimension(o);i={thisAxis:c,series:u,thisDim:v,otherDim:f,otherAxisInverse:h}}},this)},this),i}},t.prototype._renderHandle=function(){var r=this.group,n=this._displayables,i=n.handles=[null,null],a=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,f=l.get("brushSelect"),h=n.filler=new cg({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new cg({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:Rqe,fill:J.color.transparent}})),R([0,1],function(b){var S=l.get("handleIcon");!Cw[S]&&S.indexOf("path://")<0&&S.indexOf("image://")<0&&(S="path://"+S);var T=xr(S,-1,0,2,2,null,!0);T.attr({cursor:Wqe(this._orient),draggable:!0,drift:_e(this._onDragMove,this,b),ondragend:_e(this._onDragEnd,this),onmouseover:_e(this._showDataInfo,this,!0),onmouseout:_e(this._showDataInfo,this,!1),z2:5});var C=T.getBoundingRect(),A=l.get("handleSize");this._handleHeight=me(A,this._size[1]),this._handleWidth=C.width/C.height*this._handleHeight,T.setStyle(l.getModel("handleStyle").getItemStyle()),T.style.strokeNoScale=!0,T.rectHover=!0,T.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),eu(T);var P=l.get("handleColor");P!=null&&(T.style.fill=P),o.add(i[b]=T);var I=l.getModel("textStyle"),k=l.get("handleLabel")||{},E=k.show||!1;r.add(a[b]=new ot({silent:!0,invisible:!E,style:kt(I,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:I.getTextColor(),font:I.getFont()}),z2:10}))},this);var d=h;if(f){var v=me(l.get("moveHandleSize"),s[1]),m=n.moveHandle=new qe({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:v}}),y=v*.8,x=n.moveHandleIcon=xr(l.get("moveHandleIcon"),-y/2,-y/2,y,y,J.color.neutral00,!0);x.silent=!0,x.y=s[1]+v/2-.5,m.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var _=Math.min(s[1]/2,Math.max(v,10));d=n.moveZone=new qe({invisible:!0,shape:{y:s[1]-_,height:v+_}}),d.on("mouseover",function(){u.enterEmphasis(m)}).on("mouseout",function(){u.leaveEmphasis(m)}),o.add(m),o.add(x),o.add(d)}d.attr({draggable:!0,cursor:"default",drift:_e(this._onDragMove,this,"all"),ondragstart:_e(this._showDataInfo,this,!0),ondragend:_e(this._onDragEnd,this),onmouseover:_e(this._showDataInfo,this,!0),onmouseout:_e(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var r=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[gt(r[0],[0,100],n,!0),gt(r[1],[0,100],n,!0)]},t.prototype._updateInterval=function(r,n){var i=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];vu(n,a,o,i.get("zoomLock")?"all":r,s.minSpan!=null?gt(s.minSpan,l,o,!0):null,s.maxSpan!=null?gt(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=Mi([gt(a[0],o,l,!0),gt(a[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},t.prototype._updateView=function(r){var n=this._displayables,i=this._handleEnds,a=Mi(i.slice()),o=this._size;R([0,1],function(d){var v=n.handles[d],m=this._handleHeight;v.attr({scaleX:m/2,scaleY:m/2,x:i[d]+(d?-1:1),y:o[1]/2-m/2})},this),n.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,a[0],a[1],o[0]],c=0;c<l.length;c++){var f=l[c],h=f.getClipPath();h||(h=new qe,f.setClipPath(h)),h.setShape({x:u[c],y:0,width:u[c+1]-u[c],height:o[1]})}this._updateDataInfo(r)},t.prototype._updateDataInfo=function(r){var n=this.dataZoomModel,i=this._displayables,a=i.handleLabels,o=this._orient,s=["",""];if(n.get("showDetail")){var l=n.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,c=this._range,f=r?l.calculateDataWindow({start:c[0],end:c[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(f[0],u),this._formatLabel(f[1],u)]}}var h=Mi(this._handleEnds.slice());d.call(this,0),d.call(this,1);function d(v){var m=tu(i.handles[v].parent,this.group),y=WT(v===0?"right":"left",m),x=this._handleWidth/2+zqe,_=Ua([h[v]+(v===0?-x:x),this._size[1]/2],m);a[v].setStyle({x:_[0],y:_[1],verticalAlign:o===fg?"middle":y,align:o===fg?y:"center",text:s[v]})}},t.prototype._formatLabel=function(r,n){var i=this.dataZoomModel,a=i.get("labelFormatter"),o=i.get("labelPrecision");(o==null||o==="auto")&&(o=n.getPixelPrecision());var s=r==null||isNaN(r)?"":n.type==="category"||n.type==="time"?n.scale.getLabel({value:Math.round(r)}):r.toFixed(Math.min(o,20));return ke(a)?a(r,s):ye(a)?a.replace("{value}",s):s},t.prototype._showDataInfo=function(r){var n=this.dataZoomModel.get("handleLabel")||{},i=n.show||!1,a=this.dataZoomModel.getModel(["emphasis","handleLabel"]),o=a.get("show")||!1,s=r||this._dragging?o:i,l=this._displayables,u=l.handleLabels;u[0].attr("invisible",!s),u[1].attr("invisible",!s),l.moveHandle&&this.api[s?"enterEmphasis":"leaveEmphasis"](l.moveHandle,1)},t.prototype._onDragMove=function(r,n,i,a){this._dragging=!0,Hs(a.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=Ua([n,i],o,!0),l=this._updateInterval(r,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var r=this.dataZoomModel.get("realtime");!r&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(r){var n=this._size,i=this._displayables.sliderGroup.transformCoordToLocal(r.offsetX,r.offsetY);if(!(i[0]<0||i[0]>n[0]||i[1]<0||i[1]>n[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(r){var n=r.offsetX,i=r.offsetY;this._brushStart=new Ne(n,i),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(r){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var i=n.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100],l=this._handleEnds=[i.x,i.x+i.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();vu(0,l,o,0,u.minSpan!=null?gt(u.minSpan,s,o,!0):null,u.maxSpan!=null?gt(u.maxSpan,s,o,!0):null),this._range=Mi([gt(l[0],o,s,!0),gt(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(r){this._brushing&&(Hs(r.event),this._updateBrushRect(r.offsetX,r.offsetY))},t.prototype._updateBrushRect=function(r,n){var i=this._displayables,a=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new cg({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(r,n),c=l.transformCoordToLocal(s.x,s.y),f=this._size;u[0]=Math.max(Math.min(f[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:f[1]})},t.prototype._dispatchZoomAction=function(r){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:r?Fqe:null,start:n[0],end:n[1]})},t.prototype._findCoordRect=function(){var r,n=gie(this.dataZoomModel).infoList;if(!r&&n.length){var i=n[0].model.coordinateSystem;r=i.getRect&&i.getRect()}if(!r){var a=this.api.getWidth(),o=this.api.getHeight();r={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return r},t.type="dataZoom.slider",t}(RR);function Gqe(e){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[e]}function Wqe(e){return e==="vertical"?"ns-resize":"ew-resize"}function jie(e){e.registerComponentModel(jqe),e.registerComponentView(Vqe),BR(e)}function Hqe(e){Ye(Nie),Ye(jie)}var Rie={get:function(e,t,r){var n=Le((Uqe[e]||{})[t]);return r&&oe(n)?n[n.length-1]:n}},Uqe={color:{active:["#006edd","#e0ffff"],inactive:[J.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},vU=Xr.mapVisual,Zqe=Xr.eachVisual,Yqe=oe,pU=R,Xqe=Mi,qqe=gt,oS=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.stateList=["inRange","outOfRange"],r.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],r.layoutMode={type:"box",ignoreSize:!0},r.dataBound=[-1/0,1/0],r.targetVisuals={},r.controllerVisuals={},r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i)},t.prototype.optionUpdated=function(r,n){var i=this.option;!n&&Aie(i,r,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(r){var n=this.stateList;r=_e(r,this),this.controllerVisuals=ZO(this.option.controller,n,r),this.targetVisuals=ZO(this.option.target,n,r)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var r=this.option.seriesId,n=this.option.seriesIndex;n==null&&r==null&&(n="all");var i=Bv(this.ecModel,"series",{index:n,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return le(i,function(a){return a.componentIndex})},t.prototype.eachTargetSeries=function(r,n){R(this.getTargetSeriesIndices(),function(i){var a=this.ecModel.getSeriesByIndex(i);a&&r.call(n,a)},this)},t.prototype.isTargetSeries=function(r){var n=!1;return this.eachTargetSeries(function(i){i===r&&(n=!0)}),n},t.prototype.formatValueText=function(r,n,i){var a=this.option,o=a.precision,s=this.dataBound,l=a.formatter,u;i=i||["<",">"],oe(r)&&(r=r.slice(),u=!0);var c=n?r:u?[f(r[0]),f(r[1])]:f(r);if(ye(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(ke(l))return u?l(r[0],r[1]):l(r);if(u)return r[0]===s[0]?i[0]+" "+c[1]:r[1]===s[1]?i[1]+" "+c[0]:c[0]+" - "+c[1];return c;function f(h){return h===s[0]?"min":h===s[1]?"max":(+h).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var r=this.option,n=Xqe([r.min,r.max]);this._dataExtent=n},t.prototype.getDataDimensionIndex=function(r){var n=this.option.dimension;if(n!=null)return r.getDimensionIndex(n);for(var i=r.dimensions,a=i.length-1;a>=0;a--){var o=i[a],s=r.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var r=this.ecModel,n=this.option,i={inRange:n.inRange,outOfRange:n.outOfRange},a=n.target||(n.target={}),o=n.controller||(n.controller={});Ue(a,i),Ue(o,i);var s=this.isCategory();l.call(this,a),l.call(this,o),u.call(this,a,"inRange","outOfRange"),c.call(this,o);function l(f){Yqe(n.color)&&!f.inRange&&(f.inRange={color:n.color.slice().reverse()}),f.inRange=f.inRange||{color:r.get("gradientColor")}}function u(f,h,d){var v=f[h],m=f[d];v&&!m&&(m=f[d]={},pU(v,function(y,x){if(Xr.isValidType(x)){var _=Rie.get(x,"inactive",s);_!=null&&(m[x]=_,x==="color"&&!m.hasOwnProperty("opacity")&&!m.hasOwnProperty("colorAlpha")&&(m.opacity=[0,0]))}}))}function c(f){var h=(f.inRange||{}).symbol||(f.outOfRange||{}).symbol,d=(f.inRange||{}).symbolSize||(f.outOfRange||{}).symbolSize,v=this.get("inactiveColor"),m=this.getItemSymbol(),y=m||"roundRect";pU(this.stateList,function(x){var _=this.itemSize,b=f[x];b||(b=f[x]={color:s?v:[v]}),b.symbol==null&&(b.symbol=h&&Le(h)||(s?y:[y])),b.symbolSize==null&&(b.symbolSize=d&&Le(d)||(s?_[0]:[_[0],_[0]])),b.symbol=vU(b.symbol,function(C){return C==="none"?y:C});var S=b.symbolSize;if(S!=null){var T=-1/0;Zqe(S,function(C){C>T&&(T=C)}),b.symbolSize=vU(S,function(C){return qqe(C,[0,T],[0,_[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(r){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(r){return null},t.prototype.getVisualMeta=function(r){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:J.color.transparent,borderColor:J.color.borderTint,contentColor:J.color.theme[0],inactiveColor:J.color.disabled,borderWidth:0,padding:J.size.m,textGap:10,precision:0,textStyle:{color:J.color.secondary}},t}(Qe),gU=[20,140],Kqe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(r,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var r=this.itemSize;(r[0]==null||isNaN(r[0]))&&(r[0]=gU[0]),(r[1]==null||isNaN(r[1]))&&(r[1]=gU[1])},t.prototype._resetRange=function(){var r=this.getExtent(),n=this.option.range;!n||n.auto?(r.auto=1,this.option.range=r):oe(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],r[0]),n[1]=Math.min(n[1],r[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),R(this.stateList,function(r){var n=this.option.controller[r].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},t.prototype.setSelected=function(r){this.option.range=r.slice(),this._resetRange()},t.prototype.getSelected=function(){var r=this.getExtent(),n=Mi((this.get("range")||[]).slice());return n[0]>r[1]&&(n[0]=r[1]),n[1]>r[1]&&(n[1]=r[1]),n[0]<r[0]&&(n[0]=r[0]),n[1]<r[0]&&(n[1]=r[0]),n},t.prototype.getValueState=function(r){var n=this.option.range,i=this.getExtent(),a=Ae(this.option.unboundedRange,!0);return(a&&n[0]<=i[0]||n[0]<=r)&&(a&&n[1]>=i[1]||r<=n[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(r){var n=[];return this.eachTargetSeries(function(i){var a=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(s,l){r[0]<=s&&s<=r[1]&&a.push(l)},this),n.push({seriesId:i.id,dataIndex:a})},this),n},t.prototype.getVisualMeta=function(r){var n=mU(this,"outOfRange",this.getExtent()),i=mU(this,"inRange",this.option.range.slice()),a=[];function o(d,v){a.push({value:d,color:r(d,v)})}for(var s=0,l=0,u=i.length,c=n.length;l<c&&(!i.length||n[l]<=i[0]);l++)n[l]<i[s]&&o(n[l],"outOfRange");for(var f=1;s<u;s++,f=0)f&&a.length&&o(i[s],"outOfRange"),o(i[s],"inRange");for(var f=1;l<c;l++)(!i.length||i[i.length-1]<n[l])&&(f&&(a.length&&o(a[a.length-1].value,"outOfRange"),f=0),o(n[l],"outOfRange"));var h=a.length;return{stops:a,outerColors:[h?a[0].color:"transparent",h?a[h-1].color:"transparent"]}},t.type="visualMap.continuous",t.defaultOption=ku(oS.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:J.color.neutral00,borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:J.color.neutral00,borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:J.color.shadow}}),t}(oS);function mU(e,t,r){if(r[0]===r[1])return r.slice();for(var n=200,i=(r[1]-r[0])/n,a=r[0],o=[],s=0;s<=n&&a<r[1];s++)o.push(a),a+=i;return o.push(r[1]),o}var Bie=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.autoPositionValues={left:1,right:1,top:1,bottom:1},r}return t.prototype.init=function(r,n){this.ecModel=r,this.api=n},t.prototype.render=function(r,n,i,a){if(this.visualMapModel=r,r.get("show")===!1){this.group.removeAll();return}this.doRender(r,n,i,a)},t.prototype.renderBackground=function(r){var n=this.visualMapModel,i=Uv(n.get("padding")||0),a=r.getBoundingRect();r.add(new qe({z2:-1,silent:!0,shape:{x:a.x-i[3],y:a.y-i[0],width:a.width+i[3]+i[1],height:a.height+i[0]+i[2]},style:{fill:n.get("backgroundColor"),stroke:n.get("borderColor"),lineWidth:n.get("borderWidth")}}))},t.prototype.getControllerVisual=function(r,n,i){i=i||{};var a=i.forceState,o=this.visualMapModel,s={};if(n==="color"){var l=o.get("contentColor");s.color=l}function u(d){return s[d]}function c(d,v){s[d]=v}var f=o.controllerVisuals[a||o.getValueState(r)],h=Xr.prepareVisualTypes(f);return R(h,function(d){var v=f[d];i.convertOpacityToAlpha&&d==="opacity"&&(d="colorAlpha",v=f.__alphaForOpacity),Xr.dependsOn(d,n)&&v&&v.applyVisual(r,u,c)}),s[n]},t.prototype.positionGroup=function(r){var n=this.visualMapModel,i=this.api,a=zr(n,i).refContainer;ZT(r,n.getBoxLayoutParams(),a)},t.prototype.doRender=function(r,n,i,a){},t.type="visualMap",t}(It),yU=[["left","right","width"],["top","bottom","height"]];function zie(e,t,r){var n=e.option,i=n.align;if(i!=null&&i!=="auto")return i;for(var a={width:t.getWidth(),height:t.getHeight()},o=n.orient==="horizontal"?1:0,s=yU[o],l=[0,null,10],u={},c=0;c<3;c++)u[yU[1-o][c]]=l[c],u[s[c]]=c===2?r[0]:n[s[c]];var f=[["x","width",3],["y","height",0]][o],h=$t(u,a,n.padding);return s[(h.margin[f[2]]||0)+h[f[0]]+h[f[1]]*.5<a[f[1]]*.5?0:1]}function Sb(e,t){return R(e||[],function(r){r.dataIndex!=null&&(r.dataIndexInside=r.dataIndex,r.dataIndex=null),r.highlightKey="visualMap"+(t?t.componentIndex:"")}),e}var yo=gt,Jqe=R,xU=Math.min,gP=Math.max,Qqe=12,eKe=6,tKe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._shapes={},r._dataInterval=[],r._handleEnds=[],r._hoverLinkDataIndices=[],r}return t.prototype.init=function(r,n){e.prototype.init.call(this,r,n),this._hoverLinkFromSeriesMouseOver=_e(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=_e(this._hideIndicator,this)},t.prototype.doRender=function(r,n,i,a){(!a||a.type!=="selectDataRange"||a.from!==this.uid)&&this._buildView()},t.prototype._buildView=function(){this.group.removeAll();var r=this.visualMapModel,n=this.group;this._orient=r.get("orient"),this._useHandle=r.get("calculable"),this._resetInterval(),this._renderBar(n);var i=r.get("text");this._renderEndsText(n,i,0),this._renderEndsText(n,i,1),this._updateView(!0),this.renderBackground(n),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(n)},t.prototype._renderEndsText=function(r,n,i){if(n){var a=n[1-i];a=a!=null?a+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,c=this._applyTransform([l[0]/2,i===0?-s:l[1]+s],u),f=this._applyTransform(i===0?"bottom":"top",u),h=this._orient,d=this.visualMapModel.textStyleModel;this.group.add(new ot({style:kt(d,{x:c[0],y:c[1],verticalAlign:d.get("verticalAlign")||(h==="horizontal"?"middle":f),align:d.get("align")||(h==="horizontal"?f:"center"),text:a})}))}},t.prototype._renderBar=function(r){var n=this.visualMapModel,i=this._shapes,a=n.itemSize,o=this._orient,s=this._useHandle,l=zie(n,this.api,a),u=i.mainGroup=this._createBarGroup(l),c=new Ie;u.add(c),c.add(i.outOfRange=_U()),c.add(i.inRange=_U(null,s?wU(this._orient):null,_e(this._dragHandle,this,"all",!1),_e(this._dragHandle,this,"all",!0))),c.setClipPath(new qe({shape:{x:0,y:0,width:a[0],height:a[1],r:3}}));var f=n.textStyleModel.getTextRect("国"),h=gP(f.width,f.height);s&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(n,u,0,a,h,o),this._createHandle(n,u,1,a,h,o)),this._createIndicator(n,u,a,h,o),r.add(u)},t.prototype._createHandle=function(r,n,i,a,o,s){var l=_e(this._dragHandle,this,i,!1),u=_e(this._dragHandle,this,i,!0),c=Ja(r.get("handleSize"),a[0]),f=xr(r.get("handleIcon"),-c/2,-c/2,c,c,null,!0),h=wU(this._orient);f.attr({cursor:h,draggable:!0,drift:l,ondragend:u,onmousemove:function(x){Hs(x.event)}}),f.x=a[0]/2,f.useStyle(r.getModel("handleStyle").getItemStyle()),f.setStyle({strokeNoScale:!0,strokeFirst:!0}),f.style.lineWidth*=2,f.ensureState("emphasis").style=r.getModel(["emphasis","handleStyle"]).getItemStyle(),Nc(f,!0),n.add(f);var d=this.visualMapModel.textStyleModel,v=new ot({cursor:h,draggable:!0,drift:l,onmousemove:function(x){Hs(x.event)},ondragend:u,style:kt(d,{x:0,y:0,text:""})});v.ensureState("blur").style={opacity:.1},v.stateTransition={duration:200},this.group.add(v);var m=[c,0],y=this._shapes;y.handleThumbs[i]=f,y.handleLabelPoints[i]=m,y.handleLabels[i]=v},t.prototype._createIndicator=function(r,n,i,a,o){var s=Ja(r.get("indicatorSize"),i[0]),l=xr(r.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:i[0]/2});var u=r.getModel("indicatorStyle").getItemStyle();if(l instanceof Jr){var c=l.style;l.useStyle(ae({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},u))}else l.useStyle(u);n.add(l);var f=this.visualMapModel.textStyleModel,h=new ot({silent:!0,invisible:!0,style:kt(f,{x:0,y:0,text:""})});this.group.add(h);var d=[(o==="horizontal"?a/2:eKe)+i[0]/2,0],v=this._shapes;v.indicator=l,v.indicatorLabel=h,v.indicatorLabelPoint=d,this._firstShowIndicator=!0},t.prototype._dragHandle=function(r,n,i,a){if(this._useHandle){if(this._dragging=!n,!n){var o=this._applyTransform([i,a],this._shapes.mainGroup,!0);this._updateInterval(r,o[1]),this._hideIndicator(),this._updateView()}n===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),n?!this._hovering&&this._clearHoverLinkToSeries():bU(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[r],!1)}},t.prototype._resetInterval=function(){var r=this.visualMapModel,n=this._dataInterval=r.getSelected(),i=r.getExtent(),a=[0,r.itemSize[1]];this._handleEnds=[yo(n[0],i,a,!0),yo(n[1],i,a,!0)]},t.prototype._updateInterval=function(r,n){n=n||0;var i=this.visualMapModel,a=this._handleEnds,o=[0,i.itemSize[1]];vu(n,a,o,r,0);var s=i.getExtent();this._dataInterval=[yo(a[0],o,s,!0),yo(a[1],o,s,!0)]},t.prototype._updateView=function(r){var n=this.visualMapModel,i=n.getExtent(),a=this._shapes,o=[0,n.itemSize[1]],s=r?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,i,s,"inRange"),u=this._createBarVisual(i,i,o,"outOfRange");a.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),a.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},t.prototype._createBarVisual=function(r,n,i,a){var o={forceState:a,convertOpacityToAlpha:!0},s=this._makeColorGradient(r,o),l=[this.getControllerVisual(r[0],"symbolSize",o),this.getControllerVisual(r[1],"symbolSize",o)],u=this._createBarPoints(i,l);return{barColor:new If(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},t.prototype._makeColorGradient=function(r,n){var i=100,a=[],o=(r[1]-r[0])/i;a.push({color:this.getControllerVisual(r[0],"color",n),offset:0});for(var s=1;s<i;s++){var l=r[0]+o*s;if(l>r[1])break;a.push({color:this.getControllerVisual(l,"color",n),offset:s/i})}return a.push({color:this.getControllerVisual(r[1],"color",n),offset:1}),a},t.prototype._createBarPoints=function(r,n){var i=this.visualMapModel.itemSize;return[[i[0]-n[0],r[0]],[i[0],r[0]],[i[0],r[1]],[i[0]-n[1],r[1]]]},t.prototype._createBarGroup=function(r){var n=this._orient,i=this.visualMapModel.get("inverse");return new Ie(n==="horizontal"&&!i?{scaleX:r==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&i?{scaleX:r==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!i?{scaleX:r==="left"?1:-1,scaleY:-1}:{scaleX:r==="left"?1:-1})},t.prototype._updateHandle=function(r,n){if(this._useHandle){var i=this._shapes,a=this.visualMapModel,o=i.handleThumbs,s=i.handleLabels,l=a.itemSize,u=a.getExtent(),c=this._applyTransform("left",i.mainGroup);Jqe([0,1],function(f){var h=o[f];h.setStyle("fill",n.handlesColor[f]),h.y=r[f];var d=yo(r[f],[0,l[1]],u,!0),v=this.getControllerVisual(d,"symbolSize");h.scaleX=h.scaleY=v/l[0],h.x=l[0]-v/2;var m=Ua(i.handleLabelPoints[f],tu(h,this.group));if(this._orient==="horizontal"){var y=c==="left"||c==="top"?(l[0]-v)/2:(l[0]-v)/-2;m[1]+=y}s[f].setStyle({x:m[0],y:m[1],text:a.formatValueText(this._dataInterval[f]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(r,n,i,a){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,f=c.indicator;if(f){f.attr("invisible",!1);var h={convertOpacityToAlpha:!0},d=this.getControllerVisual(r,"color",h),v=this.getControllerVisual(r,"symbolSize"),m=yo(r,s,u,!0),y=l[0]-v/2,x={x:f.x,y:f.y};f.y=m,f.x=y;var _=Ua(c.indicatorLabelPoint,tu(f,this.group)),b=c.indicatorLabel;b.attr("invisible",!1);var S=this._applyTransform("left",c.mainGroup),T=this._orient,C=T==="horizontal";b.setStyle({text:(i||"")+o.formatValueText(n),verticalAlign:C?S:"middle",align:C?"center":S});var A={x:y,y:m,style:{fill:d}},P={style:{x:_[0],y:_[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var I={duration:100,easing:"cubicInOut",additive:!0};f.x=x.x,f.y=x.y,f.animateTo(A,I),b.animateTo(P,I)}else f.attr(A),b.attr(P);this._firstShowIndicator=!1;var k=this._shapes.handleLabels;if(k)for(var E=0;E<k.length;E++)this.api.enterBlur(k[E])}},t.prototype._enableHoverLinkToSeries=function(){var r=this;this._shapes.mainGroup.on("mousemove",function(n){if(r._hovering=!0,!r._dragging){var i=r.visualMapModel.itemSize,a=r._applyTransform([n.offsetX,n.offsetY],r._shapes.mainGroup,!0,!0);a[1]=xU(gP(0,a[1]),i[1]),r._doHoverLinkToSeries(a[1],0<=a[0]&&a[0]<=i[0])}}).on("mouseout",function(){r._hovering=!1,!r._dragging&&r._clearHoverLinkToSeries()})},t.prototype._enableHoverLinkFromSeries=function(){var r=this.api.getZr();this.visualMapModel.option.hoverLink?(r.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),r.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},t.prototype._doHoverLinkToSeries=function(r,n){var i=this.visualMapModel,a=i.itemSize;if(i.option.hoverLink){var o=[0,a[1]],s=i.getExtent();r=xU(gP(o[0],r),o[1]);var l=rKe(i,s,o),u=[r-l,r+l],c=yo(r,o,s,!0),f=[yo(u[0],o,s,!0),yo(u[1],o,s,!0)];u[0]<o[0]&&(f[0]=-1/0),u[1]>o[1]&&(f[1]=1/0),n&&(f[0]===-1/0?this._showIndicator(c,f[1],"< ",l):f[1]===1/0?this._showIndicator(c,f[0],"> ",l):this._showIndicator(c,c,"≈ ",l));var h=this._hoverLinkDataIndices,d=[];(n||bU(i))&&(d=this._hoverLinkDataIndices=i.findTargetDataIndices(f));var v=NRe(h,d);this._dispatchHighDown("downplay",Sb(v[0],i)),this._dispatchHighDown("highlight",Sb(v[1],i))}},t.prototype._hoverLinkFromSeriesMouseOver=function(r){var n;if(Rc(r.target,function(l){var u=ze(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var i=this.ecModel.getSeriesByIndex(n.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(i)){var o=i.getData(n.dataType),s=o.getStore().get(a.getDataDimensionIndex(o),n.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},t.prototype._hideIndicator=function(){var r=this._shapes;r.indicator&&r.indicator.attr("invisible",!0),r.indicatorLabel&&r.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var i=0;i<n.length;i++)this.api.leaveBlur(n[i])},t.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var r=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Sb(r,this.visualMapModel)),r.length=0},t.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var r=this.api.getZr();r.off("mouseover",this._hoverLinkFromSeriesMouseOver),r.off("mouseout",this._hideIndicator)},t.prototype._applyTransform=function(r,n,i,a){var o=tu(n,a?null:this.group);return oe(r)?Ua(r,o,i):WT(r,o,i)},t.prototype._dispatchHighDown=function(r,n){n&&n.length&&this.api.dispatchAction({type:r,batch:n})},t.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},t.type="visualMap.continuous",t}(Bie);function _U(e,t,r,n){return new Tn({shape:{points:e},draggable:!!r,cursor:t,drift:r,onmousemove:function(i){Hs(i.event)},ondragend:n})}function rKe(e,t,r){var n=Qqe/2,i=e.get("hoverLinkDataSize");return i&&(n=yo(i,t,r,!0)/2),n}function bU(e){var t=e.get("hoverLinkOnHandle");return!!(t??e.get("realtime"))}function wU(e){return e==="vertical"?"ns-resize":"ew-resize"}var nKe={type:"selectDataRange",event:"dataRangeSelected",update:"update"},iKe=function(e,t){t.eachComponent({mainType:"visualMap",query:e},function(r){r.setSelected(e.selected)})},aKe=[{createOnAllSeries:!0,reset:function(e,t){var r=[];return t.eachComponent("visualMap",function(n){var i=e.pipelineContext;!n.isTargetSeries(e)||i&&i.large||r.push(AXe(n.stateList,n.targetVisuals,_e(n.getValueState,n),n.getDataDimensionIndex(e.getData())))}),r}},{createOnAllSeries:!0,reset:function(e,t){var r=e.getData(),n=[];t.eachComponent("visualMap",function(i){if(i.isTargetSeries(e)){var a=i.getVisualMeta(_e(oKe,null,e,i))||{stops:[],outerColors:[]},o=i.getDataDimensionIndex(r);o>=0&&(a.dimension=o,n.push(a))}}),e.getData().setVisual("visualMeta",n)}}];function oKe(e,t,r,n){for(var i=t.targetVisuals[n],a=Xr.prepareVisualTypes(i),o={color:b0(e.getData(),"color")},s=0,l=a.length;s<l;s++){var u=a[s],c=i[u==="opacity"?"__alphaForOpacity":u];c&&c.applyVisual(r,f,h)}return o.color;function f(d){return o[d]}function h(d,v){o[d]=v}}var SU=R;function sKe(e){var t=e&&e.visualMap;oe(t)||(t=t?[t]:[]),SU(t,function(r){if(r){wh(r,"splitList")&&!wh(r,"pieces")&&(r.pieces=r.splitList,delete r.splitList);var n=r.pieces;n&&oe(n)&&SU(n,function(i){Ee(i)&&(wh(i,"start")&&!wh(i,"min")&&(i.min=i.start),wh(i,"end")&&!wh(i,"max")&&(i.max=i.end))})}})}function wh(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var TU=!1;function $ie(e){TU||(TU=!0,e.registerSubTypeDefaulter("visualMap",function(t){return!t.categories&&(!(t.pieces?t.pieces.length>0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"}),e.registerAction(nKe,iKe),R(aKe,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(sKe))}function Fie(e){e.registerComponentModel(Kqe),e.registerComponentView(tKe),$ie(e)}var lKe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._pieceList=[],r}return t.prototype.optionUpdated=function(r,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],uKe[this._mode].call(this,this._pieceList),this._resetSelected(r,n);var a=this.option.categories;this.resetVisual(function(o,s){i==="categories"?(o.mappingMethod="category",o.categories=Le(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=le(this._pieceList,function(l){return l=Le(l),s!=="inRange"&&(l.visual=null),l}))})},t.prototype.completeVisualOption=function(){var r=this.option,n={},i=Xr.listVisualTypes(),a=this.isCategory();R(r.pieces,function(s){R(i,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),R(n,function(s,l){var u=!1;R(this.stateList,function(c){u=u||o(r,c,l)||o(r.target,c,l)},this),!u&&R(this.stateList,function(c){(r[c]||(r[c]={}))[l]=Rie.get(l,c==="inRange"?"active":"inactive",a)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(r,n){var i=this.option,a=this._pieceList,o=(n?i:r).selected||{};if(i.selected=o,R(a,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),i.selectedMode==="single"){var s=!1;R(a,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!1:s=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(r){return this._mode==="categories"?r.value+"":r.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var r=this.option;return r.pieces&&r.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(r){this.option.selected=Le(r)},t.prototype.getValueState=function(r){var n=Xr.findPieceIndex(r,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(r){var n=[],i=this._pieceList;return this.eachTargetSeries(function(a){var o=[],s=a.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=Xr.findPieceIndex(l,i);c===r&&o.push(u)},this),n.push({seriesId:a.id,dataIndex:o})},this),n},t.prototype.getRepresentValue=function(r){var n;if(this.isCategory())n=r.value;else if(r.value!=null)n=r.value;else{var i=r.interval||[];n=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return n},t.prototype.getVisualMeta=function(r){if(this.isCategory())return;var n=[],i=["",""],a=this;function o(c,f){var h=a.getRepresentValue({interval:c});f||(f=a.getValueState(h));var d=r(h,f);c[0]===-1/0?i[0]=d:c[1]===1/0?i[1]=d:n.push({value:c[0],color:d},{value:c[1],color:d})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return R(s,function(c){var f=c.interval;f&&(f[0]>u&&o([u,f[0]],"outOfRange"),o(f.slice()),u=f[1])},this),{stops:n,outerColors:i}},t.type="visualMap.piecewise",t.defaultOption=ku(oS.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),t}(oS),uKe={splitNumber:function(e){var t=this.option,r=Math.min(t.precision,20),n=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(n[1]-n[0])/i;+a.toFixed(r)!==a&&r<5;)r++;t.precision=r,a=+a.toFixed(r),t.minOpen&&e.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o<i;s+=a,o++){var l=o===i-1?n[1]:s+a;e.push({interval:[s,l],close:[1,1]})}t.maxOpen&&e.push({interval:[n[1],1/0],close:[0,0]}),yI(e),R(e,function(u,c){u.index=c,u.text=this.formatValueText(u.interval)},this)},categories:function(e){var t=this.option;R(t.categories,function(r){e.push({text:this.formatValueText(r,!0),value:r})},this),CU(t,e)},pieces:function(e){var t=this.option;R(t.pieces,function(r,n){Ee(r)||(r={value:r});var i={text:"",index:n};if(r.label!=null&&(i.text=r.label),r.hasOwnProperty("value")){var a=i.value=r.value;i.interval=[a,a],i.close=[1,1]}else{for(var o=i.interval=[],s=i.close=[0,0],l=[1,0,1],u=[-1/0,1/0],c=[],f=0;f<2;f++){for(var h=[["gte","gt","min"],["lte","lt","max"]][f],d=0;d<3&&o[f]==null;d++)o[f]=r[h[d]],s[f]=l[d],c[f]=d===2;o[f]==null&&(o[f]=u[f])}c[0]&&o[1]===1/0&&(s[0]=0),c[1]&&o[0]===-1/0&&(s[1]=0),o[0]===o[1]&&s[0]&&s[1]&&(i.value=o[0])}i.visual=Xr.retrieveVisuals(r),e.push(i)},this),CU(t,e),yI(e),R(e,function(r){var n=r.close,i=[["<","≤"][n[1]],[">","≥"][n[0]]];r.text=r.text||this.formatValueText(r.value!=null?r.value:r.interval,!1,i)},this)}};function CU(e,t){var r=e.inverse;(e.orient==="vertical"?!r:r)&&t.reverse()}var cKe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.doRender=function(){var r=this.group;r.removeAll();var n=this.visualMapModel,i=n.get("textGap"),a=n.textStyleModel,o=this._getItemAlign(),s=n.itemSize,l=this._getViewData(),u=l.endsText,c=on(n.get("showLabel",!0),!u),f=!n.get("selectedMode");u&&this._renderEndsText(r,u[0],s,c,o),R(l.viewPieceList,function(h){var d=h.piece,v=new Ie;v.onclick=_e(this._onItemClick,this,d),this._enableHoverLink(v,h.indexInModelPieceList);var m=n.getRepresentValue(d);if(this._createItemSymbol(v,m,[0,0,s[0],s[1]],f),c){var y=this.visualMapModel.getValueState(m),x=a.get("align")||o;v.add(new ot({style:kt(a,{x:x==="right"?-i:s[0]+i,y:s[1]/2,text:d.text,verticalAlign:a.get("verticalAlign")||"middle",align:x,opacity:Ae(a.get("opacity"),y==="outOfRange"?.5:1)}),silent:f}))}r.add(v)},this),u&&this._renderEndsText(r,u[1],s,c,o),Yc(n.get("orient"),r,n.get("itemGap")),this.renderBackground(r),this.positionGroup(r)},t.prototype._enableHoverLink=function(r,n){var i=this;r.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(o){var s=i.visualMapModel;s.option.hoverLink&&i.api.dispatchAction({type:o,batch:Sb(s.findTargetDataIndices(n),s)})}},t.prototype._getItemAlign=function(){var r=this.visualMapModel,n=r.option;if(n.orient==="vertical")return zie(r,this.api,r.itemSize);var i=n.align;return(!i||i==="auto")&&(i="left"),i},t.prototype._renderEndsText=function(r,n,i,a,o){if(n){var s=new Ie,l=this.visualMapModel.textStyleModel;s.add(new ot({style:kt(l,{x:a?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:a?o:"center",text:n})})),r.add(s)}},t.prototype._getViewData=function(){var r=this.visualMapModel,n=le(r.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),i=r.get("text"),a=r.get("orient"),o=r.get("inverse");return(a==="horizontal"?o:!o)?n.reverse():i&&(i=i.slice().reverse()),{viewPieceList:n,endsText:i}},t.prototype._createItemSymbol=function(r,n,i,a){var o=xr(this.getControllerVisual(n,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(n,"color"));o.silent=a,r.add(o)},t.prototype._onItemClick=function(r){var n=this.visualMapModel,i=n.option,a=i.selectedMode;if(a){var o=Le(i.selected),s=n.getSelectedMapKey(r);a==="single"||a===!0?(o[s]=!0,R(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},t.type="visualMap.piecewise",t}(Bie);function Vie(e){e.registerComponentModel(lKe),e.registerComponentView(cKe),$ie(e)}function fKe(e){Ye(Fie),Ye(Vie)}var hKe=function(){function e(t){this._thumbnailModel=t}return e.prototype.reset=function(t){this._renderVersion=t.getMainProcessVersion()},e.prototype.renderContent=function(t){var r=t.api.getViewOfComponentModel(this._thumbnailModel);r&&(t.group.silent=!0,r.renderContent({group:t.group,targetTrans:t.targetTrans,z2Range:hQ(t.group),roamType:t.roamType,viewportRect:t.viewportRect,renderVersion:this._renderVersion}))},e.prototype.updateWindow=function(t,r){var n=r.getViewOfComponentModel(this._thumbnailModel);n&&n.updateWindow({targetTrans:t,renderVersion:this._renderVersion})},e}(),dKe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.preventAutoZ=!0,r}return t.prototype.optionUpdated=function(r,n){this._updateBridge()},t.prototype._updateBridge=function(){var r=this._birdge=this._birdge||new hKe(this);if(this._target=null,this.ecModel.eachSeries(function(i){qW(i,null)}),this.shouldShow()){var n=this.getTarget();qW(n.baseMapProvider,r)}},t.prototype.shouldShow=function(){return this.getShallow("show",!0)},t.prototype.getBridge=function(){return this._birdge},t.prototype.getTarget=function(){if(this._target)return this._target;var r=this.getReferringComponents("series",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return r?r.subType!=="graph"&&(r=null):r=this.ecModel.queryComponents({mainType:"series",subType:"graph"})[0],this._target={baseMapProvider:r},this._target},t.type="thumbnail",t.layoutMode="box",t.dependencies=["series","geo"],t.defaultOption={show:!0,right:1,bottom:1,height:"25%",width:"25%",itemStyle:{borderColor:J.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:J.color.neutral30,borderColor:J.color.neutral40,opacity:.3},z:10},t}(Qe),vKe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){if(this._api=i,this._model=r,this._coordSys||(this._coordSys=new Bf),!this._isEnabled()){this._clear();return}this._renderVersion=i.getMainProcessVersion();var a=this.group;a.removeAll();var o=r.getModel("itemStyle"),s=o.getItemStyle();s.fill==null&&(s.fill=n.get("backgroundColor")||J.color.neutral00);var l=zr(r,i).refContainer,u=$t(OQ(r,!0),l),c=s.lineWidth||0,f=this._contentRect=pf(u.clone(),c/2,!0,!0),h=new Ie;a.add(h),h.setClipPath(new qe({shape:f.plain()}));var d=this._targetGroup=new Ie;h.add(d);var v=u.plain();v.r=o.getShallow("borderRadius",!0),a.add(this._bgRect=new qe({style:s,shape:v,silent:!1,cursor:"grab"}));var m=r.getModel("windowStyle"),y=m.getShallow("borderRadius",!0);h.add(this._windowRect=new qe({shape:{x:0,y:0,width:0,height:0,r:y},style:m.getItemStyle(),silent:!1,cursor:"grab"})),this._dealRenderContent(),this._dealUpdateWindow(),MU(r,this)},t.prototype.renderContent=function(r){this._bridgeRendered=r,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),MU(this._model,this))},t.prototype._dealRenderContent=function(){var r=this._bridgeRendered;if(!(!r||r.renderVersion!==this._renderVersion)){var n=this._targetGroup,i=this._coordSys,a=this._contentRect;if(n.removeAll(),!!r){var o=r.group,s=o.getBoundingRect();n.add(o),this._bgRect.z2=r.z2Range.min-10,i.setBoundingRect(s.x,s.y,s.width,s.height);var l=$t({left:"center",top:"center",aspect:s.width/s.height},a);i.setViewRect(l.x,l.y,l.width,l.height),o.attr(i.getTransformInfo().raw),this._windowRect.z2=r.z2Range.max+10,this._resetRoamController(r.roamType)}}},t.prototype.updateWindow=function(r){var n=this._bridgeRendered;n&&n.renderVersion===r.renderVersion&&(n.targetTrans=r.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},t.prototype._dealUpdateWindow=function(){var r=this._bridgeRendered;if(!(!r||r.renderVersion!==this._renderVersion)){var n=pa([],r.targetTrans),i=Wa([],this._coordSys.transform,n);this._transThisToTarget=pa([],i);var a=r.viewportRect;a?a=a.clone():a=new je(0,0,this._api.getWidth(),this._api.getHeight()),a.applyTransform(i);var o=this._windowRect,s=o.shape.r;o.setShape(Oe({r:s},a))}},t.prototype._resetRoamController=function(r){var n=this,i=this._api,a=this._roamController;if(a||(a=this._roamController=new Rf(i.getZr())),!r||!this._isEnabled()){a.disable();return}a.enable(r,{api:i,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(o,s,l){return n._contentRect.contain(s,l)}}}),a.off("pan").off("zoom").on("pan",_e(this._onPan,this)).on("zoom",_e(this._onZoom,this))},t.prototype._onPan=function(r){var n=this._transThisToTarget;if(!(!this._isEnabled()||!n)){var i=lr([],[r.oldX,r.oldY],n),a=lr([],[r.oldX-r.dx,r.oldY-r.dy],n);this._api.dispatchAction(AU(this._model.getTarget().baseMapProvider,{dx:a[0]-i[0],dy:a[1]-i[1]}))}},t.prototype._onZoom=function(r){var n=this._transThisToTarget;if(!(!this._isEnabled()||!n)){var i=lr([],[r.originX,r.originY],n);this._api.dispatchAction(AU(this._model.getTarget().baseMapProvider,{zoom:1/r.scale,originX:i[0],originY:i[1]}))}},t.prototype._isEnabled=function(){var r=this._model;if(!r||!r.shouldShow())return!1;var n=r.getTarget().baseMapProvider;return!!n},t.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},t.prototype.remove=function(){this._clear()},t.prototype.dispose=function(){this._clear()},t.type="thumbnail",t}(It);function AU(e,t){var r=e.mainType==="series"?e.subType+"Roam":e.mainType+"Roam",n={type:r};return n[e.mainType+"Id"]=e.id,ae(n,t),n}function MU(e,t){var r=gf(e);HT(t.group,r.z,r.zlevel)}function pKe(e){e.registerComponentModel(dKe),e.registerComponentView(vKe)}var gKe={label:{enabled:!0},decal:{show:!1}},PU=et(),mKe={};function yKe(e,t){var r=e.getModel("aria");if(!r.get("enabled"))return;var n=Le(gKe);Ue(n.label,e.getLocaleModel().get("aria"),!1),Ue(r.option,n,!1),i(),a();function i(){var u=r.getModel("decal"),c=u.get("show");if(c){var f=Ce();e.eachSeries(function(h){if(!h.isColorBySeries()){var d=f.get(h.type);d||(d={},f.set(h.type,d)),PU(h).scope=d}}),e.eachRawSeries(function(h){if(e.isSeriesFiltered(h))return;if(ke(h.enableAriaDecal)){h.enableAriaDecal();return}var d=h.getData();if(h.isColorBySeries()){var _=zI(h.ecModel,h.name,mKe,e.getSeriesCount()),b=d.getVisual("decal");d.setVisual("decal",S(b,_))}else{var v=h.getRawData(),m={},y=PU(h).scope;d.each(function(T){var C=d.getRawIndex(T);m[C]=T});var x=v.count();v.each(function(T){var C=m[T],A=v.getName(T)||T+"",P=zI(h.ecModel,A,y,x),I=d.getItemVisual(C,"decal");d.setItemVisual(C,"decal",S(I,P))})}function S(T,C){var A=T?ae(ae({},C),T):C;return A.dirty=!0,A}})}}function a(){var u=t.getZr().dom;if(u){var c=e.getLocaleModel().get("aria"),f=r.getModel("label");if(f.option=Oe(f.option,c),!!f.get("enabled")){if(u.setAttribute("role","img"),f.get("description")){u.setAttribute("aria-label",f.get("description"));return}var h=e.getSeriesCount(),d=f.get(["data","maxCount"])||10,v=f.get(["series","maxCount"])||10,m=Math.min(h,v),y;if(!(h<1)){var x=s();if(x){var _=f.get(["general","withTitle"]);y=o(_,{title:x})}else y=f.get(["general","withoutTitle"]);var b=[],S=h>1?f.get(["series","multiple","prefix"]):f.get(["series","single","prefix"]);y+=o(S,{seriesCount:h}),e.eachSeries(function(P,I){if(I<m){var k=void 0,E=P.get("name"),D=E?"withName":"withoutName";k=h>1?f.get(["series","multiple",D]):f.get(["series","single",D]),k=o(k,{seriesId:P.seriesIndex,seriesName:P.get("name"),seriesType:l(P.subType)});var N=P.getData();if(N.count()>d){var z=f.get(["data","partialData"]);k+=o(z,{displayCnt:d})}else k+=f.get(["data","allData"]);for(var V=f.get(["data","separator","middle"]),F=f.get(["data","separator","end"]),$=f.get(["data","excludeDimensionId"]),B=[],H=0;H<N.count();H++)if(H<d){var U=N.getName(H),Y=$?dt(N.getValues(H),function(Q,re){return He($,re)===-1}):N.getValues(H),Z=f.get(["data",U?"withName":"withoutName"]);B.push(o(Z,{name:U,value:Y.join(V)}))}k+=B.join(V)+F,b.push(k)}});var T=f.getModel(["series","multiple","separator"]),C=T.get("middle"),A=T.get("end");y+=b.join(C)+A,u.setAttribute("aria-label",y)}}}}function o(u,c){if(!ye(u))return u;var f=u;return R(c,function(h,d){f=f.replace(new RegExp("\\{\\s*"+d+"\\s*\\}","g"),h)}),f}function s(){var u=e.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){var c=e.getLocaleModel().get(["series","typeNames"]);return c[u]||c.chart}}function xKe(e){if(!(!e||!e.aria)){var t=e.aria;t.show!=null&&(t.enabled=t.show),t.label=t.label||{},R(["description","general","series","data"],function(r){t[r]!=null&&(t.label[r]=t[r])})}}function _Ke(e){e.registerPreprocessor(xKe),e.registerVisual(e.PRIORITY.VISUAL.ARIA,yKe)}var kU={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},bKe=function(){function e(t){var r=this._condVal=ye(t)?new RegExp(t):jK(t)?t:null;if(r==null){var n="";mt(n)}}return e.prototype.evaluate=function(t){var r=typeof t;return ye(r)?this._condVal.test(t):st(r)?this._condVal.test(t+""):!1},e}(),wKe=function(){function e(){}return e.prototype.evaluate=function(){return this.value},e}(),SKe=function(){function e(){}return e.prototype.evaluate=function(){for(var t=this.children,r=0;r<t.length;r++)if(!t[r].evaluate())return!1;return!0},e}(),TKe=function(){function e(){}return e.prototype.evaluate=function(){for(var t=this.children,r=0;r<t.length;r++)if(t[r].evaluate())return!0;return!1},e}(),CKe=function(){function e(){}return e.prototype.evaluate=function(){return!this.child.evaluate()},e}(),AKe=function(){function e(){}return e.prototype.evaluate=function(){for(var t=!!this.valueParser,r=this.getValue,n=r(this.valueGetterParam),i=t?this.valueParser(n):null,a=0;a<this.subCondList.length;a++)if(!this.subCondList[a].evaluate(t?i:n))return!1;return!0},e}();function UR(e,t){if(e===!0||e===!1){var r=new wKe;return r.value=e,r}var n="";return Gie(e)||mt(n),e.and?LU("and",e,t):e.or?LU("or",e,t):e.not?MKe(e,t):PKe(e,t)}function LU(e,t,r){var n=t[e],i="";oe(n)||mt(i),n.length||mt(i);var a=e==="and"?new SKe:new TKe;return a.children=le(n,function(o){return UR(o,r)}),a.children.length||mt(i),a}function MKe(e,t){var r=e.not,n="";Gie(r)||mt(n);var i=new CKe;return i.child=UR(r,t),i.child||mt(n),i}function PKe(e,t){for(var r="",n=t.prepareGetValue(e),i=[],a=at(e),o=e.parser,s=o?eee(o):null,l=0;l<a.length;l++){var u=a[l];if(!(u==="parser"||t.valueGetterAttrMap.get(u))){var c=Se(kU,u)?kU[u]:u,f=e[u],h=s?s(f):f,d=YBe(c,h)||c==="reg"&&new bKe(h);d||mt(r),i.push(d)}}i.length||mt(r);var v=new AKe;return v.valueGetterParam=n,v.valueParser=s,v.getValue=t.getValue,v.subCondList=i,v}function Gie(e){return Ee(e)&&!bn(e)}var kKe=function(){function e(t,r){this._cond=UR(t,r)}return e.prototype.evaluate=function(){return this._cond.evaluate()},e}();function LKe(e,t){return new kKe(e,t)}var IKe={type:"echarts:filter",transform:function(e){for(var t=e.upstream,r,n=LKe(e.config,{valueGetterAttrMap:Ce({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;Se(s,"dimension")||mt(l);var c=t.getDimensionInfo(u);return c||mt(l),{dimIdx:c.index}},getValue:function(s){return t.retrieveValueFromItem(r,s.dimIdx)}}),i=[],a=0,o=t.count();a<o;a++)r=t.getRawDataItem(a),n.evaluate()&&i.push(r);return{data:i}}},OKe={type:"echarts:sort",transform:function(e){var t=e.upstream,r=e.config,n="",i=Lt(r);i.length||mt(n);var a=[];R(i,function(c){var f=c.dimension,h=c.order,d=c.parser,v=c.incomparable;if(f==null&&mt(n),h!=="asc"&&h!=="desc"&&mt(n),v&&v!=="min"&&v!=="max"){var m="";mt(m)}if(h!=="asc"&&h!=="desc"){var y="";mt(y)}var x=t.getDimensionInfo(f);x||mt(n);var _=d?eee(d):null;d&&!_&&mt(n),a.push({dimIdx:x.index,parser:_,comparator:new ree(h,v)})});var o=t.sourceFormat;o!==un&&o!==Ri&&mt(n);for(var s=[],l=0,u=t.count();l<u;l++)s.push(t.getRawDataItem(l));return s.sort(function(c,f){for(var h=0;h<a.length;h++){var d=a[h],v=t.retrieveValueFromItem(c,d.dimIdx),m=t.retrieveValueFromItem(f,d.dimIdx);d.parser&&(v=d.parser(v),m=d.parser(m));var y=d.comparator.evaluate(v,m);if(y!==0)return y}return 0}),{data:s}}};function EKe(e){e.registerTransform(IKe),e.registerTransform(OKe)}var DKe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="dataset",r}return t.prototype.init=function(r,n,i){e.prototype.init.call(this,r,n,i),this._sourceManager=new oee(this),l6(this)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),l6(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:Za},t}(Qe),NKe=function(e){K(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="dataset",r}return t.type="dataset",t}(It);function jKe(e){e.registerComponentModel(DKe),e.registerComponentView(NKe)}var go=Uo.CMD;function Jh(e,t){return Math.abs(e-t)<1e-5}function eE(e){var t=e.data,r=e.len(),n=[],i,a=0,o=0,s=0,l=0;function u(N,z){i&&i.length>2&&n.push(i),i=[N,z]}function c(N,z,V,F){Jh(N,V)&&Jh(z,F)||i.push(N,z,V,F,V,F)}function f(N,z,V,F,$,B){var H=Math.abs(z-N),U=Math.tan(H/4)*4/3,Y=z<N?-1:1,Z=Math.cos(N),Q=Math.sin(N),re=Math.cos(z),ue=Math.sin(z),de=Z*$+V,Re=Q*B+F,xe=re*$+V,ie=ue*B+F,ve=$*U*Y,ce=B*U*Y;i.push(de-ve*Q,Re+ce*Z,xe+ve*ue,ie-ce*re,xe,ie)}for(var h,d,v,m,y=0;y<r;){var x=t[y++],_=y===1;switch(_&&(a=t[y],o=t[y+1],s=a,l=o,(x===go.L||x===go.C||x===go.Q)&&(i=[s,l])),x){case go.M:a=s=t[y++],o=l=t[y++],u(s,l);break;case go.L:h=t[y++],d=t[y++],c(a,o,h,d),a=h,o=d;break;case go.C:i.push(t[y++],t[y++],t[y++],t[y++],a=t[y++],o=t[y++]);break;case go.Q:h=t[y++],d=t[y++],v=t[y++],m=t[y++],i.push(a+2/3*(h-a),o+2/3*(d-o),v+2/3*(h-v),m+2/3*(d-m),v,m),a=v,o=m;break;case go.A:var b=t[y++],S=t[y++],T=t[y++],C=t[y++],A=t[y++],P=t[y++]+A;y+=1;var I=!t[y++];h=Math.cos(A)*T+b,d=Math.sin(A)*C+S,_?(s=h,l=d,u(s,l)):c(a,o,h,d),a=Math.cos(P)*T+b,o=Math.sin(P)*C+S;for(var k=(I?-1:1)*Math.PI/2,E=A;I?E>P:E<P;E+=k){var D=I?Math.max(E+k,P):Math.min(E+k,P);f(E,D,b,S,T,C)}break;case go.R:s=a=t[y++],l=o=t[y++],h=s+t[y++],d=l+t[y++],u(h,l),c(h,l,h,d),c(h,d,s,d),c(s,d,s,l),c(s,l,h,l);break;case go.Z:i&&c(a,o,s,l),a=s,o=l;break}}return i&&i.length>2&&n.push(i),n}function tE(e,t,r,n,i,a,o,s,l,u){if(Jh(e,r)&&Jh(t,n)&&Jh(i,o)&&Jh(a,s)){l.push(o,s);return}var c=2/u,f=c*c,h=o-e,d=s-t,v=Math.sqrt(h*h+d*d);h/=v,d/=v;var m=r-e,y=n-t,x=i-o,_=a-s,b=m*m+y*y,S=x*x+_*_;if(b<f&&S<f){l.push(o,s);return}var T=h*m+d*y,C=-h*x-d*_,A=b-T*T,P=S-C*C;if(A<f&&T>=0&&P<f&&C>=0){l.push(o,s);return}var I=[],k=[];fu(e,r,i,o,.5,I),fu(t,n,a,s,.5,k),tE(I[0],k[0],I[1],k[1],I[2],k[2],I[3],k[3],l,u),tE(I[4],k[4],I[5],k[5],I[6],k[6],I[7],k[7],l,u)}function RKe(e,t){var r=eE(e),n=[];t=t||1;for(var i=0;i<r.length;i++){var a=r[i],o=[],s=a[0],l=a[1];o.push(s,l);for(var u=2;u<a.length;){var c=a[u++],f=a[u++],h=a[u++],d=a[u++],v=a[u++],m=a[u++];tE(s,l,c,f,h,d,v,m,o,t),s=v,l=m}n.push(o)}return n}function Wie(e,t,r){var n=e[t],i=e[1-t],a=Math.abs(n/i),o=Math.ceil(Math.sqrt(a*r)),s=Math.floor(r/o);s===0&&(s=1,o=r);for(var l=[],u=0;u<o;u++)l.push(s);var c=o*s,f=r-c;if(f>0)for(var u=0;u<f;u++)l[u%o]+=1;return l}function IU(e,t,r){for(var n=e.r0,i=e.r,a=e.startAngle,o=e.endAngle,s=Math.abs(o-a),l=s*i,u=i-n,c=l>Math.abs(u),f=Wie([l,u],c?0:1,t),h=(c?s:u)/f.length,d=0;d<f.length;d++)for(var v=(c?u:s)/f[d],m=0;m<f[d];m++){var y={};c?(y.startAngle=a+h*d,y.endAngle=a+h*(d+1),y.r0=n+v*m,y.r=n+v*(m+1)):(y.startAngle=a+v*m,y.endAngle=a+v*(m+1),y.r0=n+h*d,y.r=n+h*(d+1)),y.clockwise=e.clockwise,y.cx=e.cx,y.cy=e.cy,r.push(y)}}function BKe(e,t,r){for(var n=e.width,i=e.height,a=n>i,o=Wie([n,i],a?0:1,t),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",c=a?"y":"x",f=e[s]/o.length,h=0;h<o.length;h++)for(var d=e[l]/o[h],v=0;v<o[h];v++){var m={};m[u]=h*f,m[c]=v*d,m[s]=f,m[l]=d,m.x+=e.x,m.y+=e.y,r.push(m)}}function OU(e,t,r,n){return e*n-r*t}function zKe(e,t,r,n,i,a,o,s){var l=r-e,u=n-t,c=o-i,f=s-a,h=OU(c,f,l,u);if(Math.abs(h)<1e-6)return null;var d=e-i,v=t-a,m=OU(d,v,c,f)/h;return m<0||m>1?null:new Ne(m*l+e,m*u+t)}function $Ke(e,t,r){var n=new Ne;Ne.sub(n,r,t),n.normalize();var i=new Ne;Ne.sub(i,e,t);var a=i.dot(n);return a}function Sh(e,t){var r=e[e.length-1];r&&r[0]===t[0]&&r[1]===t[1]||e.push(t)}function FKe(e,t,r){for(var n=e.length,i=[],a=0;a<n;a++){var o=e[a],s=e[(a+1)%n],l=zKe(o[0],o[1],s[0],s[1],t.x,t.y,r.x,r.y);l&&i.push({projPt:$Ke(l,t,r),pt:l,idx:a})}if(i.length<2)return[{points:e},{points:e}];i.sort(function(y,x){return y.projPt-x.projPt});var u=i[0],c=i[i.length-1];if(c.idx<u.idx){var f=u;u=c,c=f}for(var h=[u.pt.x,u.pt.y],d=[c.pt.x,c.pt.y],v=[h],m=[d],a=u.idx+1;a<=c.idx;a++)Sh(v,e[a].slice());Sh(v,d),Sh(v,h);for(var a=c.idx+1;a<=u.idx+n;a++)Sh(m,e[a%n].slice());return Sh(m,h),Sh(m,d),[{points:v},{points:m}]}function EU(e){var t=e.points,r=[],n=[];zT(t,r,n);var i=new je(r[0],r[1],n[0]-r[0],n[1]-r[1]),a=i.width,o=i.height,s=i.x,l=i.y,u=new Ne,c=new Ne;return a>o?(u.x=c.x=s+a/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+a),FKe(t,u,c)}function sS(e,t,r,n){if(r===1)n.push(t);else{var i=Math.floor(r/2),a=e(t);sS(e,a[0],i,n),sS(e,a[1],r-i,n)}return n}function VKe(e,t){for(var r=[],n=0;n<t;n++)r.push(FN(e));return r}function GKe(e,t){t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel}function WKe(e){for(var t=[],r=0;r<e.length;)t.push([e[r++],e[r++]]);return t}function HKe(e,t){var r=[],n=e.shape,i;switch(e.type){case"rect":BKe(n,t,r),i=qe;break;case"sector":IU(n,t,r),i=Sn;break;case"circle":IU({r0:0,r:n.r,startAngle:0,endAngle:Math.PI*2,cx:n.cx,cy:n.cy},t,r),i=Sn;break;default:var a=e.getComputedTransform(),o=a?Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1],a[2]*a[2]+a[3]*a[3])):1,s=le(RKe(e.getUpdatedPathProxy(),o),function(x){return WKe(x)}),l=s.length;if(l===0)sS(EU,{points:s[0]},t,r);else if(l===t)for(var u=0;u<l;u++)r.push({points:s[u]});else{var c=0,f=le(s,function(x){var _=[],b=[];zT(x,_,b);var S=(b[1]-_[1])*(b[0]-_[0]);return c+=S,{poly:x,area:S}});f.sort(function(x,_){return _.area-x.area});for(var h=t,u=0;u<l;u++){var d=f[u];if(h<=0)break;var v=u===l-1?h:Math.ceil(d.area/c*t);v<0||(sS(EU,{points:d.poly},v,r),h-=v)}}i=Tn;break}if(!i)return VKe(e,t);for(var m=[],u=0;u<r.length;u++){var y=new i;y.setShape(r[u]),GKe(e,y),m.push(y)}return m}function UKe(e,t){var r=e.length,n=t.length;if(r===n)return[e,t];for(var i=[],a=[],o=r<n?e:t,s=Math.min(r,n),l=Math.abs(n-r)/6,u=(s-2)/6,c=Math.ceil(l/u)+1,f=[o[0],o[1]],h=l,d=2;d<s;){var v=o[d-2],m=o[d-1],y=o[d++],x=o[d++],_=o[d++],b=o[d++],S=o[d++],T=o[d++];if(h<=0){f.push(y,x,_,b,S,T);continue}for(var C=Math.min(h,c-1)+1,A=1;A<=C;A++){var P=A/C;fu(v,y,_,S,P,i),fu(m,x,b,T,P,a),v=i[3],m=a[3],f.push(i[1],a[1],i[2],a[2],v,m),y=i[5],x=a[5],_=i[6],b=a[6]}h-=C-1}return o===e?[f,t]:[e,f]}function DU(e,t){for(var r=e.length,n=e[r-2],i=e[r-1],a=[],o=0;o<t.length;)a[o++]=n,a[o++]=i;return a}function ZKe(e,t){for(var r,n,i,a=[],o=[],s=0;s<Math.max(e.length,t.length);s++){var l=e[s],u=t[s],c=void 0,f=void 0;l?u?(r=UKe(l,u),c=r[0],f=r[1],n=c,i=f):(f=DU(i||l,l),c=l):(c=DU(n||u,u),f=u),a.push(c),o.push(f)}return[a,o]}function NU(e){for(var t=0,r=0,n=0,i=e.length,a=0,o=i-2;a<i;o=a,a+=2){var s=e[o],l=e[o+1],u=e[a],c=e[a+1],f=s*c-u*l;t+=f,r+=(s+u)*f,n+=(l+c)*f}return t===0?[e[0]||0,e[1]||0]:[r/t/3,n/t/3,t]}function YKe(e,t,r,n){for(var i=(e.length-2)/6,a=1/0,o=0,s=e.length,l=s-2,u=0;u<i;u++){for(var c=u*6,f=0,h=0;h<s;h+=2){var d=h===0?c:(c+h-2)%l+2,v=e[d]-r[0],m=e[d+1]-r[1],y=t[h]-n[0],x=t[h+1]-n[1],_=y-v,b=x-m;f+=_*_+b*b}f<a&&(a=f,o=u)}return o}function XKe(e){for(var t=[],r=e.length,n=0;n<r;n+=2)t[n]=e[r-n-2],t[n+1]=e[r-n-1];return t}function qKe(e,t,r,n){for(var i=[],a,o=0;o<e.length;o++){var s=e[o],l=t[o],u=NU(s),c=NU(l);a==null&&(a=u[2]<0!=c[2]<0);var f=[],h=[],d=0,v=1/0,m=[],y=s.length;a&&(s=XKe(s));for(var x=YKe(s,l,u,c)*6,_=y-2,b=0;b<_;b+=2){var S=(x+b)%_+2;f[b+2]=s[S]-u[0],f[b+3]=s[S+1]-u[1]}f[0]=s[x]-u[0],f[1]=s[x+1]-u[1];for(var T=n/r,C=-n/2;C<=n/2;C+=T){for(var A=Math.sin(C),P=Math.cos(C),I=0,b=0;b<s.length;b+=2){var k=f[b],E=f[b+1],D=l[b]-c[0],N=l[b+1]-c[1],z=D*P-N*A,V=D*A+N*P;m[b]=z,m[b+1]=V;var F=z-k,$=V-E;I+=F*F+$*$}if(I<v){v=I,d=C;for(var B=0;B<m.length;B++)h[B]=m[B]}}i.push({from:f,to:h,fromCp:u,toCp:c,rotation:-d})}return i}function lS(e){return e.__isCombineMorphing}var Hie="__mOriginal_";function uS(e,t,r){var n=Hie+t,i=e[n]||e[t];e[n]||(e[n]=e[t]);var a=r.replace,o=r.after,s=r.before;e[t]=function(){var l=arguments,u;return s&&s.apply(this,l),a?u=a.apply(this,l):u=i.apply(this,l),o&&o.apply(this,l),u}}function om(e,t){var r=Hie+t;e[r]&&(e[t]=e[r],e[r]=null)}function jU(e,t){for(var r=0;r<e.length;r++)for(var n=e[r],i=0;i<n.length;){var a=n[i],o=n[i+1];n[i++]=t[0]*a+t[2]*o+t[4],n[i++]=t[1]*a+t[3]*o+t[5]}}function Uie(e,t){var r=e.getUpdatedPathProxy(),n=t.getUpdatedPathProxy(),i=ZKe(eE(r),eE(n)),a=i[0],o=i[1],s=e.getComputedTransform(),l=t.getComputedTransform();function u(){this.transform=null}s&&jU(a,s),l&&jU(o,l),uS(t,"updateTransform",{replace:u}),t.transform=null;var c=qKe(a,o,10,Math.PI),f=[];uS(t,"buildPath",{replace:function(h){for(var d=t.__morphT,v=1-d,m=[],y=0;y<c.length;y++){var x=c[y],_=x.from,b=x.to,S=x.rotation*d,T=x.fromCp,C=x.toCp,A=Math.sin(S),P=Math.cos(S);Yg(m,T,C,d);for(var I=0;I<_.length;I+=2){var k=_[I],E=_[I+1],D=b[I],N=b[I+1],z=k*v+D*d,V=E*v+N*d;f[I]=z*P-V*A+m[0],f[I+1]=z*A+V*P+m[1]}var F=f[0],$=f[1];h.moveTo(F,$);for(var I=2;I<_.length;){var D=f[I++],N=f[I++],B=f[I++],H=f[I++],U=f[I++],Y=f[I++];F===D&&$===N&&B===U&&H===Y?h.lineTo(U,Y):h.bezierCurveTo(D,N,B,H,U,Y),F=U,$=Y}}}})}function ZR(e,t,r){if(!e||!t)return t;var n=r.done,i=r.during;Uie(e,t),t.__morphT=0;function a(){om(t,"buildPath"),om(t,"updateTransform"),t.__morphT=-1,t.createPathProxy(),t.dirtyShape()}return t.animateTo({__morphT:1},Oe({during:function(o){t.dirtyShape(),i&&i(o)},done:function(){a(),n&&n()}},r)),t}function KKe(e,t,r,n,i,a){var o=16;e=i===r?0:Math.round(32767*(e-r)/(i-r)),t=a===n?0:Math.round(32767*(t-n)/(a-n));for(var s=0,l,u=(1<<o)/2;u>0;u/=2){var c=0,f=0;(e&u)>0&&(c=1),(t&u)>0&&(f=1),s+=u*u*(3*c^f),f===0&&(c===1&&(e=u-1-e,t=u-1-t),l=e,e=t,t=l)}return s}function cS(e){var t=1/0,r=1/0,n=-1/0,i=-1/0,a=le(e,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),f=l.y+l.height/2+(u?u[5]:0);return t=Math.min(c,t),r=Math.min(f,r),n=Math.max(c,n),i=Math.max(f,i),[c,f]}),o=le(a,function(s,l){return{cp:s,z:KKe(s[0],s[1],t,r,n,i),path:e[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function Zie(e){return HKe(e.path,e.count)}function rE(){return{fromIndividuals:[],toIndividuals:[],count:0}}function JKe(e,t,r){var n=[];function i(T){for(var C=0;C<T.length;C++){var A=T[C];lS(A)?i(A.childrenRef()):A instanceof nt&&n.push(A)}}i(e);var a=n.length;if(!a)return rE();var o=r.dividePath||Zie,s=o({path:t,count:a});if(s.length!==a)return console.error("Invalid morphing: unmatched splitted path"),rE();n=cS(n),s=cS(s);for(var l=r.done,u=r.during,c=r.individualDelay,f=new Ts,h=0;h<a;h++){var d=n[h],v=s[h];v.parent=t,v.copyTransform(f),c||Uie(d,v)}t.__isCombineMorphing=!0,t.childrenRef=function(){return s};function m(T){for(var C=0;C<s.length;C++)s[C].addSelfToZr(T)}uS(t,"addSelfToZr",{after:function(T){m(T)}}),uS(t,"removeSelfFromZr",{after:function(T){for(var C=0;C<s.length;C++)s[C].removeSelfFromZr(T)}});function y(){t.__isCombineMorphing=!1,t.__morphT=-1,t.childrenRef=null,om(t,"addSelfToZr"),om(t,"removeSelfFromZr")}var x=s.length;if(c)for(var _=x,b=function(){_--,_===0&&(y(),l&&l())},h=0;h<x;h++){var S=c?Oe({delay:(r.delay||0)+c(h,x,n[h],s[h]),done:b},r):r;ZR(n[h],s[h],S)}else t.__morphT=0,t.animateTo({__morphT:1},Oe({during:function(T){for(var C=0;C<x;C++){var A=s[C];A.__morphT=t.__morphT,A.dirtyShape()}u&&u(T)},done:function(){y();for(var T=0;T<e.length;T++)om(e[T],"updateTransform");l&&l()}},r));return t.__zr&&m(t.__zr),{fromIndividuals:n,toIndividuals:s,count:x}}function QKe(e,t,r){var n=t.length,i=[],a=r.dividePath||Zie;function o(d){for(var v=0;v<d.length;v++){var m=d[v];lS(m)?o(m.childrenRef()):m instanceof nt&&i.push(m)}}if(lS(e)){o(e.childrenRef());var s=i.length;if(s<n)for(var l=0,u=s;u<n;u++)i.push(FN(i[l++%s]));i.length=n}else{i=a({path:e,count:n});for(var c=e.getComputedTransform(),u=0;u<i.length;u++)i[u].setLocalTransform(c);if(i.length!==n)return console.error("Invalid morphing: unmatched splitted path"),rE()}i=cS(i),t=cS(t);for(var f=r.individualDelay,u=0;u<n;u++){var h=f?Oe({delay:(r.delay||0)+f(u,n,i[u],t[u])},r):r;ZR(i[u],t[u],h)}return{fromIndividuals:i,toIndividuals:t,count:t.length}}function RU(e){return oe(e[0])}function BU(e,t){for(var r=[],n=e.length,i=0;i<n;i++)r.push({one:e[i],many:[]});for(var i=0;i<t.length;i++){var a=t[i].length,o=void 0;for(o=0;o<a;o++)r[o%n].many.push(t[i][o])}for(var s=0,i=n-1;i>=0;i--)if(!r[i].many.length){var l=r[s].many;if(l.length<=1)if(s)s=0;else return r;var a=l.length,u=Math.ceil(a/2);r[i].many=l.slice(u,a),r[s].many=l.slice(0,u),s++}return r}var eJe={clone:function(e){for(var t=[],r=1-Math.pow(1-e.path.style.opacity,1/e.count),n=0;n<e.count;n++){var i=FN(e.path);i.setStyle("opacity",r),t.push(i)}return t},split:null};function mP(e,t,r,n,i,a){if(!e.length||!t.length)return;var o=Vv("update",n,i);if(!(o&&o.duration>0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;RU(e)&&(u=e,c=t),RU(t)&&(u=t,c=e);function f(x,_,b,S,T){var C=x.many,A=x.one;if(C.length===1&&!T){var P=_?C[0]:A,I=_?A:C[0];if(lS(P))f({many:[P],one:I},!0,b,S,!0);else{var k=s?Oe({delay:s(b,S)},l):l;ZR(P,I,k),a(P,I,P,I,k)}}else for(var E=Oe({dividePath:eJe[r],individualDelay:s&&function($,B,H,U){return s($+b,S)}},l),D=_?JKe(C,A,E):QKe(A,C,E),N=D.fromIndividuals,z=D.toIndividuals,V=N.length,F=0;F<V;F++){var k=s?Oe({delay:s(F,V)},l):l;a(N[F],z[F],_?C[F]:x.one,_?x.one:C[F],k)}}for(var h=u?u===e:e.length>t.length,d=u?BU(c,u):BU(h?t:e,[h?e:t]),v=0,m=0;m<d.length;m++)v+=d[m].many.length;for(var y=0,m=0;m<d.length;m++)f(d[m],h,y,v),y+=d[m].many.length}function _c(e){if(!e)return[];if(oe(e)){for(var t=[],r=0;r<e.length;r++)t.push(_c(e[r]));return t}var n=[];return e.traverse(function(i){i instanceof nt&&!i.disableMorphing&&!i.invisible&&!i.ignore&&n.push(i)}),n}var Yie=1e4,tJe=0,zU=1,$U=2,rJe=et();function nJe(e,t){for(var r=e.dimensions,n=0;n<r.length;n++){var i=e.getDimensionInfo(r[n]);if(i&&i.otherDims[t]===0)return r[n]}}function iJe(e,t,r){var n=e.getDimensionInfo(r),i=n&&n.ordinalMeta;if(n){var a=e.get(n.name,t);return i&&i.categories[a]||a+""}}function FU(e,t,r,n){var i=n?"itemChildGroupId":"itemGroupId",a=nJe(e,i);if(a){var o=iJe(e,t,a);return o}var s=e.getRawDataItem(t),l=n?"childGroupId":"groupId";if(s&&s[l])return s[l]+"";if(!n)return r||e.getId(t)}function VU(e){var t=[];return R(e,function(r){var n=r.data,i=r.dataGroupId;if(!(n.count()>Yie))for(var a=n.getIndices(),o=0;o<a.length;o++)t.push({data:n,groupId:FU(n,o,i,!1),childGroupId:FU(n,o,i,!0),divide:r.divide,dataIndex:o})}),t}function yP(e,t,r){e.traverse(function(n){n instanceof nt&&jt(n,{style:{opacity:0}},t,{dataIndex:r,isFrom:!0})})}function xP(e){if(e.parent){var t=e.getComputedTransform();e.setLocalTransform(t),e.parent.remove(e)}}function Th(e){e.stopAnimation(),e.isGroup&&e.traverse(function(t){t.stopAnimation()})}function aJe(e,t,r){var n=Vv("update",r,t);n&&e.traverse(function(i){if(i instanceof ga){var a=w5e(i);a&&i.animateFrom({style:a},n)}})}function oJe(e,t){var r=e.length;if(r!==t.length)return!1;for(var n=0;n<r;n++){var i=e[n],a=t[n];if(i.data.getId(i.dataIndex)!==a.data.getId(a.dataIndex))return!1}return!0}function Xie(e,t,r){var n=VU(e),i=VU(t);function a(b,S,T,C,A){(T||b)&&S.animateFrom({style:T&&T!==b?ae(ae({},T.style),b.style):b.style},A)}var o=!1,s=tJe,l=Ce(),u=Ce();n.forEach(function(b){b.groupId&&l.set(b.groupId,!0),b.childGroupId&&u.set(b.childGroupId,!0)});for(var c=0;c<i.length;c++){var f=i[c].groupId;if(u.get(f)){s=zU;break}var h=i[c].childGroupId;if(h&&l.get(h)){s=$U;break}}function d(b,S){return function(T){var C=T.data,A=T.dataIndex;return S?C.getId(A):b?s===zU?T.childGroupId:T.groupId:s===$U?T.childGroupId:T.groupId}}var v=oJe(n,i),m={};if(!v)for(var c=0;c<i.length;c++){var y=i[c],x=y.data.getItemGraphicEl(y.dataIndex);x&&(m[x.id]=!0)}function _(b,S){var T=n[S],C=i[b],A=C.data.hostModel,P=T.data.getItemGraphicEl(T.dataIndex),I=C.data.getItemGraphicEl(C.dataIndex);if(P===I){I&&aJe(I,C.dataIndex,A);return}P&&m[P.id]||I&&(Th(I),P?(Th(P),xP(P),o=!0,mP(_c(P),_c(I),C.divide,A,b,a)):yP(I,A,b))}new Ys(n,i,d(!0,v),d(!1,v),null,"multiple").update(_).updateManyToOne(function(b,S){var T=i[b],C=T.data,A=C.hostModel,P=C.getItemGraphicEl(T.dataIndex),I=dt(le(S,function(k){return n[k].data.getItemGraphicEl(n[k].dataIndex)}),function(k){return k&&k!==P&&!m[k.id]});P&&(Th(P),I.length?(R(I,function(k){Th(k),xP(k)}),o=!0,mP(_c(I),_c(P),T.divide,A,b,a)):yP(P,A,T.dataIndex))}).updateOneToMany(function(b,S){var T=n[S],C=T.data.getItemGraphicEl(T.dataIndex);if(!(C&&m[C.id])){var A=dt(le(b,function(I){return i[I].data.getItemGraphicEl(i[I].dataIndex)}),function(I){return I&&I!==C}),P=i[b[0]].data.hostModel;A.length&&(R(A,function(I){return Th(I)}),C?(Th(C),xP(C),o=!0,mP(_c(C),_c(A),T.divide,P,b[0],a)):R(A,function(I){return yP(I,P,b[0])}))}}).updateManyToMany(function(b,S){new Ys(S,b,function(T){return n[T].data.getId(n[T].dataIndex)},function(T){return i[T].data.getId(i[T].dataIndex)}).update(function(T,C){_(b[T],S[C])}).execute()}).execute(),o&&R(t,function(b){var S=b.data,T=S.hostModel,C=T&&r.getViewOfSeriesModel(T),A=Vv("update",T,0);C&&T.isAnimationEnabled()&&A&&A.duration>0&&C.group.traverse(function(P){P instanceof nt&&!P.animators.length&&P.animateFrom({style:{opacity:0}},A)})})}function GU(e){var t=e.getModel("universalTransition").get("seriesKey");return t||e.id}function WU(e){return oe(e)?e.sort().join(","):e}function Cl(e){if(e.hostModel)return e.hostModel.getModel("universalTransition").get("divideShape")}function sJe(e,t){var r=Ce(),n=Ce(),i=Ce();return R(e.oldSeries,function(a,o){var s=e.oldDataGroupIds[o],l=e.oldData[o],u=GU(a),c=WU(u);n.set(c,{dataGroupId:s,data:l}),oe(u)&&R(u,function(f){i.set(f,{key:c,dataGroupId:s,data:l})})}),R(t.updatedSeries,function(a){if(a.isUniversalTransitionEnabled()&&a.isAnimationEnabled()){var o=a.get("dataGroupId"),s=a.getData(),l=GU(a),u=WU(l),c=n.get(u);if(c)r.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:Cl(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:Cl(s),data:s}]});else if(oe(l)){var f=[];R(l,function(v){var m=n.get(v);m.data&&f.push({dataGroupId:m.dataGroupId,divide:Cl(m.data),data:m.data})}),f.length&&r.set(u,{oldSeries:f,newSeries:[{dataGroupId:o,data:s,divide:Cl(s)}]})}else{var h=i.get(l);if(h){var d=r.get(h.key);d||(d={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:Cl(h.data)}],newSeries:[]},r.set(h.key,d)),d.newSeries.push({dataGroupId:o,data:s,divide:Cl(s)})}}}}),r}function HU(e,t){for(var r=0;r<e.length;r++){var n=t.seriesIndex!=null&&t.seriesIndex===e[r].seriesIndex||t.seriesId!=null&&t.seriesId===e[r].id;if(n)return r}}function lJe(e,t,r,n){var i=[],a=[];R(Lt(e.from),function(o){var s=HU(t.oldSeries,o);s>=0&&i.push({dataGroupId:t.oldDataGroupIds[s],data:t.oldData[s],divide:Cl(t.oldData[s]),groupIdDim:o.dimension})}),R(Lt(e.to),function(o){var s=HU(r.updatedSeries,o);if(s>=0){var l=r.updatedSeries[s].getData();a.push({dataGroupId:t.oldDataGroupIds[s],data:l,divide:Cl(l),groupIdDim:o.dimension})}}),i.length>0&&a.length>0&&Xie(i,a,n)}function uJe(e){e.registerUpdateLifecycle("series:beforeupdate",function(t,r,n){R(Lt(n.seriesTransition),function(i){R(Lt(i.to),function(a){for(var o=n.updatedSeries,s=0;s<o.length;s++)(a.seriesIndex!=null&&a.seriesIndex===o[s].seriesIndex||a.seriesId!=null&&a.seriesId===o[s].id)&&(o[s][gb]=!0)})})}),e.registerUpdateLifecycle("series:transition",function(t,r,n){var i=rJe(r);if(i.oldSeries&&n.updatedSeries&&n.optionChanged){var a=n.seriesTransition;if(a)R(Lt(a),function(d){lJe(d,i,n,r)});else{var o=sJe(i,n);R(o.keys(),function(d){var v=o.get(d);Xie(v.oldSeries,v.newSeries,r)})}R(n.updatedSeries,function(d){d[gb]&&(d[gb]=!1)})}for(var s=t.getSeries(),l=i.oldSeries=[],u=i.oldDataGroupIds=[],c=i.oldData=[],f=0;f<s.length;f++){var h=s[f].getData();h.count()<Yie&&(l.push(s[f]),u.push(s[f].get("dataGroupId")),c.push(h))}})}var cJe=function(){function e(){this.breaks=[],this._elapsedExtent=[1/0,-1/0]}return e.prototype.setBreaks=function(t){this.breaks=t.breaks},e.prototype.update=function(t){hJe(this,t);var r=this._elapsedExtent;r[0]=this.elapse(t[0]),r[1]=this.elapse(t[1])},e.prototype.hasBreaks=function(){return!!this.breaks.length},e.prototype.calcNiceTickMultiple=function(t,r){for(var n=0;n<this.breaks.length;n++){var i=this.breaks[n];if(i.vmin<t&&t<i.vmax){var a=r(t,i.vmax);return a}}return 0},e.prototype.getExtentSpan=function(){return this._elapsedExtent[1]-this._elapsedExtent[0]},e.prototype.normalize=function(t){var r=this._elapsedExtent[1]-this._elapsedExtent[0];return r===0?.5:(this.elapse(t)-this._elapsedExtent[0])/r},e.prototype.scale=function(t){return this.unelapse(t*(this._elapsedExtent[1]-this._elapsedExtent[0])+this._elapsedExtent[0])},e.prototype.elapse=function(t){for(var r=UU,n=ZU,i=!0,a=0;a<this.breaks.length;a++){var o=this.breaks[a];if(t<=o.vmax){t>o.vmin?r+=o.vmin-n+(t-o.vmin)/(o.vmax-o.vmin)*o.gapReal:r+=t-n,n=o.vmax,i=!1;break}r+=o.vmin-n+o.gapReal,n=o.vmax}return i&&(r+=t-n),r},e.prototype.unelapse=function(t){for(var r=UU,n=ZU,i=!0,a=0,o=0;o<this.breaks.length;o++){var s=this.breaks[o],l=r+s.vmin-n,u=l+s.gapReal;if(t<=u){t>l?a=s.vmin+(t-l)/(u-l)*(s.vmax-s.vmin):a=n+t-r,n=s.vmax,i=!1;break}r=u,n=s.vmax}return i&&(a=n+t-r),a},e}();function fJe(){return new cJe}var UU=0,ZU=0;function hJe(e,t){var r=0,n={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},i=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},a={S:{tpAbs:i(),tpPrct:i()},E:{tpAbs:i(),tpPrct:i()}};R(e.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(r+=l.val);var u=YR(s,t);if(u){var c=u.vmin!==s.vmin,f=u.vmax!==s.vmax,h=u.vmax-u.vmin;if(!(c&&f))if(c||f){var d=c?"S":"E";a[d][l.type].has=!0,a[d][l.type].span=h,a[d][l.type].inExtFrac=h/(s.vmax-s.vmin),a[d][l.type].val=l.val}else n[l.type].span+=h,n[l.type].val+=l.val}});var o=r*(0+(t[1]-t[0])+(n.tpAbs.val-n.tpAbs.span)+(a.S.tpAbs.has?(a.S.tpAbs.val-a.S.tpAbs.span)*a.S.tpAbs.inExtFrac:0)+(a.E.tpAbs.has?(a.E.tpAbs.val-a.E.tpAbs.span)*a.E.tpAbs.inExtFrac:0)-n.tpPrct.span-(a.S.tpPrct.has?a.S.tpPrct.span*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.span*a.E.tpPrct.inExtFrac:0))/(1-n.tpPrct.val-(a.S.tpPrct.has?a.S.tpPrct.val*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.val*a.E.tpPrct.inExtFrac:0));R(e.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(s.gapReal=r!==0?Math.max(o,0)*l.val/r:0),l.type==="tpAbs"&&(s.gapReal=l.val),s.gapReal==null&&(s.gapReal=0)})}function dJe(e,t,r,n,i,a){e!=="no"&&R(r,function(o){var s=YR(o,a);if(s)for(var l=t.length-1;l>=0;l--){var u=t[l],c=n(u),f=i*3/4;c>s.vmin-f&&c<s.vmax+f&&(e!=="preserve_extent_bound"||c!==a[0]&&c!==a[1])&&t.splice(l,1)}})}function vJe(e,t,r,n){R(t,function(i){var a=YR(i,r);a&&(e.push({value:a.vmin,break:{type:"vmin",parsedBreak:a},time:n?n(a):void 0}),e.push({value:a.vmax,break:{type:"vmax",parsedBreak:a},time:n?n(a):void 0}))}),t.length&&e.sort(function(i,a){return i.value-a.value})}function YR(e,t){var r=Math.max(e.vmin,t[0]),n=Math.min(e.vmax,t[1]);return r<n||r===n&&r>t[0]&&r<t[1]?{vmin:r,vmax:n,breakOption:e.breakOption,gapParsed:e.gapParsed,gapReal:e.gapReal}:null}function nE(e,t,r){var n=[];if(!e)return{breaks:n};function i(o,s){return o>=0&&o<1-1e-5}R(e,function(o){if(!(!o||o.start==null||o.end==null)&&!o.isExpanded){var s={breakOption:Le(o),vmin:t(o.start),vmax:t(o.end),gapParsed:{type:"tpAbs",val:0},gapReal:null};if(o.gap!=null){var l=!1;if(ye(o.gap)){var u=Ai(o.gap);if(u.match(/%$/)){var c=parseFloat(u)/100;i(c)||(c=0),s.gapParsed.type="tpPrct",s.gapParsed.val=c,l=!0}}if(!l){var f=t(o.gap);(!isFinite(f)||f<0)&&(f=0),s.gapParsed.type="tpAbs",s.gapParsed.val=f}}if(s.vmin===s.vmax&&(s.gapParsed.type="tpAbs",s.gapParsed.val=0),r&&r.noNegative&&R(["vmin","vmax"],function(d){s[d]<0&&(s[d]=0)}),s.vmin>s.vmax){var h=s.vmax;s.vmax=s.vmin,s.vmin=h}n.push(s)}}),n.sort(function(o,s){return o.vmin-s.vmin});var a=-1/0;return R(n,function(o,s){a>o.vmin&&(n[s]=null),a=o.vmax}),{breaks:n.filter(function(o){return!!o})}}function XR(e,t){return iE(t)===iE(e)}function iE(e){return e.start+"_\0_"+e.end}function pJe(e,t,r){var n=[];R(e,function(a,o){var s=t(a);s&&s.type==="vmin"&&n.push([o])}),R(e,function(a,o){var s=t(a);if(s&&s.type==="vmax"){var l=Au(n,function(u){return XR(t(e[u[0]]).parsedBreak.breakOption,s.parsedBreak.breakOption)});l&&l.push(o)}});var i=[];return R(n,function(a){a.length===2&&i.push(r?a:[e[a[0]],e[a[1]]])}),i}function gJe(e,t,r,n){var i,a;if(e.break){var o=e.break.parsedBreak,s=Au(r,function(f){return XR(f.breakOption,e.break.parsedBreak.breakOption)}),l=n(Math.pow(t,o.vmin),s.vmin),u=n(Math.pow(t,o.vmax),s.vmax),c={type:o.gapParsed.type,val:o.gapParsed.type==="tpAbs"?gr(Math.pow(t,o.vmin+o.gapParsed.val))-l:o.gapParsed.val};i={type:e.break.type,parsedBreak:{breakOption:o.breakOption,vmin:l,vmax:u,gapParsed:c,gapReal:o.gapReal}},a=s[e.break.type]}return{brkRoundingCriterion:a,vBreak:i}}function mJe(e,t,r){var n={noNegative:!0},i=nE(e,r,n),a=nE(e,r,n),o=Math.log(t);return a.breaks=le(a.breaks,function(s){var l=Math.log(s.vmin)/o,u=Math.log(s.vmax)/o,c={type:s.gapParsed.type,val:s.gapParsed.type==="tpAbs"?Math.log(s.vmin+s.gapParsed.val)/o-l:s.gapParsed.val};return{vmin:l,vmax:u,gapParsed:c,gapReal:s.gapReal,breakOption:s.breakOption}}),{parsedOriginal:i,parsedLogged:a}}var yJe={vmin:"start",vmax:"end"};function xJe(e,t){return t&&(e=e||{},e.break={type:yJe[t.type],start:t.parsedBreak.vmin,end:t.parsedBreak.vmax}),e}function _Je(){V5e({createScaleBreakContext:fJe,pruneTicksByBreak:dJe,addBreaksToTicks:vJe,parseAxisBreakOption:nE,identifyAxisBreak:XR,serializeAxisBreakIdentifier:iE,retrieveAxisBreakPairs:pJe,getTicksLogTransformBreak:gJe,logarithmicParseBreaksFromOption:mJe,makeAxisLabelFormatterParamBreak:xJe})}var YU=et();function bJe(e,t){var r=Au(e,function(n){return Cr().identifyAxisBreak(n.parsedBreak.breakOption,t.breakOption)});return r||e.push(r={zigzagRandomList:[],parsedBreak:t,shouldRemove:!1}),r}function wJe(e){R(e,function(t){return t.shouldRemove=!0})}function SJe(e){for(var t=e.length-1;t>=0;t--)e[t].shouldRemove&&e.splice(t,1)}function TJe(e,t,r,n,i){var a=r.axis;if(a.scale.isBlank()||!Cr())return;var o=Cr().retrieveAxisBreakPairs(a.scale.getTicks({breakTicks:"only_break"}),function(I){return I.break},!1);if(!o.length)return;var s=r.getModel("breakArea"),l=s.get("zigzagAmplitude"),u=s.get("zigzagMinSpan"),c=s.get("zigzagMaxSpan");u=Math.max(2,u||0),c=Math.max(u,c||0);var f=s.get("expandOnClick"),h=s.get("zigzagZ"),d=s.getModel("itemStyle"),v=d.getItemStyle(),m=v.stroke,y=v.lineWidth,x=v.lineDash,_=v.fill,b=new Ie({ignoreModelZ:!0}),S=a.isHorizontal(),T=YU(t).visualList||(YU(t).visualList=[]);wJe(T);for(var C=function(I){var k=o[I][0].break.parsedBreak,E=[];E[0]=a.toGlobalCoord(a.dataToCoord(k.vmin,!0)),E[1]=a.toGlobalCoord(a.dataToCoord(k.vmax,!0)),E[1]<E[0]&&E.reverse();var D=bJe(T,k);D.shouldRemove=!1;var N=new Ie;P(D.zigzagRandomList,N,E[0],E[1],S,k),f&&N.on("click",function(){var z={type:rC,breaks:[{start:k.breakOption.start,end:k.breakOption.end}]};z[a.dim+"AxisIndex"]=r.componentIndex,i.dispatchAction(z)}),N.silent=!f,b.add(N)},A=0;A<o.length;A++)C(A);e.add(b),SJe(T);function P(I,k,E,D,N,z){var V={stroke:m,lineWidth:y,lineDash:x,fill:"none"},F=N?0:1,$=1-F,B=n[Ge[$]]+n[Ar[$]];function H(te){var pe=[],Te=[];pe[F]=Te[F]=te,pe[$]=n[Ge[$]],Te[$]=B;var Me={x1:pe[0],y1:pe[1],x2:Te[0],y2:Te[1]};return FT(Me,Me,{lineWidth:1}),pe[0]=Me.x1,pe[1]=Me.y1,pe[F]}E=H(E),D=H(D);for(var U=[],Y=[],Z=!0,Q=n[Ge[$]],re=0;;re++){var ue=Q===n[Ge[$]],de=Q>=B;de&&(Q=B);var Re=[],xe=[];Re[F]=E,xe[F]=D,!ue&&!de&&(Re[F]+=Z?-l:l,xe[F]-=Z?l:-l),Re[$]=Q,xe[$]=Q,U.push(Re),Y.push(xe);var ie=void 0;if(re<I.length?ie=I[re]:(ie=Math.random(),I.push(ie)),Q+=ie*(c-u)+u,Z=!Z,de)break}var ve=Cr().serializeAxisBreakIdentifier(z.breakOption);if(k.add(new ln({anid:"break_a_"+ve,shape:{points:U},style:V,z:h})),z.gapReal!==0){k.add(new ln({anid:"break_b_"+ve,shape:{points:Y},style:V,z:h}));var ce=Y.slice();ce.reverse();var X=U.concat(ce);k.add(new Tn({anid:"break_c_"+ve,shape:{points:X},style:{fill:_,opacity:v.opacity},z:h}))}}}function CJe(e,t,r,n){var i=e.axis,a=r.transform;wn(n.style);var o=i.getExtent();i.inverse&&(o=o.slice(),o.reverse());var s=Cr().retrieveAxisBreakPairs(i.scale.getTicks({breakTicks:"only_break"}),function(y){return y.break},!1),l=le(s,function(y){var x=y[0].break.parsedBreak,_=[i.dataToCoord(x.vmin,!0),i.dataToCoord(x.vmax,!0)];return _[0]>_[1]&&_.reverse(),{coordPair:_,brkId:Cr().serializeAxisBreakIdentifier(x.breakOption)}});l.sort(function(y,x){return y.coordPair[0]-x.coordPair[0]});for(var u=o[0],c=null,f=0;f<l.length;f++){var h=l[f],d=Math.max(h.coordPair[0],o[0]),v=Math.min(h.coordPair[1],o[1]);u<=d&&m(u,d,c,h),u=v,c=h}u<=o[1]&&m(u,o[1],c,null);function m(y,x,_,b){function S(E,D){a&&(lr(E,E,a),lr(D,D,a))}function T(E,D){var N={x1:E[0],y1:E[1],x2:D[0],y2:D[1]};FT(N,N,n.style),E[0]=N.x1,E[1]=N.y1,D[0]=N.x2,D[1]=N.y2}var C=[y,0],A=[x,0],P=[y,5],I=[x,5];S(C,P),T(C,P),S(A,I),T(A,I),T(C,A);var k=new mr(ae({shape:{x1:C[0],y1:C[1],x2:A[0],y2:A[1]}},n));t.add(k),k.anid="breakLine_"+(_?_.brkId:"\0")+"_\0_"+(b?b.brkId:"\0")}}function AJe(e,t,r){if(Au(r,function(_){return!_}))return;var n=new Ne;if(!eC(r[0],r[1],n,{direction:-(e?t+Math.PI:t),touchThreshold:0,bidirectional:!1}))return;var i=Yr();rl(i,i,-t);var a=le(r,function(_){return _.transform?Wa(Yr(),i,_.transform):i});function o(_){var b=r[0].localRect,S=new Ne(b[Ar[_]]*a[0][0],b[Ar[_]]*a[0][1]);return Math.abs(S.y)<1e-5}var s=.5;if(o(0)||o(1)){var l=le(r,function(_,b){var S=_.localRect.clone();return S.applyTransform(a[b]),S}),u=new Ne;u.copy(r[0].label).add(r[1].label).scale(.5),u.transform(i);var c=n.clone().transform(i),f=l[0].x+l[1].x+(c.x>=0?l[0].width:l[1].width),h=(f+c.x)/2-u.x,d=Math.min(h,h-c.x),v=Math.max(h,h-c.x),m=v<0?v:d>0?d:0;s=(h-m)/c.x}var y=new Ne,x=new Ne;Ne.scale(y,n,-s),Ne.scale(x,n,1-s),aO(r[0],y),aO(r[1],x)}function MJe(e,t){var r={breaks:[]};return R(t.breaks,function(n){if(n){var i=Au(e.get("breaks",!0),function(s){return Cr().identifyAxisBreak(s,n)});if(i){var a=t.type,o={isExpanded:!!i.isExpanded};i.isExpanded=a===rC?!0:a===gre?!1:a===mre?!i.isExpanded:i.isExpanded,r.breaks.push({start:i.start,end:i.end,isExpanded:!!i.isExpanded,old:o})}}}),r}function PJe(){S6e({adjustBreakLabelPair:AJe,buildAxisBreakLine:CJe,rectCoordBuildBreakAxis:TJe,updateModelAxisBreak:MJe})}function kJe(e){k6e(e),_Je(),PJe()}function LJe(){q6e(IJe)}function IJe(e,t){R(e,function(r){if(!r.model.get(["axisLabel","inside"])){var n=OJe(r);if(n){var i=r.isHorizontal()?"height":"width",a=r.model.get(["axisLabel","margin"]);t[i]-=n[i]+a,r.position==="top"?t.y+=n.height+a:r.position==="left"&&(t.x+=n.width+a)}}})}function OJe(e){var t=e.model,r=e.scale;if(!t.get(["axisLabel","show"])||r.isBlank())return;var n,i,a=r.getExtent();r instanceof iv?i=r.count():(n=r.getTicks(),i=n.length);var o=e.getLabelModel(),s=Jv(e),l,u=1;i>40&&(u=Math.ceil(i/40));for(var c=0;c<i;c+=u){var f=n?n[c]:{value:a[0]+c},h=s(f,c),d=o.getTextRect(h),v=m(d,o.get("rotate")||0);l?l.union(v):l=v}return l;function m(y,x){var _=x*Math.PI/180,b=y.width,S=y.height,T=b*Math.abs(Math.cos(_))+Math.abs(S*Math.sin(_)),C=b*Math.abs(Math.sin(_))+Math.abs(S*Math.cos(_)),A=new je(y.x,y.y,T,C);return A}}Ye([bVe]);Ye([gVe]);Ye([FVe,r6e,h6e,pGe,AGe,pWe,VWe,C8e,U8e,Q8e,aHe,dHe,oUe,LUe,FUe,n7e,s7e,m7e,T7e,N7e,F7e,K7e,N9e]);Ye(eZe);Ye(CZe);Ye(Gre);Ye(RZe);Ye(kne);Ye(FZe);Ye(sYe);Ye(gYe);Ye(rXe);Ye(bXe);Ye(P0);Ye(RXe);Ye($Xe);Ye(qXe);Ye(iqe);Ye(cqe);Ye(gqe);Ye(Aqe);Ye(Hqe);Ye(Nie);Ye(jie);Ye(fKe);Ye(Fie);Ye(Vie);Ye(pKe);Ye(_Ke);Ye(EKe);Ye(jKe);Ye(uJe);Ye(jFe);Ye(kJe);Ye(LJe);Ye(gGe);const EJe=Object.freeze(Object.defineProperty({__proto__:null,Axis:wa,ChartView:bt,ComponentModel:Qe,ComponentView:It,List:Rn,Model:rt,PRIORITY:Ree,SeriesModel:Ct,color:Dje,connect:z4e,dataTool:Z4e,dependencies:b4e,disConnect:$4e,disconnect:Hee,dispose:F4e,env:it,extendChartView:bFe,extendComponentModel:yFe,extendComponentView:xFe,extendSeriesModel:_Fe,format:nFe,getCoordinateSystemDimensions:G4e,getInstanceByDom:Cj,getInstanceById:V4e,getMap:U4e,graphic:rFe,helper:Y$e,init:B4e,innerDrawElementOnCanvas:bj,matrix:uje,number:eFe,parseGeoJSON:nO,parseGeoJson:nO,registerAction:ro,registerCoordinateSystem:Yee,registerCustomSeries:W4e,registerLayout:Xee,registerLoading:Lj,registerLocale:JN,registerMap:qee,registerPostInit:Uee,registerPostUpdate:Zee,registerPreprocessor:Mj,registerProcessor:Pj,registerTheme:Aj,registerTransform:Kee,registerUpdateLifecycle:QT,registerVisual:Lu,setCanvasCreator:H4e,setPlatformAPI:OK,throttle:KT,time:tFe,use:Ye,util:iFe,vector:YNe,version:_4e,zrUtil:FNe,zrender:gRe},Symbol.toStringTag,{value:"Module"}));var Jc={},au={},qie={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=1;e.default=function(){return"".concat(t++)}})(qie);var fC={},hC={},qR={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default=function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,i=null;return function(){for(var a=this,o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];clearTimeout(i),i=setTimeout(function(){r.apply(a,s)},n)}}})(qR);var $o={};Object.defineProperty($o,"__esModule",{value:!0});$o.SizeSensorId=$o.SensorTabIndex=$o.SensorClassName=void 0;$o.SizeSensorId="size-sensor-id";$o.SensorClassName="size-sensor-object";$o.SensorTabIndex="-1";Object.defineProperty(hC,"__esModule",{value:!0});hC.createSensor=void 0;var DJe=NJe(qR),_P=$o;function NJe(e){return e&&e.__esModule?e:{default:e}}hC.createSensor=function(t,r){var n=void 0,i=[],a=function(){getComputedStyle(t).position==="static"&&(t.style.position="relative");var f=document.createElement("object");return f.onload=function(){f.contentDocument.defaultView.addEventListener("resize",o),o()},f.style.display="block",f.style.position="absolute",f.style.top="0",f.style.left="0",f.style.height="100%",f.style.width="100%",f.style.overflow="hidden",f.style.pointerEvents="none",f.style.zIndex="-1",f.style.opacity="0",f.setAttribute("class",_P.SensorClassName),f.setAttribute("tabindex",_P.SensorTabIndex),f.type="text/html",t.appendChild(f),f.data="about:blank",f},o=(0,DJe.default)(function(){i.forEach(function(c){c(t)})}),s=function(f){n||(n=a()),i.indexOf(f)===-1&&i.push(f)},l=function(){n&&n.parentNode&&(n.contentDocument&&n.contentDocument.defaultView.removeEventListener("resize",o),n.parentNode.removeChild(n),t.removeAttribute(_P.SizeSensorId),n=void 0,i=[],r&&r())},u=function(f){var h=i.indexOf(f);h!==-1&&i.splice(h,1),i.length===0&&n&&l()};return{element:t,bind:s,destroy:l,unbind:u}};var dC={};Object.defineProperty(dC,"__esModule",{value:!0});dC.createSensor=void 0;var jJe=$o,RJe=BJe(qR);function BJe(e){return e&&e.__esModule?e:{default:e}}dC.createSensor=function(t,r){var n=void 0,i=[],a=(0,RJe.default)(function(){i.forEach(function(c){c(t)})}),o=function(){var f=new ResizeObserver(a);return f.observe(t),a(),f},s=function(f){n||(n=o()),i.indexOf(f)===-1&&i.push(f)},l=function(){n&&n.disconnect(),i=[],n=void 0,t.removeAttribute(jJe.SizeSensorId),r&&r()},u=function(f){var h=i.indexOf(f);h!==-1&&i.splice(h,1),i.length===0&&n&&l()};return{element:t,bind:s,destroy:l,unbind:u}};Object.defineProperty(fC,"__esModule",{value:!0});fC.createSensor=void 0;var zJe=hC,$Je=dC;fC.createSensor=typeof ResizeObserver<"u"?$Je.createSensor:zJe.createSensor;Object.defineProperty(au,"__esModule",{value:!0});au.removeSensor=au.getSensor=au.Sensors=void 0;var FJe=GJe(qie),VJe=fC,aE=$o;function GJe(e){return e&&e.__esModule?e:{default:e}}var sm=au.Sensors={};function Kie(e){e&&sm[e]&&delete sm[e]}au.getSensor=function(t){var r=t.getAttribute(aE.SizeSensorId);if(r&&sm[r])return sm[r];var n=(0,FJe.default)();t.setAttribute(aE.SizeSensorId,n);var i=(0,VJe.createSensor)(t,function(){return Kie(n)});return sm[n]=i,i};au.removeSensor=function(t){var r=t.element.getAttribute(aE.SizeSensorId);t.destroy(),Kie(r)};var KR,JR;Object.defineProperty(Jc,"__esModule",{value:!0});Jc.ver=JR=Jc.clear=KR=Jc.bind=void 0;var oE=au;KR=Jc.bind=function(t,r){var n=(0,oE.getSensor)(t);return n.bind(r),function(){n.unbind(r)}};JR=Jc.clear=function(t){var r=(0,oE.getSensor)(t);(0,oE.removeSensor)(r)};Jc.ver="1.0.3";function XU(e,t){var r={};return t.forEach(function(n){r[n]=e[n]}),r}function bP(e){return typeof e=="function"}function WJe(e){return typeof e=="string"}var HJe=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,a;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(a=Object.keys(t),n=a.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[i]))return!1;for(i=n;i--!==0;){var o=a[i];if(!e(t[o],r[o]))return!1}return!0}return t!==t&&r!==r};const Ch=Ft(HJe);var UJe=function(e){K(t,e);function t(r){var n=e.call(this,r)||this;return n.echarts=r.echarts,n.ele=null,n.isInitialResize=!0,n.eventHandlerRefs={},n}return t.prototype.componentDidMount=function(){this.renderNewEcharts()},t.prototype.componentDidUpdate=function(r){var n=this.props.shouldSetOption;if(!(bP(n)&&!n(r,this.props))){if(!Ch(r.theme,this.props.theme)||!Ch(r.opts,this.props.opts)){this.dispose(),this.renderNewEcharts();return}var i=this.getEchartsInstance();Ch(r.onEvents,this.props.onEvents)||(this.unbindEvents(i),this.bindEvents(i,this.props.onEvents));var a=["option","notMerge","replaceMerge","lazyUpdate","showLoading","loadingOption"];Ch(XU(this.props,a),XU(r,a))||this.updateEChartsOption(),(!Ch(r.style,this.props.style)||!Ch(r.className,this.props.className))&&this.resize()}},t.prototype.componentWillUnmount=function(){this.dispose()},t.prototype.initEchartsInstance=function(){return yF(this,void 0,void 0,function(){var r=this;return xF(this,function(n){return[2,new Promise(function(i){r.echarts.init(r.ele,r.props.theme,r.props.opts);var a=r.getEchartsInstance();a.on("finished",function(){var o=r.ele.clientWidth,s=r.ele.clientHeight;r.echarts.dispose(r.ele);var l=Hg({width:o,height:s},r.props.opts);i(r.echarts.init(r.ele,r.props.theme,l))})})]})})},t.prototype.getEchartsInstance=function(){return this.echarts.getInstanceByDom(this.ele)},t.prototype.dispose=function(){if(this.ele){try{JR(this.ele)}catch(r){console.warn(r)}this.echarts.dispose(this.ele)}},t.prototype.renderNewEcharts=function(){return yF(this,void 0,void 0,function(){var r,n,i,a,o,s,l=this;return xF(this,function(u){switch(u.label){case 0:return r=this.props,n=r.onEvents,i=r.onChartReady,a=r.autoResize,o=a===void 0?!0:a,[4,this.initEchartsInstance()];case 1:return u.sent(),s=this.updateEChartsOption(),this.bindEvents(s,n||{}),bP(i)&&i(s),this.ele&&o&&KR(this.ele,function(){l.resize()}),[2]}})})},t.prototype.bindEvents=function(r,n){var i=this,a=function(s,l){if(WJe(s)&&bP(l)){var u=function(c){l(c,r)};r.on(s,u),i.eventHandlerRefs[s]=u}};for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&a(o,n[o])},t.prototype.unbindEvents=function(r){for(var n=0,i=Object.entries(this.eventHandlerRefs);n<i.length;n++){var a=i[n],o=a[0],s=a[1];r.off(o,s)}this.eventHandlerRefs={}},t.prototype.updateEChartsOption=function(){var r=this.props,n=r.option,i=r.notMerge,a=i===void 0?!1:i,o=r.replaceMerge,s=o===void 0?null:o,l=r.lazyUpdate,u=l===void 0?!1:l,c=r.showLoading,f=r.loadingOption,h=f===void 0?null:f,d=this.getEchartsInstance();return d.setOption(n,{notMerge:a,replaceMerge:s,lazyUpdate:u}),c?d.showLoading(h):d.hideLoading(),d},t.prototype.resize=function(){var r=this.getEchartsInstance();if(!this.isInitialResize)try{r.resize({width:"auto",height:"auto"})}catch(n){console.warn(n)}this.isInitialResize=!1},t.prototype.render=function(){var r=this,n=this.props,i=n.style,a=n.className,o=a===void 0?"":a;n.echarts,n.option,n.theme,n.notMerge,n.replaceMerge,n.lazyUpdate,n.showLoading,n.loadingOption,n.opts,n.onChartReady,n.onEvents,n.shouldSetOption,n.autoResize;var s=SNe(n,["style","className","echarts","option","theme","notMerge","replaceMerge","lazyUpdate","showLoading","loadingOption","opts","onChartReady","onEvents","shouldSetOption","autoResize"]),l=Hg({height:300},i);return ee.createElement("div",Hg({ref:function(u){r.ele=u},style:l,className:"echarts-for-react ".concat(o)},s))},t}(G.PureComponent),ZJe=function(e){K(t,e);function t(r){var n=e.call(this,r)||this;return n.echarts=EJe,n}return t}(UJe);const qU=["#3b82f6","#a78bfa","#06b6d4","#f59e0b","#22c55e","#ec4899","#8b5cf6","#14b8a6"],KU=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function YJe(e){return e>12?"#22c55e":e>8?"#4ade80":e>5?"#f59e0b":e>3?"#f97316":"#ef4444"}function XJe(e){return e===null||e>46?0:e>44.5?1:e>43?2:3}function qJe(e){return e==="ROUTER"||e==="ROUTER_LATE"?30:e==="REPEATER"||e==="TRACKER"?25:e==="CLIENT_MUTE"?7:e==="CLIENT_BASE"?12:15}function KJe({nodes:e,edges:t,selectedNodeId:r,onSelectNode:n}){const i=G.useRef(null),[a,o]=G.useState("connected"),s=G.useMemo(()=>{const y=new Set;return t.forEach(x=>{y.add(x.from_node),y.add(x.to_node)}),y},[t]),l=G.useMemo(()=>{let y=e;return a==="connected"?y=y.filter(x=>s.has(x.node_num)):a==="infra"&&(y=y.filter(x=>KU.includes(x.role))),y},[e,a,s]),u=G.useMemo(()=>new Map(l.map(y=>[y.node_num,y])),[l]),c=G.useMemo(()=>t.filter(y=>u.has(y.from_node)&&u.has(y.to_node)),[t,u]),f=G.useMemo(()=>{const y=new Set;return r!==null&&c.forEach(x=>{x.from_node===r&&y.add(x.to_node),x.to_node===r&&y.add(x.from_node)}),y},[r,c]),h=G.useMemo(()=>{const y=l.map(_=>{const b=XJe(_.latitude),S=qU[b%qU.length],T=KU.includes(_.role),C=_.node_num===r,A=f.has(_.node_num),P=r===null||C||A;return{id:String(_.node_num),name:_.short_name,value:_.node_num,symbolSize:qJe(_.role),itemStyle:{color:T?S:"#111827",borderColor:S,borderWidth:T?0:2,opacity:P?1:.15},label:{show:!0,position:"bottom",distance:5,fontSize:10,fontFamily:"JetBrains Mono, monospace",color:P?"#94a3b8":"#94a3b820"},nodeNum:_.node_num,longName:_.long_name,role:_.role}}),x=c.map(_=>{const b=r===null||_.from_node===r||_.to_node===r;return{source:String(_.from_node),target:String(_.to_node),value:_.snr,lineStyle:{color:YJe(_.snr),width:b&&r!==null?2:1,opacity:r===null?.4:b?.6:.04}}});return{nodes:y,links:x}},[l,c,r,f]),d=G.useMemo(()=>({backgroundColor:"#111827",tooltip:{trigger:"item",backgroundColor:"#1e293b",borderColor:"#334155",textStyle:{color:"#e2e8f0",fontFamily:"JetBrains Mono, monospace",fontSize:11},formatter:y=>{if(y.data&&y.data.longName){const x=y.data;return`<strong>${x.name}</strong><br/>${x.longName}<br/>Role: ${x.role}`}return""}},series:[{type:"graph",layout:"force",roam:!0,draggable:!0,animation:!1,data:h.nodes,links:h.links,force:{repulsion:200,edgeLength:[80,120],gravity:.1},emphasis:{focus:"adjacency",blurScope:"coordinateSystem",scale:1.1,lineStyle:{width:2}},blur:{itemStyle:{opacity:.15},lineStyle:{opacity:.04}},label:{show:!0,position:"bottom",distance:5,fontSize:10,fontFamily:"JetBrains Mono, monospace"},edgeLabel:{show:!1},edgeSymbol:["none","none"]}]}),[h]),v=G.useCallback(y=>{if(y.data&&"nodeNum"in y.data){const x=y.data.nodeNum;n(r===x?null:x??null)}},[r,n]),m=G.useMemo(()=>({click:v}),[v]);return G.useEffect(()=>{var x;const y=(x=i.current)==null?void 0:x.getEchartsInstance();y&&y.setOption(d,{notMerge:!1,lazyUpdate:!0})},[d]),p.jsxs("div",{className:"relative bg-bg-card rounded-lg border border-border overflow-hidden",children:[p.jsx(ZJe,{ref:i,option:d,style:{height:"540px",width:"100%"},onEvents:m,opts:{renderer:"canvas"}}),p.jsxs("div",{className:"absolute top-4 left-4 flex items-center gap-2 bg-bg-card/90 backdrop-blur-sm border border-border rounded px-3 py-2",children:[p.jsx(lD,{size:14,className:"text-slate-500"}),p.jsx("div",{className:"flex gap-1",children:[{key:"connected",label:"Connected"},{key:"infra",label:"Infra"},{key:"all",label:"All"}].map(({key:y,label:x})=>p.jsx("button",{onClick:()=>o(y),className:`px-2 py-1 text-xs rounded transition-colors ${a===y?"bg-accent text-white":"bg-bg-hover text-slate-400 hover:text-slate-200"}`,children:x},y))}),p.jsxs("span",{className:"text-xs text-slate-500 ml-2",children:[l.length," nodes • ",c.length," edges"]})]}),p.jsxs("div",{className:"absolute bottom-4 left-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded p-3",children:[p.jsx("div",{className:"text-xs text-slate-400 font-medium mb-2",children:"Edge Quality (SNR)"}),p.jsx("div",{className:"space-y-1",children:[{label:"Excellent (>12)",color:"#22c55e"},{label:"Good (8-12)",color:"#4ade80"},{label:"Fair (5-8)",color:"#f59e0b"},{label:"Marginal (3-5)",color:"#f97316"},{label:"Poor (<3)",color:"#ef4444"}].map(y=>p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"w-4 h-0.5",style:{backgroundColor:y.color}}),p.jsx("span",{className:"text-xs text-slate-500",children:y.label})]},y.label))})]}),p.jsxs("div",{className:"absolute bottom-4 right-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded p-3",children:[p.jsx("div",{className:"text-xs text-slate-400 font-medium mb-2",children:"Node Type"}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"w-3 h-3 rounded-full bg-blue-500"}),p.jsx("span",{className:"text-xs text-slate-500",children:"Infrastructure"})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"w-3 h-3 rounded-full bg-gray-900 border-2 border-blue-500"}),p.jsx("span",{className:"text-xs text-slate-500",children:"Client"})]})]})]})]})}function Jie(e,t){const r=G.useRef(t);G.useEffect(function(){t!==r.current&&e.attributionControl!=null&&(r.current!=null&&e.attributionControl.removeAttribution(r.current),t!=null&&e.attributionControl.addAttribution(t)),r.current=t},[e,t])}function JJe(e,t,r){t.center!==r.center&&e.setLatLng(t.center),t.radius!=null&&t.radius!==r.radius&&e.setRadius(t.radius)}const QJe=1;function eQe(e){return Object.freeze({__version:QJe,map:e})}function Qie(e,t){return Object.freeze({...e,...t})}const eae=G.createContext(null),tae=eae.Provider;function vC(){const e=G.useContext(eae);if(e==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return e}function tQe(e){function t(r,n){const{instance:i,context:a}=e(r).current;return G.useImperativeHandle(n,()=>i),r.children==null?null:ee.createElement(tae,{value:a},r.children)}return G.forwardRef(t)}function rQe(e){function t(r,n){const[i,a]=G.useState(!1),{instance:o}=e(r,a).current;G.useImperativeHandle(n,()=>o),G.useEffect(function(){i&&o.update()},[o,i,r.children]);const s=o._contentNode;return s?wZ.createPortal(r.children,s):null}return G.forwardRef(t)}function nQe(e){function t(r,n){const{instance:i}=e(r).current;return G.useImperativeHandle(n,()=>i),null}return G.forwardRef(t)}function QR(e,t){const r=G.useRef();G.useEffect(function(){return t!=null&&e.instance.on(t),r.current=t,function(){r.current!=null&&e.instance.off(r.current),r.current=null}},[e,t])}function pC(e,t){const r=e.pane??t.pane;return r?{...e,pane:r}:e}function iQe(e,t){return function(n,i){const a=vC(),o=e(pC(n,a),a);return Jie(a.map,n.attribution),QR(o.current,n.eventHandlers),t(o.current,a,n,i),o}}var sE={exports:{}};/* @preserve
* Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
* (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
*/(function(e,t){(function(r,n){n(t)})(hg,function(r){var n="1.9.4";function i(g){var w,M,O,j;for(M=1,O=arguments.length;M<O;M++){j=arguments[M];for(w in j)g[w]=j[w]}return g}var a=Object.create||function(){function g(){}return function(w){return g.prototype=w,new g}}();function o(g,w){var M=Array.prototype.slice;if(g.bind)return g.bind.apply(g,M.call(arguments,1));var O=M.call(arguments,2);return function(){return g.apply(w,O.length?O.concat(M.call(arguments)):arguments)}}var s=0;function l(g){return"_leaflet_id"in g||(g._leaflet_id=++s),g._leaflet_id}function u(g,w,M){var O,j,W,q;return q=function(){O=!1,j&&(W.apply(M,j),j=!1)},W=function(){O?j=arguments:(g.apply(M,arguments),setTimeout(q,w),O=!0)},W}function c(g,w,M){var O=w[1],j=w[0],W=O-j;return g===O&&M?g:((g-j)%W+W)%W+j}function f(){return!1}function h(g,w){if(w===!1)return g;var M=Math.pow(10,w===void 0?6:w);return Math.round(g*M)/M}function d(g){return g.trim?g.trim():g.replace(/^\s+|\s+$/g,"")}function v(g){return d(g).split(/\s+/)}function m(g,w){Object.prototype.hasOwnProperty.call(g,"options")||(g.options=g.options?a(g.options):{});for(var M in w)g.options[M]=w[M];return g.options}function y(g,w,M){var O=[];for(var j in g)O.push(encodeURIComponent(M?j.toUpperCase():j)+"="+encodeURIComponent(g[j]));return(!w||w.indexOf("?")===-1?"?":"&")+O.join("&")}var x=/\{ *([\w_ -]+) *\}/g;function _(g,w){return g.replace(x,function(M,O){var j=w[O];if(j===void 0)throw new Error("No value provided for variable "+M);return typeof j=="function"&&(j=j(w)),j})}var b=Array.isArray||function(g){return Object.prototype.toString.call(g)==="[object Array]"};function S(g,w){for(var M=0;M<g.length;M++)if(g[M]===w)return M;return-1}var T="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function C(g){return window["webkit"+g]||window["moz"+g]||window["ms"+g]}var A=0;function P(g){var w=+new Date,M=Math.max(0,16-(w-A));return A=w+M,window.setTimeout(g,M)}var I=window.requestAnimationFrame||C("RequestAnimationFrame")||P,k=window.cancelAnimationFrame||C("CancelAnimationFrame")||C("CancelRequestAnimationFrame")||function(g){window.clearTimeout(g)};function E(g,w,M){if(M&&I===P)g.call(w);else return I.call(window,o(g,w))}function D(g){g&&k.call(window,g)}var N={__proto__:null,extend:i,create:a,bind:o,get lastId(){return s},stamp:l,throttle:u,wrapNum:c,falseFn:f,formatNum:h,trim:d,splitWords:v,setOptions:m,getParamString:y,template:_,isArray:b,indexOf:S,emptyImageUrl:T,requestFn:I,cancelFn:k,requestAnimFrame:E,cancelAnimFrame:D};function z(){}z.extend=function(g){var w=function(){m(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},M=w.__super__=this.prototype,O=a(M);O.constructor=w,w.prototype=O;for(var j in this)Object.prototype.hasOwnProperty.call(this,j)&&j!=="prototype"&&j!=="__super__"&&(w[j]=this[j]);return g.statics&&i(w,g.statics),g.includes&&(V(g.includes),i.apply(null,[O].concat(g.includes))),i(O,g),delete O.statics,delete O.includes,O.options&&(O.options=M.options?a(M.options):{},i(O.options,g.options)),O._initHooks=[],O.callInitHooks=function(){if(!this._initHooksCalled){M.callInitHooks&&M.callInitHooks.call(this),this._initHooksCalled=!0;for(var W=0,q=O._initHooks.length;W<q;W++)O._initHooks[W].call(this)}},w},z.include=function(g){var w=this.prototype.options;return i(this.prototype,g),g.options&&(this.prototype.options=w,this.mergeOptions(g.options)),this},z.mergeOptions=function(g){return i(this.prototype.options,g),this},z.addInitHook=function(g){var w=Array.prototype.slice.call(arguments,1),M=typeof g=="function"?g:function(){this[g].apply(this,w)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(M),this};function V(g){if(!(typeof L>"u"||!L||!L.Mixin)){g=b(g)?g:[g];for(var w=0;w<g.length;w++)g[w]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var F={on:function(g,w,M){if(typeof g=="object")for(var O in g)this._on(O,g[O],w);else{g=v(g);for(var j=0,W=g.length;j<W;j++)this._on(g[j],w,M)}return this},off:function(g,w,M){if(!arguments.length)delete this._events;else if(typeof g=="object")for(var O in g)this._off(O,g[O],w);else{g=v(g);for(var j=arguments.length===1,W=0,q=g.length;W<q;W++)j?this._off(g[W]):this._off(g[W],w,M)}return this},_on:function(g,w,M,O){if(typeof w!="function"){console.warn("wrong listener type: "+typeof w);return}if(this._listens(g,w,M)===!1){M===this&&(M=void 0);var j={fn:w,ctx:M};O&&(j.once=!0),this._events=this._events||{},this._events[g]=this._events[g]||[],this._events[g].push(j)}},_off:function(g,w,M){var O,j,W;if(this._events&&(O=this._events[g],!!O)){if(arguments.length===1){if(this._firingCount)for(j=0,W=O.length;j<W;j++)O[j].fn=f;delete this._events[g];return}if(typeof w!="function"){console.warn("wrong listener type: "+typeof w);return}var q=this._listens(g,w,M);if(q!==!1){var ne=O[q];this._firingCount&&(ne.fn=f,this._events[g]=O=O.slice()),O.splice(q,1)}}},fire:function(g,w,M){if(!this.listens(g,M))return this;var O=i({},w,{type:g,target:this,sourceTarget:w&&w.sourceTarget||this});if(this._events){var j=this._events[g];if(j){this._firingCount=this._firingCount+1||1;for(var W=0,q=j.length;W<q;W++){var ne=j[W],se=ne.fn;ne.once&&this.off(g,se,ne.ctx),se.call(ne.ctx||this,O)}this._firingCount--}}return M&&this._propagateEvent(O),this},listens:function(g,w,M,O){typeof g!="string"&&console.warn('"string" type argument expected');var j=w;typeof w!="function"&&(O=!!w,j=void 0,M=void 0);var W=this._events&&this._events[g];if(W&&W.length&&this._listens(g,j,M)!==!1)return!0;if(O){for(var q in this._eventParents)if(this._eventParents[q].listens(g,w,M,O))return!0}return!1},_listens:function(g,w,M){if(!this._events)return!1;var O=this._events[g]||[];if(!w)return!!O.length;M===this&&(M=void 0);for(var j=0,W=O.length;j<W;j++)if(O[j].fn===w&&O[j].ctx===M)return j;return!1},once:function(g,w,M){if(typeof g=="object")for(var O in g)this._on(O,g[O],w,!0);else{g=v(g);for(var j=0,W=g.length;j<W;j++)this._on(g[j],w,M,!0)}return this},addEventParent:function(g){return this._eventParents=this._eventParents||{},this._eventParents[l(g)]=g,this},removeEventParent:function(g){return this._eventParents&&delete this._eventParents[l(g)],this},_propagateEvent:function(g){for(var w in this._eventParents)this._eventParents[w].fire(g.type,i({layer:g.target,propagatedFrom:g.target},g),!0)}};F.addEventListener=F.on,F.removeEventListener=F.clearAllEventListeners=F.off,F.addOneTimeEventListener=F.once,F.fireEvent=F.fire,F.hasEventListeners=F.listens;var $=z.extend(F);function B(g,w,M){this.x=M?Math.round(g):g,this.y=M?Math.round(w):w}var H=Math.trunc||function(g){return g>0?Math.floor(g):Math.ceil(g)};B.prototype={clone:function(){return new B(this.x,this.y)},add:function(g){return this.clone()._add(U(g))},_add:function(g){return this.x+=g.x,this.y+=g.y,this},subtract:function(g){return this.clone()._subtract(U(g))},_subtract:function(g){return this.x-=g.x,this.y-=g.y,this},divideBy:function(g){return this.clone()._divideBy(g)},_divideBy:function(g){return this.x/=g,this.y/=g,this},multiplyBy:function(g){return this.clone()._multiplyBy(g)},_multiplyBy:function(g){return this.x*=g,this.y*=g,this},scaleBy:function(g){return new B(this.x*g.x,this.y*g.y)},unscaleBy:function(g){return new B(this.x/g.x,this.y/g.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=H(this.x),this.y=H(this.y),this},distanceTo:function(g){g=U(g);var w=g.x-this.x,M=g.y-this.y;return Math.sqrt(w*w+M*M)},equals:function(g){return g=U(g),g.x===this.x&&g.y===this.y},contains:function(g){return g=U(g),Math.abs(g.x)<=Math.abs(this.x)&&Math.abs(g.y)<=Math.abs(this.y)},toString:function(){return"Point("+h(this.x)+", "+h(this.y)+")"}};function U(g,w,M){return g instanceof B?g:b(g)?new B(g[0],g[1]):g==null?g:typeof g=="object"&&"x"in g&&"y"in g?new B(g.x,g.y):new B(g,w,M)}function Y(g,w){if(g)for(var M=w?[g,w]:g,O=0,j=M.length;O<j;O++)this.extend(M[O])}Y.prototype={extend:function(g){var w,M;if(!g)return this;if(g instanceof B||typeof g[0]=="number"||"x"in g)w=M=U(g);else if(g=Z(g),w=g.min,M=g.max,!w||!M)return this;return!this.min&&!this.max?(this.min=w.clone(),this.max=M.clone()):(this.min.x=Math.min(w.x,this.min.x),this.max.x=Math.max(M.x,this.max.x),this.min.y=Math.min(w.y,this.min.y),this.max.y=Math.max(M.y,this.max.y)),this},getCenter:function(g){return U((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,g)},getBottomLeft:function(){return U(this.min.x,this.max.y)},getTopRight:function(){return U(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(g){var w,M;return typeof g[0]=="number"||g instanceof B?g=U(g):g=Z(g),g instanceof Y?(w=g.min,M=g.max):w=M=g,w.x>=this.min.x&&M.x<=this.max.x&&w.y>=this.min.y&&M.y<=this.max.y},intersects:function(g){g=Z(g);var w=this.min,M=this.max,O=g.min,j=g.max,W=j.x>=w.x&&O.x<=M.x,q=j.y>=w.y&&O.y<=M.y;return W&&q},overlaps:function(g){g=Z(g);var w=this.min,M=this.max,O=g.min,j=g.max,W=j.x>w.x&&O.x<M.x,q=j.y>w.y&&O.y<M.y;return W&&q},isValid:function(){return!!(this.min&&this.max)},pad:function(g){var w=this.min,M=this.max,O=Math.abs(w.x-M.x)*g,j=Math.abs(w.y-M.y)*g;return Z(U(w.x-O,w.y-j),U(M.x+O,M.y+j))},equals:function(g){return g?(g=Z(g),this.min.equals(g.getTopLeft())&&this.max.equals(g.getBottomRight())):!1}};function Z(g,w){return!g||g instanceof Y?g:new Y(g,w)}function Q(g,w){if(g)for(var M=w?[g,w]:g,O=0,j=M.length;O<j;O++)this.extend(M[O])}Q.prototype={extend:function(g){var w=this._southWest,M=this._northEast,O,j;if(g instanceof ue)O=g,j=g;else if(g instanceof Q){if(O=g._southWest,j=g._northEast,!O||!j)return this}else return g?this.extend(de(g)||re(g)):this;return!w&&!M?(this._southWest=new ue(O.lat,O.lng),this._northEast=new ue(j.lat,j.lng)):(w.lat=Math.min(O.lat,w.lat),w.lng=Math.min(O.lng,w.lng),M.lat=Math.max(j.lat,M.lat),M.lng=Math.max(j.lng,M.lng)),this},pad:function(g){var w=this._southWest,M=this._northEast,O=Math.abs(w.lat-M.lat)*g,j=Math.abs(w.lng-M.lng)*g;return new Q(new ue(w.lat-O,w.lng-j),new ue(M.lat+O,M.lng+j))},getCenter:function(){return new ue((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new ue(this.getNorth(),this.getWest())},getSouthEast:function(){return new ue(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(g){typeof g[0]=="number"||g instanceof ue||"lat"in g?g=de(g):g=re(g);var w=this._southWest,M=this._northEast,O,j;return g instanceof Q?(O=g.getSouthWest(),j=g.getNorthEast()):O=j=g,O.lat>=w.lat&&j.lat<=M.lat&&O.lng>=w.lng&&j.lng<=M.lng},intersects:function(g){g=re(g);var w=this._southWest,M=this._northEast,O=g.getSouthWest(),j=g.getNorthEast(),W=j.lat>=w.lat&&O.lat<=M.lat,q=j.lng>=w.lng&&O.lng<=M.lng;return W&&q},overlaps:function(g){g=re(g);var w=this._southWest,M=this._northEast,O=g.getSouthWest(),j=g.getNorthEast(),W=j.lat>w.lat&&O.lat<M.lat,q=j.lng>w.lng&&O.lng<M.lng;return W&&q},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(g,w){return g?(g=re(g),this._southWest.equals(g.getSouthWest(),w)&&this._northEast.equals(g.getNorthEast(),w)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function re(g,w){return g instanceof Q?g:new Q(g,w)}function ue(g,w,M){if(isNaN(g)||isNaN(w))throw new Error("Invalid LatLng object: ("+g+", "+w+")");this.lat=+g,this.lng=+w,M!==void 0&&(this.alt=+M)}ue.prototype={equals:function(g,w){if(!g)return!1;g=de(g);var M=Math.max(Math.abs(this.lat-g.lat),Math.abs(this.lng-g.lng));return M<=(w===void 0?1e-9:w)},toString:function(g){return"LatLng("+h(this.lat,g)+", "+h(this.lng,g)+")"},distanceTo:function(g){return xe.distance(this,de(g))},wrap:function(){return xe.wrapLatLng(this)},toBounds:function(g){var w=180*g/40075017,M=w/Math.cos(Math.PI/180*this.lat);return re([this.lat-w,this.lng-M],[this.lat+w,this.lng+M])},clone:function(){return new ue(this.lat,this.lng,this.alt)}};function de(g,w,M){return g instanceof ue?g:b(g)&&typeof g[0]!="object"?g.length===3?new ue(g[0],g[1],g[2]):g.length===2?new ue(g[0],g[1]):null:g==null?g:typeof g=="object"&&"lat"in g?new ue(g.lat,"lng"in g?g.lng:g.lon,g.alt):w===void 0?null:new ue(g,w,M)}var Re={latLngToPoint:function(g,w){var M=this.projection.project(g),O=this.scale(w);return this.transformation._transform(M,O)},pointToLatLng:function(g,w){var M=this.scale(w),O=this.transformation.untransform(g,M);return this.projection.unproject(O)},project:function(g){return this.projection.project(g)},unproject:function(g){return this.projection.unproject(g)},scale:function(g){return 256*Math.pow(2,g)},zoom:function(g){return Math.log(g/256)/Math.LN2},getProjectedBounds:function(g){if(this.infinite)return null;var w=this.projection.bounds,M=this.scale(g),O=this.transformation.transform(w.min,M),j=this.transformation.transform(w.max,M);return new Y(O,j)},infinite:!1,wrapLatLng:function(g){var w=this.wrapLng?c(g.lng,this.wrapLng,!0):g.lng,M=this.wrapLat?c(g.lat,this.wrapLat,!0):g.lat,O=g.alt;return new ue(M,w,O)},wrapLatLngBounds:function(g){var w=g.getCenter(),M=this.wrapLatLng(w),O=w.lat-M.lat,j=w.lng-M.lng;if(O===0&&j===0)return g;var W=g.getSouthWest(),q=g.getNorthEast(),ne=new ue(W.lat-O,W.lng-j),se=new ue(q.lat-O,q.lng-j);return new Q(ne,se)}},xe=i({},Re,{wrapLng:[-180,180],R:6371e3,distance:function(g,w){var M=Math.PI/180,O=g.lat*M,j=w.lat*M,W=Math.sin((w.lat-g.lat)*M/2),q=Math.sin((w.lng-g.lng)*M/2),ne=W*W+Math.cos(O)*Math.cos(j)*q*q,se=2*Math.atan2(Math.sqrt(ne),Math.sqrt(1-ne));return this.R*se}}),ie=6378137,ve={R:ie,MAX_LATITUDE:85.0511287798,project:function(g){var w=Math.PI/180,M=this.MAX_LATITUDE,O=Math.max(Math.min(M,g.lat),-M),j=Math.sin(O*w);return new B(this.R*g.lng*w,this.R*Math.log((1+j)/(1-j))/2)},unproject:function(g){var w=180/Math.PI;return new ue((2*Math.atan(Math.exp(g.y/this.R))-Math.PI/2)*w,g.x*w/this.R)},bounds:function(){var g=ie*Math.PI;return new Y([-g,-g],[g,g])}()};function ce(g,w,M,O){if(b(g)){this._a=g[0],this._b=g[1],this._c=g[2],this._d=g[3];return}this._a=g,this._b=w,this._c=M,this._d=O}ce.prototype={transform:function(g,w){return this._transform(g.clone(),w)},_transform:function(g,w){return w=w||1,g.x=w*(this._a*g.x+this._b),g.y=w*(this._c*g.y+this._d),g},untransform:function(g,w){return w=w||1,new B((g.x/w-this._b)/this._a,(g.y/w-this._d)/this._c)}};function X(g,w,M,O){return new ce(g,w,M,O)}var te=i({},xe,{code:"EPSG:3857",projection:ve,transformation:function(){var g=.5/(Math.PI*ve.R);return X(g,.5,-g,.5)}()}),pe=i({},te,{code:"EPSG:900913"});function Te(g){return document.createElementNS("http://www.w3.org/2000/svg",g)}function Me(g,w){var M="",O,j,W,q,ne,se;for(O=0,W=g.length;O<W;O++){for(ne=g[O],j=0,q=ne.length;j<q;j++)se=ne[j],M+=(j?"L":"M")+se.x+" "+se.y;M+=w?Ze.svg?"z":"x":""}return M||"M0 0"}var Xe=document.documentElement.style,At="ActiveXObject"in window,Wt=At&&!document.addEventListener,$r="msLaunchUri"in navigator&&!("documentMode"in document),_r=io("webkit"),Pr=io("android"),Cn=io("android 2")||io("android 3"),no=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),L0=Pr&&io("Google")&&no<537&&!("AudioNode"in window),gC=!!window.opera,n3=!$r&&io("chrome"),i3=io("gecko")&&!_r&&!gC&&!At,cae=!n3&&io("safari"),a3=io("phantom"),o3="OTransition"in Xe,fae=navigator.platform.indexOf("Win")===0,s3=At&&"transition"in Xe,mC="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!Cn,l3="MozPerspective"in Xe,hae=!window.L_DISABLE_3D&&(s3||mC||l3)&&!o3&&!a3,np=typeof orientation<"u"||io("mobile"),dae=np&&_r,vae=np&&mC,u3=!window.PointerEvent&&window.MSPointerEvent,c3=!!(window.PointerEvent||u3),f3="ontouchstart"in window||!!window.TouchEvent,pae=!window.L_NO_TOUCH&&(f3||c3),gae=np&&gC,mae=np&&i3,yae=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,xae=function(){var g=!1;try{var w=Object.defineProperty({},"passive",{get:function(){g=!0}});window.addEventListener("testPassiveEventSupport",f,w),window.removeEventListener("testPassiveEventSupport",f,w)}catch{}return g}(),_ae=function(){return!!document.createElement("canvas").getContext}(),yC=!!(document.createElementNS&&Te("svg").createSVGRect),bae=!!yC&&function(){var g=document.createElement("div");return g.innerHTML="<svg/>",(g.firstChild&&g.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),wae=!yC&&function(){try{var g=document.createElement("div");g.innerHTML='<v:shape adj="1"/>';var w=g.firstChild;return w.style.behavior="url(#default#VML)",w&&typeof w.adj=="object"}catch{return!1}}(),Sae=navigator.platform.indexOf("Mac")===0,Tae=navigator.platform.indexOf("Linux")===0;function io(g){return navigator.userAgent.toLowerCase().indexOf(g)>=0}var Ze={ie:At,ielt9:Wt,edge:$r,webkit:_r,android:Pr,android23:Cn,androidStock:L0,opera:gC,chrome:n3,gecko:i3,safari:cae,phantom:a3,opera12:o3,win:fae,ie3d:s3,webkit3d:mC,gecko3d:l3,any3d:hae,mobile:np,mobileWebkit:dae,mobileWebkit3d:vae,msPointer:u3,pointer:c3,touch:pae,touchNative:f3,mobileOpera:gae,mobileGecko:mae,retina:yae,passiveEvents:xae,canvas:_ae,svg:yC,vml:wae,inlineSvg:bae,mac:Sae,linux:Tae},h3=Ze.msPointer?"MSPointerDown":"pointerdown",d3=Ze.msPointer?"MSPointerMove":"pointermove",v3=Ze.msPointer?"MSPointerUp":"pointerup",p3=Ze.msPointer?"MSPointerCancel":"pointercancel",xC={touchstart:h3,touchmove:d3,touchend:v3,touchcancel:p3},g3={touchstart:Lae,touchmove:I0,touchend:I0,touchcancel:I0},$f={},m3=!1;function Cae(g,w,M){return w==="touchstart"&&kae(),g3[w]?(M=g3[w].bind(this,M),g.addEventListener(xC[w],M,!1),M):(console.warn("wrong event specified:",w),f)}function Aae(g,w,M){if(!xC[w]){console.warn("wrong event specified:",w);return}g.removeEventListener(xC[w],M,!1)}function Mae(g){$f[g.pointerId]=g}function Pae(g){$f[g.pointerId]&&($f[g.pointerId]=g)}function y3(g){delete $f[g.pointerId]}function kae(){m3||(document.addEventListener(h3,Mae,!0),document.addEventListener(d3,Pae,!0),document.addEventListener(v3,y3,!0),document.addEventListener(p3,y3,!0),m3=!0)}function I0(g,w){if(w.pointerType!==(w.MSPOINTER_TYPE_MOUSE||"mouse")){w.touches=[];for(var M in $f)w.touches.push($f[M]);w.changedTouches=[w],g(w)}}function Lae(g,w){w.MSPOINTER_TYPE_TOUCH&&w.pointerType===w.MSPOINTER_TYPE_TOUCH&&fn(w),I0(g,w)}function Iae(g){var w={},M,O;for(O in g)M=g[O],w[O]=M&&M.bind?M.bind(g):M;return g=w,w.type="dblclick",w.detail=2,w.isTrusted=!1,w._simulated=!0,w}var Oae=200;function Eae(g,w){g.addEventListener("dblclick",w);var M=0,O;function j(W){if(W.detail!==1){O=W.detail;return}if(!(W.pointerType==="mouse"||W.sourceCapabilities&&!W.sourceCapabilities.firesTouchEvents)){var q=S3(W);if(!(q.some(function(se){return se instanceof HTMLLabelElement&&se.attributes.for})&&!q.some(function(se){return se instanceof HTMLInputElement||se instanceof HTMLSelectElement}))){var ne=Date.now();ne-M<=Oae?(O++,O===2&&w(Iae(W))):O=1,M=ne}}}return g.addEventListener("click",j),{dblclick:w,simDblclick:j}}function Dae(g,w){g.removeEventListener("dblclick",w.dblclick),g.removeEventListener("click",w.simDblclick)}var _C=D0(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ip=D0(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),x3=ip==="webkitTransition"||ip==="OTransition"?ip+"End":"transitionend";function _3(g){return typeof g=="string"?document.getElementById(g):g}function ap(g,w){var M=g.style[w]||g.currentStyle&&g.currentStyle[w];if((!M||M==="auto")&&document.defaultView){var O=document.defaultView.getComputedStyle(g,null);M=O?O[w]:null}return M==="auto"?null:M}function Mt(g,w,M){var O=document.createElement(g);return O.className=w||"",M&&M.appendChild(O),O}function nr(g){var w=g.parentNode;w&&w.removeChild(g)}function O0(g){for(;g.firstChild;)g.removeChild(g.firstChild)}function Ff(g){var w=g.parentNode;w&&w.lastChild!==g&&w.appendChild(g)}function Vf(g){var w=g.parentNode;w&&w.firstChild!==g&&w.insertBefore(g,w.firstChild)}function bC(g,w){if(g.classList!==void 0)return g.classList.contains(w);var M=E0(g);return M.length>0&&new RegExp("(^|\\s)"+w+"(\\s|$)").test(M)}function ct(g,w){if(g.classList!==void 0)for(var M=v(w),O=0,j=M.length;O<j;O++)g.classList.add(M[O]);else if(!bC(g,w)){var W=E0(g);wC(g,(W?W+" ":"")+w)}}function br(g,w){g.classList!==void 0?g.classList.remove(w):wC(g,d((" "+E0(g)+" ").replace(" "+w+" "," ")))}function wC(g,w){g.className.baseVal===void 0?g.className=w:g.className.baseVal=w}function E0(g){return g.correspondingElement&&(g=g.correspondingElement),g.className.baseVal===void 0?g.className:g.className.baseVal}function Bi(g,w){"opacity"in g.style?g.style.opacity=w:"filter"in g.style&&Nae(g,w)}function Nae(g,w){var M=!1,O="DXImageTransform.Microsoft.Alpha";try{M=g.filters.item(O)}catch{if(w===1)return}w=Math.round(w*100),M?(M.Enabled=w!==100,M.Opacity=w):g.style.filter+=" progid:"+O+"(opacity="+w+")"}function D0(g){for(var w=document.documentElement.style,M=0;M<g.length;M++)if(g[M]in w)return g[M];return!1}function Ou(g,w,M){var O=w||new B(0,0);g.style[_C]=(Ze.ie3d?"translate("+O.x+"px,"+O.y+"px)":"translate3d("+O.x+"px,"+O.y+"px,0)")+(M?" scale("+M+")":"")}function kr(g,w){g._leaflet_pos=w,Ze.any3d?Ou(g,w):(g.style.left=w.x+"px",g.style.top=w.y+"px")}function Eu(g){return g._leaflet_pos||new B(0,0)}var op,sp,SC;if("onselectstart"in document)op=function(){lt(window,"selectstart",fn)},sp=function(){Ht(window,"selectstart",fn)};else{var lp=D0(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);op=function(){if(lp){var g=document.documentElement.style;SC=g[lp],g[lp]="none"}},sp=function(){lp&&(document.documentElement.style[lp]=SC,SC=void 0)}}function TC(){lt(window,"dragstart",fn)}function CC(){Ht(window,"dragstart",fn)}var N0,AC;function MC(g){for(;g.tabIndex===-1;)g=g.parentNode;g.style&&(j0(),N0=g,AC=g.style.outlineStyle,g.style.outlineStyle="none",lt(window,"keydown",j0))}function j0(){N0&&(N0.style.outlineStyle=AC,N0=void 0,AC=void 0,Ht(window,"keydown",j0))}function b3(g){do g=g.parentNode;while((!g.offsetWidth||!g.offsetHeight)&&g!==document.body);return g}function PC(g){var w=g.getBoundingClientRect();return{x:w.width/g.offsetWidth||1,y:w.height/g.offsetHeight||1,boundingClientRect:w}}var jae={__proto__:null,TRANSFORM:_C,TRANSITION:ip,TRANSITION_END:x3,get:_3,getStyle:ap,create:Mt,remove:nr,empty:O0,toFront:Ff,toBack:Vf,hasClass:bC,addClass:ct,removeClass:br,setClass:wC,getClass:E0,setOpacity:Bi,testProp:D0,setTransform:Ou,setPosition:kr,getPosition:Eu,get disableTextSelection(){return op},get enableTextSelection(){return sp},disableImageDrag:TC,enableImageDrag:CC,preventOutline:MC,restoreOutline:j0,getSizedParentNode:b3,getScale:PC};function lt(g,w,M,O){if(w&&typeof w=="object")for(var j in w)LC(g,j,w[j],M);else{w=v(w);for(var W=0,q=w.length;W<q;W++)LC(g,w[W],M,O)}return this}var ao="_leaflet_events";function Ht(g,w,M,O){if(arguments.length===1)w3(g),delete g[ao];else if(w&&typeof w=="object")for(var j in w)IC(g,j,w[j],M);else if(w=v(w),arguments.length===2)w3(g,function(ne){return S(w,ne)!==-1});else for(var W=0,q=w.length;W<q;W++)IC(g,w[W],M,O);return this}function w3(g,w){for(var M in g[ao]){var O=M.split(/\d/)[0];(!w||w(O))&&IC(g,O,null,null,M)}}var kC={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function LC(g,w,M,O){var j=w+l(M)+(O?"_"+l(O):"");if(g[ao]&&g[ao][j])return this;var W=function(ne){return M.call(O||g,ne||window.event)},q=W;!Ze.touchNative&&Ze.pointer&&w.indexOf("touch")===0?W=Cae(g,w,W):Ze.touch&&w==="dblclick"?W=Eae(g,W):"addEventListener"in g?w==="touchstart"||w==="touchmove"||w==="wheel"||w==="mousewheel"?g.addEventListener(kC[w]||w,W,Ze.passiveEvents?{passive:!1}:!1):w==="mouseenter"||w==="mouseleave"?(W=function(ne){ne=ne||window.event,EC(g,ne)&&q(ne)},g.addEventListener(kC[w],W,!1)):g.addEventListener(w,q,!1):g.attachEvent("on"+w,W),g[ao]=g[ao]||{},g[ao][j]=W}function IC(g,w,M,O,j){j=j||w+l(M)+(O?"_"+l(O):"");var W=g[ao]&&g[ao][j];if(!W)return this;!Ze.touchNative&&Ze.pointer&&w.indexOf("touch")===0?Aae(g,w,W):Ze.touch&&w==="dblclick"?Dae(g,W):"removeEventListener"in g?g.removeEventListener(kC[w]||w,W,!1):g.detachEvent("on"+w,W),g[ao][j]=null}function Du(g){return g.stopPropagation?g.stopPropagation():g.originalEvent?g.originalEvent._stopped=!0:g.cancelBubble=!0,this}function OC(g){return LC(g,"wheel",Du),this}function up(g){return lt(g,"mousedown touchstart dblclick contextmenu",Du),g._leaflet_disable_click=!0,this}function fn(g){return g.preventDefault?g.preventDefault():g.returnValue=!1,this}function Nu(g){return fn(g),Du(g),this}function S3(g){if(g.composedPath)return g.composedPath();for(var w=[],M=g.target;M;)w.push(M),M=M.parentNode;return w}function T3(g,w){if(!w)return new B(g.clientX,g.clientY);var M=PC(w),O=M.boundingClientRect;return new B((g.clientX-O.left)/M.x-w.clientLeft,(g.clientY-O.top)/M.y-w.clientTop)}var Rae=Ze.linux&&Ze.chrome?window.devicePixelRatio:Ze.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function C3(g){return Ze.edge?g.wheelDeltaY/2:g.deltaY&&g.deltaMode===0?-g.deltaY/Rae:g.deltaY&&g.deltaMode===1?-g.deltaY*20:g.deltaY&&g.deltaMode===2?-g.deltaY*60:g.deltaX||g.deltaZ?0:g.wheelDelta?(g.wheelDeltaY||g.wheelDelta)/2:g.detail&&Math.abs(g.detail)<32765?-g.detail*20:g.detail?g.detail/-32765*60:0}function EC(g,w){var M=w.relatedTarget;if(!M)return!0;try{for(;M&&M!==g;)M=M.parentNode}catch{return!1}return M!==g}var Bae={__proto__:null,on:lt,off:Ht,stopPropagation:Du,disableScrollPropagation:OC,disableClickPropagation:up,preventDefault:fn,stop:Nu,getPropagationPath:S3,getMousePosition:T3,getWheelDelta:C3,isExternalTarget:EC,addListener:lt,removeListener:Ht},A3=$.extend({run:function(g,w,M,O){this.stop(),this._el=g,this._inProgress=!0,this._duration=M||.25,this._easeOutPower=1/Math.max(O||.5,.2),this._startPos=Eu(g),this._offset=w.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=E(this._animate,this),this._step()},_step:function(g){var w=+new Date-this._startTime,M=this._duration*1e3;w<M?this._runFrame(this._easeOut(w/M),g):(this._runFrame(1),this._complete())},_runFrame:function(g,w){var M=this._startPos.add(this._offset.multiplyBy(g));w&&M._round(),kr(this._el,M),this.fire("step")},_complete:function(){D(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(g){return 1-Math.pow(1-g,this._easeOutPower)}}),wt=$.extend({options:{crs:te,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(g,w){w=m(this,w),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(g),this._initLayout(),this._onResize=o(this._onResize,this),this._initEvents(),w.maxBounds&&this.setMaxBounds(w.maxBounds),w.zoom!==void 0&&(this._zoom=this._limitZoom(w.zoom)),w.center&&w.zoom!==void 0&&this.setView(de(w.center),w.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=ip&&Ze.any3d&&!Ze.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),lt(this._proxy,x3,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(g,w,M){if(w=w===void 0?this._zoom:this._limitZoom(w),g=this._limitCenter(de(g),w,this.options.maxBounds),M=M||{},this._stop(),this._loaded&&!M.reset&&M!==!0){M.animate!==void 0&&(M.zoom=i({animate:M.animate},M.zoom),M.pan=i({animate:M.animate,duration:M.duration},M.pan));var O=this._zoom!==w?this._tryAnimatedZoom&&this._tryAnimatedZoom(g,w,M.zoom):this._tryAnimatedPan(g,M.pan);if(O)return clearTimeout(this._sizeTimer),this}return this._resetView(g,w,M.pan&&M.pan.noMoveStart),this},setZoom:function(g,w){return this._loaded?this.setView(this.getCenter(),g,{zoom:w}):(this._zoom=g,this)},zoomIn:function(g,w){return g=g||(Ze.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+g,w)},zoomOut:function(g,w){return g=g||(Ze.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-g,w)},setZoomAround:function(g,w,M){var O=this.getZoomScale(w),j=this.getSize().divideBy(2),W=g instanceof B?g:this.latLngToContainerPoint(g),q=W.subtract(j).multiplyBy(1-1/O),ne=this.containerPointToLatLng(j.add(q));return this.setView(ne,w,{zoom:M})},_getBoundsCenterZoom:function(g,w){w=w||{},g=g.getBounds?g.getBounds():re(g);var M=U(w.paddingTopLeft||w.padding||[0,0]),O=U(w.paddingBottomRight||w.padding||[0,0]),j=this.getBoundsZoom(g,!1,M.add(O));if(j=typeof w.maxZoom=="number"?Math.min(w.maxZoom,j):j,j===1/0)return{center:g.getCenter(),zoom:j};var W=O.subtract(M).divideBy(2),q=this.project(g.getSouthWest(),j),ne=this.project(g.getNorthEast(),j),se=this.unproject(q.add(ne).divideBy(2).add(W),j);return{center:se,zoom:j}},fitBounds:function(g,w){if(g=re(g),!g.isValid())throw new Error("Bounds are not valid.");var M=this._getBoundsCenterZoom(g,w);return this.setView(M.center,M.zoom,w)},fitWorld:function(g){return this.fitBounds([[-90,-180],[90,180]],g)},panTo:function(g,w){return this.setView(g,this._zoom,{pan:w})},panBy:function(g,w){if(g=U(g).round(),w=w||{},!g.x&&!g.y)return this.fire("moveend");if(w.animate!==!0&&!this.getSize().contains(g))return this._resetView(this.unproject(this.project(this.getCenter()).add(g)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new A3,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),w.noMoveStart||this.fire("movestart"),w.animate!==!1){ct(this._mapPane,"leaflet-pan-anim");var M=this._getMapPanePos().subtract(g).round();this._panAnim.run(this._mapPane,M,w.duration||.25,w.easeLinearity)}else this._rawPanBy(g),this.fire("move").fire("moveend");return this},flyTo:function(g,w,M){if(M=M||{},M.animate===!1||!Ze.any3d)return this.setView(g,w,M);this._stop();var O=this.project(this.getCenter()),j=this.project(g),W=this.getSize(),q=this._zoom;g=de(g),w=w===void 0?q:w;var ne=Math.max(W.x,W.y),se=ne*this.getZoomScale(q,w),ge=j.distanceTo(O)||1,Be=1.42,tt=Be*Be;function pt(Lr){var Y0=Lr?-1:1,Aoe=Lr?se:ne,Moe=se*se-ne*ne+Y0*tt*tt*ge*ge,Poe=2*Aoe*tt*ge,WC=Moe/Poe,o5=Math.sqrt(WC*WC+1)-WC,koe=o5<1e-9?-18:Math.log(o5);return koe}function zn(Lr){return(Math.exp(Lr)-Math.exp(-Lr))/2}function Qr(Lr){return(Math.exp(Lr)+Math.exp(-Lr))/2}function $i(Lr){return zn(Lr)/Qr(Lr)}var Qn=pt(0);function Yf(Lr){return ne*(Qr(Qn)/Qr(Qn+Be*Lr))}function woe(Lr){return ne*(Qr(Qn)*$i(Qn+Be*Lr)-zn(Qn))/tt}function Soe(Lr){return 1-Math.pow(1-Lr,1.5)}var Toe=Date.now(),i5=(pt(1)-Qn)/Be,Coe=M.duration?1e3*M.duration:1e3*i5*.8;function a5(){var Lr=(Date.now()-Toe)/Coe,Y0=Soe(Lr)*i5;Lr<=1?(this._flyToFrame=E(a5,this),this._move(this.unproject(O.add(j.subtract(O).multiplyBy(woe(Y0)/ge)),q),this.getScaleZoom(ne/Yf(Y0),q),{flyTo:!0})):this._move(g,w)._moveEnd(!0)}return this._moveStart(!0,M.noMoveStart),a5.call(this),this},flyToBounds:function(g,w){var M=this._getBoundsCenterZoom(g,w);return this.flyTo(M.center,M.zoom,w)},setMaxBounds:function(g){return g=re(g),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),g.isValid()?(this.options.maxBounds=g,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(g){var w=this.options.minZoom;return this.options.minZoom=g,this._loaded&&w!==g&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(g):this},setMaxZoom:function(g){var w=this.options.maxZoom;return this.options.maxZoom=g,this._loaded&&w!==g&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(g):this},panInsideBounds:function(g,w){this._enforcingBounds=!0;var M=this.getCenter(),O=this._limitCenter(M,this._zoom,re(g));return M.equals(O)||this.panTo(O,w),this._enforcingBounds=!1,this},panInside:function(g,w){w=w||{};var M=U(w.paddingTopLeft||w.padding||[0,0]),O=U(w.paddingBottomRight||w.padding||[0,0]),j=this.project(this.getCenter()),W=this.project(g),q=this.getPixelBounds(),ne=Z([q.min.add(M),q.max.subtract(O)]),se=ne.getSize();if(!ne.contains(W)){this._enforcingBounds=!0;var ge=W.subtract(ne.getCenter()),Be=ne.extend(W).getSize().subtract(se);j.x+=ge.x<0?-Be.x:Be.x,j.y+=ge.y<0?-Be.y:Be.y,this.panTo(this.unproject(j),w),this._enforcingBounds=!1}return this},invalidateSize:function(g){if(!this._loaded)return this;g=i({animate:!1,pan:!0},g===!0?{animate:!0}:g);var w=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var M=this.getSize(),O=w.divideBy(2).round(),j=M.divideBy(2).round(),W=O.subtract(j);return!W.x&&!W.y?this:(g.animate&&g.pan?this.panBy(W):(g.pan&&this._rawPanBy(W),this.fire("move"),g.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:w,newSize:M}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(g){if(g=this._locateOptions=i({timeout:1e4,watch:!1},g),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var w=o(this._handleGeolocationResponse,this),M=o(this._handleGeolocationError,this);return g.watch?this._locationWatchId=navigator.geolocation.watchPosition(w,M,g):navigator.geolocation.getCurrentPosition(w,M,g),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(g){if(this._container._leaflet_id){var w=g.code,M=g.message||(w===1?"permission denied":w===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:w,message:"Geolocation error: "+M+"."})}},_handleGeolocationResponse:function(g){if(this._container._leaflet_id){var w=g.coords.latitude,M=g.coords.longitude,O=new ue(w,M),j=O.toBounds(g.coords.accuracy*2),W=this._locateOptions;if(W.setView){var q=this.getBoundsZoom(j);this.setView(O,W.maxZoom?Math.min(q,W.maxZoom):q)}var ne={latlng:O,bounds:j,timestamp:g.timestamp};for(var se in g.coords)typeof g.coords[se]=="number"&&(ne[se]=g.coords[se]);this.fire("locationfound",ne)}},addHandler:function(g,w){if(!w)return this;var M=this[g]=new w(this);return this._handlers.push(M),this.options[g]&&M.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),nr(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(D(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var g;for(g in this._layers)this._layers[g].remove();for(g in this._panes)nr(this._panes[g]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(g,w){var M="leaflet-pane"+(g?" leaflet-"+g.replace("Pane","")+"-pane":""),O=Mt("div",M,w||this._mapPane);return g&&(this._panes[g]=O),O},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var g=this.getPixelBounds(),w=this.unproject(g.getBottomLeft()),M=this.unproject(g.getTopRight());return new Q(w,M)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(g,w,M){g=re(g),M=U(M||[0,0]);var O=this.getZoom()||0,j=this.getMinZoom(),W=this.getMaxZoom(),q=g.getNorthWest(),ne=g.getSouthEast(),se=this.getSize().subtract(M),ge=Z(this.project(ne,O),this.project(q,O)).getSize(),Be=Ze.any3d?this.options.zoomSnap:1,tt=se.x/ge.x,pt=se.y/ge.y,zn=w?Math.max(tt,pt):Math.min(tt,pt);return O=this.getScaleZoom(zn,O),Be&&(O=Math.round(O/(Be/100))*(Be/100),O=w?Math.ceil(O/Be)*Be:Math.floor(O/Be)*Be),Math.max(j,Math.min(W,O))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new B(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(g,w){var M=this._getTopLeftPoint(g,w);return new Y(M,M.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(g){return this.options.crs.getProjectedBounds(g===void 0?this.getZoom():g)},getPane:function(g){return typeof g=="string"?this._panes[g]:g},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(g,w){var M=this.options.crs;return w=w===void 0?this._zoom:w,M.scale(g)/M.scale(w)},getScaleZoom:function(g,w){var M=this.options.crs;w=w===void 0?this._zoom:w;var O=M.zoom(g*M.scale(w));return isNaN(O)?1/0:O},project:function(g,w){return w=w===void 0?this._zoom:w,this.options.crs.latLngToPoint(de(g),w)},unproject:function(g,w){return w=w===void 0?this._zoom:w,this.options.crs.pointToLatLng(U(g),w)},layerPointToLatLng:function(g){var w=U(g).add(this.getPixelOrigin());return this.unproject(w)},latLngToLayerPoint:function(g){var w=this.project(de(g))._round();return w._subtract(this.getPixelOrigin())},wrapLatLng:function(g){return this.options.crs.wrapLatLng(de(g))},wrapLatLngBounds:function(g){return this.options.crs.wrapLatLngBounds(re(g))},distance:function(g,w){return this.options.crs.distance(de(g),de(w))},containerPointToLayerPoint:function(g){return U(g).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(g){return U(g).add(this._getMapPanePos())},containerPointToLatLng:function(g){var w=this.containerPointToLayerPoint(U(g));return this.layerPointToLatLng(w)},latLngToContainerPoint:function(g){return this.layerPointToContainerPoint(this.latLngToLayerPoint(de(g)))},mouseEventToContainerPoint:function(g){return T3(g,this._container)},mouseEventToLayerPoint:function(g){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(g))},mouseEventToLatLng:function(g){return this.layerPointToLatLng(this.mouseEventToLayerPoint(g))},_initContainer:function(g){var w=this._container=_3(g);if(w){if(w._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");lt(w,"scroll",this._onScroll,this),this._containerId=l(w)},_initLayout:function(){var g=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ze.any3d,ct(g,"leaflet-container"+(Ze.touch?" leaflet-touch":"")+(Ze.retina?" leaflet-retina":"")+(Ze.ielt9?" leaflet-oldie":"")+(Ze.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var w=ap(g,"position");w!=="absolute"&&w!=="relative"&&w!=="fixed"&&w!=="sticky"&&(g.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var g=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),kr(this._mapPane,new B(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ct(g.markerPane,"leaflet-zoom-hide"),ct(g.shadowPane,"leaflet-zoom-hide"))},_resetView:function(g,w,M){kr(this._mapPane,new B(0,0));var O=!this._loaded;this._loaded=!0,w=this._limitZoom(w),this.fire("viewprereset");var j=this._zoom!==w;this._moveStart(j,M)._move(g,w)._moveEnd(j),this.fire("viewreset"),O&&this.fire("load")},_moveStart:function(g,w){return g&&this.fire("zoomstart"),w||this.fire("movestart"),this},_move:function(g,w,M,O){w===void 0&&(w=this._zoom);var j=this._zoom!==w;return this._zoom=w,this._lastCenter=g,this._pixelOrigin=this._getNewPixelOrigin(g),O?M&&M.pinch&&this.fire("zoom",M):((j||M&&M.pinch)&&this.fire("zoom",M),this.fire("move",M)),this},_moveEnd:function(g){return g&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return D(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(g){kr(this._mapPane,this._getMapPanePos().subtract(g))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(g){this._targets={},this._targets[l(this._container)]=this;var w=g?Ht:lt;w(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&w(window,"resize",this._onResize,this),Ze.any3d&&this.options.transform3DLimit&&(g?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){D(this._resizeRequest),this._resizeRequest=E(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var g=this._getMapPanePos();Math.max(Math.abs(g.x),Math.abs(g.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(g,w){for(var M=[],O,j=w==="mouseout"||w==="mouseover",W=g.target||g.srcElement,q=!1;W;){if(O=this._targets[l(W)],O&&(w==="click"||w==="preclick")&&this._draggableMoved(O)){q=!0;break}if(O&&O.listens(w,!0)&&(j&&!EC(W,g)||(M.push(O),j))||W===this._container)break;W=W.parentNode}return!M.length&&!q&&!j&&this.listens(w,!0)&&(M=[this]),M},_isClickDisabled:function(g){for(;g&&g!==this._container;){if(g._leaflet_disable_click)return!0;g=g.parentNode}},_handleDOMEvent:function(g){var w=g.target||g.srcElement;if(!(!this._loaded||w._leaflet_disable_events||g.type==="click"&&this._isClickDisabled(w))){var M=g.type;M==="mousedown"&&MC(w),this._fireDOMEvent(g,M)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(g,w,M){if(g.type==="click"){var O=i({},g);O.type="preclick",this._fireDOMEvent(O,O.type,M)}var j=this._findEventTargets(g,w);if(M){for(var W=[],q=0;q<M.length;q++)M[q].listens(w,!0)&&W.push(M[q]);j=W.concat(j)}if(j.length){w==="contextmenu"&&fn(g);var ne=j[0],se={originalEvent:g};if(g.type!=="keypress"&&g.type!=="keydown"&&g.type!=="keyup"){var ge=ne.getLatLng&&(!ne._radius||ne._radius<=10);se.containerPoint=ge?this.latLngToContainerPoint(ne.getLatLng()):this.mouseEventToContainerPoint(g),se.layerPoint=this.containerPointToLayerPoint(se.containerPoint),se.latlng=ge?ne.getLatLng():this.layerPointToLatLng(se.layerPoint)}for(q=0;q<j.length;q++)if(j[q].fire(w,se,!0),se.originalEvent._stopped||j[q].options.bubblingMouseEvents===!1&&S(this._mouseEvents,w)!==-1)return}},_draggableMoved:function(g){return g=g.dragging&&g.dragging.enabled()?g:this,g.dragging&&g.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var g=0,w=this._handlers.length;g<w;g++)this._handlers[g].disable()},whenReady:function(g,w){return this._loaded?g.call(w||this,{target:this}):this.on("load",g,w),this},_getMapPanePos:function(){return Eu(this._mapPane)||new B(0,0)},_moved:function(){var g=this._getMapPanePos();return g&&!g.equals([0,0])},_getTopLeftPoint:function(g,w){var M=g&&w!==void 0?this._getNewPixelOrigin(g,w):this.getPixelOrigin();return M.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(g,w){var M=this.getSize()._divideBy(2);return this.project(g,w)._subtract(M)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(g,w,M){var O=this._getNewPixelOrigin(M,w);return this.project(g,w)._subtract(O)},_latLngBoundsToNewLayerBounds:function(g,w,M){var O=this._getNewPixelOrigin(M,w);return Z([this.project(g.getSouthWest(),w)._subtract(O),this.project(g.getNorthWest(),w)._subtract(O),this.project(g.getSouthEast(),w)._subtract(O),this.project(g.getNorthEast(),w)._subtract(O)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(g){return this.latLngToLayerPoint(g).subtract(this._getCenterLayerPoint())},_limitCenter:function(g,w,M){if(!M)return g;var O=this.project(g,w),j=this.getSize().divideBy(2),W=new Y(O.subtract(j),O.add(j)),q=this._getBoundsOffset(W,M,w);return Math.abs(q.x)<=1&&Math.abs(q.y)<=1?g:this.unproject(O.add(q),w)},_limitOffset:function(g,w){if(!w)return g;var M=this.getPixelBounds(),O=new Y(M.min.add(g),M.max.add(g));return g.add(this._getBoundsOffset(O,w))},_getBoundsOffset:function(g,w,M){var O=Z(this.project(w.getNorthEast(),M),this.project(w.getSouthWest(),M)),j=O.min.subtract(g.min),W=O.max.subtract(g.max),q=this._rebound(j.x,-W.x),ne=this._rebound(j.y,-W.y);return new B(q,ne)},_rebound:function(g,w){return g+w>0?Math.round(g-w)/2:Math.max(0,Math.ceil(g))-Math.max(0,Math.floor(w))},_limitZoom:function(g){var w=this.getMinZoom(),M=this.getMaxZoom(),O=Ze.any3d?this.options.zoomSnap:1;return O&&(g=Math.round(g/O)*O),Math.max(w,Math.min(M,g))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){br(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(g,w){var M=this._getCenterOffset(g)._trunc();return(w&&w.animate)!==!0&&!this.getSize().contains(M)?!1:(this.panBy(M,w),!0)},_createAnimProxy:function(){var g=this._proxy=Mt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(g),this.on("zoomanim",function(w){var M=_C,O=this._proxy.style[M];Ou(this._proxy,this.project(w.center,w.zoom),this.getZoomScale(w.zoom,1)),O===this._proxy.style[M]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){nr(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var g=this.getCenter(),w=this.getZoom();Ou(this._proxy,this.project(g,w),this.getZoomScale(w,1))},_catchTransitionEnd:function(g){this._animatingZoom&&g.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(g,w,M){if(this._animatingZoom)return!0;if(M=M||{},!this._zoomAnimated||M.animate===!1||this._nothingToAnimate()||Math.abs(w-this._zoom)>this.options.zoomAnimationThreshold)return!1;var O=this.getZoomScale(w),j=this._getCenterOffset(g)._divideBy(1-1/O);return M.animate!==!0&&!this.getSize().contains(j)?!1:(E(function(){this._moveStart(!0,M.noMoveStart||!1)._animateZoom(g,w,!0)},this),!0)},_animateZoom:function(g,w,M,O){this._mapPane&&(M&&(this._animatingZoom=!0,this._animateToCenter=g,this._animateToZoom=w,ct(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:g,zoom:w,noUpdate:O}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&br(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function zae(g,w){return new wt(g,w)}var Sa=z.extend({options:{position:"topright"},initialize:function(g){m(this,g)},getPosition:function(){return this.options.position},setPosition:function(g){var w=this._map;return w&&w.removeControl(this),this.options.position=g,w&&w.addControl(this),this},getContainer:function(){return this._container},addTo:function(g){this.remove(),this._map=g;var w=this._container=this.onAdd(g),M=this.getPosition(),O=g._controlCorners[M];return ct(w,"leaflet-control"),M.indexOf("bottom")!==-1?O.insertBefore(w,O.firstChild):O.appendChild(w),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(nr(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(g){this._map&&g&&g.screenX>0&&g.screenY>0&&this._map.getContainer().focus()}}),cp=function(g){return new Sa(g)};wt.include({addControl:function(g){return g.addTo(this),this},removeControl:function(g){return g.remove(),this},_initControlPos:function(){var g=this._controlCorners={},w="leaflet-",M=this._controlContainer=Mt("div",w+"control-container",this._container);function O(j,W){var q=w+j+" "+w+W;g[j+W]=Mt("div",q,M)}O("top","left"),O("top","right"),O("bottom","left"),O("bottom","right")},_clearControlPos:function(){for(var g in this._controlCorners)nr(this._controlCorners[g]);nr(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var M3=Sa.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(g,w,M,O){return M<O?-1:O<M?1:0}},initialize:function(g,w,M){m(this,M),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var O in g)this._addLayer(g[O],O);for(O in w)this._addLayer(w[O],O,!0)},onAdd:function(g){this._initLayout(),this._update(),this._map=g,g.on("zoomend",this._checkDisabledLayers,this);for(var w=0;w<this._layers.length;w++)this._layers[w].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(g){return Sa.prototype.addTo.call(this,g),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var g=0;g<this._layers.length;g++)this._layers[g].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(g,w){return this._addLayer(g,w),this._map?this._update():this},addOverlay:function(g,w){return this._addLayer(g,w,!0),this._map?this._update():this},removeLayer:function(g){g.off("add remove",this._onLayerChange,this);var w=this._getLayer(l(g));return w&&this._layers.splice(this._layers.indexOf(w),1),this._map?this._update():this},expand:function(){ct(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var g=this._map.getSize().y-(this._container.offsetTop+50);return g<this._section.clientHeight?(ct(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=g+"px"):br(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return br(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var g="leaflet-control-layers",w=this._container=Mt("div",g),M=this.options.collapsed;w.setAttribute("aria-haspopup",!0),up(w),OC(w);var O=this._section=Mt("section",g+"-list");M&&(this._map.on("click",this.collapse,this),lt(w,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var j=this._layersLink=Mt("a",g+"-toggle",w);j.href="#",j.title="Layers",j.setAttribute("role","button"),lt(j,{keydown:function(W){W.keyCode===13&&this._expandSafely()},click:function(W){fn(W),this._expandSafely()}},this),M||this.expand(),this._baseLayersList=Mt("div",g+"-base",O),this._separator=Mt("div",g+"-separator",O),this._overlaysList=Mt("div",g+"-overlays",O),w.appendChild(O)},_getLayer:function(g){for(var w=0;w<this._layers.length;w++)if(this._layers[w]&&l(this._layers[w].layer)===g)return this._layers[w]},_addLayer:function(g,w,M){this._map&&g.on("add remove",this._onLayerChange,this),this._layers.push({layer:g,name:w,overlay:M}),this.options.sortLayers&&this._layers.sort(o(function(O,j){return this.options.sortFunction(O.layer,j.layer,O.name,j.name)},this)),this.options.autoZIndex&&g.setZIndex&&(this._lastZIndex++,g.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;O0(this._baseLayersList),O0(this._overlaysList),this._layerControlInputs=[];var g,w,M,O,j=0;for(M=0;M<this._layers.length;M++)O=this._layers[M],this._addItem(O),w=w||O.overlay,g=g||!O.overlay,j+=O.overlay?0:1;return this.options.hideSingleBase&&(g=g&&j>1,this._baseLayersList.style.display=g?"":"none"),this._separator.style.display=w&&g?"":"none",this},_onLayerChange:function(g){this._handlingClick||this._update();var w=this._getLayer(l(g.target)),M=w.overlay?g.type==="add"?"overlayadd":"overlayremove":g.type==="add"?"baselayerchange":null;M&&this._map.fire(M,w)},_createRadioElement:function(g,w){var M='<input type="radio" class="leaflet-control-layers-selector" name="'+g+'"'+(w?' checked="checked"':"")+"/>",O=document.createElement("div");return O.innerHTML=M,O.firstChild},_addItem:function(g){var w=document.createElement("label"),M=this._map.hasLayer(g.layer),O;g.overlay?(O=document.createElement("input"),O.type="checkbox",O.className="leaflet-control-layers-selector",O.defaultChecked=M):O=this._createRadioElement("leaflet-base-layers_"+l(this),M),this._layerControlInputs.push(O),O.layerId=l(g.layer),lt(O,"click",this._onInputClick,this);var j=document.createElement("span");j.innerHTML=" "+g.name;var W=document.createElement("span");w.appendChild(W),W.appendChild(O),W.appendChild(j);var q=g.overlay?this._overlaysList:this._baseLayersList;return q.appendChild(w),this._checkDisabledLayers(),w},_onInputClick:function(){if(!this._preventClick){var g=this._layerControlInputs,w,M,O=[],j=[];this._handlingClick=!0;for(var W=g.length-1;W>=0;W--)w=g[W],M=this._getLayer(w.layerId).layer,w.checked?O.push(M):w.checked||j.push(M);for(W=0;W<j.length;W++)this._map.hasLayer(j[W])&&this._map.removeLayer(j[W]);for(W=0;W<O.length;W++)this._map.hasLayer(O[W])||this._map.addLayer(O[W]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var g=this._layerControlInputs,w,M,O=this._map.getZoom(),j=g.length-1;j>=0;j--)w=g[j],M=this._getLayer(w.layerId).layer,w.disabled=M.options.minZoom!==void 0&&O<M.options.minZoom||M.options.maxZoom!==void 0&&O>M.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var g=this._section;this._preventClick=!0,lt(g,"click",fn),this.expand();var w=this;setTimeout(function(){Ht(g,"click",fn),w._preventClick=!1})}}),$ae=function(g,w,M){return new M3(g,w,M)},DC=Sa.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(g){var w="leaflet-control-zoom",M=Mt("div",w+" leaflet-bar"),O=this.options;return this._zoomInButton=this._createButton(O.zoomInText,O.zoomInTitle,w+"-in",M,this._zoomIn),this._zoomOutButton=this._createButton(O.zoomOutText,O.zoomOutTitle,w+"-out",M,this._zoomOut),this._updateDisabled(),g.on("zoomend zoomlevelschange",this._updateDisabled,this),M},onRemove:function(g){g.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(g){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(g.shiftKey?3:1))},_zoomOut:function(g){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(g.shiftKey?3:1))},_createButton:function(g,w,M,O,j){var W=Mt("a",M,O);return W.innerHTML=g,W.href="#",W.title=w,W.setAttribute("role","button"),W.setAttribute("aria-label",w),up(W),lt(W,"click",Nu),lt(W,"click",j,this),lt(W,"click",this._refocusOnMap,this),W},_updateDisabled:function(){var g=this._map,w="leaflet-disabled";br(this._zoomInButton,w),br(this._zoomOutButton,w),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||g._zoom===g.getMinZoom())&&(ct(this._zoomOutButton,w),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||g._zoom===g.getMaxZoom())&&(ct(this._zoomInButton,w),this._zoomInButton.setAttribute("aria-disabled","true"))}});wt.mergeOptions({zoomControl:!0}),wt.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new DC,this.addControl(this.zoomControl))});var Fae=function(g){return new DC(g)},P3=Sa.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(g){var w="leaflet-control-scale",M=Mt("div",w),O=this.options;return this._addScales(O,w+"-line",M),g.on(O.updateWhenIdle?"moveend":"move",this._update,this),g.whenReady(this._update,this),M},onRemove:function(g){g.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(g,w,M){g.metric&&(this._mScale=Mt("div",w,M)),g.imperial&&(this._iScale=Mt("div",w,M))},_update:function(){var g=this._map,w=g.getSize().y/2,M=g.distance(g.containerPointToLatLng([0,w]),g.containerPointToLatLng([this.options.maxWidth,w]));this._updateScales(M)},_updateScales:function(g){this.options.metric&&g&&this._updateMetric(g),this.options.imperial&&g&&this._updateImperial(g)},_updateMetric:function(g){var w=this._getRoundNum(g),M=w<1e3?w+" m":w/1e3+" km";this._updateScale(this._mScale,M,w/g)},_updateImperial:function(g){var w=g*3.2808399,M,O,j;w>5280?(M=w/5280,O=this._getRoundNum(M),this._updateScale(this._iScale,O+" mi",O/M)):(j=this._getRoundNum(w),this._updateScale(this._iScale,j+" ft",j/w))},_updateScale:function(g,w,M){g.style.width=Math.round(this.options.maxWidth*M)+"px",g.innerHTML=w},_getRoundNum:function(g){var w=Math.pow(10,(Math.floor(g)+"").length-1),M=g/w;return M=M>=10?10:M>=5?5:M>=3?3:M>=2?2:1,w*M}}),Vae=function(g){return new P3(g)},Gae='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',NC=Sa.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Ze.inlineSvg?Gae+" ":"")+"Leaflet</a>"},initialize:function(g){m(this,g),this._attributions={}},onAdd:function(g){g.attributionControl=this,this._container=Mt("div","leaflet-control-attribution"),up(this._container);for(var w in g._layers)g._layers[w].getAttribution&&this.addAttribution(g._layers[w].getAttribution());return this._update(),g.on("layeradd",this._addAttribution,this),this._container},onRemove:function(g){g.off("layeradd",this._addAttribution,this)},_addAttribution:function(g){g.layer.getAttribution&&(this.addAttribution(g.layer.getAttribution()),g.layer.once("remove",function(){this.removeAttribution(g.layer.getAttribution())},this))},setPrefix:function(g){return this.options.prefix=g,this._update(),this},addAttribution:function(g){return g?(this._attributions[g]||(this._attributions[g]=0),this._attributions[g]++,this._update(),this):this},removeAttribution:function(g){return g?(this._attributions[g]&&(this._attributions[g]--,this._update()),this):this},_update:function(){if(this._map){var g=[];for(var w in this._attributions)this._attributions[w]&&g.push(w);var M=[];this.options.prefix&&M.push(this.options.prefix),g.length&&M.push(g.join(", ")),this._container.innerHTML=M.join(' <span aria-hidden="true">|</span> ')}}});wt.mergeOptions({attributionControl:!0}),wt.addInitHook(function(){this.options.attributionControl&&new NC().addTo(this)});var Wae=function(g){return new NC(g)};Sa.Layers=M3,Sa.Zoom=DC,Sa.Scale=P3,Sa.Attribution=NC,cp.layers=$ae,cp.zoom=Fae,cp.scale=Vae,cp.attribution=Wae;var oo=z.extend({initialize:function(g){this._map=g},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});oo.addTo=function(g,w){return g.addHandler(w,this),this};var Hae={Events:F},k3=Ze.touch?"touchstart mousedown":"mousedown",al=$.extend({options:{clickTolerance:3},initialize:function(g,w,M,O){m(this,O),this._element=g,this._dragStartTarget=w||g,this._preventOutline=M},enable:function(){this._enabled||(lt(this._dragStartTarget,k3,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(al._dragging===this&&this.finishDrag(!0),Ht(this._dragStartTarget,k3,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(g){if(this._enabled&&(this._moved=!1,!bC(this._element,"leaflet-zoom-anim"))){if(g.touches&&g.touches.length!==1){al._dragging===this&&this.finishDrag();return}if(!(al._dragging||g.shiftKey||g.which!==1&&g.button!==1&&!g.touches)&&(al._dragging=this,this._preventOutline&&MC(this._element),TC(),op(),!this._moving)){this.fire("down");var w=g.touches?g.touches[0]:g,M=b3(this._element);this._startPoint=new B(w.clientX,w.clientY),this._startPos=Eu(this._element),this._parentScale=PC(M);var O=g.type==="mousedown";lt(document,O?"mousemove":"touchmove",this._onMove,this),lt(document,O?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(g){if(this._enabled){if(g.touches&&g.touches.length>1){this._moved=!0;return}var w=g.touches&&g.touches.length===1?g.touches[0]:g,M=new B(w.clientX,w.clientY)._subtract(this._startPoint);!M.x&&!M.y||Math.abs(M.x)+Math.abs(M.y)<this.options.clickTolerance||(M.x/=this._parentScale.x,M.y/=this._parentScale.y,fn(g),this._moved||(this.fire("dragstart"),this._moved=!0,ct(document.body,"leaflet-dragging"),this._lastTarget=g.target||g.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),ct(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(M),this._moving=!0,this._lastEvent=g,this._updatePosition())}},_updatePosition:function(){var g={originalEvent:this._lastEvent};this.fire("predrag",g),kr(this._element,this._newPos),this.fire("drag",g)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(g){br(document.body,"leaflet-dragging"),this._lastTarget&&(br(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Ht(document,"mousemove touchmove",this._onMove,this),Ht(document,"mouseup touchend touchcancel",this._onUp,this),CC(),sp();var w=this._moved&&this._moving;this._moving=!1,al._dragging=!1,w&&this.fire("dragend",{noInertia:g,distance:this._newPos.distanceTo(this._startPos)})}});function L3(g,w,M){var O,j=[1,4,2,8],W,q,ne,se,ge,Be,tt,pt;for(W=0,Be=g.length;W<Be;W++)g[W]._code=ju(g[W],w);for(ne=0;ne<4;ne++){for(tt=j[ne],O=[],W=0,Be=g.length,q=Be-1;W<Be;q=W++)se=g[W],ge=g[q],se._code&tt?ge._code&tt||(pt=R0(ge,se,tt,w,M),pt._code=ju(pt,w),O.push(pt)):(ge._code&tt&&(pt=R0(ge,se,tt,w,M),pt._code=ju(pt,w),O.push(pt)),O.push(se));g=O}return g}function I3(g,w){var M,O,j,W,q,ne,se,ge,Be;if(!g||g.length===0)throw new Error("latlngs not passed");zi(g)||(console.warn("latlngs are not flat! Only the first ring will be used"),g=g[0]);var tt=de([0,0]),pt=re(g),zn=pt.getNorthWest().distanceTo(pt.getSouthWest())*pt.getNorthEast().distanceTo(pt.getNorthWest());zn<1700&&(tt=jC(g));var Qr=g.length,$i=[];for(M=0;M<Qr;M++){var Qn=de(g[M]);$i.push(w.project(de([Qn.lat-tt.lat,Qn.lng-tt.lng])))}for(ne=se=ge=0,M=0,O=Qr-1;M<Qr;O=M++)j=$i[M],W=$i[O],q=j.y*W.x-W.y*j.x,se+=(j.x+W.x)*q,ge+=(j.y+W.y)*q,ne+=q*3;ne===0?Be=$i[0]:Be=[se/ne,ge/ne];var Yf=w.unproject(U(Be));return de([Yf.lat+tt.lat,Yf.lng+tt.lng])}function jC(g){for(var w=0,M=0,O=0,j=0;j<g.length;j++){var W=de(g[j]);w+=W.lat,M+=W.lng,O++}return de([w/O,M/O])}var Uae={__proto__:null,clipPolygon:L3,polygonCenter:I3,centroid:jC};function O3(g,w){if(!w||!g.length)return g.slice();var M=w*w;return g=Xae(g,M),g=Yae(g,M),g}function E3(g,w,M){return Math.sqrt(fp(g,w,M,!0))}function Zae(g,w,M){return fp(g,w,M)}function Yae(g,w){var M=g.length,O=typeof Uint8Array<"u"?Uint8Array:Array,j=new O(M);j[0]=j[M-1]=1,RC(g,j,w,0,M-1);var W,q=[];for(W=0;W<M;W++)j[W]&&q.push(g[W]);return q}function RC(g,w,M,O,j){var W=0,q,ne,se;for(ne=O+1;ne<=j-1;ne++)se=fp(g[ne],g[O],g[j],!0),se>W&&(q=ne,W=se);W>M&&(w[q]=1,RC(g,w,M,O,q),RC(g,w,M,q,j))}function Xae(g,w){for(var M=[g[0]],O=1,j=0,W=g.length;O<W;O++)qae(g[O],g[j])>w&&(M.push(g[O]),j=O);return j<W-1&&M.push(g[W-1]),M}var D3;function N3(g,w,M,O,j){var W=O?D3:ju(g,M),q=ju(w,M),ne,se,ge;for(D3=q;;){if(!(W|q))return[g,w];if(W&q)return!1;ne=W||q,se=R0(g,w,ne,M,j),ge=ju(se,M),ne===W?(g=se,W=ge):(w=se,q=ge)}}function R0(g,w,M,O,j){var W=w.x-g.x,q=w.y-g.y,ne=O.min,se=O.max,ge,Be;return M&8?(ge=g.x+W*(se.y-g.y)/q,Be=se.y):M&4?(ge=g.x+W*(ne.y-g.y)/q,Be=ne.y):M&2?(ge=se.x,Be=g.y+q*(se.x-g.x)/W):M&1&&(ge=ne.x,Be=g.y+q*(ne.x-g.x)/W),new B(ge,Be,j)}function ju(g,w){var M=0;return g.x<w.min.x?M|=1:g.x>w.max.x&&(M|=2),g.y<w.min.y?M|=4:g.y>w.max.y&&(M|=8),M}function qae(g,w){var M=w.x-g.x,O=w.y-g.y;return M*M+O*O}function fp(g,w,M,O){var j=w.x,W=w.y,q=M.x-j,ne=M.y-W,se=q*q+ne*ne,ge;return se>0&&(ge=((g.x-j)*q+(g.y-W)*ne)/se,ge>1?(j=M.x,W=M.y):ge>0&&(j+=q*ge,W+=ne*ge)),q=g.x-j,ne=g.y-W,O?q*q+ne*ne:new B(j,W)}function zi(g){return!b(g[0])||typeof g[0][0]!="object"&&typeof g[0][0]<"u"}function j3(g){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),zi(g)}function R3(g,w){var M,O,j,W,q,ne,se,ge;if(!g||g.length===0)throw new Error("latlngs not passed");zi(g)||(console.warn("latlngs are not flat! Only the first ring will be used"),g=g[0]);var Be=de([0,0]),tt=re(g),pt=tt.getNorthWest().distanceTo(tt.getSouthWest())*tt.getNorthEast().distanceTo(tt.getNorthWest());pt<1700&&(Be=jC(g));var zn=g.length,Qr=[];for(M=0;M<zn;M++){var $i=de(g[M]);Qr.push(w.project(de([$i.lat-Be.lat,$i.lng-Be.lng])))}for(M=0,O=0;M<zn-1;M++)O+=Qr[M].distanceTo(Qr[M+1])/2;if(O===0)ge=Qr[0];else for(M=0,W=0;M<zn-1;M++)if(q=Qr[M],ne=Qr[M+1],j=q.distanceTo(ne),W+=j,W>O){se=(W-O)/j,ge=[ne.x-se*(ne.x-q.x),ne.y-se*(ne.y-q.y)];break}var Qn=w.unproject(U(ge));return de([Qn.lat+Be.lat,Qn.lng+Be.lng])}var Kae={__proto__:null,simplify:O3,pointToSegmentDistance:E3,closestPointOnSegment:Zae,clipSegment:N3,_getEdgeIntersection:R0,_getBitCode:ju,_sqClosestPointOnSegment:fp,isFlat:zi,_flat:j3,polylineCenter:R3},BC={project:function(g){return new B(g.lng,g.lat)},unproject:function(g){return new ue(g.y,g.x)},bounds:new Y([-180,-90],[180,90])},zC={R:6378137,R_MINOR:6356752314245179e-9,bounds:new Y([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(g){var w=Math.PI/180,M=this.R,O=g.lat*w,j=this.R_MINOR/M,W=Math.sqrt(1-j*j),q=W*Math.sin(O),ne=Math.tan(Math.PI/4-O/2)/Math.pow((1-q)/(1+q),W/2);return O=-M*Math.log(Math.max(ne,1e-10)),new B(g.lng*w*M,O)},unproject:function(g){for(var w=180/Math.PI,M=this.R,O=this.R_MINOR/M,j=Math.sqrt(1-O*O),W=Math.exp(-g.y/M),q=Math.PI/2-2*Math.atan(W),ne=0,se=.1,ge;ne<15&&Math.abs(se)>1e-7;ne++)ge=j*Math.sin(q),ge=Math.pow((1-ge)/(1+ge),j/2),se=Math.PI/2-2*Math.atan(W*ge)-q,q+=se;return new ue(q*w,g.x*w/M)}},Jae={__proto__:null,LonLat:BC,Mercator:zC,SphericalMercator:ve},Qae=i({},xe,{code:"EPSG:3395",projection:zC,transformation:function(){var g=.5/(Math.PI*zC.R);return X(g,.5,-g,.5)}()}),B3=i({},xe,{code:"EPSG:4326",projection:BC,transformation:X(1/180,1,-1/180,.5)}),eoe=i({},Re,{projection:BC,transformation:X(1,0,-1,0),scale:function(g){return Math.pow(2,g)},zoom:function(g){return Math.log(g)/Math.LN2},distance:function(g,w){var M=w.lng-g.lng,O=w.lat-g.lat;return Math.sqrt(M*M+O*O)},infinite:!0});Re.Earth=xe,Re.EPSG3395=Qae,Re.EPSG3857=te,Re.EPSG900913=pe,Re.EPSG4326=B3,Re.Simple=eoe;var Ta=$.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(g){return g.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(g){return g&&g.removeLayer(this),this},getPane:function(g){return this._map.getPane(g?this.options[g]||g:this.options.pane)},addInteractiveTarget:function(g){return this._map._targets[l(g)]=this,this},removeInteractiveTarget:function(g){return delete this._map._targets[l(g)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(g){var w=g.target;if(w.hasLayer(this)){if(this._map=w,this._zoomAnimated=w._zoomAnimated,this.getEvents){var M=this.getEvents();w.on(M,this),this.once("remove",function(){w.off(M,this)},this)}this.onAdd(w),this.fire("add"),w.fire("layeradd",{layer:this})}}});wt.include({addLayer:function(g){if(!g._layerAdd)throw new Error("The provided object is not a Layer.");var w=l(g);return this._layers[w]?this:(this._layers[w]=g,g._mapToAdd=this,g.beforeAdd&&g.beforeAdd(this),this.whenReady(g._layerAdd,g),this)},removeLayer:function(g){var w=l(g);return this._layers[w]?(this._loaded&&g.onRemove(this),delete this._layers[w],this._loaded&&(this.fire("layerremove",{layer:g}),g.fire("remove")),g._map=g._mapToAdd=null,this):this},hasLayer:function(g){return l(g)in this._layers},eachLayer:function(g,w){for(var M in this._layers)g.call(w,this._layers[M]);return this},_addLayers:function(g){g=g?b(g)?g:[g]:[];for(var w=0,M=g.length;w<M;w++)this.addLayer(g[w])},_addZoomLimit:function(g){(!isNaN(g.options.maxZoom)||!isNaN(g.options.minZoom))&&(this._zoomBoundLayers[l(g)]=g,this._updateZoomLevels())},_removeZoomLimit:function(g){var w=l(g);this._zoomBoundLayers[w]&&(delete this._zoomBoundLayers[w],this._updateZoomLevels())},_updateZoomLevels:function(){var g=1/0,w=-1/0,M=this._getZoomSpan();for(var O in this._zoomBoundLayers){var j=this._zoomBoundLayers[O].options;g=j.minZoom===void 0?g:Math.min(g,j.minZoom),w=j.maxZoom===void 0?w:Math.max(w,j.maxZoom)}this._layersMaxZoom=w===-1/0?void 0:w,this._layersMinZoom=g===1/0?void 0:g,M!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Gf=Ta.extend({initialize:function(g,w){m(this,w),this._layers={};var M,O;if(g)for(M=0,O=g.length;M<O;M++)this.addLayer(g[M])},addLayer:function(g){var w=this.getLayerId(g);return this._layers[w]=g,this._map&&this._map.addLayer(g),this},removeLayer:function(g){var w=g in this._layers?g:this.getLayerId(g);return this._map&&this._layers[w]&&this._map.removeLayer(this._layers[w]),delete this._layers[w],this},hasLayer:function(g){var w=typeof g=="number"?g:this.getLayerId(g);return w in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(g){var w=Array.prototype.slice.call(arguments,1),M,O;for(M in this._layers)O=this._layers[M],O[g]&&O[g].apply(O,w);return this},onAdd:function(g){this.eachLayer(g.addLayer,g)},onRemove:function(g){this.eachLayer(g.removeLayer,g)},eachLayer:function(g,w){for(var M in this._layers)g.call(w,this._layers[M]);return this},getLayer:function(g){return this._layers[g]},getLayers:function(){var g=[];return this.eachLayer(g.push,g),g},setZIndex:function(g){return this.invoke("setZIndex",g)},getLayerId:function(g){return l(g)}}),toe=function(g,w){return new Gf(g,w)},ts=Gf.extend({addLayer:function(g){return this.hasLayer(g)?this:(g.addEventParent(this),Gf.prototype.addLayer.call(this,g),this.fire("layeradd",{layer:g}))},removeLayer:function(g){return this.hasLayer(g)?(g in this._layers&&(g=this._layers[g]),g.removeEventParent(this),Gf.prototype.removeLayer.call(this,g),this.fire("layerremove",{layer:g})):this},setStyle:function(g){return this.invoke("setStyle",g)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var g=new Q;for(var w in this._layers){var M=this._layers[w];g.extend(M.getBounds?M.getBounds():M.getLatLng())}return g}}),roe=function(g,w){return new ts(g,w)},Wf=z.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(g){m(this,g)},createIcon:function(g){return this._createIcon("icon",g)},createShadow:function(g){return this._createIcon("shadow",g)},_createIcon:function(g,w){var M=this._getIconUrl(g);if(!M){if(g==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var O=this._createImg(M,w&&w.tagName==="IMG"?w:null);return this._setIconStyles(O,g),(this.options.crossOrigin||this.options.crossOrigin==="")&&(O.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),O},_setIconStyles:function(g,w){var M=this.options,O=M[w+"Size"];typeof O=="number"&&(O=[O,O]);var j=U(O),W=U(w==="shadow"&&M.shadowAnchor||M.iconAnchor||j&&j.divideBy(2,!0));g.className="leaflet-marker-"+w+" "+(M.className||""),W&&(g.style.marginLeft=-W.x+"px",g.style.marginTop=-W.y+"px"),j&&(g.style.width=j.x+"px",g.style.height=j.y+"px")},_createImg:function(g,w){return w=w||document.createElement("img"),w.src=g,w},_getIconUrl:function(g){return Ze.retina&&this.options[g+"RetinaUrl"]||this.options[g+"Url"]}});function noe(g){return new Wf(g)}var hp=Wf.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(g){return typeof hp.imagePath!="string"&&(hp.imagePath=this._detectIconPath()),(this.options.imagePath||hp.imagePath)+Wf.prototype._getIconUrl.call(this,g)},_stripUrl:function(g){var w=function(M,O,j){var W=O.exec(M);return W&&W[j]};return g=w(g,/^url\((['"])?(.+)\1\)$/,2),g&&w(g,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var g=Mt("div","leaflet-default-icon-path",document.body),w=ap(g,"background-image")||ap(g,"backgroundImage");if(document.body.removeChild(g),w=this._stripUrl(w),w)return w;var M=document.querySelector('link[href$="leaflet.css"]');return M?M.href.substring(0,M.href.length-11-1):""}}),z3=oo.extend({initialize:function(g){this._marker=g},addHooks:function(){var g=this._marker._icon;this._draggable||(this._draggable=new al(g,g,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),ct(g,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&br(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(g){var w=this._marker,M=w._map,O=this._marker.options.autoPanSpeed,j=this._marker.options.autoPanPadding,W=Eu(w._icon),q=M.getPixelBounds(),ne=M.getPixelOrigin(),se=Z(q.min._subtract(ne).add(j),q.max._subtract(ne).subtract(j));if(!se.contains(W)){var ge=U((Math.max(se.max.x,W.x)-se.max.x)/(q.max.x-se.max.x)-(Math.min(se.min.x,W.x)-se.min.x)/(q.min.x-se.min.x),(Math.max(se.max.y,W.y)-se.max.y)/(q.max.y-se.max.y)-(Math.min(se.min.y,W.y)-se.min.y)/(q.min.y-se.min.y)).multiplyBy(O);M.panBy(ge,{animate:!1}),this._draggable._newPos._add(ge),this._draggable._startPos._add(ge),kr(w._icon,this._draggable._newPos),this._onDrag(g),this._panRequest=E(this._adjustPan.bind(this,g))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(g){this._marker.options.autoPan&&(D(this._panRequest),this._panRequest=E(this._adjustPan.bind(this,g)))},_onDrag:function(g){var w=this._marker,M=w._shadow,O=Eu(w._icon),j=w._map.layerPointToLatLng(O);M&&kr(M,O),w._latlng=j,g.latlng=j,g.oldLatLng=this._oldLatLng,w.fire("move",g).fire("drag",g)},_onDragEnd:function(g){D(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",g)}}),B0=Ta.extend({options:{icon:new hp,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(g,w){m(this,w),this._latlng=de(g)},onAdd:function(g){this._zoomAnimated=this._zoomAnimated&&g.options.markerZoomAnimation,this._zoomAnimated&&g.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(g){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&g.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(g){var w=this._latlng;return this._latlng=de(g),this.update(),this.fire("move",{oldLatLng:w,latlng:this._latlng})},setZIndexOffset:function(g){return this.options.zIndexOffset=g,this.update()},getIcon:function(){return this.options.icon},setIcon:function(g){return this.options.icon=g,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var g=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(g)}return this},_initIcon:function(){var g=this.options,w="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),M=g.icon.createIcon(this._icon),O=!1;M!==this._icon&&(this._icon&&this._removeIcon(),O=!0,g.title&&(M.title=g.title),M.tagName==="IMG"&&(M.alt=g.alt||"")),ct(M,w),g.keyboard&&(M.tabIndex="0",M.setAttribute("role","button")),this._icon=M,g.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&lt(M,"focus",this._panOnFocus,this);var j=g.icon.createShadow(this._shadow),W=!1;j!==this._shadow&&(this._removeShadow(),W=!0),j&&(ct(j,w),j.alt=""),this._shadow=j,g.opacity<1&&this._updateOpacity(),O&&this.getPane().appendChild(this._icon),this._initInteraction(),j&&W&&this.getPane(g.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Ht(this._icon,"focus",this._panOnFocus,this),nr(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&nr(this._shadow),this._shadow=null},_setPos:function(g){this._icon&&kr(this._icon,g),this._shadow&&kr(this._shadow,g),this._zIndex=g.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(g){this._icon&&(this._icon.style.zIndex=this._zIndex+g)},_animateZoom:function(g){var w=this._map._latLngToNewLayerPoint(this._latlng,g.zoom,g.center).round();this._setPos(w)},_initInteraction:function(){if(this.options.interactive&&(ct(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),z3)){var g=this.options.draggable;this.dragging&&(g=this.dragging.enabled(),this.dragging.disable()),this.dragging=new z3(this),g&&this.dragging.enable()}},setOpacity:function(g){return this.options.opacity=g,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var g=this.options.opacity;this._icon&&Bi(this._icon,g),this._shadow&&Bi(this._shadow,g)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var g=this._map;if(g){var w=this.options.icon.options,M=w.iconSize?U(w.iconSize):U(0,0),O=w.iconAnchor?U(w.iconAnchor):U(0,0);g.panInside(this._latlng,{paddingTopLeft:O,paddingBottomRight:M.subtract(O)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function ioe(g,w){return new B0(g,w)}var ol=Ta.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(g){this._renderer=g.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(g){return m(this,g),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&g&&Object.prototype.hasOwnProperty.call(g,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),z0=ol.extend({options:{fill:!0,radius:10},initialize:function(g,w){m(this,w),this._latlng=de(g),this._radius=this.options.radius},setLatLng:function(g){var w=this._latlng;return this._latlng=de(g),this.redraw(),this.fire("move",{oldLatLng:w,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(g){return this.options.radius=this._radius=g,this.redraw()},getRadius:function(){return this._radius},setStyle:function(g){var w=g&&g.radius||this._radius;return ol.prototype.setStyle.call(this,g),this.setRadius(w),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var g=this._radius,w=this._radiusY||g,M=this._clickTolerance(),O=[g+M,w+M];this._pxBounds=new Y(this._point.subtract(O),this._point.add(O))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(g){return g.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function aoe(g,w){return new z0(g,w)}var $C=z0.extend({initialize:function(g,w,M){if(typeof w=="number"&&(w=i({},M,{radius:w})),m(this,w),this._latlng=de(g),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(g){return this._mRadius=g,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var g=[this._radius,this._radiusY||this._radius];return new Q(this._map.layerPointToLatLng(this._point.subtract(g)),this._map.layerPointToLatLng(this._point.add(g)))},setStyle:ol.prototype.setStyle,_project:function(){var g=this._latlng.lng,w=this._latlng.lat,M=this._map,O=M.options.crs;if(O.distance===xe.distance){var j=Math.PI/180,W=this._mRadius/xe.R/j,q=M.project([w+W,g]),ne=M.project([w-W,g]),se=q.add(ne).divideBy(2),ge=M.unproject(se).lat,Be=Math.acos((Math.cos(W*j)-Math.sin(w*j)*Math.sin(ge*j))/(Math.cos(w*j)*Math.cos(ge*j)))/j;(isNaN(Be)||Be===0)&&(Be=W/Math.cos(Math.PI/180*w)),this._point=se.subtract(M.getPixelOrigin()),this._radius=isNaN(Be)?0:se.x-M.project([ge,g-Be]).x,this._radiusY=se.y-q.y}else{var tt=O.unproject(O.project(this._latlng).subtract([this._mRadius,0]));this._point=M.latLngToLayerPoint(this._latlng),this._radius=this._point.x-M.latLngToLayerPoint(tt).x}this._updateBounds()}});function ooe(g,w,M){return new $C(g,w,M)}var rs=ol.extend({options:{smoothFactor:1,noClip:!1},initialize:function(g,w){m(this,w),this._setLatLngs(g)},getLatLngs:function(){return this._latlngs},setLatLngs:function(g){return this._setLatLngs(g),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(g){for(var w=1/0,M=null,O=fp,j,W,q=0,ne=this._parts.length;q<ne;q++)for(var se=this._parts[q],ge=1,Be=se.length;ge<Be;ge++){j=se[ge-1],W=se[ge];var tt=O(g,j,W,!0);tt<w&&(w=tt,M=O(g,j,W))}return M&&(M.distance=Math.sqrt(w)),M},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return R3(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(g,w){return w=w||this._defaultShape(),g=de(g),w.push(g),this._bounds.extend(g),this.redraw()},_setLatLngs:function(g){this._bounds=new Q,this._latlngs=this._convertLatLngs(g)},_defaultShape:function(){return zi(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(g){for(var w=[],M=zi(g),O=0,j=g.length;O<j;O++)M?(w[O]=de(g[O]),this._bounds.extend(w[O])):w[O]=this._convertLatLngs(g[O]);return w},_project:function(){var g=new Y;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,g),this._bounds.isValid()&&g.isValid()&&(this._rawPxBounds=g,this._updateBounds())},_updateBounds:function(){var g=this._clickTolerance(),w=new B(g,g);this._rawPxBounds&&(this._pxBounds=new Y([this._rawPxBounds.min.subtract(w),this._rawPxBounds.max.add(w)]))},_projectLatlngs:function(g,w,M){var O=g[0]instanceof ue,j=g.length,W,q;if(O){for(q=[],W=0;W<j;W++)q[W]=this._map.latLngToLayerPoint(g[W]),M.extend(q[W]);w.push(q)}else for(W=0;W<j;W++)this._projectLatlngs(g[W],w,M)},_clipPoints:function(){var g=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(g))){if(this.options.noClip){this._parts=this._rings;return}var w=this._parts,M,O,j,W,q,ne,se;for(M=0,j=0,W=this._rings.length;M<W;M++)for(se=this._rings[M],O=0,q=se.length;O<q-1;O++)ne=N3(se[O],se[O+1],g,O,!0),ne&&(w[j]=w[j]||[],w[j].push(ne[0]),(ne[1]!==se[O+1]||O===q-2)&&(w[j].push(ne[1]),j++))}},_simplifyPoints:function(){for(var g=this._parts,w=this.options.smoothFactor,M=0,O=g.length;M<O;M++)g[M]=O3(g[M],w)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(g,w){var M,O,j,W,q,ne,se=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(g))return!1;for(M=0,W=this._parts.length;M<W;M++)for(ne=this._parts[M],O=0,q=ne.length,j=q-1;O<q;j=O++)if(!(!w&&O===0)&&E3(g,ne[j],ne[O])<=se)return!0;return!1}});function soe(g,w){return new rs(g,w)}rs._flat=j3;var Hf=rs.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return I3(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(g){var w=rs.prototype._convertLatLngs.call(this,g),M=w.length;return M>=2&&w[0]instanceof ue&&w[0].equals(w[M-1])&&w.pop(),w},_setLatLngs:function(g){rs.prototype._setLatLngs.call(this,g),zi(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return zi(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var g=this._renderer._bounds,w=this.options.weight,M=new B(w,w);if(g=new Y(g.min.subtract(M),g.max.add(M)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(g))){if(this.options.noClip){this._parts=this._rings;return}for(var O=0,j=this._rings.length,W;O<j;O++)W=L3(this._rings[O],g,!0),W.length&&this._parts.push(W)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(g){var w=!1,M,O,j,W,q,ne,se,ge;if(!this._pxBounds||!this._pxBounds.contains(g))return!1;for(W=0,se=this._parts.length;W<se;W++)for(M=this._parts[W],q=0,ge=M.length,ne=ge-1;q<ge;ne=q++)O=M[q],j=M[ne],O.y>g.y!=j.y>g.y&&g.x<(j.x-O.x)*(g.y-O.y)/(j.y-O.y)+O.x&&(w=!w);return w||rs.prototype._containsPoint.call(this,g,!0)}});function loe(g,w){return new Hf(g,w)}var ns=ts.extend({initialize:function(g,w){m(this,w),this._layers={},g&&this.addData(g)},addData:function(g){var w=b(g)?g:g.features,M,O,j;if(w){for(M=0,O=w.length;M<O;M++)j=w[M],(j.geometries||j.geometry||j.features||j.coordinates)&&this.addData(j);return this}var W=this.options;if(W.filter&&!W.filter(g))return this;var q=$0(g,W);return q?(q.feature=G0(g),q.defaultOptions=q.options,this.resetStyle(q),W.onEachFeature&&W.onEachFeature(g,q),this.addLayer(q)):this},resetStyle:function(g){return g===void 0?this.eachLayer(this.resetStyle,this):(g.options=i({},g.defaultOptions),this._setLayerStyle(g,this.options.style),this)},setStyle:function(g){return this.eachLayer(function(w){this._setLayerStyle(w,g)},this)},_setLayerStyle:function(g,w){g.setStyle&&(typeof w=="function"&&(w=w(g.feature)),g.setStyle(w))}});function $0(g,w){var M=g.type==="Feature"?g.geometry:g,O=M?M.coordinates:null,j=[],W=w&&w.pointToLayer,q=w&&w.coordsToLatLng||FC,ne,se,ge,Be;if(!O&&!M)return null;switch(M.type){case"Point":return ne=q(O),$3(W,g,ne,w);case"MultiPoint":for(ge=0,Be=O.length;ge<Be;ge++)ne=q(O[ge]),j.push($3(W,g,ne,w));return new ts(j);case"LineString":case"MultiLineString":return se=F0(O,M.type==="LineString"?0:1,q),new rs(se,w);case"Polygon":case"MultiPolygon":return se=F0(O,M.type==="Polygon"?1:2,q),new Hf(se,w);case"GeometryCollection":for(ge=0,Be=M.geometries.length;ge<Be;ge++){var tt=$0({geometry:M.geometries[ge],type:"Feature",properties:g.properties},w);tt&&j.push(tt)}return new ts(j);case"FeatureCollection":for(ge=0,Be=M.features.length;ge<Be;ge++){var pt=$0(M.features[ge],w);pt&&j.push(pt)}return new ts(j);default:throw new Error("Invalid GeoJSON object.")}}function $3(g,w,M,O){return g?g(w,M):new B0(M,O&&O.markersInheritOptions&&O)}function FC(g){return new ue(g[1],g[0],g[2])}function F0(g,w,M){for(var O=[],j=0,W=g.length,q;j<W;j++)q=w?F0(g[j],w-1,M):(M||FC)(g[j]),O.push(q);return O}function VC(g,w){return g=de(g),g.alt!==void 0?[h(g.lng,w),h(g.lat,w),h(g.alt,w)]:[h(g.lng,w),h(g.lat,w)]}function V0(g,w,M,O){for(var j=[],W=0,q=g.length;W<q;W++)j.push(w?V0(g[W],zi(g[W])?0:w-1,M,O):VC(g[W],O));return!w&&M&&j.length>0&&j.push(j[0].slice()),j}function Uf(g,w){return g.feature?i({},g.feature,{geometry:w}):G0(w)}function G0(g){return g.type==="Feature"||g.type==="FeatureCollection"?g:{type:"Feature",properties:{},geometry:g}}var GC={toGeoJSON:function(g){return Uf(this,{type:"Point",coordinates:VC(this.getLatLng(),g)})}};B0.include(GC),$C.include(GC),z0.include(GC),rs.include({toGeoJSON:function(g){var w=!zi(this._latlngs),M=V0(this._latlngs,w?1:0,!1,g);return Uf(this,{type:(w?"Multi":"")+"LineString",coordinates:M})}}),Hf.include({toGeoJSON:function(g){var w=!zi(this._latlngs),M=w&&!zi(this._latlngs[0]),O=V0(this._latlngs,M?2:w?1:0,!0,g);return w||(O=[O]),Uf(this,{type:(M?"Multi":"")+"Polygon",coordinates:O})}}),Gf.include({toMultiPoint:function(g){var w=[];return this.eachLayer(function(M){w.push(M.toGeoJSON(g).geometry.coordinates)}),Uf(this,{type:"MultiPoint",coordinates:w})},toGeoJSON:function(g){var w=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(w==="MultiPoint")return this.toMultiPoint(g);var M=w==="GeometryCollection",O=[];return this.eachLayer(function(j){if(j.toGeoJSON){var W=j.toGeoJSON(g);if(M)O.push(W.geometry);else{var q=G0(W);q.type==="FeatureCollection"?O.push.apply(O,q.features):O.push(q)}}}),M?Uf(this,{geometries:O,type:"GeometryCollection"}):{type:"FeatureCollection",features:O}}});function F3(g,w){return new ns(g,w)}var uoe=F3,W0=Ta.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(g,w,M){this._url=g,this._bounds=re(w),m(this,M)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ct(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){nr(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(g){return this.options.opacity=g,this._image&&this._updateOpacity(),this},setStyle:function(g){return g.opacity&&this.setOpacity(g.opacity),this},bringToFront:function(){return this._map&&Ff(this._image),this},bringToBack:function(){return this._map&&Vf(this._image),this},setUrl:function(g){return this._url=g,this._image&&(this._image.src=g),this},setBounds:function(g){return this._bounds=re(g),this._map&&this._reset(),this},getEvents:function(){var g={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(g.zoomanim=this._animateZoom),g},setZIndex:function(g){return this.options.zIndex=g,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var g=this._url.tagName==="IMG",w=this._image=g?this._url:Mt("img");if(ct(w,"leaflet-image-layer"),this._zoomAnimated&&ct(w,"leaflet-zoom-animated"),this.options.className&&ct(w,this.options.className),w.onselectstart=f,w.onmousemove=f,w.onload=o(this.fire,this,"load"),w.onerror=o(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(w.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),g){this._url=w.src;return}w.src=this._url,w.alt=this.options.alt},_animateZoom:function(g){var w=this._map.getZoomScale(g.zoom),M=this._map._latLngBoundsToNewLayerBounds(this._bounds,g.zoom,g.center).min;Ou(this._image,M,w)},_reset:function(){var g=this._image,w=new Y(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),M=w.getSize();kr(g,w.min),g.style.width=M.x+"px",g.style.height=M.y+"px"},_updateOpacity:function(){Bi(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var g=this.options.errorOverlayUrl;g&&this._url!==g&&(this._url=g,this._image.src=g)},getCenter:function(){return this._bounds.getCenter()}}),coe=function(g,w,M){return new W0(g,w,M)},V3=W0.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var g=this._url.tagName==="VIDEO",w=this._image=g?this._url:Mt("video");if(ct(w,"leaflet-image-layer"),this._zoomAnimated&&ct(w,"leaflet-zoom-animated"),this.options.className&&ct(w,this.options.className),w.onselectstart=f,w.onmousemove=f,w.onloadeddata=o(this.fire,this,"load"),g){for(var M=w.getElementsByTagName("source"),O=[],j=0;j<M.length;j++)O.push(M[j].src);this._url=M.length>0?O:[w.src];return}b(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(w.style,"objectFit")&&(w.style.objectFit="fill"),w.autoplay=!!this.options.autoplay,w.loop=!!this.options.loop,w.muted=!!this.options.muted,w.playsInline=!!this.options.playsInline;for(var W=0;W<this._url.length;W++){var q=Mt("source");q.src=this._url[W],w.appendChild(q)}}});function foe(g,w,M){return new V3(g,w,M)}var G3=W0.extend({_initImage:function(){var g=this._image=this._url;ct(g,"leaflet-image-layer"),this._zoomAnimated&&ct(g,"leaflet-zoom-animated"),this.options.className&&ct(g,this.options.className),g.onselectstart=f,g.onmousemove=f}});function hoe(g,w,M){return new G3(g,w,M)}var so=Ta.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(g,w){g&&(g instanceof ue||b(g))?(this._latlng=de(g),m(this,w)):(m(this,g),this._source=w),this.options.content&&(this._content=this.options.content)},openOn:function(g){return g=arguments.length?g:this._source._map,g.hasLayer(this)||g.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(g){return this._map?this.close():(arguments.length?this._source=g:g=this._source,this._prepareOpen(),this.openOn(g._map)),this},onAdd:function(g){this._zoomAnimated=g._zoomAnimated,this._container||this._initLayout(),g._fadeAnimated&&Bi(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),g._fadeAnimated&&Bi(this._container,1),this.bringToFront(),this.options.interactive&&(ct(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(g){g._fadeAnimated?(Bi(this._container,0),this._removeTimeout=setTimeout(o(nr,void 0,this._container),200)):nr(this._container),this.options.interactive&&(br(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(g){return this._latlng=de(g),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(g){return this._content=g,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var g={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(g.zoomanim=this._animateZoom),g},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&Ff(this._container),this},bringToBack:function(){return this._map&&Vf(this._container),this},_prepareOpen:function(g){var w=this._source;if(!w._map)return!1;if(w instanceof ts){w=null;var M=this._source._layers;for(var O in M)if(M[O]._map){w=M[O];break}if(!w)return!1;this._source=w}if(!g)if(w.getCenter)g=w.getCenter();else if(w.getLatLng)g=w.getLatLng();else if(w.getBounds)g=w.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(g),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var g=this._contentNode,w=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof w=="string")g.innerHTML=w;else{for(;g.hasChildNodes();)g.removeChild(g.firstChild);g.appendChild(w)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var g=this._map.latLngToLayerPoint(this._latlng),w=U(this.options.offset),M=this._getAnchor();this._zoomAnimated?kr(this._container,g.add(M)):w=w.add(g).add(M);var O=this._containerBottom=-w.y,j=this._containerLeft=-Math.round(this._containerWidth/2)+w.x;this._container.style.bottom=O+"px",this._container.style.left=j+"px"}},_getAnchor:function(){return[0,0]}});wt.include({_initOverlay:function(g,w,M,O){var j=w;return j instanceof g||(j=new g(O).setContent(w)),M&&j.setLatLng(M),j}}),Ta.include({_initOverlay:function(g,w,M,O){var j=M;return j instanceof g?(m(j,O),j._source=this):(j=w&&!O?w:new g(O,this),j.setContent(M)),j}});var H0=so.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(g){return g=arguments.length?g:this._source._map,!g.hasLayer(this)&&g._popup&&g._popup.options.autoClose&&g.removeLayer(g._popup),g._popup=this,so.prototype.openOn.call(this,g)},onAdd:function(g){so.prototype.onAdd.call(this,g),g.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof ol||this._source.on("preclick",Du))},onRemove:function(g){so.prototype.onRemove.call(this,g),g.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof ol||this._source.off("preclick",Du))},getEvents:function(){var g=so.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(g.preclick=this.close),this.options.keepInView&&(g.moveend=this._adjustPan),g},_initLayout:function(){var g="leaflet-popup",w=this._container=Mt("div",g+" "+(this.options.className||"")+" leaflet-zoom-animated"),M=this._wrapper=Mt("div",g+"-content-wrapper",w);if(this._contentNode=Mt("div",g+"-content",M),up(w),OC(this._contentNode),lt(w,"contextmenu",Du),this._tipContainer=Mt("div",g+"-tip-container",w),this._tip=Mt("div",g+"-tip",this._tipContainer),this.options.closeButton){var O=this._closeButton=Mt("a",g+"-close-button",w);O.setAttribute("role","button"),O.setAttribute("aria-label","Close popup"),O.href="#close",O.innerHTML='<span aria-hidden="true">&#215;</span>',lt(O,"click",function(j){fn(j),this.close()},this)}},_updateLayout:function(){var g=this._contentNode,w=g.style;w.width="",w.whiteSpace="nowrap";var M=g.offsetWidth;M=Math.min(M,this.options.maxWidth),M=Math.max(M,this.options.minWidth),w.width=M+1+"px",w.whiteSpace="",w.height="";var O=g.offsetHeight,j=this.options.maxHeight,W="leaflet-popup-scrolled";j&&O>j?(w.height=j+"px",ct(g,W)):br(g,W),this._containerWidth=this._container.offsetWidth},_animateZoom:function(g){var w=this._map._latLngToNewLayerPoint(this._latlng,g.zoom,g.center),M=this._getAnchor();kr(this._container,w.add(M))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var g=this._map,w=parseInt(ap(this._container,"marginBottom"),10)||0,M=this._container.offsetHeight+w,O=this._containerWidth,j=new B(this._containerLeft,-M-this._containerBottom);j._add(Eu(this._container));var W=g.layerPointToContainerPoint(j),q=U(this.options.autoPanPadding),ne=U(this.options.autoPanPaddingTopLeft||q),se=U(this.options.autoPanPaddingBottomRight||q),ge=g.getSize(),Be=0,tt=0;W.x+O+se.x>ge.x&&(Be=W.x+O-ge.x+se.x),W.x-Be-ne.x<0&&(Be=W.x-ne.x),W.y+M+se.y>ge.y&&(tt=W.y+M-ge.y+se.y),W.y-tt-ne.y<0&&(tt=W.y-ne.y),(Be||tt)&&(this.options.keepInView&&(this._autopanning=!0),g.fire("autopanstart").panBy([Be,tt]))}},_getAnchor:function(){return U(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),doe=function(g,w){return new H0(g,w)};wt.mergeOptions({closePopupOnClick:!0}),wt.include({openPopup:function(g,w,M){return this._initOverlay(H0,g,w,M).openOn(this),this},closePopup:function(g){return g=arguments.length?g:this._popup,g&&g.close(),this}}),Ta.include({bindPopup:function(g,w){return this._popup=this._initOverlay(H0,this._popup,g,w),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(g){return this._popup&&(this instanceof ts||(this._popup._source=this),this._popup._prepareOpen(g||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(g){return this._popup&&this._popup.setContent(g),this},getPopup:function(){return this._popup},_openPopup:function(g){if(!(!this._popup||!this._map)){Nu(g);var w=g.layer||g.target;if(this._popup._source===w&&!(w instanceof ol)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(g.latlng);return}this._popup._source=w,this.openPopup(g.latlng)}},_movePopup:function(g){this._popup.setLatLng(g.latlng)},_onKeyPress:function(g){g.originalEvent.keyCode===13&&this._openPopup(g)}});var U0=so.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(g){so.prototype.onAdd.call(this,g),this.setOpacity(this.options.opacity),g.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(g){so.prototype.onRemove.call(this,g),g.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var g=so.prototype.getEvents.call(this);return this.options.permanent||(g.preclick=this.close),g},_initLayout:function(){var g="leaflet-tooltip",w=g+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Mt("div",w),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(g){var w,M,O=this._map,j=this._container,W=O.latLngToContainerPoint(O.getCenter()),q=O.layerPointToContainerPoint(g),ne=this.options.direction,se=j.offsetWidth,ge=j.offsetHeight,Be=U(this.options.offset),tt=this._getAnchor();ne==="top"?(w=se/2,M=ge):ne==="bottom"?(w=se/2,M=0):ne==="center"?(w=se/2,M=ge/2):ne==="right"?(w=0,M=ge/2):ne==="left"?(w=se,M=ge/2):q.x<W.x?(ne="right",w=0,M=ge/2):(ne="left",w=se+(Be.x+tt.x)*2,M=ge/2),g=g.subtract(U(w,M,!0)).add(Be).add(tt),br(j,"leaflet-tooltip-right"),br(j,"leaflet-tooltip-left"),br(j,"leaflet-tooltip-top"),br(j,"leaflet-tooltip-bottom"),ct(j,"leaflet-tooltip-"+ne),kr(j,g)},_updatePosition:function(){var g=this._map.latLngToLayerPoint(this._latlng);this._setPosition(g)},setOpacity:function(g){this.options.opacity=g,this._container&&Bi(this._container,g)},_animateZoom:function(g){var w=this._map._latLngToNewLayerPoint(this._latlng,g.zoom,g.center);this._setPosition(w)},_getAnchor:function(){return U(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),voe=function(g,w){return new U0(g,w)};wt.include({openTooltip:function(g,w,M){return this._initOverlay(U0,g,w,M).openOn(this),this},closeTooltip:function(g){return g.close(),this}}),Ta.include({bindTooltip:function(g,w){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(U0,this._tooltip,g,w),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(g){if(!(!g&&this._tooltipHandlersAdded)){var w=g?"off":"on",M={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?M.add=this._openTooltip:(M.mouseover=this._openTooltip,M.mouseout=this.closeTooltip,M.click=this._openTooltip,this._map?this._addFocusListeners():M.add=this._addFocusListeners),this._tooltip.options.sticky&&(M.mousemove=this._moveTooltip),this[w](M),this._tooltipHandlersAdded=!g}},openTooltip:function(g){return this._tooltip&&(this instanceof ts||(this._tooltip._source=this),this._tooltip._prepareOpen(g)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(g){return this._tooltip&&this._tooltip.setContent(g),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(g){var w=typeof g.getElement=="function"&&g.getElement();w&&(lt(w,"focus",function(){this._tooltip._source=g,this.openTooltip()},this),lt(w,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(g){var w=typeof g.getElement=="function"&&g.getElement();w&&w.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(g){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var w=this;this._map.once("moveend",function(){w._openOnceFlag=!1,w._openTooltip(g)});return}this._tooltip._source=g.layer||g.target,this.openTooltip(this._tooltip.options.sticky?g.latlng:void 0)}},_moveTooltip:function(g){var w=g.latlng,M,O;this._tooltip.options.sticky&&g.originalEvent&&(M=this._map.mouseEventToContainerPoint(g.originalEvent),O=this._map.containerPointToLayerPoint(M),w=this._map.layerPointToLatLng(O)),this._tooltip.setLatLng(w)}});var W3=Wf.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(g){var w=g&&g.tagName==="DIV"?g:document.createElement("div"),M=this.options;if(M.html instanceof Element?(O0(w),w.appendChild(M.html)):w.innerHTML=M.html!==!1?M.html:"",M.bgPos){var O=U(M.bgPos);w.style.backgroundPosition=-O.x+"px "+-O.y+"px"}return this._setIconStyles(w,"icon"),w},createShadow:function(){return null}});function poe(g){return new W3(g)}Wf.Default=hp;var dp=Ta.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Ze.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(g){m(this,g)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(g){g._addZoomLimit(this)},onRemove:function(g){this._removeAllTiles(),nr(this._container),g._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Ff(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(Vf(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(g){return this.options.opacity=g,this._updateOpacity(),this},setZIndex:function(g){return this.options.zIndex=g,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var g=this._clampZoom(this._map.getZoom());g!==this._tileZoom&&(this._tileZoom=g,this._updateLevels()),this._update()}return this},getEvents:function(){var g={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=u(this._onMoveEnd,this.options.updateInterval,this)),g.move=this._onMove),this._zoomAnimated&&(g.zoomanim=this._animateZoom),g},createTile:function(){return document.createElement("div")},getTileSize:function(){var g=this.options.tileSize;return g instanceof B?g:new B(g,g)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(g){for(var w=this.getPane().children,M=-g(-1/0,1/0),O=0,j=w.length,W;O<j;O++)W=w[O].style.zIndex,w[O]!==this._container&&W&&(M=g(M,+W));isFinite(M)&&(this.options.zIndex=M+g(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Ze.ielt9){Bi(this._container,this.options.opacity);var g=+new Date,w=!1,M=!1;for(var O in this._tiles){var j=this._tiles[O];if(!(!j.current||!j.loaded)){var W=Math.min(1,(g-j.loaded)/200);Bi(j.el,W),W<1?w=!0:(j.active?M=!0:this._onOpaqueTile(j),j.active=!0)}}M&&!this._noPrune&&this._pruneTiles(),w&&(D(this._fadeFrame),this._fadeFrame=E(this._updateOpacity,this))}},_onOpaqueTile:f,_initContainer:function(){this._container||(this._container=Mt("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var g=this._tileZoom,w=this.options.maxZoom;if(g!==void 0){for(var M in this._levels)M=Number(M),this._levels[M].el.children.length||M===g?(this._levels[M].el.style.zIndex=w-Math.abs(g-M),this._onUpdateLevel(M)):(nr(this._levels[M].el),this._removeTilesAtZoom(M),this._onRemoveLevel(M),delete this._levels[M]);var O=this._levels[g],j=this._map;return O||(O=this._levels[g]={},O.el=Mt("div","leaflet-tile-container leaflet-zoom-animated",this._container),O.el.style.zIndex=w,O.origin=j.project(j.unproject(j.getPixelOrigin()),g).round(),O.zoom=g,this._setZoomTransform(O,j.getCenter(),j.getZoom()),f(O.el.offsetWidth),this._onCreateLevel(O)),this._level=O,O}},_onUpdateLevel:f,_onRemoveLevel:f,_onCreateLevel:f,_pruneTiles:function(){if(this._map){var g,w,M=this._map.getZoom();if(M>this.options.maxZoom||M<this.options.minZoom){this._removeAllTiles();return}for(g in this._tiles)w=this._tiles[g],w.retain=w.current;for(g in this._tiles)if(w=this._tiles[g],w.current&&!w.active){var O=w.coords;this._retainParent(O.x,O.y,O.z,O.z-5)||this._retainChildren(O.x,O.y,O.z,O.z+2)}for(g in this._tiles)this._tiles[g].retain||this._removeTile(g)}},_removeTilesAtZoom:function(g){for(var w in this._tiles)this._tiles[w].coords.z===g&&this._removeTile(w)},_removeAllTiles:function(){for(var g in this._tiles)this._removeTile(g)},_invalidateAll:function(){for(var g in this._levels)nr(this._levels[g].el),this._onRemoveLevel(Number(g)),delete this._levels[g];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(g,w,M,O){var j=Math.floor(g/2),W=Math.floor(w/2),q=M-1,ne=new B(+j,+W);ne.z=+q;var se=this._tileCoordsToKey(ne),ge=this._tiles[se];return ge&&ge.active?(ge.retain=!0,!0):(ge&&ge.loaded&&(ge.retain=!0),q>O?this._retainParent(j,W,q,O):!1)},_retainChildren:function(g,w,M,O){for(var j=2*g;j<2*g+2;j++)for(var W=2*w;W<2*w+2;W++){var q=new B(j,W);q.z=M+1;var ne=this._tileCoordsToKey(q),se=this._tiles[ne];if(se&&se.active){se.retain=!0;continue}else se&&se.loaded&&(se.retain=!0);M+1<O&&this._retainChildren(j,W,M+1,O)}},_resetView:function(g){var w=g&&(g.pinch||g.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),w,w)},_animateZoom:function(g){this._setView(g.center,g.zoom,!0,g.noUpdate)},_clampZoom:function(g){var w=this.options;return w.minNativeZoom!==void 0&&g<w.minNativeZoom?w.minNativeZoom:w.maxNativeZoom!==void 0&&w.maxNativeZoom<g?w.maxNativeZoom:g},_setView:function(g,w,M,O){var j=Math.round(w);this.options.maxZoom!==void 0&&j>this.options.maxZoom||this.options.minZoom!==void 0&&j<this.options.minZoom?j=void 0:j=this._clampZoom(j);var W=this.options.updateWhenZooming&&j!==this._tileZoom;(!O||W)&&(this._tileZoom=j,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),j!==void 0&&this._update(g),M||this._pruneTiles(),this._noPrune=!!M),this._setZoomTransforms(g,w)},_setZoomTransforms:function(g,w){for(var M in this._levels)this._setZoomTransform(this._levels[M],g,w)},_setZoomTransform:function(g,w,M){var O=this._map.getZoomScale(M,g.zoom),j=g.origin.multiplyBy(O).subtract(this._map._getNewPixelOrigin(w,M)).round();Ze.any3d?Ou(g.el,j,O):kr(g.el,j)},_resetGrid:function(){var g=this._map,w=g.options.crs,M=this._tileSize=this.getTileSize(),O=this._tileZoom,j=this._map.getPixelWorldBounds(this._tileZoom);j&&(this._globalTileRange=this._pxBoundsToTileRange(j)),this._wrapX=w.wrapLng&&!this.options.noWrap&&[Math.floor(g.project([0,w.wrapLng[0]],O).x/M.x),Math.ceil(g.project([0,w.wrapLng[1]],O).x/M.y)],this._wrapY=w.wrapLat&&!this.options.noWrap&&[Math.floor(g.project([w.wrapLat[0],0],O).y/M.x),Math.ceil(g.project([w.wrapLat[1],0],O).y/M.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(g){var w=this._map,M=w._animatingZoom?Math.max(w._animateToZoom,w.getZoom()):w.getZoom(),O=w.getZoomScale(M,this._tileZoom),j=w.project(g,this._tileZoom).floor(),W=w.getSize().divideBy(O*2);return new Y(j.subtract(W),j.add(W))},_update:function(g){var w=this._map;if(w){var M=this._clampZoom(w.getZoom());if(g===void 0&&(g=w.getCenter()),this._tileZoom!==void 0){var O=this._getTiledPixelBounds(g),j=this._pxBoundsToTileRange(O),W=j.getCenter(),q=[],ne=this.options.keepBuffer,se=new Y(j.getBottomLeft().subtract([ne,-ne]),j.getTopRight().add([ne,-ne]));if(!(isFinite(j.min.x)&&isFinite(j.min.y)&&isFinite(j.max.x)&&isFinite(j.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var ge in this._tiles){var Be=this._tiles[ge].coords;(Be.z!==this._tileZoom||!se.contains(new B(Be.x,Be.y)))&&(this._tiles[ge].current=!1)}if(Math.abs(M-this._tileZoom)>1){this._setView(g,M);return}for(var tt=j.min.y;tt<=j.max.y;tt++)for(var pt=j.min.x;pt<=j.max.x;pt++){var zn=new B(pt,tt);if(zn.z=this._tileZoom,!!this._isValidTile(zn)){var Qr=this._tiles[this._tileCoordsToKey(zn)];Qr?Qr.current=!0:q.push(zn)}}if(q.sort(function(Qn,Yf){return Qn.distanceTo(W)-Yf.distanceTo(W)}),q.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var $i=document.createDocumentFragment();for(pt=0;pt<q.length;pt++)this._addTile(q[pt],$i);this._level.el.appendChild($i)}}}},_isValidTile:function(g){var w=this._map.options.crs;if(!w.infinite){var M=this._globalTileRange;if(!w.wrapLng&&(g.x<M.min.x||g.x>M.max.x)||!w.wrapLat&&(g.y<M.min.y||g.y>M.max.y))return!1}if(!this.options.bounds)return!0;var O=this._tileCoordsToBounds(g);return re(this.options.bounds).overlaps(O)},_keyToBounds:function(g){return this._tileCoordsToBounds(this._keyToTileCoords(g))},_tileCoordsToNwSe:function(g){var w=this._map,M=this.getTileSize(),O=g.scaleBy(M),j=O.add(M),W=w.unproject(O,g.z),q=w.unproject(j,g.z);return[W,q]},_tileCoordsToBounds:function(g){var w=this._tileCoordsToNwSe(g),M=new Q(w[0],w[1]);return this.options.noWrap||(M=this._map.wrapLatLngBounds(M)),M},_tileCoordsToKey:function(g){return g.x+":"+g.y+":"+g.z},_keyToTileCoords:function(g){var w=g.split(":"),M=new B(+w[0],+w[1]);return M.z=+w[2],M},_removeTile:function(g){var w=this._tiles[g];w&&(nr(w.el),delete this._tiles[g],this.fire("tileunload",{tile:w.el,coords:this._keyToTileCoords(g)}))},_initTile:function(g){ct(g,"leaflet-tile");var w=this.getTileSize();g.style.width=w.x+"px",g.style.height=w.y+"px",g.onselectstart=f,g.onmousemove=f,Ze.ielt9&&this.options.opacity<1&&Bi(g,this.options.opacity)},_addTile:function(g,w){var M=this._getTilePos(g),O=this._tileCoordsToKey(g),j=this.createTile(this._wrapCoords(g),o(this._tileReady,this,g));this._initTile(j),this.createTile.length<2&&E(o(this._tileReady,this,g,null,j)),kr(j,M),this._tiles[O]={el:j,coords:g,current:!0},w.appendChild(j),this.fire("tileloadstart",{tile:j,coords:g})},_tileReady:function(g,w,M){w&&this.fire("tileerror",{error:w,tile:M,coords:g});var O=this._tileCoordsToKey(g);M=this._tiles[O],M&&(M.loaded=+new Date,this._map._fadeAnimated?(Bi(M.el,0),D(this._fadeFrame),this._fadeFrame=E(this._updateOpacity,this)):(M.active=!0,this._pruneTiles()),w||(ct(M.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:M.el,coords:g})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Ze.ielt9||!this._map._fadeAnimated?E(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(g){return g.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(g){var w=new B(this._wrapX?c(g.x,this._wrapX):g.x,this._wrapY?c(g.y,this._wrapY):g.y);return w.z=g.z,w},_pxBoundsToTileRange:function(g){var w=this.getTileSize();return new Y(g.min.unscaleBy(w).floor(),g.max.unscaleBy(w).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var g in this._tiles)if(!this._tiles[g].loaded)return!1;return!0}});function goe(g){return new dp(g)}var Zf=dp.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(g,w){this._url=g,w=m(this,w),w.detectRetina&&Ze.retina&&w.maxZoom>0?(w.tileSize=Math.floor(w.tileSize/2),w.zoomReverse?(w.zoomOffset--,w.minZoom=Math.min(w.maxZoom,w.minZoom+1)):(w.zoomOffset++,w.maxZoom=Math.max(w.minZoom,w.maxZoom-1)),w.minZoom=Math.max(0,w.minZoom)):w.zoomReverse?w.minZoom=Math.min(w.maxZoom,w.minZoom):w.maxZoom=Math.max(w.minZoom,w.maxZoom),typeof w.subdomains=="string"&&(w.subdomains=w.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(g,w){return this._url===g&&w===void 0&&(w=!0),this._url=g,w||this.redraw(),this},createTile:function(g,w){var M=document.createElement("img");return lt(M,"load",o(this._tileOnLoad,this,w,M)),lt(M,"error",o(this._tileOnError,this,w,M)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(M.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(M.referrerPolicy=this.options.referrerPolicy),M.alt="",M.src=this.getTileUrl(g),M},getTileUrl:function(g){var w={r:Ze.retina?"@2x":"",s:this._getSubdomain(g),x:g.x,y:g.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var M=this._globalTileRange.max.y-g.y;this.options.tms&&(w.y=M),w["-y"]=M}return _(this._url,i(w,this.options))},_tileOnLoad:function(g,w){Ze.ielt9?setTimeout(o(g,this,null,w),0):g(null,w)},_tileOnError:function(g,w,M){var O=this.options.errorTileUrl;O&&w.getAttribute("src")!==O&&(w.src=O),g(M,w)},_onTileRemove:function(g){g.tile.onload=null},_getZoomForUrl:function(){var g=this._tileZoom,w=this.options.maxZoom,M=this.options.zoomReverse,O=this.options.zoomOffset;return M&&(g=w-g),g+O},_getSubdomain:function(g){var w=Math.abs(g.x+g.y)%this.options.subdomains.length;return this.options.subdomains[w]},_abortLoading:function(){var g,w;for(g in this._tiles)if(this._tiles[g].coords.z!==this._tileZoom&&(w=this._tiles[g].el,w.onload=f,w.onerror=f,!w.complete)){w.src=T;var M=this._tiles[g].coords;nr(w),delete this._tiles[g],this.fire("tileabort",{tile:w,coords:M})}},_removeTile:function(g){var w=this._tiles[g];if(w)return w.el.setAttribute("src",T),dp.prototype._removeTile.call(this,g)},_tileReady:function(g,w,M){if(!(!this._map||M&&M.getAttribute("src")===T))return dp.prototype._tileReady.call(this,g,w,M)}});function H3(g,w){return new Zf(g,w)}var U3=Zf.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(g,w){this._url=g;var M=i({},this.defaultWmsParams);for(var O in w)O in this.options||(M[O]=w[O]);w=m(this,w);var j=w.detectRetina&&Ze.retina?2:1,W=this.getTileSize();M.width=W.x*j,M.height=W.y*j,this.wmsParams=M},onAdd:function(g){this._crs=this.options.crs||g.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var w=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[w]=this._crs.code,Zf.prototype.onAdd.call(this,g)},getTileUrl:function(g){var w=this._tileCoordsToNwSe(g),M=this._crs,O=Z(M.project(w[0]),M.project(w[1])),j=O.min,W=O.max,q=(this._wmsVersion>=1.3&&this._crs===B3?[j.y,j.x,W.y,W.x]:[j.x,j.y,W.x,W.y]).join(","),ne=Zf.prototype.getTileUrl.call(this,g);return ne+y(this.wmsParams,ne,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+q},setParams:function(g,w){return i(this.wmsParams,g),w||this.redraw(),this}});function moe(g,w){return new U3(g,w)}Zf.WMS=U3,H3.wms=moe;var is=Ta.extend({options:{padding:.1},initialize:function(g){m(this,g),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),ct(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var g={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(g.zoomanim=this._onAnimZoom),g},_onAnimZoom:function(g){this._updateTransform(g.center,g.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(g,w){var M=this._map.getZoomScale(w,this._zoom),O=this._map.getSize().multiplyBy(.5+this.options.padding),j=this._map.project(this._center,w),W=O.multiplyBy(-M).add(j).subtract(this._map._getNewPixelOrigin(g,w));Ze.any3d?Ou(this._container,W,M):kr(this._container,W)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var g in this._layers)this._layers[g]._reset()},_onZoomEnd:function(){for(var g in this._layers)this._layers[g]._project()},_updatePaths:function(){for(var g in this._layers)this._layers[g]._update()},_update:function(){var g=this.options.padding,w=this._map.getSize(),M=this._map.containerPointToLayerPoint(w.multiplyBy(-g)).round();this._bounds=new Y(M,M.add(w.multiplyBy(1+g*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Z3=is.extend({options:{tolerance:0},getEvents:function(){var g=is.prototype.getEvents.call(this);return g.viewprereset=this._onViewPreReset,g},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){is.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var g=this._container=document.createElement("canvas");lt(g,"mousemove",this._onMouseMove,this),lt(g,"click dblclick mousedown mouseup contextmenu",this._onClick,this),lt(g,"mouseout",this._handleMouseOut,this),g._leaflet_disable_events=!0,this._ctx=g.getContext("2d")},_destroyContainer:function(){D(this._redrawRequest),delete this._ctx,nr(this._container),Ht(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var g;this._redrawBounds=null;for(var w in this._layers)g=this._layers[w],g._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){is.prototype._update.call(this);var g=this._bounds,w=this._container,M=g.getSize(),O=Ze.retina?2:1;kr(w,g.min),w.width=O*M.x,w.height=O*M.y,w.style.width=M.x+"px",w.style.height=M.y+"px",Ze.retina&&this._ctx.scale(2,2),this._ctx.translate(-g.min.x,-g.min.y),this.fire("update")}},_reset:function(){is.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(g){this._updateDashArray(g),this._layers[l(g)]=g;var w=g._order={layer:g,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=w),this._drawLast=w,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(g){this._requestRedraw(g)},_removePath:function(g){var w=g._order,M=w.next,O=w.prev;M?M.prev=O:this._drawLast=O,O?O.next=M:this._drawFirst=M,delete g._order,delete this._layers[l(g)],this._requestRedraw(g)},_updatePath:function(g){this._extendRedrawBounds(g),g._project(),g._update(),this._requestRedraw(g)},_updateStyle:function(g){this._updateDashArray(g),this._requestRedraw(g)},_updateDashArray:function(g){if(typeof g.options.dashArray=="string"){var w=g.options.dashArray.split(/[, ]+/),M=[],O,j;for(j=0;j<w.length;j++){if(O=Number(w[j]),isNaN(O))return;M.push(O)}g.options._dashArray=M}else g.options._dashArray=g.options.dashArray},_requestRedraw:function(g){this._map&&(this._extendRedrawBounds(g),this._redrawRequest=this._redrawRequest||E(this._redraw,this))},_extendRedrawBounds:function(g){if(g._pxBounds){var w=(g.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new Y,this._redrawBounds.extend(g._pxBounds.min.subtract([w,w])),this._redrawBounds.extend(g._pxBounds.max.add([w,w]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var g=this._redrawBounds;if(g){var w=g.getSize();this._ctx.clearRect(g.min.x,g.min.y,w.x,w.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var g,w=this._redrawBounds;if(this._ctx.save(),w){var M=w.getSize();this._ctx.beginPath(),this._ctx.rect(w.min.x,w.min.y,M.x,M.y),this._ctx.clip()}this._drawing=!0;for(var O=this._drawFirst;O;O=O.next)g=O.layer,(!w||g._pxBounds&&g._pxBounds.intersects(w))&&g._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(g,w){if(this._drawing){var M,O,j,W,q=g._parts,ne=q.length,se=this._ctx;if(ne){for(se.beginPath(),M=0;M<ne;M++){for(O=0,j=q[M].length;O<j;O++)W=q[M][O],se[O?"lineTo":"moveTo"](W.x,W.y);w&&se.closePath()}this._fillStroke(se,g)}}},_updateCircle:function(g){if(!(!this._drawing||g._empty())){var w=g._point,M=this._ctx,O=Math.max(Math.round(g._radius),1),j=(Math.max(Math.round(g._radiusY),1)||O)/O;j!==1&&(M.save(),M.scale(1,j)),M.beginPath(),M.arc(w.x,w.y/j,O,0,Math.PI*2,!1),j!==1&&M.restore(),this._fillStroke(M,g)}},_fillStroke:function(g,w){var M=w.options;M.fill&&(g.globalAlpha=M.fillOpacity,g.fillStyle=M.fillColor||M.color,g.fill(M.fillRule||"evenodd")),M.stroke&&M.weight!==0&&(g.setLineDash&&g.setLineDash(w.options&&w.options._dashArray||[]),g.globalAlpha=M.opacity,g.lineWidth=M.weight,g.strokeStyle=M.color,g.lineCap=M.lineCap,g.lineJoin=M.lineJoin,g.stroke())},_onClick:function(g){for(var w=this._map.mouseEventToLayerPoint(g),M,O,j=this._drawFirst;j;j=j.next)M=j.layer,M.options.interactive&&M._containsPoint(w)&&(!(g.type==="click"||g.type==="preclick")||!this._map._draggableMoved(M))&&(O=M);this._fireEvent(O?[O]:!1,g)},_onMouseMove:function(g){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var w=this._map.mouseEventToLayerPoint(g);this._handleMouseHover(g,w)}},_handleMouseOut:function(g){var w=this._hoveredLayer;w&&(br(this._container,"leaflet-interactive"),this._fireEvent([w],g,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(g,w){if(!this._mouseHoverThrottled){for(var M,O,j=this._drawFirst;j;j=j.next)M=j.layer,M.options.interactive&&M._containsPoint(w)&&(O=M);O!==this._hoveredLayer&&(this._handleMouseOut(g),O&&(ct(this._container,"leaflet-interactive"),this._fireEvent([O],g,"mouseover"),this._hoveredLayer=O)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,g),this._mouseHoverThrottled=!0,setTimeout(o(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(g,w,M){this._map._fireDOMEvent(w,M||w.type,g)},_bringToFront:function(g){var w=g._order;if(w){var M=w.next,O=w.prev;if(M)M.prev=O;else return;O?O.next=M:M&&(this._drawFirst=M),w.prev=this._drawLast,this._drawLast.next=w,w.next=null,this._drawLast=w,this._requestRedraw(g)}},_bringToBack:function(g){var w=g._order;if(w){var M=w.next,O=w.prev;if(O)O.next=M;else return;M?M.prev=O:O&&(this._drawLast=O),w.prev=null,w.next=this._drawFirst,this._drawFirst.prev=w,this._drawFirst=w,this._requestRedraw(g)}}});function Y3(g){return Ze.canvas?new Z3(g):null}var vp=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(g){return document.createElement("<lvml:"+g+' class="lvml">')}}catch{}return function(g){return document.createElement("<"+g+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),yoe={_initContainer:function(){this._container=Mt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(is.prototype._update.call(this),this.fire("update"))},_initPath:function(g){var w=g._container=vp("shape");ct(w,"leaflet-vml-shape "+(this.options.className||"")),w.coordsize="1 1",g._path=vp("path"),w.appendChild(g._path),this._updateStyle(g),this._layers[l(g)]=g},_addPath:function(g){var w=g._container;this._container.appendChild(w),g.options.interactive&&g.addInteractiveTarget(w)},_removePath:function(g){var w=g._container;nr(w),g.removeInteractiveTarget(w),delete this._layers[l(g)]},_updateStyle:function(g){var w=g._stroke,M=g._fill,O=g.options,j=g._container;j.stroked=!!O.stroke,j.filled=!!O.fill,O.stroke?(w||(w=g._stroke=vp("stroke")),j.appendChild(w),w.weight=O.weight+"px",w.color=O.color,w.opacity=O.opacity,O.dashArray?w.dashStyle=b(O.dashArray)?O.dashArray.join(" "):O.dashArray.replace(/( *, *)/g," "):w.dashStyle="",w.endcap=O.lineCap.replace("butt","flat"),w.joinstyle=O.lineJoin):w&&(j.removeChild(w),g._stroke=null),O.fill?(M||(M=g._fill=vp("fill")),j.appendChild(M),M.color=O.fillColor||O.color,M.opacity=O.fillOpacity):M&&(j.removeChild(M),g._fill=null)},_updateCircle:function(g){var w=g._point.round(),M=Math.round(g._radius),O=Math.round(g._radiusY||M);this._setPath(g,g._empty()?"M0 0":"AL "+w.x+","+w.y+" "+M+","+O+" 0,"+65535*360)},_setPath:function(g,w){g._path.v=w},_bringToFront:function(g){Ff(g._container)},_bringToBack:function(g){Vf(g._container)}},Z0=Ze.vml?vp:Te,pp=is.extend({_initContainer:function(){this._container=Z0("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Z0("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){nr(this._container),Ht(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){is.prototype._update.call(this);var g=this._bounds,w=g.getSize(),M=this._container;(!this._svgSize||!this._svgSize.equals(w))&&(this._svgSize=w,M.setAttribute("width",w.x),M.setAttribute("height",w.y)),kr(M,g.min),M.setAttribute("viewBox",[g.min.x,g.min.y,w.x,w.y].join(" ")),this.fire("update")}},_initPath:function(g){var w=g._path=Z0("path");g.options.className&&ct(w,g.options.className),g.options.interactive&&ct(w,"leaflet-interactive"),this._updateStyle(g),this._layers[l(g)]=g},_addPath:function(g){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(g._path),g.addInteractiveTarget(g._path)},_removePath:function(g){nr(g._path),g.removeInteractiveTarget(g._path),delete this._layers[l(g)]},_updatePath:function(g){g._project(),g._update()},_updateStyle:function(g){var w=g._path,M=g.options;w&&(M.stroke?(w.setAttribute("stroke",M.color),w.setAttribute("stroke-opacity",M.opacity),w.setAttribute("stroke-width",M.weight),w.setAttribute("stroke-linecap",M.lineCap),w.setAttribute("stroke-linejoin",M.lineJoin),M.dashArray?w.setAttribute("stroke-dasharray",M.dashArray):w.removeAttribute("stroke-dasharray"),M.dashOffset?w.setAttribute("stroke-dashoffset",M.dashOffset):w.removeAttribute("stroke-dashoffset")):w.setAttribute("stroke","none"),M.fill?(w.setAttribute("fill",M.fillColor||M.color),w.setAttribute("fill-opacity",M.fillOpacity),w.setAttribute("fill-rule",M.fillRule||"evenodd")):w.setAttribute("fill","none"))},_updatePoly:function(g,w){this._setPath(g,Me(g._parts,w))},_updateCircle:function(g){var w=g._point,M=Math.max(Math.round(g._radius),1),O=Math.max(Math.round(g._radiusY),1)||M,j="a"+M+","+O+" 0 1,0 ",W=g._empty()?"M0 0":"M"+(w.x-M)+","+w.y+j+M*2+",0 "+j+-M*2+",0 ";this._setPath(g,W)},_setPath:function(g,w){g._path.setAttribute("d",w)},_bringToFront:function(g){Ff(g._path)},_bringToBack:function(g){Vf(g._path)}});Ze.vml&&pp.include(yoe);function X3(g){return Ze.svg||Ze.vml?new pp(g):null}wt.include({getRenderer:function(g){var w=g.options.renderer||this._getPaneRenderer(g.options.pane)||this.options.renderer||this._renderer;return w||(w=this._renderer=this._createRenderer()),this.hasLayer(w)||this.addLayer(w),w},_getPaneRenderer:function(g){if(g==="overlayPane"||g===void 0)return!1;var w=this._paneRenderers[g];return w===void 0&&(w=this._createRenderer({pane:g}),this._paneRenderers[g]=w),w},_createRenderer:function(g){return this.options.preferCanvas&&Y3(g)||X3(g)}});var q3=Hf.extend({initialize:function(g,w){Hf.prototype.initialize.call(this,this._boundsToLatLngs(g),w)},setBounds:function(g){return this.setLatLngs(this._boundsToLatLngs(g))},_boundsToLatLngs:function(g){return g=re(g),[g.getSouthWest(),g.getNorthWest(),g.getNorthEast(),g.getSouthEast()]}});function xoe(g,w){return new q3(g,w)}pp.create=Z0,pp.pointsToPath=Me,ns.geometryToLayer=$0,ns.coordsToLatLng=FC,ns.coordsToLatLngs=F0,ns.latLngToCoords=VC,ns.latLngsToCoords=V0,ns.getFeature=Uf,ns.asFeature=G0,wt.mergeOptions({boxZoom:!0});var K3=oo.extend({initialize:function(g){this._map=g,this._container=g._container,this._pane=g._panes.overlayPane,this._resetStateTimeout=0,g.on("unload",this._destroy,this)},addHooks:function(){lt(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ht(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){nr(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(g){if(!g.shiftKey||g.which!==1&&g.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),op(),TC(),this._startPoint=this._map.mouseEventToContainerPoint(g),lt(document,{contextmenu:Nu,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(g){this._moved||(this._moved=!0,this._box=Mt("div","leaflet-zoom-box",this._container),ct(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(g);var w=new Y(this._point,this._startPoint),M=w.getSize();kr(this._box,w.min),this._box.style.width=M.x+"px",this._box.style.height=M.y+"px"},_finish:function(){this._moved&&(nr(this._box),br(this._container,"leaflet-crosshair")),sp(),CC(),Ht(document,{contextmenu:Nu,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(g){if(!(g.which!==1&&g.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var w=new Q(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(w).fire("boxzoomend",{boxZoomBounds:w})}},_onKeyDown:function(g){g.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});wt.addInitHook("addHandler","boxZoom",K3),wt.mergeOptions({doubleClickZoom:!0});var J3=oo.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(g){var w=this._map,M=w.getZoom(),O=w.options.zoomDelta,j=g.originalEvent.shiftKey?M-O:M+O;w.options.doubleClickZoom==="center"?w.setZoom(j):w.setZoomAround(g.containerPoint,j)}});wt.addInitHook("addHandler","doubleClickZoom",J3),wt.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Q3=oo.extend({addHooks:function(){if(!this._draggable){var g=this._map;this._draggable=new al(g._mapPane,g._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),g.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),g.on("zoomend",this._onZoomEnd,this),g.whenReady(this._onZoomEnd,this))}ct(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){br(this._map._container,"leaflet-grab"),br(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var g=this._map;if(g._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var w=re(this._map.options.maxBounds);this._offsetLimit=Z(this._map.latLngToContainerPoint(w.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(w.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;g.fire("movestart").fire("dragstart"),g.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(g){if(this._map.options.inertia){var w=this._lastTime=+new Date,M=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(M),this._times.push(w),this._prunePositions(w)}this._map.fire("move",g).fire("drag",g)},_prunePositions:function(g){for(;this._positions.length>1&&g-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var g=this._map.getSize().divideBy(2),w=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=w.subtract(g).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(g,w){return g-(g-w)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var g=this._draggable._newPos.subtract(this._draggable._startPos),w=this._offsetLimit;g.x<w.min.x&&(g.x=this._viscousLimit(g.x,w.min.x)),g.y<w.min.y&&(g.y=this._viscousLimit(g.y,w.min.y)),g.x>w.max.x&&(g.x=this._viscousLimit(g.x,w.max.x)),g.y>w.max.y&&(g.y=this._viscousLimit(g.y,w.max.y)),this._draggable._newPos=this._draggable._startPos.add(g)}},_onPreDragWrap:function(){var g=this._worldWidth,w=Math.round(g/2),M=this._initialWorldOffset,O=this._draggable._newPos.x,j=(O-w+M)%g+w-M,W=(O+w+M)%g-w-M,q=Math.abs(j+M)<Math.abs(W+M)?j:W;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=q},_onDragEnd:function(g){var w=this._map,M=w.options,O=!M.inertia||g.noInertia||this._times.length<2;if(w.fire("dragend",g),O)w.fire("moveend");else{this._prunePositions(+new Date);var j=this._lastPos.subtract(this._positions[0]),W=(this._lastTime-this._times[0])/1e3,q=M.easeLinearity,ne=j.multiplyBy(q/W),se=ne.distanceTo([0,0]),ge=Math.min(M.inertiaMaxSpeed,se),Be=ne.multiplyBy(ge/se),tt=ge/(M.inertiaDeceleration*q),pt=Be.multiplyBy(-tt/2).round();!pt.x&&!pt.y?w.fire("moveend"):(pt=w._limitOffset(pt,w.options.maxBounds),E(function(){w.panBy(pt,{duration:tt,easeLinearity:q,noMoveStart:!0,animate:!0})}))}}});wt.addInitHook("addHandler","dragging",Q3),wt.mergeOptions({keyboard:!0,keyboardPanDelta:80});var e5=oo.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(g){this._map=g,this._setPanDelta(g.options.keyboardPanDelta),this._setZoomDelta(g.options.zoomDelta)},addHooks:function(){var g=this._map._container;g.tabIndex<=0&&(g.tabIndex="0"),lt(g,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Ht(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var g=document.body,w=document.documentElement,M=g.scrollTop||w.scrollTop,O=g.scrollLeft||w.scrollLeft;this._map._container.focus(),window.scrollTo(O,M)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(g){var w=this._panKeys={},M=this.keyCodes,O,j;for(O=0,j=M.left.length;O<j;O++)w[M.left[O]]=[-1*g,0];for(O=0,j=M.right.length;O<j;O++)w[M.right[O]]=[g,0];for(O=0,j=M.down.length;O<j;O++)w[M.down[O]]=[0,g];for(O=0,j=M.up.length;O<j;O++)w[M.up[O]]=[0,-1*g]},_setZoomDelta:function(g){var w=this._zoomKeys={},M=this.keyCodes,O,j;for(O=0,j=M.zoomIn.length;O<j;O++)w[M.zoomIn[O]]=g;for(O=0,j=M.zoomOut.length;O<j;O++)w[M.zoomOut[O]]=-g},_addHooks:function(){lt(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Ht(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(g){if(!(g.altKey||g.ctrlKey||g.metaKey)){var w=g.keyCode,M=this._map,O;if(w in this._panKeys){if(!M._panAnim||!M._panAnim._inProgress)if(O=this._panKeys[w],g.shiftKey&&(O=U(O).multiplyBy(3)),M.options.maxBounds&&(O=M._limitOffset(U(O),M.options.maxBounds)),M.options.worldCopyJump){var j=M.wrapLatLng(M.unproject(M.project(M.getCenter()).add(O)));M.panTo(j)}else M.panBy(O)}else if(w in this._zoomKeys)M.setZoom(M.getZoom()+(g.shiftKey?3:1)*this._zoomKeys[w]);else if(w===27&&M._popup&&M._popup.options.closeOnEscapeKey)M.closePopup();else return;Nu(g)}}});wt.addInitHook("addHandler","keyboard",e5),wt.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var t5=oo.extend({addHooks:function(){lt(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Ht(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(g){var w=C3(g),M=this._map.options.wheelDebounceTime;this._delta+=w,this._lastMousePos=this._map.mouseEventToContainerPoint(g),this._startTime||(this._startTime=+new Date);var O=Math.max(M-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o(this._performZoom,this),O),Nu(g)},_performZoom:function(){var g=this._map,w=g.getZoom(),M=this._map.options.zoomSnap||0;g._stop();var O=this._delta/(this._map.options.wheelPxPerZoomLevel*4),j=4*Math.log(2/(1+Math.exp(-Math.abs(O))))/Math.LN2,W=M?Math.ceil(j/M)*M:j,q=g._limitZoom(w+(this._delta>0?W:-W))-w;this._delta=0,this._startTime=null,q&&(g.options.scrollWheelZoom==="center"?g.setZoom(w+q):g.setZoomAround(this._lastMousePos,w+q))}});wt.addInitHook("addHandler","scrollWheelZoom",t5);var _oe=600;wt.mergeOptions({tapHold:Ze.touchNative&&Ze.safari&&Ze.mobile,tapTolerance:15});var r5=oo.extend({addHooks:function(){lt(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Ht(this._map._container,"touchstart",this._onDown,this)},_onDown:function(g){if(clearTimeout(this._holdTimeout),g.touches.length===1){var w=g.touches[0];this._startPos=this._newPos=new B(w.clientX,w.clientY),this._holdTimeout=setTimeout(o(function(){this._cancel(),this._isTapValid()&&(lt(document,"touchend",fn),lt(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",w))},this),_oe),lt(document,"touchend touchcancel contextmenu",this._cancel,this),lt(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function g(){Ht(document,"touchend",fn),Ht(document,"touchend touchcancel",g)},_cancel:function(){clearTimeout(this._holdTimeout),Ht(document,"touchend touchcancel contextmenu",this._cancel,this),Ht(document,"touchmove",this._onMove,this)},_onMove:function(g){var w=g.touches[0];this._newPos=new B(w.clientX,w.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(g,w){var M=new MouseEvent(g,{bubbles:!0,cancelable:!0,view:window,screenX:w.screenX,screenY:w.screenY,clientX:w.clientX,clientY:w.clientY});M._simulated=!0,w.target.dispatchEvent(M)}});wt.addInitHook("addHandler","tapHold",r5),wt.mergeOptions({touchZoom:Ze.touch,bounceAtZoomLimits:!0});var n5=oo.extend({addHooks:function(){ct(this._map._container,"leaflet-touch-zoom"),lt(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){br(this._map._container,"leaflet-touch-zoom"),Ht(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(g){var w=this._map;if(!(!g.touches||g.touches.length!==2||w._animatingZoom||this._zooming)){var M=w.mouseEventToContainerPoint(g.touches[0]),O=w.mouseEventToContainerPoint(g.touches[1]);this._centerPoint=w.getSize()._divideBy(2),this._startLatLng=w.containerPointToLatLng(this._centerPoint),w.options.touchZoom!=="center"&&(this._pinchStartLatLng=w.containerPointToLatLng(M.add(O)._divideBy(2))),this._startDist=M.distanceTo(O),this._startZoom=w.getZoom(),this._moved=!1,this._zooming=!0,w._stop(),lt(document,"touchmove",this._onTouchMove,this),lt(document,"touchend touchcancel",this._onTouchEnd,this),fn(g)}},_onTouchMove:function(g){if(!(!g.touches||g.touches.length!==2||!this._zooming)){var w=this._map,M=w.mouseEventToContainerPoint(g.touches[0]),O=w.mouseEventToContainerPoint(g.touches[1]),j=M.distanceTo(O)/this._startDist;if(this._zoom=w.getScaleZoom(j,this._startZoom),!w.options.bounceAtZoomLimits&&(this._zoom<w.getMinZoom()&&j<1||this._zoom>w.getMaxZoom()&&j>1)&&(this._zoom=w._limitZoom(this._zoom)),w.options.touchZoom==="center"){if(this._center=this._startLatLng,j===1)return}else{var W=M._add(O)._divideBy(2)._subtract(this._centerPoint);if(j===1&&W.x===0&&W.y===0)return;this._center=w.unproject(w.project(this._pinchStartLatLng,this._zoom).subtract(W),this._zoom)}this._moved||(w._moveStart(!0,!1),this._moved=!0),D(this._animRequest);var q=o(w._move,w,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=E(q,this,!0),fn(g)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,D(this._animRequest),Ht(document,"touchmove",this._onTouchMove,this),Ht(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});wt.addInitHook("addHandler","touchZoom",n5),wt.BoxZoom=K3,wt.DoubleClickZoom=J3,wt.Drag=Q3,wt.Keyboard=e5,wt.ScrollWheelZoom=t5,wt.TapHold=r5,wt.TouchZoom=n5,r.Bounds=Y,r.Browser=Ze,r.CRS=Re,r.Canvas=Z3,r.Circle=$C,r.CircleMarker=z0,r.Class=z,r.Control=Sa,r.DivIcon=W3,r.DivOverlay=so,r.DomEvent=Bae,r.DomUtil=jae,r.Draggable=al,r.Evented=$,r.FeatureGroup=ts,r.GeoJSON=ns,r.GridLayer=dp,r.Handler=oo,r.Icon=Wf,r.ImageOverlay=W0,r.LatLng=ue,r.LatLngBounds=Q,r.Layer=Ta,r.LayerGroup=Gf,r.LineUtil=Kae,r.Map=wt,r.Marker=B0,r.Mixin=Hae,r.Path=ol,r.Point=B,r.PolyUtil=Uae,r.Polygon=Hf,r.Polyline=rs,r.Popup=H0,r.PosAnimation=A3,r.Projection=Jae,r.Rectangle=q3,r.Renderer=is,r.SVG=pp,r.SVGOverlay=G3,r.TileLayer=Zf,r.Tooltip=U0,r.Transformation=ce,r.Util=N,r.VideoOverlay=V3,r.bind=o,r.bounds=Z,r.canvas=Y3,r.circle=ooe,r.circleMarker=aoe,r.control=cp,r.divIcon=poe,r.extend=i,r.featureGroup=roe,r.geoJSON=F3,r.geoJson=uoe,r.gridLayer=goe,r.icon=noe,r.imageOverlay=coe,r.latLng=de,r.latLngBounds=re,r.layerGroup=toe,r.map=zae,r.marker=ioe,r.point=U,r.polygon=loe,r.polyline=soe,r.popup=doe,r.rectangle=xoe,r.setOptions=m,r.stamp=l,r.svg=X3,r.svgOverlay=hoe,r.tileLayer=H3,r.tooltip=voe,r.transformation=X,r.version=n,r.videoOverlay=foe;var boe=window.L;r.noConflict=function(){return window.L=boe,this},window.L=r})})(sE,sE.exports);var zf=sE.exports;const rae=Ft(zf);function k0(e,t,r){return Object.freeze({instance:e,context:t,container:r})}function e3(e,t){return t==null?function(n,i){const a=G.useRef();return a.current||(a.current=e(n,i)),a}:function(n,i){const a=G.useRef();a.current||(a.current=e(n,i));const o=G.useRef(n),{instance:s}=a.current;return G.useEffect(function(){o.current!==n&&(t(s,n,o.current),o.current=n)},[s,n,i]),a}}function nae(e,t){G.useEffect(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){var a;(a=t.layerContainer)==null||a.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function aQe(e){return function(r){const n=vC(),i=e(pC(r,n),n);return Jie(n.map,r.attribution),QR(i.current,r.eventHandlers),nae(i.current,n),i}}function oQe(e,t){const r=G.useRef();G.useEffect(function(){if(t.pathOptions!==r.current){const i=t.pathOptions??{};e.instance.setStyle(i),r.current=i}},[e,t])}function sQe(e){return function(r){const n=vC(),i=e(pC(r,n),n);return QR(i.current,r.eventHandlers),nae(i.current,n),oQe(i.current,r),i}}function iae(e,t){const r=e3(e),n=iQe(r,t);return rQe(n)}function aae(e,t){const r=e3(e,t),n=sQe(r);return tQe(n)}function lQe(e,t){const r=e3(e,t),n=aQe(r);return nQe(n)}function uQe(e,t,r){const{opacity:n,zIndex:i}=t;n!=null&&n!==r.opacity&&e.setOpacity(n),i!=null&&i!==r.zIndex&&e.setZIndex(i)}function cQe(){return vC().map}const fQe=aae(function({center:t,children:r,...n},i){const a=new zf.CircleMarker(t,n);return k0(a,Qie(i,{overlayContainer:a}))},JJe);function lE(){return lE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},lE.apply(this,arguments)}function hQe({bounds:e,boundsOptions:t,center:r,children:n,className:i,id:a,placeholder:o,style:s,whenReady:l,zoom:u,...c},f){const[h]=G.useState({className:i,id:a,style:s}),[d,v]=G.useState(null);G.useImperativeHandle(f,()=>(d==null?void 0:d.map)??null,[d]);const m=G.useCallback(x=>{if(x!==null&&d===null){const _=new zf.Map(x,c);r!=null&&u!=null?_.setView(r,u):e!=null&&_.fitBounds(e,t),l!=null&&_.whenReady(l),v(eQe(_))}},[]);G.useEffect(()=>()=>{d==null||d.map.remove()},[d]);const y=d?ee.createElement(tae,{value:d},n):o??null;return ee.createElement("div",lE({},h,{ref:m}),y)}const dQe=G.forwardRef(hQe),vQe=aae(function({positions:t,...r},n){const i=new zf.Polyline(t,r);return k0(i,Qie(n,{overlayContainer:i}))},function(t,r,n){r.positions!==n.positions&&t.setLatLngs(r.positions)}),pQe=iae(function(t,r){const n=new zf.Popup(t,r.overlayContainer);return k0(n,r)},function(t,r,{position:n},i){G.useEffect(function(){const{instance:o}=t;function s(u){u.popup===o&&(o.update(),i(!0))}function l(u){u.popup===o&&i(!1)}return r.map.on({popupopen:s,popupclose:l}),r.overlayContainer==null?(n!=null&&o.setLatLng(n),o.openOn(r.map)):r.overlayContainer.bindPopup(o),function(){var c;r.map.off({popupopen:s,popupclose:l}),(c=r.overlayContainer)==null||c.unbindPopup(),r.map.removeLayer(o)}},[t,r,i,n])}),gQe=lQe(function({url:t,...r},n){const i=new zf.TileLayer(t,pC(r,n));return k0(i,n)},function(t,r,n){uQe(t,r,n);const{url:i}=r;i!=null&&i!==n.url&&t.setUrl(i)}),mQe=iae(function(t,r){const n=new zf.Tooltip(t,r.overlayContainer);return k0(n,r)},function(t,r,{position:n},i){G.useEffect(function(){const o=r.overlayContainer;if(o==null)return;const{instance:s}=t,l=c=>{c.tooltip===s&&(n!=null&&s.setLatLng(n),s.update(),i(!0))},u=c=>{c.tooltip===s&&i(!1)};return o.on({tooltipopen:l,tooltipclose:u}),o.bindTooltip(s),function(){o.off({tooltipopen:l,tooltipclose:u}),o._map!=null&&o.unbindTooltip()}},[t,r,i,n])}),yQe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=",xQe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",_Qe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC";delete rae.Icon.Default.prototype._getIconUrl;rae.Icon.Default.mergeOptions({iconUrl:yQe,iconRetinaUrl:xQe,shadowUrl:_Qe});const JU=["#3b82f6","#a78bfa","#06b6d4","#f59e0b","#22c55e","#ec4899","#8b5cf6","#14b8a6"],bQe=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function wQe(e){return e>12?"#22c55e":e>8?"#4ade80":e>5?"#f59e0b":e>3?"#f97316":"#ef4444"}function SQe(e){return e===null||e>46?0:e>44.5?1:e>43?2:3}function TQe(e){if(!e)return"Unknown";const t=new Date(e),n=new Date().getTime()-t.getTime(),i=Math.floor(n/6e4),a=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"Just now":i<60?`${i}m ago`:a<24?`${a}h ago`:`${o}d ago`}function CQe({bounds:e}){const t=cQe();return G.useEffect(()=>{e&&t.fitBounds(e,{padding:[50,50]})},[t,e]),null}function AQe({node:e}){const t=e.latitude!==null&&e.longitude!==null,r=e.battery_level!==null?e.battery_level>100||e.voltage&&e.voltage>4.1?"USB ⚡":`${e.battery_level.toFixed(0)}%`:"Unknown";return p.jsxs("div",{className:"min-w-[200px]",children:[p.jsx("div",{className:"font-semibold text-slate-800",children:e.short_name}),p.jsx("div",{className:"text-xs text-slate-600 mb-2",children:e.long_name}),p.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1 text-xs",children:[p.jsx("div",{className:"text-slate-500",children:"Role"}),p.jsx("div",{className:"text-slate-700 font-medium",children:e.role}),p.jsx("div",{className:"text-slate-500",children:"Hardware"}),p.jsx("div",{className:"text-slate-700",children:e.hardware||"Unknown"}),p.jsx("div",{className:"text-slate-500",children:"Battery"}),p.jsx("div",{className:"text-slate-700",children:r}),p.jsx("div",{className:"text-slate-500",children:"Last Heard"}),p.jsx("div",{className:"text-slate-700",children:TQe(e.last_heard)})]}),t&&p.jsxs("div",{className:"mt-3 pt-2 border-t border-slate-200 flex gap-2",children:[p.jsxs("a",{href:`https://www.google.com/maps?q=${e.latitude},${e.longitude}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-600 hover:text-blue-800",children:[p.jsx(Td,{size:10}),"Google Maps"]}),p.jsxs("a",{href:`https://www.openstreetmap.org/?mlat=${e.latitude}&mlon=${e.longitude}&zoom=14`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-600 hover:text-blue-800",children:[p.jsx(Td,{size:10}),"OSM"]})]})]})}function MQe({nodes:e,edges:t,selectedNodeId:r,onSelectNode:n}){const i=G.useMemo(()=>e.filter(f=>f.latitude!==null&&f.longitude!==null),[e]),a=e.length-i.length,o=G.useMemo(()=>new Map(i.map(f=>[f.node_num,f])),[i]),s=G.useMemo(()=>t.filter(f=>o.has(f.from_node)&&o.has(f.to_node)),[t,o]),l=G.useMemo(()=>{if(i.length===0)return null;const f=i.map(d=>d.latitude),h=i.map(d=>d.longitude);return[[Math.min(...f),Math.min(...h)],[Math.max(...f),Math.max(...h)]]},[i]),u=[43.6,-114.4],c=G.useMemo(()=>{const f=new Set;return r!==null&&t.forEach(h=>{h.from_node===r&&f.add(h.to_node),h.to_node===r&&f.add(h.from_node)}),f},[r,t]);return p.jsxs("div",{className:"relative bg-bg-card rounded-lg border border-border overflow-hidden",children:[p.jsxs(dQe,{center:u,zoom:7,style:{width:"100%",height:"540px"},className:"z-0",children:[p.jsx(gQe,{url:"https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png",attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>, © <a href="https://carto.com/attributions">CARTO</a>'}),p.jsx(CQe,{bounds:l}),s.map((f,h)=>{const d=o.get(f.from_node),v=o.get(f.to_node),m=r===null||f.from_node===r||f.to_node===r;return p.jsx(vQe,{positions:[[d.latitude,d.longitude],[v.latitude,v.longitude]],color:wQe(f.snr),weight:m&&r!==null?2.5:1.5,opacity:r===null?.3:m?.6:.08},h)}),i.map(f=>{const h=f.node_num===r,d=c.has(f.node_num),v=r===null||h||d,m=bQe.includes(f.role),y=SQe(f.latitude),x=JU[y%JU.length];return p.jsxs(fQe,{center:[f.latitude,f.longitude],radius:m?8:5,fillColor:m?x:"#111827",fillOpacity:v?.9:.2,stroke:!0,color:h?"#ffffff":x,weight:h?3:m?0:2,opacity:v?1:.3,eventHandlers:{click:()=>n(h?null:f.node_num)},children:[p.jsx(mQe,{direction:"top",offset:[0,-8],children:p.jsx("span",{className:"font-mono text-xs",children:f.short_name})}),p.jsx(pQe,{children:p.jsx(AQe,{node:f})})]},f.node_num)})]}),p.jsxs("div",{className:"absolute bottom-4 left-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded px-3 py-2 text-xs text-slate-400 flex items-center gap-2",children:[p.jsx(yv,{size:12}),p.jsxs("span",{children:["Showing ",i.length," of ",e.length," nodes",a>0&&p.jsxs("span",{className:"text-slate-500",children:[" (",a," without coordinates)"]})]})]})]})}const QU=["#3b82f6","#a78bfa","#06b6d4","#f59e0b","#22c55e","#ec4899","#8b5cf6","#14b8a6"],PQe=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function e7(e){return e>12?"#22c55e":e>8?"#4ade80":e>5?"#f59e0b":e>3?"#f97316":"#ef4444"}function kQe(e){return e>12?"excellent":e>8?"good":e>5?"fair":e>3?"marginal":"poor"}function LQe(e){return e===null||e>46?0:e>44.5?1:e>43?2:3}function IQe(e){return["Northern ID","Central ID","SW Idaho","SC Idaho"][e]||"Unknown"}function OQe(e){if(!e)return"Unknown";const t=new Date(e),n=new Date().getTime()-t.getTime(),i=Math.floor(n/6e4),a=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"Just now":i<60?`${i}m ago`:a<24?`${a}h ago`:`${o}d ago`}function EQe(e){if(!e)return"bg-slate-500";const t=new Date(e),n=(new Date().getTime()-t.getTime())/36e5;return n<1?"bg-green-500":n<24?"bg-amber-500":"bg-slate-500"}function DQe({node:e,edges:t,nodes:r,onSelectNode:n}){const i=G.useMemo(()=>{if(!e)return[];const f=new Map(r.map(d=>[d.node_num,d])),h=[];return t.forEach(d=>{if(d.from_node===e.node_num){const v=f.get(d.to_node);v&&h.push({node:v,snr:d.snr,quality:d.quality})}else if(d.to_node===e.node_num){const v=f.get(d.from_node);v&&h.push({node:v,snr:d.snr,quality:d.quality})}}),h.sort((d,v)=>v.snr-d.snr)},[e,t,r]);if(!e)return p.jsxs("div",{className:"w-[250px] flex-shrink-0 bg-bg-card border-l border-border p-4 flex flex-col items-center justify-center h-[540px]",children:[p.jsx("div",{className:"w-12 h-12 rounded-full bg-bg-hover border border-border flex items-center justify-center mb-3",children:p.jsx(Xa,{size:24,className:"text-slate-500"})}),p.jsx("p",{className:"text-sm text-slate-500 text-center",children:"Click a node to inspect"})]});const a=PQe.includes(e.role),o=LQe(e.latitude),s=QU[o%QU.length],l=e.latitude!==null&&e.longitude!==null,u=e.battery_level!==null?e.battery_level>100||e.voltage&&e.voltage>4.1?"USB":`${e.battery_level.toFixed(0)}%`:"—",c=e.battery_level!==null&&(e.battery_level>100||e.voltage&&e.voltage>4.1);return p.jsxs("div",{className:"w-[250px] flex-shrink-0 bg-bg-card border-l border-border flex flex-col h-[540px] overflow-hidden",children:[p.jsxs("div",{className:"p-4 border-b border-border",children:[p.jsx("div",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-mono mb-2",style:{backgroundColor:`${s}20`,color:s},children:e.node_id_hex}),p.jsx("div",{className:"font-mono text-lg text-slate-100",children:e.short_name}),p.jsx("div",{className:"text-xs text-slate-500 truncate",children:e.long_name})]}),p.jsxs("div",{className:"p-4 border-b border-border grid grid-cols-2 gap-3",children:[p.jsxs("div",{children:[p.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Role"}),p.jsx("div",{className:`text-sm font-medium ${a?"text-cyan-400":"text-slate-300"}`,children:e.role})]}),p.jsxs("div",{children:[p.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Region"}),p.jsx("div",{className:"text-sm text-slate-300",children:IQe(o)})]}),p.jsxs("div",{children:[p.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Battery"}),p.jsxs("div",{className:"text-sm text-slate-300 flex items-center gap-1",children:[c&&p.jsx(Lm,{size:12,className:"text-amber-400"}),u]})]}),p.jsxs("div",{children:[p.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Status"}),p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx("div",{className:`w-2 h-2 rounded-full ${EQe(e.last_heard)}`}),p.jsx("span",{className:"text-sm text-slate-300",children:OQe(e.last_heard)})]})]}),p.jsxs("div",{className:"col-span-2",children:[p.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Hardware"}),p.jsx("div",{className:"text-sm text-slate-300 font-mono truncate",children:e.hardware||"Unknown"})]})]}),l&&p.jsxs("div",{className:"px-4 py-3 border-b border-border flex gap-3",children:[p.jsxs("a",{href:`https://www.google.com/maps?q=${e.latitude},${e.longitude}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-400 hover:text-blue-300",children:[p.jsx(Td,{size:10}),"Google Maps"]}),p.jsxs("a",{href:`https://www.openstreetmap.org/?mlat=${e.latitude}&mlon=${e.longitude}&zoom=14`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-400 hover:text-blue-300",children:[p.jsx(Td,{size:10}),"OSM"]})]}),p.jsxs("div",{className:"flex-1 overflow-y-auto",children:[p.jsxs("div",{className:"px-4 py-2 text-xs text-slate-500 font-medium sticky top-0 bg-bg-card border-b border-border",children:["Neighbors (",i.length,")"]}),i.length>0?p.jsx("div",{className:"divide-y divide-border",children:i.map(f=>p.jsxs("button",{onClick:()=>n(f.node.node_num),className:"w-full px-4 py-2 text-left hover:bg-bg-hover transition-colors flex items-center gap-2",style:{borderLeftWidth:3,borderLeftColor:e7(f.snr)},children:[p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsx("div",{className:"text-sm text-slate-200 font-mono truncate",children:f.node.short_name}),p.jsx("div",{className:"text-xs text-slate-500 truncate",children:f.node.long_name})]}),p.jsxs("div",{className:"text-right flex-shrink-0",children:[p.jsxs("div",{className:"text-xs font-mono",style:{color:e7(f.snr)},children:[f.snr.toFixed(1)," dB"]}),p.jsx("div",{className:"text-xs text-slate-500",children:kQe(f.snr)})]})]},f.node.node_num))}):p.jsx("div",{className:"px-4 py-6 text-center text-sm text-slate-500",children:"No known neighbors"})]})]})}const t7=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function NQe(e){if(!e)return"bg-slate-500";const t=new Date(e),n=(new Date().getTime()-t.getTime())/36e5;return n<1?"bg-green-500":n<24?"bg-amber-500":"bg-slate-500"}function jQe(e){if(!e)return"—";const t=new Date(e),n=new Date().getTime()-t.getTime(),i=Math.floor(n/6e4),a=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"Just now":i<60?`${i}m ago`:a<24?`${a}h ago`:`${o}d ago`}function RQe(e){return e.battery_level===null?"—":e.battery_level>100||e.voltage&&e.voltage>4.1?"USB ⚡":`${e.battery_level.toFixed(0)}%`}function r7(e){return e===null?"—":e>46?"Northern":e>44.5?"Central":e>43?"SW Idaho":"SC Idaho"}function BQe({nodes:e,selectedNodeId:t,onSelectNode:r}){const[n,i]=G.useState(""),[a,o]=G.useState("short_name"),[s,l]=G.useState("asc"),[u,c]=G.useState("all"),f=G.useMemo(()=>{let v=[...e];if(u==="infra"?v=v.filter(m=>t7.includes(m.role)):u==="online"&&(v=v.filter(m=>{if(!m.last_heard)return!1;const y=new Date(m.last_heard);return(new Date().getTime()-y.getTime())/36e5<1})),n){const m=n.toLowerCase();v=v.filter(y=>y.short_name.toLowerCase().includes(m)||y.long_name.toLowerCase().includes(m)||y.role.toLowerCase().includes(m)||r7(y.latitude).toLowerCase().includes(m))}return v.sort((m,y)=>{let x="",_="";switch(a){case"short_name":x=m.short_name.toLowerCase(),_=y.short_name.toLowerCase();break;case"role":x=m.role,_=y.role;break;case"battery_level":x=m.battery_level??-1,_=y.battery_level??-1;break;case"last_heard":x=m.last_heard?new Date(m.last_heard).getTime():0,_=y.last_heard?new Date(y.last_heard).getTime():0;break;case"hardware":x=m.hardware.toLowerCase(),_=y.hardware.toLowerCase();break}return x<_?s==="asc"?-1:1:x>_?s==="asc"?1:-1:0}),v},[e,n,a,s,u]),h=v=>{a===v?l(s==="asc"?"desc":"asc"):(o(v),l("asc"))},d=({field:v})=>a!==v?null:s==="asc"?p.jsx(vce,{size:14,className:"inline ml-1"}):p.jsx(_u,{size:14,className:"inline ml-1"});return p.jsxs("div",{className:"bg-bg-card border border-border rounded-lg overflow-hidden",children:[p.jsxs("div",{className:"p-3 border-b border-border flex items-center gap-3",children:[p.jsxs("div",{className:"relative flex-1 max-w-xs",children:[p.jsx(jS,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-500"}),p.jsx("input",{type:"text",placeholder:"Search nodes...",value:n,onChange:v=>i(v.target.value),className:"w-full pl-9 pr-3 py-1.5 bg-bg-hover border border-border rounded text-sm text-slate-200 placeholder-slate-500 focus:outline-none focus:border-accent"})]}),p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx(lD,{size:14,className:"text-slate-500 mr-1"}),["all","infra","online"].map(v=>p.jsx("button",{onClick:()=>c(v),className:`px-2 py-1 text-xs rounded transition-colors ${u===v?"bg-accent text-white":"bg-bg-hover text-slate-400 hover:text-slate-200"}`,children:v==="all"?"All":v==="infra"?"Infra":"Online"},v))]}),p.jsxs("div",{className:"text-xs text-slate-500 ml-auto",children:[f.length," of ",e.length," nodes"]})]}),p.jsxs("div",{className:"overflow-x-auto",children:[p.jsxs("table",{className:"w-full text-sm",children:[p.jsx("thead",{children:p.jsxs("tr",{className:"bg-bg-hover text-slate-400 text-xs",children:[p.jsx("th",{className:"w-8 px-3 py-2"}),p.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("short_name"),children:["Name ",p.jsx(d,{field:"short_name"})]}),p.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("role"),children:["Role ",p.jsx(d,{field:"role"})]}),p.jsx("th",{className:"px-3 py-2 text-left",children:"Region"}),p.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("battery_level"),children:[p.jsx("span",{title:"Battery percent (4.20V = 100%, 3.60V ~ 30% warning, 3.30V ~ 3% critical). USB ⚡ = USB-powered (>100% or >4.1V); no battery management applies.",children:"Battery"})," ",p.jsx(d,{field:"battery_level"})]}),p.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("last_heard"),children:[p.jsx("span",{title:"Status dot: green = heard in the last hour; amber = within 24h; slate = offline (past the configured threshold). See Reference → Mesh Health for thresholds by node type.",children:"Last Heard"})," ",p.jsx(d,{field:"last_heard"})]}),p.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("hardware"),children:["Hardware ",p.jsx(d,{field:"hardware"})]})]})}),p.jsx("tbody",{className:"divide-y divide-border",children:f.slice(0,100).map(v=>{const m=t7.includes(v.role),y=v.node_num===t;return p.jsxs("tr",{onClick:()=>r(v.node_num),className:`cursor-pointer transition-colors ${y?"bg-accent/10":"hover:bg-bg-hover"}`,children:[p.jsx("td",{className:"px-3 py-2",children:p.jsx("div",{className:`w-2 h-2 rounded-full ${NQe(v.last_heard)}`})}),p.jsxs("td",{className:"px-3 py-2",children:[p.jsx("div",{className:"font-mono text-slate-200",children:v.short_name}),p.jsx("div",{className:"text-xs text-slate-500 truncate max-w-[200px]",children:v.long_name})]}),p.jsx("td",{className:"px-3 py-2",children:p.jsx("span",{className:`inline-block px-1.5 py-0.5 rounded text-xs font-medium ${m?"bg-cyan-500/20 text-cyan-400":"bg-slate-500/20 text-slate-400"}`,children:v.role})}),p.jsx("td",{className:"px-3 py-2 text-slate-400",children:r7(v.latitude)}),p.jsx("td",{className:"px-3 py-2 font-mono text-slate-300",children:RQe(v)}),p.jsx("td",{className:"px-3 py-2 text-slate-400",children:jQe(v.last_heard)}),p.jsx("td",{className:"px-3 py-2 font-mono text-xs text-slate-400 truncate max-w-[150px]",children:v.hardware||"—"})]},v.node_num)})})]}),f.length>100&&p.jsxs("div",{className:"px-3 py-2 text-xs text-slate-500 text-center border-t border-border",children:["Showing first 100 of ",f.length," nodes"]}),f.length===0&&p.jsx("div",{className:"px-3 py-8 text-sm text-slate-500 text-center",children:"No nodes match your filters"})]})]})}function zQe(){const[e,t]=G.useState([]),[r,n]=G.useState([]),[i,a]=G.useState([]),[o,s]=G.useState(null),[l,u]=G.useState("topo"),[c,f]=G.useState(!0),[h,d]=G.useState(null);G.useEffect(()=>{document.title="Mesh — MeshAI",Promise.all([Pce(),kce(),Dce()]).then(([y,x,_])=>{t(y),n(x),a(_),f(!1)}).catch(y=>{d(y.message),f(!1)})},[]);const v=G.useMemo(()=>e.find(y=>y.node_num===o)||null,[e,o]),m=G.useCallback(y=>{s(y)},[]);return c?p.jsx("div",{className:"flex items-center justify-center h-64",children:p.jsx("div",{className:"text-slate-400",children:"Loading mesh data..."})}):h?p.jsx("div",{className:"flex items-center justify-center h-64",children:p.jsxs("div",{className:"text-red-400",children:["Error: ",h]})}):p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"text-sm text-slate-400",children:[e.length," nodes • ",r.length," edges"]}),p.jsxs("div",{className:"flex items-center bg-bg-card border border-border rounded-lg p-1",children:[p.jsxs("button",{onClick:()=>u("topo"),className:`flex items-center gap-2 px-3 py-1.5 rounded text-sm transition-colors ${l==="topo"?"bg-accent text-white":"text-slate-400 hover:text-slate-200"}`,children:[p.jsx(GZ,{size:14}),p.jsx("span",{title:"Force-directed graph of nodes + neighbor links. Edge weight reflects SNR; node color reflects status (green = active, amber = stale, slate = offline).",children:"Topology"})]}),p.jsxs("button",{onClick:()=>u("geo"),className:`flex items-center gap-2 px-3 py-1.5 rounded text-sm transition-colors ${l==="geo"?"bg-accent text-white":"text-slate-400 hover:text-slate-200"}`,children:[p.jsx(wce,{size:14}),p.jsx("span",{title:"Nodes plotted by lat/lon on a basemap. Nodes without a reported position are clustered at the top edge.",children:"Geographic"})]})]})]}),p.jsxs("div",{className:"flex gap-0",children:[p.jsx("div",{className:"flex-1 min-w-0",children:l==="topo"?p.jsx(KJe,{nodes:e,edges:r,selectedNodeId:o,onSelectNode:m}):p.jsx(MQe,{nodes:e,edges:r,selectedNodeId:o,onSelectNode:m})}),p.jsx(DQe,{node:v,edges:r,nodes:e,onSelectNode:m})]}),p.jsx(BQe,{nodes:e,selectedNodeId:o,onSelectNode:m})]})}function t3({label:e,value:t,onChange:r,helper:n,info:i,roleFilter:a,valueType:o="short_name"}){const[s,l]=G.useState([]),[u,c]=G.useState(!0),[f,h]=G.useState(""),[d,v]=G.useState(!1);G.useEffect(()=>{fetch("/api/nodes").then(S=>S.json()).then(S=>{l(S),c(!1)}).catch(()=>{l([]),c(!1)})},[]);const m=G.useMemo(()=>{let S=s;if(a&&(S=S.filter(T=>a==="ROUTER"||a==="infrastructure"?T.is_infrastructure||T.role==="ROUTER"||T.role==="ROUTER_CLIENT"||T.role==="REPEATER":T.role===a)),f.trim()){const T=f.toLowerCase();S=S.filter(C=>{var A,P,I,k;return((A=C.short_name)==null?void 0:A.toLowerCase().includes(T))||((P=C.long_name)==null?void 0:P.toLowerCase().includes(T))||((I=C.role)==null?void 0:I.toLowerCase().includes(T))||((k=C.node_id_hex)==null?void 0:k.toLowerCase().includes(T))})}return S.sort((T,C)=>(T.short_name||"").localeCompare(C.short_name||""))},[s,f,a]),y=S=>{switch(o){case"node_num":return String(S.node_num);case"node_id_hex":return S.node_id_hex;default:return S.short_name||String(S.node_num)}},x=S=>{const T=y(S);return t.includes(T)},_=S=>{const T=y(S);t.includes(T)?r(t.filter(C=>C!==T)):r([...t,T])},b=S=>{const T=[S.short_name];return S.long_name&&S.long_name!==S.short_name&&T.push(`— ${S.long_name}`),S.role&&T.push(`(${S.role})`),T.join(" ")};return!u&&s.length===0?p.jsxs("div",{className:"space-y-1",children:[p.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:e}),p.jsx("input",{type:"text",value:t.join(", "),onChange:S=>r(S.target.value.split(",").map(T=>T.trim()).filter(Boolean)),placeholder:"Enter node IDs separated by commas",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent"}),n&&p.jsx("p",{className:"text-xs text-slate-600",children:n})]}):p.jsxs("div",{className:"space-y-1",children:[p.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:e}),t.length>0&&p.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:t.map(S=>{const T=s.find(C=>y(C)===S);return p.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-accent/20 text-accent rounded text-sm",children:[T?T.short_name:S,p.jsx("button",{type:"button",onClick:()=>r(t.filter(C=>C!==S)),className:"hover:text-white",children:p.jsx(qa,{size:14})})]},S)})}),p.jsxs("div",{className:"relative",children:[p.jsxs("div",{className:"relative",children:[p.jsx(jS,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-500"}),p.jsx("input",{type:"text",value:f,onChange:S=>h(S.target.value),onFocus:()=>v(!0),placeholder:u?"Loading nodes...":"Search nodes...",className:"w-full pl-9 pr-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent"})]}),d&&!u&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>v(!1)}),p.jsx("div",{className:"absolute left-0 right-0 top-full mt-1 z-50 max-h-64 overflow-y-auto bg-[#0a0e17] border border-[#1e2a3a] rounded-lg shadow-xl",children:m.length===0?p.jsx("div",{className:"p-3 text-sm text-slate-500 text-center",children:"No nodes found"}):m.map(S=>p.jsxs("button",{type:"button",onClick:()=>_(S),className:`w-full flex items-center gap-2 px-3 py-2 text-left text-sm hover:bg-[#1e2a3a] ${x(S)?"bg-accent/10":""}`,children:[p.jsx("div",{className:`w-4 h-4 rounded border flex items-center justify-center ${x(S)?"bg-accent border-accent":"border-slate-600"}`,children:x(S)&&p.jsx(Fo,{size:12,className:"text-white"})}),p.jsx("span",{className:"text-slate-200",children:b(S)})]},S.node_num))})]})]}),n&&p.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function r3(e){const[t,r]=G.useState([]),[n,i]=G.useState(!0);G.useEffect(()=>{fetch("/api/channels").then(h=>h.json()).then(h=>{r(h),i(!1)}).catch(()=>{r([]),i(!1)})},[]);const a=h=>{const d=h.role==="PRIMARY"?"Primary":h.role==="SECONDARY"?"Secondary":"";return`${h.index}: ${h.name}${d?` (${d})`:""}`};if(!n&&t.length===0)return e.mode==="single"?p.jsxs("div",{className:"space-y-1",children:[p.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:e.label}),p.jsx("input",{type:"number",value:e.value,onChange:h=>e.onChange(Number(h.target.value)),min:e.includeDisabled?-1:0,max:7,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent"}),e.helper&&p.jsx("p",{className:"text-xs text-slate-600",children:e.helper})]}):p.jsxs("div",{className:"space-y-1",children:[p.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:e.label}),p.jsx("input",{type:"text",value:e.value.join(", "),onChange:h=>{const d=h.target.value.split(",").map(v=>parseInt(v.trim())).filter(v=>!isNaN(v));e.onChange(d)},placeholder:"Enter channel numbers separated by commas",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent"}),e.helper&&p.jsx("p",{className:"text-xs text-slate-600",children:e.helper})]});if(e.mode==="single"){const{value:h,onChange:d,label:v,helper:m,includeDisabled:y}=e,x=t.filter(_=>_.enabled);return p.jsxs("div",{className:"space-y-1",children:[p.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:v}),p.jsxs("select",{value:h,onChange:_=>d(Number(_.target.value)),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent",children:[y&&p.jsx("option",{value:-1,children:"Disabled"}),x.map(_=>p.jsx("option",{value:_.index,children:a(_)},_.index))]}),m&&p.jsx("p",{className:"text-xs text-slate-600",children:m})]})}const{value:o,onChange:s,label:l,helper:u}=e,c=t.filter(h=>h.enabled),f=h=>{o.includes(h)?s(o.filter(d=>d!==h)):s([...o,h].sort((d,v)=>d-v))};return p.jsxs("div",{className:"space-y-1",children:[p.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:l}),p.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-2 space-y-1",children:[c.map(h=>p.jsxs("label",{onClick:()=>f(h.index),className:"flex items-center gap-2 p-2 rounded hover:bg-[#0a0e17] cursor-pointer",children:[p.jsx("div",{className:`w-4 h-4 rounded border flex items-center justify-center ${o.includes(h.index)?"bg-accent border-accent":"border-slate-600"}`,children:o.includes(h.index)&&p.jsx(Fo,{size:12,className:"text-white"})}),p.jsx("span",{className:"text-sm text-slate-200",children:a(h)})]},h.index)),c.length===0&&p.jsx("div",{className:"text-sm text-slate-500 p-2",children:"No channels available"})]}),u&&p.jsx("p",{className:"text-xs text-slate-600",children:u})]})}const n7=[{key:"bot",label:"Bot",icon:cce},{key:"connection",label:"Connection",icon:RS},{key:"response",label:"Response",icon:uD},{key:"history",label:"History",icon:zZ},{key:"memory",label:"Memory",icon:fce},{key:"context",label:"Context",icon:sD},{key:"commands",label:"Commands",icon:UZ},{key:"llm",label:"LLM",icon:BZ},{key:"weather",label:"Weather",icon:cu},{key:"meshmonitor",label:"MeshMonitor",icon:Xa},{key:"knowledge",label:"Knowledge",icon:jZ},{key:"mesh_sources",label:"Mesh Sources",icon:FZ},{key:"mesh_intelligence",label:"Intelligence",icon:mv},{key:"dashboard",label:"Dashboard",icon:VZ}],di={bot:"Identity and behavior settings for the bot on the mesh network.",connection:"How MeshAI connects to your Meshtastic radio.",response:"Controls how quickly and how much the bot responds on the mesh.",history:"Conversation history storage and cleanup.",memory:"Short-term conversation memory management. Controls how the bot maintains context within a conversation.",context:"Passive channel monitoring. The bot listens to mesh channels and uses recent messages as context when responding.",commands:"Mesh commands available via the configured prefix. Toggle individual commands on or off.",llm:"AI model configuration. MeshAI uses an LLM to understand questions and generate responses.",weather:"Weather data for the !weather command. This is separate from NWS environmental alerts.",meshmonitor:"AIDA MeshMonitor integration. An additional data source for mesh network monitoring.",knowledge:"Knowledge base for answering questions from stored documents. Connects to Qdrant vector database or local SQLite.",mesh_sources:"Data sources for mesh network information. MeshAI can pull data from multiple sources simultaneously and merge them into a unified view.",mesh_intelligence:"Advanced mesh analysis: health scoring, region management, and automated alerting. The intelligence engine monitors your mesh and detects problems automatically.",dashboard:"Web dashboard settings. You're looking at it right now."},$Qe=[{name:"help",description:"Show available commands and usage"},{name:"health",description:"Mesh network health overview with status dots"},{name:"status",description:"Quick mesh status summary"},{name:"region",description:"List regions or get detailed region breakdown"},{name:"neighbors",description:"Show top infrastructure neighbors with signal quality"},{name:"ping",description:"Test bot responsiveness"},{name:"clear",description:"Clear your conversation history"},{name:"reset",description:"Reset conversation context"},{name:"sub",description:"Subscribe to scheduled reports or alerts"},{name:"unsub",description:"Remove a subscription"},{name:"mysubs",description:"List your active subscriptions"},{name:"alerts",description:"Active NWS weather alerts for mesh area"},{name:"solar",description:"Space weather and HF propagation conditions"},{name:"hf",description:"HF radio propagation (alias for !solar)"},{name:"fire",description:"Active wildfires near the mesh"},{name:"avy",description:"Avalanche advisories for configured zones"},{name:"hotspots",description:"NASA FIRMS satellite fire detections"},{name:"streams",description:"USGS stream gauge readings"},{name:"roads",description:"Road conditions and closures"},{name:"traffic",description:"Traffic flow on monitored corridors"}],FQe=[{value:"US-AL",label:"Alabama"},{value:"US-AK",label:"Alaska"},{value:"US-AZ",label:"Arizona"},{value:"US-AR",label:"Arkansas"},{value:"US-CA",label:"California"},{value:"US-CO",label:"Colorado"},{value:"US-CT",label:"Connecticut"},{value:"US-DE",label:"Delaware"},{value:"US-FL",label:"Florida"},{value:"US-GA",label:"Georgia"},{value:"US-HI",label:"Hawaii"},{value:"US-ID",label:"Idaho"},{value:"US-IL",label:"Illinois"},{value:"US-IN",label:"Indiana"},{value:"US-IA",label:"Iowa"},{value:"US-KS",label:"Kansas"},{value:"US-KY",label:"Kentucky"},{value:"US-LA",label:"Louisiana"},{value:"US-ME",label:"Maine"},{value:"US-MD",label:"Maryland"},{value:"US-MA",label:"Massachusetts"},{value:"US-MI",label:"Michigan"},{value:"US-MN",label:"Minnesota"},{value:"US-MS",label:"Mississippi"},{value:"US-MO",label:"Missouri"},{value:"US-MT",label:"Montana"},{value:"US-NE",label:"Nebraska"},{value:"US-NV",label:"Nevada"},{value:"US-NH",label:"New Hampshire"},{value:"US-NJ",label:"New Jersey"},{value:"US-NM",label:"New Mexico"},{value:"US-NY",label:"New York"},{value:"US-NC",label:"North Carolina"},{value:"US-ND",label:"North Dakota"},{value:"US-OH",label:"Ohio"},{value:"US-OK",label:"Oklahoma"},{value:"US-OR",label:"Oregon"},{value:"US-PA",label:"Pennsylvania"},{value:"US-RI",label:"Rhode Island"},{value:"US-SC",label:"South Carolina"},{value:"US-SD",label:"South Dakota"},{value:"US-TN",label:"Tennessee"},{value:"US-TX",label:"Texas"},{value:"US-UT",label:"Utah"},{value:"US-VT",label:"Vermont"},{value:"US-VA",label:"Virginia"},{value:"US-WA",label:"Washington"},{value:"US-WV",label:"West Virginia"},{value:"US-WI",label:"Wisconsin"},{value:"US-WY",label:"Wyoming"}];function qo({info:e,link:t,linkText:r="Learn more"}){const[n,i]=G.useState(!1),a=G.useRef(null);return G.useEffect(()=>{if(!n)return;function o(l){a.current&&!a.current.contains(l.target)&&i(!1)}const s=setTimeout(()=>document.addEventListener("mousedown",o),0);return()=>{clearTimeout(s),document.removeEventListener("mousedown",o)}},[n]),p.jsxs("div",{className:"relative inline-block",ref:a,children:[p.jsx("button",{type:"button",onClick:o=>{o.stopPropagation(),i(!n)},className:"ml-1.5 w-4 h-4 rounded-full bg-slate-700 hover:bg-slate-600 text-slate-400 hover:text-slate-200 inline-flex items-center justify-center text-xs transition-colors",title:"More info",children:"?"}),n&&p.jsxs("div",{className:"absolute left-0 top-6 z-50 w-72 p-3 bg-[#1a2332] border border-[#2a3a4a] rounded-lg shadow-xl text-xs text-slate-300 leading-relaxed",children:[p.jsx("button",{type:"button",onClick:()=>i(!1),className:"absolute top-1 right-1 w-5 h-5 rounded hover:bg-slate-700 text-slate-500 hover:text-slate-300 inline-flex items-center justify-center transition-colors","aria-label":"Close",children:p.jsx(qa,{size:12})}),p.jsx("div",{className:"pr-4",children:e}),t&&p.jsxs("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"mt-2 flex items-center gap-1 text-accent hover:underline",onClick:o=>o.stopPropagation(),children:[r," ",p.jsx(Td,{size:10})]})]})]})}function vi({text:e}){return p.jsx("p",{className:"text-sm text-slate-500 mb-6 pb-4 border-b border-[#1e2a3a]",children:e})}function xt({label:e,value:t,onChange:r,type:n="text",placeholder:i="",helper:a="",info:o="",infoLink:s=""}){const[l,u]=G.useState(!1),c=n==="password";return p.jsxs("div",{className:"space-y-1",children:[p.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,o&&p.jsx(qo,{info:o,link:s})]}),p.jsxs("div",{className:"relative",children:[p.jsx("input",{type:c&&!l?"password":"text",value:t,onChange:f=>r(f.target.value),placeholder:i,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),c&&p.jsx("button",{type:"button",onClick:()=>u(!l),className:"absolute right-2 top-1/2 -translate-y-1/2 text-slate-500 hover:text-slate-300",children:l?p.jsx($Z,{size:16}):p.jsx(sD,{size:16})})]}),a&&p.jsx("p",{className:"text-xs text-slate-600",children:a})]})}function Je({label:e,value:t,onChange:r,min:n,max:i,step:a=1,helper:o="",info:s="",infoLink:l=""}){return p.jsxs("div",{className:"space-y-1",children:[p.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,s&&p.jsx(qo,{info:s,link:l})]}),p.jsx("input",{type:"number",value:t,onChange:u=>r(Number(u.target.value)),min:n,max:i,step:a,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent"}),o&&p.jsx("p",{className:"text-xs text-slate-600",children:o})]})}function yr({label:e,checked:t,onChange:r,helper:n="",info:i="",infoLink:a=""}){return p.jsxs("div",{className:"flex items-center justify-between py-2",children:[p.jsxs("div",{children:[p.jsxs("span",{className:"flex items-center text-sm text-slate-300",children:[e,i&&p.jsx(qo,{info:i,link:a})]}),n&&p.jsx("p",{className:"text-xs text-slate-600",children:n})]}),p.jsx("button",{type:"button",onClick:()=>r(!t),className:`relative w-11 h-6 rounded-full transition-colors ${t?"bg-accent":"bg-[#1e2a3a]"}`,children:p.jsx("span",{className:`absolute top-1 left-1 w-4 h-4 rounded-full bg-white transition-transform ${t?"translate-x-5":""}`})})]})}function Oo({label:e,value:t,onChange:r,options:n,helper:i="",info:a="",infoLink:o=""}){return p.jsxs("div",{className:"space-y-1",children:[p.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,a&&p.jsx(qo,{info:a,link:o})]}),p.jsx("select",{value:t,onChange:s=>r(s.target.value),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent",children:n.map(s=>p.jsx("option",{value:s.value,children:s.label},s.value))}),i&&p.jsx("p",{className:"text-xs text-slate-600",children:i})]})}function VQe({label:e,value:t,onChange:r,rows:n=4,helper:i="",info:a="",infoLink:o=""}){return p.jsxs("div",{className:"space-y-1",children:[p.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,a&&p.jsx(qo,{info:a,link:o})]}),p.jsx("textarea",{value:t,onChange:s=>r(s.target.value),rows:n,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent resize-y"}),i&&p.jsx("p",{className:"text-xs text-slate-600",children:i})]})}function Qh({label:e,value:t,onChange:r,helper:n="",info:i="",infoLink:a=""}){const[o,s]=G.useState(t.join(", "));G.useEffect(()=>{s(t.join(", "))},[t]);const l=()=>{const u=o.split(",").map(c=>c.trim()).filter(Boolean);r(u)};return p.jsxs("div",{className:"space-y-1",children:[p.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,i&&p.jsx(qo,{info:i,link:a})]}),p.jsx("input",{type:"text",value:o,onChange:u=>s(u.target.value),onBlur:l,placeholder:"item1, item2, item3",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),n&&p.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function GQe({label:e,value:t,onChange:r,helper:n="",info:i="",infoLink:a=""}){const[o,s]=G.useState(t.join(", "));G.useEffect(()=>{s(t.join(", "))},[t]);const l=()=>{const u=o.split(",").map(c=>parseInt(c.trim(),10)).filter(c=>!isNaN(c));r(u)};return p.jsxs("div",{className:"space-y-1",children:[p.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,i&&p.jsx(qo,{info:i,link:a})]}),p.jsx("input",{type:"text",value:o,onChange:u=>s(u.target.value),onBlur:l,placeholder:"0, 1, 2",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),n&&p.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function kn({label:e,description:t,checked:r,onChange:n,threshold:i,onThresholdChange:a,thresholdLabel:o,thresholdMin:s,thresholdMax:l,thresholdStep:u=1,thresholdSuffix:c=""}){return p.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-3 space-y-2",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"flex-1",children:[p.jsx("span",{className:"text-sm text-slate-300",children:e}),p.jsx("p",{className:"text-xs text-slate-600",children:t})]}),p.jsx("button",{type:"button",onClick:()=>n(!r),className:`relative w-11 h-6 rounded-full transition-colors flex-shrink-0 ml-3 ${r?"bg-accent":"bg-[#1e2a3a]"}`,children:p.jsx("span",{className:`absolute top-1 left-1 w-4 h-4 rounded-full bg-white transition-transform ${r?"translate-x-5":""}`})})]}),r&&i!==void 0&&a&&p.jsxs("div",{className:"flex items-center gap-2 pt-2 border-t border-[#1e2a3a]",children:[p.jsxs("span",{className:"text-xs text-slate-500",children:[o||"Threshold",":"]}),p.jsx("input",{type:"number",value:i,onChange:f=>a(Number(f.target.value)),min:s,max:l,step:u,className:"w-20 px-2 py-1 bg-[#0a0e17] border border-[#1e2a3a] rounded text-xs text-slate-200 font-mono"}),c&&p.jsx("span",{className:"text-xs text-slate-500",children:c})]})]})}function WQe({data:e,onChange:t}){return p.jsxs("div",{className:"space-y-4",children:[p.jsx(vi,{text:di.bot}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx(xt,{label:"Bot Name",value:e.name,onChange:r=>t({...e,name:r}),helper:"Name the bot responds to on the mesh",info:"When someone sends a message containing this name, the bot will respond. Also used as the sender name in broadcasts. Changing this requires a restart."}),p.jsx(xt,{label:"Owner",value:e.owner,onChange:r=>t({...e,owner:r}),helper:"Your callsign or identifier",info:"Identifies the bot operator. Shown in !help responses and used for admin-level commands."})]}),p.jsx(yr,{label:"Respond to DMs",checked:e.respond_to_dms,onChange:r=>t({...e,respond_to_dms:r}),helper:"Reply when someone sends a direct message",info:"When enabled, the bot responds to direct messages from any node. When disabled, the bot only responds to channel messages that mention its name."}),p.jsx(yr,{label:"Filter BBS Protocols",checked:e.filter_bbs_protocols,onChange:r=>t({...e,filter_bbs_protocols:r}),helper:"Ignore BBS bulletin board traffic",info:"Filters out automated BBS protocol messages (advBBS, MAIL*, BOARD*) so the bot doesn't try to respond to machine-to-machine traffic."})]})}function HQe({data:e,onChange:t}){return p.jsxs("div",{className:"space-y-4",children:[p.jsx(vi,{text:di.connection}),p.jsx(Oo,{label:"Connection Type",value:e.type,onChange:r=>t({...e,type:r}),options:[{value:"serial",label:"Serial (USB)"},{value:"tcp",label:"TCP (Network)"}],helper:"Serial for USB-connected radios, TCP for network or meshtasticd",info:"Serial: direct USB connection to a Meshtastic radio. TCP: connect over the network to a radio's IP or to meshtasticd running on another machine."}),e.type==="serial"?p.jsx(xt,{label:"Serial Port",value:e.serial_port,onChange:r=>t({...e,serial_port:r}),placeholder:"/dev/ttyUSB0",helper:"Device path for your USB radio",info:"Usually /dev/ttyUSB0 on Linux or /dev/ttyACM0. Check with 'ls /dev/tty*' after plugging in your radio."}):p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx(xt,{label:"TCP Host",value:e.tcp_host,onChange:r=>t({...e,tcp_host:r}),placeholder:"192.168.1.100",helper:"IP address or hostname of the radio/meshtasticd"}),p.jsx(Je,{label:"TCP Port",value:e.tcp_port,onChange:r=>t({...e,tcp_port:r}),min:1,max:65535,helper:"Default 4403 for meshtasticd"})]})]})}function UQe({data:e,onChange:t}){return p.jsxs("div",{className:"space-y-4",children:[p.jsx(vi,{text:di.response}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx(Je,{label:"Delay Min (sec)",value:e.delay_min,onChange:r=>t({...e,delay_min:r}),min:0,step:.1,helper:"Minimum wait before responding",info:"Adds a random delay between min and max before the bot sends a response. Prevents the bot from appearing to respond instantly, which can feel unnatural on a radio network."}),p.jsx(Je,{label:"Delay Max (sec)",value:e.delay_max,onChange:r=>t({...e,delay_max:r}),min:0,step:.1,helper:"Maximum wait before responding",info:"Also prevents collisions with other traffic by staggering transmissions."})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx(Je,{label:"Max Length",value:e.max_length,onChange:r=>t({...e,max_length:r}),min:50,max:500,helper:"Maximum characters per response message",info:"Meshtastic packets have limited size. This caps how long each message chunk can be. The bot will split longer responses into multiple messages up to Max Messages."}),p.jsx(Je,{label:"Max Messages",value:e.max_messages,onChange:r=>t({...e,max_messages:r}),min:1,max:10,helper:"Maximum chunks per response",info:"If a response is longer than Max Length, the bot splits it into this many chunks at most. Higher values = more complete answers but more airtime used."})]})]})}function ZQe({data:e,onChange:t}){return p.jsxs("div",{className:"space-y-4",children:[p.jsx(vi,{text:di.history}),p.jsx(xt,{label:"Database Path",value:e.database,onChange:r=>t({...e,database:r}),helper:"SQLite file for storing conversation history",info:"Path to the SQLite database file. Created automatically if it doesn't exist. Stores all conversation history for context."}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx(Je,{label:"Max Messages Per User",value:e.max_messages_per_user,onChange:r=>t({...e,max_messages_per_user:r}),min:0,helper:"History limit per user (0 = unlimited)",info:"Limits how many messages are stored per user. Older messages are pruned when the limit is reached. Set to 0 for no limit."}),p.jsx(Je,{label:"Conversation Timeout (sec)",value:e.conversation_timeout,onChange:r=>t({...e,conversation_timeout:r}),min:0,helper:"Seconds before context resets",info:"If a user doesn't message for this long, their next message starts a new conversation context. The bot won't remember the previous topic."})]}),p.jsx(yr,{label:"Auto Cleanup",checked:e.auto_cleanup,onChange:r=>t({...e,auto_cleanup:r}),helper:"Automatically prune old conversations"}),e.auto_cleanup&&p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx(Je,{label:"Cleanup Interval (hours)",value:e.cleanup_interval_hours,onChange:r=>t({...e,cleanup_interval_hours:r}),min:1,helper:"Hours between cleanup runs"}),p.jsx(Je,{label:"Max Age (days)",value:e.max_age_days,onChange:r=>t({...e,max_age_days:r}),min:1,helper:"Delete conversations older than this"})]})]})}function YQe({data:e,onChange:t}){return p.jsxs("div",{className:"space-y-4",children:[p.jsx(vi,{text:di.memory}),p.jsx(yr,{label:"Enable Memory",checked:e.enabled,onChange:r=>t({...e,enabled:r}),helper:"Keep conversation context between messages"}),e.enabled&&p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx(Je,{label:"Window Size",value:e.window_size,onChange:r=>t({...e,window_size:r}),min:1,helper:"Recent message pairs kept in full",info:"The bot keeps this many recent exchanges (user message + bot response pairs) as full text in context. Older messages are summarized to save token space."}),p.jsx(Je,{label:"Summarize Threshold",value:e.summarize_threshold,onChange:r=>t({...e,summarize_threshold:r}),min:1,helper:"Messages before older context is summarized",info:"When the conversation exceeds this many messages, older ones outside the window are compressed into a summary by the LLM."})]})]})}function XQe({data:e,onChange:t}){return p.jsxs("div",{className:"space-y-4",children:[p.jsx(vi,{text:di.context}),p.jsx(yr,{label:"Enable Passive Context",checked:e.enabled,onChange:r=>t({...e,enabled:r}),helper:"Listen to channel traffic for context",info:"When enabled, the bot monitors mesh channels and includes recent messages in its context. This lets the bot reference things other people said on the channel."}),e.enabled&&p.jsxs(p.Fragment,{children:[p.jsx(r3,{label:"Observe Channels",value:e.observe_channels,onChange:r=>t({...e,observe_channels:r}),helper:"Channels to monitor (empty = all)",info:"Meshtastic channels to listen on. Leave empty to monitor all channels.",mode:"multi"}),p.jsx(t3,{label:"Ignore Nodes",value:e.ignore_nodes,onChange:r=>t({...e,ignore_nodes:r}),helper:"Nodes to exclude from context",info:"Messages from these nodes won't be included in passive context. Useful for filtering out noisy automated nodes."}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx(Je,{label:"Max Age (sec)",value:e.max_age,onChange:r=>t({...e,max_age:r}),min:0,helper:"Ignore messages older than this"}),p.jsx(Je,{label:"Max Context Items",value:e.max_context_items,onChange:r=>t({...e,max_context_items:r}),min:1,helper:"Maximum recent messages to include"})]})]})]})}function qQe({data:e,onChange:t}){const r=new Set(e.disabled_commands.map(i=>i.toLowerCase())),n=i=>{const a=i.toLowerCase();r.has(a)?t({...e,disabled_commands:e.disabled_commands.filter(o=>o.toLowerCase()!==a)}):t({...e,disabled_commands:[...e.disabled_commands,i]})};return p.jsxs("div",{className:"space-y-4",children:[p.jsx(vi,{text:di.commands}),p.jsx(yr,{label:"Enable Commands",checked:e.enabled,onChange:i=>t({...e,enabled:i}),helper:"Allow !commands on the mesh"}),e.enabled&&p.jsxs(p.Fragment,{children:[p.jsx(xt,{label:"Command Prefix",value:e.prefix,onChange:i=>t({...e,prefix:i}),helper:"Character that triggers commands (e.g. ! for !help)",info:"Users type this character followed by the command name. Only single characters recommended."}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Available Commands",p.jsx(qo,{info:"Toggle commands on or off. Disabled commands won't respond when users invoke them."})]}),p.jsx("div",{className:"grid gap-1",children:$Qe.map(i=>{const a=!r.has(i.name.toLowerCase());return p.jsxs("div",{className:"flex items-center justify-between p-2 bg-[#0a0e17] border border-[#1e2a3a] rounded hover:border-[#2a3a4a] transition-colors",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsxs("code",{className:"text-accent text-sm",children:["!",i.name]}),p.jsx("span",{className:"text-xs text-slate-500",children:i.description})]}),p.jsx("button",{type:"button",onClick:()=>n(i.name),className:`relative w-9 h-5 rounded-full transition-colors ${a?"bg-accent":"bg-[#1e2a3a]"}`,children:p.jsx("span",{className:`absolute top-0.5 left-0.5 w-4 h-4 rounded-full bg-white transition-transform ${a?"translate-x-4":""}`})})]},i.name)})})]})]})]})}function KQe({data:e,onChange:t}){return p.jsxs("div",{className:"space-y-4",children:[p.jsx(vi,{text:di.llm}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx(Oo,{label:"Backend",value:e.backend,onChange:r=>t({...e,backend:r}),options:[{value:"openai",label:"OpenAI"},{value:"anthropic",label:"Anthropic"},{value:"google",label:"Google (Gemini)"}],helper:"LLM provider to use",info:"OpenAI: GPT models (gpt-4o, gpt-4o-mini). Anthropic: Claude models (claude-sonnet-4-20250514). Google: Gemini models. Can also point to compatible APIs like Ollama, LM Studio, or Open WebUI by changing the Base URL."}),p.jsx(xt,{label:"Model",value:e.model,onChange:r=>t({...e,model:r}),placeholder:"gpt-4o-mini",helper:"Specific model name",info:"The specific model to use. Common choices: gpt-4o-mini (fast, cheap), gpt-4o (better, costs more), claude-sonnet-4-20250514 (Anthropic equivalent). For local models via Ollama, use the model name you pulled (e.g. llama3.1)."})]}),p.jsx(xt,{label:"API Key",value:e.api_key,onChange:r=>t({...e,api_key:r}),type:"password",helper:"Supports ${ENV_VAR} syntax",info:"Your API key from the provider. You can also use ${ENV_VAR} syntax to read from an environment variable instead of storing the key in the config file."}),p.jsx(xt,{label:"Base URL",value:e.base_url,onChange:r=>t({...e,base_url:r}),placeholder:"https://api.openai.com/v1",helper:"API endpoint (change for local LLMs)",info:"Default API endpoint for the selected backend. Change this to point to a local LLM server (Ollama at http://localhost:11434/v1, Open WebUI, LM Studio, etc.) or a proxy."}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx(Je,{label:"Timeout (sec)",value:e.timeout,onChange:r=>t({...e,timeout:r}),min:5,max:120,helper:"Maximum seconds to wait for response"}),p.jsx(Je,{label:"Max Response Tokens",value:e.max_response_tokens,onChange:r=>t({...e,max_response_tokens:r}),min:100,helper:"Token limit for LLM responses"})]}),p.jsx(yr,{label:"Use System Prompt",checked:e.use_system_prompt,onChange:r=>t({...e,use_system_prompt:r}),helper:"Enable custom system instructions"}),e.use_system_prompt&&p.jsx(VQe,{label:"System Prompt",value:e.system_prompt,onChange:r=>t({...e,system_prompt:r}),rows:6,helper:"Instructions that shape the bot's personality",info:"Instructions that shape the bot's personality and behavior. The bot always follows these instructions. MeshAI adds mesh health data and environmental context automatically — you don't need to include those here."}),p.jsx(yr,{label:"Web Search",checked:e.web_search,onChange:r=>t({...e,web_search:r}),helper:"Enable web search tool (Open WebUI feature)"}),p.jsx(yr,{label:"Google Grounding",checked:e.google_grounding,onChange:r=>t({...e,google_grounding:r}),helper:"Ground responses in web search (Gemini only)"})]})}function JQe({data:e,onChange:t}){return p.jsxs("div",{className:"space-y-4",children:[p.jsx(vi,{text:di.weather}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx(Oo,{label:"Primary Provider",value:e.primary,onChange:r=>t({...e,primary:r}),options:[{value:"openmeteo",label:"Open-Meteo"},{value:"wttr",label:"wttr.in"},{value:"llm",label:"LLM"}],helper:"Main weather data source"}),p.jsx(Oo,{label:"Fallback Provider",value:e.fallback,onChange:r=>t({...e,fallback:r}),options:[{value:"openmeteo",label:"Open-Meteo"},{value:"wttr",label:"wttr.in"},{value:"llm",label:"LLM"},{value:"none",label:"None"}],helper:"Backup if primary fails"})]}),p.jsx(xt,{label:"Default Location",value:e.default_location,onChange:r=>t({...e,default_location:r}),placeholder:"Your city, state",helper:"Location when none specified"})]})}function QQe({data:e,onChange:t}){return p.jsxs("div",{className:"space-y-4",children:[p.jsx(vi,{text:di.meshmonitor}),p.jsx(yr,{label:"Enable MeshMonitor",checked:e.enabled,onChange:r=>t({...e,enabled:r}),helper:"Connect to AIDA MeshMonitor instance",info:"MeshMonitor by Yeraze provides node data, battery info, telemetry, and auto-responder patterns. MeshAI uses this as a data source and avoids duplicate responses."}),e.enabled&&p.jsxs(p.Fragment,{children:[p.jsx(xt,{label:"URL",value:e.url,onChange:r=>t({...e,url:r}),placeholder:"http://192.168.1.100:8080",helper:"MeshMonitor API endpoint",info:"Full URL to your MeshMonitor instance. Usually runs on port 8080."}),p.jsx(yr,{label:"Inject Into Prompt",checked:e.inject_into_prompt,onChange:r=>t({...e,inject_into_prompt:r}),helper:"Tell LLM about MeshMonitor commands",info:"Adds MeshMonitor's auto-responder patterns to the LLM context so it knows what commands MeshMonitor handles."}),p.jsx(Je,{label:"Refresh Interval (sec)",value:e.refresh_interval,onChange:r=>t({...e,refresh_interval:r}),min:10,helper:"How often to fetch patterns"}),p.jsx(yr,{label:"Polite Mode",checked:e.polite_mode,onChange:r=>t({...e,polite_mode:r}),helper:"Reduce polling frequency",info:"Reduces polling frequency for shared instances to be a good neighbor."})]})]})}function eet({data:e,onChange:t}){return p.jsxs("div",{className:"space-y-4",children:[p.jsx(vi,{text:di.knowledge}),p.jsx(yr,{label:"Enable Knowledge Base",checked:e.enabled,onChange:r=>t({...e,enabled:r}),helper:"Answer questions from stored documents",info:"Uses RAG (Retrieval-Augmented Generation) to answer questions from a knowledge base. Supports Qdrant vector database or local SQLite with FTS5."}),e.enabled&&p.jsxs(p.Fragment,{children:[p.jsx(Oo,{label:"Backend",value:e.backend,onChange:r=>t({...e,backend:r}),options:[{value:"auto",label:"Auto (Qdrant -> SQLite)"},{value:"qdrant",label:"Qdrant"},{value:"sqlite",label:"SQLite"}],helper:"Knowledge storage backend",info:"Auto tries Qdrant first, falls back to SQLite. Qdrant provides hybrid search with dense+sparse embeddings. SQLite uses FTS5 keyword search."}),(e.backend==="qdrant"||e.backend==="auto")&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx(xt,{label:"Qdrant Host",value:e.qdrant_host,onChange:r=>t({...e,qdrant_host:r}),helper:"Qdrant server hostname",info:"IP or hostname of your Qdrant vector database server."}),p.jsx(Je,{label:"Qdrant Port",value:e.qdrant_port,onChange:r=>t({...e,qdrant_port:r}),helper:"Default 6333"})]}),p.jsx(xt,{label:"Collection",value:e.qdrant_collection,onChange:r=>t({...e,qdrant_collection:r}),helper:"Qdrant collection name"}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx(xt,{label:"TEI Host",value:e.tei_host,onChange:r=>t({...e,tei_host:r}),helper:"Text Embeddings Inference host",info:"TEI service for generating dense embeddings. Uses BAAI/bge-m3 model."}),p.jsx(Je,{label:"TEI Port",value:e.tei_port,onChange:r=>t({...e,tei_port:r}),helper:"Default 8090"})]}),p.jsx(yr,{label:"Use Sparse Embeddings",checked:e.use_sparse,onChange:r=>t({...e,use_sparse:r}),helper:"Enable hybrid search with sparse vectors",info:"Combines dense embeddings with sparse (keyword-based) embeddings using Reciprocal Rank Fusion for better search results."})]}),p.jsx(xt,{label:"SQLite DB Path",value:e.db_path,onChange:r=>t({...e,db_path:r}),helper:"Local knowledge database file"}),p.jsx(Je,{label:"Top K Results",value:e.top_k,onChange:r=>t({...e,top_k:r}),min:1,max:20,helper:"Number of documents to retrieve"})]})]})}function tet({source:e,onChange:t,onDelete:r}){const[n,i]=G.useState(!1),a={meshview:"Web-based mesh monitoring tool. Enter the full URL of a MeshView instance. No API key typically required.",meshmonitor:"AIDA MeshMonitor API. Provides node data and network statistics. Requires API token.",mqtt:"Subscribe directly to a Meshtastic MQTT broker for real-time packet data. This is push-based (instant) vs the polling approach of MeshView/MeshMonitor."};return p.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg overflow-hidden",children:[p.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#0a0e17] cursor-pointer",onClick:()=>i(!n),children:[p.jsxs("div",{className:"flex items-center gap-3",children:[n?p.jsx(_u,{size:16}):p.jsx(lu,{size:16}),p.jsx("div",{className:`w-2 h-2 rounded-full ${e.enabled?"bg-green-500":"bg-slate-500"}`}),p.jsx("span",{className:"font-mono text-sm text-slate-200",children:e.name||"Unnamed Source"}),p.jsx("span",{className:"text-xs text-slate-500 bg-[#1e2a3a] px-2 py-0.5 rounded",children:e.type})]}),p.jsx("button",{onClick:o=>{o.stopPropagation(),r()},className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded",children:p.jsx(Qy,{size:14})})]}),n&&p.jsxs("div",{className:"p-4 space-y-4 border-t border-[#1e2a3a]",children:[p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx(xt,{label:"Name",value:e.name,onChange:o=>t({...e,name:o}),helper:"Friendly name for this source"}),p.jsx(Oo,{label:"Type",value:e.type,onChange:o=>t({...e,type:o}),options:[{value:"meshview",label:"MeshView"},{value:"meshmonitor",label:"MeshMonitor"},{value:"mqtt",label:"MQTT Broker"}],info:a[e.type]||""})]}),e.type!=="mqtt"&&p.jsx(xt,{label:"URL",value:e.url,onChange:o=>t({...e,url:o}),helper:"Full URL including protocol"}),e.type==="meshmonitor"&&p.jsx(xt,{label:"API Token",value:e.api_token,onChange:o=>t({...e,api_token:o}),type:"password",helper:"Bearer token for authentication"}),e.type==="mqtt"&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx(xt,{label:"Host",value:e.host||"",onChange:o=>t({...e,host:o}),helper:"MQTT broker hostname"}),p.jsx(Je,{label:"Port",value:e.port||1883,onChange:o=>t({...e,port:o}),min:1,max:65535,helper:"1883 plain, 8883 TLS"})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx(xt,{label:"Username",value:e.username||"",onChange:o=>t({...e,username:o})}),p.jsx(xt,{label:"Password",value:e.password||"",onChange:o=>t({...e,password:o}),type:"password"})]}),p.jsx(xt,{label:"Topic Root",value:e.topic_root||"msh/US",onChange:o=>t({...e,topic_root:o}),helper:"Base topic to subscribe to"}),p.jsx(yr,{label:"Use TLS",checked:e.use_tls||!1,onChange:o=>t({...e,use_tls:o}),helper:"Encrypt MQTT connection"})]}),p.jsx(Je,{label:"Refresh Interval (sec)",value:e.refresh_interval,onChange:o=>t({...e,refresh_interval:o}),min:10,helper:"Polling frequency"}),p.jsx(yr,{label:"Enabled",checked:e.enabled,onChange:o=>t({...e,enabled:o})}),p.jsx(yr,{label:"Polite Mode",checked:e.polite_mode,onChange:o=>t({...e,polite_mode:o}),helper:"Reduce polling for shared instances"})]})]})}function ret({data:e,onChange:t}){const r=()=>{t([...e,{name:"New Source",type:"meshview",url:"",api_token:"",refresh_interval:30,polite_mode:!1,enabled:!0,host:"",port:1883,username:"",password:"",topic_root:"msh/US",use_tls:!1}])};return p.jsxs("div",{className:"space-y-4",children:[p.jsx(vi,{text:di.mesh_sources}),e.map((n,i)=>p.jsx(tet,{source:n,onChange:a=>{const o=[...e];o[i]=a,t(o)},onDelete:()=>{confirm(`Delete source "${n.name}"?`)&&t(e.filter((a,o)=>o!==i))}},i)),p.jsxs("button",{onClick:r,className:"w-full py-2 border border-dashed border-[#1e2a3a] rounded-lg text-slate-500 hover:text-slate-300 hover:border-accent flex items-center justify-center gap-2 transition-colors",children:[p.jsx(xv,{size:16})," Add Source"]})]})}function net({data:e,onChange:t}){const[r,n]=G.useState(null);return p.jsxs("div",{className:"space-y-6",children:[p.jsx(vi,{text:di.mesh_intelligence}),p.jsx(yr,{label:"Enable Mesh Intelligence",checked:e.enabled,onChange:i=>t({...e,enabled:i}),helper:"Activate health scoring and alerting"}),e.enabled&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx(Je,{label:"Locality Radius (miles)",value:e.locality_radius_miles,onChange:i=>t({...e,locality_radius_miles:i}),min:1,step:.5,helper:"Region assignment radius",info:"Nodes within this distance of a region anchor point are assigned to that region."}),p.jsx(Je,{label:"Offline Threshold (hours)",value:e.offline_threshold_hours,onChange:i=>t({...e,offline_threshold_hours:i}),min:1,helper:"Time until node marked offline",info:"A node is considered offline after not being heard for this many hours."})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx(Je,{label:"Packet Threshold",value:e.packet_threshold,onChange:i=>t({...e,packet_threshold:i}),min:0,helper:"Min packets per 24h to flag",info:"Minimum packets per 24 hours. Nodes below this are flagged as low activity."}),p.jsx(Je,{label:"Battery Warning %",value:e.battery_warning_percent,onChange:i=>t({...e,battery_warning_percent:i}),min:1,max:100,helper:"Global battery warning level"})]}),p.jsx(t3,{label:"Critical Nodes",value:e.critical_nodes,onChange:i=>t({...e,critical_nodes:i}),helper:"Critical infrastructure nodes",info:"Nodes that get priority alerting when they go offline.",roleFilter:"infrastructure"}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx(r3,{label:"Alert Channel",value:e.alert_channel,onChange:i=>t({...e,alert_channel:i}),helper:"Channel for broadcast alerts",info:"Meshtastic channel for broadcast alerts. Select Disabled to turn off channel broadcasting.",mode:"single",includeDisabled:!0}),p.jsx(Je,{label:"Alert Cooldown (min)",value:e.alert_cooldown_minutes,onChange:i=>t({...e,alert_cooldown_minutes:i}),min:1,helper:"Min time between repeat alerts",info:"Minimum minutes between repeated alerts for the same condition. Uses scaling cooldown (12h, 24h, 48h)."})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Regions",p.jsx(qo,{info:"Regions group mesh nodes by geographic area. Each region has an anchor point (lat/lon) and nodes within the region radius are automatically assigned. Regions enable localized reports, alerts, and health scoring."})]}),e.regions.map((i,a)=>p.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg overflow-hidden",children:[p.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#0a0e17] cursor-pointer",onClick:()=>n(r===a?null:a),children:[p.jsxs("div",{className:"flex items-center gap-3",children:[r===a?p.jsx(_u,{size:16}):p.jsx(lu,{size:16}),p.jsx("span",{className:"font-medium text-slate-200",children:i.name||"Unnamed Region"}),p.jsx("span",{className:"text-xs text-slate-500",children:i.local_name})]}),p.jsx("button",{onClick:o=>{if(o.stopPropagation(),confirm(`Delete region "${i.name||"Unnamed Region"}"?`)){const s=e.regions.filter((l,u)=>u!==a);t({...e,regions:s})}},className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded",children:p.jsx(Qy,{size:14})})]}),r===a&&p.jsxs("div",{className:"p-4 space-y-3 border-t border-[#1e2a3a]",children:[p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx(xt,{label:"Name",value:i.name,onChange:o=>{const s=[...e.regions];s[a]={...i,name:o},t({...e,regions:s})}}),p.jsx(xt,{label:"Local Name",value:i.local_name,onChange:o=>{const s=[...e.regions];s[a]={...i,local_name:o},t({...e,regions:s})}})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx(Je,{label:"Latitude",value:i.lat,onChange:o=>{const s=[...e.regions];s[a]={...i,lat:o},t({...e,regions:s})},step:1e-4}),p.jsx(Je,{label:"Longitude",value:i.lon,onChange:o=>{const s=[...e.regions];s[a]={...i,lon:o},t({...e,regions:s})},step:1e-4})]}),p.jsx(xt,{label:"Description",value:i.description,onChange:o=>{const s=[...e.regions];s[a]={...i,description:o},t({...e,regions:s})}}),p.jsx(Qh,{label:"Aliases",value:i.aliases,onChange:o=>{const s=[...e.regions];s[a]={...i,aliases:o},t({...e,regions:s})}}),p.jsx(Qh,{label:"Cities",value:i.cities,onChange:o=>{const s=[...e.regions];s[a]={...i,cities:o},t({...e,regions:s})}})]})]},a)),p.jsxs("button",{onClick:()=>{const i={name:"",local_name:"",lat:0,lon:0,description:"",aliases:[],cities:[]};t({...e,regions:[...e.regions,i]}),n(e.regions.length)},className:"w-full py-2 border border-dashed border-[#1e2a3a] rounded-lg text-slate-500 hover:text-slate-300 hover:border-accent flex items-center justify-center gap-2 transition-colors",children:[p.jsx(xv,{size:16})," Add Region"]})]}),p.jsxs("div",{className:"space-y-3",children:[p.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Alert Rules",p.jsx(qo,{info:"Configure which conditions trigger alerts. Each rule can have an optional threshold value."})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx("h4",{className:"text-xs text-slate-400 font-medium",children:"Infrastructure"}),p.jsx(kn,{label:"Infra Offline",description:"Alert when an infrastructure node (router/repeater) goes offline",checked:e.alert_rules.infra_offline,onChange:i=>t({...e,alert_rules:{...e.alert_rules,infra_offline:i}})}),p.jsx(kn,{label:"Infra Recovery",description:"Alert when an offline infrastructure node comes back online",checked:e.alert_rules.infra_recovery,onChange:i=>t({...e,alert_rules:{...e.alert_rules,infra_recovery:i}})}),p.jsx(kn,{label:"New Router",description:"Alert when a new router/repeater appears on the mesh",checked:e.alert_rules.new_router,onChange:i=>t({...e,alert_rules:{...e.alert_rules,new_router:i}})}),p.jsx(kn,{label:"Feeder Offline",description:"Alert when a data source (MeshView/MeshMonitor) stops responding",checked:e.alert_rules.feeder_offline,onChange:i=>t({...e,alert_rules:{...e.alert_rules,feeder_offline:i}})}),p.jsx(kn,{label:"Single Gateway",description:"Alert when an infrastructure node has only one connection path",checked:e.alert_rules.infra_single_gateway,onChange:i=>t({...e,alert_rules:{...e.alert_rules,infra_single_gateway:i}})}),p.jsx(kn,{label:"Region Blackout",description:"Alert when all infrastructure in a region goes offline",checked:e.alert_rules.region_total_blackout,onChange:i=>t({...e,alert_rules:{...e.alert_rules,region_total_blackout:i}})})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx("h4",{className:"text-xs text-slate-400 font-medium",children:"Power"}),p.jsx(kn,{label:"Battery Warning",description:"Alert when infra node battery drops below warning threshold",checked:e.alert_rules.battery_warning,onChange:i=>t({...e,alert_rules:{...e.alert_rules,battery_warning:i}}),threshold:e.alert_rules.battery_warning_threshold,onThresholdChange:i=>t({...e,alert_rules:{...e.alert_rules,battery_warning_threshold:i}}),thresholdLabel:"Below",thresholdMin:10,thresholdMax:90,thresholdSuffix:"%"}),p.jsx(kn,{label:"Battery Critical",description:"Alert at critical battery level",checked:e.alert_rules.battery_critical,onChange:i=>t({...e,alert_rules:{...e.alert_rules,battery_critical:i}}),threshold:e.alert_rules.battery_critical_threshold,onThresholdChange:i=>t({...e,alert_rules:{...e.alert_rules,battery_critical_threshold:i}}),thresholdLabel:"Below",thresholdMin:5,thresholdMax:50,thresholdSuffix:"%"}),p.jsx(kn,{label:"Battery Emergency",description:"Alert at emergency battery level",checked:e.alert_rules.battery_emergency,onChange:i=>t({...e,alert_rules:{...e.alert_rules,battery_emergency:i}}),threshold:e.alert_rules.battery_emergency_threshold,onThresholdChange:i=>t({...e,alert_rules:{...e.alert_rules,battery_emergency_threshold:i}}),thresholdLabel:"Below",thresholdMin:1,thresholdMax:25,thresholdSuffix:"%"}),p.jsx(kn,{label:"Battery Trend Declining",description:"Alert when battery shows a declining trend over 7 days",checked:e.alert_rules.battery_trend_declining,onChange:i=>t({...e,alert_rules:{...e.alert_rules,battery_trend_declining:i}})}),p.jsx(kn,{label:"Power Source Change",description:"Alert when a node switches between battery and USB power",checked:e.alert_rules.power_source_change,onChange:i=>t({...e,alert_rules:{...e.alert_rules,power_source_change:i}})}),p.jsx(kn,{label:"Solar Not Charging",description:"Alert when a solar-powered node isn't charging during daylight",checked:e.alert_rules.solar_not_charging,onChange:i=>t({...e,alert_rules:{...e.alert_rules,solar_not_charging:i}})})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx("h4",{className:"text-xs text-slate-400 font-medium",children:"Utilization"}),p.jsx(kn,{label:"High Utilization",description:"Alert when channel utilization stays high for extended periods",checked:e.alert_rules.sustained_high_util,onChange:i=>t({...e,alert_rules:{...e.alert_rules,sustained_high_util:i}}),threshold:e.alert_rules.high_util_threshold,onThresholdChange:i=>t({...e,alert_rules:{...e.alert_rules,high_util_threshold:i}}),thresholdLabel:"Above",thresholdMin:5,thresholdMax:50,thresholdSuffix:`% for ${e.alert_rules.high_util_hours}h`}),p.jsx(kn,{label:"Packet Flood",description:"Alert when a single node sends excessive packets",checked:e.alert_rules.packet_flood,onChange:i=>t({...e,alert_rules:{...e.alert_rules,packet_flood:i}}),threshold:e.alert_rules.packet_flood_threshold,onThresholdChange:i=>t({...e,alert_rules:{...e.alert_rules,packet_flood_threshold:i}}),thresholdLabel:"Over",thresholdMin:100,thresholdMax:2e3,thresholdSuffix:"pkts/24h"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx("h4",{className:"text-xs text-slate-400 font-medium",children:"Health Scores"}),p.jsx(kn,{label:"Mesh Score Alert",description:"Alert when overall mesh health score drops below threshold",checked:e.alert_rules.mesh_score_alert,onChange:i=>t({...e,alert_rules:{...e.alert_rules,mesh_score_alert:i}}),threshold:e.alert_rules.mesh_score_threshold,onThresholdChange:i=>t({...e,alert_rules:{...e.alert_rules,mesh_score_threshold:i}}),thresholdLabel:"Below",thresholdMin:30,thresholdMax:90,thresholdSuffix:"/100"}),p.jsx(kn,{label:"Region Score Alert",description:"Alert when a region's health score drops below threshold",checked:e.alert_rules.region_score_alert,onChange:i=>t({...e,alert_rules:{...e.alert_rules,region_score_alert:i}}),threshold:e.alert_rules.region_score_threshold,onThresholdChange:i=>t({...e,alert_rules:{...e.alert_rules,region_score_threshold:i}}),thresholdLabel:"Below",thresholdMin:30,thresholdMax:90,thresholdSuffix:"/100"})]})]})]})]})}function iet({data:e,onChange:t}){return p.jsxs("div",{className:"space-y-4",children:[p.jsx(vi,{text:di.dashboard}),p.jsx(yr,{label:"Enable Dashboard",checked:e.enabled,onChange:r=>t({...e,enabled:r}),helper:"Run the web dashboard"}),e.enabled&&p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx(xt,{label:"Host",value:e.host,onChange:r=>t({...e,host:r}),placeholder:"0.0.0.0",helper:"Network bind address",info:"0.0.0.0 = accessible from any device on the network. 127.0.0.1 = only accessible from this machine."}),p.jsx(Je,{label:"Port",value:e.port,onChange:r=>t({...e,port:r}),min:1,max:65535,helper:"Dashboard URL port",info:"Port number for the web dashboard URL. You access the dashboard at http://your-ip:port"})]})]})}function aet(){var I;const[e,t]=G.useState(null),[r,n]=G.useState(null),[i,a]=G.useState("bot"),[o,s]=G.useState(!0),[l,u]=G.useState(!1),[c,f]=G.useState(null),[h,d]=G.useState(null),[v,m]=G.useState(!1),[y,x]=G.useState(!1),_=G.useCallback(async()=>{try{const k=await fetch("/api/config");if(!k.ok)throw new Error("Failed to fetch config");const E=await k.json();t(E),n(JSON.parse(JSON.stringify(E))),x(!1),f(null)}catch(k){f(k instanceof Error?k.message:"Unknown error")}finally{s(!1)}},[]);G.useEffect(()=>{document.title="Config — MeshAI",_()},[_]),G.useEffect(()=>{e&&r&&x(JSON.stringify(e)!==JSON.stringify(r))},[e,r]);const b=async()=>{if(e){u(!0),f(null),d(null);try{const k=e[i],E=await fetch(`/api/config/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)}),D=await E.json();if(!E.ok)throw new Error(D.detail||"Save failed");d(`${i} saved successfully`),n(JSON.parse(JSON.stringify(e))),x(!1),D.restart_required&&(m(!0),zce(Array.isArray(D.changed_keys)?D.changed_keys:[])),setTimeout(()=>d(null),3e3)}catch(k){f(k instanceof Error?k.message:"Save failed")}finally{u(!1)}}},S=()=>{r&&(t(JSON.parse(JSON.stringify(r))),x(!1))},T=async()=>{try{await fetch("/api/restart",{method:"POST"}),m(!1),d("Restart initiated")}catch{f("Restart failed")}},C=(k,E)=>{e&&t({...e,[k]:E})};if(o)return p.jsx("div",{className:"flex items-center justify-center h-64",children:p.jsx("div",{className:"text-slate-400",children:"Loading configuration..."})});if(!e)return p.jsx("div",{className:"flex items-center justify-center h-64",children:p.jsx("div",{className:"text-red-400",children:"Failed to load configuration"})});const A=()=>{switch(i){case"bot":return p.jsx(WQe,{data:e.bot,onChange:k=>C("bot",k)});case"connection":return p.jsx(HQe,{data:e.connection,onChange:k=>C("connection",k)});case"response":return p.jsx(UQe,{data:e.response,onChange:k=>C("response",k)});case"history":return p.jsx(ZQe,{data:e.history,onChange:k=>C("history",k)});case"memory":return p.jsx(YQe,{data:e.memory,onChange:k=>C("memory",k)});case"context":return p.jsx(XQe,{data:e.context,onChange:k=>C("context",k)});case"commands":return p.jsx(qQe,{data:e.commands,onChange:k=>C("commands",k)});case"llm":return p.jsx(KQe,{data:e.llm,onChange:k=>C("llm",k)});case"weather":return p.jsx(JQe,{data:e.weather,onChange:k=>C("weather",k)});case"meshmonitor":return p.jsx(QQe,{data:e.meshmonitor,onChange:k=>C("meshmonitor",k)});case"knowledge":return p.jsx(eet,{data:e.knowledge,onChange:k=>C("knowledge",k)});case"mesh_sources":return p.jsx(ret,{data:e.mesh_sources,onChange:k=>C("mesh_sources",k)});case"mesh_intelligence":return p.jsx(net,{data:e.mesh_intelligence,onChange:k=>C("mesh_intelligence",k)});case"dashboard":return p.jsx(iet,{data:e.dashboard,onChange:k=>C("dashboard",k)});default:return null}},P=((I=n7.find(k=>k.key===i))==null?void 0:I.label)||i;return p.jsxs("div",{className:"flex gap-6 h-[calc(100vh-8rem)]",children:[p.jsx("div",{className:"w-48 flex-shrink-0 space-y-1",children:n7.map(({key:k,label:E,icon:D})=>p.jsxs("button",{onClick:()=>a(k),className:`w-full flex items-center gap-2 px-3 py-2 rounded text-sm transition-colors ${i===k?"bg-accent text-white":"text-slate-400 hover:text-slate-200 hover:bg-bg-hover"}`,children:[p.jsx(D,{size:16}),p.jsx("span",{children:E}),y&&i===k&&p.jsx("span",{className:"ml-auto w-2 h-2 bg-amber-500 rounded-full"})]},k))}),p.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[p.jsxs("div",{className:"flex items-center justify-between mb-6",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx(WZ,{size:20,className:"text-slate-500"}),p.jsx("h2",{className:"text-lg font-semibold text-slate-200",children:P})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[y&&p.jsxs("button",{onClick:S,className:"flex items-center gap-1.5 px-3 py-1.5 text-sm text-slate-400 hover:text-slate-200 bg-bg-hover rounded transition-colors",children:[p.jsx(DS,{size:14}),"Discard"]}),p.jsxs("button",{onClick:b,disabled:l||!y,className:"flex items-center gap-1.5 px-4 py-1.5 text-sm bg-accent text-white rounded hover:bg-accent/80 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:[l?p.jsx(km,{size:14,className:"animate-spin"}):p.jsx(cD,{size:14}),"Save"]})]})]}),v&&p.jsxs("div",{className:"flex items-center justify-between p-3 mb-4 bg-amber-500/10 border border-amber-500/30 rounded-lg",children:[p.jsxs("div",{className:"flex items-center gap-2 text-amber-400",children:[p.jsx($s,{size:16}),p.jsx("span",{className:"text-sm",children:"Restart required for changes to take effect"})]}),p.jsx("button",{onClick:T,className:"px-3 py-1 text-sm bg-amber-500 text-white rounded hover:bg-amber-600 transition-colors",children:"Restart Now"})]}),c&&p.jsxs("div",{className:"flex items-center gap-2 p-3 mb-4 bg-red-500/10 border border-red-500/30 rounded-lg text-red-400",children:[p.jsx(qa,{size:16}),p.jsx("span",{className:"text-sm",children:c})]}),h&&p.jsxs("div",{className:"flex items-center gap-2 p-3 mb-4 bg-green-500/10 border border-green-500/30 rounded-lg text-green-400",children:[p.jsx(Fo,{size:16}),p.jsx("span",{className:"text-sm",children:h})]}),p.jsx("div",{className:"flex-1 overflow-y-auto pr-2",children:p.jsx("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:A()})})]})]})}function oet({feed:e}){const t=e.is_loaded?e.consecutive_errors>0?"bg-amber-500":"bg-green-500":"bg-red-500",r=e.is_loaded?e.consecutive_errors>0?`${e.consecutive_errors} errors`:"Healthy":"Not loaded",n=e.last_fetch?new Date(e.last_fetch*1e3).toLocaleTimeString():"Never";return p.jsxs("div",{className:"bg-bg-hover rounded-lg p-4",children:[p.jsxs("div",{className:"flex items-center justify-between mb-2",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:`w-2 h-2 rounded-full ${t}`}),p.jsx("span",{className:"text-sm font-medium text-slate-200 uppercase",children:e.source})]}),p.jsx("span",{className:"text-xs text-slate-400",children:r})]}),p.jsxs("div",{className:"text-xs text-slate-500 space-y-1",children:[p.jsxs("div",{children:["Events: ",e.event_count]}),p.jsxs("div",{children:["Last fetch: ",n]}),e.last_error&&p.jsx("div",{className:"text-amber-500 truncate",children:e.last_error})]})]})}function set({event:e}){const t=e.severity.toLowerCase(),r=t==="extreme"||t==="severe"||t==="immediate"?{bg:"bg-red-500/10",border:"border-red-500",Icon:uu,color:"text-red-500"}:t==="moderate"||t==="warning"||t==="priority"?{bg:"bg-amber-500/10",border:"border-amber-500",Icon:$s,color:"text-amber-500"}:{bg:"bg-blue-500/10",border:"border-blue-500",Icon:OS,color:"text-blue-500"},n=r.Icon;return p.jsx("div",{className:`p-3 rounded-lg ${r.bg} border-l-2 ${r.border}`,children:p.jsxs("div",{className:"flex items-start gap-3",children:[p.jsx(n,{size:16,className:r.color}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[p.jsx("span",{className:"text-sm font-medium text-slate-200",children:e.event_type}),p.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${r.bg} ${r.color}`,children:e.severity})]}),p.jsx("div",{className:"text-sm text-slate-300",children:e.headline})]})]})})}function oae({value:e,onChange:t,disabled:r,centralDisabled:n}){const i="px-2 py-1 text-xs transition-colors";return p.jsxs("div",{className:`flex rounded border border-[#1e2a3a] overflow-hidden ${r?"opacity-40":""}`,children:[p.jsx("button",{type:"button",disabled:r,onClick:()=>t("native"),className:`${i} ${e==="native"?"bg-accent text-white":"text-slate-400 hover:text-slate-200"}`,children:"native"}),p.jsx("button",{type:"button",disabled:r||n,title:n?"Central not available for this adapter":"",onClick:()=>{n||t("central")},className:`${i} ${n?"text-slate-600 cursor-not-allowed":e==="central"?"bg-accent text-white":"text-slate-400 hover:text-slate-200"}`,children:"central"})]})}function uet({title:e,subtitle:t,enabled:r,onEnabled:n,feedSource:i,onFeedSource:a,hasCentral:o,nativeOnly:s,hasKey:l,health:u,events:c,children:f}){const h=s||!o;return p.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{children:[p.jsx("span",{className:"text-sm font-medium text-slate-300",children:e}),t&&p.jsx("p",{className:"text-xs text-slate-600",children:t})]}),p.jsxs("div",{className:"flex items-center gap-4",children:[p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx("span",{className:"text-[10px] uppercase tracking-wide text-slate-600",children:"source"}),p.jsx(oae,{value:i,onChange:a,disabled:!r,centralDisabled:h})]}),p.jsx(yr,{label:"",checked:r,onChange:n})]})]}),!l&&p.jsx("div",{className:"text-xs text-amber-400 bg-amber-500/10 rounded p-2",children:"API key not configured — contact admin"}),s&&p.jsx("div",{className:"text-[11px] text-slate-600",children:"Central not available for this adapter — native only"}),p.jsx("div",{className:r?"space-y-3":"space-y-3 opacity-40 pointer-events-none select-none",children:f}),(u||c&&c.length>0)&&p.jsxs("div",{className:"pt-2 border-t border-[#1e2a3a] space-y-3",children:[p.jsx("div",{className:"text-[10px] uppercase tracking-wide text-slate-600",children:"Live status"}),u?p.jsx(oet,{feed:u}):p.jsx("div",{className:"text-xs text-slate-600",children:"No status reported."}),c&&c.length>0&&p.jsx("div",{className:"space-y-2",children:c.slice(0,5).map((d,v)=>p.jsx(set,{event:d},v))})]})]})}const gl={nws:{label:"NWS Weather Alerts",subtitle:"National Weather Service alerts",health:"nws",hasCentral:!0,nativeOnly:!1,hasKey:!0},fires:{label:"NIFC Fire Perimeters",subtitle:"Active wildfires (National Interagency Fire Center)",health:"nifc",hasCentral:!0,nativeOnly:!1,hasKey:!0},firms:{label:"NASA FIRMS Hotspots",subtitle:"Satellite thermal-anomaly detections",health:"firms",hasCentral:!0,nativeOnly:!1,hasKey:!1},swpc:{label:"NOAA Space Weather (SWPC)",subtitle:"Solar indices, geomagnetic storms",health:"swpc",hasCentral:!0,nativeOnly:!1,hasKey:!0},ducting:{label:"Tropospheric Ducting",subtitle:"VHF/UHF extended-range conditions",health:"ducting",hasCentral:!1,nativeOnly:!0,hasKey:!0},traffic:{label:"TomTom Traffic",subtitle:"Traffic flow on monitored corridors",health:"traffic",hasCentral:!0,nativeOnly:!1,hasKey:!0},roads511:{label:"511 Road Conditions",subtitle:"State DOT road events and closures",health:"roads511",hasCentral:!0,nativeOnly:!1,hasKey:!1},usgs_quake:{label:"USGS Earthquakes",subtitle:"Seismic events from the USGS feed",health:"usgs_quake",hasCentral:!0,nativeOnly:!1,hasKey:!0},usgs:{label:"USGS Stream Gauges",subtitle:"River and stream water levels",health:"usgs",hasCentral:!0,nativeOnly:!1,hasKey:!0},avalanche:{label:"Avalanche Advisories",subtitle:"Backcountry avalanche danger ratings",health:"avalanche",hasCentral:!1,nativeOnly:!0,hasKey:!0}},wP=[{key:"central",label:"Central",icon:Tce,adapters:[]},{key:"weather",label:"Weather",icon:cu,adapters:["nws"]},{key:"fire",label:"Fire",icon:IS,adapters:["fires","firms"]},{key:"rf",label:"RF Propagation",icon:Xa,adapters:["swpc","ducting"]},{key:"roads",label:"Roads",icon:kS,adapters:["traffic","roads511"]},{key:"geohazards",label:"Geohazards",icon:ES,adapters:["usgs_quake","usgs","avalanche"]},{key:"tracking",label:"Tracking",icon:NS,adapters:[]},{key:"mesh",label:"Mesh Health",icon:mv,adapters:[]}];function cet(){var ve,ce;const[e,t]=G.useState(null),[r,n]=G.useState(""),[i,a]=G.useState(null),[o,s]=G.useState([]),[l,u]=G.useState(!0),[c,f]=G.useState(!1),[h,d]=G.useState(null),[v,m]=G.useState(null),[y,x]=G.useState(!1),[_,b]=G.useState("weather"),[S,T]=G.useState("nws"),[C,A]=G.useState({allowed_incident_types:["WF"],freshness_seconds:0,cooldown_seconds:28800,broadcast_on_acres:!0,broadcast_on_contained:!0}),[P,I]=G.useState(""),[k,E]=G.useState({digest_enabled:!0,digest_schedule:["06:00","18:00"],digest_timezone:"America/Boise"}),[D,N]=G.useState("");G.useEffect(()=>{document.title="Environment — MeshAI",(async()=>{var X,te,pe,Te,Me,Xe,At,Wt;try{const _r=await(await fetch("/api/config/environmental")).json();t(_r),n(JSON.stringify(_r));try{const Pr=await fetch("/api/adapter-config/wfigs");if(Pr.ok){const Cn=await Pr.json(),no={allowed_incident_types:((X=Cn.allowed_incident_types)==null?void 0:X.value)??["WF"],freshness_seconds:((te=Cn.freshness_seconds)==null?void 0:te.value)??0,cooldown_seconds:((pe=Cn.cooldown_seconds)==null?void 0:pe.value)??28800,broadcast_on_acres:((Te=Cn.broadcast_on_acres)==null?void 0:Te.value)??!0,broadcast_on_contained:((Me=Cn.broadcast_on_contained)==null?void 0:Me.value)??!0};A(no),I(JSON.stringify(no))}}catch{}try{const Pr=await fetch("/api/adapter-config/fires");if(Pr.ok){const Cn=await Pr.json(),no={digest_enabled:((Xe=Cn.digest_enabled)==null?void 0:Xe.value)??!0,digest_schedule:((At=Cn.digest_schedule)==null?void 0:At.value)??["06:00","18:00"],digest_timezone:((Wt=Cn.digest_timezone)==null?void 0:Wt.value)??"America/Boise"};E(no),N(JSON.stringify(no))}}catch{}}catch($r){d($r instanceof Error?$r.message:"Failed to load config")}finally{u(!1)}})()},[]),G.useEffect(()=>{const X=async()=>{try{a(await XZ()),s(await qZ())}catch{}};X();const te=setInterval(X,3e4);return()=>clearInterval(te)},[]);const z=e!==null&&JSON.stringify(e)!==r,V=JSON.stringify(C)!==P,F=JSON.stringify(k)!==D,$=z||V||F,B=async(X,te,pe)=>{const Te=await fetch(`/api/adapter-config/${X}/${te}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:pe})});if(!Te.ok){const Me=await Te.json().catch(()=>({}));throw new Error(Me.detail||`Failed to save ${X}.${te}`)}},H=async()=>{if(e){f(!0),d(null),m(null);try{if(z){const X=await fetch("/api/config/environmental",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),te=await X.json();if(!X.ok)throw new Error(te.detail||"Save failed");n(JSON.stringify(e)),te.restart_required&&x(!0)}if(V){const X=JSON.parse(P);C.freshness_seconds!==X.freshness_seconds&&await B("wfigs","freshness_seconds",C.freshness_seconds),JSON.stringify(C.allowed_incident_types)!==JSON.stringify(X.allowed_incident_types)&&await B("wfigs","allowed_incident_types",C.allowed_incident_types),C.cooldown_seconds!==X.cooldown_seconds&&await B("wfigs","cooldown_seconds",C.cooldown_seconds),C.broadcast_on_acres!==X.broadcast_on_acres&&await B("wfigs","broadcast_on_acres",C.broadcast_on_acres),C.broadcast_on_contained!==X.broadcast_on_contained&&await B("wfigs","broadcast_on_contained",C.broadcast_on_contained),I(JSON.stringify(C))}if(F){const X=JSON.parse(D);k.digest_enabled!==X.digest_enabled&&await B("fires","digest_enabled",k.digest_enabled),JSON.stringify(k.digest_schedule)!==JSON.stringify(X.digest_schedule)&&await B("fires","digest_schedule",k.digest_schedule),k.digest_timezone!==X.digest_timezone&&await B("fires","digest_timezone",k.digest_timezone),N(JSON.stringify(k))}m("Config saved"),setTimeout(()=>m(null),3e3)}catch(X){d(X instanceof Error?X.message:"Save failed")}finally{f(!1)}}},U=()=>{e&&t(JSON.parse(r)),A(JSON.parse(P||JSON.stringify(C))),E(JSON.parse(D||JSON.stringify(k)))},Y=async()=>{try{await fetch("/api/restart",{method:"POST"}),x(!1),m("Restart initiated")}catch{d("Restart failed")}},Z=X=>e&&t({...e,...X});if(l)return p.jsx("div",{className:"flex items-center justify-center h-64 text-slate-400",children:"Loading environmental config…"});if(!e)return p.jsx("div",{className:"flex items-center justify-center h-64 text-red-400",children:h||"No config"});const Q=X=>i==null?void 0:i.feeds.find(te=>te.source===gl[X].health),re=X=>o.filter(te=>te.source===gl[X].health),ue=wP.find(X=>X.key===_),de=ue.adapters.length===0?null:S&&ue.adapters.includes(S)?S:ue.adapters[0],Re=X=>{switch(X){case"nws":return p.jsxs(p.Fragment,{children:[p.jsx(Qh,{label:"NWS Zones",value:e.nws_zones,onChange:te=>Z({nws_zones:te}),helper:"Zone IDs like IDZ016, IDZ030",infoLink:"https://www.weather.gov/pimar/PubZone"}),p.jsx(xt,{label:"User Agent",value:e.nws.user_agent,onChange:te=>Z({nws:{...e.nws,user_agent:te}}),placeholder:"(MeshAI, you@email.com)",helper:"Format: (app_name, contact_email)"}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx(Je,{label:"Tick Seconds",value:e.nws.tick_seconds,onChange:te=>Z({nws:{...e.nws,tick_seconds:te}}),min:30}),p.jsx(Oo,{label:"Min Severity",value:e.nws.severity_min,onChange:te=>Z({nws:{...e.nws,severity_min:te}}),options:[{value:"minor",label:"Minor"},{value:"moderate",label:"Moderate"},{value:"severe",label:"Severe"},{value:"extreme",label:"Extreme"}]})]})]});case"swpc":return p.jsx("div",{className:"text-xs text-slate-500",children:"No additional settings."});case"ducting":return p.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[p.jsx(Je,{label:"Tick Seconds",value:e.ducting.tick_seconds,onChange:te=>Z({ducting:{...e.ducting,tick_seconds:te}}),min:60}),p.jsx(Je,{label:"Latitude",value:e.ducting.latitude,onChange:te=>Z({ducting:{...e.ducting,latitude:te}}),step:.01}),p.jsx(Je,{label:"Longitude",value:e.ducting.longitude,onChange:te=>Z({ducting:{...e.ducting,longitude:te}}),step:.01})]});case"fires":return p.jsxs("div",{className:"space-y-6",children:[e.fires.feed_source!=="central"&&p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx(Je,{label:"Tick Seconds",value:e.fires.tick_seconds,onChange:te=>Z({fires:{...e.fires,tick_seconds:te}}),min:60}),p.jsx(Oo,{label:"State",value:e.fires.state,onChange:te=>Z({fires:{...e.fires,state:te}}),options:FQe})]}),p.jsxs("div",{children:[p.jsx("div",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider mb-3",children:"Incident Types"}),p.jsx("div",{className:"flex gap-6",children:[["WF","Wildfire"],["RX","Prescribed Burn"],["OTHER","Other"]].map(([te,pe])=>{var Te;return p.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[p.jsx("input",{type:"checkbox",checked:((Te=C.allowed_incident_types)==null?void 0:Te.includes(te))??te==="WF",onChange:Me=>{const Xe=C.allowed_incident_types??["WF"];A({...C,allowed_incident_types:Me.target.checked?[...Xe,te]:Xe.filter(At=>At!==te)})},className:"w-4 h-4 rounded accent-blue-500"}),p.jsx("span",{className:"text-sm text-slate-300",children:pe})]},te)})})]}),p.jsxs("div",{children:[p.jsx("div",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider mb-3",children:"Broadcast Triggers"}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs("label",{className:"flex items-center justify-between",children:[p.jsx("span",{className:"text-sm text-slate-300",children:"Broadcast on acres increase"}),p.jsx("input",{type:"checkbox",checked:C.broadcast_on_acres,onChange:te=>A({...C,broadcast_on_acres:te.target.checked}),className:"w-4 h-4 rounded accent-blue-500"})]}),p.jsxs("label",{className:"flex items-center justify-between",children:[p.jsx("span",{className:"text-sm text-slate-300",children:"Broadcast on containment increase"}),p.jsx("input",{type:"checkbox",checked:C.broadcast_on_contained,onChange:te=>A({...C,broadcast_on_contained:te.target.checked}),className:"w-4 h-4 rounded accent-blue-500"})]})]})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx(Je,{label:"Update Cooldown (hours)",value:Math.round(C.cooldown_seconds/3600),onChange:te=>A({...C,cooldown_seconds:te*3600}),min:0,helper:"Minimum hours between updates for the same fire"}),p.jsx(Je,{label:"Freshness Window (hours)",value:Math.round(C.freshness_seconds/3600),onChange:te=>A({...C,freshness_seconds:te*3600}),min:0,helper:"0 = always broadcast regardless of event age"})]})]});case"avalanche":return p.jsxs(p.Fragment,{children:[p.jsx(Je,{label:"Tick Seconds",value:e.avalanche.tick_seconds,onChange:te=>Z({avalanche:{...e.avalanche,tick_seconds:te}}),min:60}),p.jsx(Qh,{label:"Center IDs",value:e.avalanche.center_ids,onChange:te=>Z({avalanche:{...e.avalanche,center_ids:te}}),helper:"e.g., SNFAC",infoLink:"https://avalanche.org/avalanche-centers/"}),p.jsx(GQe,{label:"Season Months",value:e.avalanche.season_months,onChange:te=>Z({avalanche:{...e.avalanche,season_months:te}}),helper:"e.g., 12, 1, 2, 3, 4"})]});case"usgs":return p.jsxs(p.Fragment,{children:[p.jsx(Je,{label:"Tick Seconds",value:e.usgs.tick_seconds,onChange:te=>Z({usgs:{...e.usgs,tick_seconds:te}}),min:900,helper:"Minimum 15 min (900s). tick_seconds is the native-mode poll interval; ignored when this adapter is set to feed_source=central."}),p.jsx(Qh,{label:"Site IDs",value:e.usgs.sites,onChange:te=>Z({usgs:{...e.usgs,sites:te}}),helper:"USGS gauge site numbers",infoLink:"https://waterdata.usgs.gov/nwis"})]});case"usgs_quake":return p.jsxs(p.Fragment,{children:[p.jsx(Je,{label:"Tick Seconds",value:e.usgs_quake.tick_seconds,onChange:te=>Z({usgs_quake:{...e.usgs_quake,tick_seconds:te}}),min:60}),p.jsx(Je,{label:"Min Magnitude",value:e.usgs_quake.min_magnitude,onChange:te=>Z({usgs_quake:{...e.usgs_quake,min_magnitude:te}}),step:.1,min:0}),p.jsx(xt,{label:"Region Tag",value:e.usgs_quake.region,onChange:te=>Z({usgs_quake:{...e.usgs_quake,region:te}})}),p.jsx("div",{className:"grid grid-cols-4 gap-2",children:["West","South","East","North"].map((te,pe)=>{var Te;return p.jsx(Je,{label:te,value:((Te=e.usgs_quake.bbox)==null?void 0:Te[pe])??0,onChange:Me=>{const Xe=[...e.usgs_quake.bbox||[0,0,0,0]];Xe[pe]=Me,Z({usgs_quake:{...e.usgs_quake,bbox:Xe}})},step:.01},te)})}),p.jsx("div",{className:"text-xs text-slate-500",children:"Bounding box [W,S,E,N] geographic filter"})]});case"traffic":return p.jsxs(p.Fragment,{children:[p.jsx(xt,{label:"API Key",value:e.traffic.api_key,onChange:te=>Z({traffic:{...e.traffic,api_key:te}}),type:"password",helper:"developer.tomtom.com"}),p.jsx(Je,{label:"Tick Seconds",value:e.traffic.tick_seconds,onChange:te=>Z({traffic:{...e.traffic,tick_seconds:te}}),min:60}),p.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Corridors:"}),(e.traffic.corridors||[]).map((te,pe)=>p.jsxs("div",{className:"grid grid-cols-4 gap-2 items-end",children:[p.jsx(xt,{label:"Name",value:te.name,onChange:Te=>{const Me=[...e.traffic.corridors];Me[pe]={...te,name:Te},Z({traffic:{...e.traffic,corridors:Me}})}}),p.jsx(Je,{label:"Lat",value:te.lat,onChange:Te=>{const Me=[...e.traffic.corridors];Me[pe]={...te,lat:Te},Z({traffic:{...e.traffic,corridors:Me}})},step:.01}),p.jsx(Je,{label:"Lon",value:te.lon,onChange:Te=>{const Me=[...e.traffic.corridors];Me[pe]={...te,lon:Te},Z({traffic:{...e.traffic,corridors:Me}})},step:.01}),p.jsx("button",{onClick:()=>Z({traffic:{...e.traffic,corridors:e.traffic.corridors.filter((Te,Me)=>Me!==pe)}}),className:"px-2 py-2 text-xs text-red-400 hover:text-red-300 border border-red-400/30 rounded",children:"Remove"})]},pe)),p.jsx("button",{onClick:()=>Z({traffic:{...e.traffic,corridors:[...e.traffic.corridors||[],{name:"",lat:0,lon:0}]}}),className:"text-xs text-accent hover:underline",children:"+ Add Corridor"})]});case"roads511":return p.jsxs(p.Fragment,{children:[p.jsx(xt,{label:"Base URL",value:e.roads511.base_url,onChange:te=>Z({roads511:{...e.roads511,base_url:te}}),placeholder:"https://511.yourstate.gov/api/v2"}),p.jsx(xt,{label:"API Key",value:e.roads511.api_key,onChange:te=>Z({roads511:{...e.roads511,api_key:te}}),type:"password",helper:"Leave empty if not required"}),p.jsx(Je,{label:"Tick Seconds",value:e.roads511.tick_seconds,onChange:te=>Z({roads511:{...e.roads511,tick_seconds:te}}),min:60}),p.jsx(Qh,{label:"Endpoints",value:e.roads511.endpoints,onChange:te=>Z({roads511:{...e.roads511,endpoints:te}}),helper:"e.g., /get/event"}),p.jsx("div",{className:"grid grid-cols-4 gap-2",children:["West","South","East","North"].map((te,pe)=>{var Te;return p.jsx(Je,{label:te,value:((Te=e.roads511.bbox)==null?void 0:Te[pe])??0,onChange:Me=>{const Xe=[...e.roads511.bbox||[0,0,0,0]];Xe[pe]=Me,Z({roads511:{...e.roads511,bbox:Xe}})},step:.01},te)})})]});case"firms":return p.jsxs(p.Fragment,{children:[p.jsx(xt,{label:"MAP Key",value:e.firms.map_key,onChange:te=>Z({firms:{...e.firms,map_key:te}}),type:"password",helper:"firms.modaps.eosdis.nasa.gov/api/area/",infoLink:"https://firms.modaps.eosdis.nasa.gov/api/area/"}),p.jsx(Je,{label:"Tick Seconds",value:e.firms.tick_seconds,onChange:te=>Z({firms:{...e.firms,tick_seconds:te}}),min:300}),p.jsx(Oo,{label:"Satellite Source",value:e.firms.source,onChange:te=>Z({firms:{...e.firms,source:te}}),options:[{value:"VIIRS_SNPP_NRT",label:"VIIRS SNPP (NRT)"},{value:"VIIRS_NOAA20_NRT",label:"VIIRS NOAA-20 (NRT)"},{value:"MODIS_NRT",label:"MODIS (NRT)"}]}),p.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[p.jsx(Je,{label:"Day Range",value:e.firms.day_range,onChange:te=>Z({firms:{...e.firms,day_range:te}}),min:1,max:10}),p.jsx(Oo,{label:"Min Confidence",value:e.firms.confidence_min,onChange:te=>Z({firms:{...e.firms,confidence_min:te}}),options:[{value:"low",label:"Low"},{value:"nominal",label:"Nominal"},{value:"high",label:"High"}]}),p.jsx(Je,{label:"Proximity (km)",value:e.firms.proximity_km,onChange:te=>Z({firms:{...e.firms,proximity_km:te}}),step:.5})]}),p.jsx("div",{className:"grid grid-cols-4 gap-2",children:["West","South","East","North"].map((te,pe)=>{var Te;return p.jsx(Je,{label:te,value:((Te=e.firms.bbox)==null?void 0:Te[pe])??0,onChange:Me=>{const Xe=[...e.firms.bbox||[0,0,0,0]];Xe[pe]=Me,Z({firms:{...e.firms,bbox:Xe}})},step:.01},te)})})]})}},xe=e,ie=(X,te)=>{const pe=e[X]||{};Z({[X]:{...pe,...te}})};return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("h1",{className:"text-xl font-semibold text-slate-200",children:"Environment"}),p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx(yr,{label:"Feeds Enabled",checked:e.enabled,onChange:X=>Z({enabled:X})}),$&&p.jsxs(p.Fragment,{children:[p.jsxs("button",{onClick:U,className:"flex items-center gap-1 px-3 py-1.5 text-sm text-slate-400 hover:text-slate-200 border border-border rounded",children:[p.jsx(DS,{size:14})," Discard"]}),p.jsxs("button",{onClick:H,disabled:c,className:"flex items-center gap-1 px-3 py-1.5 text-sm bg-accent text-white rounded disabled:opacity-50",children:[p.jsx(cD,{size:14})," ",c?"Saving…":"Save"]})]})]})]}),h&&p.jsx("div",{className:"text-sm text-red-400 bg-red-500/10 rounded p-3",children:h}),v&&p.jsx("div",{className:"text-sm text-green-400 bg-green-500/10 rounded p-3",children:v}),y&&p.jsxs("div",{className:"flex items-center justify-between text-sm text-amber-400 bg-amber-500/10 border border-amber-500/30 rounded p-3",children:[p.jsxs("span",{className:"flex items-center gap-2",children:[p.jsx(km,{size:14})," A restart is required for some changes to take effect."]}),p.jsx("button",{onClick:Y,className:"px-3 py-1 bg-amber-500/20 hover:bg-amber-500/30 rounded",children:"Restart now"})]}),p.jsx("div",{className:"flex gap-1 border-b border-border overflow-x-auto",children:wP.map(({key:X,label:te,icon:pe})=>p.jsxs("button",{onClick:()=>{b(X);const Te=wP.find(Me=>Me.key===X);T(Te.adapters[0]??null)},className:`flex items-center gap-2 px-4 py-2 text-sm whitespace-nowrap border-b-2 -mb-px transition-colors ${_===X?"border-accent text-accent":"border-transparent text-slate-400 hover:text-slate-200"}`,children:[p.jsx(pe,{size:15})," ",te]},X))}),_==="central"&&e.central&&p.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{children:[p.jsx("span",{className:"text-sm font-medium text-slate-300",children:"Central Connection"}),p.jsx("p",{className:"text-xs text-slate-600",children:'NATS JetStream source for any adapter set to "central"'})]}),p.jsx(yr,{label:"",checked:!!e.central.enabled,onChange:X=>Z({central:{...e.central,enabled:X}})})]}),p.jsxs("div",{className:e.central.enabled?"space-y-3":"space-y-3 opacity-40 pointer-events-none select-none",children:[p.jsx(xt,{label:"URL",value:e.central.url||"",onChange:X=>Z({central:{...e.central,url:X}}),placeholder:"nats://central.echo6.mesh:4222"}),p.jsx(xt,{label:"Durable",value:e.central.durable||"",onChange:X=>Z({central:{...e.central,durable:X}}),placeholder:"meshai-v04"}),p.jsx(xt,{label:"Region",value:e.central.region||"",onChange:X=>Z({central:{...e.central,region:X}}),placeholder:"us.id",helper:"Central v0.9.20 region token (dotted, e.g. 'us.id'). Empty = bare wildcards (all-US firehose). Each adapter is either Central or native, never both — see Reference → OR-not-AND Architecture for why."})]})]}),_==="tracking"&&p.jsxs("div",{className:"flex flex-col items-center justify-center h-[40vh] text-center",children:[p.jsx(NS,{size:32,className:"text-slate-600 mb-4"}),p.jsx("p",{className:"text-slate-500 max-w-md",children:"No adapters yet. ADS-B / AIS / satellite passes are planned for v0.5."})]}),_==="mesh"&&p.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{children:[p.jsx("span",{className:"text-sm font-medium text-slate-300",children:"Mesh Health"}),p.jsx("p",{className:"text-xs text-slate-600",children:"Node/infra telemetry — sourced from the mesh, not an environmental feed."})]}),p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx("span",{className:"text-[10px] uppercase tracking-wide text-slate-600",children:"source"}),p.jsx(oae,{value:"native",onChange:()=>{},disabled:!1,centralDisabled:!0})]})]}),p.jsx("div",{className:"text-[11px] text-slate-600",children:"Central not available — reserved for a future migration."})]}),ue.adapters.length>0&&de&&p.jsxs(p.Fragment,{children:[ue.adapters.length>1&&p.jsx("div",{className:"flex gap-1",children:ue.adapters.map(X=>p.jsx("button",{onClick:()=>T(X),className:`px-3 py-1.5 text-sm rounded ${de===X?"bg-bg-hover text-slate-100":"text-slate-400 hover:text-slate-200"}`,children:gl[X].label},X))}),p.jsx(uet,{title:gl[de].label,subtitle:gl[de].subtitle,enabled:((ve=xe[de])==null?void 0:ve.enabled)??!1,onEnabled:X=>ie(de,{enabled:X}),feedSource:((ce=xe[de])==null?void 0:ce.feed_source)??"native",onFeedSource:X=>ie(de,{feed_source:X}),hasCentral:gl[de].hasCentral,nativeOnly:gl[de].nativeOnly,hasKey:gl[de].hasKey,health:Q(de),events:re(de),children:Re(de)})]})]})}const i7={infra_offline:ZZ,infra_recovery:RS,battery_warning:yA,battery_critical:yA,battery_emergency:yA,hf_blackout:Lm,uhf_ducting:Xa,weather_warning:cu,weather_watch:cu,new_router:Xa,packet_flood:$s,sustained_high_util:$s,region_blackout:uu,default:Pm};function fet(e){return i7[e]||i7.default}function sae(e){switch(e==null?void 0:e.toLowerCase()){case"immediate":return{bg:"bg-red-500/10",border:"border-red-500",badge:"bg-red-500/20 text-red-400",iconColor:"text-red-500"};case"priority":return{bg:"bg-amber-500/10",border:"border-amber-500",badge:"bg-amber-500/20 text-amber-400",iconColor:"text-amber-500"};case"routine":default:return{bg:"bg-blue-500/10",border:"border-blue-500",badge:"bg-blue-500/20 text-blue-400",iconColor:"text-blue-500"}}}function het(e){const t=typeof e=="number"?new Date(e*1e3):new Date(e),n=new Date().getTime()-t.getTime(),i=Math.floor(n/1e3),a=Math.floor(i/60),o=Math.floor(a/60),s=Math.floor(o/24);return i<60?"Just now":a<60?`${a}m ago`:o<24?`${o}h ago`:`${s}d ago`}function det(e){return(typeof e=="number"?new Date(e*1e3):new Date(e)).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1})}function vet(e){return e<60?`${e}s`:e<3600?`${Math.floor(e/60)}m`:e<86400?`${Math.floor(e/3600)}h ${Math.floor(e%3600/60)}m`:`${Math.floor(e/86400)}d`}function pet({alert:e,onAcknowledge:t}){var i;const r=sae(e.severity),n=fet(e.type);return p.jsx("div",{className:`p-4 rounded-lg ${r.bg} border-l-4 ${r.border}`,children:p.jsxs("div",{className:"flex items-start gap-3",children:[p.jsx(n,{size:20,className:r.iconColor}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[p.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${r.badge}`,children:(i=e.severity)==null?void 0:i.toUpperCase()}),p.jsx("span",{className:"text-xs text-slate-500",children:e.type})]}),p.jsx("div",{className:"text-sm text-slate-200",children:e.message}),p.jsxs("div",{className:"flex items-center gap-4 mt-2 text-xs text-slate-500",children:[p.jsxs("span",{className:"flex items-center gap-1",children:[p.jsx(af,{size:12}),e.timestamp?het(e.timestamp):"Just now"]}),e.scope_value&&p.jsxs("span",{children:[e.scope_type,": ",e.scope_value]})]})]}),p.jsx("button",{onClick:()=>t(e),className:"px-3 py-1 text-xs text-slate-400 hover:text-slate-200 border border-border rounded hover:bg-bg-hover transition-colors",children:"Acknowledge"})]})})}function get({history:e,typeFilter:t,severityFilter:r,onTypeFilterChange:n,onSeverityFilterChange:i,page:a,totalPages:o,onPageChange:s}){const l=["all","infra_offline","infra_recovery","battery_warning","battery_critical","hf_blackout","uhf_ducting","weather_warning","new_router","packet_flood"],u=["all","immediate","priority","routine"];return p.jsxs("div",{className:"bg-bg-card border border-border rounded-lg",children:[p.jsxs("div",{className:"p-4 border-b border-border flex items-center gap-4",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(lD,{size:14,className:"text-slate-400"}),p.jsx("span",{className:"text-sm text-slate-400",children:"Filter:"})]}),p.jsx("select",{value:t,onChange:c=>n(c.target.value),className:"bg-bg border border-border rounded px-3 py-1.5 text-sm text-slate-200 focus:outline-none focus:border-blue-500",children:l.map(c=>p.jsx("option",{value:c,children:c==="all"?"All Types":c.replace(/_/g," ")},c))}),p.jsx("select",{value:r,onChange:c=>i(c.target.value),className:"bg-bg border border-border rounded px-3 py-1.5 text-sm text-slate-200 focus:outline-none focus:border-blue-500",children:u.map(c=>p.jsx("option",{value:c,children:c==="all"?"All Severities":c.charAt(0).toUpperCase()+c.slice(1)},c))})]}),p.jsx("div",{className:"overflow-x-auto",children:p.jsxs("table",{className:"w-full",children:[p.jsx("thead",{children:p.jsxs("tr",{className:"border-b border-border",children:[p.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Time"}),p.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Type"}),p.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Severity"}),p.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Message"}),p.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Duration"})]})}),p.jsx("tbody",{children:e.length>0?e.map((c,f)=>{const h=sae(c.severity);return p.jsxs("tr",{className:"border-b border-border hover:bg-bg-hover",children:[p.jsx("td",{className:"p-4 text-sm text-slate-400 font-mono whitespace-nowrap",children:det(c.timestamp)}),p.jsx("td",{className:"p-4 text-sm text-slate-300",children:c.type.replace(/_/g," ")}),p.jsx("td",{className:"p-4",children:p.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${h.badge}`,children:c.severity})}),p.jsx("td",{className:"p-4 text-sm text-slate-200 max-w-md truncate",children:c.message}),p.jsx("td",{className:"p-4 text-sm text-slate-400 font-mono",children:c.duration?vet(c.duration):"-"})]},c.id||f)}):p.jsx("tr",{children:p.jsx("td",{colSpan:5,className:"p-8 text-center text-slate-500",children:"No alert history available"})})})]})}),o>1&&p.jsxs("div",{className:"p-4 border-t border-border flex items-center justify-between",children:[p.jsxs("span",{className:"text-sm text-slate-400",children:["Page ",a," of ",o]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{onClick:()=>s(a-1),disabled:a<=1,className:"p-2 text-slate-400 hover:text-slate-200 disabled:opacity-50 disabled:cursor-not-allowed",children:p.jsx(dce,{size:16})}),p.jsx("button",{onClick:()=>s(a+1),disabled:a>=o,className:"p-2 text-slate-400 hover:text-slate-200 disabled:opacity-50 disabled:cursor-not-allowed",children:p.jsx(lu,{size:16})})]})]})]})}function met({subscription:e,nodes:t}){const r=o=>{const s=t.find(l=>l.node_id_hex===o||String(l.node_num)===o||l.short_name===o);return s?s.long_name&&s.long_name!==s.short_name?`${s.short_name} (${s.long_name})`:s.short_name:o},n=()=>{if(e.sub_type==="alerts")return"Real-time";const o=e.schedule_time||"0000",s=parseInt(o.slice(0,2)),l=o.slice(2),u=s>=12?"PM":"AM";let f=`${s%12||12}:${l} ${u}`;return e.sub_type==="weekly"&&e.schedule_day&&(f+=` ${e.schedule_day.charAt(0).toUpperCase()}${e.schedule_day.slice(1)}`),f},a=(()=>{switch(e.sub_type){case"alerts":return Pm;case"daily":return af;case"weekly":return af;default:return Pm}})();return p.jsx("div",{className:"p-4 rounded-lg bg-bg-hover border border-border",children:p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-500/10 flex items-center justify-center",children:p.jsx(a,{size:18,className:"text-blue-400"})}),p.jsxs("div",{className:"flex-1",children:[p.jsxs("div",{className:"text-sm text-slate-200 font-medium",children:[e.sub_type.charAt(0).toUpperCase()+e.sub_type.slice(1),e.scope_type!=="mesh"&&e.scope_value&&p.jsxs("span",{className:"text-slate-400 font-normal ml-2",children:["(",e.scope_type,": ",e.scope_value,")"]})]}),p.jsxs("div",{className:"text-xs text-slate-500 mt-0.5",children:[n()," • ",r(e.user_id)]})]}),p.jsx("div",{className:`w-2 h-2 rounded-full ${e.enabled?"bg-green-500":"bg-slate-500"}`})]})})}function yet(){const[e,t]=G.useState([]),[r,n]=G.useState([]),[i,a]=G.useState([]),[o,s]=G.useState([]),[l,u]=G.useState(!0),[c,f]=G.useState(null),[h,d]=G.useState("all"),[v,m]=G.useState("all"),[y,x]=G.useState(1),[_,b]=G.useState(1),S=20,[T,C]=G.useState(new Set),{lastAlert:A}=hD();G.useEffect(()=>{document.title="Alerts — MeshAI"},[]),G.useEffect(()=>{Promise.all([YZ().catch(()=>[]),AB(S,0).catch(()=>({items:[],total:0})),Ice().catch(()=>[]),fetch("/api/nodes").then(k=>k.json()).catch(()=>[])]).then(([k,E,D,N])=>{t(k),Array.isArray(E)?(n(E),b(1)):(n(E.items||[]),b(Math.ceil((E.total||0)/S))),a(D),s(N),u(!1)}).catch(k=>{f(k.message),u(!1)})},[]),G.useEffect(()=>{A&&t(k=>k.some(D=>D.type===A.type&&D.message===A.message)?k:[A,...k])},[A]),G.useEffect(()=>{const k=(y-1)*S;AB(S,k,h,v).then(E=>{Array.isArray(E)?(n(E),b(1)):(n(E.items||[]),b(Math.ceil((E.total||0)/S)))}).catch(()=>{})},[y,h,v]);const P=G.useCallback(k=>{const E=`${k.type}-${k.message}-${k.timestamp}`;C(D=>new Set([...D,E]))},[]),I=e.filter(k=>{const E=`${k.type}-${k.message}-${k.timestamp}`;return!T.has(E)});return l?p.jsx("div",{className:"flex items-center justify-center h-64",children:p.jsx("div",{className:"text-slate-400",children:"Loading alerts..."})}):c?p.jsx("div",{className:"flex items-center justify-center h-64",children:p.jsxs("div",{className:"text-red-400",children:["Error: ",c]})}):p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[p.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[p.jsx($s,{size:14}),"Active Alerts (",I.length,")"]}),I.length>0?p.jsx("div",{className:"space-y-3",children:I.map((k,E)=>p.jsx(pet,{alert:k,onAcknowledge:P},`${k.type}-${k.timestamp}-${E}`))}):p.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-8",children:[p.jsx(oD,{size:20,className:"text-green-500"}),p.jsx("span",{children:"No active alerts — all systems nominal"})]})]}),p.jsxs("div",{children:[p.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[p.jsx(af,{size:14}),"Alert History"]}),p.jsx(get,{history:r,typeFilter:h,severityFilter:v,onTypeFilterChange:k=>{d(k),x(1)},onSeverityFilterChange:k=>{m(k),x(1)},page:y,totalPages:_,onPageChange:x})]}),p.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[p.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[p.jsx(Ace,{size:14}),"Mesh Subscriptions (",i.length,")"]}),i.length>0?p.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:i.map(k=>p.jsx(met,{subscription:k,nodes:o},k.id))}):p.jsxs("div",{className:"text-slate-500 py-4",children:[p.jsx("p",{children:"No active subscriptions."}),p.jsxs("p",{className:"text-xs mt-2",children:["Manage subscriptions via ",p.jsx("code",{className:"text-blue-400",children:"!subscribe"})," on mesh. Broadcasts arrive with one of three prefixes — ",p.jsx("strong",{children:"New:"})," (first sight), ",p.jsx("strong",{children:"Update:"})," (material change), or ",p.jsx("strong",{children:"Active:"})," (clock-driven reminder while the event is still live). See ",p.jsx("a",{href:"/reference#broadcast-types",className:"text-blue-400 hover:underline",children:"Broadcast Types"})," and ",p.jsx("a",{href:"/reference#reminders",className:"text-blue-400 hover:underline",children:"Reminder System"})," in Reference."]})]})]})]})}const Tb=[{value:"routine",label:"Routine",description:"Informational, no time pressure (ducting, new node, weather advisory, battery declining)"},{value:"priority",label:"Priority",description:"Needs attention soon (severe weather, fire nearby, node offline, HF blackout)"},{value:"immediate",label:"Immediate",description:"Act now, drop everything (fire at infrastructure, extreme weather, region blackout)"}],a7=[{id:"mesh_health",name:"Mesh Health Monitoring",description:"Infrastructure problems - offline nodes, low battery, channel congestion",rule:{name:"Mesh Health Monitoring",enabled:!0,trigger_type:"condition",categories:["infra_offline","critical_node_down","infra_recovery","battery_warning","battery_critical","battery_emergency","high_utilization","packet_flood","mesh_score_low"],min_severity:"routine",delivery_type:"mesh_broadcast",broadcast_channel:0,cooldown_minutes:30,schedule_frequency:"daily",schedule_time:"07:00",schedule_time_2:"",schedule_days:[],message_type:"",custom_message:"",node_ids:[],smtp_host:"",smtp_port:587,smtp_user:"",smtp_password:"",smtp_tls:!0,from_address:"",recipients:[],webhook_url:"",webhook_headers:{}}},{id:"weather_fire",name:"Weather & Fire Alerts",description:"Environmental threats - severe weather, nearby wildfires, new ignitions, flooding",rule:{name:"Weather & Fire Alerts",enabled:!0,trigger_type:"condition",categories:["weather_warning","fire_proximity","new_ignition","stream_flood_warning"],min_severity:"priority",delivery_type:"mesh_broadcast",broadcast_channel:0,cooldown_minutes:15,schedule_frequency:"daily",schedule_time:"07:00",schedule_time_2:"",schedule_days:[],message_type:"",custom_message:"",node_ids:[],smtp_host:"",smtp_port:587,smtp_user:"",smtp_password:"",smtp_tls:!0,from_address:"",recipients:[],webhook_url:"",webhook_headers:{}}},{id:"rf_conditions",name:"RF Conditions",description:"Propagation changes - solar events, HF blackouts, tropospheric ducting",rule:{name:"RF Conditions",enabled:!0,trigger_type:"condition",categories:["hf_blackout","tropospheric_ducting","geomagnetic_storm"],min_severity:"routine",delivery_type:"mesh_broadcast",broadcast_channel:0,cooldown_minutes:60,schedule_frequency:"daily",schedule_time:"07:00",schedule_time_2:"",schedule_days:[],message_type:"",custom_message:"",node_ids:[],smtp_host:"",smtp_port:587,smtp_user:"",smtp_password:"",smtp_tls:!0,from_address:"",recipients:[],webhook_url:"",webhook_headers:{}}},{id:"road_traffic",name:"Road & Traffic",description:"Road closures and severe congestion",rule:{name:"Road & Traffic",enabled:!0,trigger_type:"condition",categories:["road_closure","traffic_congestion"],min_severity:"routine",delivery_type:"mesh_broadcast",broadcast_channel:0,cooldown_minutes:30,schedule_frequency:"daily",schedule_time:"07:00",schedule_time_2:"",schedule_days:[],message_type:"",custom_message:"",node_ids:[],smtp_host:"",smtp_port:587,smtp_user:"",smtp_password:"",smtp_tls:!0,from_address:"",recipients:[],webhook_url:"",webhook_headers:{}}},{id:"everything_critical",name:"Everything Critical",description:"All emergency-level events regardless of type",rule:{name:"Everything Critical",enabled:!0,trigger_type:"condition",categories:[],min_severity:"immediate",delivery_type:"mesh_broadcast",broadcast_channel:0,cooldown_minutes:5,schedule_frequency:"daily",schedule_time:"07:00",schedule_time_2:"",schedule_days:[],message_type:"",custom_message:"",node_ids:[],smtp_host:"",smtp_port:587,smtp_user:"",smtp_password:"",smtp_tls:!0,from_address:"",recipients:[],webhook_url:"",webhook_headers:{}}},{id:"morning_briefing",name:"Morning Briefing",description:"Daily health and conditions summary at 7am",rule:{name:"Morning Briefing",enabled:!0,trigger_type:"schedule",categories:[],min_severity:"routine",schedule_frequency:"daily",schedule_time:"07:00",schedule_time_2:"",schedule_days:[],message_type:"mesh_health_summary",custom_message:"",delivery_type:"mesh_broadcast",broadcast_channel:0,cooldown_minutes:0,node_ids:[],smtp_host:"",smtp_port:587,smtp_user:"",smtp_password:"",smtp_tls:!0,from_address:"",recipients:[],webhook_url:"",webhook_headers:{}}}];function G_(e){if(!e)return"Never";const r=Date.now()/1e3-e;return r<60?"Just now":r<3600?`${Math.floor(r/60)}m ago`:r<86400?`${Math.floor(r/3600)}h ago`:r<604800?`${Math.floor(r/86400)}d ago`:new Date(e*1e3).toLocaleDateString()}function aa({info:e}){const[t,r]=G.useState(!1);return p.jsxs("div",{className:"relative inline-block",children:[p.jsx("button",{type:"button",onClick:n=>{n.stopPropagation(),r(!t)},className:"ml-1.5 w-4 h-4 rounded-full bg-slate-700 hover:bg-slate-600 text-slate-400 hover:text-slate-200 inline-flex items-center justify-center text-xs transition-colors",title:"More info",children:"?"}),t&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>r(!1)}),p.jsx("div",{className:"absolute left-0 top-6 z-50 w-72 p-3 bg-[#1a2332] border border-[#2a3a4a] rounded-lg shadow-xl text-xs text-slate-300 leading-relaxed",children:e})]})]})}function Al({label:e,value:t,onChange:r,type:n="text",placeholder:i="",helper:a="",info:o=""}){const[s,l]=G.useState(!1),u=n==="password";return p.jsxs("div",{className:"space-y-1",children:[p.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,o&&p.jsx(aa,{info:o})]}),p.jsxs("div",{className:"relative",children:[p.jsx("input",{type:u&&!s?"password":"text",value:t,onChange:c=>r(c.target.value),placeholder:i,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),u&&p.jsx("button",{type:"button",onClick:()=>l(!s),className:"absolute right-2 top-1/2 -translate-y-1/2 text-slate-500 hover:text-slate-300",children:s?p.jsx($Z,{size:16}):p.jsx(sD,{size:16})})]}),a&&p.jsx("p",{className:"text-xs text-slate-600",children:a})]})}function Hy({label:e,value:t,onChange:r,min:n,max:i,step:a=1,helper:o="",info:s=""}){return p.jsxs("div",{className:"space-y-1",children:[p.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,s&&p.jsx(aa,{info:s})]}),p.jsx("input",{type:"number",value:t,onChange:l=>r(Number(l.target.value)),min:n,max:i,step:a,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent"}),o&&p.jsx("p",{className:"text-xs text-slate-600",children:o})]})}function fS({label:e,checked:t,onChange:r,helper:n="",info:i=""}){return p.jsxs("div",{className:"flex items-center justify-between py-2",children:[p.jsxs("div",{children:[p.jsxs("span",{className:"flex items-center text-sm text-slate-300",children:[e,i&&p.jsx(aa,{info:i})]}),n&&p.jsx("p",{className:"text-xs text-slate-600",children:n})]}),p.jsx("button",{type:"button",onClick:()=>r(!t),className:`relative w-11 h-6 rounded-full transition-colors ${t?"bg-accent":"bg-[#1e2a3a]"}`,children:p.jsx("span",{className:`absolute top-1 left-1 w-4 h-4 rounded-full bg-white transition-transform ${t?"translate-x-5":""}`})})]})}function lm({label:e,value:t,onChange:r,helper:n="",info:i=""}){return p.jsxs("div",{className:"space-y-1",children:[p.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,i&&p.jsx(aa,{info:i})]}),p.jsx("input",{type:"time",value:t,onChange:a=>r(a.target.value),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent"}),n&&p.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function Cb({label:e,value:t,onChange:r,placeholder:n="Add item...",helper:i="",info:a=""}){const[o,s]=G.useState(""),l=()=>{o.trim()&&!t.includes(o.trim())&&(r([...t,o.trim()]),s(""))},u=c=>{r(t.filter((f,h)=>h!==c))};return p.jsxs("div",{className:"space-y-1",children:[p.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,a&&p.jsx(aa,{info:a})]}),p.jsxs("div",{className:"flex gap-2",children:[p.jsx("input",{type:"text",value:o,onChange:c=>s(c.target.value),onKeyDown:c=>c.key==="Enter"&&(c.preventDefault(),l()),className:"flex-1 px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent",placeholder:n}),p.jsx("button",{type:"button",onClick:l,className:"px-3 py-2 bg-accent hover:bg-accent/80 rounded text-sm text-white transition-colors",children:p.jsx(xv,{size:16})})]}),t.length>0&&p.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:t.map((c,f)=>p.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-[#1e2a3a] rounded text-sm text-slate-300",children:[c,p.jsx("button",{type:"button",onClick:()=>u(f),className:"text-slate-500 hover:text-red-400",children:p.jsx(qa,{size:14})})]},f))}),i&&p.jsx("p",{className:"text-xs text-slate-600",children:i})]})}function lae({value:e,onChange:t}){const[r,n]=G.useState(!1),i=Tb.find(a=>a.value===e)||Tb[0];return p.jsxs("div",{className:"space-y-1",children:[p.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Severity Threshold",p.jsx(aa,{info:"Only alerts at or above this severity trigger this rule. ROUTINE = informational, PRIORITY = needs attention, IMMEDIATE = act now."})]}),p.jsxs("div",{className:"relative",children:[p.jsxs("button",{type:"button",onClick:()=>n(!r),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-left flex items-center justify-between hover:border-accent transition-colors",children:[p.jsxs("div",{children:[p.jsx("span",{className:"text-slate-200",children:i.label}),p.jsxs("span",{className:"text-slate-500 ml-2",children:["- ",i.description]})]}),p.jsx(_u,{size:16,className:`text-slate-500 transition-transform ${r?"rotate-180":""}`})]}),r&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>n(!1)}),p.jsx("div",{className:"absolute left-0 right-0 top-full mt-1 z-50 bg-[#0a0e17] border border-[#1e2a3a] rounded-lg shadow-xl overflow-hidden",children:Tb.map(a=>p.jsxs("button",{type:"button",onClick:()=>{t(a.value),n(!1)},className:`w-full px-3 py-2.5 text-left text-sm hover:bg-[#1e2a3a] transition-colors ${e===a.value?"bg-accent/10":""}`,children:[p.jsx("div",{className:"font-medium text-slate-200",children:a.label}),p.jsx("div",{className:"text-xs text-slate-500",children:a.description})]},a.value))})]})]}),p.jsx("p",{className:"text-xs text-slate-600",children:'Lower = more notifications. "Warning" recommended for most rules.'})]})}function W_({rule:e}){const[t,r]=G.useState(!1),[n,i]=G.useState(null),a=async()=>{r(!0),i(null);try{let s={type:e.delivery_type};e.delivery_type==="mesh_broadcast"?s.channel_index=e.broadcast_channel:e.delivery_type==="mesh_dm"?s.node_ids=e.node_ids:e.delivery_type==="email"?s={type:"email",smtp_host:e.smtp_host,smtp_port:e.smtp_port,smtp_user:e.smtp_user,smtp_password:e.smtp_password,smtp_tls:e.smtp_tls,from_address:e.from_address,recipients:e.recipients}:e.delivery_type==="webhook"&&(s={type:"webhook",url:e.webhook_url,headers:e.webhook_headers});const u=await(await fetch("/api/notifications/channels/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})).json();i(u)}catch(s){i({success:!1,message:"Test failed",error:s instanceof Error?s.message:"Unknown error",details:{}})}finally{r(!1)}};if(!e.delivery_type)return null;const o={mesh_broadcast:p.jsx(Xa,{size:14}),mesh_dm:p.jsx(uD,{size:14}),email:p.jsx(bce,{size:14}),webhook:p.jsx(xce,{size:14})}[e.delivery_type]||p.jsx(RS,{size:14});return p.jsxs("div",{className:"space-y-2",children:[p.jsx("button",{type:"button",onClick:a,disabled:t,className:"flex items-center gap-2 px-3 py-1.5 bg-slate-700 hover:bg-slate-600 rounded text-sm disabled:opacity-50",children:t?p.jsxs(p.Fragment,{children:[p.jsx(km,{size:14,className:"animate-spin"}),"Testing..."]}):p.jsxs(p.Fragment,{children:[o,"Test Channel"]})}),n&&p.jsx("div",{className:`p-2 rounded text-xs ${n.success?"bg-green-500/10 border border-green-500/30 text-green-400":"bg-red-500/10 border border-red-500/30 text-red-400"}`,children:p.jsxs("div",{className:"flex items-start gap-2",children:[n.success?p.jsx(Fo,{size:14,className:"mt-0.5 flex-shrink-0"}):p.jsx(qa,{size:14,className:"mt-0.5 flex-shrink-0"}),p.jsxs("div",{children:[p.jsx("div",{className:"font-medium",children:n.message}),n.error&&p.jsx("div",{className:"mt-1 text-red-300",children:n.error})]})]})})]})}function xet({rule:e,ruleIndex:t,categories:r,regions:n,onChange:i,onDelete:a,onDuplicate:o,onTest:s}){var D,N,z,V,F;const[l,u]=G.useState(!e.name),[c,f]=G.useState(!1),[h,d]=G.useState(null),[v,m]=G.useState(null);G.useEffect(()=>{var $;e.name&&t>=0&&(fetch(`/api/notifications/rules/${t}/stats`).then(B=>B.json()).then(B=>d(B)).catch(()=>{}),($=e.categories)!=null&&$.length&&fetch("/api/notifications/rules/sources",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({categories:e.categories})}).then(B=>B.json()).then(B=>m(B)).catch(()=>{}))},[e.name,t,e.categories]);const y=[{value:"",label:"(None)",description:"Rule matches but does not deliver"},{value:"mesh_broadcast",label:"Mesh Broadcast",description:"Send to a mesh radio channel"},{value:"mesh_dm",label:"Mesh DM",description:"Direct message to specific nodes"},{value:"email",label:"Email",description:"Send via SMTP"},{value:"webhook",label:"Webhook",description:"POST to any URL"}],x=[{value:"daily",label:"Daily"},{value:"twice_daily",label:"Twice Daily"},{value:"weekly",label:"Weekly"}],_=[{value:"mesh_health_summary",label:"Mesh Health Summary",description:"Current health score, pillar breakdown, problem nodes"},{value:"rf_propagation_report",label:"RF Propagation Report",description:"Solar indices, Kp, ducting conditions"},{value:"alerts_digest",label:"Active Alerts Digest",description:"Summary of all active environmental alerts"},{value:"environmental_conditions",label:"Environmental Conditions",description:"Full conditions: weather, fire, streams, roads"},{value:"custom",label:"Custom Message",description:"Write your own with template tokens"}],b=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"],S=$=>{const B=e.categories||[];B.includes($)?i({...e,categories:B.filter(H=>H!==$)}):i({...e,categories:[...B,$]})},T=($,B)=>{const H=e.categories||[];if(B==="add"){const U=Array.from(new Set([...H,...$]));i({...e,categories:U})}else{const U=new Set($);i({...e,categories:H.filter(Y=>!U.has(Y))})}},C=$=>{const B=e.region_scope||[];B.includes($)?i({...e,region_scope:B.filter(H=>H!==$)}):i({...e,region_scope:[...B,$]})},A=$=>{const B=e.schedule_days||[];B.includes($)?i({...e,schedule_days:B.filter(H=>H!==$)}):i({...e,schedule_days:[...B,$]})},P=async()=>{f(!0),await s(),f(!1)},I=()=>{if(e.trigger_type==="schedule")return"[Scheduled report preview would appear here]";const $=e.categories||[];if($.length===0&&r.length>0)return r[0].example_message||"Alert notification";const B=r.find(H=>$.includes(H.id));return(B==null?void 0:B.example_message)||"Alert notification"},k=()=>{var B,H,U,Y,Z,Q,re,ue;const $=[];if(e.trigger_type==="schedule"){const de=((B=x.find(xe=>xe.value===e.schedule_frequency))==null?void 0:B.label)||e.schedule_frequency,Re=((H=_.find(xe=>xe.value===e.message_type))==null?void 0:H.label)||e.message_type;$.push(`${de} at ${e.schedule_time||"??:??"}`),$.push(Re)}else{const de=((U=e.categories)==null?void 0:U.length)||0,Re=de===0?"All":r.filter(ie=>{var ve;return(ve=e.categories)==null?void 0:ve.includes(ie.id)}).map(ie=>ie.name).slice(0,2).join(", ")+(de>2?` +${de-2}`:""),xe=((Y=Tb.find(ie=>ie.value===e.min_severity))==null?void 0:Y.label)||e.min_severity;$.push(`${Re} at ${xe}+`)}if(!e.delivery_type)$.push("No delivery");else{const de=((Z=y.find(xe=>xe.value===e.delivery_type))==null?void 0:Z.label)||e.delivery_type;let Re="";if(e.delivery_type==="mesh_broadcast")Re=`Ch ${e.broadcast_channel}`;else if(e.delivery_type==="mesh_dm")Re=`${((Q=e.node_ids)==null?void 0:Q.length)||0} nodes`;else if(e.delivery_type==="email")Re=(re=e.recipients)!=null&&re.length?e.recipients[0]+(e.recipients.length>1?` +${e.recipients.length-1}`:""):"no recipients";else if(e.delivery_type==="webhook")try{Re=new URL(e.webhook_url).hostname}catch{Re=((ue=e.webhook_url)==null?void 0:ue.slice(0,20))||"no URL"}$.push(`${de}${Re?` (${Re})`:""}`)}return $.join(" -> ")},E=()=>{var B;if(!v||!((B=e.categories)!=null&&B.length))return null;const $=new Map;for(const[,H]of Object.entries(v)){const U=$.get(H.source);U?(U.events+=H.active_events,U.enabled=U.enabled&&H.enabled):$.set(H.source,{enabled:H.enabled,events:H.active_events})}return Array.from($.entries()).map(([H,{enabled:U,events:Y}])=>p.jsxs("span",{className:`inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-xs ${U?"bg-green-500/10 text-green-400":"bg-red-500/10 text-red-400"}`,title:U?`${Y} active`:"Not enabled",children:[U?p.jsx(RS,{size:10}):p.jsx(ZZ,{size:10}),H.toUpperCase(),U&&Y>0&&` (${Y})`]},H))};return p.jsxs("div",{className:`border rounded-lg overflow-hidden ${e.enabled?"border-[#1e2a3a]":"border-slate-700 opacity-60"}`,children:[p.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#0a0e17] cursor-pointer",onClick:()=>u(!l),children:[p.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[l?p.jsx(_u,{size:16,className:"text-slate-500 flex-shrink-0"}):p.jsx(lu,{size:16,className:"text-slate-500 flex-shrink-0"}),p.jsx("button",{onClick:$=>{$.stopPropagation(),i({...e,enabled:!e.enabled})},className:`w-2 h-2 rounded-full flex-shrink-0 ${e.enabled?"bg-green-500":"bg-slate-500"}`,title:e.enabled?"Enabled":"Disabled"}),e.trigger_type==="schedule"?p.jsx(af,{size:14,className:"text-blue-400 flex-shrink-0"}):p.jsx(Lm,{size:14,className:"text-yellow-400 flex-shrink-0"}),p.jsx("span",{className:"font-medium text-slate-200 truncate",title:e.name||void 0,children:e.name||"New Rule"}),!l&&p.jsx("span",{className:`text-xs truncate hidden sm:block ${e.delivery_type?"text-slate-500":"text-amber-400"}`,children:k()})]}),p.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[!l&&(()=>{const $="hidden sm:inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs mr-2";if(!e.enabled)return p.jsx("span",{className:`${$} bg-slate-800 text-slate-500`,children:"Disabled"});if(!h)return null;const B=h.fire_count||0,H=h.last_fired,U=Date.now()/1e3-7*86400;return B>0&&H&&H>=U?p.jsx("span",{className:`${$} bg-green-500/10 text-green-400`,title:`Last fired ${G_(H)}`,children:"Active"}):B>0&&H?p.jsx("span",{className:`${$} bg-yellow-500/10 text-yellow-400`,title:`Last fired ${G_(H)}`,children:"Idle (no recent activity)"}):p.jsx("span",{className:`${$} bg-slate-800 text-slate-400`,children:"No activity yet"})})(),!l&&p.jsx("div",{className:"hidden md:flex items-center gap-1 mr-2",children:E()}),p.jsx("button",{onClick:$=>{$.stopPropagation(),P()},disabled:c||!e.name,className:"p-1.5 text-blue-400 hover:text-blue-300 hover:bg-blue-500/10 rounded disabled:opacity-50",title:"Test rule",children:p.jsx(wk,{size:14})}),p.jsx("button",{onClick:$=>{$.stopPropagation(),o()},className:"p-1.5 text-slate-400 hover:text-slate-200 hover:bg-slate-500/10 rounded",title:"Duplicate",children:p.jsx(mce,{size:14})}),p.jsx("button",{onClick:$=>{$.stopPropagation(),a()},className:"p-1.5 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded",title:"Delete",children:p.jsx(Qy,{size:14})})]})]}),!l&&e.name&&p.jsxs("div",{className:"px-3 pb-2 pt-0 bg-[#0a0e17] flex items-center gap-2 flex-wrap text-xs",children:[!e.delivery_type&&p.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 bg-amber-500/10 text-amber-400 rounded",children:[p.jsx(uu,{size:10}),"No delivery method"]}),(h==null?void 0:h.fire_count)!==void 0&&h.fire_count>0&&p.jsxs("span",{className:"text-slate-500",children:["Fired ",h.fire_count,"x"]})]}),l&&p.jsxs("div",{className:"p-4 space-y-6 border-t border-[#1e2a3a]",children:[p.jsx(Al,{label:"Rule Name",value:e.name,onChange:$=>i({...e,name:$}),placeholder:"e.g., Emergency Broadcast, Daily Health Report",helper:"A descriptive name for this rule"}),p.jsxs("div",{className:"space-y-2",children:[p.jsx("label",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Trigger Type"}),p.jsxs("div",{className:"flex gap-2",children:[p.jsxs("button",{type:"button",onClick:()=>i({...e,trigger_type:"condition"}),className:`flex-1 flex items-center justify-center gap-2 px-4 py-3 rounded-lg border transition-colors ${e.trigger_type!=="schedule"?"bg-accent/10 border-accent text-accent":"bg-[#0a0e17] border-[#1e2a3a] text-slate-400 hover:text-slate-200"}`,children:[p.jsx(Lm,{size:16}),p.jsx("span",{children:"Condition"})]}),p.jsxs("button",{type:"button",onClick:()=>i({...e,trigger_type:"schedule"}),className:`flex-1 flex items-center justify-center gap-2 px-4 py-3 rounded-lg border transition-colors ${e.trigger_type==="schedule"?"bg-accent/10 border-accent text-accent":"bg-[#0a0e17] border-[#1e2a3a] text-slate-400 hover:text-slate-200"}`,children:[p.jsx(af,{size:16}),p.jsx("span",{children:"Schedule"})]})]}),p.jsx("p",{className:"text-xs text-slate-600",children:e.trigger_type==="schedule"?"Send reports on a schedule (daily briefings, weekly digests)":"React to alert conditions (fires, outages, weather warnings)"})]}),e.trigger_type!=="schedule"&&p.jsxs("div",{className:"space-y-4 p-4 bg-[#0a0e17] rounded-lg border border-[#1e2a3a]",children:[p.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-slate-300",children:[p.jsx($s,{size:14}),"WHEN (Condition)"]}),p.jsx(lae,{value:e.min_severity,onChange:$=>i({...e,min_severity:$})}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Alert Categories",p.jsx(aa,{info:"Select which types of alerts trigger this rule. Leave all unchecked to match ALL categories. Categories are grouped by family — use the 'All' / 'Clear' buttons in each header to bulk-toggle."})]}),p.jsx("div",{className:"text-xs text-slate-500 mb-2",children:(((D=e.categories)==null?void 0:D.length)||0)===0?"All categories (none selected)":`${(N=e.categories)==null?void 0:N.length} selected`}),p.jsx(_et,{categories:r,selected:e.categories||[],onToggle:S,onSelectMany:T})]}),v&&Object.keys(v).length>0&&p.jsxs("div",{className:"space-y-2",children:[p.jsx("label",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Data Sources"}),p.jsx("div",{className:"flex flex-wrap gap-2",children:E()})]})]}),e.trigger_type==="schedule"&&p.jsxs("div",{className:"space-y-4 p-4 bg-[#0a0e17] rounded-lg border border-[#1e2a3a]",children:[p.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-slate-300",children:[p.jsx(hce,{size:14}),"WHEN (Schedule)"]}),p.jsxs("div",{className:"space-y-1",children:[p.jsx("label",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Frequency"}),p.jsx("select",{value:e.schedule_frequency||"daily",onChange:$=>i({...e,schedule_frequency:$.target.value}),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent",children:x.map($=>p.jsx("option",{value:$.value,children:$.label},$.value))})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx(lm,{label:"Time",value:e.schedule_time||"07:00",onChange:$=>i({...e,schedule_time:$})}),e.schedule_frequency==="twice_daily"&&p.jsx(lm,{label:"Second Time",value:e.schedule_time_2||"19:00",onChange:$=>i({...e,schedule_time_2:$})})]}),e.schedule_frequency==="weekly"&&p.jsxs("div",{className:"space-y-2",children:[p.jsx("label",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Days"}),p.jsx("div",{className:"flex flex-wrap gap-2",children:b.map($=>{var B;return p.jsx("button",{type:"button",onClick:()=>A($),className:`px-3 py-1.5 rounded text-sm capitalize transition-colors ${(B=e.schedule_days)!=null&&B.includes($)?"bg-accent text-white":"bg-[#1e2a3a] text-slate-400 hover:text-slate-200"}`,children:$.slice(0,3)},$)})})]}),p.jsxs("div",{className:"space-y-1",children:[p.jsx("label",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Report Type"}),p.jsx("select",{value:e.message_type||"mesh_health_summary",onChange:$=>i({...e,message_type:$.target.value}),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent",children:_.map($=>p.jsx("option",{value:$.value,children:$.label},$.value))}),p.jsx("p",{className:"text-xs text-slate-600",children:(z=_.find($=>$.value===e.message_type))==null?void 0:z.description})]}),e.message_type==="custom"&&p.jsxs("div",{className:"space-y-1",children:[p.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Custom Message",p.jsx(aa,{info:"Available tokens: {MESH_SCORE}, {NODE_COUNT}, {NODES_ONLINE}, {ACTIVE_ALERTS}, {KP}, {SFI}, {DATE}, {TIME}"})]}),p.jsx("textarea",{value:e.custom_message||"",onChange:$=>i({...e,custom_message:$.target.value}),rows:4,placeholder:"Good morning! Mesh health: {MESH_SCORE}/100 with {NODE_COUNT} nodes online.",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"})]})]}),p.jsxs("div",{className:"space-y-2 p-4 bg-[#0a0e17] rounded-lg border border-[#1e2a3a]",children:[p.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-slate-300",children:[p.jsx(yv,{size:14}),"REGIONS",p.jsx(aa,{info:"Limit this rule to alerts from specific regions. Empty selection = all regions (backward compatible). Region names come from /api/regions."})]}),p.jsx("div",{className:"text-xs text-slate-500",children:(((V=e.region_scope)==null?void 0:V.length)||0)===0?"All regions (none selected)":`${e.region_scope.length} of ${n.length} selected`}),n.length===0?p.jsx("div",{className:"text-xs text-slate-600 italic",children:"No regions configured."}):p.jsx("div",{className:"flex flex-wrap gap-2",children:n.map($=>{const B=(e.region_scope||[]).includes($.name);return p.jsx("button",{type:"button",onClick:()=>C($.name),className:`px-3 py-1.5 rounded text-sm transition-colors ${B?"bg-accent text-white":"bg-[#1e2a3a] text-slate-400 hover:text-slate-200"}`,title:$.local_name||$.name,children:$.local_name||$.name},$.name)})})]}),p.jsxs("div",{className:"space-y-4 p-4 bg-[#0a0e17] rounded-lg border border-[#1e2a3a]",children:[p.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-slate-300",children:[p.jsx(wk,{size:14}),"SEND VIA"]}),p.jsxs("div",{className:"space-y-1",children:[p.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Delivery Method",p.jsx(aa,{info:"Where this notification gets delivered. Select (None) to save the rule without delivery - it will match conditions but won't send until you configure a delivery method."})]}),p.jsx("select",{value:e.delivery_type||"",onChange:$=>i({...e,delivery_type:$.target.value}),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent",children:y.map($=>p.jsx("option",{value:$.value,children:$.label},$.value))}),p.jsx("p",{className:"text-xs text-slate-600",children:(F=y.find($=>$.value===(e.delivery_type||"")))==null?void 0:F.description})]}),!e.delivery_type&&p.jsxs("div",{className:"flex items-start gap-2 p-3 bg-amber-500/10 border border-amber-500/20 rounded-lg",children:[p.jsx(uu,{size:16,className:"text-amber-400 mt-0.5 flex-shrink-0"}),p.jsx("div",{className:"text-sm text-amber-300",children:"Rule will log matches but not deliver until a delivery method is configured."})]}),e.delivery_type==="mesh_broadcast"&&p.jsxs(p.Fragment,{children:[p.jsx(r3,{label:"Broadcast Channel",value:e.broadcast_channel??0,onChange:$=>i({...e,broadcast_channel:$}),helper:"Select the mesh radio channel",mode:"single"}),p.jsx(W_,{rule:e})]}),e.delivery_type==="mesh_dm"&&p.jsxs(p.Fragment,{children:[p.jsx(t3,{label:"Recipient Nodes",value:e.node_ids||[],onChange:$=>i({...e,node_ids:$}),helper:"Nodes that receive direct messages",valueType:"node_id_hex"}),p.jsx(W_,{rule:e})]}),e.delivery_type==="email"&&p.jsxs("div",{className:"space-y-4",children:[p.jsx(Cb,{label:"Recipients",value:e.recipients||[],onChange:$=>i({...e,recipients:$}),placeholder:"email@example.com",helper:"Email addresses to receive alerts"}),p.jsxs("details",{className:"group",children:[p.jsxs("summary",{className:"flex items-center gap-2 cursor-pointer text-sm text-slate-400 hover:text-slate-200",children:[p.jsx(lu,{size:14,className:"group-open:rotate-90 transition-transform"}),"SMTP Configuration"]}),p.jsxs("div",{className:"mt-4 space-y-4 pl-6 border-l border-[#1e2a3a]",children:[p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx(Al,{label:"SMTP Host",value:e.smtp_host||"",onChange:$=>i({...e,smtp_host:$}),placeholder:"smtp.gmail.com"}),p.jsx(Hy,{label:"SMTP Port",value:e.smtp_port??587,onChange:$=>i({...e,smtp_port:$}),min:1,max:65535})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx(Al,{label:"Username",value:e.smtp_user||"",onChange:$=>i({...e,smtp_user:$})}),p.jsx(Al,{label:"Password",value:e.smtp_password||"",onChange:$=>i({...e,smtp_password:$}),type:"password",info:"Gmail users: use an App Password from myaccount.google.com/apppasswords"})]}),p.jsx(fS,{label:"Use TLS",checked:e.smtp_tls??!0,onChange:$=>i({...e,smtp_tls:$})}),p.jsx(Al,{label:"From Address",value:e.from_address||"",onChange:$=>i({...e,from_address:$}),placeholder:"alerts@yourdomain.com"})]})]}),p.jsx(W_,{rule:e})]}),e.delivery_type==="webhook"&&p.jsxs(p.Fragment,{children:[p.jsx(Al,{label:"Webhook URL",value:e.webhook_url||"",onChange:$=>i({...e,webhook_url:$}),placeholder:"https://discord.com/api/webhooks/...",helper:"POST alert as JSON",info:"Works with Discord webhooks, ntfy.sh, Slack, Home Assistant, Pushover, or any HTTP POST endpoint."}),p.jsx(W_,{rule:e})]})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx(Hy,{label:"Cooldown (minutes)",value:e.cooldown_minutes??10,onChange:$=>i({...e,cooldown_minutes:$}),min:0,helper:"Min time between repeat sends",info:"Prevents alert spam. Same condition won't re-trigger this rule within this window."})," "]}),h&&p.jsxs("div",{className:"flex items-center gap-4 text-xs text-slate-500",children:[p.jsxs("span",{children:["Last fired: ",G_(h.last_fired)]}),p.jsxs("span",{children:["Last tested: ",G_(h.last_test)]}),p.jsxs("span",{children:["Total fires: ",h.fire_count]})]}),e.trigger_type!=="schedule"&&p.jsxs("div",{className:"space-y-2",children:[p.jsx("label",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Example Message"}),p.jsx("div",{className:"p-3 bg-[#1e2a3a]/50 rounded-lg border border-[#1e2a3a]",children:p.jsx("p",{className:"text-sm text-slate-300 font-mono",children:I()})}),p.jsx("p",{className:"text-xs text-slate-600",children:"This is an example of what this rule would send."})]})]})]})}const Ab=[{key:"mesh_health",label:"Mesh Health",Icon:mv},{key:"weather",label:"Weather",Icon:cu},{key:"fire",label:"Fire",Icon:IS},{key:"rf_propagation",label:"RF Propagation",Icon:Xa},{key:"roads",label:"Roads",Icon:kS},{key:"avalanche",label:"Avalanche",Icon:Cce},{key:"seismic",label:"Seismic",Icon:ES},{key:"tracking",label:"Tracking",Icon:yv}];function _et({categories:e,selected:t,onToggle:r,onSelectMany:n}){const i=new Set(Ab.map(h=>h.key)),a=new Map;Ab.forEach(h=>a.set(h.key,[]));const o=[];for(const h of e){const d=h.toggle;d&&i.has(d)?a.get(d).push(h):o.push(h)}const s=new Set;for(const[h,d]of a)d.some(v=>t.includes(v.id))&&s.add(h);o.some(h=>t.includes(h.id))&&s.add("other");const[l,u]=G.useState(s),c=h=>{u(d=>{const v=new Set(d);return v.has(h)?v.delete(h):v.add(h),v})},f=(h,d,v,m)=>{if(!m.length)return null;const y=l.has(h),x=m.map(b=>b.id),_=x.filter(b=>t.includes(b)).length;return p.jsxs("div",{className:"border border-[#1e2a3a] rounded",children:[p.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 bg-[#0d1420]",children:[p.jsxs("button",{type:"button",onClick:()=>c(h),className:"flex items-center gap-2 text-sm text-slate-200 flex-1 min-w-0",children:[y?p.jsx(_u,{size:14,className:"text-slate-500 flex-shrink-0"}):p.jsx(lu,{size:14,className:"text-slate-500 flex-shrink-0"}),v&&p.jsx(v,{size:14,className:"text-slate-400 flex-shrink-0"}),p.jsxs("span",{className:"truncate",children:[d," (",m.length,")"]}),_>0&&p.jsxs("span",{className:"ml-1 text-xs text-accent",children:[_," selected"]})]}),p.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[p.jsx("button",{type:"button",onClick:b=>{b.stopPropagation(),n(x,"add")},className:"text-xs px-2 py-0.5 rounded text-slate-400 hover:text-accent hover:bg-accent/10",title:"Select all in family",children:"All"}),p.jsx("button",{type:"button",onClick:b=>{b.stopPropagation(),n(x,"remove")},className:"text-xs px-2 py-0.5 rounded text-slate-400 hover:text-red-400 hover:bg-red-500/10",title:"Clear family",children:"Clear"})]})]}),y&&p.jsx("div",{className:"p-1 space-y-1",children:m.map(b=>p.jsxs("label",{onClick:()=>r(b.id),className:"flex items-start gap-2 p-2 rounded hover:bg-[#1e2a3a]/50 cursor-pointer",children:[p.jsx("div",{className:`w-4 h-4 mt-0.5 rounded border flex items-center justify-center flex-shrink-0 ${t.includes(b.id)?"bg-accent border-accent":"border-slate-600"}`,children:t.includes(b.id)&&p.jsx(Fo,{size:12,className:"text-white"})}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsx("div",{className:"text-sm text-slate-200",children:b.name}),p.jsx("div",{className:"text-xs text-slate-500",children:b.description})]})]},b.id))})]},h)};return p.jsxs("div",{className:"max-h-96 overflow-y-auto border border-[#1e2a3a] rounded-lg p-2 space-y-2",children:[Ab.map(h=>f(h.key,h.label,h.Icon,a.get(h.key)||[])),f("other","Other",null,o)]})}const o7=["digest","mesh_broadcast","mesh_dm","email","webhook"],bet=["routine","priority","immediate"];function wet({toggles:e,onChange:t}){const[r,n]=G.useState(null),i=(a,o)=>t({...e,[a]:{...e[a]||{},name:a,...o}});return p.jsxs("div",{className:"space-y-3 mb-8",children:[p.jsxs("div",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Master Toggles",p.jsx(aa,{info:"Per-family notification policy: enable a family, set its severity threshold, choose which channels fire at each severity, and scope to regions (PagerDuty/Grafana-style)."})]}),p.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:Ab.map(({key:a,label:o,Icon:s})=>{const l=e[a]||{},u=r===a,c=Object.values(l.severity_channels||{}).reduce((h,d)=>h+((d==null?void 0:d.length)||0),0),f=(l.regions||[]).length;return p.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-3",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("button",{type:"button",onClick:()=>n(u?null:a),className:"flex items-center gap-2 text-sm text-slate-200",children:[p.jsx(s,{size:15})," ",o,u?p.jsx(_u,{size:14}):p.jsx(lu,{size:14})]}),p.jsx(fS,{label:"",checked:!!l.enabled,onChange:h=>i(a,{enabled:h})})]}),!u&&p.jsx("div",{className:"text-xs text-slate-600 mt-1",children:l.enabled?`${f||"all"} region${f===1?"":"s"}, ${c} channel${c===1?"":"s"} at ${l.min_severity||"priority"}+`:"OFF"}),u&&p.jsxs("div",{className:`mt-3 space-y-3 ${l.enabled?"":"opacity-40 pointer-events-none select-none"}`,children:[p.jsx(lae,{value:l.min_severity||"priority",onChange:h=>i(a,{min_severity:h})}),p.jsx("div",{className:"text-xs text-slate-500",children:"Severity → channels"}),p.jsxs("table",{className:"text-xs w-full",children:[p.jsx("thead",{children:p.jsxs("tr",{children:[p.jsx("th",{}),o7.map(h=>p.jsx("th",{className:"text-slate-500 font-normal px-1",children:h.replace("_"," ")},h))]})}),p.jsx("tbody",{children:bet.map(h=>p.jsxs("tr",{children:[p.jsx("td",{className:"text-slate-400 pr-2",children:h}),o7.map(d=>{var m;const v=(((m=l.severity_channels)==null?void 0:m[h])||[]).includes(d);return p.jsx("td",{className:"text-center",children:p.jsx("input",{type:"checkbox",checked:v,onChange:y=>{const x={...l.severity_channels||{}},_=new Set(x[h]||[]);y.target.checked?_.add(d):_.delete(d),x[h]=Array.from(_),i(a,{severity_channels:x})}})},d)})]},h))})]}),p.jsx(Cb,{label:"Regions (empty = all)",value:l.regions||[],onChange:h=>i(a,{regions:h}),placeholder:"Add region..."})," ",p.jsx("div",{className:"text-xs text-slate-500 pt-1",children:"Channel config"}),p.jsx(Hy,{label:"Broadcast channel",value:l.broadcast_channel??0,onChange:h=>i(a,{broadcast_channel:h})}),p.jsx(Cb,{label:"DM node IDs",value:l.node_ids||[],onChange:h=>i(a,{node_ids:h}),placeholder:"!nodeid"}),p.jsx(Cb,{label:"Email recipients",value:l.recipients||[],onChange:h=>i(a,{recipients:h}),placeholder:"ops@example.com"}),p.jsx(Al,{label:"SMTP host",value:l.smtp_host||"",onChange:h=>i(a,{smtp_host:h}),placeholder:"smtp.example.com"}),p.jsx(Hy,{label:"SMTP port",value:l.smtp_port??587,onChange:h=>i(a,{smtp_port:h})}),p.jsx(Al,{label:"Webhook URL",value:l.webhook_url||"",onChange:h=>i(a,{webhook_url:h}),placeholder:"https://..."})]})]},a)})})]})}function Tet(){var B,H,U;const[e,t]=G.useState(null),[r,n]=G.useState(null),[i,a]=G.useState([]),[o,s]=G.useState([]),[l,u]=G.useState(!0),[c,f]=G.useState(!1),[h,d]=G.useState(null),[v,m]=G.useState(null),[y,x]=G.useState(null),[_,b]=G.useState({open:!1,ruleIndex:-1,loading:!1,action:""}),[S,T]=G.useState(!1),[C,A]=G.useState(!1),P=G.useCallback(async()=>{try{const[Y,Z,Q]=await Promise.all([fetch("/api/config/notifications"),fetch("/api/notifications/categories"),fetch("/api/regions")]);if(!Y.ok)throw new Error("Failed to fetch notifications config");const re=await Y.json(),ue=await Z.json(),de=Q.ok?await Q.json():[];t(re),n(JSON.parse(JSON.stringify(re))),a(ue),s(Array.isArray(de)?de:[]),A(!1),d(null)}catch(Y){d(Y instanceof Error?Y.message:"Unknown error")}finally{u(!1)}},[]);G.useEffect(()=>{document.title="Notifications - MeshAI",P()},[P]),G.useEffect(()=>{e&&r&&A(JSON.stringify(e)!==JSON.stringify(r))},[e,r]);const I=async()=>{if(e){f(!0),d(null),m(null);try{const Y=await fetch("/api/config/notifications",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),Z=await Y.json();if(!Y.ok)throw new Error(Z.detail||"Save failed");m("Notifications config saved successfully"),n(JSON.parse(JSON.stringify(e))),A(!1),setTimeout(()=>m(null),3e3)}catch(Y){d(Y instanceof Error?Y.message:"Save failed")}finally{f(!1)}}},k=()=>{r&&(t(JSON.parse(JSON.stringify(r))),A(!1))},E=()=>({name:"",enabled:!0,trigger_type:"condition",categories:[],min_severity:"routine",schedule_frequency:"daily",schedule_time:"07:00",schedule_time_2:"19:00",schedule_days:["monday"],message_type:"mesh_health_summary",custom_message:"",delivery_type:"",broadcast_channel:0,node_ids:[],smtp_host:"",smtp_port:587,smtp_user:"",smtp_password:"",smtp_tls:!0,from_address:"",recipients:[],webhook_url:"",webhook_headers:{},cooldown_minutes:10,region_scope:[]}),D=()=>{e&&t({...e,rules:[...e.rules||[],E()]})},N=Y=>{if(!e)return;const Z=a7.find(Q=>Q.id===Y);Z&&(t({...e,rules:[...e.rules||[],{...E(),...Z.rule}]}),T(!1))},z=Y=>{if(!e)return;const Z=e.rules[Y],Q={...JSON.parse(JSON.stringify(Z)),name:`${Z.name} (copy)`},re=[...e.rules];re.splice(Y+1,0,Q),t({...e,rules:re})},V=async Y=>{b({open:!0,ruleIndex:Y,loading:!0,action:""});try{const Q=await(await fetch(`/api/notifications/rules/${Y}/test`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"preview"})})).json();x(Q),b(re=>({...re,loading:!1}))}catch{x({success:!1,message:"Failed to get preview"}),b(Z=>({...Z,loading:!1}))}},F=async Y=>{const Z=_.ruleIndex;b(Q=>({...Q,loading:!0,action:Y}));try{const re=await(await fetch(`/api/notifications/rules/${Z}/test`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:Y})})).json();x(re),b(ue=>({...ue,loading:!1}))}catch{x({success:!1,message:`Failed to ${Y}`}),b(Q=>({...Q,loading:!1}))}},$=()=>{b({open:!1,ruleIndex:-1,loading:!1,action:""}),x(null)};return l?p.jsx("div",{className:"flex items-center justify-center h-64",children:p.jsx("div",{className:"text-slate-400",children:"Loading notifications config..."})}):e?p.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[_.open&&p.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:p.jsxs("div",{className:"bg-[#1a2332] border border-[#2a3a4a] rounded-lg shadow-xl max-w-2xl w-full mx-4 max-h-[85vh] overflow-auto",children:[p.jsxs("div",{className:"p-4 border-b border-[#2a3a4a] flex items-center justify-between sticky top-0 bg-[#1a2332]",children:[p.jsx("h3",{className:"text-lg font-semibold",children:"Test Notification Rule"}),p.jsx("button",{onClick:$,className:"text-slate-500 hover:text-slate-300",children:p.jsx(qa,{size:20})})]}),p.jsx("div",{className:"p-4 space-y-4",children:_.loading?p.jsxs("div",{className:"flex items-center justify-center py-8",children:[p.jsx(km,{size:20,className:"animate-spin text-slate-400 mr-2"}),p.jsx("div",{className:"text-slate-400",children:_.action?`${_.action.replace("_"," ").replace("send ","Sending ")}...`:"Loading current data..."})]}):y?p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx("div",{className:"text-sm font-medium text-slate-400 uppercase tracking-wide",children:"Current Data"}),y.live_data_summary&&y.live_data_summary.length>0?p.jsx("div",{className:"p-3 bg-slate-800/50 rounded space-y-1",children:y.live_data_summary.map((Y,Z)=>p.jsx("div",{className:`text-sm font-mono ${Y.startsWith("[!]")?"text-amber-400":""}`,children:Y},Z))}):p.jsx("div",{className:"p-3 bg-slate-800/50 rounded text-sm text-slate-500",children:"No live data available for this rule's categories"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx("div",{className:"text-sm font-medium text-slate-400 uppercase tracking-wide",children:"Rule Matching"}),p.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[y.conditions_matched&&y.conditions_matched>0?p.jsxs("span",{className:"px-2 py-1 bg-green-500/20 text-green-400 rounded text-sm",children:[y.conditions_matched," condition",y.conditions_matched!==1?"s":""," match - this rule WOULD fire"]}):p.jsx("span",{className:"px-2 py-1 bg-slate-700 text-slate-400 rounded text-sm",children:"No conditions trigger this rule right now"}),y.conditions_below_threshold&&y.conditions_below_threshold>0&&p.jsxs("span",{className:"px-2 py-1 bg-yellow-500/20 text-yellow-400 rounded text-sm",children:[y.conditions_below_threshold," below threshold"]})]}),y.conditions_below_threshold&&y.conditions_below_threshold>0&&p.jsxs("div",{className:"p-3 bg-yellow-500/10 border border-yellow-500/30 rounded text-sm space-y-2",children:[p.jsx("div",{className:"text-yellow-300",children:y.below_threshold_summary}),y.below_threshold_events&&y.below_threshold_events.length>0&&p.jsx("div",{className:"space-y-1 text-yellow-200/80",children:y.below_threshold_events.slice(0,3).map((Y,Z)=>p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"text-xs px-1.5 py-0.5 bg-yellow-500/20 rounded",children:Y.severity}),p.jsx("span",{children:Y.headline})]},Z))}),y.suggestion&&p.jsxs("div",{className:"text-yellow-400 text-xs mt-2",children:["Tip: ",y.suggestion]})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx("div",{className:"text-sm font-medium text-slate-400 uppercase tracking-wide",children:y.is_example?"Example Messages":"Messages That Would Fire"}),(B=y.preview_messages)==null?void 0:B.map((Y,Z)=>p.jsx("div",{className:"p-3 bg-slate-800 rounded text-sm font-mono break-words",children:Y},Z))]}),y.delivered!==void 0&&y.delivery_result&&p.jsx("div",{className:`p-3 rounded text-sm ${y.delivered?"bg-green-500/10 border border-green-500/30 text-green-400":"bg-red-500/10 border border-red-500/30 text-red-400"}`,children:p.jsxs("div",{className:"flex items-start gap-2",children:[y.delivered?p.jsx(Fo,{size:16,className:"mt-0.5"}):p.jsx(qa,{size:16,className:"mt-0.5"}),p.jsxs("div",{children:[p.jsx("div",{children:y.delivery_result}),y.delivery_error&&p.jsx("div",{className:"mt-1 text-red-300",children:y.delivery_error})]})]})}),y.message&&!y.preview_messages&&p.jsx("div",{className:`p-3 rounded text-sm ${y.success?"bg-green-500/10 text-green-400":"bg-red-500/10 text-red-400"}`,children:y.message})]}):null}),p.jsxs("div",{className:"p-4 border-t border-[#2a3a4a] flex justify-between sticky bottom-0 bg-[#1a2332]",children:[p.jsx("button",{onClick:$,className:"px-4 py-2 text-slate-400 hover:text-slate-200",children:"Close"}),y&&!y.delivered&&p.jsx("div",{className:"flex gap-2",children:y.delivery_method?p.jsxs(p.Fragment,{children:[y.live_data_summary&&y.live_data_summary.length>0&&p.jsx("button",{onClick:()=>F("send_status"),disabled:_.loading,className:"px-3 py-2 bg-slate-700 hover:bg-slate-600 rounded text-sm disabled:opacity-50",title:"Send current conditions summary",children:"Send Current Conditions"}),p.jsx("button",{onClick:()=>F("send_test"),disabled:_.loading,className:"px-3 py-2 bg-slate-700 hover:bg-slate-600 rounded text-sm disabled:opacity-50",title:"Send example alert message",children:"Send Example Alert"}),y.can_send_live&&p.jsx("button",{onClick:()=>F("send_live"),disabled:_.loading,className:"px-3 py-2 bg-accent hover:bg-accent/80 rounded text-sm disabled:opacity-50",title:"Send actual live alert",children:"Send Live Alert"})]}):p.jsx("span",{className:"px-3 py-2 text-amber-400 text-sm",children:"Configure a delivery method to send test messages"})})]})]})}),p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("div",{children:p.jsx("p",{className:"text-sm text-slate-500",children:"Alert delivery and scheduled reports. Rules define what triggers a notification and where it gets sent."})}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{onClick:P,className:"p-2 text-slate-400 hover:text-slate-200 hover:bg-bg-hover rounded transition-colors",title:"Refresh",children:p.jsx(km,{size:18})}),p.jsxs("button",{onClick:k,disabled:!C,className:"flex items-center gap-2 px-3 py-2 text-slate-400 hover:text-slate-200 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:[p.jsx(DS,{size:16}),"Discard"]}),p.jsxs("button",{onClick:I,disabled:c||!C,className:"flex items-center gap-2 px-4 py-2 bg-accent hover:bg-accent/80 disabled:bg-slate-700 disabled:cursor-not-allowed rounded text-white transition-colors",children:[p.jsx(cD,{size:16}),c?"Saving...":"Save"]})]})]}),h&&p.jsx("div",{className:"p-3 rounded-lg text-sm bg-red-500/10 text-red-400 border border-red-500/20",children:h}),v&&p.jsxs("div",{className:"p-3 rounded-lg text-sm bg-green-500/10 text-green-400 border border-green-500/20",children:[p.jsx(Fo,{size:14,className:"inline mr-2"}),v]}),p.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6 space-y-6",children:[p.jsx(fS,{label:"Enable Notifications",checked:e.enabled,onChange:Y=>t({...e,enabled:Y}),helper:"Master switch for all notification delivery",info:"When disabled, no alerts or scheduled messages will be delivered. Alerts still get recorded to history."}),e.enabled&&p.jsxs(p.Fragment,{children:[" ",p.jsxs("div",{className:"space-y-3 p-4 bg-[#0a0e17] rounded-lg border border-[#1e2a3a]",children:[p.jsx("div",{className:"flex items-center gap-2",children:p.jsx("label",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Cold-start grace"})}),p.jsx(Hy,{label:"Grace period (seconds)",value:e.cold_start_grace_seconds??60,onChange:Y=>t({...e,cold_start_grace_seconds:Y}),min:0,max:600,helper:"Suppress broadcasts for this many seconds after the first event arrives",info:"When meshai starts seeing events for the first time, suppress mesh broadcasts for this many seconds to absorb any JetStream backlog. Persistence rows still get written; only broadcasts are suppressed."})]}),p.jsxs("div",{className:"space-y-3 p-4 bg-[#0a0e17] rounded-lg border border-[#1e2a3a]",children:[p.jsx("div",{className:"flex items-center gap-2",children:p.jsx("label",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Band Conditions (HF propagation)"})}),p.jsx(fS,{label:"Enable scheduled band-conditions broadcasts",checked:e.band_conditions_enabled??!0,onChange:Y=>t({...e,band_conditions_enabled:Y}),helper:"3x/day HF propagation summary (Day/Night ratings per band group). The daily fire digest (twice-daily LLM summary of active fires + the last 24h of growth/spotting) is configured separately under Adapter Config -> fires.digest_*. See Reference -> Fire Tracker (Fusion) and Reference -> Broadcast Types for the New/Update/Active prefix system.",info:"Source priority: (1) recent SWPC readings persisted locally; (2) HamQSL.com fallback; (3) silent skip if both fail. Persistence rows are written either way for an audit trail."}),(e.band_conditions_enabled??!0)&&p.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[p.jsx(lm,{label:"Slot 1",value:(e.band_conditions_schedule??["06:00","14:00","22:00"])[0]||"06:00",onChange:Y=>{const Z=[...e.band_conditions_schedule??["06:00","14:00","22:00"]];Z[0]=Y,t({...e,band_conditions_schedule:Z})},helper:"Morning (default 06:00 MT)"}),p.jsx(lm,{label:"Slot 2",value:(e.band_conditions_schedule??["06:00","14:00","22:00"])[1]||"14:00",onChange:Y=>{const Z=[...e.band_conditions_schedule??["06:00","14:00","22:00"]];Z[1]=Y,t({...e,band_conditions_schedule:Z})},helper:"Afternoon (default 14:00 MT)"}),p.jsx(lm,{label:"Slot 3",value:(e.band_conditions_schedule??["06:00","14:00","22:00"])[2]||"22:00",onChange:Y=>{const Z=[...e.band_conditions_schedule??["06:00","14:00","22:00"]];Z[2]=Y,t({...e,band_conditions_schedule:Z})},helper:"Night (default 22:00 MT)"})]}),p.jsx("p",{className:"text-xs text-slate-600",children:"All times are Mountain Time (America/Boise). DST handled automatically."})]}),e.toggles&&p.jsx(wet,{toggles:e.toggles,onChange:Y=>t({...e,toggles:Y})}),p.jsxs("div",{className:"space-y-3",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Notification Rules",p.jsx(aa,{info:"Each rule is self-contained: define what triggers it (condition or schedule), where to send it (mesh, email, webhook), and behavior settings."})]}),p.jsxs("span",{className:"text-xs text-slate-500",children:[((H=e.rules)==null?void 0:H.length)||0," rule",(((U=e.rules)==null?void 0:U.length)||0)!==1?"s":""]})]}),(e.rules||[]).map((Y,Z)=>p.jsx(xet,{rule:Y,ruleIndex:Z,categories:i,regions:o,onChange:Q=>{const re=[...e.rules||[]];re[Z]=Q,t({...e,rules:re})},onDelete:()=>{confirm(`Delete rule "${Y.name||"New Rule"}"?`)&&t({...e,rules:(e.rules||[]).filter((Q,re)=>re!==Z)})},onDuplicate:()=>z(Z),onTest:()=>V(Z)},Z)),p.jsxs("div",{className:"flex gap-2",children:[p.jsxs("button",{onClick:D,className:"flex-1 py-3 border border-dashed border-[#1e2a3a] rounded-lg text-slate-500 hover:text-slate-300 hover:border-accent flex items-center justify-center gap-2 transition-colors",children:[p.jsx(xv,{size:16})," Add Rule"]}),p.jsxs("div",{className:"relative",children:[p.jsxs("button",{onClick:()=>T(!S),className:"py-3 px-4 border border-dashed border-[#1e2a3a] rounded-lg text-slate-500 hover:text-slate-300 hover:border-accent flex items-center gap-2 transition-colors",children:[p.jsx(FZ,{size:16})," Add from Template"]}),S&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>T(!1)}),p.jsxs("div",{className:"absolute right-0 top-full mt-2 z-50 w-80 bg-[#1a2332] border border-[#2a3a4a] rounded-lg shadow-xl overflow-hidden",children:[p.jsx("div",{className:"p-2 border-b border-[#2a3a4a] text-xs text-slate-500 uppercase",children:"Rule Templates"}),a7.map(Y=>p.jsxs("button",{onClick:()=>N(Y.id),className:"w-full p-3 text-left hover:bg-[#2a3a4a] transition-colors",children:[p.jsx("div",{className:"font-medium text-slate-200",children:Y.name}),p.jsx("div",{className:"text-xs text-slate-500 mt-0.5",children:Y.description})]},Y.id))]})]})]})]})]})]})]})]}):p.jsx("div",{className:"flex items-center justify-center h-64",children:p.jsx("div",{className:"text-red-400",children:"Failed to load notifications config"})})}const s7=[{id:"stream-gauges",label:"Stream Gauges",icon:LS},{id:"wildfire",label:"Wildfire",icon:IS},{id:"firms",label:"Satellite Fire Detection (FIRMS)",icon:NS},{id:"fire-tracker",label:"Fire Tracker (Fusion)",icon:yce},{id:"weather-alerts",label:"Weather Alerts",icon:pce},{id:"solar",label:"Solar & Geomagnetic",icon:HZ},{id:"ducting",label:"Tropospheric Ducting",icon:Xa},{id:"avalanche",label:"Avalanche Danger",icon:ES},{id:"traffic",label:"Traffic Flow",icon:kS},{id:"roads-511",label:"Road Conditions (511)",icon:RZ},{id:"mesh-health",label:"Mesh Health",icon:mv},{id:"broadcast-types",label:"Broadcast Types",icon:wk},{id:"reminders",label:"Reminder System",icon:af},{id:"notifications",label:"Notifications",icon:Pm},{id:"commands",label:"Commands",icon:UZ},{id:"llm-dm",label:"LLM DM Queries",icon:uD},{id:"or-not-and",label:"OR-not-AND Architecture",icon:GZ},{id:"adapter-config",label:"Adapter Config & CODE Rule",icon:fD},{id:"curation",label:"Curation: Gauges & Towns",icon:zZ},{id:"schema",label:"Schema Migrations",icon:_ce},{id:"api",label:"API Reference",icon:gce}];function ir({color:e}){const t={green:"bg-green-500",yellow:"bg-yellow-500",orange:"bg-orange-500",red:"bg-red-500",black:"bg-slate-800 border border-slate-600"};return p.jsx("span",{className:`inline-block w-3 h-3 rounded-full ${t[e]}`})}function St({headers:e,rows:t}){return p.jsx("div",{className:"overflow-x-auto my-4",children:p.jsxs("table",{className:"w-full text-sm",children:[p.jsx("thead",{children:p.jsx("tr",{className:"bg-[#1a2332] border-b border-[#2a3a4a]",children:e.map((r,n)=>p.jsx("th",{className:"px-4 py-2 text-left text-slate-400 font-medium",children:r},n))})}),p.jsx("tbody",{children:t.map((r,n)=>p.jsx("tr",{className:`border-b border-[#1e2a3a] ${n%2===0?"bg-[#0d1219]":"bg-[#0a0e17]"}`,children:r.map((i,a)=>p.jsx("td",{className:"px-4 py-2 text-slate-300",children:i},a))},n))})]})})}function Bt({href:e,children:t}){return p.jsxs("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"text-accent hover:underline inline-flex items-center gap-1",children:[t," ",p.jsx(Td,{size:12})]})}function be({children:e}){return p.jsx("h3",{className:"text-lg font-semibold text-slate-200 mt-6 mb-3",children:e})}function ml({children:e}){return p.jsx("h4",{className:"text-base font-medium text-slate-300 mt-4 mb-2",children:e})}function fe({children:e}){return p.jsx("code",{className:"font-mono text-accent bg-[#1a2332] px-1 rounded",children:e})}function wr({id:e,title:t,children:r}){return p.jsxs("section",{id:e,className:"mb-12 scroll-mt-6",children:[p.jsx("h2",{className:"text-2xl font-bold text-slate-100 mb-4 pb-2 border-b border-[#2a3a4a]",children:t}),p.jsx("div",{className:"text-slate-300 leading-relaxed space-y-4",children:r})]})}function Cet(){const e=gv(),[t,r]=G.useState(""),[n,i]=G.useState("stream-gauges"),a=G.useRef(null);G.useEffect(()=>{const l=e.hash.replace("#","");if(l&&s7.find(u=>u.id===l)){i(l);const u=document.getElementById(l);u&&u.scrollIntoView({behavior:"smooth"})}},[e.hash]);const o=s7.filter(l=>l.label.toLowerCase().includes(t.toLowerCase())),s=l=>{i(l);const u=document.getElementById(l);u&&u.scrollIntoView({behavior:"smooth"}),window.history.replaceState(null,"",`#${l}`)};return p.jsxs("div",{className:"flex h-full -m-6",children:[p.jsxs("aside",{className:"w-64 flex-shrink-0 bg-bg-card border-r border-border overflow-y-auto",children:[p.jsx("div",{className:"p-4 border-b border-border",children:p.jsxs("div",{className:"relative",children:[p.jsx(jS,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-500"}),p.jsx("input",{type:"text",value:t,onChange:l=>r(l.target.value),placeholder:"Search topics...",className:"w-full pl-9 pr-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent placeholder-slate-600"})]})}),p.jsx("nav",{className:"py-2",children:o.map(l=>{const u=l.icon,c=n===l.id;return p.jsxs("button",{onClick:()=>s(l.id),className:`w-full flex items-center gap-3 px-4 py-2.5 text-sm text-left transition-colors ${c?"text-accent bg-accent/10 border-l-2 border-accent":"text-slate-400 hover:text-slate-200 hover:bg-bg-hover border-l-2 border-transparent"}`,children:[p.jsx(u,{size:16}),l.label]},l.id)})})]}),p.jsx("div",{ref:a,className:"flex-1 overflow-y-auto p-6",children:p.jsxs("div",{className:"max-w-4xl",children:[p.jsx("p",{className:"text-slate-400 mb-8",children:"Everything you need to understand and configure MeshAI's monitoring and alerting systems."}),p.jsxs(wr,{id:"stream-gauges",title:"Stream Gauges",children:[p.jsx(be,{children:"What You're Looking At"}),p.jsx("p",{children:"MeshAI watches river and stream levels at gauges you configure. Each gauge reports two things:"}),p.jsxs("p",{children:[p.jsx("strong",{children:"Water Level (Gage Height)"}),` — how high the water is, measured in feet. Important: this is NOT the depth of the river. It's the height above a fixed measuring point that's different at every gauge. A reading of "10 feet" at one gauge means something completely different than "10 feet" at another. You can only compare readings from the SAME gauge over time.`]}),p.jsxs("p",{children:[p.jsx("strong",{children:"Flow (Discharge)"}),` — how much water is moving past the gauge, in cubic feet per second (CFS). Think of it as the river's "throughput." For scale:`]}),p.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[p.jsx("li",{children:"A small creek: 50-200 CFS"}),p.jsx("li",{children:"A mid-size river: 1,000-5,000 CFS"}),p.jsx("li",{children:"A big river in spring runoff: 10,000+ CFS"})]}),p.jsx(be,{children:"When Does It Flood?"}),p.jsxs("p",{children:["Flood levels are set by the ",p.jsx("strong",{children:"National Weather Service"}),', not USGS. NWS looks at each specific gauge location and decides "at what water level does the road flood? At what level do buildings get water?" Those levels are different everywhere.']}),p.jsxs("p",{children:[p.jsx("strong",{children:"Action Stage"})," — water is rising, time to start paying attention. Usually still inside the riverbanks."]}),p.jsxs("p",{children:[p.jsx("strong",{children:"Minor Flood"})," — low-lying roads start getting water on them. NWS issues a Flood Advisory."]}),p.jsxs("p",{children:[p.jsx("strong",{children:"Moderate Flood"})," — water in buildings near the river. Some people need to evacuate. NWS issues a Flood Warning."]}),p.jsxs("p",{children:[p.jsx("strong",{children:"Major Flood"})," — widespread flooding. Many people evacuating. Serious property damage."]}),p.jsx("p",{children:"MeshAI automatically looks up the flood levels for your gauge from NWS when you add a site. Some remote gauges don't have flood levels assigned — for those, you set them manually if you know what water levels cause problems in your area."}),p.jsx(be,{children:"Low Water / Drought"}),p.jsx("p",{children:`There's no official "drought stage" for most gauges. If you need to monitor low water (irrigation, fish habitat), set a manual low-water threshold based on what you know about your local river.`}),p.jsx(be,{children:"Setting It Up"}),p.jsxs("ol",{className:"list-decimal list-inside ml-4 space-y-1",children:[p.jsxs("li",{children:["Find your gauge at ",p.jsx(Bt,{href:"https://waterdata.usgs.gov/nwis",children:"waterdata.usgs.gov/nwis"})]}),p.jsxs("li",{children:["Copy the site number (like ",p.jsx(fe,{children:"13090500"}),")"]}),p.jsx("li",{children:"Add it in Config → Environmental → USGS"}),p.jsx("li",{children:"MeshAI auto-fills the gauge name and flood levels from NWS"})]}),p.jsx("p",{children:"If NWS flood levels don't populate, your gauge may not have them. Set manual thresholds if you know your local conditions."}),p.jsx(be,{children:"Learn More"}),p.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[p.jsxs("li",{children:[p.jsx(Bt,{href:"https://waterdata.usgs.gov/nwis",children:"USGS Water Data"})," — find gauges near you"]}),p.jsxs("li",{children:[p.jsx(Bt,{href:"https://water.noaa.gov",children:"NWS Water Prediction Service"})," — flood forecasts and thresholds"]}),p.jsxs("li",{children:[p.jsx(Bt,{href:"https://www.usgs.gov/special-topics/water-science-school/science/how-streamflow-measured",children:"Understanding Streamflow"})," — USGS explainer"]})]})]}),p.jsxs(wr,{id:"wildfire",title:"Wildfire",children:[p.jsx(be,{children:"What You're Looking At"}),p.jsx("p",{children:"MeshAI tracks active wildfire perimeters from the National Interagency Fire Center (NIFC). For each fire, you see the name, size, how much is contained, and how far it is from your mesh nodes."}),p.jsx(be,{children:"Fire Size — How Big Is It?"}),p.jsx(St,{headers:["Size","What That Means"],rows:[["10 acres","Small fire. Usually handled quickly by initial crews."],["100 acres","Notable fire. Active firefighting effort."],["1,000 acres","Large fire. Major resources being deployed."],["10,000+ acres","Very large fire. Multiple teams, aircraft, heavy equipment."],["100,000+ acres","Mega-fire. These make the national news."]]}),p.jsx("p",{children:"For reference, 1,000 acres is about 1.5 square miles."}),p.jsx(be,{children:"Containment — Is It Under Control?"}),p.jsx("p",{children:"Containment means the percentage of the fire's edge where firefighters have built a control line (a cleared strip to stop the fire from spreading further). It does NOT mean the fire is out inside that line."}),p.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[p.jsxs("li",{children:[p.jsx("strong",{children:"0-30%"})," — Essentially uncontrolled. The fire goes where it wants."]}),p.jsxs("li",{children:[p.jsx("strong",{children:"50%"})," — Good progress, but half the edge can still grow."]}),p.jsxs("li",{children:[p.jsx("strong",{children:"80%+"})," — Well controlled. Major growth unlikely."]}),p.jsxs("li",{children:[p.jsx("strong",{children:"100%"}),' — The edge is fully controlled. But the fire may STILL be actively burning inside. "100% contained" does NOT mean "out."']})]}),p.jsx(be,{children:"How Far Away Should I Worry?"}),p.jsx(St,{headers:["Distance","What To Do"],rows:[[p.jsxs(p.Fragment,{children:[p.jsx(ir,{color:"red"})," Under 5 km (3 miles)"]}),p.jsxs(p.Fragment,{children:[p.jsx("strong",{children:"Immediate threat."})," This is evacuation-order range. Embers can fly this far in wind."]})],[p.jsxs(p.Fragment,{children:[p.jsx(ir,{color:"orange"})," 5-15 km (3-10 miles)"]}),p.jsxs(p.Fragment,{children:[p.jsx("strong",{children:"Prepare."})," The fire could reach you in hours under bad conditions. Have a plan."]})],[p.jsxs(p.Fragment,{children:[p.jsx(ir,{color:"yellow"})," 15-30 km (10-20 miles)"]}),p.jsxs(p.Fragment,{children:[p.jsx("strong",{children:"Watch."})," Smoke is likely. Wind shifts could change things fast."]})],[p.jsxs(p.Fragment,{children:[p.jsx(ir,{color:"green"})," Over 30 km (20 miles)"]}),p.jsxs(p.Fragment,{children:[p.jsx("strong",{children:"Awareness."})," Keep an eye on it, but no immediate threat."]})]]}),p.jsx("p",{children:"How fast can a fire travel? In grass with wind: up to 14 mph. In heavy timber: 1-6 mph. A fire 10 miles away could theoretically reach you in 1-2 hours under worst-case conditions, but typical spread is much slower."}),p.jsx(be,{children:"Which Matters More — Size or Distance?"}),p.jsxs("p",{children:[p.jsx("strong",{children:"Distance is the immediate concern."})," A small uncontained fire 10 km away is more dangerous right now than a huge fire 50 km away. But big fires have more energy and can grow fast under wind shifts — keep watching them."]}),p.jsx(be,{children:"Setting It Up"}),p.jsxs("p",{children:["Just configure your state code (like ",p.jsx(fe,{children:"US-ID"})," for Idaho) in Config → Environmental → Fires. MeshAI polls NIFC every 10 minutes for active fires in that state and computes the distance to your mesh nodes automatically."]}),p.jsx(be,{children:"Learn More"}),p.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[p.jsxs("li",{children:[p.jsx(Bt,{href:"https://inciweb.nwcg.gov",children:"InciWeb"})," — detailed incident information"]}),p.jsxs("li",{children:[p.jsx(Bt,{href:"https://data-nifc.opendata.arcgis.com",children:"NIFC Fire Map"})," — raw perimeter data"]}),p.jsxs("li",{children:[p.jsx(Bt,{href:"https://www.ready.gov/wildfires",children:"Ready.gov Wildfires"})," — preparedness guide"]})]})]}),p.jsxs(wr,{id:"firms",title:"Satellite Fire Detection (FIRMS)",children:[p.jsx(be,{children:"What You're Looking At"}),p.jsx("p",{children:`NASA's VIIRS satellites orbit the Earth and look for heat signatures on the ground. When they see something hot — a fire, a factory, a sunlit building — they flag it as a "hotspot." MeshAI checks these detections for your area.`}),p.jsxs("p",{children:[p.jsx("strong",{children:"Why this matters"}),": satellite hotspots show up ",p.jsx("strong",{children:"hours before"})," official fire perimeters are mapped. If a new fire starts near your mesh, the satellite might see it before anyone on the ground reports it."]}),p.jsx(be,{children:"Confidence — Is It Really a Fire?"}),p.jsx("p",{children:"Each detection gets a confidence rating:"}),p.jsx(St,{headers:["Confidence","What It Means"],rows:[["High","Almost certainly a real fire. Strong heat signature."],["Nominal","Probably a real fire. Most actual fires get this rating."],["Low","Maybe a fire, maybe not. Could be a hot roof, sun reflecting off water, a factory, or a gas flare. Lots of false alarms."]]}),p.jsxs("p",{children:[p.jsx("strong",{children:"Recommendation"}),`: Set the filter to "Nominal + High." If you include "Low" you'll get alerts for every hot parking lot on a summer day.`]}),p.jsx(be,{children:"FRP — How Intense Is It?"}),p.jsx("p",{children:'FRP (Fire Radiative Power) measures the heat output in megawatts. Think of it as "how hot is this thing":'}),p.jsx(St,{headers:["FRP","What It Probably Is"],rows:[["Under 5 MW","Hot surface, small agricultural burn, gas flare, or warm ground"],["5-50 MW","An actual fire — brush fire, grass fire, typical wildfire"],["50-300 MW","Intense fire — trees fully burning, active fire front"],["Over 300 MW","Extreme fire — major wildfire in full force"]]}),p.jsx("p",{children:"Setting the minimum FRP to 5 MW filters out most industrial and agricultural false alarms."}),p.jsx(be,{children:"New Ignition Detection"}),p.jsxs("p",{children:["MeshAI cross-references satellite hotspots against known NIFC fire perimeters. If a hotspot is NOT near any known fire, it gets flagged as a ",p.jsx("strong",{children:"potential new ignition"})," — maybe a new fire just started. These get elevated priority regardless of confidence level."]}),p.jsx(be,{children:"Timing"}),p.jsxs("p",{children:["Satellite data arrives ",p.jsx("strong",{children:"1-3 hours"})," after the satellite passes overhead. Each location gets observed about ",p.jsx("strong",{children:"6 times per day"}),` across all satellites, so there are multi-hour gaps. This is not real-time — it's "pretty recent."`]}),p.jsx(be,{children:"Getting an API Key"}),p.jsxs("ol",{className:"list-decimal list-inside ml-4 space-y-1",children:[p.jsxs("li",{children:["Go to ",p.jsx(Bt,{href:"https://firms.modaps.eosdis.nasa.gov/api/area/",children:"FIRMS API page"})]}),p.jsx("li",{children:'Click "Get MAP_KEY"'}),p.jsx("li",{children:"Register for a free Earthdata account"}),p.jsx("li",{children:"Your key arrives by email"}),p.jsx("li",{children:"Enter it in Config → Environmental → FIRMS"})]}),p.jsx(be,{children:"Learn More"}),p.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[p.jsxs("li",{children:[p.jsx(Bt,{href:"https://firms.modaps.eosdis.nasa.gov",children:"FIRMS Fire Map"})," — see hotspots on a map"]}),p.jsxs("li",{children:[p.jsx(Bt,{href:"https://earthdata.nasa.gov/data/tools/firms/faq",children:"FIRMS FAQ"})," — how it works"]})]})]}),p.jsxs(wr,{id:"fire-tracker",title:"Fire Tracker (Fusion)",children:[p.jsx("p",{children:"FIRMS hotspots are fast but noisy; WFIGS incidents are accurate but slow. The Fire Tracker fuses both feeds and a per-pixel attribution graph so a single fire's name, declared acreage, real-time perimeter movement, and spotting events all land as separate broadcasts on the mesh."}),p.jsx(be,{children:"What you'll see on the mesh"}),p.jsx("p",{children:"Six fire-family alert categories, in order of when they fire during an incident's lifecycle:"}),p.jsx(St,{headers:["Category","Severity","Trigger","Example broadcast"],rows:[[p.jsx(fe,{children:"unattributed_hotspot_cluster"}),"Priority","3+ FIRMS pixels within 1 mi over 60 min, no WFIGS match — possible new ignition before NIFC declares it",p.jsx("span",{className:"text-amber-300",children:"🔥 Possible new fire: 3 hotspots within 1 mi @ 42.93,-114.45 (combined 78 MW)"})],[p.jsx(fe,{children:"wildfire_declared"}),"Priority","WFIGS first-sight of a new IRWIN incident — the official 'this is a fire and here is its name' record",p.jsx("span",{className:"text-amber-300",children:"🔥 New: Cache Peak Fire (WF), 3 mi N of Almo: 250 ac, 0% contained"})],[p.jsx(fe,{children:"wildfire_growth"}),"Priority","Per-pass centroid drift >= 0.5 mi (configurable) between consecutive satellite passes — the fire's footprint moved",p.jsx("span",{className:"text-amber-300",children:"🔥 Cache Peak Fire moving NE 1.2 mi/h, ~3 mi from Almo"})],[p.jsx(fe,{children:"wildfire_spotting"}),"Immediate","FIRMS pixel attributed to a tracked fire but >= 1.5 mi (configurable) outside its prior-pass convex-hull perimeter — ember spread",p.jsx("span",{className:"text-amber-300",children:"🔥 Possible spotting 2.1 mi NE of Cache Peak Fire perimeter"})],[p.jsx(fe,{children:"wildfire_incident"}),"Priority","WFIGS acreage or containment increased on a fire already broadcast once (the Update path; the New path uses wildfire_declared)",p.jsx("span",{className:"text-amber-300",children:"🔥 Update: Cache Peak Fire: 1,847 ac, 23% contained"})],[p.jsx(fe,{children:"wildfire_halted"}),"Routine","No FIRMS pixels attributed for 12+ hours (configurable) — fire stalled or out",p.jsx("span",{className:"text-amber-300",children:"🔥 Cache Peak Fire no growth in 14h"})]]}),p.jsx(be,{children:"Daily LLM digest"}),p.jsxs("p",{children:["Twice a day (default 06:00 and 18:00 Mountain Time) the bot runs an LLM summary across every active fire and the last 24 h of growth + spotting events, then broadcasts one terse line to the mesh. Shape:"," ",p.jsx("span",{className:"text-amber-300",children:'"Fires today: Cache Peak 1,847 ac +200 NE; Twin Peaks 320 ac stable; possible new fire 15 mi from Cache Peak."'})," ","Configure the schedule and timezone under ",p.jsx(fe,{children:"fires.digest_*"})," ","keys on the Adapter Config page."]}),p.jsx(be,{children:"How attribution works"}),p.jsxs("p",{children:["When a FIRMS hotspot lands, the bot walks every active fire (those not yet tombstoned) and matches by Haversine distance to that fire's running centroid. If the pixel is within the fire's ",p.jsx(fe,{children:"spread_radius_mi"})," ","(default 5 mi, per-fire override available) the pixel is attributed and appended to that fire's growth history. The centroid then re-computes as the median of the last 24 h of attributed pixels, so single-pixel outliers don't drag the perimeter around."]}),p.jsxs("p",{children:["Pixels that match no fire feed the cluster detector instead: if at least"," ",p.jsx(fe,{children:"cluster_min_pixels"})," (default 3) lie within"," ",p.jsx(fe,{children:"cluster_max_radius_mi"})," (default 1.0) over"," ",p.jsx(fe,{children:"cluster_time_window_minutes"})," (default 60), the bot fires a single ",p.jsx(fe,{children:"unattributed_hotspot_cluster"})," broadcast and marks the member pixels so a fourth arrival doesn't re-fire the same cluster."]}),p.jsx(be,{children:"How movement is computed"}),p.jsxs("p",{children:["Each VIIRS pass groups pixels into a ",p.jsx(fe,{children:"pass_id"})," (satellite + 90-min bucket). When a pixel from a different bucket arrives, the prior pass closes: its convex hull becomes the perimeter, its median centroid becomes the comparison anchor, and the bot computes drift (Haversine to the previous pass's centroid), an 8-way compass bearing, and a wall-clock mi/h speed. If drift ≥ ",p.jsx(fe,{children:"growth_drift_threshold_mi"})," the"," ",p.jsx(fe,{children:"wildfire_growth"})," broadcast fires."]}),p.jsx(be,{children:"How spotting is detected"}),p.jsxs("p",{children:["Once a pass closes its perimeter (a GeoJSON polygon stored on the fire), every subsequent attributed pixel runs a point-in-polygon test. Pixels outside the polygon with a vertex distance ≥"," ",p.jsx(fe,{children:"spotting_distance_threshold_mi"})," (default 1.5) fire the"," ",p.jsx(fe,{children:"wildfire_spotting"})," broadcast at ",p.jsx("em",{children:"immediate"})," severity — spread beyond the existing perimeter is the most actionable fire signal we emit. A per-fire cooldown (",p.jsx(fe,{children:"spotting_cooldown_seconds"}),", default 1 h) prevents an ember burst in the same area from spamming the mesh."]}),p.jsx(be,{children:"Tunable knobs (Adapter Config → fires)"}),p.jsx(St,{headers:["Key","Default","What it does"],rows:[[p.jsx(fe,{children:"spread_radius_mi_default"}),"5.0 mi","Attribution radius for FIRMS → fire matching. Per-fire override in the fires.spread_radius_mi column."],[p.jsx(fe,{children:"growth_drift_threshold_mi"}),"0.5 mi","Per-pass centroid drift at or above this fires wildfire_growth."],[p.jsx(fe,{children:"halt_passes_threshold"}),"2","Consecutive empty satellite passes before wildfire_halted (documented; the time gate below is the operational rule)."],[p.jsx(fe,{children:"halt_minimum_seconds"}),"43,200 (12 h)","Minimum elapsed seconds since the most recent attributed pixel before wildfire_halted can fire."],[p.jsx(fe,{children:"spotting_distance_threshold_mi"}),"1.5 mi","Distance from prior-pass perimeter that fires wildfire_spotting."],[p.jsx(fe,{children:"spotting_cooldown_seconds"}),"3,600 (1 h)","Minimum seconds between consecutive spotting broadcasts per fire."],[p.jsx(fe,{children:"digest_enabled"}),"true","Master toggle for the twice-daily digest."],[p.jsx(fe,{children:"digest_schedule"}),'["06:00","18:00"]',"Local-time slots for the digest."],[p.jsx(fe,{children:"digest_timezone"}),"America/Boise","IANA tz for digest_schedule."],[p.jsx(fe,{children:"digest_max_chars"}),"200","Hard cap on the digest wire (the LLM is told to fit; the chunker enforces)."]]})]}),p.jsxs(wr,{id:"weather-alerts",title:"Weather Alerts",children:[p.jsx(be,{children:"What You're Looking At"}),p.jsx("p",{children:"MeshAI watches for NWS (National Weather Service) alerts affecting your area — warnings, watches, and advisories."}),p.jsx(be,{children:"Alert Severity — How Serious Is It?"}),p.jsx(St,{headers:["Severity","What It Means","Example"],rows:[["Extreme","Life-threatening. The most serious events.","Tornado Emergency, Hurricane Warning, Tsunami Warning"],["Severe","Dangerous. Take protective action.","Tornado Warning, Flash Flood Warning, Blizzard Warning, Red Flag Warning"],["Moderate","Be prepared. Could become dangerous.","Winter Weather Advisory, Wind Advisory, Flood Watch, Heat Advisory"],["Minor","Good to know. Probably won't hurt anyone.","Special Weather Statement, Air Quality Alert"]]}),p.jsx(be,{children:"When Should I Act? (Urgency)"}),p.jsx(St,{headers:["Urgency","What It Means"],rows:[["Immediate","Do something NOW"],["Expected","Do something within the hour"],["Future","Coming in the next several hours"],["Past","It's over — NWS is clearing the alert"]]}),p.jsx(be,{children:"How Sure Are They? (Certainty)"}),p.jsx(St,{headers:["Certainty","What It Means"],rows:[["Observed","It's happening right now. Verified."],["Likely","More than 50% chance"],["Possible","Could happen, but less than 50%"],["Unlikely","Probably won't, but mentioned for awareness"]]}),p.jsx(be,{children:"These Are Separate Scales"}),p.jsx("p",{children:'A single alert has all three. A hurricane warning for next week is "Severe + Future + Likely." A tornado spotted on the ground is "Extreme + Immediate + Observed." An air quality advisory is "Minor + Expected + Possible."'}),p.jsx(be,{children:"What Minimum Severity Should I Set?"}),p.jsx(St,{headers:["Setting","What You Get","What You Miss"],rows:[["Minor","Everything — high volume","Nothing"],[p.jsxs(p.Fragment,{children:[p.jsx("strong",{children:"Moderate"})," ✓"]}),"Watches, Advisories, and Warnings","Special Weather Statements"],["Severe","Only Warnings — things happening NOW","Watches (which give you hours of advance warning)"],["Extreme","Only the rarest events","Most Tornado and Severe Thunderstorm Warnings"]]}),p.jsxs("p",{children:[p.jsx("strong",{children:"Moderate is recommended."})," It catches Watches (advance warning that conditions may worsen) and Advisories (conditions exist but aren't severe) while filtering out the informational stuff."]}),p.jsx(be,{children:"Finding Your NWS Zone"}),p.jsxs("ol",{className:"list-decimal list-inside ml-4 space-y-1",children:[p.jsxs("li",{children:["Go to ",p.jsx(Bt,{href:"https://www.weather.gov",children:"weather.gov"})]}),p.jsx("li",{children:"Enter your location"}),p.jsxs("li",{children:["Find your zone code at ",p.jsx(Bt,{href:"https://www.weather.gov/pimar/PubZone",children:"NWS Zone Map"})]}),p.jsxs("li",{children:["Zone codes look like: ",p.jsx(fe,{children:"IDZ016"}),", ",p.jsx(fe,{children:"UTZ040"}),", etc."]})]}),p.jsx(be,{children:"The User-Agent Field"}),p.jsx("p",{children:"NWS wants to know who's using their API — not for approval, just so they can contact you if something breaks. You make it up:"}),p.jsx("p",{children:p.jsx(fe,{children:"(meshai, you@email.com)"})}),p.jsx("p",{children:"No registration. No waiting. Just type it in."}),p.jsx(be,{children:"Learn More"}),p.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[p.jsxs("li",{children:[p.jsx(Bt,{href:"https://alerts.weather.gov",children:"NWS Active Alerts"})," — see current alerts"]}),p.jsxs("li",{children:[p.jsx(Bt,{href:"https://www.weather.gov/documentation/services-web-api",children:"NWS API Docs"})," — technical details"]})]})]}),p.jsxs(wr,{id:"solar",title:"Solar & Geomagnetic Conditions",children:[p.jsx(be,{children:"What You're Looking At"}),p.jsx("p",{children:"MeshAI tracks space weather — solar activity and its effects on Earth's magnetic field. This matters for radio operators because the sun directly controls how well HF radio works, and major solar events can affect all radio communications."}),p.jsx(be,{children:"Solar Flux Index (SFI)"}),p.jsx("p",{children:'Think of SFI as a "how active is the sun" number. Higher = better for HF radio, but also higher risk of solar flares.'}),p.jsx(St,{headers:["SFI","What It Means for You"],rows:[["Below 70","Quiet sun. Higher HF bands (10m, 15m) are probably dead. Stick to lower bands."],["70-90","Getting better. Some openings on 15m and above, but inconsistent."],["90-120","Good. Most HF bands work. Reliable contacts on 20m and 15m."],["120-170","Great. All HF bands open. 10m works for worldwide contacts."],["Above 170","Excellent. Best HF conditions — but watch for flares."]]}),p.jsxs("p",{children:[p.jsx("strong",{children:"Quick rule"}),": SFI above 90 and Kp below 4 = good day for HF radio."]}),p.jsx(be,{children:"Kp Index"}),p.jsx("p",{children:"Kp measures how disturbed Earth's magnetic field is, on a 0-9 scale. Higher = more disturbance = worse for HF radio but better for aurora viewing."}),p.jsx(St,{headers:["Kp","What It Means for You"],rows:[["0-2","Quiet. Best HF conditions."],["3","Slightly unsettled. You probably won't notice."],["4","Active. Some noise and fading on HF, especially if you're at higher latitudes."],[p.jsx("strong",{children:"5"}),p.jsxs(p.Fragment,{children:[p.jsx("strong",{children:"Minor storm (G1)."})," HF noticeably degraded. Aurora visible at high latitudes (~60°N)."]})],[p.jsx("strong",{children:"6"}),p.jsxs(p.Fragment,{children:[p.jsx("strong",{children:"Moderate storm (G2)."})," HF getting rough. Aurora moving south (~55°N)."]})],[p.jsx("strong",{children:"7"}),p.jsxs(p.Fragment,{children:[p.jsx("strong",{children:"Strong storm (G3)."})," HF unreliable for 1-2 days. Aurora at mid-latitudes."]})],[p.jsx("strong",{children:"8-9"}),p.jsxs(p.Fragment,{children:[p.jsx("strong",{children:"Severe/Extreme storm."})," HF may black out completely. Aurora visible at very low latitudes. Power grid stress possible."]})]]}),p.jsx(be,{children:"R / S / G Scales"}),p.jsx("p",{children:"NOAA's shorthand for three types of space weather events:"}),p.jsx(ml,{children:"R (Radio Blackouts) — from solar flares:"}),p.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[p.jsx("li",{children:"R1-R2: Brief HF disruption. You might not notice."}),p.jsx("li",{children:"R3: HF goes out for about an hour on the sunlit side of Earth."}),p.jsx("li",{children:"R4-R5: HF dead for hours. Serious."})]}),p.jsx(ml,{children:"S (Solar Radiation Storms) — from energetic particles:"}),p.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[p.jsx("li",{children:"Mostly affects polar regions and satellites"}),p.jsx("li",{children:"S3+: Polar HF goes out entirely"})]}),p.jsx(ml,{children:"G (Geomagnetic Storms) — from solar wind disturbances:"}),p.jsx("ul",{className:"list-disc list-inside ml-4 space-y-1",children:p.jsx("li",{children:"Same as the Kp scale: G1 = Kp 5, up to G5 = Kp 9"})}),p.jsx(be,{children:"Bz — The Storm Predictor"}),p.jsx("p",{children:"Bz measures the direction of the solar wind's magnetic field. When it points south (negative values), the solar wind can dump energy into Earth's magnetic field, causing storms."}),p.jsx(St,{headers:["Bz","What It Means"],rows:[["Positive","All good. Solar wind bouncing off."],["0 to -5","Slight coupling. Nothing dramatic."],["-5 to -10","Things starting to pick up. Storm possible."],["Below -10","Storm likely. Kp will start climbing."],["Below -20","Severe storm probable."]]}),p.jsx("p",{children:"Bz can change fast — minute to minute. What matters is whether it stays negative for hours, not brief dips."}),p.jsx(be,{children:"Learn More"}),p.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[p.jsxs("li",{children:[p.jsx(Bt,{href:"https://www.swpc.noaa.gov",children:"SWPC Space Weather Dashboard"})," — live data"]}),p.jsxs("li",{children:[p.jsx(Bt,{href:"https://www.swpc.noaa.gov/noaa-scales-explanation",children:"NOAA Space Weather Scales"})," — what R/S/G mean"]}),p.jsxs("li",{children:[p.jsx(Bt,{href:"https://www.hamqsl.com/solar.html",children:"HamQSL Solar Page"})," — ham-friendly display"]}),p.jsxs("li",{children:[p.jsx(Bt,{href:"https://www.swpc.noaa.gov/products/planetary-k-index",children:"Planetary K-Index"})," — live Kp"]})]})]}),p.jsxs(wr,{id:"ducting",title:"Tropospheric Ducting",children:[p.jsx(be,{children:"What You're Looking At"}),p.jsx("p",{children:'Sometimes the atmosphere creates an invisible "pipe" that traps radio signals and carries them much farther than normal. This is called tropospheric ducting. It mostly affects VHF and UHF frequencies.'}),p.jsx("p",{children:"MeshAI watches for these conditions by analyzing weather data (temperature and humidity at different altitudes) over your mesh area."}),p.jsx(be,{children:"How Do I Know If Ducting Is Happening?"}),p.jsx("p",{children:'MeshAI reports a "condition" based on the atmospheric profile:'}),p.jsx(St,{headers:["Condition","What It Means"],rows:[["Normal","Standard propagation. Nothing unusual."],["Super-refraction","Slightly enhanced range. You might hear a few more distant stations than usual."],["Surface Duct","Radio signals trapped near the ground. You may hear stations hundreds of km away that you've never heard before."],["Elevated Duct",'Same effect but the "pipe" is up in the atmosphere. Affects signals passing through that altitude.']]}),p.jsx(be,{children:"What You'll Actually Notice"}),p.jsx("p",{children:"When ducting happens on your mesh:"}),p.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[p.jsx("li",{children:"Distant repeaters you've never heard suddenly come in"}),p.jsx("li",{children:"Nodes appear from far outside your normal range"}),p.jsx("li",{children:"You hear FM radio stations from other cities"}),p.jsx("li",{children:"ADS-B flight tracking range gets much longer"}),p.jsx("li",{children:"There might be interference from distant stations on your frequency"})]}),p.jsx(be,{children:"The dM/dz Number"}),p.jsx("p",{children:`The dashboard shows a "dM/dz" value in "M-units/km." You don't need to understand the math — just know:`}),p.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[p.jsxs("li",{children:[p.jsx("strong",{children:"Around 118"})," = normal atmosphere"]}),p.jsxs("li",{children:[p.jsx("strong",{children:"Below 79"})," = enhanced propagation starting"]}),p.jsxs("li",{children:[p.jsx("strong",{children:"Below 0 (negative)"})," = ducting is happening"]}),p.jsxs("li",{children:[p.jsx("strong",{children:"Below -50"})," = strong ducting — classic VHF/UHF DX event"]})]}),p.jsx(be,{children:"When Does Ducting Happen?"}),p.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[p.jsx("li",{children:"Under high-pressure weather systems (clear, stable air)"}),p.jsx("li",{children:"When warm air sits on top of cool air (temperature inversion)"}),p.jsx("li",{children:"Most common in late summer and early fall"}),p.jsx("li",{children:"Strongest along coastlines and over water"}),p.jsx("li",{children:"In mountain valleys: cold air pooling in fall/winter can create surface ducts"})]}),p.jsx(be,{children:"Setting It Up"}),p.jsx("p",{children:"Just configure the latitude and longitude of the center of your mesh area in Config → Environmental → Ducting. MeshAI checks the atmospheric conditions there every 3 hours using free weather model data. No API key needed."}),p.jsx(be,{children:"Learn More"}),p.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[p.jsxs("li",{children:[p.jsx(Bt,{href:"https://dxinfocentre.com/tropo.html",children:"Tropo Forecast Maps (Hepburn)"})," — 6-day tropo prediction"]}),p.jsxs("li",{children:[p.jsx(Bt,{href:"https://dxmaps.com",children:"DX Maps"})," — real-time VHF/UHF propagation reports"]}),p.jsxs("li",{children:[p.jsx(Bt,{href:"https://en.wikipedia.org/wiki/Tropospheric_propagation",children:"Wikipedia: Tropospheric Propagation"})," — background"]})]})]}),p.jsxs(wr,{id:"avalanche",title:"Avalanche Danger",children:[p.jsx(be,{children:"What You're Looking At"}),p.jsx("p",{children:"MeshAI pulls avalanche forecasts from your regional avalanche center during winter months. The danger scale has 5 levels and it's the same across all of North America."}),p.jsx(be,{children:"The Danger Scale"}),p.jsx(St,{headers:["Level","Name","Color","What To Do"],rows:[["1","Low",p.jsx(ir,{color:"green"}),"Generally safe. Normal caution in steep terrain."],["2","Moderate",p.jsx(ir,{color:"yellow"}),"Be careful on specific terrain features. Evaluate conditions."],["3","Considerable",p.jsx(ir,{color:"orange"}),p.jsxs(p.Fragment,{children:[p.jsx("strong",{children:"DANGEROUS."}),` This is where most people die in avalanches — they see "3 out of 5" and think it's fine. It's not. Use extreme caution.`]})],["4","High",p.jsx(ir,{color:"red"}),p.jsxs(p.Fragment,{children:[p.jsx("strong",{children:"Very dangerous."})," Stay off anything steep."]})],["5","Extreme",p.jsx(ir,{color:"black"}),p.jsxs(p.Fragment,{children:[p.jsx("strong",{children:"Don't go out."})," Avalanches are happening on their own."]})]]}),p.jsx(be,{children:"The Most Important Thing to Know"}),p.jsxs("p",{children:[p.jsx("strong",{children:"Level 3 (Considerable) kills more people than any other level."}),' People look at "3 out of 5" and think "middle of the road, probably okay." In reality, the risk roughly doubles at each step up the scale. Level 3 is where dangerous conditions overlap with people thinking they can handle it.']}),p.jsx(be,{children:"Seasonal"}),p.jsx("p",{children:'MeshAI only checks avalanche conditions during winter months (configurable, default December through April). Outside season, it shows "off season" and saves API calls.'}),p.jsx(be,{children:"Finding Your Avalanche Center"}),p.jsxs("p",{children:["Go to ",p.jsx(Bt,{href:"https://avalanche.org/avalanche-centers/",children:"avalanche.org/avalanche-centers/"})," for a map. Common center codes:"]}),p.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[p.jsxs("li",{children:[p.jsx(fe,{children:"SNFAC"})," — Sawtooth (central Idaho)"]}),p.jsxs("li",{children:[p.jsx(fe,{children:"UAC"})," — Utah"]}),p.jsxs("li",{children:[p.jsx(fe,{children:"NWAC"})," — Cascades/Olympics (WA/OR)"]}),p.jsxs("li",{children:[p.jsx(fe,{children:"CAIC"})," — Colorado"]}),p.jsxs("li",{children:[p.jsx(fe,{children:"SAC"})," — Sierra Nevada (CA)"]}),p.jsxs("li",{children:[p.jsx(fe,{children:"GNFAC"})," — Gallatin (SW Montana)"]})]}),p.jsx(be,{children:"Learn More"}),p.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[p.jsxs("li",{children:[p.jsx(Bt,{href:"https://avalanche.org",children:"Avalanche.org"})," — US forecasts"]}),p.jsxs("li",{children:[p.jsx(Bt,{href:"https://avalanche.org/avalanche-encyclopedia/human/resources/north-american-public-avalanche-danger-scale/",children:"Avalanche Danger Scale"})," — full scale explanation"]}),p.jsxs("li",{children:[p.jsx(Bt,{href:"https://kbyg.org",children:"Know Before You Go"})," — avalanche awareness"]})]})]}),p.jsxs(wr,{id:"traffic",title:"Traffic Flow",children:[p.jsx(be,{children:"What You're Looking At"}),p.jsx("p",{children:"MeshAI monitors traffic speed on road segments you configure, using data from TomTom (real vehicles with navigation apps reporting their speed)."}),p.jsx(be,{children:"Speed Ratio — The Key Number"}),p.jsx("p",{children:'MeshAI compares current speed to "free-flow speed" (what traffic normally does when the road is empty). The ratio tells you how congested it is:'}),p.jsx(St,{headers:["Ratio","What It Means"],rows:[[p.jsxs(p.Fragment,{children:[p.jsx(ir,{color:"green"})," Above 85%"]}),"Normal. Traffic flowing fine."],[p.jsxs(p.Fragment,{children:[p.jsx(ir,{color:"yellow"})," 65-85%"]}),"Slow. Heavier than usual but moving."],[p.jsxs(p.Fragment,{children:[p.jsx(ir,{color:"orange"})," 40-65%"]}),"Congested. Significant delays."],[p.jsxs(p.Fragment,{children:[p.jsx(ir,{color:"red"})," Below 40%"]}),"Gridlock. Barely moving."]]}),p.jsxs("p",{children:[p.jsx("strong",{children:"Note"}),`: "free-flow speed" is NOT the speed limit. It's what traffic actually does on that road when nobody's in the way. Drivers often exceed speed limits on open highways.`]}),p.jsx(be,{children:"Confidence — Can You Trust the Data?"}),p.jsx("p",{children:"TomTom's confidence score tells you how much of the reading comes from real vehicles right now vs historical averages:"}),p.jsx(St,{headers:["Confidence","What It Means"],rows:[["Above 0.9","Very reliable — lots of real-time probe data"],["0.7-0.9","Good — mix of real-time and historical"],["Below 0.7",p.jsxs(p.Fragment,{children:[p.jsx("strong",{children:"Unreliable"})," — mostly guessing from historical patterns. Don't alert on this."]})]]}),p.jsx("p",{children:"Set minimum confidence to 0.7 to avoid false congestion alerts at night or on rural roads where few probe vehicles drive."}),p.jsx(be,{children:"Setting Up Corridors"}),p.jsx("p",{children:'Each "corridor" is a point on a road you want to monitor. To add one:'}),p.jsxs("ol",{className:"list-decimal list-inside ml-4 space-y-1",children:[p.jsx("li",{children:"Go to Google Maps, find the road"}),p.jsx("li",{children:`Right-click the road → "What's here?" → copy the coordinates`}),p.jsx("li",{children:"Add the corridor in Config with a name and those coordinates"}),p.jsx("li",{children:"TomTom finds the nearest road segment automatically"})]}),p.jsx(be,{children:"Getting an API Key"}),p.jsxs("ol",{className:"list-decimal list-inside ml-4 space-y-1",children:[p.jsxs("li",{children:["Sign up at ",p.jsx(Bt,{href:"https://developer.tomtom.com",children:"developer.tomtom.com"})," (free)"]}),p.jsx("li",{children:"Create an app → get your API key"}),p.jsx("li",{children:"Free tier: 2,500 requests/day (plenty for 5-10 corridors)"})]}),p.jsx(be,{children:"Learn More"}),p.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[p.jsxs("li",{children:[p.jsx(Bt,{href:"https://developer.tomtom.com",children:"TomTom Developer Portal"})," — API docs and key signup"]}),p.jsxs("li",{children:[p.jsx(Bt,{href:"https://www.tomtom.com/traffic-index/",children:"TomTom Traffic Index"})," — city congestion rankings"]})]})]}),p.jsxs(wr,{id:"roads-511",title:"Road Conditions (511)",children:[p.jsx(be,{children:"What You're Looking At"}),p.jsx("p",{children:"511 systems report road closures, construction, weather events, mountain pass conditions, and incidents. Every state runs their own 511 system — there is no national API."}),p.jsx(be,{children:"Setting It Up"}),p.jsx("p",{children:"You need to find YOUR state's 511 developer API. MeshAI does not include a default URL because every state is different. Some states have free public APIs, some require registration, and some don't have developer APIs at all."}),p.jsx("p",{children:"Configure in Config → Environmental → 511:"}),p.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[p.jsxs("li",{children:[p.jsx("strong",{children:"Base URL"})," — your state's API endpoint"]}),p.jsxs("li",{children:[p.jsx("strong",{children:"API Key"})," — if required by your state"]}),p.jsxs("li",{children:[p.jsx("strong",{children:"Endpoints"})," — which data feeds to poll (varies by state)"]})]}),p.jsx(be,{children:"Learn More"}),p.jsx("p",{children:"Check your state's 511 or DOT website for developer information."})]}),p.jsxs(wr,{id:"mesh-health",title:"Mesh Health",children:[p.jsx(be,{children:"Health Score"}),p.jsx("p",{children:"MeshAI computes a 0-100 health score for your mesh network by looking at five areas, each weighted differently:"}),p.jsx(St,{headers:["Pillar","Weight","What It Measures"],rows:[[p.jsx("strong",{children:"Infrastructure"}),"30%","Are your routers online?"],[p.jsx("strong",{children:"Utilization"}),"25%","Is the radio channel congested?"],[p.jsx("strong",{children:"Coverage"}),"20%","Do nodes have redundant paths to gateways?"],[p.jsx("strong",{children:"Behavior"}),"15%","Are any nodes flooding the channel?"],[p.jsx("strong",{children:"Power"}),"10%","Are battery-powered nodes running low?"]]}),p.jsx("p",{children:"The overall score is the weighted sum:"}),p.jsx("p",{className:"p-3 bg-slate-800 rounded font-mono text-sm",children:"Score = (Infrastructure × 30%) + (Utilization × 25%) + (Coverage × 20%) + (Behavior × 15%) + (Power × 10%)"}),p.jsx(be,{children:"How Each Pillar Is Calculated"}),p.jsx(ml,{children:"Infrastructure (30%)"}),p.jsx("p",{children:"This is the simplest pillar — what percentage of your infrastructure nodes are currently online?"}),p.jsx("p",{className:"p-3 bg-slate-800 rounded font-mono text-sm",children:"(routers online ÷ total routers) × 100"}),p.jsxs("p",{children:["Only nodes with the ",p.jsx(fe,{children:"ROUTER"}),", ",p.jsx(fe,{children:"ROUTER_LATE"}),", or ",p.jsx(fe,{children:"ROUTER_CLIENT"})," role count as infrastructure. Regular client nodes going offline doesn't affect this score. If you have 5 routers and 3 are online, infrastructure scores 60."]}),p.jsxs("p",{children:[p.jsx("strong",{children:"Special case:"})," If you have no routers at all (all clients), this pillar scores 100. You're not penalized for not having infrastructure — you just don't have any to track."]}),p.jsx(ml,{children:"Utilization (25%)"}),p.jsxs("p",{children:["MeshAI reads the channel utilization that each router reports in its telemetry — this is the firmware's own measurement of how busy the radio channel is. MeshAI uses the ",p.jsx("strong",{children:"highest"})," value from any infrastructure node because the busiest router is the bottleneck for the whole mesh."]}),p.jsx("p",{children:p.jsx("strong",{children:"How it works:"})}),p.jsxs("ol",{className:"list-decimal list-inside space-y-1 ml-4",children:[p.jsxs("li",{children:["Collect ",p.jsx(fe,{children:"channel_utilization"})," from all infrastructure nodes that report it"]}),p.jsx("li",{children:"If no infra nodes have telemetry, try all nodes"}),p.jsxs("li",{children:["Use the ",p.jsx("strong",{children:"maximum"})," value for scoring (busiest node = bottleneck)"]}),p.jsx("li",{children:"If no nodes report utilization (older firmware), fall back to packet count estimate"})]}),p.jsxs("p",{className:"mt-4",children:[p.jsx("strong",{children:"Fallback method"})," (when telemetry unavailable): estimates from packet counts using 200ms/packet airtime. This is less accurate — it assumes MediumFast preset and sums packets across all nodes."]}),p.jsx(St,{headers:["Channel Utilization","Score","What It Means"],rows:[["Under 20%","100","Channel is clear — this is the goal"],["20-25%","75-100","Slight degradation, occasional collisions"],["25-35%","50-75","Severe degradation — firmware throttling active"],["35-45%","25-50","Mesh struggling badly — reliability dropping"],["Over 45%","0-25","Mesh is effectively unusable"]]}),p.jsxs("p",{children:[p.jsx("strong",{children:"Special case:"})," If no utilization data is available (no telemetry and no packet data), this pillar scores 100. You're not penalized for missing data."]}),p.jsx(ml,{children:"Coverage (20%)"}),p.jsx("p",{children:'Measures gateway redundancy — how many of your data sources can "see" each node. A node reported by all 3 of your gateways has full coverage. A node only seen by 1 gateway is a single point of failure.'}),p.jsxs("p",{className:"p-3 bg-slate-800 rounded font-mono text-sm",children:["coverage_ratio = average_gateways_per_node ÷ total_sources",p.jsx("br",{}),"single_gw_penalty = (single_gateway_nodes ÷ total_nodes) × 40"]}),p.jsx("p",{children:"If a node is seen by 2 out of 3 sources, its coverage ratio is 0.67. Infrastructure nodes with only single-gateway coverage get an extra penalty — they're critical but have no backup path."}),p.jsx(St,{headers:["Coverage Ratio","Base Score","After Penalty"],rows:[["100% (all sources)","100","100 minus single-gw penalty"],["70-99%","90","Minus penalties"],["50-69%","70","Minus penalties"],["Under 50%","50 or less","Heavy penalty"]]}),p.jsxs("p",{children:[p.jsx("strong",{children:"Special case:"})," With only 1 data source, this pillar can't score well — there's no redundancy to measure. Coverage becomes meaningful when you have 2+ sources (MeshMonitor + MQTT, multiple gateways, etc.)."]}),p.jsx(ml,{children:"Behavior (15%)"}),p.jsx("p",{children:"Counts how many nodes are sending an unusually high number of non-text packets. This catches firmware bugs, stuck transmitters, and misconfigured nodes that are flooding the channel."}),p.jsxs("p",{children:[p.jsx("strong",{children:"What counts as flooding:"})," More than 500 non-text packets in 24 hours. Text messages don't count — the behavior pillar only flags telemetry, position, and routing packet floods."]}),p.jsx(St,{headers:["Flagged Nodes","Score"],rows:[["0","100"],["1","80"],["2-3","60"],["4-5","40"],["6+","20"]]}),p.jsx("p",{children:"A single misbehaving node only drops the score to 80. It takes multiple problem nodes to seriously hurt the behavior pillar."}),p.jsx(ml,{children:"Power (10%)"}),p.jsx("p",{children:"Measures what fraction of battery-powered nodes are below the warning threshold (default 20%)."}),p.jsx("p",{className:"p-3 bg-slate-800 rounded font-mono text-sm",children:"100 × (1 low_battery_nodes ÷ total_battery_nodes)"}),p.jsx("p",{children:"If 2 out of 10 battery nodes are below 20%, power scores 80."}),p.jsxs("p",{children:[p.jsx("strong",{children:"Important:"})," USB-powered nodes are excluded from this calculation. Many nodes report 100% battery even when running on wall power with no battery installed. Only nodes actually running on batteries affect this pillar."]}),p.jsx(be,{children:"Health Tiers"}),p.jsx(St,{headers:["Score","Tier","What It Means"],rows:[["90-100",p.jsxs(p.Fragment,{children:[p.jsx(ir,{color:"green"})," Healthy"]}),"Everything's working well."],["75-89",p.jsxs(p.Fragment,{children:[p.jsx(ir,{color:"yellow"})," Slight degradation"]}),"Some issues but the mesh is functional."],["50-74",p.jsxs(p.Fragment,{children:[p.jsx(ir,{color:"orange"})," Unhealthy"]}),"Multiple problems. Reliability is affected."],["25-49",p.jsxs(p.Fragment,{children:[p.jsx(ir,{color:"red"})," Warning"]}),"Significant issues. The mesh is struggling."],["0-24",p.jsxs(p.Fragment,{children:[p.jsx(ir,{color:"black"})," Critical"]}),"Major failures. Barely functional."]]}),p.jsx(be,{children:"Channel Utilization — Is the Radio Channel Full?"}),p.jsx("p",{children:"Meshtastic radios share one LoRa channel. If too many nodes are transmitting too often, they step on each other and messages get lost."}),p.jsx(St,{headers:["Utilization","What's Happening"],rows:[[p.jsxs(p.Fragment,{children:[p.jsx(ir,{color:"green"})," Under 25%"]}),"Healthy. The firmware itself starts throttling above 25% to protect the channel — so under 25% is the target."],[p.jsxs(p.Fragment,{children:[p.jsx(ir,{color:"yellow"})," 25-40%"]}),"Getting busy. Common on larger meshes. Worth watching."],[p.jsxs(p.Fragment,{children:[p.jsx(ir,{color:"orange"})," 40-50%"]}),"Congested. The firmware throttles GPS updates above 40%. Messages are colliding and retrying."],[p.jsxs(p.Fragment,{children:[p.jsx(ir,{color:"red"})," Over 50%"]}),"Serious problem. More time is spent retrying than communicating. Mesh reliability drops fast."],[p.jsxs(p.Fragment,{children:[p.jsx(ir,{color:"black"})," Over 65%"]}),"Documented failure point on busy LONG_FAST meshes. The mesh becomes unusable."]]}),p.jsx(be,{children:"Packet Flooding"}),p.jsx("p",{className:"p-3 bg-yellow-500/10 border border-yellow-500/30 rounded text-yellow-200",children:p.jsx("strong",{children:'⚠️ "Packet flooding" means a node sending too many RADIO PACKETS. This has nothing to do with water flooding.'})}),p.jsx("p",{children:"A normal Meshtastic node sends a packet every few minutes (announcing itself, reporting telemetry, updating position). If a node starts blasting packets every few seconds, something is wrong — firmware bug, stuck transmitter, or misconfiguration."}),p.jsx(St,{headers:["Packets per Minute","What It Means"],rows:[["1-5","Normal"],["5-10","Elevated — might be someone chatting a lot"],["10-20","Suspicious — worth investigating"],["Over 30","Something is broken. This node is actively hurting the mesh."]]}),p.jsx(be,{children:"Battery Levels"}),p.jsx("p",{children:"Most Meshtastic radios (T-Beam, RAK4631, Heltec V3) use a single lithium battery cell. The voltage tells you how much charge is left:"}),p.jsx(St,{headers:["Voltage","Charge","What To Do"],rows:[["4.20V","100%","Full"],["3.80V","~60%","Fine"],[p.jsx("strong",{children:"3.60V"}),p.jsx("strong",{children:"~30%"}),p.jsx(p.Fragment,{children:p.jsx("strong",{children:"⚠️ Warning — charge it soon"})})],[p.jsx("strong",{children:"3.50V"}),p.jsx("strong",{children:"~15%"}),p.jsx(p.Fragment,{children:p.jsx("strong",{children:"🔴 Low — charge it now"})})],[p.jsx("strong",{children:"3.40V"}),p.jsx("strong",{children:"~7%"}),p.jsx(p.Fragment,{children:p.jsx("strong",{children:"⚫ About to die"})})],["3.30V","~3%","Device shutting down"]]}),p.jsxs("p",{children:[p.jsx("strong",{children:"USB-powered nodes"})," report 100% battery even if there's no battery installed. Battery alerts only matter for nodes actually running on battery power."]}),p.jsx(be,{children:"Node Offline Detection"}),p.jsx("p",{children:`MeshAI marks a node as "offline" when it hasn't been heard for a configurable time period. Different node types need different thresholds:`}),p.jsx(St,{headers:["Node Type","Recommended Threshold","Why"],rows:[["Fixed infrastructure (wall power)",p.jsx("strong",{children:"2 hours"}),"These should always be transmitting. 2 hours of silence means something is wrong."],["Fixed client (wall power)","2-4 hours","Same logic, slightly more lenient."],["Mobile / vehicle","4-8 hours","They go behind mountains, into garages, out of range. Normal."],["Solar-powered","12-24 hours","May shut down at night when solar stops charging."]]}),p.jsxs("p",{children:[p.jsx("strong",{children:"Rule of thumb"}),`: set the threshold to about 4× the node's beacon interval. Too tight and nodes will constantly flap "offline/online" from normal gaps. Too loose and real outages go unnoticed.`]})]}),p.jsxs(wr,{id:"broadcast-types",title:"Broadcast Types",children:[p.jsx("p",{children:"Every broadcast the bot sends to the mesh carries a one-word prefix that tells you what kind of update it is. Three types:"}),p.jsx(St,{headers:["Prefix","What it means","When you see it"],rows:[[p.jsx(fe,{children:"New:"}),"The first time the bot has ever broadcast about this event","Cache Peak Fire's WFIGS first-sight; FIRMS cluster's first 3-pixel detection; first NWS warning for a CAP id"],[p.jsx(fe,{children:"Update:"}),"A material change on something the bot already announced","Cache Peak Fire's acreage grew; ITD 511 work zone's lane status changed; quake event's magnitude was revised"],[p.jsx(fe,{children:"Active:"}),"A clock-driven reminder that an already-announced event is still live","Cache Peak Fire is still burning 8 hours later; an SWPC G3 storm is still in progress"]]}),p.jsx("p",{children:"The bot tracks first-broadcast time and last-broadcast time separately on every event row, so a New: prefix is only emitted once even after a container restart. Update: respects per-adapter cooldowns (WFIGS is 8 h by default; ITD 511 is per-incident). Active: is the reminder system, covered in the next section."})]}),p.jsxs(wr,{id:"reminders",title:"Reminder System",children:[p.jsxs("p",{children:["Some events stay live for days. A wildfire doesn't go out because WFIGS stopped publishing updates; a geomagnetic storm doesn't end because SWPC went quiet on the wire. The reminder system fires a clock-driven"," ",p.jsx(fe,{children:"Active:"}),"-prefixed re-broadcast on a human-scale cadence so an operator who came on shift after the original announcement still sees the event."]}),p.jsx(be,{children:"Cadences"}),p.jsx(St,{headers:["Adapter","Reminder cadence","Termination"],rows:[[p.jsxs(p.Fragment,{children:[p.jsx(fe,{children:"wfigs"})," (wildfires)"]}),"Every 8 h while the fire is still active","WFIGS publishes a tombstone (incident closed) → fires.tombstoned_at is stamped → reminder loop stops"],[p.jsxs(p.Fragment,{children:[p.jsx(fe,{children:"swpc"})," (space weather)"]}),"Every 8 h while a Kp >= floor / X-class flare / proton-storm event is ongoing","The next SWPC envelope shows the storm has subsided"],[p.jsx(fe,{children:"itd_511_work_zone"}),"Per-zone, configurable in the rule UI","WZDx publishes the zone with end_date in the past"]]}),p.jsx(be,{children:"The tombstone"}),p.jsxs("p",{children:["When a WFIGS update declares an incident closed, the bot stamps"," ",p.jsx(fe,{children:"fires.tombstoned_at"})," with the close time. The reminder scheduler treats ",p.jsx(fe,{children:"tombstoned_at IS NOT NULL"}),` as "stop broadcasting Active: for this fire," and the LLM context layer treats it as "this fire is in the closed-out archive." A subsequent FIRMS pixel inside that fire's spread radius does not re-open it — closure is authoritative from NIFC.`]}),p.jsx(be,{children:"Turning reminders off"}),p.jsxs("p",{children:["Per-adapter on/off lives in ",p.jsx(fe,{children:"adapter_meta.reminder_enabled"})," ","and is exposed on the Adapter Config page. The reminders themselves flow through the same dispatcher gates as everything else, so they still respect cooldowns, the cold-start grace window, and your notification rules."]})]}),p.jsxs(wr,{id:"notifications",title:"Notifications",children:[p.jsx(be,{children:"How It Works"}),p.jsxs("ol",{className:"list-decimal list-inside ml-4 space-y-1",children:[p.jsxs("li",{children:[p.jsx("strong",{children:"Something happens"})," — a fire is detected, weather warning issued, node goes offline, etc."]}),p.jsxs("li",{children:[p.jsx("strong",{children:"MeshAI checks your rules"})," — does this event match any of your notification rules? Is it severe enough?"]}),p.jsxs("li",{children:[p.jsx("strong",{children:"If a rule matches"})," — MeshAI sends the notification through whatever delivery method that rule is configured for."]})]}),p.jsx(be,{children:"Building Rules"}),p.jsx("p",{children:"Each rule answers three questions:"}),p.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[p.jsxs("li",{children:[p.jsx("strong",{children:"WHEN"})," does it trigger? (which categories, what severity)"]}),p.jsxs("li",{children:[p.jsx("strong",{children:"WHERE"})," does it send? (mesh broadcast, email, webhook, etc.)"]}),p.jsxs("li",{children:[p.jsx("strong",{children:"HOW OFTEN"})," at most? (cooldown period)"]})]}),p.jsx("p",{children:'Use "Add from Template" to start with a pre-built rule and customize it, or build from scratch with "Add Rule."'}),p.jsx(be,{children:"Severity Levels — What Should I Set?"}),p.jsx(St,{headers:["Level","When It's Used","Notification Volume"],rows:[["Info","Routine stuff (ducting detected, new router appeared)","High — lots of messages"],["Advisory","Worth knowing (weather advisory, slow traffic, battery declining)","Moderate"],["Watch","Pay attention (fire within 50km, weather watch, stream rising)","Low-moderate"],[p.jsxs(p.Fragment,{children:[p.jsx("strong",{children:"Warning"})," ✓"]}),"Take action (fire within 15km, severe weather, critical battery)","Low — recommended for most rules"],["Emergency","Life safety (extreme weather, fire at infrastructure, total blackout)","Very rare"]]}),p.jsxs("p",{children:[p.jsx("strong",{children:'"Warning" is the sweet spot for most rules.'})," You get alerted when something actually needs your attention without being overwhelmed by every minor event."]}),p.jsx(be,{children:"Webhook — The Swiss Army Knife"}),p.jsx("p",{children:"A webhook sends your alert as an HTTP POST to any URL. This one delivery method works with:"}),p.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[p.jsxs("li",{children:[p.jsx("strong",{children:"Discord"})," — use a Discord webhook URL"]}),p.jsxs("li",{children:[p.jsx("strong",{children:"Slack"})," — use a Slack incoming webhook URL"]}),p.jsxs("li",{children:[p.jsx("strong",{children:"ntfy.sh"})," — POST to ",p.jsx(fe,{children:"https://ntfy.sh/your-topic"})]}),p.jsxs("li",{children:[p.jsx("strong",{children:"Pushover"})," — POST to the Pushover API"]}),p.jsxs("li",{children:[p.jsx("strong",{children:"Home Assistant"})," — POST to an automation webhook URL"]}),p.jsx("li",{children:"Anything else that accepts HTTP POST"})]}),p.jsx("p",{children:"MeshAI doesn't need to know what's on the other end. Give it the URL and it works."})]}),p.jsxs(wr,{id:"commands",title:"Commands",children:[p.jsxs("p",{children:["All commands use the ",p.jsx(fe,{children:"!"})," prefix (configurable). Send these as a direct message to MeshAI on your mesh."]}),p.jsx(be,{children:"Basic Commands"}),p.jsx(St,{headers:["Command","What It Does"],rows:[[p.jsx(fe,{children:"!help"}),"Shows all available commands"],[p.jsx(fe,{children:"!ping"}),"Tests if the bot is alive"],[p.jsx(fe,{children:"!status"}),"Quick mesh summary (nodes online, health score)"],[p.jsx(fe,{children:"!health"}),"Detailed health report with pillar scores"],[p.jsx(fe,{children:"!weather"}),"Current weather for your area"]]}),p.jsx(be,{children:"Environmental Commands"}),p.jsx(St,{headers:["Command","What It Does"],rows:[[p.jsx(fe,{children:"!alerts"}),"Active NWS weather alerts for your area"],[p.jsxs(p.Fragment,{children:[p.jsx(fe,{children:"!solar"})," (or ",p.jsx(fe,{children:"!hf"}),")"]}),"Current solar indices and RF conditions"],[p.jsx(fe,{children:"!fire"}),"Active wildfires near your mesh"],[p.jsx(fe,{children:"!avy"}),'Avalanche advisory (seasonal — shows "off season" in summer)'],[p.jsxs(p.Fragment,{children:[p.jsx(fe,{children:"!streams"})," (or ",p.jsx(fe,{children:"!gauges"}),")"]}),"Stream gauge readings"],[p.jsxs(p.Fragment,{children:[p.jsx(fe,{children:"!roads"})," (or ",p.jsx(fe,{children:"!traffic"}),")"]}),"Road conditions and traffic flow"],[p.jsx(fe,{children:"!hotspots"}),"Satellite fire detections"]]}),p.jsx(be,{children:"Subscription Commands"}),p.jsx(St,{headers:["Command","What It Does"],rows:[[p.jsx(fe,{children:"!subscribe"}),"Lists all alert categories you can subscribe to"],[p.jsx(fe,{children:"!subscribe fire_proximity"}),"Subscribe to a specific category"],[p.jsx(fe,{children:"!subscribe all"}),"Subscribe to everything"],[p.jsx(fe,{children:"!unsubscribe fire_proximity"}),"Unsubscribe from a category"],[p.jsx(fe,{children:"!subscriptions"}),"Shows what you're currently subscribed to"]]}),p.jsx(be,{children:"Conversational"}),p.jsxs("p",{children:[`Bang commands are the short, predictable interface. For anything that doesn't map cleanly to a single command — "how's the mesh doing?", "is there any ducting?", "why didn\\'t I hear about anything today?" — you can DM the bot in plain English. The LLM DM path covers the same data the commands cover, plus the dispatcher drop audit, with honest "no data" answers when a feed is quiet. Full catalog under`," ",p.jsx("a",{href:"#llm-dm",className:"text-accent hover:underline",children:"LLM DM Queries"}),"."]})]}),p.jsxs(wr,{id:"llm-dm",title:"LLM DM (Natural-Language Queries)",children:[p.jsxs("p",{children:["Bang commands like ",p.jsx(fe,{children:"!fire"})," are short and predictable — the right tool on a mesh-constrained interface. For anything else, you can DM the bot in plain English and it will answer from the same live environmental data the broadcast pipeline uses. Both paths work; pick whichever fits the question."]}),p.jsx(be,{children:"What it can answer"}),p.jsx("p",{children:"When you DM the bot a question, the env_reporter layer assembles up to seven data blocks and injects them into the LLM's system prompt. Each block maps to one adapter:"}),p.jsx(St,{headers:["Adapter block","Example question that hits it","What you get back"],rows:[[p.jsx(fe,{children:"build_fires_detail"}),'"are there any fires near me?"',"Active WFIGS-declared fires, acreage, containment, declared_at, county/state"],[p.jsx(fe,{children:"build_alerts_detail"}),'"any weather alerts?"',"Active NWS CAP alerts: type, severity, area, expiry"],[p.jsx(fe,{children:"build_quakes_detail"}),'"any earthquakes nearby?"',"USGS quakes in the last 24h: magnitude, depth, place"],[p.jsx(fe,{children:"build_traffic_detail"}),'"how is traffic on I-84?" / "any road closures?"',"TomTom + ITD 511 active incidents"],[p.jsx(fe,{children:"build_gauges_detail"}),'"what is the snake river level?"',"USGS NWIS latest readings + flood stages"],[p.jsx(fe,{children:"build_swpc_detail"}),'"what are the band conditions?" / "any space weather?"',"Recent SWPC events + band-conditions ratings"],[p.jsx(fe,{children:"build_drop_audit"}),`"why didn't I hear about anything today?"`,"Event log: what envelopes the dispatcher filtered, by adapter + category"]]}),p.jsx(be,{children:"The grounding rule"}),p.jsxs("p",{children:["The bot is told to answer ",p.jsx("em",{children:"only"}),' from the blocks in the system prompt. If a block is empty (no recent quakes, no active NWS alerts), the response is honest about it: "No active weather alerts right now," not a fabricated "144 earthquakes worldwide in the past 24 hours." That clamp closes the failure mode where the LLM defaulted to its training data when local tables were quiet.']}),p.jsx(be,{children:"Excluding an adapter from LLM context"}),p.jsxs("p",{children:["The ",p.jsx(fe,{children:"include_in_llm_context"})," toggle on each adapter's row in Adapter Config decides whether that adapter's ",p.jsx(fe,{children:"build_*"})," ","block lands in the system prompt. Turn an adapter off here if you don't want the bot's natural-language answers to draw on it (e.g. you ingest TomTom for situational awareness but don't want it cited in DM answers). Broadcasts are unaffected — this toggle gates LLM context only."]}),p.jsx(be,{children:"What it can't answer"}),p.jsx("p",{children:`The bot has no general internet access. Questions that need data the env_reporter doesn't carry ("what's the weather forecast tomorrow", "who's the current president") fall back to whatever the configured LLM backend knows from training. The grounding clamp keeps the bot from inventing local data, but it can't keep the LLM from speculating about non-local topics.`})]}),p.jsxs(wr,{id:"or-not-and",title:"OR-not-AND Architecture",children:[p.jsx("p",{children:"Every environmental adapter pulls its data from one of two places:"}),p.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[p.jsxs("li",{children:[p.jsx("strong",{children:"Central"})," (canonical) — Central polls the upstream feed once on behalf of the whole fleet and re-publishes normalized envelopes over NATS JetStream. MeshAI subscribes. One Central poll, one canonical normalization, many subscribers."]}),p.jsxs("li",{children:[p.jsx("strong",{children:"Native"})," — MeshAI polls the upstream feed directly. Stays around for adapters Central doesn't carry yet (currently Tropospheric Ducting and Avalanche Center advisories) and for operators who don't run Central."]})]}),p.jsx(be,{children:"Why mutually exclusive"}),p.jsxs("p",{children:["An adapter is set to ",p.jsx("strong",{children:"either"})," Central ",p.jsx("strong",{children:"or"})," ","native, never both. Running both at the same time is what the codebase calls the ",p.jsx("em",{children:"AND-mode anti-pattern"}),": two independent poll loops on the same upstream feed, duplicate broadcasts, duplicate cursor state, no shared dedup. The Spokane-class leak (cross-state broadcasts that escaped the bbox filter in May 2026) was caused by an inadvertent AND-mode on the traffic adapter; the fix made the gate enforce mutual exclusion at boot and on every config save."]}),p.jsx(be,{children:"The per-adapter source toggle"}),p.jsxs("p",{children:["Set ",p.jsx(fe,{children:"feed_source"})," on each adapter's row in Environment:"]}),p.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[p.jsxs("li",{children:[p.jsx(fe,{children:"central"})," — disable the native poll loop, subscribe to the matching Central subject pattern."]}),p.jsxs("li",{children:[p.jsx(fe,{children:"native"})," — disable the Central subscription for this adapter, run the native poller."]})]}),p.jsxs("p",{children:["On the GUI, adapters with ",p.jsx("em",{children:"no Central counterpart yet"}),` show their Central button disabled with a "native only" tooltip. That's not an AND state; the adapter is still single-source, just locked to native by upstream availability.`]}),p.jsx(be,{children:"Where this surfaces in tooltips"}),p.jsxs("p",{children:[`You'll see "AND-model anti-pattern" referenced in two places: the USGS-lookup button on Gauge Sites (disabled when the USGS adapter is on Central, because doing a one-off direct USGS poll from the GUI while the runtime is on Central is precisely the AND-mode this rule forbids) and the env_routes 404 response on`," ",p.jsxs(fe,{children:["/api/env/usgs/lookup/","{site_id}"]})," in central-feed mode. Both surfaces refuse to fall back to a direct upstream call; the right answer is to enter values manually or source them from Central."]})]}),p.jsxs(wr,{id:"adapter-config",title:"Adapter Config & the CODE Rule",children:[p.jsx("p",{children:"The Adapter Config page is the single hub for ~50 GUI-editable knobs across the 13 adapters that touch the broadcast pipeline. Changes take effect on the next handler call — no container restart needed for most keys."}),p.jsx(be,{children:"The CONFIG-vs-CODE rule"}),p.jsx("p",{children:"Not everything tunable becomes a GUI row. The codebase splits along one rule:"}),p.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[p.jsxs("li",{children:[p.jsx("strong",{children:"CONFIG"})," (lives on this page) — where you send (channels), how often (cadences, schedules), thresholds (magnitude floors, severity gates, distance radii, cooldown durations, freshness windows), curation data (which sites, states, codes), toggles (enabled, include_in_llm_context)."]}),p.jsxs("li",{children:[p.jsx("strong",{children:"CODE"})," (stays in the handlers, not on the GUI) — sentence templates, emoji choices, mapping / translation functions (TomTom icon_map, ITD sub_type_map, Central adapter_map and category_map), rendering logic (anchor priority order, expires-buckets formatting, threshold-state labels), heuristic logic (band_conditions Kp/SFI → Good/Fair/Poor function)."]})]}),p.jsx("p",{children:"If you find yourself wanting to add a wire-string template or an emoji to the GUI, stop — that's CODE. If you want to change a threshold or a curation list, the GUI is the right place."}),p.jsx(be,{children:"Restart-required vs live"}),p.jsx("p",{children:"Most keys take effect on the next handler call (the env_store re-reads from the database). A short list requires a container restart, because they govern startup-only wiring:"}),p.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[p.jsxs("li",{children:["Anything under the ",p.jsx(fe,{children:"environmental"})," section on the Config page (feed_source, central URL, etc.). The Spokane-fix gate runs at env_store boot and at CentralConsumer subscribe — both happen only at startup."]}),p.jsx("li",{children:"The LLM backend swap (Google → Anthropic → OpenAI)."}),p.jsx("li",{children:"The dispatcher cold-start grace window."})]}),p.jsx("p",{children:`When you save one of those keys via the GUI, a yellow Restart-Required banner surfaces at the top of the page with a "Restart now" button. Until you click it, the on-disk config and the running config intentionally disagree — that's the OR-not-AND gate refusing to transition mid-flight.`}),p.jsxs(be,{children:["The ",p.jsx(fe,{children:"include_in_llm_context"})," toggle"]}),p.jsxs("p",{children:[`Each adapter's card on Adapter Config carries a per-adapter "LLM context" switch. When off, that adapter's `,p.jsx(fe,{children:"build_*"})," ","env_reporter block is skipped during system-prompt assembly. Broadcasts are unaffected; this toggle is purely about what the LLM sees when you DM it. See the LLM DM section above for the seven adapter blocks this gates."]})]}),p.jsxs(wr,{id:"curation",title:"Curation: Gauge Sites & Town Anchors",children:[p.jsx("p",{children:"Two curation tables drive the broadcast text the bot puts on the mesh. Both are CRUD UIs with per-row enable/disable; both fall through to fallback chains when a row is missing or disabled."}),p.jsx(be,{children:"Gauge Sites"}),p.jsx("p",{children:"Stream gauge thresholds for the USGS NWIS handler. Each row pairs a USGS site_id with a human gauge name, lat/lon, and four NWS-AHPS flood thresholds in feet: Action, Minor, Moderate, Major. The handler compares an incoming gauge reading to those thresholds and emits the right broadcast severity."}),p.jsxs("p",{children:[p.jsx("strong",{children:"USGS lookup button"})," — when you add a new row in native-feed mode, the lookup queries the USGS Site Service plus NWS NWPS to auto-populate name, coordinates, and flood stages. In central-feed mode the button is disabled with a tooltip: a one-off direct USGS poll from the GUI while the runtime is on Central is the AND-mode anti-pattern the architecture forbids. Enter values manually or pull them from Central."]}),p.jsxs("p",{children:[p.jsx("strong",{children:"Disabled rows"})," are ignored at dispatch time. The corresponding gauge still ingests into ",p.jsx(fe,{children:"gauge_readings"})," ","(so historical queries still work), it just doesn't broadcast."]}),p.jsx(be,{children:"Town Anchors"}),p.jsxs("p",{children:['Lookup table for the "X mi ',"<","bearing",">"," of ","<","town",">",'" suffix in broadcast text. When a fire or NWS alert renders, the bot walks an anchor chain to figure out where to say it is:']}),p.jsxs("ol",{className:"list-decimal list-inside ml-4 space-y-1",children:[p.jsx("li",{children:'Photon nearest-town lookup (the WFIGS path uses this — produces "near Long Creek Summit Home" style anchors)'}),p.jsx("li",{children:"Town Anchors table (your curated list)"}),p.jsx("li",{children:"Landclass label (county / federal-land identifier)"}),p.jsx("li",{children:"County + state fallback"}),p.jsx("li",{children:"Bare lat/lon coords"})]}),p.jsx("p",{children:'Each row carries a name (lowercased on save), state, lat/lon, and an enable flag. The "lowercased on save" rule keeps "Almo" / "ALMO" / "almo" from being three distinct rows. Disabled rows fall through to the next anchor in the chain — the broadcast text still goes out, it just uses a different anchor.'}),p.jsxs("p",{children:["Example broadcast text rendered from a Town Anchors row:"," ",p.jsx("span",{className:"text-amber-300",children:'"🔥 New: Cache Peak Fire (WF), 3 mi N of Almo: 250 ac, 0% contained, @ 42.118,-113.643"'})]})]}),p.jsxs(wr,{id:"schema",title:"Schema Migrations",children:[p.jsxs("p",{children:["MeshAI persists state in a single SQLite database (",p.jsx(fe,{children:"/data/meshai.sqlite"}),") with WAL journaling. Schema migrations live in ",p.jsx(fe,{children:"meshai/persistence/migrations/v*.sql"})," ","and apply automatically on container start. The runner reads the migrations directory, sorts by version, and applies anything past the current ",p.jsx(fe,{children:"schema_meta.version"})," in order. Idempotent re-runs are no-ops."]}),p.jsx(be,{children:"v0.6 + v0.7 additions"}),p.jsx(St,{headers:["Migration","What it added"],rows:[[p.jsx(fe,{children:"v11"}),"first_broadcast_at + last_broadcast_at split + reminder_enabled per adapter (the schema basis for New / Update / Active)"],[p.jsx(fe,{children:"v12"}),"fires.tombstoned_at (WFIGS closure stamp; terminates the reminder loop)"],[p.jsx(fe,{children:"v13"}),"Fire Tracker Phase 1 — fire_pixels table + spread_radius_mi + current_centroid_lat/lon + last_hotspot_at; firms_pixels attributed_at + cluster_broadcast_at"],[p.jsx(fe,{children:"v14"}),"Fire Tracker Phase 2 — fire_passes table (per-satellite-pass centroid + drift) + last_pass_id + halt_broadcast_at on fires"],[p.jsx(fe,{children:"v15"}),"Fire Tracker Phase 3 — fire_passes.perimeter_geojson (convex hull) + fires.last_spotting_broadcast_at"],[p.jsx(fe,{children:"v16"}),"Fire Tracker Phase 4 — fire_digest_broadcasts table (idempotent twice-daily LLM digest)"]]}),p.jsx(be,{children:"When migrations fail"}),p.jsxs("p",{children:["A migration failure leaves the database at the prior version and raises in the runner. Container logs surface the SQL error;"," ",p.jsx(fe,{children:"schema_meta.version"})," tells you where the last successful migration stopped. Re-running the container after the underlying issue is fixed picks up from there."]})]}),p.jsxs(wr,{id:"api",title:"API Reference",children:[p.jsxs("p",{children:["MeshAI's REST API is available at ",p.jsx(fe,{children:"http://your-host:8080"}),". All endpoints return JSON."]}),p.jsx(be,{children:"System"}),p.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[p.jsxs("li",{children:[p.jsx(fe,{children:"GET /api/status"})," — version, uptime, node count"]}),p.jsxs("li",{children:[p.jsx(fe,{children:"GET /api/channels"})," — radio channel list"]}),p.jsxs("li",{children:[p.jsx(fe,{children:"POST /api/restart"})," — restart the bot"]})]}),p.jsx(be,{children:"Mesh Data"}),p.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[p.jsxs("li",{children:[p.jsx(fe,{children:"GET /api/health"})," — health score and pillars"]}),p.jsxs("li",{children:[p.jsx(fe,{children:"GET /api/nodes"})," — all nodes with positions and telemetry"]}),p.jsxs("li",{children:[p.jsx(fe,{children:"GET /api/edges"})," — neighbor links with signal quality"]}),p.jsxs("li",{children:[p.jsx(fe,{children:"GET /api/regions"})," — region summaries"]}),p.jsxs("li",{children:[p.jsx(fe,{children:"GET /api/sources"})," — data source health"]})]}),p.jsx(be,{children:"Configuration"}),p.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[p.jsxs("li",{children:[p.jsx(fe,{children:"GET /api/config"})," — full config"]}),p.jsxs("li",{children:[p.jsxs(fe,{children:["GET /api/config/","{section}"]})," — one section"]}),p.jsxs("li",{children:[p.jsxs(fe,{children:["PUT /api/config/","{section}"]})," — update a section"]})]}),p.jsx(be,{children:"Environmental"}),p.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[p.jsxs("li",{children:[p.jsx(fe,{children:"GET /api/env/status"})," — per-feed health"]}),p.jsxs("li",{children:[p.jsx(fe,{children:"GET /api/env/active"})," — all active events"]}),p.jsxs("li",{children:[p.jsx(fe,{children:"GET /api/env/swpc"})," — solar/geomagnetic data"]}),p.jsxs("li",{children:[p.jsx(fe,{children:"GET /api/env/ducting"})," — atmospheric profile"]}),p.jsxs("li",{children:[p.jsx(fe,{children:"GET /api/env/fires"})," — wildfire perimeters"]}),p.jsxs("li",{children:[p.jsx(fe,{children:"GET /api/env/hotspots"})," — satellite fire detections"]})]}),p.jsx(be,{children:"Alerts"}),p.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[p.jsxs("li",{children:[p.jsx(fe,{children:"GET /api/alerts/active"})," — current alerts"]}),p.jsxs("li",{children:[p.jsx(fe,{children:"GET /api/alerts/history"})," — past alerts"]}),p.jsxs("li",{children:[p.jsx(fe,{children:"GET /api/notifications/categories"})," — available alert categories"]})]}),p.jsx(be,{children:"Real-time"}),p.jsx("ul",{className:"list-disc list-inside ml-4 space-y-1",children:p.jsxs("li",{children:[p.jsx(fe,{children:"ws://your-host:8080/ws/live"})," — WebSocket for live updates"]})})]})]})})]})}const Aet=1500;function Met(){const[e,t]=G.useState({}),[r,n]=G.useState({}),[i,a]=G.useState(!0),[o,s]=G.useState(null),[l,u]=G.useState({}),[c,f]=G.useState({}),[h,d]=G.useState({}),v=G.useCallback(async()=>{a(!0),s(null);try{const[S,T]=await Promise.all([fetch("/api/adapter-config"),fetch("/api/adapter-meta")]);if(!S.ok)throw new Error(`GET /adapter-config: ${S.status}`);if(!T.ok)throw new Error(`GET /adapter-meta: ${T.status}`);t(await S.json()),n(await T.json())}catch(S){s(String(S))}finally{a(!1)}},[]);G.useEffect(()=>{v()},[v]);const m=G.useCallback((S,T,C)=>{f(A=>({...A,[S]:T})),C&&d(A=>({...A,[S]:C})),T==="saved"&&setTimeout(()=>{f(A=>A[S]==="saved"?{...A,[S]:"idle"}:A)},Aet)},[]),y=G.useCallback(async(S,T,C)=>{const A=`${S}.${T}`;m(A,"saving");try{const P=await fetch(`/api/adapter-config/${S}/${T}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:C})});if(!P.ok){const E=(await P.json().catch(()=>({}))).detail||P.statusText;m(A,"error",String(E));return}const I=await P.json();t(k=>({...k,[S]:(k[S]||[]).map(E=>E.key===T?I:E)})),m(A,"saved")}catch(P){m(A,"error",String(P))}},[m]),x=G.useCallback(async(S,T)=>{const C=`${S}.${T}`;m(C,"saving");try{const A=await fetch(`/api/adapter-config/${S}/${T}/reset`,{method:"POST"});if(!A.ok){m(C,"error",`reset failed (${A.status})`);return}const P=await A.json();t(I=>({...I,[S]:(I[S]||[]).map(k=>k.key===T?P:k)})),m(C,"saved")}catch(A){m(C,"error",String(A))}},[m]),_=G.useCallback(async(S,T)=>{const C=`meta:${S}`;m(C,"saving");try{const A=await fetch(`/api/adapter-meta/${S}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(T)});if(!A.ok){const I=await A.json().catch(()=>({}));m(C,"error",String(I.detail||A.statusText));return}const P=await A.json();n(I=>({...I,[S]:P})),m(C,"saved")}catch(A){m(C,"error",String(A))}},[m]);if(i)return p.jsxs("div",{className:"p-6 flex items-center gap-2 text-slate-400",children:[p.jsx(Jy,{className:"w-5 h-5 animate-spin"})," Loading adapter config…"]});if(o)return p.jsxs("div",{className:"p-6 text-red-400",children:[p.jsx(uu,{className:"w-5 h-5 inline mr-2"}),"Failed to load: ",o]});const b=Array.from(new Set([...Object.keys(r),...Object.keys(e)])).sort();return p.jsxs("div",{className:"p-6 space-y-4",children:[p.jsxs("div",{className:"flex items-center gap-2 text-slate-200",children:[p.jsx(fD,{className:"w-5 h-5"}),p.jsx("h1",{className:"text-xl font-semibold",children:"Adapter Config"}),p.jsxs("span",{className:"text-xs text-slate-500 ml-2",children:[Object.values(e).reduce((S,T)=>S+T.length,0)," settings across ",b.length," adapters"]})]}),p.jsxs("p",{className:"text-xs text-slate-400 max-w-3xl",children:["Per-adapter tunables (thresholds, freshness windows, toggles, curation lists). Changes take effect on the next handler call -- no container restart needed. Sentence templates, emoji, and translation maps live in code by design — see the CODE rule under ",p.jsx("a",{href:"/reference#adapter-config",className:"text-accent hover:underline",children:"Adapter Config & the CODE Rule"})," in Reference. The ",p.jsx("strong",{children:"LLM context"})," toggle on each card gates whether that adapter's data lands in the system prompt when you DM the bot; broadcasts are unaffected."]}),b.map(S=>{const T=r[S]||{display_name:S,include_in_llm_context:!0,description:""},C=e[S]||[],A=l[S]??!1,P=`meta:${S}`,I=c[P]||"idle";return p.jsxs("div",{className:"bg-slate-800/60 border border-slate-700 rounded-lg",children:[p.jsxs("div",{className:"p-4 flex items-start gap-4",children:[p.jsx("button",{onClick:()=>u(k=>({...k,[S]:!k[S]})),className:"text-slate-400 hover:text-white","aria-label":"toggle expand",children:A?p.jsx(_u,{className:"w-5 h-5"}):p.jsx(lu,{className:"w-5 h-5"})}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("h2",{className:"text-base font-semibold text-slate-100",children:T.display_name}),p.jsx("code",{className:"text-xs text-slate-500",children:S}),C.length>0&&p.jsxs("span",{className:"text-xs text-slate-400 ml-1",children:["(",C.length," settings)"]}),C.length===0&&p.jsx("span",{className:"text-xs text-slate-500 ml-1 italic",children:"(meta only)"})]}),T.description&&p.jsx("p",{className:"text-xs text-slate-400 mt-1",children:T.description})]}),p.jsxs("label",{className:"flex items-center gap-2 text-xs text-slate-300 select-none",children:[p.jsx("input",{type:"checkbox",checked:T.include_in_llm_context,onChange:k=>_(S,{include_in_llm_context:k.target.checked}),className:"w-4 h-4 accent-cyan-500"}),"LLM context",p.jsx(uae,{status:I,error:h[P]})]})]}),A&&C.length>0&&p.jsx("div",{className:"border-t border-slate-700 divide-y divide-slate-700/60",children:C.map(k=>p.jsx(Pet,{row:k,status:c[`${S}.${k.key}`]||"idle",error:h[`${S}.${k.key}`],onCommit:E=>y(S,k.key,E),onReset:()=>x(S,k.key)},k.key))})]},S)})]})}function Pet({row:e,status:t,error:r,onCommit:n,onReset:i}){const[a,o]=G.useState(SP(e));G.useEffect(()=>{o(SP(e))},[e.value,e.type]);const s=a!==SP(e),l=JSON.stringify(e.value)===JSON.stringify(e.default),u=()=>{const c=ket(a,e.type);c.error||c.changed(e.value)&&n(c.value)};return p.jsxs("div",{className:"px-6 py-3 flex items-start gap-4",children:[p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("code",{className:"text-sm font-mono text-cyan-300",children:e.key}),p.jsxs("span",{className:"text-xs text-slate-500",children:["[",e.type,"]"]}),!l&&p.jsx("span",{className:"text-xs text-amber-400",children:"edited"})]}),e.description&&p.jsx("p",{className:"text-xs text-slate-400 mt-1",children:e.description})]}),p.jsxs("div",{className:"flex items-center gap-2 min-w-[280px] justify-end",children:[e.type==="bool"?p.jsx("input",{type:"checkbox",checked:e.value===!0,onChange:c=>n(c.target.checked),className:"w-5 h-5 accent-cyan-500"}):e.type==="json"?p.jsx("textarea",{className:"w-72 h-20 bg-slate-900 border border-slate-700 rounded px-2 py-1 text-xs font-mono text-slate-100",value:a,onChange:c=>o(c.target.value),onBlur:u}):p.jsx("input",{type:e.type==="int"||e.type==="float"?"number":"text",step:e.type==="float"?"any":"1",className:"w-48 bg-slate-900 border border-slate-700 rounded px-2 py-1 text-sm text-slate-100",value:a,onChange:c=>o(c.target.value),onBlur:u,onKeyDown:c=>{c.key==="Enter"&&c.target.blur()}}),p.jsx(uae,{status:t,error:r,dirty:s}),p.jsx("button",{onClick:i,disabled:l,className:"text-slate-400 hover:text-white disabled:opacity-30 disabled:cursor-not-allowed",title:"Reset to default",children:p.jsx(DS,{className:"w-4 h-4"})})]})]})}function uae({status:e,error:t,dirty:r}){return e==="saving"?p.jsx(Jy,{className:"w-4 h-4 text-cyan-400 animate-spin"}):e==="saved"?p.jsx(Fo,{className:"w-4 h-4 text-emerald-400"}):e==="error"?p.jsx("span",{title:t,className:"text-red-400 cursor-help",children:p.jsx(uu,{className:"w-4 h-4"})}):r?p.jsx("span",{className:"w-2 h-2 bg-amber-400 rounded-full",title:"unsaved"}):p.jsx("span",{className:"w-4 h-4"})}function SP(e){return e.type==="bool"?String(e.value===!0):e.type==="json"?JSON.stringify(e.value,null,2):e.value===null||e.value===void 0?"":String(e.value)}function ket(e,t){if(t==="int"){const r=Number(e);return!Number.isFinite(r)||!Number.isInteger(r)?{error:"expected integer",value:null,changed:()=>!1}:{error:null,value:r,changed:n=>n!==r}}if(t==="float"){const r=Number(e);return Number.isFinite(r)?{error:null,value:r,changed:n=>n!==r}:{error:"expected number",value:null,changed:()=>!1}}if(t==="str")return{error:null,value:e,changed:r=>r!==e};if(t==="json")try{const r=JSON.parse(e);return{error:null,value:r,changed:n=>JSON.stringify(n)!==JSON.stringify(r)}}catch{return{error:"invalid JSON",value:null,changed:()=>!1}}return{error:null,value:e,changed:()=>!0}}const TP={site_id:"",gauge_name:"",lat:0,lon:0,action_ft:null,flood_minor_ft:null,flood_moderate_ft:null,flood_major_ft:null,enabled:!0,updated_at:0};function Let(){const[e,t]=G.useState([]),[r,n]=G.useState(!0),[i,a]=G.useState(null),[o,s]=G.useState(null),[l,u]=G.useState(TP),[c,f]=G.useState(!1),[h,d]=G.useState("unknown"),v=G.useCallback(async()=>{n(!0),a(null);try{const S=await fetch("/api/gauge-sites");if(!S.ok)throw new Error(`GET: ${S.status}`);t(await S.json())}catch(S){a(String(S))}finally{n(!1)}},[]);G.useEffect(()=>{v()},[v]),G.useEffect(()=>{fetch("/api/config/environmental").then(S=>S.json()).then(S=>{var T;return d(((T=S==null?void 0:S.usgs)==null?void 0:T.feed_source)||"unknown")}).catch(()=>d("unknown"))},[]);const m=S=>{s(S.site_id),u({...S}),f(!1)},y=()=>{f(!0),s(null),u({...TP})},x=()=>{s(null),f(!1),u(TP)},_=async()=>{try{const S=c?"/api/gauge-sites":`/api/gauge-sites/${o}`,C=await fetch(S,{method:c?"POST":"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});if(!C.ok){const A=await C.json().catch(()=>({}));alert(`save failed: ${A.detail||C.statusText}`);return}x(),v()}catch(S){alert(String(S))}},b=async S=>{if(!confirm(`Delete ${S}?`))return;const T=await fetch(`/api/gauge-sites/${S}`,{method:"DELETE"});if(!T.ok){alert(`delete failed: ${T.status}`);return}v()};return r?p.jsxs("div",{className:"p-6 text-slate-400",children:[p.jsx(Jy,{className:"w-5 h-5 animate-spin inline mr-2"}),"Loading…"]}):i?p.jsxs("div",{className:"p-6 text-red-400",children:["Load failed: ",i]}):p.jsxs("div",{className:"p-6 space-y-4",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(LS,{className:"w-5 h-5 text-cyan-400"}),p.jsx("h1",{className:"text-xl font-semibold text-slate-100",children:"Gauge Sites"}),p.jsxs("span",{className:"text-xs text-slate-500 ml-2",children:[e.length," sites"]}),p.jsxs("button",{onClick:y,className:"ml-auto flex items-center gap-1 px-3 py-1 bg-cyan-700 hover:bg-cyan-600 rounded text-white text-sm",children:[p.jsx(xv,{className:"w-4 h-4"})," Add site"]})]}),p.jsx("p",{className:"text-xs text-slate-400 max-w-3xl",children:"NWS-AHPS stream gauge thresholds for the USGS NWIS handler. Each row pairs a USGS site_id with a human gauge name, lat/lon, and four flood thresholds (Action / Minor / Moderate / Major, all in feet). Disabled rows still ingest into gauge_readings -- they don't broadcast. The USGS lookup button auto-populates name + coords + thresholds from USGS Site Service + NWS NWPS when this adapter is on native feed_source; Central-feed mode disables it (see Reference → OR-not-AND for why). Changes take effect on the next event."}),c&&p.jsx(l7,{draft:l,setDraft:u,onSave:_,onCancel:x,adding:!0,feedSource:h}),p.jsx("div",{className:"bg-slate-800/60 border border-slate-700 rounded-lg overflow-x-auto",children:p.jsxs("table",{className:"w-full text-sm text-slate-200",children:[p.jsx("thead",{className:"bg-slate-900 text-xs text-slate-400 uppercase",children:p.jsxs("tr",{children:[p.jsx("th",{className:"px-3 py-2 text-left",children:"Site ID"}),p.jsx("th",{className:"px-3 py-2 text-left",children:"Name"}),p.jsx("th",{className:"px-3 py-2 text-right",children:"Lat,Lon"}),p.jsx("th",{className:"px-3 py-2 text-right",children:"Action"}),p.jsx("th",{className:"px-3 py-2 text-right",children:"Minor"}),p.jsx("th",{className:"px-3 py-2 text-right",children:"Moderate"}),p.jsx("th",{className:"px-3 py-2 text-right",children:"Major"}),p.jsx("th",{className:"px-3 py-2 text-center",children:"On"}),p.jsx("th",{className:"px-3 py-2"})]})}),p.jsx("tbody",{className:"divide-y divide-slate-700/60",children:e.map(S=>o===S.site_id?p.jsx("tr",{className:"bg-slate-900/40",children:p.jsx("td",{colSpan:9,className:"px-3 py-2",children:p.jsx(l7,{draft:l,setDraft:u,onSave:_,onCancel:x,feedSource:h})})},S.site_id):p.jsxs("tr",{className:"hover:bg-slate-800/50",children:[p.jsx("td",{className:"px-3 py-2 font-mono text-xs",children:S.site_id}),p.jsx("td",{className:"px-3 py-2",children:S.gauge_name}),p.jsxs("td",{className:"px-3 py-2 text-right text-xs",children:[S.lat.toFixed(3),",",S.lon.toFixed(3)]}),p.jsx("td",{className:"px-3 py-2 text-right",children:S.action_ft??"-"}),p.jsx("td",{className:"px-3 py-2 text-right",children:S.flood_minor_ft??"-"}),p.jsx("td",{className:"px-3 py-2 text-right",children:S.flood_moderate_ft??"-"}),p.jsx("td",{className:"px-3 py-2 text-right",children:S.flood_major_ft??"-"}),p.jsx("td",{className:"px-3 py-2 text-center",children:S.enabled?p.jsx(Fo,{className:"w-4 h-4 text-emerald-400 inline"}):p.jsx(qa,{className:"w-4 h-4 text-slate-500 inline"})}),p.jsxs("td",{className:"px-3 py-2 text-right",children:[p.jsx("button",{onClick:()=>m(S),className:"text-cyan-400 hover:text-cyan-300 text-xs mr-3",children:"Edit"}),p.jsx("button",{onClick:()=>b(S.site_id),className:"text-red-400 hover:text-red-300",children:p.jsx(Qy,{className:"w-4 h-4 inline"})})]})]},S.site_id))})]})})]})}function l7({draft:e,setDraft:t,onSave:r,onCancel:n,adding:i,feedSource:a}){const o=(v,m)=>t({...e,[v]:m}),[s,l]=G.useState(!1),[u,c]=G.useState(null),f=a!=="native"||!e.site_id.trim(),h=a!=="native"?"USGS lookup not available in central-feed mode (would be AND-model anti-pattern). Enter values manually.":e.site_id.trim()?"Auto-populate from USGS / NWS NWPS":"Enter a site_id first",d=async()=>{if(!f){l(!0),c(null);try{const v=e.site_id.replace(/^USGS-/i,""),m=await fetch(`/api/env/usgs/lookup/${encodeURIComponent(v)}`);if(m.status===404){const _=await m.json().catch(()=>({}));c(_.detail||"Lookup unavailable -- enter values manually"),l(!1);return}if(!m.ok){c(`Lookup failed (${m.status})`),l(!1);return}const y=await m.json(),x={...e};y.name&&!x.gauge_name&&(x.gauge_name=y.name),typeof y.lat=="number"&&(x.lat=y.lat),typeof y.lon=="number"&&(x.lon=y.lon),typeof y.action_ft=="number"&&(x.action_ft=y.action_ft),typeof y.flood_minor_ft=="number"&&(x.flood_minor_ft=y.flood_minor_ft),typeof y.flood_moderate_ft=="number"&&(x.flood_moderate_ft=y.flood_moderate_ft),typeof y.flood_major_ft=="number"&&(x.flood_major_ft=y.flood_major_ft),t(x)}catch(v){c(String(v))}finally{l(!1)}}};return p.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2 p-3 bg-slate-900/50 rounded",children:[p.jsxs("label",{className:"text-xs text-slate-400 col-span-2",children:["Site ID",p.jsxs("div",{className:"flex items-center gap-1 mt-1",children:[p.jsx("input",{className:"flex-1 bg-slate-800 border border-slate-700 rounded px-2 py-1 text-slate-100 font-mono text-xs",value:e.site_id,onChange:v=>o("site_id",v.target.value),disabled:!i}),p.jsxs("button",{type:"button",onClick:d,disabled:f||s,title:h,className:"px-2 py-1 bg-slate-700 hover:bg-slate-600 disabled:opacity-30 disabled:cursor-not-allowed rounded text-xs text-slate-100 flex items-center gap-1",children:[s?p.jsx(Jy,{className:"w-3 h-3 animate-spin"}):p.jsx(jS,{className:"w-3 h-3"}),"USGS lookup"]})]}),u&&p.jsx("span",{className:"text-amber-400 text-xs mt-1 block",children:u})]}),p.jsxs("label",{className:"text-xs text-slate-400 col-span-2",children:["Gauge name",p.jsx("input",{className:"block w-full mt-1 bg-slate-800 border border-slate-700 rounded px-2 py-1 text-slate-100",value:e.gauge_name,onChange:v=>o("gauge_name",v.target.value)})]}),p.jsxs("label",{className:"text-xs text-slate-400",children:["Lat",p.jsx("input",{type:"number",step:"any",className:"block w-full mt-1 bg-slate-800 border border-slate-700 rounded px-2 py-1 text-slate-100",value:e.lat,onChange:v=>o("lat",parseFloat(v.target.value))})]}),p.jsxs("label",{className:"text-xs text-slate-400",children:["Lon",p.jsx("input",{type:"number",step:"any",className:"block w-full mt-1 bg-slate-800 border border-slate-700 rounded px-2 py-1 text-slate-100",value:e.lon,onChange:v=>o("lon",parseFloat(v.target.value))})]}),p.jsxs("label",{className:"text-xs text-slate-400",children:["Action ft",p.jsx("input",{type:"number",step:"any",className:"block w-full mt-1 bg-slate-800 border border-slate-700 rounded px-2 py-1 text-slate-100",value:e.action_ft??"",onChange:v=>o("action_ft",v.target.value===""?null:parseFloat(v.target.value))})]}),p.jsxs("label",{className:"text-xs text-slate-400",children:["Minor flood ft",p.jsx("input",{type:"number",step:"any",className:"block w-full mt-1 bg-slate-800 border border-slate-700 rounded px-2 py-1 text-slate-100",value:e.flood_minor_ft??"",onChange:v=>o("flood_minor_ft",v.target.value===""?null:parseFloat(v.target.value))})]}),p.jsxs("label",{className:"text-xs text-slate-400",children:["Moderate flood ft",p.jsx("input",{type:"number",step:"any",className:"block w-full mt-1 bg-slate-800 border border-slate-700 rounded px-2 py-1 text-slate-100",value:e.flood_moderate_ft??"",onChange:v=>o("flood_moderate_ft",v.target.value===""?null:parseFloat(v.target.value))})]}),p.jsxs("label",{className:"text-xs text-slate-400",children:["Major flood ft",p.jsx("input",{type:"number",step:"any",className:"block w-full mt-1 bg-slate-800 border border-slate-700 rounded px-2 py-1 text-slate-100",value:e.flood_major_ft??"",onChange:v=>o("flood_major_ft",v.target.value===""?null:parseFloat(v.target.value))})]}),p.jsxs("label",{className:"text-xs text-slate-300 col-span-2 flex items-center gap-2 mt-2",children:[p.jsx("input",{type:"checkbox",checked:e.enabled,onChange:v=>o("enabled",v.target.checked),className:"accent-cyan-500"}),"Enabled"]}),p.jsxs("div",{className:"col-span-2 flex items-center justify-end gap-2 mt-2",children:[p.jsx("button",{onClick:n,className:"px-3 py-1 text-slate-300 hover:bg-slate-700 rounded text-sm",children:"Cancel"}),p.jsx("button",{onClick:r,className:"px-3 py-1 bg-cyan-700 hover:bg-cyan-600 text-white rounded text-sm",children:"Save"})]})]})}const CP={anchor_id:0,name:"",lat:0,lon:0,state:"ID",enabled:!0,updated_at:0};function Iet(){const[e,t]=G.useState([]),[r,n]=G.useState(!0),[i,a]=G.useState(null),[o,s]=G.useState(null),[l,u]=G.useState(!1),[c,f]=G.useState(CP),h=G.useCallback(async()=>{n(!0),a(null);try{const _=await fetch("/api/town-anchors");if(!_.ok)throw new Error(`GET: ${_.status}`);t(await _.json())}catch(_){a(String(_))}finally{n(!1)}},[]);G.useEffect(()=>{h()},[h]);const d=_=>{s(_.anchor_id),f({..._}),u(!1)},v=()=>{u(!0),s(null),f({...CP})},m=()=>{s(null),u(!1),f(CP)},y=async()=>{const _=l?"/api/town-anchors":`/api/town-anchors/${o}`,S=await fetch(_,{method:l?"POST":"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)});if(!S.ok){const T=await S.json().catch(()=>({}));alert(`save failed: ${T.detail||S.statusText}`);return}m(),h()},x=async _=>{if(!confirm(`Delete anchor ${_}?`))return;const b=await fetch(`/api/town-anchors/${_}`,{method:"DELETE"});if(!b.ok){alert(`delete failed: ${b.status}`);return}h()};return r?p.jsxs("div",{className:"p-6 text-slate-400",children:[p.jsx(Jy,{className:"w-5 h-5 animate-spin inline mr-2"}),"Loading…"]}):i?p.jsxs("div",{className:"p-6 text-red-400",children:["Load failed: ",i]}):p.jsxs("div",{className:"p-6 space-y-4",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(yv,{className:"w-5 h-5 text-cyan-400"}),p.jsx("h1",{className:"text-xl font-semibold text-slate-100",children:"Town Anchors"}),p.jsxs("span",{className:"text-xs text-slate-500 ml-2",children:[e.length," towns"]}),p.jsxs("button",{onClick:v,className:"ml-auto flex items-center gap-1 px-3 py-1 bg-cyan-700 hover:bg-cyan-600 rounded text-white text-sm",children:[p.jsx(xv,{className:"w-4 h-4"})," Add town"]})]}),p.jsx("p",{className:"text-xs text-slate-400 max-w-3xl",children:`Lookup table for the "X mi <bearing> of <town>" suffix in the bot's broadcast text. When a fire or NWS alert renders, the bot walks: Photon nearest-town → this table → landclass → county/state → bare coords. Disabled rows fall through to the next anchor in the chain; the broadcast still goes out, it just uses a different anchor. Example: "3 mi N of Almo". See Reference → Curation: Gauges & Towns for the full chain.`}),l&&p.jsx(u7,{draft:c,setDraft:f,onSave:y,onCancel:m,adding:!0}),p.jsx("div",{className:"bg-slate-800/60 border border-slate-700 rounded-lg overflow-x-auto",children:p.jsxs("table",{className:"w-full text-sm text-slate-200",children:[p.jsx("thead",{className:"bg-slate-900 text-xs text-slate-400 uppercase",children:p.jsxs("tr",{children:[p.jsx("th",{className:"px-3 py-2 text-left",children:"Name"}),p.jsx("th",{className:"px-3 py-2 text-right",children:"Lat"}),p.jsx("th",{className:"px-3 py-2 text-right",children:"Lon"}),p.jsx("th",{className:"px-3 py-2 text-center",children:"State"}),p.jsx("th",{className:"px-3 py-2 text-center",children:"On"}),p.jsx("th",{className:"px-3 py-2"})]})}),p.jsx("tbody",{className:"divide-y divide-slate-700/60",children:e.map(_=>o===_.anchor_id?p.jsx("tr",{className:"bg-slate-900/40",children:p.jsx("td",{colSpan:6,className:"px-3 py-2",children:p.jsx(u7,{draft:c,setDraft:f,onSave:y,onCancel:m})})},_.anchor_id):p.jsxs("tr",{className:"hover:bg-slate-800/50",children:[p.jsx("td",{className:"px-3 py-2 capitalize",children:_.name}),p.jsx("td",{className:"px-3 py-2 text-right text-xs",children:_.lat.toFixed(4)}),p.jsx("td",{className:"px-3 py-2 text-right text-xs",children:_.lon.toFixed(4)}),p.jsx("td",{className:"px-3 py-2 text-center text-xs",children:_.state||"-"}),p.jsx("td",{className:"px-3 py-2 text-center",children:_.enabled?p.jsx(Fo,{className:"w-4 h-4 text-emerald-400 inline"}):p.jsx(qa,{className:"w-4 h-4 text-slate-500 inline"})}),p.jsxs("td",{className:"px-3 py-2 text-right",children:[p.jsx("button",{onClick:()=>d(_),className:"text-cyan-400 hover:text-cyan-300 text-xs mr-3",children:"Edit"}),p.jsx("button",{onClick:()=>x(_.anchor_id),className:"text-red-400 hover:text-red-300",children:p.jsx(Qy,{className:"w-4 h-4 inline"})})]})]},_.anchor_id))})]})})]})}function u7({draft:e,setDraft:t,onSave:r,onCancel:n,adding:i}){const a=(o,s)=>t({...e,[o]:s});return p.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2 p-3 bg-slate-900/50 rounded",children:[p.jsxs("label",{className:"text-xs text-slate-400 col-span-2",children:["Name (lowercased on save)",p.jsx("input",{className:"block w-full mt-1 bg-slate-800 border border-slate-700 rounded px-2 py-1 text-slate-100",value:e.name,onChange:o=>a("name",o.target.value),disabled:!i})]}),p.jsxs("label",{className:"text-xs text-slate-400",children:["State",p.jsx("input",{className:"block w-full mt-1 bg-slate-800 border border-slate-700 rounded px-2 py-1 text-slate-100",value:e.state??"",onChange:o=>a("state",o.target.value)})]}),p.jsxs("label",{className:"text-xs text-slate-400 flex items-center gap-2",children:[p.jsx("input",{type:"checkbox",checked:e.enabled,onChange:o=>a("enabled",o.target.checked),className:"accent-cyan-500 mt-4"}),"Enabled"]}),p.jsxs("label",{className:"text-xs text-slate-400",children:["Lat",p.jsx("input",{type:"number",step:"any",className:"block w-full mt-1 bg-slate-800 border border-slate-700 rounded px-2 py-1 text-slate-100",value:e.lat,onChange:o=>a("lat",parseFloat(o.target.value))})]}),p.jsxs("label",{className:"text-xs text-slate-400",children:["Lon",p.jsx("input",{type:"number",step:"any",className:"block w-full mt-1 bg-slate-800 border border-slate-700 rounded px-2 py-1 text-slate-100",value:e.lon,onChange:o=>a("lon",parseFloat(o.target.value))})]}),p.jsxs("div",{className:"col-span-2 flex items-center justify-end gap-2 mt-2",children:[p.jsx("button",{onClick:n,className:"px-3 py-1 text-slate-300 hover:bg-slate-700 rounded text-sm",children:"Cancel"}),p.jsx("button",{onClick:r,className:"px-3 py-1 bg-cyan-700 hover:bg-cyan-600 text-white rounded text-sm",children:"Save"})]})]})}function Oet(){return p.jsx(Bce,{children:p.jsx(Gce,{children:p.jsxs(Yue,{children:[p.jsx(Pa,{path:"/",element:p.jsx(wNe,{})}),p.jsx(Pa,{path:"/mesh",element:p.jsx(zQe,{})}),p.jsx(Pa,{path:"/environment",element:p.jsx(cet,{})}),p.jsx(Pa,{path:"/config",element:p.jsx(aet,{})}),p.jsx(Pa,{path:"/alerts",element:p.jsx(yet,{})}),p.jsx(Pa,{path:"/notifications",element:p.jsx(Tet,{})}),p.jsx(Pa,{path:"/reference",element:p.jsx(Cet,{})}),p.jsx(Pa,{path:"/adapter-config",element:p.jsx(Met,{})}),p.jsx(Pa,{path:"/gauge-sites",element:p.jsx(Let,{})}),p.jsx(Pa,{path:"/town-anchors",element:p.jsx(Iet,{})})]})})})}AP.createRoot(document.getElementById("root")).render(p.jsx(ee.StrictMode,{children:p.jsx(tce,{children:p.jsx(Oet,{})})}));