@mcp-shark/mcp-shark 1.5.13 → 1.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +482 -56
- package/bin/mcp-shark.js +146 -52
- package/core/cli/AutoFixEngine.js +93 -0
- package/core/cli/ConfigScanner.js +193 -0
- package/core/cli/DataLoader.js +200 -0
- package/core/cli/DeclarativeRuleEngine.js +363 -0
- package/core/cli/DoctorCommand.js +218 -0
- package/core/cli/FixHandlers.js +222 -0
- package/core/cli/HtmlReportGenerator.js +203 -0
- package/core/cli/IdeConfigPaths.js +175 -0
- package/core/cli/ListCommand.js +255 -0
- package/core/cli/LockCommand.js +164 -0
- package/core/cli/LockDiffEngine.js +152 -0
- package/core/cli/RuleRegistryConfig.js +131 -0
- package/core/cli/ScanCommand.js +244 -0
- package/core/cli/ScanService.js +200 -0
- package/core/cli/SecretDetector.js +92 -0
- package/core/cli/SharkScoreCalculator.js +109 -0
- package/core/cli/ToolClassifications.js +51 -0
- package/core/cli/ToxicFlowAnalyzer.js +212 -0
- package/core/cli/UpdateCommand.js +188 -0
- package/core/cli/WalkthroughGenerator.js +195 -0
- package/core/cli/WatchCommand.js +129 -0
- package/core/cli/YamlRuleEngine.js +197 -0
- package/core/cli/data/rule-packs/aauth-visibility.json +117 -0
- package/core/cli/data/rule-packs/agentic-security-2026.json +180 -0
- package/core/cli/data/rule-packs/general-security.json +173 -0
- package/core/cli/data/rule-packs/owasp-mcp-2026.json +244 -0
- package/core/cli/data/rule-packs/toxic-flow-heuristics.json +21 -0
- package/core/cli/data/rule-sources.json +5 -0
- package/core/cli/data/secret-patterns.json +18 -0
- package/core/cli/data/tool-classifications.json +111 -0
- package/core/cli/data/toxic-flow-rules.json +47 -0
- package/core/cli/index.js +23 -0
- package/core/cli/output/Banner.js +52 -0
- package/core/cli/output/Formatter.js +183 -0
- package/core/cli/output/JsonFormatter.js +106 -0
- package/core/cli/output/index.js +16 -0
- package/core/cli/secureRegistryFetch.js +157 -0
- package/core/cli/symbols.js +16 -0
- package/core/configs/environment.js +3 -1
- package/core/configs/index.js +3 -64
- package/core/container/DependencyContainer.js +4 -1
- package/core/mcp-server/index.js +4 -1
- package/core/mcp-server/server/external/all.js +10 -3
- package/core/mcp-server/server/external/config.js +62 -5
- package/core/models/RequestFilters.js +3 -0
- package/core/repositories/PacketRepository.js +16 -0
- package/core/services/AuditService.js +2 -0
- package/core/services/ConfigService.js +9 -1
- package/core/services/ConfigTransformService.js +34 -2
- package/core/services/RequestService.js +58 -5
- package/core/services/ServerManagementService.js +59 -4
- package/core/services/security/StaticRulesService.js +69 -13
- package/core/services/security/TrafficAnalysisService.js +19 -1
- package/core/services/security/TrafficToxicFlowService.js +154 -0
- package/core/services/security/aauthGraph.js +199 -0
- package/core/services/security/aauthParser.js +274 -0
- package/core/services/security/aauthSelfTest.js +346 -0
- package/core/services/security/index.js +2 -1
- package/core/services/security/rules/index.js +25 -59
- package/core/services/security/rules/scans/configPermissions.js +91 -0
- package/core/services/security/rules/scans/duplicateToolNames.js +85 -0
- package/core/services/security/rules/scans/insecureTransport.js +148 -0
- package/core/services/security/rules/scans/missingContainment.js +123 -0
- package/core/services/security/rules/scans/shellEnvInjection.js +101 -0
- package/core/services/security/rules/scans/unsafeDefaults.js +99 -0
- package/core/services/security/toolsListFromTrafficParser.js +70 -0
- package/core/tui/App.js +144 -0
- package/core/tui/FindingsPanel.js +115 -0
- package/core/tui/FixPanel.js +132 -0
- package/core/tui/Header.js +51 -0
- package/core/tui/HelpBar.js +42 -0
- package/core/tui/ServersPanel.js +109 -0
- package/core/tui/ToxicFlowsPanel.js +100 -0
- package/core/tui/h.js +8 -0
- package/core/tui/index.js +11 -0
- package/core/tui/render.js +22 -0
- package/package.json +24 -16
- package/ui/dist/assets/index-D6zDrtMV.js +81 -0
- package/ui/dist/index.html +1 -1
- package/ui/server/controllers/AauthController.js +279 -0
- package/ui/server/controllers/RequestController.js +12 -1
- package/ui/server/controllers/SecurityFindingsController.js +46 -1
- package/ui/server/routes/aauth.js +18 -0
- package/ui/server/routes/requests.js +8 -1
- package/ui/server/routes/security.js +5 -1
- package/ui/server/setup.js +224 -6
- package/ui/server/swagger/paths/components.js +55 -0
- package/ui/server/swagger/paths/securityTrafficFlows.js +59 -0
- package/ui/server/swagger/paths.js +2 -2
- package/ui/server/swagger/swagger.js +5 -2
- package/ui/server.js +1 -1
- package/ui/src/App.jsx +26 -52
- package/ui/src/PacketFilters.jsx +31 -1
- package/ui/src/PacketList.jsx +2 -2
- package/ui/src/Security.jsx +10 -0
- package/ui/src/TabNavigation.jsx +8 -0
- package/ui/src/components/AAuthBadge.jsx +92 -0
- package/ui/src/components/AauthExplorer/AauthExplorerGraph.jsx +231 -0
- package/ui/src/components/AauthExplorer/AauthExplorerView.jsx +387 -0
- package/ui/src/components/AauthExplorer/NodeDetailPanel.jsx +272 -0
- package/ui/src/components/App/ActionMenu.jsx +4 -31
- package/ui/src/components/App/ApiDocsButton.jsx +0 -1
- package/ui/src/components/App/ShutdownButton.jsx +0 -1
- package/ui/src/components/App/useAppState.js +19 -26
- package/ui/src/components/DetailsTab/AAuthIdentitySection.jsx +119 -0
- package/ui/src/components/DetailsTab/RequestDetailsSection.jsx +2 -0
- package/ui/src/components/DetailsTab/ResponseDetailsSection.jsx +2 -0
- package/ui/src/components/DetectedPathsList.jsx +1 -5
- package/ui/src/components/FileInput.jsx +0 -1
- package/ui/src/components/PacketFilters/AAuthPostureFilter.jsx +81 -0
- package/ui/src/components/RequestRow/RequestRowMain.jsx +7 -1
- package/ui/src/components/Security/AAuthPosturePanel.jsx +360 -0
- package/ui/src/components/Security/ScannerContent.jsx +33 -1
- package/ui/src/components/Security/TrafficToxicFlowsPanel.jsx +253 -0
- package/ui/src/components/Security/securityApi.js +15 -0
- package/ui/src/components/Security/useSecurity.js +60 -3
- package/ui/src/components/ServerControl.jsx +0 -1
- package/ui/src/components/TabNavigation/DesktopTabs.jsx +0 -11
- package/ui/src/components/TabNavigationIcons.jsx +5 -0
- package/ui/src/components/ViewModeTabs.jsx +0 -1
- package/ui/src/utils/animations.js +26 -9
- package/core/services/security/rules/scans/agentic01GoalHijack.js +0 -130
- package/core/services/security/rules/scans/agentic02ToolMisuse.js +0 -129
- package/core/services/security/rules/scans/agentic03IdentityAbuse.js +0 -130
- package/core/services/security/rules/scans/agentic04SupplyChain.js +0 -130
- package/core/services/security/rules/scans/agentic06MemoryPoisoning.js +0 -130
- package/core/services/security/rules/scans/agentic07InsecureCommunication.js +0 -135
- package/core/services/security/rules/scans/agentic08CascadingFailures.js +0 -135
- package/core/services/security/rules/scans/agentic09TrustExploitation.js +0 -135
- package/core/services/security/rules/scans/agentic10RogueAgent.js +0 -130
- package/core/services/security/rules/scans/hardcodedSecrets.js +0 -130
- package/core/services/security/rules/scans/mcp01TokenMismanagement.js +0 -127
- package/core/services/security/rules/scans/mcp02ScopeCreep.js +0 -130
- package/core/services/security/rules/scans/mcp03ToolPoisoning.js +0 -132
- package/core/services/security/rules/scans/mcp04SupplyChain.js +0 -131
- package/core/services/security/rules/scans/mcp06PromptInjection.js +0 -200
- package/core/services/security/rules/scans/mcp07InsufficientAuth.js +0 -130
- package/core/services/security/rules/scans/mcp08LackAudit.js +0 -129
- package/core/services/security/rules/scans/mcp09ShadowServers.js +0 -129
- package/core/services/security/rules/scans/mcp10ContextInjection.js +0 -130
- package/ui/dist/assets/index-CiCSDYf-.js +0 -97
- package/ui/server/routes/help.js +0 -44
- package/ui/server/swagger/paths/help.js +0 -82
- package/ui/src/HelpGuide/HelpGuideContent.jsx +0 -118
- package/ui/src/HelpGuide/HelpGuideFooter.jsx +0 -59
- package/ui/src/HelpGuide/HelpGuideHeader.jsx +0 -57
- package/ui/src/HelpGuide.jsx +0 -78
- package/ui/src/IntroTour.jsx +0 -154
- package/ui/src/components/App/HelpButton.jsx +0 -90
- package/ui/src/components/TourOverlay.jsx +0 -117
- package/ui/src/components/TourTooltip/TourTooltipButtons.jsx +0 -120
- package/ui/src/components/TourTooltip/TourTooltipHeader.jsx +0 -71
- package/ui/src/components/TourTooltip/TourTooltipIcons.jsx +0 -54
- package/ui/src/components/TourTooltip/useTooltipPosition.js +0 -135
- package/ui/src/components/TourTooltip.jsx +0 -91
- package/ui/src/config/tourSteps.jsx +0 -140
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function t(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(a){if(a.ep)return;a.ep=!0;const i=t(a);fetch(a.href,i)}})();function Hw(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Wx={exports:{}},Rf={},$x={exports:{}},pt={};var WA;function hG(){if(WA)return pt;WA=1;var r=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),o=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),f=Symbol.iterator;function d(V){return V===null||typeof V!="object"?null:(V=f&&V[f]||V["@@iterator"],typeof V=="function"?V:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,y={};function m(V,U,ae){this.props=V,this.context=U,this.refs=y,this.updater=ae||h}m.prototype.isReactComponent={},m.prototype.setState=function(V,U){if(typeof V!="object"&&typeof V!="function"&&V!=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,V,U,"setState")},m.prototype.forceUpdate=function(V){this.updater.enqueueForceUpdate(this,V,"forceUpdate")};function x(){}x.prototype=m.prototype;function _(V,U,ae){this.props=V,this.context=U,this.refs=y,this.updater=ae||h}var T=_.prototype=new x;T.constructor=_,v(T,m.prototype),T.isPureReactComponent=!0;var C=Array.isArray,k=Object.prototype.hasOwnProperty,A={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};function D(V,U,ae){var ce,re={},_e=null,Ne=null;if(U!=null)for(ce in U.ref!==void 0&&(Ne=U.ref),U.key!==void 0&&(_e=""+U.key),U)k.call(U,ce)&&!L.hasOwnProperty(ce)&&(re[ce]=U[ce]);var ve=arguments.length-2;if(ve===1)re.children=ae;else if(1<ve){for(var fe=Array(ve),Te=0;Te<ve;Te++)fe[Te]=arguments[Te+2];re.children=fe}if(V&&V.defaultProps)for(ce in ve=V.defaultProps,ve)re[ce]===void 0&&(re[ce]=ve[ce]);return{$$typeof:r,type:V,key:_e,ref:Ne,props:re,_owner:A.current}}function P(V,U){return{$$typeof:r,type:V.type,key:U,ref:V.ref,props:V.props,_owner:V._owner}}function E(V){return typeof V=="object"&&V!==null&&V.$$typeof===r}function O(V){var U={"=":"=0",":":"=2"};return"$"+V.replace(/[=:]/g,function(ae){return U[ae]})}var B=/\/+/g;function N(V,U){return typeof V=="object"&&V!==null&&V.key!=null?O(""+V.key):U.toString(36)}function W(V,U,ae,ce,re){var _e=typeof V;(_e==="undefined"||_e==="boolean")&&(V=null);var Ne=!1;if(V===null)Ne=!0;else switch(_e){case"string":case"number":Ne=!0;break;case"object":switch(V.$$typeof){case r:case e:Ne=!0}}if(Ne)return Ne=V,re=re(Ne),V=ce===""?"."+N(Ne,0):ce,C(re)?(ae="",V!=null&&(ae=V.replace(B,"$&/")+"/"),W(re,U,ae,"",function(Te){return Te})):re!=null&&(E(re)&&(re=P(re,ae+(!re.key||Ne&&Ne.key===re.key?"":(""+re.key).replace(B,"$&/")+"/")+V)),U.push(re)),1;if(Ne=0,ce=ce===""?".":ce+":",C(V))for(var ve=0;ve<V.length;ve++){_e=V[ve];var fe=ce+N(_e,ve);Ne+=W(_e,U,ae,fe,re)}else if(fe=d(V),typeof fe=="function")for(V=fe.call(V),ve=0;!(_e=V.next()).done;)_e=_e.value,fe=ce+N(_e,ve++),Ne+=W(_e,U,ae,fe,re);else if(_e==="object")throw U=String(V),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(V).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.");return Ne}function H(V,U,ae){if(V==null)return V;var ce=[],re=0;return W(V,ce,"","",function(_e){return U.call(ae,_e,re++)}),ce}function $(V){if(V._status===-1){var U=V._result;U=U(),U.then(function(ae){(V._status===0||V._status===-1)&&(V._status=1,V._result=ae)},function(ae){(V._status===0||V._status===-1)&&(V._status=2,V._result=ae)}),V._status===-1&&(V._status=0,V._result=U)}if(V._status===1)return V._result.default;throw V._result}var Z={current:null},G={transition:null},X={ReactCurrentDispatcher:Z,ReactCurrentBatchConfig:G,ReactCurrentOwner:A};function K(){throw Error("act(...) is not supported in production builds of React.")}return pt.Children={map:H,forEach:function(V,U,ae){H(V,function(){U.apply(this,arguments)},ae)},count:function(V){var U=0;return H(V,function(){U++}),U},toArray:function(V){return H(V,function(U){return U})||[]},only:function(V){if(!E(V))throw Error("React.Children.only expected to receive a single React element child.");return V}},pt.Component=m,pt.Fragment=t,pt.Profiler=a,pt.PureComponent=_,pt.StrictMode=n,pt.Suspense=l,pt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=X,pt.act=K,pt.cloneElement=function(V,U,ae){if(V==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+V+".");var ce=v({},V.props),re=V.key,_e=V.ref,Ne=V._owner;if(U!=null){if(U.ref!==void 0&&(_e=U.ref,Ne=A.current),U.key!==void 0&&(re=""+U.key),V.type&&V.type.defaultProps)var ve=V.type.defaultProps;for(fe in U)k.call(U,fe)&&!L.hasOwnProperty(fe)&&(ce[fe]=U[fe]===void 0&&ve!==void 0?ve[fe]:U[fe])}var fe=arguments.length-2;if(fe===1)ce.children=ae;else if(1<fe){ve=Array(fe);for(var Te=0;Te<fe;Te++)ve[Te]=arguments[Te+2];ce.children=ve}return{$$typeof:r,type:V.type,key:re,ref:_e,props:ce,_owner:Ne}},pt.createContext=function(V){return V={$$typeof:o,_currentValue:V,_currentValue2:V,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},V.Provider={$$typeof:i,_context:V},V.Consumer=V},pt.createElement=D,pt.createFactory=function(V){var U=D.bind(null,V);return U.type=V,U},pt.createRef=function(){return{current:null}},pt.forwardRef=function(V){return{$$typeof:s,render:V}},pt.isValidElement=E,pt.lazy=function(V){return{$$typeof:c,_payload:{_status:-1,_result:V},_init:$}},pt.memo=function(V,U){return{$$typeof:u,type:V,compare:U===void 0?null:U}},pt.startTransition=function(V){var U=G.transition;G.transition={};try{V()}finally{G.transition=U}},pt.unstable_act=K,pt.useCallback=function(V,U){return Z.current.useCallback(V,U)},pt.useContext=function(V){return Z.current.useContext(V)},pt.useDebugValue=function(){},pt.useDeferredValue=function(V){return Z.current.useDeferredValue(V)},pt.useEffect=function(V,U){return Z.current.useEffect(V,U)},pt.useId=function(){return Z.current.useId()},pt.useImperativeHandle=function(V,U,ae){return Z.current.useImperativeHandle(V,U,ae)},pt.useInsertionEffect=function(V,U){return Z.current.useInsertionEffect(V,U)},pt.useLayoutEffect=function(V,U){return Z.current.useLayoutEffect(V,U)},pt.useMemo=function(V,U){return Z.current.useMemo(V,U)},pt.useReducer=function(V,U,ae){return Z.current.useReducer(V,U,ae)},pt.useRef=function(V){return Z.current.useRef(V)},pt.useState=function(V){return Z.current.useState(V)},pt.useSyncExternalStore=function(V,U,ae){return Z.current.useSyncExternalStore(V,U,ae)},pt.useTransition=function(){return Z.current.useTransition()},pt.version="18.3.1",pt}var $A;function Uw(){return $A||($A=1,$x.exports=hG()),$x.exports}var HA;function pG(){if(HA)return Rf;HA=1;var r=Uw(),e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(s,l,u){var c,f={},d=null,h=null;u!==void 0&&(d=""+u),l.key!==void 0&&(d=""+l.key),l.ref!==void 0&&(h=l.ref);for(c in l)n.call(l,c)&&!i.hasOwnProperty(c)&&(f[c]=l[c]);if(s&&s.defaultProps)for(c in l=s.defaultProps,l)f[c]===void 0&&(f[c]=l[c]);return{$$typeof:e,type:s,key:d,ref:h,props:f,_owner:a.current}}return Rf.Fragment=t,Rf.jsx=o,Rf.jsxs=o,Rf}var UA;function vG(){return UA||(UA=1,Wx.exports=pG()),Wx.exports}var b=vG(),Y=Uw();const Ad=Hw(Y);var iv={},Hx={exports:{}},ln={},Ux={exports:{}},Yx={};var YA;function gG(){return YA||(YA=1,(function(r){function e(G,X){var K=G.length;G.push(X);e:for(;0<K;){var V=K-1>>>1,U=G[V];if(0<a(U,X))G[V]=X,G[K]=U,K=V;else break e}}function t(G){return G.length===0?null:G[0]}function n(G){if(G.length===0)return null;var X=G[0],K=G.pop();if(K!==X){G[0]=K;e:for(var V=0,U=G.length,ae=U>>>1;V<ae;){var ce=2*(V+1)-1,re=G[ce],_e=ce+1,Ne=G[_e];if(0>a(re,K))_e<U&&0>a(Ne,re)?(G[V]=Ne,G[_e]=K,V=_e):(G[V]=re,G[ce]=K,V=ce);else if(_e<U&&0>a(Ne,K))G[V]=Ne,G[_e]=K,V=_e;else break e}}return X}function a(G,X){var K=G.sortIndex-X.sortIndex;return K!==0?K:G.id-X.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;r.unstable_now=function(){return i.now()}}else{var o=Date,s=o.now();r.unstable_now=function(){return o.now()-s}}var l=[],u=[],c=1,f=null,d=3,h=!1,v=!1,y=!1,m=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 T(G){for(var X=t(u);X!==null;){if(X.callback===null)n(u);else if(X.startTime<=G)n(u),X.sortIndex=X.expirationTime,e(l,X);else break;X=t(u)}}function C(G){if(y=!1,T(G),!v)if(t(l)!==null)v=!0,$(k);else{var X=t(u);X!==null&&Z(C,X.startTime-G)}}function k(G,X){v=!1,y&&(y=!1,x(D),D=-1),h=!0;var K=d;try{for(T(X),f=t(l);f!==null&&(!(f.expirationTime>X)||G&&!O());){var V=f.callback;if(typeof V=="function"){f.callback=null,d=f.priorityLevel;var U=V(f.expirationTime<=X);X=r.unstable_now(),typeof U=="function"?f.callback=U:f===t(l)&&n(l),T(X)}else n(l);f=t(l)}if(f!==null)var ae=!0;else{var ce=t(u);ce!==null&&Z(C,ce.startTime-X),ae=!1}return ae}finally{f=null,d=K,h=!1}}var A=!1,L=null,D=-1,P=5,E=-1;function O(){return!(r.unstable_now()-E<P)}function B(){if(L!==null){var G=r.unstable_now();E=G;var X=!0;try{X=L(!0,G)}finally{X?N():(A=!1,L=null)}}else A=!1}var N;if(typeof _=="function")N=function(){_(B)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,H=W.port2;W.port1.onmessage=B,N=function(){H.postMessage(null)}}else N=function(){m(B,0)};function $(G){L=G,A||(A=!0,N())}function Z(G,X){D=m(function(){G(r.unstable_now())},X)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(G){G.callback=null},r.unstable_continueExecution=function(){v||h||(v=!0,$(k))},r.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<G?Math.floor(1e3/G):5},r.unstable_getCurrentPriorityLevel=function(){return d},r.unstable_getFirstCallbackNode=function(){return t(l)},r.unstable_next=function(G){switch(d){case 1:case 2:case 3:var X=3;break;default:X=d}var K=d;d=X;try{return G()}finally{d=K}},r.unstable_pauseExecution=function(){},r.unstable_requestPaint=function(){},r.unstable_runWithPriority=function(G,X){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var K=d;d=G;try{return X()}finally{d=K}},r.unstable_scheduleCallback=function(G,X,K){var V=r.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?V+K:V):K=V,G){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=K+U,G={id:c++,callback:X,priorityLevel:G,startTime:K,expirationTime:U,sortIndex:-1},K>V?(G.sortIndex=K,e(u,G),t(l)===null&&G===t(u)&&(y?(x(D),D=-1):y=!0,Z(C,K-V))):(G.sortIndex=U,e(l,G),v||h||(v=!0,$(k))),G},r.unstable_shouldYield=O,r.unstable_wrapCallback=function(G){var X=d;return function(){var K=d;d=X;try{return G.apply(this,arguments)}finally{d=K}}}})(Yx)),Yx}var XA;function yG(){return XA||(XA=1,Ux.exports=gG()),Ux.exports}var ZA;function mG(){if(ZA)return ln;ZA=1;var r=Uw(),e=yG();function t(p){for(var g="https://reactjs.org/docs/error-decoder.html?invariant="+p,w=1;w<arguments.length;w++)g+="&args[]="+encodeURIComponent(arguments[w]);return"Minified React error #"+p+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=new Set,a={};function i(p,g){o(p,g),o(p+"Capture",g)}function o(p,g){for(a[p]=g,p=0;p<g.length;p++)n.add(g[p])}var s=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),l=Object.prototype.hasOwnProperty,u=/^[: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]*$/,c={},f={};function d(p){return l.call(f,p)?!0:l.call(c,p)?!1:u.test(p)?f[p]=!0:(c[p]=!0,!1)}function h(p,g,w,M){if(w!==null&&w.type===0)return!1;switch(typeof g){case"function":case"symbol":return!0;case"boolean":return M?!1:w!==null?!w.acceptsBooleans:(p=p.toLowerCase().slice(0,5),p!=="data-"&&p!=="aria-");default:return!1}}function v(p,g,w,M){if(g===null||typeof g>"u"||h(p,g,w,M))return!0;if(M)return!1;if(w!==null)switch(w.type){case 3:return!g;case 4:return g===!1;case 5:return isNaN(g);case 6:return isNaN(g)||1>g}return!1}function y(p,g,w,M,I,R,F){this.acceptsBooleans=g===2||g===3||g===4,this.attributeName=M,this.attributeNamespace=I,this.mustUseProperty=w,this.propertyName=p,this.type=g,this.sanitizeURL=R,this.removeEmptyString=F}var m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(p){m[p]=new y(p,0,!1,p,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(p){var g=p[0];m[g]=new y(g,1,!1,p[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(p){m[p]=new y(p,2,!1,p.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(p){m[p]=new y(p,2,!1,p,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(p){m[p]=new y(p,3,!1,p.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(p){m[p]=new y(p,3,!0,p,null,!1,!1)}),["capture","download"].forEach(function(p){m[p]=new y(p,4,!1,p,null,!1,!1)}),["cols","rows","size","span"].forEach(function(p){m[p]=new y(p,6,!1,p,null,!1,!1)}),["rowSpan","start"].forEach(function(p){m[p]=new y(p,5,!1,p.toLowerCase(),null,!1,!1)});var x=/[\-:]([a-z])/g;function _(p){return p[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(p){var g=p.replace(x,_);m[g]=new y(g,1,!1,p,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(p){var g=p.replace(x,_);m[g]=new y(g,1,!1,p,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(p){var g=p.replace(x,_);m[g]=new y(g,1,!1,p,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(p){m[p]=new y(p,1,!1,p.toLowerCase(),null,!1,!1)}),m.xlinkHref=new y("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(p){m[p]=new y(p,1,!1,p.toLowerCase(),null,!0,!0)});function T(p,g,w,M){var I=m.hasOwnProperty(g)?m[g]:null;(I!==null?I.type!==0:M||!(2<g.length)||g[0]!=="o"&&g[0]!=="O"||g[1]!=="n"&&g[1]!=="N")&&(v(g,w,I,M)&&(w=null),M||I===null?d(g)&&(w===null?p.removeAttribute(g):p.setAttribute(g,""+w)):I.mustUseProperty?p[I.propertyName]=w===null?I.type===3?!1:"":w:(g=I.attributeName,M=I.attributeNamespace,w===null?p.removeAttribute(g):(I=I.type,w=I===3||I===4&&w===!0?"":""+w,M?p.setAttributeNS(M,g,w):p.setAttribute(g,w))))}var C=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,k=Symbol.for("react.element"),A=Symbol.for("react.portal"),L=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),P=Symbol.for("react.profiler"),E=Symbol.for("react.provider"),O=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),Z=Symbol.for("react.offscreen"),G=Symbol.iterator;function X(p){return p===null||typeof p!="object"?null:(p=G&&p[G]||p["@@iterator"],typeof p=="function"?p:null)}var K=Object.assign,V;function U(p){if(V===void 0)try{throw Error()}catch(w){var g=w.stack.trim().match(/\n( *(at )?)/);V=g&&g[1]||""}return`
|
|
2
|
+
`+V+p}var ae=!1;function ce(p,g){if(!p||ae)return"";ae=!0;var w=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(g)if(g=function(){throw Error()},Object.defineProperty(g.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(g,[])}catch(se){var M=se}Reflect.construct(p,[],g)}else{try{g.call()}catch(se){M=se}p.call(g.prototype)}else{try{throw Error()}catch(se){M=se}p()}}catch(se){if(se&&M&&typeof se.stack=="string"){for(var I=se.stack.split(`
|
|
3
|
+
`),R=M.stack.split(`
|
|
4
|
+
`),F=I.length-1,q=R.length-1;1<=F&&0<=q&&I[F]!==R[q];)q--;for(;1<=F&&0<=q;F--,q--)if(I[F]!==R[q]){if(F!==1||q!==1)do if(F--,q--,0>q||I[F]!==R[q]){var J=`
|
|
5
|
+
`+I[F].replace(" at new "," at ");return p.displayName&&J.includes("<anonymous>")&&(J=J.replace("<anonymous>",p.displayName)),J}while(1<=F&&0<=q);break}}}finally{ae=!1,Error.prepareStackTrace=w}return(p=p?p.displayName||p.name:"")?U(p):""}function re(p){switch(p.tag){case 5:return U(p.type);case 16:return U("Lazy");case 13:return U("Suspense");case 19:return U("SuspenseList");case 0:case 2:case 15:return p=ce(p.type,!1),p;case 11:return p=ce(p.type.render,!1),p;case 1:return p=ce(p.type,!0),p;default:return""}}function _e(p){if(p==null)return null;if(typeof p=="function")return p.displayName||p.name||null;if(typeof p=="string")return p;switch(p){case L:return"Fragment";case A:return"Portal";case P:return"Profiler";case D:return"StrictMode";case N:return"Suspense";case W:return"SuspenseList"}if(typeof p=="object")switch(p.$$typeof){case O:return(p.displayName||"Context")+".Consumer";case E:return(p._context.displayName||"Context")+".Provider";case B:var g=p.render;return p=p.displayName,p||(p=g.displayName||g.name||"",p=p!==""?"ForwardRef("+p+")":"ForwardRef"),p;case H:return g=p.displayName||null,g!==null?g:_e(p.type)||"Memo";case $:g=p._payload,p=p._init;try{return _e(p(g))}catch{}}return null}function Ne(p){var g=p.type;switch(p.tag){case 24:return"Cache";case 9:return(g.displayName||"Context")+".Consumer";case 10:return(g._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return p=g.render,p=p.displayName||p.name||"",g.displayName||(p!==""?"ForwardRef("+p+")":"ForwardRef");case 7:return"Fragment";case 5:return g;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return _e(g);case 8:return g===D?"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 g=="function")return g.displayName||g.name||null;if(typeof g=="string")return g}return null}function ve(p){switch(typeof p){case"boolean":case"number":case"string":case"undefined":return p;case"object":return p;default:return""}}function fe(p){var g=p.type;return(p=p.nodeName)&&p.toLowerCase()==="input"&&(g==="checkbox"||g==="radio")}function Te(p){var g=fe(p)?"checked":"value",w=Object.getOwnPropertyDescriptor(p.constructor.prototype,g),M=""+p[g];if(!p.hasOwnProperty(g)&&typeof w<"u"&&typeof w.get=="function"&&typeof w.set=="function"){var I=w.get,R=w.set;return Object.defineProperty(p,g,{configurable:!0,get:function(){return I.call(this)},set:function(F){M=""+F,R.call(this,F)}}),Object.defineProperty(p,g,{enumerable:w.enumerable}),{getValue:function(){return M},setValue:function(F){M=""+F},stopTracking:function(){p._valueTracker=null,delete p[g]}}}}function xe(p){p._valueTracker||(p._valueTracker=Te(p))}function Ie(p){if(!p)return!1;var g=p._valueTracker;if(!g)return!0;var w=g.getValue(),M="";return p&&(M=fe(p)?p.checked?"true":"false":p.value),p=M,p!==w?(g.setValue(p),!0):!1}function dt(p){if(p=p||(typeof document<"u"?document:void 0),typeof p>"u")return null;try{return p.activeElement||p.body}catch{return p.body}}function ke(p,g){var w=g.checked;return K({},g,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:w??p._wrapperState.initialChecked})}function He(p,g){var w=g.defaultValue==null?"":g.defaultValue,M=g.checked!=null?g.checked:g.defaultChecked;w=ve(g.value!=null?g.value:w),p._wrapperState={initialChecked:M,initialValue:w,controlled:g.type==="checkbox"||g.type==="radio"?g.checked!=null:g.value!=null}}function tt(p,g){g=g.checked,g!=null&&T(p,"checked",g,!1)}function _t(p,g){tt(p,g);var w=ve(g.value),M=g.type;if(w!=null)M==="number"?(w===0&&p.value===""||p.value!=w)&&(p.value=""+w):p.value!==""+w&&(p.value=""+w);else if(M==="submit"||M==="reset"){p.removeAttribute("value");return}g.hasOwnProperty("value")?yr(p,g.type,w):g.hasOwnProperty("defaultValue")&&yr(p,g.type,ve(g.defaultValue)),g.checked==null&&g.defaultChecked!=null&&(p.defaultChecked=!!g.defaultChecked)}function Or(p,g,w){if(g.hasOwnProperty("value")||g.hasOwnProperty("defaultValue")){var M=g.type;if(!(M!=="submit"&&M!=="reset"||g.value!==void 0&&g.value!==null))return;g=""+p._wrapperState.initialValue,w||g===p.value||(p.value=g),p.defaultValue=g}w=p.name,w!==""&&(p.name=""),p.defaultChecked=!!p._wrapperState.initialChecked,w!==""&&(p.name=w)}function yr(p,g,w){(g!=="number"||dt(p.ownerDocument)!==p)&&(w==null?p.defaultValue=""+p._wrapperState.initialValue:p.defaultValue!==""+w&&(p.defaultValue=""+w))}var vn=Array.isArray;function gn(p,g,w,M){if(p=p.options,g){g={};for(var I=0;I<w.length;I++)g["$"+w[I]]=!0;for(w=0;w<p.length;w++)I=g.hasOwnProperty("$"+p[w].value),p[w].selected!==I&&(p[w].selected=I),I&&M&&(p[w].defaultSelected=!0)}else{for(w=""+ve(w),g=null,I=0;I<p.length;I++){if(p[I].value===w){p[I].selected=!0,M&&(p[I].defaultSelected=!0);return}g!==null||p[I].disabled||(g=p[I])}g!==null&&(g.selected=!0)}}function ds(p,g){if(g.dangerouslySetInnerHTML!=null)throw Error(t(91));return K({},g,{value:void 0,defaultValue:void 0,children:""+p._wrapperState.initialValue})}function J2(p,g){var w=g.value;if(w==null){if(w=g.children,g=g.defaultValue,w!=null){if(g!=null)throw Error(t(92));if(vn(w)){if(1<w.length)throw Error(t(93));w=w[0]}g=w}g==null&&(g=""),w=g}p._wrapperState={initialValue:ve(w)}}function eM(p,g){var w=ve(g.value),M=ve(g.defaultValue);w!=null&&(w=""+w,w!==p.value&&(p.value=w),g.defaultValue==null&&p.defaultValue!==w&&(p.defaultValue=w)),M!=null&&(p.defaultValue=""+M)}function tM(p){var g=p.textContent;g===p._wrapperState.initialValue&&g!==""&&g!==null&&(p.value=g)}function rM(p){switch(p){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Jm(p,g){return p==null||p==="http://www.w3.org/1999/xhtml"?rM(g):p==="http://www.w3.org/2000/svg"&&g==="foreignObject"?"http://www.w3.org/1999/xhtml":p}var qh,nM=(function(p){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(g,w,M,I){MSApp.execUnsafeLocalFunction(function(){return p(g,w,M,I)})}:p})(function(p,g){if(p.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in p)p.innerHTML=g;else{for(qh=qh||document.createElement("div"),qh.innerHTML="<svg>"+g.valueOf().toString()+"</svg>",g=qh.firstChild;p.firstChild;)p.removeChild(p.firstChild);for(;g.firstChild;)p.appendChild(g.firstChild)}});function Xc(p,g){if(g){var w=p.firstChild;if(w&&w===p.lastChild&&w.nodeType===3){w.nodeValue=g;return}}p.textContent=g}var Zc={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},yV=["Webkit","ms","Moz","O"];Object.keys(Zc).forEach(function(p){yV.forEach(function(g){g=g+p.charAt(0).toUpperCase()+p.substring(1),Zc[g]=Zc[p]})});function aM(p,g,w){return g==null||typeof g=="boolean"||g===""?"":w||typeof g!="number"||g===0||Zc.hasOwnProperty(p)&&Zc[p]?(""+g).trim():g+"px"}function iM(p,g){p=p.style;for(var w in g)if(g.hasOwnProperty(w)){var M=w.indexOf("--")===0,I=aM(w,g[w],M);w==="float"&&(w="cssFloat"),M?p.setProperty(w,I):p[w]=I}}var mV=K({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 e0(p,g){if(g){if(mV[p]&&(g.children!=null||g.dangerouslySetInnerHTML!=null))throw Error(t(137,p));if(g.dangerouslySetInnerHTML!=null){if(g.children!=null)throw Error(t(60));if(typeof g.dangerouslySetInnerHTML!="object"||!("__html"in g.dangerouslySetInnerHTML))throw Error(t(61))}if(g.style!=null&&typeof g.style!="object")throw Error(t(62))}}function t0(p,g){if(p.indexOf("-")===-1)return typeof g.is=="string";switch(p){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var r0=null;function n0(p){return p=p.target||p.srcElement||window,p.correspondingUseElement&&(p=p.correspondingUseElement),p.nodeType===3?p.parentNode:p}var a0=null,Wl=null,$l=null;function oM(p){if(p=mf(p)){if(typeof a0!="function")throw Error(t(280));var g=p.stateNode;g&&(g=Sp(g),a0(p.stateNode,p.type,g))}}function sM(p){Wl?$l?$l.push(p):$l=[p]:Wl=p}function lM(){if(Wl){var p=Wl,g=$l;if($l=Wl=null,oM(p),g)for(p=0;p<g.length;p++)oM(g[p])}}function uM(p,g){return p(g)}function cM(){}var i0=!1;function fM(p,g,w){if(i0)return p(g,w);i0=!0;try{return uM(p,g,w)}finally{i0=!1,(Wl!==null||$l!==null)&&(cM(),lM())}}function Kc(p,g){var w=p.stateNode;if(w===null)return null;var M=Sp(w);if(M===null)return null;w=M[g];e:switch(g){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(M=!M.disabled)||(p=p.type,M=!(p==="button"||p==="input"||p==="select"||p==="textarea")),p=!M;break e;default:p=!1}if(p)return null;if(w&&typeof w!="function")throw Error(t(231,g,typeof w));return w}var o0=!1;if(s)try{var qc={};Object.defineProperty(qc,"passive",{get:function(){o0=!0}}),window.addEventListener("test",qc,qc),window.removeEventListener("test",qc,qc)}catch{o0=!1}function xV(p,g,w,M,I,R,F,q,J){var se=Array.prototype.slice.call(arguments,3);try{g.apply(w,se)}catch(ge){this.onError(ge)}}var Qc=!1,Qh=null,Jh=!1,s0=null,SV={onError:function(p){Qc=!0,Qh=p}};function bV(p,g,w,M,I,R,F,q,J){Qc=!1,Qh=null,xV.apply(SV,arguments)}function _V(p,g,w,M,I,R,F,q,J){if(bV.apply(this,arguments),Qc){if(Qc){var se=Qh;Qc=!1,Qh=null}else throw Error(t(198));Jh||(Jh=!0,s0=se)}}function hs(p){var g=p,w=p;if(p.alternate)for(;g.return;)g=g.return;else{p=g;do g=p,(g.flags&4098)!==0&&(w=g.return),p=g.return;while(p)}return g.tag===3?w:null}function dM(p){if(p.tag===13){var g=p.memoizedState;if(g===null&&(p=p.alternate,p!==null&&(g=p.memoizedState)),g!==null)return g.dehydrated}return null}function hM(p){if(hs(p)!==p)throw Error(t(188))}function wV(p){var g=p.alternate;if(!g){if(g=hs(p),g===null)throw Error(t(188));return g!==p?null:p}for(var w=p,M=g;;){var I=w.return;if(I===null)break;var R=I.alternate;if(R===null){if(M=I.return,M!==null){w=M;continue}break}if(I.child===R.child){for(R=I.child;R;){if(R===w)return hM(I),p;if(R===M)return hM(I),g;R=R.sibling}throw Error(t(188))}if(w.return!==M.return)w=I,M=R;else{for(var F=!1,q=I.child;q;){if(q===w){F=!0,w=I,M=R;break}if(q===M){F=!0,M=I,w=R;break}q=q.sibling}if(!F){for(q=R.child;q;){if(q===w){F=!0,w=R,M=I;break}if(q===M){F=!0,M=R,w=I;break}q=q.sibling}if(!F)throw Error(t(189))}}if(w.alternate!==M)throw Error(t(190))}if(w.tag!==3)throw Error(t(188));return w.stateNode.current===w?p:g}function pM(p){return p=wV(p),p!==null?vM(p):null}function vM(p){if(p.tag===5||p.tag===6)return p;for(p=p.child;p!==null;){var g=vM(p);if(g!==null)return g;p=p.sibling}return null}var gM=e.unstable_scheduleCallback,yM=e.unstable_cancelCallback,TV=e.unstable_shouldYield,CV=e.unstable_requestPaint,qt=e.unstable_now,MV=e.unstable_getCurrentPriorityLevel,l0=e.unstable_ImmediatePriority,mM=e.unstable_UserBlockingPriority,ep=e.unstable_NormalPriority,kV=e.unstable_LowPriority,xM=e.unstable_IdlePriority,tp=null,La=null;function AV(p){if(La&&typeof La.onCommitFiberRoot=="function")try{La.onCommitFiberRoot(tp,p,void 0,(p.current.flags&128)===128)}catch{}}var ia=Math.clz32?Math.clz32:DV,LV=Math.log,IV=Math.LN2;function DV(p){return p>>>=0,p===0?32:31-(LV(p)/IV|0)|0}var rp=64,np=4194304;function Jc(p){switch(p&-p){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 p&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return p&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return p}}function ap(p,g){var w=p.pendingLanes;if(w===0)return 0;var M=0,I=p.suspendedLanes,R=p.pingedLanes,F=w&268435455;if(F!==0){var q=F&~I;q!==0?M=Jc(q):(R&=F,R!==0&&(M=Jc(R)))}else F=w&~I,F!==0?M=Jc(F):R!==0&&(M=Jc(R));if(M===0)return 0;if(g!==0&&g!==M&&(g&I)===0&&(I=M&-M,R=g&-g,I>=R||I===16&&(R&4194240)!==0))return g;if((M&4)!==0&&(M|=w&16),g=p.entangledLanes,g!==0)for(p=p.entanglements,g&=M;0<g;)w=31-ia(g),I=1<<w,M|=p[w],g&=~I;return M}function PV(p,g){switch(p){case 1:case 2:case 4:return g+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 g+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 RV(p,g){for(var w=p.suspendedLanes,M=p.pingedLanes,I=p.expirationTimes,R=p.pendingLanes;0<R;){var F=31-ia(R),q=1<<F,J=I[F];J===-1?((q&w)===0||(q&M)!==0)&&(I[F]=PV(q,g)):J<=g&&(p.expiredLanes|=q),R&=~q}}function u0(p){return p=p.pendingLanes&-1073741825,p!==0?p:p&1073741824?1073741824:0}function SM(){var p=rp;return rp<<=1,(rp&4194240)===0&&(rp=64),p}function c0(p){for(var g=[],w=0;31>w;w++)g.push(p);return g}function ef(p,g,w){p.pendingLanes|=g,g!==536870912&&(p.suspendedLanes=0,p.pingedLanes=0),p=p.eventTimes,g=31-ia(g),p[g]=w}function EV(p,g){var w=p.pendingLanes&~g;p.pendingLanes=g,p.suspendedLanes=0,p.pingedLanes=0,p.expiredLanes&=g,p.mutableReadLanes&=g,p.entangledLanes&=g,g=p.entanglements;var M=p.eventTimes;for(p=p.expirationTimes;0<w;){var I=31-ia(w),R=1<<I;g[I]=0,M[I]=-1,p[I]=-1,w&=~R}}function f0(p,g){var w=p.entangledLanes|=g;for(p=p.entanglements;w;){var M=31-ia(w),I=1<<M;I&g|p[M]&g&&(p[M]|=g),w&=~I}}var kt=0;function bM(p){return p&=-p,1<p?4<p?(p&268435455)!==0?16:536870912:4:1}var _M,d0,wM,TM,CM,h0=!1,ip=[],ao=null,io=null,oo=null,tf=new Map,rf=new Map,so=[],zV="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 MM(p,g){switch(p){case"focusin":case"focusout":ao=null;break;case"dragenter":case"dragleave":io=null;break;case"mouseover":case"mouseout":oo=null;break;case"pointerover":case"pointerout":tf.delete(g.pointerId);break;case"gotpointercapture":case"lostpointercapture":rf.delete(g.pointerId)}}function nf(p,g,w,M,I,R){return p===null||p.nativeEvent!==R?(p={blockedOn:g,domEventName:w,eventSystemFlags:M,nativeEvent:R,targetContainers:[I]},g!==null&&(g=mf(g),g!==null&&d0(g)),p):(p.eventSystemFlags|=M,g=p.targetContainers,I!==null&&g.indexOf(I)===-1&&g.push(I),p)}function OV(p,g,w,M,I){switch(g){case"focusin":return ao=nf(ao,p,g,w,M,I),!0;case"dragenter":return io=nf(io,p,g,w,M,I),!0;case"mouseover":return oo=nf(oo,p,g,w,M,I),!0;case"pointerover":var R=I.pointerId;return tf.set(R,nf(tf.get(R)||null,p,g,w,M,I)),!0;case"gotpointercapture":return R=I.pointerId,rf.set(R,nf(rf.get(R)||null,p,g,w,M,I)),!0}return!1}function kM(p){var g=ps(p.target);if(g!==null){var w=hs(g);if(w!==null){if(g=w.tag,g===13){if(g=dM(w),g!==null){p.blockedOn=g,CM(p.priority,function(){wM(w)});return}}else if(g===3&&w.stateNode.current.memoizedState.isDehydrated){p.blockedOn=w.tag===3?w.stateNode.containerInfo:null;return}}}p.blockedOn=null}function op(p){if(p.blockedOn!==null)return!1;for(var g=p.targetContainers;0<g.length;){var w=v0(p.domEventName,p.eventSystemFlags,g[0],p.nativeEvent);if(w===null){w=p.nativeEvent;var M=new w.constructor(w.type,w);r0=M,w.target.dispatchEvent(M),r0=null}else return g=mf(w),g!==null&&d0(g),p.blockedOn=w,!1;g.shift()}return!0}function AM(p,g,w){op(p)&&w.delete(g)}function NV(){h0=!1,ao!==null&&op(ao)&&(ao=null),io!==null&&op(io)&&(io=null),oo!==null&&op(oo)&&(oo=null),tf.forEach(AM),rf.forEach(AM)}function af(p,g){p.blockedOn===g&&(p.blockedOn=null,h0||(h0=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,NV)))}function of(p){function g(I){return af(I,p)}if(0<ip.length){af(ip[0],p);for(var w=1;w<ip.length;w++){var M=ip[w];M.blockedOn===p&&(M.blockedOn=null)}}for(ao!==null&&af(ao,p),io!==null&&af(io,p),oo!==null&&af(oo,p),tf.forEach(g),rf.forEach(g),w=0;w<so.length;w++)M=so[w],M.blockedOn===p&&(M.blockedOn=null);for(;0<so.length&&(w=so[0],w.blockedOn===null);)kM(w),w.blockedOn===null&&so.shift()}var Hl=C.ReactCurrentBatchConfig,sp=!0;function jV(p,g,w,M){var I=kt,R=Hl.transition;Hl.transition=null;try{kt=1,p0(p,g,w,M)}finally{kt=I,Hl.transition=R}}function BV(p,g,w,M){var I=kt,R=Hl.transition;Hl.transition=null;try{kt=4,p0(p,g,w,M)}finally{kt=I,Hl.transition=R}}function p0(p,g,w,M){if(sp){var I=v0(p,g,w,M);if(I===null)P0(p,g,M,lp,w),MM(p,M);else if(OV(I,p,g,w,M))M.stopPropagation();else if(MM(p,M),g&4&&-1<zV.indexOf(p)){for(;I!==null;){var R=mf(I);if(R!==null&&_M(R),R=v0(p,g,w,M),R===null&&P0(p,g,M,lp,w),R===I)break;I=R}I!==null&&M.stopPropagation()}else P0(p,g,M,null,w)}}var lp=null;function v0(p,g,w,M){if(lp=null,p=n0(M),p=ps(p),p!==null)if(g=hs(p),g===null)p=null;else if(w=g.tag,w===13){if(p=dM(g),p!==null)return p;p=null}else if(w===3){if(g.stateNode.current.memoizedState.isDehydrated)return g.tag===3?g.stateNode.containerInfo:null;p=null}else g!==p&&(p=null);return lp=p,null}function LM(p){switch(p){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(MV()){case l0:return 1;case mM:return 4;case ep:case kV:return 16;case xM:return 536870912;default:return 16}default:return 16}}var lo=null,g0=null,up=null;function IM(){if(up)return up;var p,g=g0,w=g.length,M,I="value"in lo?lo.value:lo.textContent,R=I.length;for(p=0;p<w&&g[p]===I[p];p++);var F=w-p;for(M=1;M<=F&&g[w-M]===I[R-M];M++);return up=I.slice(p,1<M?1-M:void 0)}function cp(p){var g=p.keyCode;return"charCode"in p?(p=p.charCode,p===0&&g===13&&(p=13)):p=g,p===10&&(p=13),32<=p||p===13?p:0}function fp(){return!0}function DM(){return!1}function yn(p){function g(w,M,I,R,F){this._reactName=w,this._targetInst=I,this.type=M,this.nativeEvent=R,this.target=F,this.currentTarget=null;for(var q in p)p.hasOwnProperty(q)&&(w=p[q],this[q]=w?w(R):R[q]);return this.isDefaultPrevented=(R.defaultPrevented!=null?R.defaultPrevented:R.returnValue===!1)?fp:DM,this.isPropagationStopped=DM,this}return K(g.prototype,{preventDefault:function(){this.defaultPrevented=!0;var w=this.nativeEvent;w&&(w.preventDefault?w.preventDefault():typeof w.returnValue!="unknown"&&(w.returnValue=!1),this.isDefaultPrevented=fp)},stopPropagation:function(){var w=this.nativeEvent;w&&(w.stopPropagation?w.stopPropagation():typeof w.cancelBubble!="unknown"&&(w.cancelBubble=!0),this.isPropagationStopped=fp)},persist:function(){},isPersistent:fp}),g}var Ul={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(p){return p.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},y0=yn(Ul),sf=K({},Ul,{view:0,detail:0}),FV=yn(sf),m0,x0,lf,dp=K({},sf,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:b0,button:0,buttons:0,relatedTarget:function(p){return p.relatedTarget===void 0?p.fromElement===p.srcElement?p.toElement:p.fromElement:p.relatedTarget},movementX:function(p){return"movementX"in p?p.movementX:(p!==lf&&(lf&&p.type==="mousemove"?(m0=p.screenX-lf.screenX,x0=p.screenY-lf.screenY):x0=m0=0,lf=p),m0)},movementY:function(p){return"movementY"in p?p.movementY:x0}}),PM=yn(dp),VV=K({},dp,{dataTransfer:0}),GV=yn(VV),WV=K({},sf,{relatedTarget:0}),S0=yn(WV),$V=K({},Ul,{animationName:0,elapsedTime:0,pseudoElement:0}),HV=yn($V),UV=K({},Ul,{clipboardData:function(p){return"clipboardData"in p?p.clipboardData:window.clipboardData}}),YV=yn(UV),XV=K({},Ul,{data:0}),RM=yn(XV),ZV={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},KV={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"},qV={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function QV(p){var g=this.nativeEvent;return g.getModifierState?g.getModifierState(p):(p=qV[p])?!!g[p]:!1}function b0(){return QV}var JV=K({},sf,{key:function(p){if(p.key){var g=ZV[p.key]||p.key;if(g!=="Unidentified")return g}return p.type==="keypress"?(p=cp(p),p===13?"Enter":String.fromCharCode(p)):p.type==="keydown"||p.type==="keyup"?KV[p.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:b0,charCode:function(p){return p.type==="keypress"?cp(p):0},keyCode:function(p){return p.type==="keydown"||p.type==="keyup"?p.keyCode:0},which:function(p){return p.type==="keypress"?cp(p):p.type==="keydown"||p.type==="keyup"?p.keyCode:0}}),e8=yn(JV),t8=K({},dp,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),EM=yn(t8),r8=K({},sf,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:b0}),n8=yn(r8),a8=K({},Ul,{propertyName:0,elapsedTime:0,pseudoElement:0}),i8=yn(a8),o8=K({},dp,{deltaX:function(p){return"deltaX"in p?p.deltaX:"wheelDeltaX"in p?-p.wheelDeltaX:0},deltaY:function(p){return"deltaY"in p?p.deltaY:"wheelDeltaY"in p?-p.wheelDeltaY:"wheelDelta"in p?-p.wheelDelta:0},deltaZ:0,deltaMode:0}),s8=yn(o8),l8=[9,13,27,32],_0=s&&"CompositionEvent"in window,uf=null;s&&"documentMode"in document&&(uf=document.documentMode);var u8=s&&"TextEvent"in window&&!uf,zM=s&&(!_0||uf&&8<uf&&11>=uf),OM=" ",NM=!1;function jM(p,g){switch(p){case"keyup":return l8.indexOf(g.keyCode)!==-1;case"keydown":return g.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function BM(p){return p=p.detail,typeof p=="object"&&"data"in p?p.data:null}var Yl=!1;function c8(p,g){switch(p){case"compositionend":return BM(g);case"keypress":return g.which!==32?null:(NM=!0,OM);case"textInput":return p=g.data,p===OM&&NM?null:p;default:return null}}function f8(p,g){if(Yl)return p==="compositionend"||!_0&&jM(p,g)?(p=IM(),up=g0=lo=null,Yl=!1,p):null;switch(p){case"paste":return null;case"keypress":if(!(g.ctrlKey||g.altKey||g.metaKey)||g.ctrlKey&&g.altKey){if(g.char&&1<g.char.length)return g.char;if(g.which)return String.fromCharCode(g.which)}return null;case"compositionend":return zM&&g.locale!=="ko"?null:g.data;default:return null}}var d8={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 FM(p){var g=p&&p.nodeName&&p.nodeName.toLowerCase();return g==="input"?!!d8[p.type]:g==="textarea"}function VM(p,g,w,M){sM(M),g=yp(g,"onChange"),0<g.length&&(w=new y0("onChange","change",null,w,M),p.push({event:w,listeners:g}))}var cf=null,ff=null;function h8(p){ik(p,0)}function hp(p){var g=Ql(p);if(Ie(g))return p}function p8(p,g){if(p==="change")return g}var GM=!1;if(s){var w0;if(s){var T0="oninput"in document;if(!T0){var WM=document.createElement("div");WM.setAttribute("oninput","return;"),T0=typeof WM.oninput=="function"}w0=T0}else w0=!1;GM=w0&&(!document.documentMode||9<document.documentMode)}function $M(){cf&&(cf.detachEvent("onpropertychange",HM),ff=cf=null)}function HM(p){if(p.propertyName==="value"&&hp(ff)){var g=[];VM(g,ff,p,n0(p)),fM(h8,g)}}function v8(p,g,w){p==="focusin"?($M(),cf=g,ff=w,cf.attachEvent("onpropertychange",HM)):p==="focusout"&&$M()}function g8(p){if(p==="selectionchange"||p==="keyup"||p==="keydown")return hp(ff)}function y8(p,g){if(p==="click")return hp(g)}function m8(p,g){if(p==="input"||p==="change")return hp(g)}function x8(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}var oa=typeof Object.is=="function"?Object.is:x8;function df(p,g){if(oa(p,g))return!0;if(typeof p!="object"||p===null||typeof g!="object"||g===null)return!1;var w=Object.keys(p),M=Object.keys(g);if(w.length!==M.length)return!1;for(M=0;M<w.length;M++){var I=w[M];if(!l.call(g,I)||!oa(p[I],g[I]))return!1}return!0}function UM(p){for(;p&&p.firstChild;)p=p.firstChild;return p}function YM(p,g){var w=UM(p);p=0;for(var M;w;){if(w.nodeType===3){if(M=p+w.textContent.length,p<=g&&M>=g)return{node:w,offset:g-p};p=M}e:{for(;w;){if(w.nextSibling){w=w.nextSibling;break e}w=w.parentNode}w=void 0}w=UM(w)}}function XM(p,g){return p&&g?p===g?!0:p&&p.nodeType===3?!1:g&&g.nodeType===3?XM(p,g.parentNode):"contains"in p?p.contains(g):p.compareDocumentPosition?!!(p.compareDocumentPosition(g)&16):!1:!1}function ZM(){for(var p=window,g=dt();g instanceof p.HTMLIFrameElement;){try{var w=typeof g.contentWindow.location.href=="string"}catch{w=!1}if(w)p=g.contentWindow;else break;g=dt(p.document)}return g}function C0(p){var g=p&&p.nodeName&&p.nodeName.toLowerCase();return g&&(g==="input"&&(p.type==="text"||p.type==="search"||p.type==="tel"||p.type==="url"||p.type==="password")||g==="textarea"||p.contentEditable==="true")}function S8(p){var g=ZM(),w=p.focusedElem,M=p.selectionRange;if(g!==w&&w&&w.ownerDocument&&XM(w.ownerDocument.documentElement,w)){if(M!==null&&C0(w)){if(g=M.start,p=M.end,p===void 0&&(p=g),"selectionStart"in w)w.selectionStart=g,w.selectionEnd=Math.min(p,w.value.length);else if(p=(g=w.ownerDocument||document)&&g.defaultView||window,p.getSelection){p=p.getSelection();var I=w.textContent.length,R=Math.min(M.start,I);M=M.end===void 0?R:Math.min(M.end,I),!p.extend&&R>M&&(I=M,M=R,R=I),I=YM(w,R);var F=YM(w,M);I&&F&&(p.rangeCount!==1||p.anchorNode!==I.node||p.anchorOffset!==I.offset||p.focusNode!==F.node||p.focusOffset!==F.offset)&&(g=g.createRange(),g.setStart(I.node,I.offset),p.removeAllRanges(),R>M?(p.addRange(g),p.extend(F.node,F.offset)):(g.setEnd(F.node,F.offset),p.addRange(g)))}}for(g=[],p=w;p=p.parentNode;)p.nodeType===1&&g.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<g.length;w++)p=g[w],p.element.scrollLeft=p.left,p.element.scrollTop=p.top}}var b8=s&&"documentMode"in document&&11>=document.documentMode,Xl=null,M0=null,hf=null,k0=!1;function KM(p,g,w){var M=w.window===w?w.document:w.nodeType===9?w:w.ownerDocument;k0||Xl==null||Xl!==dt(M)||(M=Xl,"selectionStart"in M&&C0(M)?M={start:M.selectionStart,end:M.selectionEnd}:(M=(M.ownerDocument&&M.ownerDocument.defaultView||window).getSelection(),M={anchorNode:M.anchorNode,anchorOffset:M.anchorOffset,focusNode:M.focusNode,focusOffset:M.focusOffset}),hf&&df(hf,M)||(hf=M,M=yp(M0,"onSelect"),0<M.length&&(g=new y0("onSelect","select",null,g,w),p.push({event:g,listeners:M}),g.target=Xl)))}function pp(p,g){var w={};return w[p.toLowerCase()]=g.toLowerCase(),w["Webkit"+p]="webkit"+g,w["Moz"+p]="moz"+g,w}var Zl={animationend:pp("Animation","AnimationEnd"),animationiteration:pp("Animation","AnimationIteration"),animationstart:pp("Animation","AnimationStart"),transitionend:pp("Transition","TransitionEnd")},A0={},qM={};s&&(qM=document.createElement("div").style,"AnimationEvent"in window||(delete Zl.animationend.animation,delete Zl.animationiteration.animation,delete Zl.animationstart.animation),"TransitionEvent"in window||delete Zl.transitionend.transition);function vp(p){if(A0[p])return A0[p];if(!Zl[p])return p;var g=Zl[p],w;for(w in g)if(g.hasOwnProperty(w)&&w in qM)return A0[p]=g[w];return p}var QM=vp("animationend"),JM=vp("animationiteration"),ek=vp("animationstart"),tk=vp("transitionend"),rk=new Map,nk="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 uo(p,g){rk.set(p,g),i(g,[p])}for(var L0=0;L0<nk.length;L0++){var I0=nk[L0],_8=I0.toLowerCase(),w8=I0[0].toUpperCase()+I0.slice(1);uo(_8,"on"+w8)}uo(QM,"onAnimationEnd"),uo(JM,"onAnimationIteration"),uo(ek,"onAnimationStart"),uo("dblclick","onDoubleClick"),uo("focusin","onFocus"),uo("focusout","onBlur"),uo(tk,"onTransitionEnd"),o("onMouseEnter",["mouseout","mouseover"]),o("onMouseLeave",["mouseout","mouseover"]),o("onPointerEnter",["pointerout","pointerover"]),o("onPointerLeave",["pointerout","pointerover"]),i("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),i("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),i("onBeforeInput",["compositionend","keypress","textInput","paste"]),i("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),i("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),i("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var pf="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(" "),T8=new Set("cancel close invalid load scroll toggle".split(" ").concat(pf));function ak(p,g,w){var M=p.type||"unknown-event";p.currentTarget=w,_V(M,g,void 0,p),p.currentTarget=null}function ik(p,g){g=(g&4)!==0;for(var w=0;w<p.length;w++){var M=p[w],I=M.event;M=M.listeners;e:{var R=void 0;if(g)for(var F=M.length-1;0<=F;F--){var q=M[F],J=q.instance,se=q.currentTarget;if(q=q.listener,J!==R&&I.isPropagationStopped())break e;ak(I,q,se),R=J}else for(F=0;F<M.length;F++){if(q=M[F],J=q.instance,se=q.currentTarget,q=q.listener,J!==R&&I.isPropagationStopped())break e;ak(I,q,se),R=J}}}if(Jh)throw p=s0,Jh=!1,s0=null,p}function zt(p,g){var w=g[j0];w===void 0&&(w=g[j0]=new Set);var M=p+"__bubble";w.has(M)||(ok(g,p,2,!1),w.add(M))}function D0(p,g,w){var M=0;g&&(M|=4),ok(w,p,M,g)}var gp="_reactListening"+Math.random().toString(36).slice(2);function vf(p){if(!p[gp]){p[gp]=!0,n.forEach(function(w){w!=="selectionchange"&&(T8.has(w)||D0(w,!1,p),D0(w,!0,p))});var g=p.nodeType===9?p:p.ownerDocument;g===null||g[gp]||(g[gp]=!0,D0("selectionchange",!1,g))}}function ok(p,g,w,M){switch(LM(g)){case 1:var I=jV;break;case 4:I=BV;break;default:I=p0}w=I.bind(null,g,w,p),I=void 0,!o0||g!=="touchstart"&&g!=="touchmove"&&g!=="wheel"||(I=!0),M?I!==void 0?p.addEventListener(g,w,{capture:!0,passive:I}):p.addEventListener(g,w,!0):I!==void 0?p.addEventListener(g,w,{passive:I}):p.addEventListener(g,w,!1)}function P0(p,g,w,M,I){var R=M;if((g&1)===0&&(g&2)===0&&M!==null)e:for(;;){if(M===null)return;var F=M.tag;if(F===3||F===4){var q=M.stateNode.containerInfo;if(q===I||q.nodeType===8&&q.parentNode===I)break;if(F===4)for(F=M.return;F!==null;){var J=F.tag;if((J===3||J===4)&&(J=F.stateNode.containerInfo,J===I||J.nodeType===8&&J.parentNode===I))return;F=F.return}for(;q!==null;){if(F=ps(q),F===null)return;if(J=F.tag,J===5||J===6){M=R=F;continue e}q=q.parentNode}}M=M.return}fM(function(){var se=R,ge=n0(w),me=[];e:{var de=rk.get(p);if(de!==void 0){var Oe=y0,Fe=p;switch(p){case"keypress":if(cp(w)===0)break e;case"keydown":case"keyup":Oe=e8;break;case"focusin":Fe="focus",Oe=S0;break;case"focusout":Fe="blur",Oe=S0;break;case"beforeblur":case"afterblur":Oe=S0;break;case"click":if(w.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Oe=PM;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Oe=GV;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Oe=n8;break;case QM:case JM:case ek:Oe=HV;break;case tk:Oe=i8;break;case"scroll":Oe=FV;break;case"wheel":Oe=s8;break;case"copy":case"cut":case"paste":Oe=YV;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Oe=EM}var Ve=(g&4)!==0,Qt=!Ve&&p==="scroll",ne=Ve?de!==null?de+"Capture":null:de;Ve=[];for(var te=se,oe;te!==null;){oe=te;var be=oe.stateNode;if(oe.tag===5&&be!==null&&(oe=be,ne!==null&&(be=Kc(te,ne),be!=null&&Ve.push(gf(te,be,oe)))),Qt)break;te=te.return}0<Ve.length&&(de=new Oe(de,Fe,null,w,ge),me.push({event:de,listeners:Ve}))}}if((g&7)===0){e:{if(de=p==="mouseover"||p==="pointerover",Oe=p==="mouseout"||p==="pointerout",de&&w!==r0&&(Fe=w.relatedTarget||w.fromElement)&&(ps(Fe)||Fe[hi]))break e;if((Oe||de)&&(de=ge.window===ge?ge:(de=ge.ownerDocument)?de.defaultView||de.parentWindow:window,Oe?(Fe=w.relatedTarget||w.toElement,Oe=se,Fe=Fe?ps(Fe):null,Fe!==null&&(Qt=hs(Fe),Fe!==Qt||Fe.tag!==5&&Fe.tag!==6)&&(Fe=null)):(Oe=null,Fe=se),Oe!==Fe)){if(Ve=PM,be="onMouseLeave",ne="onMouseEnter",te="mouse",(p==="pointerout"||p==="pointerover")&&(Ve=EM,be="onPointerLeave",ne="onPointerEnter",te="pointer"),Qt=Oe==null?de:Ql(Oe),oe=Fe==null?de:Ql(Fe),de=new Ve(be,te+"leave",Oe,w,ge),de.target=Qt,de.relatedTarget=oe,be=null,ps(ge)===se&&(Ve=new Ve(ne,te+"enter",Fe,w,ge),Ve.target=oe,Ve.relatedTarget=Qt,be=Ve),Qt=be,Oe&&Fe)t:{for(Ve=Oe,ne=Fe,te=0,oe=Ve;oe;oe=Kl(oe))te++;for(oe=0,be=ne;be;be=Kl(be))oe++;for(;0<te-oe;)Ve=Kl(Ve),te--;for(;0<oe-te;)ne=Kl(ne),oe--;for(;te--;){if(Ve===ne||ne!==null&&Ve===ne.alternate)break t;Ve=Kl(Ve),ne=Kl(ne)}Ve=null}else Ve=null;Oe!==null&&sk(me,de,Oe,Ve,!1),Fe!==null&&Qt!==null&&sk(me,Qt,Fe,Ve,!0)}}e:{if(de=se?Ql(se):window,Oe=de.nodeName&&de.nodeName.toLowerCase(),Oe==="select"||Oe==="input"&&de.type==="file")var We=p8;else if(FM(de))if(GM)We=m8;else{We=g8;var Ke=v8}else(Oe=de.nodeName)&&Oe.toLowerCase()==="input"&&(de.type==="checkbox"||de.type==="radio")&&(We=y8);if(We&&(We=We(p,se))){VM(me,We,w,ge);break e}Ke&&Ke(p,de,se),p==="focusout"&&(Ke=de._wrapperState)&&Ke.controlled&&de.type==="number"&&yr(de,"number",de.value)}switch(Ke=se?Ql(se):window,p){case"focusin":(FM(Ke)||Ke.contentEditable==="true")&&(Xl=Ke,M0=se,hf=null);break;case"focusout":hf=M0=Xl=null;break;case"mousedown":k0=!0;break;case"contextmenu":case"mouseup":case"dragend":k0=!1,KM(me,w,ge);break;case"selectionchange":if(b8)break;case"keydown":case"keyup":KM(me,w,ge)}var qe;if(_0)e:{switch(p){case"compositionstart":var it="onCompositionStart";break e;case"compositionend":it="onCompositionEnd";break e;case"compositionupdate":it="onCompositionUpdate";break e}it=void 0}else Yl?jM(p,w)&&(it="onCompositionEnd"):p==="keydown"&&w.keyCode===229&&(it="onCompositionStart");it&&(zM&&w.locale!=="ko"&&(Yl||it!=="onCompositionStart"?it==="onCompositionEnd"&&Yl&&(qe=IM()):(lo=ge,g0="value"in lo?lo.value:lo.textContent,Yl=!0)),Ke=yp(se,it),0<Ke.length&&(it=new RM(it,p,null,w,ge),me.push({event:it,listeners:Ke}),qe?it.data=qe:(qe=BM(w),qe!==null&&(it.data=qe)))),(qe=u8?c8(p,w):f8(p,w))&&(se=yp(se,"onBeforeInput"),0<se.length&&(ge=new RM("onBeforeInput","beforeinput",null,w,ge),me.push({event:ge,listeners:se}),ge.data=qe))}ik(me,g)})}function gf(p,g,w){return{instance:p,listener:g,currentTarget:w}}function yp(p,g){for(var w=g+"Capture",M=[];p!==null;){var I=p,R=I.stateNode;I.tag===5&&R!==null&&(I=R,R=Kc(p,w),R!=null&&M.unshift(gf(p,R,I)),R=Kc(p,g),R!=null&&M.push(gf(p,R,I))),p=p.return}return M}function Kl(p){if(p===null)return null;do p=p.return;while(p&&p.tag!==5);return p||null}function sk(p,g,w,M,I){for(var R=g._reactName,F=[];w!==null&&w!==M;){var q=w,J=q.alternate,se=q.stateNode;if(J!==null&&J===M)break;q.tag===5&&se!==null&&(q=se,I?(J=Kc(w,R),J!=null&&F.unshift(gf(w,J,q))):I||(J=Kc(w,R),J!=null&&F.push(gf(w,J,q)))),w=w.return}F.length!==0&&p.push({event:g,listeners:F})}var C8=/\r\n?/g,M8=/\u0000|\uFFFD/g;function lk(p){return(typeof p=="string"?p:""+p).replace(C8,`
|
|
6
|
+
`).replace(M8,"")}function mp(p,g,w){if(g=lk(g),lk(p)!==g&&w)throw Error(t(425))}function xp(){}var R0=null,E0=null;function z0(p,g){return p==="textarea"||p==="noscript"||typeof g.children=="string"||typeof g.children=="number"||typeof g.dangerouslySetInnerHTML=="object"&&g.dangerouslySetInnerHTML!==null&&g.dangerouslySetInnerHTML.__html!=null}var O0=typeof setTimeout=="function"?setTimeout:void 0,k8=typeof clearTimeout=="function"?clearTimeout:void 0,uk=typeof Promise=="function"?Promise:void 0,A8=typeof queueMicrotask=="function"?queueMicrotask:typeof uk<"u"?function(p){return uk.resolve(null).then(p).catch(L8)}:O0;function L8(p){setTimeout(function(){throw p})}function N0(p,g){var w=g,M=0;do{var I=w.nextSibling;if(p.removeChild(w),I&&I.nodeType===8)if(w=I.data,w==="/$"){if(M===0){p.removeChild(I),of(g);return}M--}else w!=="$"&&w!=="$?"&&w!=="$!"||M++;w=I}while(w);of(g)}function co(p){for(;p!=null;p=p.nextSibling){var g=p.nodeType;if(g===1||g===3)break;if(g===8){if(g=p.data,g==="$"||g==="$!"||g==="$?")break;if(g==="/$")return null}}return p}function ck(p){p=p.previousSibling;for(var g=0;p;){if(p.nodeType===8){var w=p.data;if(w==="$"||w==="$!"||w==="$?"){if(g===0)return p;g--}else w==="/$"&&g++}p=p.previousSibling}return null}var ql=Math.random().toString(36).slice(2),Ia="__reactFiber$"+ql,yf="__reactProps$"+ql,hi="__reactContainer$"+ql,j0="__reactEvents$"+ql,I8="__reactListeners$"+ql,D8="__reactHandles$"+ql;function ps(p){var g=p[Ia];if(g)return g;for(var w=p.parentNode;w;){if(g=w[hi]||w[Ia]){if(w=g.alternate,g.child!==null||w!==null&&w.child!==null)for(p=ck(p);p!==null;){if(w=p[Ia])return w;p=ck(p)}return g}p=w,w=p.parentNode}return null}function mf(p){return p=p[Ia]||p[hi],!p||p.tag!==5&&p.tag!==6&&p.tag!==13&&p.tag!==3?null:p}function Ql(p){if(p.tag===5||p.tag===6)return p.stateNode;throw Error(t(33))}function Sp(p){return p[yf]||null}var B0=[],Jl=-1;function fo(p){return{current:p}}function Ot(p){0>Jl||(p.current=B0[Jl],B0[Jl]=null,Jl--)}function Rt(p,g){Jl++,B0[Jl]=p.current,p.current=g}var ho={},Nr=fo(ho),rn=fo(!1),vs=ho;function eu(p,g){var w=p.type.contextTypes;if(!w)return ho;var M=p.stateNode;if(M&&M.__reactInternalMemoizedUnmaskedChildContext===g)return M.__reactInternalMemoizedMaskedChildContext;var I={},R;for(R in w)I[R]=g[R];return M&&(p=p.stateNode,p.__reactInternalMemoizedUnmaskedChildContext=g,p.__reactInternalMemoizedMaskedChildContext=I),I}function nn(p){return p=p.childContextTypes,p!=null}function bp(){Ot(rn),Ot(Nr)}function fk(p,g,w){if(Nr.current!==ho)throw Error(t(168));Rt(Nr,g),Rt(rn,w)}function dk(p,g,w){var M=p.stateNode;if(g=g.childContextTypes,typeof M.getChildContext!="function")return w;M=M.getChildContext();for(var I in M)if(!(I in g))throw Error(t(108,Ne(p)||"Unknown",I));return K({},w,M)}function _p(p){return p=(p=p.stateNode)&&p.__reactInternalMemoizedMergedChildContext||ho,vs=Nr.current,Rt(Nr,p),Rt(rn,rn.current),!0}function hk(p,g,w){var M=p.stateNode;if(!M)throw Error(t(169));w?(p=dk(p,g,vs),M.__reactInternalMemoizedMergedChildContext=p,Ot(rn),Ot(Nr),Rt(Nr,p)):Ot(rn),Rt(rn,w)}var pi=null,wp=!1,F0=!1;function pk(p){pi===null?pi=[p]:pi.push(p)}function P8(p){wp=!0,pk(p)}function po(){if(!F0&&pi!==null){F0=!0;var p=0,g=kt;try{var w=pi;for(kt=1;p<w.length;p++){var M=w[p];do M=M(!0);while(M!==null)}pi=null,wp=!1}catch(I){throw pi!==null&&(pi=pi.slice(p+1)),gM(l0,po),I}finally{kt=g,F0=!1}}return null}var tu=[],ru=0,Tp=null,Cp=0,Rn=[],En=0,gs=null,vi=1,gi="";function ys(p,g){tu[ru++]=Cp,tu[ru++]=Tp,Tp=p,Cp=g}function vk(p,g,w){Rn[En++]=vi,Rn[En++]=gi,Rn[En++]=gs,gs=p;var M=vi;p=gi;var I=32-ia(M)-1;M&=~(1<<I),w+=1;var R=32-ia(g)+I;if(30<R){var F=I-I%5;R=(M&(1<<F)-1).toString(32),M>>=F,I-=F,vi=1<<32-ia(g)+I|w<<I|M,gi=R+p}else vi=1<<R|w<<I|M,gi=p}function V0(p){p.return!==null&&(ys(p,1),vk(p,1,0))}function G0(p){for(;p===Tp;)Tp=tu[--ru],tu[ru]=null,Cp=tu[--ru],tu[ru]=null;for(;p===gs;)gs=Rn[--En],Rn[En]=null,gi=Rn[--En],Rn[En]=null,vi=Rn[--En],Rn[En]=null}var mn=null,xn=null,Nt=!1,sa=null;function gk(p,g){var w=jn(5,null,null,0);w.elementType="DELETED",w.stateNode=g,w.return=p,g=p.deletions,g===null?(p.deletions=[w],p.flags|=16):g.push(w)}function yk(p,g){switch(p.tag){case 5:var w=p.type;return g=g.nodeType!==1||w.toLowerCase()!==g.nodeName.toLowerCase()?null:g,g!==null?(p.stateNode=g,mn=p,xn=co(g.firstChild),!0):!1;case 6:return g=p.pendingProps===""||g.nodeType!==3?null:g,g!==null?(p.stateNode=g,mn=p,xn=null,!0):!1;case 13:return g=g.nodeType!==8?null:g,g!==null?(w=gs!==null?{id:vi,overflow:gi}:null,p.memoizedState={dehydrated:g,treeContext:w,retryLane:1073741824},w=jn(18,null,null,0),w.stateNode=g,w.return=p,p.child=w,mn=p,xn=null,!0):!1;default:return!1}}function W0(p){return(p.mode&1)!==0&&(p.flags&128)===0}function $0(p){if(Nt){var g=xn;if(g){var w=g;if(!yk(p,g)){if(W0(p))throw Error(t(418));g=co(w.nextSibling);var M=mn;g&&yk(p,g)?gk(M,w):(p.flags=p.flags&-4097|2,Nt=!1,mn=p)}}else{if(W0(p))throw Error(t(418));p.flags=p.flags&-4097|2,Nt=!1,mn=p}}}function mk(p){for(p=p.return;p!==null&&p.tag!==5&&p.tag!==3&&p.tag!==13;)p=p.return;mn=p}function Mp(p){if(p!==mn)return!1;if(!Nt)return mk(p),Nt=!0,!1;var g;if((g=p.tag!==3)&&!(g=p.tag!==5)&&(g=p.type,g=g!=="head"&&g!=="body"&&!z0(p.type,p.memoizedProps)),g&&(g=xn)){if(W0(p))throw xk(),Error(t(418));for(;g;)gk(p,g),g=co(g.nextSibling)}if(mk(p),p.tag===13){if(p=p.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(t(317));e:{for(p=p.nextSibling,g=0;p;){if(p.nodeType===8){var w=p.data;if(w==="/$"){if(g===0){xn=co(p.nextSibling);break e}g--}else w!=="$"&&w!=="$!"&&w!=="$?"||g++}p=p.nextSibling}xn=null}}else xn=mn?co(p.stateNode.nextSibling):null;return!0}function xk(){for(var p=xn;p;)p=co(p.nextSibling)}function nu(){xn=mn=null,Nt=!1}function H0(p){sa===null?sa=[p]:sa.push(p)}var R8=C.ReactCurrentBatchConfig;function xf(p,g,w){if(p=w.ref,p!==null&&typeof p!="function"&&typeof p!="object"){if(w._owner){if(w=w._owner,w){if(w.tag!==1)throw Error(t(309));var M=w.stateNode}if(!M)throw Error(t(147,p));var I=M,R=""+p;return g!==null&&g.ref!==null&&typeof g.ref=="function"&&g.ref._stringRef===R?g.ref:(g=function(F){var q=I.refs;F===null?delete q[R]:q[R]=F},g._stringRef=R,g)}if(typeof p!="string")throw Error(t(284));if(!w._owner)throw Error(t(290,p))}return p}function kp(p,g){throw p=Object.prototype.toString.call(g),Error(t(31,p==="[object Object]"?"object with keys {"+Object.keys(g).join(", ")+"}":p))}function Sk(p){var g=p._init;return g(p._payload)}function bk(p){function g(ne,te){if(p){var oe=ne.deletions;oe===null?(ne.deletions=[te],ne.flags|=16):oe.push(te)}}function w(ne,te){if(!p)return null;for(;te!==null;)g(ne,te),te=te.sibling;return null}function M(ne,te){for(ne=new Map;te!==null;)te.key!==null?ne.set(te.key,te):ne.set(te.index,te),te=te.sibling;return ne}function I(ne,te){return ne=_o(ne,te),ne.index=0,ne.sibling=null,ne}function R(ne,te,oe){return ne.index=oe,p?(oe=ne.alternate,oe!==null?(oe=oe.index,oe<te?(ne.flags|=2,te):oe):(ne.flags|=2,te)):(ne.flags|=1048576,te)}function F(ne){return p&&ne.alternate===null&&(ne.flags|=2),ne}function q(ne,te,oe,be){return te===null||te.tag!==6?(te=Nx(oe,ne.mode,be),te.return=ne,te):(te=I(te,oe),te.return=ne,te)}function J(ne,te,oe,be){var We=oe.type;return We===L?ge(ne,te,oe.props.children,be,oe.key):te!==null&&(te.elementType===We||typeof We=="object"&&We!==null&&We.$$typeof===$&&Sk(We)===te.type)?(be=I(te,oe.props),be.ref=xf(ne,te,oe),be.return=ne,be):(be=qp(oe.type,oe.key,oe.props,null,ne.mode,be),be.ref=xf(ne,te,oe),be.return=ne,be)}function se(ne,te,oe,be){return te===null||te.tag!==4||te.stateNode.containerInfo!==oe.containerInfo||te.stateNode.implementation!==oe.implementation?(te=jx(oe,ne.mode,be),te.return=ne,te):(te=I(te,oe.children||[]),te.return=ne,te)}function ge(ne,te,oe,be,We){return te===null||te.tag!==7?(te=Cs(oe,ne.mode,be,We),te.return=ne,te):(te=I(te,oe),te.return=ne,te)}function me(ne,te,oe){if(typeof te=="string"&&te!==""||typeof te=="number")return te=Nx(""+te,ne.mode,oe),te.return=ne,te;if(typeof te=="object"&&te!==null){switch(te.$$typeof){case k:return oe=qp(te.type,te.key,te.props,null,ne.mode,oe),oe.ref=xf(ne,null,te),oe.return=ne,oe;case A:return te=jx(te,ne.mode,oe),te.return=ne,te;case $:var be=te._init;return me(ne,be(te._payload),oe)}if(vn(te)||X(te))return te=Cs(te,ne.mode,oe,null),te.return=ne,te;kp(ne,te)}return null}function de(ne,te,oe,be){var We=te!==null?te.key:null;if(typeof oe=="string"&&oe!==""||typeof oe=="number")return We!==null?null:q(ne,te,""+oe,be);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case k:return oe.key===We?J(ne,te,oe,be):null;case A:return oe.key===We?se(ne,te,oe,be):null;case $:return We=oe._init,de(ne,te,We(oe._payload),be)}if(vn(oe)||X(oe))return We!==null?null:ge(ne,te,oe,be,null);kp(ne,oe)}return null}function Oe(ne,te,oe,be,We){if(typeof be=="string"&&be!==""||typeof be=="number")return ne=ne.get(oe)||null,q(te,ne,""+be,We);if(typeof be=="object"&&be!==null){switch(be.$$typeof){case k:return ne=ne.get(be.key===null?oe:be.key)||null,J(te,ne,be,We);case A:return ne=ne.get(be.key===null?oe:be.key)||null,se(te,ne,be,We);case $:var Ke=be._init;return Oe(ne,te,oe,Ke(be._payload),We)}if(vn(be)||X(be))return ne=ne.get(oe)||null,ge(te,ne,be,We,null);kp(te,be)}return null}function Fe(ne,te,oe,be){for(var We=null,Ke=null,qe=te,it=te=0,Sr=null;qe!==null&&it<oe.length;it++){qe.index>it?(Sr=qe,qe=null):Sr=qe.sibling;var bt=de(ne,qe,oe[it],be);if(bt===null){qe===null&&(qe=Sr);break}p&&qe&&bt.alternate===null&&g(ne,qe),te=R(bt,te,it),Ke===null?We=bt:Ke.sibling=bt,Ke=bt,qe=Sr}if(it===oe.length)return w(ne,qe),Nt&&ys(ne,it),We;if(qe===null){for(;it<oe.length;it++)qe=me(ne,oe[it],be),qe!==null&&(te=R(qe,te,it),Ke===null?We=qe:Ke.sibling=qe,Ke=qe);return Nt&&ys(ne,it),We}for(qe=M(ne,qe);it<oe.length;it++)Sr=Oe(qe,ne,it,oe[it],be),Sr!==null&&(p&&Sr.alternate!==null&&qe.delete(Sr.key===null?it:Sr.key),te=R(Sr,te,it),Ke===null?We=Sr:Ke.sibling=Sr,Ke=Sr);return p&&qe.forEach(function(wo){return g(ne,wo)}),Nt&&ys(ne,it),We}function Ve(ne,te,oe,be){var We=X(oe);if(typeof We!="function")throw Error(t(150));if(oe=We.call(oe),oe==null)throw Error(t(151));for(var Ke=We=null,qe=te,it=te=0,Sr=null,bt=oe.next();qe!==null&&!bt.done;it++,bt=oe.next()){qe.index>it?(Sr=qe,qe=null):Sr=qe.sibling;var wo=de(ne,qe,bt.value,be);if(wo===null){qe===null&&(qe=Sr);break}p&&qe&&wo.alternate===null&&g(ne,qe),te=R(wo,te,it),Ke===null?We=wo:Ke.sibling=wo,Ke=wo,qe=Sr}if(bt.done)return w(ne,qe),Nt&&ys(ne,it),We;if(qe===null){for(;!bt.done;it++,bt=oe.next())bt=me(ne,bt.value,be),bt!==null&&(te=R(bt,te,it),Ke===null?We=bt:Ke.sibling=bt,Ke=bt);return Nt&&ys(ne,it),We}for(qe=M(ne,qe);!bt.done;it++,bt=oe.next())bt=Oe(qe,ne,it,bt.value,be),bt!==null&&(p&&bt.alternate!==null&&qe.delete(bt.key===null?it:bt.key),te=R(bt,te,it),Ke===null?We=bt:Ke.sibling=bt,Ke=bt);return p&&qe.forEach(function(dG){return g(ne,dG)}),Nt&&ys(ne,it),We}function Qt(ne,te,oe,be){if(typeof oe=="object"&&oe!==null&&oe.type===L&&oe.key===null&&(oe=oe.props.children),typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case k:e:{for(var We=oe.key,Ke=te;Ke!==null;){if(Ke.key===We){if(We=oe.type,We===L){if(Ke.tag===7){w(ne,Ke.sibling),te=I(Ke,oe.props.children),te.return=ne,ne=te;break e}}else if(Ke.elementType===We||typeof We=="object"&&We!==null&&We.$$typeof===$&&Sk(We)===Ke.type){w(ne,Ke.sibling),te=I(Ke,oe.props),te.ref=xf(ne,Ke,oe),te.return=ne,ne=te;break e}w(ne,Ke);break}else g(ne,Ke);Ke=Ke.sibling}oe.type===L?(te=Cs(oe.props.children,ne.mode,be,oe.key),te.return=ne,ne=te):(be=qp(oe.type,oe.key,oe.props,null,ne.mode,be),be.ref=xf(ne,te,oe),be.return=ne,ne=be)}return F(ne);case A:e:{for(Ke=oe.key;te!==null;){if(te.key===Ke)if(te.tag===4&&te.stateNode.containerInfo===oe.containerInfo&&te.stateNode.implementation===oe.implementation){w(ne,te.sibling),te=I(te,oe.children||[]),te.return=ne,ne=te;break e}else{w(ne,te);break}else g(ne,te);te=te.sibling}te=jx(oe,ne.mode,be),te.return=ne,ne=te}return F(ne);case $:return Ke=oe._init,Qt(ne,te,Ke(oe._payload),be)}if(vn(oe))return Fe(ne,te,oe,be);if(X(oe))return Ve(ne,te,oe,be);kp(ne,oe)}return typeof oe=="string"&&oe!==""||typeof oe=="number"?(oe=""+oe,te!==null&&te.tag===6?(w(ne,te.sibling),te=I(te,oe),te.return=ne,ne=te):(w(ne,te),te=Nx(oe,ne.mode,be),te.return=ne,ne=te),F(ne)):w(ne,te)}return Qt}var au=bk(!0),_k=bk(!1),Ap=fo(null),Lp=null,iu=null,U0=null;function Y0(){U0=iu=Lp=null}function X0(p){var g=Ap.current;Ot(Ap),p._currentValue=g}function Z0(p,g,w){for(;p!==null;){var M=p.alternate;if((p.childLanes&g)!==g?(p.childLanes|=g,M!==null&&(M.childLanes|=g)):M!==null&&(M.childLanes&g)!==g&&(M.childLanes|=g),p===w)break;p=p.return}}function ou(p,g){Lp=p,U0=iu=null,p=p.dependencies,p!==null&&p.firstContext!==null&&((p.lanes&g)!==0&&(an=!0),p.firstContext=null)}function zn(p){var g=p._currentValue;if(U0!==p)if(p={context:p,memoizedValue:g,next:null},iu===null){if(Lp===null)throw Error(t(308));iu=p,Lp.dependencies={lanes:0,firstContext:p}}else iu=iu.next=p;return g}var ms=null;function K0(p){ms===null?ms=[p]:ms.push(p)}function wk(p,g,w,M){var I=g.interleaved;return I===null?(w.next=w,K0(g)):(w.next=I.next,I.next=w),g.interleaved=w,yi(p,M)}function yi(p,g){p.lanes|=g;var w=p.alternate;for(w!==null&&(w.lanes|=g),w=p,p=p.return;p!==null;)p.childLanes|=g,w=p.alternate,w!==null&&(w.childLanes|=g),w=p,p=p.return;return w.tag===3?w.stateNode:null}var vo=!1;function q0(p){p.updateQueue={baseState:p.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Tk(p,g){p=p.updateQueue,g.updateQueue===p&&(g.updateQueue={baseState:p.baseState,firstBaseUpdate:p.firstBaseUpdate,lastBaseUpdate:p.lastBaseUpdate,shared:p.shared,effects:p.effects})}function mi(p,g){return{eventTime:p,lane:g,tag:0,payload:null,callback:null,next:null}}function go(p,g,w){var M=p.updateQueue;if(M===null)return null;if(M=M.shared,(xt&2)!==0){var I=M.pending;return I===null?g.next=g:(g.next=I.next,I.next=g),M.pending=g,yi(p,w)}return I=M.interleaved,I===null?(g.next=g,K0(M)):(g.next=I.next,I.next=g),M.interleaved=g,yi(p,w)}function Ip(p,g,w){if(g=g.updateQueue,g!==null&&(g=g.shared,(w&4194240)!==0)){var M=g.lanes;M&=p.pendingLanes,w|=M,g.lanes=w,f0(p,w)}}function Ck(p,g){var w=p.updateQueue,M=p.alternate;if(M!==null&&(M=M.updateQueue,w===M)){var I=null,R=null;if(w=w.firstBaseUpdate,w!==null){do{var F={eventTime:w.eventTime,lane:w.lane,tag:w.tag,payload:w.payload,callback:w.callback,next:null};R===null?I=R=F:R=R.next=F,w=w.next}while(w!==null);R===null?I=R=g:R=R.next=g}else I=R=g;w={baseState:M.baseState,firstBaseUpdate:I,lastBaseUpdate:R,shared:M.shared,effects:M.effects},p.updateQueue=w;return}p=w.lastBaseUpdate,p===null?w.firstBaseUpdate=g:p.next=g,w.lastBaseUpdate=g}function Dp(p,g,w,M){var I=p.updateQueue;vo=!1;var R=I.firstBaseUpdate,F=I.lastBaseUpdate,q=I.shared.pending;if(q!==null){I.shared.pending=null;var J=q,se=J.next;J.next=null,F===null?R=se:F.next=se,F=J;var ge=p.alternate;ge!==null&&(ge=ge.updateQueue,q=ge.lastBaseUpdate,q!==F&&(q===null?ge.firstBaseUpdate=se:q.next=se,ge.lastBaseUpdate=J))}if(R!==null){var me=I.baseState;F=0,ge=se=J=null,q=R;do{var de=q.lane,Oe=q.eventTime;if((M&de)===de){ge!==null&&(ge=ge.next={eventTime:Oe,lane:0,tag:q.tag,payload:q.payload,callback:q.callback,next:null});e:{var Fe=p,Ve=q;switch(de=g,Oe=w,Ve.tag){case 1:if(Fe=Ve.payload,typeof Fe=="function"){me=Fe.call(Oe,me,de);break e}me=Fe;break e;case 3:Fe.flags=Fe.flags&-65537|128;case 0:if(Fe=Ve.payload,de=typeof Fe=="function"?Fe.call(Oe,me,de):Fe,de==null)break e;me=K({},me,de);break e;case 2:vo=!0}}q.callback!==null&&q.lane!==0&&(p.flags|=64,de=I.effects,de===null?I.effects=[q]:de.push(q))}else Oe={eventTime:Oe,lane:de,tag:q.tag,payload:q.payload,callback:q.callback,next:null},ge===null?(se=ge=Oe,J=me):ge=ge.next=Oe,F|=de;if(q=q.next,q===null){if(q=I.shared.pending,q===null)break;de=q,q=de.next,de.next=null,I.lastBaseUpdate=de,I.shared.pending=null}}while(!0);if(ge===null&&(J=me),I.baseState=J,I.firstBaseUpdate=se,I.lastBaseUpdate=ge,g=I.shared.interleaved,g!==null){I=g;do F|=I.lane,I=I.next;while(I!==g)}else R===null&&(I.shared.lanes=0);bs|=F,p.lanes=F,p.memoizedState=me}}function Mk(p,g,w){if(p=g.effects,g.effects=null,p!==null)for(g=0;g<p.length;g++){var M=p[g],I=M.callback;if(I!==null){if(M.callback=null,M=w,typeof I!="function")throw Error(t(191,I));I.call(M)}}}var Sf={},Da=fo(Sf),bf=fo(Sf),_f=fo(Sf);function xs(p){if(p===Sf)throw Error(t(174));return p}function Q0(p,g){switch(Rt(_f,g),Rt(bf,p),Rt(Da,Sf),p=g.nodeType,p){case 9:case 11:g=(g=g.documentElement)?g.namespaceURI:Jm(null,"");break;default:p=p===8?g.parentNode:g,g=p.namespaceURI||null,p=p.tagName,g=Jm(g,p)}Ot(Da),Rt(Da,g)}function su(){Ot(Da),Ot(bf),Ot(_f)}function kk(p){xs(_f.current);var g=xs(Da.current),w=Jm(g,p.type);g!==w&&(Rt(bf,p),Rt(Da,w))}function J0(p){bf.current===p&&(Ot(Da),Ot(bf))}var Bt=fo(0);function Pp(p){for(var g=p;g!==null;){if(g.tag===13){var w=g.memoizedState;if(w!==null&&(w=w.dehydrated,w===null||w.data==="$?"||w.data==="$!"))return g}else if(g.tag===19&&g.memoizedProps.revealOrder!==void 0){if((g.flags&128)!==0)return g}else if(g.child!==null){g.child.return=g,g=g.child;continue}if(g===p)break;for(;g.sibling===null;){if(g.return===null||g.return===p)return null;g=g.return}g.sibling.return=g.return,g=g.sibling}return null}var ex=[];function tx(){for(var p=0;p<ex.length;p++)ex[p]._workInProgressVersionPrimary=null;ex.length=0}var Rp=C.ReactCurrentDispatcher,rx=C.ReactCurrentBatchConfig,Ss=0,Ft=null,ur=null,mr=null,Ep=!1,wf=!1,Tf=0,E8=0;function jr(){throw Error(t(321))}function nx(p,g){if(g===null)return!1;for(var w=0;w<g.length&&w<p.length;w++)if(!oa(p[w],g[w]))return!1;return!0}function ax(p,g,w,M,I,R){if(Ss=R,Ft=g,g.memoizedState=null,g.updateQueue=null,g.lanes=0,Rp.current=p===null||p.memoizedState===null?j8:B8,p=w(M,I),wf){R=0;do{if(wf=!1,Tf=0,25<=R)throw Error(t(301));R+=1,mr=ur=null,g.updateQueue=null,Rp.current=F8,p=w(M,I)}while(wf)}if(Rp.current=Np,g=ur!==null&&ur.next!==null,Ss=0,mr=ur=Ft=null,Ep=!1,g)throw Error(t(300));return p}function ix(){var p=Tf!==0;return Tf=0,p}function Pa(){var p={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mr===null?Ft.memoizedState=mr=p:mr=mr.next=p,mr}function On(){if(ur===null){var p=Ft.alternate;p=p!==null?p.memoizedState:null}else p=ur.next;var g=mr===null?Ft.memoizedState:mr.next;if(g!==null)mr=g,ur=p;else{if(p===null)throw Error(t(310));ur=p,p={memoizedState:ur.memoizedState,baseState:ur.baseState,baseQueue:ur.baseQueue,queue:ur.queue,next:null},mr===null?Ft.memoizedState=mr=p:mr=mr.next=p}return mr}function Cf(p,g){return typeof g=="function"?g(p):g}function ox(p){var g=On(),w=g.queue;if(w===null)throw Error(t(311));w.lastRenderedReducer=p;var M=ur,I=M.baseQueue,R=w.pending;if(R!==null){if(I!==null){var F=I.next;I.next=R.next,R.next=F}M.baseQueue=I=R,w.pending=null}if(I!==null){R=I.next,M=M.baseState;var q=F=null,J=null,se=R;do{var ge=se.lane;if((Ss&ge)===ge)J!==null&&(J=J.next={lane:0,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null}),M=se.hasEagerState?se.eagerState:p(M,se.action);else{var me={lane:ge,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null};J===null?(q=J=me,F=M):J=J.next=me,Ft.lanes|=ge,bs|=ge}se=se.next}while(se!==null&&se!==R);J===null?F=M:J.next=q,oa(M,g.memoizedState)||(an=!0),g.memoizedState=M,g.baseState=F,g.baseQueue=J,w.lastRenderedState=M}if(p=w.interleaved,p!==null){I=p;do R=I.lane,Ft.lanes|=R,bs|=R,I=I.next;while(I!==p)}else I===null&&(w.lanes=0);return[g.memoizedState,w.dispatch]}function sx(p){var g=On(),w=g.queue;if(w===null)throw Error(t(311));w.lastRenderedReducer=p;var M=w.dispatch,I=w.pending,R=g.memoizedState;if(I!==null){w.pending=null;var F=I=I.next;do R=p(R,F.action),F=F.next;while(F!==I);oa(R,g.memoizedState)||(an=!0),g.memoizedState=R,g.baseQueue===null&&(g.baseState=R),w.lastRenderedState=R}return[R,M]}function Ak(){}function Lk(p,g){var w=Ft,M=On(),I=g(),R=!oa(M.memoizedState,I);if(R&&(M.memoizedState=I,an=!0),M=M.queue,lx(Pk.bind(null,w,M,p),[p]),M.getSnapshot!==g||R||mr!==null&&mr.memoizedState.tag&1){if(w.flags|=2048,Mf(9,Dk.bind(null,w,M,I,g),void 0,null),xr===null)throw Error(t(349));(Ss&30)!==0||Ik(w,g,I)}return I}function Ik(p,g,w){p.flags|=16384,p={getSnapshot:g,value:w},g=Ft.updateQueue,g===null?(g={lastEffect:null,stores:null},Ft.updateQueue=g,g.stores=[p]):(w=g.stores,w===null?g.stores=[p]:w.push(p))}function Dk(p,g,w,M){g.value=w,g.getSnapshot=M,Rk(g)&&Ek(p)}function Pk(p,g,w){return w(function(){Rk(g)&&Ek(p)})}function Rk(p){var g=p.getSnapshot;p=p.value;try{var w=g();return!oa(p,w)}catch{return!0}}function Ek(p){var g=yi(p,1);g!==null&&fa(g,p,1,-1)}function zk(p){var g=Pa();return typeof p=="function"&&(p=p()),g.memoizedState=g.baseState=p,p={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Cf,lastRenderedState:p},g.queue=p,p=p.dispatch=N8.bind(null,Ft,p),[g.memoizedState,p]}function Mf(p,g,w,M){return p={tag:p,create:g,destroy:w,deps:M,next:null},g=Ft.updateQueue,g===null?(g={lastEffect:null,stores:null},Ft.updateQueue=g,g.lastEffect=p.next=p):(w=g.lastEffect,w===null?g.lastEffect=p.next=p:(M=w.next,w.next=p,p.next=M,g.lastEffect=p)),p}function Ok(){return On().memoizedState}function zp(p,g,w,M){var I=Pa();Ft.flags|=p,I.memoizedState=Mf(1|g,w,void 0,M===void 0?null:M)}function Op(p,g,w,M){var I=On();M=M===void 0?null:M;var R=void 0;if(ur!==null){var F=ur.memoizedState;if(R=F.destroy,M!==null&&nx(M,F.deps)){I.memoizedState=Mf(g,w,R,M);return}}Ft.flags|=p,I.memoizedState=Mf(1|g,w,R,M)}function Nk(p,g){return zp(8390656,8,p,g)}function lx(p,g){return Op(2048,8,p,g)}function jk(p,g){return Op(4,2,p,g)}function Bk(p,g){return Op(4,4,p,g)}function Fk(p,g){if(typeof g=="function")return p=p(),g(p),function(){g(null)};if(g!=null)return p=p(),g.current=p,function(){g.current=null}}function Vk(p,g,w){return w=w!=null?w.concat([p]):null,Op(4,4,Fk.bind(null,g,p),w)}function ux(){}function Gk(p,g){var w=On();g=g===void 0?null:g;var M=w.memoizedState;return M!==null&&g!==null&&nx(g,M[1])?M[0]:(w.memoizedState=[p,g],p)}function Wk(p,g){var w=On();g=g===void 0?null:g;var M=w.memoizedState;return M!==null&&g!==null&&nx(g,M[1])?M[0]:(p=p(),w.memoizedState=[p,g],p)}function $k(p,g,w){return(Ss&21)===0?(p.baseState&&(p.baseState=!1,an=!0),p.memoizedState=w):(oa(w,g)||(w=SM(),Ft.lanes|=w,bs|=w,p.baseState=!0),g)}function z8(p,g){var w=kt;kt=w!==0&&4>w?w:4,p(!0);var M=rx.transition;rx.transition={};try{p(!1),g()}finally{kt=w,rx.transition=M}}function Hk(){return On().memoizedState}function O8(p,g,w){var M=So(p);if(w={lane:M,action:w,hasEagerState:!1,eagerState:null,next:null},Uk(p))Yk(g,w);else if(w=wk(p,g,w,M),w!==null){var I=Xr();fa(w,p,M,I),Xk(w,g,M)}}function N8(p,g,w){var M=So(p),I={lane:M,action:w,hasEagerState:!1,eagerState:null,next:null};if(Uk(p))Yk(g,I);else{var R=p.alternate;if(p.lanes===0&&(R===null||R.lanes===0)&&(R=g.lastRenderedReducer,R!==null))try{var F=g.lastRenderedState,q=R(F,w);if(I.hasEagerState=!0,I.eagerState=q,oa(q,F)){var J=g.interleaved;J===null?(I.next=I,K0(g)):(I.next=J.next,J.next=I),g.interleaved=I;return}}catch{}w=wk(p,g,I,M),w!==null&&(I=Xr(),fa(w,p,M,I),Xk(w,g,M))}}function Uk(p){var g=p.alternate;return p===Ft||g!==null&&g===Ft}function Yk(p,g){wf=Ep=!0;var w=p.pending;w===null?g.next=g:(g.next=w.next,w.next=g),p.pending=g}function Xk(p,g,w){if((w&4194240)!==0){var M=g.lanes;M&=p.pendingLanes,w|=M,g.lanes=w,f0(p,w)}}var Np={readContext:zn,useCallback:jr,useContext:jr,useEffect:jr,useImperativeHandle:jr,useInsertionEffect:jr,useLayoutEffect:jr,useMemo:jr,useReducer:jr,useRef:jr,useState:jr,useDebugValue:jr,useDeferredValue:jr,useTransition:jr,useMutableSource:jr,useSyncExternalStore:jr,useId:jr,unstable_isNewReconciler:!1},j8={readContext:zn,useCallback:function(p,g){return Pa().memoizedState=[p,g===void 0?null:g],p},useContext:zn,useEffect:Nk,useImperativeHandle:function(p,g,w){return w=w!=null?w.concat([p]):null,zp(4194308,4,Fk.bind(null,g,p),w)},useLayoutEffect:function(p,g){return zp(4194308,4,p,g)},useInsertionEffect:function(p,g){return zp(4,2,p,g)},useMemo:function(p,g){var w=Pa();return g=g===void 0?null:g,p=p(),w.memoizedState=[p,g],p},useReducer:function(p,g,w){var M=Pa();return g=w!==void 0?w(g):g,M.memoizedState=M.baseState=g,p={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:p,lastRenderedState:g},M.queue=p,p=p.dispatch=O8.bind(null,Ft,p),[M.memoizedState,p]},useRef:function(p){var g=Pa();return p={current:p},g.memoizedState=p},useState:zk,useDebugValue:ux,useDeferredValue:function(p){return Pa().memoizedState=p},useTransition:function(){var p=zk(!1),g=p[0];return p=z8.bind(null,p[1]),Pa().memoizedState=p,[g,p]},useMutableSource:function(){},useSyncExternalStore:function(p,g,w){var M=Ft,I=Pa();if(Nt){if(w===void 0)throw Error(t(407));w=w()}else{if(w=g(),xr===null)throw Error(t(349));(Ss&30)!==0||Ik(M,g,w)}I.memoizedState=w;var R={value:w,getSnapshot:g};return I.queue=R,Nk(Pk.bind(null,M,R,p),[p]),M.flags|=2048,Mf(9,Dk.bind(null,M,R,w,g),void 0,null),w},useId:function(){var p=Pa(),g=xr.identifierPrefix;if(Nt){var w=gi,M=vi;w=(M&~(1<<32-ia(M)-1)).toString(32)+w,g=":"+g+"R"+w,w=Tf++,0<w&&(g+="H"+w.toString(32)),g+=":"}else w=E8++,g=":"+g+"r"+w.toString(32)+":";return p.memoizedState=g},unstable_isNewReconciler:!1},B8={readContext:zn,useCallback:Gk,useContext:zn,useEffect:lx,useImperativeHandle:Vk,useInsertionEffect:jk,useLayoutEffect:Bk,useMemo:Wk,useReducer:ox,useRef:Ok,useState:function(){return ox(Cf)},useDebugValue:ux,useDeferredValue:function(p){var g=On();return $k(g,ur.memoizedState,p)},useTransition:function(){var p=ox(Cf)[0],g=On().memoizedState;return[p,g]},useMutableSource:Ak,useSyncExternalStore:Lk,useId:Hk,unstable_isNewReconciler:!1},F8={readContext:zn,useCallback:Gk,useContext:zn,useEffect:lx,useImperativeHandle:Vk,useInsertionEffect:jk,useLayoutEffect:Bk,useMemo:Wk,useReducer:sx,useRef:Ok,useState:function(){return sx(Cf)},useDebugValue:ux,useDeferredValue:function(p){var g=On();return ur===null?g.memoizedState=p:$k(g,ur.memoizedState,p)},useTransition:function(){var p=sx(Cf)[0],g=On().memoizedState;return[p,g]},useMutableSource:Ak,useSyncExternalStore:Lk,useId:Hk,unstable_isNewReconciler:!1};function la(p,g){if(p&&p.defaultProps){g=K({},g),p=p.defaultProps;for(var w in p)g[w]===void 0&&(g[w]=p[w]);return g}return g}function cx(p,g,w,M){g=p.memoizedState,w=w(M,g),w=w==null?g:K({},g,w),p.memoizedState=w,p.lanes===0&&(p.updateQueue.baseState=w)}var jp={isMounted:function(p){return(p=p._reactInternals)?hs(p)===p:!1},enqueueSetState:function(p,g,w){p=p._reactInternals;var M=Xr(),I=So(p),R=mi(M,I);R.payload=g,w!=null&&(R.callback=w),g=go(p,R,I),g!==null&&(fa(g,p,I,M),Ip(g,p,I))},enqueueReplaceState:function(p,g,w){p=p._reactInternals;var M=Xr(),I=So(p),R=mi(M,I);R.tag=1,R.payload=g,w!=null&&(R.callback=w),g=go(p,R,I),g!==null&&(fa(g,p,I,M),Ip(g,p,I))},enqueueForceUpdate:function(p,g){p=p._reactInternals;var w=Xr(),M=So(p),I=mi(w,M);I.tag=2,g!=null&&(I.callback=g),g=go(p,I,M),g!==null&&(fa(g,p,M,w),Ip(g,p,M))}};function Zk(p,g,w,M,I,R,F){return p=p.stateNode,typeof p.shouldComponentUpdate=="function"?p.shouldComponentUpdate(M,R,F):g.prototype&&g.prototype.isPureReactComponent?!df(w,M)||!df(I,R):!0}function Kk(p,g,w){var M=!1,I=ho,R=g.contextType;return typeof R=="object"&&R!==null?R=zn(R):(I=nn(g)?vs:Nr.current,M=g.contextTypes,R=(M=M!=null)?eu(p,I):ho),g=new g(w,R),p.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=jp,p.stateNode=g,g._reactInternals=p,M&&(p=p.stateNode,p.__reactInternalMemoizedUnmaskedChildContext=I,p.__reactInternalMemoizedMaskedChildContext=R),g}function qk(p,g,w,M){p=g.state,typeof g.componentWillReceiveProps=="function"&&g.componentWillReceiveProps(w,M),typeof g.UNSAFE_componentWillReceiveProps=="function"&&g.UNSAFE_componentWillReceiveProps(w,M),g.state!==p&&jp.enqueueReplaceState(g,g.state,null)}function fx(p,g,w,M){var I=p.stateNode;I.props=w,I.state=p.memoizedState,I.refs={},q0(p);var R=g.contextType;typeof R=="object"&&R!==null?I.context=zn(R):(R=nn(g)?vs:Nr.current,I.context=eu(p,R)),I.state=p.memoizedState,R=g.getDerivedStateFromProps,typeof R=="function"&&(cx(p,g,R,w),I.state=p.memoizedState),typeof g.getDerivedStateFromProps=="function"||typeof I.getSnapshotBeforeUpdate=="function"||typeof I.UNSAFE_componentWillMount!="function"&&typeof I.componentWillMount!="function"||(g=I.state,typeof I.componentWillMount=="function"&&I.componentWillMount(),typeof I.UNSAFE_componentWillMount=="function"&&I.UNSAFE_componentWillMount(),g!==I.state&&jp.enqueueReplaceState(I,I.state,null),Dp(p,w,I,M),I.state=p.memoizedState),typeof I.componentDidMount=="function"&&(p.flags|=4194308)}function lu(p,g){try{var w="",M=g;do w+=re(M),M=M.return;while(M);var I=w}catch(R){I=`
|
|
7
|
+
Error generating stack: `+R.message+`
|
|
8
|
+
`+R.stack}return{value:p,source:g,stack:I,digest:null}}function dx(p,g,w){return{value:p,source:null,stack:w??null,digest:g??null}}function hx(p,g){try{console.error(g.value)}catch(w){setTimeout(function(){throw w})}}var V8=typeof WeakMap=="function"?WeakMap:Map;function Qk(p,g,w){w=mi(-1,w),w.tag=3,w.payload={element:null};var M=g.value;return w.callback=function(){Hp||(Hp=!0,Lx=M),hx(p,g)},w}function Jk(p,g,w){w=mi(-1,w),w.tag=3;var M=p.type.getDerivedStateFromError;if(typeof M=="function"){var I=g.value;w.payload=function(){return M(I)},w.callback=function(){hx(p,g)}}var R=p.stateNode;return R!==null&&typeof R.componentDidCatch=="function"&&(w.callback=function(){hx(p,g),typeof M!="function"&&(mo===null?mo=new Set([this]):mo.add(this));var F=g.stack;this.componentDidCatch(g.value,{componentStack:F!==null?F:""})}),w}function eA(p,g,w){var M=p.pingCache;if(M===null){M=p.pingCache=new V8;var I=new Set;M.set(g,I)}else I=M.get(g),I===void 0&&(I=new Set,M.set(g,I));I.has(w)||(I.add(w),p=tG.bind(null,p,g,w),g.then(p,p))}function tA(p){do{var g;if((g=p.tag===13)&&(g=p.memoizedState,g=g!==null?g.dehydrated!==null:!0),g)return p;p=p.return}while(p!==null);return null}function rA(p,g,w,M,I){return(p.mode&1)===0?(p===g?p.flags|=65536:(p.flags|=128,w.flags|=131072,w.flags&=-52805,w.tag===1&&(w.alternate===null?w.tag=17:(g=mi(-1,1),g.tag=2,go(w,g,1))),w.lanes|=1),p):(p.flags|=65536,p.lanes=I,p)}var G8=C.ReactCurrentOwner,an=!1;function Yr(p,g,w,M){g.child=p===null?_k(g,null,w,M):au(g,p.child,w,M)}function nA(p,g,w,M,I){w=w.render;var R=g.ref;return ou(g,I),M=ax(p,g,w,M,R,I),w=ix(),p!==null&&!an?(g.updateQueue=p.updateQueue,g.flags&=-2053,p.lanes&=~I,xi(p,g,I)):(Nt&&w&&V0(g),g.flags|=1,Yr(p,g,M,I),g.child)}function aA(p,g,w,M,I){if(p===null){var R=w.type;return typeof R=="function"&&!Ox(R)&&R.defaultProps===void 0&&w.compare===null&&w.defaultProps===void 0?(g.tag=15,g.type=R,iA(p,g,R,M,I)):(p=qp(w.type,null,M,g,g.mode,I),p.ref=g.ref,p.return=g,g.child=p)}if(R=p.child,(p.lanes&I)===0){var F=R.memoizedProps;if(w=w.compare,w=w!==null?w:df,w(F,M)&&p.ref===g.ref)return xi(p,g,I)}return g.flags|=1,p=_o(R,M),p.ref=g.ref,p.return=g,g.child=p}function iA(p,g,w,M,I){if(p!==null){var R=p.memoizedProps;if(df(R,M)&&p.ref===g.ref)if(an=!1,g.pendingProps=M=R,(p.lanes&I)!==0)(p.flags&131072)!==0&&(an=!0);else return g.lanes=p.lanes,xi(p,g,I)}return px(p,g,w,M,I)}function oA(p,g,w){var M=g.pendingProps,I=M.children,R=p!==null?p.memoizedState:null;if(M.mode==="hidden")if((g.mode&1)===0)g.memoizedState={baseLanes:0,cachePool:null,transitions:null},Rt(cu,Sn),Sn|=w;else{if((w&1073741824)===0)return p=R!==null?R.baseLanes|w:w,g.lanes=g.childLanes=1073741824,g.memoizedState={baseLanes:p,cachePool:null,transitions:null},g.updateQueue=null,Rt(cu,Sn),Sn|=p,null;g.memoizedState={baseLanes:0,cachePool:null,transitions:null},M=R!==null?R.baseLanes:w,Rt(cu,Sn),Sn|=M}else R!==null?(M=R.baseLanes|w,g.memoizedState=null):M=w,Rt(cu,Sn),Sn|=M;return Yr(p,g,I,w),g.child}function sA(p,g){var w=g.ref;(p===null&&w!==null||p!==null&&p.ref!==w)&&(g.flags|=512,g.flags|=2097152)}function px(p,g,w,M,I){var R=nn(w)?vs:Nr.current;return R=eu(g,R),ou(g,I),w=ax(p,g,w,M,R,I),M=ix(),p!==null&&!an?(g.updateQueue=p.updateQueue,g.flags&=-2053,p.lanes&=~I,xi(p,g,I)):(Nt&&M&&V0(g),g.flags|=1,Yr(p,g,w,I),g.child)}function lA(p,g,w,M,I){if(nn(w)){var R=!0;_p(g)}else R=!1;if(ou(g,I),g.stateNode===null)Fp(p,g),Kk(g,w,M),fx(g,w,M,I),M=!0;else if(p===null){var F=g.stateNode,q=g.memoizedProps;F.props=q;var J=F.context,se=w.contextType;typeof se=="object"&&se!==null?se=zn(se):(se=nn(w)?vs:Nr.current,se=eu(g,se));var ge=w.getDerivedStateFromProps,me=typeof ge=="function"||typeof F.getSnapshotBeforeUpdate=="function";me||typeof F.UNSAFE_componentWillReceiveProps!="function"&&typeof F.componentWillReceiveProps!="function"||(q!==M||J!==se)&&qk(g,F,M,se),vo=!1;var de=g.memoizedState;F.state=de,Dp(g,M,F,I),J=g.memoizedState,q!==M||de!==J||rn.current||vo?(typeof ge=="function"&&(cx(g,w,ge,M),J=g.memoizedState),(q=vo||Zk(g,w,q,M,de,J,se))?(me||typeof F.UNSAFE_componentWillMount!="function"&&typeof F.componentWillMount!="function"||(typeof F.componentWillMount=="function"&&F.componentWillMount(),typeof F.UNSAFE_componentWillMount=="function"&&F.UNSAFE_componentWillMount()),typeof F.componentDidMount=="function"&&(g.flags|=4194308)):(typeof F.componentDidMount=="function"&&(g.flags|=4194308),g.memoizedProps=M,g.memoizedState=J),F.props=M,F.state=J,F.context=se,M=q):(typeof F.componentDidMount=="function"&&(g.flags|=4194308),M=!1)}else{F=g.stateNode,Tk(p,g),q=g.memoizedProps,se=g.type===g.elementType?q:la(g.type,q),F.props=se,me=g.pendingProps,de=F.context,J=w.contextType,typeof J=="object"&&J!==null?J=zn(J):(J=nn(w)?vs:Nr.current,J=eu(g,J));var Oe=w.getDerivedStateFromProps;(ge=typeof Oe=="function"||typeof F.getSnapshotBeforeUpdate=="function")||typeof F.UNSAFE_componentWillReceiveProps!="function"&&typeof F.componentWillReceiveProps!="function"||(q!==me||de!==J)&&qk(g,F,M,J),vo=!1,de=g.memoizedState,F.state=de,Dp(g,M,F,I);var Fe=g.memoizedState;q!==me||de!==Fe||rn.current||vo?(typeof Oe=="function"&&(cx(g,w,Oe,M),Fe=g.memoizedState),(se=vo||Zk(g,w,se,M,de,Fe,J)||!1)?(ge||typeof F.UNSAFE_componentWillUpdate!="function"&&typeof F.componentWillUpdate!="function"||(typeof F.componentWillUpdate=="function"&&F.componentWillUpdate(M,Fe,J),typeof F.UNSAFE_componentWillUpdate=="function"&&F.UNSAFE_componentWillUpdate(M,Fe,J)),typeof F.componentDidUpdate=="function"&&(g.flags|=4),typeof F.getSnapshotBeforeUpdate=="function"&&(g.flags|=1024)):(typeof F.componentDidUpdate!="function"||q===p.memoizedProps&&de===p.memoizedState||(g.flags|=4),typeof F.getSnapshotBeforeUpdate!="function"||q===p.memoizedProps&&de===p.memoizedState||(g.flags|=1024),g.memoizedProps=M,g.memoizedState=Fe),F.props=M,F.state=Fe,F.context=J,M=se):(typeof F.componentDidUpdate!="function"||q===p.memoizedProps&&de===p.memoizedState||(g.flags|=4),typeof F.getSnapshotBeforeUpdate!="function"||q===p.memoizedProps&&de===p.memoizedState||(g.flags|=1024),M=!1)}return vx(p,g,w,M,R,I)}function vx(p,g,w,M,I,R){sA(p,g);var F=(g.flags&128)!==0;if(!M&&!F)return I&&hk(g,w,!1),xi(p,g,R);M=g.stateNode,G8.current=g;var q=F&&typeof w.getDerivedStateFromError!="function"?null:M.render();return g.flags|=1,p!==null&&F?(g.child=au(g,p.child,null,R),g.child=au(g,null,q,R)):Yr(p,g,q,R),g.memoizedState=M.state,I&&hk(g,w,!0),g.child}function uA(p){var g=p.stateNode;g.pendingContext?fk(p,g.pendingContext,g.pendingContext!==g.context):g.context&&fk(p,g.context,!1),Q0(p,g.containerInfo)}function cA(p,g,w,M,I){return nu(),H0(I),g.flags|=256,Yr(p,g,w,M),g.child}var gx={dehydrated:null,treeContext:null,retryLane:0};function yx(p){return{baseLanes:p,cachePool:null,transitions:null}}function fA(p,g,w){var M=g.pendingProps,I=Bt.current,R=!1,F=(g.flags&128)!==0,q;if((q=F)||(q=p!==null&&p.memoizedState===null?!1:(I&2)!==0),q?(R=!0,g.flags&=-129):(p===null||p.memoizedState!==null)&&(I|=1),Rt(Bt,I&1),p===null)return $0(g),p=g.memoizedState,p!==null&&(p=p.dehydrated,p!==null)?((g.mode&1)===0?g.lanes=1:p.data==="$!"?g.lanes=8:g.lanes=1073741824,null):(F=M.children,p=M.fallback,R?(M=g.mode,R=g.child,F={mode:"hidden",children:F},(M&1)===0&&R!==null?(R.childLanes=0,R.pendingProps=F):R=Qp(F,M,0,null),p=Cs(p,M,w,null),R.return=g,p.return=g,R.sibling=p,g.child=R,g.child.memoizedState=yx(w),g.memoizedState=gx,p):mx(g,F));if(I=p.memoizedState,I!==null&&(q=I.dehydrated,q!==null))return W8(p,g,F,M,q,I,w);if(R){R=M.fallback,F=g.mode,I=p.child,q=I.sibling;var J={mode:"hidden",children:M.children};return(F&1)===0&&g.child!==I?(M=g.child,M.childLanes=0,M.pendingProps=J,g.deletions=null):(M=_o(I,J),M.subtreeFlags=I.subtreeFlags&14680064),q!==null?R=_o(q,R):(R=Cs(R,F,w,null),R.flags|=2),R.return=g,M.return=g,M.sibling=R,g.child=M,M=R,R=g.child,F=p.child.memoizedState,F=F===null?yx(w):{baseLanes:F.baseLanes|w,cachePool:null,transitions:F.transitions},R.memoizedState=F,R.childLanes=p.childLanes&~w,g.memoizedState=gx,M}return R=p.child,p=R.sibling,M=_o(R,{mode:"visible",children:M.children}),(g.mode&1)===0&&(M.lanes=w),M.return=g,M.sibling=null,p!==null&&(w=g.deletions,w===null?(g.deletions=[p],g.flags|=16):w.push(p)),g.child=M,g.memoizedState=null,M}function mx(p,g){return g=Qp({mode:"visible",children:g},p.mode,0,null),g.return=p,p.child=g}function Bp(p,g,w,M){return M!==null&&H0(M),au(g,p.child,null,w),p=mx(g,g.pendingProps.children),p.flags|=2,g.memoizedState=null,p}function W8(p,g,w,M,I,R,F){if(w)return g.flags&256?(g.flags&=-257,M=dx(Error(t(422))),Bp(p,g,F,M)):g.memoizedState!==null?(g.child=p.child,g.flags|=128,null):(R=M.fallback,I=g.mode,M=Qp({mode:"visible",children:M.children},I,0,null),R=Cs(R,I,F,null),R.flags|=2,M.return=g,R.return=g,M.sibling=R,g.child=M,(g.mode&1)!==0&&au(g,p.child,null,F),g.child.memoizedState=yx(F),g.memoizedState=gx,R);if((g.mode&1)===0)return Bp(p,g,F,null);if(I.data==="$!"){if(M=I.nextSibling&&I.nextSibling.dataset,M)var q=M.dgst;return M=q,R=Error(t(419)),M=dx(R,M,void 0),Bp(p,g,F,M)}if(q=(F&p.childLanes)!==0,an||q){if(M=xr,M!==null){switch(F&-F){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&(M.suspendedLanes|F))!==0?0:I,I!==0&&I!==R.retryLane&&(R.retryLane=I,yi(p,I),fa(M,p,I,-1))}return zx(),M=dx(Error(t(421))),Bp(p,g,F,M)}return I.data==="$?"?(g.flags|=128,g.child=p.child,g=rG.bind(null,p),I._reactRetry=g,null):(p=R.treeContext,xn=co(I.nextSibling),mn=g,Nt=!0,sa=null,p!==null&&(Rn[En++]=vi,Rn[En++]=gi,Rn[En++]=gs,vi=p.id,gi=p.overflow,gs=g),g=mx(g,M.children),g.flags|=4096,g)}function dA(p,g,w){p.lanes|=g;var M=p.alternate;M!==null&&(M.lanes|=g),Z0(p.return,g,w)}function xx(p,g,w,M,I){var R=p.memoizedState;R===null?p.memoizedState={isBackwards:g,rendering:null,renderingStartTime:0,last:M,tail:w,tailMode:I}:(R.isBackwards=g,R.rendering=null,R.renderingStartTime=0,R.last=M,R.tail=w,R.tailMode=I)}function hA(p,g,w){var M=g.pendingProps,I=M.revealOrder,R=M.tail;if(Yr(p,g,M.children,w),M=Bt.current,(M&2)!==0)M=M&1|2,g.flags|=128;else{if(p!==null&&(p.flags&128)!==0)e:for(p=g.child;p!==null;){if(p.tag===13)p.memoizedState!==null&&dA(p,w,g);else if(p.tag===19)dA(p,w,g);else if(p.child!==null){p.child.return=p,p=p.child;continue}if(p===g)break e;for(;p.sibling===null;){if(p.return===null||p.return===g)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}M&=1}if(Rt(Bt,M),(g.mode&1)===0)g.memoizedState=null;else switch(I){case"forwards":for(w=g.child,I=null;w!==null;)p=w.alternate,p!==null&&Pp(p)===null&&(I=w),w=w.sibling;w=I,w===null?(I=g.child,g.child=null):(I=w.sibling,w.sibling=null),xx(g,!1,I,w,R);break;case"backwards":for(w=null,I=g.child,g.child=null;I!==null;){if(p=I.alternate,p!==null&&Pp(p)===null){g.child=I;break}p=I.sibling,I.sibling=w,w=I,I=p}xx(g,!0,w,null,R);break;case"together":xx(g,!1,null,null,void 0);break;default:g.memoizedState=null}return g.child}function Fp(p,g){(g.mode&1)===0&&p!==null&&(p.alternate=null,g.alternate=null,g.flags|=2)}function xi(p,g,w){if(p!==null&&(g.dependencies=p.dependencies),bs|=g.lanes,(w&g.childLanes)===0)return null;if(p!==null&&g.child!==p.child)throw Error(t(153));if(g.child!==null){for(p=g.child,w=_o(p,p.pendingProps),g.child=w,w.return=g;p.sibling!==null;)p=p.sibling,w=w.sibling=_o(p,p.pendingProps),w.return=g;w.sibling=null}return g.child}function $8(p,g,w){switch(g.tag){case 3:uA(g),nu();break;case 5:kk(g);break;case 1:nn(g.type)&&_p(g);break;case 4:Q0(g,g.stateNode.containerInfo);break;case 10:var M=g.type._context,I=g.memoizedProps.value;Rt(Ap,M._currentValue),M._currentValue=I;break;case 13:if(M=g.memoizedState,M!==null)return M.dehydrated!==null?(Rt(Bt,Bt.current&1),g.flags|=128,null):(w&g.child.childLanes)!==0?fA(p,g,w):(Rt(Bt,Bt.current&1),p=xi(p,g,w),p!==null?p.sibling:null);Rt(Bt,Bt.current&1);break;case 19:if(M=(w&g.childLanes)!==0,(p.flags&128)!==0){if(M)return hA(p,g,w);g.flags|=128}if(I=g.memoizedState,I!==null&&(I.rendering=null,I.tail=null,I.lastEffect=null),Rt(Bt,Bt.current),M)break;return null;case 22:case 23:return g.lanes=0,oA(p,g,w)}return xi(p,g,w)}var pA,Sx,vA,gA;pA=function(p,g){for(var w=g.child;w!==null;){if(w.tag===5||w.tag===6)p.appendChild(w.stateNode);else if(w.tag!==4&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===g)break;for(;w.sibling===null;){if(w.return===null||w.return===g)return;w=w.return}w.sibling.return=w.return,w=w.sibling}},Sx=function(){},vA=function(p,g,w,M){var I=p.memoizedProps;if(I!==M){p=g.stateNode,xs(Da.current);var R=null;switch(w){case"input":I=ke(p,I),M=ke(p,M),R=[];break;case"select":I=K({},I,{value:void 0}),M=K({},M,{value:void 0}),R=[];break;case"textarea":I=ds(p,I),M=ds(p,M),R=[];break;default:typeof I.onClick!="function"&&typeof M.onClick=="function"&&(p.onclick=xp)}e0(w,M);var F;w=null;for(se in I)if(!M.hasOwnProperty(se)&&I.hasOwnProperty(se)&&I[se]!=null)if(se==="style"){var q=I[se];for(F in q)q.hasOwnProperty(F)&&(w||(w={}),w[F]="")}else se!=="dangerouslySetInnerHTML"&&se!=="children"&&se!=="suppressContentEditableWarning"&&se!=="suppressHydrationWarning"&&se!=="autoFocus"&&(a.hasOwnProperty(se)?R||(R=[]):(R=R||[]).push(se,null));for(se in M){var J=M[se];if(q=I?.[se],M.hasOwnProperty(se)&&J!==q&&(J!=null||q!=null))if(se==="style")if(q){for(F in q)!q.hasOwnProperty(F)||J&&J.hasOwnProperty(F)||(w||(w={}),w[F]="");for(F in J)J.hasOwnProperty(F)&&q[F]!==J[F]&&(w||(w={}),w[F]=J[F])}else w||(R||(R=[]),R.push(se,w)),w=J;else se==="dangerouslySetInnerHTML"?(J=J?J.__html:void 0,q=q?q.__html:void 0,J!=null&&q!==J&&(R=R||[]).push(se,J)):se==="children"?typeof J!="string"&&typeof J!="number"||(R=R||[]).push(se,""+J):se!=="suppressContentEditableWarning"&&se!=="suppressHydrationWarning"&&(a.hasOwnProperty(se)?(J!=null&&se==="onScroll"&&zt("scroll",p),R||q===J||(R=[])):(R=R||[]).push(se,J))}w&&(R=R||[]).push("style",w);var se=R;(g.updateQueue=se)&&(g.flags|=4)}},gA=function(p,g,w,M){w!==M&&(g.flags|=4)};function kf(p,g){if(!Nt)switch(p.tailMode){case"hidden":g=p.tail;for(var w=null;g!==null;)g.alternate!==null&&(w=g),g=g.sibling;w===null?p.tail=null:w.sibling=null;break;case"collapsed":w=p.tail;for(var M=null;w!==null;)w.alternate!==null&&(M=w),w=w.sibling;M===null?g||p.tail===null?p.tail=null:p.tail.sibling=null:M.sibling=null}}function Br(p){var g=p.alternate!==null&&p.alternate.child===p.child,w=0,M=0;if(g)for(var I=p.child;I!==null;)w|=I.lanes|I.childLanes,M|=I.subtreeFlags&14680064,M|=I.flags&14680064,I.return=p,I=I.sibling;else for(I=p.child;I!==null;)w|=I.lanes|I.childLanes,M|=I.subtreeFlags,M|=I.flags,I.return=p,I=I.sibling;return p.subtreeFlags|=M,p.childLanes=w,g}function H8(p,g,w){var M=g.pendingProps;switch(G0(g),g.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Br(g),null;case 1:return nn(g.type)&&bp(),Br(g),null;case 3:return M=g.stateNode,su(),Ot(rn),Ot(Nr),tx(),M.pendingContext&&(M.context=M.pendingContext,M.pendingContext=null),(p===null||p.child===null)&&(Mp(g)?g.flags|=4:p===null||p.memoizedState.isDehydrated&&(g.flags&256)===0||(g.flags|=1024,sa!==null&&(Px(sa),sa=null))),Sx(p,g),Br(g),null;case 5:J0(g);var I=xs(_f.current);if(w=g.type,p!==null&&g.stateNode!=null)vA(p,g,w,M,I),p.ref!==g.ref&&(g.flags|=512,g.flags|=2097152);else{if(!M){if(g.stateNode===null)throw Error(t(166));return Br(g),null}if(p=xs(Da.current),Mp(g)){M=g.stateNode,w=g.type;var R=g.memoizedProps;switch(M[Ia]=g,M[yf]=R,p=(g.mode&1)!==0,w){case"dialog":zt("cancel",M),zt("close",M);break;case"iframe":case"object":case"embed":zt("load",M);break;case"video":case"audio":for(I=0;I<pf.length;I++)zt(pf[I],M);break;case"source":zt("error",M);break;case"img":case"image":case"link":zt("error",M),zt("load",M);break;case"details":zt("toggle",M);break;case"input":He(M,R),zt("invalid",M);break;case"select":M._wrapperState={wasMultiple:!!R.multiple},zt("invalid",M);break;case"textarea":J2(M,R),zt("invalid",M)}e0(w,R),I=null;for(var F in R)if(R.hasOwnProperty(F)){var q=R[F];F==="children"?typeof q=="string"?M.textContent!==q&&(R.suppressHydrationWarning!==!0&&mp(M.textContent,q,p),I=["children",q]):typeof q=="number"&&M.textContent!==""+q&&(R.suppressHydrationWarning!==!0&&mp(M.textContent,q,p),I=["children",""+q]):a.hasOwnProperty(F)&&q!=null&&F==="onScroll"&&zt("scroll",M)}switch(w){case"input":xe(M),Or(M,R,!0);break;case"textarea":xe(M),tM(M);break;case"select":case"option":break;default:typeof R.onClick=="function"&&(M.onclick=xp)}M=I,g.updateQueue=M,M!==null&&(g.flags|=4)}else{F=I.nodeType===9?I:I.ownerDocument,p==="http://www.w3.org/1999/xhtml"&&(p=rM(w)),p==="http://www.w3.org/1999/xhtml"?w==="script"?(p=F.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild)):typeof M.is=="string"?p=F.createElement(w,{is:M.is}):(p=F.createElement(w),w==="select"&&(F=p,M.multiple?F.multiple=!0:M.size&&(F.size=M.size))):p=F.createElementNS(p,w),p[Ia]=g,p[yf]=M,pA(p,g,!1,!1),g.stateNode=p;e:{switch(F=t0(w,M),w){case"dialog":zt("cancel",p),zt("close",p),I=M;break;case"iframe":case"object":case"embed":zt("load",p),I=M;break;case"video":case"audio":for(I=0;I<pf.length;I++)zt(pf[I],p);I=M;break;case"source":zt("error",p),I=M;break;case"img":case"image":case"link":zt("error",p),zt("load",p),I=M;break;case"details":zt("toggle",p),I=M;break;case"input":He(p,M),I=ke(p,M),zt("invalid",p);break;case"option":I=M;break;case"select":p._wrapperState={wasMultiple:!!M.multiple},I=K({},M,{value:void 0}),zt("invalid",p);break;case"textarea":J2(p,M),I=ds(p,M),zt("invalid",p);break;default:I=M}e0(w,I),q=I;for(R in q)if(q.hasOwnProperty(R)){var J=q[R];R==="style"?iM(p,J):R==="dangerouslySetInnerHTML"?(J=J?J.__html:void 0,J!=null&&nM(p,J)):R==="children"?typeof J=="string"?(w!=="textarea"||J!=="")&&Xc(p,J):typeof J=="number"&&Xc(p,""+J):R!=="suppressContentEditableWarning"&&R!=="suppressHydrationWarning"&&R!=="autoFocus"&&(a.hasOwnProperty(R)?J!=null&&R==="onScroll"&&zt("scroll",p):J!=null&&T(p,R,J,F))}switch(w){case"input":xe(p),Or(p,M,!1);break;case"textarea":xe(p),tM(p);break;case"option":M.value!=null&&p.setAttribute("value",""+ve(M.value));break;case"select":p.multiple=!!M.multiple,R=M.value,R!=null?gn(p,!!M.multiple,R,!1):M.defaultValue!=null&&gn(p,!!M.multiple,M.defaultValue,!0);break;default:typeof I.onClick=="function"&&(p.onclick=xp)}switch(w){case"button":case"input":case"select":case"textarea":M=!!M.autoFocus;break e;case"img":M=!0;break e;default:M=!1}}M&&(g.flags|=4)}g.ref!==null&&(g.flags|=512,g.flags|=2097152)}return Br(g),null;case 6:if(p&&g.stateNode!=null)gA(p,g,p.memoizedProps,M);else{if(typeof M!="string"&&g.stateNode===null)throw Error(t(166));if(w=xs(_f.current),xs(Da.current),Mp(g)){if(M=g.stateNode,w=g.memoizedProps,M[Ia]=g,(R=M.nodeValue!==w)&&(p=mn,p!==null))switch(p.tag){case 3:mp(M.nodeValue,w,(p.mode&1)!==0);break;case 5:p.memoizedProps.suppressHydrationWarning!==!0&&mp(M.nodeValue,w,(p.mode&1)!==0)}R&&(g.flags|=4)}else M=(w.nodeType===9?w:w.ownerDocument).createTextNode(M),M[Ia]=g,g.stateNode=M}return Br(g),null;case 13:if(Ot(Bt),M=g.memoizedState,p===null||p.memoizedState!==null&&p.memoizedState.dehydrated!==null){if(Nt&&xn!==null&&(g.mode&1)!==0&&(g.flags&128)===0)xk(),nu(),g.flags|=98560,R=!1;else if(R=Mp(g),M!==null&&M.dehydrated!==null){if(p===null){if(!R)throw Error(t(318));if(R=g.memoizedState,R=R!==null?R.dehydrated:null,!R)throw Error(t(317));R[Ia]=g}else nu(),(g.flags&128)===0&&(g.memoizedState=null),g.flags|=4;Br(g),R=!1}else sa!==null&&(Px(sa),sa=null),R=!0;if(!R)return g.flags&65536?g:null}return(g.flags&128)!==0?(g.lanes=w,g):(M=M!==null,M!==(p!==null&&p.memoizedState!==null)&&M&&(g.child.flags|=8192,(g.mode&1)!==0&&(p===null||(Bt.current&1)!==0?cr===0&&(cr=3):zx())),g.updateQueue!==null&&(g.flags|=4),Br(g),null);case 4:return su(),Sx(p,g),p===null&&vf(g.stateNode.containerInfo),Br(g),null;case 10:return X0(g.type._context),Br(g),null;case 17:return nn(g.type)&&bp(),Br(g),null;case 19:if(Ot(Bt),R=g.memoizedState,R===null)return Br(g),null;if(M=(g.flags&128)!==0,F=R.rendering,F===null)if(M)kf(R,!1);else{if(cr!==0||p!==null&&(p.flags&128)!==0)for(p=g.child;p!==null;){if(F=Pp(p),F!==null){for(g.flags|=128,kf(R,!1),M=F.updateQueue,M!==null&&(g.updateQueue=M,g.flags|=4),g.subtreeFlags=0,M=w,w=g.child;w!==null;)R=w,p=M,R.flags&=14680066,F=R.alternate,F===null?(R.childLanes=0,R.lanes=p,R.child=null,R.subtreeFlags=0,R.memoizedProps=null,R.memoizedState=null,R.updateQueue=null,R.dependencies=null,R.stateNode=null):(R.childLanes=F.childLanes,R.lanes=F.lanes,R.child=F.child,R.subtreeFlags=0,R.deletions=null,R.memoizedProps=F.memoizedProps,R.memoizedState=F.memoizedState,R.updateQueue=F.updateQueue,R.type=F.type,p=F.dependencies,R.dependencies=p===null?null:{lanes:p.lanes,firstContext:p.firstContext}),w=w.sibling;return Rt(Bt,Bt.current&1|2),g.child}p=p.sibling}R.tail!==null&&qt()>fu&&(g.flags|=128,M=!0,kf(R,!1),g.lanes=4194304)}else{if(!M)if(p=Pp(F),p!==null){if(g.flags|=128,M=!0,w=p.updateQueue,w!==null&&(g.updateQueue=w,g.flags|=4),kf(R,!0),R.tail===null&&R.tailMode==="hidden"&&!F.alternate&&!Nt)return Br(g),null}else 2*qt()-R.renderingStartTime>fu&&w!==1073741824&&(g.flags|=128,M=!0,kf(R,!1),g.lanes=4194304);R.isBackwards?(F.sibling=g.child,g.child=F):(w=R.last,w!==null?w.sibling=F:g.child=F,R.last=F)}return R.tail!==null?(g=R.tail,R.rendering=g,R.tail=g.sibling,R.renderingStartTime=qt(),g.sibling=null,w=Bt.current,Rt(Bt,M?w&1|2:w&1),g):(Br(g),null);case 22:case 23:return Ex(),M=g.memoizedState!==null,p!==null&&p.memoizedState!==null!==M&&(g.flags|=8192),M&&(g.mode&1)!==0?(Sn&1073741824)!==0&&(Br(g),g.subtreeFlags&6&&(g.flags|=8192)):Br(g),null;case 24:return null;case 25:return null}throw Error(t(156,g.tag))}function U8(p,g){switch(G0(g),g.tag){case 1:return nn(g.type)&&bp(),p=g.flags,p&65536?(g.flags=p&-65537|128,g):null;case 3:return su(),Ot(rn),Ot(Nr),tx(),p=g.flags,(p&65536)!==0&&(p&128)===0?(g.flags=p&-65537|128,g):null;case 5:return J0(g),null;case 13:if(Ot(Bt),p=g.memoizedState,p!==null&&p.dehydrated!==null){if(g.alternate===null)throw Error(t(340));nu()}return p=g.flags,p&65536?(g.flags=p&-65537|128,g):null;case 19:return Ot(Bt),null;case 4:return su(),null;case 10:return X0(g.type._context),null;case 22:case 23:return Ex(),null;case 24:return null;default:return null}}var Vp=!1,Fr=!1,Y8=typeof WeakSet=="function"?WeakSet:Set,Be=null;function uu(p,g){var w=p.ref;if(w!==null)if(typeof w=="function")try{w(null)}catch(M){$t(p,g,M)}else w.current=null}function bx(p,g,w){try{w()}catch(M){$t(p,g,M)}}var yA=!1;function X8(p,g){if(R0=sp,p=ZM(),C0(p)){if("selectionStart"in p)var w={start:p.selectionStart,end:p.selectionEnd};else e:{w=(w=p.ownerDocument)&&w.defaultView||window;var M=w.getSelection&&w.getSelection();if(M&&M.rangeCount!==0){w=M.anchorNode;var I=M.anchorOffset,R=M.focusNode;M=M.focusOffset;try{w.nodeType,R.nodeType}catch{w=null;break e}var F=0,q=-1,J=-1,se=0,ge=0,me=p,de=null;t:for(;;){for(var Oe;me!==w||I!==0&&me.nodeType!==3||(q=F+I),me!==R||M!==0&&me.nodeType!==3||(J=F+M),me.nodeType===3&&(F+=me.nodeValue.length),(Oe=me.firstChild)!==null;)de=me,me=Oe;for(;;){if(me===p)break t;if(de===w&&++se===I&&(q=F),de===R&&++ge===M&&(J=F),(Oe=me.nextSibling)!==null)break;me=de,de=me.parentNode}me=Oe}w=q===-1||J===-1?null:{start:q,end:J}}else w=null}w=w||{start:0,end:0}}else w=null;for(E0={focusedElem:p,selectionRange:w},sp=!1,Be=g;Be!==null;)if(g=Be,p=g.child,(g.subtreeFlags&1028)!==0&&p!==null)p.return=g,Be=p;else for(;Be!==null;){g=Be;try{var Fe=g.alternate;if((g.flags&1024)!==0)switch(g.tag){case 0:case 11:case 15:break;case 1:if(Fe!==null){var Ve=Fe.memoizedProps,Qt=Fe.memoizedState,ne=g.stateNode,te=ne.getSnapshotBeforeUpdate(g.elementType===g.type?Ve:la(g.type,Ve),Qt);ne.__reactInternalSnapshotBeforeUpdate=te}break;case 3:var oe=g.stateNode.containerInfo;oe.nodeType===1?oe.textContent="":oe.nodeType===9&&oe.documentElement&&oe.removeChild(oe.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(be){$t(g,g.return,be)}if(p=g.sibling,p!==null){p.return=g.return,Be=p;break}Be=g.return}return Fe=yA,yA=!1,Fe}function Af(p,g,w){var M=g.updateQueue;if(M=M!==null?M.lastEffect:null,M!==null){var I=M=M.next;do{if((I.tag&p)===p){var R=I.destroy;I.destroy=void 0,R!==void 0&&bx(g,w,R)}I=I.next}while(I!==M)}}function Gp(p,g){if(g=g.updateQueue,g=g!==null?g.lastEffect:null,g!==null){var w=g=g.next;do{if((w.tag&p)===p){var M=w.create;w.destroy=M()}w=w.next}while(w!==g)}}function _x(p){var g=p.ref;if(g!==null){var w=p.stateNode;switch(p.tag){case 5:p=w;break;default:p=w}typeof g=="function"?g(p):g.current=p}}function mA(p){var g=p.alternate;g!==null&&(p.alternate=null,mA(g)),p.child=null,p.deletions=null,p.sibling=null,p.tag===5&&(g=p.stateNode,g!==null&&(delete g[Ia],delete g[yf],delete g[j0],delete g[I8],delete g[D8])),p.stateNode=null,p.return=null,p.dependencies=null,p.memoizedProps=null,p.memoizedState=null,p.pendingProps=null,p.stateNode=null,p.updateQueue=null}function xA(p){return p.tag===5||p.tag===3||p.tag===4}function SA(p){e:for(;;){for(;p.sibling===null;){if(p.return===null||xA(p.return))return null;p=p.return}for(p.sibling.return=p.return,p=p.sibling;p.tag!==5&&p.tag!==6&&p.tag!==18;){if(p.flags&2||p.child===null||p.tag===4)continue e;p.child.return=p,p=p.child}if(!(p.flags&2))return p.stateNode}}function Tx(p,g,w){var M=p.tag;if(M===5||M===6)p=p.stateNode,g?w.nodeType===8?w.parentNode.insertBefore(p,g):w.insertBefore(p,g):(w.nodeType===8?(g=w.parentNode,g.insertBefore(p,w)):(g=w,g.appendChild(p)),w=w._reactRootContainer,w!=null||g.onclick!==null||(g.onclick=xp));else if(M!==4&&(p=p.child,p!==null))for(Tx(p,g,w),p=p.sibling;p!==null;)Tx(p,g,w),p=p.sibling}function Cx(p,g,w){var M=p.tag;if(M===5||M===6)p=p.stateNode,g?w.insertBefore(p,g):w.appendChild(p);else if(M!==4&&(p=p.child,p!==null))for(Cx(p,g,w),p=p.sibling;p!==null;)Cx(p,g,w),p=p.sibling}var kr=null,ua=!1;function yo(p,g,w){for(w=w.child;w!==null;)bA(p,g,w),w=w.sibling}function bA(p,g,w){if(La&&typeof La.onCommitFiberUnmount=="function")try{La.onCommitFiberUnmount(tp,w)}catch{}switch(w.tag){case 5:Fr||uu(w,g);case 6:var M=kr,I=ua;kr=null,yo(p,g,w),kr=M,ua=I,kr!==null&&(ua?(p=kr,w=w.stateNode,p.nodeType===8?p.parentNode.removeChild(w):p.removeChild(w)):kr.removeChild(w.stateNode));break;case 18:kr!==null&&(ua?(p=kr,w=w.stateNode,p.nodeType===8?N0(p.parentNode,w):p.nodeType===1&&N0(p,w),of(p)):N0(kr,w.stateNode));break;case 4:M=kr,I=ua,kr=w.stateNode.containerInfo,ua=!0,yo(p,g,w),kr=M,ua=I;break;case 0:case 11:case 14:case 15:if(!Fr&&(M=w.updateQueue,M!==null&&(M=M.lastEffect,M!==null))){I=M=M.next;do{var R=I,F=R.destroy;R=R.tag,F!==void 0&&((R&2)!==0||(R&4)!==0)&&bx(w,g,F),I=I.next}while(I!==M)}yo(p,g,w);break;case 1:if(!Fr&&(uu(w,g),M=w.stateNode,typeof M.componentWillUnmount=="function"))try{M.props=w.memoizedProps,M.state=w.memoizedState,M.componentWillUnmount()}catch(q){$t(w,g,q)}yo(p,g,w);break;case 21:yo(p,g,w);break;case 22:w.mode&1?(Fr=(M=Fr)||w.memoizedState!==null,yo(p,g,w),Fr=M):yo(p,g,w);break;default:yo(p,g,w)}}function _A(p){var g=p.updateQueue;if(g!==null){p.updateQueue=null;var w=p.stateNode;w===null&&(w=p.stateNode=new Y8),g.forEach(function(M){var I=nG.bind(null,p,M);w.has(M)||(w.add(M),M.then(I,I))})}}function ca(p,g){var w=g.deletions;if(w!==null)for(var M=0;M<w.length;M++){var I=w[M];try{var R=p,F=g,q=F;e:for(;q!==null;){switch(q.tag){case 5:kr=q.stateNode,ua=!1;break e;case 3:kr=q.stateNode.containerInfo,ua=!0;break e;case 4:kr=q.stateNode.containerInfo,ua=!0;break e}q=q.return}if(kr===null)throw Error(t(160));bA(R,F,I),kr=null,ua=!1;var J=I.alternate;J!==null&&(J.return=null),I.return=null}catch(se){$t(I,g,se)}}if(g.subtreeFlags&12854)for(g=g.child;g!==null;)wA(g,p),g=g.sibling}function wA(p,g){var w=p.alternate,M=p.flags;switch(p.tag){case 0:case 11:case 14:case 15:if(ca(g,p),Ra(p),M&4){try{Af(3,p,p.return),Gp(3,p)}catch(Ve){$t(p,p.return,Ve)}try{Af(5,p,p.return)}catch(Ve){$t(p,p.return,Ve)}}break;case 1:ca(g,p),Ra(p),M&512&&w!==null&&uu(w,w.return);break;case 5:if(ca(g,p),Ra(p),M&512&&w!==null&&uu(w,w.return),p.flags&32){var I=p.stateNode;try{Xc(I,"")}catch(Ve){$t(p,p.return,Ve)}}if(M&4&&(I=p.stateNode,I!=null)){var R=p.memoizedProps,F=w!==null?w.memoizedProps:R,q=p.type,J=p.updateQueue;if(p.updateQueue=null,J!==null)try{q==="input"&&R.type==="radio"&&R.name!=null&&tt(I,R),t0(q,F);var se=t0(q,R);for(F=0;F<J.length;F+=2){var ge=J[F],me=J[F+1];ge==="style"?iM(I,me):ge==="dangerouslySetInnerHTML"?nM(I,me):ge==="children"?Xc(I,me):T(I,ge,me,se)}switch(q){case"input":_t(I,R);break;case"textarea":eM(I,R);break;case"select":var de=I._wrapperState.wasMultiple;I._wrapperState.wasMultiple=!!R.multiple;var Oe=R.value;Oe!=null?gn(I,!!R.multiple,Oe,!1):de!==!!R.multiple&&(R.defaultValue!=null?gn(I,!!R.multiple,R.defaultValue,!0):gn(I,!!R.multiple,R.multiple?[]:"",!1))}I[yf]=R}catch(Ve){$t(p,p.return,Ve)}}break;case 6:if(ca(g,p),Ra(p),M&4){if(p.stateNode===null)throw Error(t(162));I=p.stateNode,R=p.memoizedProps;try{I.nodeValue=R}catch(Ve){$t(p,p.return,Ve)}}break;case 3:if(ca(g,p),Ra(p),M&4&&w!==null&&w.memoizedState.isDehydrated)try{of(g.containerInfo)}catch(Ve){$t(p,p.return,Ve)}break;case 4:ca(g,p),Ra(p);break;case 13:ca(g,p),Ra(p),I=p.child,I.flags&8192&&(R=I.memoizedState!==null,I.stateNode.isHidden=R,!R||I.alternate!==null&&I.alternate.memoizedState!==null||(Ax=qt())),M&4&&_A(p);break;case 22:if(ge=w!==null&&w.memoizedState!==null,p.mode&1?(Fr=(se=Fr)||ge,ca(g,p),Fr=se):ca(g,p),Ra(p),M&8192){if(se=p.memoizedState!==null,(p.stateNode.isHidden=se)&&!ge&&(p.mode&1)!==0)for(Be=p,ge=p.child;ge!==null;){for(me=Be=ge;Be!==null;){switch(de=Be,Oe=de.child,de.tag){case 0:case 11:case 14:case 15:Af(4,de,de.return);break;case 1:uu(de,de.return);var Fe=de.stateNode;if(typeof Fe.componentWillUnmount=="function"){M=de,w=de.return;try{g=M,Fe.props=g.memoizedProps,Fe.state=g.memoizedState,Fe.componentWillUnmount()}catch(Ve){$t(M,w,Ve)}}break;case 5:uu(de,de.return);break;case 22:if(de.memoizedState!==null){MA(me);continue}}Oe!==null?(Oe.return=de,Be=Oe):MA(me)}ge=ge.sibling}e:for(ge=null,me=p;;){if(me.tag===5){if(ge===null){ge=me;try{I=me.stateNode,se?(R=I.style,typeof R.setProperty=="function"?R.setProperty("display","none","important"):R.display="none"):(q=me.stateNode,J=me.memoizedProps.style,F=J!=null&&J.hasOwnProperty("display")?J.display:null,q.style.display=aM("display",F))}catch(Ve){$t(p,p.return,Ve)}}}else if(me.tag===6){if(ge===null)try{me.stateNode.nodeValue=se?"":me.memoizedProps}catch(Ve){$t(p,p.return,Ve)}}else if((me.tag!==22&&me.tag!==23||me.memoizedState===null||me===p)&&me.child!==null){me.child.return=me,me=me.child;continue}if(me===p)break e;for(;me.sibling===null;){if(me.return===null||me.return===p)break e;ge===me&&(ge=null),me=me.return}ge===me&&(ge=null),me.sibling.return=me.return,me=me.sibling}}break;case 19:ca(g,p),Ra(p),M&4&&_A(p);break;case 21:break;default:ca(g,p),Ra(p)}}function Ra(p){var g=p.flags;if(g&2){try{e:{for(var w=p.return;w!==null;){if(xA(w)){var M=w;break e}w=w.return}throw Error(t(160))}switch(M.tag){case 5:var I=M.stateNode;M.flags&32&&(Xc(I,""),M.flags&=-33);var R=SA(p);Cx(p,R,I);break;case 3:case 4:var F=M.stateNode.containerInfo,q=SA(p);Tx(p,q,F);break;default:throw Error(t(161))}}catch(J){$t(p,p.return,J)}p.flags&=-3}g&4096&&(p.flags&=-4097)}function Z8(p,g,w){Be=p,TA(p)}function TA(p,g,w){for(var M=(p.mode&1)!==0;Be!==null;){var I=Be,R=I.child;if(I.tag===22&&M){var F=I.memoizedState!==null||Vp;if(!F){var q=I.alternate,J=q!==null&&q.memoizedState!==null||Fr;q=Vp;var se=Fr;if(Vp=F,(Fr=J)&&!se)for(Be=I;Be!==null;)F=Be,J=F.child,F.tag===22&&F.memoizedState!==null?kA(I):J!==null?(J.return=F,Be=J):kA(I);for(;R!==null;)Be=R,TA(R),R=R.sibling;Be=I,Vp=q,Fr=se}CA(p)}else(I.subtreeFlags&8772)!==0&&R!==null?(R.return=I,Be=R):CA(p)}}function CA(p){for(;Be!==null;){var g=Be;if((g.flags&8772)!==0){var w=g.alternate;try{if((g.flags&8772)!==0)switch(g.tag){case 0:case 11:case 15:Fr||Gp(5,g);break;case 1:var M=g.stateNode;if(g.flags&4&&!Fr)if(w===null)M.componentDidMount();else{var I=g.elementType===g.type?w.memoizedProps:la(g.type,w.memoizedProps);M.componentDidUpdate(I,w.memoizedState,M.__reactInternalSnapshotBeforeUpdate)}var R=g.updateQueue;R!==null&&Mk(g,R,M);break;case 3:var F=g.updateQueue;if(F!==null){if(w=null,g.child!==null)switch(g.child.tag){case 5:w=g.child.stateNode;break;case 1:w=g.child.stateNode}Mk(g,F,w)}break;case 5:var q=g.stateNode;if(w===null&&g.flags&4){w=q;var J=g.memoizedProps;switch(g.type){case"button":case"input":case"select":case"textarea":J.autoFocus&&w.focus();break;case"img":J.src&&(w.src=J.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(g.memoizedState===null){var se=g.alternate;if(se!==null){var ge=se.memoizedState;if(ge!==null){var me=ge.dehydrated;me!==null&&of(me)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}Fr||g.flags&512&&_x(g)}catch(de){$t(g,g.return,de)}}if(g===p){Be=null;break}if(w=g.sibling,w!==null){w.return=g.return,Be=w;break}Be=g.return}}function MA(p){for(;Be!==null;){var g=Be;if(g===p){Be=null;break}var w=g.sibling;if(w!==null){w.return=g.return,Be=w;break}Be=g.return}}function kA(p){for(;Be!==null;){var g=Be;try{switch(g.tag){case 0:case 11:case 15:var w=g.return;try{Gp(4,g)}catch(J){$t(g,w,J)}break;case 1:var M=g.stateNode;if(typeof M.componentDidMount=="function"){var I=g.return;try{M.componentDidMount()}catch(J){$t(g,I,J)}}var R=g.return;try{_x(g)}catch(J){$t(g,R,J)}break;case 5:var F=g.return;try{_x(g)}catch(J){$t(g,F,J)}}}catch(J){$t(g,g.return,J)}if(g===p){Be=null;break}var q=g.sibling;if(q!==null){q.return=g.return,Be=q;break}Be=g.return}}var K8=Math.ceil,Wp=C.ReactCurrentDispatcher,Mx=C.ReactCurrentOwner,Nn=C.ReactCurrentBatchConfig,xt=0,xr=null,nr=null,Ar=0,Sn=0,cu=fo(0),cr=0,Lf=null,bs=0,$p=0,kx=0,If=null,on=null,Ax=0,fu=1/0,Si=null,Hp=!1,Lx=null,mo=null,Up=!1,xo=null,Yp=0,Df=0,Ix=null,Xp=-1,Zp=0;function Xr(){return(xt&6)!==0?qt():Xp!==-1?Xp:Xp=qt()}function So(p){return(p.mode&1)===0?1:(xt&2)!==0&&Ar!==0?Ar&-Ar:R8.transition!==null?(Zp===0&&(Zp=SM()),Zp):(p=kt,p!==0||(p=window.event,p=p===void 0?16:LM(p.type)),p)}function fa(p,g,w,M){if(50<Df)throw Df=0,Ix=null,Error(t(185));ef(p,w,M),((xt&2)===0||p!==xr)&&(p===xr&&((xt&2)===0&&($p|=w),cr===4&&bo(p,Ar)),sn(p,M),w===1&&xt===0&&(g.mode&1)===0&&(fu=qt()+500,wp&&po()))}function sn(p,g){var w=p.callbackNode;RV(p,g);var M=ap(p,p===xr?Ar:0);if(M===0)w!==null&&yM(w),p.callbackNode=null,p.callbackPriority=0;else if(g=M&-M,p.callbackPriority!==g){if(w!=null&&yM(w),g===1)p.tag===0?P8(LA.bind(null,p)):pk(LA.bind(null,p)),A8(function(){(xt&6)===0&&po()}),w=null;else{switch(bM(M)){case 1:w=l0;break;case 4:w=mM;break;case 16:w=ep;break;case 536870912:w=xM;break;default:w=ep}w=NA(w,AA.bind(null,p))}p.callbackPriority=g,p.callbackNode=w}}function AA(p,g){if(Xp=-1,Zp=0,(xt&6)!==0)throw Error(t(327));var w=p.callbackNode;if(du()&&p.callbackNode!==w)return null;var M=ap(p,p===xr?Ar:0);if(M===0)return null;if((M&30)!==0||(M&p.expiredLanes)!==0||g)g=Kp(p,M);else{g=M;var I=xt;xt|=2;var R=DA();(xr!==p||Ar!==g)&&(Si=null,fu=qt()+500,ws(p,g));do try{J8();break}catch(q){IA(p,q)}while(!0);Y0(),Wp.current=R,xt=I,nr!==null?g=0:(xr=null,Ar=0,g=cr)}if(g!==0){if(g===2&&(I=u0(p),I!==0&&(M=I,g=Dx(p,I))),g===1)throw w=Lf,ws(p,0),bo(p,M),sn(p,qt()),w;if(g===6)bo(p,M);else{if(I=p.current.alternate,(M&30)===0&&!q8(I)&&(g=Kp(p,M),g===2&&(R=u0(p),R!==0&&(M=R,g=Dx(p,R))),g===1))throw w=Lf,ws(p,0),bo(p,M),sn(p,qt()),w;switch(p.finishedWork=I,p.finishedLanes=M,g){case 0:case 1:throw Error(t(345));case 2:Ts(p,on,Si);break;case 3:if(bo(p,M),(M&130023424)===M&&(g=Ax+500-qt(),10<g)){if(ap(p,0)!==0)break;if(I=p.suspendedLanes,(I&M)!==M){Xr(),p.pingedLanes|=p.suspendedLanes&I;break}p.timeoutHandle=O0(Ts.bind(null,p,on,Si),g);break}Ts(p,on,Si);break;case 4:if(bo(p,M),(M&4194240)===M)break;for(g=p.eventTimes,I=-1;0<M;){var F=31-ia(M);R=1<<F,F=g[F],F>I&&(I=F),M&=~R}if(M=I,M=qt()-M,M=(120>M?120:480>M?480:1080>M?1080:1920>M?1920:3e3>M?3e3:4320>M?4320:1960*K8(M/1960))-M,10<M){p.timeoutHandle=O0(Ts.bind(null,p,on,Si),M);break}Ts(p,on,Si);break;case 5:Ts(p,on,Si);break;default:throw Error(t(329))}}}return sn(p,qt()),p.callbackNode===w?AA.bind(null,p):null}function Dx(p,g){var w=If;return p.current.memoizedState.isDehydrated&&(ws(p,g).flags|=256),p=Kp(p,g),p!==2&&(g=on,on=w,g!==null&&Px(g)),p}function Px(p){on===null?on=p:on.push.apply(on,p)}function q8(p){for(var g=p;;){if(g.flags&16384){var w=g.updateQueue;if(w!==null&&(w=w.stores,w!==null))for(var M=0;M<w.length;M++){var I=w[M],R=I.getSnapshot;I=I.value;try{if(!oa(R(),I))return!1}catch{return!1}}}if(w=g.child,g.subtreeFlags&16384&&w!==null)w.return=g,g=w;else{if(g===p)break;for(;g.sibling===null;){if(g.return===null||g.return===p)return!0;g=g.return}g.sibling.return=g.return,g=g.sibling}}return!0}function bo(p,g){for(g&=~kx,g&=~$p,p.suspendedLanes|=g,p.pingedLanes&=~g,p=p.expirationTimes;0<g;){var w=31-ia(g),M=1<<w;p[w]=-1,g&=~M}}function LA(p){if((xt&6)!==0)throw Error(t(327));du();var g=ap(p,0);if((g&1)===0)return sn(p,qt()),null;var w=Kp(p,g);if(p.tag!==0&&w===2){var M=u0(p);M!==0&&(g=M,w=Dx(p,M))}if(w===1)throw w=Lf,ws(p,0),bo(p,g),sn(p,qt()),w;if(w===6)throw Error(t(345));return p.finishedWork=p.current.alternate,p.finishedLanes=g,Ts(p,on,Si),sn(p,qt()),null}function Rx(p,g){var w=xt;xt|=1;try{return p(g)}finally{xt=w,xt===0&&(fu=qt()+500,wp&&po())}}function _s(p){xo!==null&&xo.tag===0&&(xt&6)===0&&du();var g=xt;xt|=1;var w=Nn.transition,M=kt;try{if(Nn.transition=null,kt=1,p)return p()}finally{kt=M,Nn.transition=w,xt=g,(xt&6)===0&&po()}}function Ex(){Sn=cu.current,Ot(cu)}function ws(p,g){p.finishedWork=null,p.finishedLanes=0;var w=p.timeoutHandle;if(w!==-1&&(p.timeoutHandle=-1,k8(w)),nr!==null)for(w=nr.return;w!==null;){var M=w;switch(G0(M),M.tag){case 1:M=M.type.childContextTypes,M!=null&&bp();break;case 3:su(),Ot(rn),Ot(Nr),tx();break;case 5:J0(M);break;case 4:su();break;case 13:Ot(Bt);break;case 19:Ot(Bt);break;case 10:X0(M.type._context);break;case 22:case 23:Ex()}w=w.return}if(xr=p,nr=p=_o(p.current,null),Ar=Sn=g,cr=0,Lf=null,kx=$p=bs=0,on=If=null,ms!==null){for(g=0;g<ms.length;g++)if(w=ms[g],M=w.interleaved,M!==null){w.interleaved=null;var I=M.next,R=w.pending;if(R!==null){var F=R.next;R.next=I,M.next=F}w.pending=M}ms=null}return p}function IA(p,g){do{var w=nr;try{if(Y0(),Rp.current=Np,Ep){for(var M=Ft.memoizedState;M!==null;){var I=M.queue;I!==null&&(I.pending=null),M=M.next}Ep=!1}if(Ss=0,mr=ur=Ft=null,wf=!1,Tf=0,Mx.current=null,w===null||w.return===null){cr=1,Lf=g,nr=null;break}e:{var R=p,F=w.return,q=w,J=g;if(g=Ar,q.flags|=32768,J!==null&&typeof J=="object"&&typeof J.then=="function"){var se=J,ge=q,me=ge.tag;if((ge.mode&1)===0&&(me===0||me===11||me===15)){var de=ge.alternate;de?(ge.updateQueue=de.updateQueue,ge.memoizedState=de.memoizedState,ge.lanes=de.lanes):(ge.updateQueue=null,ge.memoizedState=null)}var Oe=tA(F);if(Oe!==null){Oe.flags&=-257,rA(Oe,F,q,R,g),Oe.mode&1&&eA(R,se,g),g=Oe,J=se;var Fe=g.updateQueue;if(Fe===null){var Ve=new Set;Ve.add(J),g.updateQueue=Ve}else Fe.add(J);break e}else{if((g&1)===0){eA(R,se,g),zx();break e}J=Error(t(426))}}else if(Nt&&q.mode&1){var Qt=tA(F);if(Qt!==null){(Qt.flags&65536)===0&&(Qt.flags|=256),rA(Qt,F,q,R,g),H0(lu(J,q));break e}}R=J=lu(J,q),cr!==4&&(cr=2),If===null?If=[R]:If.push(R),R=F;do{switch(R.tag){case 3:R.flags|=65536,g&=-g,R.lanes|=g;var ne=Qk(R,J,g);Ck(R,ne);break e;case 1:q=J;var te=R.type,oe=R.stateNode;if((R.flags&128)===0&&(typeof te.getDerivedStateFromError=="function"||oe!==null&&typeof oe.componentDidCatch=="function"&&(mo===null||!mo.has(oe)))){R.flags|=65536,g&=-g,R.lanes|=g;var be=Jk(R,q,g);Ck(R,be);break e}}R=R.return}while(R!==null)}RA(w)}catch(We){g=We,nr===w&&w!==null&&(nr=w=w.return);continue}break}while(!0)}function DA(){var p=Wp.current;return Wp.current=Np,p===null?Np:p}function zx(){(cr===0||cr===3||cr===2)&&(cr=4),xr===null||(bs&268435455)===0&&($p&268435455)===0||bo(xr,Ar)}function Kp(p,g){var w=xt;xt|=2;var M=DA();(xr!==p||Ar!==g)&&(Si=null,ws(p,g));do try{Q8();break}catch(I){IA(p,I)}while(!0);if(Y0(),xt=w,Wp.current=M,nr!==null)throw Error(t(261));return xr=null,Ar=0,cr}function Q8(){for(;nr!==null;)PA(nr)}function J8(){for(;nr!==null&&!TV();)PA(nr)}function PA(p){var g=OA(p.alternate,p,Sn);p.memoizedProps=p.pendingProps,g===null?RA(p):nr=g,Mx.current=null}function RA(p){var g=p;do{var w=g.alternate;if(p=g.return,(g.flags&32768)===0){if(w=H8(w,g,Sn),w!==null){nr=w;return}}else{if(w=U8(w,g),w!==null){w.flags&=32767,nr=w;return}if(p!==null)p.flags|=32768,p.subtreeFlags=0,p.deletions=null;else{cr=6,nr=null;return}}if(g=g.sibling,g!==null){nr=g;return}nr=g=p}while(g!==null);cr===0&&(cr=5)}function Ts(p,g,w){var M=kt,I=Nn.transition;try{Nn.transition=null,kt=1,eG(p,g,w,M)}finally{Nn.transition=I,kt=M}return null}function eG(p,g,w,M){do du();while(xo!==null);if((xt&6)!==0)throw Error(t(327));w=p.finishedWork;var I=p.finishedLanes;if(w===null)return null;if(p.finishedWork=null,p.finishedLanes=0,w===p.current)throw Error(t(177));p.callbackNode=null,p.callbackPriority=0;var R=w.lanes|w.childLanes;if(EV(p,R),p===xr&&(nr=xr=null,Ar=0),(w.subtreeFlags&2064)===0&&(w.flags&2064)===0||Up||(Up=!0,NA(ep,function(){return du(),null})),R=(w.flags&15990)!==0,(w.subtreeFlags&15990)!==0||R){R=Nn.transition,Nn.transition=null;var F=kt;kt=1;var q=xt;xt|=4,Mx.current=null,X8(p,w),wA(w,p),S8(E0),sp=!!R0,E0=R0=null,p.current=w,Z8(w),CV(),xt=q,kt=F,Nn.transition=R}else p.current=w;if(Up&&(Up=!1,xo=p,Yp=I),R=p.pendingLanes,R===0&&(mo=null),AV(w.stateNode),sn(p,qt()),g!==null)for(M=p.onRecoverableError,w=0;w<g.length;w++)I=g[w],M(I.value,{componentStack:I.stack,digest:I.digest});if(Hp)throw Hp=!1,p=Lx,Lx=null,p;return(Yp&1)!==0&&p.tag!==0&&du(),R=p.pendingLanes,(R&1)!==0?p===Ix?Df++:(Df=0,Ix=p):Df=0,po(),null}function du(){if(xo!==null){var p=bM(Yp),g=Nn.transition,w=kt;try{if(Nn.transition=null,kt=16>p?16:p,xo===null)var M=!1;else{if(p=xo,xo=null,Yp=0,(xt&6)!==0)throw Error(t(331));var I=xt;for(xt|=4,Be=p.current;Be!==null;){var R=Be,F=R.child;if((Be.flags&16)!==0){var q=R.deletions;if(q!==null){for(var J=0;J<q.length;J++){var se=q[J];for(Be=se;Be!==null;){var ge=Be;switch(ge.tag){case 0:case 11:case 15:Af(8,ge,R)}var me=ge.child;if(me!==null)me.return=ge,Be=me;else for(;Be!==null;){ge=Be;var de=ge.sibling,Oe=ge.return;if(mA(ge),ge===se){Be=null;break}if(de!==null){de.return=Oe,Be=de;break}Be=Oe}}}var Fe=R.alternate;if(Fe!==null){var Ve=Fe.child;if(Ve!==null){Fe.child=null;do{var Qt=Ve.sibling;Ve.sibling=null,Ve=Qt}while(Ve!==null)}}Be=R}}if((R.subtreeFlags&2064)!==0&&F!==null)F.return=R,Be=F;else e:for(;Be!==null;){if(R=Be,(R.flags&2048)!==0)switch(R.tag){case 0:case 11:case 15:Af(9,R,R.return)}var ne=R.sibling;if(ne!==null){ne.return=R.return,Be=ne;break e}Be=R.return}}var te=p.current;for(Be=te;Be!==null;){F=Be;var oe=F.child;if((F.subtreeFlags&2064)!==0&&oe!==null)oe.return=F,Be=oe;else e:for(F=te;Be!==null;){if(q=Be,(q.flags&2048)!==0)try{switch(q.tag){case 0:case 11:case 15:Gp(9,q)}}catch(We){$t(q,q.return,We)}if(q===F){Be=null;break e}var be=q.sibling;if(be!==null){be.return=q.return,Be=be;break e}Be=q.return}}if(xt=I,po(),La&&typeof La.onPostCommitFiberRoot=="function")try{La.onPostCommitFiberRoot(tp,p)}catch{}M=!0}return M}finally{kt=w,Nn.transition=g}}return!1}function EA(p,g,w){g=lu(w,g),g=Qk(p,g,1),p=go(p,g,1),g=Xr(),p!==null&&(ef(p,1,g),sn(p,g))}function $t(p,g,w){if(p.tag===3)EA(p,p,w);else for(;g!==null;){if(g.tag===3){EA(g,p,w);break}else if(g.tag===1){var M=g.stateNode;if(typeof g.type.getDerivedStateFromError=="function"||typeof M.componentDidCatch=="function"&&(mo===null||!mo.has(M))){p=lu(w,p),p=Jk(g,p,1),g=go(g,p,1),p=Xr(),g!==null&&(ef(g,1,p),sn(g,p));break}}g=g.return}}function tG(p,g,w){var M=p.pingCache;M!==null&&M.delete(g),g=Xr(),p.pingedLanes|=p.suspendedLanes&w,xr===p&&(Ar&w)===w&&(cr===4||cr===3&&(Ar&130023424)===Ar&&500>qt()-Ax?ws(p,0):kx|=w),sn(p,g)}function zA(p,g){g===0&&((p.mode&1)===0?g=1:(g=np,np<<=1,(np&130023424)===0&&(np=4194304)));var w=Xr();p=yi(p,g),p!==null&&(ef(p,g,w),sn(p,w))}function rG(p){var g=p.memoizedState,w=0;g!==null&&(w=g.retryLane),zA(p,w)}function nG(p,g){var w=0;switch(p.tag){case 13:var M=p.stateNode,I=p.memoizedState;I!==null&&(w=I.retryLane);break;case 19:M=p.stateNode;break;default:throw Error(t(314))}M!==null&&M.delete(g),zA(p,w)}var OA;OA=function(p,g,w){if(p!==null)if(p.memoizedProps!==g.pendingProps||rn.current)an=!0;else{if((p.lanes&w)===0&&(g.flags&128)===0)return an=!1,$8(p,g,w);an=(p.flags&131072)!==0}else an=!1,Nt&&(g.flags&1048576)!==0&&vk(g,Cp,g.index);switch(g.lanes=0,g.tag){case 2:var M=g.type;Fp(p,g),p=g.pendingProps;var I=eu(g,Nr.current);ou(g,w),I=ax(null,g,M,p,I,w);var R=ix();return g.flags|=1,typeof I=="object"&&I!==null&&typeof I.render=="function"&&I.$$typeof===void 0?(g.tag=1,g.memoizedState=null,g.updateQueue=null,nn(M)?(R=!0,_p(g)):R=!1,g.memoizedState=I.state!==null&&I.state!==void 0?I.state:null,q0(g),I.updater=jp,g.stateNode=I,I._reactInternals=g,fx(g,M,p,w),g=vx(null,g,M,!0,R,w)):(g.tag=0,Nt&&R&&V0(g),Yr(null,g,I,w),g=g.child),g;case 16:M=g.elementType;e:{switch(Fp(p,g),p=g.pendingProps,I=M._init,M=I(M._payload),g.type=M,I=g.tag=iG(M),p=la(M,p),I){case 0:g=px(null,g,M,p,w);break e;case 1:g=lA(null,g,M,p,w);break e;case 11:g=nA(null,g,M,p,w);break e;case 14:g=aA(null,g,M,la(M.type,p),w);break e}throw Error(t(306,M,""))}return g;case 0:return M=g.type,I=g.pendingProps,I=g.elementType===M?I:la(M,I),px(p,g,M,I,w);case 1:return M=g.type,I=g.pendingProps,I=g.elementType===M?I:la(M,I),lA(p,g,M,I,w);case 3:e:{if(uA(g),p===null)throw Error(t(387));M=g.pendingProps,R=g.memoizedState,I=R.element,Tk(p,g),Dp(g,M,null,w);var F=g.memoizedState;if(M=F.element,R.isDehydrated)if(R={element:M,isDehydrated:!1,cache:F.cache,pendingSuspenseBoundaries:F.pendingSuspenseBoundaries,transitions:F.transitions},g.updateQueue.baseState=R,g.memoizedState=R,g.flags&256){I=lu(Error(t(423)),g),g=cA(p,g,M,w,I);break e}else if(M!==I){I=lu(Error(t(424)),g),g=cA(p,g,M,w,I);break e}else for(xn=co(g.stateNode.containerInfo.firstChild),mn=g,Nt=!0,sa=null,w=_k(g,null,M,w),g.child=w;w;)w.flags=w.flags&-3|4096,w=w.sibling;else{if(nu(),M===I){g=xi(p,g,w);break e}Yr(p,g,M,w)}g=g.child}return g;case 5:return kk(g),p===null&&$0(g),M=g.type,I=g.pendingProps,R=p!==null?p.memoizedProps:null,F=I.children,z0(M,I)?F=null:R!==null&&z0(M,R)&&(g.flags|=32),sA(p,g),Yr(p,g,F,w),g.child;case 6:return p===null&&$0(g),null;case 13:return fA(p,g,w);case 4:return Q0(g,g.stateNode.containerInfo),M=g.pendingProps,p===null?g.child=au(g,null,M,w):Yr(p,g,M,w),g.child;case 11:return M=g.type,I=g.pendingProps,I=g.elementType===M?I:la(M,I),nA(p,g,M,I,w);case 7:return Yr(p,g,g.pendingProps,w),g.child;case 8:return Yr(p,g,g.pendingProps.children,w),g.child;case 12:return Yr(p,g,g.pendingProps.children,w),g.child;case 10:e:{if(M=g.type._context,I=g.pendingProps,R=g.memoizedProps,F=I.value,Rt(Ap,M._currentValue),M._currentValue=F,R!==null)if(oa(R.value,F)){if(R.children===I.children&&!rn.current){g=xi(p,g,w);break e}}else for(R=g.child,R!==null&&(R.return=g);R!==null;){var q=R.dependencies;if(q!==null){F=R.child;for(var J=q.firstContext;J!==null;){if(J.context===M){if(R.tag===1){J=mi(-1,w&-w),J.tag=2;var se=R.updateQueue;if(se!==null){se=se.shared;var ge=se.pending;ge===null?J.next=J:(J.next=ge.next,ge.next=J),se.pending=J}}R.lanes|=w,J=R.alternate,J!==null&&(J.lanes|=w),Z0(R.return,w,g),q.lanes|=w;break}J=J.next}}else if(R.tag===10)F=R.type===g.type?null:R.child;else if(R.tag===18){if(F=R.return,F===null)throw Error(t(341));F.lanes|=w,q=F.alternate,q!==null&&(q.lanes|=w),Z0(F,w,g),F=R.sibling}else F=R.child;if(F!==null)F.return=R;else for(F=R;F!==null;){if(F===g){F=null;break}if(R=F.sibling,R!==null){R.return=F.return,F=R;break}F=F.return}R=F}Yr(p,g,I.children,w),g=g.child}return g;case 9:return I=g.type,M=g.pendingProps.children,ou(g,w),I=zn(I),M=M(I),g.flags|=1,Yr(p,g,M,w),g.child;case 14:return M=g.type,I=la(M,g.pendingProps),I=la(M.type,I),aA(p,g,M,I,w);case 15:return iA(p,g,g.type,g.pendingProps,w);case 17:return M=g.type,I=g.pendingProps,I=g.elementType===M?I:la(M,I),Fp(p,g),g.tag=1,nn(M)?(p=!0,_p(g)):p=!1,ou(g,w),Kk(g,M,I),fx(g,M,I,w),vx(null,g,M,!0,p,w);case 19:return hA(p,g,w);case 22:return oA(p,g,w)}throw Error(t(156,g.tag))};function NA(p,g){return gM(p,g)}function aG(p,g,w,M){this.tag=p,this.key=w,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=g,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=M,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jn(p,g,w,M){return new aG(p,g,w,M)}function Ox(p){return p=p.prototype,!(!p||!p.isReactComponent)}function iG(p){if(typeof p=="function")return Ox(p)?1:0;if(p!=null){if(p=p.$$typeof,p===B)return 11;if(p===H)return 14}return 2}function _o(p,g){var w=p.alternate;return w===null?(w=jn(p.tag,g,p.key,p.mode),w.elementType=p.elementType,w.type=p.type,w.stateNode=p.stateNode,w.alternate=p,p.alternate=w):(w.pendingProps=g,w.type=p.type,w.flags=0,w.subtreeFlags=0,w.deletions=null),w.flags=p.flags&14680064,w.childLanes=p.childLanes,w.lanes=p.lanes,w.child=p.child,w.memoizedProps=p.memoizedProps,w.memoizedState=p.memoizedState,w.updateQueue=p.updateQueue,g=p.dependencies,w.dependencies=g===null?null:{lanes:g.lanes,firstContext:g.firstContext},w.sibling=p.sibling,w.index=p.index,w.ref=p.ref,w}function qp(p,g,w,M,I,R){var F=2;if(M=p,typeof p=="function")Ox(p)&&(F=1);else if(typeof p=="string")F=5;else e:switch(p){case L:return Cs(w.children,I,R,g);case D:F=8,I|=8;break;case P:return p=jn(12,w,g,I|2),p.elementType=P,p.lanes=R,p;case N:return p=jn(13,w,g,I),p.elementType=N,p.lanes=R,p;case W:return p=jn(19,w,g,I),p.elementType=W,p.lanes=R,p;case Z:return Qp(w,I,R,g);default:if(typeof p=="object"&&p!==null)switch(p.$$typeof){case E:F=10;break e;case O:F=9;break e;case B:F=11;break e;case H:F=14;break e;case $:F=16,M=null;break e}throw Error(t(130,p==null?p:typeof p,""))}return g=jn(F,w,g,I),g.elementType=p,g.type=M,g.lanes=R,g}function Cs(p,g,w,M){return p=jn(7,p,M,g),p.lanes=w,p}function Qp(p,g,w,M){return p=jn(22,p,M,g),p.elementType=Z,p.lanes=w,p.stateNode={isHidden:!1},p}function Nx(p,g,w){return p=jn(6,p,null,g),p.lanes=w,p}function jx(p,g,w){return g=jn(4,p.children!==null?p.children:[],p.key,g),g.lanes=w,g.stateNode={containerInfo:p.containerInfo,pendingChildren:null,implementation:p.implementation},g}function oG(p,g,w,M,I){this.tag=g,this.containerInfo=p,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=c0(0),this.expirationTimes=c0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=c0(0),this.identifierPrefix=M,this.onRecoverableError=I,this.mutableSourceEagerHydrationData=null}function Bx(p,g,w,M,I,R,F,q,J){return p=new oG(p,g,w,q,J),g===1?(g=1,R===!0&&(g|=8)):g=0,R=jn(3,null,null,g),p.current=R,R.stateNode=p,R.memoizedState={element:M,isDehydrated:w,cache:null,transitions:null,pendingSuspenseBoundaries:null},q0(R),p}function sG(p,g,w){var M=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:A,key:M==null?null:""+M,children:p,containerInfo:g,implementation:w}}function jA(p){if(!p)return ho;p=p._reactInternals;e:{if(hs(p)!==p||p.tag!==1)throw Error(t(170));var g=p;do{switch(g.tag){case 3:g=g.stateNode.context;break e;case 1:if(nn(g.type)){g=g.stateNode.__reactInternalMemoizedMergedChildContext;break e}}g=g.return}while(g!==null);throw Error(t(171))}if(p.tag===1){var w=p.type;if(nn(w))return dk(p,w,g)}return g}function BA(p,g,w,M,I,R,F,q,J){return p=Bx(w,M,!0,p,I,R,F,q,J),p.context=jA(null),w=p.current,M=Xr(),I=So(w),R=mi(M,I),R.callback=g??null,go(w,R,I),p.current.lanes=I,ef(p,I,M),sn(p,M),p}function Jp(p,g,w,M){var I=g.current,R=Xr(),F=So(I);return w=jA(w),g.context===null?g.context=w:g.pendingContext=w,g=mi(R,F),g.payload={element:p},M=M===void 0?null:M,M!==null&&(g.callback=M),p=go(I,g,F),p!==null&&(fa(p,I,F,R),Ip(p,I,F)),F}function ev(p){if(p=p.current,!p.child)return null;switch(p.child.tag){case 5:return p.child.stateNode;default:return p.child.stateNode}}function FA(p,g){if(p=p.memoizedState,p!==null&&p.dehydrated!==null){var w=p.retryLane;p.retryLane=w!==0&&w<g?w:g}}function Fx(p,g){FA(p,g),(p=p.alternate)&&FA(p,g)}function lG(){return null}var VA=typeof reportError=="function"?reportError:function(p){console.error(p)};function Vx(p){this._internalRoot=p}tv.prototype.render=Vx.prototype.render=function(p){var g=this._internalRoot;if(g===null)throw Error(t(409));Jp(p,g,null,null)},tv.prototype.unmount=Vx.prototype.unmount=function(){var p=this._internalRoot;if(p!==null){this._internalRoot=null;var g=p.containerInfo;_s(function(){Jp(null,p,null,null)}),g[hi]=null}};function tv(p){this._internalRoot=p}tv.prototype.unstable_scheduleHydration=function(p){if(p){var g=TM();p={blockedOn:null,target:p,priority:g};for(var w=0;w<so.length&&g!==0&&g<so[w].priority;w++);so.splice(w,0,p),w===0&&kM(p)}};function Gx(p){return!(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)}function rv(p){return!(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11&&(p.nodeType!==8||p.nodeValue!==" react-mount-point-unstable "))}function GA(){}function uG(p,g,w,M,I){if(I){if(typeof M=="function"){var R=M;M=function(){var se=ev(F);R.call(se)}}var F=BA(g,M,p,0,null,!1,!1,"",GA);return p._reactRootContainer=F,p[hi]=F.current,vf(p.nodeType===8?p.parentNode:p),_s(),F}for(;I=p.lastChild;)p.removeChild(I);if(typeof M=="function"){var q=M;M=function(){var se=ev(J);q.call(se)}}var J=Bx(p,0,!1,null,null,!1,!1,"",GA);return p._reactRootContainer=J,p[hi]=J.current,vf(p.nodeType===8?p.parentNode:p),_s(function(){Jp(g,J,w,M)}),J}function nv(p,g,w,M,I){var R=w._reactRootContainer;if(R){var F=R;if(typeof I=="function"){var q=I;I=function(){var J=ev(F);q.call(J)}}Jp(g,F,p,I)}else F=uG(w,g,p,I,M);return ev(F)}_M=function(p){switch(p.tag){case 3:var g=p.stateNode;if(g.current.memoizedState.isDehydrated){var w=Jc(g.pendingLanes);w!==0&&(f0(g,w|1),sn(g,qt()),(xt&6)===0&&(fu=qt()+500,po()))}break;case 13:_s(function(){var M=yi(p,1);if(M!==null){var I=Xr();fa(M,p,1,I)}}),Fx(p,1)}},d0=function(p){if(p.tag===13){var g=yi(p,134217728);if(g!==null){var w=Xr();fa(g,p,134217728,w)}Fx(p,134217728)}},wM=function(p){if(p.tag===13){var g=So(p),w=yi(p,g);if(w!==null){var M=Xr();fa(w,p,g,M)}Fx(p,g)}},TM=function(){return kt},CM=function(p,g){var w=kt;try{return kt=p,g()}finally{kt=w}},a0=function(p,g,w){switch(g){case"input":if(_t(p,w),g=w.name,w.type==="radio"&&g!=null){for(w=p;w.parentNode;)w=w.parentNode;for(w=w.querySelectorAll("input[name="+JSON.stringify(""+g)+'][type="radio"]'),g=0;g<w.length;g++){var M=w[g];if(M!==p&&M.form===p.form){var I=Sp(M);if(!I)throw Error(t(90));Ie(M),_t(M,I)}}}break;case"textarea":eM(p,w);break;case"select":g=w.value,g!=null&&gn(p,!!w.multiple,g,!1)}},uM=Rx,cM=_s;var cG={usingClientEntryPoint:!1,Events:[mf,Ql,Sp,sM,lM,Rx]},Pf={findFiberByHostInstance:ps,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},fG={bundleType:Pf.bundleType,version:Pf.version,rendererPackageName:Pf.rendererPackageName,rendererConfig:Pf.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:C.ReactCurrentDispatcher,findHostInstanceByFiber:function(p){return p=pM(p),p===null?null:p.stateNode},findFiberByHostInstance:Pf.findFiberByHostInstance||lG,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 av=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!av.isDisabled&&av.supportsFiber)try{tp=av.inject(fG),La=av}catch{}}return ln.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=cG,ln.createPortal=function(p,g){var w=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Gx(g))throw Error(t(200));return sG(p,g,null,w)},ln.createRoot=function(p,g){if(!Gx(p))throw Error(t(299));var w=!1,M="",I=VA;return g!=null&&(g.unstable_strictMode===!0&&(w=!0),g.identifierPrefix!==void 0&&(M=g.identifierPrefix),g.onRecoverableError!==void 0&&(I=g.onRecoverableError)),g=Bx(p,1,!1,null,null,w,!1,M,I),p[hi]=g.current,vf(p.nodeType===8?p.parentNode:p),new Vx(g)},ln.findDOMNode=function(p){if(p==null)return null;if(p.nodeType===1)return p;var g=p._reactInternals;if(g===void 0)throw typeof p.render=="function"?Error(t(188)):(p=Object.keys(p).join(","),Error(t(268,p)));return p=pM(g),p=p===null?null:p.stateNode,p},ln.flushSync=function(p){return _s(p)},ln.hydrate=function(p,g,w){if(!rv(g))throw Error(t(200));return nv(null,p,g,!0,w)},ln.hydrateRoot=function(p,g,w){if(!Gx(p))throw Error(t(405));var M=w!=null&&w.hydratedSources||null,I=!1,R="",F=VA;if(w!=null&&(w.unstable_strictMode===!0&&(I=!0),w.identifierPrefix!==void 0&&(R=w.identifierPrefix),w.onRecoverableError!==void 0&&(F=w.onRecoverableError)),g=BA(g,null,p,1,w??null,I,!1,R,F),p[hi]=g.current,vf(p),M)for(p=0;p<M.length;p++)w=M[p],I=w._getVersion,I=I(w._source),g.mutableSourceEagerHydrationData==null?g.mutableSourceEagerHydrationData=[w,I]:g.mutableSourceEagerHydrationData.push(w,I);return new tv(g)},ln.render=function(p,g,w){if(!rv(g))throw Error(t(200));return nv(null,p,g,!1,w)},ln.unmountComponentAtNode=function(p){if(!rv(p))throw Error(t(40));return p._reactRootContainer?(_s(function(){nv(null,null,p,!1,function(){p._reactRootContainer=null,p[hi]=null})}),!0):!1},ln.unstable_batchedUpdates=Rx,ln.unstable_renderSubtreeIntoContainer=function(p,g,w,M){if(!rv(w))throw Error(t(200));if(p==null||p._reactInternals===void 0)throw Error(t(38));return nv(p,g,w,!1,M)},ln.version="18.3.1-next-f1338f8080-20240426",ln}var KA;function xG(){if(KA)return Hx.exports;KA=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}return r(),Hx.exports=mG(),Hx.exports}var qA;function SG(){if(qA)return iv;qA=1;var r=xG();return iv.createRoot=r.createRoot,iv.hydrateRoot=r.hydrateRoot,iv}var bG=SG();const _G=Hw(bG),S={bgPrimary:"#ffffff",bgSecondary:"#f8f9fa",bgTertiary:"#f1f3f4",bgCard:"#ffffff",bgHover:"#f1f3f4",bgSelected:"#e8f0fe",bgUnpaired:"#f5f5f4",surface:"#f8f9fa",textPrimary:"#202124",textSecondary:"#5f6368",textTertiary:"#80868b",textInverse:"#ffffff",text:"#202124",textMuted:"#5f6368",borderLight:"#dadce0",borderMedium:"#bdc1c6",borderDark:"#9aa0a6",accent:"#4a5568",accentBlue:"#2d3748",accentBlueHover:"#1a202c",accentGreen:"#38a169",accentOrange:"#78716c",accentPink:"#c53030",accentPurple:"#4a5568",success:"#38a169",warning:"#d69e2e",error:"#c53030",errorBg:"#fef2f2",info:"#4a5568",buttonPrimary:"#2d3748",buttonPrimaryHover:"#1a202c",buttonSecondary:"#f1f3f4",buttonSecondaryHover:"#e8eaed",buttonDanger:"#ea4335",buttonDangerHover:"#d33b2c",shadowSm:"rgba(60, 64, 67, 0.08)",shadowMd:"rgba(60, 64, 67, 0.12)",shadowLg:"rgba(60, 64, 67, 0.16)"};function ic(r,e){const t=r.replace("#",""),n=Number.parseInt(t.substring(0,2),16),a=Number.parseInt(t.substring(2,4),16),i=Number.parseInt(t.substring(4,6),16);return`rgba(${n}, ${a}, ${i}, ${e})`}const j={body:"'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",mono:"'Roboto Mono', 'JetBrains Mono', 'Fira Code', 'Consolas', monospace"};function wG({logs:r,filteredLogs:e,logEndRef:t,getLogColor:n}){return b.jsx("div",{style:{flex:1,overflow:"auto",padding:"16px",fontFamily:j.mono,fontSize:"12px",background:S.bgCard},children:e.length===0?b.jsx("div",{style:{color:S.textSecondary,padding:"40px",textAlign:"center",fontFamily:j.body},children:r.length===0?"No logs available. Start the MCP Shark server to see logs here.":"No logs match the current filter."}):b.jsxs(b.Fragment,{children:[b.jsx("div",{ref:t}),e.map((a,i)=>b.jsxs("div",{style:{display:"flex",gap:"12px",padding:"12px 16px",borderBottom:`1px solid ${S.borderLight}`,background:S.bgCard,transition:"background-color 0.15s ease"},onMouseEnter:o=>{o.currentTarget.style.background=S.bgHover},onMouseLeave:o=>{o.currentTarget.style.background=S.bgCard},children:[b.jsx("span",{style:{color:S.textTertiary,minWidth:"140px",flexShrink:0,fontFamily:j.mono,fontSize:"11px"},children:new Date(a.timestamp).toLocaleTimeString()}),b.jsx("span",{style:{color:S.textTertiary,minWidth:"70px",flexShrink:0,textTransform:"uppercase",fontFamily:j.body,fontSize:"10px",fontWeight:"600",letterSpacing:"0.05em"},children:a.type}),b.jsx("span",{style:{color:n(a.type),whiteSpace:"pre-wrap",wordBreak:"break-word",flex:1,fontFamily:j.mono,fontSize:"12px",lineHeight:"1.5"},children:a.line})]},`${a.timestamp}-${i}`))]})})}var TG={outline:{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"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};const at=(r,e,t,n)=>{const a=Y.forwardRef(({color:i="currentColor",size:o=24,stroke:s=2,title:l,className:u,children:c,...f},d)=>Y.createElement("svg",{ref:d,...TG[r],width:o,height:o,className:["tabler-icon",`tabler-icon-${e}`,u].join(" "),strokeWidth:s,stroke:i,...f},[l&&Y.createElement("title",{key:"svg-title"},l),...n.map(([h,v])=>Y.createElement(h,v)),...Array.isArray(c)?c:[c]]));return a.displayName=`${t}`,a};const CG=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 8v4",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]],MG=at("outline","alert-circle","AlertCircle",CG);const kG=[["path",{d:"M12 9v4",key:"svg-0"}],["path",{d:"M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0z",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]],oc=at("outline","alert-triangle","AlertTriangle",kG);const AG=[["path",{d:"M4 13h5",key:"svg-0"}],["path",{d:"M12 16v-8h3a2 2 0 0 1 2 2v1a2 2 0 0 1 -2 2h-3",key:"svg-1"}],["path",{d:"M20 8v8",key:"svg-2"}],["path",{d:"M9 16v-5.5a2.5 2.5 0 0 0 -5 0v5.5",key:"svg-3"}]],LG=at("outline","api","Api",AG);const IG=[["path",{d:"M5 12l14 0",key:"svg-0"}],["path",{d:"M13 18l6 -6",key:"svg-1"}],["path",{d:"M13 6l6 6",key:"svg-2"}]],$g=at("outline","arrow-right","ArrowRight",IG);const DG=[["path",{d:"M10 5a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6",key:"svg-0"}],["path",{d:"M9 17v1a3 3 0 0 0 6 0v-1",key:"svg-1"}]],PG=at("outline","bell","Bell",DG);const RG=[["path",{d:"M4 17v1a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-1",key:"svg-0"}],["path",{d:"M8 16h8",key:"svg-1"}],["path",{d:"M8.322 12.582l7.956 .836",key:"svg-2"}],["path",{d:"M8.787 9.168l7.826 1.664",key:"svg-3"}],["path",{d:"M10.096 5.764l7.608 2.472",key:"svg-4"}]],EG=at("outline","brand-stackoverflow","BrandStackoverflow",RG);const zG=[["path",{d:"M9 9v-1a3 3 0 0 1 6 0v1",key:"svg-0"}],["path",{d:"M8 9h8a6 6 0 0 1 1 3v3a5 5 0 0 1 -10 0v-3a6 6 0 0 1 1 -3",key:"svg-1"}],["path",{d:"M3 13l4 0",key:"svg-2"}],["path",{d:"M17 13l4 0",key:"svg-3"}],["path",{d:"M12 20l0 -6",key:"svg-4"}],["path",{d:"M4 19l3.35 -2",key:"svg-5"}],["path",{d:"M20 19l-3.35 -2",key:"svg-6"}],["path",{d:"M4 7l3.75 2.4",key:"svg-7"}],["path",{d:"M20 7l-3.75 2.4",key:"svg-8"}]],OG=at("outline","bug","Bug",zG);const NG=[["path",{d:"M4 4h6v6h-6z",key:"svg-0"}],["path",{d:"M14 4h6v6h-6z",key:"svg-1"}],["path",{d:"M4 14h6v6h-6z",key:"svg-2"}],["path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-3"}]],jG=at("outline","category","Category",NG);const BG=[["path",{d:"M3 13a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-0"}],["path",{d:"M15 9a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-1"}],["path",{d:"M9 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-2"}],["path",{d:"M4 20h14",key:"svg-3"}]],FG=at("outline","chart-bar","ChartBar",BG);const VG=[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]],fN=at("outline","check","Check",VG);const GG=[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]],ui=at("outline","chevron-down","ChevronDown",GG);const WG=[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]],Rl=at("outline","chevron-right","ChevronRight",WG);const $G=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 7v5l3 3",key:"svg-1"}]],Yw=at("outline","clock","Clock",$G);const HG=[["path",{d:"M7 8l-4 4l4 4",key:"svg-0"}],["path",{d:"M17 8l4 4l-4 4",key:"svg-1"}],["path",{d:"M14 4l-4 16",key:"svg-2"}]],is=at("outline","code","Code",HG);const UG=[["path",{d:"M12 6m-8 0a8 3 0 1 0 16 0a8 3 0 1 0 -16 0",key:"svg-0"}],["path",{d:"M4 6v6a8 3 0 0 0 16 0v-6",key:"svg-1"}],["path",{d:"M4 12v6a8 3 0 0 0 16 0v-6",key:"svg-2"}]],dN=at("outline","database","Database",UG);const YG=[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]],hN=at("outline","download","Download",YG);const XG=[["path",{d:"M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6",key:"svg-0"}],["path",{d:"M11 13l9 -9",key:"svg-1"}],["path",{d:"M15 4h5v5",key:"svg-2"}]],Xw=at("outline","external-link","ExternalLink",XG);const ZG=[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]],Zw=at("outline","eye","Eye",ZG);const KG=[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]],qG=at("outline","file-text","FileText",KG);const QG=[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M12 11v6",key:"svg-2"}],["path",{d:"M9.5 13.5l2.5 -2.5l2.5 2.5",key:"svg-3"}]],JG=at("outline","file-upload","FileUpload",QG);const eW=[["path",{d:"M9 3l6 0",key:"svg-0"}],["path",{d:"M10 9l4 0",key:"svg-1"}],["path",{d:"M10 3v6l-4 11a.7 .7 0 0 0 .5 1h11a.7 .7 0 0 0 .5 -1l-4 -11v-6",key:"svg-2"}]],pN=at("outline","flask","Flask",eW);const tW=[["path",{d:"M7 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-0"}],["path",{d:"M7 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M17 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-2"}],["path",{d:"M7 8l0 8",key:"svg-3"}],["path",{d:"M9 18h6a2 2 0 0 0 2 -2v-5",key:"svg-4"}],["path",{d:"M14 14l3 -3l3 3",key:"svg-5"}]],rW=at("outline","git-branch","GitBranch",tW);const nW=[["path",{d:"M12 8l0 4l2 2",key:"svg-0"}],["path",{d:"M3.05 11a9 9 0 1 1 .5 4m-.5 5v-5h5",key:"svg-1"}]],aW=at("outline","history","History",nW);const iW=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 9h.01",key:"svg-1"}],["path",{d:"M11 12h1v4h1",key:"svg-2"}]],QA=at("outline","info-circle","InfoCircle",iW);const oW=[["path",{d:"M10.17 6.159l2.316 -2.316a2.877 2.877 0 0 1 4.069 0l3.602 3.602a2.877 2.877 0 0 1 0 4.069l-2.33 2.33",key:"svg-0"}],["path",{d:"M14.931 14.948a2.863 2.863 0 0 1 -1.486 -.79l-.301 -.302l-6.558 6.558a2 2 0 0 1 -1.239 .578l-.175 .008h-1.172a1 1 0 0 1 -.993 -.883l-.007 -.117v-1.172a2 2 0 0 1 .467 -1.284l.119 -.13l.414 -.414h2v-2h2v-2l2.144 -2.144l-.301 -.301a2.863 2.863 0 0 1 -.794 -1.504",key:"svg-1"}],["path",{d:"M15 9h.01",key:"svg-2"}],["path",{d:"M3 3l18 18",key:"svg-3"}]],sW=at("outline","key-off","KeyOff",oW);const lW=[["path",{d:"M16.555 3.843l3.602 3.602a2.877 2.877 0 0 1 0 4.069l-2.643 2.643a2.877 2.877 0 0 1 -4.069 0l-.301 -.301l-6.558 6.558a2 2 0 0 1 -1.239 .578l-.175 .008h-1.172a1 1 0 0 1 -.993 -.883l-.007 -.117v-1.172a2 2 0 0 1 .467 -1.284l.119 -.13l.414 -.414h2v-2h2v-2l2.144 -2.144l-.301 -.301a2.877 2.877 0 0 1 0 -4.069l2.643 -2.643a2.877 2.877 0 0 1 4.069 0z",key:"svg-0"}],["path",{d:"M15 9h.01",key:"svg-1"}]],im=at("outline","key","Key",lW);const uW=[["path",{d:"M9 6l11 0",key:"svg-0"}],["path",{d:"M9 12l11 0",key:"svg-1"}],["path",{d:"M9 18l11 0",key:"svg-2"}],["path",{d:"M5 6l0 .01",key:"svg-3"}],["path",{d:"M5 12l0 .01",key:"svg-4"}],["path",{d:"M5 18l0 .01",key:"svg-5"}]],vN=at("outline","list","List",uW);const cW=[["path",{d:"M12 3a9 9 0 1 0 9 9",key:"svg-0"}]],Lb=at("outline","loader-2","Loader2",cW);const fW=[["path",{d:"M5 11m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M12 16m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-5a4 4 0 0 1 8 0",key:"svg-2"}]],dW=at("outline","lock-open","LockOpen",fW);const hW=[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l16 0",key:"svg-2"}]],gN=at("outline","menu-2","Menu2",hW);const pW=[["path",{d:"M8 9h8",key:"svg-0"}],["path",{d:"M8 13h6",key:"svg-1"}],["path",{d:"M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12z",key:"svg-2"}]],vW=at("outline","message","Message",pW);const gW=[["path",{d:"M6 9a6 6 0 1 0 12 0a6 6 0 0 0 -12 0",key:"svg-0"}],["path",{d:"M12 3c1.333 .333 2 2.333 2 6s-.667 5.667 -2 6",key:"svg-1"}],["path",{d:"M12 3c-1.333 .333 -2 2.333 -2 6s.667 5.667 2 6",key:"svg-2"}],["path",{d:"M6 9h12",key:"svg-3"}],["path",{d:"M3 20h7",key:"svg-4"}],["path",{d:"M14 20h7",key:"svg-5"}],["path",{d:"M10 20a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-6"}],["path",{d:"M12 15v3",key:"svg-7"}]],om=at("outline","network","Network",gW);const yW=[["path",{d:"M12 3l8 4.5l0 9l-8 4.5l-8 -4.5l0 -9l8 -4.5",key:"svg-0"}],["path",{d:"M12 12l8 -4.5",key:"svg-1"}],["path",{d:"M12 12l0 9",key:"svg-2"}],["path",{d:"M12 12l-8 -4.5",key:"svg-3"}],["path",{d:"M16 5.25l-8 4.5",key:"svg-4"}]],JA=at("outline","package","Package",yW);const mW=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]],xW=at("outline","plus","Plus",mW);const SW=[["path",{d:"M7 6a7.75 7.75 0 1 0 10 0",key:"svg-0"}],["path",{d:"M12 4l0 8",key:"svg-1"}]],bW=at("outline","power","Power",SW);const _W=[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}]],Qo=at("outline","refresh","Refresh",_W);const wW=[["path",{d:"M3.06 13a9 9 0 1 0 .49 -4.087",key:"svg-0"}],["path",{d:"M3 4.001v5h5",key:"svg-1"}],["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]],TW=at("outline","restore","Restore",wW);const CW=[["path",{d:"M6 4m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v4a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M12 2v2",key:"svg-1"}],["path",{d:"M9 12v9",key:"svg-2"}],["path",{d:"M15 12v9",key:"svg-3"}],["path",{d:"M5 16l4 -2",key:"svg-4"}],["path",{d:"M15 14l4 2",key:"svg-5"}],["path",{d:"M9 18h6",key:"svg-6"}],["path",{d:"M10 8v.01",key:"svg-7"}],["path",{d:"M14 8v.01",key:"svg-8"}]],MW=at("outline","robot","Robot",CW);const kW=[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]],Kw=at("outline","search","Search",kW);const AW=[["path",{d:"M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M3 12m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-1"}],["path",{d:"M7 8l0 .01",key:"svg-2"}],["path",{d:"M7 16l0 .01",key:"svg-3"}]],qu=at("outline","server","Server",AW);const LW=[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]],Ib=at("outline","settings","Settings",LW);const IW=[["path",{d:"M11.46 20.846a12 12 0 0 1 -7.96 -14.846a12 12 0 0 0 8.5 -3a12 12 0 0 0 8.5 3a12 12 0 0 1 -.09 7.06",key:"svg-0"}],["path",{d:"M15 19l2 2l4 -4",key:"svg-1"}]],Cc=at("outline","shield-check","ShieldCheck",IW);const DW=[["path",{d:"M12 3a12 12 0 0 0 8.5 3a12 12 0 0 1 -8.5 15a12 12 0 0 1 -8.5 -15a12 12 0 0 0 8.5 -3",key:"svg-0"}],["path",{d:"M12 11m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M12 12l0 2.5",key:"svg-2"}]],PW=at("outline","shield-lock","ShieldLock",DW);const RW=[["path",{d:"M12 3a12 12 0 0 0 8.5 3a12 12 0 0 1 -8.5 15a12 12 0 0 1 -8.5 -15a12 12 0 0 0 8.5 -3",key:"svg-0"}]],qw=at("outline","shield","Shield",RW);const EW=[["path",{d:"M16 18a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2zm0 -12a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2zm-7 12a6 6 0 0 1 6 -6a6 6 0 0 1 -6 -6a6 6 0 0 1 -6 6a6 6 0 0 1 6 6z",key:"svg-0"}]],zW=at("outline","sparkles","Sparkles",EW);const OW=[["path",{d:"M7 10h3v-3l-3.5 -3.5a6 6 0 0 1 8 8l6 6a2 2 0 0 1 -3 3l-6 -6a6 6 0 0 1 -8 -8l3.5 3.5",key:"svg-0"}]],sm=at("outline","tool","Tool",OW);const NW=[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]],Mc=at("outline","trash","Trash",NW);const jW=[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}]],BW=at("outline","user","User",jW);const FW=[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]],kh=at("outline","x","X",FW);function VW({filter:r,setFilter:e,logType:t,setLogType:n,autoScroll:a,setAutoScroll:i,onClearLogs:o,onExportLogs:s,filteredCount:l,totalCount:u}){return b.jsxs("div",{style:{padding:"12px 16px",borderBottom:`1px solid ${S.borderLight}`,background:S.bgCard,display:"flex",gap:"10px",alignItems:"center",flexWrap:"wrap",boxShadow:`0 1px 3px ${S.shadowSm}`},children:[b.jsxs("div",{style:{position:"relative",width:"300px"},children:[b.jsx(Kw,{size:16,stroke:1.5,style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",color:S.textTertiary,pointerEvents:"none"}}),b.jsx("input",{type:"text",placeholder:"Filter logs...",value:r,onChange:c=>e(c.target.value),style:{padding:"8px 12px 8px 36px",background:S.bgCard,border:`1px solid ${S.borderLight}`,color:S.textPrimary,fontSize:"13px",fontFamily:j.body,width:"100%",borderRadius:"8px",transition:"all 0.2s"},onFocus:c=>{c.currentTarget.style.borderColor=S.accentBlue,c.currentTarget.style.boxShadow=`0 0 0 3px ${S.accentBlue}20`},onBlur:c=>{c.currentTarget.style.borderColor=S.borderLight,c.currentTarget.style.boxShadow="none"}})]}),b.jsxs("select",{value:t,onChange:c=>n(c.target.value),style:{padding:"8px 12px",background:S.bgCard,border:`1px solid ${S.borderLight}`,color:S.textPrimary,fontSize:"13px",fontFamily:j.body,borderRadius:"8px",cursor:"pointer",transition:"all 0.2s"},onFocus:c=>{c.currentTarget.style.borderColor=S.accentBlue,c.currentTarget.style.boxShadow=`0 0 0 3px ${S.accentBlue}20`},onBlur:c=>{c.currentTarget.style.borderColor=S.borderLight,c.currentTarget.style.boxShadow="none"},children:[b.jsx("option",{value:"all",children:"All Types"}),b.jsx("option",{value:"stdout",children:"Stdout"}),b.jsx("option",{value:"stderr",children:"Stderr"}),b.jsx("option",{value:"error",children:"Errors"}),b.jsx("option",{value:"exit",children:"Exit"})]}),b.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"8px",color:S.textPrimary,fontSize:"13px",fontFamily:j.body,cursor:"pointer"},children:[b.jsx("input",{type:"checkbox",checked:a,onChange:c=>i(c.target.checked),style:{cursor:"pointer"}}),"Auto-scroll"]}),b.jsxs("button",{type:"button",onClick:o,style:{padding:"8px 14px",background:S.buttonDanger,border:"none",color:S.textInverse,fontSize:"12px",fontFamily:j.body,fontWeight:"500",cursor:"pointer",borderRadius:"8px",transition:"all 0.2s",boxShadow:`0 2px 4px ${S.shadowSm}`,display:"flex",alignItems:"center",gap:"6px"},onMouseEnter:c=>{c.currentTarget.style.background=S.buttonDangerHover,c.currentTarget.style.transform="translateY(-1px)"},onMouseLeave:c=>{c.currentTarget.style.background=S.buttonDanger,c.currentTarget.style.transform="translateY(0)"},children:[b.jsx(Mc,{size:14,stroke:1.5}),"Clear Logs"]}),b.jsxs("button",{type:"button",onClick:s,style:{padding:"8px 14px",background:S.buttonPrimary,border:"none",color:S.textInverse,fontSize:"12px",fontFamily:j.body,fontWeight:"500",cursor:"pointer",borderRadius:"8px",transition:"all 0.2s",boxShadow:`0 2px 4px ${S.shadowSm}`,display:"flex",alignItems:"center",gap:"6px"},onMouseEnter:c=>{c.currentTarget.style.background=S.buttonPrimaryHover,c.currentTarget.style.transform="translateY(-1px)"},onMouseLeave:c=>{c.currentTarget.style.background=S.buttonPrimary,c.currentTarget.style.transform="translateY(0)"},children:[b.jsx(hN,{size:14,stroke:1.5}),"Export Logs"]}),b.jsxs("div",{style:{marginLeft:"auto",color:S.textSecondary,fontSize:"12px",fontFamily:j.body},children:[l," / ",u," lines"]})]})}function GW(){const[r,e]=Y.useState([]),[t,n]=Y.useState(!0),[a,i]=Y.useState(""),[o,s]=Y.useState("all"),l=Y.useRef(null),u=Y.useRef(null);Y.useEffect(()=>{t&&l.current&&l.current.scrollIntoView({behavior:"smooth",block:"start"})},[t]),Y.useEffect(()=>{(async()=>{try{const _=await(await fetch("/api/composite/logs?limit=5000")).json();e(_)}catch(x){console.error("Failed to load logs:",x)}})();const y=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}`,m=new WebSocket(y);return u.current=m,m.onopen=()=>{console.log("WebSocket connected for logs")},m.onerror=x=>{console.error("WebSocket error:",x)},m.onmessage=x=>{try{const _=JSON.parse(x.data);_.type==="log"&&e(T=>[_.data,...T].slice(0,5e3))}catch(_){console.error("Failed to parse WebSocket message:",_)}},m.onclose=()=>{console.log("WebSocket closed, attempting to reconnect..."),setTimeout(()=>{u.current?.readyState===WebSocket.CLOSED&&console.log("WebSocket reconnection needed")},3e3)},()=>{(m.readyState===WebSocket.OPEN||m.readyState===WebSocket.CONNECTING)&&m.close()}},[]);const c=async()=>{try{await fetch("/api/composite/logs/clear",{method:"POST"}),e([])}catch(v){console.error("Failed to clear logs:",v)}},f=v=>{switch(v){case"stderr":case"error":return S.error;case"stdout":return S.textPrimary;case"exit":return S.accentOrange;default:return S.textSecondary}},d=r.filter(v=>!(o!=="all"&&v.type!==o||a&&!v.line.toLowerCase().includes(a.toLowerCase()))),h=async()=>{try{const y=await(await fetch("/api/composite/logs/export")).blob(),m=window.URL.createObjectURL(y),x=document.createElement("a");x.href=m,x.download=`mcp-shark-logs-${new Date().toISOString().replace(/[:.]/g,"-")}.txt`,document.body.appendChild(x),x.click(),window.URL.revokeObjectURL(m),document.body.removeChild(x)}catch(v){console.error("Failed to export logs:",v)}};return b.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",width:"100%",background:S.bgPrimary,overflow:"hidden"},children:[b.jsx(VW,{filter:a,setFilter:i,logType:o,setLogType:s,autoScroll:t,setAutoScroll:n,onClearLogs:c,onExportLogs:h,filteredCount:d.length,totalCount:r.length}),b.jsx(wG,{logs:r,filteredLogs:d,logEndRef:l,getLogColor:f})]})}function Ah({isOpen:r,onClose:e,onConfirm:t,title:n,message:a,confirmText:i="Confirm",cancelText:o="Cancel",danger:s=!1}){return r?b.jsx("dialog",{open:!0,"aria-modal":"true",style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,border:"none",margin:0,width:"100%",height:"100%"},onClick:e,onKeyDown:l=>{l.key==="Escape"&&e()},children:b.jsxs("div",{role:"document",style:{background:S.bgCard,borderRadius:"12px",padding:"24px",maxWidth:"500px",width:"90%",boxShadow:`0 4px 20px ${S.shadowLg}`,fontFamily:j.body},onClick:l=>l.stopPropagation(),onKeyDown:l=>l.stopPropagation(),children:[b.jsx("h3",{style:{margin:"0 0 12px 0",fontSize:"18px",fontWeight:"600",color:S.textPrimary},children:n}),b.jsx("p",{style:{margin:"0 0 24px 0",fontSize:"14px",color:S.textSecondary,lineHeight:"1.5"},children:a}),b.jsxs("div",{style:{display:"flex",gap:"12px",justifyContent:"flex-end"},children:[b.jsx("button",{type:"button",onClick:e,style:{padding:"10px 20px",background:S.buttonSecondary,border:`1px solid ${S.borderLight}`,borderRadius:"8px",color:S.textPrimary,fontSize:"14px",fontWeight:"500",fontFamily:j.body,cursor:"pointer",transition:"all 0.2s"},onMouseEnter:l=>{l.currentTarget.style.background=S.buttonSecondaryHover},onMouseLeave:l=>{l.currentTarget.style.background=S.buttonSecondary},children:o}),b.jsx("button",{type:"button",onClick:()=>{t(),e()},style:{padding:"10px 20px",background:s?S.buttonDanger:S.buttonPrimary,border:"none",borderRadius:"8px",color:S.textInverse,fontSize:"14px",fontWeight:"500",fontFamily:j.body,cursor:"pointer",transition:"all 0.2s"},onMouseEnter:l=>{l.currentTarget.style.background=s?S.buttonDangerHover:S.buttonPrimaryHover},onMouseLeave:l=>{l.currentTarget.style.background=s?S.buttonDanger:S.buttonPrimary},children:i})]})]})}):null}function WW({backups:r,loadingBackups:e,onRefresh:t,onRestore:n,onView:a,onDelete:i}){const[o,s]=Y.useState(!1),[l,u]=Y.useState(null);return r.length===0?null:b.jsxs("div",{style:{background:S.bgCard,border:`1px solid ${S.borderLight}`,borderRadius:"12px",padding:"24px",marginBottom:"20px",boxShadow:`0 2px 4px ${S.shadowSm}`},children:[b.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"12px"},children:[b.jsx("h3",{style:{fontSize:"15px",fontWeight:"600",color:S.textPrimary,fontFamily:j.body},children:"Backup Files"}),b.jsxs("button",{type:"button",onClick:t,disabled:e,style:{padding:"4px 8px",background:"transparent",border:`1px solid ${S.borderMedium}`,color:S.textSecondary,cursor:e?"not-allowed":"pointer",fontSize:"11px",borderRadius:"8px",opacity:e?.5:1},title:"Refresh backups",children:[b.jsx(Qo,{size:14,stroke:1.5,style:{marginRight:"4px"}}),e?"Loading...":"Refresh"]})]}),b.jsx("p",{style:{fontSize:"12px",color:S.textSecondary,marginBottom:"12px",lineHeight:"1.4"},children:"View, restore, or delete backups of your MCP configuration files. Backups are created automatically when starting MCP Shark."}),b.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:r.map((c,f)=>b.jsxs("div",{style:{padding:"12px",background:S.bgPrimary,border:`1px solid ${S.borderMedium}`,borderRadius:"8px",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[b.jsxs("div",{style:{flex:1},children:[b.jsx("div",{style:{color:S.textPrimary,fontSize:"12px",fontWeight:"500",marginBottom:"4px"},children:c.displayPath}),b.jsxs("div",{style:{color:S.textTertiary,fontSize:"11px",fontFamily:j.body},children:["Created: ",new Date(c.modifiedAt||c.createdAt).toLocaleString()," • Size:"," ",(c.size/1024).toFixed(2)," KB"]})]}),b.jsxs("div",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[b.jsxs("button",{type:"button",onClick:()=>a(c.backupPath),style:{padding:"6px 12px",background:"transparent",border:`1px solid ${S.borderMedium}`,color:S.textSecondary,cursor:"pointer",fontSize:"12px",borderRadius:"8px",fontWeight:"500"},onMouseEnter:d=>{d.currentTarget.style.background=S.bgCard,d.currentTarget.style.borderColor=S.borderLight},onMouseLeave:d=>{d.currentTarget.style.background="transparent",d.currentTarget.style.borderColor=S.borderMedium},title:"View backup content",children:[b.jsx(Zw,{size:14,stroke:1.5,style:{marginRight:"4px"}}),"View"]}),b.jsxs("button",{type:"button",onClick:()=>{u(c.backupPath),s(!0)},style:{padding:"6px 12px",background:"transparent",border:`1px solid ${S.borderMedium}`,color:S.error,cursor:"pointer",fontSize:"12px",borderRadius:"8px",fontWeight:"500",fontFamily:j.body,display:"flex",alignItems:"center",gap:"4px"},onMouseEnter:d=>{d.currentTarget.style.background=ic(S.error,.15),d.currentTarget.style.borderColor=S.error},onMouseLeave:d=>{d.currentTarget.style.background="transparent",d.currentTarget.style.borderColor=S.borderMedium},title:"Delete backup",children:[b.jsx(Mc,{size:14,stroke:1.5}),"Delete"]}),b.jsxs("button",{type:"button",onClick:()=>n(c.backupPath,c.originalPath),style:{padding:"6px 12px",background:S.buttonPrimary,border:`1px solid ${S.buttonPrimary}`,color:S.textInverse,cursor:"pointer",fontSize:"12px",borderRadius:"8px",fontWeight:"500",fontFamily:j.body,display:"flex",alignItems:"center",gap:"4px"},onMouseEnter:d=>{d.currentTarget.style.background=S.buttonPrimaryHover},onMouseLeave:d=>{d.currentTarget.style.background=S.buttonPrimary},title:"Restore this backup",children:[b.jsx(TW,{size:14,stroke:1.5}),"Restore"]})]})]},c.backupPath||`backup-${f}`))}),b.jsx(Ah,{isOpen:o,onClose:()=>{s(!1),u(null)},onConfirm:()=>{l&&i(l),s(!1),u(null)},title:"Delete Backup",message:"Are you sure you want to delete this backup? This action cannot be undone.",confirmText:"Delete",cancelText:"Cancel",danger:!0})]})}function $W({detectedPaths:r,detecting:e,onDetect:t,onSelect:n,onView:a}){return r.length===0?null:b.jsxs("div",{style:{marginBottom:"8px"},children:[b.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"8px"},children:[b.jsx("div",{style:{fontSize:"13px",color:S.textPrimary,fontWeight:"600",fontFamily:j.body},children:"Detected Configuration Files:"}),b.jsx("button",{type:"button",onClick:t,disabled:e,title:"Refresh detection",style:{padding:"4px 8px",background:"transparent",border:`1px solid ${S.borderMedium}`,color:S.textSecondary,cursor:e?"not-allowed":"pointer",fontSize:"11px",borderRadius:"8px",opacity:e?.5:1,display:"flex",alignItems:"center",gap:"4px"},children:e?b.jsxs(b.Fragment,{children:[b.jsx(Qo,{size:12,stroke:1.5,style:{animation:"spin 1s linear infinite"}}),b.jsx("span",{children:"Detecting..."})]}):b.jsxs(b.Fragment,{children:[b.jsx(Qo,{size:12,stroke:1.5}),b.jsx("span",{children:"Refresh"})]})})]}),b.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:r.map((i,o)=>b.jsxs("button",{type:"button",onClick:()=>n(i.path),onDoubleClick:()=>{i.exists&&a(i.path)},style:{padding:"8px 12px",background:i.exists?`${S.accentBlue}20`:S.bgSecondary,border:`1px solid ${i.exists?S.accentBlue:S.borderMedium}`,color:S.textPrimary,cursor:"pointer",fontSize:"12px",borderRadius:"8px",textAlign:"left",display:"flex",justifyContent:"space-between",alignItems:"center",transition:"all 0.2s"},onMouseEnter:s=>{s.currentTarget.style.background=i.exists?`${S.accentBlue}30`:S.bgHover},onMouseLeave:s=>{s.currentTarget.style.background=i.exists?`${S.accentBlue}20`:S.bgSecondary},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[b.jsx("span",{style:{display:"inline-flex",alignItems:"center"},children:i.editor==="Cursor"?b.jsx(is,{size:14,stroke:1.5}):b.jsx(Yw,{size:14,stroke:1.5})}),b.jsxs("div",{children:[b.jsx("div",{style:{fontWeight:"500"},children:i.editor}),b.jsx("div",{style:{fontSize:"12px",color:S.textSecondary,fontFamily:j.body},children:i.displayPath})]})]}),b.jsx("div",{style:{display:"flex",gap:"6px",alignItems:"center"},children:i.exists&&b.jsxs(b.Fragment,{children:[b.jsx("span",{style:{fontSize:"10px",padding:"2px 6px",background:S.success,color:S.textInverse,borderRadius:"6px",fontWeight:"500"},children:"Found"}),b.jsxs("button",{type:"button",onClick:s=>{s.stopPropagation(),a(i.path)},title:"View file content",style:{fontSize:"10px",padding:"2px 6px",background:"transparent",border:`1px solid ${S.borderMedium}`,color:S.textSecondary,borderRadius:"6px",cursor:"pointer",display:"flex",alignItems:"center",gap:"4px"},children:[b.jsx(Zw,{size:10,stroke:1.5}),b.jsx("span",{children:"View"})]})]})})]},`${i.editor}-${i.path}-${o}`))})]})}function HW({filePath:r,fileContent:e,updatePath:t,onFileSelect:n,onPathChange:a,onUpdatePathChange:i}){return b.jsxs(b.Fragment,{children:[b.jsxs("div",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[b.jsxs("label",{style:{padding:"8px 16px",background:S.buttonPrimary,border:`1px solid ${S.buttonPrimary}`,color:S.textInverse,cursor:"pointer",fontSize:"13px",borderRadius:"8px",fontWeight:"500",whiteSpace:"nowrap",transition:"background 0.2s"},onMouseEnter:o=>{o.currentTarget.style.background=S.buttonPrimaryHover},onMouseLeave:o=>{o.currentTarget.style.background=S.buttonPrimary},children:[b.jsx(JG,{size:14,stroke:1.5,style:{marginRight:"6px",display:"inline-block"}}),"Select File",b.jsx("input",{type:"file",accept:".json",onChange:n,style:{display:"none"}})]}),b.jsx("span",{style:{color:S.textTertiary,fontSize:"13px",fontWeight:"500",fontFamily:j.body},children:"OR"}),b.jsx("input",{type:"text",placeholder:"Enter file path (e.g., ~/.cursor/mcp.json)",value:r,onChange:a,style:{flex:1,padding:"8px 12px",background:S.bgCard,border:`1px solid ${S.borderMedium}`,color:S.textPrimary,fontSize:"13px",borderRadius:"8px"}})]}),e&&!r&&b.jsxs("div",{children:[b.jsx("label",{htmlFor:"update-path-input",style:{display:"block",fontSize:"12px",color:S.textSecondary,marginBottom:"6px"},children:"Optional: File Path to Update"}),b.jsx("input",{id:"update-path-input",type:"text",placeholder:"Enter file path to update (e.g., ~/.cursor/mcp.json)",value:t,onChange:i,style:{width:"100%",padding:"8px 12px",background:S.bgCard,border:`1px solid ${S.borderMedium}`,color:S.textPrimary,fontSize:"13px",borderRadius:"8px"}}),b.jsx("div",{style:{fontSize:"12px",color:S.textSecondary,marginTop:"6px",fontFamily:j.body},children:"Provide the file path if you want to update the original config file (backup will be created)"})]}),e&&b.jsxs("div",{style:{marginTop:"8px"},children:[b.jsx("div",{style:{color:S.textSecondary,fontSize:"12px",marginBottom:"6px",fontWeight:"500"},children:"File Content Preview"}),b.jsx("pre",{style:{background:S.bgCard,padding:"12px",borderRadius:"8px",fontSize:"12px",fontFamily:"monospace",color:S.textPrimary,maxHeight:"200px",overflow:"auto",border:`1px solid ${S.borderLight}`,lineHeight:"1.5"},children:e})]})]})}function UW({services:r,selectedServices:e,onSelectionChange:t}){return r.length===0?null:b.jsxs("div",{style:{marginTop:"16px"},children:[b.jsxs("div",{style:{marginBottom:"12px"},children:[b.jsx("h3",{style:{fontSize:"15px",fontWeight:"600",marginBottom:"8px",color:S.textPrimary,fontFamily:j.body},children:"Select Services"}),b.jsx("p",{style:{fontSize:"13px",color:S.textSecondary,lineHeight:"1.5",fontFamily:j.body},children:"Choose which services to include in the MCP Shark server. Only selected services will be available."})]}),b.jsxs("div",{style:{display:"flex",gap:"8px",marginBottom:"12px",flexWrap:"wrap"},children:[b.jsx("button",{type:"button",onClick:()=>{t(new Set(r.map(n=>n.name)))},style:{padding:"4px 12px",background:"transparent",border:`1px solid ${S.borderMedium}`,color:S.textSecondary,cursor:"pointer",fontSize:"12px",borderRadius:"8px"},children:"Select All"}),b.jsx("button",{type:"button",onClick:()=>{t(new Set)},style:{padding:"4px 12px",background:"transparent",border:`1px solid ${S.borderMedium}`,color:S.textSecondary,cursor:"pointer",fontSize:"12px",borderRadius:"8px"},children:"Deselect All"}),b.jsxs("div",{style:{marginLeft:"auto",fontSize:"12px",color:S.textSecondary,display:"flex",alignItems:"center"},children:[e.size," of ",r.length," selected"]})]}),b.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px",maxHeight:"300px",overflowY:"auto",padding:"8px",background:S.bgPrimary,borderRadius:"4px",border:`1px solid ${S.borderLight}`},children:r.map(n=>{const a=e.has(n.name);return b.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"12px",padding:"10px",background:a?S.bgSelected:"transparent",border:`1px solid ${a?S.accentBlue:S.borderMedium}`,borderRadius:"8px",cursor:"pointer",transition:"all 0.2s"},onMouseEnter:i=>{a||(i.currentTarget.style.background=S.bgHover)},onMouseLeave:i=>{a||(i.currentTarget.style.background="transparent")},children:[b.jsx("input",{type:"checkbox",checked:a,onChange:i=>{const o=new Set(e);i.target.checked?o.add(n.name):o.delete(n.name),t(o)},style:{width:"18px",height:"18px",cursor:"pointer"}}),b.jsxs("div",{style:{flex:1},children:[b.jsx("div",{style:{fontWeight:"500",color:S.textPrimary,fontSize:"13px",marginBottom:"4px"},children:n.name}),b.jsxs("div",{style:{fontSize:"11px",color:S.textSecondary,display:"flex",gap:"12px",flexWrap:"wrap"},children:[b.jsx("span",{style:{padding:"2px 6px",background:n.type==="http"?"#0e639c":"#4a9e5f",color:S.textInverse,borderRadius:"6px",fontSize:"10px",fontWeight:"500"},children:n.type.toUpperCase()}),n.url&&b.jsx("span",{style:{fontFamily:"monospace",fontSize:"11px"},children:n.url}),n.command&&b.jsxs("span",{style:{fontFamily:"monospace",fontSize:"11px"},children:[n.command," ",n.args?.join(" ")||""]})]})]})]},n.name)})}),e.size===0&&b.jsx("div",{style:{marginTop:"8px",padding:"8px 12px",background:ic(S.error,.15),border:`1px solid ${S.error}`,borderRadius:"8px",color:S.error,fontSize:"12px"},children:"⚠️ Please select at least one service to start the server"})]})}function YW({detectedPaths:r,detecting:e,onDetect:t,onPathSelect:n,onViewConfig:a,filePath:i,fileContent:o,updatePath:s,onFileSelect:l,onPathChange:u,onUpdatePathChange:c,services:f,selectedServices:d,onSelectionChange:h}){return b.jsxs("div",{style:{background:S.bgCard,border:`1px solid ${S.borderLight}`,borderRadius:"12px",padding:"24px",marginBottom:"20px",boxShadow:`0 2px 4px ${S.shadowSm}`},children:[b.jsxs("div",{style:{marginBottom:"16px"},children:[b.jsx("h3",{style:{fontSize:"15px",fontWeight:"600",marginBottom:"8px",color:S.textPrimary,fontFamily:j.body},children:"Configuration File"}),b.jsx("p",{style:{fontSize:"13px",color:S.textSecondary,lineHeight:"1.5",fontFamily:j.body},children:"Select your MCP configuration file or provide a file path. The file will be converted to MCP Shark format and used to start the server."})]}),b.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[b.jsx($W,{detectedPaths:r,detecting:e,onDetect:t,onSelect:n,onView:a}),b.jsx(HW,{filePath:i,fileContent:o,updatePath:s,onFileSelect:l,onPathChange:u,onUpdatePathChange:c}),b.jsx(UW,{services:f,selectedServices:d,onSelectionChange:h})]})]})}function XW({viewingConfig:r,configContent:e,loadingConfig:t,onClose:n,viewingBackup:a,backupContent:i,loadingBackup:o}){const s=a!==null;if(!(r!==null)&&!s)return null;const u=s?i:e,c=s?o:t,f=s?"Backup File":"MCP Configuration File";return b.jsx("dialog",{open:!0,"aria-modal":"true",style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"rgba(0, 0, 0, 0.8)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,padding:"20px",border:"none",margin:0,width:"100%",height:"100%"},onClick:n,onKeyDown:d=>{d.key==="Escape"&&n()},children:b.jsxs("div",{role:"document",style:{background:S.bgPrimary,border:`1px solid ${S.borderLight}`,borderRadius:"8px",width:"100%",maxWidth:"800px",maxHeight:"90vh",display:"flex",flexDirection:"column",overflow:"hidden"},onClick:d=>d.stopPropagation(),onKeyDown:d=>d.stopPropagation(),children:[b.jsxs("div",{style:{padding:"16px",borderBottom:"1px solid #333",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[b.jsxs("div",{children:[b.jsx("h3",{style:{fontSize:"16px",fontWeight:"500",marginBottom:"4px",color:S.textPrimary},children:f}),u&&b.jsxs("div",{style:{fontSize:"12px",color:"#858585"},children:[u.displayPath,s&&u.createdAt&&b.jsxs("span",{style:{marginLeft:"12px",color:"#666"},children:["Created: ",new Date(u.createdAt).toLocaleString()]})]})]}),b.jsx("button",{type:"button",onClick:n,style:{background:"transparent",border:"none",color:S.textPrimary,cursor:"pointer",fontSize:"24px",padding:"0",width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center"},children:"×"})]}),b.jsx("div",{style:{flex:1,overflow:"auto",padding:"20px"},children:c?b.jsx("div",{style:{color:"#858585",textAlign:"center",padding:"40px"},children:"Loading..."}):u?b.jsx("pre",{style:{background:S.bgPrimary,padding:"16px",borderRadius:"4px",fontSize:"13px",fontFamily:"monospace",color:S.textPrimary,overflow:"auto",border:`1px solid ${S.borderLight}`,lineHeight:"1.6",margin:0},children:u.content}):b.jsx("div",{style:{color:"#f48771",textAlign:"center",padding:"40px"},children:"Failed to load file content"})})]})})}function ZW({message:r,error:e}){return!r&&!e?null:b.jsx("div",{style:{marginBottom:"20px",padding:"12px 16px",background:ic(r?S.info:S.error,.15),border:`1px solid ${r?S.info:S.error}`,borderRadius:"8px",color:r?S.textPrimary:S.error,fontSize:"13px",lineHeight:"1.6",fontFamily:j.body,boxShadow:`0 2px 4px ${S.shadowSm}`},children:r||e})}function KW({status:r,loading:e,onStart:t,onStop:n,canStart:a}){return b.jsxs("div",{style:{background:S.bgCard,border:`1px solid ${S.borderLight}`,borderRadius:"12px",padding:"24px",marginBottom:"20px",boxShadow:`0 2px 4px ${S.shadowSm}`},children:[b.jsx("div",{style:{marginBottom:"16px"},children:b.jsx("h3",{style:{fontSize:"15px",fontWeight:"600",marginBottom:"8px",color:S.textPrimary,fontFamily:j.body},children:"Server Control"})}),b.jsxs("div",{style:{display:"flex",gap:"12px",alignItems:"center",flexWrap:"wrap"},children:[r.running?b.jsx("button",{type:"button",onClick:n,disabled:e,style:{padding:"10px 20px",background:S.buttonDanger,border:`1px solid ${S.buttonDanger}`,color:S.textInverse,cursor:e?"not-allowed":"pointer",fontSize:"13px",fontFamily:j.body,fontWeight:"500",borderRadius:"8px",opacity:e?.5:1,transition:"all 0.2s",boxShadow:`0 2px 4px ${S.shadowSm}`},onMouseEnter:i=>{e||(i.currentTarget.style.background=S.buttonDangerHover,i.currentTarget.style.transform="translateY(-1px)")},onMouseLeave:i=>{i.currentTarget.style.background=S.buttonDanger,i.currentTarget.style.transform="translateY(0)"},children:e?"Stopping...":"Stop MCP Shark"}):b.jsx("button",{type:"button",onClick:t,disabled:e||!a,style:{padding:"10px 20px",background:S.buttonPrimary,border:`1px solid ${S.buttonPrimary}`,color:S.textInverse,cursor:e||!a?"not-allowed":"pointer",fontSize:"13px",fontFamily:j.body,fontWeight:"500",borderRadius:"8px",opacity:e||!a?.5:1,transition:"all 0.2s",boxShadow:`0 2px 4px ${S.shadowSm}`},onMouseEnter:i=>{!e&&a&&(i.currentTarget.style.background=S.buttonPrimaryHover,i.currentTarget.style.transform="translateY(-1px)")},onMouseLeave:i=>{i.currentTarget.style.background=S.buttonPrimary,i.currentTarget.style.transform="translateY(0)"},children:e?"Processing...":"Start MCP Shark"}),b.jsxs("div",{style:{marginLeft:"auto",display:"flex",alignItems:"center",gap:"10px",padding:"8px 16px",background:S.bgPrimary,border:`1px solid ${S.borderLight}`,borderRadius:"8px"},children:[b.jsx("div",{style:{width:"10px",height:"10px",borderRadius:"50%",background:r.running?S.success:S.textTertiary,boxShadow:r.running?`0 0 8px ${S.success}80`:"none",transition:"all 0.3s"}}),b.jsx("span",{style:{color:S.textPrimary,fontSize:"13px",fontWeight:"500",fontFamily:j.body},children:r.running?r.pid?`Running (PID: ${r.pid})`:"Running":"Stopped"})]})]})]})}function qW(){return b.jsxs("div",{style:{marginBottom:"24px"},children:[b.jsx("h2",{style:{fontSize:"24px",fontWeight:"700",marginBottom:"12px",color:S.textPrimary,fontFamily:j.body},children:"MCP Shark Server Setup"}),b.jsx("p",{style:{fontSize:"15px",color:S.textSecondary,lineHeight:"1.6",fontFamily:j.body},children:"Convert your MCP configuration file and start the MCP Shark server to aggregate multiple MCP servers into a single endpoint."})]})}function QW({filePath:r,updatePath:e}){return b.jsxs("div",{style:{background:S.bgCard,border:`1px solid ${S.borderLight}`,borderRadius:"12px",padding:"24px",boxShadow:`0 2px 4px ${S.shadowSm}`},children:[b.jsx("h3",{style:{fontSize:"15px",fontWeight:"600",marginBottom:"12px",color:S.textPrimary,fontFamily:j.body},children:"What This Does"}),b.jsxs("ul",{style:{margin:0,paddingLeft:"20px",fontSize:"13px",color:S.textSecondary,lineHeight:"1.8",fontFamily:j.body},children:[b.jsxs("li",{children:["Converts your MCP config (",b.jsx("code",{style:{color:S.accentOrange,fontFamily:j.mono},children:"mcpServers"}),") to MCP Shark format (",b.jsx("code",{style:{color:S.accentOrange,fontFamily:j.mono},children:"servers"}),")"]}),b.jsxs("li",{children:["Starts the MCP Shark server on"," ",b.jsx("code",{style:{color:S.accentBlue,fontFamily:j.mono},children:"http://localhost:9851/mcp"})]}),b.jsx("li",{children:r||e?"Updates your original config file to point to the MCP Shark server (creates a backup first)":"Note: Provide a file path to update your original config file automatically"}),(r||e)&&b.jsx("li",{style:{color:S.success,marginTop:"4px",fontWeight:"500"},children:"✓ Original config will be automatically restored when you stop the server or close the UI"})]})]})}function JW(){const[r,e]=Y.useState([]),[t,n]=Y.useState(!0),[a,i]=Y.useState([]),[o,s]=Y.useState(!1),[l,u]=Y.useState(null),[c,f]=Y.useState(null),[d,h]=Y.useState(!1),[v,y]=Y.useState(null),[m,x]=Y.useState(null),[_,T]=Y.useState(!1),C=Y.useCallback(async()=>{n(!0);try{const E=await(await fetch("/api/config/detect")).json();e(E.detected||[])}catch(P){console.error("Failed to detect config paths:",P)}finally{n(!1)}},[]),k=Y.useCallback(async()=>{s(!0);try{const E=await(await fetch("/api/config/backups")).json();i(E.backups||[])}catch(P){console.error("Failed to load backups:",P)}finally{s(!1)}},[]),A=async P=>{h(!0),u(P);try{const E=await fetch(`/api/config/read?filePath=${encodeURIComponent(P)}`),O=await E.json();E.ok?f(O):f(null)}catch{f(null)}finally{h(!1)}},L=async P=>{T(!0),y(P);try{const E=await fetch(`/api/config/backup/view?backupPath=${encodeURIComponent(P)}`),O=await E.json();E.ok?x(O):x(null)}catch{x(null)}finally{T(!1)}},D=async P=>{try{return(await fetch("/api/config/backup/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({backupPath:P})})).ok?(await k(),!0):!1}catch(E){return console.error("Failed to delete backup:",E),!1}};return Y.useEffect(()=>{C(),k()},[C,k]),{detectedPaths:r,detecting:t,detectConfigPaths:C,backups:a,loadingBackups:o,loadBackups:k,viewingConfig:l,configContent:c,loadingConfig:d,handleViewConfig:A,setViewingConfig:u,setConfigContent:f,viewingBackup:v,backupContent:m,loadingBackup:_,handleViewBackup:L,handleDeleteBackup:D,setViewingBackup:y,setBackupContent:x}}function e$(r,e){const[t,n]=Y.useState([]),[a,i]=Y.useState(new Set),[o,s]=Y.useState(!1),l=Y.useCallback(async()=>{if(!r&&!e){n([]),i(new Set);return}s(!0);try{const c=await fetch("/api/config/services",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r?{fileContent:r}:{filePath:e})}),f=await c.json();c.ok&&f.services?(n(f.services),i(new Set(f.services.map(d=>d.name)))):(n([]),i(new Set))}catch(u){console.error("Failed to extract services:",u),n([]),i(new Set)}finally{s(!1)}},[r,e]);return Y.useEffect(()=>{r||e?l():(n([]),i(new Set))},[r,e,l]),{services:t,selectedServices:a,setSelectedServices:i,loadingServices:o}}function t$(){const[r,e]=Y.useState(""),[t,n]=Y.useState(""),[a,i]=Y.useState(""),[o,s]=Y.useState({running:!1,pid:null}),[l,u]=Y.useState(!1),[c,f]=Y.useState(null),[d,h]=Y.useState(null),[v,y]=Y.useState(!1),[m,x]=Y.useState({backupPath:null,originalPath:null}),{services:_,selectedServices:T,setSelectedServices:C}=e$(r,t),{detectedPaths:k,detecting:A,detectConfigPaths:L,backups:D,loadingBackups:P,loadBackups:E,viewingConfig:O,configContent:B,loadingConfig:N,handleViewConfig:W,setViewingConfig:H,setConfigContent:$,viewingBackup:Z,backupContent:G,loadingBackup:X,handleViewBackup:K,handleDeleteBackup:V,setViewingBackup:U,setBackupContent:ae}=JW();Y.useEffect(()=>{Ne();const ke=setInterval(Ne,2e3);return()=>clearInterval(ke)},[]);const ce=(ke,He)=>{x({backupPath:ke,originalPath:He}),y(!0)},re=async()=>{const{backupPath:ke,originalPath:He}=m;y(!1);try{const tt=await fetch("/api/config/restore",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({backupPath:ke,originalPath:He})}),_t=await tt.json();tt.ok?(f(_t.message||"Config restored successfully"),h(null),E(),L()):(h(_t.error||"Failed to restore backup"),f(null))}catch(tt){h(tt.message||"Failed to restore backup"),f(null)}},_e=async ke=>{await V(ke)?(f("Backup deleted successfully"),h(null)):(h("Failed to delete backup"),f(null))},Ne=async()=>{try{const He=await(await fetch("/api/composite/status")).json();s(He)}catch(ke){console.error("Failed to fetch status:",ke)}},ve=ke=>{const He=ke.target.files[0];if(He){const tt=new FileReader;tt.onload=_t=>{e(_t.target.result)},tt.readAsText(He)}},fe=ke=>{const He=ke.target.value;n(He),He&&e("")},Te=ke=>{i(ke.target.value)},xe=async()=>{u(!0),h(null),f(null);try{const ke=r?{fileContent:r,filePath:a||null}:{filePath:t};T.size>0&&(ke.selectedServices=Array.from(T));const He=await fetch("/api/composite/setup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ke)}),tt=await He.json();if(He.ok){const _t=tt.message||"MCP Shark server started successfully";f(tt.backupPath?`${_t} (Backup saved to ${tt.backupPath})`:_t),e(""),n(""),i(""),C(new Set),setTimeout(Ne,1e3)}else h(tt.error||"Failed to setup MCP Shark server")}catch(ke){h(ke.message||"Failed to setup MCP Shark server")}finally{u(!1)}},Ie=async()=>{u(!0),h(null),f(null);try{const ke=await fetch("/api/composite/stop",{method:"POST"}),He=await ke.json();if(ke.ok){const tt=He.message||"MCP Shark server stopped";f(He.message?.includes("restored")?"MCP Shark server stopped and original config file restored":tt),setTimeout(Ne,1e3)}else h(He.error||"Failed to stop MCP Shark server")}catch(ke){h(ke.message||"Failed to stop MCP Shark server")}finally{u(!1)}},dt=(r||t)&&(_.length===0||T.size>0);return b.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",background:S.bgPrimary,overflow:"auto"},children:[b.jsxs("div",{style:{width:"100%",maxWidth:"1200px",margin:"0 auto",padding:"32px",minHeight:"100%",boxSizing:"border-box"},children:[b.jsx(qW,{}),b.jsx(YW,{detectedPaths:k,detecting:A,onDetect:L,onPathSelect:ke=>{n(ke),e(""),i(ke)},onViewConfig:W,filePath:t,fileContent:r,updatePath:a,onFileSelect:ve,onPathChange:fe,onUpdatePathChange:Te,services:_,selectedServices:T,onSelectionChange:C}),b.jsx(KW,{status:o,loading:l,onStart:xe,onStop:Ie,canStart:dt}),b.jsx(ZW,{message:c,error:d}),b.jsx(WW,{backups:D,loadingBackups:P,onRefresh:E,onRestore:ce,onView:K,onDelete:_e}),b.jsx(QW,{filePath:t,updatePath:a})]}),b.jsx(Ah,{isOpen:v,onClose:()=>y(!1),onConfirm:re,title:"Restore Backup",message:"Are you sure you want to restore this backup? This will overwrite the current config file.",confirmText:"Restore",cancelText:"Cancel",danger:!1}),b.jsx(XW,{viewingConfig:O,configContent:B,loadingConfig:N,viewingBackup:Z,backupContent:G,loadingBackup:X,onClose:()=>{H(null),$(null),U(null),ae(null)}})]})}function r$({engineStatus:r,rules:e=[]}){const[t,n]=Y.useState(!0),a=e.filter(i=>i.enabled);return b.jsxs("div",{style:{background:S.bgCard,border:`1px solid ${S.borderLight}`,borderRadius:"12px",padding:"16px",marginBottom:"24px"},children:[b.jsx("div",{style:{fontSize:"14px",fontWeight:600,fontFamily:j.body,color:S.textPrimary,marginBottom:"12px"},children:"YARA Engine Status"}),b.jsxs("div",{style:{display:"flex",gap:"24px",fontSize:"12px",fontFamily:j.body,marginBottom:a.length>0?"16px":0},children:[b.jsxs("span",{style:{color:S.textSecondary},children:["Native:"," ",b.jsx("span",{style:{color:r?.nativeAvailable?S.success:S.warning,fontWeight:500},children:r?.nativeAvailable?"Available":"Using Fallback"})]}),b.jsxs("span",{style:{color:S.textSecondary},children:["Loaded Rules:"," ",b.jsx("span",{style:{color:"#0d9488",fontWeight:500},children:r?.loadedRulesCount||0})]}),b.jsxs("span",{style:{color:S.textSecondary},children:["Compiled:"," ",b.jsx("span",{style:{color:"#0d9488",fontWeight:500},children:r?.compiledRulesCount||0})]})]}),a.length>0&&b.jsxs("div",{children:[b.jsxs("button",{type:"button",onClick:()=>n(!t),style:{background:"transparent",border:"none",padding:"4px 0",cursor:"pointer",display:"flex",alignItems:"center",gap:"4px",fontSize:"12px",fontFamily:j.body,color:S.textSecondary},children:[t?b.jsx(ui,{size:14}):b.jsx(Rl,{size:14}),"Active Rules (",a.length,")"]}),t&&b.jsx("div",{style:{marginTop:"8px",display:"flex",flexWrap:"wrap",gap:"8px"},children:a.map(i=>b.jsxs("div",{style:{background:S.bgSecondary,border:`1px solid ${S.borderLight}`,borderRadius:"6px",padding:"6px 10px",fontSize:"11px",fontFamily:j.mono,color:S.textPrimary,display:"flex",alignItems:"center",gap:"6px"},children:[b.jsx("span",{style:{width:"6px",height:"6px",borderRadius:"50%",background:i.source==="predefined"?"#0d9488":"#57534e"}}),i.name,i.severity&&b.jsx("span",{style:{fontSize:"9px",padding:"1px 4px",borderRadius:"3px",background:S[`${i.severity}Bg`]||S.bgSecondary,color:S[i.severity]||S.textTertiary,textTransform:"uppercase"},children:i.severity})]},i.rule_id))})]}),r?.nativeError&&b.jsx("div",{style:{fontSize:"11px",color:S.textSecondary,fontFamily:j.body,marginTop:"8px"},children:r.nativeError})]})}function n$({isEditing:r,onNew:e,onCancel:t,onResetDefaults:n,resetting:a,hasPredefined:i}){return b.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px"},children:[b.jsxs("h3",{style:{fontSize:"14px",fontWeight:600,color:S.textSecondary,fontFamily:j.body,textTransform:"uppercase",margin:0,display:"flex",alignItems:"center",gap:"8px"},children:[b.jsx(is,{size:16}),"YARA Rules"]}),b.jsxs("div",{style:{display:"flex",gap:"8px"},children:[!r&&i&&n&&b.jsxs("button",{type:"button",onClick:n,disabled:a,style:{background:"transparent",color:a?S.textTertiary:S.textSecondary,border:`1px solid ${S.borderLight}`,borderRadius:"6px",padding:"8px 14px",cursor:a?"not-allowed":"pointer",display:"flex",alignItems:"center",gap:"6px",fontSize:"12px",fontFamily:j.body},children:[b.jsx(Qo,{size:14,className:a?"spin":""}),a?"Resetting...":"Reset Defaults"]}),!r&&b.jsxs("button",{type:"button",onClick:e,style:{background:S.buttonPrimary,color:S.textInverse,border:"none",borderRadius:"6px",padding:"8px 14px",cursor:"pointer",display:"flex",alignItems:"center",gap:"6px",fontSize:"12px",fontFamily:j.body,fontWeight:600},children:[b.jsx(xW,{size:14}),"New Rule"]}),r&&b.jsxs("button",{type:"button",onClick:t,style:{background:"transparent",color:S.textSecondary,border:`1px solid ${S.borderLight}`,borderRadius:"6px",padding:"8px 14px",cursor:"pointer",display:"flex",alignItems:"center",gap:"6px",fontSize:"12px",fontFamily:j.body},children:[b.jsx(kh,{size:14}),"Cancel"]})]})]})}function a$({rule:r,onEdit:e,onDelete:t,onToggle:n}){return b.jsxs("div",{style:{background:S.bgCard,border:`1px solid ${S.borderLight}`,borderRadius:"8px",padding:"12px 16px",marginBottom:"8px",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[b.jsxs("div",{style:{flex:1},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"4px"},children:[b.jsx("span",{style:{fontFamily:j.mono,fontSize:"13px",color:S.textPrimary},children:r.name}),b.jsx("span",{style:{background:r.enabled?S.successBg:S.bgSecondary,color:r.enabled?S.success:S.textTertiary,padding:"2px 8px",borderRadius:"4px",fontSize:"10px",fontFamily:j.body,textTransform:"uppercase"},children:r.enabled?"enabled":"disabled"}),r.severity&&b.jsx("span",{style:{background:S[`${r.severity}Bg`]||S.bgSecondary,color:S[r.severity]||S.textSecondary,padding:"2px 8px",borderRadius:"4px",fontSize:"10px",fontFamily:j.body,textTransform:"uppercase"},children:r.severity}),r.source&&b.jsx("span",{style:{background:r.source==="predefined"?S.infoBg:S.bgSecondary,color:r.source==="predefined"?S.info:S.textTertiary,padding:"2px 8px",borderRadius:"4px",fontSize:"10px",fontFamily:j.body,textTransform:"uppercase"},children:r.source})]}),r.description&&b.jsx("p",{style:{color:S.textSecondary,fontSize:"12px",margin:0},children:r.description})]}),b.jsxs("div",{style:{display:"flex",gap:"8px"},children:[b.jsx("button",{type:"button",onClick:()=>n(r.rule_id,!r.enabled),style:{background:"transparent",border:"none",color:S.textSecondary,cursor:"pointer",padding:"4px 8px",fontSize:"11px",fontFamily:j.body},children:r.enabled?"Disable":"Enable"}),b.jsx("button",{type:"button",onClick:()=>e(r),style:{background:"transparent",border:"none",color:S.accent,cursor:"pointer",padding:"4px 8px",fontSize:"11px",fontFamily:j.body},children:"Edit"}),b.jsx("button",{type:"button",onClick:()=>t(r.rule_id),style:{background:"transparent",border:"none",color:S.critical,cursor:"pointer",padding:"4px"},children:b.jsx(Mc,{size:14})})]})]})}function i$({validation:r}){return r?b.jsxs("div",{style:{marginBottom:"12px"},children:[r.errors?.map(e=>b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px",color:S.critical,fontSize:"12px",fontFamily:j.body,marginBottom:"4px"},children:[b.jsx(oc,{size:14}),e]},e)),r.warnings?.map(e=>b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px",color:S.warning,fontSize:"12px",fontFamily:j.body,marginBottom:"4px"},children:[b.jsx(oc,{size:14}),e]},e))]}):null}function o$({content:r,onChange:e,onSave:t,onCancel:n,validation:a,saving:i}){return b.jsxs("div",{style:{background:S.bgCard,border:`1px solid ${S.borderLight}`,borderRadius:"12px",padding:"16px",marginBottom:"16px"},children:[b.jsx(i$,{validation:a}),b.jsx("textarea",{value:r,onChange:o=>e(o.target.value),placeholder:"Enter YARA rule...",style:{width:"100%",minHeight:"300px",background:S.bgSecondary,border:`1px solid ${S.borderLight}`,borderRadius:"8px",padding:"12px",fontFamily:j.mono,fontSize:"12px",color:S.textPrimary,resize:"vertical",outline:"none"}}),b.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"12px"},children:[b.jsx("button",{type:"button",onClick:n,style:{background:"transparent",color:S.textSecondary,border:`1px solid ${S.borderLight}`,borderRadius:"6px",padding:"8px 16px",cursor:"pointer",fontSize:"12px",fontFamily:j.body},children:"Cancel"}),b.jsxs("button",{type:"button",onClick:t,disabled:i,style:{background:S.buttonPrimary,color:S.textInverse,border:"none",borderRadius:"6px",padding:"8px 16px",cursor:i?"not-allowed":"pointer",display:"flex",alignItems:"center",gap:"6px",fontSize:"12px",fontFamily:j.body,fontWeight:600,opacity:i?.6:1},children:[b.jsx(fN,{size:14}),i?"Saving...":"Save Rule"]})]})]})}const s$=`rule custom_mcp_security_rule : security
|
|
9
|
+
{
|
|
10
|
+
meta:
|
|
11
|
+
description = "Custom MCP security rule"
|
|
12
|
+
author = "Your Name"
|
|
13
|
+
severity = "medium"
|
|
14
|
+
owasp_id = "MCP01"
|
|
15
|
+
|
|
16
|
+
strings:
|
|
17
|
+
$suspicious = "suspicious_pattern" nocase
|
|
18
|
+
$secret = /sk-[a-zA-Z0-9]{40,}/
|
|
19
|
+
|
|
20
|
+
condition:
|
|
21
|
+
any of them
|
|
22
|
+
}`;function l$(){return b.jsx("div",{style:{textAlign:"center",color:S.textSecondary,padding:"32px",background:S.bgCard,borderRadius:"12px",border:`1px solid ${S.borderLight}`,fontFamily:j.body,fontSize:"13px"},children:'No custom rules defined. Click "New Rule" to create one.'})}function u$({rules:r=[],onSave:e,onDelete:t,onToggle:n,onResetDefaults:a}){const[i,o]=Y.useState(!1),[s,l]=Y.useState(null),[u,c]=Y.useState(""),[f,d]=Y.useState(null),[h,v]=Y.useState(!1),[y,m]=Y.useState(!1),x=Y.useCallback(()=>{c(s$),l(null),d(null),o(!0)},[]),_=Y.useCallback(D=>{c(D.content),l(D),d(null),o(!0)},[]),T=Y.useCallback(()=>{o(!1),c(""),l(null),d(null)},[]),C=Y.useCallback(async()=>{v(!0);try{const D=await e({rule_id:s?.rule_id,content:u,enabled:s?.enabled!==!1});D.success?T():d({errors:D.errors})}catch(D){d({errors:[D.message]})}finally{v(!1)}},[u,s,e,T]),k=Y.useCallback(async()=>{if(a){m(!0);try{await a()}finally{m(!1)}}},[a]),A=r.filter(D=>D.source==="predefined"),L=r.filter(D=>D.source==="custom");return b.jsxs("div",{style:{marginTop:"24px"},children:[b.jsx(n$,{isEditing:i,onNew:x,onCancel:T,onResetDefaults:k,resetting:y,hasPredefined:A.length>0||L.length>0}),i&&b.jsx(o$,{content:u,onChange:c,onSave:C,onCancel:T,validation:f,saving:h}),!i&&r.length===0&&b.jsx(l$,{}),!i&&A.length>0&&b.jsx(eL,{title:"Predefined Rules",rules:A,handlers:{handleEdit:_,onDelete:t,onToggle:n}}),!i&&L.length>0&&b.jsx(eL,{title:"Custom Rules",rules:L,handlers:{handleEdit:_,onDelete:t,onToggle:n}})]})}function eL({title:r,rules:e,handlers:t}){return b.jsxs("div",{style:{marginBottom:"24px"},children:[b.jsxs("h4",{style:{fontSize:"12px",fontWeight:600,color:S.textSecondary,fontFamily:j.body,textTransform:"uppercase",marginBottom:"12px"},children:[r," (",e.length,")"]}),e.map(n=>b.jsx(a$,{rule:n,onEdit:t.handleEdit,onDelete:t.onDelete,onToggle:t.onToggle},n.rule_id))]})}function c$({communityRules:r,engineStatus:e,onToggleRule:t,onSaveRule:n,onDeleteRule:a,onResetDefaults:i}){return b.jsxs("div",{style:{padding:"24px",flex:1,overflow:"auto",background:S.bgPrimary},children:[b.jsx(r$,{engineStatus:e,rules:r}),b.jsx(u$,{rules:r,onSave:n,onDelete:a,onToggle:t,onResetDefaults:i})]})}const f$=[{id:"signed",label:"Signed",dotColor:S.success},{id:"aauth-aware",label:"AAuth-aware",dotColor:S.accentBlue},{id:"bearer",label:"Bearer",dotColor:S.warning},{id:"none",label:"No auth",dotColor:S.textTertiary}];function d$(r,e){return e?`${Math.round(r/e*100)}%`:"0%"}function h$({onTrafficGenerated:r}={}){const[e,t]=Y.useState(null),[n,a]=Y.useState([]),[i,o]=Y.useState(null),[s,l]=Y.useState(!1),[u,c]=Y.useState(!1),[f,d]=Y.useState(null),h=Y.useCallback(async()=>{l(!0),o(null);try{const[y,m]=await Promise.all([fetch("/api/aauth/posture"),fetch("/api/aauth/upstreams")]);if(!y.ok)throw new Error(`HTTP ${y.status}`);const x=await y.json();if(t(x),m.ok){const _=await m.json();a(_.upstreams||[])}}catch(y){o(y.message||"Failed to load AAuth posture")}finally{l(!1)}},[]),v=Y.useCallback(async()=>{c(!0),o(null);try{const y=await fetch("/api/aauth/self-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({rounds:2})});if(!y.ok)throw new Error(`HTTP ${y.status}`);const m=await y.json();d(m),await h(),typeof r=="function"&&r(m)}catch(y){o(y.message||"Failed to generate sample traffic")}finally{c(!1)}},[h,r]);return Y.useEffect(()=>{h()},[h]),i&&!e||!e?null:b.jsxs("div",{style:{marginBottom:"16px",padding:"14px 16px",background:S.bgCard,border:`1px solid ${S.borderLight}`,borderRadius:"8px",boxShadow:`0 1px 2px ${S.shadowSm}`},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"12px",marginBottom:"10px"},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[b.jsx(im,{size:16,stroke:1.5,style:{color:S.accentBlue}}),b.jsx("span",{style:{fontSize:"13px",fontFamily:j.body,fontWeight:600,color:S.textPrimary},children:"AAuth Posture"}),b.jsx("span",{style:{fontSize:"11px",fontFamily:j.body,color:S.textTertiary},children:e.total_packets>0?`observed in ${e.total_packets} packet${e.total_packets===1?"":"s"} · not verified`:"no AAuth signals observed yet"})]}),b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[b.jsxs("button",{type:"button",onClick:v,disabled:u,title:"Inserts fake AAuth packets so you can see how mcp-shark visualizes them. Not real traffic — synthetic packets are tagged with user-agent mcp-shark-self-test/1.0.","aria-label":"Generate fake sample AAuth traffic for demo purposes",style:{display:"inline-flex",alignItems:"center",gap:"6px",padding:"4px 10px",background:S.warning,border:`1px solid ${S.warning}`,borderRadius:"6px",color:"#fff",fontSize:"11px",fontFamily:j.body,fontWeight:500,cursor:u?"wait":"pointer",opacity:u?.7:1},children:[b.jsx(pN,{size:12,stroke:1.5}),u?"Generating…":"Generate sample data"]}),b.jsxs("button",{type:"button",onClick:h,disabled:s,"aria-label":"Refresh AAuth posture",style:{display:"inline-flex",alignItems:"center",gap:"6px",padding:"4px 10px",background:"transparent",border:`1px solid ${S.borderLight}`,borderRadius:"6px",color:S.textSecondary,fontSize:"11px",fontFamily:j.body,cursor:s?"wait":"pointer"},children:[b.jsx(Qo,{size:12,stroke:1.5}),"Refresh"]})]})]}),e.total_packets===0&&b.jsxs("div",{style:{padding:"12px",marginBottom:"8px",background:S.bgSecondary,border:`1px dashed ${S.borderLight}`,borderRadius:"6px",fontSize:"12px",fontFamily:j.body,color:S.textSecondary,lineHeight:1.5},children:["mcp-shark hasn’t observed any AAuth-bearing traffic yet. To see what this view looks like with data, click ",b.jsx("strong",{children:"Generate sample data"})," — it inserts fake AAuth packets (tagged"," ",b.jsx("code",{style:{fontFamily:j.mono},children:"user-agent: mcp-shark-self-test/1.0"}),") for demo purposes only."]}),f&&b.jsxs("div",{style:{padding:"8px 10px",marginBottom:"8px",background:`${S.warning}1A`,border:`1px solid ${S.warning}55`,borderRadius:"6px",fontSize:"11px",fontFamily:j.body,color:S.textSecondary},children:[b.jsx("strong",{children:"Sample data inserted:"})," ",f.inserted," fake packets across"," ",f.targets?.length||0," upstream",(f.targets?.length||0)===1?"":"s"," · postures:"," ",Object.entries(f.by_posture||{}).map(([y,m])=>`${y}=${m}`).join(", ")]}),b.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"10px",marginBottom:"10px"},children:f$.map(y=>{const m=e.counts?.[y.id]||0,x=d$(m,e.total_packets);return b.jsxs("div",{style:{padding:"10px 12px",background:S.bgSecondary,borderRadius:"6px",border:`1px solid ${S.borderLight}`},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px",marginBottom:"6px"},children:[b.jsx("span",{"aria-hidden":"true",style:{width:"8px",height:"8px",borderRadius:"50%",background:y.dotColor,display:"inline-block"}}),b.jsx("span",{style:{fontSize:"11px",color:S.textSecondary,fontFamily:j.body,textTransform:"uppercase",letterSpacing:"0.04em"},children:y.label})]}),b.jsx("div",{style:{fontSize:"20px",fontFamily:j.body,fontWeight:600,color:S.textPrimary,lineHeight:1.1},children:m}),b.jsx("div",{style:{fontSize:"11px",fontFamily:j.mono,color:S.textTertiary},children:x})]},y.id)})}),(e.unique_agents?.length>0||e.unique_missions?.length>0)&&b.jsxs("div",{style:{paddingTop:"8px",borderTop:`1px dashed ${S.borderLight}`,display:"flex",gap:"24px",flexWrap:"wrap",fontSize:"11px",fontFamily:j.body,color:S.textSecondary},children:[e.unique_agents?.length>0&&b.jsxs("span",{children:[b.jsx("strong",{style:{color:S.textPrimary},children:e.unique_agents.length})," ","unique agent",e.unique_agents.length===1?"":"s"]}),e.unique_missions?.length>0&&b.jsxs("span",{children:[b.jsx("strong",{style:{color:S.textPrimary},children:e.unique_missions.length})," ","mission",e.unique_missions.length===1?"":"s"," observed"]})]}),b.jsxs("div",{style:{marginTop:"8px",fontSize:"11px",fontFamily:j.body,color:S.textTertiary},children:["AAuth signals are recorded as observed only. Learn more at"," ",b.jsx("a",{href:"https://www.aauth.dev",target:"_blank",rel:"noreferrer noopener",style:{color:S.accentBlue},children:"aauth.dev"}),"."]})]})}const Hg={critical:{color:S.error,icon:MG,label:"Critical"},high:{color:"#ea580c",icon:oc,label:"High"},medium:{color:"#b45309",icon:oc,label:"Medium"},low:{color:"#0d9488",icon:QA,label:"Low"},info:{color:S.textTertiary,icon:QA,label:"Info"}},p$={tool:sm,prompt:is,resource:qu,server:qu,packet:om};function v$(r){if(!r)return{summary:null,patterns:[]};const e=[/detected:\s*/i,/patterns?:\s*/i,/found:\s*/i,/matches?:\s*/i];for(const t of e){const n=r.match(t);if(n){const a=r.substring(n.index+n[0].length),i=a.search(/[{\[]/),s=(i>0?a.substring(0,i):a).split(",").map(l=>l.trim()).filter(l=>l&&l.length<100&&!l.includes('"type"'));if(s.length>0){const l=r.match(/^([^:]+):/);return{summary:l?l[1].trim():null,patterns:s}}}}return r.length<200&&!r.includes("{")?{summary:r,patterns:[]}:{summary:null,patterns:[]}}function g$(r){if(!r)return null;try{const e=JSON.parse(r);return JSON.stringify(e,null,2)}catch{return r}}function y$({severity:r}){const e=Hg[r]||Hg.info,t=e.icon;return b.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"4px",padding:"2px 6px",background:`${e.color}20`,color:e.color,border:`1px solid ${e.color}40`,borderRadius:"4px",fontSize:"10px",fontWeight:"600",fontFamily:j.body},children:[b.jsx(t,{size:10}),e.label]})}function m$({owaspId:r}){return r?b.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:"2px 6px",background:S.bgCard,color:S.textSecondary,border:`1px solid ${S.borderLight}`,borderRadius:"4px",fontSize:"10px",fontWeight:"500",fontFamily:j.mono},children:r}):null}function x$({targetType:r,targetName:e}){const t=p$[r]||is;return b.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"4px",fontSize:"11px",color:S.textSecondary,fontFamily:j.body},children:[b.jsx(t,{size:12,stroke:1.5}),b.jsx("span",{style:{fontFamily:j.mono},children:e})]})}function ov({label:r,icon:e,children:t,variant:n}){const a=n==="highlight";return b.jsxs("div",{style:{marginBottom:"12px",background:a?`${S.error}08`:"transparent",border:a?`1px solid ${S.error}25`:"none",borderRadius:a?"6px":0,padding:a?"10px 12px":0},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px",fontSize:"10px",fontWeight:"600",color:a?S.error:S.textTertiary,fontFamily:j.body,textTransform:"uppercase",letterSpacing:"0.05em",marginBottom:"6px"},children:[e&&b.jsx(e,{size:12,stroke:1.5}),r]}),t]})}function S$({patterns:r}){return!r||r.length===0?null:b.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"6px"},children:r.map((e,t)=>b.jsx("code",{style:{display:"inline-block",padding:"4px 8px",background:S.bgCard,border:`1px solid ${S.error}30`,borderRadius:"4px",fontSize:"11px",fontFamily:j.mono,color:S.error,fontWeight:"500"},children:e},`pattern-${t}-${e.substring(0,20)}`))})}function b$({packet:r}){const e=r.headers_json?JSON.parse(r.headers_json):null,t=r.body_json?JSON.parse(r.body_json):r.body_raw;return b.jsxs("div",{style:{background:S.bgCard,borderRadius:"6px",border:`1px solid ${S.borderLight}`,overflow:"hidden"},children:[e&&Object.keys(e).length>0&&b.jsxs("div",{style:{padding:"8px 10px",borderBottom:`1px solid ${S.borderLight}`},children:[b.jsx("div",{style:{fontSize:"9px",fontWeight:"600",color:S.textTertiary,textTransform:"uppercase",letterSpacing:"0.05em",marginBottom:"4px"},children:"Headers"}),b.jsx("div",{style:{fontSize:"10px",fontFamily:j.mono},children:Object.entries(e).map(([n,a])=>b.jsxs("div",{style:{marginBottom:"2px"},children:[b.jsxs("span",{style:{color:"#0d9488"},children:[n,":"]})," ",b.jsx("span",{style:{color:S.textPrimary},children:String(a)})]},n))})]}),t&&b.jsxs("div",{style:{padding:"8px 10px"},children:[b.jsx("div",{style:{fontSize:"9px",fontWeight:"600",color:S.textTertiary,textTransform:"uppercase",letterSpacing:"0.05em",marginBottom:"4px"},children:"Body"}),b.jsx("pre",{style:{fontSize:"10px",fontFamily:j.mono,color:S.textPrimary,margin:0,overflow:"auto",maxHeight:"200px",whiteSpace:"pre-wrap",wordBreak:"break-word",background:S.bgTertiary,padding:"8px",borderRadius:"4px"},children:typeof t=="object"?JSON.stringify(t,null,2):t})]})]})}function Qw({finding:r,isExpanded:e,onToggle:t}){const[n,a]=Y.useState(null),[i,o]=Y.useState(!1),s=Hg[r.severity]||Hg.info,{summary:l,patterns:u}=v$(r.description),c=g$(r.evidence),f=()=>{!e&&r.frame_number&&!n&&(o(!0),fetch(`/api/packets/${r.frame_number}`).then(h=>h.json()).then(h=>{a(h),o(!1)}).catch(()=>o(!1))),t()},d=e?ui:Rl;return b.jsxs("div",{style:{background:S.bgCard,borderRadius:"8px",border:`1px solid ${S.borderLight}`,marginBottom:"8px",overflow:"hidden"},children:[b.jsx(_$,{finding:r,config:s,isExpanded:e,ChevronIcon:d,onToggle:f}),e&&b.jsx(w$,{finding:r,patterns:u,summary:l,formattedEvidence:c,packet:n,loadingPacket:i})]})}function _$({finding:r,config:e,isExpanded:t,ChevronIcon:n,onToggle:a}){return b.jsxs("button",{type:"button",onClick:a,"aria-expanded":t,style:{display:"flex",alignItems:"center",gap:"10px",padding:"10px 14px",width:"100%",background:t?S.bgTertiary:"transparent",border:"none",borderLeft:`3px solid ${e.color}`,cursor:"pointer",textAlign:"left",transition:"background 0.15s"},onMouseEnter:i=>{t||(i.currentTarget.style.background=S.bgTertiary)},onMouseLeave:i=>{t||(i.currentTarget.style.background="transparent")},children:[b.jsx(n,{size:14,color:S.textTertiary,style:{flexShrink:0}}),b.jsxs("div",{style:{flex:1,minWidth:0},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px",flexWrap:"wrap",marginBottom:"4px"},children:[b.jsx("span",{style:{fontSize:"12px",fontWeight:"500",color:S.textPrimary,fontFamily:j.body},children:r.title}),b.jsx(y$,{severity:r.severity}),b.jsx(m$,{owaspId:r.owasp_id})]}),b.jsx(x$,{targetType:r.target_type,targetName:r.target_name})]}),r.server_name&&b.jsx("span",{style:{fontSize:"10px",color:S.textTertiary,fontFamily:j.body,flexShrink:0},children:r.server_name})]})}function w$({finding:r,patterns:e,summary:t,formattedEvidence:n,packet:a,loadingPacket:i}){return b.jsxs("div",{style:{padding:"14px 14px 14px 28px",borderTop:`1px solid ${S.borderLight}`,background:S.bgTertiary},children:[e.length>0&&b.jsxs(ov,{label:"Detected Patterns",icon:OG,variant:"highlight",children:[t&&b.jsx("p",{style:{fontSize:"11px",color:S.textSecondary,fontFamily:j.body,margin:"0 0 8px 0"},children:t}),b.jsx(S$,{patterns:e})]}),n&&b.jsx(ov,{label:"Payload Sample",icon:is,children:b.jsx("code",{style:{display:"block",padding:"8px 10px",background:S.bgCard,borderRadius:"4px",border:`1px solid ${S.borderLight}`,fontSize:"11px",fontFamily:j.mono,color:S.textPrimary,overflowX:"auto",whiteSpace:"pre-wrap",wordBreak:"break-word",lineHeight:1.5,maxHeight:"150px"},children:n})}),r.frame_number&&b.jsxs(ov,{label:`Traffic Content (Packet #${r.frame_number})`,icon:om,children:[i&&b.jsx("div",{style:{fontSize:"11px",color:S.textTertiary},children:"Loading..."}),a&&b.jsx(b$,{packet:a}),!i&&!a&&b.jsx("div",{style:{fontSize:"11px",color:S.textTertiary},children:"Click to load packet content"})]}),r.recommendation&&b.jsx(ov,{label:"Recommendation",children:b.jsx("div",{style:{padding:"8px 10px",background:`${S.accentGreen}10`,borderRadius:"6px",border:`1px solid ${S.accentGreen}30`},children:b.jsx("p",{style:{fontSize:"12px",color:S.accentGreen,fontFamily:j.body,margin:0,lineHeight:1.5},children:r.recommendation})})}),b.jsxs("div",{style:{display:"flex",gap:"12px",flexWrap:"wrap",fontSize:"10px",color:S.textTertiary,paddingTop:"10px",borderTop:`1px solid ${S.borderLight}`},children:[b.jsxs("span",{children:["Rule: ",b.jsx("span",{style:{fontFamily:j.mono},children:r.rule_id})]}),r.session_id&&b.jsxs("span",{children:["Session: ",b.jsx("span",{style:{fontFamily:j.mono},children:r.session_id})]})]})]})}const yN={"owasp-mcp":{id:"owasp-mcp",name:"OWASP MCP Top 10",description:"Model Context Protocol vulnerabilities",icon:PW,color:"#0d9488"},"agentic-security":{id:"agentic-security",name:"Agentic Security",description:"AI agent behavioral issues",icon:MW,color:"#374151"},yara:{id:"yara",name:"YARA Detection",description:"Pattern-based security detection",icon:is,color:"#57534e"},"general-security":{id:"general-security",name:"General Security",description:"Common vulnerabilities",icon:qw,color:S.accentGreen}},tL={MCP01:"owasp-mcp",MCP02:"owasp-mcp",MCP03:"owasp-mcp",MCP04:"owasp-mcp",MCP05:"owasp-mcp",MCP06:"owasp-mcp",MCP07:"owasp-mcp",MCP08:"owasp-mcp",MCP09:"owasp-mcp",MCP10:"owasp-mcp",ASI01:"agentic-security",ASI02:"agentic-security",ASI03:"agentic-security",ASI04:"agentic-security",ASI05:"agentic-security",ASI06:"agentic-security",ASI07:"agentic-security",ASI08:"agentic-security",ASI09:"agentic-security",ASI10:"agentic-security"},T$={MCP01:"Token Mismanagement",MCP02:"Scope Creep",MCP03:"Tool Poisoning",MCP04:"Supply Chain",MCP05:"Command Injection",MCP06:"Prompt Injection",MCP07:"Insufficient Auth",MCP08:"Lack of Audit",MCP09:"Shadow Servers",MCP10:"Context Injection",ASI01:"Goal Hijack",ASI02:"Tool Misuse",ASI03:"Identity Abuse",ASI04:"Supply Chain",ASI05:"Remote Code Execution",ASI06:"Memory Poisoning",ASI07:"Insecure Communication",ASI08:"Cascading Failures",ASI09:"Trust Exploitation",ASI10:"Rogue Agent",SECRET:"Hardcoded Secrets","CMD-INJ":"Command Injection",SHADOW:"Cross-Server Shadowing",AMBIG:"Tool Name Ambiguity"},Xx={critical:S.error,high:"#ea580c",medium:"#b45309",low:"#0d9488",info:S.textTertiary};function C$(r){if(r.rule_id?.startsWith("yara-"))return"yara";const e=r.owasp_id?.toUpperCase();return e&&tL[e]?tL[e]:"general-security"}function M$({owaspId:r,findings:e,selectedFinding:t,onSelectFinding:n}){const[a,i]=Y.useState(!0),o=T$[r]||r,s=e.reduce((c,f)=>(c[f.severity||"info"]=(c[f.severity||"info"]||0)+1,c),{}),l=["critical","high","medium","low","info"],u=l.find(c=>s[c]>0)||"info";return b.jsxs("div",{style:{marginBottom:"6px",background:S.bgCard,borderRadius:"6px",border:`1px solid ${S.borderLight}`,overflow:"hidden"},children:[b.jsxs("button",{type:"button",onClick:()=>i(!a),"aria-expanded":a,style:{display:"flex",alignItems:"center",gap:"10px",padding:"8px 12px",width:"100%",background:"transparent",border:"none",borderLeft:`3px solid ${Xx[u]}`,cursor:"pointer",textAlign:"left",transition:"background 0.15s"},onMouseEnter:c=>{c.currentTarget.style.background=S.bgTertiary},onMouseLeave:c=>{c.currentTarget.style.background="transparent"},children:[a?b.jsx(ui,{size:12,color:S.textTertiary}):b.jsx(Rl,{size:12,color:S.textTertiary}),b.jsx("span",{style:{padding:"2px 6px",background:S.bgTertiary,color:S.textSecondary,borderRadius:"4px",fontSize:"10px",fontWeight:"600",fontFamily:j.mono},children:r}),b.jsx("span",{style:{flex:1,fontSize:"12px",color:S.textPrimary,fontFamily:j.body},children:o}),b.jsx("div",{style:{display:"flex",gap:"4px",alignItems:"center"},children:l.map(c=>s[c]>0&&b.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"2px",fontSize:"10px",color:Xx[c],fontWeight:"500"},children:[b.jsx("span",{style:{width:"5px",height:"5px",borderRadius:"50%",background:Xx[c]}}),s[c]]},c))}),b.jsx("span",{style:{padding:"2px 6px",background:S.bgTertiary,borderRadius:"8px",fontSize:"10px",color:S.textSecondary,fontWeight:"500"},children:e.length})]}),a&&b.jsx("div",{style:{padding:"10px",paddingLeft:"24px",background:S.bgTertiary,borderTop:`1px solid ${S.borderLight}`},children:e.map(c=>b.jsx(Qw,{finding:c,isExpanded:t?.id===c.id,onToggle:()=>n(t?.id===c.id?null:c)},c.id))})]})}function k$({category:r,findings:e,selectedFinding:t,onSelectFinding:n}){const[a,i]=Y.useState(!0),o=yN[r],s=o.icon,l=e.reduce((c,f)=>{const d=f.owasp_id||"OTHER";return c[d]||(c[d]=[]),c[d].push(f),c},{}),u=Object.keys(l).sort((c,f)=>{const d=Number.parseInt(c.replace(/\D/g,""),10)||999,h=Number.parseInt(f.replace(/\D/g,""),10)||999;return d-h});return b.jsxs("div",{style:{marginBottom:"16px"},children:[b.jsxs("button",{type:"button",onClick:()=>i(!a),"aria-expanded":a,style:{display:"flex",alignItems:"center",gap:"10px",padding:"12px 14px",width:"100%",background:S.bgCard,border:`1px solid ${S.borderLight}`,borderRadius:"8px",cursor:"pointer",textAlign:"left",marginBottom:a?"10px":0,transition:"background 0.15s"},onMouseEnter:c=>{c.currentTarget.style.background=S.bgTertiary},onMouseLeave:c=>{c.currentTarget.style.background=S.bgCard},children:[b.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",borderRadius:"6px",background:`${o.color}15`,border:`1px solid ${o.color}30`},children:b.jsx(s,{size:16,color:o.color,stroke:1.5})}),b.jsxs("div",{style:{flex:1},children:[b.jsx("div",{style:{fontSize:"13px",fontWeight:"500",color:S.textPrimary,fontFamily:j.body},children:o.name}),b.jsx("div",{style:{fontSize:"11px",color:S.textTertiary,fontFamily:j.body},children:o.description})]}),b.jsxs("div",{style:{textAlign:"right",marginRight:"6px"},children:[b.jsx("div",{style:{fontSize:"16px",fontWeight:"600",color:o.color,lineHeight:1},children:e.length}),b.jsx("div",{style:{fontSize:"10px",color:S.textTertiary},children:e.length===1?"finding":"findings"})]}),a?b.jsx(ui,{size:16,color:S.textTertiary}):b.jsx(Rl,{size:16,color:S.textTertiary})]}),a&&b.jsx("div",{style:{marginLeft:"10px"},children:u.map(c=>b.jsx(M$,{owaspId:c,findings:l[c],selectedFinding:t,onSelectFinding:n},c))})]})}function A$({findings:r,selectedFinding:e,onSelectFinding:t}){const n=r.reduce((s,l)=>{const u=C$(l);return s[u]||(s[u]=[]),s[u].push(l),s},{}),i=["owasp-mcp","agentic-security","yara","general-security"].filter(s=>n[s]?.length>0),o=Y.useCallback(s=>{const l=document.getElementById(`category-${s}`);l&&l.scrollIntoView({behavior:"smooth",block:"start"})},[]);return i.length===0?b.jsx("div",{style:{background:S.bgCard,borderRadius:"8px",border:`1px solid ${S.borderLight}`,padding:"40px",textAlign:"center"},children:b.jsx("p",{style:{fontSize:"13px",color:S.textSecondary,fontFamily:j.body,margin:0},children:"No findings yet."})}):b.jsxs("div",{children:[b.jsx("div",{style:{display:"flex",gap:"8px",marginBottom:"16px",flexWrap:"wrap"},children:i.map(s=>{const l=yN[s],u=l.icon;return b.jsxs("button",{type:"button",onClick:()=>o(s),style:{display:"flex",alignItems:"center",gap:"6px",padding:"6px 12px",background:`${l.color}10`,border:`1px solid ${l.color}30`,borderRadius:"6px",cursor:"pointer",fontFamily:j.body,fontSize:"12px",color:l.color,fontWeight:500,transition:"all 0.15s"},onMouseEnter:c=>{c.currentTarget.style.background=`${l.color}20`,c.currentTarget.style.borderColor=`${l.color}50`},onMouseLeave:c=>{c.currentTarget.style.background=`${l.color}10`,c.currentTarget.style.borderColor=`${l.color}30`},children:[b.jsx(u,{size:14,stroke:1.5}),l.name,b.jsx("span",{style:{background:l.color,color:"#fff",borderRadius:"10px",padding:"1px 6px",fontSize:"10px",fontWeight:600},children:n[s].length})]},s)})}),i.map(s=>b.jsx("div",{id:`category-${s}`,children:b.jsx(k$,{category:s,findings:n[s],selectedFinding:e,onSelectFinding:t})},s))]})}function L$({error:r,onNavigateToSetup:e}){if(!r)return null;const t=typeof r=="string"?r:r.message||"An error occurred",a=typeof r=="object"&&r.requiresSetup||t.toLowerCase().includes("no mcp servers")||t.toLowerCase().includes("no servers found")||t.toLowerCase().includes("config file not found")||t.toLowerCase().includes("failed to connect")||t.toLowerCase().includes("servers are running")||t.toLowerCase().includes("start servers via");return b.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:"12px",padding:"16px",background:`${S.critical}10`,border:`1px solid ${S.critical}40`,borderRadius:"12px",marginBottom:"24px"},children:[b.jsx(oc,{size:20,color:S.critical,style:{flexShrink:0}}),b.jsxs("div",{style:{flex:1},children:[b.jsx("h4",{style:{fontSize:"14px",fontWeight:"600",color:S.critical,fontFamily:j.body,margin:"0 0 4px 0"},children:"Scan Error"}),b.jsx("p",{style:{fontSize:"13px",color:S.textSecondary,fontFamily:j.body,margin:0,lineHeight:"1.4"},children:t}),a&&e&&b.jsxs("button",{type:"button",onClick:e,style:{display:"inline-flex",alignItems:"center",gap:"4px",marginTop:"12px",padding:"6px 12px",background:S.accentGreen,color:"#fff",border:"none",borderRadius:"4px",fontSize:"12px",fontWeight:500,fontFamily:j.body,cursor:"pointer",transition:"opacity 0.15s"},onMouseEnter:i=>{i.currentTarget.style.opacity="0.9"},onMouseLeave:i=>{i.currentTarget.style.opacity="1"},children:["Configure MCP Servers",b.jsx($g,{size:12,stroke:2})]})]})]})}const I$=[{id:"all",label:"All"},{id:"critical",label:"Critical",color:S.error},{id:"high",label:"High",color:"#ea580c"},{id:"medium",label:"Medium",color:"#b45309"},{id:"low",label:"Low",color:"#0d9488"},{id:"info",label:"Info",color:S.textTertiary}],sv="#0d9488";function D$({filter:r,isActive:e,count:t,onClick:n}){return b.jsxs("button",{onClick:n,type:"button",style:{display:"inline-flex",alignItems:"center",gap:"4px",padding:"4px 10px",background:e?`${sv}15`:S.bgCard,color:e?sv:S.textSecondary,border:`1px solid ${e?sv:S.borderLight}`,borderRadius:"6px",fontSize:"11px",fontWeight:e?"600":"400",fontFamily:j.body,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:a=>{e||(a.currentTarget.style.background=S.bgTertiary)},onMouseLeave:a=>{e||(a.currentTarget.style.background=S.bgCard)},children:[r.color&&b.jsx("span",{style:{width:"6px",height:"6px",borderRadius:"50%",background:r.color}}),r.label,t>0&&b.jsx("span",{style:{padding:"1px 5px",background:e?sv:S.bgTertiary,color:e?S.textInverse:S.textSecondary,borderRadius:"8px",fontSize:"9px",fontWeight:"600"},children:t})]})}function rL({findings:r,selectedFinding:e,onSelectFinding:t,showFilter:n=!0}){const[a,i]=Y.useState("all");if(!r||r.length===0)return b.jsx("div",{style:{background:S.bgCard,borderRadius:"8px",border:`1px solid ${S.borderLight}`,padding:"40px",textAlign:"center"},children:b.jsx("p",{style:{fontSize:"13px",color:S.textSecondary,fontFamily:j.body,margin:0},children:"No findings yet. Run a scan to detect vulnerabilities."})});const o=r.reduce((c,f)=>{const d=f.severity||"info";return c[d]=(c[d]||0)+1,c},{}),s=a==="all"?r:r.filter(c=>c.severity===a),l={critical:0,high:1,medium:2,low:3,info:4},u=[...s].sort((c,f)=>(l[c.severity]||4)-(l[f.severity]||4));return b.jsxs("div",{children:[n&&b.jsxs("div",{style:{marginBottom:"12px"},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"10px"},children:[b.jsx("span",{style:{fontSize:"10px",fontWeight:"600",color:S.textTertiary,fontFamily:j.body,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Filter by Severity"}),b.jsxs("span",{style:{fontSize:"11px",color:S.textTertiary,fontFamily:j.body},children:[u.length," of ",r.length]})]}),b.jsx("div",{style:{display:"flex",gap:"6px",flexWrap:"wrap"},children:I$.map(c=>b.jsx(D$,{filter:c,isActive:a===c.id,count:c.id==="all"?r.length:o[c.id]||0,onClick:()=>i(c.id)},c.id))})]}),b.jsx("div",{children:u.length===0?b.jsx("div",{style:{background:S.bgCard,borderRadius:"8px",border:`1px solid ${S.borderLight}`,padding:"24px",textAlign:"center"},children:b.jsxs("p",{style:{fontSize:"12px",color:S.textSecondary,fontFamily:j.body,margin:0},children:["No ",a," severity findings."]})}):u.map(c=>b.jsx(Qw,{finding:c,isExpanded:e?.id===c.id,onToggle:()=>t(e?.id===c.id?null:c)},c.id))})]})}function P$(r){const e=new Date(r),n=new Date-e;if(n<6e4)return"Just now";if(n<36e5){const a=Math.floor(n/6e4);return`${a} min${a>1?"s":""} ago`}if(n<864e5){const a=Math.floor(n/36e5);return`${a} hour${a>1?"s":""} ago`}return e.toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function lv({count:r,severity:e,color:t}){return r?b.jsxs("span",{style:{padding:"2px 6px",background:`${t}15`,color:t,borderRadius:"4px",fontSize:"10px",fontWeight:600,fontFamily:j.mono},children:[r," ",e]}):null}function nL({scan:r,onSelect:e,isSelected:t}){const n=r.servers?r.servers.split(","):[];return b.jsx("button",{type:"button",onClick:()=>e(r.scan_id),style:{display:"flex",alignItems:"flex-start",gap:"12px",width:"100%",padding:"12px",background:t?`${S.accentGreen}10`:"transparent",border:`1px solid ${t?S.accentGreen:S.borderLight}`,borderRadius:"6px",cursor:"pointer",textAlign:"left",transition:"all 0.15s"},onMouseEnter:a=>{t||(a.currentTarget.style.background=S.bgSecondary)},onMouseLeave:a=>{t||(a.currentTarget.style.background="transparent")},children:b.jsxs("div",{style:{flex:1,minWidth:0},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"6px"},children:[b.jsx(Yw,{size:12,stroke:1.5,style:{color:S.textMuted}}),b.jsx("span",{style:{fontSize:"12px",fontWeight:500,color:S.textPrimary,fontFamily:j.body},children:P$(r.scan_time)}),b.jsxs("span",{style:{fontSize:"11px",color:S.textMuted,fontFamily:j.mono},children:[r.finding_count," finding",r.finding_count!==1?"s":""]})]}),b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px",marginBottom:"6px"},children:[b.jsx(qu,{size:11,stroke:1.5,style:{color:S.textMuted}}),b.jsx("span",{style:{fontSize:"11px",color:S.textSecondary,fontFamily:j.body,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n.join(", ")})]}),b.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px"},children:[b.jsx(lv,{count:r.critical_count,severity:"critical",color:S.severityCritical}),b.jsx(lv,{count:r.high_count,severity:"high",color:S.severityHigh}),b.jsx(lv,{count:r.medium_count,severity:"medium",color:S.severityMedium}),b.jsx(lv,{count:r.low_count,severity:"low",color:S.severityLow})]})]})})}function R$({history:r,onSelectScan:e,selectedScanId:t,expanded:n}){const[a,i]=Y.useState(!1),o=Y.useCallback(()=>{i(l=>!l)},[]);if(!r||r.length===0)return b.jsx("div",{style:{padding:"40px",textAlign:"center",color:S.textMuted,fontFamily:j.body,fontSize:"14px"},children:'No scan history yet. Click "Analyse" to run your first scan.'});const s=n||a;return n?b.jsxs("div",{style:{marginBottom:"16px"},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"12px"},children:[b.jsx("span",{style:{fontSize:"14px",fontWeight:600,color:S.textPrimary,fontFamily:j.body},children:"Analysis History"}),b.jsxs("span",{style:{fontSize:"11px",color:S.textMuted,fontFamily:j.mono,background:S.bgSecondary,padding:"2px 8px",borderRadius:"4px"},children:[r.length," scan",r.length!==1?"s":""]})]}),b.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:r.map(l=>b.jsx(nL,{scan:l,onSelect:e,isSelected:t===l.scan_id},l.scan_id))})]}):b.jsxs("div",{style:{marginBottom:"16px",border:`1px solid ${S.borderLight}`,borderRadius:"8px",overflow:"hidden"},children:[b.jsx("button",{type:"button",onClick:o,style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",padding:"12px 16px",background:S.bgSecondary,border:"none",cursor:"pointer",textAlign:"left"},children:b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[s?b.jsx(ui,{size:16,stroke:2,style:{color:S.textMuted}}):b.jsx(Rl,{size:16,stroke:2,style:{color:S.textMuted}}),b.jsx("span",{style:{fontSize:"13px",fontWeight:600,color:S.textPrimary,fontFamily:j.body},children:"Scan History"}),b.jsx("span",{style:{fontSize:"11px",color:S.textMuted,fontFamily:j.mono,background:S.bgPrimary,padding:"2px 6px",borderRadius:"4px"},children:r.length})]})}),s&&b.jsx("div",{style:{padding:"12px",background:S.bgPrimary,display:"flex",flexDirection:"column",gap:"8px",maxHeight:"300px",overflowY:"auto"},children:r.map(l=>b.jsx(nL,{scan:l,onSelect:e,isSelected:t===l.scan_id},l.scan_id))})]})}const E$=(r,e)=>r?e?{title:"No Security Issues Found",description:"Your MCP servers passed all security checks. No vulnerabilities or suspicious patterns were detected.",showSuccessIcon:!0}:{title:"No Findings",description:'Click "Analyse" to run local static analysis on your connected MCP servers.',showSuccessIcon:!1}:{title:"No MCP Servers Running",description:"Start MCP servers via the Setup tab to enable analysis.",showSuccessIcon:!1};function z$({onNavigateToSetup:r,serversAvailable:e,scanComplete:t}){const{title:n,description:a,showSuccessIcon:i}=E$(e,t);return b.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"400px",textAlign:"center",padding:"40px"},children:[b.jsx("div",{style:{marginBottom:"24px",opacity:i?1:.6},children:i?b.jsx(Cc,{size:64,stroke:1.5,style:{color:S.accentGreen},role:"img","aria-label":"Security check passed icon"}):b.jsxs("svg",{width:64,height:64,viewBox:"0 0 24 24",fill:"none",stroke:S.textTertiary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",style:{opacity:.5},role:"img","aria-label":"Security scan icon",children:[b.jsx("title",{children:"Security scan icon"}),b.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"}),b.jsx("path",{d:"M9 12l2 2 4-4"})]})}),b.jsx("h3",{style:{fontSize:"20px",fontWeight:"600",color:S.textPrimary,fontFamily:j.body,marginBottom:"8px"},children:n}),b.jsx("p",{style:{fontSize:"14px",color:S.textSecondary,fontFamily:j.body,maxWidth:"400px",lineHeight:"1.6",marginBottom:"24px"},children:a}),!e&&b.jsxs("button",{type:"button",onClick:r,style:{display:"flex",alignItems:"center",gap:"6px",padding:"10px 20px",background:S.accentGreen,color:"#fff",border:"none",borderRadius:"6px",fontSize:"14px",fontWeight:500,fontFamily:j.body,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:o=>{o.currentTarget.style.opacity="0.9"},onMouseLeave:o=>{o.currentTarget.style.opacity="1"},children:[b.jsx(Ib,{size:16,stroke:1.5}),"Go to Setup",b.jsx($g,{size:14,stroke:2})]}),e&&b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",padding:"12px 16px",background:S.bgSecondary,border:`1px solid ${S.borderLight}`,borderRadius:"8px"},children:[b.jsx(Ib,{size:16,stroke:1.5,style:{color:S.textMuted}}),b.jsx("span",{style:{fontSize:"13px",color:S.textSecondary,fontFamily:j.body},children:"Configure different servers?"}),b.jsxs("button",{type:"button",onClick:r,style:{display:"flex",alignItems:"center",gap:"4px",padding:"4px 10px",background:"transparent",color:S.accentGreen,border:`1px solid ${S.accentGreen}`,borderRadius:"4px",fontSize:"12px",fontWeight:500,fontFamily:j.body,cursor:"pointer",transition:"all 0.15s"},onMouseEnter:o=>{o.currentTarget.style.background=S.accentGreen,o.currentTarget.style.color="#fff"},onMouseLeave:o=>{o.currentTarget.style.background="transparent",o.currentTarget.style.color=S.accentGreen},children:["Go to Setup",b.jsx($g,{size:12,stroke:2})]})]})]})}const mN=({size:r=24,color:e="currentColor"})=>b.jsx(qw,{size:r,stroke:1.5,color:e}),lm=({size:r=16,color:e="currentColor"})=>b.jsx(Xw,{size:r,stroke:1.5,color:e}),O$=({size:r=16,color:e="currentColor"})=>b.jsx(oc,{size:r,stroke:1.5,color:e}),Ld=({size:r=16,color:e="currentColor"})=>b.jsx(fN,{size:r,stroke:1.5,color:e}),xN=({size:r=16,color:e="currentColor"})=>b.jsx(Yw,{size:r,stroke:1.5,color:e}),Yd=({size:r=16,color:e=S.accentBlue})=>b.jsx("div",{style:{width:r,height:r,border:`2px solid ${S.borderLight}`,borderTop:`2px solid ${e}`,borderRadius:"50%",animation:"spin 0.8s linear infinite"}});function N$({scanning:r}){return r?b.jsx("div",{style:{background:S.bgCard,border:`1px solid ${S.borderLight}`,borderRadius:"12px",padding:"24px",marginBottom:"24px",boxShadow:`0 2px 8px ${S.shadowSm}`},children:b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[b.jsx(Yd,{size:20}),b.jsxs("div",{style:{flex:1},children:[b.jsx("p",{style:{fontSize:"14px",fontWeight:"600",color:S.textPrimary,fontFamily:j.body,margin:0,marginBottom:"4px"},children:"Running Local Analysis..."}),b.jsx("p",{style:{fontSize:"12px",color:S.textSecondary,fontFamily:j.body,margin:0},children:"Scanning captured MCP traffic with YARA rules"})]})]})}):null}var Db=function(r,e){return Db=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])},Db(r,e)};function Q(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Db(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Id=function(){return Id=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Id.apply(this,arguments)};function j$(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(r);a<n.length;a++)e.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(r,n[a])&&(t[n[a]]=r[n[a]]);return t}function aL(r,e,t,n){function a(i){return i instanceof t?i:new t(function(o){o(i)})}return new(t||(t=Promise))(function(i,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?i(c.value):a(c.value).then(s,l)}u((n=n.apply(r,[])).next())})}function iL(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,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(;t;)try{if(n=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return t.label++,{value:u[1],done:!1};case 5:t.label++,a=u[1],u=[0];continue;case 7:u=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){t.label=u[1];break}if(u[0]===6&&t.label<i[1]){t.label=i[1],i=u;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(u);break}i[2]&&t.ops.pop(),t.trys.pop();continue}u=e.call(r,t)}catch(c){u=[6,c],a=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var B$=(function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r})(),F$=(function(){function r(){this.browser=new B$,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 r})(),ot=new F$;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(ot.wxa=!0,ot.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?ot.worker=!0:!ot.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(ot.node=!0,ot.svgSupported=!0):V$(navigator.userAgent,ot);function V$(r,e){var t=e.browser,n=r.match(/Firefox\/([\d.]+)/),a=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),i=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);n&&(t.firefox=!0,t.version=n[1]),a&&(t.ie=!0,t.version=a[1]),i&&(t.edge=!0,t.version=i[1],t.newEdge=+i[1].split(".")[0]>18),o&&(t.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!t.ie&&!t.edge,e.pointerEventsSupported="onpointerdown"in window&&(t.edge||t.ie&&+t.version>=11);var s=e.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;e.transform3dSupported=(t.ie&&"transition"in l||t.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),e.transformSupported=e.transform3dSupported||t.ie&&+t.version>=9}}var Jw=12,SN="sans-serif",Ui=Jw+"px "+SN,G$=20,W$=100,$$="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function H$(r){var e={};if(typeof JSON>"u")return e;for(var t=0;t<r.length;t++){var n=String.fromCharCode(t+32),a=(r.charCodeAt(t)-G$)/W$;e[n]=a}return e}var U$=H$($$),pn={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:(function(){var r,e;return function(t,n){if(!r){var a=pn.createCanvas();r=a&&a.getContext("2d")}if(r)return e!==n&&(e=r.font=n||Ui),r.measureText(t);t=t||"",n=n||Ui;var i=/((?:\d+)?\.?\d*)px/.exec(n),o=i&&+i[1]||Jw,s=0;if(n.indexOf("mono")>=0)s=o*t.length;else for(var l=0;l<t.length;l++){var u=U$[t[l]];s+=u==null?o:u*o}return{width:s}}})(),loadImage:function(r,e,t){var n=new Image;return n.onload=e,n.onerror=t,n.src=r,n}};function bN(r){for(var e in pn)r[e]&&(pn[e]=r[e])}var _N=Qn(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(r,e){return r["[object "+e+"]"]=!0,r},{}),wN=Qn(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(r,e){return r["[object "+e+"Array]"]=!0,r},{}),kc=Object.prototype.toString,um=Array.prototype,Y$=um.forEach,X$=um.filter,eT=um.slice,Z$=um.map,oL=(function(){}).constructor,uv=oL?oL.prototype:null,tT="__proto__",K$=2311;function rT(){return K$++}function cm(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];typeof console<"u"&&console.error.apply(console,r)}function Ae(r){if(r==null||typeof r!="object")return r;var e=r,t=kc.call(r);if(t==="[object Array]"){if(!Qu(r)){e=[];for(var n=0,a=r.length;n<a;n++)e[n]=Ae(r[n])}}else if(wN[t]){if(!Qu(r)){var i=r.constructor;if(i.from)e=i.from(r);else{e=new i(r.length);for(var n=0,a=r.length;n<a;n++)e[n]=r[n]}}}else if(!_N[t]&&!Qu(r)&&!_l(r)){e={};for(var o in r)r.hasOwnProperty(o)&&o!==tT&&(e[o]=Ae(r[o]))}return e}function Ye(r,e,t){if(!Pe(e)||!Pe(r))return t?Ae(e):r;for(var n in e)if(e.hasOwnProperty(n)&&n!==tT){var a=r[n],i=e[n];Pe(i)&&Pe(a)&&!le(i)&&!le(a)&&!_l(i)&&!_l(a)&&!Pb(i)&&!Pb(a)&&!Qu(i)&&!Qu(a)?Ye(a,i,t):(t||!(n in r))&&(r[n]=Ae(e[n]))}return r}function fm(r,e){for(var t=r[0],n=1,a=r.length;n<a;n++)t=Ye(t,r[n],e);return t}function ie(r,e){if(Object.assign)Object.assign(r,e);else for(var t in e)e.hasOwnProperty(t)&&t!==tT&&(r[t]=e[t]);return r}function De(r,e,t){for(var n=st(e),a=0,i=n.length;a<i;a++){var o=n[a];(t?e[o]!=null:r[o]==null)&&(r[o]=e[o])}return r}var q$=pn.createCanvas;function Ue(r,e){if(r){if(r.indexOf)return r.indexOf(e);for(var t=0,n=r.length;t<n;t++)if(r[t]===e)return t}return-1}function nT(r,e){var t=r.prototype;function n(){}n.prototype=e.prototype,r.prototype=new n;for(var a in t)t.hasOwnProperty(a)&&(r.prototype[a]=t[a]);r.prototype.constructor=r,r.superClass=e}function Wt(r,e,t){if(r="prototype"in r?r.prototype:r,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var n=Object.getOwnPropertyNames(e),a=0;a<n.length;a++){var i=n[a];i!=="constructor"&&(t?e[i]!=null:r[i]==null)&&(r[i]=e[i])}else De(r,e,t)}function Pr(r){return!r||typeof r=="string"?!1:typeof r.length=="number"}function z(r,e,t){if(r&&e)if(r.forEach&&r.forEach===Y$)r.forEach(e,t);else if(r.length===+r.length)for(var n=0,a=r.length;n<a;n++)e.call(t,r[n],n,r);else for(var i in r)r.hasOwnProperty(i)&&e.call(t,r[i],i,r)}function ue(r,e,t){if(!r)return[];if(!e)return dm(r);if(r.map&&r.map===Z$)return r.map(e,t);for(var n=[],a=0,i=r.length;a<i;a++)n.push(e.call(t,r[a],a,r));return n}function Qn(r,e,t,n){if(r&&e){for(var a=0,i=r.length;a<i;a++)t=e.call(n,t,r[a],a,r);return t}}function ht(r,e,t){if(!r)return[];if(!e)return dm(r);if(r.filter&&r.filter===X$)return r.filter(e,t);for(var n=[],a=0,i=r.length;a<i;a++)e.call(t,r[a],a,r)&&n.push(r[a]);return n}function os(r,e,t){if(r&&e){for(var n=0,a=r.length;n<a;n++)if(e.call(t,r[n],n,r))return r[n]}}function st(r){if(!r)return[];if(Object.keys)return Object.keys(r);var e=[];for(var t in r)r.hasOwnProperty(t)&&e.push(t);return e}function Q$(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];return function(){return r.apply(e,t.concat(eT.call(arguments)))}}var ye=uv&&Me(uv.bind)?uv.call.bind(uv.bind):Q$;function $e(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return function(){return r.apply(this,e.concat(eT.call(arguments)))}}function le(r){return Array.isArray?Array.isArray(r):kc.call(r)==="[object Array]"}function Me(r){return typeof r=="function"}function pe(r){return typeof r=="string"}function Ug(r){return kc.call(r)==="[object String]"}function ut(r){return typeof r=="number"}function Pe(r){var e=typeof r;return e==="function"||!!r&&e==="object"}function Pb(r){return!!_N[kc.call(r)]}function en(r){return!!wN[kc.call(r)]}function _l(r){return typeof r=="object"&&typeof r.nodeType=="number"&&typeof r.ownerDocument=="object"}function Lh(r){return r.colorStops!=null}function TN(r){return r.image!=null}function CN(r){return kc.call(r)==="[object RegExp]"}function Dr(r){return r!==r}function Tr(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];for(var t=0,n=r.length;t<n;t++)if(r[t]!=null)return r[t]}function Ce(r,e){return r??e}function hn(r,e,t){return r??e??t}function dm(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return eT.apply(r,e)}function Ih(r){if(typeof r=="number")return[r,r,r,r];var e=r.length;return e===2?[r[0],r[1],r[0],r[1]]:e===3?[r[0],r[1],r[2],r[1]]:r}function Rr(r,e){if(!r)throw new Error(e)}function Mn(r){return r==null?null:typeof r.trim=="function"?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var MN="__ec_primitive__";function Xd(r){r[MN]=!0}function Qu(r){return r[MN]}var J$=(function(){function r(){this.data={}}return r.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},r.prototype.has=function(e){return this.data.hasOwnProperty(e)},r.prototype.get=function(e){return this.data[e]},r.prototype.set=function(e,t){return this.data[e]=t,this},r.prototype.keys=function(){return st(this.data)},r.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},r})(),kN=typeof Map=="function";function eH(){return kN?new Map:new J$}var AN=(function(){function r(e){var t=le(e);this.data=eH();var n=this;e instanceof r?e.each(a):e&&z(e,a);function a(i,o){t?n.set(i,o):n.set(o,i)}}return r.prototype.hasKey=function(e){return this.data.has(e)},r.prototype.get=function(e){return this.data.get(e)},r.prototype.set=function(e,t){return this.data.set(e,t),t},r.prototype.each=function(e,t){this.data.forEach(function(n,a){e.call(t,n,a)})},r.prototype.keys=function(){var e=this.data.keys();return kN?Array.from(e):e},r.prototype.removeKey=function(e){this.data.delete(e)},r})();function we(r){return new AN(r)}function sc(r,e){for(var t=new r.constructor(r.length+e.length),n=0;n<r.length;n++)t[n]=r[n];for(var a=r.length,n=0;n<e.length;n++)t[n+a]=e[n];return t}function Dh(r,e){var t;if(Object.create)t=Object.create(r);else{var n=function(){};n.prototype=r,t=new n}return e&&ie(t,e),t}function aT(r){var e=r.style;e.webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function Se(r,e){return r.hasOwnProperty(e)}function Vt(){}var Dd=180/Math.PI,tH=Number.EPSILON||Math.pow(2,-52);const rH=Object.freeze(Object.defineProperty({__proto__:null,EPSILON:tH,HashMap:AN,RADIAN_TO_DEGREE:Dd,assert:Rr,bind:ye,clone:Ae,concatArray:sc,createCanvas:q$,createHashMap:we,createObject:Dh,curry:$e,defaults:De,disableUserSelect:aT,each:z,eqNaN:Dr,extend:ie,filter:ht,find:os,guid:rT,hasOwn:Se,indexOf:Ue,inherits:nT,isArray:le,isArrayLike:Pr,isBuiltInObject:Pb,isDom:_l,isFunction:Me,isGradientObject:Lh,isImagePatternObject:TN,isNumber:ut,isObject:Pe,isPrimitive:Qu,isRegExp:CN,isString:pe,isStringSafe:Ug,isTypedArray:en,keys:st,logError:cm,map:ue,merge:Ye,mergeAll:fm,mixin:Wt,noop:Vt,normalizeCssArray:Ih,reduce:Qn,retrieve:Tr,retrieve2:Ce,retrieve3:hn,setAsPrimitive:Xd,slice:dm,trim:Mn},Symbol.toStringTag,{value:"Module"}));function ss(r,e){return r==null&&(r=0),e==null&&(e=0),[r,e]}function Gr(r,e){return r[0]=e[0],r[1]=e[1],r}function ei(r){return[r[0],r[1]]}function hm(r,e,t){return r[0]=e,r[1]=t,r}function Rb(r,e,t){return r[0]=e[0]+t[0],r[1]=e[1]+t[1],r}function Yg(r,e,t,n){return r[0]=e[0]+t[0]*n,r[1]=e[1]+t[1]*n,r}function No(r,e,t){return r[0]=e[0]-t[0],r[1]=e[1]-t[1],r}function Zd(r){return Math.sqrt(iT(r))}var nH=Zd;function iT(r){return r[0]*r[0]+r[1]*r[1]}var aH=iT;function iH(r,e,t){return r[0]=e[0]*t[0],r[1]=e[1]*t[1],r}function oH(r,e,t){return r[0]=e[0]/t[0],r[1]=e[1]/t[1],r}function sH(r,e){return r[0]*e[0]+r[1]*e[1]}function Pd(r,e,t){return r[0]=e[0]*t,r[1]=e[1]*t,r}function El(r,e){var t=Zd(e);return t===0?(r[0]=0,r[1]=0):(r[0]=e[0]/t,r[1]=e[1]/t),r}function Xg(r,e){return Math.sqrt((r[0]-e[0])*(r[0]-e[0])+(r[1]-e[1])*(r[1]-e[1]))}var Ei=Xg;function LN(r,e){return(r[0]-e[0])*(r[0]-e[0])+(r[1]-e[1])*(r[1]-e[1])}var $o=LN;function lH(r,e){return r[0]=-e[0],r[1]=-e[1],r}function Rd(r,e,t,n){return r[0]=e[0]+n*(t[0]-e[0]),r[1]=e[1]+n*(t[1]-e[1]),r}function Gt(r,e,t){var n=e[0],a=e[1];return r[0]=t[0]*n+t[2]*a+t[4],r[1]=t[1]*n+t[3]*a+t[5],r}function zi(r,e,t){return r[0]=Math.min(e[0],t[0]),r[1]=Math.min(e[1],t[1]),r}function Oi(r,e,t){return r[0]=Math.max(e[0],t[0]),r[1]=Math.max(e[1],t[1]),r}const uH=Object.freeze(Object.defineProperty({__proto__:null,add:Rb,applyTransform:Gt,clone:ei,copy:Gr,create:ss,dist:Ei,distSquare:$o,distance:Xg,distanceSquare:LN,div:oH,dot:sH,len:Zd,lenSquare:iT,length:nH,lengthSquare:aH,lerp:Rd,max:Oi,min:zi,mul:iH,negate:lH,normalize:El,scale:Pd,scaleAndAdd:Yg,set:hm,sub:No},Symbol.toStringTag,{value:"Module"}));var hu=(function(){function r(e,t){this.target=e,this.topTarget=t&&t.topTarget}return r})(),cH=(function(){function r(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return r.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new hu(t,e),"dragstart",e.event))},r.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,a=e.offsetY,i=n-this._x,o=a-this._y;this._x=n,this._y=a,t.drift(i,o,e),this.handler.dispatchToElement(new hu(t,e),"drag",e.event);var s=this.handler.findHover(n,a,t).target,l=this._dropTarget;this._dropTarget=s,t!==s&&(l&&s!==l&&this.handler.dispatchToElement(new hu(l,e),"dragleave",e.event),s&&s!==l&&this.handler.dispatchToElement(new hu(s,e),"dragenter",e.event))}},r.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new hu(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new hu(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},r})(),ra=(function(){function r(e){e&&(this._$eventProcessor=e)}return r.prototype.on=function(e,t,n,a){this._$handlers||(this._$handlers={});var i=this._$handlers;if(typeof t=="function"&&(a=n,n=t,t=null),!n||!e)return this;var o=this._$eventProcessor;t!=null&&o&&o.normalizeQuery&&(t=o.normalizeQuery(t)),i[e]||(i[e]=[]);for(var s=0;s<i[e].length;s++)if(i[e][s].h===n)return this;var l={h:n,query:t,ctx:a||this,callAtLast:n.zrEventfulCallAtLast},u=i[e].length-1,c=i[e][u];return c&&c.callAtLast?i[e].splice(u,0,l):i[e].push(l),this},r.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},r.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var a=[],i=0,o=n[e].length;i<o;i++)n[e][i].h!==t&&a.push(n[e][i]);n[e]=a}n[e]&&n[e].length===0&&delete n[e]}else delete n[e];return this},r.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var a=this._$handlers[e],i=this._$eventProcessor;if(a)for(var o=t.length,s=a.length,l=0;l<s;l++){var u=a[l];if(!(i&&i.filter&&u.query!=null&&!i.filter(e,u.query)))switch(o){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,t[0]);break;case 2:u.h.call(u.ctx,t[0],t[1]);break;default:u.h.apply(u.ctx,t);break}}return i&&i.afterTrigger&&i.afterTrigger(e),this},r.prototype.triggerWithContext=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var a=this._$handlers[e],i=this._$eventProcessor;if(a)for(var o=t.length,s=t[o-1],l=a.length,u=0;u<l;u++){var c=a[u];if(!(i&&i.filter&&c.query!=null&&!i.filter(e,c.query)))switch(o){case 0:c.h.call(s);break;case 1:c.h.call(s,t[0]);break;case 2:c.h.call(s,t[0],t[1]);break;default:c.h.apply(s,t.slice(1,o-1));break}}return i&&i.afterTrigger&&i.afterTrigger(e),this},r})(),fH=Math.log(2);function Eb(r,e,t,n,a,i){var o=n+"-"+a,s=r.length;if(i.hasOwnProperty(o))return i[o];if(e===1){var l=Math.round(Math.log((1<<s)-1&~a)/fH);return r[t][l]}for(var u=n|1<<t,c=t+1;n&1<<c;)c++;for(var f=0,d=0,h=0;d<s;d++){var v=1<<d;v&a||(f+=(h%2?-1:1)*r[t][d]*Eb(r,e-1,c,u,a|v,i),h++)}return i[o]=f,f}function sL(r,e){var t=[[r[0],r[1],1,0,0,0,-e[0]*r[0],-e[0]*r[1]],[0,0,0,r[0],r[1],1,-e[1]*r[0],-e[1]*r[1]],[r[2],r[3],1,0,0,0,-e[2]*r[2],-e[2]*r[3]],[0,0,0,r[2],r[3],1,-e[3]*r[2],-e[3]*r[3]],[r[4],r[5],1,0,0,0,-e[4]*r[4],-e[4]*r[5]],[0,0,0,r[4],r[5],1,-e[5]*r[4],-e[5]*r[5]],[r[6],r[7],1,0,0,0,-e[6]*r[6],-e[6]*r[7]],[0,0,0,r[6],r[7],1,-e[7]*r[6],-e[7]*r[7]]],n={},a=Eb(t,8,0,0,0,n);if(a!==0){for(var i=[],o=0;o<8;o++)for(var s=0;s<8;s++)i[s]==null&&(i[s]=0),i[s]+=((o+s)%2?-1:1)*Eb(t,7,o===0?1:0,1<<o,1<<s,n)/a*e[o];return function(l,u,c){var f=u*i[6]+c*i[7]+1;l[0]=(u*i[0]+c*i[1]+i[2])/f,l[1]=(u*i[3]+c*i[4]+i[5])/f}}}var Zg="___zrEVENTSAVED",Zx=[];function dH(r,e,t,n,a){return zb(Zx,e,n,a,!0)&&zb(r,t,Zx[0],Zx[1])}function hH(r,e){r&&t(r),e&&t(e);function t(n){var a=n[Zg];a&&(a.clearMarkers&&a.clearMarkers(),delete n[Zg])}}function zb(r,e,t,n,a){if(e.getBoundingClientRect&&ot.domSupported&&!IN(e)){var i=e[Zg]||(e[Zg]={}),o=pH(e,i),s=vH(o,i,a);if(s)return s(r,t,n),!0}return!1}function pH(r,e){var t=e.markers;if(t)return t;t=e.markers=[];for(var n=["left","right"],a=["top","bottom"],i=0;i<4;i++){var o=document.createElement("div"),s=o.style,l=i%2,u=(i>>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",a[u]+":0",n[1-l]+":auto",a[1-u]+":auto",""].join("!important;"),r.appendChild(o),t.push(o)}return e.clearMarkers=function(){z(t,function(c){c.parentNode&&c.parentNode.removeChild(c)})},t}function vH(r,e,t){for(var n=t?"invTrans":"trans",a=e[n],i=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=r[u].getBoundingClientRect(),f=2*u,d=c.left,h=c.top;o.push(d,h),l=l&&i&&d===i[f]&&h===i[f+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&a?a:(e.srcCoords=o,e[n]=t?sL(s,o):sL(o,s))}function IN(r){return r.nodeName.toUpperCase()==="CANVAS"}var gH=/([&<>"'])/g,yH={"&":"&","<":"<",">":">",'"':""","'":"'"};function $r(r){return r==null?"":(r+"").replace(gH,function(e,t){return yH[t]})}var mH=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Kx=[],xH=ot.browser.firefox&&+ot.browser.version.split(".")[0]<39;function Ob(r,e,t,n){return t=t||{},n?lL(r,e,t):xH&&e.layerX!=null&&e.layerX!==e.offsetX?(t.zrX=e.layerX,t.zrY=e.layerY):e.offsetX!=null?(t.zrX=e.offsetX,t.zrY=e.offsetY):lL(r,e,t),t}function lL(r,e,t){if(ot.domSupported&&r.getBoundingClientRect){var n=e.clientX,a=e.clientY;if(IN(r)){var i=r.getBoundingClientRect();t.zrX=n-i.left,t.zrY=a-i.top;return}else if(zb(Kx,r,n,a)){t.zrX=Kx[0],t.zrY=Kx[1];return}}t.zrX=t.zrY=0}function oT(r){return r||window.event}function Wn(r,e,t){if(e=oT(e),e.zrX!=null)return e;var n=e.type,a=n&&n.indexOf("touch")>=0;if(a){var o=n!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&Ob(r,o,e,t)}else{Ob(r,e,e,t);var i=SH(e);e.zrDelta=i?i/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&mH.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function SH(r){var e=r.wheelDelta;if(e)return e;var t=r.deltaX,n=r.deltaY;if(t==null||n==null)return e;var a=Math.abs(n!==0?n:t),i=n>0?-1:n<0?1:t>0?-1:1;return 3*a*i}function Nb(r,e,t,n){r.addEventListener(e,t,n)}function bH(r,e,t,n){r.removeEventListener(e,t,n)}var Yi=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function uL(r){return r.which===2||r.which===3}var _H=(function(){function r(){this._track=[]}return r.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(e,t,n){var a=e.touches;if(a){for(var i={points:[],touches:[],target:t,event:e},o=0,s=a.length;o<s;o++){var l=a[o],u=Ob(n,l,{});i.points.push([u.zrX,u.zrY]),i.touches.push(l)}this._track.push(i)}},r.prototype._recognize=function(e){for(var t in qx)if(qx.hasOwnProperty(t)){var n=qx[t](this._track,e);if(n)return n}},r})();function cL(r){var e=r[1][0]-r[0][0],t=r[1][1]-r[0][1];return Math.sqrt(e*e+t*t)}function wH(r){return[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2]}var qx={pinch:function(r,e){var t=r.length;if(t){var n=(r[t-1]||{}).points,a=(r[t-2]||{}).points||n;if(a&&a.length>1&&n&&n.length>1){var i=cL(n)/cL(a);!isFinite(i)&&(i=1),e.pinchScale=i;var o=wH(n);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:r[0].target,event:e}}}}};function hr(){return[1,0,0,1,0,0]}function Ph(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function Rh(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r}function Sa(r,e,t){var n=e[0]*t[0]+e[2]*t[1],a=e[1]*t[0]+e[3]*t[1],i=e[0]*t[2]+e[2]*t[3],o=e[1]*t[2]+e[3]*t[3],s=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];return r[0]=n,r[1]=a,r[2]=i,r[3]=o,r[4]=s,r[5]=l,r}function Ta(r,e,t){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4]+t[0],r[5]=e[5]+t[1],r}function to(r,e,t,n){n===void 0&&(n=[0,0]);var a=e[0],i=e[2],o=e[4],s=e[1],l=e[3],u=e[5],c=Math.sin(t),f=Math.cos(t);return r[0]=a*f+s*c,r[1]=-a*c+s*f,r[2]=i*f+l*c,r[3]=-i*c+f*l,r[4]=f*(o-n[0])+c*(u-n[1])+n[0],r[5]=f*(u-n[1])-c*(o-n[0])+n[1],r}function pm(r,e,t){var n=t[0],a=t[1];return r[0]=e[0]*n,r[1]=e[1]*a,r[2]=e[2]*n,r[3]=e[3]*a,r[4]=e[4]*n,r[5]=e[5]*a,r}function Jn(r,e){var t=e[0],n=e[2],a=e[4],i=e[1],o=e[3],s=e[5],l=t*o-i*n;return l?(l=1/l,r[0]=o*l,r[1]=-i*l,r[2]=-n*l,r[3]=t*l,r[4]=(n*s-o*a)*l,r[5]=(i*a-t*s)*l,r):null}function DN(r){var e=hr();return Rh(e,r),e}const TH=Object.freeze(Object.defineProperty({__proto__:null,clone:DN,copy:Rh,create:hr,identity:Ph,invert:Jn,mul:Sa,rotate:to,scale:pm,translate:Ta},Symbol.toStringTag,{value:"Module"}));var Ee=(function(){function r(e,t){this.x=e||0,this.y=t||0}return r.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(e,t){return this.x=e,this.y=t,this},r.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},r.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},r.prototype.scale=function(e){this.x*=e,this.y*=e},r.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},r.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},r.prototype.dot=function(e){return this.x*e.x+this.y*e.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},r.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},r.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},r.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},r.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},r.set=function(e,t,n){e.x=t,e.y=n},r.copy=function(e,t){e.x=t.x,e.y=t.y},r.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},r.lenSquare=function(e){return e.x*e.x+e.y*e.y},r.dot=function(e,t){return e.x*t.x+e.y*t.y},r.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},r.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},r.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},r.scaleAndAdd=function(e,t,n,a){e.x=t.x+n.x*a,e.y=t.y+n.y*a},r.lerp=function(e,t,n,a){var i=1-a;e.x=i*t.x+a*n.x,e.y=i*t.y+a*n.y},r})(),ll=Math.min,$u=Math.max,jb=Math.abs,fL=["x","y"],CH=["width","height"],Ms=new Ee,ks=new Ee,As=new Ee,Ls=new Ee,wn=PN(),vd=wn.minTv,Bb=wn.maxTv,Ed=[0,0],ze=(function(){function r(e,t,n,a){r.set(this,e,t,n,a)}return r.set=function(e,t,n,a,i){return a<0&&(t=t+a,a=-a),i<0&&(n=n+i,i=-i),e.x=t,e.y=n,e.width=a,e.height=i,e},r.prototype.union=function(e){var t=ll(e.x,this.x),n=ll(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=$u(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=$u(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},r.prototype.applyTransform=function(e){r.applyTransform(this,this,e)},r.prototype.calculateTransform=function(e){var t=this,n=e.width/t.width,a=e.height/t.height,i=hr();return Ta(i,i,[-t.x,-t.y]),pm(i,i,[n,a]),Ta(i,i,[e.x,e.y]),i},r.prototype.intersect=function(e,t,n){return r.intersect(this,e,t,n)},r.intersect=function(e,t,n,a){n&&Ee.set(n,0,0);var i=a&&a.outIntersectRect||null,o=a&&a.clamp;if(i&&(i.x=i.y=i.width=i.height=NaN),!e||!t)return!1;e instanceof r||(e=r.set(MH,e.x,e.y,e.width,e.height)),t instanceof r||(t=r.set(kH,t.x,t.y,t.width,t.height));var s=!!n;wn.reset(a,s);var l=wn.touchThreshold,u=e.x+l,c=e.x+e.width-l,f=e.y+l,d=e.y+e.height-l,h=t.x+l,v=t.x+t.width-l,y=t.y+l,m=t.y+t.height-l;if(u>c||f>d||h>v||y>m)return!1;var x=!(c<h||v<u||d<y||m<f);return(s||i)&&(Ed[0]=1/0,Ed[1]=0,dL(u,c,h,v,0,s,i,o),dL(f,d,y,m,1,s,i,o),s&&Ee.copy(n,x?wn.useDir?wn.dirMinTv:vd:Bb)),x},r.contain=function(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},r.prototype.contain=function(e,t){return r.contain(this,e,t)},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(e){r.copy(this,e)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(e){return new r(e.x,e.y,e.width,e.height)},r.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},r.applyTransform=function(e,t,n){if(!n){e!==t&&r.copy(e,t);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var a=n[0],i=n[3],o=n[4],s=n[5];e.x=t.x*a+o,e.y=t.y*i+s,e.width=t.width*a,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Ms.x=As.x=t.x,Ms.y=Ls.y=t.y,ks.x=Ls.x=t.x+t.width,ks.y=As.y=t.y+t.height,Ms.transform(n),Ls.transform(n),ks.transform(n),As.transform(n),e.x=ll(Ms.x,ks.x,As.x,Ls.x),e.y=ll(Ms.y,ks.y,As.y,Ls.y);var l=$u(Ms.x,ks.x,As.x,Ls.x),u=$u(Ms.y,ks.y,As.y,Ls.y);e.width=l-e.x,e.height=u-e.y},r})(),MH=new ze(0,0,0,0),kH=new ze(0,0,0,0);function dL(r,e,t,n,a,i,o,s){var l=jb(e-t),u=jb(n-r),c=ll(l,u),f=fL[a],d=fL[1-a],h=CH[a];e<t||n<r?l<u?(i&&(Bb[f]=-l),s&&(o[f]=e,o[h]=0)):(i&&(Bb[f]=u),s&&(o[f]=r,o[h]=0)):(o&&(o[f]=$u(r,t),o[h]=ll(e,n)-o[f]),i&&(c<Ed[0]||wn.useDir)&&(Ed[0]=ll(c,Ed[0]),(l<u||!wn.bidirectional)&&(vd[f]=l,vd[d]=0,wn.useDir&&wn.calcDirMTV()),(l>=u||!wn.bidirectional)&&(vd[f]=-u,vd[d]=0,wn.useDir&&wn.calcDirMTV())))}function PN(){var r=0,e=new Ee,t=new Ee,n={minTv:new Ee,maxTv:new Ee,useDir:!1,dirMinTv:new Ee,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,o){n.touchThreshold=0,i&&i.touchThreshold!=null&&(n.touchThreshold=$u(0,i.touchThreshold)),n.negativeSize=!1,o&&(n.minTv.set(1/0,1/0),n.maxTv.set(0,0),n.useDir=!1,i&&i.direction!=null&&(n.useDir=!0,n.dirMinTv.copy(n.minTv),t.copy(n.minTv),r=i.direction,n.bidirectional=i.bidirectional==null||!!i.bidirectional,n.bidirectional||e.set(Math.cos(r),Math.sin(r))))},calcDirMTV:function(){var i=n.minTv,o=n.dirMinTv,s=i.y*i.y+i.x*i.x,l=Math.sin(r),u=Math.cos(r),c=l*i.y+u*i.x;if(a(c)){a(i.x)&&a(i.y)&&o.set(0,0);return}if(t.x=s*u/c,t.y=s*l/c,a(t.x)&&a(t.y)){o.set(0,0);return}(n.bidirectional||e.dot(t)>0)&&t.len()<o.len()&&o.copy(t)}};function a(i){return jb(i)<1e-10}return n}var RN="silent";function AH(r,e,t){return{type:r,event:t,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:t.zrX,offsetY:t.zrY,gestureEvent:t.gestureEvent,pinchX:t.pinchX,pinchY:t.pinchY,pinchScale:t.pinchScale,wheelDelta:t.zrDelta,zrByTouch:t.zrByTouch,which:t.which,stop:LH}}function LH(){Yi(this.event)}var IH=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.handler=null,t}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e})(ra),Ef=(function(){function r(e,t){this.x=e,this.y=t}return r})(),DH=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Qx=new ze(0,0,0,0),EN=(function(r){Q(e,r);function e(t,n,a,i,o){var s=r.call(this)||this;return s._hovered=new Ef(0,0),s.storage=t,s.painter=n,s.painterRoot=i,s._pointerSize=o,a=a||new IH,s.proxy=null,s.setHandlerProxy(a),s._draggingMgr=new cH(s),s}return e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(z(DH,function(n){t.on&&t.on(n,this[n],this)},this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var n=t.zrX,a=t.zrY,i=zN(this,n,a),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=i?new Ef(n,a):this.findHover(n,a),u=l.target,c=this.proxy;c.setCursor&&c.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(l,"mousemove",t),u&&u!==s&&this.dispatchToElement(l,"mouseover",t)},e.prototype.mouseout=function(t){var n=t.zrEventControl;n!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",t),n!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new Ef(0,0)},e.prototype.dispatch=function(t,n){var a=this[t];a&&a.call(this,n)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var n=this.proxy;n.setCursor&&n.setCursor(t)},e.prototype.dispatchToElement=function(t,n,a){t=t||{};var i=t.target;if(!(i&&i.silent)){for(var o="on"+n,s=AH(n,t,a);i&&(i[o]&&(s.cancelBubble=!!i[o].call(i,s)),i.trigger(n,s),i=i.__hostTarget?i.__hostTarget:i.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)}))}},e.prototype.findHover=function(t,n,a){var i=this.storage.getDisplayList(),o=new Ef(t,n);if(hL(i,o,t,n,a),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,c=new ze(t-u,n-u,l,l),f=i.length-1;f>=0;f--){var d=i[f];d!==a&&!d.ignore&&!d.ignoreCoarsePointer&&(!d.parent||!d.parent.ignoreCoarsePointer)&&(Qx.copy(d.getBoundingRect()),d.transform&&Qx.applyTransform(d.transform),Qx.intersect(c)&&s.push(d))}if(s.length)for(var h=4,v=Math.PI/12,y=Math.PI*2,m=0;m<u;m+=h)for(var x=0;x<y;x+=v){var _=t+m*Math.cos(x),T=n+m*Math.sin(x);if(hL(s,o,_,T,a),o.target)return o}}return o},e.prototype.processGesture=function(t,n){this._gestureMgr||(this._gestureMgr=new _H);var a=this._gestureMgr;n==="start"&&a.clear();var i=a.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if(n==="end"&&a.clear(),i){var o=i.type;t.gestureEvent=o;var s=new Ef;s.target=i.target,this.dispatchToElement(s,o,i.event)}},e})(ra);z(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){EN.prototype[r]=function(e){var t=e.zrX,n=e.zrY,a=zN(this,t,n),i,o;if((r!=="mouseup"||!a)&&(i=this.findHover(t,n),o=i.target),r==="mousedown")this._downEl=o,this._downPoint=[e.zrX,e.zrY],this._upEl=o;else if(r==="mouseup")this._upEl=o;else if(r==="click"){if(this._downEl!==this._upEl||!this._downPoint||Ei(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,r,e)}});function PH(r,e,t){if(r[r.rectHover?"rectContain":"contain"](e,t)){for(var n=r,a=void 0,i=!1;n;){if(n.ignoreClip&&(i=!0),!i){var o=n.getClipPath();if(o&&!o.contain(e,t))return!1}n.silent&&(a=!0);var s=n.__hostTarget;n=s?n.ignoreHostSilent?null:s:n.parent}return a?RN:!0}return!1}function hL(r,e,t,n,a){for(var i=r.length-1;i>=0;i--){var o=r[i],s=void 0;if(o!==a&&!o.ignore&&(s=PH(o,t,n))&&(!e.topTarget&&(e.topTarget=o),s!==RN)){e.target=o;break}}}function zN(r,e,t){var n=r.painter;return e<0||e>n.getWidth()||t<0||t>n.getHeight()}var ON=32,zf=7;function RH(r){for(var e=0;r>=ON;)e|=r&1,r>>=1;return r+e}function pL(r,e,t,n){var a=e+1;if(a===t)return 1;if(n(r[a++],r[e])<0){for(;a<t&&n(r[a],r[a-1])<0;)a++;EH(r,e,a)}else for(;a<t&&n(r[a],r[a-1])>=0;)a++;return a-e}function EH(r,e,t){for(t--;e<t;){var n=r[e];r[e++]=r[t],r[t--]=n}}function vL(r,e,t,n,a){for(n===e&&n++;n<t;n++){for(var i=r[n],o=e,s=n,l;o<s;)l=o+s>>>1,a(i,r[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=i}}function Jx(r,e,t,n,a,i){var o=0,s=0,l=1;if(i(r,e[t+a])>0){for(s=n-a;l<s&&i(r,e[t+a+l])>0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}else{for(s=a+1;l<s&&i(r,e[t+a-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=a-l,l=a-u}for(o++;o<l;){var c=o+(l-o>>>1);i(r,e[t+c])>0?o=c+1:l=c}return l}function e1(r,e,t,n,a,i){var o=0,s=0,l=1;if(i(r,e[t+a])<0){for(s=a+1;l<s&&i(r,e[t+a-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=a-l,l=a-u}else{for(s=n-a;l<s&&i(r,e[t+a+l])>=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}for(o++;o<l;){var c=o+(l-o>>>1);i(r,e[t+c])<0?l=c:o=c+1}return l}function zH(r,e){var t=zf,n,a,i=0,o=[];n=[],a=[];function s(h,v){n[i]=h,a[i]=v,i+=1}function l(){for(;i>1;){var h=i-2;if(h>=1&&a[h-1]<=a[h]+a[h+1]||h>=2&&a[h-2]<=a[h]+a[h-1])a[h-1]<a[h+1]&&h--;else if(a[h]>a[h+1])break;c(h)}}function u(){for(;i>1;){var h=i-2;h>0&&a[h-1]<a[h+1]&&h--,c(h)}}function c(h){var v=n[h],y=a[h],m=n[h+1],x=a[h+1];a[h]=y+x,h===i-3&&(n[h+1]=n[h+2],a[h+1]=a[h+2]),i--;var _=e1(r[m],r,v,y,0,e);v+=_,y-=_,y!==0&&(x=Jx(r[v+y-1],r,m,x,x-1,e),x!==0&&(y<=x?f(v,y,m,x):d(v,y,m,x)))}function f(h,v,y,m){var x=0;for(x=0;x<v;x++)o[x]=r[h+x];var _=0,T=y,C=h;if(r[C++]=r[T++],--m===0){for(x=0;x<v;x++)r[C+x]=o[_+x];return}if(v===1){for(x=0;x<m;x++)r[C+x]=r[T+x];r[C+m]=o[_];return}for(var k=t,A,L,D;;){A=0,L=0,D=!1;do if(e(r[T],o[_])<0){if(r[C++]=r[T++],L++,A=0,--m===0){D=!0;break}}else if(r[C++]=o[_++],A++,L=0,--v===1){D=!0;break}while((A|L)<k);if(D)break;do{if(A=e1(r[T],o,_,v,0,e),A!==0){for(x=0;x<A;x++)r[C+x]=o[_+x];if(C+=A,_+=A,v-=A,v<=1){D=!0;break}}if(r[C++]=r[T++],--m===0){D=!0;break}if(L=Jx(o[_],r,T,m,0,e),L!==0){for(x=0;x<L;x++)r[C+x]=r[T+x];if(C+=L,T+=L,m-=L,m===0){D=!0;break}}if(r[C++]=o[_++],--v===1){D=!0;break}k--}while(A>=zf||L>=zf);if(D)break;k<0&&(k=0),k+=2}if(t=k,t<1&&(t=1),v===1){for(x=0;x<m;x++)r[C+x]=r[T+x];r[C+m]=o[_]}else{if(v===0)throw new Error;for(x=0;x<v;x++)r[C+x]=o[_+x]}}function d(h,v,y,m){var x=0;for(x=0;x<m;x++)o[x]=r[y+x];var _=h+v-1,T=m-1,C=y+m-1,k=0,A=0;if(r[C--]=r[_--],--v===0){for(k=C-(m-1),x=0;x<m;x++)r[k+x]=o[x];return}if(m===1){for(C-=v,_-=v,A=C+1,k=_+1,x=v-1;x>=0;x--)r[A+x]=r[k+x];r[C]=o[T];return}for(var L=t;;){var D=0,P=0,E=!1;do if(e(o[T],r[_])<0){if(r[C--]=r[_--],D++,P=0,--v===0){E=!0;break}}else if(r[C--]=o[T--],P++,D=0,--m===1){E=!0;break}while((D|P)<L);if(E)break;do{if(D=v-e1(o[T],r,h,v,v-1,e),D!==0){for(C-=D,_-=D,v-=D,A=C+1,k=_+1,x=D-1;x>=0;x--)r[A+x]=r[k+x];if(v===0){E=!0;break}}if(r[C--]=o[T--],--m===1){E=!0;break}if(P=m-Jx(r[_],o,0,m,m-1,e),P!==0){for(C-=P,T-=P,m-=P,A=C+1,k=T+1,x=0;x<P;x++)r[A+x]=o[k+x];if(m<=1){E=!0;break}}if(r[C--]=r[_--],--v===0){E=!0;break}L--}while(D>=zf||P>=zf);if(E)break;L<0&&(L=0),L+=2}if(t=L,t<1&&(t=1),m===1){for(C-=v,_-=v,A=C+1,k=_+1,x=v-1;x>=0;x--)r[A+x]=r[k+x];r[C]=o[T]}else{if(m===0)throw new Error;for(k=C-(m-1),x=0;x<m;x++)r[k+x]=o[x]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function wg(r,e,t,n){t||(t=0),n||(n=r.length);var a=n-t;if(!(a<2)){var i=0;if(a<ON){i=pL(r,t,n,e),vL(r,t,n,t+i,e);return}var o=zH(r,e),s=RH(a);do{if(i=pL(r,t,n,e),i<s){var l=a;l>s&&(l=s),vL(r,t,t+l,t+i,e),i=l}o.pushRun(t,i),o.mergeRuns(),a-=i,t+=i}while(a!==0);o.forceMergeRuns()}}var Tn=1,gd=2,Fu=4,gL=!1;function t1(){gL||(gL=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function yL(r,e){return r.zlevel===e.zlevel?r.z===e.z?r.z2-e.z2:r.z-e.z:r.zlevel-e.zlevel}var OH=(function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=yL}return r.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},r.prototype.getDisplayList=function(e,t){t=t||!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(t),n},r.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,a=0,i=t.length;a<i;a++)this._updateAndAddDisplayable(t[a],null,e);n.length=this._displayListLen,wg(n,yL)},r.prototype._updateAndAddDisplayable=function(e,t,n){if(!(e.ignore&&!n)){e.beforeUpdate(),e.update(),e.afterUpdate();var a=e.getClipPath(),i=t&&t.length,o=0,s=e.__clipPaths;if(!e.ignoreClip&&(i||a)){if(s||(s=e.__clipPaths=[]),i)for(var l=0;l<t.length;l++)s[o++]=t[l];for(var u=a,c=e;u;)u.parent=c,u.updateTransform(),s[o++]=u,c=u,u=u.getClipPath()}if(s&&(s.length=o),e.childrenRef){for(var f=e.childrenRef(),d=0;d<f.length;d++){var h=f[d];e.__dirty&&(h.__dirty|=Tn),this._updateAndAddDisplayable(h,s,n)}e.__dirty=0}else{var v=e;isNaN(v.z)&&(t1(),v.z=0),isNaN(v.z2)&&(t1(),v.z2=0),isNaN(v.zlevel)&&(t1(),v.zlevel=0),this._displayList[this._displayListLen++]=v}var y=e.getDecalElement&&e.getDecalElement();y&&this._updateAndAddDisplayable(y,s,n);var m=e.getTextGuideLine();m&&this._updateAndAddDisplayable(m,s,n);var x=e.getTextContent();x&&this._updateAndAddDisplayable(x,s,n)}},r.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},r.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);return}var a=Ue(this._roots,e);a>=0&&this._roots.splice(a,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r})(),Kg;Kg=ot.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var zd={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),-(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)))},elasticOut:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),t*Math.pow(2,-10*r)*Math.sin((r-e)*(2*Math.PI)/n)+1)},elasticInOut:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),(r*=2)<1?-.5*(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)):t*Math.pow(2,-10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)*.5+1)},backIn:function(r){var e=1.70158;return r*r*((e+1)*r-e)},backOut:function(r){var e=1.70158;return--r*r*((e+1)*r+e)+1},backInOut:function(r){var e=2.5949095;return(r*=2)<1?.5*(r*r*((e+1)*r-e)):.5*((r-=2)*r*((e+1)*r+e)+2)},bounceIn:function(r){return 1-zd.bounceOut(1-r)},bounceOut:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?zd.bounceIn(r*2)*.5:zd.bounceOut(r*2-1)*.5+.5}},cv=Math.pow,Ho=Math.sqrt,qg=1e-8,NN=1e-4,mL=Ho(3),fv=1/3,$a=ss(),Yn=ss(),Ju=ss();function jo(r){return r>-qg&&r<qg}function jN(r){return r>qg||r<-qg}function fr(r,e,t,n,a){var i=1-a;return i*i*(i*r+3*a*e)+a*a*(a*n+3*i*t)}function xL(r,e,t,n,a){var i=1-a;return 3*(((e-r)*i+2*(t-e)*a)*i+(n-t)*a*a)}function Qg(r,e,t,n,a,i){var o=n+3*(e-t)-r,s=3*(t-e*2+r),l=3*(e-r),u=r-a,c=s*s-3*o*l,f=s*l-9*o*u,d=l*l-3*s*u,h=0;if(jo(c)&&jo(f))if(jo(s))i[0]=0;else{var v=-l/s;v>=0&&v<=1&&(i[h++]=v)}else{var y=f*f-4*c*d;if(jo(y)){var m=f/c,v=-s/o+m,x=-m/2;v>=0&&v<=1&&(i[h++]=v),x>=0&&x<=1&&(i[h++]=x)}else if(y>0){var _=Ho(y),T=c*s+1.5*o*(-f+_),C=c*s+1.5*o*(-f-_);T<0?T=-cv(-T,fv):T=cv(T,fv),C<0?C=-cv(-C,fv):C=cv(C,fv);var v=(-s-(T+C))/(3*o);v>=0&&v<=1&&(i[h++]=v)}else{var k=(2*c*s-3*o*f)/(2*Ho(c*c*c)),A=Math.acos(k)/3,L=Ho(c),D=Math.cos(A),v=(-s-2*L*D)/(3*o),x=(-s+L*(D+mL*Math.sin(A)))/(3*o),P=(-s+L*(D-mL*Math.sin(A)))/(3*o);v>=0&&v<=1&&(i[h++]=v),x>=0&&x<=1&&(i[h++]=x),P>=0&&P<=1&&(i[h++]=P)}}return h}function BN(r,e,t,n,a){var i=6*t-12*e+6*r,o=9*e+3*n-3*r-9*t,s=3*e-3*r,l=0;if(jo(o)){if(jN(i)){var u=-s/i;u>=0&&u<=1&&(a[l++]=u)}}else{var c=i*i-4*o*s;if(jo(c))a[0]=-i/(2*o);else if(c>0){var f=Ho(c),u=(-i+f)/(2*o),d=(-i-f)/(2*o);u>=0&&u<=1&&(a[l++]=u),d>=0&&d<=1&&(a[l++]=d)}}return l}function Jo(r,e,t,n,a,i){var o=(e-r)*a+r,s=(t-e)*a+e,l=(n-t)*a+t,u=(s-o)*a+o,c=(l-s)*a+s,f=(c-u)*a+u;i[0]=r,i[1]=o,i[2]=u,i[3]=f,i[4]=f,i[5]=c,i[6]=l,i[7]=n}function FN(r,e,t,n,a,i,o,s,l,u,c){var f,d=.005,h=1/0,v,y,m,x;$a[0]=l,$a[1]=u;for(var _=0;_<1;_+=.05)Yn[0]=fr(r,t,a,o,_),Yn[1]=fr(e,n,i,s,_),m=$o($a,Yn),m<h&&(f=_,h=m);h=1/0;for(var T=0;T<32&&!(d<NN);T++)v=f-d,y=f+d,Yn[0]=fr(r,t,a,o,v),Yn[1]=fr(e,n,i,s,v),m=$o(Yn,$a),v>=0&&m<h?(f=v,h=m):(Ju[0]=fr(r,t,a,o,y),Ju[1]=fr(e,n,i,s,y),x=$o(Ju,$a),y<=1&&x<h?(f=y,h=x):d*=.5);return c&&(c[0]=fr(r,t,a,o,f),c[1]=fr(e,n,i,s,f)),Ho(h)}function NH(r,e,t,n,a,i,o,s,l){for(var u=r,c=e,f=0,d=1/l,h=1;h<=l;h++){var v=h*d,y=fr(r,t,a,o,v),m=fr(e,n,i,s,v),x=y-u,_=m-c;f+=Math.sqrt(x*x+_*_),u=y,c=m}return f}function wr(r,e,t,n){var a=1-n;return a*(a*r+2*n*e)+n*n*t}function Fb(r,e,t,n){return 2*((1-n)*(e-r)+n*(t-e))}function jH(r,e,t,n,a){var i=r-2*e+t,o=2*(e-r),s=r-n,l=0;if(jo(i)){if(jN(o)){var u=-s/o;u>=0&&u<=1&&(a[l++]=u)}}else{var c=o*o-4*i*s;if(jo(c)){var u=-o/(2*i);u>=0&&u<=1&&(a[l++]=u)}else if(c>0){var f=Ho(c),u=(-o+f)/(2*i),d=(-o-f)/(2*i);u>=0&&u<=1&&(a[l++]=u),d>=0&&d<=1&&(a[l++]=d)}}return l}function VN(r,e,t){var n=r+t-2*e;return n===0?.5:(r-e)/n}function Kd(r,e,t,n,a){var i=(e-r)*n+r,o=(t-e)*n+e,s=(o-i)*n+i;a[0]=r,a[1]=i,a[2]=s,a[3]=s,a[4]=o,a[5]=t}function GN(r,e,t,n,a,i,o,s,l){var u,c=.005,f=1/0;$a[0]=o,$a[1]=s;for(var d=0;d<1;d+=.05){Yn[0]=wr(r,t,a,d),Yn[1]=wr(e,n,i,d);var h=$o($a,Yn);h<f&&(u=d,f=h)}f=1/0;for(var v=0;v<32&&!(c<NN);v++){var y=u-c,m=u+c;Yn[0]=wr(r,t,a,y),Yn[1]=wr(e,n,i,y);var h=$o(Yn,$a);if(y>=0&&h<f)u=y,f=h;else{Ju[0]=wr(r,t,a,m),Ju[1]=wr(e,n,i,m);var x=$o(Ju,$a);m<=1&&x<f?(u=m,f=x):c*=.5}}return l&&(l[0]=wr(r,t,a,u),l[1]=wr(e,n,i,u)),Ho(f)}function BH(r,e,t,n,a,i,o){for(var s=r,l=e,u=0,c=1/o,f=1;f<=o;f++){var d=f*c,h=wr(r,t,a,d),v=wr(e,n,i,d),y=h-s,m=v-l;u+=Math.sqrt(y*y+m*m),s=h,l=v}return u}var FH=/cubic-bezier\(([0-9,\.e ]+)\)/;function sT(r){var e=r&&FH.exec(r);if(e){var t=e[1].split(","),n=+Mn(t[0]),a=+Mn(t[1]),i=+Mn(t[2]),o=+Mn(t[3]);if(isNaN(n+a+i+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:Qg(0,n,i,1,l,s)&&fr(0,a,o,1,s[0])}}}var VH=(function(){function r(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Vt,this.ondestroy=e.ondestroy||Vt,this.onrestart=e.onrestart||Vt,e.easing&&this.setEasing(e.easing)}return r.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var n=this._life,a=e-this._startTime-this._pausedTime,i=a/n;i<0&&(i=0),i=Math.min(i,1);var o=this.easingFunc,s=o?o(i):i;if(this.onframe(s),i===1)if(this.loop){var l=a%n;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(e){this.easing=e,this.easingFunc=Me(e)?e:zd[e]||sT(e)},r})(),WN=(function(){function r(e){this.value=e}return r})(),GH=(function(){function r(){this._len=0}return r.prototype.insert=function(e){var t=new WN(e);return this.insertEntry(t),t},r.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},r.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r})(),lc=(function(){function r(e){this._list=new GH,this._maxSize=10,this._map={},this._maxSize=e}return r.prototype.put=function(e,t){var n=this._list,a=this._map,i=null;if(a[e]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete a[l.key],i=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new WN(t),s.key=e,n.insertEntry(s),a[e]=s}return i},r.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r})(),SL={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 ba(r){return r=Math.round(r),r<0?0:r>255?255:r}function WH(r){return r=Math.round(r),r<0?0:r>360?360:r}function qd(r){return r<0?0:r>1?1:r}function Tg(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?ba(parseFloat(e)/100*255):ba(parseInt(e,10))}function Bi(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?qd(parseFloat(e)/100):qd(parseFloat(e))}function r1(r,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?r+(e-r)*t*6:t*2<1?e:t*3<2?r+(e-r)*(2/3-t)*6:r}function Bo(r,e,t){return r+(e-r)*t}function Gn(r,e,t,n,a){return r[0]=e,r[1]=t,r[2]=n,r[3]=a,r}function Vb(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}var $N=new lc(20),dv=null;function pu(r,e){dv&&Vb(dv,e),dv=$N.put(r,dv||e.slice())}function Hr(r,e){if(r){e=e||[];var t=$N.get(r);if(t)return Vb(e,t);r=r+"";var n=r.replace(/ /g,"").toLowerCase();if(n in SL)return Vb(e,SL[n]),pu(r,e),e;var a=n.length;if(n.charAt(0)==="#"){if(a===4||a===5){var i=parseInt(n.slice(1,4),16);if(!(i>=0&&i<=4095)){Gn(e,0,0,0,1);return}return Gn(e,(i&3840)>>4|(i&3840)>>8,i&240|(i&240)>>4,i&15|(i&15)<<4,a===5?parseInt(n.slice(4),16)/15:1),pu(r,e),e}else if(a===7||a===9){var i=parseInt(n.slice(1,7),16);if(!(i>=0&&i<=16777215)){Gn(e,0,0,0,1);return}return Gn(e,(i&16711680)>>16,(i&65280)>>8,i&255,a===9?parseInt(n.slice(7),16)/255:1),pu(r,e),e}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===a){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?Gn(e,+u[0],+u[1],+u[2],1):Gn(e,0,0,0,1);c=Bi(u.pop());case"rgb":if(u.length>=3)return Gn(e,Tg(u[0]),Tg(u[1]),Tg(u[2]),u.length===3?c:Bi(u[3])),pu(r,e),e;Gn(e,0,0,0,1);return;case"hsla":if(u.length!==4){Gn(e,0,0,0,1);return}return u[3]=Bi(u[3]),Gb(u,e),pu(r,e),e;case"hsl":if(u.length!==3){Gn(e,0,0,0,1);return}return Gb(u,e),pu(r,e),e;default:return}}Gn(e,0,0,0,1)}}function Gb(r,e){var t=(parseFloat(r[0])%360+360)%360/360,n=Bi(r[1]),a=Bi(r[2]),i=a<=.5?a*(n+1):a+n-a*n,o=a*2-i;return e=e||[],Gn(e,ba(r1(o,i,t+1/3)*255),ba(r1(o,i,t)*255),ba(r1(o,i,t-1/3)*255),1),r.length===4&&(e[3]=r[3]),e}function $H(r){if(r){var e=r[0]/255,t=r[1]/255,n=r[2]/255,a=Math.min(e,t,n),i=Math.max(e,t,n),o=i-a,s=(i+a)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(i+a):u=o/(2-i-a);var c=((i-e)/6+o/2)/o,f=((i-t)/6+o/2)/o,d=((i-n)/6+o/2)/o;e===i?l=d-f:t===i?l=1/3+c-d:n===i&&(l=2/3+f-c),l<0&&(l+=1),l>1&&(l-=1)}var h=[l*360,u,s];return r[3]!=null&&h.push(r[3]),h}}function Jg(r,e){var t=Hr(r);if(t){for(var n=0;n<3;n++)e<0?t[n]=t[n]*(1-e)|0:t[n]=(255-t[n])*e+t[n]|0,t[n]>255?t[n]=255:t[n]<0&&(t[n]=0);return Kn(t,t.length===4?"rgba":"rgb")}}function HH(r){var e=Hr(r);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Od(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){t=t||[];var n=r*(e.length-1),a=Math.floor(n),i=Math.ceil(n),o=e[a],s=e[i],l=n-a;return t[0]=ba(Bo(o[0],s[0],l)),t[1]=ba(Bo(o[1],s[1],l)),t[2]=ba(Bo(o[2],s[2],l)),t[3]=qd(Bo(o[3],s[3],l)),t}}var UH=Od;function lT(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){var n=r*(e.length-1),a=Math.floor(n),i=Math.ceil(n),o=Hr(e[a]),s=Hr(e[i]),l=n-a,u=Kn([ba(Bo(o[0],s[0],l)),ba(Bo(o[1],s[1],l)),ba(Bo(o[2],s[2],l)),qd(Bo(o[3],s[3],l))],"rgba");return t?{color:u,leftIndex:a,rightIndex:i,value:n}:u}}var YH=lT;function Fi(r,e,t,n){var a=Hr(r);if(r)return a=$H(a),e!=null&&(a[0]=WH(Me(e)?e(a[0]):e)),t!=null&&(a[1]=Bi(Me(t)?t(a[1]):t)),n!=null&&(a[2]=Bi(Me(n)?n(a[2]):n)),Kn(Gb(a),"rgba")}function Qd(r,e){var t=Hr(r);if(t&&e!=null)return t[3]=qd(e),Kn(t,"rgba")}function Kn(r,e){if(!(!r||!r.length)){var t=r[0]+","+r[1]+","+r[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(t+=","+r[3]),e+"("+t+")"}}function Jd(r,e){var t=Hr(r);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}function XH(){return Kn([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],"rgb")}var bL=new lc(100);function ey(r){if(pe(r)){var e=bL.get(r);return e||(e=Jg(r,-.1),bL.put(r,e)),e}else if(Lh(r)){var t=ie({},r);return t.colorStops=ue(r.colorStops,function(n){return{offset:n.offset,color:Jg(n.color,-.1)}}),t}return r}const ZH=Object.freeze(Object.defineProperty({__proto__:null,fastLerp:Od,fastMapToColor:UH,lerp:lT,lift:Jg,liftColor:ey,lum:Jd,mapToColor:YH,modifyAlpha:Qd,modifyHSL:Fi,parse:Hr,parseCssFloat:Bi,parseCssInt:Tg,random:XH,stringify:Kn,toHex:HH},Symbol.toStringTag,{value:"Module"}));var ty=Math.round;function eh(r){var e;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var t=Hr(r);t&&(r="rgb("+t[0]+","+t[1]+","+t[2]+")",e=t[3])}return{color:r,opacity:e??1}}var _L=1e-4;function Fo(r){return r<_L&&r>-_L}function hv(r){return ty(r*1e3)/1e3}function Wb(r){return ty(r*1e4)/1e4}function KH(r){return"matrix("+hv(r[0])+","+hv(r[1])+","+hv(r[2])+","+hv(r[3])+","+Wb(r[4])+","+Wb(r[5])+")"}var qH={left:"start",right:"end",center:"middle",middle:"middle"};function QH(r,e,t){return t==="top"?r+=e/2:t==="bottom"&&(r-=e/2),r}function JH(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function e7(r){var e=r.style,t=r.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),t[0],t[1]].join(",")}function HN(r){return r&&!!r.image}function t7(r){return r&&!!r.svgElement}function uT(r){return HN(r)||t7(r)}function UN(r){return r.type==="linear"}function YN(r){return r.type==="radial"}function XN(r){return r&&(r.type==="linear"||r.type==="radial")}function vm(r){return"url(#"+r+")"}function ZN(r){var e=r.getGlobalScale(),t=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(t)/Math.log(10)),1)}function KN(r){var e=r.x||0,t=r.y||0,n=(r.rotation||0)*Dd,a=Ce(r.scaleX,1),i=Ce(r.scaleY,1),o=r.skewX||0,s=r.skewY||0,l=[];return(e||t)&&l.push("translate("+e+"px,"+t+"px)"),n&&l.push("rotate("+n+")"),(a!==1||i!==1)&&l.push("scale("+a+","+i+")"),(o||s)&&l.push("skew("+ty(o*Dd)+"deg, "+ty(s*Dd)+"deg)"),l.join(" ")}var r7=(function(){return ot.hasGlobalWindow&&Me(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}})(),$b=Array.prototype.slice;function Di(r,e,t){return(e-r)*t+r}function n1(r,e,t,n){for(var a=e.length,i=0;i<a;i++)r[i]=Di(e[i],t[i],n);return r}function n7(r,e,t,n){for(var a=e.length,i=a&&e[0].length,o=0;o<a;o++){r[o]||(r[o]=[]);for(var s=0;s<i;s++)r[o][s]=Di(e[o][s],t[o][s],n)}return r}function pv(r,e,t,n){for(var a=e.length,i=0;i<a;i++)r[i]=e[i]+t[i]*n;return r}function wL(r,e,t,n){for(var a=e.length,i=a&&e[0].length,o=0;o<a;o++){r[o]||(r[o]=[]);for(var s=0;s<i;s++)r[o][s]=e[o][s]+t[o][s]*n}return r}function a7(r,e){for(var t=r.length,n=e.length,a=t>n?e:r,i=Math.min(t,n),o=a[i-1]||{color:[0,0,0,0],offset:0},s=i;s<Math.max(t,n);s++)a.push({offset:o.offset,color:o.color.slice()})}function i7(r,e,t){var n=r,a=e;if(!(!n.push||!a.push)){var i=n.length,o=a.length;if(i!==o){var s=i>o;if(s)n.length=o;else for(var l=i;l<o;l++)n.push(t===1?a[l]:$b.call(a[l]))}for(var u=n[0]&&n[0].length,l=0;l<n.length;l++)if(t===1)isNaN(n[l])&&(n[l]=a[l]);else for(var c=0;c<u;c++)isNaN(n[l][c])&&(n[l][c]=a[l][c])}}function Nd(r){if(Pr(r)){var e=r.length;if(Pr(r[0])){for(var t=[],n=0;n<e;n++)t.push($b.call(r[n]));return t}return $b.call(r)}return r}function Cg(r){return r[0]=Math.floor(r[0])||0,r[1]=Math.floor(r[1])||0,r[2]=Math.floor(r[2])||0,r[3]=r[3]==null?1:r[3],"rgba("+r.join(",")+")"}function o7(r){return Pr(r&&r[0])?2:1}var vv=0,Mg=1,qN=2,yd=3,Hb=4,Ub=5,TL=6;function CL(r){return r===Hb||r===Ub}function gv(r){return r===Mg||r===qN}var Of=[0,0,0,0],s7=(function(){function r(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return r.prototype.isFinished=function(){return this._finished},r.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},r.prototype.needsAnimate=function(){return this.keyframes.length>=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var a=this.keyframes,i=a.length,o=!1,s=TL,l=t;if(Pr(t)){var u=o7(t);s=u,(u===1&&!ut(t[0])||u===2&&!ut(t[0][0]))&&(o=!0)}else if(ut(t)&&!Dr(t))s=vv;else if(pe(t))if(!isNaN(+t))s=vv;else{var c=Hr(t);c&&(l=c,s=yd)}else if(Lh(t)){var f=ie({},l);f.colorStops=ue(t.colorStops,function(h){return{offset:h.offset,color:Hr(h.color)}}),UN(t)?s=Hb:YN(t)&&(s=Ub),l=f}i===0?this.valType=s:(s!==this.valType||s===TL)&&(o=!0),this.discrete=this.discrete||o;var d={time:e,value:l,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=Me(n)?n:zd[n]||sT(n)),a.push(d),d},r.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(y,m){return y.time-m.time});for(var a=this.valType,i=n.length,o=n[i-1],s=this.discrete,l=gv(a),u=CL(a),c=0;c<i;c++){var f=n[c],d=f.value,h=o.value;f.percent=f.time/e,s||(l&&c!==i-1?i7(d,h,a):u&&a7(d.colorStops,h.colorStops))}if(!s&&a!==Ub&&t&&this.needsAnimate()&&t.needsAnimate()&&a===t.valType&&!t._finished){this._additiveTrack=t;for(var v=n[0].value,c=0;c<i;c++)a===vv?n[c].additiveValue=n[c].value-v:a===yd?n[c].additiveValue=pv([],n[c].value,v,-1):gv(a)&&(n[c].additiveValue=a===Mg?pv([],n[c].value,v,-1):wL([],n[c].value,v,-1))}},r.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,a=n?"additiveValue":"value",i=this.valType,o=this.keyframes,s=o.length,l=this.propName,u=i===yd,c,f=this._lastFr,d=Math.min,h,v;if(s===1)h=v=o[0];else{if(t<0)c=0;else if(t<this._lastFrP){var y=d(f+1,s-1);for(c=y;c>=0&&!(o[c].percent<=t);c--);c=d(c,s-2)}else{for(c=f;c<s&&!(o[c].percent>t);c++);c=d(c-1,s-2)}v=o[c+1],h=o[c]}if(h&&v){this._lastFr=c,this._lastFrP=t;var m=v.percent-h.percent,x=m===0?1:d((t-h.percent)/m,1);v.easingFunc&&(x=v.easingFunc(x));var _=n?this._additiveValue:u?Of:e[l];if((gv(i)||u)&&!_&&(_=this._additiveValue=[]),this.discrete)e[l]=x<1?h.rawValue:v.rawValue;else if(gv(i))i===Mg?n1(_,h[a],v[a],x):n7(_,h[a],v[a],x);else if(CL(i)){var T=h[a],C=v[a],k=i===Hb;e[l]={type:k?"linear":"radial",x:Di(T.x,C.x,x),y:Di(T.y,C.y,x),colorStops:ue(T.colorStops,function(L,D){var P=C.colorStops[D];return{offset:Di(L.offset,P.offset,x),color:Cg(n1([],L.color,P.color,x))}}),global:C.global},k?(e[l].x2=Di(T.x2,C.x2,x),e[l].y2=Di(T.y2,C.y2,x)):e[l].r=Di(T.r,C.r,x)}else if(u)n1(_,h[a],v[a],x),n||(e[l]=Cg(_));else{var A=Di(h[a],v[a],x);n?this._additiveValue=A:e[l]=A}n&&this._addToTarget(e)}}},r.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,a=this._additiveValue;t===vv?e[n]=e[n]+a:t===yd?(Hr(e[n],Of),pv(Of,Of,a,1),e[n]=Cg(Of)):t===Mg?pv(e[n],e[n],a,1):t===qN&&wL(e[n],e[n],a,1)},r})(),cT=(function(){function r(e,t,n,a){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&a){cm("Can' use additive animation on looped animation.");return}this._additiveAnimators=a,this._allowDiscrete=n}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(e){this._target=e},r.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,st(t),n)},r.prototype.whenWithKeys=function(e,t,n,a){for(var i=this._tracks,o=0;o<n.length;o++){var s=n[o],l=i[s];if(!l){l=i[s]=new s7(s);var u=void 0,c=this._getAdditiveTrack(s);if(c){var f=c.keyframes,d=f[f.length-1];u=d&&d.value,c.valType===yd&&u&&(u=Cg(u))}else u=this._target[s];if(u==null)continue;e>0&&l.addKeyframe(0,Nd(u),a),this._trackKeys.push(s)}l.addKeyframe(e,Nd(t[s]),a)}return this._maxTime=Math.max(this._maxTime,e),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},r.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},r.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},r.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var a=0;a<n.length;a++){var i=n[a].getTrack(e);i&&(t=i)}return t},r.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],a=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var o=this._trackKeys[i],s=this._tracks[o],l=this._getAdditiveTrack(o),u=s.keyframes,c=u.length;if(s.prepare(a,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var f=u[c-1];f&&(t._target[s.propName]=f.rawValue),s.setFinished()}else n.push(s)}if(n.length||this._force){var d=new VH({life:a,loop:this._loop,delay:this._delay||0,onframe:function(h){t._started=2;var v=t._additiveAnimators;if(v){for(var y=!1,m=0;m<v.length;m++)if(v[m]._clip){y=!0;break}y||(t._additiveAnimators=null)}for(var m=0;m<n.length;m++)n[m].step(t._target,h);var x=t._onframeCbs;if(x)for(var m=0;m<x.length;m++)x[m](t._target,h)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},r.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},r.prototype.delay=function(e){return this._delay=e,this},r.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},r.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},r.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},r.prototype.getClip=function(){return this._clip},r.prototype.getTrack=function(e){return this._tracks[e]},r.prototype.getTracks=function(){var e=this;return ue(this._trackKeys,function(t){return e._tracks[t]})},r.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,a=this._trackKeys,i=0;i<e.length;i++){var o=n[e[i]];o&&!o.isFinished()&&(t?o.step(this._target,1):this._started===1&&o.step(this._target,0),o.setFinished())}for(var s=!0,i=0;i<a.length;i++)if(!n[a[i]].isFinished()){s=!1;break}return s&&this._abortedCallback(),s},r.prototype.saveTo=function(e,t,n){if(e){t=t||this._trackKeys;for(var a=0;a<t.length;a++){var i=t[a],o=this._tracks[i];if(!(!o||o.isFinished())){var s=o.keyframes,l=s[n?0:s.length-1];l&&(e[i]=Nd(l.rawValue))}}}},r.prototype.__changeFinalValue=function(e,t){t=t||st(e);for(var n=0;n<t.length;n++){var a=t[n],i=this._tracks[a];if(i){var o=i.keyframes;if(o.length>1){var s=o.pop();i.addKeyframe(s.time,e[a]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},r})();function Hu(){return new Date().getTime()}var l7=(function(r){Q(e,r);function e(t){var n=r.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t=t||{},n.stage=t.stage||{},n}return e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var n=t.getClip();n&&this.addClip(n)},e.prototype.removeClip=function(t){if(t.animation){var n=t.prev,a=t.next;n?n.next=a:this._head=a,a?a.prev=n:this._tail=n,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var n=t.getClip();n&&this.removeClip(n),t.animation=null},e.prototype.update=function(t){for(var n=Hu()-this._pausedTime,a=n-this._time,i=this._head;i;){var o=i.next,s=i.step(n,a);s&&(i.ondestroy(),this.removeClip(i)),i=o}this._time=n,t||(this.trigger("frame",a),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0;function n(){t._running&&(Kg(n),!t._paused&&t.update())}Kg(n)},e.prototype.start=function(){this._running||(this._time=Hu(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=Hu(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=Hu()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var n=t.next;t.prev=t.next=t.animation=null,t=n}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(t,n){n=n||{},this.start();var a=new cT(t,n.loop);return this.addAnimator(a),a},e})(ra),u7=300,a1=ot.domSupported,i1=(function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=ue(r,function(a){var i=a.replace("mouse","pointer");return t.hasOwnProperty(i)?i:a});return{mouse:r,touch:e,pointer:n}})(),ML={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},kL=!1;function Yb(r){var e=r.pointerType;return e==="pen"||e==="touch"}function c7(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function o1(r){r&&(r.zrByTouch=!0)}function f7(r,e){return Wn(r.dom,new d7(r,e),!0)}function QN(r,e){for(var t=e,n=!1;t&&t.nodeType!==9&&!(n=t.domBelongToZr||t!==e&&t===r.painterRoot);)t=t.parentNode;return n}var d7=(function(){function r(e,t){this.stopPropagation=Vt,this.stopImmediatePropagation=Vt,this.preventDefault=Vt,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return r})(),pa={mousedown:function(r){r=Wn(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=Wn(this.dom,r);var e=this.__mayPointerCapture;e&&(r.zrX!==e[0]||r.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=Wn(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=Wn(this.dom,r);var e=r.toElement||r.relatedTarget;QN(this,e)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){kL=!0,r=Wn(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){kL||(r=Wn(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=Wn(this.dom,r),o1(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),pa.mousemove.call(this,r),pa.mousedown.call(this,r)},touchmove:function(r){r=Wn(this.dom,r),o1(r),this.handler.processGesture(r,"change"),pa.mousemove.call(this,r)},touchend:function(r){r=Wn(this.dom,r),o1(r),this.handler.processGesture(r,"end"),pa.mouseup.call(this,r),+new Date-+this.__lastTouchMoment<u7&&pa.click.call(this,r)},pointerdown:function(r){pa.mousedown.call(this,r)},pointermove:function(r){Yb(r)||pa.mousemove.call(this,r)},pointerup:function(r){pa.mouseup.call(this,r)},pointerout:function(r){Yb(r)||pa.mouseout.call(this,r)}};z(["click","dblclick","contextmenu"],function(r){pa[r]=function(e){e=Wn(this.dom,e),this.trigger(r,e)}});var Xb={pointermove:function(r){Yb(r)||Xb.mousemove.call(this,r)},pointerup:function(r){Xb.mouseup.call(this,r)},mousemove:function(r){this.trigger("mousemove",r)},mouseup:function(r){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",r),e&&(r.zrEventControl="only_globalout",this.trigger("mouseout",r))}};function h7(r,e){var t=e.domHandlers;ot.pointerEventsSupported?z(i1.pointer,function(n){kg(e,n,function(a){t[n].call(r,a)})}):(ot.touchEventsSupported&&z(i1.touch,function(n){kg(e,n,function(a){t[n].call(r,a),c7(e)})}),z(i1.mouse,function(n){kg(e,n,function(a){a=oT(a),e.touching||t[n].call(r,a)})}))}function p7(r,e){ot.pointerEventsSupported?z(ML.pointer,t):ot.touchEventsSupported||z(ML.mouse,t);function t(n){function a(i){i=oT(i),QN(r,i.target)||(i=f7(r,i),e.domHandlers[n].call(r,i))}kg(e,n,a,{capture:!0})}}function kg(r,e,t,n){r.mounted[e]=t,r.listenerOpts[e]=n,Nb(r.domTarget,e,t,n)}function s1(r){var e=r.mounted;for(var t in e)e.hasOwnProperty(t)&&bH(r.domTarget,t,e[t],r.listenerOpts[t]);r.mounted={}}var AL=(function(){function r(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return r})(),v7=(function(r){Q(e,r);function e(t,n){var a=r.call(this)||this;return a.__pointerCapturing=!1,a.dom=t,a.painterRoot=n,a._localHandlerScope=new AL(t,pa),a1&&(a._globalHandlerScope=new AL(document,Xb)),h7(a,a._localHandlerScope),a}return e.prototype.dispose=function(){s1(this._localHandlerScope),a1&&s1(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,a1&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var n=this._globalHandlerScope;t?p7(this,n):s1(n)}},e})(ra),JN=1;ot.hasGlobalWindow&&(JN=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var ry=JN,Zb=.4,Kb="#333",qb="#ccc",g7="#eee",LL=Ph,IL=5e-5;function Is(r){return r>IL||r<-IL}var Ds=[],vu=[],l1=hr(),u1=Math.abs,Ni=(function(){function r(){}return r.prototype.getLocalTransform=function(e){return r.getLocalTransform(this,e)},r.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},r.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},r.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},r.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},r.prototype.needLocalTransform=function(){return Is(this.rotation)||Is(this.x)||Is(this.y)||Is(this.scaleX-1)||Is(this.scaleY-1)||Is(this.skewX)||Is(this.skewY)},r.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(LL(n),this.invTransform=null);return}n=n||hr(),t?this.getLocalTransform(n):LL(n),e&&(t?Sa(n,e,n):Rh(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},r.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Ds);var n=Ds[0]<0?-1:1,a=Ds[1]<0?-1:1,i=((Ds[0]-n)*t+n)/Ds[0]||0,o=((Ds[1]-a)*t+a)/Ds[1]||0;e[0]*=i,e[1]*=i,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||hr(),Jn(this.invTransform,e)},r.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},r.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],a=Math.atan2(e[1],e[0]),i=Math.PI/2+a-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-a,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||hr(),Sa(vu,e.invTransform,t),t=vu);var n=this.originX,a=this.originY;(n||a)&&(l1[4]=n,l1[5]=a,Sa(vu,t,l1),vu[4]-=n,vu[5]-=a,t=vu),this.setLocalTransform(t)}},r.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},r.prototype.transformCoordToLocal=function(e,t){var n=[e,t],a=this.invTransform;return a&&Gt(n,n,a),n},r.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],a=this.transform;return a&&Gt(n,n,a),n},r.prototype.getLineScale=function(){var e=this.transform;return e&&u1(e[0]-1)>1e-10&&u1(e[3]-1)>1e-10?Math.sqrt(u1(e[0]*e[3]-e[2]*e[1])):1},r.prototype.copyTransform=function(e){ny(this,e)},r.getLocalTransform=function(e,t){t=t||[];var n=e.originX||0,a=e.originY||0,i=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,c=e.x,f=e.y,d=e.skewX?Math.tan(e.skewX):0,h=e.skewY?Math.tan(-e.skewY):0;if(n||a||s||l){var v=n+s,y=a+l;t[4]=-v*i-d*y*o,t[5]=-y*o-h*v*i}else t[4]=t[5]=0;return t[0]=i,t[3]=o,t[1]=h*i,t[2]=d*o,u&&to(t,t,u),t[4]+=n+c,t[5]+=a+f,t},r.initDefaultProps=(function(){var e=r.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0})(),r})(),ni=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function ny(r,e){for(var t=0;t<ni.length;t++){var n=ni[t];r[n]=e[n]}}function ti(r){yv||(yv=new lc(100)),r=r||Ui;var e=yv.get(r);return e||(e={font:r,strWidthCache:new lc(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:pn.measureText("国",r).width,asciiCharWidth:pn.measureText("a",r).width},yv.put(r,e)),e}var yv;function y7(r){if(!(c1>=DL)){r=r||Ui;for(var e=[],t=+new Date,n=0;n<=127;n++)e[n]=pn.measureText(String.fromCharCode(n),r).width;var a=+new Date-t;return a>16?c1=DL:a>2&&c1++,e}}var c1=0,DL=5;function ej(r,e){return r.asciiWidthMapTried||(r.asciiWidthMap=y7(r.font),r.asciiWidthMapTried=!0),0<=e&&e<=127?r.asciiWidthMap!=null?r.asciiWidthMap[e]:r.asciiCharWidth:r.stWideCharWidth}function ri(r,e){var t=r.strWidthCache,n=t.get(e);return n==null&&(n=pn.measureText(e,r.font).width,t.put(e,n)),n}function PL(r,e,t,n){var a=ri(ti(e),r),i=Eh(e),o=uc(0,a,t),s=vl(0,i,n),l=new ze(o,s,a,i);return l}function gm(r,e,t,n){var a=((r||"")+"").split(`
|
|
23
|
+
`),i=a.length;if(i===1)return PL(a[0],e,t,n);for(var o=new ze(0,0,0,0),s=0;s<a.length;s++){var l=PL(a[s],e,t,n);s===0?o.copy(l):o.union(l)}return o}function uc(r,e,t,n){return t==="right"?n?r+=e:r-=e:t==="center"&&(n?r+=e/2:r-=e/2),r}function vl(r,e,t,n){return t==="middle"?n?r+=e/2:r-=e/2:t==="bottom"&&(n?r+=e:r-=e),r}function Eh(r){return ti(r).stWideCharWidth}function Ca(r,e){return typeof r=="string"?r.lastIndexOf("%")>=0?parseFloat(r)/100*e:parseFloat(r):r}function ay(r,e,t){var n=e.position||"inside",a=e.distance!=null?e.distance:5,i=t.height,o=t.width,s=i/2,l=t.x,u=t.y,c="left",f="top";if(n instanceof Array)l+=Ca(n[0],t.width),u+=Ca(n[1],t.height),c=null,f=null;else switch(n){case"left":l-=a,u+=s,c="right",f="middle";break;case"right":l+=a+o,u+=s,f="middle";break;case"top":l+=o/2,u-=a,c="center",f="bottom";break;case"bottom":l+=o/2,u+=i+a,c="center";break;case"inside":l+=o/2,u+=s,c="center",f="middle";break;case"insideLeft":l+=a,u+=s,f="middle";break;case"insideRight":l+=o-a,u+=s,c="right",f="middle";break;case"insideTop":l+=o/2,u+=a,c="center";break;case"insideBottom":l+=o/2,u+=i-a,c="center",f="bottom";break;case"insideTopLeft":l+=a,u+=a;break;case"insideTopRight":l+=o-a,u+=a,c="right";break;case"insideBottomLeft":l+=a,u+=i-a,f="bottom";break;case"insideBottomRight":l+=o-a,u+=i-a,c="right",f="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=c,r.verticalAlign=f,r}var f1="__zr_normal__",d1=ni.concat(["ignore"]),m7=Qn(ni,function(r,e){return r[e]=!0,r},{ignore:!1}),gu={},x7=new ze(0,0,0,0),mv=[],ym=(function(){function r(e){this.id=rT(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return r.prototype._init=function(e){this.attr(e)},r.prototype.drift=function(e,t,n){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0;break}var a=this.transform;a||(a=this.transform=[1,0,0,1,0,0]),a[4]+=e,a[5]+=t,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,a=n.local,i=t.innerTransformable,o=void 0,s=void 0,l=!1;i.parent=a?this:null;var u=!1;i.copyTransform(t);var c=n.position!=null,f=n.autoOverflowArea,d=void 0;if((f||c)&&(d=x7,n.layoutRect?d.copy(n.layoutRect):d.copy(this.getBoundingRect()),a||d.applyTransform(this.transform)),c){this.calculateTextPosition?this.calculateTextPosition(gu,n,d):ay(gu,n,d),i.x=gu.x,i.y=gu.y,o=gu.align,s=gu.verticalAlign;var h=n.origin;if(h&&n.rotation!=null){var v=void 0,y=void 0;h==="center"?(v=d.width*.5,y=d.height*.5):(v=Ca(h[0],d.width),y=Ca(h[1],d.height)),u=!0,i.originX=-i.x+v+(a?0:d.x),i.originY=-i.y+y+(a?0:d.y)}}n.rotation!=null&&(i.rotation=n.rotation);var m=n.offset;m&&(i.x+=m[0],i.y+=m[1],u||(i.originX=-m[0],i.originY=-m[1]));var x=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(f){var _=x.overflowRect=x.overflowRect||new ze(0,0,0,0);i.getLocalTransform(mv),Jn(mv,mv),ze.copy(_,d),_.applyTransform(mv)}else x.overflowRect=null;var T=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,C=void 0,k=void 0,A=void 0;T&&this.canBeInsideText()?(C=n.insideFill,k=n.insideStroke,(C==null||C==="auto")&&(C=this.getInsideTextFill()),(k==null||k==="auto")&&(k=this.getInsideTextStroke(C),A=!0)):(C=n.outsideFill,k=n.outsideStroke,(C==null||C==="auto")&&(C=this.getOutsideFill()),(k==null||k==="auto")&&(k=this.getOutsideStroke(C),A=!0)),C=C||"#000",(C!==x.fill||k!==x.stroke||A!==x.autoStroke||o!==x.align||s!==x.verticalAlign)&&(l=!0,x.fill=C,x.stroke=k,x.autoStroke=A,x.align=o,x.verticalAlign=s,t.setDefaultTextStyle(x)),t.__dirty|=Tn,l&&t.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(e){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?qb:Kb},r.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t=="string"&&Hr(t);n||(n=[255,255,255,1]);for(var a=n[3],i=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*a+(i?0:255)*(1-a);return n[3]=1,Kn(n,"rgba")},r.prototype.traverse=function(e,t){},r.prototype.attrKV=function(e,t){e==="textConfig"?this.setTextConfig(t):e==="textContent"?this.setTextContent(t):e==="clipPath"?this.setClipPath(t):e==="extra"?(this.extra=this.extra||{},ie(this.extra,t)):this[e]=t},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(e,t){if(typeof e=="string")this.attrKV(e,t);else if(Pe(e))for(var n=e,a=st(n),i=0;i<a.length;i++){var o=a[i];this.attrKV(o,e[o])}return this.markRedraw(),this},r.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var a=this.animators[n],i=a.__fromStateTransition;if(!(a.getLoop()||i&&i!==f1)){var o=a.targetName,s=o?t[o]:t;a.saveTo(s)}}},r.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||(t=this._normalState={}),e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,d1)},r.prototype._savePrimaryToNormal=function(e,t,n){for(var a=0;a<n.length;a++){var i=n[a];e[i]!=null&&!(i in t)&&(t[i]=this[i])}},r.prototype.hasState=function(){return this.currentStates.length>0},r.prototype.getState=function(e){return this.states[e]},r.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},r.prototype.clearStates=function(e){this.useState(f1,!1,e)},r.prototype.useState=function(e,t,n,a){var i=e===f1,o=this.hasState();if(!(!o&&i)){var s=this.currentStates,l=this.stateTransition;if(!(Ue(s,e)>=0&&(t||s.length===1))){var u;if(this.stateProxy&&!i&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!i){cm("State "+e+" not exists.");return}i||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||a);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,t,!n&&!this.__inHover&&l&&l.duration>0,l);var f=this._textContent,d=this._textGuide;return f&&f.useState(e,t,n,c),d&&d.useState(e,t,n,c),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Tn),u}}},r.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var a=[],i=this.currentStates,o=e.length,s=o===i.length;if(s){for(var l=0;l<o;l++)if(e[l]!==i[l]){s=!1;break}}if(s)return;for(var l=0;l<o;l++){var u=e[l],c=void 0;this.stateProxy&&(c=this.stateProxy(u,e)),c||(c=this.states[u]),c&&a.push(c)}var f=a[o-1],d=!!(f&&f.hoverLayer||n);d&&this._toggleHoverLayerFlag(!0);var h=this._mergeStates(a),v=this.stateTransition;this.saveCurrentToNormalState(h),this._applyStateObj(e.join(","),h,this._normalState,!1,!t&&!this.__inHover&&v&&v.duration>0,v);var y=this._textContent,m=this._textGuide;y&&y.useStates(e,t,d),m&&m.useStates(e,t,d),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Tn)}},r.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var t=e.__hostTarget;e=t?e.ignoreHostSilent?null:t:e.parent}return!1},r.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},r.prototype.removeState=function(e){var t=Ue(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},r.prototype.replaceState=function(e,t,n){var a=this.currentStates.slice(),i=Ue(a,e),o=Ue(a,t)>=0;i>=0?o?a.splice(i,1):a[i]=t:n&&!o&&a.push(t),this.useStates(a)},r.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},r.prototype._mergeStates=function(e){for(var t={},n,a=0;a<e.length;a++){var i=e[a];ie(t,i),i.textConfig&&(n=n||{},ie(n,i.textConfig))}return n&&(t.textConfig=n),t},r.prototype._applyStateObj=function(e,t,n,a,i,o){var s=!(t&&a);t&&t.textConfig?(this.textConfig=ie({},a?this.textConfig:n.textConfig),ie(this.textConfig,t.textConfig)):s&&n.textConfig&&(this.textConfig=n.textConfig);for(var l={},u=!1,c=0;c<d1.length;c++){var f=d1[c],d=i&&m7[f];t&&t[f]!=null?d?(u=!0,l[f]=t[f]):this[f]=t[f]:s&&n[f]!=null&&(d?(u=!0,l[f]=n[f]):this[f]=n[f])}if(!i)for(var c=0;c<this.animators.length;c++){var h=this.animators[c],v=h.targetName;h.getLoop()||h.__changeFinalValue(v?(t||n)[v]:t||n)}u&&this._transitionState(e,l,o)},r.prototype._attachComponent=function(e){if(!(e.__zr&&!e.__hostTarget)&&e!==this){var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}},r.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},r.prototype.getClipPath=function(){return this._clipPath},r.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},r.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},r.prototype.getTextContent=function(){return this._textContent},r.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new Ni,this._attachComponent(e),this._textContent=e,this.markRedraw())},r.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),ie(this.textConfig,e),this.markRedraw()},r.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},r.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},r.prototype.getTextGuideLine=function(){return this._textGuide},r.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},r.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},r.prototype.markRedraw=function(){this.__dirty|=Tn;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},r.prototype.dirty=function(){this.markRedraw()},r.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var t=this._textContent,n=this._textGuide;t&&(t.__inHover=e),n&&(n.__inHover=e)},r.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},r.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},r.prototype.animate=function(e,t,n){var a=e?this[e]:this,i=new cT(a,t,n);return e&&(i.targetName=e),this.addAnimator(i,e),i},r.prototype.addAnimator=function(e,t){var n=this.__zr,a=this;e.during(function(){a.updateDuringAnimation(t)}).done(function(){var i=a.animators,o=Ue(i,e);o>=0&&i.splice(o,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},r.prototype.updateDuringAnimation=function(e){this.markRedraw()},r.prototype.stopAnimation=function(e,t){for(var n=this.animators,a=n.length,i=[],o=0;o<a;o++){var s=n[o];!e||e===s.scope?s.stop(t):i.push(s)}return this.animators=i,this},r.prototype.animateTo=function(e,t,n){h1(this,e,t,n)},r.prototype.animateFrom=function(e,t,n){h1(this,e,t,n,!0)},r.prototype._transitionState=function(e,t,n,a){for(var i=h1(this,t,n,a),o=0;o<i.length;o++)i[o].__fromStateTransition=e},r.prototype.getBoundingRect=function(){return null},r.prototype.getPaintRect=function(){return null},r.initDefaultProps=(function(){var e=r.prototype;e.type="element",e.name="",e.ignore=e.silent=e.ignoreHostSilent=e.isGroup=e.draggable=e.dragging=e.ignoreClip=e.__inHover=!1,e.__dirty=Tn;function t(n,a,i,o){Object.defineProperty(e,n,{get:function(){if(!this[a]){var l=this[a]=[];s(this,l)}return this[a]},set:function(l){this[i]=l[0],this[o]=l[1],this[a]=l,s(this,l)}});function s(l,u){Object.defineProperty(u,0,{get:function(){return l[i]},set:function(c){l[i]=c}}),Object.defineProperty(u,1,{get:function(){return l[o]},set:function(c){l[o]=c}})}}Object.defineProperty&&(t("position","_legacyPos","x","y"),t("scale","_legacyScale","scaleX","scaleY"),t("origin","_legacyOrigin","originX","originY"))})(),r})();Wt(ym,ra);Wt(ym,Ni);function h1(r,e,t,n,a){t=t||{};var i=[];tj(r,"",r,e,t,n,i,a);var o=i.length,s=!1,l=t.done,u=t.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(),i.length>0&&t.during&&i[0].during(function(v,y){t.during(y)});for(var d=0;d<i.length;d++){var h=i[d];c&&h.done(c),f&&h.aborted(f),t.force&&h.duration(t.duration),h.start(t.easing)}return i}function p1(r,e,t){for(var n=0;n<t;n++)r[n]=e[n]}function S7(r){return Pr(r[0])}function b7(r,e,t){if(Pr(e[t]))if(Pr(r[t])||(r[t]=[]),en(e[t])){var n=e[t].length;r[t].length!==n&&(r[t]=new e[t].constructor(n),p1(r[t],e[t],n))}else{var a=e[t],i=r[t],o=a.length;if(S7(a))for(var s=a[0].length,l=0;l<o;l++)i[l]?p1(i[l],a[l],s):i[l]=Array.prototype.slice.call(a[l]);else p1(i,a,o);i.length=a.length}else r[t]=e[t]}function _7(r,e){return r===e||Pr(r)&&Pr(e)&&w7(r,e)}function w7(r,e){var t=r.length;if(t!==e.length)return!1;for(var n=0;n<t;n++)if(r[n]!==e[n])return!1;return!0}function tj(r,e,t,n,a,i,o,s){for(var l=st(n),u=a.duration,c=a.delay,f=a.additive,d=a.setToFinal,h=!Pe(i),v=r.animators,y=[],m=0;m<l.length;m++){var x=l[m],_=n[x];if(_!=null&&t[x]!=null&&(h||i[x]))if(Pe(_)&&!Pr(_)&&!Lh(_)){if(e){s||(t[x]=_,r.updateDuringAnimation(e));continue}tj(r,x,t[x],_,a,i&&i[x],o,s)}else y.push(x);else s||(t[x]=_,r.updateDuringAnimation(e),y.push(x))}var T=y.length;if(!f&&T)for(var C=0;C<v.length;C++){var k=v[C];if(k.targetName===e){var A=k.stopTracks(y);if(A){var L=Ue(v,k);v.splice(L,1)}}}if(a.force||(y=ht(y,function(O){return!_7(n[O],t[O])}),T=y.length),T>0||a.force&&!o.length){var D=void 0,P=void 0,E=void 0;if(s){P={},d&&(D={});for(var C=0;C<T;C++){var x=y[C];P[x]=t[x],d?D[x]=n[x]:t[x]=n[x]}}else if(d){E={};for(var C=0;C<T;C++){var x=y[C];E[x]=Nd(t[x]),b7(t,n,x)}}var k=new cT(t,!1,!1,f?ht(v,function(B){return B.targetName===e}):null);k.targetName=e,a.scope&&(k.scope=a.scope),d&&D&&k.whenWithKeys(0,D,y),E&&k.whenWithKeys(0,E,y),k.whenWithKeys(u??500,s?P:n,y).delay(c||0),r.addAnimator(k,e),o.push(k)}}var Le=(function(r){Q(e,r);function e(t){var n=r.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var n=this._children,a=0;a<n.length;a++)if(n[a].name===t)return n[a]},e.prototype.childCount=function(){return this._children.length},e.prototype.add=function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},e.prototype.addBefore=function(t,n){if(t&&t!==this&&t.parent!==this&&n&&n.parent===this){var a=this._children,i=a.indexOf(n);i>=0&&(a.splice(i,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,n){var a=Ue(this._children,t);return a>=0&&this.replaceAt(n,a),this},e.prototype.replaceAt=function(t,n){var a=this._children,i=a[n];if(t&&t!==this&&t.parent!==this&&t!==i){a[n]=t,i.parent=null;var o=this.__zr;o&&i.removeSelfFromZr(o),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var n=this.__zr;n&&n!==t.__zr&&t.addSelfToZr(n),n&&n.refresh()},e.prototype.remove=function(t){var n=this.__zr,a=this._children,i=Ue(a,t);return i<0?this:(a.splice(i,1),t.parent=null,n&&t.removeSelfFromZr(n),n&&n.refresh(),this)},e.prototype.removeAll=function(){for(var t=this._children,n=this.__zr,a=0;a<t.length;a++){var i=t[a];n&&i.removeSelfFromZr(n),i.parent=null}return t.length=0,this},e.prototype.eachChild=function(t,n){for(var a=this._children,i=0;i<a.length;i++){var o=a[i];t.call(n,o,i)}return this},e.prototype.traverse=function(t,n){for(var a=0;a<this._children.length;a++){var i=this._children[a],o=t.call(n,i);i.isGroup&&!o&&i.traverse(t,n)}return this},e.prototype.addSelfToZr=function(t){r.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++){var a=this._children[n];a.addSelfToZr(t)}},e.prototype.removeSelfFromZr=function(t){r.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++){var a=this._children[n];a.removeSelfFromZr(t)}},e.prototype.getBoundingRect=function(t){for(var n=new ze(0,0,0,0),a=t||this._children,i=[],o=null,s=0;s<a.length;s++){var l=a[s];if(!(l.ignore||l.invisible)){var u=l.getBoundingRect(),c=l.getLocalTransform(i);c?(ze.applyTransform(n,u,c),o=o||n.clone(),o.union(n)):(o=o||u.clone(),o.union(u))}}return o||n},e})(ym);Le.prototype.type="group";var Ag={},ul={};function T7(r){delete ul[r]}function C7(r){if(!r)return!1;if(typeof r=="string")return Jd(r,1)<Zb;if(r.colorStops){for(var e=r.colorStops,t=0,n=e.length,a=0;a<n;a++)t+=Jd(e[a].color,1);return t/=n,t<Zb}return!1}var M7=(function(){function r(e,t,n){var a=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=t,this.id=e;var i=new OH,o=n.renderer||"canvas";Ag[o]||(o=st(Ag)[0]),n.useDirtyRect=n.useDirtyRect==null?!1:n.useDirtyRect;var s=new Ag[o](t,i,n,e),l=n.ssr||s.ssrOnly;this.storage=i,this.painter=s;var u=!ot.node&&!ot.worker&&!l?new v7(s.getViewportRoot(),s.root):null,c=n.useCoarsePointer,f=c==null||c==="auto"?ot.touchEventsSupported:!!c,d=44,h;f&&(h=Ce(n.pointerSize,d)),this.handler=new EN(i,s,u,s.root,h),this.animation=new l7({stage:{update:l?null:function(){return a._flush(!0)}}}),l||this.animation.start()}return r.prototype.add=function(e){this._disposed||!e||(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},r.prototype.remove=function(e){this._disposed||!e||(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},r.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},r.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=C7(e))},r.prototype.getBackgroundColor=function(){return this._backgroundColor},r.prototype.setDarkMode=function(e){this._darkMode=e},r.prototype.isDarkMode=function(){return this._darkMode},r.prototype.refreshImmediately=function(e){this._disposed||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},r.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},r.prototype.flush=function(){this._disposed||this._flush(!1)},r.prototype._flush=function(e){var t,n=Hu();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var a=Hu();t?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:a-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},r.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},r.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},r.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},r.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},r.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof Le&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},r.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,T7(this.id))},r})();function Qb(r,e){var t=new M7(rT(),r,e);return ul[t.id]=t,t}function k7(r){r.dispose()}function A7(){for(var r in ul)ul.hasOwnProperty(r)&&ul[r].dispose();ul={}}function L7(r){return ul[r]}function rj(r,e){Ag[r]=e}var Jb;function nj(r){if(typeof Jb=="function")return Jb(r)}function aj(r){Jb=r}var I7="6.0.0";const D7=Object.freeze(Object.defineProperty({__proto__:null,dispose:k7,disposeAll:A7,getElementSSRData:nj,getInstance:L7,init:Qb,registerPainter:rj,registerSSRDataGetter:aj,version:I7},Symbol.toStringTag,{value:"Module"}));var RL=1e-4,ij=20;function P7(r){return r.replace(/^\s+|\s+$/g,"")}var In=Math.min,Yt=Math.max,Ya=Math.abs;function vt(r,e,t,n){var a=e[0],i=e[1],o=t[0],s=t[1],l=i-a,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(n)if(l>0){if(r<=a)return o;if(r>=i)return s}else{if(r>=a)return o;if(r<=i)return s}else{if(r===a)return o;if(r===i)return s}return(r-a)/l*u+o}var he=R7;function R7(r,e,t){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return iy(r,e,t)}function iy(r,e,t){return pe(r)?P7(r).match(/%$/)?parseFloat(r)/100*e+(t||0):parseFloat(r):r==null?NaN:+r}function Xt(r,e,t){return e==null&&(e=10),e=Math.min(Math.max(0,e),ij),r=(+r).toFixed(e),t?r:+r}function kn(r){return r.sort(function(e,t){return e-t}),r}function ma(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var e=1,t=0;t<15;t++,e*=10)if(Math.round(r*e)/e===r)return t}return oj(r)}function oj(r){var e=r.toString().toLowerCase(),t=e.indexOf("e"),n=t>0?+e.slice(t+1):0,a=t>0?t:e.length,i=e.indexOf("."),o=i<0?0:a-1-i;return Math.max(0,o-n)}function fT(r,e){var t=Math.log,n=Math.LN10,a=Math.floor(t(r[1]-r[0])/n),i=Math.round(t(Ya(e[1]-e[0]))/n),o=Math.min(Math.max(-a+i,0),20);return isFinite(o)?o:20}function E7(r,e,t){if(!r[e])return 0;var n=sj(r,t);return n[e]||0}function sj(r,e){var t=Qn(r,function(h,v){return h+(isNaN(v)?0:v)},0);if(t===0)return[];for(var n=Math.pow(10,e),a=ue(r,function(h){return(isNaN(h)?0:h)/t*n*100}),i=n*100,o=ue(a,function(h){return Math.floor(h)}),s=Qn(o,function(h,v){return h+v},0),l=ue(a,function(h,v){return h-o[v]});s<i;){for(var u=Number.NEGATIVE_INFINITY,c=null,f=0,d=l.length;f<d;++f)l[f]>u&&(u=l[f],c=f);++o[c],l[c]=0,++s}return ue(o,function(h){return h/n})}function z7(r,e){var t=Math.max(ma(r),ma(e)),n=r+e;return t>ij?n:Xt(n,t)}var e_=9007199254740991;function dT(r){var e=Math.PI*2;return(r%e+e)%e}function cc(r){return r>-RL&&r<RL}var O7=/^(?:(\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 ci(r){if(r instanceof Date)return r;if(pe(r)){var e=O7.exec(r);if(!e)return new Date(NaN);if(e[8]){var t=+e[4]||0;return e[8].toUpperCase()!=="Z"&&(t-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,t,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0))}else return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0)}else if(r==null)return new Date(NaN);return new Date(Math.round(r))}function lj(r){return Math.pow(10,mm(r))}function mm(r){if(r===0)return 0;var e=Math.floor(Math.log(r)/Math.LN10);return r/Math.pow(10,e)>=10&&e++,e}function hT(r,e){var t=mm(r),n=Math.pow(10,t),a=r/n,i;return e?a<1.5?i=1:a<2.5?i=2:a<4?i=3:a<7?i=5:i=10:a<1?i=1:a<2?i=2:a<3?i=3:a<5?i=5:i=10,r=i*n,t>=-20?+r.toFixed(t<0?-t:0):r}function Lg(r,e){var t=(r.length-1)*e+1,n=Math.floor(t),a=+r[n-1],i=t-n;return i?a+i*(r[n]-a):a}function t_(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,t=1,n=0;n<r.length;){for(var a=r[n].interval,i=r[n].close,o=0;o<2;o++)a[o]<=e&&(a[o]=e,i[o]=o?1:1-t),e=a[o],t=i[o];a[0]===a[1]&&i[0]*i[1]!==1?r.splice(n,1):n++}return r;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 ai(r){var e=parseFloat(r);return e==r&&(e!==0||!pe(r)||r.indexOf("x")<=0)?e:NaN}function pT(r){return!isNaN(ai(r))}function uj(){return Math.round(Math.random()*9)}function cj(r,e){return e===0?r:cj(e,r%e)}function EL(r,e){return r==null?e:e==null?r:r*e/cj(r,e)}var N7="[ECharts] ",j7=typeof console<"u"&&console.warn&&console.log;function B7(r,e,t){j7&&console[r](N7+e)}function fj(r,e){B7("error",r)}function gt(r){throw new Error(r)}function zL(r,e,t){return(e-r)*t+r}var dj="series\0",hj="\0_ec_\0";function Tt(r){return r instanceof Array?r:r==null?[]:[r]}function wl(r,e,t){if(r){r[e]=r[e]||{},r.emphasis=r.emphasis||{},r.emphasis[e]=r.emphasis[e]||{};for(var n=0,a=t.length;n<a;n++){var i=t[n];!r.emphasis[e].hasOwnProperty(i)&&r[e].hasOwnProperty(i)&&(r.emphasis[e][i]=r[e][i])}}}var OL=["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 Ac(r){return Pe(r)&&!le(r)&&!(r instanceof Date)?r.value:r}function F7(r){return Pe(r)&&!(r instanceof Array)}function pj(r,e,t){var n=t==="normalMerge",a=t==="replaceMerge",i=t==="replaceAll";r=r||[],e=(e||[]).slice();var o=we();z(e,function(l,u){if(!Pe(l)){e[u]=null;return}});var s=V7(r,o,t);return(n||a)&&G7(s,r,o,e),n&&W7(s,e),n||a?$7(s,e,a):i&&H7(s,e),U7(s),s}function V7(r,e,t){var n=[];if(t==="replaceAll")return n;for(var a=0;a<r.length;a++){var i=r[a];i&&i.id!=null&&e.set(i.id,a),n.push({existing:t==="replaceMerge"||th(i)?null:i,newOption:null,keyInfo:null,brandNew:null})}return n}function G7(r,e,t,n){z(n,function(a,i){if(!(!a||a.id==null)){var o=jd(a.id),s=t.get(o);if(s!=null){var l=r[s];Rr(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=a,l.existing=e[s],n[i]=null}}})}function W7(r,e){z(e,function(t,n){if(!(!t||t.name==null))for(var a=0;a<r.length;a++){var i=r[a].existing;if(!r[a].newOption&&i&&(i.id==null||t.id==null)&&!th(t)&&!th(i)&&vj("name",i,t)){r[a].newOption=t,e[n]=null;return}}})}function $7(r,e,t){z(e,function(n){if(n){for(var a,i=0;(a=r[i])&&(a.newOption||th(a.existing)||a.existing&&n.id!=null&&!vj("id",n,a.existing));)i++;a?(a.newOption=n,a.brandNew=t):r.push({newOption:n,brandNew:t,existing:null,keyInfo:null}),i++}})}function H7(r,e){z(e,function(t){r.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function U7(r){var e=we();z(r,function(t){var n=t.existing;n&&e.set(n.id,t)}),z(r,function(t){var n=t.newOption;Rr(!n||n.id==null||!e.get(n.id)||e.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&n.id!=null&&e.set(n.id,t),!t.keyInfo&&(t.keyInfo={})}),z(r,function(t,n){var a=t.existing,i=t.newOption,o=t.keyInfo;if(Pe(i)){if(o.name=i.name!=null?jd(i.name):a?a.name:dj+n,a)o.id=jd(a.id);else if(i.id!=null)o.id=jd(i.id);else{var s=0;do o.id="\0"+o.name+"\0"+s++;while(e.get(o.id))}e.set(o.id,t)}})}function vj(r,e,t){var n=ir(e[r],null),a=ir(t[r],null);return n!=null&&a!=null&&n===a}function jd(r){return ir(r,"")}function ir(r,e){return r==null?e:pe(r)?r:ut(r)||Ug(r)?r+"":e}function vT(r){var e=r.name;return!!(e&&e.indexOf(dj))}function th(r){return r&&r.id!=null&&jd(r.id).indexOf(hj)===0}function Y7(r){return hj+r}function X7(r,e,t){z(r,function(n){var a=n.newOption;Pe(a)&&(n.keyInfo.mainType=e,n.keyInfo.subType=Z7(e,a,n.existing,t))})}function Z7(r,e,t,n){var a=e.type?e.type:t?t.subType:n.determineSubType(r,e);return a}function K7(r,e){var t={},n={};return a(r||[],t),a(e||[],n,t),[i(t),i(n)];function a(o,s,l){for(var u=0,c=o.length;u<c;u++){var f=ir(o[u].seriesId,null);if(f==null)return;for(var d=Tt(o[u].dataIndex),h=l&&l[f],v=0,y=d.length;v<y;v++){var m=d[v];h&&h[m]?h[m]=null:(s[f]||(s[f]={}))[m]=1}}}function i(o,s){var l=[];for(var u in o)if(o.hasOwnProperty(u)&&o[u]!=null)if(s)l.push(+u);else{var c=i(o[u],!0);c.length&&l.push({seriesId:u,dataIndex:c})}return l}}function Tl(r,e){if(e.dataIndexInside!=null)return e.dataIndexInside;if(e.dataIndex!=null)return le(e.dataIndex)?ue(e.dataIndex,function(t){return r.indexOfRawIndex(t)}):r.indexOfRawIndex(e.dataIndex);if(e.name!=null)return le(e.name)?ue(e.name,function(t){return r.indexOfName(t)}):r.indexOfName(e.name)}function et(){var r="__ec_inner_"+q7++;return function(e){return e[r]||(e[r]={})}}var q7=uj();function ec(r,e,t){var n=gT(e,t),a=n.mainTypeSpecified,i=n.queryOptionMap,o=n.others,s=o,l=t?t.defaultMainType:null;return!a&&l&&i.set(l,{}),i.each(function(u,c){var f=Lc(r,c,u,{useDefault:l===c,enableAll:t&&t.enableAll!=null?t.enableAll:!0,enableNone:t&&t.enableNone!=null?t.enableNone:!0});s[c+"Models"]=f.models,s[c+"Model"]=f.models[0]}),s}function gT(r,e){var t;if(pe(r)){var n={};n[r+"Index"]=0,t=n}else t=r;var a=we(),i={},o=!1;return z(t,function(s,l){if(l==="dataIndex"||l==="dataIndexInside"){i[l]=s;return}var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],c=u[1],f=(u[2]||"").toLowerCase();if(!(!c||!f||e&&e.includeMainTypes&&Ue(e.includeMainTypes,c)<0)){o=o||!!c;var d=a.get(c)||a.set(c,{});d[f]=s}}),{mainTypeSpecified:o,queryOptionMap:a,others:i}}var jt={useDefault:!0,enableAll:!1,enableNone:!1},Q7={useDefault:!1,enableAll:!0,enableNone:!0};function Lc(r,e,t,n){n=n||jt;var a=t.index,i=t.id,o=t.name,s={models:null,specified:a!=null||i!=null||o!=null};if(!s.specified){var l=void 0;return s.models=n.useDefault&&(l=r.getComponent(e))?[l]:[],s}if(a==="none"||a===!1){if(n.enableNone)return s.models=[],s;a=-1}return a==="all"&&(n.enableAll?a=i=o=null:a=-1),s.models=r.queryComponents({mainType:e,index:a,id:i,name:o}),s}function gj(r,e,t){r.setAttribute?r.setAttribute(e,t):r[e]=t}function J7(r,e){return r.getAttribute?r.getAttribute(e):r[e]}function e9(r){return r==="auto"?ot.domSupported?"html":"richText":r||"html"}function r_(r,e){var t=we(),n=[];return z(r,function(a){var i=e(a);(t.get(i)||(n.push(i),t.set(i,[]))).push(a)}),{keys:n,buckets:t}}function yj(r,e,t,n,a){var i=e==null||e==="auto";if(n==null)return n;if(ut(n)){var o=zL(t||0,n,a);return Xt(o,i?Math.max(ma(t||0),ma(n)):e)}else{if(pe(n))return a<1?t:n;for(var s=[],l=t,u=n,c=Math.max(l?l.length:0,u.length),f=0;f<c;++f){var d=r.getDimensionInfo(f);if(d&&d.type==="ordinal")s[f]=(a<1&&l?l:u)[f];else{var h=l&&l[f]?l[f]:0,v=u[f],o=zL(h,v,a);s[f]=Xt(o,i?Math.max(ma(h),ma(v)):e)}}return s}}var Uo=(function(){function r(){}return r.prototype.reset=function(e,t,n,a){return this._list=e,this._step=a=a||1,this._idx=t,this._end=n??(a>0?e.length:0),this.item=null,this.key=NaN,this},r.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},r})();function v1(r){r.option=r.parentModel=r.ecModel=null}var t9=".",Ps="___EC__COMPONENT__CONTAINER___",mj="___EC__EXTENDED_CLASS___";function Xa(r){var e={main:"",sub:""};if(r){var t=r.split(t9);e.main=t[0]||"",e.sub=t[1]||""}return e}function r9(r){Rr(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function n9(r){return!!(r&&r[mj])}function yT(r,e){r.$constructor=r,r.extend=function(t){var n=this,a;return a9(n)?a=(function(i){Q(o,i);function o(){return i.apply(this,arguments)||this}return o})(n):(a=function(){(t.$constructor||n).apply(this,arguments)},nT(a,this)),ie(a.prototype,t),a[mj]=!0,a.extend=this.extend,a.superCall=s9,a.superApply=l9,a.superClass=n,a}}function a9(r){return Me(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function xj(r,e){r.extend=e.extend}var i9=Math.round(Math.random()*10);function o9(r){var e=["__\0is_clz",i9++].join("_");r.prototype[e]=!0,r.isInstance=function(t){return!!(t&&t[e])}}function s9(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];return this.superClass.prototype[e].apply(r,t)}function l9(r,e,t){return this.superClass.prototype[e].apply(r,t)}function xm(r){var e={};r.registerClass=function(n){var a=n.type||n.prototype.type;if(a){r9(a),n.prototype.type=a;var i=Xa(a);if(!i.sub)e[i.main]=n;else if(i.sub!==Ps){var o=t(i);o[i.sub]=n}}return n},r.getClass=function(n,a,i){var o=e[n];if(o&&o[Ps]&&(o=a?o[a]:null),i&&!o)throw new Error(a?"Component "+n+"."+(a||"")+" is used but not imported.":n+".type should be specified.");return o},r.getClassesByMainType=function(n){var a=Xa(n),i=[],o=e[a.main];return o&&o[Ps]?z(o,function(s,l){l!==Ps&&i.push(s)}):i.push(o),i},r.hasClass=function(n){var a=Xa(n);return!!e[a.main]},r.getAllClassMainTypes=function(){var n=[];return z(e,function(a,i){n.push(i)}),n},r.hasSubTypes=function(n){var a=Xa(n),i=e[a.main];return i&&i[Ps]};function t(n){var a=e[n.main];return(!a||!a[Ps])&&(a=e[n.main]={},a[Ps]=!0),a}}function Cl(r,e){for(var t=0;t<r.length;t++)r[t][1]||(r[t][1]=r[t][0]);return e=e||!1,function(n,a,i){for(var o={},s=0;s<r.length;s++){var l=r[s][1];if(!(a&&Ue(a,l)>=0||i&&Ue(i,l)<0)){var u=n.getShallow(l,e);u!=null&&(o[r[s][0]]=u)}}return o}}var u9=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],c9=Cl(u9),f9=(function(){function r(){}return r.prototype.getAreaStyle=function(e,t){return c9(this,e,t)},r})(),n_=new lc(50);function d9(r){if(typeof r=="string"){var e=n_.get(r);return e&&e.image}else return r}function mT(r,e,t,n,a){if(r)if(typeof r=="string"){if(e&&e.__zrImageSrc===r||!t)return e;var i=n_.get(r),o={hostEl:t,cb:n,cbPayload:a};return i?(e=i.image,!Sm(e)&&i.pending.push(o)):(e=pn.loadImage(r,NL,NL),e.__zrImageSrc=r,n_.put(r,e.__cachedImgObj={image:e,pending:[o]})),e}else return r;else return e}function NL(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<r.pending.length;e++){var t=r.pending[e],n=t.cb;n&&n(this,t.cbPayload),t.hostEl.dirty()}r.pending.length=0}function Sm(r){return r&&r.width&&r.height}var g1=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function h9(r,e,t,n,a){var i={};return Sj(i,r,e,t,n,a),i.text}function Sj(r,e,t,n,a,i){if(!t){r.text="",r.isTruncated=!1;return}var o=(e+"").split(`
|
|
24
|
+
`);i=bj(t,n,a,i);for(var s=!1,l={},u=0,c=o.length;u<c;u++)_j(l,o[u],i),o[u]=l.textLine,s=s||l.isTruncated;r.text=o.join(`
|
|
25
|
+
`),r.isTruncated=s}function bj(r,e,t,n){n=n||{};var a=ie({},n);t=Ce(t,"..."),a.maxIterations=Ce(n.maxIterations,2);var i=a.minChar=Ce(n.minChar,0),o=a.fontMeasureInfo=ti(e),s=o.asciiCharWidth;a.placeholder=Ce(n.placeholder,"");for(var l=r=Math.max(0,r-1),u=0;u<i&&l>=s;u++)l-=s;var c=ri(o,t);return c>l&&(t="",c=0),l=r-c,a.ellipsis=t,a.ellipsisWidth=c,a.contentWidth=l,a.containerWidth=r,a}function _j(r,e,t){var n=t.containerWidth,a=t.contentWidth,i=t.fontMeasureInfo;if(!n){r.textLine="",r.isTruncated=!1;return}var o=ri(i,e);if(o<=n){r.textLine=e,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=a||s>=t.maxIterations){e+=t.ellipsis;break}var l=s===0?p9(e,a,i):o>0?Math.floor(e.length*a/o):0;e=e.substr(0,l),o=ri(i,e)}e===""&&(e=t.placeholder),r.textLine=e,r.isTruncated=!0}function p9(r,e,t){for(var n=0,a=0,i=r.length;a<i&&n<e;a++)n+=ej(t,r.charCodeAt(a));return a}function v9(r,e,t,n){var a=xT(r),i=e.overflow,o=e.padding,s=o?o[1]+o[3]:0,l=o?o[0]+o[2]:0,u=e.font,c=i==="truncate",f=Eh(u),d=Ce(e.lineHeight,f),h=e.lineOverflow==="truncate",v=!1,y=e.width;y==null&&t!=null&&(y=t-s);var m=e.height;m==null&&n!=null&&(m=n-l);var x;y!=null&&(i==="break"||i==="breakAll")?x=a?wj(a,e.font,y,i==="breakAll",0).lines:[]:x=a?a.split(`
|
|
26
|
+
`):[];var _=x.length*d;if(m==null&&(m=_),_>m&&h){var T=Math.floor(m/d);v=v||x.length>T,x=x.slice(0,T),_=x.length*d}if(a&&c&&y!=null)for(var C=bj(y,u,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),k={},A=0;A<x.length;A++)_j(k,x[A],C),x[A]=k.textLine,v=v||k.isTruncated;for(var L=m,D=0,P=ti(u),A=0;A<x.length;A++)D=Math.max(ri(P,x[A]),D);y==null&&(y=D);var E=y;return L+=l,E+=s,{lines:x,height:m,outerWidth:E,outerHeight:L,lineHeight:d,calculatedLineHeight:f,contentWidth:D,contentHeight:_,width:y,isTruncated:v}}var g9=(function(){function r(){}return r})(),jL=(function(){function r(e){this.tokens=[],e&&(this.tokens=e)}return r})(),y9=(function(){function r(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return r})();function m9(r,e,t,n,a){var i=new y9,o=xT(r);if(!o)return i;var s=e.padding,l=s?s[1]+s[3]:0,u=s?s[0]+s[2]:0,c=e.width;c==null&&t!=null&&(c=t-l);var f=e.height;f==null&&n!=null&&(f=n-u);for(var d=e.overflow,h=(d==="break"||d==="breakAll")&&c!=null?{width:c,accumWidth:0,breakAll:d==="breakAll"}:null,v=g1.lastIndex=0,y;(y=g1.exec(o))!=null;){var m=y.index;m>v&&y1(i,o.substring(v,m),e,h),y1(i,y[2],e,h,y[1]),v=g1.lastIndex}v<o.length&&y1(i,o.substring(v,o.length),e,h);var x=[],_=0,T=0,C=d==="truncate",k=e.lineOverflow==="truncate",A={};function L(_e,Ne,ve){_e.width=Ne,_e.lineHeight=ve,_+=ve,T=Math.max(T,Ne)}e:for(var D=0;D<i.lines.length;D++){for(var P=i.lines[D],E=0,O=0,B=0;B<P.tokens.length;B++){var N=P.tokens[B],W=N.styleName&&e.rich[N.styleName]||{},H=N.textPadding=W.padding,$=H?H[1]+H[3]:0,Z=N.font=W.font||e.font;N.contentHeight=Eh(Z);var G=Ce(W.height,N.contentHeight);if(N.innerHeight=G,H&&(G+=H[0]+H[2]),N.height=G,N.lineHeight=hn(W.lineHeight,e.lineHeight,G),N.align=W&&W.align||a,N.verticalAlign=W&&W.verticalAlign||"middle",k&&f!=null&&_+N.lineHeight>f){var X=i.lines.length;B>0?(P.tokens=P.tokens.slice(0,B),L(P,O,E),i.lines=i.lines.slice(0,D+1)):i.lines=i.lines.slice(0,D),i.isTruncated=i.isTruncated||i.lines.length<X;break e}var K=W.width,V=K==null||K==="auto";if(typeof K=="string"&&K.charAt(K.length-1)==="%")N.percentWidth=K,x.push(N),N.contentWidth=ri(ti(Z),N.text);else{if(V){var U=W.backgroundColor,ae=U&&U.image;ae&&(ae=d9(ae),Sm(ae)&&(N.width=Math.max(N.width,ae.width*G/ae.height)))}var ce=C&&c!=null?c-O:null;ce!=null&&ce<N.width?!V||ce<$?(N.text="",N.width=N.contentWidth=0):(Sj(A,N.text,ce-$,Z,e.ellipsis,{minChar:e.truncateMinChar}),N.text=A.text,i.isTruncated=i.isTruncated||A.isTruncated,N.width=N.contentWidth=ri(ti(Z),N.text)):N.contentWidth=ri(ti(Z),N.text)}N.width+=$,O+=N.width,W&&(E=Math.max(E,N.lineHeight))}L(P,O,E)}i.outerWidth=i.width=Ce(c,T),i.outerHeight=i.height=Ce(f,_),i.contentHeight=_,i.contentWidth=T,i.outerWidth+=l,i.outerHeight+=u;for(var D=0;D<x.length;D++){var N=x[D],re=N.percentWidth;N.width=parseInt(re,10)/100*i.width}return i}function y1(r,e,t,n,a){var i=e==="",o=a&&t.rich[a]||{},s=r.lines,l=o.font||t.font,u=!1,c,f;if(n){var d=o.padding,h=d?d[1]+d[3]:0;if(o.width!=null&&o.width!=="auto"){var v=Ca(o.width,n.width)+h;s.length>0&&v+n.accumWidth>n.width&&(c=e.split(`
|
|
27
|
+
`),u=!0),n.accumWidth=v}else{var y=wj(e,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=y.accumWidth+h,f=y.linesWidths,c=y.lines}}c||(c=e.split(`
|
|
28
|
+
`));for(var m=ti(l),x=0;x<c.length;x++){var _=c[x],T=new g9;if(T.styleName=a,T.text=_,T.isLineHolder=!_&&!i,typeof o.width=="number"?T.width=o.width:T.width=f?f[x]:ri(m,_),!x&&!u){var C=(s[s.length-1]||(s[0]=new jL)).tokens,k=C.length;k===1&&C[0].isLineHolder?C[0]=T:(_||!k||i)&&C.push(T)}else s.push(new jL([T]))}}function x9(r){var e=r.charCodeAt(0);return e>=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var S9=Qn(",&?/;] ".split(""),function(r,e){return r[e]=!0,r},{});function b9(r){return x9(r)?!!S9[r]:!0}function wj(r,e,t,n,a){for(var i=[],o=[],s="",l="",u=0,c=0,f=ti(e),d=0;d<r.length;d++){var h=r.charAt(d);if(h===`
|
|
29
|
+
`){l&&(s+=l,c+=u),i.push(s),o.push(c),s="",l="",u=0,c=0;continue}var v=ej(f,h.charCodeAt(0)),y=n?!1:!b9(h);if(i.length?c+v>t:a+c+v>t){c?(s||l)&&(y?(s||(s=l,l="",u=0,c=u),i.push(s),o.push(c-u),l+=h,u+=v,s="",c=u):(l&&(s+=l,l="",u=0),i.push(s),o.push(c),s=h,c=v)):y?(i.push(l),o.push(u),l=h,u=v):(i.push(h),o.push(v));continue}c+=v,y?(l+=h,u+=v):(l&&(s+=l,l="",u=0),s+=h)}return l&&(s+=l),s&&(i.push(s),o.push(c)),i.length===1&&(c+=a),{accumWidth:c,lines:i,linesWidths:o}}function BL(r,e,t,n,a,i){if(r.baseX=t,r.baseY=n,r.outerWidth=r.outerHeight=null,!!e){var o=e.width*2,s=e.height*2;ze.set(FL,uc(t,o,a),vl(n,s,i),o,s),ze.intersect(e,FL,null,VL);var l=VL.outIntersectRect;r.outerWidth=l.width,r.outerHeight=l.height,r.baseX=uc(l.x,l.width,a,!0),r.baseY=vl(l.y,l.height,i,!0)}}var FL=new ze(0,0,0,0),VL={outIntersectRect:{},clamp:!0};function xT(r){return r!=null?r+="":r=""}function _9(r){var e=xT(r.text),t=r.font,n=ri(ti(t),e),a=Eh(t);return a_(r,n,a,null)}function a_(r,e,t,n){var a=new ze(uc(r.x||0,e,r.textAlign),vl(r.y||0,t,r.textBaseline),e,t),i=n??(Tj(r)?r.lineWidth:0);return i>0&&(a.x-=i/2,a.y-=i/2,a.width+=i,a.height+=i),a}function Tj(r){var e=r.stroke;return e!=null&&e!=="none"&&r.lineWidth>0}var i_="__zr_style_"+Math.round(Math.random()*10),gl={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},bm={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};gl[i_]=!0;var GL=["z","z2","invisible"],w9=["invisible"],ea=(function(r){Q(e,r);function e(t){return r.call(this,t)||this}return e.prototype._init=function(t){for(var n=st(t),a=0;a<n.length;a++){var i=n[a];i==="style"?this.useStyle(t[i]):r.prototype.attrKV.call(this,i,t[i])}this.style||this.useStyle({})},e.prototype.beforeBrush=function(){},e.prototype.afterBrush=function(){},e.prototype.innerBeforeBrush=function(){},e.prototype.innerAfterBrush=function(){},e.prototype.shouldBePainted=function(t,n,a,i){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&T9(this,t,n)||o&&!o[0]&&!o[3])return!1;if(a&&this.__clipPaths&&this.__clipPaths.length){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(i&&this.parent)for(var l=this.parent;l;){if(l.ignore)return!1;l=l.parent}return!0},e.prototype.contain=function(t,n){return this.rectContain(t,n)},e.prototype.traverse=function(t,n){t.call(n,this)},e.prototype.rectContain=function(t,n){var a=this.transformCoordToLocal(t,n),i=this.getBoundingRect();return i.contain(a[0],a[1])},e.prototype.getPaintRect=function(){var t=this._paintRect;if(!this._paintRect||this.__dirty){var n=this.transform,a=this.getBoundingRect(),i=this.style,o=i.shadowBlur||0,s=i.shadowOffsetX||0,l=i.shadowOffsetY||0;t=this._paintRect||(this._paintRect=new ze(0,0,0,0)),n?ze.applyTransform(t,a,n):t.copy(a),(o||s||l)&&(t.width+=o*2+Math.abs(s),t.height+=o*2+Math.abs(l),t.x=Math.min(t.x,t.x+s-o),t.y=Math.min(t.y,t.y+l-o));var u=this.dirtyRectTolerance;t.isZero()||(t.x=Math.floor(t.x-u),t.y=Math.floor(t.y-u),t.width=Math.ceil(t.width+1+u*2),t.height=Math.ceil(t.height+1+u*2))}return t},e.prototype.setPrevPaintRect=function(t){t?(this._prevPaintRect=this._prevPaintRect||new ze(0,0,0,0),this._prevPaintRect.copy(t)):this._prevPaintRect=null},e.prototype.getPrevPaintRect=function(){return this._prevPaintRect},e.prototype.animateStyle=function(t){return this.animate("style",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():this.markRedraw()},e.prototype.attrKV=function(t,n){t!=="style"?r.prototype.attrKV.call(this,t,n):this.style?this.setStyle(n):this.useStyle(n)},e.prototype.setStyle=function(t,n){return typeof t=="string"?this.style[t]=n:ie(this.style,t),this.dirtyStyle(),this},e.prototype.dirtyStyle=function(t){t||this.markRedraw(),this.__dirty|=gd,this._rect&&(this._rect=null)},e.prototype.dirty=function(){this.dirtyStyle()},e.prototype.styleChanged=function(){return!!(this.__dirty&gd)},e.prototype.styleUpdated=function(){this.__dirty&=~gd},e.prototype.createStyle=function(t){return Dh(gl,t)},e.prototype.useStyle=function(t){t[i_]||(t=this.createStyle(t)),this.__inHover?this.__hoverStyle=t:this.style=t,this.dirtyStyle()},e.prototype.isStyleObject=function(t){return t[i_]},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,n,GL)},e.prototype._applyStateObj=function(t,n,a,i,o,s){r.prototype._applyStateObj.call(this,t,n,a,i,o,s);var l=!(n&&i),u;if(n&&n.style?o?i?u=n.style:(u=this._mergeStyle(this.createStyle(),a.style),this._mergeStyle(u,n.style)):(u=this._mergeStyle(this.createStyle(),i?this.style:a.style),this._mergeStyle(u,n.style)):l&&(u=a.style),u)if(o){var c=this.style;if(this.style=this.createStyle(l?{}:c),l)for(var f=st(c),d=0;d<f.length;d++){var h=f[d];h in u&&(u[h]=u[h],this.style[h]=c[h])}for(var v=st(u),d=0;d<v.length;d++){var h=v[d];this.style[h]=this.style[h]}this._transitionState(t,{style:u},s,this.getAnimationStyleProps())}else this.useStyle(u);for(var y=this.__inHover?w9:GL,d=0;d<y.length;d++){var h=y[d];n&&n[h]!=null?this[h]=n[h]:l&&a[h]!=null&&(this[h]=a[h])}},e.prototype._mergeStates=function(t){for(var n=r.prototype._mergeStates.call(this,t),a,i=0;i<t.length;i++){var o=t[i];o.style&&(a=a||{},this._mergeStyle(a,o.style))}return a&&(n.style=a),n},e.prototype._mergeStyle=function(t,n){return ie(t,n),t},e.prototype.getAnimationStyleProps=function(){return bm},e.initDefaultProps=(function(){var t=e.prototype;t.type="displayable",t.invisible=!1,t.z=0,t.z2=0,t.zlevel=0,t.culling=!1,t.cursor="pointer",t.rectHover=!1,t.incremental=!1,t._rect=null,t.dirtyRectTolerance=0,t.__dirty=Tn|gd})(),e})(ym),m1=new ze(0,0,0,0),x1=new ze(0,0,0,0);function T9(r,e,t){return m1.copy(r.getBoundingRect()),r.transform&&m1.applyTransform(r.transform),x1.width=e,x1.height=t,!m1.intersect(x1)}var cn=Math.min,fn=Math.max,S1=Math.sin,b1=Math.cos,Rs=Math.PI*2,xv=ss(),Sv=ss(),bv=ss();function _m(r,e,t){if(r.length!==0){for(var n=r[0],a=n[0],i=n[0],o=n[1],s=n[1],l=1;l<r.length;l++)n=r[l],a=cn(a,n[0]),i=fn(i,n[0]),o=cn(o,n[1]),s=fn(s,n[1]);e[0]=a,e[1]=o,t[0]=i,t[1]=s}}function WL(r,e,t,n,a,i){a[0]=cn(r,t),a[1]=cn(e,n),i[0]=fn(r,t),i[1]=fn(e,n)}var $L=[],HL=[];function C9(r,e,t,n,a,i,o,s,l,u){var c=BN,f=fr,d=c(r,t,a,o,$L);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var h=0;h<d;h++){var v=f(r,t,a,o,$L[h]);l[0]=cn(v,l[0]),u[0]=fn(v,u[0])}d=c(e,n,i,s,HL);for(var h=0;h<d;h++){var y=f(e,n,i,s,HL[h]);l[1]=cn(y,l[1]),u[1]=fn(y,u[1])}l[0]=cn(r,l[0]),u[0]=fn(r,u[0]),l[0]=cn(o,l[0]),u[0]=fn(o,u[0]),l[1]=cn(e,l[1]),u[1]=fn(e,u[1]),l[1]=cn(s,l[1]),u[1]=fn(s,u[1])}function M9(r,e,t,n,a,i,o,s){var l=VN,u=wr,c=fn(cn(l(r,t,a),1),0),f=fn(cn(l(e,n,i),1),0),d=u(r,t,a,c),h=u(e,n,i,f);o[0]=cn(r,a,d),o[1]=cn(e,i,h),s[0]=fn(r,a,d),s[1]=fn(e,i,h)}function k9(r,e,t,n,a,i,o,s,l){var u=zi,c=Oi,f=Math.abs(a-i);if(f%Rs<1e-4&&f>1e-4){s[0]=r-t,s[1]=e-n,l[0]=r+t,l[1]=e+n;return}if(xv[0]=b1(a)*t+r,xv[1]=S1(a)*n+e,Sv[0]=b1(i)*t+r,Sv[1]=S1(i)*n+e,u(s,xv,Sv),c(l,xv,Sv),a=a%Rs,a<0&&(a=a+Rs),i=i%Rs,i<0&&(i=i+Rs),a>i&&!o?i+=Rs:a<i&&o&&(a+=Rs),o){var d=i;i=a,a=d}for(var h=0;h<i;h+=Math.PI/2)h>a&&(bv[0]=b1(h)*t+r,bv[1]=S1(h)*n+e,u(s,bv,s),c(l,bv,l))}var Mt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Es=[],zs=[],Ea=[],To=[],za=[],Oa=[],_1=Math.min,w1=Math.max,Os=Math.cos,Ns=Math.sin,bi=Math.abs,o_=Math.PI,Ro=o_*2,T1=typeof Float32Array<"u",Nf=[];function C1(r){var e=Math.round(r/o_*1e8)/1e8;return e%2*o_}function wm(r,e){var t=C1(r[0]);t<0&&(t+=Ro);var n=t-r[0],a=r[1];a+=n,!e&&a-t>=Ro?a=t+Ro:e&&t-a>=Ro?a=t-Ro:!e&&t>a?a=t+(Ro-C1(t-a)):e&&t<a&&(a=t-(Ro-C1(a-t))),r[0]=t,r[1]=a}var ii=(function(){function r(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}return r.prototype.increaseVersion=function(){this._version++},r.prototype.getVersion=function(){return this._version},r.prototype.setScale=function(e,t,n){n=n||0,n>0&&(this._ux=bi(n/ry/e)||0,this._uy=bi(n/ry/t)||0)},r.prototype.setDPR=function(e){this.dpr=e},r.prototype.setContext=function(e){this._ctx=e},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Mt.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},r.prototype.lineTo=function(e,t){var n=bi(e-this._xi),a=bi(t-this._yi),i=n>this._ux||a>this._uy;if(this.addData(Mt.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var o=n*n+a*a;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(e,t,n,a,i,o){return this._drawPendingPt(),this.addData(Mt.C,e,t,n,a,i,o),this._ctx&&this._ctx.bezierCurveTo(e,t,n,a,i,o),this._xi=i,this._yi=o,this},r.prototype.quadraticCurveTo=function(e,t,n,a){return this._drawPendingPt(),this.addData(Mt.Q,e,t,n,a),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,a),this._xi=n,this._yi=a,this},r.prototype.arc=function(e,t,n,a,i,o){this._drawPendingPt(),Nf[0]=a,Nf[1]=i,wm(Nf,o),a=Nf[0],i=Nf[1];var s=i-a;return this.addData(Mt.A,e,t,n,n,a,s,0,o?0:1),this._ctx&&this._ctx.arc(e,t,n,a,i,o),this._xi=Os(i)*n+e,this._yi=Ns(i)*n+t,this},r.prototype.arcTo=function(e,t,n,a,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,a,i),this},r.prototype.rect=function(e,t,n,a){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,a),this.addData(Mt.R,e,t,n,a),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(Mt.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},r.prototype.fill=function(e){e&&e.fill(),this.toStatic()},r.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&T1&&(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t}},r.prototype.appendPath=function(e){if(this._saveData){e instanceof Array||(e=[e]);for(var t=e.length,n=0,a=this._len,i=0;i<t;i++)n+=e[i].len();var o=this.data;if(T1&&(o instanceof Float32Array||!o)&&(this.data=new Float32Array(a+n),a>0&&o))for(var s=0;s<a;s++)this.data[s]=o[s];for(var i=0;i<t;i++)for(var l=e[i].data,s=0;s<l.length;s++)this.data[a++]=l[s];this._len=a}},r.prototype.addData=function(e,t,n,a,i,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]}},r.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},r.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,T1&&this._len>11&&(this.data=new Float32Array(e)))}},r.prototype.getBoundingRect=function(){Ea[0]=Ea[1]=za[0]=za[1]=Number.MAX_VALUE,To[0]=To[1]=Oa[0]=Oa[1]=-Number.MAX_VALUE;var e=this.data,t=0,n=0,a=0,i=0,o;for(o=0;o<this._len;){var s=e[o++],l=o===1;switch(l&&(t=e[o],n=e[o+1],a=t,i=n),s){case Mt.M:t=a=e[o++],n=i=e[o++],za[0]=a,za[1]=i,Oa[0]=a,Oa[1]=i;break;case Mt.L:WL(t,n,e[o],e[o+1],za,Oa),t=e[o++],n=e[o++];break;case Mt.C:C9(t,n,e[o++],e[o++],e[o++],e[o++],e[o],e[o+1],za,Oa),t=e[o++],n=e[o++];break;case Mt.Q:M9(t,n,e[o++],e[o++],e[o],e[o+1],za,Oa),t=e[o++],n=e[o++];break;case Mt.A:var u=e[o++],c=e[o++],f=e[o++],d=e[o++],h=e[o++],v=e[o++]+h;o+=1;var y=!e[o++];l&&(a=Os(h)*f+u,i=Ns(h)*d+c),k9(u,c,f,d,h,v,y,za,Oa),t=Os(v)*f+u,n=Ns(v)*d+c;break;case Mt.R:a=t=e[o++],i=n=e[o++];var m=e[o++],x=e[o++];WL(a,i,a+m,i+x,za,Oa);break;case Mt.Z:t=a,n=i;break}zi(Ea,Ea,za),Oi(To,To,Oa)}return o===0&&(Ea[0]=Ea[1]=To[0]=To[1]=0),new ze(Ea[0],Ea[1],To[0]-Ea[0],To[1]-Ea[1])},r.prototype._calculateLength=function(){var e=this.data,t=this._len,n=this._ux,a=this._uy,i=0,o=0,s=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,c=0,f=0,d=0;d<t;){var h=e[d++],v=d===1;v&&(i=e[d],o=e[d+1],s=i,l=o);var y=-1;switch(h){case Mt.M:i=s=e[d++],o=l=e[d++];break;case Mt.L:{var m=e[d++],x=e[d++],_=m-i,T=x-o;(bi(_)>n||bi(T)>a||d===t-1)&&(y=Math.sqrt(_*_+T*T),i=m,o=x);break}case Mt.C:{var C=e[d++],k=e[d++],m=e[d++],x=e[d++],A=e[d++],L=e[d++];y=NH(i,o,C,k,m,x,A,L,10),i=A,o=L;break}case Mt.Q:{var C=e[d++],k=e[d++],m=e[d++],x=e[d++];y=BH(i,o,C,k,m,x,10),i=m,o=x;break}case Mt.A:var D=e[d++],P=e[d++],E=e[d++],O=e[d++],B=e[d++],N=e[d++],W=N+B;d+=1,v&&(s=Os(B)*E+D,l=Ns(B)*O+P),y=w1(E,O)*_1(Ro,Math.abs(N)),i=Os(W)*E+D,o=Ns(W)*O+P;break;case Mt.R:{s=i=e[d++],l=o=e[d++];var H=e[d++],$=e[d++];y=H*2+$*2;break}case Mt.Z:{var _=s-i,T=l-o;y=Math.sqrt(_*_+T*T),i=s,o=l;break}}y>=0&&(u[f++]=y,c+=y)}return this._pathLen=c,c},r.prototype.rebuildPath=function(e,t){var n=this.data,a=this._ux,i=this._uy,o=this._len,s,l,u,c,f,d,h=t<1,v,y,m=0,x=0,_,T=0,C,k;if(!(h&&(this._pathSegLen||this._calculateLength(),v=this._pathSegLen,y=this._pathLen,_=t*y,!_)))e:for(var A=0;A<o;){var L=n[A++],D=A===1;switch(D&&(u=n[A],c=n[A+1],s=u,l=c),L!==Mt.L&&T>0&&(e.lineTo(C,k),T=0),L){case Mt.M:s=u=n[A++],l=c=n[A++],e.moveTo(u,c);break;case Mt.L:{f=n[A++],d=n[A++];var P=bi(f-u),E=bi(d-c);if(P>a||E>i){if(h){var O=v[x++];if(m+O>_){var B=(_-m)/O;e.lineTo(u*(1-B)+f*B,c*(1-B)+d*B);break e}m+=O}e.lineTo(f,d),u=f,c=d,T=0}else{var N=P*P+E*E;N>T&&(C=f,k=d,T=N)}break}case Mt.C:{var W=n[A++],H=n[A++],$=n[A++],Z=n[A++],G=n[A++],X=n[A++];if(h){var O=v[x++];if(m+O>_){var B=(_-m)/O;Jo(u,W,$,G,B,Es),Jo(c,H,Z,X,B,zs),e.bezierCurveTo(Es[1],zs[1],Es[2],zs[2],Es[3],zs[3]);break e}m+=O}e.bezierCurveTo(W,H,$,Z,G,X),u=G,c=X;break}case Mt.Q:{var W=n[A++],H=n[A++],$=n[A++],Z=n[A++];if(h){var O=v[x++];if(m+O>_){var B=(_-m)/O;Kd(u,W,$,B,Es),Kd(c,H,Z,B,zs),e.quadraticCurveTo(Es[1],zs[1],Es[2],zs[2]);break e}m+=O}e.quadraticCurveTo(W,H,$,Z),u=$,c=Z;break}case Mt.A:var K=n[A++],V=n[A++],U=n[A++],ae=n[A++],ce=n[A++],re=n[A++],_e=n[A++],Ne=!n[A++],ve=U>ae?U:ae,fe=bi(U-ae)>.001,Te=ce+re,xe=!1;if(h){var O=v[x++];m+O>_&&(Te=ce+re*(_-m)/O,xe=!0),m+=O}if(fe&&e.ellipse?e.ellipse(K,V,U,ae,_e,ce,Te,Ne):e.arc(K,V,ve,ce,Te,Ne),xe)break e;D&&(s=Os(ce)*U+K,l=Ns(ce)*ae+V),u=Os(Te)*U+K,c=Ns(Te)*ae+V;break;case Mt.R:s=u=n[A],l=c=n[A+1],f=n[A++],d=n[A++];var Ie=n[A++],dt=n[A++];if(h){var O=v[x++];if(m+O>_){var ke=_-m;e.moveTo(f,d),e.lineTo(f+_1(ke,Ie),d),ke-=Ie,ke>0&&e.lineTo(f+Ie,d+_1(ke,dt)),ke-=dt,ke>0&&e.lineTo(f+w1(Ie-ke,0),d+dt),ke-=Ie,ke>0&&e.lineTo(f,d+w1(dt-ke,0));break e}m+=O}e.rect(f,d,Ie,dt);break;case Mt.Z:if(h){var O=v[x++];if(m+O>_){var B=(_-m)/O;e.lineTo(u*(1-B)+s*B,c*(1-B)+l*B);break e}m+=O}e.closePath(),u=s,c=l}}},r.prototype.clone=function(){var e=new r,t=this.data;return e.data=t.slice?t.slice():Array.prototype.slice.call(t),e._len=this._len,e},r.prototype.canSave=function(){return!!this._saveData},r.CMD=Mt,r.initDefaultProps=(function(){var e=r.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0})(),r})();function zo(r,e,t,n,a,i,o){if(a===0)return!1;var s=a,l=0,u=r;if(o>e+s&&o>n+s||o<e-s&&o<n-s||i>r+s&&i>t+s||i<r-s&&i<t-s)return!1;if(r!==t)l=(e-n)/(r-t),u=(r*n-t*e)/(r-t);else return Math.abs(i-r)<=s/2;var c=l*i-o+u,f=c*c/(l*l+1);return f<=s/2*s/2}function A9(r,e,t,n,a,i,o,s,l,u,c){if(l===0)return!1;var f=l;if(c>e+f&&c>n+f&&c>i+f&&c>s+f||c<e-f&&c<n-f&&c<i-f&&c<s-f||u>r+f&&u>t+f&&u>a+f&&u>o+f||u<r-f&&u<t-f&&u<a-f&&u<o-f)return!1;var d=FN(r,e,t,n,a,i,o,s,u,c,null);return d<=f/2}function Cj(r,e,t,n,a,i,o,s,l){if(o===0)return!1;var u=o;if(l>e+u&&l>n+u&&l>i+u||l<e-u&&l<n-u&&l<i-u||s>r+u&&s>t+u&&s>a+u||s<r-u&&s<t-u&&s<a-u)return!1;var c=GN(r,e,t,n,a,i,s,l,null);return c<=u/2}var UL=Math.PI*2;function An(r){return r%=UL,r<0&&(r+=UL),r}var jf=Math.PI*2;function L9(r,e,t,n,a,i,o,s,l){if(o===0)return!1;var u=o;s-=r,l-=e;var c=Math.sqrt(s*s+l*l);if(c-u>t||c+u<t)return!1;if(Math.abs(n-a)%jf<1e-4)return!0;if(i){var f=n;n=An(a),a=An(f)}else n=An(n),a=An(a);n>a&&(a+=jf);var d=Math.atan2(l,s);return d<0&&(d+=jf),d>=n&&d<=a||d+jf>=n&&d+jf<=a}function Pi(r,e,t,n,a,i){if(i>e&&i>n||i<e&&i<n||n===e)return 0;var o=(i-e)/(n-e),s=n<e?1:-1;(o===1||o===0)&&(s=n<e?.5:-.5);var l=o*(t-r)+r;return l===a?1/0:l>a?s:0}var Co=ii.CMD,js=Math.PI*2,I9=1e-4;function D9(r,e){return Math.abs(r-e)<I9}var Kr=[-1,-1,-1],Hn=[-1,-1];function P9(){var r=Hn[0];Hn[0]=Hn[1],Hn[1]=r}function R9(r,e,t,n,a,i,o,s,l,u){if(u>e&&u>n&&u>i&&u>s||u<e&&u<n&&u<i&&u<s)return 0;var c=Qg(e,n,i,s,u,Kr);if(c===0)return 0;for(var f=0,d=-1,h=void 0,v=void 0,y=0;y<c;y++){var m=Kr[y],x=m===0||m===1?.5:1,_=fr(r,t,a,o,m);_<l||(d<0&&(d=BN(e,n,i,s,Hn),Hn[1]<Hn[0]&&d>1&&P9(),h=fr(e,n,i,s,Hn[0]),d>1&&(v=fr(e,n,i,s,Hn[1]))),d===2?m<Hn[0]?f+=h<e?x:-x:m<Hn[1]?f+=v<h?x:-x:f+=s<v?x:-x:m<Hn[0]?f+=h<e?x:-x:f+=s<h?x:-x)}return f}function E9(r,e,t,n,a,i,o,s){if(s>e&&s>n&&s>i||s<e&&s<n&&s<i)return 0;var l=jH(e,n,i,s,Kr);if(l===0)return 0;var u=VN(e,n,i);if(u>=0&&u<=1){for(var c=0,f=wr(e,n,i,u),d=0;d<l;d++){var h=Kr[d]===0||Kr[d]===1?.5:1,v=wr(r,t,a,Kr[d]);v<o||(Kr[d]<u?c+=f<e?h:-h:c+=i<f?h:-h)}return c}else{var h=Kr[0]===0||Kr[0]===1?.5:1,v=wr(r,t,a,Kr[0]);return v<o?0:i<e?h:-h}}function z9(r,e,t,n,a,i,o,s){if(s-=e,s>t||s<-t)return 0;var l=Math.sqrt(t*t-s*s);Kr[0]=-l,Kr[1]=l;var u=Math.abs(n-a);if(u<1e-4)return 0;if(u>=js-1e-4){n=0,a=js;var c=i?1:-1;return o>=Kr[0]+r&&o<=Kr[1]+r?c:0}if(n>a){var f=n;n=a,a=f}n<0&&(n+=js,a+=js);for(var d=0,h=0;h<2;h++){var v=Kr[h];if(v+r>o){var y=Math.atan2(s,v),c=i?1:-1;y<0&&(y=js+y),(y>=n&&y<=a||y+js>=n&&y+js<=a)&&(y>Math.PI/2&&y<Math.PI*1.5&&(c=-c),d+=c)}}return d}function Mj(r,e,t,n,a){for(var i=r.data,o=r.len(),s=0,l=0,u=0,c=0,f=0,d,h,v=0;v<o;){var y=i[v++],m=v===1;switch(y===Co.M&&v>1&&(t||(s+=Pi(l,u,c,f,n,a))),m&&(l=i[v],u=i[v+1],c=l,f=u),y){case Co.M:c=i[v++],f=i[v++],l=c,u=f;break;case Co.L:if(t){if(zo(l,u,i[v],i[v+1],e,n,a))return!0}else s+=Pi(l,u,i[v],i[v+1],n,a)||0;l=i[v++],u=i[v++];break;case Co.C:if(t){if(A9(l,u,i[v++],i[v++],i[v++],i[v++],i[v],i[v+1],e,n,a))return!0}else s+=R9(l,u,i[v++],i[v++],i[v++],i[v++],i[v],i[v+1],n,a)||0;l=i[v++],u=i[v++];break;case Co.Q:if(t){if(Cj(l,u,i[v++],i[v++],i[v],i[v+1],e,n,a))return!0}else s+=E9(l,u,i[v++],i[v++],i[v],i[v+1],n,a)||0;l=i[v++],u=i[v++];break;case Co.A:var x=i[v++],_=i[v++],T=i[v++],C=i[v++],k=i[v++],A=i[v++];v+=1;var L=!!(1-i[v++]);d=Math.cos(k)*T+x,h=Math.sin(k)*C+_,m?(c=d,f=h):s+=Pi(l,u,d,h,n,a);var D=(n-x)*C/T+x;if(t){if(L9(x,_,C,k,k+A,L,e,D,a))return!0}else s+=z9(x,_,C,k,k+A,L,D,a);l=Math.cos(k+A)*T+x,u=Math.sin(k+A)*C+_;break;case Co.R:c=l=i[v++],f=u=i[v++];var P=i[v++],E=i[v++];if(d=c+P,h=f+E,t){if(zo(c,f,d,f,e,n,a)||zo(d,f,d,h,e,n,a)||zo(d,h,c,h,e,n,a)||zo(c,h,c,f,e,n,a))return!0}else s+=Pi(d,f,d,h,n,a),s+=Pi(c,h,c,f,n,a);break;case Co.Z:if(t){if(zo(l,u,c,f,e,n,a))return!0}else s+=Pi(l,u,c,f,n,a);l=c,u=f;break}}return!t&&!D9(u,f)&&(s+=Pi(l,u,c,f,n,a)||0),s!==0}function O9(r,e,t){return Mj(r,0,!1,e,t)}function N9(r,e,t,n){return Mj(r,e,!0,t,n)}var oy=De({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},gl),j9={style:De({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},bm.style)},M1=ni.concat(["invisible","culling","z","z2","zlevel","parent"]),nt=(function(r){Q(e,r);function e(t){return r.call(this,t)||this}return e.prototype.update=function(){var t=this;r.prototype.update.call(this);var n=this.style;if(n.decal){var a=this._decalEl=this._decalEl||new e;a.buildPath===e.prototype.buildPath&&(a.buildPath=function(l){t.buildPath(l,t.shape)}),a.silent=!0;var i=a.style;for(var o in n)i[o]!==n[o]&&(i[o]=n[o]);i.fill=n.fill?n.decal:null,i.decal=null,i.shadowColor=null,n.strokeFirst&&(i.stroke=null);for(var s=0;s<M1.length;++s)a[M1[s]]=this[M1[s]];a.__dirty|=Tn}else this._decalEl&&(this._decalEl=null)},e.prototype.getDecalElement=function(){return this._decalEl},e.prototype._init=function(t){var n=st(t);this.shape=this.getDefaultShape();var a=this.getDefaultStyle();a&&this.useStyle(a);for(var i=0;i<n.length;i++){var o=n[i],s=t[o];o==="style"?this.style?ie(this.style,s):this.useStyle(s):o==="shape"?ie(this.shape,s):r.prototype.attrKV.call(this,o,s)}this.style||this.useStyle({})},e.prototype.getDefaultStyle=function(){return null},e.prototype.getDefaultShape=function(){return{}},e.prototype.canBeInsideText=function(){return this.hasFill()},e.prototype.getInsideTextFill=function(){var t=this.style.fill;if(t!=="none"){if(pe(t)){var n=Jd(t,0);return n>.5?Kb:n>.2?g7:qb}else if(t)return qb}return Kb},e.prototype.getInsideTextStroke=function(t){var n=this.style.fill;if(pe(n)){var a=this.__zr,i=!!(a&&a.isDarkMode()),o=Jd(t,0)<Zb;if(i===o)return n}},e.prototype.buildPath=function(t,n,a){},e.prototype.pathUpdated=function(){this.__dirty&=~Fu},e.prototype.getUpdatedPathProxy=function(t){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},e.prototype.createPathProxy=function(){this.path=new ii(!1)},e.prototype.hasStroke=function(){var t=this.style,n=t.stroke;return!(n==null||n==="none"||!(t.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style,n=t.fill;return n!=null&&n!=="none"},e.prototype.getBoundingRect=function(){var t=this._rect,n=this.style,a=!t;if(a){var i=!1;this.path||(i=!0,this.createPathProxy());var o=this.path;(i||this.__dirty&Fu)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),t=o.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||a){s.copy(t);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 t},e.prototype.contain=function(t,n){var a=this.transformCoordToLocal(t,n),i=this.getBoundingRect(),o=this.style;if(t=a[0],n=a[1],i.contain(t,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)),N9(s,l/u,t,n)))return!0}if(this.hasFill())return O9(s,t,n)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=Fu,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():t==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(t,n){t==="shape"?this.setShape(n):r.prototype.attrKV.call(this,t,n)},e.prototype.setShape=function(t,n){var a=this.shape;return a||(a=this.shape={}),typeof t=="string"?a[t]=n:ie(a,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&Fu)},e.prototype.createStyle=function(t){return Dh(oy,t)},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=ie({},this.shape))},e.prototype._applyStateObj=function(t,n,a,i,o,s){r.prototype._applyStateObj.call(this,t,n,a,i,o,s);var l=!(n&&i),u;if(n&&n.shape?o?i?u=n.shape:(u=ie({},a.shape),ie(u,n.shape)):(u=ie({},i?this.shape:a.shape),ie(u,n.shape)):l&&(u=a.shape),u)if(o){this.shape=ie({},this.shape);for(var c={},f=st(u),d=0;d<f.length;d++){var h=f[d];typeof u[h]=="object"?this.shape[h]=u[h]:c[h]=u[h]}this._transitionState(t,{shape:c},s)}else this.shape=u,this.dirtyShape()},e.prototype._mergeStates=function(t){for(var n=r.prototype._mergeStates.call(this,t),a,i=0;i<t.length;i++){var o=t[i];o.shape&&(a=a||{},this._mergeStyle(a,o.shape))}return a&&(n.shape=a),n},e.prototype.getAnimationStyleProps=function(){return j9},e.prototype.isZeroArea=function(){return!1},e.extend=function(t){var n=(function(i){Q(o,i);function o(s){var l=i.call(this,s)||this;return t.init&&t.init.call(l,s),l}return o.prototype.getDefaultStyle=function(){return Ae(t.style)},o.prototype.getDefaultShape=function(){return Ae(t.shape)},o})(e);for(var a in t)typeof t[a]=="function"&&(n.prototype[a]=t[a]);return n},e.initDefaultProps=(function(){var t=e.prototype;t.type="path",t.strokeContainThreshold=5,t.segmentIgnoreThreshold=0,t.subPixelOptimize=!1,t.autoBatch=!1,t.__dirty=Tn|gd|Fu})(),e})(ea),B9=De({strokeFirst:!0,font:Ui,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},oy),fc=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.hasStroke=function(){return Tj(this.style)},e.prototype.hasFill=function(){var t=this.style,n=t.fill;return n!=null&&n!=="none"},e.prototype.createStyle=function(t){return Dh(B9,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){return this._rect||(this._rect=_9(this.style)),this._rect},e.initDefaultProps=(function(){var t=e.prototype;t.dirtyRectTolerance=10})(),e})(ea);fc.prototype.type="tspan";var F9=De({x:0,y:0},gl),V9={style:De({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},bm.style)};function G9(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var gr=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.createStyle=function(t){return Dh(F9,t)},e.prototype._getSize=function(t){var n=this.style,a=n[t];if(a!=null)return a;var i=G9(n.image)?n.image:this.__image;if(!i)return 0;var o=t==="width"?"height":"width",s=n[o];return s==null?i[t]:i[t]/i[o]*s},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return V9},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new ze(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e})(ea);gr.prototype.type="image";function W9(r,e){var t=e.x,n=e.y,a=e.width,i=e.height,o=e.r,s,l,u,c;a<0&&(t=t+a,a=-a),i<0&&(n=n+i,i=-i),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>a&&(f=s+l,s*=a/f,l*=a/f),u+c>a&&(f=u+c,u*=a/f,c*=a/f),l+u>i&&(f=l+u,l*=i/f,u*=i/f),s+c>i&&(f=s+c,s*=i/f,c*=i/f),r.moveTo(t+s,n),r.lineTo(t+a-l,n),l!==0&&r.arc(t+a-l,n+l,l,-Math.PI/2,0),r.lineTo(t+a,n+i-u),u!==0&&r.arc(t+a-u,n+i-u,u,0,Math.PI/2),r.lineTo(t+c,n+i),c!==0&&r.arc(t+c,n+i-c,c,Math.PI/2,Math.PI),r.lineTo(t,n+s),s!==0&&r.arc(t+s,n+s,s,Math.PI,Math.PI*1.5)}var Uu=Math.round;function Tm(r,e,t){if(e){var n=e.x1,a=e.x2,i=e.y1,o=e.y2;r.x1=n,r.x2=a,r.y1=i,r.y2=o;var s=t&&t.lineWidth;return s&&(Uu(n*2)===Uu(a*2)&&(r.x1=r.x2=Ln(n,s,!0)),Uu(i*2)===Uu(o*2)&&(r.y1=r.y2=Ln(i,s,!0))),r}}function kj(r,e,t){if(e){var n=e.x,a=e.y,i=e.width,o=e.height;r.x=n,r.y=a,r.width=i,r.height=o;var s=t&&t.lineWidth;return s&&(r.x=Ln(n,s,!0),r.y=Ln(a,s,!0),r.width=Math.max(Ln(n+i,s,!1)-r.x,i===0?0:1),r.height=Math.max(Ln(a+o,s,!1)-r.y,o===0?0:1)),r}}function Ln(r,e,t){if(!e)return r;var n=Uu(r*2);return(n+Uu(e))%2===0?n/2:(n+(t?1:-1))/2}var $9=(function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r})(),H9={},Qe=(function(r){Q(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new $9},e.prototype.buildPath=function(t,n){var a,i,o,s;if(this.subPixelOptimize){var l=kj(H9,n,this.style);a=l.x,i=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else a=n.x,i=n.y,o=n.width,s=n.height;n.r?W9(t,n):t.rect(a,i,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e})(nt);Qe.prototype.type="rect";var YL={fill:"#000"},XL=2,Na={},U9={style:De({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},bm.style)},lt=(function(r){Q(e,r);function e(t){var n=r.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=YL,n.attr(t),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var n=this._children[t];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},e.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):r.prototype.updateTransform.call(this)},e.prototype.getLocalTransform=function(t){var n=this.innerTransformable;return n?n.getLocalTransform(t):r.prototype.getLocalTransform.call(this,t)},e.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),r.prototype.getComputedTransform.call(this)},e.prototype._updateSubTexts=function(){this._childCursor=0,Z9(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},e.prototype.addSelfToZr=function(t){r.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=t},e.prototype.removeSelfFromZr=function(t){r.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},e.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var t=new ze(0,0,0,0),n=this._children,a=[],i=null,o=0;o<n.length;o++){var s=n[o],l=s.getBoundingRect(),u=s.getLocalTransform(a);u?(t.copy(l),t.applyTransform(u),i=i||t.clone(),i.union(t)):(i=i||l.clone(),i.union(l))}this._rect=i||t}return this._rect},e.prototype.setDefaultTextStyle=function(t){this._defaultStyle=t||YL},e.prototype.setTextContent=function(t){},e.prototype._mergeStyle=function(t,n){if(!n)return t;var a=n.rich,i=t.rich||a&&{};return ie(t,n),a&&i?(this._mergeRich(i,a),t.rich=i):i&&(t.rich=i),t},e.prototype._mergeRich=function(t,n){for(var a=st(n),i=0;i<a.length;i++){var o=a[i];t[o]=t[o]||{},ie(t[o],n[o])}},e.prototype.getAnimationStyleProps=function(){return U9},e.prototype._getOrCreateChild=function(t){var n=this._children[this._childCursor];return(!n||!(n instanceof t))&&(n=new t),this._children[this._childCursor++]=n,n.__zr=this.__zr,n.parent=this,n},e.prototype._updatePlainTexts=function(){var t=this.style,n=t.font||Ui,a=t.padding,i=this._defaultStyle,o=t.x||0,s=t.y||0,l=t.align||i.align||"left",u=t.verticalAlign||i.verticalAlign||"top";BL(Na,i.overflowRect,o,s,l,u),o=Na.baseX,s=Na.baseY;var c=tI(t),f=v9(c,t,Na.outerWidth,Na.outerHeight),d=k1(t),h=!!t.backgroundColor,v=f.outerHeight,y=f.outerWidth,m=f.lines,x=f.lineHeight;this.isTruncated=!!f.isTruncated;var _=o,T=vl(s,f.contentHeight,u);if(d||a){var C=uc(o,y,l),k=vl(s,v,u);d&&this._renderBackground(t,t,C,k,y,v)}T+=x/2,a&&(_=eI(o,l,a),u==="top"?T+=a[0]:u==="bottom"&&(T-=a[2]));for(var A=0,L=!1,D=!1,P=JL("fill"in t?t.fill:(D=!0,i.fill)),E=QL("stroke"in t?t.stroke:!h&&(!i.autoStroke||D)?(A=XL,L=!0,i.stroke):null),O=t.textShadowBlur>0,B=0;B<m.length;B++){var N=this._getOrCreateChild(fc),W=N.createStyle();N.useStyle(W),W.text=m[B],W.x=_,W.y=T,W.textAlign=l,W.textBaseline="middle",W.opacity=t.opacity,W.strokeFirst=!0,O&&(W.shadowBlur=t.textShadowBlur||0,W.shadowColor=t.textShadowColor||"transparent",W.shadowOffsetX=t.textShadowOffsetX||0,W.shadowOffsetY=t.textShadowOffsetY||0),W.stroke=E,W.fill=P,E&&(W.lineWidth=t.lineWidth||A,W.lineDash=t.lineDash,W.lineDashOffset=t.lineDashOffset||0),W.font=n,KL(W,t),T+=x,N.setBoundingRect(a_(W,f.contentWidth,f.calculatedLineHeight,L?0:null))}},e.prototype._updateRichTexts=function(){var t=this.style,n=this._defaultStyle,a=t.align||n.align,i=t.verticalAlign||n.verticalAlign,o=t.x||0,s=t.y||0;BL(Na,n.overflowRect,o,s,a,i),o=Na.baseX,s=Na.baseY;var l=tI(t),u=m9(l,t,Na.outerWidth,Na.outerHeight,a),c=u.width,f=u.outerWidth,d=u.outerHeight,h=t.padding;this.isTruncated=!!u.isTruncated;var v=uc(o,f,a),y=vl(s,d,i),m=v,x=y;h&&(m+=h[3],x+=h[0]);var _=m+c;k1(t)&&this._renderBackground(t,t,v,y,f,d);for(var T=!!t.backgroundColor,C=0;C<u.lines.length;C++){for(var k=u.lines[C],A=k.tokens,L=A.length,D=k.lineHeight,P=k.width,E=0,O=m,B=_,N=L-1,W=void 0;E<L&&(W=A[E],!W.align||W.align==="left");)this._placeToken(W,t,D,x,O,"left",T),P-=W.width,O+=W.width,E++;for(;N>=0&&(W=A[N],W.align==="right");)this._placeToken(W,t,D,x,B,"right",T),P-=W.width,B-=W.width,N--;for(O+=(c-(O-m)-(_-B)-P)/2;E<=N;)W=A[E],this._placeToken(W,t,D,x,O+W.width/2,"center",T),O+=W.width,E++;x+=D}},e.prototype._placeToken=function(t,n,a,i,o,s,l){var u=n.rich[t.styleName]||{};u.text=t.text;var c=t.verticalAlign,f=i+a/2;c==="top"?f=i+t.height/2:c==="bottom"&&(f=i+a-t.height/2);var d=!t.isLineHolder&&k1(u);d&&this._renderBackground(u,n,s==="right"?o-t.width:s==="center"?o-t.width/2:o,f-t.height/2,t.width,t.height);var h=!!u.backgroundColor,v=t.textPadding;v&&(o=eI(o,s,v),f-=t.height/2-v[0]-t.innerHeight/2);var y=this._getOrCreateChild(fc),m=y.createStyle();y.useStyle(m);var x=this._defaultStyle,_=!1,T=0,C=!1,k=JL("fill"in u?u.fill:"fill"in n?n.fill:(_=!0,x.fill)),A=QL("stroke"in u?u.stroke:"stroke"in n?n.stroke:!h&&!l&&(!x.autoStroke||_)?(T=XL,C=!0,x.stroke):null),L=u.textShadowBlur>0||n.textShadowBlur>0;m.text=t.text,m.x=o,m.y=f,L&&(m.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,m.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",m.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,m.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),m.textAlign=s,m.textBaseline="middle",m.font=t.font||Ui,m.opacity=hn(u.opacity,n.opacity,1),KL(m,u),A&&(m.lineWidth=hn(u.lineWidth,n.lineWidth,T),m.lineDash=Ce(u.lineDash,n.lineDash),m.lineDashOffset=n.lineDashOffset||0,m.stroke=A),k&&(m.fill=k),y.setBoundingRect(a_(m,t.contentWidth,t.contentHeight,C?0:null))},e.prototype._renderBackground=function(t,n,a,i,o,s){var l=t.backgroundColor,u=t.borderWidth,c=t.borderColor,f=l&&l.image,d=l&&!f,h=t.borderRadius,v=this,y,m;if(d||t.lineHeight||u&&c){y=this._getOrCreateChild(Qe),y.useStyle(y.createStyle()),y.style.fill=null;var x=y.shape;x.x=a,x.y=i,x.width=o,x.height=s,x.r=h,y.dirtyShape()}if(d){var _=y.style;_.fill=l||null,_.fillOpacity=Ce(t.fillOpacity,1)}else if(f){m=this._getOrCreateChild(gr),m.onload=function(){v.dirtyStyle()};var T=m.style;T.image=l.image,T.x=a,T.y=i,T.width=o,T.height=s}if(u&&c){var _=y.style;_.lineWidth=u,_.stroke=c,_.strokeOpacity=Ce(t.strokeOpacity,1),_.lineDash=t.borderDash,_.lineDashOffset=t.borderDashOffset||0,y.strokeContainThreshold=0,y.hasFill()&&y.hasStroke()&&(_.strokeFirst=!0,_.lineWidth*=2)}var C=(y||m).style;C.shadowBlur=t.shadowBlur||0,C.shadowColor=t.shadowColor||"transparent",C.shadowOffsetX=t.shadowOffsetX||0,C.shadowOffsetY=t.shadowOffsetY||0,C.opacity=hn(t.opacity,n.opacity,1)},e.makeFont=function(t){var n="";return Lj(t)&&(n=[t.fontStyle,t.fontWeight,Aj(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),n&&Mn(n)||t.textFont||t.font},e})(ea),Y9={left:!0,right:1,center:1},X9={top:1,bottom:1,middle:1},ZL=["fontStyle","fontWeight","fontSize","fontFamily"];function Aj(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?Jw+"px":r+"px"}function KL(r,e){for(var t=0;t<ZL.length;t++){var n=ZL[t],a=e[n];a!=null&&(r[n]=a)}}function Lj(r){return r.fontSize!=null||r.fontFamily||r.fontWeight}function Z9(r){return qL(r),z(r.rich,qL),r}function qL(r){if(r){r.font=lt.makeFont(r);var e=r.align;e==="middle"&&(e="center"),r.align=e==null||Y9[e]?e:"left";var t=r.verticalAlign;t==="center"&&(t="middle"),r.verticalAlign=t==null||X9[t]?t:"top";var n=r.padding;n&&(r.padding=Ih(r.padding))}}function QL(r,e){return r==null||e<=0||r==="transparent"||r==="none"?null:r.image||r.colorStops?"#000":r}function JL(r){return r==null||r==="none"?null:r.image||r.colorStops?"#000":r}function eI(r,e,t){return e==="right"?r-t[1]:e==="center"?r+t[3]/2-t[1]/2:r+t[3]}function tI(r){var e=r.text;return e!=null&&(e+=""),e}function k1(r){return!!(r.backgroundColor||r.lineHeight||r.borderWidth&&r.borderColor)}var je=et(),s_=function(r,e,t,n){if(n){var a=je(n);a.dataIndex=t,a.dataType=e,a.seriesIndex=r,a.ssrType="chart",n.type==="group"&&n.traverse(function(i){var o=je(i);o.seriesIndex=r,o.dataIndex=t,o.dataType=e,o.ssrType="chart"})}},rI=1,nI={},Ij=et(),ST=et(),bT=0,zh=1,Cm=2,tn=["emphasis","blur","select"],rh=["normal","emphasis","blur","select"],Ic=10,K9=9,yl="highlight",Ig="downplay",sy="select",l_="unselect",ly="toggleSelect",_T="selectchanged";function yu(r){return r!=null&&r!=="none"}function Mm(r,e,t){r.onHoverStateChange&&(r.hoverState||0)!==t&&r.onHoverStateChange(e),r.hoverState=t}function Dj(r){Mm(r,"emphasis",Cm)}function Pj(r){r.hoverState===Cm&&Mm(r,"normal",bT)}function wT(r){Mm(r,"blur",zh)}function Rj(r){r.hoverState===zh&&Mm(r,"normal",bT)}function q9(r){r.selected=!0}function Q9(r){r.selected=!1}function aI(r,e,t){e(r,t)}function ro(r,e,t){aI(r,e,t),r.isGroup&&r.traverse(function(n){aI(n,e,t)})}function uy(r,e){switch(e){case"emphasis":r.hoverState=Cm;break;case"normal":r.hoverState=bT;break;case"blur":r.hoverState=zh;break;case"select":r.selected=!0}}function J9(r,e,t,n){for(var a=r.style,i={},o=0;o<e.length;o++){var s=e[o],l=a[s];i[s]=l??(n&&n[s])}for(var o=0;o<r.animators.length;o++){var u=r.animators[o];u.__fromStateTransition&&u.__fromStateTransition.indexOf(t)<0&&u.targetName==="style"&&u.saveTo(i,e)}return i}function eU(r,e,t,n){var a=t&&Ue(t,"select")>=0,i=!1;if(r instanceof nt){var o=Ij(r),s=a&&o.selectFill||o.normalFill,l=a&&o.selectStroke||o.normalStroke;if(yu(s)||yu(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(i=!0,n=ie({},n),u=ie({},u),u.fill=s):!yu(u.fill)&&yu(s)?(i=!0,n=ie({},n),u=ie({},u),u.fill=ey(s)):!yu(u.stroke)&&yu(l)&&(i||(n=ie({},n),u=ie({},u)),u.stroke=ey(l)),n.style=u}}if(n&&n.z2==null){i||(n=ie({},n));var c=r.z2EmphasisLift;n.z2=r.z2+(c??Ic)}return n}function tU(r,e,t){if(t&&t.z2==null){t=ie({},t);var n=r.z2SelectLift;t.z2=r.z2+(n??K9)}return t}function rU(r,e,t){var n=Ue(r.currentStates,e)>=0,a=r.style.opacity,i=n?null:J9(r,["opacity"],e,{opacity:1});t=t||{};var o=t.style||{};return o.opacity==null&&(t=ie({},t),o=ie({opacity:n?a:i.opacity*.1},o),t.style=o),t}function A1(r,e){var t=this.states[r];if(this.style){if(r==="emphasis")return eU(this,r,e,t);if(r==="blur")return rU(this,r,t);if(r==="select")return tU(this,r,t)}return t}function Ml(r){r.stateProxy=A1;var e=r.getTextContent(),t=r.getTextGuideLine();e&&(e.stateProxy=A1),t&&(t.stateProxy=A1)}function iI(r,e){!Nj(r,e)&&!r.__highByOuter&&ro(r,Dj)}function oI(r,e){!Nj(r,e)&&!r.__highByOuter&&ro(r,Pj)}function Xi(r,e){r.__highByOuter|=1<<(e||0),ro(r,Dj)}function Zi(r,e){!(r.__highByOuter&=~(1<<(e||0)))&&ro(r,Pj)}function Ej(r){ro(r,wT)}function TT(r){ro(r,Rj)}function zj(r){ro(r,q9)}function Oj(r){ro(r,Q9)}function Nj(r,e){return r.__highDownSilentOnTouch&&e.zrByTouch}function jj(r){var e=r.getModel(),t=[],n=[];e.eachComponent(function(a,i){var o=ST(i),s=a==="series",l=s?r.getViewOfSeriesModel(i):r.getViewOfComponentModel(i);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){Rj(u)}),s&&t.push(i)),o.isBlured=!1}),z(n,function(a){a&&a.toggleBlurSeries&&a.toggleBlurSeries(t,!1,e)})}function u_(r,e,t,n){var a=n.getModel();t=t||"coordinateSystem";function i(u,c){for(var f=0;f<c.length;f++){var d=u.getItemGraphicEl(c[f]);d&&TT(d)}}if(r!=null&&!(!e||e==="none")){var o=a.getSeriesByIndex(r),s=o.coordinateSystem;s&&s.master&&(s=s.master);var l=[];a.eachSeries(function(u){var c=o===u,f=u.coordinateSystem;f&&f.master&&(f=f.master);var d=f&&s?f===s:c;if(!(t==="series"&&!c||t==="coordinateSystem"&&!d||e==="series"&&c)){var h=n.getViewOfSeriesModel(u);if(h.group.traverse(function(m){m.__highByOuter&&c&&e==="self"||wT(m)}),Pr(e))i(u.getData(),e);else if(Pe(e))for(var v=st(e),y=0;y<v.length;y++)i(u.getData(v[y]),e[v[y]]);l.push(u),ST(u).isBlured=!0}}),a.eachComponent(function(u,c){if(u!=="series"){var f=n.getViewOfComponentModel(c);f&&f.toggleBlurSeries&&f.toggleBlurSeries(l,!0,a)}})}}function c_(r,e,t){if(!(r==null||e==null)){var n=t.getModel().getComponent(r,e);if(n){ST(n).isBlured=!0;var a=t.getViewOfComponentModel(n);!a||!a.focusBlurEnabled||a.group.traverse(function(i){wT(i)})}}}function nU(r,e,t){var n=r.seriesIndex,a=r.getData(e.dataType);if(a){var i=Tl(a,e);i=(le(i)?i[0]:i)||0;var o=a.getItemGraphicEl(i);if(!o)for(var s=a.count(),l=0;!o&&l<s;)o=a.getItemGraphicEl(l++);if(o){var u=je(o);u_(n,u.focus,u.blurScope,t)}else{var c=r.get(["emphasis","focus"]),f=r.get(["emphasis","blurScope"]);c!=null&&u_(n,c,f,t)}}}function CT(r,e,t,n){var a={focusSelf:!1,dispatchers:null};if(r==null||r==="series"||e==null||t==null)return a;var i=n.getModel().getComponent(r,e);if(!i)return a;var o=n.getViewOfComponentModel(i);if(!o||!o.findHighDownDispatchers)return a;for(var s=o.findHighDownDispatchers(t),l,u=0;u<s.length;u++)if(je(s[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:s}}function aU(r,e,t){var n=je(r),a=CT(n.componentMainType,n.componentIndex,n.componentHighDownName,t),i=a.dispatchers,o=a.focusSelf;i?(o&&c_(n.componentMainType,n.componentIndex,t),z(i,function(s){return iI(s,e)})):(u_(n.seriesIndex,n.focus,n.blurScope,t),n.focus==="self"&&c_(n.componentMainType,n.componentIndex,t),iI(r,e))}function iU(r,e,t){jj(t);var n=je(r),a=CT(n.componentMainType,n.componentIndex,n.componentHighDownName,t).dispatchers;a?z(a,function(i){return oI(i,e)}):oI(r,e)}function oU(r,e,t){if(d_(e)){var n=e.dataType,a=r.getData(n),i=Tl(a,e);le(i)||(i=[i]),r[e.type===ly?"toggleSelect":e.type===sy?"select":"unselect"](i,n)}}function sI(r){var e=r.getAllData();z(e,function(t){var n=t.data,a=t.type;n.eachItemGraphicEl(function(i,o){r.isSelected(o,a)?zj(i):Oj(i)})})}function sU(r){var e=[];return r.eachSeries(function(t){var n=t.getAllData();z(n,function(a){a.data;var i=a.type,o=t.getSelectedDataIndices();if(o.length>0){var s={dataIndex:o,seriesIndex:t.seriesIndex};i!=null&&(s.dataType=i),e.push(s)}})}),e}function Yo(r,e,t){cl(r,!0),ro(r,Ml),f_(r,e,t)}function lU(r){cl(r,!1)}function Pt(r,e,t,n){n?lU(r):Yo(r,e,t)}function f_(r,e,t){var n=je(r);e!=null?(n.focus=e,n.blurScope=t):n.focus&&(n.focus=null)}var lI=["emphasis","blur","select"],uU={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function or(r,e,t,n){t=t||"itemStyle";for(var a=0;a<lI.length;a++){var i=lI[a],o=e.getModel([i,t]),s=r.ensureState(i);s.style=n?n(o):o[uU[t]]()}}function cl(r,e){var t=e===!1,n=r;r.highDownSilentOnTouch&&(n.__highDownSilentOnTouch=r.highDownSilentOnTouch),(!t||n.__highDownDispatcher)&&(n.__highByOuter=n.__highByOuter||0,n.__highDownDispatcher=!t)}function nh(r){return!!(r&&r.__highDownDispatcher)}function cU(r,e,t){var n=je(r);n.componentMainType=e.mainType,n.componentIndex=e.componentIndex,n.componentHighDownName=t}function fU(r){var e=nI[r];return e==null&&rI<=32&&(e=nI[r]=rI++),e}function d_(r){var e=r.type;return e===sy||e===l_||e===ly}function uI(r){var e=r.type;return e===yl||e===Ig}function dU(r){var e=Ij(r);e.normalFill=r.style.fill,e.normalStroke=r.style.stroke;var t=r.states.select||{};e.selectFill=t.style&&t.style.fill||null,e.selectStroke=t.style&&t.style.stroke||null}var mu=ii.CMD,hU=[[],[],[]],cI=Math.sqrt,pU=Math.atan2;function Bj(r,e){if(e){var t=r.data,n=r.len(),a,i,o,s,l,u,c=mu.M,f=mu.C,d=mu.L,h=mu.R,v=mu.A,y=mu.Q;for(o=0,s=0;o<n;){switch(a=t[o++],s=o,i=0,a){case c:i=1;break;case d:i=1;break;case f:i=3;break;case y:i=2;break;case v:var m=e[4],x=e[5],_=cI(e[0]*e[0]+e[1]*e[1]),T=cI(e[2]*e[2]+e[3]*e[3]),C=pU(-e[1]/T,e[0]/_);t[o]*=_,t[o++]+=m,t[o]*=T,t[o++]+=x,t[o++]*=_,t[o++]*=T,t[o++]+=C,t[o++]+=C,o+=2,s=o;break;case h:u[0]=t[o++],u[1]=t[o++],Gt(u,u,e),t[s++]=u[0],t[s++]=u[1],u[0]+=t[o++],u[1]+=t[o++],Gt(u,u,e),t[s++]=u[0],t[s++]=u[1]}for(l=0;l<i;l++){var k=hU[l];k[0]=t[o++],k[1]=t[o++],Gt(k,k,e),t[s++]=k[0],t[s++]=k[1]}}r.increaseVersion()}}var L1=Math.sqrt,_v=Math.sin,wv=Math.cos,Bf=Math.PI;function fI(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function h_(r,e){return(r[0]*e[0]+r[1]*e[1])/(fI(r)*fI(e))}function dI(r,e){return(r[0]*e[1]<r[1]*e[0]?-1:1)*Math.acos(h_(r,e))}function hI(r,e,t,n,a,i,o,s,l,u,c){var f=l*(Bf/180),d=wv(f)*(r-t)/2+_v(f)*(e-n)/2,h=-1*_v(f)*(r-t)/2+wv(f)*(e-n)/2,v=d*d/(o*o)+h*h/(s*s);v>1&&(o*=L1(v),s*=L1(v));var y=(a===i?-1:1)*L1((o*o*(s*s)-o*o*(h*h)-s*s*(d*d))/(o*o*(h*h)+s*s*(d*d)))||0,m=y*o*h/s,x=y*-s*d/o,_=(r+t)/2+wv(f)*m-_v(f)*x,T=(e+n)/2+_v(f)*m+wv(f)*x,C=dI([1,0],[(d-m)/o,(h-x)/s]),k=[(d-m)/o,(h-x)/s],A=[(-1*d-m)/o,(-1*h-x)/s],L=dI(k,A);if(h_(k,A)<=-1&&(L=Bf),h_(k,A)>=1&&(L=0),L<0){var D=Math.round(L/Bf*1e6)/1e6;L=Bf*2+D%2*Bf}c.addData(u,_,T,o,s,C,L,f,i)}var vU=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,gU=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function yU(r){var e=new ii;if(!r)return e;var t=0,n=0,a=t,i=n,o,s=ii.CMD,l=r.match(vU);if(!l)return e;for(var u=0;u<l.length;u++){for(var c=l[u],f=c.charAt(0),d=void 0,h=c.match(gU)||[],v=h.length,y=0;y<v;y++)h[y]=parseFloat(h[y]);for(var m=0;m<v;){var x=void 0,_=void 0,T=void 0,C=void 0,k=void 0,A=void 0,L=void 0,D=t,P=n,E=void 0,O=void 0;switch(f){case"l":t+=h[m++],n+=h[m++],d=s.L,e.addData(d,t,n);break;case"L":t=h[m++],n=h[m++],d=s.L,e.addData(d,t,n);break;case"m":t+=h[m++],n+=h[m++],d=s.M,e.addData(d,t,n),a=t,i=n,f="l";break;case"M":t=h[m++],n=h[m++],d=s.M,e.addData(d,t,n),a=t,i=n,f="L";break;case"h":t+=h[m++],d=s.L,e.addData(d,t,n);break;case"H":t=h[m++],d=s.L,e.addData(d,t,n);break;case"v":n+=h[m++],d=s.L,e.addData(d,t,n);break;case"V":n=h[m++],d=s.L,e.addData(d,t,n);break;case"C":d=s.C,e.addData(d,h[m++],h[m++],h[m++],h[m++],h[m++],h[m++]),t=h[m-2],n=h[m-1];break;case"c":d=s.C,e.addData(d,h[m++]+t,h[m++]+n,h[m++]+t,h[m++]+n,h[m++]+t,h[m++]+n),t+=h[m-2],n+=h[m-1];break;case"S":x=t,_=n,E=e.len(),O=e.data,o===s.C&&(x+=t-O[E-4],_+=n-O[E-3]),d=s.C,D=h[m++],P=h[m++],t=h[m++],n=h[m++],e.addData(d,x,_,D,P,t,n);break;case"s":x=t,_=n,E=e.len(),O=e.data,o===s.C&&(x+=t-O[E-4],_+=n-O[E-3]),d=s.C,D=t+h[m++],P=n+h[m++],t+=h[m++],n+=h[m++],e.addData(d,x,_,D,P,t,n);break;case"Q":D=h[m++],P=h[m++],t=h[m++],n=h[m++],d=s.Q,e.addData(d,D,P,t,n);break;case"q":D=h[m++]+t,P=h[m++]+n,t+=h[m++],n+=h[m++],d=s.Q,e.addData(d,D,P,t,n);break;case"T":x=t,_=n,E=e.len(),O=e.data,o===s.Q&&(x+=t-O[E-4],_+=n-O[E-3]),t=h[m++],n=h[m++],d=s.Q,e.addData(d,x,_,t,n);break;case"t":x=t,_=n,E=e.len(),O=e.data,o===s.Q&&(x+=t-O[E-4],_+=n-O[E-3]),t+=h[m++],n+=h[m++],d=s.Q,e.addData(d,x,_,t,n);break;case"A":T=h[m++],C=h[m++],k=h[m++],A=h[m++],L=h[m++],D=t,P=n,t=h[m++],n=h[m++],d=s.A,hI(D,P,t,n,A,L,T,C,k,d,e);break;case"a":T=h[m++],C=h[m++],k=h[m++],A=h[m++],L=h[m++],D=t,P=n,t+=h[m++],n+=h[m++],d=s.A,hI(D,P,t,n,A,L,T,C,k,d,e);break}}(f==="z"||f==="Z")&&(d=s.Z,e.addData(d),t=a,n=i),o=d}return e.toStatic(),e}var Fj=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.applyTransform=function(t){},e})(nt);function Vj(r){return r.setData!=null}function Gj(r,e){var t=yU(r),n=ie({},e);return n.buildPath=function(a){var i=Vj(a);if(i&&a.canSave()){a.appendPath(t);var o=a.getContext();o&&a.rebuildPath(o,1)}else{var o=i?a.getContext():a;o&&t.rebuildPath(o,1)}},n.applyTransform=function(a){Bj(t,a),this.dirtyShape()},n}function Wj(r,e){return new Fj(Gj(r,e))}function mU(r,e){var t=Gj(r,e),n=(function(a){Q(i,a);function i(o){var s=a.call(this,o)||this;return s.applyTransform=t.applyTransform,s.buildPath=t.buildPath,s}return i})(Fj);return n}function xU(r,e){for(var t=[],n=r.length,a=0;a<n;a++){var i=r[a];t.push(i.getUpdatedPathProxy(!0))}var o=new nt(e);return o.createPathProxy(),o.buildPath=function(s){if(Vj(s)){s.appendPath(t);var l=s.getContext();l&&s.rebuildPath(l,1)}},o}function MT(r,e){e=e||{};var t=new nt;return r.shape&&t.setShape(r.shape),t.setStyle(r.style),e.bakeTransform?Bj(t.path,r.getComputedTransform()):e.toLocal?t.setLocalTransform(r.getComputedTransform()):t.copyTransform(r),t.buildPath=r.buildPath,t.applyTransform=t.applyTransform,t.z=r.z,t.z2=r.z2,t.zlevel=r.zlevel,t}var SU=(function(){function r(){this.cx=0,this.cy=0,this.r=0}return r})(),fi=(function(r){Q(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new SU},e.prototype.buildPath=function(t,n){t.moveTo(n.cx+n.r,n.cy),t.arc(n.cx,n.cy,n.r,0,Math.PI*2)},e})(nt);fi.prototype.type="circle";var bU=(function(){function r(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return r})(),Oh=(function(r){Q(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new bU},e.prototype.buildPath=function(t,n){var a=.5522848,i=n.cx,o=n.cy,s=n.rx,l=n.ry,u=s*a,c=l*a;t.moveTo(i-s,o),t.bezierCurveTo(i-s,o-c,i-u,o-l,i,o-l),t.bezierCurveTo(i+u,o-l,i+s,o-c,i+s,o),t.bezierCurveTo(i+s,o+c,i+u,o+l,i,o+l),t.bezierCurveTo(i-u,o+l,i-s,o+c,i-s,o),t.closePath()},e})(nt);Oh.prototype.type="ellipse";var $j=Math.PI,I1=$j*2,Bs=Math.sin,xu=Math.cos,_U=Math.acos,Vr=Math.atan2,pI=Math.abs,Bd=Math.sqrt,md=Math.max,ja=Math.min,ha=1e-4;function wU(r,e,t,n,a,i,o,s){var l=t-r,u=n-e,c=o-a,f=s-i,d=f*l-c*u;if(!(d*d<ha))return d=(c*(e-i)-f*(r-a))/d,[r+d*l,e+d*u]}function Tv(r,e,t,n,a,i,o){var s=r-t,l=e-n,u=(o?i:-i)/Bd(s*s+l*l),c=u*l,f=-u*s,d=r+c,h=e+f,v=t+c,y=n+f,m=(d+v)/2,x=(h+y)/2,_=v-d,T=y-h,C=_*_+T*T,k=a-i,A=d*y-v*h,L=(T<0?-1:1)*Bd(md(0,k*k*C-A*A)),D=(A*T-_*L)/C,P=(-A*_-T*L)/C,E=(A*T+_*L)/C,O=(-A*_+T*L)/C,B=D-m,N=P-x,W=E-m,H=O-x;return B*B+N*N>W*W+H*H&&(D=E,P=O),{cx:D,cy:P,x0:-c,y0:-f,x1:D*(a/k-1),y1:P*(a/k-1)}}function TU(r){var e;if(le(r)){var t=r.length;if(!t)return r;t===1?e=[r[0],r[0],0,0]:t===2?e=[r[0],r[0],r[1],r[1]]:t===3?e=r.concat(r[2]):e=r}else e=[r,r,r,r];return e}function CU(r,e){var t,n=md(e.r,0),a=md(e.r0||0,0),i=n>0,o=a>0;if(!(!i&&!o)){if(i||(n=a,a=0),a>n){var s=n;n=a,a=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var c=e.cx,f=e.cy,d=!!e.clockwise,h=pI(u-l),v=h>I1&&h%I1;if(v>ha&&(h=v),!(n>ha))r.moveTo(c,f);else if(h>I1-ha)r.moveTo(c+n*xu(l),f+n*Bs(l)),r.arc(c,f,n,l,u,!d),a>ha&&(r.moveTo(c+a*xu(u),f+a*Bs(u)),r.arc(c,f,a,u,l,d));else{var y=void 0,m=void 0,x=void 0,_=void 0,T=void 0,C=void 0,k=void 0,A=void 0,L=void 0,D=void 0,P=void 0,E=void 0,O=void 0,B=void 0,N=void 0,W=void 0,H=n*xu(l),$=n*Bs(l),Z=a*xu(u),G=a*Bs(u),X=h>ha;if(X){var K=e.cornerRadius;K&&(t=TU(K),y=t[0],m=t[1],x=t[2],_=t[3]);var V=pI(n-a)/2;if(T=ja(V,x),C=ja(V,_),k=ja(V,y),A=ja(V,m),P=L=md(T,C),E=D=md(k,A),(L>ha||D>ha)&&(O=n*xu(u),B=n*Bs(u),N=a*xu(l),W=a*Bs(l),h<$j)){var U=wU(H,$,N,W,O,B,Z,G);if(U){var ae=H-U[0],ce=$-U[1],re=O-U[0],_e=B-U[1],Ne=1/Bs(_U((ae*re+ce*_e)/(Bd(ae*ae+ce*ce)*Bd(re*re+_e*_e)))/2),ve=Bd(U[0]*U[0]+U[1]*U[1]);P=ja(L,(n-ve)/(Ne+1)),E=ja(D,(a-ve)/(Ne-1))}}}if(!X)r.moveTo(c+H,f+$);else if(P>ha){var fe=ja(x,P),Te=ja(_,P),xe=Tv(N,W,H,$,n,fe,d),Ie=Tv(O,B,Z,G,n,Te,d);r.moveTo(c+xe.cx+xe.x0,f+xe.cy+xe.y0),P<L&&fe===Te?r.arc(c+xe.cx,f+xe.cy,P,Vr(xe.y0,xe.x0),Vr(Ie.y0,Ie.x0),!d):(fe>0&&r.arc(c+xe.cx,f+xe.cy,fe,Vr(xe.y0,xe.x0),Vr(xe.y1,xe.x1),!d),r.arc(c,f,n,Vr(xe.cy+xe.y1,xe.cx+xe.x1),Vr(Ie.cy+Ie.y1,Ie.cx+Ie.x1),!d),Te>0&&r.arc(c+Ie.cx,f+Ie.cy,Te,Vr(Ie.y1,Ie.x1),Vr(Ie.y0,Ie.x0),!d))}else r.moveTo(c+H,f+$),r.arc(c,f,n,l,u,!d);if(!(a>ha)||!X)r.lineTo(c+Z,f+G);else if(E>ha){var fe=ja(y,E),Te=ja(m,E),xe=Tv(Z,G,O,B,a,-Te,d),Ie=Tv(H,$,N,W,a,-fe,d);r.lineTo(c+xe.cx+xe.x0,f+xe.cy+xe.y0),E<D&&fe===Te?r.arc(c+xe.cx,f+xe.cy,E,Vr(xe.y0,xe.x0),Vr(Ie.y0,Ie.x0),!d):(Te>0&&r.arc(c+xe.cx,f+xe.cy,Te,Vr(xe.y0,xe.x0),Vr(xe.y1,xe.x1),!d),r.arc(c,f,a,Vr(xe.cy+xe.y1,xe.cx+xe.x1),Vr(Ie.cy+Ie.y1,Ie.cx+Ie.x1),d),fe>0&&r.arc(c+Ie.cx,f+Ie.cy,fe,Vr(Ie.y1,Ie.x1),Vr(Ie.y0,Ie.x0),!d))}else r.lineTo(c+Z,f+G),r.arc(c,f,a,u,l,d)}r.closePath()}}}var MU=(function(){function r(){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 r})(),Er=(function(r){Q(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new MU},e.prototype.buildPath=function(t,n){CU(t,n)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e})(nt);Er.prototype.type="sector";var kU=(function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r})(),Dc=(function(r){Q(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new kU},e.prototype.buildPath=function(t,n){var a=n.cx,i=n.cy,o=Math.PI*2;t.moveTo(a+n.r,i),t.arc(a,i,n.r,0,o,!1),t.moveTo(a+n.r0,i),t.arc(a,i,n.r0,0,o,!0)},e})(nt);Dc.prototype.type="ring";function AU(r,e,t,n){var a=[],i=[],o=[],s=[],l,u,c,f;if(n){c=[1/0,1/0],f=[-1/0,-1/0];for(var d=0,h=r.length;d<h;d++)zi(c,c,r[d]),Oi(f,f,r[d]);zi(c,c,n[0]),Oi(f,f,n[1])}for(var d=0,h=r.length;d<h;d++){var v=r[d];if(t)l=r[d?d-1:h-1],u=r[(d+1)%h];else if(d===0||d===h-1){a.push(ei(r[d]));continue}else l=r[d-1],u=r[d+1];No(i,u,l),Pd(i,i,e);var y=Xg(v,l),m=Xg(v,u),x=y+m;x!==0&&(y/=x,m/=x),Pd(o,i,-y),Pd(s,i,m);var _=Rb([],v,o),T=Rb([],v,s);n&&(Oi(_,_,c),zi(_,_,f),Oi(T,T,c),zi(T,T,f)),a.push(_),a.push(T)}return t&&a.push(a.shift()),a}function Hj(r,e,t){var n=e.smooth,a=e.points;if(a&&a.length>=2){if(n){var i=AU(a,n,t,e.smoothConstraint);r.moveTo(a[0][0],a[0][1]);for(var o=a.length,s=0;s<(t?o:o-1);s++){var l=i[s*2],u=i[s*2+1],c=a[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{r.moveTo(a[0][0],a[0][1]);for(var s=1,f=a.length;s<f;s++)r.lineTo(a[s][0],a[s][1])}t&&r.closePath()}}var LU=(function(){function r(){this.points=null,this.smooth=0,this.smoothConstraint=null}return r})(),zr=(function(r){Q(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new LU},e.prototype.buildPath=function(t,n){Hj(t,n,!0)},e})(nt);zr.prototype.type="polygon";var IU=(function(){function r(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return r})(),Cr=(function(r){Q(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new IU},e.prototype.buildPath=function(t,n){Hj(t,n,!1)},e})(nt);Cr.prototype.type="polyline";var DU={},PU=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r})(),Zt=(function(r){Q(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new PU},e.prototype.buildPath=function(t,n){var a,i,o,s;if(this.subPixelOptimize){var l=Tm(DU,n,this.style);a=l.x1,i=l.y1,o=l.x2,s=l.y2}else a=n.x1,i=n.y1,o=n.x2,s=n.y2;var u=n.percent;u!==0&&(t.moveTo(a,i),u<1&&(o=a*(1-u)+o*u,s=i*(1-u)+s*u),t.lineTo(o,s))},e.prototype.pointAt=function(t){var n=this.shape;return[n.x1*(1-t)+n.x2*t,n.y1*(1-t)+n.y2*t]},e})(nt);Zt.prototype.type="line";var un=[],RU=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return r})();function vI(r,e,t){var n=r.cpx2,a=r.cpy2;return n!=null||a!=null?[(t?xL:fr)(r.x1,r.cpx1,r.cpx2,r.x2,e),(t?xL:fr)(r.y1,r.cpy1,r.cpy2,r.y2,e)]:[(t?Fb:wr)(r.x1,r.cpx1,r.x2,e),(t?Fb:wr)(r.y1,r.cpy1,r.y2,e)]}var Pc=(function(r){Q(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new RU},e.prototype.buildPath=function(t,n){var a=n.x1,i=n.y1,o=n.x2,s=n.y2,l=n.cpx1,u=n.cpy1,c=n.cpx2,f=n.cpy2,d=n.percent;d!==0&&(t.moveTo(a,i),c==null||f==null?(d<1&&(Kd(a,l,o,d,un),l=un[1],o=un[2],Kd(i,u,s,d,un),u=un[1],s=un[2]),t.quadraticCurveTo(l,u,o,s)):(d<1&&(Jo(a,l,c,o,d,un),l=un[1],c=un[2],o=un[3],Jo(i,u,f,s,d,un),u=un[1],f=un[2],s=un[3]),t.bezierCurveTo(l,u,c,f,o,s)))},e.prototype.pointAt=function(t){return vI(this.shape,t,!1)},e.prototype.tangentAt=function(t){var n=vI(this.shape,t,!0);return El(n,n)},e})(nt);Pc.prototype.type="bezier-curve";var EU=(function(){function r(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r})(),Nh=(function(r){Q(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new EU},e.prototype.buildPath=function(t,n){var a=n.cx,i=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);t.moveTo(c*o+a,f*o+i),t.arc(a,i,o,s,l,!u)},e})(nt);Nh.prototype.type="arc";var jh=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="compound",t}return e.prototype._updatePathDirty=function(){for(var t=this.shape.paths,n=this.shapeChanged(),a=0;a<t.length;a++)n=n||t[a].shapeChanged();n&&this.dirtyShape()},e.prototype.beforeBrush=function(){this._updatePathDirty();for(var t=this.shape.paths||[],n=this.getGlobalScale(),a=0;a<t.length;a++)t[a].path||t[a].createPathProxy(),t[a].path.setScale(n[0],n[1],t[a].segmentIgnoreThreshold)},e.prototype.buildPath=function(t,n){for(var a=n.paths||[],i=0;i<a.length;i++)a[i].buildPath(t,a[i].shape,!0)},e.prototype.afterBrush=function(){for(var t=this.shape.paths||[],n=0;n<t.length;n++)t[n].pathUpdated()},e.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),nt.prototype.getBoundingRect.call(this)},e})(nt),Uj=(function(){function r(e){this.colorStops=e||[]}return r.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},r})(),zl=(function(r){Q(e,r);function e(t,n,a,i,o,s){var l=r.call(this,o)||this;return l.x=t??0,l.y=n??0,l.x2=a??1,l.y2=i??0,l.type="linear",l.global=s||!1,l}return e})(Uj),kT=(function(r){Q(e,r);function e(t,n,a,i,o){var s=r.call(this,i)||this;return s.x=t??.5,s.y=n??.5,s.r=a??.5,s.type="radial",s.global=o||!1,s}return e})(Uj),D1=Math.min,zU=Math.max,Cv=Math.abs,Fs=[0,0],Vs=[0,0],_r=PN(),Mv=_r.minTv,kv=_r.maxTv,Yj=(function(){function r(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new Ee;for(var n=0;n<2;n++)this._axes[n]=new Ee;e&&this.fromBoundingRect(e,t)}return r.prototype.fromBoundingRect=function(e,t){var n=this._corners,a=this._axes,i=e.x,o=e.y,s=i+e.width,l=o+e.height;if(n[0].set(i,o),n[1].set(s,o),n[2].set(s,l),n[3].set(i,l),t)for(var u=0;u<4;u++)n[u].transform(t);Ee.sub(a[0],n[1],n[0]),Ee.sub(a[1],n[3],n[0]),a[0].normalize(),a[1].normalize();for(var u=0;u<2;u++)this._origin[u]=a[u].dot(n[0])},r.prototype.intersect=function(e,t,n){var a=!0,i=!t;return t&&Ee.set(t,0,0),_r.reset(n,!i),!this._intersectCheckOneSide(this,e,i,1)&&(a=!1,i)||!this._intersectCheckOneSide(e,this,i,-1)&&(a=!1,i)||!i&&!_r.negativeSize&&Ee.copy(t,a?_r.useDir?_r.dirMinTv:Mv:kv),a},r.prototype._intersectCheckOneSide=function(e,t,n,a){for(var i=!0,o=0;o<2;o++){var s=e._axes[o];if(e._getProjMinMaxOnAxis(o,e._corners,Fs),e._getProjMinMaxOnAxis(o,t._corners,Vs),_r.negativeSize||Fs[1]<Vs[0]||Fs[0]>Vs[1]){if(i=!1,_r.negativeSize||n)return i;var l=Cv(Vs[0]-Fs[1]),u=Cv(Fs[0]-Vs[1]);D1(l,u)>kv.len()&&(l<u?Ee.scale(kv,s,-l*a):Ee.scale(kv,s,u*a))}else if(!n){var l=Cv(Vs[0]-Fs[1]),u=Cv(Fs[0]-Vs[1]);(_r.useDir||D1(l,u)<Mv.len())&&((l<u||!_r.bidirectional)&&(Ee.scale(Mv,s,l*a),_r.useDir&&_r.calcDirMTV()),(l>=u||!_r.bidirectional)&&(Ee.scale(Mv,s,-u*a),_r.useDir&&_r.calcDirMTV()))}}return i},r.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var a=this._axes[e],i=this._origin,o=t[0].dot(a)+i[e],s=o,l=o,u=1;u<t.length;u++){var c=t[u].dot(a)+i[e];s=D1(c,s),l=zU(c,l)}n[0]=s+_r.touchThreshold,n[1]=l-_r.touchThreshold,_r.negativeSize=n[1]<n[0]},r})(),OU=[],Xj=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return e.prototype.traverse=function(t,n){t.call(n,this)},e.prototype.useStyle=function(){this.style={}},e.prototype.getCursor=function(){return this._cursor},e.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},e.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},e.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},e.prototype.addDisplayable=function(t,n){n?this._temporaryDisplayables.push(t):this._displayables.push(t),this.markRedraw()},e.prototype.addDisplayables=function(t,n){n=n||!1;for(var a=0;a<t.length;a++)this.addDisplayable(t[a],n)},e.prototype.getDisplayables=function(){return this._displayables},e.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},e.prototype.eachPendingDisplayable=function(t){for(var n=this._cursor;n<this._displayables.length;n++)t&&t(this._displayables[n]);for(var n=0;n<this._temporaryDisplayables.length;n++)t&&t(this._temporaryDisplayables[n])},e.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){var n=this._displayables[t];n.parent=this,n.update(),n.parent=null}for(var t=0;t<this._temporaryDisplayables.length;t++){var n=this._temporaryDisplayables[t];n.parent=this,n.update(),n.parent=null}},e.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new ze(1/0,1/0,-1/0,-1/0),n=0;n<this._displayables.length;n++){var a=this._displayables[n],i=a.getBoundingRect().clone();a.needLocalTransform()&&i.applyTransform(a.getLocalTransform(OU)),t.union(i)}this._rect=t}return this._rect},e.prototype.contain=function(t,n){var a=this.transformCoordToLocal(t,n),i=this.getBoundingRect();if(i.contain(a[0],a[1]))for(var o=0;o<this._displayables.length;o++){var s=this._displayables[o];if(s.contain(t,n))return!0}return!1},e})(ea),Zj=et();function Rc(r,e,t,n,a){var i;if(e&&e.ecModel){var o=e.ecModel.getUpdatePayload();i=o&&o.animation}var s=e&&e.isAnimationEnabled(),l=r==="update";if(s){var u=void 0,c=void 0,f=void 0;n?(u=Ce(n.duration,200),c=Ce(n.easing,"cubicOut"),f=0):(u=e.getShallow(l?"animationDurationUpdate":"animationDuration"),c=e.getShallow(l?"animationEasingUpdate":"animationEasing"),f=e.getShallow(l?"animationDelayUpdate":"animationDelay")),i&&(i.duration!=null&&(u=i.duration),i.easing!=null&&(c=i.easing),i.delay!=null&&(f=i.delay)),Me(f)&&(f=f(t,a)),Me(u)&&(u=u(t));var d={duration:u||0,delay:f,easing:c};return d}else return null}function AT(r,e,t,n,a,i,o){var s=!1,l;Me(a)?(o=i,i=a,a=null):Pe(a)&&(i=a.cb,o=a.during,s=a.isFrom,l=a.removeOpt,a=a.dataIndex);var u=r==="leave";u||e.stopAnimation("leave");var c=Rc(r,n,a,u?l||{}:null,n&&n.getAnimationDelayParams?n.getAnimationDelayParams(e,a):null);if(c&&c.duration>0){var f=c.duration,d=c.delay,h=c.easing,v={duration:f,delay:d||0,easing:h,done:i,force:!!i||!!o,setToFinal:!u,scope:r,during:o};s?e.animateFrom(t,v):e.animateTo(t,v)}else e.stopAnimation(),!s&&e.attr(t),o&&o(1),i&&i()}function ct(r,e,t,n,a,i){AT("update",r,e,t,n,a,i)}function It(r,e,t,n,a,i){AT("enter",r,e,t,n,a,i)}function tc(r){if(!r.__zr)return!0;for(var e=0;e<r.animators.length;e++){var t=r.animators[e];if(t.scope==="leave")return!0}return!1}function es(r,e,t,n,a,i){tc(r)||AT("leave",r,e,t,n,a,i)}function gI(r,e,t,n){r.removeTextContent(),r.removeTextGuideLine(),es(r,{style:{opacity:0}},e,t,n)}function Vi(r,e,t){function n(){r.parent&&r.parent.remove(r)}r.isGroup?r.traverse(function(a){a.isGroup||gI(a,e,t,n)}):gI(r,e,t,n)}function ta(r){Zj(r).oldStyle=r.style}function NU(r){return Zj(r).oldStyle}var p_={},Ge=["x","y"],tr=["width","height"];function Kj(r){return nt.extend(r)}var jU=mU;function qj(r,e){return jU(r,e)}function na(r,e){p_[r]=e}function ah(r){if(p_.hasOwnProperty(r))return p_[r]}function dc(r,e,t,n){var a=Wj(r,e);return t&&(n==="center"&&(t=Qj(t,a.getBoundingRect())),IT(a,t)),a}function LT(r,e,t){var n=new gr({style:{image:r,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(a){if(t==="center"){var i={width:a.width,height:a.height};n.setStyle(Qj(e,i))}}});return n}function Qj(r,e){var t=e.width/e.height,n=r.height*t,a;n<=r.width?a=r.height:(n=r.width,a=n/t);var i=r.x+r.width/2,o=r.y+r.height/2;return{x:i-n/2,y:o-a/2,width:n,height:a}}var Cn=xU;function IT(r,e){if(r.applyTransform){var t=r.getBoundingRect(),n=t.calculateTransform(e);r.applyTransform(n)}}function hc(r,e){return Tm(r,r,{lineWidth:e}),r}function BU(r,e){return kj(r,r,e),r}var Dg=Ln;function Xo(r,e){for(var t=Ph([]);r&&r!==e;)Sa(t,r.getLocalTransform(),t),r=r.parent;return t}function _a(r,e,t){return e&&!Pr(e)&&(e=Ni.getLocalTransform(e)),t&&(e=Jn([],e)),Gt([],r,e)}function km(r,e,t){var n=e[4]===0||e[5]===0||e[0]===0?1:Ya(2*e[4]/e[0]),a=e[4]===0||e[5]===0||e[2]===0?1:Ya(2*e[4]/e[2]),i=[r==="left"?-n:r==="right"?n:0,r==="top"?-a:r==="bottom"?a:0];return i=_a(i,e,t),Ya(i[0])>Ya(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function yI(r){return!r.isGroup}function FU(r){return r.shape!=null}function Bh(r,e,t){if(!r||!e)return;function n(o){var s={};return o.traverse(function(l){yI(l)&&l.anid&&(s[l.anid]=l)}),s}function a(o){var s={x:o.x,y:o.y,rotation:o.rotation};return FU(o)&&(s.shape=Ae(o.shape)),s}var i=n(r);e.traverse(function(o){if(yI(o)&&o.anid){var s=i[o.anid];if(s){var l=a(o);o.attr(a(s)),ct(o,l,t,je(o).dataIndex)}}})}function DT(r,e){return ue(r,function(t){var n=t[0];n=Yt(n,e.x),n=In(n,e.x+e.width);var a=t[1];return a=Yt(a,e.y),a=In(a,e.y+e.height),[n,a]})}function Jj(r,e){var t=Yt(r.x,e.x),n=In(r.x+r.width,e.x+e.width),a=Yt(r.y,e.y),i=In(r.y+r.height,e.y+e.height);if(n>=t&&i>=a)return{x:t,y:a,width:n-t,height:i-a}}function Ec(r,e,t){var n=ie({rectHover:!0},e),a=n.style={strokeNoScale:!0};if(t=t||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(a.image=r.slice(8),De(a,t),new gr(n)):dc(r.replace("path://",""),n,t,"center")}function xd(r,e,t,n,a){for(var i=0,o=a[a.length-1];i<a.length;i++){var s=a[i];if(e5(r,e,t,n,s[0],s[1],o[0],o[1]))return!0;o=s}}function e5(r,e,t,n,a,i,o,s){var l=t-r,u=n-e,c=o-a,f=s-i,d=P1(c,f,l,u);if(VU(d))return!1;var h=r-a,v=e-i,y=P1(h,v,l,u)/d;if(y<0||y>1)return!1;var m=P1(h,v,c,f)/d;return!(m<0||m>1)}function P1(r,e,t,n){return r*n-t*e}function VU(r){return r<=1e-6&&r>=-1e-6}function kl(r,e,t,n,a){return e==null||(ut(e)?Et[0]=Et[1]=Et[2]=Et[3]=e:(Et[0]=e[0],Et[1]=e[1],Et[2]=e[2],Et[3]=e[3]),n&&(Et[0]=Yt(0,Et[0]),Et[1]=Yt(0,Et[1]),Et[2]=Yt(0,Et[2]),Et[3]=Yt(0,Et[3])),t&&(Et[0]=-Et[0],Et[1]=-Et[1],Et[2]=-Et[2],Et[3]=-Et[3]),mI(r,Et,"x","width",3,1,a&&a[0]||0),mI(r,Et,"y","height",0,2,a&&a[1]||0)),r}var Et=[0,0,0,0];function mI(r,e,t,n,a,i,o){var s=e[i]+e[a],l=r[n];r[n]+=s,o=Yt(0,In(o,l)),r[n]<o?(r[n]=o,r[t]+=e[a]>=0?-e[a]:e[i]>=0?l+e[i]:Ya(s)>1e-8?(l-o)*e[a]/s:0):r[t]-=e[a]}function no(r){var e=r.itemTooltipOption,t=r.componentModel,n=r.itemName,a=pe(e)?{formatter:e}:e,i=t.mainType,o=t.componentIndex,s={componentType:i,name:n,$vars:["name"]};s[i+"Index"]=o;var l=r.formatterParamsExtra;l&&z(st(l),function(c){Se(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=je(r.el);u.componentMainType=i,u.componentIndex=o,u.tooltipConfig={name:n,option:De({content:n,encodeHTMLContent:!0,formatterParams:s},a)}}function v_(r,e){var t;r.isGroup&&(t=e(r)),t||r.traverse(e)}function ls(r,e){if(r)if(le(r))for(var t=0;t<r.length;t++)v_(r[t],e);else v_(r,e)}function PT(r){return!r||Ya(r[1])<Av&&Ya(r[2])<Av||Ya(r[0])<Av&&Ya(r[3])<Av}var Av=1e-5;function ih(r,e){return r?ze.copy(r,e):e.clone()}function RT(r,e){return e?Rh(r||hr(),e):void 0}function Al(r){return{z:r.get("z")||0,zlevel:r.get("zlevel")||0}}function t5(r){var e=-1/0,t=1/0;v_(r,function(i){n(i),n(i.getTextContent()),n(i.getTextGuideLine())});function n(i){if(!(!i||i.isGroup)){var o=i.currentStates;if(o.length)for(var s=0;s<o.length;s++)a(i.states[o[s]]);a(i)}}function a(i){if(i){var o=i.z2;o>e&&(e=o),o<t&&(t=o)}}return t>e&&(t=e=0),{min:t,max:e}}function Am(r,e,t){r5(r,e,t,-1/0)}function r5(r,e,t,n){if(r.ignoreModelZ)return n;var a=r.getTextContent(),i=r.getTextGuideLine(),o=r.isGroup;if(o)for(var s=r.childrenRef(),l=0;l<s.length;l++)n=Yt(r5(s[l],e,t,n),n);else r.z=e,r.zlevel=t,n=Yt(r.z2||0,n);if(a&&(a.z=e,a.zlevel=t,isFinite(n)&&(a.z2=n+2)),i){var u=r.textGuideLineConfig;i.z=e,i.zlevel=t,isFinite(n)&&(i.z2=n+(u&&u.showAbove?1:-1))}return n}na("circle",fi);na("ellipse",Oh);na("sector",Er);na("ring",Dc);na("polygon",zr);na("polyline",Cr);na("rect",Qe);na("line",Zt);na("bezierCurve",Pc);na("arc",Nh);const Ol=Object.freeze(Object.defineProperty({__proto__:null,Arc:Nh,BezierCurve:Pc,BoundingRect:ze,Circle:fi,CompoundPath:jh,Ellipse:Oh,Group:Le,Image:gr,IncrementalDisplayable:Xj,Line:Zt,LinearGradient:zl,OrientedBoundingRect:Yj,Path:nt,Point:Ee,Polygon:zr,Polyline:Cr,RadialGradient:kT,Rect:Qe,Ring:Dc,Sector:Er,Text:lt,WH:tr,XY:Ge,applyTransform:_a,calcZ2Range:t5,clipPointsByRect:DT,clipRectByRect:Jj,createIcon:Ec,ensureCopyRect:ih,ensureCopyTransform:RT,expandOrShrinkRect:kl,extendPath:qj,extendShape:Kj,getShapeClass:ah,getTransform:Xo,groupTransition:Bh,initProps:It,isBoundingRectAxisAligned:PT,isElementRemoved:tc,lineLineIntersect:e5,linePolygonIntersect:xd,makeImage:LT,makePath:dc,mergePath:Cn,registerShape:na,removeElement:es,removeElementWithFadeOut:Vi,resizePath:IT,retrieveZInfo:Al,setTooltipConfig:no,subPixelOptimize:Dg,subPixelOptimizeLine:hc,subPixelOptimizeRect:BU,transformDirection:km,traverseElements:ls,traverseUpdateZ:Am,updateProps:ct},Symbol.toStringTag,{value:"Module"}));var Lm={};function n5(r,e){for(var t=0;t<tn.length;t++){var n=tn[t],a=e[n],i=r.ensureState(n);i.style=i.style||{},i.style.text=a}var o=r.currentStates.slice();r.clearStates(!0),r.setStyle({text:e.normal}),r.useStates(o,!0)}function g_(r,e,t){var n=r.labelFetcher,a=r.labelDataIndex,i=r.labelDimIndex,o=e.normal,s;n&&(s=n.getFormattedLabel(a,"normal",null,i,o&&o.get("formatter"),t!=null?{interpolatedValue:t}:null)),s==null&&(s=Me(r.defaultText)?r.defaultText(a,r,t):r.defaultText);for(var l={normal:s},u=0;u<tn.length;u++){var c=tn[u],f=e[c];l[c]=Ce(n?n.getFormattedLabel(a,c,null,i,f&&f.get("formatter")):null,s)}return l}function vr(r,e,t,n){t=t||Lm;for(var a=r instanceof lt,i=!1,o=0;o<rh.length;o++){var s=e[rh[o]];if(s&&s.getShallow("show")){i=!0;break}}var l=a?r:r.getTextContent();if(i){a||(l||(l=new lt,r.setTextContent(l)),r.stateProxy&&(l.stateProxy=r.stateProxy));var u=g_(t,e),c=e.normal,f=!!c.getShallow("show"),d=wt(c,n&&n.normal,t,!1,!a);d.text=u.normal,a||r.setTextConfig(cy(c,t,!1));for(var o=0;o<tn.length;o++){var h=tn[o],s=e[h];if(s){var v=l.ensureState(h),y=!!Ce(s.getShallow("show"),f);if(y!==f&&(v.ignore=!y),v.style=wt(s,n&&n[h],t,!0,!a),v.style.text=u[h],!a){var m=r.ensureState(h);m.textConfig=cy(s,t,!0)}}}l.silent=!!c.getShallow("silent"),l.style.x!=null&&(d.x=l.style.x),l.style.y!=null&&(d.y=l.style.y),l.ignore=!f,l.useStyle(d),l.dirty(),t.enableTextSetter&&(zc(l).setLabelText=function(x){var _=g_(t,e,x);n5(l,_)})}else l&&(l.ignore=!0);r.dirty()}function sr(r,e){e=e||"label";for(var t={normal:r.getModel(e)},n=0;n<tn.length;n++){var a=tn[n];t[a]=r.getModel([a,e])}return t}function wt(r,e,t,n,a){var i={};return GU(i,r,t,n,a),e&&ie(i,e),i}function cy(r,e,t){e=e||{};var n={},a,i=r.getShallow("rotate"),o=Ce(r.getShallow("distance"),t?null:5),s=r.getShallow("offset");return a=r.getShallow("position")||(t?null:"inside"),a==="outside"&&(a=e.defaultOutsidePosition||"top"),a!=null&&(n.position=a),s!=null&&(n.offset=s),i!=null&&(i*=Math.PI/180,n.rotation=i),o!=null&&(n.distance=o),n.outsideFill=r.get("color")==="inherit"?e.inheritColor||null:"auto",e.autoOverflowArea!=null&&(n.autoOverflowArea=e.autoOverflowArea),e.layoutRect!=null&&(n.layoutRect=e.layoutRect),n}function GU(r,e,t,n,a){t=t||Lm;var i=e.ecModel,o=i&&i.option.textStyle,s=WU(e),l;if(s){l={};var u="richInheritPlainLabel",c=Ce(e.get(u),i?i.get(u):void 0);for(var f in s)if(s.hasOwnProperty(f)){var d=e.getModel(["rich",f]);_I(l[f]={},d,o,e,c,t,n,a,!1,!0)}}l&&(r.rich=l);var h=e.get("overflow");h&&(r.overflow=h);var v=e.get("lineOverflow");v&&(r.lineOverflow=v);var y=r,m=e.get("minMargin");if(m!=null)m=ut(m)?m/2:0,y.margin=[m,m,m,m],y.__marginType=Yu.minMargin;else{var x=e.get("textMargin");x!=null&&(y.margin=Ih(x),y.__marginType=Yu.textMargin)}_I(r,e,o,null,null,t,n,a,!0,!1)}function WU(r){for(var e;r&&r!==r.ecModel;){var t=(r.option||Lm).rich;if(t){e=e||{};for(var n=st(t),a=0;a<n.length;a++){var i=n[a];e[i]=1}}r=r.parentModel}return e}var xI=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],SI=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],bI=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function _I(r,e,t,n,a,i,o,s,l,u){t=!o&&t||Lm;var c=i&&i.inheritColor,f=e.getShallow("color"),d=e.getShallow("textBorderColor"),h=Ce(e.getShallow("opacity"),t.opacity);(f==="inherit"||f==="auto")&&(c?f=c:f=null),(d==="inherit"||d==="auto")&&(c?d=c:d=null),s||(f=f||t.color,d=d||t.textBorderColor),f!=null&&(r.fill=f),d!=null&&(r.stroke=d);var v=Ce(e.getShallow("textBorderWidth"),t.textBorderWidth);v!=null&&(r.lineWidth=v);var y=Ce(e.getShallow("textBorderType"),t.textBorderType);y!=null&&(r.lineDash=y);var m=Ce(e.getShallow("textBorderDashOffset"),t.textBorderDashOffset);m!=null&&(r.lineDashOffset=m),!o&&h==null&&!u&&(h=i&&i.defaultOpacity),h!=null&&(r.opacity=h),!o&&!s&&r.fill==null&&i.inheritColor&&(r.fill=i.inheritColor);for(var x=0;x<xI.length;x++){var _=xI[x],T=a!==!1&&n?hn(e.getShallow(_),n.getShallow(_),t[_]):Ce(e.getShallow(_),t[_]);T!=null&&(r[_]=T)}for(var x=0;x<SI.length;x++){var _=SI[x],T=e.getShallow(_);T!=null&&(r[_]=T)}if(r.verticalAlign==null){var C=e.getShallow("baseline");C!=null&&(r.verticalAlign=C)}if(!l||!i.disableBox){for(var x=0;x<bI.length;x++){var _=bI[x],T=e.getShallow(_);T!=null&&(r[_]=T)}var k=e.getShallow("borderType");k!=null&&(r.borderDash=k),(r.backgroundColor==="auto"||r.backgroundColor==="inherit")&&c&&(r.backgroundColor=c),(r.borderColor==="auto"||r.borderColor==="inherit")&&c&&(r.borderColor=c)}}function ET(r,e){var t=e&&e.getModel("textStyle");return Mn([r.fontStyle||t&&t.getShallow("fontStyle")||"",r.fontWeight||t&&t.getShallow("fontWeight")||"",(r.fontSize||t&&t.getShallow("fontSize")||12)+"px",r.fontFamily||t&&t.getShallow("fontFamily")||"sans-serif"].join(" "))}var zc=et();function a5(r,e,t,n){if(r){var a=zc(r);a.prevValue=a.value,a.value=t;var i=e.normal;a.valueAnimation=i.get("valueAnimation"),a.valueAnimation&&(a.precision=i.get("precision"),a.defaultInterpolatedText=n,a.statesModels=e)}}function i5(r,e,t,n,a){var i=zc(r);if(!i.valueAnimation||i.prevValue===i.value)return;var o=i.defaultInterpolatedText,s=Ce(i.interpolatedValue,i.prevValue),l=i.value;function u(c){var f=yj(t,i.precision,s,l,c);i.interpolatedValue=c===1?null:f;var d=g_({labelDataIndex:e,labelFetcher:a,defaultText:o?o(f):f+""},i.statesModels,f);n5(r,d)}r.percent=0,(i.prevValue==null?It:ct)(r,{percent:1},n,e,null,u)}var Yu={minMargin:1,textMargin:2},$U=["textStyle","color"],R1=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],E1=new lt,HU=(function(){function r(){}return r.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get($U):null)},r.prototype.getFont=function(){return ET({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},r.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<R1.length;n++)t[R1[n]]=this.getShallow(R1[n]);return E1.useStyle(t),E1.update(),E1.getBoundingRect()},r})(),o5=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],UU=Cl(o5),YU=(function(){function r(){}return r.prototype.getLineStyle=function(e){return UU(this,e)},r})(),s5=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],XU=Cl(s5),ZU=(function(){function r(){}return r.prototype.getItemStyle=function(e,t){return XU(this,e,t)},r})(),rt=(function(){function r(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return r.prototype.init=function(e,t,n){},r.prototype.mergeOption=function(e,t){Ye(this.option,e,!0)},r.prototype.get=function(e,t){return e==null?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},r.prototype.getShallow=function(e,t){var n=this.option,a=n==null?n:n[e];if(a==null&&!t){var i=this.parentModel;i&&(a=i.getShallow(e))}return a},r.prototype.getModel=function(e,t){var n=e!=null,a=n?this.parsePath(e):null,i=n?this._doGet(a):this.option;return t=t||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(a)),new r(i,t,this.ecModel)},r.prototype.isEmpty=function(){return this.option==null},r.prototype.restoreData=function(){},r.prototype.clone=function(){var e=this.constructor;return new e(Ae(this.option))},r.prototype.parsePath=function(e){return typeof e=="string"?e.split("."):e},r.prototype.resolveParentPath=function(e){return e},r.prototype.isAnimationEnabled=function(){if(!ot.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},r.prototype._doGet=function(e,t){var n=this.option;if(!e)return n;for(var a=0;a<e.length&&!(e[a]&&(n=n&&typeof n=="object"?n[e[a]]:null,n==null));a++);return n==null&&t&&(n=t._doGet(this.resolveParentPath(e),t.parentModel)),n},r})();yT(rt);o9(rt);Wt(rt,YU);Wt(rt,ZU);Wt(rt,f9);Wt(rt,HU);var KU=Math.round(Math.random()*10);function Oc(r){return[r||"",KU++].join("_")}function qU(r){var e={};r.registerSubTypeDefaulter=function(t,n){var a=Xa(t);e[a.main]=n},r.determineSubType=function(t,n){var a=n.type;if(!a){var i=Xa(t).main;r.hasSubTypes(t)&&e[i]&&(a=e[i](n))}return a}}function QU(r,e){r.topologicalTravel=function(i,o,s,l){if(!i.length)return;var u=t(o),c=u.graph,f=u.noEntryList,d={};for(z(i,function(_){d[_]=!0});f.length;){var h=f.pop(),v=c[h],y=!!d[h];y&&(s.call(l,h,v.originalDeps.slice()),delete d[h]),z(v.successor,y?x:m)}z(d,function(){var _="";throw new Error(_)});function m(_){c[_].entryCount--,c[_].entryCount===0&&f.push(_)}function x(_){d[_]=!0,m(_)}};function t(i){var o={},s=[];return z(i,function(l){var u=n(o,l),c=u.originalDeps=e(l),f=a(c,i);u.entryCount=f.length,u.entryCount===0&&s.push(l),z(f,function(d){Ue(u.predecessor,d)<0&&u.predecessor.push(d);var h=n(o,d);Ue(h.successor,d)<0&&h.successor.push(l)})}),{graph:o,noEntryList:s}}function n(i,o){return i[o]||(i[o]={predecessor:[],successor:[]}),i[o]}function a(i,o){var s=[];return z(i,function(l){Ue(o,l)>=0&&s.push(l)}),s}}function us(r,e){return Ye(Ye({},r,!0),e,!0)}const JU={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:". "}}}},eY={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 fy="ZH",zT="EN",rc=zT,Pg={},OT={},l5=ot.domSupported?(function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||rc).toUpperCase();return r.indexOf(fy)>-1?fy:rc})():rc;function NT(r,e){r=r.toUpperCase(),OT[r]=new rt(e),Pg[r]=e}function tY(r){if(pe(r)){var e=Pg[r.toUpperCase()]||{};return r===fy||r===zT?Ae(e):Ye(Ae(e),Ae(Pg[rc]),!1)}else return Ye(Ae(r),Ae(Pg[rc]),!1)}function y_(r){return OT[r]}function rY(){return OT[rc]}NT(zT,JU);NT(fy,eY);var m_=null;function nY(r){m_||(m_=r)}function er(){return m_}var jT=1e3,BT=jT*60,Fd=BT*60,Zn=Fd*24,wI=Zn*365,aY={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})/},Rg={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},iY="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",Lv="{yyyy}-{MM}-{dd}",TI={year:"{yyyy}",month:"{yyyy}-{MM}",day:Lv,hour:Lv+" "+Rg.hour,minute:Lv+" "+Rg.minute,second:Lv+" "+Rg.second,millisecond:iY},_n=["year","month","day","hour","minute","second","millisecond"],oY=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function sY(r){return!pe(r)&&!Me(r)?lY(r):r}function lY(r){r=r||{};var e={},t=!0;return z(_n,function(n){t&&(t=r[n]==null)}),z(_n,function(n,a){var i=r[n];e[n]={};for(var o=null,s=a;s>=0;s--){var l=_n[s],u=Pe(i)&&!le(i)?i[l]:i,c=void 0;le(u)?(c=u.slice(),o=c[0]||""):pe(u)?(o=u,c=[o]):(o==null?o=Rg[n]:aY[l].test(o)||(o=e[l][l][0]+" "+o),c=[o],t&&(c[1]="{primary|"+o+"}")),e[n][l]=c}}),e}function qr(r,e){return r+="","0000".substr(0,e-r.length)+r}function Vd(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function uY(r){return r===Vd(r)}function cY(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Fh(r,e,t,n){var a=ci(r),i=a[u5(t)](),o=a[FT(t)]()+1,s=Math.floor((o-1)/3)+1,l=a[VT(t)](),u=a["get"+(t?"UTC":"")+"Day"](),c=a[GT(t)](),f=(c-1)%12+1,d=a[WT(t)](),h=a[$T(t)](),v=a[HT(t)](),y=c>=12?"pm":"am",m=y.toUpperCase(),x=n instanceof rt?n:y_(n||l5)||rY(),_=x.getModel("time"),T=_.get("month"),C=_.get("monthAbbr"),k=_.get("dayOfWeek"),A=_.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,y+"").replace(/{A}/g,m+"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,qr(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,T[o-1]).replace(/{MMM}/g,C[o-1]).replace(/{MM}/g,qr(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,qr(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,k[u]).replace(/{ee}/g,A[u]).replace(/{e}/g,u+"").replace(/{HH}/g,qr(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,qr(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,qr(d,2)).replace(/{m}/g,d+"").replace(/{ss}/g,qr(h,2)).replace(/{s}/g,h+"").replace(/{SSS}/g,qr(v,3)).replace(/{S}/g,v+"")}function fY(r,e,t,n,a){var i=null;if(pe(t))i=t;else if(Me(t)){var o={time:r.time,level:r.time.level},s=er();s&&s.makeAxisLabelFormatterParamBreak(o,r.break),i=t(r.value,e,o)}else{var l=r.time;if(l){var u=t[l.lowerTimeUnit][l.upperTimeUnit];i=u[Math.min(l.level,u.length-1)]||""}else{var c=Xu(r.value,a);i=t[c][c][0]}}return Fh(new Date(r.value),i,a,n)}function Xu(r,e){var t=ci(r),n=t[FT(e)]()+1,a=t[VT(e)](),i=t[GT(e)](),o=t[WT(e)](),s=t[$T(e)](),l=t[HT(e)](),u=l===0,c=u&&s===0,f=c&&o===0,d=f&&i===0,h=d&&a===1,v=h&&n===1;return v?"year":h?"month":d?"day":f?"hour":c?"minute":u?"second":"millisecond"}function dy(r,e,t){switch(e){case"year":r[c5(t)](0);case"month":r[f5(t)](1);case"day":r[d5(t)](0);case"hour":r[h5(t)](0);case"minute":r[p5(t)](0);case"second":r[v5(t)](0)}return r}function u5(r){return r?"getUTCFullYear":"getFullYear"}function FT(r){return r?"getUTCMonth":"getMonth"}function VT(r){return r?"getUTCDate":"getDate"}function GT(r){return r?"getUTCHours":"getHours"}function WT(r){return r?"getUTCMinutes":"getMinutes"}function $T(r){return r?"getUTCSeconds":"getSeconds"}function HT(r){return r?"getUTCMilliseconds":"getMilliseconds"}function dY(r){return r?"setUTCFullYear":"setFullYear"}function c5(r){return r?"setUTCMonth":"setMonth"}function f5(r){return r?"setUTCDate":"setDate"}function d5(r){return r?"setUTCHours":"setHours"}function h5(r){return r?"setUTCMinutes":"setMinutes"}function p5(r){return r?"setUTCSeconds":"setSeconds"}function v5(r){return r?"setUTCMilliseconds":"setMilliseconds"}function hY(r,e,t,n,a,i,o,s){var l=new lt({style:{text:r,font:e,align:t,verticalAlign:n,padding:a,rich:i,overflow:o?"truncate":null,lineHeight:s}});return l.getBoundingRect()}function UT(r){if(!pT(r))return pe(r)?r:"-";var e=(r+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function YT(r,e){return r=(r||"").toLowerCase().replace(/-(.)/g,function(t,n){return n.toUpperCase()}),e&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var Nc=Ih;function x_(r,e,t){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function a(c){return c&&Mn(c)?c:"-"}function i(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=e==="time",s=r instanceof Date;if(o||s){var l=o?ci(r):r;if(isNaN(+l)){if(s)return"-"}else return Fh(l,n,t)}if(e==="ordinal")return Ug(r)?a(r):ut(r)&&i(r)?r+"":"-";var u=ai(r);return i(u)?UT(u):Ug(r)?a(r):typeof r=="boolean"?r+"":"-"}var CI=["a","b","c","d","e","f","g"],z1=function(r,e){return"{"+r+(e??"")+"}"};function XT(r,e,t){le(e)||(e=[e]);var n=e.length;if(!n)return"";for(var a=e[0].$vars||[],i=0;i<a.length;i++){var o=CI[i];r=r.replace(z1(o),z1(o,0))}for(var s=0;s<n;s++)for(var l=0;l<a.length;l++){var u=e[s][a[l]];r=r.replace(z1(CI[l],s),t?$r(u):u)}return r}function pY(r,e,t){return z(e,function(n,a){r=r.replace("{"+a+"}",n)}),r}function g5(r,e){var t=pe(r)?{color:r,extraCssText:e}:r||{},n=t.color,a=t.type;e=t.extraCssText;var i=t.renderMode||"html";if(!n)return"";if(i==="html")return a==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+$r(n)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+$r(n)+";"+(e||"")+'"></span>';var o=t.markerId||"markerX";return{renderMode:i,content:"{"+o+"|} ",style:a==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function vY(r,e,t){(r==="week"||r==="month"||r==="quarter"||r==="half-year"||r==="year")&&(r=`MM-dd
|
|
30
|
+
yyyy`);var n=ci(e),a=t?"getUTC":"get",i=n[a+"FullYear"](),o=n[a+"Month"]()+1,s=n[a+"Date"](),l=n[a+"Hours"](),u=n[a+"Minutes"](),c=n[a+"Seconds"](),f=n[a+"Milliseconds"]();return r=r.replace("MM",qr(o,2)).replace("M",o).replace("yyyy",i).replace("yy",qr(i%100+"",2)).replace("dd",qr(s,2)).replace("d",s).replace("hh",qr(l,2)).replace("h",l).replace("mm",qr(u,2)).replace("m",u).replace("ss",qr(c,2)).replace("s",c).replace("SSS",qr(f,3)),r}function gY(r){return r&&r.charAt(0).toUpperCase()+r.substr(1)}function Ll(r,e){return e=e||"transparent",pe(r)?r:Pe(r)&&r.colorStops&&(r.colorStops[0]||{}).color||e}function hy(r,e){if(e==="_blank"||e==="blank"){var t=window.open();t.opener=null,t.location.href=r}else window.open(r,e)}var Eg={},O1={},jc=(function(){function r(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return r.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(Eg),this._normalMasterList=n(O1);function n(a,i){var o=[];return z(a,function(s,l){var u=s.create(e,t);o=o.concat(u||[])}),o}},r.prototype.update=function(e,t){z(this._normalMasterList,function(n){n.update&&n.update(e,t)})},r.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},r.register=function(e,t){if(e==="matrix"||e==="calendar"){Eg[e]=t;return}O1[e]=t},r.get=function(e){return O1[e]||Eg[e]},r})();function yY(r){return!!Eg[r]}var S_={coord:1,coord2:2};function mY(r){y5.set(r.fullType,{getCoord2:void 0}).getCoord2=r.getCoord2}var y5=we();function xY(r){var e=r.getShallow("coord",!0),t=S_.coord;if(e==null){var n=y5.get(r.type);n&&n.getCoord2&&(t=S_.coord2,e=n.getCoord2(r))}return{coord:e,from:t}}var Ha={none:0,dataCoordSys:1,boxCoordSys:2};function m5(r,e){var t=r.getShallow("coordinateSystem"),n=r.getShallow("coordinateSystemUsage",!0),a=Ha.none;if(t){var i=r.mainType==="series";n==null&&(n=i?"data":"box"),n==="data"?(a=Ha.dataCoordSys,i||(a=Ha.none)):n==="box"&&(a=Ha.boxCoordSys,!i&&!yY(t)&&(a=Ha.none))}return{coordSysType:t,kind:a}}function Vh(r){var e=r.targetModel,t=r.coordSysType,n=r.coordSysProvider,a=r.isDefaultDataCoordSys;r.allowNotFound;var i=m5(e),o=i.kind,s=i.coordSysType;if(a&&o!==Ha.dataCoordSys&&(o=Ha.dataCoordSys,s=t),o===Ha.none||s!==t)return!1;var l=n(t,e);return l?(o===Ha.dataCoordSys?e.coordinateSystem=l:e.boxCoordinateSystem=l,!0):!1}var x5=function(r,e){var t=e.getReferringComponents(r,jt).models[0];return t&&t.coordinateSystem},zg=z,S5=["left","right","top","bottom","width","height"],fl=[["width","left","right"],["height","top","bottom"]];function ZT(r,e,t,n,a){var i=0,o=0;n==null&&(n=1/0),a==null&&(a=1/0);var s=0;e.eachChild(function(l,u){var c=l.getBoundingRect(),f=e.childAt(u+1),d=f&&f.getBoundingRect(),h,v;if(r==="horizontal"){var y=c.width+(d?-d.x+c.x:0);h=i+y,h>n||l.newline?(i=0,h=y,o+=s+t,s=c.height):s=Math.max(s,c.height)}else{var m=c.height+(d?-d.y+c.y:0);v=o+m,v>a||l.newline?(i+=s+t,o=0,v=m,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=i,l.y=o,l.markRedraw(),r==="horizontal"?i=h+t:o=v+t)})}var ml=ZT;$e(ZT,"vertical");$e(ZT,"horizontal");function b5(r,e){return{left:r.getShallow("left",e),top:r.getShallow("top",e),right:r.getShallow("right",e),bottom:r.getShallow("bottom",e),width:r.getShallow("width",e),height:r.getShallow("height",e)}}function SY(r,e){var t=lr(r,e,{enableLayoutOnlyByCenter:!0}),n=r.getBoxLayoutParams(),a,i;if(t.type===Sd.point)i=t.refPoint,a=Dt(n,{width:e.getWidth(),height:e.getHeight()});else{var o=r.get("center"),s=le(o)?o:[o,o];a=Dt(n,t.refContainer),i=t.boxCoordFrom===S_.coord2?t.refPoint:[he(s[0],a.width)+a.x,he(s[1],a.height)+a.y]}return{viewRect:a,center:i}}function _5(r,e){var t=SY(r,e),n=t.viewRect,a=t.center,i=r.get("radius");le(i)||(i=[0,i]);var o=he(n.width,e.getWidth()),s=he(n.height,e.getHeight()),l=Math.min(o,s),u=he(i[0],l/2),c=he(i[1],l/2);return{cx:a[0],cy:a[1],r0:u,r:c,viewRect:n}}function Dt(r,e,t){t=Nc(t||0);var n=e.width,a=e.height,i=he(r.left,n),o=he(r.top,a),s=he(r.right,n),l=he(r.bottom,a),u=he(r.width,n),c=he(r.height,a),f=t[2]+t[0],d=t[1]+t[3],h=r.aspect;switch(isNaN(u)&&(u=n-s-d-i),isNaN(c)&&(c=a-l-f-o),h!=null&&(isNaN(u)&&isNaN(c)&&(h>n/a?u=n*.8:c=a*.8),isNaN(u)&&(u=h*c),isNaN(c)&&(c=u/h)),isNaN(i)&&(i=n-s-u-d),isNaN(o)&&(o=a-l-c-f),r.left||r.right){case"center":i=n/2-u/2-t[3];break;case"right":i=n-u-d;break}switch(r.top||r.bottom){case"middle":case"center":o=a/2-c/2-t[0];break;case"bottom":o=a-c-f;break}i=i||0,o=o||0,isNaN(u)&&(u=n-d-i-(s||0)),isNaN(c)&&(c=a-f-o-(l||0));var v=new ze((e.x||0)+i+t[3],(e.y||0)+o+t[0],u,c);return v.margin=t,v}function w5(r,e,t){var n=r.getShallow("preserveAspect",!0);if(!n)return e;var a=e.width/e.height;if(Math.abs(Math.atan(t)-Math.atan(a))<1e-9)return e;var i=r.getShallow("preserveAspectAlign",!0),o=r.getShallow("preserveAspectVerticalAlign",!0),s={width:e.width,height:e.height},l=n==="cover";return a>t&&!l||a<t&&l?(s.width=e.height*t,i==="left"?s.left=0:i==="right"?s.right=0:s.left="center"):(s.height=e.width/t,o==="top"?s.top=0:o==="bottom"?s.bottom=0:s.top="middle"),Dt(s,e)}var Sd={rect:1,point:2};function lr(r,e,t){var n,a,i,o=r.boxCoordinateSystem,s;if(o){var l=xY(r),u=l.coord,c=l.from;if(o.dataToLayout){i=Sd.rect,s=c;var f=o.dataToLayout(u);n=f.contentRect||f.rect}else t&&t.enableLayoutOnlyByCenter&&o.dataToPoint&&(i=Sd.point,s=c,a=o.dataToPoint(u))}return i==null&&(i=Sd.rect),i===Sd.rect&&(n||(n={x:0,y:0,width:e.getWidth(),height:e.getHeight()}),a=[n.x+n.width/2,n.y+n.height/2]),{type:i,refContainer:n,refPoint:a,boxCoordFrom:s}}function Im(r,e,t,n,a,i){var o=!a||!a.hv||a.hv[0],s=!a||!a.hv||a.hv[1],l=a&&a.boundingMode||"all";if(i=i||r,i.x=r.x,i.y=r.y,!o&&!s)return!1;var u;if(l==="raw")u=r.type==="group"?new ze(0,0,+e.width||0,+e.height||0):r.getBoundingRect();else if(u=r.getBoundingRect(),r.needLocalTransform()){var c=r.getLocalTransform();u=u.clone(),u.applyTransform(c)}var f=Dt(De({width:u.width,height:u.height},e),t,n),d=o?f.x-u.x:0,h=s?f.y-u.y:0;return l==="raw"?(i.x=d,i.y=h):(i.x+=d,i.y+=h),i===r&&r.markRedraw(),!0}function bY(r,e){return r[fl[e][0]]!=null||r[fl[e][1]]!=null&&r[fl[e][2]]!=null}function oh(r){var e=r.layoutMode||r.constructor.layoutMode;return Pe(e)?e:e?{type:e}:null}function oi(r,e,t){var n=t&&t.ignoreSize;!le(n)&&(n=[n,n]);var a=o(fl[0],0),i=o(fl[1],1);l(fl[0],r,a),l(fl[1],r,i);function o(u,c){var f={},d=0,h={},v=0,y=2;if(zg(u,function(_){h[_]=r[_]}),zg(u,function(_){Se(e,_)&&(f[_]=h[_]=e[_]),s(f,_)&&d++,s(h,_)&&v++}),n[c])return s(e,u[1])?h[u[2]]=null:s(e,u[2])&&(h[u[1]]=null),h;if(v===y||!d)return h;if(d>=y)return f;for(var m=0;m<u.length;m++){var x=u[m];if(!Se(f,x)&&Se(r,x)){f[x]=r[x];break}}return f}function s(u,c){return u[c]!=null&&u[c]!=="auto"}function l(u,c,f){zg(u,function(d){c[d]=f[d]})}}function Nl(r){return T5({},r)}function T5(r,e){return e&&r&&zg(S5,function(t){Se(e,t)&&(r[t]=e[t])}),r}var _Y=et(),Je=(function(r){Q(e,r);function e(t,n,a){var i=r.call(this,t,n,a)||this;return i.uid=Oc("ec_cpt_model"),i}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a)},e.prototype.mergeDefaultAndTheme=function(t,n){var a=oh(this),i=a?Nl(t):{},o=n.getTheme();Ye(t,o.get(this.mainType)),Ye(t,this.getDefaultOption()),a&&oi(t,i,a)},e.prototype.mergeOption=function(t,n){Ye(this.option,t,!0);var a=oh(this);a&&oi(this.option,t,a)},e.prototype.optionUpdated=function(t,n){},e.prototype.getDefaultOption=function(){var t=this.constructor;if(!n9(t))return t.defaultOption;var n=_Y(this);if(!n.defaultOption){for(var a=[],i=t;i;){var o=i.prototype.defaultOption;o&&a.push(o),i=i.superClass}for(var s={},l=a.length-1;l>=0;l--)s=Ye(s,a[l],!0);n.defaultOption=s}return n.defaultOption},e.prototype.getReferringComponents=function(t,n){var a=t+"Index",i=t+"Id";return Lc(this.ecModel,t,{index:this.get(a,!0),id:this.get(i,!0)},n)},e.prototype.getBoxLayoutParams=function(){return b5(this,!1)},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=(function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0})(),e})(rt);xj(Je,rt);xm(Je);qU(Je);QU(Je,wY);function wY(r){var e=[];return z(Je.getClassesByMainType(r),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=ue(e,function(t){return Xa(t).main}),r!=="dataset"&&Ue(e,"dataset")<=0&&e.unshift("dataset"),e}var ee={color:{},darkColor:{},size:{}},Ht=ee.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)"};ie(Ht,{primary:Ht.neutral80,secondary:Ht.neutral70,tertiary:Ht.neutral60,quaternary:Ht.neutral50,disabled:Ht.neutral20,border:Ht.neutral30,borderTint:Ht.neutral20,borderShade:Ht.neutral40,background:Ht.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:Ht.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:Ht.neutral70,axisLineTint:Ht.neutral40,axisTick:Ht.neutral70,axisTickMinor:Ht.neutral60,axisLabel:Ht.neutral70,axisSplitLine:Ht.neutral15,axisMinorSplitLine:Ht.neutral05});for(var Gs in Ht)if(Ht.hasOwnProperty(Gs)){var MI=Ht[Gs];Gs==="theme"?ee.darkColor.theme=Ht.theme.slice():Gs==="highlight"?ee.darkColor.highlight="rgba(255,231,130,0.4)":Gs.indexOf("accent")===0?ee.darkColor[Gs]=Fi(MI,null,function(r){return r*.5},function(r){return Math.min(1,1.3-r)}):ee.darkColor[Gs]=Fi(MI,null,function(r){return r*.9},function(r){return 1-Math.pow(r,1.5)})}ee.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var C5="";typeof navigator<"u"&&(C5=navigator.platform||"");var Su="rgba(0, 0, 0, 0.2)",M5=ee.color.theme[0],TY=Fi(M5,null,null,.9);const CY={darkMode:"auto",colorBy:"series",color:ee.color.theme,gradientColor:[TY,M5],aria:{decal:{decals:[{color:Su,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Su,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Su,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Su,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Su,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Su,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:C5.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 k5=we(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Dn="original",Mr="arrayRows",Pn="objectRows",ka="keyedColumns",Zo="typedArray",A5="unknown",wa="column",jl="row",Lr={Must:1,Might:2,Not:3},L5=et();function MY(r){L5(r).datasetMap=we()}function I5(r,e,t){var n={},a=qT(e);if(!a||!r)return n;var i=[],o=[],s=e.ecModel,l=L5(s).datasetMap,u=a.uid+"_"+t.seriesLayoutBy,c,f;r=r.slice(),z(r,function(y,m){var x=Pe(y)?y:r[m]={name:y};x.type==="ordinal"&&c==null&&(c=m,f=v(x)),n[x.name]=[]});var d=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});z(r,function(y,m){var x=y.name,_=v(y);if(c==null){var T=d.valueWayDim;h(n[x],T,_),h(o,T,_),d.valueWayDim+=_}else if(c===m)h(n[x],0,_),h(i,0,_);else{var T=d.categoryWayDim;h(n[x],T,_),h(o,T,_),d.categoryWayDim+=_}});function h(y,m,x){for(var _=0;_<x;_++)y.push(m+_)}function v(y){var m=y.dimsDef;return m?m.length:1}return i.length&&(n.itemName=i),o.length&&(n.seriesName=o),n}function KT(r,e,t){var n={},a=qT(r);if(!a)return n;var i=e.sourceFormat,o=e.dimensionsDefine,s;(i===Pn||i===ka)&&z(o,function(c,f){(Pe(c)?c.name:c)==="name"&&(s=f)});var l=(function(){for(var c={},f={},d=[],h=0,v=Math.min(5,t);h<v;h++){var y=P5(e.data,i,e.seriesLayoutBy,o,e.startIndex,h);d.push(y);var m=y===Lr.Not;if(m&&c.v==null&&h!==s&&(c.v=h),(c.n==null||c.n===c.v||!m&&d[c.n]===Lr.Not)&&(c.n=h),x(c)&&d[c.n]!==Lr.Not)return c;m||(y===Lr.Might&&f.v==null&&h!==s&&(f.v=h),(f.n==null||f.n===f.v)&&(f.n=h))}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 qT(r){var e=r.get("data",!0);if(!e)return Lc(r.ecModel,"dataset",{index:r.get("datasetIndex",!0),id:r.get("datasetId",!0)},jt).models[0]}function kY(r){return!r.get("transform",!0)&&!r.get("fromTransformResult",!0)?[]:Lc(r.ecModel,"dataset",{index:r.get("fromDatasetIndex",!0),id:r.get("fromDatasetId",!0)},jt).models}function D5(r,e){return P5(r.data,r.sourceFormat,r.seriesLayoutBy,r.dimensionsDefine,r.startIndex,e)}function P5(r,e,t,n,a,i){var o,s=5;if(en(r))return Lr.Not;var l,u;if(n){var c=n[i];Pe(c)?(l=c.name,u=c.type):pe(c)&&(l=c)}if(u!=null)return u==="ordinal"?Lr.Must:Lr.Not;if(e===Mr){var f=r;if(t===jl){for(var d=f[i],h=0;h<(d||[]).length&&h<s;h++)if((o=C(d[a+h]))!=null)return o}else for(var h=0;h<f.length&&h<s;h++){var v=f[a+h];if(v&&(o=C(v[i]))!=null)return o}}else if(e===Pn){var y=r;if(!l)return Lr.Not;for(var h=0;h<y.length&&h<s;h++){var m=y[h];if(m&&(o=C(m[l]))!=null)return o}}else if(e===ka){var x=r;if(!l)return Lr.Not;var d=x[l];if(!d||en(d))return Lr.Not;for(var h=0;h<d.length&&h<s;h++)if((o=C(d[h]))!=null)return o}else if(e===Dn)for(var _=r,h=0;h<_.length&&h<s;h++){var m=_[h],T=Ac(m);if(!le(T))return Lr.Not;if((o=C(T[i]))!=null)return o}function C(k){var A=pe(k);if(k!=null&&Number.isFinite(Number(k))&&k!=="")return A?Lr.Might:Lr.Not;if(A&&k!=="-")return Lr.Must}return Lr.Not}var b_=we();function AY(r,e){Rr(b_.get(r)==null&&e),b_.set(r,e)}function LY(r,e,t){var n=b_.get(e);if(!n)return t;var a=n(r);return a?t.concat(a):t}var kI=et(),IY=et(),QT=(function(){function r(){}return r.prototype.getColorFromPalette=function(e,t,n){var a=Tt(this.get("color",!0)),i=this.get("colorLayer",!0);return R5(this,kI,a,i,e,t,n)},r.prototype.clearColorPalette=function(){PY(this,kI)},r})();function __(r,e,t,n){var a=Tt(r.get(["aria","decal","decals"]));return R5(r,IY,a,null,e,t,n)}function DY(r,e){for(var t=r.length,n=0;n<t;n++)if(r[n].length>e)return r[n];return r[t-1]}function R5(r,e,t,n,a,i,o){i=i||r;var s=e(i),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(a))return u[a];var c=o==null||!n?t:DY(n,o);if(c=c||t,!(!c||!c.length)){var f=c[l];return a&&(u[a]=f),s.paletteIdx=(l+1)%c.length,f}}function PY(r,e){e(r).paletteIdx=0,e(r).paletteNameMap={}}var Iv,Ff,AI,LI="\0_ec_inner",RY=1,JT=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t,n,a,i,o,s){i=i||{},this.option=null,this._theme=new rt(i),this._locale=new rt(o),this._optionManager=s},e.prototype.setOption=function(t,n,a){var i=PI(n);this._optionManager.setOption(t,a,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,n){return this._resetOption(t,PI(n))},e.prototype._resetOption=function(t,n){var a=!1,i=this._optionManager;if(!t||t==="recreate"){var o=i.mountOption(t==="recreate");!this.option||t==="recreate"?AI(this,o):(this.restoreData(),this._mergeOption(o,n)),a=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var s=i.getTimelineOption(this);s&&(a=!0,this._mergeOption(s,n))}if(!t||t==="recreate"||t==="media"){var l=i.getMediaOption(this);l.length&&z(l,function(u){a=!0,this._mergeOption(u,n)},this)}return a},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,n){var a=this.option,i=this._componentsMap,o=this._componentsCount,s=[],l=we(),u=n&&n.replaceMergeMainTypeMap;MY(this),z(t,function(f,d){f!=null&&(Je.hasClass(d)?d&&(s.push(d),l.set(d,!0)):a[d]=a[d]==null?Ae(f):Ye(a[d],f,!0))}),u&&u.each(function(f,d){Je.hasClass(d)&&!l.get(d)&&(s.push(d),l.set(d,!0))}),Je.topologicalTravel(s,Je.getAllClassMainTypes(),c,this);function c(f){var d=LY(this,f,Tt(t[f])),h=i.get(f),v=h?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",y=pj(h,d,v);X7(y,f,Je),a[f]=null,i.set(f,null),o.set(f,0);var m=[],x=[],_=0,T;z(y,function(C,k){var A=C.existing,L=C.newOption;if(!L)A&&(A.mergeOption({},this),A.optionUpdated({},!1));else{var D=f==="series",P=Je.getClass(f,C.keyInfo.subType,!D);if(!P)return;if(f==="tooltip"){if(T)return;T=!0}if(A&&A.constructor===P)A.name=C.keyInfo.name,A.mergeOption(L,this),A.optionUpdated(L,!1);else{var E=ie({componentIndex:k},C.keyInfo);A=new P(L,this,this,E),ie(A,E),C.brandNew&&(A.__requireNewView=!0),A.init(L,this,this),A.optionUpdated(null,!0)}}A?(m.push(A.option),x.push(A),_++):(m.push(void 0),x.push(void 0))},this),a[f]=m,i.set(f,x),o.set(f,_),f==="series"&&Iv(this)}this._seriesIndices||Iv(this)},e.prototype.getOption=function(){var t=Ae(this.option);return z(t,function(n,a){if(Je.hasClass(a)){for(var i=Tt(n),o=i.length,s=!1,l=o-1;l>=0;l--)i[l]&&!th(i[l])?s=!0:(i[l]=null,!s&&o--);i.length=o,t[a]=i}}),delete t[LI],t},e.prototype.setTheme=function(t){this._theme=new rt(t),this._resetOption("recreate",null)},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,n){var a=this._componentsMap.get(t);if(a){var i=a[n||0];if(i)return i;if(n==null){for(var o=0;o<a.length;o++)if(a[o])return a[o]}}},e.prototype.queryComponents=function(t){var n=t.mainType;if(!n)return[];var a=t.index,i=t.id,o=t.name,s=this._componentsMap.get(n);if(!s||!s.length)return[];var l;return a!=null?(l=[],z(Tt(a),function(u){s[u]&&l.push(s[u])})):i!=null?l=II("id",i,s):o!=null?l=II("name",o,s):l=ht(s,function(u){return!!u}),DI(l,t)},e.prototype.findComponents=function(t){var n=t.query,a=t.mainType,i=s(n),o=i?this.queryComponents(i):ht(this._componentsMap.get(a),function(u){return!!u});return l(DI(o,t));function s(u){var c=a+"Index",f=a+"Id",d=a+"Name";return u&&(u[c]!=null||u[f]!=null||u[d]!=null)?{mainType:a,index:u[c],id:u[f],name:u[d]}:null}function l(u){return t.filter?ht(u,t.filter):u}},e.prototype.eachComponent=function(t,n,a){var i=this._componentsMap;if(Me(t)){var o=n,s=t;i.each(function(f,d){for(var h=0;f&&h<f.length;h++){var v=f[h];v&&s.call(o,d,v,v.componentIndex)}})}else for(var l=pe(t)?i.get(t):Pe(t)?this.findComponents(t):null,u=0;l&&u<l.length;u++){var c=l[u];c&&n.call(a,c,c.componentIndex)}},e.prototype.getSeriesByName=function(t){var n=ir(t,null);return ht(this._componentsMap.get("series"),function(a){return!!a&&n!=null&&a.name===n})},e.prototype.getSeriesByIndex=function(t){return this._componentsMap.get("series")[t]},e.prototype.getSeriesByType=function(t){return ht(this._componentsMap.get("series"),function(n){return!!n&&n.subType===t})},e.prototype.getSeries=function(){return ht(this._componentsMap.get("series"),function(t){return!!t})},e.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},e.prototype.eachSeries=function(t,n){Ff(this),z(this._seriesIndices,function(a){var i=this._componentsMap.get("series")[a];t.call(n,i,a)},this)},e.prototype.eachRawSeries=function(t,n){z(this._componentsMap.get("series"),function(a){a&&t.call(n,a,a.componentIndex)})},e.prototype.eachSeriesByType=function(t,n,a){Ff(this),z(this._seriesIndices,function(i){var o=this._componentsMap.get("series")[i];o.subType===t&&n.call(a,o,i)},this)},e.prototype.eachRawSeriesByType=function(t,n,a){return z(this.getSeriesByType(t),n,a)},e.prototype.isSeriesFiltered=function(t){return Ff(this),this._seriesIndicesMap.get(t.componentIndex)==null},e.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},e.prototype.filterSeries=function(t,n){Ff(this);var a=[];z(this._seriesIndices,function(i){var o=this._componentsMap.get("series")[i];t.call(n,o,i)&&a.push(i)},this),this._seriesIndices=a,this._seriesIndicesMap=we(a)},e.prototype.restoreData=function(t){Iv(this);var n=this._componentsMap,a=[];n.each(function(i,o){Je.hasClass(o)&&a.push(o)}),Je.topologicalTravel(a,Je.getAllClassMainTypes(),function(i){z(n.get(i),function(o){o&&(i!=="series"||!EY(o,t))&&o.restoreData()})})},e.internalField=(function(){Iv=function(t){var n=t._seriesIndices=[];z(t._componentsMap.get("series"),function(a){a&&n.push(a.componentIndex)}),t._seriesIndicesMap=we(n)},Ff=function(t){},AI=function(t,n){t.option={},t.option[LI]=RY,t._componentsMap=we({series:[]}),t._componentsCount=we();var a=n.aria;Pe(a)&&a.enabled==null&&(a.enabled=!0),zY(n,t._theme.option),Ye(n,CY,!1),t._mergeOption(n,null)}})(),e})(rt);function EY(r,e){if(e){var t=e.seriesIndex,n=e.seriesId,a=e.seriesName;return t!=null&&r.componentIndex!==t||n!=null&&r.id!==n||a!=null&&r.name!==a}}function zY(r,e){var t=r.color&&!r.colorLayer;z(e,function(n,a){a==="colorLayer"&&t||a==="color"&&r.color||Je.hasClass(a)||(typeof n=="object"?r[a]=r[a]?Ye(r[a],n,!1):Ae(n):r[a]==null&&(r[a]=n))})}function II(r,e,t){if(le(e)){var n=we();return z(e,function(i){if(i!=null){var o=ir(i,null);o!=null&&n.set(i,!0)}}),ht(t,function(i){return i&&n.get(i[r])})}else{var a=ir(e,null);return ht(t,function(i){return i&&a!=null&&i[r]===a})}}function DI(r,e){return e.hasOwnProperty("subType")?ht(r,function(t){return t&&t.subType===e.subType}):r}function PI(r){var e=we();return r&&z(Tt(r.replaceMerge),function(t){e.set(t,!0)}),{replaceMergeMainTypeMap:e}}Wt(JT,QT);var OY=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],E5=(function(){function r(e){z(OY,function(t){this[t]=ye(e[t],e)},this)}return r})(),NY=/^(min|max)?(.+)$/,jY=(function(){function r(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return r.prototype.setOption=function(e,t,n){e&&(z(Tt(e.series),function(o){o&&o.data&&en(o.data)&&Xd(o.data)}),z(Tt(e.dataset),function(o){o&&o.source&&en(o.source)&&Xd(o.source)})),e=Ae(e);var a=this._optionBackup,i=BY(e,t,!a);this._newBaseOption=i.baseOption,a?(i.timelineOptions.length&&(a.timelineOptions=i.timelineOptions),i.mediaList.length&&(a.mediaList=i.mediaList),i.mediaDefault&&(a.mediaDefault=i.mediaDefault)):this._optionBackup=i},r.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],Ae(e?t.baseOption:this._newBaseOption)},r.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var a=e.getComponent("timeline");a&&(t=Ae(n[a.getCurrentIndex()]))}return t},r.prototype.getMediaOption=function(e){var t=this._api.getWidth(),n=this._api.getHeight(),a=this._mediaList,i=this._mediaDefault,o=[],s=[];if(!a.length&&!i)return s;for(var l=0,u=a.length;l<u;l++)FY(a[l].query,t,n)&&o.push(l);return!o.length&&i&&(o=[-1]),o.length&&!GY(o,this._currentMediaIndices)&&(s=ue(o,function(c){return Ae(c===-1?i.option:a[c].option)})),this._currentMediaIndices=o,s},r})();function BY(r,e,t){var n=[],a,i,o=r.baseOption,s=r.timeline,l=r.options,u=r.media,c=!!r.media,f=!!(l||s||o&&o.timeline);o?(i=o,i.timeline||(i.timeline=s)):((f||c)&&(r.options=r.media=null),i=r),c&&le(u)&&z(u,function(h){h&&h.option&&(h.query?n.push(h):a||(a=h))}),d(i),z(l,function(h){return d(h)}),z(n,function(h){return d(h.option)});function d(h){z(e,function(v){v(h,t)})}return{baseOption:i,timelineOptions:l||[],mediaDefault:a,mediaList:n}}function FY(r,e,t){var n={width:e,height:t,aspectratio:e/t},a=!0;return z(r,function(i,o){var s=o.match(NY);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();VY(n[u],i,l)||(a=!1)}}),a}function VY(r,e,t){return t==="min"?r>=e:t==="max"?r<=e:r===e}function GY(r,e){return r.join(",")===e.join(",")}var da=z,sh=Pe,RI=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function N1(r){var e=r&&r.itemStyle;if(e)for(var t=0,n=RI.length;t<n;t++){var a=RI[t],i=e.normal,o=e.emphasis;i&&i[a]&&(r[a]=r[a]||{},r[a].normal?Ye(r[a].normal,i[a]):r[a].normal=i[a],i[a]=null),o&&o[a]&&(r[a]=r[a]||{},r[a].emphasis?Ye(r[a].emphasis,o[a]):r[a].emphasis=o[a],o[a]=null)}}function Wr(r,e,t){if(r&&r[e]&&(r[e].normal||r[e].emphasis)){var n=r[e].normal,a=r[e].emphasis;n&&(t?(r[e].normal=r[e].emphasis=null,De(r[e],n)):r[e]=n),a&&(r.emphasis=r.emphasis||{},r.emphasis[e]=a,a.focus&&(r.emphasis.focus=a.focus),a.blurScope&&(r.emphasis.blurScope=a.blurScope))}}function bd(r){Wr(r,"itemStyle"),Wr(r,"lineStyle"),Wr(r,"areaStyle"),Wr(r,"label"),Wr(r,"labelLine"),Wr(r,"upperLabel"),Wr(r,"edgeLabel")}function Jt(r,e){var t=sh(r)&&r[e],n=sh(t)&&t.textStyle;if(n)for(var a=0,i=OL.length;a<i;a++){var o=OL[a];n.hasOwnProperty(o)&&(t[o]=n[o])}}function $n(r){r&&(bd(r),Jt(r,"label"),r.emphasis&&Jt(r.emphasis,"label"))}function WY(r){if(sh(r)){N1(r),bd(r),Jt(r,"label"),Jt(r,"upperLabel"),Jt(r,"edgeLabel"),r.emphasis&&(Jt(r.emphasis,"label"),Jt(r.emphasis,"upperLabel"),Jt(r.emphasis,"edgeLabel"));var e=r.markPoint;e&&(N1(e),$n(e));var t=r.markLine;t&&(N1(t),$n(t));var n=r.markArea;n&&$n(n);var a=r.data;if(r.type==="graph"){a=a||r.nodes;var i=r.links||r.edges;if(i&&!en(i))for(var o=0;o<i.length;o++)$n(i[o]);z(r.categories,function(u){bd(u)})}if(a&&!en(a))for(var o=0;o<a.length;o++)$n(a[o]);if(e=r.markPoint,e&&e.data)for(var s=e.data,o=0;o<s.length;o++)$n(s[o]);if(t=r.markLine,t&&t.data)for(var l=t.data,o=0;o<l.length;o++)le(l[o])?($n(l[o][0]),$n(l[o][1])):$n(l[o]);r.type==="gauge"?(Jt(r,"axisLabel"),Jt(r,"title"),Jt(r,"detail")):r.type==="treemap"?(Wr(r.breadcrumb,"itemStyle"),z(r.levels,function(u){bd(u)})):r.type==="tree"&&bd(r.leaves)}}function _i(r){return le(r)?r:r?[r]:[]}function EI(r){return(le(r)?r[0]:r)||{}}function $Y(r,e){da(_i(r.series),function(n){sh(n)&&WY(n)});var t=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&t.push("valueAxis","categoryAxis","logAxis","timeAxis"),da(t,function(n){da(_i(r[n]),function(a){a&&(Jt(a,"axisLabel"),Jt(a.axisPointer,"label"))})}),da(_i(r.parallel),function(n){var a=n&&n.parallelAxisDefault;Jt(a,"axisLabel"),Jt(a&&a.axisPointer,"label")}),da(_i(r.calendar),function(n){Wr(n,"itemStyle"),Jt(n,"dayLabel"),Jt(n,"monthLabel"),Jt(n,"yearLabel")}),da(_i(r.radar),function(n){Jt(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)}),da(_i(r.geo),function(n){sh(n)&&($n(n),da(_i(n.regions),function(a){$n(a)}))}),da(_i(r.timeline),function(n){$n(n),Wr(n,"label"),Wr(n,"itemStyle"),Wr(n,"controlStyle",!0);var a=n.data;le(a)&&z(a,function(i){Pe(i)&&(Wr(i,"label"),Wr(i,"itemStyle"))})}),da(_i(r.toolbox),function(n){Wr(n,"iconStyle"),da(n.feature,function(a){Wr(a,"iconStyle")})}),Jt(EI(r.axisPointer),"label"),Jt(EI(r.tooltip).axisPointer,"label")}function HY(r,e){for(var t=e.split(","),n=r,a=0;a<t.length&&(n=n&&n[t[a]],n!=null);a++);return n}function UY(r,e,t,n){for(var a=e.split(","),i=r,o,s=0;s<a.length-1;s++)o=a[s],i[o]==null&&(i[o]={}),i=i[o];i[a[s]]==null&&(i[a[s]]=t)}function zI(r){r&&z(YY,function(e){e[0]in r&&!(e[1]in r)&&(r[e[1]]=r[e[0]])})}var YY=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],XY=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],j1=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Vf(r){var e=r&&r.itemStyle;if(e)for(var t=0;t<j1.length;t++){var n=j1[t][1],a=j1[t][0];e[n]!=null&&(e[a]=e[n])}}function OI(r){r&&r.alignTo==="edge"&&r.margin!=null&&r.edgeDistance==null&&(r.edgeDistance=r.margin)}function NI(r){r&&r.downplay&&!r.blur&&(r.blur=r.downplay)}function ZY(r){r&&r.focusNodeAdjacency!=null&&(r.emphasis=r.emphasis||{},r.emphasis.focus==null&&(r.emphasis.focus="adjacency"))}function z5(r,e){if(r)for(var t=0;t<r.length;t++)e(r[t]),r[t]&&z5(r[t].children,e)}function O5(r,e){$Y(r,e),r.series=Tt(r.series),z(r.series,function(t){if(Pe(t)){var n=t.type;if(n==="line")t.clipOverflow!=null&&(t.clip=t.clipOverflow);else if(n==="pie"||n==="gauge"){t.clockWise!=null&&(t.clockwise=t.clockWise),OI(t.label);var a=t.data;if(a&&!en(a))for(var i=0;i<a.length;i++)OI(a[i]);t.hoverOffset!=null&&(t.emphasis=t.emphasis||{},(t.emphasis.scaleSize=null)&&(t.emphasis.scaleSize=t.hoverOffset))}else if(n==="gauge"){var o=HY(t,"pointer.color");o!=null&&UY(t,"itemStyle.color",o)}else if(n==="bar"){Vf(t),Vf(t.backgroundStyle),Vf(t.emphasis);var a=t.data;if(a&&!en(a))for(var i=0;i<a.length;i++)typeof a[i]=="object"&&(Vf(a[i]),Vf(a[i]&&a[i].emphasis))}else if(n==="sunburst"){var s=t.highlightPolicy;s&&(t.emphasis=t.emphasis||{},t.emphasis.focus||(t.emphasis.focus=s)),NI(t),z5(t.data,NI)}else n==="graph"||n==="sankey"?ZY(t):n==="map"&&(t.mapType&&!t.map&&(t.map=t.mapType),t.mapLocation&&De(t,t.mapLocation));t.hoverAnimation!=null&&(t.emphasis=t.emphasis||{},t.emphasis&&t.emphasis.scale==null&&(t.emphasis.scale=t.hoverAnimation)),zI(t)}}),r.dataRange&&(r.visualMap=r.dataRange),z(XY,function(t){var n=r[t];n&&(le(n)||(n=[n]),z(n,function(a){zI(a)}))})}function KY(r){var e=we();r.eachSeries(function(t){var n=t.get("stack");if(n){var a=e.get(n)||e.set(n,[]),i=t.getData(),o={stackResultDimension:i.getCalculationInfo("stackResultDimension"),stackedOverDimension:i.getCalculationInfo("stackedOverDimension"),stackedDimension:i.getCalculationInfo("stackedDimension"),stackedByDimension:i.getCalculationInfo("stackedByDimension"),isStackedByIndex:i.getCalculationInfo("isStackedByIndex"),data:i,seriesModel:t};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;a.push(o)}}),e.each(function(t){if(t.length!==0){var n=t[0].seriesModel,a=n.get("stackOrder")||"seriesAsc";a==="seriesDesc"&&t.reverse(),z(t,function(i,o){i.data.setCalculationInfo("stackedOnSeries",o>0?t[o-1].seriesModel:null)}),qY(t)}})}function qY(r){z(r,function(e,t){var n=[],a=[NaN,NaN],i=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";o.modify(i,function(u,c,f){var d=o.get(e.stackedDimension,f);if(isNaN(d))return a;var h,v;s?v=o.getRawIndex(f):h=o.get(e.stackedByDimension,f);for(var y=NaN,m=t-1;m>=0;m--){var x=r[m];if(s||(v=x.data.rawIndexOf(x.stackedByDimension,h)),v>=0){var _=x.data.getByRawIndex(x.stackResultDimension,v);if(l==="all"||l==="positive"&&_>0||l==="negative"&&_<0||l==="samesign"&&d>=0&&_>0||l==="samesign"&&d<=0&&_<0){d=z7(d,_),y=_;break}}}return n[0]=d,n[1]=y,n})})}var Dm=(function(){function r(e){this.data=e.data||(e.sourceFormat===ka?{}:[]),this.sourceFormat=e.sourceFormat||A5,this.seriesLayoutBy=e.seriesLayoutBy||wa,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;n<t.length;n++){var a=t[n];a.type==null&&D5(this,n)===Lr.Must&&(a.type="ordinal")}}return r})();function eC(r){return r instanceof Dm}function w_(r,e,t){t=t||N5(r);var n=e.seriesLayoutBy,a=JY(r,t,n,e.sourceHeader,e.dimensions),i=new Dm({data:r,sourceFormat:t,seriesLayoutBy:n,dimensionsDefine:a.dimensionsDefine,startIndex:a.startIndex,dimensionsDetectedCount:a.dimensionsDetectedCount,metaRawOption:Ae(e)});return i}function tC(r){return new Dm({data:r,sourceFormat:en(r)?Zo:Dn})}function QY(r){return new Dm({data:r.data,sourceFormat:r.sourceFormat,seriesLayoutBy:r.seriesLayoutBy,dimensionsDefine:Ae(r.dimensionsDefine),startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount})}function N5(r){var e=A5;if(en(r))e=Zo;else if(le(r)){r.length===0&&(e=Mr);for(var t=0,n=r.length;t<n;t++){var a=r[t];if(a!=null){if(le(a)||en(a)){e=Mr;break}else if(Pe(a)){e=Pn;break}}}}else if(Pe(r)){for(var i in r)if(Se(r,i)&&Pr(r[i])){e=ka;break}}return e}function JY(r,e,t,n,a){var i,o;if(!r)return{dimensionsDefine:jI(a),startIndex:o,dimensionsDetectedCount:i};if(e===Mr){var s=r;n==="auto"||n==null?BI(function(u){u!=null&&u!=="-"&&(pe(u)?o==null&&(o=1):o=0)},t,s,10):o=ut(n)?n:n?1:0,!a&&o===1&&(a=[],BI(function(u,c){a[c]=u!=null?u+"":""},t,s,1/0)),i=a?a.length:t===jl?s.length:s[0]?s[0].length:null}else if(e===Pn)a||(a=eX(r));else if(e===ka)a||(a=[],z(r,function(u,c){a.push(c)}));else if(e===Dn){var l=Ac(r[0]);i=le(l)&&l.length||1}return{startIndex:o,dimensionsDefine:jI(a),dimensionsDetectedCount:i}}function eX(r){for(var e=0,t;e<r.length&&!(t=r[e++]););if(t)return st(t)}function jI(r){if(r){var e=we();return ue(r,function(t,n){t=Pe(t)?t:{name:t};var a={name:t.name,displayName:t.displayName,type:t.type};if(a.name==null)return a;a.name+="",a.displayName==null&&(a.displayName=a.name);var i=e.get(a.name);return i?a.name+="-"+i.count++:e.set(a.name,{count:1}),a})}}function BI(r,e,t,n){if(e===jl)for(var a=0;a<t.length&&a<n;a++)r(t[a]?t[a][0]:null,a);else for(var i=t[0]||[],a=0;a<i.length&&a<n;a++)r(i[a],a)}function j5(r){var e=r.sourceFormat;return e===Pn||e===ka}var Ws,$s,Hs,Us,FI,VI,B5=(function(){function r(e,t){var n=eC(e)?e:tC(e);this._source=n;var a=this._data=n.data,i=n.sourceFormat;n.seriesLayoutBy,i===Zo&&(this._offset=0,this._dimSize=t,this._data=a),VI(this,a,n)}return r.prototype.getSource=function(){return this._source},r.prototype.count=function(){return 0},r.prototype.getItem=function(e,t){},r.prototype.appendData=function(e){},r.prototype.clean=function(){},r.protoInitialize=(function(){var e=r.prototype;e.pure=!1,e.persistent=!0})(),r.internalField=(function(){var e;VI=function(o,s,l){var u=l.sourceFormat,c=l.seriesLayoutBy,f=l.startIndex,d=l.dimensionsDefine,h=FI[rC(u,c)];if(ie(o,h),u===Zo)o.getItem=t,o.count=a,o.fillStorage=n;else{var v=F5(u,c);o.getItem=ye(v,null,s,f,d);var y=V5(u,c);o.count=ye(y,null,s,f,d)}};var t=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,d=0;d<f;d++){for(var h=u[d],v=h[0]==null?1/0:h[0],y=h[1]==null?-1/0:h[1],m=s-o,x=l[d],_=0;_<m;_++){var T=c[_*f+d];x[o+_]=T,T<v&&(v=T),T>y&&(y=T)}h[0]=v,h[1]=y}},a=function(){return this._data?this._data.length/this._dimSize:0};FI=(e={},e[Mr+"_"+wa]={pure:!0,appendData:i},e[Mr+"_"+jl]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[Pn]={pure:!0,appendData:i},e[ka]={pure:!0,appendData:function(o){var s=this._data;z(o,function(l,u){for(var c=s[u]||(s[u]=[]),f=0;f<(l||[]).length;f++)c.push(l[f])})}},e[Dn]={appendData:i},e[Zo]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(o){for(var s=0;s<o.length;s++)this._data.push(o[s])}})(),r})(),Dv=function(r){le(r)||fj("series.data or dataset.source must be an array.")};Ws={},Ws[Mr+"_"+wa]=Dv,Ws[Mr+"_"+jl]=Dv,Ws[Pn]=Dv,Ws[ka]=function(r,e){for(var t=0;t<e.length;t++){var n=e[t].name;n==null&&fj("dimension name must not be null/undefined.")}},Ws[Dn]=Dv;var GI=function(r,e,t,n){return r[n]},tX=($s={},$s[Mr+"_"+wa]=function(r,e,t,n){return r[n+e]},$s[Mr+"_"+jl]=function(r,e,t,n,a){n+=e;for(var i=a||[],o=r,s=0;s<o.length;s++){var l=o[s];i[s]=l?l[n]:null}return i},$s[Pn]=GI,$s[ka]=function(r,e,t,n,a){for(var i=a||[],o=0;o<t.length;o++){var s=t[o].name,l=s!=null?r[s]:null;i[o]=l?l[n]:null}return i},$s[Dn]=GI,$s);function F5(r,e){var t=tX[rC(r,e)];return t}var WI=function(r,e,t){return r.length},rX=(Hs={},Hs[Mr+"_"+wa]=function(r,e,t){return Math.max(0,r.length-e)},Hs[Mr+"_"+jl]=function(r,e,t){var n=r[0];return n?Math.max(0,n.length-e):0},Hs[Pn]=WI,Hs[ka]=function(r,e,t){var n=t[0].name,a=n!=null?r[n]:null;return a?a.length:0},Hs[Dn]=WI,Hs);function V5(r,e){var t=rX[rC(r,e)];return t}var B1=function(r,e,t){return r[e]},nX=(Us={},Us[Mr]=B1,Us[Pn]=function(r,e,t){return r[t]},Us[ka]=B1,Us[Dn]=function(r,e,t){var n=Ac(r);return n instanceof Array?n[e]:n},Us[Zo]=B1,Us);function G5(r){var e=nX[r];return e}function rC(r,e){return r===Mr?r+"_"+e:r}function pc(r,e,t){if(r){var n=r.getRawDataItem(e);if(n!=null){var a=r.getStore(),i=a.getSource().sourceFormat;if(t!=null){var o=r.getDimensionIndex(t),s=a.getDimensionProperty(o);return G5(i)(n,o,s)}else{var l=n;return i===Dn&&(l=Ac(n)),l}}}}var aX=/\{@(.+?)\}/g,Pm=(function(){function r(){}return r.prototype.getDataParams=function(e,t){var n=this.getData(t),a=this.getRawValue(e,t),i=n.getRawIndex(e),o=n.getName(e),s=n.getRawDataItem(e),l=n.getItemVisual(e,"style"),u=l&&l[n.getItemVisual(e,"drawType")||"fill"],c=l&&l.stroke,f=this.mainType,d=f==="series",h=n.userOutput&&n.userOutput.get();return{componentType:f,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:o,dataIndex:i,data:s,dataType:t,value:a,color:u,borderColor:c,dimensionNames:h?h.fullDimensions:null,encode:h?h.encode:null,$vars:["seriesName","name","value"]}},r.prototype.getFormattedLabel=function(e,t,n,a,i,o){t=t||"normal";var s=this.getData(n),l=this.getDataParams(e,n);if(o&&(l.value=o.interpolatedValue),a!=null&&le(l.value)&&(l.value=l.value[a]),!i){var u=s.getItemModel(e);i=u.get(t==="normal"?["label","formatter"]:[t,"label","formatter"])}if(Me(i))return l.status=t,l.dimensionIndex=a,i(l);if(pe(i)){var c=XT(i,l);return c.replace(aX,function(f,d){var h=d.length,v=d;v.charAt(0)==="["&&v.charAt(h-1)==="]"&&(v=+v.slice(1,h-1));var y=pc(s,e,v);if(o&&le(o.interpolatedValue)){var m=s.getDimensionIndex(v);m>=0&&(y=o.interpolatedValue[m])}return y!=null?y+"":""})}},r.prototype.getRawValue=function(e,t){return pc(this.getData(t),e)},r.prototype.formatTooltip=function(e,t,n){},r})();function $I(r){var e,t;return Pe(r)?r.type&&(t=r):e=r,{text:e,frag:t}}function Gd(r){return new iX(r)}var iX=(function(){function r(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return r.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var a=this.context;a.data=a.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var o=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(i="reset");function c(_){return!(_>=1)&&(_=1),_}var f;(this._dirty||i==="reset")&&(this._dirty=!1,f=this._doReset(n)),this._modBy=l,this._modDataCount=u;var d=e&&e.step;if(t?this._dueEnd=t._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var h=this._dueIndex,v=Math.min(d!=null?this._dueIndex+d:1/0,this._dueEnd);if(!n&&(f||h<v)){var y=this._progress;if(le(y))for(var m=0;m<y.length;m++)this._doProgress(y[m],h,v,l,u);else this._doProgress(y,h,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()},r.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},r.prototype._doProgress=function(e,t,n,a,i){HI.reset(t,n,a,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:HI.next},this.context)},r.prototype._doReset=function(e){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var t,n;!e&&this._reset&&(t=this._reset(this.context),t&&t.progress&&(n=t.forceFirstProgress,t=t.progress),le(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var a=this._downstream;return a&&a.dirty(),n},r.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},r.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},r.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},r.prototype.getUpstream=function(){return this._upstream},r.prototype.getDownstream=function(){return this._downstream},r.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},r})(),HI=(function(){var r,e,t,n,a,i={reset:function(l,u,c,f){e=l,r=u,t=c,n=f,a=Math.ceil(n/t),i.next=t>1&&n>0?s:o}};return i;function o(){return e<r?e++:null}function s(){var l=e%a*t+Math.ceil(e/a),u=e>=r?null:l<n?l:e;return e++,u}})();function Ko(r,e){var t=e&&e.type;return t==="ordinal"?r:(t==="time"&&!ut(r)&&r!=null&&r!=="-"&&(r=+ci(r)),r==null||r===""?NaN:Number(r))}var oX=we({number:function(r){return parseFloat(r)},time:function(r){return+ci(r)},trim:function(r){return pe(r)?Mn(r):r}});function W5(r){return oX.get(r)}var $5={lt:function(r,e){return r<e},lte:function(r,e){return r<=e},gt:function(r,e){return r>e},gte:function(r,e){return r>=e}},sX=(function(){function r(e,t){if(!ut(t)){var n="";gt(n)}this._opFn=$5[e],this._rvalFloat=ai(t)}return r.prototype.evaluate=function(e){return ut(e)?this._opFn(e,this._rvalFloat):this._opFn(ai(e),this._rvalFloat)},r})(),H5=(function(){function r(e,t){var n=e==="desc";this._resultLT=n?1:-1,t==null&&(t=n?"min":"max"),this._incomparable=t==="min"?-1/0:1/0}return r.prototype.evaluate=function(e,t){var n=ut(e)?e:ai(e),a=ut(t)?t:ai(t),i=isNaN(n),o=isNaN(a);if(i&&(n=this._incomparable),o&&(a=this._incomparable),i&&o){var s=pe(e),l=pe(t);s&&(n=l?e:0),l&&(a=s?t:0)}return n<a?this._resultLT:n>a?-this._resultLT:0},r})(),lX=(function(){function r(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=ai(t)}return r.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(t=ai(e)===this._rvalFloat)}return this._isEQ?t:!t},r})();function uX(r,e){return r==="eq"||r==="ne"?new lX(r==="eq",e):Se($5,r)?new sX(r,e):null}var cX=(function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(e){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(e){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(e,t){},r.prototype.retrieveValueFromItem=function(e,t){},r.prototype.convertValue=function(e,t){return Ko(e,t)},r})();function fX(r,e){var t=new cX,n=r.data,a=t.sourceFormat=r.sourceFormat,i=r.startIndex,o="";r.seriesLayoutBy!==wa&>(o);var s=[],l={},u=r.dimensionsDefine;if(u)z(u,function(y,m){var x=y.name,_={index:m,name:x,displayName:y.displayName};if(s.push(_),x!=null){var T="";Se(l,x)&>(T),l[x]=_}});else for(var c=0;c<r.dimensionsDetectedCount;c++)s.push({index:c});var f=F5(a,wa);e.__isBuiltIn&&(t.getRawDataItem=function(y){return f(n,i,s,y)},t.getRawData=ye(dX,null,r)),t.cloneRawData=ye(hX,null,r);var d=V5(a,wa);t.count=ye(d,null,n,i,s);var h=G5(a);t.retrieveValue=function(y,m){var x=f(n,i,s,y);return v(x,m)};var v=t.retrieveValueFromItem=function(y,m){if(y!=null){var x=s[m];if(x)return h(y,m,x.name)}};return t.getDimensionInfo=ye(pX,null,s,l),t.cloneAllDimensionInfo=ye(vX,null,s),t}function dX(r){var e=r.sourceFormat;if(!nC(e)){var t="";gt(t)}return r.data}function hX(r){var e=r.sourceFormat,t=r.data;if(!nC(e)){var n="";gt(n)}if(e===Mr){for(var a=[],i=0,o=t.length;i<o;i++)a.push(t[i].slice());return a}else if(e===Pn){for(var a=[],i=0,o=t.length;i<o;i++)a.push(ie({},t[i]));return a}}function pX(r,e,t){if(t!=null){if(ut(t)||!isNaN(t)&&!Se(e,t))return r[t];if(Se(e,t))return e[t]}}function vX(r){return Ae(r)}var U5=we();function gX(r){r=Ae(r);var e=r.type,t="";e||gt(t);var n=e.split(":");n.length!==2&>(t);var a=!1;n[0]==="echarts"&&(e=n[1],a=!0),r.__isBuiltIn=a,U5.set(e,r)}function yX(r,e,t){var n=Tt(r),a=n.length,i="";a||gt(i);for(var o=0,s=a;o<s;o++){var l=n[o];e=mX(l,e),o!==s-1&&(e.length=Math.max(e.length,1))}return e}function mX(r,e,t,n){var a="";e.length||gt(a),Pe(r)||gt(a);var i=r.type,o=U5.get(i);o||gt(a);var s=ue(e,function(u){return fX(u,o)}),l=Tt(o.transform({upstream:s[0],upstreamList:s,config:Ae(r.config)}));return ue(l,function(u,c){var f="";Pe(u)||gt(f),u.data||gt(f);var d=N5(u.data);nC(d)||gt(f);var h,v=e[0];if(v&&c===0&&!u.dimensions){var y=v.startIndex;y&&(u.data=v.data.slice(0,y).concat(u.data)),h={seriesLayoutBy:wa,sourceHeader:y,dimensions:v.metaRawOption.dimensions}}else h={seriesLayoutBy:wa,sourceHeader:0,dimensions:u.dimensions};return w_(u.data,h,null)})}function nC(r){return r===Mr||r===Pn}var Rm="undefined",xX=typeof Uint32Array===Rm?Array:Uint32Array,SX=typeof Uint16Array===Rm?Array:Uint16Array,Y5=typeof Int32Array===Rm?Array:Int32Array,UI=typeof Float64Array===Rm?Array:Float64Array,X5={float:UI,int:Y5,ordinal:Array,number:Array,time:UI},F1;function bu(r){return r>65535?xX:SX}function _u(){return[1/0,-1/0]}function bX(r){var e=r.constructor;return e===Array?r.slice():new e(r)}function YI(r,e,t,n,a){var i=X5[t||"float"];if(a){var o=r[e],s=o&&o.length;if(s!==n){for(var l=new i(n),u=0;u<s;u++)l[u]=o[u];r[e]=l}}else r[e]=new i(n)}var T_=(function(){function r(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=we()}return r.prototype.initData=function(e,t,n){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var a=e.getSource(),i=this.defaultDimValueGetter=F1[a.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[],j5(a),this._dimensions=ue(t,function(o){return{type:o.type,property:o.property}}),this._initDataFromProvider(0,e.count())},r.prototype.getProvider=function(){return this._provider},r.prototype.getSource=function(){return this._provider.getSource()},r.prototype.ensureCalculationDimension=function(e,t){var n=this._calcDimNameToIdx,a=this._dimensions,i=n.get(e);if(i!=null){if(a[i].type===t)return i}else i=a.length;return a[i]={type:t},n.set(e,i),this._chunks[i]=new X5[t||"float"](this._rawCount),this._rawExtent[i]=_u(),i},r.prototype.collectOrdinalMeta=function(e,t){var n=this._chunks[e],a=this._dimensions[e],i=this._rawExtent,o=a.ordinalOffset||0,s=n.length;o===0&&(i[e]=_u());for(var l=i[e],u=o;u<s;u++){var c=n[u]=t.parseAndCollect(n[u]);isNaN(c)||(l[0]=Math.min(c,l[0]),l[1]=Math.max(c,l[1]))}a.ordinalMeta=t,a.ordinalOffset=s,a.type="ordinal"},r.prototype.getOrdinalMeta=function(e){var t=this._dimensions[e],n=t.ordinalMeta;return n},r.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},r.prototype.appendData=function(e){var t=this._provider,n=this.count();t.appendData(e);var a=t.count();return t.persistent||(a+=n),n<a&&this._initDataFromProvider(n,a,!0),[n,a]},r.prototype.appendValues=function(e,t){for(var n=this._chunks,a=this._dimensions,i=a.length,o=this._rawExtent,s=this.count(),l=s+Math.max(e.length,t||0),u=0;u<i;u++){var c=a[u];YI(n,u,c.type,l,!0)}for(var f=[],d=s;d<l;d++)for(var h=d-s,v=0;v<i;v++){var c=a[v],y=F1.arrayRows.call(this,e[h]||f,c.property,h,v);n[v][d]=y;var m=o[v];y<m[0]&&(m[0]=y),y>m[1]&&(m[1]=y)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(e,t,n){for(var a=this._provider,i=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=ue(o,function(_){return _.property}),c=0;c<s;c++){var f=o[c];l[c]||(l[c]=_u()),YI(i,c,f.type,t,n)}if(a.fillStorage)a.fillStorage(e,t,i,l);else for(var d=[],h=e;h<t;h++){d=a.getItem(h,d);for(var v=0;v<s;v++){var y=i[v],m=this._dimValueGetter(d,u[v],h,v);y[h]=m;var x=l[v];m<x[0]&&(x[0]=m),m>x[1]&&(x[1]=m)}}!a.persistent&&a.clean&&a.clean(),this._rawCount=this._count=t,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(t)]:NaN},r.prototype.getValues=function(e,t){var n=[],a=[];if(t==null){t=e,e=[];for(var i=0;i<this._dimensions.length;i++)a.push(i)}else a=e;for(var i=0,o=a.length;i<o;i++)n.push(this.get(a[i],t));return n},r.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var n=this._chunks[e];return n?n[t]:NaN},r.prototype.getSum=function(e){var t=this._chunks[e],n=0;if(t)for(var a=0,i=this.count();a<i;a++){var o=this.get(e,a);isNaN(o)||(n+=o)}return n},r.prototype.getMedian=function(e){var t=[];this.each([e],function(i){isNaN(i)||t.push(i)});var n=t.sort(function(i,o){return i-o}),a=this.count();return a===0?0:a%2===1?n[(a-1)/2]:(n[a/2]+n[a/2-1])/2},r.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&n<this._count&&n===e)return e;for(var a=0,i=this._count-1;a<=i;){var o=(a+i)/2|0;if(t[o]<e)a=o+1;else if(t[o]>e)i=o-1;else return o}return-1},r.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,a=this._count;if(n===Array){e=new n(a);for(var i=0;i<a;i++)e[i]=t[i]}else e=new n(t.buffer,0,a)}else{var n=bu(this._rawCount);e=new n(this.count());for(var i=0;i<e.length;i++)e[i]=i}return e},r.prototype.filter=function(e,t){if(!this._count)return this;for(var n=this.clone(),a=n.count(),i=bu(n._rawCount),o=new i(a),s=[],l=e.length,u=0,c=e[0],f=n._chunks,d=0;d<a;d++){var h=void 0,v=n.getRawIndex(d);if(l===0)h=t(d);else if(l===1){var y=f[c][v];h=t(y,d)}else{for(var m=0;m<l;m++)s[m]=f[e[m]][v];s[m]=d,h=t.apply(null,s)}h&&(o[u++]=v)}return u<a&&(n._indices=o),n._count=u,n._extent=[],n._updateGetRawIdx(),n},r.prototype.selectRange=function(e){var t=this.clone(),n=t._count;if(!n)return this;var a=st(e),i=a.length;if(!i)return this;var o=t.count(),s=bu(t._rawCount),l=new s(o),u=0,c=a[0],f=e[c][0],d=e[c][1],h=t._chunks,v=!1;if(!t._indices){var y=0;if(i===1){for(var m=h[a[0]],x=0;x<n;x++){var _=m[x];(_>=f&&_<=d||isNaN(_))&&(l[u++]=y),y++}v=!0}else if(i===2){for(var m=h[a[0]],T=h[a[1]],C=e[a[1]][0],k=e[a[1]][1],x=0;x<n;x++){var _=m[x],A=T[x];(_>=f&&_<=d||isNaN(_))&&(A>=C&&A<=k||isNaN(A))&&(l[u++]=y),y++}v=!0}}if(!v)if(i===1)for(var x=0;x<o;x++){var L=t.getRawIndex(x),_=h[a[0]][L];(_>=f&&_<=d||isNaN(_))&&(l[u++]=L)}else for(var x=0;x<o;x++){for(var D=!0,L=t.getRawIndex(x),P=0;P<i;P++){var E=a[P],_=h[E][L];(_<e[E][0]||_>e[E][1])&&(D=!1)}D&&(l[u++]=t.getRawIndex(x))}return u<o&&(t._indices=l),t._count=u,t._extent=[],t._updateGetRawIdx(),t},r.prototype.map=function(e,t){var n=this.clone(e);return this._updateDims(n,e,t),n},r.prototype.modify=function(e,t){this._updateDims(this,e,t)},r.prototype._updateDims=function(e,t,n){for(var a=e._chunks,i=[],o=t.length,s=e.count(),l=[],u=e._rawExtent,c=0;c<t.length;c++)u[t[c]]=_u();for(var f=0;f<s;f++){for(var d=e.getRawIndex(f),h=0;h<o;h++)l[h]=a[t[h]][d];l[o]=f;var v=n&&n.apply(null,l);if(v!=null){typeof v!="object"&&(i[0]=v,v=i);for(var c=0;c<v.length;c++){var y=t[c],m=v[c],x=u[y],_=a[y];_&&(_[d]=m),m<x[0]&&(x[0]=m),m>x[1]&&(x[1]=m)}}}},r.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),a=n._chunks,i=a[e],o=this.count(),s=0,l=Math.floor(1/t),u=this.getRawIndex(0),c,f,d,h=new(bu(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));h[s++]=u;for(var v=1;v<o-1;v+=l){for(var y=Math.min(v+l,o-1),m=Math.min(v+l*2,o),x=(m+y)/2,_=0,T=y;T<m;T++){var C=this.getRawIndex(T),k=i[C];isNaN(k)||(_+=k)}_/=m-y;var A=v,L=Math.min(v+l,o),D=v-1,P=i[u];c=-1,d=A;for(var E=-1,O=0,T=A;T<L;T++){var C=this.getRawIndex(T),k=i[C];if(isNaN(k)){O++,E<0&&(E=C);continue}f=Math.abs((D-x)*(k-P)-(D-T)*(_-P)),f>c&&(c=f,d=C)}O>0&&O<L-A&&(h[s++]=Math.min(E,d),d=Math.max(E,d)),h[s++]=d,u=d}return h[s++]=this.getRawIndex(o-1),n._count=s,n._indices=h,n.getRawIndex=this._getRawIdx,n},r.prototype.minmaxDownSample=function(e,t){for(var n=this.clone([e],!0),a=n._chunks,i=Math.floor(1/t),o=a[e],s=this.count(),l=new(bu(this._rawCount))(Math.ceil(s/i)*2),u=0,c=0;c<s;c+=i){var f=c,d=o[this.getRawIndex(f)],h=c,v=o[this.getRawIndex(h)],y=i;c+i>s&&(y=s-c);for(var m=0;m<y;m++){var x=this.getRawIndex(c+m),_=o[x];_<d&&(d=_,f=c+m),_>v&&(v=_,h=c+m)}var T=this.getRawIndex(f),C=this.getRawIndex(h);f<h?(l[u++]=T,l[u++]=C):(l[u++]=C,l[u++]=T)}return n._count=u,n._indices=l,n._updateGetRawIdx(),n},r.prototype.downSample=function(e,t,n,a){for(var i=this.clone([e],!0),o=i._chunks,s=[],l=Math.floor(1/t),u=o[e],c=this.count(),f=i._rawExtent[e]=_u(),d=new(bu(this._rawCount))(Math.ceil(c/l)),h=0,v=0;v<c;v+=l){l>c-v&&(l=c-v,s.length=l);for(var y=0;y<l;y++){var m=this.getRawIndex(v+y);s[y]=u[m]}var x=n(s),_=this.getRawIndex(Math.min(v+a(s,x)||0,c-1));u[_]=x,x<f[0]&&(f[0]=x),x>f[1]&&(f[1]=x),d[h++]=_}return i._count=h,i._indices=d,i._updateGetRawIdx(),i},r.prototype.each=function(e,t){if(this._count)for(var n=e.length,a=this._chunks,i=0,o=this.count();i<o;i++){var s=this.getRawIndex(i);switch(n){case 0:t(i);break;case 1:t(a[e[0]][s],i);break;case 2:t(a[e[0]][s],a[e[1]][s],i);break;default:for(var l=0,u=[];l<n;l++)u[l]=a[e[l]][s];u[l]=i,t.apply(null,u)}}},r.prototype.getDataExtent=function(e){var t=this._chunks[e],n=_u();if(!t)return n;var a=this.count(),i=!this._indices,o;if(i)return this._rawExtent[e].slice();if(o=this._extent[e],o)return o.slice();o=n;for(var s=o[0],l=o[1],u=0;u<a;u++){var c=this.getRawIndex(u),f=t[c];f<s&&(s=f),f>l&&(l=f)}return o=[s,l],this._extent[e]=o,o},r.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],a=this._chunks,i=0;i<a.length;i++)n.push(a[i][t]);return n},r.prototype.clone=function(e,t){var n=new r,a=this._chunks,i=e&&Qn(e,function(s,l){return s[l]=!0,s},{});if(i)for(var o=0;o<a.length;o++)n._chunks[o]=i[o]?bX(a[o]):a[o];else n._chunks=a;return this._copyCommonProps(n),t||(n._indices=this._cloneIndices()),n._updateGetRawIdx(),n},r.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=Ae(this._extent),e._rawExtent=Ae(this._rawExtent)},r.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array){var n=this._indices.length;t=new e(n);for(var a=0;a<n;a++)t[a]=this._indices[a]}else t=new e(this._indices);return t}return null},r.prototype._getRawIdxIdentity=function(e){return e},r.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=(function(){function e(t,n,a,i){return Ko(t[i],this._dimensions[i])}F1={arrayRows:e,objectRows:function(t,n,a,i){return Ko(t[n],this._dimensions[i])},keyedColumns:e,original:function(t,n,a,i){var o=t&&(t.value==null?t:t.value);return Ko(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(t,n,a,i){return t[i]}}})(),r})(),Z5=(function(){function r(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,a,i;if(Pv(e)){var o=e,s=void 0,l=void 0,u=void 0;if(n){var c=t[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,i=[c._getVersionSign()]}else s=o.get("data",!0),l=en(s)?Zo:Dn,i=[];var f=this._getSourceMetaRawOption()||{},d=u&&u.metaRawOption||{},h=Ce(f.seriesLayoutBy,d.seriesLayoutBy)||null,v=Ce(f.sourceHeader,d.sourceHeader),y=Ce(f.dimensions,d.dimensions),m=h!==d.seriesLayoutBy||!!v!=!!d.sourceHeader||y;a=m?[w_(s,{seriesLayoutBy:h,sourceHeader:v,dimensions:y},l)]:[]}else{var x=e;if(n){var _=this._applyTransform(t);a=_.sourceList,i=_.upstreamSignList}else{var T=x.get("source",!0);a=[w_(T,this._getSourceMetaRawOption(),null)],i=[]}}this._setLocalSource(a,i)},r.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get("transform",!0),a=t.get("fromTransformResult",!0);if(a!=null){var i="";e.length!==1&&ZI(i)}var o,s=[],l=[];return z(e,function(u){u.prepareSource();var c=u.getSource(a||0),f="";a!=null&&!c&&ZI(f),s.push(c),l.push(u._getVersionSign())}),n?o=yX(n,s,{datasetIndex:t.componentIndex}):a!=null&&(o=[QY(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var n=e[t];if(n._isDirty()||this._upstreamSignList[t]!==n._getVersionSign())return!0}},r.prototype.getSource=function(e){e=e||0;var t=this._sourceList[e];if(!t){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return t},r.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},r.prototype._innerGetDataStore=function(e,t,n){var a=0,i=this._storeList,o=i[a];o||(o=i[a]={});var s=o[n];if(!s){var l=this._getUpstreamSourceManagers()[0];Pv(this._sourceHost)&&l?s=l._innerGetDataStore(e,t,n):(s=new T_,s.initData(new B5(t,e.length),e)),o[n]=s}return s},r.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(Pv(e)){var t=qT(e);return t?[t.getSourceManager()]:[]}else return ue(kY(e),function(n){return n.getSourceManager()})},r.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,t,n,a;if(Pv(e))t=e.get("seriesLayoutBy",!0),n=e.get("sourceHeader",!0),a=e.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var i=e;t=i.get("seriesLayoutBy",!0),n=i.get("sourceHeader",!0),a=i.get("dimensions",!0)}return{seriesLayoutBy:t,sourceHeader:n,dimensions:a}},r})();function XI(r){var e=r.option.transform;e&&Xd(r.option.transform)}function Pv(r){return r.mainType==="series"}function ZI(r){throw new Error(r)}var _X="line-height:1";function K5(r){var e=r.lineHeight;return e==null?_X:"line-height:"+$r(e+"")+"px"}function q5(r,e){var t=r.color||ee.color.tertiary,n=r.fontSize||12,a=r.fontWeight||"400",i=r.color||ee.color.secondary,o=r.fontSize||14,s=r.fontWeight||"900";return e==="html"?{nameStyle:"font-size:"+$r(n+"")+"px;color:"+$r(t)+";font-weight:"+$r(a+""),valueStyle:"font-size:"+$r(o+"")+"px;color:"+$r(i)+";font-weight:"+$r(s+"")}:{nameStyle:{fontSize:n,fill:t,fontWeight:a},valueStyle:{fontSize:o,fill:i,fontWeight:s}}}var wX=[0,10,20,30],TX=["",`
|
|
31
|
+
`,`
|
|
32
|
+
|
|
33
|
+
`,`
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
`];function rr(r,e){return e.type=r,e}function C_(r){return r.type==="section"}function Q5(r){return C_(r)?CX:MX}function J5(r){if(C_(r)){var e=0,t=r.blocks.length,n=t>1||t>0&&!r.noHeader;return z(r.blocks,function(a){var i=J5(a);i>=e&&(e=i+ +(n&&(!i||C_(a)&&!a.noHeader)))}),e}return 0}function CX(r,e,t,n){var a=e.noHeader,i=kX(J5(e)),o=[],s=e.blocks||[];Rr(!s||le(s)),s=s||[];var l=r.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(Se(u,l)){var c=new H5(u[l],null);s.sort(function(y,m){return c.evaluate(y.sortParam,m.sortParam)})}else l==="seriesDesc"&&s.reverse()}z(s,function(y,m){var x=e.valueFormatter,_=Q5(y)(x?ie(ie({},r),{valueFormatter:x}):r,y,m>0?i.html:0,n);_!=null&&o.push(_)});var f=r.renderMode==="richText"?o.join(i.richText):M_(n,o.join(""),a?t:i.html);if(a)return f;var d=x_(e.header,"ordinal",r.useUTC),h=q5(n,r.renderMode).nameStyle,v=K5(n);return r.renderMode==="richText"?eB(r,d,h)+i.richText+f:M_(n,'<div style="'+h+";"+v+';">'+$r(d)+"</div>"+f,t)}function MX(r,e,t,n){var a=r.renderMode,i=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=r.useUTC,c=e.valueFormatter||r.valueFormatter||function(C){return C=le(C)?C:[C],ue(C,function(k,A){return x_(k,le(h)?h[A]:h,u)})};if(!(i&&o)){var f=s?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||ee.color.secondary,a),d=i?"":x_(l,"ordinal",u),h=e.valueType,v=o?[]:c(e.value,e.dataIndex),y=!s||!i,m=!s&&i,x=q5(n,a),_=x.nameStyle,T=x.valueStyle;return a==="richText"?(s?"":f)+(i?"":eB(r,d,_))+(o?"":IX(r,v,y,m,T)):M_(n,(s?"":f)+(i?"":AX(d,!s,_))+(o?"":LX(v,y,m,T)),t)}}function KI(r,e,t,n,a,i){if(r){var o=Q5(r),s={useUTC:a,renderMode:t,orderMode:n,markupStyleCreator:e,valueFormatter:r.valueFormatter};return o(s,r,0,i)}}function kX(r){return{html:wX[r],richText:TX[r]}}function M_(r,e,t){var n='<div style="clear:both"></div>',a="margin: "+t+"px 0 0",i=K5(r);return'<div style="'+a+";"+i+';">'+e+n+"</div>"}function AX(r,e,t){var n=e?"margin-left:2px":"";return'<span style="'+t+";"+n+'">'+$r(r)+"</span>"}function LX(r,e,t,n){var a=t?"10px":"20px",i=e?"float:right;margin-left:"+a:"";return r=le(r)?r:[r],'<span style="'+i+";"+n+'">'+ue(r,function(o){return $r(o)}).join(" ")+"</span>"}function eB(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function IX(r,e,t,n,a){var i=[a],o=n?10:20;return t&&i.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(le(e)?e.join(" "):e,i)}function tB(r,e){var t=r.getData().getItemVisual(e,"style"),n=t[r.visualDrawType];return Ll(n)}function rB(r,e){var t=r.get("padding");return t??(e==="richText"?[8,10]:10)}var V1=(function(){function r(){this.richTextStyles={},this._nextStyleNameId=uj()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(e,t,n){var a=n==="richText"?this._generateStyleName():null,i=g5({color:t,type:e,renderMode:n,markerId:a});return pe(i)?i:(this.richTextStyles[a]=i.style,i.content)},r.prototype.wrapRichTextStyle=function(e,t){var n={};le(t)?z(t,function(i){return ie(n,i)}):ie(n,t);var a=this._generateStyleName();return this.richTextStyles[a]=n,"{"+a+"|"+e+"}"},r})();function nB(r){var e=r.series,t=r.dataIndex,n=r.multipleSeries,a=e.getData(),i=a.mapDimensionsAll("defaultedTooltip"),o=i.length,s=e.getRawValue(t),l=le(s),u=tB(e,t),c,f,d,h;if(o>1||l&&!o){var v=DX(s,e,t,i,u);c=v.inlineValues,f=v.inlineValueTypes,d=v.blocks,h=v.inlineValues[0]}else if(o){var y=a.getDimensionInfo(i[0]);h=c=pc(a,t,i[0]),f=y.type}else h=c=l?s[0]:s;var m=vT(e),x=m&&e.name||"",_=a.getName(t),T=n?x:_;return rr("section",{header:x,noHeader:n||!m,sortParam:h,blocks:[rr("nameValue",{markerType:"item",markerColor:u,name:T,noName:!Mn(T),value:c,valueType:f,dataIndex:t})].concat(d||[])})}function DX(r,e,t,n,a){var i=e.getData(),o=Qn(r,function(f,d,h){var v=i.getDimensionInfo(h);return f=f||v&&v.tooltip!==!1&&v.displayName!=null},!1),s=[],l=[],u=[];n.length?z(n,function(f){c(pc(i,t,f),f)}):z(r,c);function c(f,d){var h=i.getDimensionInfo(d);!h||h.otherDims.tooltip===!1||(o?u.push(rr("nameValue",{markerType:"subItem",markerColor:a,name:h.displayName,value:f,valueType:h.type})):(s.push(f),l.push(h.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Mo=et();function Rv(r,e){return r.getName(e)||r.getId(e)}var Og="__universalTransitionEnabled",St=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,n,a){this.seriesIndex=this.componentIndex,this.dataTask=Gd({count:RX,reset:EX}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,a);var i=Mo(this).sourceManager=new Z5(this);i.prepareSource();var o=this.getInitialData(t,a);QI(o,this),this.dataTask.context.data=o,Mo(this).dataBeforeProcessed=o,qI(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(t,n){var a=oh(this),i=a?Nl(t):{},o=this.subType;Je.hasClass(o)&&(o+="Series"),Ye(t,n.getTheme().get(this.subType)),Ye(t,this.getDefaultOption()),wl(t,"label",["show"]),this.fillDataTextStyle(t.data),a&&oi(t,i,a)},e.prototype.mergeOption=function(t,n){t=Ye(this.option,t,!0),this.fillDataTextStyle(t.data);var a=oh(this);a&&oi(this.option,t,a);var i=Mo(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(t,n);QI(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Mo(this).dataBeforeProcessed=o,qI(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!en(t))for(var n=["show"],a=0;a<t.length;a++)t[a]&&t[a].label&&wl(t[a],"label",n)},e.prototype.getInitialData=function(t,n){},e.prototype.appendData=function(t){var n=this.getRawData();n.appendData(t.data)},e.prototype.getData=function(t){var n=k_(this);if(n){var a=n.context.data;return t==null||!a.getLinkedData?a:a.getLinkedData(t)}else return Mo(this).data},e.prototype.getAllData=function(){var t=this.getData();return t&&t.getLinkedDataAll?t.getLinkedDataAll():[{data:t}]},e.prototype.setData=function(t){var n=k_(this);if(n){var a=n.context;a.outputData=t,n!==this.dataTask&&(a.data=t)}Mo(this).data=t},e.prototype.getEncode=function(){var t=this.get("encode",!0);if(t)return we(t)},e.prototype.getSourceManager=function(){return Mo(this).sourceManager},e.prototype.getSource=function(){return this.getSourceManager().getSource()},e.prototype.getRawData=function(){return Mo(this).dataBeforeProcessed},e.prototype.getColorBy=function(){var t=this.get("colorBy");return t||"series"},e.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},e.prototype.getBaseAxis=function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},e.prototype.indicesOfNearest=function(t,n,a,i){var o=this.getData(),s=this.coordinateSystem,l=s&&s.getAxis(t);if(!s||!l)return[];var u=l.dataToCoord(a);i==null&&(i=1/0);var c=[],f=1/0,d=-1,h=0;return o.each(n,function(v,y){var m=l.dataToCoord(v),x=u-m,_=Math.abs(x);_<=i&&((_<f||_===f&&x>=0&&d<0)&&(f=_,d=x,h=0),x===d&&(c[h++]=y))}),c.length=h,c},e.prototype.formatTooltip=function(t,n,a){return nB({series:this,dataIndex:t,multipleSeries:n})},e.prototype.isAnimationEnabled=function(){var t=this.ecModel;if(ot.node&&!(t&&t.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,n,a){var i=this.ecModel,o=QT.prototype.getColorFromPalette.call(this,t,n,a);return o||(o=i.getColorFromPalette(t,n,a)),o},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,n){this._innerSelect(this.getData(n),t)},e.prototype.unselect=function(t,n){var a=this.option.selectedMap;if(a){var i=this.option.selectedMode,o=this.getData(n);if(i==="series"||a==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<t.length;s++){var l=t[s],u=Rv(o,l);a[u]=!1,this._selectedDataIndicesMap[u]=-1}}},e.prototype.toggleSelect=function(t,n){for(var a=[],i=0;i<t.length;i++)a[0]=t[i],this.isSelected(t[i],n)?this.unselect(a,n):this.select(a,n)},e.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var t=this._selectedDataIndicesMap,n=st(t),a=[],i=0;i<n.length;i++){var o=t[n[i]];o>=0&&a.push(o)}return a},e.prototype.isSelected=function(t,n){var a=this.option.selectedMap;if(!a)return!1;var i=this.getData(n);return(a==="all"||a[Rv(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Og])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,n){var a,i,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){Pe(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c<l;c++){var f=n[c],d=Rv(t,f);u[d]=!0,this._selectedDataIndicesMap[d]=t.getRawIndex(f)}}else if(s==="single"||s===!0){var h=n[l-1],d=Rv(t,h);o.selectedMap=(a={},a[d]=!0,a),this._selectedDataIndicesMap=(i={},i[d]=t.getRawIndex(h),i)}}},e.prototype._initSelectedMapFromData=function(t){if(!this.option.selectedMap){var n=[];t.hasItemOption&&t.each(function(a){var i=t.getRawDataItem(a);i&&i.selected&&n.push(a)}),n.length>0&&this._innerSelect(t,n)}},e.registerClass=function(t){return Je.registerClass(t)},e.protoInitialize=(function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"})(),e})(Je);Wt(St,Pm);Wt(St,QT);xj(St,Je);function qI(r){var e=r.name;vT(r)||(r.name=PX(r)||e)}function PX(r){var e=r.getRawData(),t=e.mapDimensionsAll("seriesName"),n=[];return z(t,function(a){var i=e.getDimensionInfo(a);i.displayName&&n.push(i.displayName)}),n.join(" ")}function RX(r){return r.model.getRawData().count()}function EX(r){var e=r.model;return e.setData(e.getRawData().cloneShallow()),zX}function zX(r,e){e.outputData&&r.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function QI(r,e){z(sc(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(t){r.wrapMethod(t,$e(OX,e))})}function OX(r,e){var t=k_(r);return t&&t.setOutputEnd((e||this).count()),e}function k_(r){var e=(r.ecModel||{}).scheduler,t=e&&e.getPipeline(r.uid);if(t){var n=t.currentTask;if(n){var a=n.agentStubMap;a&&(n=a.get(r.uid))}return n}}var Ct=(function(){function r(){this.group=new Le,this.uid=Oc("viewComponent")}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,n,a){},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,n,a){},r.prototype.updateLayout=function(e,t,n,a){},r.prototype.updateVisual=function(e,t,n,a){},r.prototype.toggleBlurSeries=function(e,t,n){},r.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},r})();yT(Ct);xm(Ct);function Bc(){var r=et();return function(e){var t=r(e),n=e.pipelineContext,a=!!t.large,i=!!t.progressiveRender,o=t.large=!!(n&&n.large),s=t.progressiveRender=!!(n&&n.progressiveRender);return(a!==o||i!==s)&&"reset"}}var aB=et(),NX=Bc(),mt=(function(){function r(){this.group=new Le,this.uid=Oc("viewChart"),this.renderTask=Gd({plan:jX,reset:BX}),this.renderTask.context={view:this}}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,n,a){},r.prototype.highlight=function(e,t,n,a){var i=e.getData(a&&a.dataType);i&&eD(i,a,"emphasis")},r.prototype.downplay=function(e,t,n,a){var i=e.getData(a&&a.dataType);i&&eD(i,a,"normal")},r.prototype.remove=function(e,t){this.group.removeAll()},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,n,a){this.render(e,t,n,a)},r.prototype.updateLayout=function(e,t,n,a){this.render(e,t,n,a)},r.prototype.updateVisual=function(e,t,n,a){this.render(e,t,n,a)},r.prototype.eachRendered=function(e){ls(this.group,e)},r.markUpdateMethod=function(e,t){aB(e).updateMethod=t},r.protoInitialize=(function(){var e=r.prototype;e.type="chart"})(),r})();function JI(r,e,t){r&&nh(r)&&(e==="emphasis"?Xi:Zi)(r,t)}function eD(r,e,t){var n=Tl(r,e),a=e&&e.highlightKey!=null?fU(e.highlightKey):null;n!=null?z(Tt(n),function(i){JI(r.getItemGraphicEl(i),t,a)}):r.eachItemGraphicEl(function(i){JI(i,t,a)})}yT(mt);xm(mt);function jX(r){return NX(r.model)}function BX(r){var e=r.model,t=r.ecModel,n=r.api,a=r.payload,i=e.pipelineContext.progressiveRender,o=r.view,s=a&&aB(a).updateMethod,l=i?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,t,n,a),FX[l]}var FX={incrementalPrepareRender:{progress:function(r,e){e.view.incrementalRender(r,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(r,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},py="\0__throttleOriginMethod",tD="\0__throttleRate",rD="\0__throttleType";function Em(r,e,t){var n,a=0,i=0,o=null,s,l,u,c;e=e||0;function f(){i=new Date().getTime(),o=null,r.apply(l,u||[])}var d=function(){for(var h=[],v=0;v<arguments.length;v++)h[v]=arguments[v];n=new Date().getTime(),l=this,u=h;var y=c||e,m=c||t;c=null,s=n-(m?a:i)-y,clearTimeout(o),m?o=setTimeout(f,y):s>=0?f():o=setTimeout(f,-s),a=n};return d.clear=function(){o&&(clearTimeout(o),o=null)},d.debounceNextCall=function(h){c=h},d}function Fc(r,e,t,n){var a=r[e];if(a){var i=a[py]||a,o=a[rD],s=a[tD];if(s!==t||o!==n){if(t==null||!n)return r[e]=i;a=r[e]=Em(i,t,n==="debounce"),a[py]=i,a[rD]=n,a[tD]=t}return a}}function lh(r,e){var t=r[e];t&&t[py]&&(t.clear&&t.clear(),r[e]=t[py])}var nD=et(),aD={itemStyle:Cl(s5,!0),lineStyle:Cl(o5,!0)},VX={lineStyle:"stroke",itemStyle:"fill"};function iB(r,e){var t=r.visualStyleMapper||aD[e];return t||(console.warn("Unknown style type '"+e+"'."),aD.itemStyle)}function oB(r,e){var t=r.visualDrawType||VX[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var GX={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData(),n=r.visualStyleAccessPath||"itemStyle",a=r.getModel(n),i=iB(r,n),o=i(a),s=a.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=oB(r,n),u=o[l],c=Me(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||f){var d=r.getColorFromPalette(r.name,null,e.getSeriesCount());o[l]||(o[l]=d,t.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||Me(o.fill)?d:o.fill,o.stroke=o.stroke==="auto"||Me(o.stroke)?d:o.stroke}if(t.setVisual("style",o),t.setVisual("drawType",l),!e.isSeriesFiltered(r)&&c)return t.setVisual("colorFromPalette",!1),{dataEach:function(h,v){var y=r.getDataParams(v),m=ie({},o);m[l]=c(y),h.setItemVisual(v,"style",m)}}}},Gf=new rt,WX={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!(r.ignoreStyleOnData||e.isSeriesFiltered(r))){var t=r.getData(),n=r.visualStyleAccessPath||"itemStyle",a=iB(r,n),i=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){Gf.option=l[n];var u=a(Gf),c=o.ensureUniqueItemVisual(s,"style");ie(c,u),Gf.option.decal&&(o.setItemVisual(s,"decal",Gf.option.decal),Gf.option.decal.dirty=!0),i in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},$X={performRawSeries:!0,overallReset:function(r){var e=we();r.eachSeries(function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var a=t.type+"-"+n,i=e.get(a);i||(i={},e.set(a,i)),nD(t).scope=i}}),r.eachSeries(function(t){if(!(t.isColorBySeries()||r.isSeriesFiltered(t))){var n=t.getRawData(),a={},i=t.getData(),o=nD(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=oB(t,s);i.each(function(u){var c=i.getRawIndex(u);a[c]=u}),n.each(function(u){var c=a[u],f=i.getItemVisual(c,"colorFromPalette");if(f){var d=i.ensureUniqueItemVisual(c,"style"),h=n.getName(u)||u+"",v=n.count();d[l]=t.getColorFromPalette(h,o,v)}})}})}},Ev=Math.PI;function HX(r,e){e=e||{},De(e,{text:"loading",textColor:ee.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:ee.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var t=new Le,n=new Qe({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(n);var a=new lt({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),i=new Qe({style:{fill:"none"},textContent:a,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(i);var o;return e.showSpinner&&(o=new Nh({shape:{startAngle:-Ev/2,endAngle:-Ev/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Ev*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Ev*3/2}).delay(300).start("circularInOut"),t.add(o)),t.resize=function(){var s=a.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(r.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),c=r.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:c}),i.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},t.resize(),t}var sB=(function(){function r(e,t,n,a){this._stageTaskMap=we(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),a=this._visualHandlers=a.slice(),this._allHandlers=n.concat(a)}return r.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(n){var a=n.overallTask;a&&a.dirty()})},r.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),a=n.context,i=!t&&n.progressiveEnabled&&(!a||a.progressiveRender)&&e.__idxInPipeline>n.blockIndex,o=i?n.step:null,s=a&&a.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},r.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),a=e.getData(),i=a.count(),o=n.progressiveEnabled&&t.incrementalPrepareRender&&i>=n.threshold,s=e.get("large")&&i>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?i:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=we();e.eachSeries(function(a){var i=a.getProgressive(),o=a.uid;n.set(o,{id:o,head:null,tail:null,threshold:a.getProgressiveThreshold(),progressiveEnabled:i&&!(a.preventIncremental&&a.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),t._pipe(a,a.dataTask)})},r.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;z(this._allHandlers,function(a){var i=e.get(a.uid)||e.set(a.uid,{}),o="";Rr(!(a.reset&&a.overallReset),o),a.reset&&this._createSeriesStageTask(a,i,t,n),a.overallReset&&this._createOverallStageTask(a,i,t,n)},this)},r.prototype.prepareView=function(e,t,n,a){var i=e.renderTask,o=i.context;o.model=t,o.ecModel=n,o.api=a,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},r.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},r.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},r.prototype._performStageTasks=function(e,t,n,a){a=a||{};var i=!1,o=this;z(e,function(l,u){if(!(a.visualType&&a.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),f=c.seriesTaskMap,d=c.overallTask;if(d){var h,v=d.agentStubMap;v.each(function(m){s(a,m)&&(m.dirty(),h=!0)}),h&&d.dirty(),o.updatePayload(d,n);var y=o.getPerformArgs(d,a.block);v.each(function(m){m.perform(y)}),d.perform(y)&&(i=!0)}else f&&f.each(function(m,x){s(a,m)&&m.dirty();var _=o.getPerformArgs(m,a.block);_.skip=!l.performRawSeries&&t.isSeriesFiltered(m.context.model),o.updatePayload(m,n),m.perform(_)&&(i=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=i||this.unfinished},r.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(n){t=n.dataTask.perform()||t}),this.unfinished=t||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},r.prototype.updatePayload=function(e,t){t!=="remain"&&(e.context.payload=t)},r.prototype._createSeriesStageTask=function(e,t,n,a){var i=this,o=t.seriesTaskMap,s=t.seriesTaskMap=we(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,a).each(c);function c(f){var d=f.uid,h=s.set(d,o&&o.get(d)||Gd({plan:KX,reset:qX,count:JX}));h.context={model:f,ecModel:n,api:a,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(f,h)}},r.prototype._createOverallStageTask=function(e,t,n,a){var i=this,o=t.overallTask=t.overallTask||Gd({reset:UX});o.context={ecModel:n,api:a,overallReset:e.overallReset,scheduler:i};var s=o.agentStubMap,l=o.agentStubMap=we(),u=e.seriesType,c=e.getTargetSeries,f=!0,d=!1,h="";Rr(!e.createOnAllSeries,h),u?n.eachRawSeriesByType(u,v):c?c(n,a).each(v):(f=!1,z(n.getSeries(),v));function v(y){var m=y.uid,x=l.set(m,s&&s.get(m)||(d=!0,Gd({reset:YX,onDirty:ZX})));x.context={model:y,overallProgress:f},x.agent=o,x.__block=f,i._pipe(y,x)}d&&o.dirty()},r.prototype._pipe=function(e,t){var n=e.uid,a=this._pipelineMap.get(n);!a.head&&(a.head=t),a.tail&&a.tail.pipe(t),a.tail=t,t.__idxInPipeline=a.count++,t.__pipeline=a},r.wrapStageHandler=function(e,t){return Me(e)&&(e={overallReset:e,seriesType:eZ(e)}),e.uid=Oc("stageHandler"),t&&(e.visualType=t),e},r})();function UX(r){r.overallReset(r.ecModel,r.api,r.payload)}function YX(r){return r.overallProgress&&XX}function XX(){this.agent.dirty(),this.getDownstream().dirty()}function ZX(){this.agent&&this.agent.dirty()}function KX(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function qX(r){r.useClearVisual&&r.data.clearAllVisual();var e=r.resetDefines=Tt(r.reset(r.model,r.ecModel,r.api,r.payload));return e.length>1?ue(e,function(t,n){return lB(n)}):QX}var QX=lB(0);function lB(r){return function(e,t){var n=t.data,a=t.resetDefines[r];if(a&&a.dataEach)for(var i=e.start;i<e.end;i++)a.dataEach(n,i);else a&&a.progress&&a.progress(e,n)}}function JX(r){return r.data.count()}function eZ(r){vy=null;try{r(uh,uB)}catch{}return vy}var uh={},uB={},vy;cB(uh,JT);cB(uB,E5);uh.eachSeriesByType=uh.eachRawSeriesByType=function(r){vy=r};uh.eachComponent=function(r){r.mainType==="series"&&r.subType&&(vy=r.subType)};function cB(r,e){for(var t in e.prototype)r[t]=Vt}var Re=ee.darkColor,tZ=Re.background,Wf=function(){return{axisLine:{lineStyle:{color:Re.axisLine}},splitLine:{lineStyle:{color:Re.axisSplitLine}},splitArea:{areaStyle:{color:[Re.backgroundTint,Re.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:Re.axisMinorSplitLine}},axisLabel:{color:Re.axisLabel},axisName:{}}},iD={label:{color:Re.secondary},itemStyle:{borderColor:Re.borderTint},dividerLineStyle:{color:Re.border}},fB={darkMode:!0,color:Re.theme,backgroundColor:tZ,axisPointer:{lineStyle:{color:Re.border},crossStyle:{color:Re.borderShade},label:{color:Re.tertiary}},legend:{textStyle:{color:Re.secondary},pageTextStyle:{color:Re.tertiary}},textStyle:{color:Re.secondary},title:{textStyle:{color:Re.primary},subtextStyle:{color:Re.quaternary}},toolbox:{iconStyle:{borderColor:Re.accent50}},tooltip:{backgroundColor:Re.neutral20,defaultBorderColor:Re.border,textStyle:{color:Re.tertiary}},dataZoom:{borderColor:Re.accent10,textStyle:{color:Re.tertiary},brushStyle:{color:Re.backgroundTint},handleStyle:{color:Re.neutral00,borderColor:Re.accent20},moveHandleStyle:{color:Re.accent40},emphasis:{handleStyle:{borderColor:Re.accent50}},dataBackground:{lineStyle:{color:Re.accent30},areaStyle:{color:Re.accent20}},selectedDataBackground:{lineStyle:{color:Re.accent50},areaStyle:{color:Re.accent30}}},visualMap:{textStyle:{color:Re.secondary},handleStyle:{borderColor:Re.neutral30}},timeline:{lineStyle:{color:Re.accent10},label:{color:Re.tertiary},controlStyle:{color:Re.accent30,borderColor:Re.accent30}},calendar:{itemStyle:{color:Re.neutral00,borderColor:Re.neutral20},dayLabel:{color:Re.tertiary},monthLabel:{color:Re.secondary},yearLabel:{color:Re.secondary}},matrix:{x:iD,y:iD,backgroundColor:{borderColor:Re.axisLine},body:{itemStyle:{borderColor:Re.borderTint}}},timeAxis:Wf(),logAxis:Wf(),valueAxis:Wf(),categoryAxis:Wf(),line:{symbol:"circle"},graph:{color:Re.theme},gauge:{title:{color:Re.secondary},axisLine:{lineStyle:{color:[[1,Re.neutral05]]}},axisLabel:{color:Re.axisLabel},detail:{color:Re.primary}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}},funnel:{itemStyle:{borderColor:Re.background}},radar:(function(){var r=Wf();return r.axisName={color:Re.axisLabel},r.axisLine.lineStyle.color=Re.neutral20,r})(),treemap:{breadcrumb:{itemStyle:{color:Re.neutral20,textStyle:{color:Re.secondary}},emphasis:{itemStyle:{color:Re.neutral30}}}},sunburst:{itemStyle:{borderColor:Re.background}},map:{itemStyle:{borderColor:Re.border,areaColor:Re.neutral10},label:{color:Re.tertiary},emphasis:{label:{color:Re.primary},itemStyle:{areaColor:Re.highlight}},select:{label:{color:Re.primary},itemStyle:{areaColor:Re.highlight}}},geo:{itemStyle:{borderColor:Re.border,areaColor:Re.neutral10},emphasis:{label:{color:Re.primary},itemStyle:{areaColor:Re.highlight}},select:{label:{color:Re.primary},itemStyle:{color:Re.highlight}}}};fB.categoryAxis.splitLine.show=!1;var rZ=(function(){function r(){}return r.prototype.normalizeQuery=function(e){var t={},n={},a={};if(pe(e)){var i=Xa(e);t.mainType=i.main||null,t.subType=i.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};z(e,function(l,u){for(var c=!1,f=0;f<o.length;f++){var d=o[f],h=u.lastIndexOf(d);if(h>0&&h===u.length-d.length){var v=u.slice(0,h);v!=="data"&&(t.mainType=v,t[d.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(n[u]=l,c=!0),c||(a[u]=l)})}return{cptQuery:t,dataQuery:n,otherQuery:a}},r.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var a=n.targetEl,i=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=t.cptQuery,u=t.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,i,"name")&&c(u,i,"dataIndex")&&c(u,i,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,a,i));function c(f,d,h,v){return f[h]==null||d[v||h]===f[h]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r})(),A_=["symbol","symbolSize","symbolRotate","symbolOffset"],oD=A_.concat(["symbolKeepAspect"]),nZ={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData();if(r.legendIcon&&t.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var n={},a={},i=!1,o=0;o<A_.length;o++){var s=A_[o],l=r.get(s);Me(l)?(i=!0,a[s]=l):n[s]=l}if(n.symbol=n.symbol||r.defaultSymbol,t.setVisual(ie({legendIcon:r.legendIcon||n.symbol,symbolKeepAspect:r.get("symbolKeepAspect")},n)),e.isSeriesFiltered(r))return;var u=st(a);function c(f,d){for(var h=r.getRawValue(d),v=r.getDataParams(d),y=0;y<u.length;y++){var m=u[y];f.setItemVisual(d,m,a[m](h,v))}}return{dataEach:i?c:null}}},aZ={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!r.hasSymbolVisual||e.isSeriesFiltered(r))return;var t=r.getData();function n(a,i){for(var o=a.getItemModel(i),s=0;s<oD.length;s++){var l=oD[s],u=o.getShallow(l,!0);u!=null&&a.setItemVisual(i,l,u)}}return{dataEach:t.hasItemOption?n:null}}};function aC(r,e,t){switch(t){case"color":var n=r.getItemVisual(e,"style");return n[r.getVisual("drawType")];case"opacity":return r.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getItemVisual(e,t)}}function Gh(r,e){switch(e){case"color":var t=r.getVisual("style");return t[r.getVisual("drawType")];case"opacity":return r.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getVisual(e)}}function dB(r,e,t,n){switch(t){case"color":var a=r.ensureUniqueItemVisual(e,"style");a[r.getVisual("drawType")]=n,r.setItemVisual(e,"colorFromPalette",!1);break;case"opacity":r.ensureUniqueItemVisual(e,"style").opacity=n;break;case"symbol":case"symbolSize":case"liftZ":r.setItemVisual(e,t,n);break}}function hB(r,e){function t(n,a){var i=[];return n.eachComponent({mainType:"series",subType:r,query:a},function(o){i.push(o.seriesIndex)}),i}z([[r+"ToggleSelect","toggleSelect"],[r+"Select","select"],[r+"UnSelect","unselect"]],function(n){e(n[0],function(a,i,o){a=ie({},a),o.dispatchAction(ie(a,{type:n[1],seriesIndex:t(i,a)}))})})}function wu(r,e,t,n,a){var i=r+e;t.isSilent(i)||n.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=a.selected,c=0;c<u.length;c++)if(u[c].seriesIndex===s){var f=o.getData(),d=Tl(f,a.fromActionPayload);t.trigger(i,{type:i,seriesId:o.id,name:le(d)?f.getName(d[0]):f.getName(d),selected:pe(l)?l:ie({},l)})}})}function iZ(r,e,t){r.on("selectchanged",function(n){var a=t.getModel();n.isFromClick?(wu("map","selectchanged",e,a,n),wu("pie","selectchanged",e,a,n)):n.fromAction==="select"?(wu("map","selected",e,a,n),wu("pie","selected",e,a,n)):n.fromAction==="unselect"&&(wu("map","unselected",e,a,n),wu("pie","unselected",e,a,n))})}function dl(r,e,t){for(var n;r&&!(e(r)&&(n=r,t));)r=r.__hostTarget||r.parent;return n}var oZ=Math.round(Math.random()*9),sZ=typeof Object.defineProperty=="function",lZ=(function(){function r(){this._id="__ec_inner_"+oZ++}return r.prototype.get=function(e){return this._guard(e)[this._id]},r.prototype.set=function(e,t){var n=this._guard(e);return sZ?Object.defineProperty(n,this._id,{value:t,enumerable:!1,configurable:!0}):n[this._id]=t,this},r.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},r.prototype.has=function(e){return!!this._guard(e)[this._id]},r.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},r})(),uZ=nt.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,e){var t=e.cx,n=e.cy,a=e.width/2,i=e.height/2;r.moveTo(t,n-i),r.lineTo(t+a,n+i),r.lineTo(t-a,n+i),r.closePath()}}),cZ=nt.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,e){var t=e.cx,n=e.cy,a=e.width/2,i=e.height/2;r.moveTo(t,n-i),r.lineTo(t+a,n),r.lineTo(t,n+i),r.lineTo(t-a,n),r.closePath()}}),fZ=nt.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,e){var t=e.x,n=e.y,a=e.width/5*3,i=Math.max(a,e.height),o=a/2,s=o*o/(i-o),l=n-i+o+s,u=Math.asin(s/o),c=Math.cos(u)*o,f=Math.sin(u),d=Math.cos(u),h=o*.6,v=o*.7;r.moveTo(t-c,l+s),r.arc(t,l,o,Math.PI-u,Math.PI*2+u),r.bezierCurveTo(t+c-f*h,l+s+d*h,t,n-v,t,n),r.bezierCurveTo(t,n-v,t-c+f*h,l+s+d*h,t-c,l+s),r.closePath()}}),dZ=nt.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,e){var t=e.height,n=e.width,a=e.x,i=e.y,o=n/3*2;r.moveTo(a,i),r.lineTo(a+o,i+t),r.lineTo(a,i+t/4*3),r.lineTo(a-o,i+t),r.lineTo(a,i),r.closePath()}}),hZ={line:Zt,rect:Qe,roundRect:Qe,square:Qe,circle:fi,diamond:cZ,pin:fZ,arrow:dZ,triangle:uZ},pZ={line:function(r,e,t,n,a){a.x1=r,a.y1=e+n/2,a.x2=r+t,a.y2=e+n/2},rect:function(r,e,t,n,a){a.x=r,a.y=e,a.width=t,a.height=n},roundRect:function(r,e,t,n,a){a.x=r,a.y=e,a.width=t,a.height=n,a.r=Math.min(t,n)/4},square:function(r,e,t,n,a){var i=Math.min(t,n);a.x=r,a.y=e,a.width=i,a.height=i},circle:function(r,e,t,n,a){a.cx=r+t/2,a.cy=e+n/2,a.r=Math.min(t,n)/2},diamond:function(r,e,t,n,a){a.cx=r+t/2,a.cy=e+n/2,a.width=t,a.height=n},pin:function(r,e,t,n,a){a.x=r+t/2,a.y=e+n/2,a.width=t,a.height=n},arrow:function(r,e,t,n,a){a.x=r+t/2,a.y=e+n/2,a.width=t,a.height=n},triangle:function(r,e,t,n,a){a.cx=r+t/2,a.cy=e+n/2,a.width=t,a.height=n}},gy={};z(hZ,function(r,e){gy[e]=new r});var vZ=nt.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(r,e,t){var n=ay(r,e,t),a=this.shape;return a&&a.symbolType==="pin"&&e.position==="inside"&&(n.y=t.y+t.height*.4),n},buildPath:function(r,e,t){var n=e.symbolType;if(n!=="none"){var a=gy[n];a||(n="rect",a=gy[n]),pZ[n](e.x,e.y,e.width,e.height,a.shape),a.buildPath(r,a.shape,t)}}});function gZ(r,e){if(this.type!=="image"){var t=this.style;this.__isEmptyBrush?(t.stroke=r,t.fill=e||ee.color.neutral00,t.lineWidth=2):this.shape.symbolType==="line"?t.stroke=r:t.fill=r,this.markRedraw()}}function Kt(r,e,t,n,a,i,o){var s=r.indexOf("empty")===0;s&&(r=r.substr(5,1).toLowerCase()+r.substr(6));var l;return r.indexOf("image://")===0?l=LT(r.slice(8),new ze(e,t,n,a),o?"center":"cover"):r.indexOf("path://")===0?l=dc(r.slice(7),{},new ze(e,t,n,a),o?"center":"cover"):l=new vZ({shape:{symbolType:r,x:e,y:t,width:n,height:a}}),l.__isEmptyBrush=s,l.setColor=gZ,i&&l.setColor(i),l}function Vc(r){return le(r)||(r=[+r,+r]),[r[0]||0,r[1]||0]}function Bl(r,e){if(r!=null)return le(r)||(r=[r,r]),[he(r[0],e[0])||0,he(Ce(r[1],r[0]),e[1])||0]}function hl(r){return isFinite(r)}function yZ(r,e,t){var n=e.x==null?0:e.x,a=e.x2==null?1:e.x2,i=e.y==null?0:e.y,o=e.y2==null?0:e.y2;e.global||(n=n*t.width+t.x,a=a*t.width+t.x,i=i*t.height+t.y,o=o*t.height+t.y),n=hl(n)?n:0,a=hl(a)?a:1,i=hl(i)?i:0,o=hl(o)?o:0;var s=r.createLinearGradient(n,i,a,o);return s}function mZ(r,e,t){var n=t.width,a=t.height,i=Math.min(n,a),o=e.x==null?.5:e.x,s=e.y==null?.5:e.y,l=e.r==null?.5:e.r;e.global||(o=o*n+t.x,s=s*a+t.y,l=l*i),o=hl(o)?o:.5,s=hl(s)?s:.5,l=l>=0&&hl(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function L_(r,e,t){for(var n=e.type==="radial"?mZ(r,e,t):yZ(r,e,t),a=e.colorStops,i=0;i<a.length;i++)n.addColorStop(a[i].offset,a[i].color);return n}function xZ(r,e){if(r===e||!r&&!e)return!1;if(!r||!e||r.length!==e.length)return!0;for(var t=0;t<r.length;t++)if(r[t]!==e[t])return!0;return!1}function zv(r){return parseInt(r,10)}function Zu(r,e,t){var n=["width","height"][e],a=["clientWidth","clientHeight"][e],i=["paddingLeft","paddingTop"][e],o=["paddingRight","paddingBottom"][e];if(t[n]!=null&&t[n]!=="auto")return parseFloat(t[n]);var s=document.defaultView.getComputedStyle(r);return(r[a]||zv(s[n])||zv(r.style[n]))-(zv(s[i])||0)-(zv(s[o])||0)|0}function SZ(r,e){return!r||r==="solid"||!(e>0)?null:r==="dashed"?[4*e,2*e]:r==="dotted"?[e]:ut(r)?[r]:le(r)?r:null}function iC(r){var e=r.style,t=e.lineDash&&e.lineWidth>0&&SZ(e.lineDash,e.lineWidth),n=e.lineDashOffset;if(t){var a=e.strokeNoScale&&r.getLineScale?r.getLineScale():1;a&&a!==1&&(t=ue(t,function(i){return i/a}),n/=a)}return[t,n]}var bZ=new ii(!0);function yy(r){var e=r.stroke;return!(e==null||e==="none"||!(r.lineWidth>0))}function sD(r){return typeof r=="string"&&r!=="none"}function my(r){var e=r.fill;return e!=null&&e!=="none"}function lD(r,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.fillOpacity*e.opacity,r.fill(),r.globalAlpha=t}else r.fill()}function uD(r,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.strokeOpacity*e.opacity,r.stroke(),r.globalAlpha=t}else r.stroke()}function I_(r,e,t){var n=mT(e.image,e.__image,t);if(Sm(n)){var a=r.createPattern(n,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&a&&a.setTransform){var i=new DOMMatrix;i.translateSelf(e.x||0,e.y||0),i.rotateSelf(0,0,(e.rotation||0)*Dd),i.scaleSelf(e.scaleX||1,e.scaleY||1),a.setTransform(i)}return a}}function _Z(r,e,t,n){var a,i=yy(t),o=my(t),s=t.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var c=e.path||bZ,f=e.__dirty;if(!n){var d=t.fill,h=t.stroke,v=o&&!!d.colorStops,y=i&&!!h.colorStops,m=o&&!!d.image,x=i&&!!h.image,_=void 0,T=void 0,C=void 0,k=void 0,A=void 0;(v||y)&&(A=e.getBoundingRect()),v&&(_=f?L_(r,d,A):e.__canvasFillGradient,e.__canvasFillGradient=_),y&&(T=f?L_(r,h,A):e.__canvasStrokeGradient,e.__canvasStrokeGradient=T),m&&(C=f||!e.__canvasFillPattern?I_(r,d,e):e.__canvasFillPattern,e.__canvasFillPattern=C),x&&(k=f||!e.__canvasStrokePattern?I_(r,h,e):e.__canvasStrokePattern,e.__canvasStrokePattern=k),v?r.fillStyle=_:m&&(C?r.fillStyle=C:o=!1),y?r.strokeStyle=T:x&&(k?r.strokeStyle=k:i=!1)}var L=e.getGlobalScale();c.setScale(L[0],L[1],e.segmentIgnoreThreshold);var D,P;r.setLineDash&&t.lineDash&&(a=iC(e),D=a[0],P=a[1]);var E=!0;(u||f&Fu)&&(c.setDPR(r.dpr),l?c.setContext(null):(c.setContext(r),E=!1),c.reset(),e.buildPath(c,e.shape,n),c.toStatic(),e.pathUpdated()),E&&c.rebuildPath(r,l?s:1),D&&(r.setLineDash(D),r.lineDashOffset=P),n||(t.strokeFirst?(i&&uD(r,t),o&&lD(r,t)):(o&&lD(r,t),i&&uD(r,t))),D&&r.setLineDash([])}function wZ(r,e,t){var n=e.__image=mT(t.image,e.__image,e,e.onload);if(!(!n||!Sm(n))){var a=t.x||0,i=t.y||0,o=e.getWidth(),s=e.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),t.sWidth&&t.sHeight){var u=t.sx||0,c=t.sy||0;r.drawImage(n,u,c,t.sWidth,t.sHeight,a,i,o,s)}else if(t.sx&&t.sy){var u=t.sx,c=t.sy,f=o-u,d=s-c;r.drawImage(n,u,c,f,d,a,i,o,s)}else r.drawImage(n,a,i,o,s)}}function TZ(r,e,t){var n,a=t.text;if(a!=null&&(a+=""),a){r.font=t.font||Ui,r.textAlign=t.textAlign,r.textBaseline=t.textBaseline;var i=void 0,o=void 0;r.setLineDash&&t.lineDash&&(n=iC(e),i=n[0],o=n[1]),i&&(r.setLineDash(i),r.lineDashOffset=o),t.strokeFirst?(yy(t)&&r.strokeText(a,t.x,t.y),my(t)&&r.fillText(a,t.x,t.y)):(my(t)&&r.fillText(a,t.x,t.y),yy(t)&&r.strokeText(a,t.x,t.y)),i&&r.setLineDash([])}}var cD=["shadowBlur","shadowOffsetX","shadowOffsetY"],fD=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function pB(r,e,t,n,a){var i=!1;if(!n&&(t=t||{},e===t))return!1;if(n||e.opacity!==t.opacity){dn(r,a),i=!0;var o=Math.max(Math.min(e.opacity,1),0);r.globalAlpha=isNaN(o)?gl.opacity:o}(n||e.blend!==t.blend)&&(i||(dn(r,a),i=!0),r.globalCompositeOperation=e.blend||gl.blend);for(var s=0;s<cD.length;s++){var l=cD[s];(n||e[l]!==t[l])&&(i||(dn(r,a),i=!0),r[l]=r.dpr*(e[l]||0))}return(n||e.shadowColor!==t.shadowColor)&&(i||(dn(r,a),i=!0),r.shadowColor=e.shadowColor||gl.shadowColor),i}function dD(r,e,t,n,a){var i=ch(e,a.inHover),o=n?null:t&&ch(t,a.inHover)||{};if(i===o)return!1;var s=pB(r,i,o,n,a);if((n||i.fill!==o.fill)&&(s||(dn(r,a),s=!0),sD(i.fill)&&(r.fillStyle=i.fill)),(n||i.stroke!==o.stroke)&&(s||(dn(r,a),s=!0),sD(i.stroke)&&(r.strokeStyle=i.stroke)),(n||i.opacity!==o.opacity)&&(s||(dn(r,a),s=!0),r.globalAlpha=i.opacity==null?1:i.opacity),e.hasStroke()){var l=i.lineWidth,u=l/(i.strokeNoScale&&e.getLineScale?e.getLineScale():1);r.lineWidth!==u&&(s||(dn(r,a),s=!0),r.lineWidth=u)}for(var c=0;c<fD.length;c++){var f=fD[c],d=f[0];(n||i[d]!==o[d])&&(s||(dn(r,a),s=!0),r[d]=i[d]||f[1])}return s}function CZ(r,e,t,n,a){return pB(r,ch(e,a.inHover),t&&ch(t,a.inHover),n,a)}function vB(r,e){var t=e.transform,n=r.dpr||1;t?r.setTransform(n*t[0],n*t[1],n*t[2],n*t[3],n*t[4],n*t[5]):r.setTransform(n,0,0,n,0,0)}function MZ(r,e,t){for(var n=!1,a=0;a<r.length;a++){var i=r[a];n=n||i.isZeroArea(),vB(e,i),e.beginPath(),i.buildPath(e,i.shape),e.clip()}t.allClipped=n}function kZ(r,e){return r&&e?r[0]!==e[0]||r[1]!==e[1]||r[2]!==e[2]||r[3]!==e[3]||r[4]!==e[4]||r[5]!==e[5]:!(!r&&!e)}var hD=1,pD=2,vD=3,gD=4;function AZ(r){var e=my(r),t=yy(r);return!(r.lineDash||!(+e^+t)||e&&typeof r.fill!="string"||t&&typeof r.stroke!="string"||r.strokePercent<1||r.strokeOpacity<1||r.fillOpacity<1)}function dn(r,e){e.batchFill&&r.fill(),e.batchStroke&&r.stroke(),e.batchFill="",e.batchStroke=""}function ch(r,e){return e&&r.__hoverStyle||r.style}function oC(r,e){pl(r,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function pl(r,e,t,n){var a=e.transform;if(!e.shouldBePainted(t.viewWidth,t.viewHeight,!1,!1)){e.__dirty&=~Tn,e.__isRendered=!1;return}var i=e.__clipPaths,o=t.prevElClipPaths,s=!1,l=!1;if((!o||xZ(i,o))&&(o&&o.length&&(dn(r,t),r.restore(),l=s=!0,t.prevElClipPaths=null,t.allClipped=!1,t.prevEl=null),i&&i.length&&(dn(r,t),r.save(),MZ(i,r,t),s=!0),t.prevElClipPaths=i),t.allClipped){e.__isRendered=!1;return}e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var u=t.prevEl;u||(l=s=!0);var c=e instanceof nt&&e.autoBatch&&AZ(e.style);s||kZ(a,u.transform)?(dn(r,t),vB(r,e)):c||dn(r,t);var f=ch(e,t.inHover);e instanceof nt?(t.lastDrawType!==hD&&(l=!0,t.lastDrawType=hD),dD(r,e,u,l,t),(!c||!t.batchFill&&!t.batchStroke)&&r.beginPath(),_Z(r,e,f,c),c&&(t.batchFill=f.fill||"",t.batchStroke=f.stroke||"")):e instanceof fc?(t.lastDrawType!==vD&&(l=!0,t.lastDrawType=vD),dD(r,e,u,l,t),TZ(r,e,f)):e instanceof gr?(t.lastDrawType!==pD&&(l=!0,t.lastDrawType=pD),CZ(r,e,u,l,t),wZ(r,e,f)):e.getTemporalDisplayables&&(t.lastDrawType!==gD&&(l=!0,t.lastDrawType=gD),LZ(r,e,t)),c&&n&&dn(r,t),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),t.prevEl=e,e.__dirty=0,e.__isRendered=!0}function LZ(r,e,t){var n=e.getDisplayables(),a=e.getTemporalDisplayables();r.save();var i={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:t.viewWidth,viewHeight:t.viewHeight,inHover:t.inHover},o,s;for(o=e.getCursor(),s=n.length;o<s;o++){var l=n[o];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),pl(r,l,i,o===s-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),i.prevEl=l}for(var u=0,c=a.length;u<c;u++){var l=a[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),pl(r,l,i,u===c-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),i.prevEl=l}e.clearTemporalDisplayables(),e.notClear=!0,r.restore()}var G1=new lZ,yD=new lc(100),mD=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function vc(r,e){if(r==="none")return null;var t=e.getDevicePixelRatio(),n=e.getZr(),a=n.painter.type==="svg";r.dirty&&G1.delete(r);var i=G1.get(r);if(i)return i;var o=De(r,{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=a?1:1/t,G1.set(r,s),r.dirty=!1,s;function l(u){for(var c=[t],f=!0,d=0;d<mD.length;++d){var h=o[mD[d]];if(h!=null&&!le(h)&&!pe(h)&&!ut(h)&&typeof h!="boolean"){f=!1;break}c.push(h)}var v;if(f){v=c.join(",")+(a?"-svg":"");var y=yD.get(v);y&&(a?u.svgElement=y:u.image=y)}var m=yB(o.dashArrayX),x=IZ(o.dashArrayY),_=gB(o.symbol),T=DZ(m),C=mB(x),k=!a&&pn.createCanvas(),A=a&&{tag:"g",attrs:{},key:"dcl",children:[]},L=P(),D;k&&(k.width=L.width*t,k.height=L.height*t,D=k.getContext("2d")),E(),f&&yD.put(v,k||A),u.image=k,u.svgElement=A,u.svgWidth=L.width,u.svgHeight=L.height;function P(){for(var O=1,B=0,N=T.length;B<N;++B)O=EL(O,T[B]);for(var W=1,B=0,N=_.length;B<N;++B)W=EL(W,_[B].length);O*=W;var H=C*T.length*_.length;return{width:Math.max(1,Math.min(O,o.maxTileWidth)),height:Math.max(1,Math.min(H,o.maxTileHeight))}}function E(){D&&(D.clearRect(0,0,k.width,k.height),o.backgroundColor&&(D.fillStyle=o.backgroundColor,D.fillRect(0,0,k.width,k.height)));for(var O=0,B=0;B<x.length;++B)O+=x[B];if(O<=0)return;for(var N=-C,W=0,H=0,$=0;N<L.height;){if(W%2===0){for(var Z=H/2%_.length,G=0,X=0,K=0;G<L.width*2;){for(var V=0,B=0;B<m[$].length;++B)V+=m[$][B];if(V<=0)break;if(X%2===0){var U=(1-o.symbolSize)*.5,ae=G+m[$][X]*U,ce=N+x[W]*U,re=m[$][X]*o.symbolSize,_e=x[W]*o.symbolSize,Ne=K/2%_[Z].length;ve(ae,ce,re,_e,_[Z][Ne])}G+=m[$][X],++K,++X,X===m[$].length&&(X=0)}++$,$===m.length&&($=0)}N+=x[W],++H,++W,W===x.length&&(W=0)}function ve(fe,Te,xe,Ie,dt){var ke=a?1:t,He=Kt(dt,fe*ke,Te*ke,xe*ke,Ie*ke,o.color,o.symbolKeepAspect);if(a){var tt=n.painter.renderOneToVNode(He);tt&&A.children.push(tt)}else oC(D,He)}}}}function gB(r){if(!r||r.length===0)return[["rect"]];if(pe(r))return[[r]];for(var e=!0,t=0;t<r.length;++t)if(!pe(r[t])){e=!1;break}if(e)return gB([r]);for(var n=[],t=0;t<r.length;++t)pe(r[t])?n.push([r[t]]):n.push(r[t]);return n}function yB(r){if(!r||r.length===0)return[[0,0]];if(ut(r)){var e=Math.ceil(r);return[[e,e]]}for(var t=!0,n=0;n<r.length;++n)if(!ut(r[n])){t=!1;break}if(t)return yB([r]);for(var a=[],n=0;n<r.length;++n)if(ut(r[n])){var e=Math.ceil(r[n]);a.push([e,e])}else{var e=ue(r[n],function(s){return Math.ceil(s)});e.length%2===1?a.push(e.concat(e)):a.push(e)}return a}function IZ(r){if(!r||typeof r=="object"&&r.length===0)return[0,0];if(ut(r)){var e=Math.ceil(r);return[e,e]}var t=ue(r,function(n){return Math.ceil(n)});return r.length%2?t.concat(t):t}function DZ(r){return ue(r,function(e){return mB(e)})}function mB(r){for(var e=0,t=0;t<r.length;++t)e+=r[t];return r.length%2===1?e*2:e}function PZ(r,e){r.eachRawSeries(function(t){if(!r.isSeriesFiltered(t)){var n=t.getData();n.hasItemVisual()&&n.each(function(o){var s=n.getItemVisual(o,"decal");if(s){var l=n.ensureUniqueItemVisual(o,"style");l.decal=vc(s,e)}});var a=n.getVisual("decal");if(a){var i=n.getVisual("style");i.decal=vc(a,e)}}})}var va=new ra,xB={};function RZ(r,e){xB[r]=e}function SB(r){return xB[r]}var bB={};function _B(r,e){bB[r]=e}function EZ(r){return bB[r]}var zZ="6.0.0",OZ={zrender:"6.0.0"},NZ=1,jZ=800,BZ=900,FZ=1e3,VZ=2e3,GZ=5e3,wB=1e3,WZ=1100,sC=2e3,TB=3e3,$Z=4e3,zm=4500,HZ=4600,UZ=5e3,YZ=6e3,CB=7e3,MB={PROCESSOR:{FILTER:FZ,SERIES_FILTER:jZ,STATISTIC:GZ},VISUAL:{LAYOUT:wB,PROGRESSIVE_LAYOUT:WZ,GLOBAL:sC,CHART:TB,POST_CHART_LAYOUT:HZ,COMPONENT:$Z,BRUSH:UZ,CHART_ITEM:zm,ARIA:YZ,DECAL:CB}},ar="__flagInMainProcess",Ov="__mainProcessVersion",br="__pendingUpdate",W1="__needsUpdateStatus",xD=/^[a-zA-Z0-9_]+$/,$1="__connectUpdateStatus",SD=0,XZ=1,ZZ=2;function kB(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(this.isDisposed()){this.id;return}return LB(this,r,e)}}function AB(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return LB(this,r,e)}}function LB(r,e,t){return t[0]=t[0]&&t[0].toLowerCase(),ra.prototype[e].apply(r,t)}var IB=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e})(ra),DB=IB.prototype;DB.on=AB("on");DB.off=AB("off");var Ys,H1,Nv,wi,jv,U1,Y1,Tu,Cu,bD,_D,X1,wD,Bv,TD,PB,Bn,CD,Mu,xy=(function(r){Q(e,r);function e(t,n,a){var i=r.call(this,new rZ)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],a=a||{},i._dom=t;var o="canvas",s="auto",l=!1;i[Ov]=1,a.ssr&&aj(function(d){var h=je(d),v=h.dataIndex;if(v!=null){var y=we();return y.set("series_index",h.seriesIndex),y.set("data_index",v),h.ssrType&&y.set("ssr_type",h.ssrType),y}});var u=i._zr=Qb(t,{renderer:a.renderer||o,devicePixelRatio:a.devicePixelRatio,width:a.width,height:a.height,ssr:a.ssr,useDirtyRect:Ce(a.useDirtyRect,l),useCoarsePointer:Ce(a.useCoarsePointer,s),pointerSize:a.pointerSize});i._ssr=a.ssr,i._throttledZrFlush=Em(ye(u.flush,u),17),i._updateTheme(n),i._locale=tY(a.locale||l5),i._coordSysMgr=new jc;var c=i._api=TD(i);function f(d,h){return d.__prio-h.__prio}return wg(by,f),wg(R_,f),i._scheduler=new sB(i,c,R_,by),i._messageCenter=new IB,i._initEvents(),i.resize=ye(i.resize,i),u.animation.on("frame",i._onframe,i),bD(u,i),_D(u,i),Xd(i),i}return e.prototype._onframe=function(){if(!this._disposed){CD(this);var t=this._scheduler;if(this[br]){var n=this[br].silent;this[ar]=!0,Mu(this);try{Ys(this),wi.update.call(this,null,this[br].updateParams)}catch(l){throw this[ar]=!1,this[br]=null,l}this._zr.flush(),this[ar]=!1,this[br]=null,Tu.call(this,n),Cu.call(this,n)}else if(t.unfinished){var a=NZ,i=this._model,o=this._api;t.unfinished=!1;do{var s=+new Date;t.performSeriesTasks(i),t.performDataProcessorTasks(i),U1(this,i),t.performVisualTasks(i),Bv(this,this._model,o,"remain",{}),a-=+new Date-s}while(a>0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,n,a){if(!this[ar]){if(this._disposed){this.id;return}var i,o,s;if(Pe(n)&&(a=n.lazyUpdate,i=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[ar]=!0,Mu(this),!this._model||n){var l=new jY(this._api),u=this._theme,c=this._model=new JT;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:o},E_);var f={seriesTransition:s,optionChanged:!0};if(a)this[br]={silent:i,updateParams:f},this[ar]=!1,this.getZr().wakeUp();else{try{Ys(this),wi.update.call(this,null,f)}catch(d){throw this[br]=null,this[ar]=!1,d}this._ssr||this._zr.flush(),this[br]=null,this[ar]=!1,Tu.call(this,i),Cu.call(this,i)}}},e.prototype.setTheme=function(t,n){if(!this[ar]){if(this._disposed){this.id;return}var a=this._model;if(a){var i=n&&n.silent,o=null;this[br]&&(i==null&&(i=this[br].silent),o=this[br].updateParams,this[br]=null),this[ar]=!0,Mu(this);try{this._updateTheme(t),a.setTheme(this._theme),Ys(this),wi.update.call(this,{type:"setTheme"},o)}catch(s){throw this[ar]=!1,s}this[ar]=!1,Tu.call(this,i),Cu.call(this,i)}}},e.prototype._updateTheme=function(t){pe(t)&&(t=RB[t]),t&&(t=Ae(t),t&&O5(t,!0),this._theme=t)},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||ot.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var n=this._zr.painter;return n.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){var t=this._zr,n=t.storage.getDisplayList();return z(n,function(a){a.stopAnimation(null,!0)}),t.painter.toDataURL()},e.prototype.getDataURL=function(t){if(this._disposed){this.id;return}t=t||{};var n=t.excludeComponents,a=this._model,i=[],o=this;z(n,function(l){a.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(i.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return z(i,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(t){if(this._disposed){this.id;return}var n=t.type==="svg",a=this.group,i=Math.min,o=Math.max,s=1/0;if(_y[a]){var l=s,u=s,c=-s,f=-s,d=[],h=t&&t.pixelRatio||this.getDevicePixelRatio();z(xl,function(T,C){if(T.group===a){var k=n?T.getZr().painter.getSvgDom().innerHTML:T.renderToCanvas(Ae(t)),A=T.getDom().getBoundingClientRect();l=i(A.left,l),u=i(A.top,u),c=o(A.right,c),f=o(A.bottom,f),d.push({dom:k,left:A.left,top:A.top})}}),l*=h,u*=h,c*=h,f*=h;var v=c-l,y=f-u,m=pn.createCanvas(),x=Qb(m,{renderer:n?"svg":"canvas"});if(x.resize({width:v,height:y}),n){var _="";return z(d,function(T){var C=T.left-l,k=T.top-u;_+='<g transform="translate('+C+","+k+')">'+T.dom+"</g>"}),x.painter.getSvgRoot().innerHTML=_,t.connectedBackgroundColor&&x.painter.setBackgroundColor(t.connectedBackgroundColor),x.refreshImmediately(),x.painter.toDataURL()}else return t.connectedBackgroundColor&&x.add(new Qe({shape:{x:0,y:0,width:v,height:y},style:{fill:t.connectedBackgroundColor}})),z(d,function(T){var C=new gr({style:{x:T.left*h-l,y:T.top*h-u,image:T.dom}});x.add(C)}),x.refreshImmediately(),m.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,n,a){return jv(this,"convertToPixel",t,n,a)},e.prototype.convertToLayout=function(t,n,a){return jv(this,"convertToLayout",t,n,a)},e.prototype.convertFromPixel=function(t,n,a){return jv(this,"convertFromPixel",t,n,a)},e.prototype.containPixel=function(t,n){if(this._disposed){this.id;return}var a=this._model,i,o=ec(a,t);return z(o,function(s,l){l.indexOf("Models")>=0&&z(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)i=i||!!c.containPoint(n);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint&&(i=i||f.containPoint(n,u))}},this)},this),!!i},e.prototype.getVisual=function(t,n){var a=this._model,i=ec(a,t,{defaultMainType:"series"}),o=i.seriesModel,s=o.getData(),l=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?s.indexOfRawIndex(i.dataIndex):null;return l!=null?aC(s,l,n):Gh(s,n)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;z(KZ,function(a){var i=function(o){var s=t.getModel(),l=o.target,u,c=a==="globalout";if(c?u={}:l&&dl(l,function(y){var m=je(y);if(m&&m.dataIndex!=null){var x=m.dataModel||s.getSeriesByIndex(m.seriesIndex);return u=x&&x.getDataParams(m.dataIndex,m.dataType,l)||{},!0}else if(m.eventData)return u=ie({},m.eventData),!0},!0),u){var f=u.componentType,d=u.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",d=u.seriesIndex);var h=f&&d!=null&&s.getComponent(f,d),v=h&&t[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];u.event=o,u.type=a,t._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:h,view:v},t.trigger(a,u)}};i.zrEventfulCallAtLast=!0,t._zr.on(a,i,t)});var n=this._messageCenter;z(P_,function(a,i){n.on(i,function(o){t.trigger(i,o)})}),iZ(n,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var t=this.getDom();t&&gj(this.getDom(),uC,"");var n=this,a=n._api,i=n._model;z(n._componentsViews,function(o){o.dispose(i,a)}),z(n._chartsViews,function(o){o.dispose(i,a)}),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 xl[n.id]},e.prototype.resize=function(t){if(!this[ar]){if(this._disposed){this.id;return}this._zr.resize(t);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var a=n.resetOption("media"),i=t&&t.silent;this[br]&&(i==null&&(i=this[br].silent),a=!0,this[br]=null),this[ar]=!0,Mu(this);try{a&&Ys(this),wi.update.call(this,{type:"resize",animation:ie({duration:0},t&&t.animation)})}catch(o){throw this[ar]=!1,o}this[ar]=!1,Tu.call(this,i),Cu.call(this,i)}}},e.prototype.showLoading=function(t,n){if(this._disposed){this.id;return}if(Pe(t)&&(n=t,t=""),t=t||"default",this.hideLoading(),!!z_[t]){var a=z_[t](this._api,n),i=this._zr;this._loadingFX=a,i.add(a)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(t){var n=ie({},t);return n.type=D_[t.type],n},e.prototype.dispatchAction=function(t,n){if(this._disposed){this.id;return}if(Pe(n)||(n={silent:!!n}),!!Sy[t.type]&&this._model){if(this[ar]){this._pendingActions.push(t);return}var a=n.silent;Y1.call(this,t,a);var i=n.flush;i?this._zr.flush():i!==!1&&ot.browser.weChat&&this._throttledZrFlush(),Tu.call(this,a),Cu.call(this,a)}},e.prototype.updateLabelLayout=function(){va.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){this.id;return}var n=t.seriesIndex,a=this.getModel(),i=a.getSeriesByIndex(n);i.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=(function(){Ys=function(f){var d=f._scheduler;d.restorePipelines(f._model),d.prepareStageTasks(),H1(f,!0),H1(f,!1),d.plan()},H1=function(f,d){for(var h=f._model,v=f._scheduler,y=d?f._componentsViews:f._chartsViews,m=d?f._componentsMap:f._chartsMap,x=f._zr,_=f._api,T=0;T<y.length;T++)y[T].__alive=!1;d?h.eachComponent(function(A,L){A!=="series"&&C(L)}):h.eachSeries(C);function C(A){var L=A.__requireNewView;A.__requireNewView=!1;var D="_ec_"+A.id+"_"+A.type,P=!L&&m[D];if(!P){var E=Xa(A.type),O=d?Ct.getClass(E.main,E.sub):mt.getClass(E.sub);P=new O,P.init(h,_),m[D]=P,y.push(P),x.add(P.group)}A.__viewId=P.__id=D,P.__alive=!0,P.__model=A,P.group.__ecComponentInfo={mainType:A.mainType,index:A.componentIndex},!d&&v.prepareView(P,A,h,_)}for(var T=0;T<y.length;){var k=y[T];k.__alive?T++:(!d&&k.renderTask.dispose(),x.remove(k.group),k.dispose(h,_),y.splice(T,1),m[k.__id]===k&&delete m[k.__id],k.__id=k.group.__ecComponentInfo=null)}},Nv=function(f,d,h,v,y){var m=f._model;if(m.setUpdatePayload(h),!v){z([].concat(f._componentsViews).concat(f._chartsViews),k);return}var x={};x[v+"Id"]=h[v+"Id"],x[v+"Index"]=h[v+"Index"],x[v+"Name"]=h[v+"Name"];var _={mainType:v,query:x};y&&(_.subType=y);var T=h.excludeSeriesId,C;T!=null&&(C=we(),z(Tt(T),function(A){var L=ir(A,null);L!=null&&C.set(L,!0)})),m&&m.eachComponent(_,function(A){var L=C&&C.get(A.id)!=null;if(!L)if(uI(h))if(A instanceof St)h.type===yl&&!h.notBlur&&!A.get(["emphasis","disabled"])&&nU(A,h,f._api);else{var D=CT(A.mainType,A.componentIndex,h.name,f._api),P=D.focusSelf,E=D.dispatchers;h.type===yl&&P&&!h.notBlur&&c_(A.mainType,A.componentIndex,f._api),E&&z(E,function(O){h.type===yl?Xi(O):Zi(O)})}else d_(h)&&A instanceof St&&(oU(A,h,f._api),sI(A),Bn(f))},f),m&&m.eachComponent(_,function(A){var L=C&&C.get(A.id)!=null;L||k(f[v==="series"?"_chartsMap":"_componentsMap"][A.__viewId])},f);function k(A){A&&A.__alive&&A[d]&&A[d](A.__model,m,f._api,h)}},wi={prepareAndUpdate:function(f){Ys(this),wi.update.call(this,f,f&&{optionChanged:f.newOption!=null})},update:function(f,d){var h=this._model,v=this._api,y=this._zr,m=this._coordSysMgr,x=this._scheduler;if(h){h.setUpdatePayload(f),x.restoreData(h,f),x.performSeriesTasks(h),m.create(h,v),x.performDataProcessorTasks(h,f),U1(this,h),m.update(h,v),n(h),x.performVisualTasks(h,f);var _=h.get("backgroundColor")||"transparent";y.setBackgroundColor(_);var T=h.get("darkMode");T!=null&&T!=="auto"&&y.setDarkMode(T),X1(this,h,v,f,d),va.trigger("afterupdate",h,v)}},updateTransform:function(f){var d=this,h=this._model,v=this._api;if(h){h.setUpdatePayload(f);var y=[];h.eachComponent(function(x,_){if(x!=="series"){var T=d.getViewOfComponentModel(_);if(T&&T.__alive)if(T.updateTransform){var C=T.updateTransform(_,h,v,f);C&&C.update&&y.push(T)}else y.push(T)}});var m=we();h.eachSeries(function(x){var _=d._chartsMap[x.__viewId];if(_.updateTransform){var T=_.updateTransform(x,h,v,f);T&&T.update&&m.set(x.uid,1)}else m.set(x.uid,1)}),n(h),this._scheduler.performVisualTasks(h,f,{setDirty:!0,dirtyMap:m}),Bv(this,h,v,f,{},m),va.trigger("afterupdate",h,v)}},updateView:function(f){var d=this._model;d&&(d.setUpdatePayload(f),mt.markUpdateMethod(f,"updateView"),n(d),this._scheduler.performVisualTasks(d,f,{setDirty:!0}),X1(this,d,this._api,f,{}),va.trigger("afterupdate",d,this._api))},updateVisual:function(f){var d=this,h=this._model;h&&(h.setUpdatePayload(f),h.eachSeries(function(v){v.getData().clearAllVisual()}),mt.markUpdateMethod(f,"updateVisual"),n(h),this._scheduler.performVisualTasks(h,f,{visualType:"visual",setDirty:!0}),h.eachComponent(function(v,y){if(v!=="series"){var m=d.getViewOfComponentModel(y);m&&m.__alive&&m.updateVisual(y,h,d._api,f)}}),h.eachSeries(function(v){var y=d._chartsMap[v.__viewId];y.updateVisual(v,h,d._api,f)}),va.trigger("afterupdate",h,this._api))},updateLayout:function(f){wi.update.call(this,f)}};function t(f,d,h,v,y){if(f._disposed){f.id;return}for(var m=f._model,x=f._coordSysMgr.getCoordinateSystems(),_,T=ec(m,h),C=0;C<x.length;C++){var k=x[C];if(k[d]&&(_=k[d](m,T,v,y))!=null)return _}}jv=t,U1=function(f,d){var h=f._chartsMap,v=f._scheduler;d.eachSeries(function(y){v.updateStreamModes(y,h[y.__viewId])})},Y1=function(f,d){var h=this,v=this.getModel(),y=f.type,m=f.escapeConnect,x=Sy[y],_=(x.update||"update").split(":"),T=_.pop(),C=_[0]!=null&&Xa(_[0]);this[ar]=!0,Mu(this);var k=[f],A=!1;f.batch&&(A=!0,k=ue(f.batch,function($){return $=De(ie({},$),f),$.batch=null,$}));var L=[],D,P=[],E=x.nonRefinedEventType,O=d_(f),B=uI(f);if(B&&jj(this._api),z(k,function($){var Z=x.action($,v,h._api);if(x.refineEvent?P.push(Z):D=Z,D=D||ie({},$),D.type=E,L.push(D),B){var G=gT(f),X=G.queryOptionMap,K=G.mainTypeSpecified,V=K?X.keys()[0]:"series";Nv(h,T,$,V),Bn(h)}else O?(Nv(h,T,$,"series"),Bn(h)):C&&Nv(h,T,$,C.main,C.sub)}),T!=="none"&&!B&&!O&&!C)try{this[br]?(Ys(this),wi.update.call(this,f),this[br]=null):wi[T].call(this,f)}catch($){throw this[ar]=!1,$}if(A?D={type:E,escapeConnect:m,batch:L}:D=L[0],this[ar]=!1,!d){var N=void 0;if(x.refineEvent){var W=x.refineEvent(P,f,v,this._api).eventContent;Rr(Pe(W)),N=De({type:x.refinedEventType},W),N.fromAction=f.type,N.fromActionPayload=f,N.escapeConnect=!0}var H=this._messageCenter;H.trigger(D.type,D),N&&H.trigger(N.type,N)}},Tu=function(f){for(var d=this._pendingActions;d.length;){var h=d.shift();Y1.call(this,h,f)}},Cu=function(f){!f&&this.trigger("updated")},bD=function(f,d){f.on("rendered",function(h){d.trigger("rendered",h),f.animation.isFinished()&&!d[br]&&!d._scheduler.unfinished&&!d._pendingActions.length&&d.trigger("finished")})},_D=function(f,d){f.on("mouseover",function(h){var v=h.target,y=dl(v,nh);y&&(aU(y,h,d._api),Bn(d))}).on("mouseout",function(h){var v=h.target,y=dl(v,nh);y&&(iU(y,h,d._api),Bn(d))}).on("click",function(h){var v=h.target,y=dl(v,function(_){return je(_).dataIndex!=null},!0);if(y){var m=y.selected?"unselect":"select",x=je(y);d._api.dispatchAction({type:m,dataType:x.dataType,dataIndexInside:x.dataIndex,seriesIndex:x.seriesIndex,isFromClick:!0})}})};function n(f){f.clearColorPalette(),f.eachSeries(function(d){d.clearColorPalette()})}function a(f){var d=[],h=[],v=!1;if(f.eachComponent(function(_,T){var C=T.get("zlevel")||0,k=T.get("z")||0,A=T.getZLevelKey();v=v||!!A,(_==="series"?h:d).push({zlevel:C,z:k,idx:T.componentIndex,type:_,key:A})}),v){var y=d.concat(h),m,x;wg(y,function(_,T){return _.zlevel===T.zlevel?_.z-T.z:_.zlevel-T.zlevel}),z(y,function(_){var T=f.getComponent(_.type,_.idx),C=_.zlevel,k=_.key;m!=null&&(C=Math.max(m,C)),k?(C===m&&k!==x&&C++,x=k):x&&(C===m&&C++,x=""),m=C,T.setZLevel(C)})}}X1=function(f,d,h,v,y){a(d),wD(f,d,h,v,y),z(f._chartsViews,function(m){m.__alive=!1}),Bv(f,d,h,v,y),z(f._chartsViews,function(m){m.__alive||m.remove(d,h)})},wD=function(f,d,h,v,y,m){z(m||f._componentsViews,function(x){var _=x.__model;u(_,x),x.render(_,d,h,v),l(_,x),c(_,x)})},Bv=function(f,d,h,v,y,m){var x=f._scheduler;y=ie(y||{},{updatedSeries:d.getSeries()}),va.trigger("series:beforeupdate",d,h,y);var _=!1;d.eachSeries(function(T){var C=f._chartsMap[T.__viewId];C.__alive=!0;var k=C.renderTask;x.updatePayload(k,v),u(T,C),m&&m.get(T.uid)&&k.dirty(),k.perform(x.getPerformArgs(k))&&(_=!0),C.group.silent=!!T.get("silent"),s(T,C),sI(T)}),x.unfinished=_||x.unfinished,va.trigger("series:layoutlabels",d,h,y),va.trigger("series:transition",d,h,y),d.eachSeries(function(T){var C=f._chartsMap[T.__viewId];l(T,C),c(T,C)}),o(f,d),va.trigger("series:afterupdate",d,h,y)},Bn=function(f){f[W1]=!0,f.getZr().wakeUp()},Mu=function(f){f[Ov]=(f[Ov]+1)%1e3},CD=function(f){f[W1]&&(f.getZr().storage.traverse(function(d){tc(d)||i(d)}),f[W1]=!1)};function i(f){for(var d=[],h=f.currentStates,v=0;v<h.length;v++){var y=h[v];y==="emphasis"||y==="blur"||y==="select"||d.push(y)}f.selected&&f.states.select&&d.push("select"),f.hoverState===Cm&&f.states.emphasis?d.push("emphasis"):f.hoverState===zh&&f.states.blur&&d.push("blur"),f.useStates(d)}function o(f,d){var h=f._zr,v=h.storage,y=0;v.traverse(function(m){m.isGroup||y++}),y>d.get("hoverLayerThreshold")&&!ot.node&&!ot.worker&&d.eachSeries(function(m){if(!m.preventUsingHoverLayer){var x=f._chartsMap[m.__viewId];x.__alive&&x.eachRendered(function(_){_.states.emphasis&&(_.states.emphasis.hoverLayer=!0)})}})}function s(f,d){var h=f.get("blendMode")||null;d.eachRendered(function(v){v.isGroup||(v.style.blend=h)})}function l(f,d){if(!f.preventAutoZ){var h=Al(f);d.eachRendered(function(v){return Am(v,h.z,h.zlevel),!0})}}function u(f,d){d.eachRendered(function(h){if(!tc(h)){var v=h.getTextContent(),y=h.getTextGuideLine();h.stateTransition&&(h.stateTransition=null),v&&v.stateTransition&&(v.stateTransition=null),y&&y.stateTransition&&(y.stateTransition=null),h.hasState()?(h.prevStates=h.currentStates,h.clearStates()):h.prevStates&&(h.prevStates=null)}})}function c(f,d){var h=f.getModel("stateAnimation"),v=f.isAnimationEnabled(),y=h.get("duration"),m=y>0?{duration:y,delay:h.get("delay"),easing:h.get("easing")}:null;d.eachRendered(function(x){if(x.states&&x.states.emphasis){if(tc(x))return;if(x instanceof nt&&dU(x),x.__dirty){var _=x.prevStates;_&&x.useStates(_)}if(v){x.stateTransition=m;var T=x.getTextContent(),C=x.getTextGuideLine();T&&(T.stateTransition=m),C&&(C.stateTransition=m)}x.__dirty&&i(x)}})}TD=function(f){return new((function(d){Q(h,d);function h(){return d!==null&&d.apply(this,arguments)||this}return h.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},h.prototype.getComponentByElement=function(v){for(;v;){var y=v.__ecComponentInfo;if(y!=null)return f._model.getComponent(y.mainType,y.index);v=v.parent}},h.prototype.enterEmphasis=function(v,y){Xi(v,y),Bn(f)},h.prototype.leaveEmphasis=function(v,y){Zi(v,y),Bn(f)},h.prototype.enterBlur=function(v){Ej(v),Bn(f)},h.prototype.leaveBlur=function(v){TT(v),Bn(f)},h.prototype.enterSelect=function(v){zj(v),Bn(f)},h.prototype.leaveSelect=function(v){Oj(v),Bn(f)},h.prototype.getModel=function(){return f.getModel()},h.prototype.getViewOfComponentModel=function(v){return f.getViewOfComponentModel(v)},h.prototype.getViewOfSeriesModel=function(v){return f.getViewOfSeriesModel(v)},h.prototype.getMainProcessVersion=function(){return f[Ov]},h})(E5))(f)},PB=function(f){function d(h,v){for(var y=0;y<h.length;y++){var m=h[y];m[$1]=v}}z(D_,function(h,v){f._messageCenter.on(v,function(y){if(_y[f.group]&&f[$1]!==SD){if(y&&y.escapeConnect)return;var m=f.makeActionFromEvent(y),x=[];z(xl,function(_){_!==f&&_.group===f.group&&x.push(_)}),d(x,SD),z(x,function(_){_[$1]!==XZ&&_.dispatchAction(m)}),d(x,ZZ)}})})}})(),e})(ra),lC=xy.prototype;lC.on=kB("on");lC.off=kB("off");lC.one=function(r,e,t){var n=this;function a(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];e&&e.apply&&e.apply(this,i),n.off(r,a)}this.on.call(this,r,a,t)};var KZ=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var Sy={},D_={},P_={},R_=[],E_=[],by=[],RB={},z_={},xl={},_y={},qZ=+new Date-0,QZ=+new Date-0,uC="_echarts_instance_";function JZ(r,e,t){var n=!(t&&t.ssr);if(n){var a=cC(r);if(a)return a}var i=new xy(r,e,t);return i.id="ec_"+qZ++,xl[i.id]=i,n&&gj(r,uC,i.id),PB(i),va.trigger("afterinit",i),i}function eK(r){if(le(r)){var e=r;r=null,z(e,function(t){t.group!=null&&(r=t.group)}),r=r||"g_"+QZ++,z(e,function(t){t.group=r})}return _y[r]=!0,r}function EB(r){_y[r]=!1}var tK=EB;function rK(r){pe(r)?r=xl[r]:r instanceof xy||(r=cC(r)),r instanceof xy&&!r.isDisposed()&&r.dispose()}function cC(r){return xl[J7(r,uC)]}function nK(r){return xl[r]}function fC(r,e){RB[r]=e}function dC(r){Ue(E_,r)<0&&E_.push(r)}function hC(r,e){pC(R_,r,e,VZ)}function zB(r){Om("afterinit",r)}function OB(r){Om("afterupdate",r)}function Om(r,e){va.on(r,e)}function Aa(r,e,t){var n,a,i,o,s;Me(e)&&(t=e,e=""),Pe(r)?(n=r.type,a=r.event,o=r.update,s=r.publishNonRefinedEvent,t||(t=r.action),i=r.refineEvent):(n=r,a=e);function l(c){return c.toLowerCase()}a=l(a||n);var u=i?l(n):a;Sy[n]||(Rr(xD.test(n)&&xD.test(a)),i&&Rr(a!==n),Sy[n]={actionType:n,refinedEventType:a,nonRefinedEventType:u,update:o,action:t,refineEvent:i},P_[a]=1,i&&s&&(P_[u]=1),D_[u]=n)}function NB(r,e){jc.register(r,e)}function aK(r){var e=jc.get(r);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()}function iK(r,e){_B(r,e)}function jB(r,e){pC(by,r,e,wB,"layout")}function cs(r,e){pC(by,r,e,TB,"visual")}var MD=[];function pC(r,e,t,n,a){if((Me(e)||Pe(e))&&(t=e,e=n),!(Ue(MD,t)>=0)){MD.push(t);var i=sB.wrapStageHandler(t,a);i.__prio=e,i.__raw=t,r.push(i)}}function vC(r,e){z_[r]=e}function oK(r){bN({createCanvas:r})}function BB(r,e,t){var n=SB("registerMap");n&&n(r,e,t)}function sK(r){var e=SB("getMap");return e&&e(r)}var FB=gX;cs(sC,GX);cs(zm,WX);cs(zm,$X);cs(sC,nZ);cs(zm,aZ);cs(CB,PZ);dC(O5);hC(BZ,KY);vC("default",HX);Aa({type:yl,event:yl,update:yl},Vt);Aa({type:Ig,event:Ig,update:Ig},Vt);Aa({type:sy,event:_T,update:sy,action:Vt,refineEvent:gC,publishNonRefinedEvent:!0});Aa({type:l_,event:_T,update:l_,action:Vt,refineEvent:gC,publishNonRefinedEvent:!0});Aa({type:ly,event:_T,update:ly,action:Vt,refineEvent:gC,publishNonRefinedEvent:!0});function gC(r,e,t,n){return{eventContent:{selected:sU(t),isFromClick:e.isFromClick||!1}}}fC("default",{});fC("dark",fB);var lK={},kD=[],uK={registerPreprocessor:dC,registerProcessor:hC,registerPostInit:zB,registerPostUpdate:OB,registerUpdateLifecycle:Om,registerAction:Aa,registerCoordinateSystem:NB,registerLayout:jB,registerVisual:cs,registerTransform:FB,registerLoading:vC,registerMap:BB,registerImpl:RZ,PRIORITY:MB,ComponentModel:Je,ComponentView:Ct,SeriesModel:St,ChartView:mt,registerComponentModel:function(r){Je.registerClass(r)},registerComponentView:function(r){Ct.registerClass(r)},registerSeriesModel:function(r){St.registerClass(r)},registerChartView:function(r){mt.registerClass(r)},registerCustomSeries:function(r,e){_B(r,e)},registerSubTypeDefaulter:function(r,e){Je.registerSubTypeDefaulter(r,e)},registerPainter:function(r,e){rj(r,e)}};function Ze(r){if(le(r)){z(r,function(e){Ze(e)});return}Ue(kD,r)>=0||(kD.push(r),Me(r)&&(r={install:r}),r.install(uK))}function $f(r){return r==null?0:r.length||1}function AD(r){return r}var Ki=(function(){function r(e,t,n,a,i,o){this._old=e,this._new=t,this._oldKeyGetter=n||AD,this._newKeyGetter=a||AD,this.context=i,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(e){return this._add=e,this},r.prototype.update=function(e){return this._update=e,this},r.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},r.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},r.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},r.prototype.remove=function(e){return this._remove=e,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},a=new Array(e.length),i=new Array(t.length);this._initIndexMap(e,null,a,"_oldKeyGetter"),this._initIndexMap(t,n,i,"_newKeyGetter");for(var o=0;o<e.length;o++){var s=a[o],l=n[s],u=$f(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(i,n)},r.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},a={},i=[],o=[];this._initIndexMap(e,n,i,"_oldKeyGetter"),this._initIndexMap(t,a,o,"_newKeyGetter");for(var s=0;s<i.length;s++){var l=i[s],u=n[l],c=a[l],f=$f(u),d=$f(c);if(f>1&&d===1)this._updateManyToOne&&this._updateManyToOne(c,u),a[l]=null;else if(f===1&&d>1)this._updateOneToMany&&this._updateOneToMany(c,u),a[l]=null;else if(f===1&&d===1)this._update&&this._update(c,u),a[l]=null;else if(f>1&&d>1)this._updateManyToMany&&this._updateManyToMany(c,u),a[l]=null;else if(f>1)for(var h=0;h<f;h++)this._remove&&this._remove(u[h]);else this._remove&&this._remove(u)}this._performRestAdd(o,a)},r.prototype._performRestAdd=function(e,t){for(var n=0;n<e.length;n++){var a=e[n],i=t[a],o=$f(i);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(i[s]);else o===1&&this._add&&this._add(i);t[a]=null}},r.prototype._initIndexMap=function(e,t,n,a){for(var i=this._diffModeMultiple,o=0;o<e.length;o++){var s="_ec_"+this[a](e[o],o);if(i||(n[o]=s),!!t){var l=t[s],u=$f(l);u===0?(t[s]=o,i&&n.push(s)):u===1?t[s]=[l,o]:l.push(o)}}},r})(),cK=(function(){function r(e,t){this._encode=e,this._schema=t}return r.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},r.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},r})();function fK(r,e){var t={},n=t.encode={},a=we(),i=[],o=[],s={};z(r.dimensions,function(d){var h=r.getDimensionInfo(d),v=h.coordDim;if(v){var y=h.coordDimIndex;Z1(n,v)[y]=d,h.isExtraCoord||(a.set(v,1),dK(h.type)&&(i[0]=d),Z1(s,v)[y]=r.getDimensionIndex(h.name)),h.defaultTooltip&&o.push(d)}k5.each(function(m,x){var _=Z1(n,x),T=h.otherDims[x];T!=null&&T!==!1&&(_[T]=h.name)})});var l=[],u={};a.each(function(d,h){var v=n[h];u[h]=v[0],l=l.concat(v)}),t.dataDimsOnCoord=l,t.dataDimIndicesOnCoord=ue(l,function(d){return r.getDimensionInfo(d).storeDimIndex}),t.encodeFirstDimNotExtra=u;var c=n.label;c&&c.length&&(i=c.slice());var f=n.tooltip;return f&&f.length?o=f.slice():o.length||(o=i.slice()),n.defaultedLabel=i,n.defaultedTooltip=o,t.userOutput=new cK(s,e),t}function Z1(r,e){return r.hasOwnProperty(e)||(r[e]=[]),r[e]}function wy(r){return r==="category"?"ordinal":r==="time"?"time":"float"}function dK(r){return!(r==="ordinal"||r==="time")}var Ng=(function(){function r(e){this.otherDims={},e!=null&&ie(this,e)}return r})(),hK=et(),pK={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},VB=(function(){function r(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return r.prototype.isDimensionOmitted=function(){return this._dimOmitted},r.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=$B(this.source)))},r.prototype.getSourceDimensionIndex=function(e){return Ce(this._dimNameMap.get(e),-1)},r.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},r.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=j5(this.source),n=!HB(e),a="",i=[],o=0,s=0;o<e;o++){var l=void 0,u=void 0,c=void 0,f=this.dimensions[s];if(f&&f.storeDimIndex===o)l=t?f.name:null,u=f.type,c=f.ordinalMeta,s++;else{var d=this.getSourceDimension(o);d&&(l=t?d.name:null,u=d.type)}i.push({property:l,type:u,ordinalMeta:c}),t&&l!=null&&(!f||!f.isCalculationCoord)&&(a+=n?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),a+="$",a+=pK[u]||"f",c&&(a+=c.uid),a+="$"}var h=this.source,v=[h.seriesLayoutBy,h.startIndex,a].join("$$");return{dimensions:i,hash:v}},r.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,n=0;t<this._fullDimCount;t++){var a=void 0,i=this.dimensions[n];if(i&&i.storeDimIndex===t)i.isCalculationCoord||(a=i.name),n++;else{var o=this.getSourceDimension(t);o&&(a=o.name)}e.push(a)}return e},r.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},r})();function GB(r){return r instanceof VB}function WB(r){for(var e=we(),t=0;t<(r||[]).length;t++){var n=r[t],a=Pe(n)?n.name:n;a!=null&&e.get(a)==null&&e.set(a,t)}return e}function $B(r){var e=hK(r);return e.dimNameMap||(e.dimNameMap=WB(r.dimensionsDefine))}function HB(r){return r>30}var Hf=Pe,ko=ue,vK=typeof Int32Array>"u"?Array:Int32Array,gK="e\0\0",LD=-1,yK=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],mK=["_approximateExtent"],ID,Fv,Uf,Yf,K1,Xf,q1,Ur=(function(){function r(e,t){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,a=!1;GB(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(a=!0,n=e),n=n||["x","y"];for(var i={},o=[],s={},l=!1,u={},c=0;c<n.length;c++){var f=n[c],d=pe(f)?new Ng({name:f}):f instanceof Ng?f:new Ng(f),h=d.name;d.type=d.type||"float",d.coordDim||(d.coordDim=h,d.coordDimIndex=0);var v=d.otherDims=d.otherDims||{};o.push(h),i[h]=d,u[h]!=null&&(l=!0),d.createInvertedIndices&&(s[h]=[]);var y=c;ut(d.storeDimIndex)&&(y=d.storeDimIndex),v.itemName===0&&(this._nameDimIdx=y),v.itemId===0&&(this._idDimIdx=y),a&&(d.storeDimIndex=c)}if(this.dimensions=o,this._dimInfos=i,this._initGetDimensionInfo(l),this.hostModel=t,this._invertedIndicesMap=s,this._dimOmitted){var m=this._dimIdxToName=we();z(o,function(x){m.set(i[x].storeDimIndex,x)})}}return r.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(t==null)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var n=this._dimIdxToName.get(t);if(n!=null)return n;var a=this._schema.getSourceDimension(t);if(a)return a.name},r.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(t!=null)return t;if(e==null)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},r.prototype._recognizeDimIndex=function(e){if(ut(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},r.prototype._getStoreDimIndex=function(e){var t=this.getDimensionIndex(e);return t},r.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},r.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(n){return t.hasOwnProperty(n)?t[n]:void 0}:function(n){return t[n]}},r.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},r.prototype.mapDimension=function(e,t){var n=this._dimSummary;if(t==null)return n.encodeFirstDimNotExtra[e];var a=n.encode[e];return a?a[t]:null},r.prototype.mapDimensionsAll=function(e){var t=this._dimSummary,n=t.encode[e];return(n||[]).slice()},r.prototype.getStore=function(){return this._store},r.prototype.initData=function(e,t,n){var a=this,i;if(e instanceof T_&&(i=e),!i){var o=this.dimensions,s=eC(e)||Pr(e)?new B5(e,o.length):e;i=new T_;var l=ko(o,function(u){return{type:a._dimInfos[u].type,property:u}});i.initData(s,l,n)}this._store=i,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,i.count()),this._dimSummary=fK(this,this._schema),this.userOutput=this._dimSummary.userOutput},r.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},r.prototype.appendValues=function(e,t){var n=this._store.appendValues(e,t&&t.length),a=n.start,i=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var s=a;s<i;s++){var l=s-a;this._nameList[s]=t[l],o&&q1(this,s)}},r.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,n=0;n<t.length;n++){var a=this._dimInfos[t[n]];a.ordinalMeta&&e.collectOrdinalMeta(a.storeDimIndex,a.ordinalMeta)}},r.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==Zo&&!e.fillStorage},r.prototype._doInit=function(e,t){if(!(e>=t)){var n=this._store,a=n.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList,s=a.getSource().sourceFormat,l=s===Dn;if(l&&!a.pure)for(var u=[],c=e;c<t;c++){var f=a.getItem(c,u);if(!this.hasItemOption&&F7(f)&&(this.hasItemOption=!0),f){var d=f.name;i[c]==null&&d!=null&&(i[c]=ir(d,null));var h=f.id;o[c]==null&&h!=null&&(o[c]=ir(h,null))}}if(this._shouldMakeIdFromName())for(var c=e;c<t;c++)q1(this,c);ID(this)}},r.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},r.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},r.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},r.prototype.setCalculationInfo=function(e,t){Hf(e)?ie(this._calculationInfo,e):this._calculationInfo[e]=t},r.prototype.getName=function(e){var t=this.getRawIndex(e),n=this._nameList[t];return n==null&&this._nameDimIdx!=null&&(n=Uf(this,this._nameDimIdx,t)),n==null&&(n=""),n},r.prototype._getCategory=function(e,t){var n=this._store.get(e,t),a=this._store.getOrdinalMeta(e);return a?a.categories[n]:n},r.prototype.getId=function(e){return Fv(this,this.getRawIndex(e))},r.prototype.count=function(){return this._store.count()},r.prototype.get=function(e,t){var n=this._store,a=this._dimInfos[e];if(a)return n.get(a.storeDimIndex,t)},r.prototype.getByRawIndex=function(e,t){var n=this._store,a=this._dimInfos[e];if(a)return n.getByRawIndex(a.storeDimIndex,t)},r.prototype.getIndices=function(){return this._store.getIndices()},r.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},r.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},r.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},r.prototype.getValues=function(e,t){var n=this,a=this._store;return le(e)?a.getValues(ko(e,function(i){return n._getStoreDimIndex(i)}),t):a.getValues(e)},r.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,n=0,a=t.length;n<a;n++)if(isNaN(this._store.get(t[n],e)))return!1;return!0},r.prototype.indexOfName=function(e){for(var t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return-1},r.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},r.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},r.prototype.rawIndexOf=function(e,t){var n=e&&this._invertedIndicesMap[e],a=n&&n[t];return a==null||isNaN(a)?LD:a},r.prototype.each=function(e,t,n){Me(e)&&(n=t,t=e,e=[]);var a=n||this,i=ko(Yf(e),this._getStoreDimIndex,this);this._store.each(i,a?ye(t,a):t)},r.prototype.filterSelf=function(e,t,n){Me(e)&&(n=t,t=e,e=[]);var a=n||this,i=ko(Yf(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,a?ye(t,a):t),this},r.prototype.selectRange=function(e){var t=this,n={},a=st(e);return z(a,function(i){var o=t._getStoreDimIndex(i);n[o]=e[i]}),this._store=this._store.selectRange(n),this},r.prototype.mapArray=function(e,t,n){Me(e)&&(n=t,t=e,e=[]),n=n||this;var a=[];return this.each(e,function(){a.push(t&&t.apply(this,arguments))},n),a},r.prototype.map=function(e,t,n,a){var i=n||a||this,o=ko(Yf(e),this._getStoreDimIndex,this),s=Xf(this);return s._store=this._store.map(o,i?ye(t,i):t),s},r.prototype.modify=function(e,t,n,a){var i=n||a||this,o=ko(Yf(e),this._getStoreDimIndex,this);this._store.modify(o,i?ye(t,i):t)},r.prototype.downSample=function(e,t,n,a){var i=Xf(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,a),i},r.prototype.minmaxDownSample=function(e,t){var n=Xf(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),n},r.prototype.lttbDownSample=function(e,t){var n=Xf(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),n},r.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},r.prototype.getItemModel=function(e){var t=this.hostModel,n=this.getRawDataItem(e);return new rt(n,t,t&&t.ecModel)},r.prototype.diff=function(e){var t=this;return new Ki(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(n){return Fv(e,n)},function(n){return Fv(t,n)})},r.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},r.prototype.setVisual=function(e,t){this._visual=this._visual||{},Hf(e)?ie(this._visual,e):this._visual[e]=t},r.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e],a=n&&n[t];return a??this.getVisual(t)},r.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},r.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,a=n[e];a||(a=n[e]={});var i=a[t];return i==null&&(i=this.getVisual(t),le(i)?i=i.slice():Hf(i)&&(i=ie({},i)),a[t]=i),i},r.prototype.setItemVisual=function(e,t,n){var a=this._itemVisuals[e]||{};this._itemVisuals[e]=a,Hf(t)?ie(a,t):a[t]=n},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(e,t){Hf(e)?ie(this._layout,e):this._layout[e]=t},r.prototype.getLayout=function(e){return this._layout[e]},r.prototype.getItemLayout=function(e){return this._itemLayouts[e]},r.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?ie(this._itemLayouts[e]||{},t):t},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(e,t){var n=this.hostModel&&this.hostModel.seriesIndex;s_(n,this.dataType,e,t),this._graphicEls[e]=t},r.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},r.prototype.eachItemGraphicEl=function(e,t){z(this._graphicEls,function(n,a){n&&e&&e.call(t,n,a)})},r.prototype.cloneShallow=function(e){return e||(e=new r(this._schema?this._schema:ko(this.dimensions,this._getDimInfo,this),this.hostModel)),K1(e,this),e._store=this._store,e},r.prototype.wrapMethod=function(e,t){var n=this[e];Me(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var a=n.apply(this,arguments);return t.apply(this,[a].concat(dm(arguments)))})},r.internalField=(function(){ID=function(e){var t=e._invertedIndicesMap;z(t,function(n,a){var i=e._dimInfos[a],o=i.ordinalMeta,s=e._store;if(o){n=t[a]=new vK(o.categories.length);for(var l=0;l<n.length;l++)n[l]=LD;for(var l=0;l<s.count();l++)n[s.get(i.storeDimIndex,l)]=l}})},Uf=function(e,t,n){return ir(e._getCategory(t,n),null)},Fv=function(e,t){var n=e._idList[t];return n==null&&e._idDimIdx!=null&&(n=Uf(e,e._idDimIdx,t)),n==null&&(n=gK+t),n},Yf=function(e){return le(e)||(e=e!=null?[e]:[]),e},Xf=function(e){var t=new r(e._schema?e._schema:ko(e.dimensions,e._getDimInfo,e),e.hostModel);return K1(t,e),t},K1=function(e,t){z(yK.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,z(mK,function(n){e[n]=Ae(t[n])}),e._calculationInfo=ie({},t._calculationInfo)},q1=function(e,t){var n=e._nameList,a=e._idList,i=e._nameDimIdx,o=e._idDimIdx,s=n[t],l=a[t];if(s==null&&i!=null&&(n[t]=s=Uf(e,i,t)),l==null&&o!=null&&(a[t]=l=Uf(e,o,t)),l==null&&s!=null){var u=e._nameRepeatCount,c=u[s]=(u[s]||0)+1;l=s,c>1&&(l+="__ec__"+c),a[t]=l}}})(),r})();function xK(r,e){return Gc(r,e).dimensions}function Gc(r,e){eC(r)||(r=tC(r)),e=e||{};var t=e.coordDimensions||[],n=e.dimensionsDefine||r.dimensionsDefine||[],a=we(),i=[],o=bK(r,t,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&HB(o),l=n===r.dimensionsDefine,u=l?$B(r):WB(n),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(r,o));for(var f=we(c),d=new Y5(o),h=0;h<d.length;h++)d[h]=-1;function v(P){var E=d[P];if(E<0){var O=n[P],B=Pe(O)?O:{name:O},N=new Ng,W=B.name;W!=null&&u.get(W)!=null&&(N.name=N.displayName=W),B.type!=null&&(N.type=B.type),B.displayName!=null&&(N.displayName=B.displayName);var H=i.length;return d[P]=H,N.storeDimIndex=P,i.push(N),N}return i[E]}if(!s)for(var h=0;h<o;h++)v(h);f.each(function(P,E){var O=Tt(P).slice();if(O.length===1&&!pe(O[0])&&O[0]<0){f.set(E,!1);return}var B=f.set(E,[]);z(O,function(N,W){var H=pe(N)?u.get(N):N;H!=null&&H<o&&(B[W]=H,m(v(H),E,W))})});var y=0;z(t,function(P){var E,O,B,N;if(pe(P))E=P,N={};else{N=P,E=N.name;var W=N.ordinalMeta;N.ordinalMeta=null,N=ie({},N),N.ordinalMeta=W,O=N.dimsDef,B=N.otherDims,N.name=N.coordDim=N.coordDimIndex=N.dimsDef=N.otherDims=null}var H=f.get(E);if(H!==!1){if(H=Tt(H),!H.length)for(var $=0;$<(O&&O.length||1);$++){for(;y<o&&v(y).coordDim!=null;)y++;y<o&&H.push(y++)}z(H,function(Z,G){var X=v(Z);if(l&&N.type!=null&&(X.type=N.type),m(De(X,N),E,G),X.name==null&&O){var K=O[G];!Pe(K)&&(K={name:K}),X.name=X.displayName=K.name,X.defaultTooltip=K.defaultTooltip}B&&De(X.otherDims,B)})}});function m(P,E,O){k5.get(E)!=null?P.otherDims[E]=O:(P.coordDim=E,P.coordDimIndex=O,a.set(E,!0))}var x=e.generateCoord,_=e.generateCoordCount,T=_!=null;_=x?_||1:0;var C=x||"value";function k(P){P.name==null&&(P.name=P.coordDim)}if(s)z(i,function(P){k(P)}),i.sort(function(P,E){return P.storeDimIndex-E.storeDimIndex});else for(var A=0;A<o;A++){var L=v(A),D=L.coordDim;D==null&&(L.coordDim=_K(C,a,T),L.coordDimIndex=0,(!x||_<=0)&&(L.isExtraCoord=!0),_--),k(L),L.type==null&&(D5(r,A)===Lr.Must||L.isExtraCoord&&(L.otherDims.itemName!=null||L.otherDims.seriesName!=null))&&(L.type="ordinal")}return SK(i),new VB({source:r,dimensions:i,fullDimensionCount:o,dimensionOmitted:s})}function SK(r){for(var e=we(),t=0;t<r.length;t++){var n=r[t],a=n.name,i=e.get(a)||0;i>0&&(n.name=a+(i-1)),i++,e.set(a,i)}}function bK(r,e,t,n){var a=Math.max(r.dimensionsDetectedCount||1,e.length,t.length,n||0);return z(e,function(i){var o;Pe(i)&&(o=i.dimsDef)&&(a=Math.max(a,o.length))}),a}function _K(r,e,t){if(t||e.hasKey(r)){for(var n=0;e.hasKey(r+n);)n++;r+=n}return e.set(r,!0),r}var wK=(function(){function r(e){this.coordSysDims=[],this.axisMap=we(),this.categoryAxisMap=we(),this.coordSysName=e}return r})();function TK(r){var e=r.get("coordinateSystem"),t=new wK(e),n=CK[e];if(n)return n(r,t,t.axisMap,t.categoryAxisMap),t}var CK={cartesian2d:function(r,e,t,n){var a=r.getReferringComponents("xAxis",jt).models[0],i=r.getReferringComponents("yAxis",jt).models[0];e.coordSysDims=["x","y"],t.set("x",a),t.set("y",i),ku(a)&&(n.set("x",a),e.firstCategoryDimIndex=0),ku(i)&&(n.set("y",i),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(r,e,t,n){var a=r.getReferringComponents("singleAxis",jt).models[0];e.coordSysDims=["single"],t.set("single",a),ku(a)&&(n.set("single",a),e.firstCategoryDimIndex=0)},polar:function(r,e,t,n){var a=r.getReferringComponents("polar",jt).models[0],i=a.findAxisModel("radiusAxis"),o=a.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],t.set("radius",i),t.set("angle",o),ku(i)&&(n.set("radius",i),e.firstCategoryDimIndex=0),ku(o)&&(n.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(r,e,t,n){e.coordSysDims=["lng","lat"]},parallel:function(r,e,t,n){var a=r.ecModel,i=a.getComponent("parallel",r.get("parallelIndex")),o=e.coordSysDims=i.dimensions.slice();z(i.parallelAxisIndex,function(s,l){var u=a.getComponent("parallelAxis",s),c=o[l];t.set(c,u),ku(u)&&(n.set(c,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})},matrix:function(r,e,t,n){var a=r.getReferringComponents("matrix",jt).models[0];e.coordSysDims=["x","y"];var i=a.getDimensionModel("x"),o=a.getDimensionModel("y");t.set("x",i),t.set("y",o),n.set("x",i),n.set("y",o)}};function ku(r){return r.get("type")==="category"}function UB(r,e,t){t=t||{};var n=t.byIndex,a=t.stackedCoordDimension,i,o,s;MK(e)?i=e:(o=e.schema,i=o.dimensions,s=e.store);var l=!!(r&&r.get("stack")),u,c,f,d;if(z(i,function(_,T){pe(_)&&(i[T]=_={name:_}),l&&!_.isExtraCoord&&(!n&&!u&&_.ordinalMeta&&(u=_),!c&&_.type!=="ordinal"&&_.type!=="time"&&(!a||a===_.coordDim)&&(c=_))}),c&&!n&&!u&&(n=!0),c){f="__\0ecstackresult_"+r.id,d="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var h=c.coordDim,v=c.type,y=0;z(i,function(_){_.coordDim===h&&y++});var m={name:f,coordDim:h,coordDimIndex:y,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},x={name:d,coordDim:d,coordDimIndex:y+1,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};o?(s&&(m.storeDimIndex=s.ensureCalculationDimension(d,v),x.storeDimIndex=s.ensureCalculationDimension(f,v)),o.appendCalculationDimension(m),o.appendCalculationDimension(x)):(i.push(m),i.push(x))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:d,stackResultDimension:f}}function MK(r){return!GB(r.schema)}function qi(r,e){return!!e&&e===r.getCalculationInfo("stackedDimension")}function yC(r,e){return qi(r,e)?r.getCalculationInfo("stackResultDimension"):e}function kK(r,e){var t=r.get("coordinateSystem"),n=jc.get(t),a;return e&&e.coordSysDims&&(a=ue(e.coordSysDims,function(i){var o={name:i},s=e.axisMap.get(i);if(s){var l=s.get("type");o.type=wy(l)}return o})),a||(a=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),a}function AK(r,e,t){var n,a;return t&&z(r,function(i,o){var s=i.coordDim,l=t.categoryAxisMap.get(s);l&&(n==null&&(n=o),i.ordinalMeta=l.getOrdinalMeta(),e&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(a=!0)}),!a&&n!=null&&(r[n].otherDims.itemName=0),n}function di(r,e,t){t=t||{};var n=e.getSourceManager(),a,i=!1;r?(i=!0,a=tC(r)):(a=n.getSource(),i=a.sourceFormat===Dn);var o=TK(e),s=kK(e,o),l=t.useEncodeDefaulter,u=Me(l)?l:l?$e(I5,s,e):null,c={coordDimensions:s,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i},f=Gc(a,c),d=AK(f.dimensions,t.createInvertedIndices,o),h=i?null:n.getSharedDataStore(f),v=UB(e,{schema:f,store:h}),y=new Ur(f,e);y.setCalculationInfo(v);var m=d!=null&&LK(a)?function(x,_,T,C){return C===d?T:this.defaultDimValueGetter(x,_,T,C)}:null;return y.hasItemOption=!1,y.initData(i?a:h,null,m),y}function LK(r){if(r.sourceFormat===Dn){var e=IK(r.data||[]);return!le(Ac(e))}}function IK(r){for(var e=0;e<r.length&&r[e]==null;)e++;return r[e]}function O_(r){return r.type==="interval"||r.type==="log"}function DK(r,e,t,n,a){var i={},o=i.interval=hT(e/t,!0);n!=null&&o<n&&(o=i.interval=n),a!=null&&o>a&&(o=i.interval=a);var s=i.intervalPrecision=fh(o),l=i.niceTickExtent=[Xt(Math.ceil(r[0]/o)*o,s),Xt(Math.floor(r[1]/o)*o,s)];return PK(l,r),i}function Q1(r){var e=Math.pow(10,mm(r)),t=r/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,Xt(t*e)}function fh(r){return ma(r)+2}function DD(r,e,t){r[e]=Math.max(Math.min(r[e],t[1]),t[0])}function PK(r,e){!isFinite(r[0])&&(r[0]=e[0]),!isFinite(r[1])&&(r[1]=e[1]),DD(r,0,e),DD(r,1,e),r[0]>r[1]&&(r[0]=r[1])}function mC(r,e){return r>=e[0]&&r<=e[1]}var RK=(function(){function r(){this.normalize=PD,this.scale=RD}return r.prototype.updateMethods=function(e){e.hasBreaks()?(this.normalize=ye(e.normalize,e),this.scale=ye(e.scale,e)):(this.normalize=PD,this.scale=RD)},r})();function PD(r,e){return e[1]===e[0]?.5:(r-e[0])/(e[1]-e[0])}function RD(r,e){return r*(e[1]-e[0])+e[0]}function N_(r,e,t){var n=Math.log(r);return[Math.log(t?e[0]:Math.max(0,e[0]))/n,Math.log(t?e[1]:Math.max(0,e[1]))/n]}var fs=(function(){function r(e){this._calculator=new RK,this._setting=e||{},this._extent=[1/0,-1/0];var t=er();t&&(this._brkCtx=t.createScaleBreakContext(),this._brkCtx.update(this._extent))}return r.prototype.getSetting=function(e){return this._setting[e]},r.prototype._innerUnionExtent=function(e){var t=this._extent;this._innerSetExtent(e[0]<t[0]?e[0]:t[0],e[1]>t[1]?e[1]:t[1])},r.prototype.unionExtentFromData=function(e,t){this._innerUnionExtent(e.getApproximateExtent(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(e,t){this._innerSetExtent(e,t)},r.prototype._innerSetExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t),this._brkCtx&&this._brkCtx.update(n)},r.prototype.setBreaksFromOption=function(e){var t=er();t&&this._innerSetBreak(t.parseAxisBreakOption(e,ye(this.parse,this)))},r.prototype._innerSetBreak=function(e){this._brkCtx&&(this._brkCtx.setBreaks(e),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},r.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},r.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},r.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},r.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(e){this._isBlank=e},r})();xm(fs);var EK=0,dh=(function(){function r(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++EK,this._onCollect=e.onCollect}return r.createByAxisModel=function(e){var t=e.option,n=t.data,a=n&&ue(n,zK);return new r({categories:a,needCollect:!a,deduplication:t.dedplication!==!1})},r.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},r.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!pe(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,this._onCollect&&this._onCollect(e,t),t;var a=this._getOrCreateMap();return t=a.get(e),t==null&&(n?(t=this.categories.length,this.categories[t]=e,a.set(e,t),this._onCollect&&this._onCollect(e,t)):t=NaN),t},r.prototype._getOrCreateMap=function(){return this._map||(this._map=we(this.categories))},r})();function zK(r){return Pe(r)&&r.value!=null?r.value:r+""}var gc=(function(r){Q(e,r);function e(t){var n=r.call(this,t)||this;n.type="ordinal";var a=n.getSetting("ordinalMeta");return a||(a=new dh({})),le(a)&&(a=new dh({categories:ue(a,function(i){return Pe(i)?i.value:i})})),n._ordinalMeta=a,n._extent=n.getSetting("extent")||[0,a.categories.length-1],n}return e.prototype.parse=function(t){return t==null?NaN:pe(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return mC(t,this._extent)&&t>=0&&t<this._ordinalMeta.categories.length},e.prototype.normalize=function(t){return t=this._getTickNumber(t),this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(this._calculator.scale(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],n=this._extent,a=n[0];a<=n[1];)t.push({value:a}),a++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(t==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=t.ordinalNumbers,a=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,n.length);o<l;++o){var u=n[o];a[o]=u,i[u]=o}for(var c=0;o<s;++o){for(;i[c]!=null;)c++;a.push(c),i[c]=o}},e.prototype._getTickNumber=function(t){var n=this._ticksByOrdinalNumber;return n&&t>=0&&t<n.length?n[t]:t},e.prototype.getRawOrdinalNumber=function(t){var n=this._ordinalNumbersByTick;return n&&t>=0&&t<n.length?n[t]:t},e.prototype.getLabel=function(t){if(!this.isBlank()){var n=this.getRawOrdinalNumber(t.value),a=this._ordinalMeta.categories[n];return a==null?"":a+""}},e.prototype.count=function(){return this._extent[1]-this._extent[0]+1},e.prototype.isInExtentRange=function(t){return t=this._getTickNumber(t),this._extent[0]<=t&&this._extent[1]>=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e})(fs);fs.registerClass(gc);var Ao=Xt,Qi=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return e.prototype.parse=function(t){return t==null||t===""?NaN:Number(t)},e.prototype.contain=function(t){return mC(t,this._extent)},e.prototype.normalize=function(t){return this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return this._calculator.scale(t,this._extent)},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=fh(t)},e.prototype.getTicks=function(t){t=t||{};var n=this._interval,a=this._extent,i=this._niceExtent,o=this._intervalPrecision,s=er(),l=[];if(!n)return l;if(t.breakTicks==="only_break"&&s)return s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l;var u=1e4;a[0]<i[0]&&(t.expandToNicedExtent?l.push({value:Ao(i[0]-n,o)}):l.push({value:a[0]}));for(var c=function(v,y){return Math.round((y-v)/n)},f=i[0];f<=i[1];){if(l.push({value:f}),f=Ao(f+n,o),this._brkCtx){var d=this._brkCtx.calcNiceTickMultiple(f,c);d>=0&&(f=Ao(f+d*n,o))}if(l.length>0&&f===l[l.length-1].value)break;if(l.length>u)return[]}var h=l.length?l[l.length-1].value:i[1];return a[1]>h&&(t.expandToNicedExtent?l.push({value:Ao(h+n,o)}):l.push({value:a[1]})),s&&s.pruneTicksByBreak(t.pruneByBreak,l,this._brkCtx.breaks,function(v){return v.value},this._interval,this._extent),t.breakTicks!=="none"&&s&&s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l},e.prototype.getMinorTicks=function(t){for(var n=this.getTicks({expandToNicedExtent:!0}),a=[],i=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,d=f/t,h=fh(d);u<t-1;){var v=Ao(l.value+(u+1)*d,h);v>i[0]&&v<i[1]&&c.push(v),u++}var y=er();y&&y.pruneTicksByBreak("auto",c,this._getNonTransBreaks(),function(m){return m},this._interval,i),a.push(c)}}return a},e.prototype._getNonTransBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},e.prototype.getLabel=function(t,n){if(t==null)return"";var a=n&&n.precision;a==null?a=ma(t.value)||0:a==="auto"&&(a=this._intervalPrecision);var i=Ao(t.value,a,!0);return UT(i)},e.prototype.calcNiceTicks=function(t,n,a){t=t||5;var i=this._extent.slice(),o=this._getExtentSpanWithBreaks();if(isFinite(o)){o<0&&(o=-o,i.reverse(),this._innerSetExtent(i[0],i[1]),i=this._extent.slice());var s=DK(i,o,t,n,a);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},e.prototype.calcNiceExtent=function(t){var n=this._extent.slice();if(n[0]===n[1])if(n[0]!==0){var a=Math.abs(n[0]);t.fixMax||(n[1]+=a/2),n[0]-=a/2}else n[1]=1;var i=n[1]-n[0];isFinite(i)||(n[0]=0,n[1]=1),this._innerSetExtent(n[0],n[1]),n=this._extent.slice(),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval);var o=this._interval,s=this._intervalPrecision;t.fixMin||(n[0]=Ao(Math.floor(n[0]/o)*o,s)),t.fixMax||(n[1]=Ao(Math.ceil(n[1]/o)*o,s)),this._innerSetExtent(n[0],n[1])},e.prototype.setNiceExtent=function(t,n){this._niceExtent=[t,n]},e.type="interval",e})(fs);fs.registerClass(Qi);var YB=typeof Float32Array<"u",OK=YB?Float32Array:Array;function Za(r){return le(r)?YB?new Float32Array(r):r:new OK(r)}var j_="__ec_stack_";function XB(r){return r.get("stack")||j_+r.seriesIndex}function xC(r){return r.dim+r.index}function NK(r){var e=[],t=r.axis,n="axis0";if(t.type==="category"){for(var a=t.getBandWidth(),i=0;i<r.count;i++)e.push(De({bandWidth:a,axisKey:n,stackId:j_+i},r));for(var o=qB(e),s=[],i=0;i<r.count;i++){var l=o[n][j_+i];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}function ZB(r,e){var t=[];return e.eachSeriesByType(r,function(n){e3(n)&&t.push(n)}),t}function jK(r){var e={};z(r,function(l){var u=l.coordinateSystem,c=u.getBaseAxis();if(!(c.type!=="time"&&c.type!=="value"))for(var f=l.getData(),d=c.dim+"_"+c.index,h=f.getDimensionIndex(f.mapDimension(c.dim)),v=f.getStore(),y=0,m=v.count();y<m;++y){var x=v.get(h,y);e[d]?e[d].push(x):e[d]=[x]}});var t={};for(var n in e)if(e.hasOwnProperty(n)){var a=e[n];if(a){a.sort(function(l,u){return l-u});for(var i=null,o=1;o<a.length;++o){var s=a[o]-a[o-1];s>0&&(i=i===null?s:Math.min(i,s))}t[n]=i}}return t}function KB(r){var e=jK(r),t=[];return z(r,function(n){var a=n.coordinateSystem,i=a.getBaseAxis(),o=i.getExtent(),s;if(i.type==="category")s=i.getBandWidth();else if(i.type==="value"||i.type==="time"){var l=i.dim+"_"+i.index,u=e[l],c=Math.abs(o[1]-o[0]),f=i.scale.getExtent(),d=Math.abs(f[1]-f[0]);s=u?c/d*u:c}else{var h=n.getData();s=Math.abs(o[1]-o[0])/h.count()}var v=he(n.get("barWidth"),s),y=he(n.get("barMaxWidth"),s),m=he(n.get("barMinWidth")||(t3(n)?.5:1),s),x=n.get("barGap"),_=n.get("barCategoryGap"),T=n.get("defaultBarGap");t.push({bandWidth:s,barWidth:v,barMaxWidth:y,barMinWidth:m,barGap:x,barCategoryGap:_,defaultBarGap:T,axisKey:xC(i),stackId:XB(n)})}),qB(t)}function qB(r){var e={};z(r,function(n,a){var i=n.axisKey,o=n.bandWidth,s=e[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:n.defaultBarGap||0,stacks:{}},l=s.stacks;e[i]=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 d=n.barMinWidth;d&&(l[u].minWidth=d);var h=n.barGap;h!=null&&(s.gap=h);var v=n.barCategoryGap;v!=null&&(s.categoryGap=v)});var t={};return z(e,function(n,a){t[a]={};var i=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=st(i).length;s=Math.max(35-l*4,15)+"%"}var u=he(s,o),c=he(n.gap,1),f=n.remainedWidth,d=n.autoWidthCount,h=(f-u)/(d+(d-1)*c);h=Math.max(h,0),z(i,function(x){var _=x.maxWidth,T=x.minWidth;if(x.width){var C=x.width;_&&(C=Math.min(C,_)),T&&(C=Math.max(C,T)),x.width=C,f-=C+c*C,d--}else{var C=h;_&&_<C&&(C=Math.min(_,f)),T&&T>C&&(C=T),C!==h&&(x.width=C,f-=C+c*C,d--)}}),h=(f-u)/(d+(d-1)*c),h=Math.max(h,0);var v=0,y;z(i,function(x,_){x.width||(x.width=h),y=x,v+=x.width*(1+c)}),y&&(v-=y.width*c);var m=-v/2;z(i,function(x,_){t[a][_]=t[a][_]||{bandWidth:o,offset:m,width:x.width},m+=x.width*(1+c)})}),t}function BK(r,e,t){if(r&&e){var n=r[xC(e)];return n}}function QB(r,e){var t=ZB(r,e),n=KB(t);z(t,function(a){var i=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=XB(a),u=n[xC(s)][l],c=u.offset,f=u.width;i.setLayout({bandWidth:u.bandWidth,offset:c,size:f})})}function JB(r){return{seriesType:r,plan:Bc(),reset:function(e){if(e3(e)){var t=e.getData(),n=e.coordinateSystem,a=n.getBaseAxis(),i=n.getOtherAxis(a),o=t.getDimensionIndex(t.mapDimension(i.dim)),s=t.getDimensionIndex(t.mapDimension(a.dim)),l=e.get("showBackground",!0),u=t.mapDimension(i.dim),c=t.getCalculationInfo("stackResultDimension"),f=qi(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),d=i.isHorizontal(),h=FK(a,i),v=t3(e),y=e.get("barMinHeight")||0,m=c&&t.getDimensionIndex(c),x=t.getLayout("size"),_=t.getLayout("offset");return{progress:function(T,C){for(var k=T.count,A=v&&Za(k*3),L=v&&l&&Za(k*3),D=v&&Za(k),P=n.master.getRect(),E=d?P.width:P.height,O,B=C.getStore(),N=0;(O=T.next())!=null;){var W=B.get(f?m:o,O),H=B.get(s,O),$=h,Z=void 0;f&&(Z=+W-B.get(o,O));var G=void 0,X=void 0,K=void 0,V=void 0;if(d){var U=n.dataToPoint([W,H]);if(f){var ae=n.dataToPoint([Z,H]);$=ae[0]}G=$,X=U[1]+_,K=U[0]-$,V=x,Math.abs(K)<y&&(K=(K<0?-1:1)*y)}else{var U=n.dataToPoint([H,W]);if(f){var ae=n.dataToPoint([H,Z]);$=ae[1]}G=U[0]+_,X=$,K=x,V=U[1]-$,Math.abs(V)<y&&(V=(V<=0?-1:1)*y)}v?(A[N]=G,A[N+1]=X,A[N+2]=d?K:V,L&&(L[N]=d?P.x:G,L[N+1]=d?X:P.y,L[N+2]=E),D[O]=O):C.setItemLayout(O,{x:G,y:X,width:K,height:V}),N+=3}v&&C.setLayout({largePoints:A,largeDataIndices:D,largeBackgroundPoints:L,valueAxisHorizontal:d})}}}}}}function e3(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function t3(r){return r.pipelineContext&&r.pipelineContext.large}function FK(r,e){var t=e.model.get("startValue");return t||(t=0),e.toGlobalCoord(e.dataToCoord(e.type==="log"?t>0?t:1:t))}var VK=function(r,e,t,n){for(;t<n;){var a=t+n>>>1;r[a][1]<e?t=a+1:n=a}return t},SC=(function(r){Q(e,r);function e(t){var n=r.call(this,t)||this;return n.type="time",n}return e.prototype.getLabel=function(t){var n=this.getSetting("useUTC");return Fh(t.value,TI[cY(Vd(this._minLevelUnit))]||TI.second,n,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(t,n,a){var i=this.getSetting("useUTC"),o=this.getSetting("locale");return fY(t,n,a,o,i)},e.prototype.getTicks=function(t){t=t||{};var n=this._interval,a=this._extent,i=er(),o=[];if(!n)return o;var s=this.getSetting("useUTC");if(i&&t.breakTicks==="only_break")return er().addBreaksToTicks(o,this._brkCtx.breaks,this._extent),o;var l=Xu(a[1],s);o.push({value:a[0],time:{level:0,upperTimeUnit:l,lowerTimeUnit:l}});var u=XK(this._minLevelUnit,this._approxInterval,s,a,this._getExtentSpanWithBreaks(),this._brkCtx);o=o.concat(u);var c=Xu(a[1],s);o.push({value:a[1],time:{level:0,upperTimeUnit:c,lowerTimeUnit:c}});var f=this.getSetting("useUTC"),d=_n.length-1,h=0;return z(o,function(v){d=Math.min(d,Ue(_n,v.time.upperTimeUnit)),h=Math.max(h,v.time.level)}),i&&er().pruneTicksByBreak(t.pruneByBreak,o,this._brkCtx.breaks,function(v){return v.value},this._approxInterval,this._extent),i&&t.breakTicks!=="none"&&er().addBreaksToTicks(o,this._brkCtx.breaks,this._extent,function(v){for(var y=Math.max(Ue(_n,Xu(v.vmin,f)),Ue(_n,Xu(v.vmax,f))),m=0,x=0;x<_n.length;x++)if(!r3(_n[x],v.vmin,v.vmax,f)){m=x;break}var _=Math.min(m,d),T=Math.max(_,y);return{level:h,lowerTimeUnit:_n[T],upperTimeUnit:_n[_]}}),o},e.prototype.calcNiceExtent=function(t){var n=this.getExtent();if(n[0]===n[1]&&(n[0]-=Zn,n[1]+=Zn),n[1]===-1/0&&n[0]===1/0){var a=new Date;n[1]=+new Date(a.getFullYear(),a.getMonth(),a.getDate()),n[0]=n[1]-Zn}this._innerSetExtent(n[0],n[1]),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval)},e.prototype.calcNiceTicks=function(t,n,a){t=t||10;var i=this._getExtentSpanWithBreaks();this._approxInterval=i/t,n!=null&&this._approxInterval<n&&(this._approxInterval=n),a!=null&&this._approxInterval>a&&(this._approxInterval=a);var o=Vv.length,s=Math.min(VK(Vv,this._approxInterval,0,o),o-1);this._interval=Vv[s][1],this._intervalPrecision=fh(this._interval),this._minLevelUnit=Vv[Math.max(s-1,0)][0]},e.prototype.parse=function(t){return ut(t)?t:+ci(t)},e.prototype.contain=function(t){return mC(t,this._extent)},e.prototype.normalize=function(t){return this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return this._calculator.scale(t,this._extent)},e.type="time",e})(Qi),Vv=[["second",jT],["minute",BT],["hour",Fd],["quarter-day",Fd*6],["half-day",Fd*12],["day",Zn*1.2],["half-week",Zn*3.5],["week",Zn*7],["month",Zn*31],["quarter",Zn*95],["half-year",wI/2],["year",wI]];function r3(r,e,t,n){return dy(new Date(e),r,n).getTime()===dy(new Date(t),r,n).getTime()}function GK(r,e){return r/=Zn,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function WK(r){var e=30*Zn;return r/=e,r>6?6:r>3?3:r>2?2:1}function $K(r){return r/=Fd,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function ED(r,e){return r/=e?BT:jT,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function HK(r){return hT(r,!0)}function UK(r,e,t){var n=Math.max(0,Ue(_n,e)-1);return dy(new Date(r),_n[n],t).getTime()}function YK(r,e){var t=new Date(0);t[r](1);var n=t.getTime();t[r](1+e);var a=t.getTime()-n;return function(i,o){return Math.max(0,Math.round((o-i)/a))}}function XK(r,e,t,n,a,i){var o=1e4,s=oY,l=0;function u(N,W,H,$,Z,G,X){for(var K=YK(Z,N),V=W,U=new Date(V);V<H&&V<=n[1]&&(X.push({value:V}),!(l++>o));)if(U[Z](U[$]()+N),V=U.getTime(),i){var ae=i.calcNiceTickMultiple(V,K);ae>0&&(U[Z](U[$]()+ae*N),V=U.getTime())}X.push({value:V,notAdd:!0})}function c(N,W,H){var $=[],Z=!W.length;if(!r3(Vd(N),n[0],n[1],t)){Z&&(W=[{value:UK(n[0],N,t)},{value:n[1]}]);for(var G=0;G<W.length-1;G++){var X=W[G].value,K=W[G+1].value;if(X!==K){var V=void 0,U=void 0,ae=void 0,ce=!1;switch(N){case"year":V=Math.max(1,Math.round(e/Zn/365)),U=u5(t),ae=dY(t);break;case"half-year":case"quarter":case"month":V=WK(e),U=FT(t),ae=c5(t);break;case"week":case"half-week":case"day":V=GK(e),U=VT(t),ae=f5(t),ce=!0;break;case"half-day":case"quarter-day":case"hour":V=$K(e),U=GT(t),ae=d5(t);break;case"minute":V=ED(e,!0),U=WT(t),ae=h5(t);break;case"second":V=ED(e,!1),U=$T(t),ae=p5(t);break;case"millisecond":V=HK(e),U=HT(t),ae=v5(t);break}K>=n[0]&&X<=n[1]&&u(V,X,K,U,ae,ce,$),N==="year"&&H.length>1&&G===0&&H.unshift({value:H[0].value-V})}}for(var G=0;G<$.length;G++)H.push($[G])}}for(var f=[],d=[],h=0,v=0,y=0;y<s.length;++y){var m=Vd(s[y]);if(uY(s[y])){c(s[y],f[f.length-1]||[],d);var x=s[y+1]?Vd(s[y+1]):null;if(m!==x){if(d.length){v=h,d.sort(function(N,W){return N.value-W.value});for(var _=[],T=0;T<d.length;++T){var C=d[T].value;(T===0||d[T-1].value!==C)&&(_.push(d[T]),C>=n[0]&&C<=n[1]&&h++)}var k=a/e;if(h>k*1.5&&v>k/1.5||(f.push(_),h>k||r===s[y]))break}d=[]}}}for(var A=ht(ue(f,function(N){return ht(N,function(W){return W.value>=n[0]&&W.value<=n[1]&&!W.notAdd})}),function(N){return N.length>0}),L=[],D=A.length-1,y=0;y<A.length;++y)for(var P=A[y],E=0;E<P.length;++E){var O=Xu(P[E].value,t);L.push({value:P[E].value,time:{level:D-y,upperTimeUnit:O,lowerTimeUnit:O}})}L.sort(function(N,W){return N.value-W.value});for(var B=[],y=0;y<L.length;++y)(y===0||L[y].value!==L[y-1].value)&&B.push(L[y]);return B}fs.registerClass(SC);var B_=Xt,ZK=Math.floor,KK=Math.ceil,Gv=Math.pow,Wv=Math.log,n3=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new Qi,t}return e.prototype.getTicks=function(t){t=t||{};var n=this._extent.slice(),a=this._originalScale.getExtent(),i=r.prototype.getTicks.call(this,t),o=this.base,s=this._originalScale._innerGetBreaks(),l=er();return ue(i,function(u){var c=u.value,f=null,d=Gv(o,c);c===n[0]&&this._fixMin?f=a[0]:c===n[1]&&this._fixMax&&(f=a[1]);var h;if(l){var v=l.getTicksLogTransformBreak(u,o,s,$v);h=v.vBreak,f==null&&(f=v.brkRoundingCriterion)}return f!=null&&(d=$v(d,f)),{value:d,break:h}},this)},e.prototype._getNonTransBreaks=function(){return this._originalScale._innerGetBreaks()},e.prototype.setExtent=function(t,n){this._originalScale.setExtent(t,n);var a=N_(this.base,[t,n]);r.prototype.setExtent.call(this,a[0],a[1])},e.prototype.getExtent=function(){var t=this.base,n=r.prototype.getExtent.call(this);n[0]=Gv(t,n[0]),n[1]=Gv(t,n[1]);var a=this._originalScale.getExtent();return this._fixMin&&(n[0]=$v(n[0],a[0])),this._fixMax&&(n[1]=$v(n[1],a[1])),n},e.prototype.unionExtentFromData=function(t,n){this._originalScale.unionExtentFromData(t,n);var a=N_(this.base,t.getApproximateExtent(n),!0);this._innerUnionExtent(a)},e.prototype.calcNiceTicks=function(t){t=t||10;var n=this._extent.slice(),a=this._getExtentSpanWithBreaks();if(!(!isFinite(a)||a<=0)){var i=lj(a),o=t/a*i;for(o<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var s=[B_(KK(n[0]/i)*i),B_(ZK(n[1]/i)*i)];this._interval=i,this._intervalPrecision=fh(i),this._niceExtent=s}},e.prototype.calcNiceExtent=function(t){r.prototype.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.contain=function(t){return t=Wv(t)/Wv(this.base),r.prototype.contain.call(this,t)},e.prototype.normalize=function(t){return t=Wv(t)/Wv(this.base),r.prototype.normalize.call(this,t)},e.prototype.scale=function(t){return t=r.prototype.scale.call(this,t),Gv(this.base,t)},e.prototype.setBreaksFromOption=function(t){var n=er();if(n){var a=n.logarithmicParseBreaksFromOption(t,this.base,ye(this.parse,this)),i=a.parsedOriginal,o=a.parsedLogged;this._originalScale._innerSetBreak(i),this._innerSetBreak(o)}},e.type="log",e})(Qi);function $v(r,e){return B_(r,ma(e))}fs.registerClass(n3);var qK=(function(){function r(e,t,n){this._prepareParams(e,t,n)}return r.prototype._prepareParams=function(e,t,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var a=this._isOrdinal=e.type==="ordinal";this._needCrossZero=e.type==="interval"&&t.getNeedCrossZero&&t.getNeedCrossZero();var i=t.get("min",!0);i==null&&(i=t.get("startValue",!0));var o=this._modelMinRaw=i;Me(o)?this._modelMinNum=Hv(e,o({min:n[0],max:n[1]})):o!=="dataMin"&&(this._modelMinNum=Hv(e,o));var s=this._modelMaxRaw=t.get("max",!0);if(Me(s)?this._modelMaxNum=Hv(e,s({min:n[0],max:n[1]})):s!=="dataMax"&&(this._modelMaxNum=Hv(e,s)),a)this._axisDataLen=t.getCategories().length;else{var l=t.get("boundaryGap"),u=le(l)?l:[l||0,l||0];typeof u[0]=="boolean"||typeof u[1]=="boolean"?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[Ca(u[0],1),Ca(u[1],1)]}},r.prototype.calculate=function(){var e=this._isOrdinal,t=this._dataMin,n=this._dataMax,a=this._axisDataLen,i=this._boundaryGapInner,o=e?null:n-t||Math.abs(t),s=this._modelMinRaw==="dataMin"?t:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?n:this._modelMaxNum,u=s!=null,c=l!=null;s==null&&(s=e?a?0:NaN:t-i[0]*o),l==null&&(l=e?a?a-1:NaN:n+i[1]*o),(s==null||!isFinite(s))&&(s=NaN),(l==null||!isFinite(l))&&(l=NaN);var f=Dr(s)||Dr(l)||e&&!a;this._needCrossZero&&(s>0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var d=this._determinedMin,h=this._determinedMax;return d!=null&&(s=d,u=!0),h!=null&&(l=h,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:f}},r.prototype.modifyDataMinMax=function(e,t){this[JK[e]]=t},r.prototype.setDeterminedMinMax=function(e,t){var n=QK[e];this[n]=t},r.prototype.freeze=function(){this.frozen=!0},r})(),QK={min:"_determinedMin",max:"_determinedMax"},JK={min:"_dataMin",max:"_dataMax"};function a3(r,e,t){var n=r.rawExtentInfo;return n||(n=new qK(r,e,t),r.rawExtentInfo=n,n)}function Hv(r,e){return e==null?null:Dr(e)?NaN:r.parse(e)}function i3(r,e){var t=r.type,n=a3(r,e,r.getExtent()).calculate();r.setBlank(n.isBlank);var a=n.min,i=n.max,o=e.ecModel;if(o&&t==="time"){var s=ZB("bar",o),l=!1;if(z(s,function(f){l=l||f.getBaseAxis()===e.axis}),l){var u=KB(s),c=eq(a,i,e,u);a=c.min,i=c.max}}return{extent:[a,i],fixMin:n.minFixed,fixMax:n.maxFixed}}function eq(r,e,t,n){var a=t.axis.getExtent(),i=Math.abs(a[1]-a[0]),o=BK(n,t.axis);if(o===void 0)return{min:r,max:e};var s=1/0;z(o,function(h){s=Math.min(h.offset,s)});var l=-1/0;z(o,function(h){l=Math.max(h.offset+h.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=e-r,f=1-(s+l)/i,d=c/f-c;return e+=d*(l/u),r-=d*(s/u),{min:r,max:e}}function Il(r,e){var t=e,n=i3(r,t),a=n.extent,i=t.get("splitNumber");r instanceof n3&&(r.base=t.get("logBase"));var o=r.type,s=t.get("interval"),l=o==="interval"||o==="time";r.setBreaksFromOption(s3(t)),r.setExtent(a[0],a[1]),r.calcNiceExtent({splitNumber:i,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?t.get("minInterval"):null,maxInterval:l?t.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function Wh(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new gc({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new SC({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(fs.getClass(e)||Qi)}}function tq(r){var e=r.scale.getExtent(),t=e[0],n=e[1];return!(t>0&&n>0||t<0&&n<0)}function Wc(r){var e=r.getLabelModel().get("formatter");if(r.type==="time"){var t=sY(e);return function(a,i){return r.scale.getFormattedLabel(a,i,t)}}else{if(pe(e))return function(a){var i=r.scale.getLabel(a),o=e.replace("{value}",i??"");return o};if(Me(e)){if(r.type==="category")return function(a,i){return e(Ty(r,a),a.value-r.scale.getExtent()[0],null)};var n=er();return function(a,i){var o=null;return n&&(o=n.makeAxisLabelFormatterParamBreak(o,a.break)),e(Ty(r,a),i,o)}}else return function(a){return r.scale.getLabel(a)}}}function Ty(r,e){return r.type==="category"?r.scale.getLabel(e):e.value}function bC(r){var e=r.get("interval");return e??"auto"}function o3(r){return r.type==="category"&&bC(r.getLabelModel())===0}function Cy(r,e){var t={};return z(r.mapDimensionsAll(e),function(n){t[yC(r,n)]=!0}),st(t)}function rq(r,e,t){e&&z(Cy(e,t),function(n){var a=e.getApproximateExtent(n);a[0]<r[0]&&(r[0]=a[0]),a[1]>r[1]&&(r[1]=a[1])})}function yc(r){return r==="middle"||r==="center"}function hh(r){return r.getShallow("show")}function s3(r){var e=r.get("breaks",!0);if(e!=null)return!er()||!nq(r.axis)?void 0:e}function nq(r){return(r.dim==="x"||r.dim==="y"||r.dim==="z"||r.dim==="single")&&r.type!=="category"}var $c=(function(){function r(){}return r.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},r.prototype.getCoordSysModel=function(){},r})();function aq(r){return di(null,r)}var iq={isDimensionStacked:qi,enableDataStack:UB,getStackedDimension:yC};function oq(r,e){var t=e;e instanceof rt||(t=new rt(e));var n=Wh(t);return n.setExtent(r[0],r[1]),Il(n,t),n}function sq(r){Wt(r,$c)}function lq(r,e){return e=e||{},wt(r,null,null,e.state!=="normal")}const uq=Object.freeze(Object.defineProperty({__proto__:null,createDimensions:xK,createList:aq,createScale:oq,createSymbol:Kt,createTextStyle:lq,dataStack:iq,enableHoverEmphasis:Yo,getECData:je,getLayoutRect:Dt,mixinAxisModelCommonMethods:sq},Symbol.toStringTag,{value:"Module"}));var cq=1e-8;function zD(r,e){return Math.abs(r-e)<cq}function al(r,e,t){var n=0,a=r[0];if(!a)return!1;for(var i=1;i<r.length;i++){var o=r[i];n+=Pi(a[0],a[1],o[0],o[1],e,t),a=o}var s=r[0];return(!zD(a[0],s[0])||!zD(a[1],s[1]))&&(n+=Pi(a[0],a[1],s[0],s[1],e,t)),n!==0}var fq=[];function J1(r,e){for(var t=0;t<r.length;t++)Gt(r[t],r[t],e)}function OD(r,e,t,n){for(var a=0;a<r.length;a++){var i=r[a];n&&(i=n.project(i)),i&&isFinite(i[0])&&isFinite(i[1])&&(zi(e,e,i),Oi(t,t,i))}}function dq(r){for(var e=0,t=0,n=0,a=r.length,i=r[a-1][0],o=r[a-1][1],s=0;s<a;s++){var l=r[s][0],u=r[s][1],c=i*u-l*o;e+=c,t+=(i+l)*c,n+=(o+u)*c,i=l,o=u}return e?[t/e/3,n/e/3,e]:[r[0][0]||0,r[0][1]||0]}var l3=(function(){function r(e){this.name=e}return r.prototype.setCenter=function(e){this._center=e},r.prototype.getCenter=function(){var e=this._center;return e||(e=this._center=this.calcCenter()),e},r})(),ND=(function(){function r(e,t){this.type="polygon",this.exterior=e,this.interiors=t}return r})(),jD=(function(){function r(e){this.type="linestring",this.points=e}return r})(),u3=(function(r){Q(e,r);function e(t,n,a){var i=r.call(this,t)||this;return i.type="geoJSON",i.geometries=n,i._center=a&&[a[0],a[1]],i}return e.prototype.calcCenter=function(){for(var t=this.geometries,n,a=0,i=0;i<t.length;i++){var o=t[i],s=o.exterior,l=s&&s.length;l>a&&(n=o,a=l)}if(n)return dq(n.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(t){var n=this._rect;if(n&&!t)return n;var a=[1/0,1/0],i=[-1/0,-1/0],o=this.geometries;return z(o,function(s){s.type==="polygon"?OD(s.exterior,a,i,t):z(s.points,function(l){OD(l,a,i,t)})}),isFinite(a[0])&&isFinite(a[1])&&isFinite(i[0])&&isFinite(i[1])||(a[0]=a[1]=i[0]=i[1]=0),n=new ze(a[0],a[1],i[0]-a[0],i[1]-a[1]),t||(this._rect=n),n},e.prototype.contain=function(t){var n=this.getBoundingRect(),a=this.geometries;if(!n.contain(t[0],t[1]))return!1;e:for(var i=0,o=a.length;i<o;i++){var s=a[i];if(s.type==="polygon"){var l=s.exterior,u=s.interiors;if(al(l,t[0],t[1])){for(var c=0;c<(u?u.length:0);c++)if(al(u[c],t[0],t[1]))continue e;return!0}}}return!1},e.prototype.transformTo=function(t,n,a,i){var o=this.getBoundingRect(),s=o.width/o.height;a?i||(i=a/s):a=s*i;for(var l=new ze(t,n,a,i),u=o.calculateTransform(l),c=this.geometries,f=0;f<c.length;f++){var d=c[f];d.type==="polygon"?(J1(d.exterior,u),z(d.interiors,function(h){J1(h,u)})):z(d.points,function(h){J1(h,u)})}o=this._rect,o.copy(l),this._center=[o.x+o.width/2,o.y+o.height/2]},e.prototype.cloneShallow=function(t){t==null&&(t=this.name);var n=new e(t,this.geometries,this._center);return n._rect=this._rect,n.transformTo=null,n},e})(l3),hq=(function(r){Q(e,r);function e(t,n){var a=r.call(this,t)||this;return a.type="geoSVG",a._elOnlyForCalculate=n,a}return e.prototype.calcCenter=function(){for(var t=this._elOnlyForCalculate,n=t.getBoundingRect(),a=[n.x+n.width/2,n.y+n.height/2],i=Ph(fq),o=t;o&&!o.isGeoSVGGraphicRoot;)Sa(i,o.getLocalTransform(),i),o=o.parent;return Jn(i,i),Gt(a,a,i),a},e})(l3);function pq(r){if(!r.UTF8Encoding)return r;var e=r,t=e.UTF8Scale;t==null&&(t=1024);var n=e.features;return z(n,function(a){var i=a.geometry,o=i.encodeOffsets,s=i.coordinates;if(o)switch(i.type){case"LineString":i.coordinates=c3(s,o,t);break;case"Polygon":eS(s,o,t);break;case"MultiLineString":eS(s,o,t);break;case"MultiPolygon":z(s,function(l,u){return eS(l,o[u],t)})}}),e.UTF8Encoding=!1,e}function eS(r,e,t){for(var n=0;n<r.length;n++)r[n]=c3(r[n],e[n],t)}function c3(r,e,t){for(var n=[],a=e[0],i=e[1],o=0;o<r.length;o+=2){var s=r.charCodeAt(o)-64,l=r.charCodeAt(o+1)-64;s=s>>1^-(s&1),l=l>>1^-(l&1),s+=a,l+=i,a=s,i=l,n.push([s/t,l/t])}return n}function F_(r,e){return r=pq(r),ue(ht(r.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var n=t.properties,a=t.geometry,i=[];switch(a.type){case"Polygon":var o=a.coordinates;i.push(new ND(o[0],o.slice(1)));break;case"MultiPolygon":z(a.coordinates,function(l){l[0]&&i.push(new ND(l[0],l.slice(1)))});break;case"LineString":i.push(new jD([a.coordinates]));break;case"MultiLineString":i.push(new jD(a.coordinates))}var s=new u3(n[e||"name"],i,n.cp);return s.properties=n,s})}const vq=Object.freeze(Object.defineProperty({__proto__:null,MAX_SAFE_INTEGER:e_,asc:kn,getPercentWithPrecision:E7,getPixelPrecision:fT,getPrecision:ma,getPrecisionSafe:oj,isNumeric:pT,isRadianAroundZero:cc,linearMap:vt,nice:hT,numericToNumber:ai,parseDate:ci,parsePercent:he,quantile:Lg,quantity:lj,quantityExponent:mm,reformIntervals:t_,remRadian:dT,round:Xt},Symbol.toStringTag,{value:"Module"})),gq=Object.freeze(Object.defineProperty({__proto__:null,format:Fh,parse:ci,roundTime:dy},Symbol.toStringTag,{value:"Module"})),yq=Object.freeze(Object.defineProperty({__proto__:null,Arc:Nh,BezierCurve:Pc,BoundingRect:ze,Circle:fi,CompoundPath:jh,Ellipse:Oh,Group:Le,Image:gr,IncrementalDisplayable:Xj,Line:Zt,LinearGradient:zl,Polygon:zr,Polyline:Cr,RadialGradient:kT,Rect:Qe,Ring:Dc,Sector:Er,Text:lt,clipPointsByRect:DT,clipRectByRect:Jj,createIcon:Ec,extendPath:qj,extendShape:Kj,getShapeClass:ah,getTransform:Xo,initProps:It,makeImage:LT,makePath:dc,mergePath:Cn,registerShape:na,resizePath:IT,updateProps:ct},Symbol.toStringTag,{value:"Module"})),mq=Object.freeze(Object.defineProperty({__proto__:null,addCommas:UT,capitalFirst:gY,encodeHTML:$r,formatTime:vY,formatTpl:XT,getTextRect:hY,getTooltipMarker:g5,normalizeCssArray:Nc,toCamelCase:YT,truncateText:h9},Symbol.toStringTag,{value:"Module"})),xq=Object.freeze(Object.defineProperty({__proto__:null,bind:ye,clone:Ae,curry:$e,defaults:De,each:z,extend:ie,filter:ht,indexOf:Ue,inherits:nT,isArray:le,isFunction:Me,isObject:Pe,isString:pe,map:ue,merge:Ye,reduce:Qn},Symbol.toStringTag,{value:"Module"}));var Sq=et(),Wd=et(),Ma={estimate:1,determine:2};function My(r){return{out:{noPxChangeTryDetermine:[]},kind:r}}function f3(r,e){var t=ue(e,function(n){return r.scale.parse(n)});return r.type==="time"&&t.length>0&&(t.sort(),t.unshift(t[0]),t.push(t[t.length-1])),t}function bq(r,e){var t=r.getLabelModel().get("customValues");if(t){var n=Wc(r),a=r.scale.getExtent(),i=f3(r,t),o=ht(i,function(s){return s>=a[0]&&s<=a[1]});return{labels:ue(o,function(s){var l={value:s};return{formattedLabel:n(l),rawLabel:r.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return r.type==="category"?wq(r,e):Cq(r)}function _q(r,e,t){var n=r.getTickModel().get("customValues");if(n){var a=r.scale.getExtent(),i=f3(r,n);return{ticks:ht(i,function(o){return o>=a[0]&&o<=a[1]})}}return r.type==="category"?Tq(r,e):{ticks:ue(r.scale.getTicks(t),function(o){return o.value})}}function wq(r,e){var t=r.getLabelModel(),n=d3(r,t,e);return!t.get("show")||r.scale.isBlank()?{labels:[]}:n}function d3(r,e,t){var n=kq(r),a=bC(e),i=t.kind===Ma.estimate;if(!i){var o=p3(n,a);if(o)return o}var s,l;Me(a)?s=y3(r,a):(l=a==="auto"?Aq(r,t):a,s=g3(r,l));var u={labels:s,labelCategoryInterval:l};return i?t.out.noPxChangeTryDetermine.push(function(){return V_(n,a,u),!0}):V_(n,a,u),u}function Tq(r,e){var t=Mq(r),n=bC(e),a=p3(t,n);if(a)return a;var i,o;if((!e.get("show")||r.scale.isBlank())&&(i=[]),Me(n))i=y3(r,n,!0);else if(n==="auto"){var s=d3(r,r.getLabelModel(),My(Ma.determine));o=s.labelCategoryInterval,i=ue(s.labels,function(l){return l.tickValue})}else o=n,i=g3(r,o,!0);return V_(t,n,{ticks:i,tickCategoryInterval:o})}function Cq(r){var e=r.scale.getTicks(),t=Wc(r);return{labels:ue(e,function(n,a){return{formattedLabel:t(n,a),rawLabel:r.scale.getLabel(n),tickValue:n.value,time:n.time,break:n.break}})}}var Mq=h3("axisTick"),kq=h3("axisLabel");function h3(r){return function(t){return Wd(t)[r]||(Wd(t)[r]={list:[]})}}function p3(r,e){for(var t=0;t<r.list.length;t++)if(r.list[t].key===e)return r.list[t].value}function V_(r,e,t){return r.list.push({key:e,value:t}),t}function Aq(r,e){if(e.kind===Ma.estimate){var t=r.calculateCategoryInterval(e);return e.out.noPxChangeTryDetermine.push(function(){return Wd(r).autoInterval=t,!0}),t}var n=Wd(r).autoInterval;return n??(Wd(r).autoInterval=r.calculateCategoryInterval(e))}function Lq(r,e){var t=e.kind,n=Dq(r),a=Wc(r),i=(n.axisRotate-n.labelRotate)/180*Math.PI,o=r.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],d=r.dataToCoord(f+1)-r.dataToCoord(f),h=Math.abs(d*Math.cos(i)),v=Math.abs(d*Math.sin(i)),y=0,m=0;f<=s[1];f+=u){var x=0,_=0,T=gm(a({value:f}),n.font,"center","top");x=T.width*1.3,_=T.height*1.3,y=Math.max(y,x,7),m=Math.max(m,_,7)}var C=y/h,k=m/v;isNaN(C)&&(C=1/0),isNaN(k)&&(k=1/0);var A=Math.max(0,Math.floor(Math.min(C,k)));if(t===Ma.estimate)return e.out.noPxChangeTryDetermine.push(ye(Iq,null,r,A,l)),A;var L=v3(r,A,l);return L??A}function Iq(r,e,t){return v3(r,e,t)==null}function v3(r,e,t){var n=Sq(r.model),a=r.getExtent(),i=n.lastAutoInterval,o=n.lastTickCount;if(i!=null&&o!=null&&Math.abs(i-e)<=1&&Math.abs(o-t)<=1&&i>e&&n.axisExtent0===a[0]&&n.axisExtent1===a[1])return i;n.lastTickCount=t,n.lastAutoInterval=e,n.axisExtent0=a[0],n.axisExtent1=a[1]}function Dq(r){var e=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function g3(r,e,t){var n=Wc(r),a=r.scale,i=a.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=i[0],c=a.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=o3(r),d=o.get("showMinLabel")||f,h=o.get("showMaxLabel")||f;d&&u!==i[0]&&y(i[0]);for(var v=u;v<=i[1];v+=l)y(v);h&&v-l!==i[1]&&y(i[1]);function y(m){var x={value:m};s.push(t?m:{formattedLabel:n(x),rawLabel:a.getLabel(x),tickValue:m,time:void 0,break:void 0})}return s}function y3(r,e,t){var n=r.scale,a=Wc(r),i=[];return z(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;e(o.value,s)&&i.push(t?l:{formattedLabel:a(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),i}var BD=[0,1],aa=(function(){function r(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return r.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),a=Math.max(t[0],t[1]);return e>=n&&e<=a},r.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(e){return fT(e||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},r.prototype.dataToCoord=function(e,t){var n=this._extent,a=this.scale;return e=a.normalize(a.parse(e)),this.onBand&&a.type==="ordinal"&&(n=n.slice(),FD(n,a.count())),vt(e,BD,n,t)},r.prototype.coordToData=function(e,t){var n=this._extent,a=this.scale;this.onBand&&a.type==="ordinal"&&(n=n.slice(),FD(n,a.count()));var i=vt(e,n,BD,t);return this.scale.scale(i)},r.prototype.pointToData=function(e,t){},r.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),n=_q(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}),a=n.ticks,i=ue(a,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=t.get("alignWithLabel");return Pq(this,i,o,e.clamp),i},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),t=e.get("splitNumber");t>0&&t<100||(t=5);var n=this.scale.getMinorTicks(t),a=ue(n,function(i){return ue(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return a},r.prototype.getViewLabels=function(e){return e=e||My(Ma.determine),bq(this,e).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);n===0&&(n=1);var a=Math.abs(e[1]-e[0]);return Math.abs(a)/n},r.prototype.calculateCategoryInterval=function(e){return e=e||My(Ma.determine),Lq(this,e)},r})();function FD(r,e){var t=r[1]-r[0],n=e,a=t/n/2;r[0]+=a,r[1]-=a}function Pq(r,e,t,n){var a=e.length;if(!r.onBand||t||!a)return;var i=r.getExtent(),o,s;if(a===1)e[0].coord=i[0],e[0].onBand=!0,o=e[1]={coord:i[1],tickValue:e[0].tickValue,onBand:!0};else{var l=e[a-1].tickValue-e[0].tickValue,u=(e[a-1].coord-e[0].coord)/l;z(e,function(h){h.coord-=u/2,h.onBand=!0});var c=r.scale.getExtent();s=1+c[1]-e[a-1].tickValue,o={coord:e[a-1].coord+u*s,tickValue:c[1]+1,onBand:!0},e.push(o)}var f=i[0]>i[1];d(e[0].coord,i[0])&&(n?e[0].coord=i[0]:e.shift()),n&&d(i[0],e[0].coord)&&e.unshift({coord:i[0],onBand:!0}),d(i[1],o.coord)&&(n?o.coord=i[1]:e.pop()),n&&d(o.coord,i[1])&&e.push({coord:i[1],onBand:!0});function d(h,v){return h=Xt(h),v=Xt(v),f?h>v:h<v}}function Rq(r){var e=Je.extend(r);return Je.registerClass(e),e}function Eq(r){var e=Ct.extend(r);return Ct.registerClass(e),e}function zq(r){var e=St.extend(r);return St.registerClass(e),e}function Oq(r){var e=mt.extend(r);return mt.registerClass(e),e}var Zf=Math.PI*2,Xs=ii.CMD,Nq=["top","right","bottom","left"];function jq(r,e,t,n,a){var i=t.width,o=t.height;switch(r){case"top":n.set(t.x+i/2,t.y-e),a.set(0,-1);break;case"bottom":n.set(t.x+i/2,t.y+o+e),a.set(0,1);break;case"left":n.set(t.x-e,t.y+o/2),a.set(-1,0);break;case"right":n.set(t.x+i+e,t.y+o/2),a.set(1,0);break}}function Bq(r,e,t,n,a,i,o,s,l){o-=r,s-=e;var u=Math.sqrt(o*o+s*s);o/=u,s/=u;var c=o*t+r,f=s*t+e;if(Math.abs(n-a)%Zf<1e-4)return l[0]=c,l[1]=f,u-t;if(i){var d=n;n=An(a),a=An(d)}else n=An(n),a=An(a);n>a&&(a+=Zf);var h=Math.atan2(s,o);if(h<0&&(h+=Zf),h>=n&&h<=a||h+Zf>=n&&h+Zf<=a)return l[0]=c,l[1]=f,u-t;var v=t*Math.cos(n)+r,y=t*Math.sin(n)+e,m=t*Math.cos(a)+r,x=t*Math.sin(a)+e,_=(v-o)*(v-o)+(y-s)*(y-s),T=(m-o)*(m-o)+(x-s)*(x-s);return _<T?(l[0]=v,l[1]=y,Math.sqrt(_)):(l[0]=m,l[1]=x,Math.sqrt(T))}function ky(r,e,t,n,a,i,o,s){var l=a-r,u=i-e,c=t-r,f=n-e,d=Math.sqrt(c*c+f*f);c/=d,f/=d;var h=l*c+u*f,v=h/d;s&&(v=Math.min(Math.max(v,0),1)),v*=d;var y=o[0]=r+v*c,m=o[1]=e+v*f;return Math.sqrt((y-a)*(y-a)+(m-i)*(m-i))}function m3(r,e,t,n,a,i,o){t<0&&(r=r+t,t=-t),n<0&&(e=e+n,n=-n);var s=r+t,l=e+n,u=o[0]=Math.min(Math.max(a,r),s),c=o[1]=Math.min(Math.max(i,e),l);return Math.sqrt((u-a)*(u-a)+(c-i)*(c-i))}var ga=[];function Fq(r,e,t){var n=m3(e.x,e.y,e.width,e.height,r.x,r.y,ga);return t.set(ga[0],ga[1]),n}function Vq(r,e,t){for(var n=0,a=0,i=0,o=0,s,l,u=1/0,c=e.data,f=r.x,d=r.y,h=0;h<c.length;){var v=c[h++];h===1&&(n=c[h],a=c[h+1],i=n,o=a);var y=u;switch(v){case Xs.M:i=c[h++],o=c[h++],n=i,a=o;break;case Xs.L:y=ky(n,a,c[h],c[h+1],f,d,ga,!0),n=c[h++],a=c[h++];break;case Xs.C:y=FN(n,a,c[h++],c[h++],c[h++],c[h++],c[h],c[h+1],f,d,ga),n=c[h++],a=c[h++];break;case Xs.Q:y=GN(n,a,c[h++],c[h++],c[h],c[h+1],f,d,ga),n=c[h++],a=c[h++];break;case Xs.A:var m=c[h++],x=c[h++],_=c[h++],T=c[h++],C=c[h++],k=c[h++];h+=1;var A=!!(1-c[h++]);s=Math.cos(C)*_+m,l=Math.sin(C)*T+x,h<=1&&(i=s,o=l);var L=(f-m)*T/_+m;y=Bq(m,x,T,C,C+k,A,L,d,ga),n=Math.cos(C+k)*_+m,a=Math.sin(C+k)*T+x;break;case Xs.R:i=n=c[h++],o=a=c[h++];var D=c[h++],P=c[h++];y=m3(i,o,D,P,f,d,ga);break;case Xs.Z:y=ky(n,a,i,o,f,d,ga,!0),n=i,a=o;break}y<u&&(u=y,t.set(ga[0],ga[1]))}return u}var xa=new Ee,At=new Ee,Ut=new Ee,Ka=new Ee,Ua=new Ee;function VD(r,e){if(r){var t=r.getTextGuideLine(),n=r.getTextContent();if(n&&t){var a=r.textGuideLineConfig||{},i=[[0,0],[0,0],[0,0]],o=a.candidates||Nq,s=n.getBoundingRect().clone();s.applyTransform(n.getComputedTransform());var l=1/0,u=a.anchor,c=r.getComputedTransform(),f=c&&Jn([],c),d=e.get("length2")||0;u&&Ut.copy(u);for(var h=0;h<o.length;h++){var v=o[h];jq(v,0,s,xa,Ka),Ee.scaleAndAdd(At,xa,Ka,d),At.transform(f);var y=r.getBoundingRect(),m=u?u.distance(At):r instanceof nt?Vq(At,r.path,Ut):Fq(At,y,Ut);m<l&&(l=m,At.transform(c),Ut.transform(c),Ut.toArray(i[0]),At.toArray(i[1]),xa.toArray(i[2]))}x3(i,e.get("minTurnAngle")),t.setShape({points:i})}}}var Ay=[],Qr=new Ee;function x3(r,e){if(e<=180&&e>0){e=e/180*Math.PI,xa.fromArray(r[0]),At.fromArray(r[1]),Ut.fromArray(r[2]),Ee.sub(Ka,xa,At),Ee.sub(Ua,Ut,At);var t=Ka.len(),n=Ua.len();if(!(t<.001||n<.001)){Ka.scale(1/t),Ua.scale(1/n);var a=Ka.dot(Ua),i=Math.cos(e);if(i<a){var o=ky(At.x,At.y,Ut.x,Ut.y,xa.x,xa.y,Ay,!1);Qr.fromArray(Ay),Qr.scaleAndAdd(Ua,o/Math.tan(Math.PI-e));var s=Ut.x!==At.x?(Qr.x-At.x)/(Ut.x-At.x):(Qr.y-At.y)/(Ut.y-At.y);if(isNaN(s))return;s<0?Ee.copy(Qr,At):s>1&&Ee.copy(Qr,Ut),Qr.toArray(r[1])}}}}function Gq(r,e,t){if(t<=180&&t>0){t=t/180*Math.PI,xa.fromArray(r[0]),At.fromArray(r[1]),Ut.fromArray(r[2]),Ee.sub(Ka,At,xa),Ee.sub(Ua,Ut,At);var n=Ka.len(),a=Ua.len();if(!(n<.001||a<.001)){Ka.scale(1/n),Ua.scale(1/a);var i=Ka.dot(e),o=Math.cos(t);if(i<o){var s=ky(At.x,At.y,Ut.x,Ut.y,xa.x,xa.y,Ay,!1);Qr.fromArray(Ay);var l=Math.PI/2,u=Math.acos(Ua.dot(e)),c=l+u-t;if(c>=l)Ee.copy(Qr,Ut);else{Qr.scaleAndAdd(Ua,s/Math.tan(Math.PI/2-c));var f=Ut.x!==At.x?(Qr.x-At.x)/(Ut.x-At.x):(Qr.y-At.y)/(Ut.y-At.y);if(isNaN(f))return;f<0?Ee.copy(Qr,At):f>1&&Ee.copy(Qr,Ut)}Qr.toArray(r[1])}}}}function tS(r,e,t,n){var a=t==="normal",i=a?r:r.ensureState(t);i.ignore=e;var o=n.get("smooth");o&&o===!0&&(o=.3),i.shape=i.shape||{},o>0&&(i.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();a?r.useStyle(s):i.style=s}function Wq(r,e){var t=e.smooth,n=e.points;if(n)if(r.moveTo(n[0][0],n[0][1]),t>0&&n.length>=3){var a=Ei(n[0],n[1]),i=Ei(n[1],n[2]);if(!a||!i){r.lineTo(n[1][0],n[1][1]),r.lineTo(n[2][0],n[2][1]);return}var o=Math.min(a,i)*t,s=Rd([],n[1],n[0],o/a),l=Rd([],n[1],n[2],o/i),u=Rd([],s,l,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var c=1;c<n.length;c++)r.lineTo(n[c][0],n[c][1])}function _C(r,e,t){var n=r.getTextGuideLine(),a=r.getTextContent();if(!a){n&&r.removeTextGuideLine();return}for(var i=e.normal,o=i.get("show"),s=a.ignore,l=0;l<rh.length;l++){var u=rh[l],c=e[u],f=u==="normal";if(c){var d=c.get("show"),h=f?s:Ce(a.states[u]&&a.states[u].ignore,s);if(h||!Ce(d,o)){var v=f?n:n&&n.states[u];v&&(v.ignore=!0),n&&tS(n,!0,u,c);continue}n||(n=new Cr,r.setTextGuideLine(n),!f&&(s||!o)&&tS(n,!0,"normal",e.normal),r.stateProxy&&(n.stateProxy=r.stateProxy)),tS(n,!1,u,c)}}if(n){De(n.style,t),n.style.fill=null;var y=i.get("showAbove"),m=r.textGuideLineConfig=r.textGuideLineConfig||{};m.showAbove=y||!1,n.buildPath=Wq}}function wC(r,e){e=e||"labelLine";for(var t={normal:r.getModel(e)},n=0;n<tn.length;n++){var a=tn[n];t[a]=r.getModel([a,e])}return t}var GD=["label","labelLine","layoutOption","priority","defaultAttr","marginForce","minMarginForce","marginDefault","suggestIgnore"],$q=1,Ly=2,S3=$q|Ly;function Iy(r,e,t){t=t||S3,e?r.dirty|=t:r.dirty&=~t}function b3(r,e){return e=e||S3,r.dirty==null||!!(r.dirty&e)}function si(r){if(r)return b3(r)&&_3(r,r.label,r),r}function _3(r,e,t){var n=e.getComputedTransform();r.transform=RT(r.transform,n);var a=r.localRect=ih(r.localRect,e.getBoundingRect()),i=e.style,o=i.margin,s=t&&t.marginForce,l=t&&t.minMarginForce,u=t&&t.marginDefault,c=i.__marginType;c==null&&u&&(o=u,c=Yu.textMargin);for(var f=0;f<4;f++)rS[f]=c===Yu.minMargin&&l&&l[f]!=null?l[f]:s&&s[f]!=null?s[f]:o?o[f]:0;c===Yu.textMargin&&kl(a,rS,!1,!1);var d=r.rect=ih(r.rect,a);return n&&d.applyTransform(n),c===Yu.minMargin&&kl(d,rS,!1,!1),r.axisAligned=PT(n),(r.label=r.label||{}).ignore=e.ignore,Iy(r,!1),Iy(r,!0,Ly),r}var rS=[0,0,0,0];function Hq(r,e,t){return r.transform=RT(r.transform,t),r.localRect=ih(r.localRect,e),r.rect=ih(r.rect,e),t&&r.rect.applyTransform(t),r.axisAligned=PT(t),r.obb=void 0,(r.label=r.label||{}).ignore=!1,r}function G_(r,e){if(r){r.label.x+=e.x,r.label.y+=e.y,r.label.markRedraw();var t=r.transform;t&&(t[4]+=e.x,t[5]+=e.y);var n=r.rect;n&&(n.x+=e.x,n.y+=e.y);var a=r.obb;a&&a.fromBoundingRect(r.localRect,t)}}function W_(r,e){for(var t=0;t<GD.length;t++){var n=GD[t];r[n]==null&&(r[n]=e[n])}return si(r)}function WD(r){var e=r.obb;return(!e||b3(r,Ly))&&(r.obb=e=e||new Yj,e.fromBoundingRect(r.localRect,r.transform),Iy(r,!1,Ly)),e}function $_(r,e,t,n,a){var i=r.length,o=Ge[e],s=tr[e];if(i<2)return!1;r.sort(function(L,D){return L.rect[o]-D.rect[o]});for(var l=0,u,c=!1,f=0;f<i;f++){var d=r[f],h=d.rect;u=h[o]-l,u<0&&(h[o]-=u,d.label[o]-=u,c=!0),l=h[o]+h[s]}var v=r[0],y=r[i-1],m,x;_(),m<0&&k(-m,.8),x<0&&k(x,.8),_(),T(m,x,1),T(x,m,-1),_(),m<0&&A(-m),x<0&&A(x);function _(){m=v.rect[o]-t,x=n-y.rect[o]-y.rect[s]}function T(L,D,P){if(L<0){var E=Math.min(D,-L);if(E>0){C(E*P,0,i);var O=E+L;O<0&&k(-O*P,1)}else k(-L*P,1)}}function C(L,D,P){L!==0&&(c=!0);for(var E=D;E<P;E++){var O=r[E],B=O.rect;B[o]+=L,O.label[o]+=L}}function k(L,D){for(var P=[],E=0,O=1;O<i;O++){var B=r[O-1].rect,N=Math.max(r[O].rect[o]-B[o]-B[s],0);P.push(N),E+=N}if(E){var W=Math.min(Math.abs(L)/E,D);if(L>0)for(var O=0;O<i-1;O++){var H=P[O]*W;C(H,0,O+1)}else for(var O=i-1;O>0;O--){var H=P[O-1]*W;C(-H,O,i)}}}function A(L){var D=L<0?-1:1;L=Math.abs(L);for(var P=Math.ceil(L/(i-1)),E=0;E<i-1;E++)if(D>0?C(P,0,E+1):C(-P,i-E-1,i),L-=P,L<=0)return}return c}function Uq(r){for(var e=0;e<r.length;e++){var t=r[e],n=t.defaultAttr,a=t.labelLine;t.label.attr("ignore",n.ignore),a&&a.attr("ignore",n.labelGuideIgnore)}}function w3(r){var e=[];r.sort(function(u,c){return(c.suggestIgnore?1:0)-(u.suggestIgnore?1:0)||c.priority-u.priority});function t(u){if(!u.ignore){var c=u.ensureState("emphasis");c.ignore==null&&(c.ignore=!1)}u.ignore=!0}for(var n=0;n<r.length;n++){var a=si(r[n]);if(!a.label.ignore){for(var i=a.label,o=a.labelLine,s=!1,l=0;l<e.length;l++)if(Nm(a,e[l],null,{touchThreshold:.05})){s=!0;break}s?(t(i),o&&t(o)):e.push(a)}}}function Nm(r,e,t,n){return!r||!e||r.label&&r.label.ignore||e.label&&e.label.ignore||!r.rect.intersect(e.rect,t,n)?!1:r.axisAligned&&e.axisAligned?!0:WD(r).intersect(WD(e),t,n)}function Yq(r){if(r){for(var e=[],t=0;t<r.length;t++)e.push(r[t].slice());return e}}function Xq(r,e){var t=r.label,n=e&&e.getTextGuideLine();return{dataIndex:r.dataIndex,dataType:r.dataType,seriesIndex:r.seriesModel.seriesIndex,text:r.label.style.text,rect:r.hostRect,labelRect:r.rect,align:t.style.align,verticalAlign:t.style.verticalAlign,labelLinePoints:Yq(n&&n.shape.points)}}var $D=["align","verticalAlign","width","height","fontSize"],Zr=new Ni,nS=et(),Zq=et();function Uv(r,e,t){for(var n=0;n<t.length;n++){var a=t[n];e[a]!=null&&(r[a]=e[a])}}var Yv=["x","y","rotation"],Kq=(function(){function r(){this._labelList=[],this._chartViewList=[]}return r.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},r.prototype._addLabel=function(e,t,n,a,i){var o=a.style,s=a.__hostTarget,l=s.textConfig||{},u=a.getComputedTransform(),c=a.getBoundingRect().plain();ze.applyTransform(c,c,u),u?Zr.setLocalTransform(u):(Zr.x=Zr.y=Zr.rotation=Zr.originX=Zr.originY=0,Zr.scaleX=Zr.scaleY=1),Zr.rotation=An(Zr.rotation);var f=a.__hostTarget,d;if(f){d=f.getBoundingRect().plain();var h=f.getComputedTransform();ze.applyTransform(d,d,h)}var v=d&&f.getTextGuideLine();this._labelList.push({label:a,labelLine:v,seriesModel:n,dataIndex:e,dataType:t,layoutOptionOrCb:i,layoutOption:null,rect:c,hostRect:d,priority:d?d.width*d.height:0,defaultAttr:{ignore:a.ignore,labelGuideIgnore:v&&v.ignore,x:Zr.x,y:Zr.y,scaleX:Zr.scaleX,scaleY:Zr.scaleY,rotation:Zr.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:a.cursor,attachedPos:l.position,attachedRot:l.rotation}})},r.prototype.addLabelsOfSeries=function(e){var t=this;this._chartViewList.push(e);var n=e.__model,a=n.get("labelLayout");(Me(a)||st(a).length)&&e.group.traverse(function(i){if(i.ignore)return!0;var o=i.getTextContent(),s=je(i);o&&!o.disableLabelLayout&&t._addLabel(s.dataIndex,s.dataType,n,o,a)})},r.prototype.updateLayoutConfig=function(e){var t=e.getWidth(),n=e.getHeight();function a(T,C){return function(){VD(T,C)}}for(var i=0;i<this._labelList.length;i++){var o=this._labelList[i],s=o.label,l=s.__hostTarget,u=o.defaultAttr,c=void 0;Me(o.layoutOptionOrCb)?c=o.layoutOptionOrCb(Xq(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 d=!1;if(c.x!=null?(s.x=he(c.x,t),s.setStyle("x",0),d=!0):(s.x=u.x,s.setStyle("x",u.style.x)),c.y!=null?(s.y=he(c.y,n),s.setStyle("y",0),d=!0):(s.y=u.y,s.setStyle("y",u.style.y)),c.labelLinePoints){var h=l.getTextGuideLine();h&&(h.setShape({points:c.labelLinePoints}),d=!1)}var v=nS(s);v.needsUpdateLabelLine=d,s.rotation=c.rotate!=null?c.rotate*f:u.rotation,s.scaleX=u.scaleX,s.scaleY=u.scaleY;for(var y=0;y<$D.length;y++){var m=$D[y];s.setStyle(m,c[m]!=null?c[m]:u.style[m])}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",a(l,x.getModel("labelLine")))}}else s.off("drag"),s.cursor=u.cursor}},r.prototype.layout=function(e){var t=e.getWidth(),n=e.getHeight(),a=[];z(this._labelList,function(l){l.defaultAttr.ignore||a.push(W_({},l))});var i=ht(a,function(l){return l.layoutOption.moveOverlap==="shiftX"}),o=ht(a,function(l){return l.layoutOption.moveOverlap==="shiftY"});$_(i,0,0,t),$_(o,1,0,n);var s=ht(a,function(l){return l.layoutOption.hideOverlap});Uq(s),w3(s)},r.prototype.processLabelsOverall=function(){var e=this;z(this._chartViewList,function(t){var n=t.__model,a=t.ignoreLabelLineUpdate,i=n.isAnimationEnabled();t.group.traverse(function(o){if(o.ignore&&!o.forceLabelAnimation)return!0;var s=!a,l=o.getTextContent();!s&&l&&(s=nS(l).needsUpdateLabelLine),s&&e._updateLabelLine(o,n),i&&e._animateLabels(o,n)})})},r.prototype._updateLabelLine=function(e,t){var n=e.getTextContent(),a=je(e),i=a.dataIndex;if(n&&i!=null){var o=t.getData(a.dataType),s=o.getItemModel(i),l={},u=o.getItemVisual(i,"style");if(u){var c=o.getVisual("drawType");l.stroke=u[c]}var f=s.getModel("labelLine");_C(e,wC(s),l),VD(e,f)}},r.prototype._animateLabels=function(e,t){var n=e.getTextContent(),a=e.getTextGuideLine();if(n&&(e.forceLabelAnimation||!n.ignore&&!n.invisible&&!e.disableLabelAnimation&&!tc(e))){var i=nS(n),o=i.oldLayout,s=je(e),l=s.dataIndex,u={x:n.x,y:n.y,rotation:n.rotation},c=t.getData(s.dataType);if(o){n.attr(o);var d=e.prevStates;d&&(Ue(d,"select")>=0&&n.attr(i.oldLayoutSelect),Ue(d,"emphasis")>=0&&n.attr(i.oldLayoutEmphasis)),ct(n,u,t,l)}else if(n.attr(u),!zc(n).valueAnimation){var f=Ce(n.style.opacity,1);n.style.opacity=0,It(n,{style:{opacity:f}},t,l)}if(i.oldLayout=u,n.states.select){var h=i.oldLayoutSelect={};Uv(h,u,Yv),Uv(h,n.states.select,Yv)}if(n.states.emphasis){var v=i.oldLayoutEmphasis={};Uv(v,u,Yv),Uv(v,n.states.emphasis,Yv)}i5(n,l,c,t,t)}if(a&&!a.ignore&&!a.invisible){var i=Zq(a),o=i.oldLayout,y={points:a.shape.points};o?(a.attr({shape:o}),ct(a,{shape:y},t)):(a.setShape(y),a.style.strokePercent=0,It(a,{style:{strokePercent:1}},t)),i.oldLayout=y}},r})(),aS=et();function qq(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){var a=aS(t).labelManager;a||(a=aS(t).labelManager=new Kq),a.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,n){var a=aS(t).labelManager;n.updatedSeries.forEach(function(i){a.addLabelsOfSeries(t.getViewOfSeriesModel(i))}),a.updateLayoutConfig(t),a.layout(t),a.processLabelsOverall()})}var iS=Math.sin,oS=Math.cos,T3=Math.PI,Zs=Math.PI*2,Qq=180/T3,C3=(function(){function r(){}return r.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},r.prototype.moveTo=function(e,t){this._add("M",e,t)},r.prototype.lineTo=function(e,t){this._add("L",e,t)},r.prototype.bezierCurveTo=function(e,t,n,a,i,o){this._add("C",e,t,n,a,i,o)},r.prototype.quadraticCurveTo=function(e,t,n,a){this._add("Q",e,t,n,a)},r.prototype.arc=function(e,t,n,a,i,o){this.ellipse(e,t,n,n,0,a,i,o)},r.prototype.ellipse=function(e,t,n,a,i,o,s,l){var u=s-o,c=!l,f=Math.abs(u),d=Fo(f-Zs)||(c?u>=Zs:-u>=Zs),h=u>0?u%Zs:u%Zs+Zs,v=!1;d?v=!0:Fo(f)?v=!1:v=h>=T3==!!c;var y=e+n*oS(o),m=t+a*iS(o);this._start&&this._add("M",y,m);var x=Math.round(i*Qq);if(d){var _=1/this._p,T=(c?1:-1)*(Zs-_);this._add("A",n,a,x,1,+c,e+n*oS(o+T),t+a*iS(o+T)),_>.01&&this._add("A",n,a,x,0,+c,y,m)}else{var C=e+n*oS(s),k=t+a*iS(s);this._add("A",n,a,x,+v,+c,C,k)}},r.prototype.rect=function(e,t,n,a){this._add("M",e,t),this._add("l",n,0),this._add("l",0,a),this._add("l",-n,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(e,t,n,a,i,o,s,l,u){for(var c=[],f=this._p,d=1;d<arguments.length;d++){var h=arguments[d];if(isNaN(h)){this._invalid=!0;return}c.push(Math.round(h*f)/f)}this._d.push(e+c.join(" ")),this._start=e==="Z"},r.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},r.prototype.getStr=function(){return this._str},r})(),TC="none",Jq=Math.round;function eQ(r){var e=r.fill;return e!=null&&e!==TC}function tQ(r){var e=r.stroke;return e!=null&&e!==TC}var H_=["lineCap","miterLimit","lineJoin"],rQ=ue(H_,function(r){return"stroke-"+r.toLowerCase()});function nQ(r,e,t,n){var a=e.opacity==null?1:e.opacity;if(t instanceof gr){r("opacity",a);return}if(eQ(e)){var i=eh(e.fill);r("fill",i.color);var o=e.fillOpacity!=null?e.fillOpacity*i.opacity*a:i.opacity*a;o<1&&r("fill-opacity",o)}else r("fill",TC);if(tQ(e)){var s=eh(e.stroke);r("stroke",s.color);var l=e.strokeNoScale?t.getLineScale():1,u=l?(e.lineWidth||0)/l:0,c=e.strokeOpacity!=null?e.strokeOpacity*s.opacity*a:s.opacity*a,f=e.strokeFirst;if(u!==1&&r("stroke-width",u),f&&r("paint-order",f?"stroke":"fill"),c<1&&r("stroke-opacity",c),e.lineDash){var d=iC(t),h=d[0],v=d[1];h&&(v=Jq(v||0),r("stroke-dasharray",h.join(",")),(v||n)&&r("stroke-dashoffset",v))}for(var y=0;y<H_.length;y++){var m=H_[y];if(e[m]!==oy[m]){var x=e[m]||oy[m];x&&r(rQ[y],x)}}}}var M3="http://www.w3.org/2000/svg",k3="http://www.w3.org/1999/xlink",aQ="http://www.w3.org/2000/xmlns/",iQ="http://www.w3.org/XML/1998/namespace",HD="ecmeta_";function A3(r){return document.createElementNS(M3,r)}function dr(r,e,t,n,a){return{tag:r,attrs:t||{},children:n,text:a,key:e}}function oQ(r,e){var t=[];if(e)for(var n in e){var a=e[n],i=n;a!==!1&&(a!==!0&&a!=null&&(i+='="'+a+'"'),t.push(i))}return"<"+r+" "+t.join(" ")+">"}function sQ(r){return"</"+r+">"}function CC(r,e){e=e||{};var t=e.newline?`
|
|
37
|
+
`:"";function n(a){var i=a.children,o=a.tag,s=a.attrs,l=a.text;return oQ(o,s)+(o!=="style"?$r(l):l||"")+(i?""+t+ue(i,function(u){return n(u)}).join(t)+t:"")+sQ(o)}return n(r)}function lQ(r,e,t){t=t||{};var n=t.newline?`
|
|
38
|
+
`:"",a=" {"+n,i=n+"}",o=ue(st(r),function(l){return l+a+ue(st(r[l]),function(u){return u+":"+r[l][u]+";"}).join(n)+i}).join(n),s=ue(st(e),function(l){return"@keyframes "+l+a+ue(st(e[l]),function(u){return u+a+ue(st(e[l][u]),function(c){var f=e[l][u][c];return c==="d"&&(f='path("'+f+'")'),c+":"+f+";"}).join(n)+i}).join(n)+i}).join(n);return!o&&!s?"":["<![CDATA[",o,s,"]]>"].join(n)}function U_(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function UD(r,e,t,n){return dr("svg","root",{width:r,height:e,xmlns:M3,"xmlns:xlink":k3,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+r+" "+e:!1},t)}var uQ=0;function L3(){return uQ++}var YD={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"},Qs="transform-origin";function cQ(r,e,t){var n=ie({},r.shape);ie(n,e),r.buildPath(t,n);var a=new C3;return a.reset(ZN(r)),t.rebuildPath(a,1),a.generateStr(),a.getStr()}function fQ(r,e){var t=e.originX,n=e.originY;(t||n)&&(r[Qs]=t+"px "+n+"px")}var dQ={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function I3(r,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=r,t}function hQ(r,e,t){var n=r.shape.paths,a={},i,o;if(z(n,function(l){var u=U_(t.zrId);u.animation=!0,jm(l,{},u,!0);var c=u.cssAnims,f=u.cssNodes,d=st(c),h=d.length;if(h){o=d[h-1];var v=c[o];for(var y in v){var m=v[y];a[y]=a[y]||{d:""},a[y].d+=m.d||""}for(var x in f){var _=f[x].animation;_.indexOf(o)>=0&&(i=_)}}}),!!i){e.d=!1;var s=I3(a,t);return i.replace(o,s)}}function XD(r){return pe(r)?YD[r]?"cubic-bezier("+YD[r]+")":sT(r)?r:"":""}function jm(r,e,t,n){var a=r.animators,i=a.length,o=[];if(r instanceof jh){var s=hQ(r,e,t);if(s)o.push(s);else if(!i)return}else if(!i)return;for(var l={},u=0;u<i;u++){var c=a[u],f=[c.getMaxTime()/1e3+"s"],d=XD(c.getClip().easing),h=c.getDelay();d?f.push(d):f.push("linear"),h&&f.push(h/1e3+"s"),c.getLoop()&&f.push("infinite");var v=f.join(" ");l[v]=l[v]||[v,[]],l[v][1].push(c)}function y(_){var T=_[1],C=T.length,k={},A={},L={},D="animation-timing-function";function P(ve,fe,Te){for(var xe=ve.getTracks(),Ie=ve.getMaxTime(),dt=0;dt<xe.length;dt++){var ke=xe[dt];if(ke.needsAnimate()){var He=ke.keyframes,tt=ke.propName;if(Te&&(tt=Te(tt)),tt)for(var _t=0;_t<He.length;_t++){var Or=He[_t],yr=Math.round(Or.time/Ie*100)+"%",vn=XD(Or.easing),gn=Or.rawValue;(pe(gn)||ut(gn))&&(fe[yr]=fe[yr]||{},fe[yr][tt]=Or.rawValue,vn&&(fe[yr][D]=vn))}}}}for(var E=0;E<C;E++){var O=T[E],B=O.targetName;B?B==="shape"&&P(O,A):!n&&P(O,k)}for(var N in k){var W={};ny(W,r),ie(W,k[N]);var H=KN(W),$=k[N][D];L[N]=H?{transform:H}:{},fQ(L[N],W),$&&(L[N][D]=$)}var Z,G=!0;for(var N in A){L[N]=L[N]||{};var X=!Z,$=A[N][D];X&&(Z=new ii);var K=Z.len();Z.reset(),L[N].d=cQ(r,A[N],Z);var V=Z.len();if(!X&&K!==V){G=!1;break}$&&(L[N][D]=$)}if(!G)for(var N in L)delete L[N].d;if(!n)for(var E=0;E<C;E++){var O=T[E],B=O.targetName;B==="style"&&P(O,L,function(xe){return dQ[xe]})}for(var U=st(L),ae=!0,ce,E=1;E<U.length;E++){var re=U[E-1],_e=U[E];if(L[re][Qs]!==L[_e][Qs]){ae=!1;break}ce=L[re][Qs]}if(ae&&ce){for(var N in L)L[N][Qs]&&delete L[N][Qs];e[Qs]=ce}if(ht(U,function(ve){return st(L[ve]).length>0}).length){var Ne=I3(L,t);return Ne+" "+_[0]+" both"}}for(var m in l){var s=y(l[m]);s&&o.push(s)}if(o.length){var x=t.zrId+"-cls-"+L3();t.cssNodes["."+x]={animation:o.join(",")},e.class=x}}function pQ(r,e,t){if(!r.ignore)if(r.isSilent()){var n={"pointer-events":"none"};ZD(n,e,t)}else{var a=r.states.emphasis&&r.states.emphasis.style?r.states.emphasis.style:{},i=a.fill;if(!i){var o=r.style&&r.style.fill,s=r.states.select&&r.states.select.style&&r.states.select.style.fill,l=r.currentStates.indexOf("select")>=0&&s||o;l&&(i=ey(l))}var u=a.lineWidth;if(u){var c=!a.strokeNoScale&&r.transform?r.transform[0]:1;u=u/c}var n={cursor:"pointer"};i&&(n.fill=i),a.stroke&&(n.stroke=a.stroke),u&&(n["stroke-width"]=u),ZD(n,e,t)}}function ZD(r,e,t,n){var a=JSON.stringify(r),i=t.cssStyleCache[a];i||(i=t.zrId+"-cls-"+L3(),t.cssStyleCache[a]=i,t.cssNodes["."+i+":hover"]=r),e.class=e.class?e.class+" "+i:i}var ph=Math.round;function D3(r){return r&&pe(r.src)}function P3(r){return r&&Me(r.toDataURL)}function MC(r,e,t,n){nQ(function(a,i){var o=a==="fill"||a==="stroke";o&&XN(i)?E3(e,r,a,n):o&&uT(i)?z3(t,r,a,n):r[a]=i,o&&n.ssr&&i==="none"&&(r["pointer-events"]="visible")},e,t,!1),bQ(t,r,n)}function kC(r,e){var t=nj(e);t&&(t.each(function(n,a){n!=null&&(r[(HD+a).toLowerCase()]=n+"")}),e.isSilent()&&(r[HD+"silent"]="true"))}function KD(r){return Fo(r[0]-1)&&Fo(r[1])&&Fo(r[2])&&Fo(r[3]-1)}function vQ(r){return Fo(r[4])&&Fo(r[5])}function AC(r,e,t){if(e&&!(vQ(e)&&KD(e))){var n=1e4;r.transform=KD(e)?"translate("+ph(e[4]*n)/n+" "+ph(e[5]*n)/n+")":KH(e)}}function qD(r,e,t){for(var n=r.points,a=[],i=0;i<n.length;i++)a.push(ph(n[i][0]*t)/t),a.push(ph(n[i][1]*t)/t);e.points=a.join(" ")}function QD(r){return!r.smooth}function gQ(r){var e=ue(r,function(t){return typeof t=="string"?[t,t]:t});return function(t,n,a){for(var i=0;i<e.length;i++){var o=e[i],s=t[o[0]];s!=null&&(n[o[1]]=ph(s*a)/a)}}}var yQ={circle:[gQ(["cx","cy","r"])],polyline:[qD,QD],polygon:[qD,QD]};function mQ(r){for(var e=r.animators,t=0;t<e.length;t++)if(e[t].targetName==="shape")return!0;return!1}function R3(r,e){var t=r.style,n=r.shape,a=yQ[r.type],i={},o=e.animation,s="path",l=r.style.strokePercent,u=e.compress&&ZN(r)||4;if(a&&!e.willUpdate&&!(a[1]&&!a[1](n))&&!(o&&mQ(r))&&!(l<1)){s=r.type;var c=Math.pow(10,u);a[0](n,i,c)}else{var f=!r.path||r.shapeChanged();r.path||r.createPathProxy();var d=r.path;f&&(d.beginPath(),r.buildPath(d,r.shape),r.pathUpdated());var h=d.getVersion(),v=r,y=v.__svgPathBuilder;(v.__svgPathVersion!==h||!y||l!==v.__svgPathStrokePercent)&&(y||(y=v.__svgPathBuilder=new C3),y.reset(u),d.rebuildPath(y,l),y.generateStr(),v.__svgPathVersion=h,v.__svgPathStrokePercent=l),i.d=y.getStr()}return AC(i,r.transform),MC(i,t,r,e),kC(i,r),e.animation&&jm(r,i,e),e.emphasis&&pQ(r,i,e),dr(s,r.id+"",i)}function xQ(r,e){var t=r.style,n=t.image;if(n&&!pe(n)&&(D3(n)?n=n.src:P3(n)&&(n=n.toDataURL())),!!n){var a=t.x||0,i=t.y||0,o=t.width,s=t.height,l={href:n,width:o,height:s};return a&&(l.x=a),i&&(l.y=i),AC(l,r.transform),MC(l,t,r,e),kC(l,r),e.animation&&jm(r,l,e),dr("image",r.id+"",l)}}function SQ(r,e){var t=r.style,n=t.text;if(n!=null&&(n+=""),!(!n||isNaN(t.x)||isNaN(t.y))){var a=t.font||Ui,i=t.x||0,o=QH(t.y||0,Eh(a),t.textBaseline),s=qH[t.textAlign]||t.textAlign,l={"dominant-baseline":"central","text-anchor":s};if(Lj(t)){var u="",c=t.fontStyle,f=Aj(t.fontSize);if(!parseFloat(f))return;var d=t.fontFamily||SN,h=t.fontWeight;u+="font-size:"+f+";font-family:"+d+";",c&&c!=="normal"&&(u+="font-style:"+c+";"),h&&h!=="normal"&&(u+="font-weight:"+h+";"),l.style=u}else l.style="font: "+a;return n.match(/\s/)&&(l["xml:space"]="preserve"),i&&(l.x=i),o&&(l.y=o),AC(l,r.transform),MC(l,t,r,e),kC(l,r),e.animation&&jm(r,l,e),dr("text",r.id+"",l,void 0,n)}}function JD(r,e){if(r instanceof nt)return R3(r,e);if(r instanceof gr)return xQ(r,e);if(r instanceof fc)return SQ(r,e)}function bQ(r,e,t){var n=r.style;if(JH(n)){var a=e7(r),i=t.shadowCache,o=i[a];if(!o){var s=r.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var c=n.shadowOffsetX||0,f=n.shadowOffsetY||0,d=n.shadowBlur,h=eh(n.shadowColor),v=h.opacity,y=h.color,m=d/2/l,x=d/2/u,_=m+" "+x;o=t.zrId+"-s"+t.shadowIdx++,t.defs[o]=dr("filter",o,{id:o,x:"-100%",y:"-100%",width:"300%",height:"300%"},[dr("feDropShadow","",{dx:c/l,dy:f/u,stdDeviation:_,"flood-color":y,"flood-opacity":v})]),i[a]=o}e.filter=vm(o)}}function E3(r,e,t,n){var a=r[t],i,o={gradientUnits:a.global?"userSpaceOnUse":"objectBoundingBox"};if(UN(a))i="linearGradient",o.x1=a.x,o.y1=a.y,o.x2=a.x2,o.y2=a.y2;else if(YN(a))i="radialGradient",o.cx=Ce(a.x,.5),o.cy=Ce(a.y,.5),o.r=Ce(a.r,.5);else return;for(var s=a.colorStops,l=[],u=0,c=s.length;u<c;++u){var f=Wb(s[u].offset)*100+"%",d=s[u].color,h=eh(d),v=h.color,y=h.opacity,m={offset:f};m["stop-color"]=v,y<1&&(m["stop-opacity"]=y),l.push(dr("stop",u+"",m))}var x=dr(i,"",o,l),_=CC(x),T=n.gradientCache,C=T[_];C||(C=n.zrId+"-g"+n.gradientIdx++,T[_]=C,o.id=C,n.defs[C]=dr(i,C,o,l)),e[t]=vm(C)}function z3(r,e,t,n){var a=r.style[t],i=r.getBoundingRect(),o={},s=a.repeat,l=s==="no-repeat",u=s==="repeat-x",c=s==="repeat-y",f;if(HN(a)){var d=a.imageWidth,h=a.imageHeight,v=void 0,y=a.image;if(pe(y)?v=y:D3(y)?v=y.src:P3(y)&&(v=y.toDataURL()),typeof Image>"u"){var m="Image width/height must been given explictly in svg-ssr renderer.";Rr(d,m),Rr(h,m)}else if(d==null||h==null){var x=function(E,O){if(E){var B=E.elm,N=d||O.width,W=h||O.height;E.tag==="pattern"&&(u?(W=1,N/=i.width):c&&(N=1,W/=i.height)),E.attrs.width=N,E.attrs.height=W,B&&(B.setAttribute("width",N),B.setAttribute("height",W))}},_=mT(v,null,r,function(E){l||x(A,E),x(f,E)});_&&_.width&&_.height&&(d=d||_.width,h=h||_.height)}f=dr("image","img",{href:v,width:d,height:h}),o.width=d,o.height=h}else a.svgElement&&(f=Ae(a.svgElement),o.width=a.svgWidth,o.height=a.svgHeight);if(f){var T,C;l?T=C=1:u?(C=1,T=o.width/i.width):c?(T=1,C=o.height/i.height):o.patternUnits="userSpaceOnUse",T!=null&&!isNaN(T)&&(o.width=T),C!=null&&!isNaN(C)&&(o.height=C);var k=KN(a);k&&(o.patternTransform=k);var A=dr("pattern","",o,[f]),L=CC(A),D=n.patternCache,P=D[L];P||(P=n.zrId+"-p"+n.patternIdx++,D[L]=P,o.id=P,A=n.defs[P]=dr("pattern",P,o,[f])),e[t]=vm(P)}}function _Q(r,e,t){var n=t.clipPathCache,a=t.defs,i=n[r.id];if(!i){i=t.zrId+"-c"+t.clipPathIdx++;var o={id:i};n[r.id]=i,a[i]=dr("clipPath",i,o,[R3(r,t)])}e["clip-path"]=vm(i)}function eP(r){return document.createTextNode(r)}function il(r,e,t){r.insertBefore(e,t)}function tP(r,e){r.removeChild(e)}function rP(r,e){r.appendChild(e)}function O3(r){return r.parentNode}function N3(r){return r.nextSibling}function sS(r,e){r.textContent=e}var nP=58,wQ=120,TQ=dr("","");function Y_(r){return r===void 0}function Wa(r){return r!==void 0}function CQ(r,e,t){for(var n={},a=e;a<=t;++a){var i=r[a].key;i!==void 0&&(n[i]=a)}return n}function _d(r,e){var t=r.key===e.key,n=r.tag===e.tag;return n&&t}function vh(r){var e,t=r.children,n=r.tag;if(Wa(n)){var a=r.elm=A3(n);if(LC(TQ,r),le(t))for(e=0;e<t.length;++e){var i=t[e];i!=null&&rP(a,vh(i))}else Wa(r.text)&&!Pe(r.text)&&rP(a,eP(r.text))}else r.elm=eP(r.text);return r.elm}function j3(r,e,t,n,a){for(;n<=a;++n){var i=t[n];i!=null&&il(r,vh(i),e)}}function Dy(r,e,t,n){for(;t<=n;++t){var a=e[t];if(a!=null)if(Wa(a.tag)){var i=O3(a.elm);tP(i,a.elm)}else tP(r,a.elm)}}function LC(r,e){var t,n=e.elm,a=r&&r.attrs||{},i=e.attrs||{};if(a!==i){for(t in i){var o=i[t],s=a[t];s!==o&&(o===!0?n.setAttribute(t,""):o===!1?n.removeAttribute(t):t==="style"?n.style.cssText=o:t.charCodeAt(0)!==wQ?n.setAttribute(t,o):t==="xmlns:xlink"||t==="xmlns"?n.setAttributeNS(aQ,t,o):t.charCodeAt(3)===nP?n.setAttributeNS(iQ,t,o):t.charCodeAt(5)===nP?n.setAttributeNS(k3,t,o):n.setAttribute(t,o))}for(t in a)t in i||n.removeAttribute(t)}}function MQ(r,e,t){for(var n=0,a=0,i=e.length-1,o=e[0],s=e[i],l=t.length-1,u=t[0],c=t[l],f,d,h,v;n<=i&&a<=l;)o==null?o=e[++n]:s==null?s=e[--i]:u==null?u=t[++a]:c==null?c=t[--l]:_d(o,u)?(Vu(o,u),o=e[++n],u=t[++a]):_d(s,c)?(Vu(s,c),s=e[--i],c=t[--l]):_d(o,c)?(Vu(o,c),il(r,o.elm,N3(s.elm)),o=e[++n],c=t[--l]):_d(s,u)?(Vu(s,u),il(r,s.elm,o.elm),s=e[--i],u=t[++a]):(Y_(f)&&(f=CQ(e,n,i)),d=f[u.key],Y_(d)?il(r,vh(u),o.elm):(h=e[d],h.tag!==u.tag?il(r,vh(u),o.elm):(Vu(h,u),e[d]=void 0,il(r,h.elm,o.elm))),u=t[++a]);(n<=i||a<=l)&&(n>i?(v=t[l+1]==null?null:t[l+1].elm,j3(r,v,t,a,l)):Dy(r,e,n,i))}function Vu(r,e){var t=e.elm=r.elm,n=r.children,a=e.children;r!==e&&(LC(r,e),Y_(e.text)?Wa(n)&&Wa(a)?n!==a&&MQ(t,n,a):Wa(a)?(Wa(r.text)&&sS(t,""),j3(t,null,a,0,a.length-1)):Wa(n)?Dy(t,n,0,n.length-1):Wa(r.text)&&sS(t,""):r.text!==e.text&&(Wa(n)&&Dy(t,n,0,n.length-1),sS(t,e.text)))}function kQ(r,e){if(_d(r,e))Vu(r,e);else{var t=r.elm,n=O3(t);vh(e),n!==null&&(il(n,e.elm,N3(t)),Dy(n,[r],0,0))}return e}var AQ=0,LQ=(function(){function r(e,t,n){if(this.type="svg",this.refreshHover=aP(),this.configLayer=aP(),this.storage=t,this._opts=n=ie({},n),this.root=e,this._id="zr"+AQ++,this._oldVNode=UD(n.width,n.height),e&&!n.ssr){var a=this._viewport=document.createElement("div");a.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=A3("svg");LC(null,this._oldVNode),a.appendChild(i),e.appendChild(a)}this.resize(n.width,n.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",kQ(this._oldVNode,e),this._oldVNode=e}},r.prototype.renderOneToVNode=function(e){return JD(e,U_(this._id))},r.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),n=this._width,a=this._height,i=U_(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var o=[],s=this._bgVNode=IQ(n,a,this._backgroundColor,i);s&&o.push(s);var l=e.compress?null:this._mainVNode=dr("g","main",{},[]);this._paintList(t,i,l?l.children:o),l&&o.push(l);var u=ue(st(i.defs),function(d){return i.defs[d]});if(u.length&&o.push(dr("defs","defs",{},u)),e.animation){var c=lQ(i.cssNodes,i.cssAnims,{newline:!0});if(c){var f=dr("style","stl",{},[],c);o.push(f)}}return UD(n,a,o,e.useViewBox)},r.prototype.renderToString=function(e){return e=e||{},CC(this.renderToVNode({animation:Ce(e.cssAnimation,!0),emphasis:Ce(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Ce(e.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(e,t,n){for(var a=e.length,i=[],o=0,s,l,u=0,c=0;c<a;c++){var f=e[c];if(!f.invisible){var d=f.__clipPaths,h=d&&d.length||0,v=l&&l.length||0,y=void 0;for(y=Math.max(h-1,v-1);y>=0&&!(d&&l&&d[y]===l[y]);y--);for(var m=v-1;m>y;m--)o--,s=i[o-1];for(var x=y+1;x<h;x++){var _={};_Q(d[x],_,t);var T=dr("g","clip-g-"+u++,_,[]);(s?s.children:n).push(T),i[o++]=T,s=T}l=d;var C=JD(f,t);C&&(s?s.children:n).push(C)}}},r.prototype.resize=function(e,t){var n=this._opts,a=this.root,i=this._viewport;if(e!=null&&(n.width=e),t!=null&&(n.height=t),a&&i&&(i.style.display="none",e=Zu(a,0,n),t=Zu(a,1,n),i.style.display=""),this._width!==e||this._height!==t){if(this._width=e,this._height=t,i){var o=i.style;o.width=e+"px",o.height=t+"px"}if(uT(this._backgroundColor))this.refresh();else{var s=this._svgDom;s&&(s.setAttribute("width",e),s.setAttribute("height",t));var l=this._bgVNode&&this._bgVNode.elm;l&&(l.setAttribute("width",e),l.setAttribute("height",t))}}},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},r.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},r.prototype.toDataURL=function(e){var t=this.renderToString(),n="data:image/svg+xml;";return e?(t=r7(t),t&&n+"base64,"+t):n+"charset=UTF-8,"+encodeURIComponent(t)},r})();function aP(r){return function(){}}function IQ(r,e,t,n){var a;if(t&&t!=="none")if(a=dr("rect","bg",{width:r,height:e,x:"0",y:"0"}),XN(t))E3({fill:t},a.attrs,"fill",n);else if(uT(t))z3({style:{fill:t},dirty:Vt,getBoundingRect:function(){return{width:r,height:e}}},a.attrs,"fill",n);else{var i=eh(t),o=i.color,s=i.opacity;a.attrs.fill=o,s<1&&(a.attrs["fill-opacity"]=s)}return a}function DQ(r){r.registerPainter("svg",LQ)}function iP(r,e,t){var n=pn.createCanvas(),a=e.getWidth(),i=e.getHeight(),o=n.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=a+"px",o.height=i+"px",n.setAttribute("data-zr-dom-id",r)),n.width=a*t,n.height=i*t,n}var lS=(function(r){Q(e,r);function e(t,n,a){var i=r.call(this)||this;i.motionBlur=!1,i.lastFrameAlpha=.7,i.dpr=1,i.virtual=!1,i.config={},i.incremental=!1,i.zlevel=0,i.maxRepaintRectCount=5,i.__dirty=!0,i.__firstTimePaint=!0,i.__used=!1,i.__drawIndex=0,i.__startIndex=0,i.__endIndex=0,i.__prevStartIndex=null,i.__prevEndIndex=null;var o;a=a||ry,typeof t=="string"?o=iP(t,n,a):Pe(t)&&(o=t,t=o.id),i.id=t,i.dom=o;var s=o.style;return s&&(aT(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),i.painter=n,i.dpr=a,i}return e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=iP("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),t!==1&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,n,a,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new ze(0,0,0,0);function c(_){if(!(!_.isFinite()||_.isZero()))if(o.length===0){var T=new ze(0,0,0,0);T.copy(_),o.push(T)}else{for(var C=!1,k=1/0,A=0,L=0;L<o.length;++L){var D=o[L];if(D.intersect(_)){var P=new ze(0,0,0,0);P.copy(D),P.union(_),o[L]=P,C=!0;break}else if(l){u.copy(_),u.union(D);var E=_.width*_.height,O=D.width*D.height,B=u.width*u.height,N=B-E-O;N<k&&(k=N,A=L)}}if(l&&(o[A].union(_),C=!0),!C){var T=new ze(0,0,0,0);T.copy(_),o.push(T)}l||(l=o.length>=s)}}for(var f=this.__startIndex;f<this.__endIndex;++f){var d=t[f];if(d){var h=d.shouldBePainted(a,i,!0,!0),v=d.__isRendered&&(d.__dirty&Tn||!h)?d.getPrevPaintRect():null;v&&c(v);var y=h&&(d.__dirty&Tn||!d.__isRendered)?d.getPaintRect():null;y&&c(y)}}for(var f=this.__prevStartIndex;f<this.__prevEndIndex;++f){var d=n[f],h=d&&d.shouldBePainted(a,i,!0,!0);if(d&&(!h||!d.__zr)&&d.__isRendered){var v=d.getPrevPaintRect();v&&c(v)}}var m;do{m=!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])?(m=!0,o[f].union(o[x]),o.splice(x,1)):x++;f++}}while(m);return this._paintRects=o,o},e.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},e.prototype.resize=function(t,n){var a=this.dpr,i=this.dom,o=i.style,s=this.domBack;o&&(o.width=t+"px",o.height=n+"px"),i.width=t*a,i.height=n*a,s&&(s.width=t*a,s.height=n*a,a!==1&&this.ctxBack.scale(a,a))},e.prototype.clear=function(t,n,a){var i=this.dom,o=this.ctx,s=i.width,l=i.height;n=n||this.clearColor;var u=this.motionBlur&&!t,c=this.lastFrameAlpha,f=this.dpr,d=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,s/f,l/f));var h=this.domBack;function v(y,m,x,_){if(o.clearRect(y,m,x,_),n&&n!=="transparent"){var T=void 0;if(Lh(n)){var C=n.global||n.__width===x&&n.__height===_;T=C&&n.__canvasGradient||L_(o,n,{x:0,y:0,width:x,height:_}),n.__canvasGradient=T,n.__width=x,n.__height=_}else TN(n)&&(n.scaleX=n.scaleX||f,n.scaleY=n.scaleY||f,T=I_(o,n,{dirty:function(){d.setUnpainted(),d.painter.refresh()}}));o.save(),o.fillStyle=T||n,o.fillRect(y,m,x,_),o.restore()}u&&(o.save(),o.globalAlpha=c,o.drawImage(h,y,m,x,_),o.restore())}!a||u?v(0,0,s,l):a.length&&z(a,function(y){v(y.x*f,y.y*f,y.width*f,y.height*f)})},e})(ra),oP=1e5,Ks=314159,Xv=.01,PQ=.001;function RQ(r){return r?r.__builtin__?!0:!(typeof r.resize!="function"||typeof r.refresh!="function"):!1}function EQ(r,e){var t=document.createElement("div");return t.style.cssText=["position:relative","width:"+r+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",t}var zQ=(function(){function r(e,t,n,a){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var i=!e.nodeName||e.nodeName.toUpperCase()==="CANVAS";this._opts=n=ie({},n||{}),this.dpr=n.devicePixelRatio||ry,this._singleCanvas=i,this.root=e;var o=e.style;o&&(aT(e),e.innerHTML=""),this.storage=t;var s=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(i){var c=e,f=c.width,d=c.height;n.width!=null&&(f=n.width),n.height!=null&&(d=n.height),this.dpr=n.devicePixelRatio||1,c.width=f*this.dpr,c.height=d*this.dpr,this._width=f,this._height=d;var h=new lS(c,this,this.dpr);h.__builtin__=!0,h.initContext(),l[Ks]=h,h.zlevel=Ks,s.push(Ks),this._domRoot=e}else{this._width=Zu(e,0,n),this._height=Zu(e,1,n);var u=this._domRoot=EQ(this._width,this._height);e.appendChild(u)}}return r.prototype.getType=function(){return"canvas"},r.prototype.isSingleCanvas=function(){return this._singleCanvas},r.prototype.getViewportRoot=function(){return this._domRoot},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.refresh=function(e){var t=this.storage.getDisplayList(!0),n=this._prevDisplayList,a=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,n,e,this._redrawId);for(var i=0;i<a.length;i++){var o=a[i],s=this._layers[o];if(!s.__builtin__&&s.refresh){var l=i===0?this._backgroundColor:null;s.refresh(l)}}return this._opts.useDirtyRect&&(this._prevDisplayList=t.slice()),this},r.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},r.prototype._paintHoverList=function(e){var t=e.length,n=this._hoverlayer;if(n&&n.clear(),!!t){for(var a={inHover:!0,viewWidth:this._width,viewHeight:this._height},i,o=0;o<t;o++){var s=e[o];s.__inHover&&(n||(n=this._hoverlayer=this.getLayer(oP)),i||(i=n.ctx,i.save()),pl(i,s,a,o===t-1))}i&&i.restore()}},r.prototype.getHoverLayer=function(){return this.getLayer(oP)},r.prototype.paintOne=function(e,t){oC(e,t)},r.prototype._paintList=function(e,t,n,a){if(this._redrawId===a){n=n||!1,this._updateLayerStatus(e);var i=this._doPaintList(e,t,n),o=i.finished,s=i.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(e),o)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var l=this;Kg(function(){l._paintList(e,t,n,a)})}}},r.prototype._compositeManually=function(){var e=this.getLayer(Ks).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),this.eachBuiltinLayer(function(a){a.virtual&&e.drawImage(a.dom,0,0,t,n)})},r.prototype._doPaintList=function(e,t,n){for(var a=this,i=[],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)&&i.push(u)}for(var c=!0,f=!1,d=function(y){var m=i[y],x=m.ctx,_=o&&m.createRepaintRects(e,t,h._width,h._height),T=n?m.__startIndex:m.__drawIndex,C=!n&&m.incremental&&Date.now,k=C&&Date.now(),A=m.zlevel===h._zlevelList[0]?h._backgroundColor:null;if(m.__startIndex===m.__endIndex)m.clear(!1,A,_);else if(T===m.__startIndex){var L=e[T];(!L.incremental||!L.notClear||n)&&m.clear(!1,A,_)}T===-1&&(console.error("For some unknown reason. drawIndex is -1"),T=m.__startIndex);var D,P=function(N){var W={inHover:!1,allClipped:!1,prevEl:null,viewWidth:a._width,viewHeight:a._height};for(D=T;D<m.__endIndex;D++){var H=e[D];if(H.__inHover&&(f=!0),a._doPaintEl(H,m,o,N,W,D===m.__endIndex-1),C){var $=Date.now()-k;if($>15)break}}W.prevElClipPaths&&x.restore()};if(_)if(_.length===0)D=m.__endIndex;else for(var E=h.dpr,O=0;O<_.length;++O){var B=_[O];x.save(),x.beginPath(),x.rect(B.x*E,B.y*E,B.width*E,B.height*E),x.clip(),P(B),x.restore()}else x.save(),P(),x.restore();m.__drawIndex=D,m.__drawIndex<m.__endIndex&&(c=!1)},h=this,v=0;v<i.length;v++)d(v);return ot.wxa&&z(this._layers,function(y){y&&y.ctx&&y.ctx.draw&&y.ctx.draw()}),{finished:c,needsRefreshHover:f}},r.prototype._doPaintEl=function(e,t,n,a,i,o){var s=t.ctx;if(n){var l=e.getPaintRect();(!a||l&&l.intersect(a))&&(pl(s,e,i,o),e.setPrevPaintRect(l))}else pl(s,e,i,o)},r.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=Ks);var n=this._layers[e];return n||(n=new lS("zr_"+e,this,this.dpr),n.zlevel=e,n.__builtin__=!0,this._layerConfig[e]?Ye(n,this._layerConfig[e],!0):this._layerConfig[e-Xv]&&Ye(n,this._layerConfig[e-Xv],!0),t&&(n.virtual=t),this.insertLayer(e,n),n.initContext()),n},r.prototype.insertLayer=function(e,t){var n=this._layers,a=this._zlevelList,i=a.length,o=this._domRoot,s=null,l=-1;if(!n[e]&&RQ(t)){if(i>0&&e>a[0]){for(l=0;l<i-1&&!(a[l]<e&&a[l+1]>e);l++);s=n[a[l]]}if(a.splice(l+1,0,e),n[e]=t,!t.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(t.dom,u.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.painter||(t.painter=this)}},r.prototype.eachLayer=function(e,t){for(var n=this._zlevelList,a=0;a<n.length;a++){var i=n[a];e.call(t,this._layers[i],i)}},r.prototype.eachBuiltinLayer=function(e,t){for(var n=this._zlevelList,a=0;a<n.length;a++){var i=n[a],o=this._layers[i];o.__builtin__&&e.call(t,o,i)}},r.prototype.eachOtherLayer=function(e,t){for(var n=this._zlevelList,a=0;a<n.length;a++){var i=n[a],o=this._layers[i];o.__builtin__||e.call(t,o,i)}},r.prototype.getLayers=function(){return this._layers},r.prototype._updateLayerStatus=function(e){this.eachBuiltinLayer(function(f,d){f.__dirty=f.__used=!1});function t(f){i&&(i.__endIndex!==f&&(i.__dirty=!0),i.__endIndex=f)}if(this._singleCanvas)for(var n=1;n<e.length;n++){var a=e[n];if(a.zlevel!==e[n-1].zlevel||a.incremental){this._needsManuallyCompositing=!0;break}}var i=null,o=0,s,l;for(l=0;l<e.length;l++){var a=e[l],u=a.zlevel,c=void 0;s!==u&&(s=u,o=0),a.incremental?(c=this.getLayer(u+PQ,this._needsManuallyCompositing),c.incremental=!0,o=1):c=this.getLayer(u+(o>0?Xv:0),this._needsManuallyCompositing),c.__builtin__||cm("ZLevel "+u+" has been used by unkown layer "+c.id),c!==i&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,t(l),i=c),a.__dirty&Tn&&!a.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(f,d){!f.__used&&f.getElementCount()>0&&(f.__dirty=!0,f.__startIndex=f.__endIndex=f.__drawIndex=0),f.__dirty&&f.__drawIndex<0&&(f.__drawIndex=f.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(e){e.clear()},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e,z(this._layers,function(t){t.setUnpainted()})},r.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?Ye(n[e],t,!0):n[e]=t;for(var a=0;a<this._zlevelList.length;a++){var i=this._zlevelList[a];if(i===e||i===e+Xv){var o=this._layers[i];Ye(o,n[e],!0)}}}},r.prototype.delLayer=function(e){var t=this._layers,n=this._zlevelList,a=t[e];a&&(a.dom.parentNode.removeChild(a.dom),delete t[e],n.splice(Ue(n,e),1))},r.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var a=this._opts,i=this.root;if(e!=null&&(a.width=e),t!=null&&(a.height=t),e=Zu(i,0,a),t=Zu(i,1,a),n.style.display="",this._width!==e||t!==this._height){n.style.width=e+"px",n.style.height=t+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(e,t);this.refresh(!0)}this._width=e,this._height=t}else{if(e==null||t==null)return;this._width=e,this._height=t,this.getLayer(Ks).resize(e,t)}return this},r.prototype.clearLayer=function(e){var t=this._layers[e];t&&t.clear()},r.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},r.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[Ks].dom;var t=new lS("image",this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var a=t.dom.width,i=t.dom.height;this.eachLayer(function(f){f.__builtin__?n.drawImage(f.dom,0,0,a,i):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];pl(n,c,o,l===u-1)}return t.dom},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r})();function OQ(r){r.registerPainter("canvas",zQ)}var NQ=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t){return di(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(t){var n=new Le,a=Kt("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);n.add(a),a.setStyle(t.lineStyle);var i=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=i==="none"?"circle":i,l=t.itemHeight*.8,u=Kt(s,(t.itemWidth-l)/2,(t.itemHeight-l)/2,l,l,t.itemStyle.fill);n.add(u),u.setStyle(t.itemStyle);var c=t.iconRotate==="inherit"?o:t.iconRotate||0;return u.rotation=c*Math.PI/180,u.setOrigin([t.itemWidth/2,t.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill=ee.color.neutral00,u.style.lineWidth=2),n},e.type="series.line",e.dependencies=["grid","polar"],e.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},e})(St);function mc(r,e){var t=r.mapDimensionsAll("defaultedLabel"),n=t.length;if(n===1){var a=pc(r,e,t[0]);return a!=null?a+"":null}else if(n){for(var i=[],o=0;o<t.length;o++)i.push(pc(r,e,t[o]));return i.join(" ")}}function B3(r,e){var t=r.mapDimensionsAll("defaultedLabel");if(!le(e))return e+"";for(var n=[],a=0;a<t.length;a++){var i=r.getDimensionIndex(t[a]);i>=0&&n.push(e[i])}return n.join(" ")}var $h=(function(r){Q(e,r);function e(t,n,a,i){var o=r.call(this)||this;return o.updateData(t,n,a,i),o}return e.prototype._createSymbol=function(t,n,a,i,o,s){this.removeAll();var l=Kt(t,-1,-1,2,2,null,s);l.attr({z2:Ce(o,100),culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),l.drift=jQ,this._symbolType=t,this.add(l)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){Xi(this.childAt(0))},e.prototype.downplay=function(){Zi(this.childAt(0))},e.prototype.setZ=function(t,n){var a=this.childAt(0);a.zlevel=t,a.z=n},e.prototype.setDraggable=function(t,n){var a=this.childAt(0);a.draggable=t,a.cursor=!n&&t?"move":a.cursor},e.prototype.updateData=function(t,n,a,i){this.silent=!1;var o=t.getItemVisual(n,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,n),u=e.getSymbolZ2(t,n),c=o!==this._symbolType,f=i&&i.disableAnimation;if(c){var d=t.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,t,n,l,u,d)}else{var h=this.childAt(0);h.silent=!1;var v={scaleX:l[0]/2,scaleY:l[1]/2};f?h.attr(v):ct(h,v,s,n),ta(h)}if(this._updateCommon(t,n,l,a,i),c){var h=this.childAt(0);if(!f){var v={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,It(h,v,s,n)}}f&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,n,a,i,o){var s=this.childAt(0),l=t.hostModel,u,c,f,d,h,v,y,m,x;if(i&&(u=i.emphasisItemStyle,c=i.blurItemStyle,f=i.selectItemStyle,d=i.focus,h=i.blurScope,y=i.labelStatesModels,m=i.hoverScale,x=i.cursorStyle,v=i.emphasisDisabled),!i||t.hasItemOption){var _=i&&i.itemModel?i.itemModel:t.getItemModel(n),T=_.getModel("emphasis");u=T.getModel("itemStyle").getItemStyle(),f=_.getModel(["select","itemStyle"]).getItemStyle(),c=_.getModel(["blur","itemStyle"]).getItemStyle(),d=T.get("focus"),h=T.get("blurScope"),v=T.get("disabled"),y=sr(_),m=T.getShallow("scale"),x=_.getShallow("cursor")}var C=t.getItemVisual(n,"symbolRotate");s.attr("rotation",(C||0)*Math.PI/180||0);var k=Bl(t.getItemVisual(n,"symbolOffset"),a);k&&(s.x=k[0],s.y=k[1]),x&&s.attr("cursor",x);var A=t.getItemVisual(n,"style"),L=A.fill;if(s instanceof gr){var D=s.style;s.useStyle(ie({image:D.image,x:D.x,y:D.y,width:D.width,height:D.height},A))}else s.__isEmptyBrush?s.useStyle(ie({},A)):s.useStyle(A),s.style.decal=null,s.setColor(L,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var P=t.getItemVisual(n,"liftZ"),E=this._z2;P!=null?E==null&&(this._z2=s.z2,s.z2+=P):E!=null&&(s.z2=E,this._z2=null);var O=o&&o.useNameLabel;vr(s,y,{labelFetcher:l,labelDataIndex:n,defaultText:B,inheritColor:L,defaultOpacity:A.opacity});function B(H){return O?t.getName(H):mc(t,H)}this._sizeX=a[0]/2,this._sizeY=a[1]/2;var N=s.ensureState("emphasis");N.style=u,s.ensureState("select").style=f,s.ensureState("blur").style=c;var W=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;N.scaleX=this._sizeX*W,N.scaleY=this._sizeY*W,this.setSymbolScale(1),Pt(this,d,h,v)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,n,a){var i=this.childAt(0),o=je(this).dataIndex,s=a&&a.animation;if(this.silent=i.silent=!0,a&&a.fadeLabel){var l=i.getTextContent();l&&es(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();es(i,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,n){return Vc(t.getItemVisual(n,"symbolSize"))},e.getSymbolZ2=function(t,n){return t.getItemVisual(n,"z2")},e})(Le);function jQ(r,e){this.parent.drift(r,e)}function uS(r,e,t,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(t))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&r.getItemVisual(t,"symbol")!=="none"}function sP(r){return r!=null&&!Pe(r)&&(r={isIgnore:r}),r||{}}function lP(r){var e=r.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:sr(e),cursorStyle:e.get("cursor")}}var Hh=(function(){function r(e){this.group=new Le,this._SymbolCtor=e||$h}return r.prototype.updateData=function(e,t){this._progressiveEls=null,t=sP(t);var n=this.group,a=e.hostModel,i=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=lP(e),u={disableAnimation:s},c=t.getSymbolPoint||function(f){return e.getItemLayout(f)};i||n.removeAll(),e.diff(i).add(function(f){var d=c(f);if(uS(e,d,f,t)){var h=new o(e,f,l,u);h.setPosition(d),e.setItemGraphicEl(f,h),n.add(h)}}).update(function(f,d){var h=i.getItemGraphicEl(d),v=c(f);if(!uS(e,v,f,t)){n.remove(h);return}var y=e.getItemVisual(f,"symbol")||"circle",m=h&&h.getSymbolType&&h.getSymbolType();if(!h||m&&m!==y)n.remove(h),h=new o(e,f,l,u),h.setPosition(v);else{h.updateData(e,f,l,u);var x={x:v[0],y:v[1]};s?h.attr(x):ct(h,x,a)}n.add(h),e.setItemGraphicEl(f,h)}).remove(function(f){var d=i.getItemGraphicEl(f);d&&d.fadeOut(function(){n.remove(d)},a)}).execute(),this._getSymbolPoint=c,this._data=e},r.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(n,a){var i=e._getSymbolPoint(a);n.setPosition(i),n.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=lP(e),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[],n=sP(n);function a(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i<e.end;i++){var o=t.getItemLayout(i);if(uS(t,o,i,n)){var s=new this._SymbolCtor(t,i,this._seriesScope);s.traverse(a),s.setPosition(o),this.group.add(s),t.setItemGraphicEl(i,s),this._progressiveEls.push(s)}}},r.prototype.eachRendered=function(e){ls(this._progressiveEls||this.group,e)},r.prototype.remove=function(e){var t=this.group,n=this._data;n&&e?n.eachItemGraphicEl(function(a){a.fadeOut(function(){t.remove(a)},n.hostModel)}):t.removeAll()},r})();function F3(r,e,t){var n=r.getBaseAxis(),a=r.getOtherAxis(n),i=BQ(a,t),o=n.dim,s=a.dim,l=e.mapDimension(s),u=e.mapDimension(o),c=s==="x"||s==="radius"?1:0,f=ue(r.dimensions,function(v){return e.mapDimension(v)}),d=!1,h=e.getCalculationInfo("stackResultDimension");return qi(e,f[0])&&(d=!0,f[0]=h),qi(e,f[1])&&(d=!0,f[1]=h),{dataDimsForPoint:f,valueStart:i,valueAxisDim:s,baseAxisDim:o,stacked:!!d,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function BQ(r,e){var t=0,n=r.scale.getExtent();return e==="start"?t=n[0]:e==="end"?t=n[1]:ut(e)&&!isNaN(e)?t=e:n[0]>0?t=n[0]:n[1]<0&&(t=n[1]),t}function V3(r,e,t,n){var a=NaN;r.stacked&&(a=t.get(t.getCalculationInfo("stackedOverDimension"),n)),isNaN(a)&&(a=r.valueStart);var i=r.baseDataOffset,o=[];return o[i]=t.get(r.baseDim,n),o[1-i]=a,e.dataToPoint(o)}function FQ(r,e){var t=[];return e.diff(r).add(function(n){t.push({cmd:"+",idx:n})}).update(function(n,a){t.push({cmd:"=",idx:a,idx1:n})}).remove(function(n){t.push({cmd:"-",idx:n})}).execute(),t}function VQ(r,e,t,n,a,i,o,s){for(var l=FQ(r,e),u=[],c=[],f=[],d=[],h=[],v=[],y=[],m=F3(a,e,o),x=r.getLayout("points")||[],_=e.getLayout("points")||[],T=0;T<l.length;T++){var C=l[T],k=!0,A=void 0,L=void 0;switch(C.cmd){case"=":A=C.idx*2,L=C.idx1*2;var D=x[A],P=x[A+1],E=_[L],O=_[L+1];(isNaN(D)||isNaN(P))&&(D=E,P=O),u.push(D,P),c.push(E,O),f.push(t[A],t[A+1]),d.push(n[L],n[L+1]),y.push(e.getRawIndex(C.idx1));break;case"+":var B=C.idx,N=m.dataDimsForPoint,W=a.dataToPoint([e.get(N[0],B),e.get(N[1],B)]);L=B*2,u.push(W[0],W[1]),c.push(_[L],_[L+1]);var H=V3(m,a,e,B);f.push(H[0],H[1]),d.push(n[L],n[L+1]),y.push(e.getRawIndex(B));break;case"-":k=!1}k&&(h.push(C),v.push(v.length))}v.sort(function(re,_e){return y[re]-y[_e]});for(var $=u.length,Z=Za($),G=Za($),X=Za($),K=Za($),V=[],T=0;T<v.length;T++){var U=v[T],ae=T*2,ce=U*2;Z[ae]=u[ce],Z[ae+1]=u[ce+1],G[ae]=c[ce],G[ae+1]=c[ce+1],X[ae]=f[ce],X[ae+1]=f[ce+1],K[ae]=d[ce],K[ae+1]=d[ce+1],V[T]=h[U]}return{current:Z,next:G,stackedOnCurrent:X,stackedOnNext:K,status:V}}var Lo=Math.min,Io=Math.max;function Sl(r,e){return isNaN(r)||isNaN(e)}function X_(r,e,t,n,a,i,o,s,l){for(var u,c,f,d,h,v,y=t,m=0;m<n;m++){var x=e[y*2],_=e[y*2+1];if(y>=a||y<0)break;if(Sl(x,_)){if(l){y+=i;continue}break}if(y===t)r[i>0?"moveTo":"lineTo"](x,_),f=x,d=_;else{var T=x-u,C=_-c;if(T*T+C*C<.5){y+=i;continue}if(o>0){for(var k=y+i,A=e[k*2],L=e[k*2+1];A===x&&L===_&&m<n;)m++,k+=i,y+=i,A=e[k*2],L=e[k*2+1],x=e[y*2],_=e[y*2+1],T=x-u,C=_-c;var D=m+1;if(l)for(;Sl(A,L)&&D<n;)D++,k+=i,A=e[k*2],L=e[k*2+1];var P=.5,E=0,O=0,B=void 0,N=void 0;if(D>=n||Sl(A,L))h=x,v=_;else{E=A-u,O=L-c;var W=x-u,H=A-x,$=_-c,Z=L-_,G=void 0,X=void 0;if(s==="x"){G=Math.abs(W),X=Math.abs(H);var K=E>0?1:-1;h=x-K*G*o,v=_,B=x+K*X*o,N=_}else if(s==="y"){G=Math.abs($),X=Math.abs(Z);var V=O>0?1:-1;h=x,v=_-V*G*o,B=x,N=_+V*X*o}else G=Math.sqrt(W*W+$*$),X=Math.sqrt(H*H+Z*Z),P=X/(X+G),h=x-E*o*(1-P),v=_-O*o*(1-P),B=x+E*o*P,N=_+O*o*P,B=Lo(B,Io(A,x)),N=Lo(N,Io(L,_)),B=Io(B,Lo(A,x)),N=Io(N,Lo(L,_)),E=B-x,O=N-_,h=x-E*G/X,v=_-O*G/X,h=Lo(h,Io(u,x)),v=Lo(v,Io(c,_)),h=Io(h,Lo(u,x)),v=Io(v,Lo(c,_)),E=x-h,O=_-v,B=x+E*X/G,N=_+O*X/G}r.bezierCurveTo(f,d,h,v,x,_),f=B,d=N}else r.lineTo(x,_)}u=x,c=_,y+=i}return m}var G3=(function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r})(),GQ=(function(r){Q(e,r);function e(t){var n=r.call(this,t)||this;return n.type="ec-polyline",n}return e.prototype.getDefaultStyle=function(){return{stroke:ee.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new G3},e.prototype.buildPath=function(t,n){var a=n.points,i=0,o=a.length/2;if(n.connectNulls){for(;o>0&&Sl(a[o*2-2],a[o*2-1]);o--);for(;i<o&&Sl(a[i*2],a[i*2+1]);i++);}for(;i<o;)i+=X_(t,a,i,o,o,1,n.smooth,n.smoothMonotone,n.connectNulls)+1},e.prototype.getPointOn=function(t,n){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var a=this.path,i=a.data,o=ii.CMD,s,l,u=n==="x",c=[],f=0;f<i.length;){var d=i[f++],h=void 0,v=void 0,y=void 0,m=void 0,x=void 0,_=void 0,T=void 0;switch(d){case o.M:s=i[f++],l=i[f++];break;case o.L:if(h=i[f++],v=i[f++],T=u?(t-s)/(h-s):(t-l)/(v-l),T<=1&&T>=0){var C=u?(v-l)*T+l:(h-s)*T+s;return u?[t,C]:[C,t]}s=h,l=v;break;case o.C:h=i[f++],v=i[f++],y=i[f++],m=i[f++],x=i[f++],_=i[f++];var k=u?Qg(s,h,y,x,t,c):Qg(l,v,m,_,t,c);if(k>0)for(var A=0;A<k;A++){var L=c[A];if(L<=1&&L>=0){var C=u?fr(l,v,m,_,L):fr(s,h,y,x,L);return u?[t,C]:[C,t]}}s=x,l=_;break}}},e})(nt),WQ=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e})(G3),W3=(function(r){Q(e,r);function e(t){var n=r.call(this,t)||this;return n.type="ec-polygon",n}return e.prototype.getDefaultShape=function(){return new WQ},e.prototype.buildPath=function(t,n){var a=n.points,i=n.stackedOnPoints,o=0,s=a.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&Sl(a[s*2-2],a[s*2-1]);s--);for(;o<s&&Sl(a[o*2],a[o*2+1]);o++);}for(;o<s;){var u=X_(t,a,o,s,s,1,n.smooth,l,n.connectNulls);X_(t,i,o+u-1,u,s,-1,n.stackedOnSmooth,l,n.connectNulls),o+=u+1,t.closePath()}},e})(nt);function $3(r,e,t,n,a){var i=r.getArea(),o=i.x,s=i.y,l=i.width,u=i.height,c=t.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(e){var d=r.getBaseAxis(),h=d.isHorizontal(),v=d.inverse;h?(v&&(f.shape.x+=l),f.shape.width=0):(v||(f.shape.y+=u),f.shape.height=0);var y=Me(a)?function(m){a(m,f)}:null;It(f,{shape:{width:l,height:u,x:o,y:s}},t,null,n,y)}return f}function H3(r,e,t){var n=r.getArea(),a=Xt(n.r0,1),i=Xt(n.r,1),o=new Er({shape:{cx:Xt(r.cx,1),cy:Xt(r.cy,1),r0:a,r:i,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});if(e){var s=r.getBaseAxis().dim==="angle";s?o.shape.endAngle=n.startAngle:o.shape.r=a,It(o,{shape:{endAngle:n.endAngle,r:i}},t)}return o}function Uh(r,e,t,n,a){if(r){if(r.type==="polar")return H3(r,e,t);if(r.type==="cartesian2d")return $3(r,e,t,n,a)}else return null;return null}function ts(r,e){return r.type===e}function uP(r,e){if(r.length===e.length){for(var t=0;t<r.length;t++)if(r[t]!==e[t])return;return!0}}function cP(r){for(var e=1/0,t=1/0,n=-1/0,a=-1/0,i=0;i<r.length;){var o=r[i++],s=r[i++];isNaN(o)||(e=Math.min(o,e),n=Math.max(o,n)),isNaN(s)||(t=Math.min(s,t),a=Math.max(s,a))}return[[e,t],[n,a]]}function fP(r,e){var t=cP(r),n=t[0],a=t[1],i=cP(e),o=i[0],s=i[1];return Math.max(Math.abs(n[0]-o[0]),Math.abs(n[1]-o[1]),Math.abs(a[0]-s[0]),Math.abs(a[1]-s[1]))}function dP(r){return ut(r)?r:r?.5:0}function $Q(r,e,t){if(!t.valueDim)return[];for(var n=e.count(),a=Za(n*2),i=0;i<n;i++){var o=V3(t,r,e,i);a[i*2]=o[0],a[i*2+1]=o[1]}return a}function Do(r,e,t,n,a){var i=t.getBaseAxis(),o=i.dim==="x"||i.dim==="radius"?0:1,s=[],l=0,u=[],c=[],f=[],d=[];if(a){for(l=0;l<r.length;l+=2){var h=e||r;!isNaN(h[l])&&!isNaN(h[l+1])&&d.push(r[l],r[l+1])}r=d}for(l=0;l<r.length-2;l+=2)switch(f[0]=r[l+2],f[1]=r[l+3],c[0]=r[l],c[1]=r[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,y=[];u[o]=y[o]=v,u[1-o]=c[1-o],y[1-o]=f[1-o],s.push(u[0],u[1]),s.push(y[0],y[1]);break;default:u[o]=c[o],u[1-o]=f[1-o],s.push(u[0],u[1])}return s.push(r[l++],r[l++]),s}function HQ(r,e){var t=[],n=r.length,a,i;function o(c,f,d){var h=c.coord,v=(d-h)/(f.coord-h),y=lT(v,[c.color,f.color]);return{coord:d,color:y}}for(var s=0;s<n;s++){var l=r[s],u=l.coord;if(u<0)a=l;else if(u>e){i?t.push(o(i,l,e)):a&&t.push(o(a,l,0),o(a,l,e));break}else a&&(t.push(o(a,l,0)),a=null),t.push(l),i=l}return t}function UQ(r,e,t){var n=r.getVisual("visualMeta");if(!(!n||!n.length||!r.count())&&e.type==="cartesian2d"){for(var a,i,o=n.length-1;o>=0;o--){var s=r.getDimensionInfo(n[o].dimension);if(a=s&&s.coordDim,a==="x"||a==="y"){i=n[o];break}}if(i){var l=e.getAxis(a),u=ue(i.stops,function(T){return{coord:l.toGlobalCoord(l.dataToCoord(T.value)),color:T.color}}),c=u.length,f=i.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),f.reverse());var d=HQ(u,a==="x"?t.getWidth():t.getHeight()),h=d.length;if(!h&&c)return u[0].coord<0?f[1]?f[1]:u[c-1].color:f[0]?f[0]:u[0].color;var v=10,y=d[0].coord-v,m=d[h-1].coord+v,x=m-y;if(x<.001)return"transparent";z(d,function(T){T.offset=(T.coord-y)/x}),d.push({offset:h?d[h-1].offset:.5,color:f[1]||"transparent"}),d.unshift({offset:h?d[0].offset:.5,color:f[0]||"transparent"});var _=new zl(0,0,0,0,d,!0);return _[a]=y,_[a+"2"]=m,_}}}function YQ(r,e,t){var n=r.get("showAllSymbol"),a=n==="auto";if(!(n&&!a)){var i=t.getAxesByScale("ordinal")[0];if(i&&!(a&&XQ(i,e))){var o=e.mapDimension(i.dim),s={};return z(i.getViewLabels(),function(l){var u=i.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function XQ(r,e){var t=r.getExtent(),n=Math.abs(t[1]-t[0])/r.scale.count();isNaN(n)&&(n=0);for(var a=e.count(),i=Math.max(1,Math.round(a/5)),o=0;o<a;o+=i)if($h.getSymbolSize(e,o)[r.isHorizontal()?1:0]*1.5>n)return!1;return!0}function ZQ(r,e){return isNaN(r)||isNaN(e)}function KQ(r){for(var e=r.length/2;e>0&&ZQ(r[e*2-2],r[e*2-1]);e--);return e-1}function hP(r,e){return[r[e*2],r[e*2+1]]}function qQ(r,e,t){for(var n=r.length/2,a=t==="x"?0:1,i,o,s=0,l=-1,u=0;u<n;u++)if(o=r[u*2+a],!(isNaN(o)||isNaN(r[u*2+1-a]))){if(u===0){i=o;continue}if(i<=e&&o>=e||i>=e&&o<=e){l=u;break}s=u,i=o}return{range:[s,l],t:(e-i)/(o-i)}}function U3(r){if(r.get(["endLabel","show"]))return!0;for(var e=0;e<tn.length;e++)if(r.get([tn[e],"endLabel","show"]))return!0;return!1}function cS(r,e,t,n){if(ts(e,"cartesian2d")){var a=n.getModel("endLabel"),i=a.get("valueAnimation"),o=n.getData(),s={lastFrameIndex:0},l=U3(n)?function(h,v){r._endLabelOnDuring(h,v,o,s,i,a,e)}:null,u=e.getBaseAxis().isHorizontal(),c=$3(e,t,n,function(){var h=r._endLabel;h&&t&&s.originalX!=null&&h.attr({x:s.originalX,y:s.originalY})},l);if(!n.get("clip",!0)){var f=c.shape,d=Math.max(f.width,f.height);u?(f.y-=d,f.height+=d*2):(f.x-=d,f.width+=d*2)}return l&&l(1,c),c}else return H3(e,t,n)}function QQ(r,e){var t=e.getBaseAxis(),n=t.isHorizontal(),a=t.inverse,i=n?a?"right":"left":"center",o=n?"middle":a?"top":"bottom";return{normal:{align:r.get("align")||i,verticalAlign:r.get("verticalAlign")||o}}}var JQ=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(){var t=new Le,n=new Hh;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=t,this._changePolyState=ye(this._changePolyState,this)},e.prototype.render=function(t,n,a){var i=t.coordinateSystem,o=this.group,s=t.getData(),l=t.getModel("lineStyle"),u=t.getModel("areaStyle"),c=s.getLayout("points")||[],f=i.type==="polar",d=this._coordSys,h=this._symbolDraw,v=this._polyline,y=this._polygon,m=this._lineGroup,x=!n.ssr&&t.get("animation"),_=!u.isEmpty(),T=u.get("origin"),C=F3(i,s,T),k=_&&$Q(i,s,C),A=t.get("showSymbol"),L=t.get("connectNulls"),D=A&&!f&&YQ(t,s,i),P=this._data;P&&P.eachItemGraphicEl(function(re,_e){re.__temp&&(o.remove(re),P.setItemGraphicEl(_e,null))}),A||h.remove(),o.add(m);var E=f?!1:t.get("step"),O;i&&i.getArea&&t.get("clip",!0)&&(O=i.getArea(),O.width!=null?(O.x-=.1,O.y-=.1,O.width+=.2,O.height+=.2):O.r0&&(O.r0-=.5,O.r+=.5)),this._clipShapeForSymbol=O;var B=UQ(s,i,a)||s.getVisual("style")[s.getVisual("drawType")];if(!(v&&d.type===i.type&&E===this._step))A&&h.updateData(s,{isIgnore:D,clipShape:O,disableAnimation:!0,getSymbolPoint:function(re){return[c[re*2],c[re*2+1]]}}),x&&this._initSymbolLabelAnimation(s,i,O),E&&(k&&(k=Do(k,c,i,E,L)),c=Do(c,null,i,E,L)),v=this._newPolyline(c),_?y=this._newPolygon(c,k):y&&(m.remove(y),y=this._polygon=null),f||this._initOrUpdateEndLabel(t,i,Ll(B)),m.setClipPath(cS(this,i,!0,t));else{_&&!y?y=this._newPolygon(c,k):y&&!_&&(m.remove(y),y=this._polygon=null),f||this._initOrUpdateEndLabel(t,i,Ll(B));var N=m.getClipPath();if(N){var W=cS(this,i,!1,t);It(N,{shape:W.shape},t)}else m.setClipPath(cS(this,i,!0,t));A&&h.updateData(s,{isIgnore:D,clipShape:O,disableAnimation:!0,getSymbolPoint:function(re){return[c[re*2],c[re*2+1]]}}),(!uP(this._stackedOnPoints,k)||!uP(this._points,c))&&(x?this._doUpdateAnimation(s,k,i,a,E,T,L):(E&&(k&&(k=Do(k,c,i,E,L)),c=Do(c,null,i,E,L)),v.setShape({points:c}),y&&y.setShape({points:c,stackedOnPoints:k})))}var H=t.getModel("emphasis"),$=H.get("focus"),Z=H.get("blurScope"),G=H.get("disabled");if(v.useStyle(De(l.getLineStyle(),{fill:"none",stroke:B,lineJoin:"bevel"})),or(v,t,"lineStyle"),v.style.lineWidth>0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var X=v.getState("emphasis").style;X.lineWidth=+v.style.lineWidth+1}je(v).seriesIndex=t.seriesIndex,Pt(v,$,Z,G);var K=dP(t.get("smooth")),V=t.get("smoothMonotone");if(v.setShape({smooth:K,smoothMonotone:V,connectNulls:L}),y){var U=s.getCalculationInfo("stackedOnSeries"),ae=0;y.useStyle(De(u.getAreaStyle(),{fill:B,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),U&&(ae=dP(U.get("smooth"))),y.setShape({smooth:K,stackedOnSmooth:ae,smoothMonotone:V,connectNulls:L}),or(y,t,"areaStyle"),je(y).seriesIndex=t.seriesIndex,Pt(y,$,Z,G)}var ce=this._changePolyState;s.eachItemGraphicEl(function(re){re&&(re.onHoverStateChange=ce)}),this._polyline.onHoverStateChange=ce,this._data=s,this._coordSys=i,this._stackedOnPoints=k,this._points=c,this._step=E,this._valueOrigin=T,t.get("triggerLineEvent")&&(this.packEventData(t,v),y&&this.packEventData(t,y))},e.prototype.packEventData=function(t,n){je(n).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,n,a,i){var o=t.getData(),s=Tl(o,i);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 d=t.get("zlevel")||0,h=t.get("z")||0;u=new $h(o,s),u.x=c,u.y=f,u.setZ(d,h);var v=u.getSymbolPath().getTextContent();v&&(v.zlevel=d,v.z=h,v.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else mt.prototype.highlight.call(this,t,n,a,i)},e.prototype.downplay=function(t,n,a,i){var o=t.getData(),s=Tl(o,i);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 mt.prototype.downplay.call(this,t,n,a,i)},e.prototype._changePolyState=function(t){var n=this._polygon;uy(this._polyline,t),n&&uy(n,t)},e.prototype._newPolyline=function(t){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new GQ({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},e.prototype._newPolygon=function(t,n){var a=this._polygon;return a&&this._lineGroup.remove(a),a=new W3({shape:{points:t,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(a),this._polygon=a,a},e.prototype._initSymbolLabelAnimation=function(t,n,a){var i,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(i=s.isHorizontal(),o=!1):n.type==="polar"&&(i=s.dim==="angle",o=!0);var u=t.hostModel,c=u.get("animationDuration");Me(c)&&(c=c(null));var f=u.get("animationDelay")||0,d=Me(f)?f(null):f;t.eachItemGraphicEl(function(h,v){var y=h;if(y){var m=[h.x,h.y],x=void 0,_=void 0,T=void 0;if(a)if(o){var C=a,k=n.pointToCoord(m);i?(x=C.startAngle,_=C.endAngle,T=-k[1]/180*Math.PI):(x=C.r0,_=C.r,T=k[0])}else{var A=a;i?(x=A.x,_=A.x+A.width,T=h.x):(x=A.y+A.height,_=A.y,T=h.y)}var L=_===x?0:(T-x)/(_-x);l&&(L=1-L);var D=Me(f)?f(v):c*L+d,P=y.getSymbolPath(),E=P.getTextContent();y.attr({scaleX:0,scaleY:0}),y.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:D}),E&&E.animateFrom({style:{opacity:0}},{duration:300,delay:D}),P.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,n,a){var i=t.getModel("endLabel");if(U3(t)){var o=t.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 lt({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=KQ(l);c>=0&&(vr(s,sr(t,"endLabel"),{inheritColor:a,labelFetcher:t,labelDataIndex:c,defaultText:function(f,d,h){return h!=null?B3(o,h):mc(o,f)},enableTextSetter:!0},QQ(i,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,n,a,i,o,s,l){var u=this._endLabel,c=this._polyline;if(u){t<1&&i.originalX==null&&(i.originalX=u.x,i.originalY=u.y);var f=a.getLayout("points"),d=a.hostModel,h=d.get("connectNulls"),v=s.get("precision"),y=s.get("distance")||0,m=l.getBaseAxis(),x=m.isHorizontal(),_=m.inverse,T=n.shape,C=_?x?T.x:T.y+T.height:x?T.x+T.width:T.y,k=(x?y:0)*(_?-1:1),A=(x?0:-y)*(_?-1:1),L=x?"x":"y",D=qQ(f,C,L),P=D.range,E=P[1]-P[0],O=void 0;if(E>=1){if(E>1&&!h){var B=hP(f,P[0]);u.attr({x:B[0]+k,y:B[1]+A}),o&&(O=d.getRawValue(P[0]))}else{var B=c.getPointOn(C,L);B&&u.attr({x:B[0]+k,y:B[1]+A});var N=d.getRawValue(P[0]),W=d.getRawValue(P[1]);o&&(O=yj(a,v,N,W,D.t))}i.lastFrameIndex=P[0]}else{var H=t===1||i.lastFrameIndex>0?P[0]:0,B=hP(f,H);o&&(O=d.getRawValue(H)),u.attr({x:B[0]+k,y:B[1]+A})}if(o){var $=zc(u);typeof $.setLabelText=="function"&&$.setLabelText(O)}}},e.prototype._doUpdateAnimation=function(t,n,a,i,o,s,l){var u=this._polyline,c=this._polygon,f=t.hostModel,d=VQ(this._data,t,this._stackedOnPoints,n,this._coordSys,a,this._valueOrigin),h=d.current,v=d.stackedOnCurrent,y=d.next,m=d.stackedOnNext;if(o&&(v=Do(d.stackedOnCurrent,d.current,a,o,l),h=Do(d.current,null,a,o,l),m=Do(d.stackedOnNext,d.next,a,o,l),y=Do(d.next,null,a,o,l)),fP(h,y)>3e3||c&&fP(v,m)>3e3){u.stopAnimation(),u.setShape({points:y}),c&&(c.stopAnimation(),c.setShape({points:y,stackedOnPoints:m}));return}u.shape.__points=d.current,u.shape.points=h;var x={shape:{points:y}};d.current!==h&&(x.shape.__points=d.next),u.stopAnimation(),ct(u,x,f),c&&(c.setShape({points:h,stackedOnPoints:v}),c.stopAnimation(),ct(c,{shape:{stackedOnPoints:m}},f),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var _=[],T=d.status,C=0;C<T.length;C++){var k=T[C].cmd;if(k==="="){var A=t.getItemGraphicEl(T[C].idx1);A&&_.push({el:A,ptIdx:C})}}u.animators&&u.animators.length&&u.animators[0].during(function(){c&&c.dirtyShape();for(var L=u.shape.__points,D=0;D<_.length;D++){var P=_[D].el,E=_[D].ptIdx*2;P.x=L[E],P.y=L[E+1],P.markRedraw()}})},e.prototype.remove=function(t){var n=this.group,a=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),a&&a.eachItemGraphicEl(function(i,o){i.__temp&&(n.remove(i),a.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},e.type="line",e})(mt);function Yh(r,e){return{seriesType:r,plan:Bc(),reset:function(t){var n=t.getData(),a=t.coordinateSystem,i=t.pipelineContext,o=e||i.large;if(a){var s=ue(a.dimensions,function(h){return n.mapDimension(h)}).slice(0,2),l=s.length,u=n.getCalculationInfo("stackResultDimension");qi(n,s[0])&&(s[0]=u),qi(n,s[1])&&(s[1]=u);var c=n.getStore(),f=n.getDimensionIndex(s[0]),d=n.getDimensionIndex(s[1]);return l&&{progress:function(h,v){for(var y=h.end-h.start,m=o&&Za(y*l),x=[],_=[],T=h.start,C=0;T<h.end;T++){var k=void 0;if(l===1){var A=c.get(f,T);k=a.dataToPoint(A,null,_)}else x[0]=c.get(f,T),x[1]=c.get(d,T),k=a.dataToPoint(x,null,_);o?(m[C++]=k[0],m[C++]=k[1]):v.setItemLayout(T,k.slice())}o&&v.setLayout("points",m)}}}}}}var eJ={average:function(r){for(var e=0,t=0,n=0;n<r.length;n++)isNaN(r[n])||(e+=r[n],t++);return t===0?NaN:e/t},sum:function(r){for(var e=0,t=0;t<r.length;t++)e+=r[t]||0;return e},max:function(r){for(var e=-1/0,t=0;t<r.length;t++)r[t]>e&&(e=r[t]);return isFinite(e)?e:NaN},min:function(r){for(var e=1/0,t=0;t<r.length;t++)r[t]<e&&(e=r[t]);return isFinite(e)?e:NaN},nearest:function(r){return r[0]}},tJ=function(r){return Math.round(r.length/2)};function Y3(r){return{seriesType:r,reset:function(e,t,n){var a=e.getData(),i=e.get("sampling"),o=e.coordinateSystem,s=a.count();if(s>10&&o.type==="cartesian2d"&&i){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),f=n.getDevicePixelRatio(),d=Math.abs(c[1]-c[0])*(f||1),h=Math.round(s/d);if(isFinite(h)&&h>1){i==="lttb"?e.setData(a.lttbDownSample(a.mapDimension(u.dim),1/h)):i==="minmax"&&e.setData(a.minmaxDownSample(a.mapDimension(u.dim),1/h));var v=void 0;pe(i)?v=eJ[i]:Me(i)&&(v=i),v&&e.setData(a.downSample(a.mapDimension(u.dim),1/h,v,tJ))}}}}}function rJ(r){r.registerChartView(JQ),r.registerSeriesModel(NQ),r.registerLayout(Yh("line",!0)),r.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",n)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,Y3("line"))}var gh=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,n){return di(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,n,a){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.clampData(t),s=i.dataToPoint(o);if(a)z(i.getAxes(),function(d,h){if(d.type==="category"&&n!=null){var v=d.getTicksCoords(),y=d.getTickModel().get("alignWithLabel"),m=o[h],x=n[h]==="x1"||n[h]==="y1";if(x&&!y&&(m+=1),v.length<2)return;if(v.length===2){s[h]=d.toGlobalCoord(d.getExtent()[x?1:0]);return}for(var _=void 0,T=void 0,C=1,k=0;k<v.length;k++){var A=v[k].coord,L=k===v.length-1?v[k-1].tickValue+C:v[k].tickValue;if(L===m){T=A;break}else if(L<m)_=A;else if(_!=null&&L>m){T=(A+_)/2;break}k===1&&(C=L-v[0].tickValue)}T==null&&(_?_&&(T=v[v.length-1].coord):T=v[0].coord),s[h]=d.toGlobalCoord(T)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),f=i.getBaseAxis().isHorizontal()?0:1;s[f]+=u+c/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},e})(St);St.registerClass(gh);var nJ=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return di(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>t&&(t=n),t},e.prototype.brushSelector=function(t,n,a){return a.rect(n.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=us(gh.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:ee.color.primary,borderWidth:2}},realtimeSort:!1}),e})(gh),aJ=(function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r})(),Py=(function(r){Q(e,r);function e(t){var n=r.call(this,t)||this;return n.type="sausage",n}return e.prototype.getDefaultShape=function(){return new aJ},e.prototype.buildPath=function(t,n){var a=n.cx,i=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,d=n.clockwise,h=Math.PI*2,v=d?f-c<h:c-f<h;v||(c=f-(d?h:-h));var y=Math.cos(c),m=Math.sin(c),x=Math.cos(f),_=Math.sin(f);v?(t.moveTo(y*o+a,m*o+i),t.arc(y*u+a,m*u+i,l,-Math.PI+c,c,!d)):t.moveTo(y*s+a,m*s+i),t.arc(a,i,s,c,f,!d),t.arc(x*u+a,_*u+i,l,f-Math.PI*2,f-Math.PI,!d),o!==0&&t.arc(a,i,o,f,c,d)},e})(nt);function iJ(r,e){e=e||{};var t=e.isRoundCap;return function(n,a,i){var o=a.position;if(!o||o instanceof Array)return ay(n,a,i);var s=r(o),l=a.distance!=null?a.distance:5,u=this.shape,c=u.cx,f=u.cy,d=u.r,h=u.r0,v=(d+h)/2,y=u.startAngle,m=u.endAngle,x=(y+m)/2,_=t?Math.abs(d-h)/2:0,T=Math.cos,C=Math.sin,k=c+d*T(y),A=f+d*C(y),L="left",D="top";switch(s){case"startArc":k=c+(h-l)*T(x),A=f+(h-l)*C(x),L="center",D="top";break;case"insideStartArc":k=c+(h+l)*T(x),A=f+(h+l)*C(x),L="center",D="bottom";break;case"startAngle":k=c+v*T(y)+Zv(y,l+_,!1),A=f+v*C(y)+Kv(y,l+_,!1),L="right",D="middle";break;case"insideStartAngle":k=c+v*T(y)+Zv(y,-l+_,!1),A=f+v*C(y)+Kv(y,-l+_,!1),L="left",D="middle";break;case"middle":k=c+v*T(x),A=f+v*C(x),L="center",D="middle";break;case"endArc":k=c+(d+l)*T(x),A=f+(d+l)*C(x),L="center",D="bottom";break;case"insideEndArc":k=c+(d-l)*T(x),A=f+(d-l)*C(x),L="center",D="top";break;case"endAngle":k=c+v*T(m)+Zv(m,l+_,!0),A=f+v*C(m)+Kv(m,l+_,!0),L="left",D="middle";break;case"insideEndAngle":k=c+v*T(m)+Zv(m,-l+_,!0),A=f+v*C(m)+Kv(m,-l+_,!0),L="right",D="middle";break;default:return ay(n,a,i)}return n=n||{},n.x=k,n.y=A,n.align=L,n.verticalAlign=D,n}}function oJ(r,e,t,n){if(ut(n)){r.setTextConfig({rotation:n});return}else if(le(e)){r.setTextConfig({rotation:0});return}var a=r.shape,i=a.clockwise?a.startAngle:a.endAngle,o=a.clockwise?a.endAngle:a.startAngle,s=(i+o)/2,l,u=t(e);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":l=s;break;case"startAngle":case"insideStartAngle":l=i;break;case"endAngle":case"insideEndAngle":l=o;break;default:r.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),r.setTextConfig({rotation:c})}function Zv(r,e,t){return e*Math.sin(r)*(t?-1:1)}function Kv(r,e,t){return e*Math.cos(r)*(t?1:-1)}function qa(r,e,t){var n=r.get("borderRadius");if(n==null)return t?{cornerRadius:0}:null;le(n)||(n=[n,n,n,n]);var a=Math.abs(e.r||0-e.r0||0);return{cornerRadius:ue(n,function(i){return Ca(i,a)})}}var fS=Math.max,dS=Math.min;function sJ(r,e){var t=r.getArea&&r.getArea();if(ts(r,"cartesian2d")){var n=r.getBaseAxis();if(n.type!=="category"||!n.onBand){var a=e.getLayout("bandWidth");n.isHorizontal()?(t.x-=a,t.width+=a*2):(t.y-=a,t.height+=a*2)}}return t}var lJ=(function(r){Q(e,r);function e(){var t=r.call(this)||this;return t.type=e.type,t._isFirstFrame=!0,t}return e.prototype.render=function(t,n,a,i){this._model=t,this._removeOnRenderedListener(a),this._updateDrawMode(t);var o=t.get("coordinateSystem");(o==="cartesian2d"||o==="polar")&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(t,n,a):this._renderNormal(t,n,a,i))},e.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},e.prototype.incrementalRender=function(t,n){this._progressiveEls=[],this._incrementalRenderLarge(t,n)},e.prototype.eachRendered=function(t){ls(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var n=t.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(t,n,a,i){var o=this.group,s=t.getData(),l=this._data,u=t.coordinateSystem,c=u.getBaseAxis(),f;u.type==="cartesian2d"?f=c.isHorizontal():u.type==="polar"&&(f=c.dim==="angle");var d=t.isAnimationEnabled()?t:null,h=uJ(t,u);h&&this._enableRealtimeSort(h,s,a);var v=t.get("clip",!0)||h,y=sJ(u,s);o.removeClipPath();var m=t.get("roundCap",!0),x=t.get("showBackground",!0),_=t.getModel("backgroundStyle"),T=_.get("borderRadius")||0,C=[],k=this._backgroundEls,A=i&&i.isInitSort,L=i&&i.type==="changeAxisOrder";function D(O){var B=qv[u.type](s,O);if(!B)return null;var N=gJ(u,f,B);return N.useStyle(_.getItemStyle()),u.type==="cartesian2d"?N.setShape("r",T):N.setShape("cornerRadius",T),C[O]=N,N}s.diff(l).add(function(O){var B=s.getItemModel(O),N=qv[u.type](s,O,B);if(N&&(x&&D(O),!(!s.hasValue(O)||!mP[u.type](N)))){var W=!1;v&&(W=pP[u.type](y,N));var H=vP[u.type](t,s,O,N,f,d,c.model,!1,m);h&&(H.forceLabelAnimation=!0),xP(H,s,O,B,N,t,f,u.type==="polar"),A?H.attr({shape:N}):h?gP(h,d,H,N,O,f,!1,!1):It(H,{shape:N},t,O),s.setItemGraphicEl(O,H),o.add(H),H.ignore=W}}).update(function(O,B){var N=s.getItemModel(O),W=qv[u.type](s,O,N);if(W){if(x){var H=void 0;k.length===0?H=D(B):(H=k[B],H.useStyle(_.getItemStyle()),u.type==="cartesian2d"?H.setShape("r",T):H.setShape("cornerRadius",T),C[O]=H);var $=qv[u.type](s,O),Z=Z3(f,$,u);ct(H,{shape:Z},d,O)}var G=l.getItemGraphicEl(B);if(!s.hasValue(O)||!mP[u.type](W)){o.remove(G);return}var X=!1;v&&(X=pP[u.type](y,W),X&&o.remove(G));var K=G&&(G.type==="sector"&&m||G.type==="sausage"&&!m);if(K&&(G&&Vi(G,t,B),G=null),G?ta(G):G=vP[u.type](t,s,O,W,f,d,c.model,!0,m),h&&(G.forceLabelAnimation=!0),L){var V=G.getTextContent();if(V){var U=zc(V);U.prevValue!=null&&(U.prevValue=U.value)}}else xP(G,s,O,N,W,t,f,u.type==="polar");A?G.attr({shape:W}):h?gP(h,d,G,W,O,f,!0,L):ct(G,{shape:W},t,O,null),s.setItemGraphicEl(O,G),G.ignore=X,o.add(G)}}).remove(function(O){var B=l.getItemGraphicEl(O);B&&Vi(B,t,O)}).execute();var P=this._backgroundGroup||(this._backgroundGroup=new Le);P.removeAll();for(var E=0;E<C.length;++E)P.add(C[E]);o.add(P),this._backgroundEls=C,this._data=s},e.prototype._renderLarge=function(t,n,a){this._clear(),bP(t,this.group),this._updateLargeClip(t)},e.prototype._incrementalRenderLarge=function(t,n){this._removeBackground(),bP(n,this.group,this._progressiveEls,!0)},e.prototype._updateLargeClip=function(t){var n=t.get("clip",!0)&&Uh(t.coordinateSystem,!1,t),a=this.group;n?a.setClipPath(n):a.removeClipPath()},e.prototype._enableRealtimeSort=function(t,n,a){var i=this;if(n.count()){var o=t.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(n,t,a),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(){i._updateSortWithinSameData(n,s,o,a)},a.getZr().on("rendered",this._onRendered)}}},e.prototype._dataSort=function(t,n,a){var i=[];return t.each(t.mapDimension(n.dim),function(o,s){var l=a(s);l=l??NaN,i.push({dataIndex:s,mappedValue:l,ordinalNumber:o})}),i.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:ue(i,function(o){return o.ordinalNumber})}},e.prototype._isOrderChangedWithinSameData=function(t,n,a){for(var i=a.scale,o=t.mapDimension(a.dim),s=Number.MAX_VALUE,l=0,u=i.getOrdinalMeta().categories.length;l<u;++l){var c=t.rawIndexOf(o,i.getRawOrdinalNumber(l)),f=c<0?Number.MIN_VALUE:n(t.indexOfRawIndex(c));if(f>s)return!0;s=f}return!1},e.prototype._isOrderDifferentInView=function(t,n){for(var a=n.scale,i=a.getExtent(),o=Math.max(0,i[0]),s=Math.min(i[1],a.getOrdinalMeta().categories.length-1);o<=s;++o)if(t.ordinalNumbers[o]!==a.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,n,a,i){if(this._isOrderChangedWithinSameData(t,n,a)){var o=this._dataSort(t,a,n);this._isOrderDifferentInView(o,a)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",axisId:a.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,n,a){var i=n.baseAxis,o=this._dataSort(t,i,function(s){return t.get(t.mapDimension(n.otherAxis.dim),s)});a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},e.prototype.remove=function(t,n){this._clear(this._model),this._removeOnRenderedListener(n)},e.prototype.dispose=function(t,n){this._removeOnRenderedListener(n)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var n=this.group,a=this._data;t&&t.isAnimationEnabled()&&a&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],a.eachItemGraphicEl(function(i){Vi(i,t,je(i).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e})(mt),pP={cartesian2d:function(r,e){var t=e.width<0?-1:1,n=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var a=r.x+r.width,i=r.y+r.height,o=fS(e.x,r.x),s=dS(e.x+e.width,a),l=fS(e.y,r.y),u=dS(e.y+e.height,i),c=s<o,f=u<l;return e.x=c&&o>a?s:o,e.y=f&&l>i?u:l,e.width=c?0:s-o,e.height=f?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),c||f},polar:function(r,e){var t=e.r0<=e.r?1:-1;if(t<0){var n=e.r;e.r=e.r0,e.r0=n}var a=dS(e.r,r.r),i=fS(e.r0,r.r0);e.r=a,e.r0=i;var o=a-i<0;if(t<0){var n=e.r;e.r=e.r0,e.r0=n}return o}},vP={cartesian2d:function(r,e,t,n,a,i,o,s,l){var u=new Qe({shape:ie({},n),z2:1});if(u.__dataIndex=t,u.name="item",i){var c=u.shape,f=a?"height":"width";c[f]=0}return u},polar:function(r,e,t,n,a,i,o,s,l){var u=!a&&l?Py:Er,c=new u({shape:n,z2:1});c.name="item";var f=X3(a);if(c.calculateTextPosition=iJ(f,{isRoundCap:u===Py}),i){var d=c.shape,h=a?"r":"endAngle",v={};d[h]=a?n.r0:n.startAngle,v[h]=n[h],(s?ct:It)(c,{shape:v},i)}return c}};function uJ(r,e){var t=r.get("realtimeSort",!0),n=e.getBaseAxis();if(t&&n.type==="category"&&e.type==="cartesian2d")return{baseAxis:n,otherAxis:e.getOtherAxis(n)}}function gP(r,e,t,n,a,i,o,s){var l,u;i?(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?ct:It)(t,{shape:l},e,a,null);var c=e?r.baseAxis.model:null;(o?ct:It)(t,{shape:u},c,a)}function yP(r,e){for(var t=0;t<e.length;t++)if(!isFinite(r[e[t]]))return!0;return!1}var cJ=["x","y","width","height"],fJ=["cx","cy","r","startAngle","endAngle"],mP={cartesian2d:function(r){return!yP(r,cJ)},polar:function(r){return!yP(r,fJ)}},qv={cartesian2d:function(r,e,t){var n=r.getItemLayout(e);if(!n)return null;var a=t?hJ(t,n):0,i=n.width>0?1:-1,o=n.height>0?1:-1;return{x:n.x+i*a/2,y:n.y+o*a/2,width:n.width-i*a,height:n.height-o*a}},polar:function(r,e,t){var n=r.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function dJ(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function X3(r){return(function(e){var t=e?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+t;default:return n}}})(r)}function xP(r,e,t,n,a,i,o,s){var l=e.getItemVisual(t,"style");if(s){if(!i.get("roundCap")){var c=r.shape,f=qa(n.getModel("itemStyle"),c,!0);ie(c,f),r.setShape(c)}}else{var u=n.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var d=n.getShallow("cursor");d&&r.attr("cursor",d);var h=s?o?a.r>=a.r0?"endArc":"startArc":a.endAngle>=a.startAngle?"endAngle":"startAngle":o?a.height>=0?"bottom":"top":a.width>=0?"right":"left",v=sr(n);vr(r,v,{labelFetcher:i,labelDataIndex:t,defaultText:mc(i.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h});var y=r.getTextContent();if(s&&y){var m=n.get(["label","position"]);r.textConfig.inside=m==="middle"?!0:null,oJ(r,m==="outside"?h:m,X3(o),n.get(["label","rotate"]))}a5(y,v,i.getRawValue(t),function(_){return B3(e,_)});var x=n.getModel(["emphasis"]);Pt(r,x.get("focus"),x.get("blurScope"),x.get("disabled")),or(r,n),dJ(a)&&(r.style.fill="none",r.style.stroke="none",z(r.states,function(_){_.style&&(_.style.fill=_.style.stroke="none")}))}function hJ(r,e){var t=r.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var n=r.get(["itemStyle","borderWidth"])||0,a=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),i=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,a,i)}var pJ=(function(){function r(){}return r})(),SP=(function(r){Q(e,r);function e(t){var n=r.call(this,t)||this;return n.type="largeBar",n}return e.prototype.getDefaultShape=function(){return new pJ},e.prototype.buildPath=function(t,n){for(var a=n.points,i=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c<a.length;c+=3)l[i]=u,l[o]=a[c+2],s[i]=a[c+i],s[o]=a[c+o],t.rect(s[0],s[1],l[0],l[1])},e})(nt);function bP(r,e,t,n){var a=r.getData(),i=a.getLayout("valueAxisHorizontal")?1:0,o=a.getLayout("largeDataIndices"),s=a.getLayout("size"),l=r.getModel("backgroundStyle"),u=a.getLayout("largeBackgroundPoints");if(u){var c=new SP({shape:{points:u},incremental:!!n,silent:!0,z2:0});c.baseDimIdx=i,c.largeDataIndices=o,c.barWidth=s,c.useStyle(l.getItemStyle()),e.add(c),t&&t.push(c)}var f=new SP({shape:{points:a.getLayout("largePoints")},incremental:!!n,ignoreCoarsePointer:!0,z2:1});f.baseDimIdx=i,f.largeDataIndices=o,f.barWidth=s,e.add(f),f.useStyle(a.getVisual("style")),f.style.stroke=null,je(f).seriesIndex=r.seriesIndex,r.get("silent")||(f.on("mousedown",_P),f.on("mousemove",_P)),t&&t.push(f)}var _P=Em(function(r){var e=this,t=vJ(e,r.offsetX,r.offsetY);je(e).dataIndex=t>=0?t:null},30,!1);function vJ(r,e,t){for(var n=r.baseDimIdx,a=1-n,i=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,c=0,f=i.length/3;c<f;c++){var d=c*3;if(l[n]=u,l[a]=i[d+2],s[n]=i[d+n],s[a]=i[d+a],l[a]<0&&(s[a]+=l[a],l[a]=-l[a]),e>=s[0]&&e<=s[0]+l[0]&&t>=s[1]&&t<=s[1]+l[1])return o[c]}return-1}function Z3(r,e,t){if(ts(t,"cartesian2d")){var n=e,a=t.getArea();return{x:r?n.x:a.x,y:r?a.y:n.y,width:r?n.width:a.width,height:r?a.height:n.height}}else{var a=t.getArea(),i=e;return{cx:a.cx,cy:a.cy,r0:r?a.r0:i.r0,r:r?a.r:i.r,startAngle:r?i.startAngle:0,endAngle:r?i.endAngle:Math.PI*2}}}function gJ(r,e,t){var n=r.type==="polar"?Er:Qe;return new n({shape:Z3(e,t,r),silent:!0,z2:0})}function yJ(r){r.registerChartView(lJ),r.registerSeriesModel(nJ),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,$e(QB,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,JB("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,Y3("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},function(a){e.sortInfo&&a.axis.setCategorySortInfo(e.sortInfo)})})}var wP=Math.PI*2,Qv=Math.PI/180;function mJ(r,e,t){e.eachSeriesByType(r,function(n){var a=n.getData(),i=a.mapDimension("value"),o=_5(n,t),s=o.cx,l=o.cy,u=o.r,c=o.r0,f=o.viewRect,d=-n.get("startAngle")*Qv,h=n.get("endAngle"),v=n.get("padAngle")*Qv;h=h==="auto"?d-wP:-h*Qv;var y=n.get("minAngle")*Qv,m=y+v,x=0;a.each(i,function(Z){!isNaN(Z)&&x++});var _=a.getSum(i),T=Math.PI/(_||x)*2,C=n.get("clockwise"),k=n.get("roseType"),A=n.get("stillShowZeroSum"),L=a.getDataExtent(i);L[0]=0;var D=C?1:-1,P=[d,h],E=D*v/2;wm(P,!C),d=P[0],h=P[1];var O=K3(n);O.startAngle=d,O.endAngle=h,O.clockwise=C,O.cx=s,O.cy=l,O.r=u,O.r0=c;var B=Math.abs(h-d),N=B,W=0,H=d;if(a.setLayout({viewRect:f,r:u}),a.each(i,function(Z,G){var X;if(isNaN(Z)){a.setItemLayout(G,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:C,cx:s,cy:l,r0:c,r:k?NaN:u});return}k!=="area"?X=_===0&&A?T:Z*T:X=B/x,X<m?(X=m,N-=m):W+=Z;var K=H+D*X,V=0,U=0;v>X?(V=H+D*X/2,U=V):(V=H+E,U=K-E),a.setItemLayout(G,{angle:X,startAngle:V,endAngle:U,clockwise:C,cx:s,cy:l,r0:c,r:k?vt(Z,L,[c,u]):u}),H=K}),N<wP&&x)if(N<=.001){var $=B/x;a.each(i,function(Z,G){if(!isNaN(Z)){var X=a.getItemLayout(G);X.angle=$;var K=0,V=0;$<v?(K=d+D*(G+1/2)*$,V=K):(K=d+D*G*$+E,V=d+D*(G+1)*$-E),X.startAngle=K,X.endAngle=V}})}else T=N/W,H=d,a.each(i,function(Z,G){if(!isNaN(Z)){var X=a.getItemLayout(G),K=X.angle===m?m:Z*T,V=0,U=0;K<v?(V=H+D*K/2,U=V):(V=H+E,U=H+D*K-E),X.startAngle=V,X.endAngle=U,H+=D*K}})})}var K3=et();function Hc(r){return{seriesType:r,reset:function(e,t){var n=t.findComponents({mainType:"legend"});if(!(!n||!n.length)){var a=e.getData();a.filterSelf(function(i){for(var o=a.getName(i),s=0;s<n.length;s++)if(!n[s].isSelected(o))return!1;return!0})}}}}var xJ=Math.PI/180;function TP(r,e,t,n,a,i,o,s,l,u){if(r.length<2)return;function c(y){for(var m=y.rB,x=m*m,_=0;_<y.list.length;_++){var T=y.list[_],C=Math.abs(T.label.y-t),k=n+T.len,A=k*k,L=Math.sqrt(Math.abs((1-C*C/x)*A)),D=e+(L+T.len2)*a,P=D-T.label.x,E=T.targetTextWidth-P*a;q3(T,E,!0),T.label.x=D}}function f(y){for(var m={list:[],maxY:0},x={list:[],maxY:0},_=0;_<y.length;_++)if(y[_].labelAlignTo==="none"){var T=y[_],C=T.label.y>t?x:m,k=Math.abs(T.label.y-t);if(k>=C.maxY){var A=T.label.x-e-T.len2*a,L=n+T.len,D=Math.abs(A)<L?Math.sqrt(k*k/(1-A*A/L/L)):L;C.rB=D,C.maxY=k}C.list.push(T)}c(m),c(x)}for(var d=r.length,h=0;h<d;h++)if(r[h].position==="outer"&&r[h].labelAlignTo==="labelLine"){var v=r[h].label.x-u;r[h].linePoints[1][0]+=v,r[h].label.x=u}$_(r,1,l,l+o)&&f(r)}function SJ(r,e,t,n,a,i,o,s){for(var l=[],u=[],c=Number.MAX_VALUE,f=-Number.MAX_VALUE,d=0;d<r.length;d++){var h=r[d].label;hS(r[d])||(h.x<e?(c=Math.min(c,h.x),l.push(r[d])):(f=Math.max(f,h.x),u.push(r[d])))}for(var d=0;d<r.length;d++){var v=r[d];if(!hS(v)&&v.linePoints){if(v.labelStyleWidth!=null)continue;var h=v.label,y=v.linePoints,m=void 0;v.labelAlignTo==="edge"?h.x<e?m=y[2][0]-v.labelDistance-o-v.edgeDistance:m=o+a-v.edgeDistance-y[2][0]-v.labelDistance:v.labelAlignTo==="labelLine"?h.x<e?m=c-o-v.bleedMargin:m=o+a-f-v.bleedMargin:h.x<e?m=h.x-o-v.bleedMargin:m=o+a-h.x-v.bleedMargin,v.targetTextWidth=m,q3(v,m,!1)}}TP(u,e,t,n,1,a,i,o,s,f),TP(l,e,t,n,-1,a,i,o,s,c);for(var d=0;d<r.length;d++){var v=r[d];if(!hS(v)&&v.linePoints){var h=v.label,y=v.linePoints,x=v.labelAlignTo==="edge",_=h.style.padding,T=_?_[1]+_[3]:0,C=h.style.backgroundColor?0:T,k=v.rect.width+C,A=y[1][0]-y[2][0];x?h.x<e?y[2][0]=o+v.edgeDistance+k+v.labelDistance:y[2][0]=o+a-v.edgeDistance-k-v.labelDistance:(h.x<e?y[2][0]=h.x+v.labelDistance:y[2][0]=h.x-v.labelDistance,y[1][0]=y[2][0]+A),y[1][1]=y[2][1]=h.y}}}function q3(r,e,t){if(r.labelStyleWidth==null){var n=r.label,a=n.style,i=r.rect,o=a.backgroundColor,s=a.padding,l=s?s[1]+s[3]:0,u=a.overflow,c=i.width+(o?0:l);if(e<c||t){if(u&&u.match("break")){n.setStyle("backgroundColor",null),n.setStyle("width",e-l);var f=n.getBoundingRect();n.setStyle("width",Math.ceil(f.width)),n.setStyle("backgroundColor",o)}else{var d=e-l,h=e<c?d:t?d>r.unconstrainedWidth?null:d:null;n.setStyle("width",h)}Q3(i,n)}}}function Q3(r,e){CP.rect=r,_3(CP,e,bJ)}var bJ={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},CP={};function hS(r){return r.position==="center"}function _J(r){var e=r.getData(),t=[],n,a,i=!1,o=(r.get("minShowLabelAngle")||0)*xJ,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,c=s.x,f=s.y,d=s.height;function h(A){A.ignore=!0}function v(A){if(!A.ignore)return!0;for(var L in A.states)if(A.states[L].ignore===!1)return!0;return!1}e.each(function(A){var L=e.getItemGraphicEl(A),D=L.shape,P=L.getTextContent(),E=L.getTextGuideLine(),O=e.getItemModel(A),B=O.getModel("label"),N=B.get("position")||O.get(["emphasis","label","position"]),W=B.get("distanceToLabelLine"),H=B.get("alignTo"),$=he(B.get("edgeDistance"),u),Z=B.get("bleedMargin");Z==null&&(Z=Math.min(u,d)>200?10:2);var G=O.getModel("labelLine"),X=G.get("length");X=he(X,u);var K=G.get("length2");if(K=he(K,u),Math.abs(D.endAngle-D.startAngle)<o){z(P.states,h),P.ignore=!0,E&&(z(E.states,h),E.ignore=!0);return}if(v(P)){var V=(D.startAngle+D.endAngle)/2,U=Math.cos(V),ae=Math.sin(V),ce,re,_e,Ne;n=D.cx,a=D.cy;var ve=N==="inside"||N==="inner";if(N==="center")ce=D.cx,re=D.cy,Ne="center";else{var fe=(ve?(D.r+D.r0)/2*U:D.r*U)+n,Te=(ve?(D.r+D.r0)/2*ae:D.r*ae)+a;if(ce=fe+U*3,re=Te+ae*3,!ve){var xe=fe+U*(X+l-D.r),Ie=Te+ae*(X+l-D.r),dt=xe+(U<0?-1:1)*K,ke=Ie;H==="edge"?ce=U<0?c+$:c+u-$:ce=dt+(U<0?-W:W),re=ke,_e=[[fe,Te],[xe,Ie],[dt,ke]]}Ne=ve?"center":H==="edge"?U>0?"right":"left":U>0?"left":"right"}var He=Math.PI,tt=0,_t=B.get("rotate");if(ut(_t))tt=_t*(He/180);else if(N==="center")tt=0;else if(_t==="radial"||_t===!0){var Or=U<0?-V+He:-V;tt=Or}else if(_t==="tangential"&&N!=="outside"&&N!=="outer"){var yr=Math.atan2(U,ae);yr<0&&(yr=He*2+yr);var vn=ae>0;vn&&(yr=He+yr),tt=yr-He}if(i=!!tt,P.x=ce,P.y=re,P.rotation=tt,P.setStyle({verticalAlign:"middle"}),ve){P.setStyle({align:Ne});var ds=P.states.select;ds&&(ds.x+=P.x,ds.y+=P.y)}else{var gn=new ze(0,0,0,0);Q3(gn,P),t.push({label:P,labelLine:E,position:N,len:X,len2:K,minTurnAngle:G.get("minTurnAngle"),maxSurfaceAngle:G.get("maxSurfaceAngle"),surfaceNormal:new Ee(U,ae),linePoints:_e,textAlign:Ne,labelDistance:W,labelAlignTo:H,edgeDistance:$,bleedMargin:Z,rect:gn,unconstrainedWidth:gn.width,labelStyleWidth:P.style.width})}L.setTextConfig({inside:ve})}}),!i&&r.get("avoidLabelOverlap")&&SJ(t,n,a,l,u,d,c,f);for(var y=0;y<t.length;y++){var m=t[y],x=m.label,_=m.labelLine,T=isNaN(x.x)||isNaN(x.y);if(x){x.setStyle({align:m.textAlign}),T&&(z(x.states,h),x.ignore=!0);var C=x.states.select;C&&(C.x+=x.x,C.y+=x.y)}if(_){var k=m.linePoints;T||!k?(z(_.states,h),_.ignore=!0):(x3(k,m.minTurnAngle),Gq(k,m.surfaceNormal,m.maxSurfaceAngle),_.setShape({points:k}),x.__hostTarget.textGuideLineConfig={anchor:new Ee(k[0][0],k[0][1])})}}}var wJ=(function(r){Q(e,r);function e(t,n,a){var i=r.call(this)||this;i.z2=2;var o=new lt;return i.setTextContent(o),i.updateData(t,n,a,!0),i}return e.prototype.updateData=function(t,n,a,i){var o=this,s=t.hostModel,l=t.getItemModel(n),u=l.getModel("emphasis"),c=t.getItemLayout(n),f=ie(qa(l.getModel("itemStyle"),c,!0),c);if(isNaN(f.startAngle)){o.setShape(f);return}if(i){o.setShape(f);var d=s.getShallow("animationType");s.ecModel.ssr?(It(o,{scaleX:0,scaleY:0},s,{dataIndex:n,isFrom:!0}),o.originX=f.cx,o.originY=f.cy):d==="scale"?(o.shape.r=c.r0,It(o,{shape:{r:c.r}},s,n)):a!=null?(o.setShape({startAngle:a,endAngle:a}),It(o,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},s,n)):(o.shape.endAngle=c.startAngle,ct(o,{shape:{endAngle:c.endAngle}},s,n))}else ta(o),ct(o,{shape:f},s,n);o.useStyle(t.getItemVisual(n,"style")),or(o,l);var h=(c.startAngle+c.endAngle)/2,v=s.get("selectedOffset"),y=Math.cos(h)*v,m=Math.sin(h)*v,x=l.getShallow("cursor");x&&o.attr("cursor",x),this._updateLabel(s,t,n),o.ensureState("emphasis").shape=ie({r:c.r+(u.get("scale")&&u.get("scaleSize")||0)},qa(u.getModel("itemStyle"),c)),ie(o.ensureState("select"),{x:y,y:m,shape:qa(l.getModel(["select","itemStyle"]),c)}),ie(o.ensureState("blur"),{shape:qa(l.getModel(["blur","itemStyle"]),c)});var _=o.getTextGuideLine(),T=o.getTextContent();_&&ie(_.ensureState("select"),{x:y,y:m}),ie(T.ensureState("select"),{x:y,y:m}),Pt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,n,a){var i=this,o=n.getItemModel(a),s=o.getModel("labelLine"),l=n.getItemVisual(a,"style"),u=l&&l.fill,c=l&&l.opacity;vr(i,sr(o),{labelFetcher:n.hostModel,labelDataIndex:a,inheritColor:u,defaultOpacity:c,defaultText:t.getFormattedLabel(a,"normal")||n.getName(a)});var f=i.getTextContent();i.setTextConfig({position:null,rotation:null}),f.attr({z2:10});var d=o.get(["label","position"]);if(d!=="outside"&&d!=="outer")i.removeTextGuideLine();else{var h=this.getTextGuideLine();h||(h=new Cr,this.setTextGuideLine(h)),_C(this,wC(o),{stroke:u,opacity:hn(s.get(["lineStyle","opacity"]),c,1)})}},e})(Er),TJ=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,n,a,i){var o=t.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&&t.get("showEmptyCircle")){var d=K3(t),h=new Er({shape:Ae(d)});h.useStyle(t.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=h,l.add(h)}o.diff(s).add(function(v){var y=new wJ(o,v,u);o.setItemGraphicEl(v,y),l.add(y)}).update(function(v,y){var m=s.getItemGraphicEl(y);m.updateData(o,v,u),m.off("click"),l.add(m),o.setItemGraphicEl(v,m)}).remove(function(v){var y=s.getItemGraphicEl(v);Vi(y,t,v)}).execute(),_J(t),t.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},e.prototype.dispose=function(){},e.prototype.containPoint=function(t,n){var a=n.getData(),i=a.getItemLayout(0);if(i){var o=t[0]-i.cx,s=t[1]-i.cy,l=Math.sqrt(o*o+s*s);return l<=i.r&&l>=i.r0}},e.type="pie",e})(mt);function Uc(r,e,t){e=le(e)&&{coordDimensions:e}||ie({encodeDefine:r.getEncode()},e);var n=r.getSource(),a=Gc(n,e).dimensions,i=new Ur(a,r);return i.initData(n,t),i}var Yc=(function(){function r(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return r.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},r.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},r.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},r.prototype.getItemVisual=function(e,t){var n=this._getDataWithEncodedVisual();return n.getItemVisual(e,t)},r})(),CJ=et(),J3=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Yc(ye(this.getData,this),ye(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return Uc(this,{coordDimensions:["value"],encodeDefaulter:$e(KT,this)})},e.prototype.getDataParams=function(t){var n=this.getData(),a=CJ(n),i=a.seats;if(!i){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),i=a.seats=sj(o,n.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,t);return s.percent=i[t]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(t){wl(t,"labelLine",["show"]);var n=t.labelLine,a=t.emphasis.labelLine;n.show=n.show&&t.label.show,a.show=a.show&&t.emphasis.label.show},e.type="series.pie",e.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"},e})(St);mY({fullType:J3.type,getCoord2:function(r){return r.getShallow("center")}});function MJ(r){return{seriesType:r,reset:function(e,t){var n=e.getData();n.filterSelf(function(a){var i=n.mapDimension("value"),o=n.get(i,a);return!(ut(o)&&!isNaN(o)&&o<0)})}}}function kJ(r){r.registerChartView(TJ),r.registerSeriesModel(J3),hB("pie",r.registerAction),r.registerLayout($e(mJ,"pie")),r.registerProcessor(Hc("pie")),r.registerProcessor(MJ("pie"))}var AJ=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,n){return di(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(t,n,a){return a.point(n.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:ee.color.primary}},universalTransition:{divideShape:"clone"}},e})(St),e4=4,LJ=(function(){function r(){}return r})(),IJ=(function(r){Q(e,r);function e(t){var n=r.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.getDefaultShape=function(){return new LJ},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,n){var a=n.points,i=n.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&i[0]<e4,c=this.softClipShape,f;if(u){this._ctx=l;return}for(this._ctx=null,f=this._off;f<a.length;){var d=a[f++],h=a[f++];isNaN(d)||isNaN(h)||c&&!c.contain(d,h)||(s.x=d-i[0]/2,s.y=h-i[1]/2,s.width=i[0],s.height=i[1],o.buildPath(t,s,!0))}this.incremental&&(this._off=f,this.notClear=!0)},e.prototype.afterBrush=function(){var t=this.shape,n=t.points,a=t.size,i=this._ctx,o=this.softClipShape,s;if(i){for(s=this._off;s<n.length;){var l=n[s++],u=n[s++];isNaN(l)||isNaN(u)||o&&!o.contain(l,u)||i.fillRect(l-a[0]/2,u-a[1]/2,a[0],a[1])}this.incremental&&(this._off=s,this.notClear=!0)}},e.prototype.findDataIndex=function(t,n){for(var a=this.shape,i=a.points,o=a.size,s=Math.max(o[0],4),l=Math.max(o[1],4),u=i.length/2-1;u>=0;u--){var c=u*2,f=i[c]-s/2,d=i[c+1]-l/2;if(t>=f&&n>=d&&t<=f+s&&n<=d+l)return u}return-1},e.prototype.contain=function(t,n){var a=this.transformCoordToLocal(t,n),i=this.getBoundingRect();if(t=a[0],n=a[1],i.contain(t,n)){var o=this.hoverDataIdx=this.findDataIndex(t,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var n=this.shape,a=n.points,i=n.size,o=i[0],s=i[1],l=1/0,u=1/0,c=-1/0,f=-1/0,d=0;d<a.length;){var h=a[d++],v=a[d++];l=Math.min(h,l),c=Math.max(h,c),u=Math.min(v,u),f=Math.max(v,f)}t=this._rect=new ze(l-o/2,u-s/2,c-l+o,f-u+s)}return t},e})(nt),DJ=(function(){function r(){this.group=new Le}return r.prototype.updateData=function(e,t){this._clear();var n=this._create();n.setShape({points:e.getLayout("points")}),this._setCommon(n,e,t)},r.prototype.updateLayout=function(e){var t=e.getLayout("points");this.group.eachChild(function(n){if(n.startIndex!=null){var a=(n.endIndex-n.startIndex)*2,i=n.startIndex*4*2;t=new Float32Array(t.buffer,i,a)}n.setShape("points",t),n.reset()})},r.prototype.incrementalPrepareUpdate=function(e){this._clear()},r.prototype.incrementalUpdate=function(e,t,n){var a=this._newAdded[0],i=t.getLayout("points"),o=a&&a.shape.points;if(o&&o.length<2e4){var s=o.length,l=new Float32Array(s+i.length);l.set(o),l.set(i,s),a.endIndex=e.end,a.setShape({points:l})}else{this._newAdded=[];var u=this._create();u.startIndex=e.start,u.endIndex=e.end,u.incremental=!0,u.setShape({points:i}),this._setCommon(u,t,n)}},r.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},r.prototype._create=function(){var e=new IJ({cursor:"default"});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},r.prototype._setCommon=function(e,t,n){var a=t.hostModel;n=n||{};var i=t.getVisual("symbolSize");e.setShape("size",i instanceof Array?i:[i,i]),e.softClipShape=n.clipShape||null,e.symbolProxy=Kt(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var o=e.shape.size[0]<e4;e.useStyle(a.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=t.getVisual("style"),l=s&&s.fill;l&&e.setColor(l);var u=je(e);u.seriesIndex=a.seriesIndex,e.on("mousemove",function(c){u.dataIndex=null;var f=e.hoverDataIdx;f>=0&&(u.dataIndex=f+(e.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r})(),PJ=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this._updateSymbolDraw(i,t);o.updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,n,a){var i=t.getData(),o=this._updateSymbolDraw(i,t);o.incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,n,a){this._symbolDraw.incrementalUpdate(t,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=t.end===n.getData().count()},e.prototype.updateTransform=function(t,n,a){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var o=Yh("").reset(t,n,a);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(t.get("clip",!0)){var n=t.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,n){var a=this._symbolDraw,i=n.pipelineContext,o=i.large;return(!a||o!==this._isLargeDraw)&&(a&&a.remove(),a=this._symbolDraw=o?new DJ:new Hh,this._isLargeDraw=o,this.group.removeAll()),this.group.add(a.group),a},e.prototype.remove=function(t,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e})(mt),t4={left:0,right:0,top:0,bottom:0},Ry=["25%","25%"],RJ=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.mergeDefaultAndTheme=function(t,n){var a=Nl(t.outerBounds);r.prototype.mergeDefaultAndTheme.apply(this,arguments),a&&t.outerBounds&&oi(t.outerBounds,a)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&oi(this.option.outerBounds,t.outerBounds)},e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:t4,outerBoundsContain:"all",outerBoundsClampWidth:Ry[0],outerBoundsClampHeight:Ry[1],backgroundColor:ee.color.transparent,borderWidth:1,borderColor:ee.color.neutral30},e})(Je),Z_=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",jt).models[0]},e.type="cartesian2dAxis",e})(Je);Wt(Z_,$c);var r4={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:ee.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:ee.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:ee.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[ee.color.backgroundTint,ee.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:ee.color.neutral00,borderColor:ee.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},EJ=Ye({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},r4),IC=Ye({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:ee.color.axisMinorSplitLine,width:1}}},r4),zJ=Ye({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},IC),OJ=De({logBase:10},IC);const n4={category:EJ,value:IC,time:zJ,log:OJ};var NJ={value:1,category:1,time:1,log:1},K_=null;function jJ(r){K_||(K_=r)}function Xh(){return K_}function xc(r,e,t,n){z(NJ,function(a,i){var o=Ye(Ye({},n4[i],!0),n,!0),s=(function(l){Q(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=e+"Axis."+i,c}return u.prototype.mergeDefaultAndTheme=function(c,f){var d=oh(this),h=d?Nl(c):{},v=f.getTheme();Ye(c,v.get(i+"Axis")),Ye(c,this.getDefaultOption()),c.type=MP(c),d&&oi(c,h,d)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=dh.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=Xh();return f?f.updateModelAxisBreak(this,c):{breaks:[]}},u.type=e+"Axis."+i,u.defaultOption=o,u})(t);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(e+"Axis",MP)}function MP(r){return r.type||(r.data?"category":"value")}var BJ=(function(){function r(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return r.prototype.getAxis=function(e){return this._axes[e]},r.prototype.getAxes=function(){return ue(this._dimList,function(e){return this._axes[e]},this)},r.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),ht(this.getAxes(),function(t){return t.scale.type===e})},r.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},r})(),q_=["x","y"];function kP(r){return(r.type==="interval"||r.type==="time")&&!r.hasBreaks()}var FJ=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=q_,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!kP(t)||!kP(n))){var a=t.getExtent(),i=n.getExtent(),o=this.dataToPoint([a[0],i[0]]),s=this.dataToPoint([a[1],i[1]]),l=a[1]-a[0],u=i[1]-i[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,f=(s[1]-o[1])/u,d=o[0]-a[0]*c,h=o[1]-i[0]*f,v=this._transform=[c,0,0,f,d,h];this._invTransform=Jn([],v)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var n=this.getAxis("x"),a=this.getAxis("y");return n.contain(n.toLocalCoord(t[0]))&&a.contain(a.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,n){var a=this.dataToPoint(t),i=this.dataToPoint(n),o=this.getArea(),s=new ze(a[0],a[1],i[0]-a[0],i[1]-a[1]);return o.intersect(s)},e.prototype.dataToPoint=function(t,n,a){a=a||[];var i=t[0],o=t[1];if(this._transform&&i!=null&&isFinite(i)&&o!=null&&isFinite(o))return Gt(a,t,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return a[0]=s.toGlobalCoord(s.dataToCoord(i,n)),a[1]=l.toGlobalCoord(l.dataToCoord(o,n)),a},e.prototype.clampData=function(t,n){var a=this.getAxis("x").scale,i=this.getAxis("y").scale,o=a.getExtent(),s=i.getExtent(),l=a.parse(t[0]),u=i.parse(t[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},e.prototype.pointToData=function(t,n,a){if(a=a||[],this._invTransform)return Gt(a,t,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return a[0]=i.coordToData(i.toLocalCoord(t[0]),n),a[1]=o.coordToData(o.toLocalCoord(t[1]),n),a},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(t){t=t||0;var n=this.getAxis("x").getGlobalExtent(),a=this.getAxis("y").getGlobalExtent(),i=Math.min(n[0],n[1])-t,o=Math.min(a[0],a[1])-t,s=Math.max(n[0],n[1])-i+t,l=Math.max(a[0],a[1])-o+t;return new ze(i,o,s,l)},e})(BJ),a4=(function(r){Q(e,r);function e(t,n,a,i,o){var s=r.call(this,t,n,a)||this;return s.index=0,s.type=i||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.getGlobalExtent=function(t){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),t&&n[0]>n[1]&&n.reverse(),n},e.prototype.pointToData=function(t,n){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),n)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e})(aa),Bm="expandAxisBreak",i4="collapseAxisBreak",o4="toggleAxisBreak",DC="axisbreakchanged",VJ={type:Bm,event:DC,update:"update",refineEvent:PC},GJ={type:i4,event:DC,update:"update",refineEvent:PC},WJ={type:o4,event:DC,update:"update",refineEvent:PC};function PC(r,e,t,n){var a=[];return z(r,function(i){a=a.concat(i.eventBreaks)}),{eventContent:{breaks:a}}}function $J(r){r.registerAction(VJ,e),r.registerAction(GJ,e),r.registerAction(WJ,e);function e(t,n){var a=[],i=ec(n,t);function o(s,l){z(i[s],function(u){var c=u.updateAxisBreaks(t);z(c.breaks,function(f){var d;a.push(De((d={},d[l]=u.componentIndex,d),f))})})}return o("xAxisModels","xAxisIndex"),o("yAxisModels","yAxisIndex"),o("singleAxisModels","singleAxisIndex"),{eventBreaks:a}}}var Vo=Math.PI,HJ=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],UJ=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],Sc=et(),s4=et(),l4=(function(){function r(e){this.recordMap={},this.resolveAxisNameOverlap=e}return r.prototype.ensureRecord=function(e){var t=e.axis.dim,n=e.componentIndex,a=this.recordMap,i=a[t]||(a[t]=[]);return i[n]||(i[n]={ready:{}})},r})();function YJ(r,e,t,n){var a=t.axis,i=e.ensureRecord(t),o=[],s,l=RC(r.axisName)&&yc(r.nameLocation);z(n,function(v){var y=si(v);if(!(!y||y.label.ignore)){o.push(y);var m=i.transGroup;l&&(m.transform?Jn(Kf,m.transform):Ph(Kf),y.transform&&Sa(Kf,Kf,y.transform),ze.copy(Jv,y.localRect),Jv.applyTransform(Kf),s?s.union(Jv):ze.copy(s=new ze(0,0,0,0),Jv))}});var u=Math.abs(i.dirVec.x)>.1?"x":"y",c=i.transGroup[u];if(o.sort(function(v,y){return Math.abs(v.label[u]-c)-Math.abs(y.label[u]-c)}),l&&s){var f=a.getExtent(),d=Math.min(f[0],f[1]),h=Math.max(f[0],f[1])-d;s.union(new ze(d,0,h,1))}i.stOccupiedRect=s,i.labelInfoList=o}var Kf=hr(),Jv=new ze(0,0,0,0),u4=function(r,e,t,n,a,i){if(yc(r.nameLocation)){var o=i.stOccupiedRect;o&&c4(Hq({},o,i.transGroup.transform),n,a)}else f4(i.labelInfoList,i.dirVec,n,a)};function c4(r,e,t){var n=new Ee;Nm(r,e,n,{direction:Math.atan2(t.y,t.x),bidirectional:!1,touchThreshold:.05})&&G_(e,n)}function f4(r,e,t,n){for(var a=Ee.dot(n,e)>=0,i=0,o=r.length;i<o;i++){var s=r[a?i:o-1-i];s.label.ignore||c4(s,t,n)}}var Jr=(function(){function r(e,t,n,a){this.group=new Le,this._axisModel=e,this._api=t,this._local={},this._shared=a||new l4(u4),this._resetCfgDetermined(n)}return r.prototype.updateCfg=function(e){var t=this._cfg.raw;t.position=e.position,t.labelOffset=e.labelOffset,this._resetCfgDetermined(t)},r.prototype.__getRawCfg=function(){return this._cfg.raw},r.prototype._resetCfgDetermined=function(e){var t=this._axisModel,n=t.getDefaultOption?t.getDefaultOption():{},a=Ce(e.axisName,t.get("name")),i=t.get("nameMoveOverlap");(i==null||i==="auto")&&(i=Ce(e.defaultNameMoveOverlap,!0));var o={raw:e,position:e.position,rotation:e.rotation,nameDirection:Ce(e.nameDirection,1),tickDirection:Ce(e.tickDirection,1),labelDirection:Ce(e.labelDirection,1),labelOffset:Ce(e.labelOffset,0),silent:Ce(e.silent,!0),axisName:a,nameLocation:hn(t.get("nameLocation"),n.nameLocation,"end"),shouldNameMoveOverlap:RC(a)&&i,optionHideOverlap:t.get(["axisLabel","hideOverlap"]),showMinorTicks:t.get(["minorTick","show"])};this._cfg=o;var s=new Le({x:o.position[0],y:o.position[1],rotation:o.rotation});s.updateTransform(),this._transformGroup=s;var l=this._shared.ensureRecord(t);l.transGroup=this._transformGroup,l.dirVec=new Ee(Math.cos(-o.rotation),Math.sin(-o.rotation))},r.prototype.build=function(e,t){var n=this;return e||(e={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0}),z(XJ,function(a){e[a]&&ZJ[a](n._cfg,n._local,n._shared,n._axisModel,n.group,n._transformGroup,n._api,t||{})}),this},r.innerTextLayout=function(e,t,n){var a=dT(t-e),i,o;return cc(a)?(o=n>0?"top":"bottom",i="center"):cc(a-Vo)?(o=n>0?"bottom":"top",i="center"):(o="middle",a>0&&a<Vo?i=n>0?"right":"left":i=n>0?"left":"right"),{rotation:a,textAlign:i,textVerticalAlign:o}},r.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},r.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},r})(),XJ=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],ZJ={axisLine:function(r,e,t,n,a,i,o){var s=n.get(["axisLine","show"]);if(s==="auto"&&(s=!0,r.raw.axisLineAutoShow!=null&&(s=!!r.raw.axisLineAutoShow)),!!s){var l=n.axis.getExtent(),u=i.transform,c=[l[0],0],f=[l[1],0],d=c[0]>f[0];u&&(Gt(c,c,u),Gt(f,f,u));var h=ie({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),v={strokeContainThreshold:r.raw.strokeContainThreshold||5,silent:!0,z2:1,style:h};if(n.get(["axisLine","breakLine"])&&n.axis.scale.hasBreaks())Xh().buildAxisBreakLine(n,a,i,v);else{var y=new Zt(ie({shape:{x1:c[0],y1:c[1],x2:f[0],y2:f[1]}},v));hc(y.shape,y.style.lineWidth),y.anid="line",a.add(y)}var m=n.get(["axisLine","symbol"]);if(m!=null){var x=n.get(["axisLine","symbolSize"]);pe(m)&&(m=[m,m]),(pe(x)||ut(x))&&(x=[x,x]);var _=Bl(n.get(["axisLine","symbolOffset"])||0,x),T=x[0],C=x[1];z([{rotate:r.rotation+Math.PI/2,offset:_[0],r:0},{rotate:r.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(k,A){if(m[A]!=="none"&&m[A]!=null){var L=Kt(m[A],-T/2,-C/2,T,C,h.stroke,!0),D=k.r+k.offset,P=d?f:c;L.attr({rotation:k.rotate,x:P[0]+D*Math.cos(r.rotation),y:P[1]-D*Math.sin(r.rotation),silent:!0,z2:11}),a.add(L)}})}}},axisTickLabelEstimate:function(r,e,t,n,a,i,o,s){var l=LP(e,a,s);l&&AP(r,e,t,n,a,i,o,Ma.estimate)},axisTickLabelDetermine:function(r,e,t,n,a,i,o,s){var l=LP(e,a,s);l&&AP(r,e,t,n,a,i,o,Ma.determine);var u=JJ(r,a,i,n);QJ(r,e.labelLayoutList,u),eee(r,a,i,n,r.tickDirection)},axisName:function(r,e,t,n,a,i,o,s){var l=t.ensureRecord(n);e.nameEl&&(a.remove(e.nameEl),e.nameEl=l.nameLayout=l.nameLocation=null);var u=r.axisName;if(RC(u)){var c=r.nameLocation,f=r.nameDirection,d=n.getModel("nameTextStyle"),h=n.get("nameGap")||0,v=n.axis.getExtent(),y=n.axis.inverse?-1:1,m=new Ee(0,0),x=new Ee(0,0);c==="start"?(m.x=v[0]-y*h,x.x=-y):c==="end"?(m.x=v[1]+y*h,x.x=y):(m.x=(v[0]+v[1])/2,m.y=r.labelOffset+f*h,x.y=f);var _=hr();x.transform(to(_,_,r.rotation));var T=n.get("nameRotate");T!=null&&(T=T*Vo/180);var C,k;yc(c)?C=Jr.innerTextLayout(r.rotation,T??r.rotation,f):(C=KJ(r.rotation,c,T||0,v),k=r.raw.axisNameAvailableWidth,k!=null&&(k=Math.abs(k/Math.sin(C.rotation)),!isFinite(k)&&(k=null)));var A=d.getFont(),L=n.get("nameTruncate",!0)||{},D=L.ellipsis,P=Tr(r.raw.nameTruncateMaxWidth,L.maxWidth,k),E=s.nameMarginLevel||0,O=new lt({x:m.x,y:m.y,rotation:C.rotation,silent:Jr.isLabelSilent(n),style:wt(d,{text:u,font:A,overflow:"truncate",width:P,ellipsis:D,fill:d.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:d.get("align")||C.textAlign,verticalAlign:d.get("verticalAlign")||C.textVerticalAlign}),z2:1});if(no({el:O,componentModel:n,itemName:u}),O.__fullText=u,O.anid="name",n.get("triggerEvent")){var B=Jr.makeAxisEventDataBase(n);B.targetType="axisName",B.name=u,je(O).eventData=B}i.add(O),O.updateTransform(),e.nameEl=O;var N=l.nameLayout=si({label:O,priority:O.z2,defaultAttr:{ignore:O.ignore},marginDefault:yc(c)?HJ[E]:UJ[E]});if(l.nameLocation=c,a.add(O),O.decomposeTransform(),r.shouldNameMoveOverlap&&N){var W=t.ensureRecord(n);t.resolveAxisNameOverlap(r,t,n,N,x,W)}}}};function AP(r,e,t,n,a,i,o,s){h4(e)||tee(r,e,a,s,n,o);var l=e.labelLayoutList;ree(r,n,l,i),iee(n,r.rotation,l);var u=r.optionHideOverlap;qJ(n,l,u),u&&w3(ht(l,function(c){return c&&!c.label.ignore})),YJ(r,t,n,l)}function KJ(r,e,t,n){var a=dT(t-r),i,o,s=n[0]>n[1],l=e==="start"&&!s||e!=="start"&&s;return cc(a-Vo/2)?(o=l?"bottom":"top",i="center"):cc(a-Vo*1.5)?(o=l?"top":"bottom",i="center"):(o="middle",a<Vo*1.5&&a>Vo/2?i=l?"left":"right":i=l?"right":"left"),{rotation:a,textAlign:i,textVerticalAlign:o}}function qJ(r,e,t){if(o3(r.axis))return;function n(s,l,u){var c=si(e[l]),f=si(e[u]);if(!(!c||!f)){if(s===!1||c.suggestIgnore){wd(c.label);return}if(f.suggestIgnore){wd(f.label);return}var d=.1;if(!t){var h=[0,0,0,0];c=W_({marginForce:h},c),f=W_({marginForce:h},f)}Nm(c,f,null,{touchThreshold:d})&&wd(s?f.label:c.label)}}var a=r.get(["axisLabel","showMinLabel"]),i=r.get(["axisLabel","showMaxLabel"]),o=e.length;n(a,0,1),n(i,o-1,o-2)}function QJ(r,e,t){r.showMinorTicks||z(e,function(n){if(n&&n.label.ignore)for(var a=0;a<t.length;a++){var i=t[a],o=s4(i),s=Sc(n.label);if(o.tickValue!=null&&!o.onBand&&o.tickValue===s.tickValue){wd(i);return}}})}function wd(r){r&&(r.ignore=!0)}function d4(r,e,t,n,a){for(var i=[],o=[],s=[],l=0;l<r.length;l++){var u=r[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=t,e&&(Gt(o,o,e),Gt(s,s,e));var c=new Zt({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,autoBatch:!0,silent:!0});hc(c.shape,c.style.lineWidth),c.anid=a+"_"+r[l].tickValue,i.push(c);var f=s4(c);f.onBand=!!r[l].onBand,f.tickValue=r[l].tickValue}return i}function JJ(r,e,t,n){var a=n.axis,i=n.getModel("axisTick"),o=i.get("show");if(o==="auto"&&(o=!0,r.raw.axisTickAutoShow!=null&&(o=!!r.raw.axisTickAutoShow)),!o||a.scale.isBlank())return[];for(var s=i.getModel("lineStyle"),l=r.tickDirection*i.get("length"),u=a.getTicksCoords(),c=d4(u,t.transform,l,De(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),f=0;f<c.length;f++)e.add(c[f]);return c}function eee(r,e,t,n,a){var i=n.axis,o=n.getModel("minorTick");if(!(!r.showMinorTicks||i.scale.isBlank())){var s=i.getMinorTicksCoords();if(s.length)for(var l=o.getModel("lineStyle"),u=a*o.get("length"),c=De(l.getLineStyle(),De(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),f=0;f<s.length;f++)for(var d=d4(s[f],t.transform,u,c,"minorticks_"+f),h=0;h<d.length;h++)e.add(d[h])}}function LP(r,e,t){if(h4(r)){var n=r.axisLabelsCreationContext,a=n.out.noPxChangeTryDetermine;if(t.noPxChange){for(var i=!0,o=0;o<a.length;o++)i=i&&a[o]();if(i)return!1}a.length&&(e.remove(r.labelGroup),Q_(r,null,null,null))}return!0}function tee(r,e,t,n,a,i){var o=a.axis,s=Tr(r.raw.axisLabelShow,a.get(["axisLabel","show"])),l=new Le;t.add(l);var u=My(n);if(!s||o.scale.isBlank()){Q_(e,[],l,u);return}var c=a.getModel("axisLabel"),f=o.getViewLabels(u),d=(Tr(r.raw.labelRotate,c.get("rotate"))||0)*Vo/180,h=Jr.innerTextLayout(r.rotation,d,r.labelDirection),v=a.getCategories&&a.getCategories(!0),y=[],m=a.get("triggerEvent"),x=1/0,_=-1/0;z(f,function(C,k){var A,L=o.scale.type==="ordinal"?o.scale.getRawOrdinalNumber(C.tickValue):C.tickValue,D=C.formattedLabel,P=C.rawLabel,E=c;if(v&&v[L]){var O=v[L];Pe(O)&&O.textStyle&&(E=new rt(O.textStyle,c,a.ecModel))}var B=E.getTextColor()||a.get(["axisLine","lineStyle","color"]),N=E.getShallow("align",!0)||h.textAlign,W=Ce(E.getShallow("alignMinLabel",!0),N),H=Ce(E.getShallow("alignMaxLabel",!0),N),$=E.getShallow("verticalAlign",!0)||E.getShallow("baseline",!0)||h.textVerticalAlign,Z=Ce(E.getShallow("verticalAlignMinLabel",!0),$),G=Ce(E.getShallow("verticalAlignMaxLabel",!0),$),X=10+(((A=C.time)===null||A===void 0?void 0:A.level)||0);x=Math.min(x,X),_=Math.max(_,X);var K=new lt({x:0,y:0,rotation:0,silent:Jr.isLabelSilent(a),z2:X,style:wt(E,{text:D,align:k===0?W:k===f.length-1?H:N,verticalAlign:k===0?Z:k===f.length-1?G:$,fill:Me(B)?B(o.type==="category"?P:o.type==="value"?L+"":L,k):B})});K.anid="label_"+L;var V=Sc(K);if(V.break=C.break,V.tickValue=L,V.layoutRotation=h.rotation,no({el:K,componentModel:a,itemName:D,formatterParamsExtra:{isTruncated:function(){return K.isTruncated},value:P,tickIndex:k}}),m){var U=Jr.makeAxisEventDataBase(a);U.targetType="axisLabel",U.value=P,U.tickIndex=k,C.break&&(U.break={start:C.break.parsedBreak.vmin,end:C.break.parsedBreak.vmax}),o.type==="category"&&(U.dataIndex=L),je(K).eventData=U,C.break&&aee(a,i,K,C.break)}y.push(K),l.add(K)});var T=ue(y,function(C){return{label:C,priority:Sc(C).break?C.z2+(_-x+1):C.z2,defaultAttr:{ignore:C.ignore}}});Q_(e,T,l,u)}function h4(r){return!!r.labelLayoutList}function Q_(r,e,t,n){r.labelLayoutList=e,r.labelGroup=t,r.axisLabelsCreationContext=n}function ree(r,e,t,n){var a=e.get(["axisLabel","margin"]);z(t,function(i,o){var s=si(i);if(s){var l=s.label,u=Sc(l);s.suggestIgnore=l.ignore,l.ignore=!1,ny(Ti,nee),Ti.x=e.axis.dataToCoord(u.tickValue),Ti.y=r.labelOffset+r.labelDirection*a,Ti.rotation=u.layoutRotation,n.add(Ti),Ti.updateTransform(),n.remove(Ti),Ti.decomposeTransform(),ny(l,Ti),l.markRedraw(),Iy(s,!0),si(s)}})}var Ti=new Qe,nee=new Qe;function RC(r){return!!r}function aee(r,e,t,n){t.on("click",function(a){var i={type:Bm,breaks:[{start:n.parsedBreak.breakOption.start,end:n.parsedBreak.breakOption.end}]};i[r.axis.dim+"AxisIndex"]=r.componentIndex,e.dispatchAction(i)})}function iee(r,e,t){var n=er();if(n){var a=n.retrieveAxisBreakPairs(t,function(o){return o&&Sc(o.label).break},!0),i=r.get(["breakLabelLayout","moveOverlap"],!0);(i===!0||i==="auto")&&z(a,function(o){Xh().adjustBreakLabelPair(r.axis.inverse,e,[si(t[o[0]]),si(t[o[1]])])})}}function Ey(r,e,t){t=t||{};var n=e.axis,a={},i=n.getAxesOnZeroOf()[0],o=n.position,s=i?"onZero":o,l=n.dim,u=[r.x,r.x+r.width,r.y,r.y+r.height],c={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,d=l==="x"?[u[2]-f,u[3]+f]:[u[0]-f,u[1]+f];if(i){var h=i.toGlobalCoord(i.dataToCoord(0));d[c.onZero]=Math.max(Math.min(h,d[1]),d[0])}a.position=[l==="y"?d[c[s]]:u[0],l==="x"?d[c[s]]:u[3]],a.rotation=Math.PI/2*(l==="x"?0:1);var v={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=v[o],a.labelOffset=i?d[c[o]]-d[c.onZero]:0,e.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),Tr(t.labelInside,e.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var y=e.get(["axisLabel","rotate"]);return a.labelRotate=s==="top"?-y:y,a.z2=1,a}function oee(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function IP(r){var e={xAxisModel:null,yAxisModel:null};return z(e,function(t,n){var a=n.replace(/Model$/,""),i=r.getReferringComponents(a,jt).models[0];e[n]=i}),e}function see(r,e,t,n,a,i){for(var o=Ey(r,t),s=!1,l=!1,u=0;u<e.length;u++)O_(e[u].getOtherAxis(t.axis).scale)&&(s=l=!0,t.axis.type==="category"&&t.axis.onBand&&(l=!1));return o.axisLineAutoShow=s,o.axisTickAutoShow=l,o.defaultNameMoveOverlap=i,new Jr(t,n,o,a)}function lee(r,e,t){var n=Ey(e,t);r.updateCfg(n)}function p4(r,e,t){var n=Qi.prototype,a=n.getTicks.call(t),i=n.getTicks.call(t,{expandToNicedExtent:!0}),o=a.length-1,s=n.getInterval.call(t),l=i3(r,e),u=l.extent,c=l.fixMin,f=l.fixMax;r.type==="log"&&(u=N_(r.base,u,!0)),r.setBreaksFromOption(s3(e)),r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:c,fixMax:f});var d=n.getExtent.call(r);c&&(u[0]=d[0]),f&&(u[1]=d[1]);var h=n.getInterval.call(r),v=u[0],y=u[1];if(c&&f)h=(y-v)/o;else if(c)for(y=u[0]+h*o;y<u[1]&&isFinite(y)&&isFinite(u[1]);)h=Q1(h),y=u[0]+h*o;else if(f)for(v=u[1]-h*o;v>u[0]&&isFinite(v)&&isFinite(u[0]);)h=Q1(h),v=u[1]-h*o;else{var m=r.getTicks().length-1;m>o&&(h=Q1(h));var x=h*o;y=Math.ceil(u[1]/h)*h,v=Xt(y-x),v<0&&u[0]>=0?(v=0,y=Xt(x)):y>0&&u[1]<=0&&(y=0,v=-Xt(x))}var _=(a[0].value-i[0].value)/s,T=(a[o].value-i[o].value)/s;n.setExtent.call(r,v+h*_,y+h*T),n.setInterval.call(r,h),(_||T)&&n.setNiceExtent.call(r,v+h,y-h)}var DP=[[3,1],[0,2]],uee=(function(){function r(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=q_,this._initCartesian(e,t,n),this.model=e}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(e,t){var n=this._axesMap;this._updateScale(e,this.model);function a(o){var s,l=st(o),u=l.length;if(u){for(var c=[],f=u-1;f>=0;f--){var d=+l[f],h=o[d],v=h.model,y=h.scale;O_(y)&&v.get("alignTicks")&&v.get("interval")==null?c.push(h):(Il(y,v),O_(y)&&(s=h))}c.length&&(s||(s=c.pop(),Il(s.scale,s.model)),z(c,function(m){p4(m.scale,m.model,s.scale)}))}}a(n.x),a(n.y);var i={};z(n.x,function(o){PP(n,"y",o,i)}),z(n.y,function(o){PP(n,"x",o,i)}),this.resize(this.model,t)},r.prototype.resize=function(e,t,n){var a=lr(e,t),i=this._rect=Dt(e.getBoxLayoutParams(),a.refContainer),o=this._axesMap,s=this._coordsList,l=e.get("containLabel");if(J_(o,i),!n){var u=dee(i,s,o,l,t),c=void 0;if(l)ew?(ew(this._axesList,i),J_(o,i)):c=zP(i.clone(),"axisLabel",null,i,o,u,a);else{var f=hee(e,i,a),d=f.outerBoundsRect,h=f.parsedOuterBoundsContain,v=f.outerBoundsClamp;d&&(c=zP(d,h,v,i,o,u,a))}v4(i,o,Ma.determine,null,c,a)}z(this._coordsList,function(y){y.calcAffineTransform()})},r.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n="x"+e+"y"+t;return this._coordsMap[n]}Pe(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var a=0,i=this._coordsList;a<i.length;a++)if(i[a].getAxis("x").index===e||i[a].getAxis("y").index===t)return i[a]},r.prototype.getCartesians=function(){return this._coordsList.slice()},r.prototype.convertToPixel=function(e,t,n){var a=this._findConvertTarget(t);return a.cartesian?a.cartesian.dataToPoint(n):a.axis?a.axis.toGlobalCoord(a.axis.dataToCoord(n)):null},r.prototype.convertFromPixel=function(e,t,n){var a=this._findConvertTarget(t);return a.cartesian?a.cartesian.pointToData(n):a.axis?a.axis.coordToData(a.axis.toLocalCoord(n)):null},r.prototype._findConvertTarget=function(e){var t=e.seriesModel,n=e.xAxisModel||t&&t.getReferringComponents("xAxis",jt).models[0],a=e.yAxisModel||t&&t.getReferringComponents("yAxis",jt).models[0],i=e.gridModel,o=this._coordsList,s,l;if(t)s=t.coordinateSystem,Ue(o,s)<0&&(s=null);else if(n&&a)s=this.getCartesian(n.componentIndex,a.componentIndex);else if(n)l=this.getAxis("x",n.componentIndex);else if(a)l=this.getAxis("y",a.componentIndex);else if(i){var u=i.coordinateSystem;u===this&&(s=this._coordsList[0])}return{cartesian:s,axis:l}},r.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},r.prototype._initCartesian=function(e,t,n){var a=this,i=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},l={x:0,y:0};if(t.eachComponent("xAxis",u("x"),this),t.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,z(s.x,function(c,f){z(s.y,function(d,h){var v="x"+f+"y"+h,y=new FJ(v);y.master=a,y.model=e,a._coordsMap[v]=y,a._coordsList.push(y),y.addAxis(c),y.addAxis(d)})});function u(c){return function(f,d){if(pS(f,e)){var h=f.get("position");c==="x"?h!=="top"&&h!=="bottom"&&(h=o.bottom?"top":"bottom"):h!=="left"&&h!=="right"&&(h=o.left?"right":"left"),o[h]=!0;var v=new a4(c,Wh(f),[0,0],f.get("type"),h),y=v.type==="category";v.onBand=y&&f.get("boundaryGap"),v.inverse=f.get("inverse"),f.axis=v,v.model=f,v.grid=i,v.index=d,i._axesList.push(v),s[c][d]=v,l[c]++}}}},r.prototype._updateScale=function(e,t){z(this._axesList,function(a){if(a.scale.setExtent(1/0,-1/0),a.type==="category"){var i=a.model.get("categorySortInfo");a.scale.setSortInfo(i)}}),e.eachSeries(function(a){if(oee(a)){var i=IP(a),o=i.xAxisModel,s=i.yAxisModel;if(!pS(o,t)||!pS(s,t))return;var l=this.getCartesian(o.componentIndex,s.componentIndex),u=a.getData(),c=l.getAxis("x"),f=l.getAxis("y");n(u,c),n(u,f)}},this);function n(a,i){z(Cy(a,i.dim),function(o){i.scale.unionExtentFromData(a,o)})}},r.prototype.getTooltipAxes=function(e){var t=[],n=[];return z(this.getCartesians(),function(a){var i=e!=null&&e!=="auto"?a.getAxis(e):a.getBaseAxis(),o=a.getOtherAxis(i);Ue(t,i)<0&&t.push(i),Ue(n,o)<0&&n.push(o)}),{baseAxes:t,otherAxes:n}},r.create=function(e,t){var n=[];return e.eachComponent("grid",function(a,i){var o=new r(a,e,t);o.name="grid_"+i,o.resize(a,t,!0),a.coordinateSystem=o,n.push(o)}),e.eachSeries(function(a){Vh({targetModel:a,coordSysType:"cartesian2d",coordSysProvider:i});function i(){var o=IP(a),s=o.xAxisModel,l=o.yAxisModel,u=s.getCoordSysModel(),c=u.coordinateSystem;return c.getCartesian(s.componentIndex,l.componentIndex)}}),n},r.dimensions=q_,r})();function pS(r,e){return r.getCoordSysModel()===e}function PP(r,e,t,n){t.getAxesOnZeroOf=function(){return i?[i]:[]};var a=r[e],i,o=t.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)RP(a[l])&&(i=a[l]);else for(var u in a)if(a.hasOwnProperty(u)&&RP(a[u])&&!n[c(a[u])]){i=a[u];break}i&&(n[c(i)]=!0);function c(f){return f.dim+"_"+f.index}}function RP(r){return r&&r.type!=="category"&&r.type!=="time"&&tq(r)}function cee(r,e){var t=r.getExtent(),n=t[0]+t[1];r.toGlobalCoord=r.dim==="x"?function(a){return a+e}:function(a){return n-a+e},r.toLocalCoord=r.dim==="x"?function(a){return a-e}:function(a){return n-a+e}}function J_(r,e){z(r.x,function(t){return EP(t,e.x,e.width)}),z(r.y,function(t){return EP(t,e.y,e.height)})}function EP(r,e,t){var n=[0,t],a=r.inverse?1:0;r.setExtent(n[a],n[1-a]),cee(r,e)}var ew;function fee(r){ew=r}function zP(r,e,t,n,a,i,o){v4(n,a,Ma.estimate,e,!1,o);var s=[0,0,0,0];u(0),u(1),c(n,0,NaN),c(n,1,NaN);var l=os(s,function(d){return d>0})==null;return kl(n,s,!0,!0,t),J_(a,n),l;function u(d){z(a[Ge[d]],function(h){if(hh(h.model)){var v=i.ensureRecord(h.model),y=v.labelInfoList;if(y)for(var m=0;m<y.length;m++){var x=y[m],_=h.scale.normalize(Sc(x.label).tickValue);_=d===1?1-_:_,c(x.rect,d,_),c(x.rect,1-d,NaN)}var T=v.nameLayout;if(T){var _=yc(v.nameLocation)?.5:NaN;c(T.rect,d,_),c(T.rect,1-d,NaN)}}})}function c(d,h,v){var y=r[Ge[h]]-d[Ge[h]],m=d[tr[h]]+d[Ge[h]]-(r[tr[h]]+r[Ge[h]]);y=f(y,1-v),m=f(m,v);var x=DP[h][0],_=DP[h][1];s[x]=Yt(s[x],y),s[_]=Yt(s[_],m)}function f(d,h){return d>0&&!Dr(h)&&h>1e-4&&(d/=h),d}}function dee(r,e,t,n,a){var i=new l4(pee);return z(t,function(o){return z(o,function(s){if(hh(s.model)){var l=!n;s.axisBuilder=see(r,e,s.model,a,i,l)}})}),i}function v4(r,e,t,n,a,i){var o=t===Ma.determine;z(e,function(u){return z(u,function(c){hh(c.model)&&(lee(c.axisBuilder,r,c.model),c.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:a}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[Ge[1-u]]=r[tr[u]]<=i.refContainer[tr[u]]*.5?0:1-u===1?2:1}z(e,function(u,c){return z(u,function(f){hh(f.model)&&((n==="all"||o)&&f.axisBuilder.build({axisName:!0},{nameMarginLevel:s[c]}),o&&f.axisBuilder.build({axisLine:!0}))})})}function hee(r,e,t){var n,a=r.get("outerBoundsMode",!0);a==="same"?n=e.clone():(a==null||a==="auto")&&(n=Dt(r.get("outerBounds",!0)||t4,t.refContainer));var i=r.get("outerBoundsContain",!0),o;i==null||i==="auto"||Ue(["all","axisLabel"],i)<0?o="all":o=i;var s=[iy(Ce(r.get("outerBoundsClampWidth",!0),Ry[0]),e.width),iy(Ce(r.get("outerBoundsClampHeight",!0),Ry[1]),e.height)];return{outerBoundsRect:n,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var pee=function(r,e,t,n,a,i){var o=t.axis.dim==="x"?"y":"x";u4(r,e,t,n,a,i),yc(r.nameLocation)||z(e.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&f4(s.labelInfoList,s.dirVec,n,a)})};function vee(r,e){var t={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return gee(t,r,e),t.seriesInvolved&&mee(t,r),t}function gee(r,e,t){var n=e.getComponent("tooltip"),a=e.getComponent("axisPointer"),i=a.get("link",!0)||[],o=[];z(t.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=yh(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var c=s.model,f=c.getModel("tooltip",n);if(z(s.getAxes(),$e(y,!1,null)),s.getTooltipAxes&&n&&f.get("show")){var d=f.get("trigger")==="axis",h=f.get(["axisPointer","type"])==="cross",v=s.getTooltipAxes(f.get(["axisPointer","axis"]));(d||h)&&z(v.baseAxes,$e(y,h?"cross":!0,d)),h&&z(v.otherAxes,$e(y,"cross",!1))}function y(m,x,_){var T=_.model.getModel("axisPointer",a),C=T.get("show");if(!(!C||C==="auto"&&!m&&!tw(T))){x==null&&(x=T.get("triggerTooltip")),T=m?yee(_,f,a,e,m,x):T;var k=T.get("snap"),A=T.get("triggerEmphasis"),L=yh(_.model),D=x||k||_.type==="category",P=r.axesInfo[L]={key:L,axis:_,coordSys:s,axisPointerModel:T,triggerTooltip:x,triggerEmphasis:A,involveSeries:D,snap:k,useHandle:tw(T),seriesModels:[],linkGroup:null};u[L]=P,r.seriesInvolved=r.seriesInvolved||D;var E=xee(i,_);if(E!=null){var O=o[E]||(o[E]={axesInfo:{}});O.axesInfo[L]=P,O.mapper=i[E].mapper,P.linkGroup=O}}}})}function yee(r,e,t,n,a,i){var o=e.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};z(s,function(d){l[d]=Ae(o.get(d))}),l.snap=r.type!=="category"&&!!i,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),a==="cross"){var c=o.get(["label","show"]);if(u.show=c??!0,!i){var f=l.lineStyle=o.get("crossStyle");f&&De(u,f.textStyle)}}return r.model.getModel("axisPointer",new rt(l,t,n))}function mee(r,e){e.eachSeries(function(t){var n=t.coordinateSystem,a=t.get(["tooltip","trigger"],!0),i=t.get(["tooltip","show"],!0);!n||!n.model||a==="none"||a===!1||a==="item"||i===!1||t.get(["axisPointer","show"],!0)===!1||z(r.coordSysAxesInfo[yh(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(t),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=t.getData().count())})})}function xee(r,e){for(var t=e.model,n=e.dim,a=0;a<r.length;a++){var i=r[a]||{};if(vS(i[n+"AxisId"],t.id)||vS(i[n+"AxisIndex"],t.componentIndex)||vS(i[n+"AxisName"],t.name))return a}}function vS(r,e){return r==="all"||le(r)&&Ue(r,e)>=0||r===e}function See(r){var e=EC(r);if(e){var t=e.axisPointerModel,n=e.axis.scale,a=t.option,i=t.get("status"),o=t.get("value");o!=null&&(o=n.parse(o));var s=tw(t);i==null&&(a.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]),a.value=o,s&&(a.status=e.axis.scale.isBlank()?"hide":"show")}}function EC(r){var e=(r.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[yh(r)]}function bee(r){var e=EC(r);return e&&e.axisPointerModel}function tw(r){return!!r.get(["handle","show"])}function yh(r){return r.type+"||"+r.id}var OP={},Fl=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a,i){this.axisPointerClass&&See(t),r.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,a,!0)},e.prototype.updateAxisPointer=function(t,n,a,i){this._doUpdateAxisPointerClass(t,a,!1)},e.prototype.remove=function(t,n){var a=this._axisPointer;a&&a.remove(n)},e.prototype.dispose=function(t,n){this._disposeAxisPointer(n),r.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(t,n,a){var i=e.getAxisPointerClass(this.axisPointerClass);if(i){var o=bee(t);o?(this._axisPointer||(this._axisPointer=new i)).render(t,o,n,a):this._disposeAxisPointer(n)}},e.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},e.registerAxisPointerClass=function(t,n){OP[t]=n},e.getAxisPointerClass=function(t){return t&&OP[t]},e.type="axis",e})(Ct),rw=et();function g4(r,e,t,n){var a=t.axis;if(!a.scale.isBlank()){var i=t.getModel("splitArea"),o=i.getModel("areaStyle"),s=o.get("color"),l=n.coordinateSystem.getRect(),u=a.getTicksCoords({tickModel:i,clamp:!0,breakTicks:"none",pruneByBreak:"preserve_extent_bound"});if(u.length){var c=s.length,f=rw(r).splitAreaColors,d=we(),h=0;if(f)for(var v=0;v<u.length;v++){var y=f.get(u[v].tickValue);if(y!=null){h=(y+(c-1)*v)%c;break}}var m=a.toGlobalCoord(u[0].coord),x=o.getAreaStyle();s=le(s)?s:[s];for(var v=1;v<u.length;v++){var _=a.toGlobalCoord(u[v].coord),T=void 0,C=void 0,k=void 0,A=void 0;a.isHorizontal()?(T=m,C=l.y,k=_-T,A=l.height,m=T+k):(T=l.x,C=m,k=l.width,A=_-C,m=C+A);var L=u[v-1].tickValue;L!=null&&d.set(L,h),e.add(new Qe({anid:L!=null?"area_"+L:null,shape:{x:T,y:C,width:k,height:A},style:De({fill:s[h]},x),autoBatch:!0,silent:!0})),h=(h+1)%c}rw(r).splitAreaColors=d}}}function y4(r){rw(r).splitAreaColors=null}var _ee=["splitArea","splitLine","minorSplitLine","breakArea"],m4=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="CartesianAxisPointer",t}return e.prototype.render=function(t,n,a,i){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Le,this.group.add(this._axisGroup),!!hh(t)){this._axisGroup.add(t.axis.axisBuilder.group),z(_ee,function(l){t.get([l,"show"])&&wee[l](this,this._axisGroup,t,t.getCoordSysModel(),a)},this);var s=i&&i.type==="changeAxisOrder"&&i.isInitSort;s||Bh(o,this._axisGroup,t),r.prototype.render.call(this,t,n,a,i)}},e.prototype.remove=function(){y4(this)},e.type="cartesianAxis",e})(Fl),wee={splitLine:function(r,e,t,n,a){var i=t.axis;if(!i.scale.isBlank()){var o=t.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=o.get("showMinLine")!==!1,c=o.get("showMaxLine")!==!1;l=le(l)?l:[l];for(var f=n.coordinateSystem.getRect(),d=i.isHorizontal(),h=0,v=i.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),y=[],m=[],x=s.getLineStyle(),_=0;_<v.length;_++){var T=i.toGlobalCoord(v[_].coord);if(!(_===0&&!u||_===v.length-1&&!c)){var C=v[_].tickValue;d?(y[0]=T,y[1]=f.y,m[0]=T,m[1]=f.y+f.height):(y[0]=f.x,y[1]=T,m[0]=f.x+f.width,m[1]=T);var k=h++%l.length,A=new Zt({anid:C!=null?"line_"+C:null,autoBatch:!0,shape:{x1:y[0],y1:y[1],x2:m[0],y2:m[1]},style:De({stroke:l[k]},x),silent:!0});hc(A.shape,x.lineWidth),e.add(A)}}}},minorSplitLine:function(r,e,t,n,a){var i=t.axis,o=t.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=n.coordinateSystem.getRect(),u=i.isHorizontal(),c=i.getMinorTicksCoords();if(c.length)for(var f=[],d=[],h=s.getLineStyle(),v=0;v<c.length;v++)for(var y=0;y<c[v].length;y++){var m=i.toGlobalCoord(c[v][y].coord);u?(f[0]=m,f[1]=l.y,d[0]=m,d[1]=l.y+l.height):(f[0]=l.x,f[1]=m,d[0]=l.x+l.width,d[1]=m);var x=new Zt({anid:"minor_line_"+c[v][y].tickValue,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:d[0],y2:d[1]},style:h,silent:!0});hc(x.shape,h.lineWidth),e.add(x)}},splitArea:function(r,e,t,n,a){g4(r,e,t,n)},breakArea:function(r,e,t,n,a){var i=Xh(),o=t.axis.scale;i&&o.type!=="ordinal"&&i.rectCoordBuildBreakAxis(e,r,t,n.coordinateSystem.getRect(),a)}},x4=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="xAxis",e})(m4),Tee=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=x4.type,t}return e.type="yAxis",e})(m4),Cee=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="grid",t}return e.prototype.render=function(t,n){this.group.removeAll(),t.get("show")&&this.group.add(new Qe({shape:t.coordinateSystem.getRect(),style:De({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))},e.type="grid",e})(Ct),NP={offset:0};function S4(r){r.registerComponentView(Cee),r.registerComponentModel(RJ),r.registerCoordinateSystem("cartesian2d",uee),xc(r,"x",Z_,NP),xc(r,"y",Z_,NP),r.registerComponentView(x4),r.registerComponentView(Tee),r.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function Mee(r,e){var t=r.coordinateSystem,n=t&&t.type,a=t&&t.getBaseAxis&&t.getBaseAxis(),i=a&&a.scale&&a.scale.type,o=n==="cartesian2d"&&i==="ordinal"||n==="single",s=e.model.get("jitter")>0;return o&&s}var kee=et();function jP(r,e,t,n){if(r instanceof a4){var a=r.scale.type;if(a!=="category"&&a!=="ordinal")return t}var i=r.model,o=i.get("jitter"),s=i.get("jitterOverlap"),l=i.get("jitterMargin")||0,u=r.scale.type==="ordinal"?r.getBandWidth():null;return o>0?s?b4(t,o,u,n):Aee(r,e,t,n,o,l):t}function b4(r,e,t,n){if(t===null)return r+(Math.random()-.5)*e;var a=t-n*2,i=Math.min(Math.max(0,e),a);return r+(Math.random()-.5)*i}function Aee(r,e,t,n,a,i){var o=kee(r);o.items||(o.items=[]);var s=o.items,l=BP(s,e,t,n,a,i,1),u=BP(s,e,t,n,a,i,-1),c=Math.abs(l-t)<Math.abs(u-t)?l:u,f=r.scale.type==="ordinal"?r.getBandWidth():null,d=Math.abs(c-t);return d>a/2||f&&d>f/2-n?b4(t,a,f,n):(s.push({fixedCoord:e,floatCoord:c,r:n}),c)}function BP(r,e,t,n,a,i,o){for(var s=t,l=0;l<r.length;l++){var u=r[l],c=e-u.fixedCoord,f=s-u.floatCoord,d=c*c+f*f,h=n+u.r+i;if(d<h*h){var v=u.floatCoord+Math.sqrt(h*h-c*c)*o;if(Math.abs(v-t)>a/2)return Number.MAX_VALUE;if(o===1&&v>s||o===-1&&v<s){s=v,l=-1;continue}}}return s}function Lee(r){r.eachSeriesByType("scatter",function(e){var t=e.coordinateSystem;if(t&&(t.type==="cartesian2d"||t.type==="single")){var n=t.getBaseAxis?t.getBaseAxis():null,a=n&&Mee(e,n);if(a){var i=e.getData();i.each(function(o){var s=n.dim,l=n.orient,u=l==="horizontal"&&n.type!=="category"||l==="vertical"&&n.type==="category",c=i.getItemLayout(o),f=i.getItemVisual(o,"symbolSize"),d=f instanceof Array?(f[1]+f[0])/2:f;if(s==="y"||s==="single"&&u){var h=jP(n,c[0],c[1],d/2);i.setItemLayout(o,[c[0],h])}else if(s==="x"||s==="single"&&!u){var h=jP(n,c[1],c[0],d/2);i.setItemLayout(o,[h,c[1]])}})}}})}function Iee(r){Ze(S4),r.registerSeriesModel(AJ),r.registerChartView(PJ),r.registerLayout(Yh("scatter"))}function Dee(r){r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,Lee)}function Pee(r){r.eachSeriesByType("radar",function(e){var t=e.getData(),n=[],a=e.coordinateSystem;if(a){var i=a.getIndicatorAxes();z(i,function(o,s){t.each(t.mapDimension(i[s].dim),function(l,u){n[u]=n[u]||[];var c=a.dataToPoint(l,s);n[u][s]=FP(c)?c:VP(a)})}),t.each(function(o){var s=os(n[o],function(l){return FP(l)})||VP(a);n[o].push(s.slice()),t.setItemLayout(o,n[o])})}})}function FP(r){return!isNaN(r[0])&&!isNaN(r[1])}function VP(r){return[r.cx,r.cy]}function Ree(r){var e=r.polar;if(e){le(e)||(e=[e]);var t=[];z(e,function(n,a){n.indicator?(n.type&&!n.shape&&(n.shape=n.type),r.radar=r.radar||[],le(r.radar)||(r.radar=[r.radar]),r.radar.push(n)):t.push(n)}),r.polar=t}z(r.series,function(n){n&&n.type==="radar"&&n.polarIndex&&(n.radarIndex=n.polarIndex)})}var Eee=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=t.coordinateSystem,o=this.group,s=t.getData(),l=this._data;function u(d,h){var v=d.getItemVisual(h,"symbol")||"circle";if(v!=="none"){var y=Vc(d.getItemVisual(h,"symbolSize")),m=Kt(v,-1,-1,2,2),x=d.getItemVisual(h,"symbolRotate")||0;return m.attr({style:{strokeNoScale:!0},z2:100,scaleX:y[0]/2,scaleY:y[1]/2,rotation:x*Math.PI/180||0}),m}}function c(d,h,v,y,m,x){v.removeAll();for(var _=0;_<h.length-1;_++){var T=u(y,m);T&&(T.__dimIdx=_,d[_]?(T.setPosition(d[_]),Ol[x?"initProps":"updateProps"](T,{x:h[_][0],y:h[_][1]},t,m)):T.setPosition(h[_]),v.add(T))}}function f(d){return ue(d,function(h){return[i.cx,i.cy]})}s.diff(l).add(function(d){var h=s.getItemLayout(d);if(h){var v=new zr,y=new Cr,m={shape:{points:h}};v.shape.points=f(h),y.shape.points=f(h),It(v,m,t,d),It(y,m,t,d);var x=new Le,_=new Le;x.add(y),x.add(v),x.add(_),c(y.shape.points,h,_,s,d,!0),s.setItemGraphicEl(d,x)}}).update(function(d,h){var v=l.getItemGraphicEl(h),y=v.childAt(0),m=v.childAt(1),x=v.childAt(2),_={shape:{points:s.getItemLayout(d)}};_.shape.points&&(c(y.shape.points,_.shape.points,x,s,d,!1),ta(m),ta(y),ct(y,_,t),ct(m,_,t),s.setItemGraphicEl(d,v))}).remove(function(d){o.remove(l.getItemGraphicEl(d))}).execute(),s.eachItemGraphicEl(function(d,h){var v=s.getItemModel(h),y=d.childAt(0),m=d.childAt(1),x=d.childAt(2),_=s.getItemVisual(h,"style"),T=_.fill;o.add(d),y.useStyle(De(v.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:T})),or(y,v,"lineStyle"),or(m,v,"areaStyle");var C=v.getModel("areaStyle"),k=C.isEmpty()&&C.parentModel.isEmpty();m.ignore=k,z(["emphasis","select","blur"],function(L){var D=v.getModel([L,"areaStyle"]),P=D.isEmpty()&&D.parentModel.isEmpty();m.ensureState(L).ignore=P&&k;var E=v.getModel([L,"lineStyle"]).getLineStyle();y.ensureState(L).style=E;var O=D.getAreaStyle();m.ensureState(L).style=O;var B=v.getModel([L,"itemStyle"]).getItemStyle();x.eachChild(function(N){N.ensureState(L).style=Ae(B)})}),m.useStyle(De(v.getModel("areaStyle").getAreaStyle(),{fill:T,opacity:.7,decal:_.decal}));var A=v.getModel("emphasis");x.eachChild(function(L){if(L instanceof gr){var D=L.style;L.useStyle(ie({image:D.image,x:D.x,y:D.y,width:D.width,height:D.height},_))}else L.useStyle(_),L.setColor(T),L.style.strokeNoScale=!0;var P=s.getStore().get(s.getDimensionIndex(L.__dimIdx),h);(P==null||isNaN(P))&&(P=""),vr(L,sr(v),{labelFetcher:s.hostModel,labelDataIndex:h,labelDimIndex:L.__dimIdx,defaultText:P,inheritColor:T,defaultOpacity:_.opacity})}),Pt(d,A.get("focus"),A.get("blurScope"),A.get("disabled"))}),this._data=s},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.type="radar",e})(mt),zee=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Yc(ye(this.getData,this),ye(this.getRawData,this))},e.prototype.getInitialData=function(t,n){return Uc(this,{generateCoord:"indicator_",generateCoordCount:1/0})},e.prototype.formatTooltip=function(t,n,a){var i=this.getData(),o=this.coordinateSystem,s=o.getIndicatorAxes(),l=this.getData().getName(t),u=l===""?this.name:l,c=tB(this,t);return rr("section",{header:u,sortBlocks:!0,blocks:ue(s,function(f){var d=i.get(i.mapDimension(f.dim),t);return rr("nameValue",{markerType:"subItem",markerColor:c,name:f.name,value:d,sortParam:d})})})},e.prototype.getTooltipPosition=function(t){if(t!=null){for(var n=this.getData(),a=this.coordinateSystem,i=n.getValues(ue(a.dimensions,function(u){return n.mapDimension(u)}),t),o=0,s=i.length;o<s;o++)if(!isNaN(i[o])){var l=a.getIndicatorAxes();return a.coordToPoint(l[o].dataToCoord(i[o]),o)}}},e.type="series.radar",e.dependencies=["radar"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},e})(St),qf=n4.value;function eg(r,e){return De({show:e},r)}var Oee=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){var t=this.get("boundaryGap"),n=this.get("splitNumber"),a=this.get("scale"),i=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"),d=this.get("triggerEvent"),h=ue(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 y=l;v.color!=null&&(y=De({color:v.color},l));var m=Ye(Ae(v),{boundaryGap:t,splitNumber:n,scale:a,axisLine:i,axisTick:o,axisLabel:s,name:v.text,showName:u,nameLocation:"end",nameGap:f,nameTextStyle:y,triggerEvent:d},!1);if(pe(c)){var x=m.name;m.name=c.replace("{value}",x??"")}else Me(c)&&(m.name=c(m.name,m));var _=new rt(m,null,this.ecModel);return Wt(_,$c.prototype),_.mainType="radar",_.componentIndex=this.componentIndex,_},this);this._indicatorModels=h},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,axisName:{show:!0,color:ee.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:Ye({lineStyle:{color:ee.color.neutral20}},qf.axisLine),axisLabel:eg(qf.axisLabel,!1),axisTick:eg(qf.axisTick,!1),splitLine:eg(qf.splitLine,!0),splitArea:eg(qf.splitArea,!0),indicator:[]},e})(Je),Nee=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=this.group;i.removeAll(),this._buildAxes(t,a),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t,n){var a=t.coordinateSystem,i=a.getIndicatorAxes(),o=ue(i,function(s){var l=s.model.get("showName")?s.name:"",u=new Jr(s.model,n,{axisName:l,position:[a.cx,a.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});z(o,function(s){s.build(),this.group.add(s.group)},this)},e.prototype._buildSplitLineAndArea=function(t){var n=t.coordinateSystem,a=n.getIndicatorAxes();if(!a.length)return;var i=t.get("shape"),o=t.getModel("splitLine"),s=t.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),c=o.get("show"),f=s.get("show"),d=l.get("color"),h=u.get("color"),v=le(d)?d:[d],y=le(h)?h:[h],m=[],x=[];function _(H,$,Z){var G=Z%$.length;return H[G]=H[G]||[],G}if(i==="circle")for(var T=a[0].getTicksCoords(),C=n.cx,k=n.cy,A=0;A<T.length;A++){if(c){var L=_(m,v,A);m[L].push(new fi({shape:{cx:C,cy:k,r:T[A].coord}}))}if(f&&A<T.length-1){var L=_(x,y,A);x[L].push(new Dc({shape:{cx:C,cy:k,r0:T[A].coord,r:T[A+1].coord}}))}}else for(var D,P=ue(a,function(H,$){var Z=H.getTicksCoords();return D=D==null?Z.length-1:Math.min(Z.length-1,D),ue(Z,function(G){return n.coordToPoint(G.coord,$)})}),E=[],A=0;A<=D;A++){for(var O=[],B=0;B<a.length;B++)O.push(P[B][A]);if(O[0]&&O.push(O[0].slice()),c){var L=_(m,v,A);m[L].push(new Cr({shape:{points:O}}))}if(f&&E){var L=_(x,y,A-1);x[L].push(new zr({shape:{points:O.concat(E)}}))}E=O.slice().reverse()}var N=l.getLineStyle(),W=u.getAreaStyle();z(x,function(H,$){this.group.add(Cn(H,{style:De({stroke:"none",fill:y[$%y.length]},W),silent:!0}))},this),z(m,function(H,$){this.group.add(Cn(H,{style:De({fill:"none",stroke:v[$%v.length]},N),silent:!0}))},this)},e.type="radar",e})(Ct),jee=(function(r){Q(e,r);function e(t,n,a){var i=r.call(this,t,n,a)||this;return i.type="value",i.angle=0,i.name="",i}return e})(aa),Bee=(function(){function r(e,t,n){this.dimensions=[],this._model=e,this._indicatorAxes=ue(e.getIndicatorModels(),function(a,i){var o="indicator_"+i,s=new jee(o,new Qi);return s.name=a.get("name"),s.model=a,a.axis=s,this.dimensions.push(o),s},this),this.resize(e,n)}return r.prototype.getIndicatorAxes=function(){return this._indicatorAxes},r.prototype.dataToPoint=function(e,t){var n=this._indicatorAxes[t];return this.coordToPoint(n.dataToCoord(e),t)},r.prototype.coordToPoint=function(e,t){var n=this._indicatorAxes[t],a=n.angle,i=this.cx+e*Math.cos(a),o=this.cy-e*Math.sin(a);return[i,o]},r.prototype.pointToData=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,a=Math.sqrt(t*t+n*n);t/=a,n/=a;for(var i=Math.atan2(-n,t),o=1/0,s,l=-1,u=0;u<this._indicatorAxes.length;u++){var c=this._indicatorAxes[u],f=Math.abs(i-c.angle);f<o&&(s=c,l=u,o=f)}return[l,+(s&&s.coordToData(a))]},r.prototype.resize=function(e,t){var n=lr(e,t).refContainer,a=e.get("center"),i=Math.min(n.width,n.height)/2;this.cx=he(a[0],n.width)+n.x,this.cy=he(a[1],n.height)+n.y,this.startAngle=e.get("startAngle")*Math.PI/180;var o=e.get("radius");(pe(o)||ut(o))&&(o=[0,o]),this.r0=he(o[0],i),this.r=he(o[1],i),z(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)},r.prototype.update=function(e,t){var n=this._indicatorAxes,a=this._model;z(n,function(s){s.scale.setExtent(1/0,-1/0)}),e.eachSeriesByType("radar",function(s,l){if(!(s.get("coordinateSystem")!=="radar"||e.getComponent("radar",s.get("radarIndex"))!==a)){var u=s.getData();z(n,function(c){c.scale.unionExtentFromData(u,u.mapDimension(c.dim))})}},this);var i=a.get("splitNumber"),o=new Qi;o.setExtent(0,i),o.setInterval(1),z(n,function(s,l){p4(s.scale,s.model,o)})},r.prototype.convertToPixel=function(e,t,n){return console.warn("Not implemented."),null},r.prototype.convertFromPixel=function(e,t,n){return console.warn("Not implemented."),null},r.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},r.create=function(e,t){var n=[];return e.eachComponent("radar",function(a){var i=new r(a,e,t);n.push(i),a.coordinateSystem=i}),e.eachSeriesByType("radar",function(a){a.get("coordinateSystem")==="radar"&&(a.coordinateSystem=n[a.get("radarIndex")||0])}),n},r.dimensions=[],r})();function Fee(r){r.registerCoordinateSystem("radar",Bee),r.registerComponentModel(Oee),r.registerComponentView(Nee),r.registerVisual({seriesType:"radar",reset:function(e){var t=e.getData();t.each(function(n){t.setItemVisual(n,"legendIcon","roundRect")}),t.setVisual("legendIcon","roundRect")}})}function Vee(r){Ze(Fee),r.registerChartView(Eee),r.registerSeriesModel(zee),r.registerLayout(Pee),r.registerProcessor(Hc("radar")),r.registerPreprocessor(Ree)}var zC=et();function Gee(r,e,t){zC(r)[e]=t}function Wee(r,e,t){var n=zC(r),a=n[e];a===t&&(n[e]=null)}function GP(r,e){return!!zC(r)[e]}Aa({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},Vt);var $ee={axisPointer:1,tooltip:1,brush:1};function _4(r,e,t){var n=e.getComponentByElement(r.topTarget);if(!n||n===t||$ee.hasOwnProperty(n.mainType))return!1;var a=n.coordinateSystem;if(!a||a.model===t)return!1;var i=Al(n),o=Al(t);return!((i.zlevel-o.zlevel||i.z-o.z)<=0)}var Vl=(function(r){Q(e,r);function e(t){var n=r.call(this)||this;n._zr=t;var a=ye(n._mousedownHandler,n),i=ye(n._mousemoveHandler,n),o=ye(n._mouseupHandler,n),s=ye(n._mousewheelHandler,n),l=ye(n._pinchHandler,n);return n.enable=function(u,c){var f=c.zInfo,d=Al(f.component),h=d.z,v=d.zlevel,y={component:f.component,z:h,zlevel:v,z2:Ce(f.z2,-1/0)},m=ie({},c.triggerInfo);this._opt=De(ie({},c),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:y,triggerInfo:m}),u==null&&(u=!0),(!this._enabled||this._controlType!==u)&&(this._enabled=!0,this.disable(),(u===!0||u==="move"||u==="pan")&&(Jf(t,"mousedown",a,y),Jf(t,"mousemove",i,y),Jf(t,"mouseup",o,y)),(u===!0||u==="scale"||u==="zoom")&&(Jf(t,"mousewheel",s,y),Jf(t,"pinch",l,y)))},n.disable=function(){this._enabled=!1,ed(t,"mousedown",a),ed(t,"mousemove",i),ed(t,"mouseup",o),ed(t,"mousewheel",s),ed(t,"pinch",l)},n}return e.prototype.isDragging=function(){return this._dragging},e.prototype.isPinching=function(){return this._pinching},e.prototype._checkPointer=function(t,n,a){var i=this._opt,o=i.zInfoParsed;if(_4(t,i.api,o.component))return!1;var s=i.triggerInfo,l=s.roamTrigger,u=!1;return l==="global"&&(u=!0),u||(u=s.isInSelf(t,n,a)),u&&s.isInClip&&!s.isInClip(t,n,a)&&(u=!1),u},e.prototype._decideCursorStyle=function(t,n,a,i){var o=t.target;if(!o&&this._checkPointer(t,n,a))return"grab";if(i)return o&&o.cursor||"default"},e.prototype.dispose=function(){this.disable()},e.prototype._mousedownHandler=function(t){if(!(uL(t)||Qf(t))){for(var n=t.target;n;){if(n.draggable)return;n=n.__hostTarget||n.parent}var a=t.offsetX,i=t.offsetY;this._checkPointer(t,a,i)&&(this._x=a,this._y=i,this._dragging=!0)}},e.prototype._mousemoveHandler=function(t){var n=this._zr;if(!(t.gestureEvent==="pinch"||GP(n,"globalPan")||Qf(t))){var a=t.offsetX,i=t.offsetY;if(!this._dragging||!jg("moveOnMouseMove",t,this._opt)){var o=this._decideCursorStyle(t,a,i,!1);o&&n.setCursorStyle(o);return}n.setCursorStyle("grabbing");var s=this._x,l=this._y,u=a-s,c=i-l;this._x=a,this._y=i,this._opt.preventDefaultMouseMove&&Yi(t.event),t.__ecRoamConsumed=!0,WP(this,"pan","moveOnMouseMove",t,{dx:u,dy:c,oldX:s,oldY:l,newX:a,newY:i,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(t){if(!Qf(t)){var n=this._zr;if(!uL(t)){this._dragging=!1;var a=this._decideCursorStyle(t,t.offsetX,t.offsetY,!0);a&&n.setCursorStyle(a)}}},e.prototype._mousewheelHandler=function(t){if(!Qf(t)){var n=jg("zoomOnMouseWheel",t,this._opt),a=jg("moveOnMouseWheel",t,this._opt),i=t.wheelDelta,o=Math.abs(i),s=t.offsetX,l=t.offsetY;if(!(i===0||!n&&!a)){if(n){var u=o>3?1.4:o>1?1.2:1.1,c=i>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",t,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(a){var f=Math.abs(i),d=(i>0?1:-1)*(f>3?.4:f>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:d,originX:s,originY:l,isAvailableBehavior:null})}}}},e.prototype._pinchHandler=function(t){if(!(GP(this._zr,"globalPan")||Qf(t))){var n=t.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,t,{scale:n,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e.prototype._checkTriggerMoveZoom=function(t,n,a,i,o){t._checkPointer(i,o.originX,o.originY)&&(Yi(i.event),i.__ecRoamConsumed=!0,WP(t,n,a,i,o))},e})(ra);function Qf(r){return r.__ecRoamConsumed}var Hee=et();function Fm(r){var e=Hee(r);return e.roam=e.roam||{},e.uniform=e.uniform||{},e}function Jf(r,e,t,n){for(var a=Fm(r),i=a.roam,o=i[e]=i[e]||[],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:t,zInfoParsed:n}),Uee(r,e)}function ed(r,e,t){for(var n=Fm(r),a=n.roam[e]||[],i=0;i<a.length;i++)if(a[i].listener===t){a.splice(i,1),a.length||Yee(r,e);return}}function Uee(r,e){var t=Fm(r);t.uniform[e]||r.on(e,t.uniform[e]=function(n){var a=t.roam[e];if(a)for(var i=0;i<a.length;i++)a[i].listener(n)})}function Yee(r,e){var t=Fm(r),n=t.uniform;n[e]&&(r.off(e,n[e]),n[e]=null)}function WP(r,e,t,n,a){a.isAvailableBehavior=ye(jg,null,t,n),r.trigger(e,a)}function jg(r,e,t){var n=t[r];return!r||n&&(!pe(n)||e.event[n+"Key"])}function OC(r,e,t){var n=r.target;n.x+=e,n.y+=t,n.dirty()}function NC(r,e,t,n){var a=r.target,i=r.zoomLimit,o=r.zoom=r.zoom||1;o*=e,o=jC(o,i);var s=o/r.zoom;r.zoom=o,T4(a,t,n,s),a.dirty()}function w4(r,e,t,n,a,i){var o=new ze(0,0,0,0);n.enable(r.get("roam"),{api:e,zInfo:{component:r},triggerInfo:{roamTrigger:r.get("roamTrigger"),isInSelf:function(u,c,f){return o.copy(t.getBoundingRect()),o.applyTransform(t.getComputedTransform()),o.contain(c,f)},isInClip:function(u,c,f){return!i||i.contain(c,f)}}}),a.zoomLimit=r.get("scaleLimit");var s=r.coordinateSystem;a.zoom=s?s.getZoom():1;var l=r.subType+"Roam";n.off("pan").off("zoom").on("pan",function(u){OC(a,u.dx,u.dy),e.dispatchAction({seriesId:r.id,type:l,dx:u.dx,dy:u.dy})}).on("zoom",function(u){NC(a,u.scale,u.originX,u.originY),e.dispatchAction({seriesId:r.id,type:l,zoom:u.scale,originX:u.originX,originY:u.originY}),e.updateLabelLayout()})}function $P(r,e){return r.pointToProjected?r.pointToProjected(e):r.pointToData(e)}function Vm(r,e,t){var n=r.getZoom(),a=r.getCenter(),i=e.zoom,o=r.projectedToPoint?r.projectedToPoint(a):r.dataToPoint(a);return e.dx!=null&&e.dy!=null&&(o[0]-=e.dx,o[1]-=e.dy,r.setCenter($P(r,o))),i!=null&&(i=jC(n*i,t)/n,T4(r,e.originX,e.originY,i),r.updateTransform(),r.setCenter($P(r,o)),r.setZoom(i*n)),{center:r.getCenter(),zoom:r.getZoom()}}function T4(r,e,t,n){r.x-=(e-r.x)*(n-1),r.y-=(t-r.y)*(n-1),r.scaleX*=n,r.scaleY*=n}function jC(r,e){if(e){var t=e.min||0,n=e.max||1/0;r=Math.max(Math.min(n,r),t)}return r}function C4(r){if(pe(r)){var e=new DOMParser;r=e.parseFromString(r,"text/xml")}var t=r;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}var gS,zy={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"},HP=st(zy),Oy={"alignment-baseline":"textBaseline","stop-color":"stopColor"},UP=st(Oy),Xee=(function(){function r(){this._defs={},this._root=null}return r.prototype.parse=function(e,t){t=t||{};var n=C4(e);this._defsUsePending=[];var a=new Le;this._root=a;var i=[],o=n.getAttribute("viewBox")||"",s=parseFloat(n.getAttribute("width")||t.width),l=parseFloat(n.getAttribute("height")||t.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),bn(n,a,null,!0,!1);for(var u=n.firstChild;u;)this._parseNode(u,a,i,null,!1,!1),u=u.nextSibling;qee(this._defs,this._defsUsePending),this._defsUsePending=[];var c,f;if(o){var d=Gm(o);d.length>=4&&(c={x:parseFloat(d[0]||0),y:parseFloat(d[1]||0),width:parseFloat(d[2]),height:parseFloat(d[3])})}if(c&&s!=null&&l!=null&&(f=k4(c,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var h=a;a=new Le,a.add(h),h.scaleX=h.scaleY=f.scale,h.x=f.x,h.y=f.y}return!t.ignoreRootClip&&s!=null&&l!=null&&a.setClipPath(new Qe({shape:{x:0,y:0,width:s,height:l}})),{root:a,width:s,height:l,viewBoxRect:c,viewBoxTransform:f,named:i}},r.prototype._parseNode=function(e,t,n,a,i,o){var s=e.nodeName.toLowerCase(),l,u=a;if(s==="defs"&&(i=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=t;else{if(!i){var c=gS[s];if(c&&Se(gS,s)){l=c.call(this,e,t);var f=e.getAttribute("name");if(f){var d={name:f,namedFrom:null,svgNodeTagLower:s,el:l};n.push(d),s==="g"&&(u=d)}else a&&n.push({name:a.name,namedFrom:a,svgNodeTagLower:s,el:l});t.add(l)}}var h=YP[s];if(h&&Se(YP,s)){var v=h.call(this,e),y=e.getAttribute("id");y&&(this._defs[y]=v)}}if(l&&l.isGroup)for(var m=e.firstChild;m;)m.nodeType===1?this._parseNode(m,l,n,u,i,o):m.nodeType===3&&o&&this._parseText(m,l),m=m.nextSibling},r.prototype._parseText=function(e,t){var n=new fc({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Fn(t,n),bn(e,n,this._defsUsePending,!1,!1),Zee(n,t);var a=n.style,i=a.fontSize;i&&i<9&&(a.fontSize=9,n.scaleX*=i/9,n.scaleY*=i/9);var o=(a.fontSize||a.fontFamily)&&[a.fontStyle,a.fontWeight,(a.fontSize||12)+"px",a.fontFamily||"sans-serif"].join(" ");a.font=o;var s=n.getBoundingRect();return this._textX+=s.width,t.add(n),n},r.internalField=(function(){gS={g:function(e,t){var n=new Le;return Fn(t,n),bn(e,n,this._defsUsePending,!1,!1),n},rect:function(e,t){var n=new Qe;return Fn(t,n),bn(e,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(e,t){var n=new fi;return Fn(t,n),bn(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),n.silent=!0,n},line:function(e,t){var n=new Zt;return Fn(t,n),bn(e,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(e,t){var n=new Oh;return Fn(t,n),bn(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(e,t){var n=e.getAttribute("points"),a;n&&(a=KP(n));var i=new zr({shape:{points:a||[]},silent:!0});return Fn(t,i),bn(e,i,this._defsUsePending,!1,!1),i},polyline:function(e,t){var n=e.getAttribute("points"),a;n&&(a=KP(n));var i=new Cr({shape:{points:a||[]},silent:!0});return Fn(t,i),bn(e,i,this._defsUsePending,!1,!1),i},image:function(e,t){var n=new gr;return Fn(t,n),bn(e,n,this._defsUsePending,!1,!1),n.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),n.silent=!0,n},text:function(e,t){var n=e.getAttribute("x")||"0",a=e.getAttribute("y")||"0",i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(i),this._textY=parseFloat(a)+parseFloat(o);var s=new Le;return Fn(t,s),bn(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,t){var n=e.getAttribute("x"),a=e.getAttribute("y");n!=null&&(this._textX=parseFloat(n)),a!=null&&(this._textY=parseFloat(a));var i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new Le;return Fn(t,s),bn(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(o),s},path:function(e,t){var n=e.getAttribute("d")||"",a=Wj(n);return Fn(t,a),bn(e,a,this._defsUsePending,!1,!1),a.silent=!0,a}}})(),r})(),YP={lineargradient:function(r){var e=parseInt(r.getAttribute("x1")||"0",10),t=parseInt(r.getAttribute("y1")||"0",10),n=parseInt(r.getAttribute("x2")||"10",10),a=parseInt(r.getAttribute("y2")||"0",10),i=new zl(e,t,n,a);return XP(r,i),ZP(r,i),i},radialgradient:function(r){var e=parseInt(r.getAttribute("cx")||"0",10),t=parseInt(r.getAttribute("cy")||"0",10),n=parseInt(r.getAttribute("r")||"0",10),a=new kT(e,t,n);return XP(r,a),ZP(r,a),a}};function XP(r,e){var t=r.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function ZP(r,e){for(var t=r.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var n=t.getAttribute("offset"),a=void 0;n&&n.indexOf("%")>0?a=parseInt(n,10)/100:n?a=parseFloat(n):a=0;var i={};M4(t,i,i);var o=i.stopColor||t.getAttribute("stop-color")||"#000000",s=i.stopOpacity||t.getAttribute("stop-opacity");if(s){var l=Hr(o),u=l&&l[3];u&&(l[3]*=Bi(s),o=Kn(l,"rgba"))}e.colorStops.push({offset:a,color:o})}t=t.nextSibling}}function Fn(r,e){r&&r.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),De(e.__inheritedStyle,r.__inheritedStyle))}function KP(r){for(var e=Gm(r),t=[],n=0;n<e.length;n+=2){var a=parseFloat(e[n]),i=parseFloat(e[n+1]);t.push([a,i])}return t}function bn(r,e,t,n,a){var i=e,o=i.__inheritedStyle=i.__inheritedStyle||{},s={};r.nodeType===1&&(ete(r,e),M4(r,o,s),n||tte(r,o,s)),i.style=i.style||{},o.fill!=null&&(i.style.fill=qP(i,"fill",o.fill,t)),o.stroke!=null&&(i.style.stroke=qP(i,"stroke",o.stroke,t)),z(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(l){o[l]!=null&&(i.style[l]=parseFloat(o[l]))}),z(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(l){o[l]!=null&&(i.style[l]=o[l])}),a&&(i.__selfStyle=s),o.lineDash&&(i.style.lineDash=ue(Gm(o.lineDash),function(l){return parseFloat(l)})),(o.visibility==="hidden"||o.visibility==="collapse")&&(i.invisible=!0),o.display==="none"&&(i.ignore=!0)}function Zee(r,e){var t=e.__selfStyle;if(t){var n=t.textBaseline,a=n;!n||n==="auto"||n==="baseline"?a="alphabetic":n==="before-edge"||n==="text-before-edge"?a="top":n==="after-edge"||n==="text-after-edge"?a="bottom":(n==="central"||n==="mathematical")&&(a="middle"),r.style.textBaseline=a}var i=e.__inheritedStyle;if(i){var o=i.textAlign,s=o;o&&(o==="middle"&&(s="center"),r.style.textAlign=s)}}var Kee=/^url\(\s*#(.*?)\)/;function qP(r,e,t,n){var a=t&&t.match(Kee);if(a){var i=Mn(a[1]);n.push([r,e,i]);return}return t==="none"&&(t=null),t}function qee(r,e){for(var t=0;t<e.length;t++){var n=e[t];n[0].style[n[1]]=r[n[2]]}}var Qee=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Gm(r){return r.match(Qee)||[]}var Jee=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,yS=Math.PI/180;function ete(r,e){var t=r.getAttribute("transform");if(t){t=t.replace(/,/g," ");var n=[],a=null;t.replace(Jee,function(f,d,h){return n.push(d,h),""});for(var i=n.length-1;i>0;i-=2){var o=n[i],s=n[i-1],l=Gm(o);switch(a=a||hr(),s){case"translate":Ta(a,a,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":pm(a,a,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":to(a,a,-parseFloat(l[0])*yS,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*yS);Sa(a,[1,0,u,1,0,0],a);break;case"skewY":var c=Math.tan(parseFloat(l[0])*yS);Sa(a,[1,c,0,1,0,0],a);break;case"matrix":a[0]=parseFloat(l[0]),a[1]=parseFloat(l[1]),a[2]=parseFloat(l[2]),a[3]=parseFloat(l[3]),a[4]=parseFloat(l[4]),a[5]=parseFloat(l[5]);break}}e.setLocalTransform(a)}}var QP=/([^\s:;]+)\s*:\s*([^:;]+)/g;function M4(r,e,t){var n=r.getAttribute("style");if(n){QP.lastIndex=0;for(var a;(a=QP.exec(n))!=null;){var i=a[1],o=Se(zy,i)?zy[i]:null;o&&(e[o]=a[2]);var s=Se(Oy,i)?Oy[i]:null;s&&(t[s]=a[2])}}}function tte(r,e,t){for(var n=0;n<HP.length;n++){var a=HP[n],i=r.getAttribute(a);i!=null&&(e[zy[a]]=i)}for(var n=0;n<UP.length;n++){var a=UP[n],i=r.getAttribute(a);i!=null&&(t[Oy[a]]=i)}}function k4(r,e){var t=e.width/r.width,n=e.height/r.height,a=Math.min(t,n);return{scale:a,x:-(r.x+r.width/2)*a+(e.x+e.width/2),y:-(r.y+r.height/2)*a+(e.y+e.height/2)}}function rte(r,e){var t=new Xee;return t.parse(r,e)}var nte=we(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),ate=(function(){function r(e,t){this.type="geoSVG",this._usedGraphicMap=we(),this._freedGraphics=[],this._mapName=e,this._parsedXML=C4(t)}return r.prototype.load=function(){var e=this._firstGraphic;if(!e){e=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(e),this._boundingRect=this._firstGraphic.boundingRect.clone();var t=ote(e.named),n=t.regions,a=t.regionsMap;this._regions=n,this._regionsMap=a}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},r.prototype._buildGraphic=function(e){var t,n;try{t=e&&rte(e,{ignoreViewBox:!0,ignoreRootClip:!0})||{},n=t.root,Rr(n!=null)}catch(m){throw new Error(`Invalid svg format
|
|
39
|
+
`+m.message)}var a=new Le;a.add(n),a.isGeoSVGGraphicRoot=!0;var i=t.width,o=t.height,s=t.viewBoxRect,l=this._boundingRect;if(!l){var u=void 0,c=void 0,f=void 0,d=void 0;if(i!=null?(u=0,f=i):s&&(u=s.x,f=s.width),o!=null?(c=0,d=o):s&&(c=s.y,d=s.height),u==null||c==null){var h=n.getBoundingRect();u==null&&(u=h.x,f=h.width),c==null&&(c=h.y,d=h.height)}l=this._boundingRect=new ze(u,c,f,d)}if(s){var v=k4(s,l);n.scaleX=n.scaleY=v.scale,n.x=v.x,n.y=v.y}a.setClipPath(new Qe({shape:l.plain()}));var y=[];return z(t.named,function(m){nte.get(m.svgNodeTagLower)!=null&&(y.push(m),ite(m.el))}),{root:a,boundingRect:l,named:y}},r.prototype.useGraphic=function(e){var t=this._usedGraphicMap,n=t.get(e);return n||(n=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),t.set(e,n),n)},r.prototype.freeGraphic=function(e){var t=this._usedGraphicMap,n=t.get(e);n&&(t.removeKey(e),this._freedGraphics.push(n))},r})();function ite(r){r.silent=!1,r.isGroup&&r.traverse(function(e){e.silent=!1})}function ote(r){var e=[],t=we();return z(r,function(n){if(n.namedFrom==null){var a=new hq(n.name,n.el);e.push(a),t.set(n.name,a)}}),{regions:e,regionsMap:t}}var nw=[126,25],JP="南海诸岛",Js=[[[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 qs=0;qs<Js.length;qs++)for(var Au=0;Au<Js[qs].length;Au++)Js[qs][Au][0]/=10.5,Js[qs][Au][1]/=-10.5/.75,Js[qs][Au][0]+=nw[0],Js[qs][Au][1]+=nw[1];function ste(r,e){if(r==="china"){for(var t=0;t<e.length;t++)if(e[t].name===JP)return;e.push(new u3(JP,ue(Js,function(n){return{type:"polygon",exterior:n}}),nw))}}var lte={南海诸岛:[32,80],广东:[0,-10],香港:[10,5],澳门:[-10,10],天津:[5,5]};function ute(r,e){if(r==="china"){var t=lte[e.name];if(t){var n=e.getCenter();n[0]+=t[0]/10.5,n[1]+=-t[1]/(10.5/.75),e.setCenter(n)}}}var cte=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function fte(r,e){r==="china"&&e.name==="台湾"&&e.geometries.push({type:"polygon",exterior:cte[0]})}var dte="name",hte=(function(){function r(e,t,n){this.type="geoJSON",this._parsedMap=we(),this._mapName=e,this._specialAreas=n,this._geoJSON=vte(t)}return r.prototype.load=function(e,t){t=t||dte;var n=this._parsedMap.get(t);if(!n){var a=this._parseToRegions(t);n=this._parsedMap.set(t,{regions:a,boundingRect:pte(a)})}var i=we(),o=[];return z(n.regions,function(s){var l=s.name;e&&Se(e,l)&&(s=s.cloneShallow(l=e[l])),o.push(s),i.set(l,s)}),{regions:o,boundingRect:n.boundingRect||new ze(0,0,0,0),regionsMap:i}},r.prototype._parseToRegions=function(e){var t=this._mapName,n=this._geoJSON,a;try{a=n?F_(n,e):[]}catch(i){throw new Error(`Invalid geoJson format
|
|
40
|
+
`+i.message)}return ste(t,a),z(a,function(i){var o=i.name;ute(t,i),fte(t,i);var s=this._specialAreas&&this._specialAreas[o];s&&i.transformTo(s.left,s.top,s.width,s.height)},this),a},r.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},r})();function pte(r){for(var e,t=0;t<r.length;t++){var n=r[t].getBoundingRect();e=e||n.clone(),e.union(n)}return e}function vte(r){return pe(r)?typeof JSON<"u"&&JSON.parse?JSON.parse(r):new Function("return ("+r+");")():r}var td=we();const Ji={registerMap:function(r,e,t){if(e.svg){var n=new ate(r,e.svg);td.set(r,n)}else{var a=e.geoJson||e.geoJSON;a&&!e.features?t=e.specialAreas:a=e;var n=new hte(r,a,t);td.set(r,n)}},getGeoResource:function(r){return td.get(r)},getMapForUser:function(r){var e=td.get(r);return e&&e.type==="geoJSON"&&e.getMapForUser()},load:function(r,e,t){var n=td.get(r);if(n)return n.load(e,t)}};var BC=["rect","circle","line","ellipse","polygon","polyline","path"],gte=we(BC),yte=we(BC.concat(["g"])),mte=we(BC.concat(["g"])),A4=et();function tg(r){var e=r.getItemStyle(),t=r.get("areaColor");return t!=null&&(e.fill=t),e}function eR(r){var e=r.style;e&&(e.stroke=e.stroke||e.fill,e.fill=null)}var L4=(function(){function r(e){var t=this.group=new Le,n=this._transformGroup=new Le;t.add(n),this.uid=Oc("ec_map_draw"),this._controller=new Vl(e.getZr()),this._controllerHost={target:n},n.add(this._regionsGroup=new Le),n.add(this._svgGroup=new Le)}return r.prototype.draw=function(e,t,n,a,i){var o=e.mainType==="geo",s=e.getData&&e.getData();o&&t.eachComponent({mainType:"series",subType:"map"},function(T){!s&&T.getHostGeoModel()===e&&(s=T.getData())});var l=e.coordinateSystem,u=this._regionsGroup,c=this._transformGroup,f=l.getTransformInfo(),d=f.raw,h=f.roam,v=!u.childAt(0)||i,y=e.getShallow("clip",!0),m;y?(m=l.getViewRect().clone(),this.group.setClipPath(new Qe({shape:m.clone()}))):this.group.removeClipPath(),v?(c.x=h.x,c.y=h.y,c.scaleX=h.scaleX,c.scaleY=h.scaleY,c.dirty()):ct(c,h,e);var x=s&&s.getVisual("visualMeta")&&s.getVisual("visualMeta").length>0,_={api:n,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:x,isGeo:o,transformInfoRaw:d};l.resourceType==="geoJSON"?this._buildGeoJSON(_):l.resourceType==="geoSVG"&&this._buildSVG(_),this._updateController(e,m,t,n),this._updateMapSelectHandler(e,u,n,a)},r.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=we(),n=we(),a=this._regionsGroup,i=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function c(h,v){return v&&(h=v(h)),h&&[h[0]*i.scaleX+i.x,h[1]*i.scaleY+i.y]}function f(h){for(var v=[],y=!u&&l&&l.project,m=0;m<h.length;++m){var x=c(h[m],y);x&&v.push(x)}return v}function d(h){return{shape:{points:f(h)}}}a.removeAll(),z(e.geo.regions,function(h){var v=h.name,y=t.get(v),m=n.get(v)||{},x=m.dataIdx,_=m.regionModel;if(!y){y=t.set(v,new Le),a.add(y),x=s?s.indexOfName(v):null,_=e.isGeo?o.getRegionModel(v):s?s.getItemModel(x):null;var T=_.get("silent",!0);T!=null&&(y.silent=T),n.set(v,{dataIdx:x,regionModel:_})}var C=[],k=[];z(h.geometries,function(D){if(D.type==="polygon"){var P=[D.exterior].concat(D.interiors||[]);u&&(P=oR(P,u)),z(P,function(O){C.push(new zr(d(O)))})}else{var E=D.points;u&&(E=oR(E,u,!0)),z(E,function(O){k.push(new Cr(d(O)))})}});var A=c(h.getCenter(),l&&l.project);function L(D,P){if(D.length){var E=new jh({culling:!0,segmentIgnoreThreshold:1,shape:{paths:D}});y.add(E),tR(e,E,x,_),rR(e,E,v,_,o,x,A),P&&(eR(E),z(E.states,eR))}}L(C),L(k,!0)}),t.each(function(h,v){var y=n.get(v),m=y.dataIdx,x=y.regionModel;nR(e,h,v,x,o,m),aR(e,h,v,x,o),iR(e,h,v,x,o)},this)},r.prototype._buildSVG=function(e){var t=e.geo.map,n=e.transformInfoRaw;this._svgGroup.x=n.x,this._svgGroup.y=n.y,this._svgGroup.scaleX=n.scaleX,this._svgGroup.scaleY=n.scaleY,this._svgResourceChanged(t)&&(this._freeSVG(),this._useSVG(t));var a=this._svgDispatcherMap=we(),i=!1;z(this._svgGraphicRecord.named,function(o){var s=o.name,l=e.mapOrGeoModel,u=e.data,c=o.svgNodeTagLower,f=o.el,d=u?u.indexOfName(s):null,h=l.getRegionModel(s);gte.get(c)!=null&&f instanceof ea&&tR(e,f,d,h),f instanceof ea&&(f.culling=!0);var v=h.get("silent",!0);if(v!=null&&(f.silent=v),f.z2EmphasisLift=0,!o.namedFrom&&(mte.get(c)!=null&&rR(e,f,s,h,l,d,null),nR(e,f,s,h,l,d),aR(e,f,s,h,l),yte.get(c)!=null)){var y=iR(e,f,s,h,l);y==="self"&&(i=!0);var m=a.get(s)||a.set(s,[]);m.push(f)}},this),this._enableBlurEntireSVG(i,e)},r.prototype._enableBlurEntireSVG=function(e,t){if(e&&t.isGeo){var n=t.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle(),a=n.opacity;this._svgGraphicRecord.root.traverse(function(i){if(!i.isGroup){Ml(i);var o=i.ensureState("blur").style||{};o.opacity==null&&a!=null&&(o.opacity=a),i.ensureState("emphasis")}})}},r.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},r.prototype.findHighDownDispatchers=function(e,t){if(e==null)return[];var n=t.coordinateSystem;if(n.resourceType==="geoJSON"){var a=this._regionsGroupByName;if(a){var i=a.get(e);return i?[i]:[]}}else if(n.resourceType==="geoSVG")return this._svgDispatcherMap&&this._svgDispatcherMap.get(e)||[]},r.prototype._svgResourceChanged=function(e){return this._svgMapName!==e},r.prototype._useSVG=function(e){var t=Ji.getGeoResource(e);if(t&&t.type==="geoSVG"){var n=t.useGraphic(this.uid);this._svgGroup.add(n.root),this._svgGraphicRecord=n,this._svgMapName=e}},r.prototype._freeSVG=function(){var e=this._svgMapName;if(e!=null){var t=Ji.getGeoResource(e);t&&t.type==="geoSVG"&&t.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},r.prototype._updateController=function(e,t,n,a){var i=e.coordinateSystem,o=this._controller,s=this._controllerHost;s.zoomLimit=e.get("scaleLimit"),s.zoom=i.getZoom(),o.enable(e.get("roam")||!1,{api:a,zInfo:{component:e},triggerInfo:{roamTrigger:e.get("roamTrigger"),isInSelf:function(c,f,d){return i.containPoint([f,d])},isInClip:function(c,f,d){return!t||t.contain(f,d)}}});var l=e.mainType;function u(){var c={type:"geoRoam",componentType:l};return c[l+"Id"]=e.id,c}o.off("pan").on("pan",function(c){this._mouseDownFlag=!1,OC(s,c.dx,c.dy),a.dispatchAction(ie(u(),{dx:c.dx,dy:c.dy,animation:{duration:0}}))},this),o.off("zoom").on("zoom",function(c){this._mouseDownFlag=!1,NC(s,c.scale,c.originX,c.originY),a.dispatchAction(ie(u(),{totalZoom:s.zoom,zoom:c.scale,originX:c.originX,originY:c.originY,animation:{duration:0}}))},this)},r.prototype.resetForLabelLayout=function(){this.group.traverse(function(e){var t=e.getTextContent();t&&(t.ignore=A4(t).ignore)})},r.prototype._updateMapSelectHandler=function(e,t,n,a){var i=this;t.off("mousedown"),t.off("click"),e.get("selectedMode")&&(t.on("mousedown",function(){i._mouseDownFlag=!0}),t.on("click",function(o){i._mouseDownFlag&&(i._mouseDownFlag=!1)}))},r})();function tR(r,e,t,n){var a=n.getModel("itemStyle"),i=n.getModel(["emphasis","itemStyle"]),o=n.getModel(["blur","itemStyle"]),s=n.getModel(["select","itemStyle"]),l=tg(a),u=tg(i),c=tg(s),f=tg(o),d=r.data;if(d){var h=d.getItemVisual(t,"style"),v=d.getItemVisual(t,"decal");r.isVisualEncodedByVisualMap&&h.fill&&(l.fill=h.fill),v&&(l.decal=vc(v,r.api))}e.setStyle(l),e.style.strokeNoScale=!0,e.ensureState("emphasis").style=u,e.ensureState("select").style=c,e.ensureState("blur").style=f,Ml(e)}function rR(r,e,t,n,a,i,o){var s=r.data,l=r.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),i)),c=s&&s.getItemLayout(i);if(l||u||c&&c.showLabel){var f=l?t:i,d=void 0;(!s||i>=0)&&(d=a);var h=o?{normal:{align:"center",verticalAlign:"middle"}}:null;vr(e,sr(n),{labelFetcher:d,labelDataIndex:f,defaultText:t},h);var v=e.getTextContent();if(v&&(A4(v).ignore=v.ignore,e.textConfig&&o)){var y=e.getBoundingRect().clone();e.textConfig.layoutRect=y,e.textConfig.position=[(o[0]-y.x)/y.width*100+"%",(o[1]-y.y)/y.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function nR(r,e,t,n,a,i){r.data?r.data.setItemGraphicEl(i,e):je(e).eventData={componentType:"geo",componentIndex:a.componentIndex,geoIndex:a.componentIndex,name:t,region:n&&n.option||{}}}function aR(r,e,t,n,a){r.data||no({el:e,componentModel:a,itemName:t,itemTooltipOption:n.get("tooltip")})}function iR(r,e,t,n,a){e.highDownSilentOnTouch=!!a.get("selectedMode");var i=n.getModel("emphasis"),o=i.get("focus");return Pt(e,o,i.get("blurScope"),i.get("disabled")),r.isGeo&&cU(e,a,t),o}function oR(r,e,t){var n=[],a;function i(){a=[]}function o(){a.length&&(n.push(a),a=[])}var s=e({polygonStart:i,polygonEnd:o,lineStart:i,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&a.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),z(r,function(l){s.lineStart();for(var u=0;u<l.length;u++)s.point(l[u][0],l[u][1]);s.lineEnd()}),!t&&s.polygonEnd(),n}var xte=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a,i){if(!(i&&i.type==="mapToggleSelect"&&i.from===this.uid)){var o=this.group;if(o.removeAll(),!t.getHostGeoModel()){if(this._mapDraw&&i&&i.type==="geoRoam"&&this._mapDraw.resetForLabelLayout(),i&&i.type==="geoRoam"&&i.componentType==="series"&&i.seriesId===t.id){var s=this._mapDraw;s&&o.add(s.group)}else if(t.needsDrawMap){var s=this._mapDraw||new L4(a);o.add(s.group),s.draw(t,n,a,this,i),this._mapDraw=s}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&n.getComponent("legend")&&this._renderSymbols(t,n,a)}}},e.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},e.prototype._renderSymbols=function(t,n,a){var i=t.originalData,o=this.group;i.each(i.mapDimension("value"),function(s,l){if(!isNaN(s)){var u=i.getItemLayout(l);if(!(!u||!u.point)){var c=u.point,f=u.offset,d=new fi({style:{fill:t.getData().getVisual("style").fill},shape:{cx:c[0]+f*9,cy:c[1],r:3},silent:!0,z2:8+(f?0:Ic+1)});if(!f){var h=t.mainSeries.getData(),v=i.getName(l),y=h.indexOfName(v),m=i.getItemModel(l),x=m.getModel("label"),_=h.getItemGraphicEl(y);vr(d,sr(m),{labelFetcher:{getFormattedLabel:function(T,C){return t.getFormattedLabel(y,C)}},defaultText:v}),d.disableLabelAnimation=!0,x.get("position")||d.setTextConfig({position:"bottom"}),_.onHoverStateChange=function(T){uy(d,T)}}o.add(d)}}})},e.type="map",e})(mt),Ste=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.needsDrawMap=!1,t.seriesGroup=[],t.getTooltipPosition=function(n){if(n!=null){var a=this.getData().getName(n),i=this.coordinateSystem,o=i.getRegion(a);return o&&i.dataToPoint(o.getCenter())}},t}return e.prototype.getInitialData=function(t){for(var n=Uc(this,{coordDimensions:["value"],encodeDefaulter:$e(KT,this)}),a=we(),i=[],o=0,s=n.count();o<s;o++){var l=n.getName(o);a.set(l,o)}var u=Ji.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return z(u.regions,function(c){var f=c.name,d=a.get(f),h=c.properties&&c.properties.echartsStyle,v;d==null?(v={name:f},i.push(v)):v=n.getRawDataItem(d),h&&Ye(v,h)}),n.appendData(i),n},e.prototype.getHostGeoModel=function(){if(m5(this).kind!==Ha.boxCoordSys)return this.getReferringComponents("geo",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0]},e.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},e.prototype.getRawValue=function(t){var n=this.getData();return n.get(n.mapDimension("value"),t)},e.prototype.getRegionModel=function(t){var n=this.getData();return n.getItemModel(n.indexOfName(t))},e.prototype.formatTooltip=function(t,n,a){for(var i=this.getData(),o=this.getRawValue(t),s=i.getName(t),l=this.seriesGroup,u=[],c=0;c<l.length;c++){var f=l[c].originalData.indexOfName(s),d=i.mapDimension("value");isNaN(l[c].originalData.get(d,f))||u.push(l[c].name)}return rr("section",{header:u.join(", "),noHeader:!u.length,blocks:[rr("nameValue",{name:s,value:o})]})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.getLegendIcon=function(t){var n=t.icon||"roundRect",a=Kt(n,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill);return a.setStyle(t.itemStyle),a.style.stroke="none",n.indexOf("empty")>-1&&(a.style.stroke=a.style.fill,a.style.fill=ee.color.neutral00,a.style.lineWidth=2),a},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.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:ee.color.tertiary},itemStyle:{borderWidth:.5,borderColor:ee.color.border,areaColor:ee.color.background},emphasis:{label:{show:!0,color:ee.color.primary},itemStyle:{areaColor:ee.color.highlight}},select:{label:{show:!0,color:ee.color.primary},itemStyle:{color:ee.color.highlight}},nameProperty:"name"},e})(St);function bte(r,e){var t={};return z(r,function(n){n.each(n.mapDimension("value"),function(a,i){var o="ec-"+n.getName(i);t[o]=t[o]||[],isNaN(a)||t[o].push(a)})}),r[0].map(r[0].mapDimension("value"),function(n,a){for(var i="ec-"+r[0].getName(a),o=0,s=1/0,l=-1/0,u=t[i].length,c=0;c<u;c++)s=Math.min(s,t[i][c]),l=Math.max(l,t[i][c]),o+=t[i][c];var f;return e==="min"?f=s:e==="max"?f=l:e==="average"?f=o/u:f=o,u===0?NaN:f})}function _te(r){var e={};r.eachSeriesByType("map",function(t){var n=t.getHostGeoModel(),a=n?"o"+n.id:"i"+t.getMapType();(e[a]=e[a]||[]).push(t)}),z(e,function(t,n){for(var a=bte(ue(t,function(o){return o.getData()}),t[0].get("mapValueCalculation")),i=0;i<t.length;i++)t[i].originalData=t[i].getData();for(var i=0;i<t.length;i++)t[i].seriesGroup=t,t[i].needsDrawMap=i===0&&!t[i].getHostGeoModel(),t[i].setData(a.cloneShallow()),t[i].mainSeries=t[0]})}function wte(r){var e={};r.eachSeriesByType("map",function(t){var n=t.getMapType();if(!(t.getHostGeoModel()||e[n])){var a={};z(t.seriesGroup,function(o){var s=o.coordinateSystem,l=o.originalData;o.get("showLegendSymbol")&&r.getComponent("legend")&&l.each(l.mapDimension("value"),function(u,c){var f=l.getName(c),d=s.getRegion(f);if(!(!d||isNaN(u))){var h=a[f]||0,v=s.dataToPoint(d.getCenter());a[f]=h+1,l.setItemLayout(c,{point:v,offset:h})}})});var i=t.getData();i.each(function(o){var s=i.getName(o),l=i.getItemLayout(o)||{};l.showLabel=!a[s],i.setItemLayout(o,l)}),e[n]=!0}})}var sR=Gt,Gl=(function(r){Q(e,r);function e(t,n){var a=r.call(this)||this;return a.type="view",a.dimensions=["x","y"],a._roamTransformable=new Ni,a._rawTransformable=new Ni,a.name=t,a._opt=n,a}return e.prototype.setBoundingRect=function(t,n,a,i){return this._rect=new ze(t,n,a,i),this._updateCenterAndZoom(),this._rect},e.prototype.getBoundingRect=function(){return this._rect},e.prototype.setViewRect=function(t,n,a,i){this._transformTo(t,n,a,i),this._viewRect=new ze(t,n,a,i)},e.prototype._transformTo=function(t,n,a,i){var o=this.getBoundingRect(),s=this._rawTransformable;s.transform=o.calculateTransform(new ze(t,n,a,i));var l=s.parent;s.parent=null,s.decomposeTransform(),s.parent=l,this._updateTransform()},e.prototype.setCenter=function(t){var n=this._opt;n&&n.api&&n.ecModel&&n.ecModel.getShallow("legacyViewCoordSysCenterBase")&&t&&(t=[he(t[0],n.api.getWidth()),he(t[1],n.api.getWidth())]),this._centerOption=Ae(t),this._updateCenterAndZoom()},e.prototype.setZoom=function(t){this._zoom=jC(t||1,this.zoomLimit),this._updateCenterAndZoom()},e.prototype.getDefaultCenter=function(){var t=this.getBoundingRect(),n=t.x+t.width/2,a=t.y+t.height/2;return[n,a]},e.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},e.prototype.getZoom=function(){return this._zoom||1},e.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},e.prototype._updateCenterAndZoom=function(){var t=this._centerOption,n=this._rect;t&&n&&(this._center=[he(t[0],n.width,n.x),he(t[1],n.height,n.y)]);var a=this._rawTransformable.getLocalTransform(),i=this._roamTransformable,o=this.getDefaultCenter(),s=this.getCenter(),l=this.getZoom();s=Gt([],s,a),o=Gt([],o,a),i.originX=s[0],i.originY=s[1],i.x=o[0]-s[0],i.y=o[1]-s[1],i.scaleX=i.scaleY=l,this._updateTransform()},e.prototype._updateTransform=function(){var t=this._roamTransformable,n=this._rawTransformable;n.parent=t,t.updateTransform(),n.updateTransform(),Rh(this.transform||(this.transform=[]),n.transform||hr()),this._rawTransform=n.getLocalTransform(),this.invTransform=this.invTransform||[],Jn(this.invTransform,this.transform),this.decomposeTransform()},e.prototype.getTransformInfo=function(){var t=this._rawTransformable,n=this._roamTransformable,a=new Ni;return a.transform=n.transform,a.decomposeTransform(),{roam:{x:a.x,y:a.y,scaleX:a.scaleX,scaleY:a.scaleY},raw:{x:t.x,y:t.y,scaleX:t.scaleX,scaleY:t.scaleY}}},e.prototype.getViewRect=function(){return this._viewRect},e.prototype.getViewRectAfterRoam=function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},e.prototype.dataToPoint=function(t,n,a){var i=n?this._rawTransform:this.transform;return a=a||[],i?sR(a,t,i):Gr(a,t)},e.prototype.pointToData=function(t,n,a){a=a||[];var i=this.invTransform;return i?sR(a,t,i):(a[0]=t[0],a[1]=t[1],a)},e.prototype.convertToPixel=function(t,n,a){var i=lR(n);return i===this?i.dataToPoint(a):null},e.prototype.convertFromPixel=function(t,n,a){var i=lR(n);return i===this?i.pointToData(a):null},e.prototype.containPoint=function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])},e.dimensions=["x","y"],e})(Ni);function lR(r){var e=r.seriesModel;return e?e.coordinateSystem:null}var Tte={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},I4=["lng","lat"],aw=(function(r){Q(e,r);function e(t,n,a){var i=r.call(this,t,{api:a.api,ecModel:a.ecModel})||this;i.dimensions=I4,i.type="geo",i._nameCoordMap=we(),i.map=n;var o=a.projection,s=Ji.load(n,a.nameMap,a.nameProperty),l=Ji.getGeoResource(n);i.resourceType=l?l.type:null;var u=i.regions=s.regions,c=Tte[l.type];i._regionsMap=s.regionsMap,i.regions=s.regions,i.projection=o;var f;if(o)for(var d=0;d<u.length;d++){var h=u[d].getBoundingRect(o);f=f||h.clone(),f.union(h)}else f=s.boundingRect;return i.setBoundingRect(f.x,f.y,f.width,f.height),i.aspectScale=o?1:Ce(a.aspectScale,c.aspectScale),i._invertLongitute=o?!1:c.invertLongitute,i}return e.prototype._transformTo=function(t,n,a,i){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 ze(t,n,a,i));var u=l.parent;l.parent=null,l.decomposeTransform(),l.parent=u,s&&(l.scaleY=-l.scaleY),this._updateTransform()},e.prototype.getRegion=function(t){return this._regionsMap.get(t)},e.prototype.getRegionByCoord=function(t){for(var n=this.regions,a=0;a<n.length;a++){var i=n[a];if(i.type==="geoJSON"&&i.contain(t))return n[a]}},e.prototype.addGeoCoord=function(t,n){this._nameCoordMap.set(t,n)},e.prototype.getGeoCoord=function(t){var n=this._regionsMap.get(t);return this._nameCoordMap.get(t)||n&&n.getCenter()},e.prototype.dataToPoint=function(t,n,a){if(pe(t)&&(t=this.getGeoCoord(t)),t){var i=this.projection;return i&&(t=i.project(t)),t&&this.projectedToPoint(t,n,a)}},e.prototype.pointToData=function(t,n,a){var i=this.projection;return i&&(t=i.unproject(t)),t&&this.pointToProjected(t,a)},e.prototype.pointToProjected=function(t,n){return r.prototype.pointToData.call(this,t,0,n)},e.prototype.projectedToPoint=function(t,n,a){return r.prototype.dataToPoint.call(this,t,n,a)},e.prototype.convertToPixel=function(t,n,a){var i=uR(n);return i===this?i.dataToPoint(a):null},e.prototype.convertFromPixel=function(t,n,a){var i=uR(n);return i===this?i.pointToData(a):null},e})(Gl);Wt(aw,Gl);function uR(r){var e=r.geoModel,t=r.seriesModel;return e?e.coordinateSystem:t?t.coordinateSystem||(t.getReferringComponents("geo",jt).models[0]||{}).coordinateSystem:null}function cR(r,e){var t=r.get("boundingCoords");if(t!=null){var n=t[0],a=t[1];if(isFinite(n[0])&&isFinite(n[1])&&isFinite(a[0])&&isFinite(a[1])){var i=this.projection;if(i){var o=n[0],s=n[1],l=a[0],u=a[1];n=[1/0,1/0],a=[-1/0,-1/0];var c=function(k,A,L,D){for(var P=L-k,E=D-A,O=0;O<=100;O++){var B=O/100,N=i.project([k+P*B,A+E*B]);zi(n,n,N),Oi(a,a,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],a[0]-n[0],a[1]-n[1])}}var f=this.getBoundingRect(),d=r.get("layoutCenter"),h=r.get("layoutSize"),v=lr(r,e).refContainer,y=f.width/f.height*this.aspectScale,m=!1,x,_;d&&h&&(x=[he(d[0],v.width)+v.x,he(d[1],v.height)+v.y],_=he(h,Math.min(v.width,v.height)),!isNaN(x[0])&&!isNaN(x[1])&&!isNaN(_)&&(m=!0));var T;if(m)T={},y>1?(T.width=_,T.height=_/y):(T.height=_,T.width=_*y),T.y=x[1]-T.height/2,T.x=x[0]-T.width/2;else{var C=r.getBoxLayoutParams();C.aspect=y,T=Dt(C,v),T=w5(r,T,y)}this.setViewRect(T.x,T.y,T.width,T.height),this.setCenter(r.get("center")),this.setZoom(r.get("zoom"))}function Cte(r,e){z(e.get("geoCoord"),function(t,n){r.addGeoCoord(n,t)})}var Mte=(function(){function r(){this.dimensions=I4}return r.prototype.create=function(e,t){var n=[];function a(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new aw(l+s,l,ie({nameMap:o.get("nameMap"),api:t,ecModel:e},a(o)));u.zoomLimit=o.get("scaleLimit"),n.push(u),o.coordinateSystem=u,u.model=o,u.resize=cR,u.resize(o,t)}),e.eachSeries(function(o){Vh({targetModel:o,coordSysType:"geo",coordSysProvider:function(){var s=o.subType==="map"?o.getHostGeoModel():o.getReferringComponents("geo",jt).models[0];return s&&s.coordinateSystem},allowNotFound:!0})});var i={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();i[s]=i[s]||[],i[s].push(o)}}),z(i,function(o,s){var l=ue(o,function(c){return c.get("nameMap")}),u=new aw(s,s,ie({nameMap:fm(l),api:t,ecModel:e},a(o[0])));u.zoomLimit=Tr.apply(null,ue(o,function(c){return c.get("scaleLimit")})),n.push(u),u.resize=cR,u.resize(o[0],t),z(o,function(c){c.coordinateSystem=u,Cte(u,c)})}),n},r.prototype.getFilledRegions=function(e,t,n,a){for(var i=(e||[]).slice(),o=we(),s=0;s<i.length;s++)o.set(i[s].name,i[s]);var l=Ji.load(t,n,a);return z(l.regions,function(u){var c=u.name,f=o.get(c),d=u.properties&&u.properties.echartsStyle;f||(f={name:c},i.push(f)),d&&Ye(f,d)}),i},r})(),D4=new Mte,kte=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a);var i=Ji.getGeoResource(t.map);if(i&&i.type==="geoJSON"){var o=t.itemStyle=t.itemStyle||{};"color"in o||(o.color=t.defaultItemStyleColor||ee.color.backgroundTint)}wl(t,"label",["show"])},e.prototype.optionUpdated=function(){var t=this,n=this.option;n.regions=D4.getFilledRegions(n.regions,n.map,n.nameMap,n.nameProperty);var a={};this._optionModelMap=Qn(n.regions||[],function(i,o){var s=o.name;return s&&(i.set(s,new rt(o,t,t.ecModel)),o.selected&&(a[s]=!0)),i},we()),n.selectedMap||(n.selectedMap=a)},e.prototype.getRegionModel=function(t){return this._optionModelMap.get(t)||new rt(null,this,this.ecModel)},e.prototype.getFormattedLabel=function(t,n){var a=this.getRegionModel(t),i=n==="normal"?a.get(["label","formatter"]):a.get(["emphasis","label","formatter"]),o={name:t};if(Me(i))return o.status=n,i(o);if(pe(i))return i.replace("{a}",t??"")},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.select=function(t){var n=this.option,a=n.selectedMode;if(a){a!=="multiple"&&(n.selectedMap=null);var i=n.selectedMap||(n.selectedMap={});i[t]=!0}},e.prototype.unSelect=function(t){var n=this.option.selectedMap;n&&(n[t]=!1)},e.prototype.toggleSelected=function(t){this[this.isSelected(t)?"unSelect":"select"](t)},e.prototype.isSelected=function(t){var n=this.option.selectedMap;return!!(n&&n[t])},e.type="geo",e.layoutMode="box",e.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:ee.color.tertiary},itemStyle:{borderWidth:.5,borderColor:ee.color.border},emphasis:{label:{show:!0,color:ee.color.primary},itemStyle:{color:ee.color.highlight}},select:{label:{show:!0,color:ee.color.primary},itemStyle:{color:ee.color.highlight}},regions:[]},e})(Je),Ate=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.focusBlurEnabled=!0,t}return e.prototype.init=function(t,n){this._api=n},e.prototype.render=function(t,n,a,i){if(this._model=t,!t.get("show")){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||(this._mapDraw=new L4(a));var o=this._mapDraw;o.draw(t,n,a,this,i),o.group.on("click",this._handleRegionClick,this),o.group.silent=t.get("silent"),this.group.add(o.group),this.updateSelectStatus(t,n,a)},e.prototype._handleRegionClick=function(t){var n;dl(t.target,function(a){return(n=je(a).eventData)!=null},!0),n&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:n.name})},e.prototype.updateSelectStatus=function(t,n,a){var i=this;this._mapDraw.group.traverse(function(o){var s=je(o).eventData;if(s)return i._model.isSelected(s.name)?a.enterSelect(o):a.leaveSelect(o),!0})},e.prototype.findHighDownDispatchers=function(t){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(t,this._model)},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},e.type="geo",e})(Ct);function Lte(r,e,t){Ji.registerMap(r,e,t)}function P4(r){r.registerCoordinateSystem("geo",D4),r.registerComponentModel(kte),r.registerComponentView(Ate),r.registerImpl("registerMap",Lte),r.registerImpl("getMap",function(t){return Ji.getMapForUser(t)});function e(t,n){n.update="geo:updateSelectStatus",r.registerAction(n,function(a,i){var o={},s=[];return i.eachComponent({mainType:"geo",query:a},function(l){l[t](a.name);var u=l.coordinateSystem;z(u.regions,function(f){o[f.name]=l.isSelected(f.name)||!1});var c=[];z(o,function(f,d){o[d]&&c.push(d)}),s.push({geoIndex:l.componentIndex,name:c})}),{selected:o,allSelected:s,name:a.name}})}e("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),e("select",{type:"geoSelect",event:"geoselected"}),e("unSelect",{type:"geoUnSelect",event:"geounselected"}),r.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,n,a){var i=t.componentType;i||(t.geoId!=null?i="geo":t.seriesId!=null&&(i="series")),i||(i="series"),n.eachComponent({mainType:i,query:t},function(o){var s=o.coordinateSystem;if(s.type==="geo"){var l=Vm(s,t,o.get("scaleLimit"));o.setCenter&&o.setCenter(l.center),o.setZoom&&o.setZoom(l.zoom),i==="series"&&z(o.seriesGroup,function(u){u.setCenter(l.center),u.setZoom(l.zoom)})}})})}function Ite(r){Ze(P4),r.registerChartView(xte),r.registerSeriesModel(Ste),r.registerLayout(wte),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,_te),hB("map",r.registerAction)}function Dte(r){var e=r;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var t=[e],n,a;n=t.pop();)if(a=n.children,n.isExpand&&a.length)for(var i=a.length,o=i-1;o>=0;o--){var s=a[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function Pte(r,e){var t=r.isExpand?r.children:[],n=r.parentNode.children,a=r.hierNode.i?n[r.hierNode.i-1]:null;if(t.length){Ete(r);var i=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;a?(r.hierNode.prelim=a.hierNode.prelim+e(r,a),r.hierNode.modifier=r.hierNode.prelim-i):r.hierNode.prelim=i}else a&&(r.hierNode.prelim=a.hierNode.prelim+e(r,a));r.parentNode.hierNode.defaultAncestor=zte(r,a,r.parentNode.hierNode.defaultAncestor||n[0],e)}function Rte(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function fR(r){return arguments.length?r:jte}function Td(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function Ete(r){for(var e=r.children,t=e.length,n=0,a=0;--t>=0;){var i=e[t];i.hierNode.prelim+=n,i.hierNode.modifier+=n,a+=i.hierNode.change,n+=i.hierNode.shift+a}}function zte(r,e,t,n){if(e){for(var a=r,i=r,o=i.parentNode.children[0],s=e,l=a.hierNode.modifier,u=i.hierNode.modifier,c=o.hierNode.modifier,f=s.hierNode.modifier;s=mS(s),i=xS(i),s&&i;){a=mS(a),o=xS(o),a.hierNode.ancestor=r;var d=s.hierNode.prelim+f-i.hierNode.prelim-u+n(s,i);d>0&&(Nte(Ote(s,r,t),r,d),u+=d,l+=d),f+=s.hierNode.modifier,u+=i.hierNode.modifier,l+=a.hierNode.modifier,c+=o.hierNode.modifier}s&&!mS(a)&&(a.hierNode.thread=s,a.hierNode.modifier+=f-l),i&&!xS(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-c,t=r)}return t}function mS(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function xS(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function Ote(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function Nte(r,e,t){var n=t/(e.hierNode.i-r.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,r.hierNode.change+=n}function jte(r,e){return r.parentNode===e.parentNode?1:2}var Bte=(function(){function r(){this.parentPoint=[],this.childPoints=[]}return r})(),Fte=(function(r){Q(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:ee.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new Bte},e.prototype.buildPath=function(t,n){var a=n.childPoints,i=a.length,o=n.parentPoint,s=a[0],l=a[i-1];if(i===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=n.orient,c=u==="TB"||u==="BT"?0:1,f=1-c,d=he(n.forkPosition,1),h=[];h[c]=o[c],h[f]=o[f]+(l[f]-o[f])*d,t.moveTo(o[0],o[1]),t.lineTo(h[0],h[1]),t.moveTo(s[0],s[1]),h[c]=s[c],t.lineTo(h[0],h[1]),h[c]=l[c],t.lineTo(h[0],h[1]),t.lineTo(l[0],l[1]);for(var v=1;v<i-1;v++){var y=a[v];t.moveTo(y[0],y[1]),h[c]=y[c],t.lineTo(h[0],h[1])}},e})(nt),Vte=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._mainGroup=new Le,t}return e.prototype.init=function(t,n){this._controller=new Vl(n.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,n,a){var i=t.getData(),o=t.layoutInfo,s=this._mainGroup,l=t.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(t,a),this._updateController(t,null,n,a);var u=this._data;i.diff(u).add(function(c){dR(i,c)&&hR(i,c,null,s,t)}).update(function(c,f){var d=u.getItemGraphicEl(f);if(!dR(i,c)){d&&vR(u,f,d,s,t);return}hR(i,c,d,s,t)}).remove(function(c){var f=u.getItemGraphicEl(c);f&&vR(u,c,f,s,t)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),t.get("expandAndCollapse")===!0&&i.eachItemGraphicEl(function(c,f){c.off("click").on("click",function(){a.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:f})})}),this._data=i},e.prototype._updateViewCoordSys=function(t,n){var a=t.getData(),i=[];a.each(function(f){var d=a.getItemLayout(f);d&&!isNaN(d.x)&&!isNaN(d.y)&&i.push([+d.x,+d.y])});var o=[],s=[];_m(i,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=t.coordinateSystem=new Gl(null,{api:n,ecModel:t.ecModel});c.zoomLimit=t.get("scaleLimit"),c.setBoundingRect(o[0],o[1],s[0]-o[0],s[1]-o[1]),c.setCenter(t.get("center")),c.setZoom(t.get("zoom")),this.group.attr({x:c.x,y:c.y,scaleX:c.scaleX,scaleY:c.scaleY}),this._min=o,this._max=s},e.prototype._updateController=function(t,n,a,i){var o=this;w4(t,i,this.group,this._controller,this._controllerHost,n),this._controller.on("zoom",function(s){o._updateNodeAndLinkScale(t)})},e.prototype._updateNodeAndLinkScale=function(t){var n=t.getData(),a=this._getNodeGlobalScale(t);n.eachItemGraphicEl(function(i,o){i.setSymbolScale(a)})},e.prototype._getNodeGlobalScale=function(t){var n=t.coordinateSystem;if(n.type!=="view")return 1;var a=this._nodeScaleRatio,i=n.scaleX||1,o=n.getZoom(),s=(o-1)*a+1;return s/i},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},e.type="tree",e})(mt);function dR(r,e){var t=r.getItemLayout(e);return t&&!isNaN(t.x)&&!isNaN(t.y)}function hR(r,e,t,n,a){var i=!t,o=r.tree.getNodeByDataIndex(e),s=o.getModel(),l=o.getVisual("style").fill,u=o.isExpand===!1&&o.children.length!==0?l:ee.color.neutral00,c=r.tree.root,f=o.parentNode===c?o:o.parentNode||o,d=r.getItemGraphicEl(f.dataIndex),h=f.getLayout(),v=d?{x:d.__oldX,y:d.__oldY,rawX:d.__radialOldRawX,rawY:d.__radialOldRawY}:h,y=o.getLayout();i?(t=new $h(r,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.x=v.x,t.y=v.y):t.updateData(r,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.__radialOldRawX=t.__radialRawX,t.__radialOldRawY=t.__radialRawY,t.__radialRawX=y.rawX,t.__radialRawY=y.rawY,n.add(t),r.setItemGraphicEl(e,t),t.__oldX=t.x,t.__oldY=t.y,ct(t,{x:y.x,y:y.y},a);var m=t.getSymbolPath();if(a.get("layout")==="radial"){var x=c.children[0],_=x.getLayout(),T=x.children.length,C=void 0,k=void 0;if(y.x===_.x&&o.isExpand===!0&&x.children.length){var A={x:(x.children[0].getLayout().x+x.children[T-1].getLayout().x)/2,y:(x.children[0].getLayout().y+x.children[T-1].getLayout().y)/2};C=Math.atan2(A.y-_.y,A.x-_.x),C<0&&(C=Math.PI*2+C),k=A.x<_.x,k&&(C=C-Math.PI)}else C=Math.atan2(y.y-_.y,y.x-_.x),C<0&&(C=Math.PI*2+C),o.children.length===0||o.children.length!==0&&o.isExpand===!1?(k=y.x<_.x,k&&(C=C-Math.PI)):(k=y.x>_.x,k||(C=C-Math.PI));var L=k?"left":"right",D=s.getModel("label"),P=D.get("rotate"),E=P*(Math.PI/180),O=m.getTextContent();O&&(m.setTextConfig({position:D.get("position")||L,rotation:P==null?-C:E,origin:"center"}),O.setStyle("verticalAlign","middle"))}var B=s.get(["emphasis","focus"]),N=B==="relative"?sc(o.getAncestorsIndices(),o.getDescendantIndices()):B==="ancestor"?o.getAncestorsIndices():B==="descendant"?o.getDescendantIndices():null;N&&(je(t).focus=N),Gte(a,o,c,t,v,h,y,n),t.__edge&&(t.onHoverStateChange=function(W){if(W!=="blur"){var H=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);H&&H.hoverState===zh||uy(t.__edge,W)}})}function Gte(r,e,t,n,a,i,o,s){var l=e.getModel(),u=r.get("edgeShape"),c=r.get("layout"),f=r.getOrient(),d=r.get(["lineStyle","curveness"]),h=r.get("edgeForkPosition"),v=l.getModel("lineStyle").getLineStyle(),y=n.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(y||(y=n.__edge=new Pc({shape:iw(c,f,d,a,a)})),ct(y,{shape:iw(c,f,d,i,o)},r));else if(u==="polyline"&&c==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var m=e.children,x=[],_=0;_<m.length;_++){var T=m[_].getLayout();x.push([T.x,T.y])}y||(y=n.__edge=new Fte({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:f,forkPosition:h}})),ct(y,{shape:{parentPoint:[o.x,o.y],childPoints:x}},r)}y&&!(u==="polyline"&&!e.isExpand)&&(y.useStyle(De({strokeNoScale:!0,fill:null},v)),or(y,l,"lineStyle"),Ml(y),s.add(y))}function pR(r,e,t,n,a){var i=e.tree.root,o=R4(i,r),s=o.source,l=o.sourceLayout,u=e.getItemGraphicEl(r.dataIndex);if(u){var c=e.getItemGraphicEl(s.dataIndex),f=c.__edge,d=u.__edge||(s.isExpand===!1||s.children.length===1?f:void 0),h=n.get("edgeShape"),v=n.get("layout"),y=n.get("orient"),m=n.get(["lineStyle","curveness"]);d&&(h==="curve"?es(d,{shape:iw(v,y,m,l,l),style:{opacity:0}},n,{cb:function(){t.remove(d)},removeOpt:a}):h==="polyline"&&n.get("layout")==="orthogonal"&&es(d,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},n,{cb:function(){t.remove(d)},removeOpt:a}))}}function R4(r,e){for(var t=e.parentNode===r?e:e.parentNode||e,n;n=t.getLayout(),n==null;)t=t.parentNode===r?t:t.parentNode||t;return{source:t,sourceLayout:n}}function vR(r,e,t,n,a){var i=r.tree.getNodeByDataIndex(e),o=r.tree.root,s=R4(o,i).sourceLayout,l={duration:a.get("animationDurationUpdate"),easing:a.get("animationEasingUpdate")};es(t,{x:s.x+1,y:s.y+1},a,{cb:function(){n.remove(t),r.setItemGraphicEl(e,null)},removeOpt:l}),t.fadeOut(null,r.hostModel,{fadeLabel:!0,animation:l}),i.children.forEach(function(u){pR(u,r,n,a,l)}),pR(i,r,n,a,l)}function iw(r,e,t,n,a){var i,o,s,l,u,c,f,d;if(r==="radial"){u=n.rawX,f=n.rawY,c=a.rawX,d=a.rawY;var h=Td(u,f),v=Td(u,f+(d-f)*t),y=Td(c,d+(f-d)*t),m=Td(c,d);return{x1:h.x||0,y1:h.y||0,x2:m.x||0,y2:m.y||0,cpx1:v.x||0,cpy1:v.y||0,cpx2:y.x||0,cpy2:y.y||0}}else u=n.x,f=n.y,c=a.x,d=a.y,(e==="LR"||e==="RL")&&(i=u+(c-u)*t,o=f,s=c+(u-c)*t,l=d),(e==="TB"||e==="BT")&&(i=u,o=f+(d-f)*t,s=c,l=d+(f-d)*t);return{x1:u,y1:f,x2:c,y2:d,cpx1:i,cpy1:o,cpx2:s,cpy2:l}}var qn=et();function E4(r){var e=r.mainData,t=r.datas;t||(t={main:e},r.datasAttr={main:"data"}),r.datas=r.mainData=null,z4(e,t,r),z(t,function(n){z(e.TRANSFERABLE_METHODS,function(a){n.wrapMethod(a,$e(Wte,r))})}),e.wrapMethod("cloneShallow",$e(Hte,r)),z(e.CHANGABLE_METHODS,function(n){e.wrapMethod(n,$e($te,r))}),Rr(t[e.dataType]===e)}function Wte(r,e){if(Xte(this)){var t=ie({},qn(this).datas);t[this.dataType]=e,z4(e,t,r)}else FC(e,this.dataType,qn(this).mainData,r);return e}function $te(r,e){return r.struct&&r.struct.update(),e}function Hte(r,e){return z(qn(e).datas,function(t,n){t!==e&&FC(t.cloneShallow(),n,e,r)}),e}function Ute(r){var e=qn(this).mainData;return r==null||e==null?e:qn(e).datas[r]}function Yte(){var r=qn(this).mainData;return r==null?[{data:r}]:ue(st(qn(r).datas),function(e){return{type:e,data:qn(r).datas[e]}})}function Xte(r){return qn(r).mainData===r}function z4(r,e,t){qn(r).datas={},z(e,function(n,a){FC(n,a,r,t)})}function FC(r,e,t,n){qn(t).datas[e]=r,qn(r).mainData=t,r.dataType=e,n.struct&&(r[n.structAttr]=n.struct,n.struct[n.datasAttr[e]]=r),r.getLinkedData=Ute,r.getLinkedDataAll=Yte}var Zte=(function(){function r(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||"",this.hostTree=t}return r.prototype.isRemoved=function(){return this.dataIndex<0},r.prototype.eachNode=function(e,t,n){Me(e)&&(n=t,t=e,e=null),e=e||{},pe(e)&&(e={order:e});var a=e.order||"preorder",i=this[e.attr||"children"],o;a==="preorder"&&(o=t.call(n,this));for(var s=0;!o&&s<i.length;s++)i[s].eachNode(e,t,n);a==="postorder"&&t.call(n,this)},r.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var n=0;n<this.children.length;n++){var a=this.children[n];a.updateDepthAndHeight(e+1),a.height>t&&(t=a.height)}this.height=t+1},r.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,a=n.length;t<a;t++){var i=n[t].getNodeById(e);if(i)return i}},r.prototype.contains=function(e){if(e===this)return!0;for(var t=0,n=this.children,a=n.length;t<a;t++){var i=n[t].contains(e);if(i)return i}},r.prototype.getAncestors=function(e){for(var t=[],n=e?this:this.parentNode;n;)t.push(n),n=n.parentNode;return t.reverse(),t},r.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},r.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},r.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||"value"),this.dataIndex)},r.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,n=t.data.getItemModel(this.dataIndex);return n.getModel(e)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},r.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t<e.length;++t)if(e[t]===this)return t;return-1}return-1},r.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},r.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},r})(),VC=(function(){function r(e){this.type="tree",this._nodes=[],this.hostModel=e}return r.prototype.eachNode=function(e,t,n){this.root.eachNode(e,t,n)},r.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},r.prototype.getNodeById=function(e){return this.root.getNodeById(e)},r.prototype.update=function(){for(var e=this.data,t=this._nodes,n=0,a=t.length;n<a;n++)t[n].dataIndex=-1;for(var n=0,a=e.count();n<a;n++)t[e.getRawIndex(n)].dataIndex=n},r.prototype.clearLayouts=function(){this.data.clearItemLayouts()},r.createTree=function(e,t,n){var a=new r(t),i=[],o=1;s(e);function s(c,f){var d=c.value;o=Math.max(o,le(d)?d.length:1),i.push(c);var h=new Zte(ir(c.name,""),a);f?Kte(h,f):a.root=h,a._nodes.push(h);var v=c.children;if(v)for(var y=0;y<v.length;y++)s(v[y],h)}a.root.updateDepthAndHeight(0);var l=Gc(i,{coordDimensions:["value"],dimensionsCount:o}).dimensions,u=new Ur(l,t);return u.initData(i),n&&n(u),E4({mainData:u,struct:a,structAttr:"tree"}),a.update(),a},r})();function Kte(r,e){var t=e.children;r.parentNode!==e&&(t.push(r),r.parentNode=e)}function mh(r,e,t){if(r&&Ue(e,r.type)>=0){var n=t.getData().tree.root,a=r.targetNode;if(pe(a)&&(a=n.getNodeById(a)),a&&n.contains(a))return{node:a};var i=r.targetNodeId;if(i!=null&&(a=n.getNodeById(i)))return{node:a}}}function O4(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function GC(r,e){var t=O4(r);return Ue(t,e)>=0}function Wm(r,e){for(var t=[];r;){var n=r.dataIndex;t.push({name:r.name,dataIndex:n,value:e.getRawValue(n)}),r=r.parentNode}return t.reverse(),t}var qte=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var n={name:t.name,children:t.data},a=t.leaves||{},i=new rt(a,this,this.ecModel),o=VC.createTree(n,this,s);function s(f){f.wrapMethod("getItemModel",function(d,h){var v=o.getNodeByDataIndex(h);return v&&v.children.length&&v.isExpand||(d.parentModel=i),d})}var l=0;o.eachNode("preorder",function(f){f.depth>l&&(l=f.depth)});var u=t.expandAndCollapse,c=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(f){var d=f.hostTree.data.getRawDataItem(f.dataIndex);f.isExpand=d&&d.collapsed!=null?!d.collapsed:f.depth<=c}),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,n,a){for(var i=this.getData().tree,o=i.root.children[0],s=i.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return rr("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=Wm(a,this),n.collapsed=!a.isExpand,n},e.type="series.tree",e.layoutMode="box",e.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:ee.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e})(St);function Qte(r,e,t){for(var n=[r],a=[],i;i=n.pop();)if(a.push(i),i.isExpand){var o=i.children;if(o.length)for(var s=0;s<o.length;s++)n.push(o[s])}for(;i=a.pop();)e(i,t)}function rd(r,e){for(var t=[r],n;n=t.pop();)if(e(n),n.isExpand){var a=n.children;if(a.length)for(var i=a.length-1;i>=0;i--)t.push(a[i])}}function Jte(r,e){r.eachSeriesByType("tree",function(t){ere(t,e)})}function ere(r,e){var t=lr(r,e).refContainer,n=Dt(r.getBoxLayoutParams(),t);r.layoutInfo=n;var a=r.get("layout"),i=0,o=0,s=null;a==="radial"?(i=2*Math.PI,o=Math.min(n.height,n.width)/2,s=fR(function(C,k){return(C.parentNode===k.parentNode?1:2)/C.depth})):(i=n.width,o=n.height,s=fR());var l=r.getData().tree.root,u=l.children[0];if(u){Dte(l),Qte(u,Pte,s),l.hierNode.modifier=-u.hierNode.prelim,rd(u,Rte);var c=u,f=u,d=u;rd(u,function(C){var k=C.getLayout().x;k<c.getLayout().x&&(c=C),k>f.getLayout().x&&(f=C),C.depth>d.depth&&(d=C)});var h=c===f?1:s(c,f)/2,v=h-c.getLayout().x,y=0,m=0,x=0,_=0;if(a==="radial")y=i/(f.getLayout().x+h+v),m=o/(d.depth-1||1),rd(u,function(C){x=(C.getLayout().x+v)*y,_=(C.depth-1)*m;var k=Td(x,_);C.setLayout({x:k.x,y:k.y,rawX:x,rawY:_},!0)});else{var T=r.getOrient();T==="RL"||T==="LR"?(m=o/(f.getLayout().x+h+v),y=i/(d.depth-1||1),rd(u,function(C){_=(C.getLayout().x+v)*m,x=T==="LR"?(C.depth-1)*y:i-(C.depth-1)*y,C.setLayout({x,y:_},!0)})):(T==="TB"||T==="BT")&&(y=i/(f.getLayout().x+h+v),m=o/(d.depth-1||1),rd(u,function(C){x=(C.getLayout().x+v)*y,_=T==="TB"?(C.depth-1)*m:o-(C.depth-1)*m,C.setLayout({x,y:_},!0)}))}}}function tre(r){r.eachSeriesByType("tree",function(e){var t=e.getData(),n=t.tree;n.eachNode(function(a){var i=a.getModel(),o=i.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(a.dataIndex,"style");ie(s,o)})})}function rre(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var a=e.dataIndex,i=n.getData().tree,o=i.getNodeByDataIndex(a);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,n){t.eachComponent({mainType:"series",subType:"tree",query:e},function(a){var i=a.coordinateSystem,o=Vm(i,e,a.get("scaleLimit"));a.setCenter(o.center),a.setZoom(o.zoom)})})}function nre(r){r.registerChartView(Vte),r.registerSeriesModel(qte),r.registerLayout(Jte),r.registerVisual(tre),rre(r)}var gR=["treemapZoomToNode","treemapRender","treemapMove"];function are(r){for(var e=0;e<gR.length;e++)r.registerAction({type:gR[e],update:"updateView"},Vt);r.registerAction({type:"treemapRootToNode",update:"updateView"},function(t,n){n.eachComponent({mainType:"series",subType:"treemap",query:t},a);function a(i,o){var s=["treemapZoomToNode","treemapRootToNode"],l=mh(t,s,i);if(l){var u=i.getViewRoot();u&&(t.direction=GC(u,l.node)?"rollUp":"drillDown"),i.resetViewRoot(l.node)}}})}function N4(r){var e=r.getData(),t=e.tree,n={};t.eachNode(function(a){for(var i=a;i&&i.depth>1;)i=i.parentNode;var o=__(r.ecModel,i.name||i.dataIndex+"",n);a.setVisual("decal",o)})}var ire=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,n){var a={name:t.name,children:t.data};j4(a);var i=t.levels||[],o=this.designatedVisualItemStyle={},s=new rt({itemStyle:o},this,n);i=t.levels=ore(i,n);var l=ue(i||[],function(f){return new rt(f,s,n)},this),u=VC.createTree(a,this,c);function c(f){f.wrapMethod("getItemModel",function(d,h){var v=u.getNodeByDataIndex(h),y=v?l[v.depth]:null;return d.parentModel=y||s,d})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,n,a){var i=this.getData(),o=this.getRawValue(t),s=i.getName(t);return rr("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=Wm(a,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},ie(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var n=this._idIndexMap;n||(n=this._idIndexMap=we(),this._idIndexMapCount=0);var a=n.get(t);return a==null&&n.set(t,a=this._idIndexMapCount++),a},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var n=this.getRawData().tree.root;(!t||t!==n&&!n.contains(t))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){N4(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,coordinateSystemUsage:"box",left:ee.size.l,top:ee.size.xxxl,right:ee.size.l,bottom:ee.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:ee.size.m,emptyItemWidth:25,itemStyle:{color:ee.color.backgroundShade,textStyle:{color:ee.color.secondary}},emphasis:{itemStyle:{color:ee.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:ee.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:ee.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:[]},e})(St);function j4(r){var e=0;z(r.children,function(n){j4(n);var a=n.value;le(a)&&(a=a[0]),e+=a});var t=r.value;le(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),le(r.value)?r.value[0]=t:r.value=t}function ore(r,e){var t=Tt(e.get("color")),n=Tt(e.get(["aria","decal","decals"]));if(t){r=r||[];var a,i;z(r,function(s){var l=new rt(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(a=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(i=!0)});var o=r[0]||(r[0]={});return a||(o.color=t.slice()),!i&&n&&(o.decal=n.slice()),r}}var sre=8,yR=8,SS=5,lre=(function(){function r(e){this.group=new Le,e.add(this.group)}return r.prototype.render=function(e,t,n,a){var i=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!i.get("show")||!n)){var s=i.getModel("itemStyle"),l=i.getModel("emphasis"),u=s.getModel("textStyle"),c=l.getModel(["itemStyle","textStyle"]),f=lr(e,t).refContainer,d={left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},h={emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]},v=Dt(d,f);this._prepare(n,h,u),this._renderContent(e,h,v,s,l,u,c,a),Im(o,d,f)}},r.prototype._prepare=function(e,t,n){for(var a=e;a;a=a.parentNode){var i=ir(a.getModel().get("name"),""),o=n.getTextRect(i),s=Math.max(o.width+sre*2,t.emptyItemWidth);t.totalWidth+=s+yR,t.renderList.push({node:a,text:i,width:s})}},r.prototype._renderContent=function(e,t,n,a,i,o,s,l){for(var u=0,c=t.emptyItemWidth,f=e.get(["breadcrumb","height"]),d=t.totalWidth,h=t.renderList,v=i.getModel("itemStyle").getItemStyle(),y=h.length-1;y>=0;y--){var m=h[y],x=m.node,_=m.width,T=m.text;d>n.width&&(d-=_-c,_=c,T=null);var C=new zr({shape:{points:ure(u,0,_,f,y===h.length-1,y===0)},style:De(a.getItemStyle(),{lineJoin:"bevel"}),textContent:new lt({style:wt(o,{text:T})}),textConfig:{position:"inside"},z2:Ic*1e4,onclick:$e(l,x)});C.disableLabelAnimation=!0,C.getTextContent().ensureState("emphasis").style=wt(s,{text:T}),C.ensureState("emphasis").style=v,Pt(C,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(C),cre(C,e,x),u+=_+yR}},r.prototype.remove=function(){this.group.removeAll()},r})();function ure(r,e,t,n,a,i){var o=[[a?r:r-SS,e],[r+t,e],[r+t,e+n],[a?r:r-SS,e+n]];return!i&&o.splice(2,0,[r+t+SS,e+n/2]),!a&&o.push([r,e+n/2]),o}function cre(r,e,t){je(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&Wm(t,e)}}var fre=(function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(e,t,n,a,i){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:a,easing:i}),!0)},r.prototype.finished=function(e){return this._finishedCallback=e,this},r.prototype.start=function(){for(var e=this,t=this._storage.length,n=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},a=0,i=this._storage.length;a<i;a++){var o=this._storage[a];o.el.animateTo(o.target,{duration:o.duration,delay:o.delay,easing:o.easing,setToFinal:!0,done:n,aborted:n})}return this},r})();function dre(){return new fre}var ow=Le,mR=Qe,xR=3,SR="label",bR="upperLabel",hre=Ic*10,pre=Ic*2,vre=Ic*3,el=Cl([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),_R=function(r){var e=el(r);return e.stroke=e.fill=e.lineWidth=null,e},Ny=et(),gre=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._state="ready",t._storage=nd(),t}return e.prototype.render=function(t,n,a,i){var o=n.findComponents({mainType:"series",subType:"treemap",query:i});if(!(Ue(o,t)<0)){this.seriesModel=t,this.api=a,this.ecModel=n;var s=["treemapZoomToNode","treemapRootToNode"],l=mh(i,s,t),u=i&&i.type,c=t.layoutInfo,f=!this._oldTree,d=this._storage,h=u==="treemapRootToNode"&&l&&d?{rootNodeGroup:d.nodeGroup[l.node.getRawIndex()],direction:i.direction}:null,v=this._giveContainerGroup(c),y=t.get("animation"),m=this._doRender(v,t,h);y&&!f&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(v,m,t,h):m.renderFinally(),this._resetController(a),this._renderBreadcrumb(t,a,l)}},e.prototype._giveContainerGroup=function(t){var n=this._containerGroup;return n||(n=this._containerGroup=new ow,this._initEvents(n),this.group.add(n)),n.x=t.x,n.y=t.y,n},e.prototype._doRender=function(t,n,a){var i=n.getData().tree,o=this._oldTree,s=nd(),l=nd(),u=this._storage,c=[];function f(_,T,C,k){return yre(n,l,u,a,s,c,_,T,C,k)}y(i.root?[i.root]:[],o&&o.root?[o.root]:[],t,i===o||!o,0);var d=m(u);if(this._oldTree=i,this._storage=l,this._controllerHost){var h=this.seriesModel.layoutInfo,v=i.root.getLayout();v.width===h.width&&v.height===h.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:s,willDeleteEls:d,renderFinally:x};function y(_,T,C,k,A){k?(T=_,z(_,function(P,E){!P.isRemoved()&&D(E,E)})):new Ki(T,_,L,L).add(D).update(D).remove($e(D,null)).execute();function L(P){return P.getId()}function D(P,E){var O=P!=null?_[P]:null,B=E!=null?T[E]:null,N=f(O,B,C,A);N&&y(O&&O.viewChildren||[],B&&B.viewChildren||[],N,k,A+1)}}function m(_){var T=nd();return _&&z(_,function(C,k){var A=T[k];z(C,function(L){L&&(A.push(L),Ny(L).willDelete=!0)})}),T}function x(){z(d,function(_){z(_,function(T){T.parent&&T.parent.remove(T)})}),z(c,function(_){_.invisible=!0,_.dirty()})}},e.prototype._doAnimation=function(t,n,a,i){var o=a.get("animationDurationUpdate"),s=a.get("animationEasing"),l=(Me(o)?0:o)||0,u=(Me(s)?null:s)||"cubicOut",c=dre();z(n.willDeleteEls,function(f,d){z(f,function(h,v){if(!h.invisible){var y=h.parent,m,x=Ny(y);if(i&&i.direction==="drillDown")m=y===i.rootNodeGroup?{shape:{x:0,y:0,width:x.nodeWidth,height:x.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var _=0,T=0;x.willDelete||(_=x.nodeWidth/2,T=x.nodeHeight/2),m=d==="nodeGroup"?{x:_,y:T,style:{opacity:0}}:{shape:{x:_,y:T,width:0,height:0},style:{opacity:0}}}m&&c.add(h,m,l,0,u)}})}),z(this._storage,function(f,d){z(f,function(h,v){var y=n.lastsForAnimation[d][v],m={};y&&(h instanceof Le?y.oldX!=null&&(m.x=h.x,m.y=h.y,h.x=y.oldX,h.y=y.oldY):(y.oldShape&&(m.shape=ie({},h.shape),h.setShape(y.oldShape)),y.fadein?(h.setStyle("opacity",0),m.style={opacity:1}):h.style.opacity!==1&&(m.style={opacity:1})),c.add(h,m,l,0,u))})},this),this._state="animating",c.finished(ye(function(){this._state="ready",n.renderFinally()},this)).start()},e.prototype._resetController=function(t){var n=this,a=this._controller,i=this._controllerHost;i||(this._controllerHost={target:this.group},i=this._controllerHost);var o=this.seriesModel;a||(a=this._controller=new Vl(t.getZr()),a.on("pan",ye(this._onPan,this)),a.on("zoom",ye(this._onZoom,this))),a.enable(o.get("roam"),{api:t,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}}}),i.zoomLimit=o.get("scaleLimit"),i.zoom=o.get("zoom")},e.prototype._clearController=function(){var t=this._controller;this._controllerHost=null,t&&(t.dispose(),t=null)},e.prototype._onPan=function(t){if(this._state!=="animating"&&(Math.abs(t.dx)>xR||Math.abs(t.dy)>xR)){var n=this.seriesModel.getData().tree.root;if(!n)return;var a=n.getLayout();if(!a)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:a.x+t.dx,y:a.y+t.dy,width:a.width,height:a.height}})}},e.prototype._onZoom=function(t){var n=t.originX,a=t.originY,i=t.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 ze(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*=i,u){var d=u.min||0,h=u.max||1/0;f=Math.max(Math.min(h,f),d)}var v=f/c.zoom;c.zoom=f;var y=this.seriesModel.layoutInfo;n-=y.x,a-=y.y;var m=hr();Ta(m,m,[-n,-a]),pm(m,m,[v,v]),Ta(m,m,[n,a]),l.applyTransform(m),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}})}},e.prototype._initEvents=function(t){var n=this;t.on("click",function(a){if(n._state==="ready"){var i=n.seriesModel.get("nodeClick",!0);if(i){var o=n.findTarget(a.offsetX,a.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)n._rootToNode(o);else if(i==="zoomToNode")n._zoomToNode(o);else if(i==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),c=l.get("target",!0)||"blank";u&&hy(u,c)}}}}},this)},e.prototype._renderBreadcrumb=function(t,n,a){var i=this;a||(a=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(n.getWidth()/2,n.getHeight()/2),a||(a={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new lre(this.group))).render(t,n,a.node,function(o){i._state!=="animating"&&(GC(t.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=nd(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,n){var a,i=this.seriesModel.getViewRoot();return i.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(t,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)a={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),a},e.type="treemap",e})(mt);function nd(){return{nodeGroup:[],background:[],content:[]}}function yre(r,e,t,n,a,i,o,s,l,u){if(!o)return;var c=o.getLayout(),f=r.getData(),d=o.getModel();if(f.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var h=c.width,v=c.height,y=c.borderWidth,m=c.invisible,x=o.getRawIndex(),_=s&&s.getRawIndex(),T=o.viewChildren,C=c.upperHeight,k=T&&T.length,A=d.getModel("itemStyle"),L=d.getModel(["emphasis","itemStyle"]),D=d.getModel(["blur","itemStyle"]),P=d.getModel(["select","itemStyle"]),E=A.get("borderRadius")||0,O=re("nodeGroup",ow);if(!O)return;if(l.add(O),O.x=c.x||0,O.y=c.y||0,O.markRedraw(),Ny(O).nodeWidth=h,Ny(O).nodeHeight=v,c.isAboveViewRoot)return O;var B=re("background",mR,u,pre);B&&K(O,B,k&&c.upperLabelHeight);var N=d.getModel("emphasis"),W=N.get("focus"),H=N.get("blurScope"),$=N.get("disabled"),Z=W==="ancestor"?o.getAncestorsIndices():W==="descendant"?o.getDescendantIndices():W;if(k)nh(O)&&cl(O,!1),B&&(cl(B,!$),f.setItemGraphicEl(o.dataIndex,B),f_(B,Z,H));else{var G=re("content",mR,u,vre);G&&V(O,G),B.disableMorphing=!0,B&&nh(B)&&cl(B,!1),cl(O,!$),f.setItemGraphicEl(o.dataIndex,O);var X=d.getShallow("cursor");X&&G.attr("cursor",X),f_(O,Z,H)}return O;function K(ve,fe,Te){var xe=je(fe);if(xe.dataIndex=o.dataIndex,xe.seriesIndex=r.seriesIndex,fe.setShape({x:0,y:0,width:h,height:v,r:E}),m)U(fe);else{fe.invisible=!1;var Ie=o.getVisual("style"),dt=Ie.stroke,ke=_R(A);ke.fill=dt;var He=el(L);He.fill=L.get("borderColor");var tt=el(D);tt.fill=D.get("borderColor");var _t=el(P);if(_t.fill=P.get("borderColor"),Te){var Or=h-2*y;ae(fe,dt,Ie.opacity,{x:y,y:0,width:Or,height:C})}else fe.removeTextContent();fe.setStyle(ke),fe.ensureState("emphasis").style=He,fe.ensureState("blur").style=tt,fe.ensureState("select").style=_t,Ml(fe)}ve.add(fe)}function V(ve,fe){var Te=je(fe);Te.dataIndex=o.dataIndex,Te.seriesIndex=r.seriesIndex;var xe=Math.max(h-2*y,0),Ie=Math.max(v-2*y,0);if(fe.culling=!0,fe.setShape({x:y,y,width:xe,height:Ie,r:E}),m)U(fe);else{fe.invisible=!1;var dt=o.getVisual("style"),ke=dt.fill,He=_R(A);He.fill=ke,He.decal=dt.decal;var tt=el(L),_t=el(D),Or=el(P);ae(fe,ke,dt.opacity,null),fe.setStyle(He),fe.ensureState("emphasis").style=tt,fe.ensureState("blur").style=_t,fe.ensureState("select").style=Or,Ml(fe)}ve.add(fe)}function U(ve){!ve.invisible&&i.push(ve)}function ae(ve,fe,Te,xe){var Ie=d.getModel(xe?bR:SR),dt=ir(d.get("name"),null),ke=Ie.getShallow("show");vr(ve,sr(d,xe?bR:SR),{defaultText:ke?dt:null,inheritColor:fe,defaultOpacity:Te,labelFetcher:r,labelDataIndex:o.dataIndex});var He=ve.getTextContent();if(He){var tt=He.style,_t=Ih(tt.padding||0);xe&&(ve.setTextConfig({layoutRect:xe}),He.disableLabelLayout=!0),He.beforeUpdate=function(){var yr=Math.max((xe?xe.width:ve.shape.width)-_t[1]-_t[3],0),vn=Math.max((xe?xe.height:ve.shape.height)-_t[0]-_t[2],0);(tt.width!==yr||tt.height!==vn)&&He.setStyle({width:yr,height:vn})},tt.truncateMinChar=2,tt.lineOverflow="truncate",ce(tt,xe,c);var Or=He.getState("emphasis");ce(Or?Or.style:null,xe,c)}}function ce(ve,fe,Te){var xe=ve?ve.text:null;if(!fe&&Te.isLeafRoot&&xe!=null){var Ie=r.get("drillDownIcon",!0);ve.text=Ie?Ie+" "+xe:xe}}function re(ve,fe,Te,xe){var Ie=_!=null&&t[ve][_],dt=a[ve];return Ie?(t[ve][_]=null,_e(dt,Ie)):m||(Ie=new fe,Ie instanceof ea&&(Ie.z2=mre(Te,xe)),Ne(dt,Ie)),e[ve][x]=Ie}function _e(ve,fe){var Te=ve[x]={};fe instanceof ow?(Te.oldX=fe.x,Te.oldY=fe.y):Te.oldShape=ie({},fe.shape)}function Ne(ve,fe){var Te=ve[x]={},xe=o.parentNode,Ie=fe instanceof Le;if(xe&&(!n||n.direction==="drillDown")){var dt=0,ke=0,He=a.background[xe.getRawIndex()];!n&&He&&He.oldShape&&(dt=He.oldShape.width,ke=He.oldShape.height),Ie?(Te.oldX=0,Te.oldY=ke):Te.oldShape={x:dt,y:ke,width:0,height:0}}Te.fadein=!Ie}}function mre(r,e){return r*hre+e}var xh=z,xre=Pe,jy=-1,pr=(function(){function r(e){var t=e.mappingMethod,n=e.type,a=this.option=Ae(e);this.type=n,this.mappingMethod=t,this._normalizeData=_re[t];var i=r.visualHandlers[n];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[t],t==="piecewise"?(bS(a),Sre(a)):t==="category"?a.categories?bre(a):bS(a,!0):(Rr(t!=="linear"||a.dataExtent),bS(a))}return r.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},r.prototype.getNormalizer=function(){return ye(this._normalizeData,this)},r.listVisualTypes=function(){return st(r.visualHandlers)},r.isValidType=function(e){return r.visualHandlers.hasOwnProperty(e)},r.eachVisual=function(e,t,n){Pe(e)?z(e,t,n):t.call(n,e)},r.mapVisual=function(e,t,n){var a,i=le(e)?[]:Pe(e)?{}:(a=!0,null);return r.eachVisual(e,function(o,s){var l=t.call(n,o,s);a?i=l:i[s]=l}),i},r.retrieveVisuals=function(e){var t={},n;return e&&xh(r.visualHandlers,function(a,i){e.hasOwnProperty(i)&&(t[i]=e[i],n=!0)}),n?t:null},r.prepareVisualTypes=function(e){if(le(e))e=e.slice();else if(xre(e)){var t=[];xh(e,function(n,a){t.push(a)}),e=t}else return[];return e.sort(function(n,a){return a==="color"&&n!=="color"&&n.indexOf("color")===0?1:-1}),e},r.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},r.findPieceIndex=function(e,t,n){for(var a,i=1/0,o=0,s=t.length;o<s;o++){var l=t[o].value;if(l!=null){if(l===e||pe(l)&&l===e+"")return o;n&&d(l,o)}}for(var o=0,s=t.length;o<s;o++){var u=t[o],c=u.interval,f=u.close;if(c){if(c[0]===-1/0){if(ng(f[1],e,c[1]))return o}else if(c[1]===1/0){if(ng(f[0],c[0],e))return o}else if(ng(f[0],c[0],e)&&ng(f[1],e,c[1]))return o;n&&d(c[0],o),n&&d(c[1],o)}}if(n)return e===1/0?t.length-1:e===-1/0?0:a;function d(h,v){var y=Math.abs(h-e);y<i&&(i=y,a=v)}},r.visualHandlers={color:{applyVisual:ad("color"),getColorMapper:function(){var e=this.option;return ye(e.mappingMethod==="category"?function(t,n){return!n&&(t=this._normalizeData(t)),Cd.call(this,t)}:function(t,n,a){var i=!!a;return!n&&(t=this._normalizeData(t)),a=Od(t,e.parsedVisual,a),i?a:Kn(a,"rgba")},this)},_normalizedToVisual:{linear:function(e){return Kn(Od(e,this.option.parsedVisual),"rgba")},category:Cd,piecewise:function(e,t){var n=lw.call(this,t);return n==null&&(n=Kn(Od(e,this.option.parsedVisual),"rgba")),n},fixed:tl}},colorHue:rg(function(e,t){return Fi(e,t)}),colorSaturation:rg(function(e,t){return Fi(e,null,t)}),colorLightness:rg(function(e,t){return Fi(e,null,null,t)}),colorAlpha:rg(function(e,t){return Qd(e,t)}),decal:{applyVisual:ad("decal"),_normalizedToVisual:{linear:null,category:Cd,piecewise:null,fixed:null}},opacity:{applyVisual:ad("opacity"),_normalizedToVisual:sw([0,1])},liftZ:{applyVisual:ad("liftZ"),_normalizedToVisual:{linear:tl,category:tl,piecewise:tl,fixed:tl}},symbol:{applyVisual:function(e,t,n){var a=this.mapValueToVisual(e);n("symbol",a)},_normalizedToVisual:{linear:wR,category:Cd,piecewise:function(e,t){var n=lw.call(this,t);return n==null&&(n=wR.call(this,e)),n},fixed:tl}},symbolSize:{applyVisual:ad("symbolSize"),_normalizedToVisual:sw([0,1])}},r})();function Sre(r){var e=r.pieceList;r.hasSpecialVisual=!1,z(e,function(t,n){t.originIndex=n,t.visual!=null&&(r.hasSpecialVisual=!0)})}function bre(r){var e=r.categories,t=r.categoryMap={},n=r.visual;if(xh(e,function(o,s){t[o]=s}),!le(n)){var a=[];Pe(n)?xh(n,function(o,s){var l=t[s];a[l??jy]=o}):a[jy]=n,n=B4(r,a)}for(var i=e.length-1;i>=0;i--)n[i]==null&&(delete t[e[i]],e.pop())}function bS(r,e){var t=r.visual,n=[];Pe(t)?xh(t,function(i){n.push(i)}):t!=null&&n.push(t);var a={color:1,symbol:1};!e&&n.length===1&&!a.hasOwnProperty(r.type)&&(n[1]=n[0]),B4(r,n)}function rg(r){return{applyVisual:function(e,t,n){var a=this.mapValueToVisual(e);n("color",r(t("color"),a))},_normalizedToVisual:sw([0,1])}}function wR(r){var e=this.option.visual;return e[Math.round(vt(r,[0,1],[0,e.length-1],!0))]||{}}function ad(r){return function(e,t,n){n(r,this.mapValueToVisual(e))}}function Cd(r){var e=this.option.visual;return e[this.option.loop&&r!==jy?r%e.length:r]}function tl(){return this.option.visual[0]}function sw(r){return{linear:function(e){return vt(e,r,this.option.visual,!0)},category:Cd,piecewise:function(e,t){var n=lw.call(this,t);return n==null&&(n=vt(e,r,this.option.visual,!0)),n},fixed:tl}}function lw(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var n=pr.findPieceIndex(r,t),a=t[n];if(a&&a.visual)return a.visual[this.type]}}function B4(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=ue(e,function(t){var n=Hr(t);return n||[0,0,0,1]})),e}var _re={linear:function(r){return vt(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=pr.findPieceIndex(r,e,!0);if(t!=null)return vt(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e??jy},fixed:Vt};function ng(r,e,t){return r?e<=t:e<t}var wre="itemStyle",F4=et();const Tre={seriesType:"treemap",reset:function(r){var e=r.getData().tree,t=e.root;t.isRemoved()||V4(t,{},r.getViewRoot().getAncestors(),r)}};function V4(r,e,t,n){var a=r.getModel(),i=r.getLayout(),o=r.hostTree.data;if(!(!i||i.invisible||!i.isInView)){var s=a.getModel(wre),l=Cre(s,e,n),u=o.ensureUniqueItemVisual(r.dataIndex,"style"),c=s.get("borderColor"),f=s.get("borderColorSaturation"),d;f!=null&&(d=TR(l),c=Mre(f,d)),u.stroke=c;var h=r.viewChildren;if(!h||!h.length)d=TR(l),u.fill=d;else{var v=kre(r,a,i,s,l,h);z(h,function(y,m){if(y.depth>=t.length||y===t[y.depth]){var x=Are(a,l,y,m,v,n);V4(y,x,t,n)}})}}}function Cre(r,e,t){var n=ie({},e),a=t.designatedVisualItemStyle;return z(["color","colorAlpha","colorSaturation"],function(i){a[i]=e[i];var o=r.get(i);a[i]=null,o!=null&&(n[i]=o)}),n}function TR(r){var e=_S(r,"color");if(e){var t=_S(r,"colorAlpha"),n=_S(r,"colorSaturation");return n&&(e=Fi(e,null,null,n)),t&&(e=Qd(e,t)),e}}function Mre(r,e){return e!=null?Fi(e,null,null,r):null}function _S(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function kre(r,e,t,n,a,i){if(!(!i||!i.length)){var o=wS(e,"color")||a.color!=null&&a.color!=="none"&&(wS(e,"colorAlpha")||wS(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&s<u[0]&&(u[0]=s),l!=null&&l>u[1]&&(u[1]=l);var c=e.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 d=new pr(f);return F4(d).drColorMappingBy=c,d}}}function wS(r,e){var t=r.get(e);return le(t)&&t.length?{name:e,range:t}:null}function Are(r,e,t,n,a,i){var o=ie({},e);if(a){var s=a.type,l=s==="color"&&F4(a).drColorMappingBy,u=l==="index"?n:l==="id"?i.mapIdToIndex(t.getId()):t.getValue(r.get("visualDimension"));o[s]=a.mapValueToVisual(u)}return o}var Sh=Math.max,By=Math.min,CR=Tr,WC=z,G4=["itemStyle","borderWidth"],Lre=["itemStyle","gapWidth"],Ire=["upperLabel","show"],Dre=["upperLabel","height"];const Pre={seriesType:"treemap",reset:function(r,e,t,n){var a=r.option,i=lr(r,t).refContainer,o=Dt(r.getBoxLayoutParams(),i),s=a.size||[],l=he(CR(o.width,s[0]),i.width),u=he(CR(o.height,s[1]),i.height),c=n&&n.type,f=["treemapZoomToNode","treemapRootToNode"],d=mh(n,f,r),h=c==="treemapRender"||c==="treemapMove"?n.rootRect:null,v=r.getViewRoot(),y=O4(v);if(c!=="treemapMove"){var m=c==="treemapZoomToNode"?jre(r,d,v,l,u):h?[h.width,h.height]:[l,u],x=a.sort;x&&x!=="asc"&&x!=="desc"&&(x="desc");var _={squareRatio:a.squareRatio,sort:x,leafDepth:a.leafDepth};v.hostTree.clearLayouts();var T={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};v.setLayout(T),W4(v,_,!1,0),T=v.getLayout(),WC(y,function(k,A){var L=(y[A+1]||v).getValue();k.setLayout(ie({dataExtent:[L,L],borderWidth:0,upperHeight:0},T))})}var C=r.getData().tree.root;C.setLayout(Bre(o,h,d),!0),r.setLayoutInfo(o),$4(C,new ze(-o.x,-o.y,t.getWidth(),t.getHeight()),y,v,0)}};function W4(r,e,t,n){var a,i;if(!r.isRemoved()){var o=r.getLayout();a=o.width,i=o.height;var s=r.getModel(),l=s.get(G4),u=s.get(Lre)/2,c=H4(s),f=Math.max(l,c),d=l-u,h=f-u;r.setLayout({borderWidth:l,upperHeight:f,upperLabelHeight:c},!0),a=Sh(a-2*d,0),i=Sh(i-d-h,0);var v=a*i,y=Rre(r,s,v,e,t,n);if(y.length){var m={x:d,y:h,width:a,height:i},x=By(a,i),_=1/0,T=[];T.area=0;for(var C=0,k=y.length;C<k;){var A=y[C];T.push(A),T.area+=A.getLayout().area;var L=Nre(T,x,e.squareRatio);L<=_?(C++,_=L):(T.area-=T.pop().getLayout().area,MR(T,x,m,u,!1),x=By(m.width,m.height),T.length=T.area=0,_=1/0)}if(T.length&&MR(T,x,m,u,!0),!t){var D=s.get("childrenVisibleMin");D!=null&&v<D&&(t=!0)}for(var C=0,k=y.length;C<k;C++)W4(y[C],e,t,n+1)}}}function Rre(r,e,t,n,a,i){var o=r.children||[],s=n.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=n.leafDepth!=null&&n.leafDepth<=i;if(a&&!l)return r.viewChildren=[];o=ht(o,function(h){return!h.isRemoved()}),zre(o,s);var u=Ore(e,o,s);if(u.sum===0)return r.viewChildren=[];if(u.sum=Ere(e,t,u.sum,s,o),u.sum===0)return r.viewChildren=[];for(var c=0,f=o.length;c<f;c++){var d=o[c].getValue()/u.sum*t;o[c].setLayout({area:d})}return l&&(o.length&&r.setLayout({isLeafRoot:!0},!0),o.length=0),r.viewChildren=o,r.setLayout({dataExtent:u.dataExtent},!0),o}function Ere(r,e,t,n,a){if(!n)return t;for(var i=r.get("visibleMin"),o=a.length,s=o,l=o-1;l>=0;l--){var u=a[n==="asc"?o-l-1:l].getValue();u/t*e<i&&(s=l,t-=u)}return n==="asc"?a.splice(0,o-s):a.splice(s,o-s),t}function zre(r,e){return e&&r.sort(function(t,n){var a=e==="asc"?t.getValue()-n.getValue():n.getValue()-t.getValue();return a===0?e==="asc"?t.dataIndex-n.dataIndex:n.dataIndex-t.dataIndex:a}),r}function Ore(r,e,t){for(var n=0,a=0,i=e.length;a<i;a++)n+=e[a].getValue();var o=r.get("visualDimension"),s;return!e||!e.length?s=[NaN,NaN]:o==="value"&&t?(s=[e[e.length-1].getValue(),e[0].getValue()],t==="asc"&&s.reverse()):(s=[1/0,-1/0],WC(e,function(l){var u=l.getValue(o);u<s[0]&&(s[0]=u),u>s[1]&&(s[1]=u)})),{sum:n,dataExtent:s}}function Nre(r,e,t){for(var n=0,a=1/0,i=0,o=void 0,s=r.length;i<s;i++)o=r[i].getLayout().area,o&&(o<a&&(a=o),o>n&&(n=o));var l=r.area*r.area,u=e*e*t;return l?Sh(u*n/l,l/(u*a)):1/0}function MR(r,e,t,n,a){var i=e===t.width?0:1,o=1-i,s=["x","y"],l=["width","height"],u=t[s[i]],c=e?r.area/e:0;(a||c>t[l[o]])&&(c=t[l[o]]);for(var f=0,d=r.length;f<d;f++){var h=r[f],v={},y=c?h.getLayout().area/c:0,m=v[l[o]]=Sh(c-2*n,0),x=t[s[i]]+t[l[i]]-u,_=f===d-1||x<y?x:y,T=v[l[i]]=Sh(_-2*n,0);v[s[o]]=t[s[o]]+By(n,m/2),v[s[i]]=u+By(n,T/2),u+=_,h.setLayout(v,!0)}t[s[o]]+=c,t[l[o]]-=c}function jre(r,e,t,n,a){var i=(e||{}).node,o=[n,a];if(!i||i===t)return o;for(var s,l=n*a,u=l*r.option.zoomToNodeRatio;s=i.parentNode;){for(var c=0,f=s.children,d=0,h=f.length;d<h;d++)c+=f[d].getValue();var v=i.getValue();if(v===0)return o;u*=c/v;var y=s.getModel(),m=y.get(G4),x=Math.max(m,H4(y));u+=4*m*m+(3*m+x)*Math.pow(u,.5),u>e_&&(u=e_),i=s}u<l&&(u=l);var _=Math.pow(u/l,.5);return[n*_,a*_]}function Bre(r,e,t){if(e)return{x:e.x,y:e.y};var n={x:0,y:0};if(!t)return n;var a=t.node,i=a.getLayout();if(!i)return n;for(var o=[i.width/2,i.height/2],s=a;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:r.width/2-o[0],y:r.height/2-o[1]}}function $4(r,e,t,n,a){var i=r.getLayout(),o=t[a],s=o&&o===r;if(!(o&&!s||a===t.length&&r!==n)){r.setLayout({isInView:!0,invisible:!s&&!e.intersect(i),isAboveViewRoot:s},!0);var l=new ze(e.x-i.x,e.y-i.y,e.width,e.height);WC(r.viewChildren||[],function(u){$4(u,l,t,n,a+1)})}}function H4(r){return r.get(Ire)?r.get(Dre):0}function Fre(r){r.registerSeriesModel(ire),r.registerChartView(gre),r.registerVisual(Tre),r.registerLayout(Pre),are(r)}function Vre(r){var e=r.findComponents({mainType:"legend"});!e||!e.length||r.eachSeriesByType("graph",function(t){var n=t.getCategoriesData(),a=t.getGraph(),i=a.data,o=n.mapArray(n.getName);i.filterSelf(function(s){var l=i.getItemModel(s),u=l.getShallow("category");if(u!=null){ut(u)&&(u=o[u]);for(var c=0;c<e.length;c++)if(!e[c].isSelected(u))return!1}return!0})})}function Gre(r){var e={};r.eachSeriesByType("graph",function(t){var n=t.getCategoriesData(),a=t.getData(),i={};n.each(function(o){var s=n.getName(o);i["ec-"+s]=o;var l=n.getItemModel(o),u=l.getModel("itemStyle").getItemStyle();u.fill||(u.fill=t.getColorFromPalette(s,e)),n.setItemVisual(o,"style",u);for(var c=["symbol","symbolSize","symbolKeepAspect"],f=0;f<c.length;f++){var d=l.getShallow(c[f],!0);d!=null&&n.setItemVisual(o,c[f],d)}}),n.count()&&a.each(function(o){var s=a.getItemModel(o),l=s.getShallow("category");if(l!=null){pe(l)&&(l=i["ec-"+l]);var u=n.getItemVisual(l,"style"),c=a.ensureUniqueItemVisual(o,"style");ie(c,u);for(var f=["symbol","symbolSize","symbolKeepAspect"],d=0;d<f.length;d++)a.setItemVisual(o,f[d],n.getItemVisual(l,f[d]))}})})}function ag(r){return r instanceof Array||(r=[r,r]),r}function Wre(r){r.eachSeriesByType("graph",function(e){var t=e.getGraph(),n=e.getEdgeData(),a=ag(e.get("edgeSymbol")),i=ag(e.get("edgeSymbolSize"));n.setVisual("fromSymbol",a&&a[0]),n.setVisual("toSymbol",a&&a[1]),n.setVisual("fromSymbolSize",i&&i[0]),n.setVisual("toSymbolSize",i&&i[1]),n.setVisual("style",e.getModel("lineStyle").getLineStyle()),n.each(function(o){var s=n.getItemModel(o),l=t.getEdgeByIndex(o),u=ag(s.getShallow("symbol",!0)),c=ag(s.getShallow("symbolSize",!0)),f=s.getModel("lineStyle").getLineStyle(),d=n.ensureUniqueItemVisual(o,"style");switch(ie(d,f),d.stroke){case"source":{var h=l.node1.getVisual("style");d.stroke=h&&h.fill;break}case"target":{var h=l.node2.getVisual("style");d.stroke=h&&h.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 uw="-->",$m=function(r){return r.get("autoCurveness")||null},U4=function(r,e){var t=$m(r),n=20,a=[];if(ut(t))n=t;else if(le(t)){r.__curvenessList=t;return}e>n&&(n=e);var i=n%2?n+2:n+3;a=[];for(var o=0;o<i;o++)a.push((o%2?o+1:o)/10*(o%2?-1:1));r.__curvenessList=a},bh=function(r,e,t){var n=[r.id,r.dataIndex].join("."),a=[e.id,e.dataIndex].join(".");return[t.uid,n,a].join(uw)},Y4=function(r){var e=r.split(uw);return[e[0],e[2],e[1]].join(uw)},$re=function(r,e){var t=bh(r.node1,r.node2,e);return e.__edgeMap[t]},Hre=function(r,e){var t=cw(bh(r.node1,r.node2,e),e),n=cw(bh(r.node2,r.node1,e),e);return t+n},cw=function(r,e){var t=e.__edgeMap;return t[r]?t[r].length:0};function Ure(r){$m(r)&&(r.__curvenessList=[],r.__edgeMap={},U4(r))}function Yre(r,e,t,n){if($m(t)){var a=bh(r,e,t),i=t.__edgeMap,o=i[Y4(a)];i[a]&&!o?i[a].isForward=!0:o&&i[a]&&(o.isForward=!0,i[a].isForward=!1),i[a]=i[a]||[],i[a].push(n)}}function $C(r,e,t,n){var a=$m(e),i=le(a);if(!a)return null;var o=$re(r,e);if(!o)return null;for(var s=-1,l=0;l<o.length;l++)if(o[l]===t){s=l;break}var u=Hre(r,e);U4(e,u),r.lineStyle=r.lineStyle||{};var c=bh(r.node1,r.node2,e),f=e.__curvenessList,d=i||u%2?0:1;if(o.isForward)return f[d+s];var h=Y4(c),v=cw(h,e),y=f[s+v+d];return n?i?a&&a[0]===0?(v+d)%2?y:-y:((v%2?0:1)+d)%2?y:-y:(v+d)%2?y:-y:f[s+v+d]}function X4(r){var e=r.coordinateSystem;if(!(e&&e.type!=="view")){var t=r.getGraph();t.eachNode(function(n){var a=n.getModel();n.setLayout([+a.get("x"),+a.get("y")])}),HC(t,r)}}function HC(r,e){r.eachEdge(function(t,n){var a=hn(t.getModel().get(["lineStyle","curveness"]),-$C(t,e,n,!0),0),i=ei(t.node1.getLayout()),o=ei(t.node2.getLayout()),s=[i,o];+a&&s.push([(i[0]+o[0])/2-(i[1]-o[1])*a,(i[1]+o[1])/2-(o[0]-i[0])*a]),t.setLayout(s)})}function Xre(r,e){r.eachSeriesByType("graph",function(t){var n=t.get("layout"),a=t.coordinateSystem;if(a&&a.type!=="view"){var i=t.getData(),o=[];z(a.dimensions,function(d){o=o.concat(i.mapDimensionsAll(d))});for(var s=0;s<i.count();s++){for(var l=[],u=!1,c=0;c<o.length;c++){var f=i.get(o[c],s);isNaN(f)||(u=!0),l.push(f)}u?i.setItemLayout(s,a.dataToPoint(l)):i.setItemLayout(s,[NaN,NaN])}HC(i.graph,t)}else(!n||n==="none")&&X4(t)})}function Md(r){var e=r.coordinateSystem;if(e.type!=="view")return 1;var t=r.option.nodeScaleRatio,n=e.scaleX,a=e.getZoom(),i=(a-1)*t+1;return i/n}function kd(r){var e=r.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var kR=Math.PI,TS=[];function UC(r,e,t,n){var a=r.coordinateSystem;if(!(a&&a.type!=="view")){var i=a.getBoundingRect(),o=r.getData(),s=o.graph,l=i.width/2+i.x,u=i.height/2+i.y,c=Math.min(i.width,i.height)/2,f=o.count();if(o.setLayout({cx:l,cy:u}),!!f){if(t){var d=a.pointToData(n),h=d[0],v=d[1],y=[h-l,v-u];El(y,y),Pd(y,y,c),t.setLayout([l+y[0],u+y[1]],!0);var m=r.get(["circular","rotateLabel"]);Z4(t,m,l,u)}Zre[e](r,s,o,c,l,u,f),s.eachEdge(function(x,_){var T=hn(x.getModel().get(["lineStyle","curveness"]),$C(x,r,_),0),C=ei(x.node1.getLayout()),k=ei(x.node2.getLayout()),A,L=(C[0]+k[0])/2,D=(C[1]+k[1])/2;+T&&(T*=3,A=[l*T+L*(1-T),u*T+D*(1-T)]),x.setLayout([C,k,A])})}}}var Zre={value:function(r,e,t,n,a,i,o){var s=0,l=t.getSum("value"),u=Math.PI*2/(l||o);e.eachNode(function(c){var f=c.getValue("value"),d=u*(l?f:1)/2;s+=d,c.setLayout([n*Math.cos(s)+a,n*Math.sin(s)+i]),s+=d})},symbolSize:function(r,e,t,n,a,i,o){var s=0;TS.length=o;var l=Md(r);e.eachNode(function(f){var d=kd(f);isNaN(d)&&(d=2),d<0&&(d=0),d*=l;var h=Math.asin(d/2/n);isNaN(h)&&(h=kR/2),TS[f.dataIndex]=h,s+=h*2});var u=(2*kR-s)/o/2,c=0;e.eachNode(function(f){var d=u+TS[f.dataIndex];c+=d,(!f.getLayout()||!f.getLayout().fixed)&&f.setLayout([n*Math.cos(c)+a,n*Math.sin(c)+i]),c+=d})}};function Z4(r,e,t,n){var a=r.getGraphicEl();if(a){var i=r.getModel(),o=i.get(["label","rotate"])||0,s=a.getSymbolPath();if(e){var l=r.getLayout(),u=Math.atan2(l[1]-n,l[0]-t);u<0&&(u=Math.PI*2+u);var c=l[0]<t;c&&(u=u-Math.PI);var f=c?"left":"right";s.setTextConfig({rotation:-u,position:f,origin:"center"});var d=s.ensureState("emphasis");ie(d.textConfig||(d.textConfig={}),{position:f})}else s.setTextConfig({rotation:o*=Math.PI/180})}}function Kre(r){r.eachSeriesByType("graph",function(e){e.get("layout")==="circular"&&UC(e,"symbolSize")})}var Lu=Yg;function qre(r,e,t){for(var n=r,a=e,i=t.rect,o=i.width,s=i.height,l=[i.x+o/2,i.y+s/2],u=t.gravity==null?.1:t.gravity,c=0;c<n.length;c++){var f=n[c];f.p||(f.p=ss(o*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),f.pp=ei(f.p),f.edges=null}var d=t.friction==null?.6:t.friction,h=d,v,y;return{warmUp:function(){h=d*.8},setFixed:function(m){n[m].fixed=!0},setUnfixed:function(m){n[m].fixed=!1},beforeStep:function(m){v=m},afterStep:function(m){y=m},step:function(m){v&&v(n,a);for(var x=[],_=n.length,T=0;T<a.length;T++){var C=a[T];if(!C.ignoreForceLayout){var k=C.n1,A=C.n2;No(x,A.p,k.p);var L=Zd(x)-C.d,D=A.w/(k.w+A.w);isNaN(D)&&(D=0),El(x,x),!k.fixed&&Lu(k.p,k.p,x,D*L*h),!A.fixed&&Lu(A.p,A.p,x,-(1-D)*L*h)}}for(var T=0;T<_;T++){var P=n[T];P.fixed||(No(x,l,P.p),Lu(P.p,P.p,x,u*h))}for(var T=0;T<_;T++)for(var k=n[T],E=T+1;E<_;E++){var A=n[E];No(x,A.p,k.p);var L=Zd(x);L===0&&(hm(x,Math.random()-.5,Math.random()-.5),L=1);var O=(k.rep+A.rep)/L/L;!k.fixed&&Lu(k.pp,k.pp,x,O),!A.fixed&&Lu(A.pp,A.pp,x,-O)}for(var B=[],T=0;T<_;T++){var P=n[T];P.fixed||(No(B,P.p,P.pp),Lu(P.p,P.p,B,h),Gr(P.pp,P.p))}h=h*.992;var N=h<.01;y&&y(n,a,N),m&&m(N)}}}function Qre(r){r.eachSeriesByType("graph",function(e){var t=e.coordinateSystem;if(!(t&&t.type!=="view"))if(e.get("layout")==="force"){var n=e.preservedPoints||{},a=e.getGraph(),i=a.data,o=a.edgeData,s=e.getModel("force"),l=s.get("initLayout");e.preservedPoints?i.each(function(T){var C=i.getId(T);i.setItemLayout(T,n[C]||[NaN,NaN])}):!l||l==="none"?X4(e):l==="circular"&&UC(e,"value");var u=i.getDataExtent("value"),c=o.getDataExtent("value"),f=s.get("repulsion"),d=s.get("edgeLength"),h=le(f)?f:[f,f],v=le(d)?d:[d,d];v=[v[1],v[0]];var y=i.mapArray("value",function(T,C){var k=i.getItemLayout(C),A=vt(T,u,h);return isNaN(A)&&(A=(h[0]+h[1])/2),{w:A,rep:A,fixed:i.getItemModel(C).get("fixed"),p:!k||isNaN(k[0])||isNaN(k[1])?null:k}}),m=o.mapArray("value",function(T,C){var k=a.getEdgeByIndex(C),A=vt(T,c,v);isNaN(A)&&(A=(v[0]+v[1])/2);var L=k.getModel(),D=hn(k.getModel().get(["lineStyle","curveness"]),-$C(k,e,C,!0),0);return{n1:y[k.node1.dataIndex],n2:y[k.node2.dataIndex],d:A,curveness:D,ignoreForceLayout:L.get("ignoreForceLayout")}}),x=t.getBoundingRect(),_=qre(y,m,{rect:x,gravity:s.get("gravity"),friction:s.get("friction")});_.beforeStep(function(T,C){for(var k=0,A=T.length;k<A;k++)T[k].fixed&&Gr(T[k].p,a.getNodeByIndex(k).getLayout())}),_.afterStep(function(T,C,k){for(var A=0,L=T.length;A<L;A++)T[A].fixed||a.getNodeByIndex(A).setLayout(T[A].p),n[i.getId(A)]=T[A].p;for(var A=0,L=C.length;A<L;A++){var D=C[A],P=a.getEdgeByIndex(A),E=D.n1.p,O=D.n2.p,B=P.getLayout();B=B?B.slice():[],B[0]=B[0]||[],B[1]=B[1]||[],Gr(B[0],E),Gr(B[1],O),+D.curveness&&(B[2]=[(E[0]+O[0])/2-(E[1]-O[1])*D.curveness,(E[1]+O[1])/2-(O[0]-E[0])*D.curveness]),P.setLayout(B)}}),e.forceLayout=_,e.preservedPoints=n,_.step()}else e.forceLayout=null})}function Jre(r,e,t){var n=lr(r,e),a=ie(r.getBoxLayoutParams(),{aspect:t}),i=Dt(a,n.refContainer);return w5(r,i,t)}function ene(r,e){var t=[];return r.eachSeriesByType("graph",function(n){Vh({targetModel:n,coordSysType:"view",coordSysProvider:a,isDefaultDataCoordSys:!0});function a(){var i=n.getData(),o=i.mapArray(function(v){var y=i.getItemModel(v);return[+y.get("x"),+y.get("y")]}),s=[],l=[];_m(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=Jre(n,e,u);isNaN(u)&&(s=[c.x,c.y],l=[c.x+c.width,c.y+c.height]);var f=l[0]-s[0],d=l[1]-s[1],h=new Gl(null,{api:e,ecModel:r});return h.zoomLimit=n.get("scaleLimit"),h.setBoundingRect(s[0],s[1],f,d),h.setViewRect(c.x,c.y,c.width,c.height),h.setCenter(n.get("center")),h.setZoom(n.get("zoom")),t.push(h),h}}),t}var AR=Zt.prototype,CS=Pc.prototype,K4=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r})();(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e})(K4);function MS(r){return isNaN(+r.cpx1)||isNaN(+r.cpy1)}var q4=(function(r){Q(e,r);function e(t){var n=r.call(this,t)||this;return n.type="ec-line",n}return e.prototype.getDefaultStyle=function(){return{stroke:ee.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new K4},e.prototype.buildPath=function(t,n){MS(n)?AR.buildPath.call(this,t,n):CS.buildPath.call(this,t,n)},e.prototype.pointAt=function(t){return MS(this.shape)?AR.pointAt.call(this,t):CS.pointAt.call(this,t)},e.prototype.tangentAt=function(t){var n=this.shape,a=MS(n)?[n.x2-n.x1,n.y2-n.y1]:CS.tangentAt.call(this,t);return El(a,a)},e})(nt),kS=["fromSymbol","toSymbol"];function LR(r){return"_"+r+"Type"}function IR(r,e,t){var n=e.getItemVisual(t,r);if(!n||n==="none")return n;var a=e.getItemVisual(t,r+"Size"),i=e.getItemVisual(t,r+"Rotate"),o=e.getItemVisual(t,r+"Offset"),s=e.getItemVisual(t,r+"KeepAspect"),l=Vc(a),u=Bl(o||0,l);return n+l+u+(i||"")+(s||"")}function DR(r,e,t){var n=e.getItemVisual(t,r);if(!(!n||n==="none")){var a=e.getItemVisual(t,r+"Size"),i=e.getItemVisual(t,r+"Rotate"),o=e.getItemVisual(t,r+"Offset"),s=e.getItemVisual(t,r+"KeepAspect"),l=Vc(a),u=Bl(o||0,l),c=Kt(n,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return c.__specifiedRotation=i==null||isNaN(i)?void 0:+i*Math.PI/180||0,c.name=r,c}}function tne(r){var e=new q4({name:"line",subPixelOptimize:!0});return fw(e.shape,r),e}function fw(r,e){r.x1=e[0][0],r.y1=e[0][1],r.x2=e[1][0],r.y2=e[1][1],r.percent=1;var t=e[2];t?(r.cpx1=t[0],r.cpy1=t[1]):(r.cpx1=NaN,r.cpy1=NaN)}var YC=(function(r){Q(e,r);function e(t,n,a){var i=r.call(this)||this;return i._createLine(t,n,a),i}return e.prototype._createLine=function(t,n,a){var i=t.hostModel,o=t.getItemLayout(n),s=t.getItemVisual(n,"z2"),l=tne(o);l.shape.percent=0,It(l,{z2:Ce(s,0),shape:{percent:1}},i,n),this.add(l),z(kS,function(u){var c=DR(u,t,n);this.add(c),this[LR(u)]=IR(u,t,n)},this),this._updateCommonStl(t,n,a)},e.prototype.updateData=function(t,n,a){var i=t.hostModel,o=this.childOfName("line"),s=t.getItemLayout(n),l={shape:{}};fw(l.shape,s),ct(o,l,i,n),z(kS,function(u){var c=IR(u,t,n),f=LR(u);if(this[f]!==c){this.remove(this.childOfName(u));var d=DR(u,t,n);this.add(d)}this[f]=c},this),this._updateCommonStl(t,n,a)},e.prototype.getLinePath=function(){return this.childAt(0)},e.prototype._updateCommonStl=function(t,n,a){var i=t.hostModel,o=this.childOfName("line"),s=a&&a.emphasisLineStyle,l=a&&a.blurLineStyle,u=a&&a.selectLineStyle,c=a&&a.labelStatesModels,f=a&&a.emphasisDisabled,d=a&&a.focus,h=a&&a.blurScope;if(!a||t.hasItemOption){var v=t.getItemModel(n),y=v.getModel("emphasis");s=y.getModel("lineStyle").getLineStyle(),l=v.getModel(["blur","lineStyle"]).getLineStyle(),u=v.getModel(["select","lineStyle"]).getLineStyle(),f=y.get("disabled"),d=y.get("focus"),h=y.get("blurScope"),c=sr(v)}var m=t.getItemVisual(n,"style"),x=m.stroke;o.useStyle(m),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=s,o.ensureState("blur").style=l,o.ensureState("select").style=u,z(kS,function(A){var L=this.childOfName(A);if(L){L.setColor(x),L.style.opacity=m.opacity;for(var D=0;D<tn.length;D++){var P=tn[D],E=o.getState(P);if(E){var O=E.style||{},B=L.ensureState(P),N=B.style||(B.style={});O.stroke!=null&&(N[L.__isEmptyBrush?"stroke":"fill"]=O.stroke),O.opacity!=null&&(N.opacity=O.opacity)}}L.markRedraw()}},this);var _=i.getRawValue(n);vr(this,c,{labelDataIndex:n,labelFetcher:{getFormattedLabel:function(A,L){return i.getFormattedLabel(A,L,t.dataType)}},inheritColor:x||ee.color.neutral99,defaultOpacity:m.opacity,defaultText:(_==null?t.getName(n):isFinite(_)?Xt(_):_)+""});var T=this.getTextContent();if(T){var C=c.normal;T.__align=T.style.align,T.__verticalAlign=T.style.verticalAlign,T.__position=C.get("position")||"middle";var k=C.get("distance");le(k)||(k=[k,k]),T.__labelDistance=k}this.setTextConfig({position:null,local:!0,inside:!1}),Pt(this,d,h,f)},e.prototype.highlight=function(){Xi(this)},e.prototype.downplay=function(){Zi(this)},e.prototype.updateLayout=function(t,n){this.setLinePoints(t.getItemLayout(n))},e.prototype.setLinePoints=function(t){var n=this.childOfName("line");fw(n.shape,t),n.dirty()},e.prototype.beforeUpdate=function(){var t=this,n=t.childOfName("fromSymbol"),a=t.childOfName("toSymbol"),i=t.getTextContent();if(!n&&!a&&(!i||i.ignore))return;for(var o=1,s=this.parent;s;)s.scaleX&&(o/=s.scaleX),s=s.parent;var l=t.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,c=l.pointAt(0),f=l.pointAt(u),d=No([],f,c);El(d,d);function h(E,O){var B=E.__specifiedRotation;if(B==null){var N=l.tangentAt(O);E.attr("rotation",(O===1?-1:1)*Math.PI/2-Math.atan2(N[1],N[0]))}else E.attr("rotation",B)}if(n&&(n.setPosition(c),h(n,0),n.scaleX=n.scaleY=o*u,n.markRedraw()),a&&(a.setPosition(f),h(a,1),a.scaleX=a.scaleY=o*u,a.markRedraw()),i&&!i.ignore){i.x=i.y=0,i.originX=i.originY=0;var v=void 0,y=void 0,m=i.__labelDistance,x=m[0]*o,_=m[1]*o,T=u/2,C=l.tangentAt(T),k=[C[1],-C[0]],A=l.pointAt(T);k[1]>0&&(k[0]=-k[0],k[1]=-k[1]);var L=C[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var D=-Math.atan2(C[1],C[0]);f[0]<c[0]&&(D=Math.PI+D),i.rotation=D}var P=void 0;switch(i.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":P=-_,y="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":P=_,y="top";break;default:P=0,y="middle"}switch(i.__position){case"end":i.x=d[0]*x+f[0],i.y=d[1]*_+f[1],v=d[0]>.8?"left":d[0]<-.8?"right":"center",y=d[1]>.8?"top":d[1]<-.8?"bottom":"middle";break;case"start":i.x=-d[0]*x+c[0],i.y=-d[1]*_+c[1],v=d[0]>.8?"right":d[0]<-.8?"left":"center",y=d[1]>.8?"bottom":d[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=x*L+c[0],i.y=c[1]+P,v=C[0]<0?"right":"left",i.originX=-x*L,i.originY=-P;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=A[0],i.y=A[1]+P,v="center",i.originY=-P;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-x*L+f[0],i.y=f[1]+P,v=C[0]>=0?"right":"left",i.originX=x*L,i.originY=-P;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||y,align:i.__align||v})}},e})(Le),XC=(function(){function r(e){this.group=new Le,this._LineCtor=e||YC}return r.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,a=n.group,i=n._lineData;n._lineData=e,i||a.removeAll();var o=PR(e);e.diff(i).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(i,e,l,s,o)}).remove(function(s){a.remove(i.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=PR(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function n(s){!s.isGroup&&!rne(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a<e.end;a++){var i=t.getItemLayout(a);if(AS(i)){var o=new this._LineCtor(t,a,this._seriesScope);o.traverse(n),this.group.add(o),t.setItemGraphicEl(a,o),this._progressiveEls.push(o)}}},r.prototype.remove=function(){this.group.removeAll()},r.prototype.eachRendered=function(e){ls(this._progressiveEls||this.group,e)},r.prototype._doAdd=function(e,t,n){var a=e.getItemLayout(t);if(AS(a)){var i=new this._LineCtor(e,t,n);e.setItemGraphicEl(t,i),this.group.add(i)}},r.prototype._doUpdate=function(e,t,n,a,i){var o=e.getItemGraphicEl(n);if(!AS(t.getItemLayout(a))){this.group.remove(o);return}o?o.updateData(t,a,i):o=new this._LineCtor(t,a,i),t.setItemGraphicEl(a,o),this.group.add(o)},r})();function rne(r){return r.animators&&r.animators.length>0}function PR(r){var e=r.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:sr(e)}}function RR(r){return isNaN(r[0])||isNaN(r[1])}function AS(r){return r&&!RR(r[0])&&!RR(r[1])}var LS=[],IS=[],DS=[],Iu=wr,PS=$o,ER=Math.abs;function zR(r,e,t){for(var n=r[0],a=r[1],i=r[2],o=1/0,s,l=t*t,u=.1,c=.1;c<=.9;c+=.1){LS[0]=Iu(n[0],a[0],i[0],c),LS[1]=Iu(n[1],a[1],i[1],c);var f=ER(PS(LS,e)-l);f<o&&(o=f,s=c)}for(var d=0;d<32;d++){var h=s+u;IS[0]=Iu(n[0],a[0],i[0],s),IS[1]=Iu(n[1],a[1],i[1],s),DS[0]=Iu(n[0],a[0],i[0],h),DS[1]=Iu(n[1],a[1],i[1],h);var f=PS(IS,e)-l;if(ER(f)<.01)break;var v=PS(DS,e)-l;u/=2,f<0?v>=0?s=s+u:s=s-u:v>=0?s=s-u:s=s+u}return s}function RS(r,e){var t=[],n=Kd,a=[[],[],[]],i=[[],[]],o=[];e/=2,r.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),f=s.getVisual("toSymbol");u.__original||(u.__original=[ei(u[0]),ei(u[1])],u[2]&&u.__original.push(ei(u[2])));var d=u.__original;if(u[2]!=null){if(Gr(a[0],d[0]),Gr(a[1],d[2]),Gr(a[2],d[1]),c&&c!=="none"){var h=kd(s.node1),v=zR(a,d[0],h*e);n(a[0][0],a[1][0],a[2][0],v,t),a[0][0]=t[3],a[1][0]=t[4],n(a[0][1],a[1][1],a[2][1],v,t),a[0][1]=t[3],a[1][1]=t[4]}if(f&&f!=="none"){var h=kd(s.node2),v=zR(a,d[1],h*e);n(a[0][0],a[1][0],a[2][0],v,t),a[1][0]=t[1],a[2][0]=t[2],n(a[0][1],a[1][1],a[2][1],v,t),a[1][1]=t[1],a[2][1]=t[2]}Gr(u[0],a[0]),Gr(u[1],a[2]),Gr(u[2],a[1])}else{if(Gr(i[0],d[0]),Gr(i[1],d[1]),No(o,i[1],i[0]),El(o,o),c&&c!=="none"){var h=kd(s.node1);Yg(i[0],i[0],o,h*e)}if(f&&f!=="none"){var h=kd(s.node2);Yg(i[1],i[1],o,-h*e)}Gr(u[0],i[0]),Gr(u[1],i[1])}})}var Q4=et();function nne(r){if(r)return Q4(r).bridge}function OR(r,e){r&&(Q4(r).bridge=e)}function NR(r){return r.type==="view"}var ane=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){var a=new Hh,i=new XC,o=this.group,s=new Le;this._controller=new Vl(n.getZr()),this._controllerHost={target:s},s.add(a.group),s.add(i.group),o.add(s),this._symbolDraw=a,this._lineDraw=i,this._mainGroup=s,this._firstRender=!0},e.prototype.render=function(t,n,a){var i=this,o=t.coordinateSystem,s=!1;this._model=t,this._api=a,this._active=!0;var l=this._getThumbnailInfo();l&&l.bridge.reset(a);var u=this._symbolDraw,c=this._lineDraw;if(NR(o)){var f={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?this._mainGroup.attr(f):ct(this._mainGroup,f,t)}RS(t.getGraph(),Md(t));var d=t.getData();u.updateData(d);var h=t.getEdgeData();c.updateData(h),this._updateNodeAndLinkScale(),this._updateController(null,t,a),clearTimeout(this._layoutTimeout);var v=t.forceLayout,y=t.get(["force","layoutAnimation"]);v&&(s=!0,this._startForceLayoutIteration(v,a,y));var m=t.get("layout");d.graph.eachNode(function(C){var k=C.dataIndex,A=C.getGraphicEl(),L=C.getModel();if(A){A.off("drag").off("dragend");var D=L.get("draggable");D&&A.on("drag",function(E){switch(m){case"force":v.warmUp(),!i._layouting&&i._startForceLayoutIteration(v,a,y),v.setFixed(k),d.setItemLayout(k,[A.x,A.y]);break;case"circular":d.setItemLayout(k,[A.x,A.y]),C.setLayout({fixed:!0},!0),UC(t,"symbolSize",C,[E.offsetX,E.offsetY]),i.updateLayout(t);break;case"none":default:d.setItemLayout(k,[A.x,A.y]),HC(t.getGraph(),t),i.updateLayout(t);break}}).on("dragend",function(){v&&v.setUnfixed(k)}),A.setDraggable(D,!!L.get("cursor"));var P=L.get(["emphasis","focus"]);P==="adjacency"&&(je(A).focus=C.getAdjacentDataIndices())}}),d.graph.eachEdge(function(C){var k=C.getGraphicEl(),A=C.getModel().get(["emphasis","focus"]);k&&A==="adjacency"&&(je(k).focus={edge:[C.dataIndex],node:[C.node1.dataIndex,C.node2.dataIndex]})});var x=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),_=d.getLayout("cx"),T=d.getLayout("cy");d.graph.eachNode(function(C){Z4(C,x,_,T)}),this._firstRender=!1,s||this._renderThumbnail(t,a,this._symbolDraw,this._lineDraw)},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,n,a){var i=this,o=!1;(function s(){t.step(function(l){i.updateLayout(i._model),(l||!o)&&(o=!0,i._renderThumbnail(i._model,n,i._symbolDraw,i._lineDraw)),(i._layouting=!l)&&(a?i._layoutTimeout=setTimeout(s,16):s())})})()},e.prototype._updateController=function(t,n,a){var i=this._controller,o=this._controllerHost,s=n.coordinateSystem;if(!NR(s)){i.disable();return}i.enable(n.get("roam"),{api:a,zInfo:{component:n},triggerInfo:{roamTrigger:n.get("roamTrigger"),isInSelf:function(l,u,c){return s.containPoint([u,c])},isInClip:function(l,u,c){return!t||t.contain(u,c)}}}),o.zoomLimit=n.get("scaleLimit"),o.zoom=s.getZoom(),i.off("pan").off("zoom").on("pan",function(l){a.dispatchAction({seriesId:n.id,type:"graphRoam",dx:l.dx,dy:l.dy})}).on("zoom",function(l){a.dispatchAction({seriesId:n.id,type:"graphRoam",zoom:l.scale,originX:l.originX,originY:l.originY})})},e.prototype.updateViewOnPan=function(t,n,a){this._active&&(OC(this._controllerHost,a.dx,a.dy),this._updateThumbnailWindow())},e.prototype.updateViewOnZoom=function(t,n,a){this._active&&(NC(this._controllerHost,a.zoom,a.originX,a.originY),this._updateNodeAndLinkScale(),RS(t.getGraph(),Md(t)),this._lineDraw.updateLayout(),n.updateLabelLayout(),this._updateThumbnailWindow())},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,n=t.getData(),a=Md(t);n.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(a)})},e.prototype.updateLayout=function(t){this._active&&(RS(t.getGraph(),Md(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},e.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()},e.prototype._getThumbnailInfo=function(){var t=this._model,n=t.coordinateSystem;if(n.type==="view"){var a=nne(t);if(a)return{bridge:a,coordSys:n}}},e.prototype._updateThumbnailWindow=function(){var t=this._getThumbnailInfo();t&&t.bridge.updateWindow(t.coordSys.transform,this._api)},e.prototype._renderThumbnail=function(t,n,a,i){var o=this._getThumbnailInfo();if(o){var s=new Le,l=a.group.children(),u=i.group.children(),c=new Le,f=new Le;s.add(f),s.add(c);for(var d=0;d<l.length;d++){var h=l[d],v=h.children()[0],y=h.x,m=h.y,x=Ae(v.shape),_=ie(x,{width:v.scaleX,height:v.scaleY,x:y-v.scaleX/2,y:m-v.scaleY/2}),T=Ae(v.style),C=new v.constructor({shape:_,style:T,z2:151});f.add(C)}for(var d=0;d<u.length;d++){var h=u[d],k=h.children()[0],T=Ae(k.style),_=Ae(k.shape),A=new q4({style:T,shape:_,z2:151});c.add(A)}o.bridge.renderContent({api:n,roamType:t.get("roam"),viewportRect:null,group:s,targetTrans:o.coordSys.transform})}},e.type="graph",e})(mt);function Du(r){return"_EC_"+r}var ine=(function(){function r(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var n=this._nodesMap;if(!n[Du(e)]){var a=new rl(e,t);return a.hostGraph=this,this.nodes.push(a),n[Du(e)]=a,a}},r.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},r.prototype.getNodeById=function(e){return this._nodesMap[Du(e)]},r.prototype.addEdge=function(e,t,n){var a=this._nodesMap,i=this._edgesMap;if(ut(e)&&(e=this.nodes[e]),ut(t)&&(t=this.nodes[t]),e instanceof rl||(e=a[Du(e)]),t instanceof rl||(t=a[Du(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new J4(e,t,n);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),t.inEdges.push(s)),e.edges.push(s),e!==t&&t.edges.push(s),this.edges.push(s),i[o]=s,s}},r.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},r.prototype.getEdge=function(e,t){e instanceof rl&&(e=e.id),t instanceof rl&&(t=t.id);var n=this._edgesMap;return this._directed?n[e+"-"+t]:n[e+"-"+t]||n[t+"-"+e]},r.prototype.eachNode=function(e,t){for(var n=this.nodes,a=n.length,i=0;i<a;i++)n[i].dataIndex>=0&&e.call(t,n[i],i)},r.prototype.eachEdge=function(e,t){for(var n=this.edges,a=n.length,i=0;i<a;i++)n[i].dataIndex>=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&e.call(t,n[i],i)},r.prototype.breadthFirstTraverse=function(e,t,n,a){if(t instanceof rl||(t=this._nodesMap[Du(t)]),!!t){for(var i=n==="out"?"outEdges":n==="in"?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!e.call(a,t,null))for(var s=[t];s.length;)for(var l=s.shift(),u=l[i],o=0;o<u.length;o++){var c=u[o],f=c.node1===l?c.node2:c.node1;if(!f.__visited){if(e.call(a,f,l))return;s.push(f),f.__visited=!0}}}},r.prototype.update=function(){for(var e=this.data,t=this.edgeData,n=this.nodes,a=this.edges,i=0,o=n.length;i<o;i++)n[i].dataIndex=-1;for(var i=0,o=e.count();i<o;i++)n[e.getRawIndex(i)].dataIndex=i;t.filterSelf(function(s){var l=a[t.getRawIndex(s)];return l.node1.dataIndex>=0&&l.node2.dataIndex>=0});for(var i=0,o=a.length;i<o;i++)a[i].dataIndex=-1;for(var i=0,o=t.count();i<o;i++)a[t.getRawIndex(i)].dataIndex=i},r.prototype.clone=function(){for(var e=new r(this._directed),t=this.nodes,n=this.edges,a=0;a<t.length;a++)e.addNode(t[a].id,t[a].dataIndex);for(var a=0;a<n.length;a++){var i=n[a];e.addEdge(i.node1.id,i.node2.id,i.dataIndex)}return e},r})(),rl=(function(){function r(e,t){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=e??"",this.dataIndex=t??-1}return r.prototype.degree=function(){return this.edges.length},r.prototype.inDegree=function(){return this.inEdges.length},r.prototype.outDegree=function(){return this.outEdges.length},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,n=t.data.getItemModel(this.dataIndex);return n.getModel(e)}},r.prototype.getAdjacentDataIndices=function(){for(var e={edge:[],node:[]},t=0;t<this.edges.length;t++){var n=this.edges[t];n.dataIndex<0||(e.edge.push(n.dataIndex),e.node.push(n.node1.dataIndex,n.node2.dataIndex))}return e},r.prototype.getTrajectoryDataIndices=function(){for(var e=we(),t=we(),n=0,a=this.edges.length;n<a;n++){var i=this.edges[n];if(!(i.dataIndex<0)){e.set(i.dataIndex,!0);for(var o=[i.node1],s=[i.node2],l=0;l<o.length;){var u=o[l];l++,t.set(u.dataIndex,!0);for(var c=u.inEdges,f=0,d=c.length,h=void 0,v=void 0;f<d;f++)h=c[f],v=h.dataIndex,v>=0&&!e.hasKey(v)&&(e.set(v,!0),o.push(h.node1))}for(l=0;l<s.length;){var y=s[l];l++,t.set(y.dataIndex,!0);for(var m=y.outEdges,f=0,x=m.length,_=void 0,T=void 0;f<x;f++)_=m[f],T=_.dataIndex,T>=0&&!e.hasKey(T)&&(e.set(T,!0),s.push(_.node2))}}}return{edge:e.keys(),node:t.keys()}},r})(),J4=(function(){function r(e,t,n){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=n??-1}return r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,n=t.edgeData.getItemModel(this.dataIndex);return n.getModel(e)}},r.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},r.prototype.getTrajectoryDataIndices=function(){var e=we(),t=we();e.set(this.dataIndex,!0);for(var n=[this.node1],a=[this.node2],i=0;i<n.length;){var o=n[i];i++,t.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&&!e.hasKey(f)&&(e.set(f,!0),n.push(c.node1))}for(i=0;i<a.length;){var d=a[i];i++,t.set(d.dataIndex,!0);for(var h=d.outEdges,l=0,u=h.length,v=void 0,y=void 0;l<u;l++)v=d.outEdges[l],y=v.dataIndex,y>=0&&!e.hasKey(y)&&(e.set(y,!0),a.push(v.node2))}return{edge:e.keys(),node:t.keys()}},r})();function eF(r,e){return{getValue:function(t){var n=this[r][e];return n.getStore().get(n.getDimensionIndex(t||"value"),this.dataIndex)},setVisual:function(t,n){this.dataIndex>=0&&this[r][e].setItemVisual(this.dataIndex,t,n)},getVisual:function(t){return this[r][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,n){this.dataIndex>=0&&this[r][e].setItemLayout(this.dataIndex,t,n)},getLayout:function(){return this[r][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][e].getRawIndex(this.dataIndex)}}}Wt(rl,eF("hostGraph","data"));Wt(J4,eF("hostGraph","edgeData"));function ZC(r,e,t,n,a){for(var i=new ine(n),o=0;o<r.length;o++)i.addNode(Tr(r[o].id,r[o].name,o),o);for(var s=[],l=[],u=0,o=0;o<e.length;o++){var c=e[o],f=c.source,d=c.target;i.addEdge(f,d,u)&&(l.push(c),s.push(Tr(ir(c.id,null),f+" > "+d)),u++)}var h=t.get("coordinateSystem"),v;if(h==="cartesian2d"||h==="polar"||h==="matrix")v=di(r,t);else{var y=jc.get(h),m=y?y.dimensions||[]:[];Ue(m,"value")<0&&m.concat(["value"]);var x=Gc(r,{coordDimensions:m,encodeDefine:t.getEncode()}).dimensions;v=new Ur(x,t),v.initData(r)}var _=new Ur(["value"],t);return _.initData(l,s),a&&a(v,_),E4({mainData:v,struct:i,structAttr:"graph",datas:{node:v,edge:_},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var one=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments);var n=this;function a(){return n._categoriesData}this.legendVisualProvider=new Yc(a,a),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){r.prototype.mergeDefaultAndTheme.apply(this,arguments),wl(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,n){var a=t.edges||t.links||[],i=t.data||t.nodes||[],o=this;if(i&&a){Ure(this);var s=ZC(i,a,this,!0,l);return z(s.edges,function(u){Yre(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(v){var y=o._categoriesModels,m=v.getShallow("category"),x=y[m];return x&&(x.parentModel=v.parentModel,v.parentModel=x),v});var f=rt.prototype.getModel;function d(v,y){var m=f.call(this,v,y);return m.resolveParentPath=h,m}c.wrapMethod("getItemModel",function(v){return v.resolveParentPath=h,v.getModel=d,v});function h(v){if(v&&(v[0]==="label"||v[1]==="label")){var y=v.slice();return v[0]==="label"?y[0]="edgeLabel":v[1]==="label"&&(y[1]="edgeLabel"),y}return v}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,n,a){if(a==="edge"){var i=this.getData(),o=this.getDataParams(t,a),s=i.graph.getEdgeByIndex(t),l=i.getName(s.node1.dataIndex),u=i.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),rr("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var f=nB({series:this,dataIndex:t,multipleSeries:n});return f},e.prototype._updateCategoriesData=function(){var t=ue(this.option.categories||[],function(a){return a.value!=null?a:ie({value:0},a)}),n=new Ur(["value"],this);n.initData(t),this._categoriesData=n,this._categoriesModels=n.mapArray(function(a){return n.getItemModel(a)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.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:ee.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:ee.color.primary}}},e})(St);function sne(r){r.registerChartView(ane),r.registerSeriesModel(one),r.registerProcessor(Vre),r.registerVisual(Gre),r.registerVisual(Wre),r.registerLayout(Xre),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,Kre),r.registerLayout(Qre),r.registerCoordinateSystem("graphView",{dimensions:Gl.dimensions,create:ene}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Vt),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Vt),r.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},function(e,t,n){t.eachComponent({mainType:"series",query:e},function(a){var i=n.getViewOfSeriesModel(a);i&&(e.dx!=null&&e.dy!=null&&i.updateViewOnPan(a,n,e),e.zoom!=null&&e.originX!=null&&e.originY!=null&&i.updateViewOnZoom(a,n,e));var o=a.coordinateSystem,s=Vm(o,e,a.get("scaleLimit"));a.setCenter&&a.setCenter(s.center),a.setZoom&&a.setZoom(s.zoom)})})}var jR=(function(r){Q(e,r);function e(t,n,a){var i=r.call(this)||this;je(i).dataType="node",i.z2=2;var o=new lt;return i.setTextContent(o),i.updateData(t,n,a,!0),i}return e.prototype.updateData=function(t,n,a,i){var o=this,s=t.graph.getNodeByIndex(n),l=t.hostModel,u=s.getModel(),c=u.getModel("emphasis"),f=t.getItemLayout(n),d=ie(qa(u.getModel("itemStyle"),f,!0),f),h=this;if(isNaN(d.startAngle)){h.setShape(d);return}i?h.setShape(d):ct(h,{shape:d},l,n);var v=ie(qa(u.getModel("itemStyle"),f,!0),f);o.setShape(v),o.useStyle(t.getItemVisual(n,"style")),or(o,u),this._updateLabel(l,u,s),t.setItemGraphicEl(n,h),or(h,u,"itemStyle");var y=c.get("focus");Pt(this,y==="adjacency"?s.getAdjacentDataIndices():y,c.get("blurScope"),c.get("disabled"))},e.prototype._updateLabel=function(t,n,a){var i=this.getTextContent(),o=a.getLayout(),s=(o.startAngle+o.endAngle)/2,l=Math.cos(s),u=Math.sin(s),c=n.getModel("label");i.ignore=!c.get("show");var f=sr(n),d=a.getVisual("style");vr(i,f,{labelFetcher:{getFormattedLabel:function(_,T,C,k,A,L){return t.getFormattedLabel(_,T,"node",k,hn(A,f.normal&&f.normal.get("formatter"),n.get("name")),L)}},labelDataIndex:a.dataIndex,defaultText:a.dataIndex+"",inheritColor:d.fill,defaultOpacity:d.opacity,defaultOutsidePosition:"startArc"});var h=c.get("position")||"outside",v=c.get("distance")||0,y;h==="outside"?y=o.r+v:y=(o.r+o.r0)/2,this.textConfig={inside:h!=="outside"};var m=h!=="outside"?c.get("align")||"center":l>0?"left":"right",x=h!=="outside"?c.get("verticalAlign")||"middle":u>0?"top":"bottom";i.attr({x:l*y+o.cx,y:u*y+o.cy,rotation:0,style:{align:m,verticalAlign:x}})},e})(Er),lne=(function(r){Q(e,r);function e(t,n,a,i){var o=r.call(this)||this;return je(o).dataType="edge",o.updateData(t,n,a,i,!0),o}return e.prototype.buildPath=function(t,n){t.moveTo(n.s1[0],n.s1[1]);var a=.7,i=n.clockwise;t.arc(n.cx,n.cy,n.r,n.sStartAngle,n.sEndAngle,!i),t.bezierCurveTo((n.cx-n.s2[0])*a+n.s2[0],(n.cy-n.s2[1])*a+n.s2[1],(n.cx-n.t1[0])*a+n.t1[0],(n.cy-n.t1[1])*a+n.t1[1],n.t1[0],n.t1[1]),t.arc(n.cx,n.cy,n.r,n.tStartAngle,n.tEndAngle,!i),t.bezierCurveTo((n.cx-n.t2[0])*a+n.t2[0],(n.cy-n.t2[1])*a+n.t2[1],(n.cx-n.s1[0])*a+n.s1[0],(n.cy-n.s1[1])*a+n.s1[1],n.s1[0],n.s1[1]),t.closePath()},e.prototype.updateData=function(t,n,a,i,o){var s=t.hostModel,l=n.graph.getEdgeByIndex(a),u=l.getLayout(),c=l.node1.getModel(),f=n.getItemModel(l.dataIndex),d=f.getModel("lineStyle"),h=f.getModel("emphasis"),v=h.get("focus"),y=ie(qa(c.getModel("itemStyle"),u,!0),u),m=this;if(isNaN(y.sStartAngle)||isNaN(y.tStartAngle)){m.setShape(y);return}o?(m.setShape(y),BR(m,l,t,d)):(ta(m),BR(m,l,t,d),ct(m,{shape:y},s,a)),Pt(this,v==="adjacency"?l.getAdjacentDataIndices():v,h.get("blurScope"),h.get("disabled")),or(m,f,"lineStyle"),n.setItemGraphicEl(l.dataIndex,m)},e})(nt);function BR(r,e,t,n){var a=e.node1,i=e.node2,o=r.style;r.setStyle(n.getLineStyle());var s=n.get("color");switch(s){case"source":o.fill=t.getItemVisual(a.dataIndex,"style").fill,o.decal=a.getVisual("style").decal;break;case"target":o.fill=t.getItemVisual(i.dataIndex,"style").fill,o.decal=i.getVisual("style").decal;break;case"gradient":var l=t.getItemVisual(a.dataIndex,"style").fill,u=t.getItemVisual(i.dataIndex,"style").fill;if(pe(l)&&pe(u)){var c=r.shape,f=(c.s1[0]+c.s2[0])/2,d=(c.s1[1]+c.s2[1])/2,h=(c.t1[0]+c.t2[0])/2,v=(c.t1[1]+c.t2[1])/2;o.fill=new zl(f,d,h,v,[{offset:0,color:l},{offset:1,color:u}],!0)}break}}var une=Math.PI/180,cne=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){},e.prototype.render=function(t,n,a){var i=t.getData(),o=this._data,s=this.group,l=-t.get("startAngle")*une;if(i.diff(o).add(function(c){var f=i.getItemLayout(c);if(f){var d=new jR(i,c,l);je(d).dataIndex=c,s.add(d)}}).update(function(c,f){var d=o.getItemGraphicEl(f),h=i.getItemLayout(c);if(!h){d&&Vi(d,t,f);return}d?d.updateData(i,c,l):d=new jR(i,c,l),s.add(d)}).remove(function(c){var f=o.getItemGraphicEl(c);f&&Vi(f,t,c)}).execute(),!o){var u=t.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=he(u[0],a.getWidth()),this.group.originY=he(u[1],a.getHeight()),It(this.group,{scaleX:1,scaleY:1},t)}this._data=i,this.renderEdges(t,l)},e.prototype.renderEdges=function(t,n){var a=t.getData(),i=t.getEdgeData(),o=this._edgeData,s=this.group;i.diff(o).add(function(l){var u=new lne(a,i,l,n);je(u).dataIndex=l,s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(a,i,l,n),s.add(c)}).remove(function(l){var u=o.getItemGraphicEl(l);u&&Vi(u,t,l)}).execute(),this._edgeData=i},e.prototype.dispose=function(){},e.type="chord",e})(mt),fne=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this.legendVisualProvider=new Yc(ye(this.getData,this),ye(this.getRawData,this))},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links)},e.prototype.getInitialData=function(t,n){var a=t.edges||t.links||[],i=t.data||t.nodes||[];if(i&&a){var o=ZC(i,a,this,!0,s);return o.data}function s(l,u){var c=rt.prototype.getModel;function f(h,v){var y=c.call(this,h,v);return y.resolveParentPath=d,y}u.wrapMethod("getItemModel",function(h){return h.resolveParentPath=d,h.getModel=f,h});function d(h){if(h&&(h[0]==="label"||h[1]==="label")){var v=h.slice();return h[0]==="label"?v[0]="edgeLabel":h[1]==="label"&&(v[1]="edgeLabel"),v}return h}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,n,a){var i=this.getDataParams(t,a);if(a==="edge"){var o=this.getData(),s=o.graph.getEdgeByIndex(t),l=o.getName(s.node1.dataIndex),u=o.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),rr("nameValue",{name:c.join(" > "),value:i.value,noValue:i.value==null})}return rr("nameValue",{name:i.name,value:i.value,noValue:i.value==null})},e.prototype.getDataParams=function(t,n){var a=r.prototype.getDataParams.call(this,t,n);if(n==="node"){var i=this.getData(),o=this.getGraph().getNodeByIndex(t);if(a.name==null&&(a.name=i.getName(t)),a.value==null){var s=o.getLayout().value;a.value=s}}return a},e.type="series.chord",e.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}}},e})(St),ES=Math.PI/180;function dne(r,e){r.eachSeriesByType("chord",function(t){hne(t,e)})}function hne(r,e){var t=r.getData(),n=t.graph,a=r.getEdgeData(),i=a.count();if(i){var o=_5(r,e),s=o.cx,l=o.cy,u=o.r,c=o.r0,f=Math.max((r.get("padAngle")||0)*ES,0),d=Math.max((r.get("minAngle")||0)*ES,0),h=-r.get("startAngle")*ES,v=h+Math.PI*2,y=r.get("clockwise"),m=y?1:-1,x=[h,v];wm(x,!y);var _=x[0],T=x[1],C=T-_,k=t.getSum("value")===0&&a.getSum("value")===0,A=[],L=0;n.eachEdge(function(G){var X=k?1:G.getValue("value");k&&(X>0||d)&&(L+=2);var K=G.node1.dataIndex,V=G.node2.dataIndex;A[K]=(A[K]||0)+X,A[V]=(A[V]||0)+X});var D=0;if(n.eachNode(function(G){var X=G.getValue("value");isNaN(X)||(A[G.dataIndex]=Math.max(X,A[G.dataIndex]||0)),!k&&(A[G.dataIndex]>0||d)&&L++,D+=A[G.dataIndex]||0}),!(L===0||D===0)){f*L>=Math.abs(C)&&(f=Math.max(0,(Math.abs(C)-d*L)/L)),(f+d)*L>=Math.abs(C)&&(d=(Math.abs(C)-f*L)/L);var P=(C-f*L*m)/D,E=0,O=0,B=0;n.eachNode(function(G){var X=A[G.dataIndex]||0,K=P*(D?X:1)*m;Math.abs(K)<d?E+=d-Math.abs(K):(O+=Math.abs(K)-d,B+=Math.abs(K)),G.setLayout({angle:K,value:X})});var N=!1;if(E>O){var W=E/O;n.eachNode(function(G){var X=G.getLayout().angle;Math.abs(X)>=d?G.setLayout({angle:X*W,ratio:W},!0):G.setLayout({angle:d,ratio:d===0?1:X/d},!0)})}else n.eachNode(function(G){if(!N){var X=G.getLayout().angle,K=Math.min(X/B,1),V=K*E;X-V<d&&(N=!0)}});var H=E;n.eachNode(function(G){if(!(H<=0)){var X=G.getLayout().angle;if(X>d&&d>0){var K=N?1:Math.min(X/B,1),V=X-d,U=Math.min(V,Math.min(H,E*K));H-=U,G.setLayout({angle:X-U,ratio:(X-U)/X},!0)}else d>0&&G.setLayout({angle:d,ratio:X===0?1:d/X},!0)}});var $=_,Z=[];n.eachNode(function(G){var X=Math.max(G.getLayout().angle,d);G.setLayout({cx:s,cy:l,r0:c,r:u,startAngle:$,endAngle:$+X*m,clockwise:y},!0),Z[G.dataIndex]=$,$+=(X+f)*m}),n.eachEdge(function(G){var X=k?1:G.getValue("value"),K=P*(D?X:1)*m,V=G.node1.dataIndex,U=Z[V]||0,ae=Math.abs((G.node1.getLayout().ratio||1)*K),ce=U+ae*m,re=[s+c*Math.cos(U),l+c*Math.sin(U)],_e=[s+c*Math.cos(ce),l+c*Math.sin(ce)],Ne=G.node2.dataIndex,ve=Z[Ne]||0,fe=Math.abs((G.node2.getLayout().ratio||1)*K),Te=ve+fe*m,xe=[s+c*Math.cos(ve),l+c*Math.sin(ve)],Ie=[s+c*Math.cos(Te),l+c*Math.sin(Te)];G.setLayout({s1:re,s2:_e,sStartAngle:U,sEndAngle:ce,t1:xe,t2:Ie,tStartAngle:ve,tEndAngle:Te,cx:s,cy:l,r:c,value:X,clockwise:y}),Z[V]=ce,Z[Ne]=Te})}}}function pne(r){r.registerChartView(cne),r.registerSeriesModel(fne),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,dne),r.registerProcessor(Hc("chord"))}var vne=(function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r})(),gne=(function(r){Q(e,r);function e(t){var n=r.call(this,t)||this;return n.type="pointer",n}return e.prototype.getDefaultShape=function(){return new vne},e.prototype.buildPath=function(t,n){var a=Math.cos,i=Math.sin,o=n.r,s=n.width,l=n.angle,u=n.x-a(l)*s*(s>=o/3?1:2),c=n.y-i(l)*s*(s>=o/3?1:2);l=n.angle-Math.PI/2,t.moveTo(u,c),t.lineTo(n.x+a(l)*s,n.y+i(l)*s),t.lineTo(n.x+a(n.angle)*o,n.y+i(n.angle)*o),t.lineTo(n.x-a(l)*s,n.y-i(l)*s),t.lineTo(u,c)},e})(nt);function yne(r,e){var t=r.get("center"),n=e.getWidth(),a=e.getHeight(),i=Math.min(n,a),o=he(t[0],e.getWidth()),s=he(t[1],e.getHeight()),l=he(r.get("radius"),i/2);return{cx:o,cy:s,r:l}}function ig(r,e){var t=r==null?"":r+"";return e&&(pe(e)?t=e.replace("{value}",t):Me(e)&&(t=e(r))),t}var mne=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),o=yne(t,a);this._renderMain(t,n,a,i,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,n,a,i,o){var s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,c=-t.get("endAngle")/180*Math.PI,f=t.getModel("axisLine"),d=f.get("roundCap"),h=d?Py:Er,v=f.get("show"),y=f.getModel("lineStyle"),m=y.get("width"),x=[u,c];wm(x,!l),u=x[0],c=x[1];for(var _=c-u,T=u,C=[],k=0;v&&k<i.length;k++){var A=Math.min(Math.max(i[k][0],0),1);c=u+_*A;var L=new h({shape:{startAngle:T,endAngle:c,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-m,r:o.r},silent:!0});L.setStyle({fill:i[k][1]}),L.setStyle(y.getLineStyle(["color","width"])),C.push(L),T=c}C.reverse(),z(C,function(P){return s.add(P)});var D=function(P){if(P<=0)return i[0][1];var E;for(E=0;E<i.length;E++)if(i[E][0]>=P&&(E===0?0:i[E-1][0])<P)return i[E][1];return i[E-1][1]};this._renderTicks(t,n,a,D,o,u,c,l,m),this._renderTitleAndDetail(t,n,a,D,o),this._renderAnchor(t,o),this._renderPointer(t,n,a,D,o,u,c,l,m)},e.prototype._renderTicks=function(t,n,a,i,o,s,l,u,c){for(var f=this.group,d=o.cx,h=o.cy,v=o.r,y=+t.get("min"),m=+t.get("max"),x=t.getModel("splitLine"),_=t.getModel("axisTick"),T=t.getModel("axisLabel"),C=t.get("splitNumber"),k=_.get("splitNumber"),A=he(x.get("length"),v),L=he(_.get("length"),v),D=s,P=(l-s)/C,E=P/k,O=x.getModel("lineStyle").getLineStyle(),B=_.getModel("lineStyle").getLineStyle(),N=x.get("distance"),W,H,$=0;$<=C;$++){if(W=Math.cos(D),H=Math.sin(D),x.get("show")){var Z=N?N+c:c,G=new Zt({shape:{x1:W*(v-Z)+d,y1:H*(v-Z)+h,x2:W*(v-A-Z)+d,y2:H*(v-A-Z)+h},style:O,silent:!0});O.stroke==="auto"&&G.setStyle({stroke:i($/C)}),f.add(G)}if(T.get("show")){var Z=T.get("distance")+N,X=ig(Xt($/C*(m-y)+y),T.get("formatter")),K=i($/C),V=W*(v-A-Z)+d,U=H*(v-A-Z)+h,ae=T.get("rotate"),ce=0;ae==="radial"?(ce=-D+2*Math.PI,ce>Math.PI/2&&(ce+=Math.PI)):ae==="tangential"?ce=-D-Math.PI/2:ut(ae)&&(ce=ae*Math.PI/180),ce===0?f.add(new lt({style:wt(T,{text:X,x:V,y:U,verticalAlign:H<-.8?"top":H>.8?"bottom":"middle",align:W<-.4?"left":W>.4?"right":"center"},{inheritColor:K}),silent:!0})):f.add(new lt({style:wt(T,{text:X,x:V,y:U,verticalAlign:"middle",align:"center"},{inheritColor:K}),silent:!0,originX:V,originY:U,rotation:ce}))}if(_.get("show")&&$!==C){var Z=_.get("distance");Z=Z?Z+c:c;for(var re=0;re<=k;re++){W=Math.cos(D),H=Math.sin(D);var _e=new Zt({shape:{x1:W*(v-Z)+d,y1:H*(v-Z)+h,x2:W*(v-L-Z)+d,y2:H*(v-L-Z)+h},silent:!0,style:B});B.stroke==="auto"&&_e.setStyle({stroke:i(($+re/k)/C)}),f.add(_e),D+=E}D-=E}else D+=P}},e.prototype._renderPointer=function(t,n,a,i,o,s,l,u,c){var f=this.group,d=this._data,h=this._progressEls,v=[],y=t.get(["pointer","show"]),m=t.getModel("progress"),x=m.get("show"),_=t.getData(),T=_.mapDimension("value"),C=+t.get("min"),k=+t.get("max"),A=[C,k],L=[s,l];function D(E,O){var B=_.getItemModel(E),N=B.getModel("pointer"),W=he(N.get("width"),o.r),H=he(N.get("length"),o.r),$=t.get(["pointer","icon"]),Z=N.get("offsetCenter"),G=he(Z[0],o.r),X=he(Z[1],o.r),K=N.get("keepAspect"),V;return $?V=Kt($,G-W/2,X-H,W,H,null,K):V=new gne({shape:{angle:-Math.PI/2,width:W,r:H,x:G,y:X}}),V.rotation=-(O+Math.PI/2),V.x=o.cx,V.y=o.cy,V}function P(E,O){var B=m.get("roundCap"),N=B?Py:Er,W=m.get("overlap"),H=W?m.get("width"):c/_.count(),$=W?o.r-H:o.r-(E+1)*H,Z=W?o.r:o.r-E*H,G=new N({shape:{startAngle:s,endAngle:O,cx:o.cx,cy:o.cy,clockwise:u,r0:$,r:Z}});return W&&(G.z2=vt(_.get(T,E),[C,k],[100,0],!0)),G}(x||y)&&(_.diff(d).add(function(E){var O=_.get(T,E);if(y){var B=D(E,s);It(B,{rotation:-((isNaN(+O)?L[0]:vt(O,A,L,!0))+Math.PI/2)},t),f.add(B),_.setItemGraphicEl(E,B)}if(x){var N=P(E,s),W=m.get("clip");It(N,{shape:{endAngle:vt(O,A,L,W)}},t),f.add(N),s_(t.seriesIndex,_.dataType,E,N),v[E]=N}}).update(function(E,O){var B=_.get(T,E);if(y){var N=d.getItemGraphicEl(O),W=N?N.rotation:s,H=D(E,W);H.rotation=W,ct(H,{rotation:-((isNaN(+B)?L[0]:vt(B,A,L,!0))+Math.PI/2)},t),f.add(H),_.setItemGraphicEl(E,H)}if(x){var $=h[O],Z=$?$.shape.endAngle:s,G=P(E,Z),X=m.get("clip");ct(G,{shape:{endAngle:vt(B,A,L,X)}},t),f.add(G),s_(t.seriesIndex,_.dataType,E,G),v[E]=G}}).execute(),_.each(function(E){var O=_.getItemModel(E),B=O.getModel("emphasis"),N=B.get("focus"),W=B.get("blurScope"),H=B.get("disabled");if(y){var $=_.getItemGraphicEl(E),Z=_.getItemVisual(E,"style"),G=Z.fill;if($ instanceof gr){var X=$.style;$.useStyle(ie({image:X.image,x:X.x,y:X.y,width:X.width,height:X.height},Z))}else $.useStyle(Z),$.type!=="pointer"&&$.setColor(G);$.setStyle(O.getModel(["pointer","itemStyle"]).getItemStyle()),$.style.fill==="auto"&&$.setStyle("fill",i(vt(_.get(T,E),A,[0,1],!0))),$.z2EmphasisLift=0,or($,O),Pt($,N,W,H)}if(x){var K=v[E];K.useStyle(_.getItemVisual(E,"style")),K.setStyle(O.getModel(["progress","itemStyle"]).getItemStyle()),K.z2EmphasisLift=0,or(K,O),Pt(K,N,W,H)}}),this._progressEls=v)},e.prototype._renderAnchor=function(t,n){var a=t.getModel("anchor"),i=a.get("show");if(i){var o=a.get("size"),s=a.get("icon"),l=a.get("offsetCenter"),u=a.get("keepAspect"),c=Kt(s,n.cx-o/2+he(l[0],n.r),n.cy-o/2+he(l[1],n.r),o,o,null,u);c.z2=a.get("showAbove")?1:0,c.setStyle(a.getModel("itemStyle").getItemStyle()),this.group.add(c)}},e.prototype._renderTitleAndDetail=function(t,n,a,i,o){var s=this,l=t.getData(),u=l.mapDimension("value"),c=+t.get("min"),f=+t.get("max"),d=new Le,h=[],v=[],y=t.isAnimationEnabled(),m=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(x){h[x]=new lt({silent:!0}),v[x]=new lt({silent:!0})}).update(function(x,_){h[x]=s._titleEls[_],v[x]=s._detailEls[_]}).execute(),l.each(function(x){var _=l.getItemModel(x),T=l.get(u,x),C=new Le,k=i(vt(T,[c,f],[0,1],!0)),A=_.getModel("title");if(A.get("show")){var L=A.get("offsetCenter"),D=o.cx+he(L[0],o.r),P=o.cy+he(L[1],o.r),E=h[x];E.attr({z2:m?0:2,style:wt(A,{x:D,y:P,text:l.getName(x),align:"center",verticalAlign:"middle"},{inheritColor:k})}),C.add(E)}var O=_.getModel("detail");if(O.get("show")){var B=O.get("offsetCenter"),N=o.cx+he(B[0],o.r),W=o.cy+he(B[1],o.r),H=he(O.get("width"),o.r),$=he(O.get("height"),o.r),Z=t.get(["progress","show"])?l.getItemVisual(x,"style").fill:k,E=v[x],G=O.get("formatter");E.attr({z2:m?0:2,style:wt(O,{x:N,y:W,text:ig(T,G),width:isNaN(H)?null:H,height:isNaN($)?null:$,align:"center",verticalAlign:"middle"},{inheritColor:Z})}),a5(E,{normal:O},T,function(K){return ig(K,G)}),y&&i5(E,x,l,t,{getFormattedLabel:function(K,V,U,ae,ce,re){return ig(re?re.interpolatedValue:T,G)}}),C.add(E)}d.add(C)}),this.group.add(d),this._titleEls=h,this._detailEls=v},e.type="gauge",e})(mt),xne=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,n){return Uc(this,["value"])},e.type="series.gauge",e.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,ee.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:ee.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:ee.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:ee.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:ee.color.neutral00,borderWidth:0,borderColor:ee.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:ee.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:ee.color.transparent,borderWidth:0,borderColor:ee.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:ee.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e})(St);function Sne(r){r.registerChartView(mne),r.registerSeriesModel(xne)}var bne=["itemStyle","opacity"],_ne=(function(r){Q(e,r);function e(t,n){var a=r.call(this)||this,i=a,o=new Cr,s=new lt;return i.setTextContent(s),a.setTextGuideLine(o),a.updateData(t,n,!0),a}return e.prototype.updateData=function(t,n,a){var i=this,o=t.hostModel,s=t.getItemModel(n),l=t.getItemLayout(n),u=s.getModel("emphasis"),c=s.get(bne);c=c??1,a||ta(i),i.useStyle(t.getItemVisual(n,"style")),i.style.lineJoin="round",a?(i.setShape({points:l.points}),i.style.opacity=0,It(i,{style:{opacity:c}},o,n)):ct(i,{style:{opacity:c},shape:{points:l.points}},o,n),or(i,s),this._updateLabel(t,n),Pt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,n){var a=this,i=this.getTextGuideLine(),o=a.getTextContent(),s=t.hostModel,l=t.getItemModel(n),u=t.getItemLayout(n),c=u.label,f=t.getItemVisual(n,"style"),d=f.fill;vr(o,sr(l),{labelFetcher:t.hostModel,labelDataIndex:n,defaultOpacity:f.opacity,defaultText:t.getName(n)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}});var h=l.getModel("label"),v=h.get("color"),y=v==="inherit"?d:null;a.setTextConfig({local:!0,inside:!!c.inside,insideStroke:y,outsideFill:y});var m=c.linePoints;i.setShape({points:m}),a.textGuideLineConfig={anchor:m?new Ee(m[0][0],m[0][1]):null},ct(o,{style:{x:c.x,y:c.y}},s,n),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),_C(a,wC(l),{stroke:d})},e})(zr),wne=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this._data,s=this.group;i.diff(o).add(function(l){var u=new _ne(i,l);i.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(i,l),s.add(c),i.setItemGraphicEl(l,c)}).remove(function(l){var u=o.getItemGraphicEl(l);Vi(u,t,l)}).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e})(mt),Tne=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Yc(ye(this.getData,this),ye(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,n){return Uc(this,{coordDimensions:["value"],encodeDefaulter:$e(KT,this)})},e.prototype._defaultLabelLine=function(t){wl(t,"labelLine",["show"]);var n=t.labelLine,a=t.emphasis.labelLine;n.show=n.show&&t.label.show,a.show=a.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var n=this.getData(),a=r.prototype.getDataParams.call(this,t),i=n.mapDimension("value"),o=n.getSum(i);return a.percent=o?+(n.get(i,t)/o*100).toFixed(2):0,a.$vars.push("percent"),a},e.type="series.funnel",e.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:ee.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:ee.color.primary}}},e})(St);function Cne(r,e){for(var t=r.mapDimension("value"),n=r.mapArray(t,function(l){return l}),a=[],i=e==="ascending",o=0,s=r.count();o<s;o++)a[o]=o;return Me(e)?a.sort(e):e!=="none"&&a.sort(function(l,u){return i?n[l]-n[u]:n[u]-n[l]}),a}function Mne(r){var e=r.hostModel,t=e.get("orient");r.each(function(n){var a=r.getItemModel(n),i=a.getModel("label"),o=i.get("position"),s=a.getModel("labelLine"),l=r.getItemLayout(n),u=l.points,c=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",f,d,h,v;if(c)o==="insideLeft"?(d=(u[0][0]+u[3][0])/2+5,h=(u[0][1]+u[3][1])/2,f="left"):o==="insideRight"?(d=(u[1][0]+u[2][0])/2-5,h=(u[1][1]+u[2][1])/2,f="right"):(d=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,h=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,f="center"),v=[[d,h],[d,h]];else{var y=void 0,m=void 0,x=void 0,_=void 0,T=s.get("length");o==="left"?(y=(u[3][0]+u[0][0])/2,m=(u[3][1]+u[0][1])/2,x=y-T,d=x-5,f="right"):o==="right"?(y=(u[1][0]+u[2][0])/2,m=(u[1][1]+u[2][1])/2,x=y+T,d=x+5,f="left"):o==="top"?(y=(u[3][0]+u[0][0])/2,m=(u[3][1]+u[0][1])/2,_=m-T,h=_-5,f="center"):o==="bottom"?(y=(u[1][0]+u[2][0])/2,m=(u[1][1]+u[2][1])/2,_=m+T,h=_+5,f="center"):o==="rightTop"?(y=t==="horizontal"?u[3][0]:u[1][0],m=t==="horizontal"?u[3][1]:u[1][1],t==="horizontal"?(_=m-T,h=_-5,f="center"):(x=y+T,d=x+5,f="top")):o==="rightBottom"?(y=u[2][0],m=u[2][1],t==="horizontal"?(_=m+T,h=_+5,f="center"):(x=y+T,d=x+5,f="bottom")):o==="leftTop"?(y=u[0][0],m=t==="horizontal"?u[0][1]:u[1][1],t==="horizontal"?(_=m-T,h=_-5,f="center"):(x=y-T,d=x-5,f="right")):o==="leftBottom"?(y=t==="horizontal"?u[1][0]:u[3][0],m=t==="horizontal"?u[1][1]:u[2][1],t==="horizontal"?(_=m+T,h=_+5,f="center"):(x=y-T,d=x-5,f="right")):(y=(u[1][0]+u[2][0])/2,m=(u[1][1]+u[2][1])/2,t==="horizontal"?(_=m+T,h=_+5,f="center"):(x=y+T,d=x+5,f="left")),t==="horizontal"?(x=y,d=x):(_=m,h=_),v=[[y,m],[x,_]]}l.label={linePoints:v,x:d,y:h,verticalAlign:"middle",textAlign:f,inside:c}})}function kne(r,e){r.eachSeriesByType("funnel",function(t){var n=t.getData(),a=n.mapDimension("value"),i=t.get("sort"),o=lr(t,e),s=Dt(t.getBoxLayoutParams(),o.refContainer),l=t.get("orient"),u=s.width,c=s.height,f=Cne(n,i),d=s.x,h=s.y,v=l==="horizontal"?[he(t.get("minSize"),c),he(t.get("maxSize"),c)]:[he(t.get("minSize"),u),he(t.get("maxSize"),u)],y=n.getDataExtent(a),m=t.get("min"),x=t.get("max");m==null&&(m=Math.min(y[0],0)),x==null&&(x=y[1]);var _=t.get("funnelAlign"),T=t.get("gap"),C=l==="horizontal"?u:c,k=(C-T*(n.count()-1))/n.count(),A=function(H,$){if(l==="horizontal"){var Z=n.get(a,H)||0,G=vt(Z,[m,x],v,!0),X=void 0;switch(_){case"top":X=h;break;case"center":X=h+(c-G)/2;break;case"bottom":X=h+(c-G);break}return[[$,X],[$,X+G]]}var K=n.get(a,H)||0,V=vt(K,[m,x],v,!0),U;switch(_){case"left":U=d;break;case"center":U=d+(u-V)/2;break;case"right":U=d+u-V;break}return[[U,$],[U+V,$]]};i==="ascending"&&(k=-k,T=-T,l==="horizontal"?d+=u:h+=c,f=f.reverse());for(var L=0;L<f.length;L++){var D=f[L],P=f[L+1],E=n.getItemModel(D);if(l==="horizontal"){var O=E.get(["itemStyle","width"]);O==null?O=k:(O=he(O,u),i==="ascending"&&(O=-O));var B=A(D,d),N=A(P,d+O);d+=O+T,n.setItemLayout(D,{points:B.concat(N.slice().reverse())})}else{var W=E.get(["itemStyle","height"]);W==null?W=k:(W=he(W,c),i==="ascending"&&(W=-W));var B=A(D,h),N=A(P,h+W);h+=W+T,n.setItemLayout(D,{points:B.concat(N.slice().reverse())})}}Mne(n)})}function Ane(r){r.registerChartView(wne),r.registerSeriesModel(Tne),r.registerLayout(kne),r.registerProcessor(Hc("funnel"))}var Lne=.3,Ine=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._dataGroup=new Le,t._initialized=!1,t}return e.prototype.init=function(){this.group.add(this._dataGroup)},e.prototype.render=function(t,n,a,i){this._progressiveEls=null;var o=this._dataGroup,s=t.getData(),l=this._data,u=t.coordinateSystem,c=u.dimensions,f=VR(t);s.diff(l).add(d).update(h).remove(v).execute();function d(m){var x=FR(s,o,m,c,u);zS(x,s,m,f)}function h(m,x){var _=l.getItemGraphicEl(x),T=tF(s,m,c,u);s.setItemGraphicEl(m,_),ct(_,{shape:{points:T}},t,m),ta(_),zS(_,s,m,f)}function v(m){var x=l.getItemGraphicEl(m);o.remove(x)}if(!this._initialized){this._initialized=!0;var y=Dne(u,t,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(y)}this._data=s},e.prototype.incrementalPrepareRender=function(t,n,a){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},e.prototype.incrementalRender=function(t,n,a){for(var i=n.getData(),o=n.coordinateSystem,s=o.dimensions,l=VR(n),u=this._progressiveEls=[],c=t.start;c<t.end;c++){var f=FR(i,this._dataGroup,c,s,o);f.incremental=!0,zS(f,i,c,l),u.push(f)}},e.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},e.type="parallel",e})(mt);function Dne(r,e,t){var n=r.model,a=r.getRect(),i=new Qe({shape:{x:a.x,y:a.y,width:a.width,height:a.height}}),o=n.get("layout")==="horizontal"?"width":"height";return i.setShape(o,0),It(i,{shape:{width:a.width,height:a.height}},e,t),i}function tF(r,e,t,n){for(var a=[],i=0;i<t.length;i++){var o=t[i],s=r.get(r.mapDimension(o),e);Pne(s,n.getAxis(o).type)||a.push(n.dataToPoint(s,o))}return a}function FR(r,e,t,n,a){var i=tF(r,t,n,a),o=new Cr({shape:{points:i},z2:10});return e.add(o),r.setItemGraphicEl(t,o),o}function VR(r){var e=r.get("smooth",!0);return e===!0&&(e=Lne),e=ai(e),Dr(e)&&(e=0),{smooth:e}}function zS(r,e,t,n){r.useStyle(e.getItemVisual(t,"style")),r.style.fill=null,r.setShape("smooth",n.smooth);var a=e.getItemModel(t),i=a.getModel("emphasis");or(r,a,"lineStyle"),Pt(r,i.get("focus"),i.get("blurScope"),i.get("disabled"))}function Pne(r,e){return e==="category"?r==null:r==null||isNaN(r)}var Rne=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.getInitialData=function(t,n){return di(null,this,{useEncodeDefaulter:ye(Ene,null,this)})},e.prototype.getRawIndicesByActiveState=function(t){var n=this.coordinateSystem,a=this.getData(),i=[];return n.eachActiveState(a,function(o,s){t===o&&i.push(a.getRawIndex(s))}),i},e.type="series.parallel",e.dependencies=["parallel"],e.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"},e})(St);function Ene(r){var e=r.ecModel.getComponent("parallel",r.get("parallelIndex"));if(e){var t={};return z(e.dimensions,function(n){var a=zne(n);t[n]=a}),t}}function zne(r){return+r.replace("dim","")}var One=["lineStyle","opacity"],Nne={seriesType:"parallel",reset:function(r,e){var t=r.coordinateSystem,n={normal:r.get(["lineStyle","opacity"]),active:r.get("activeOpacity"),inactive:r.get("inactiveOpacity")};return{progress:function(a,i){t.eachActiveState(i,function(o,s){var l=n[o];if(o==="normal"&&i.hasItemOption){var u=i.getItemModel(s).get(One,!0);u!=null&&(l=u)}var c=i.ensureUniqueItemVisual(s,"style");c.opacity=l},a.start,a.end)}}}};function jne(r){Bne(r),Fne(r)}function Bne(r){if(!r.parallel){var e=!1;z(r.series,function(t){t&&t.type==="parallel"&&(e=!0)}),e&&(r.parallel=[{}])}}function Fne(r){var e=Tt(r.parallelAxis);z(e,function(t){if(Pe(t)){var n=t.parallelIndex||0,a=Tt(r.parallel)[n];a&&a.parallelAxisDefault&&Ye(t,a.parallelAxisDefault,!1)}})}var Vne=5,Gne=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){this._model=t,this._api=a,this._handlers||(this._handlers={},z(Wne,function(i,o){a.getZr().on(o,this._handlers[o]=ye(i,this))},this)),Fc(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},e.prototype.dispose=function(t,n){lh(this,"_throttledDispatchExpand"),z(this._handlers,function(a,i){n.getZr().off(i,a)}),this._handlers=null},e.prototype._throttledDispatchExpand=function(t){this._dispatchExpand(t)},e.prototype._dispatchExpand=function(t){t&&this._api.dispatchAction(ie({type:"parallelAxisExpand"},t))},e.type="parallel",e})(Ct),Wne={mousedown:function(r){OS(this,"click")&&(this._mouseDownPoint=[r.offsetX,r.offsetY])},mouseup:function(r){var e=this._mouseDownPoint;if(OS(this,"click")&&e){var t=[r.offsetX,r.offsetY],n=Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2);if(n>Vne)return;var a=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);a.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:a.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!OS(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),n=t.behavior;n==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(n==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:n==="jump"?null:{duration:0}})}}};function OS(r,e){var t=r._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}var $ne=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var n=this.option;t&&Ye(n,t,!0),this._initDimensions()},e.prototype.contains=function(t,n){var a=t.get("parallelIndex");return a!=null&&n.getComponent("parallel",a)===this},e.prototype.setAxisExpand=function(t){z(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(n){t.hasOwnProperty(n)&&(this.option[n]=t[n])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],n=this.parallelAxisIndex=[],a=ht(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(i){return(i.get("parallelIndex")||0)===this.componentIndex},this);z(a,function(i){t.push("dim"+i.get("dim")),n.push(i.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.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},e})(Je),Hne=(function(r){Q(e,r);function e(t,n,a,i,o){var s=r.call(this,t,n,a)||this;return s.type=i||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e})(aa);function rs(r,e,t,n,a,i){r=r||0;var o=t[1]-t[0];if(a!=null&&(a=Pu(a,[0,o])),i!=null&&(i=Math.max(i,a??0)),n==="all"){var s=Math.abs(e[1]-e[0]);s=Pu(s,[0,o]),a=i=Pu(s,[a,i]),n=0}e[0]=Pu(e[0],t),e[1]=Pu(e[1],t);var l=NS(e,n);e[n]+=r;var u=a||0,c=t.slice();l.sign<0?c[0]+=u:c[1]-=u,e[n]=Pu(e[n],c);var f;return f=NS(e,n),a!=null&&(f.sign!==l.sign||f.span<a)&&(e[1-n]=e[n]+l.sign*a),f=NS(e,n),i!=null&&f.span>i&&(e[1-n]=e[n]+f.sign*i),e}function NS(r,e){var t=r[e]-r[1-e];return{span:Math.abs(t),sign:t>0?-1:t<0?1:e?-1:1}}function Pu(r,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,r))}var jS=z,rF=Math.min,nF=Math.max,GR=Math.floor,Une=Math.ceil,WR=Xt,Yne=Math.PI,Xne=(function(){function r(e,t,n){this.type="parallel",this._axesMap=we(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,n)}return r.prototype._init=function(e,t,n){var a=e.dimensions,i=e.parallelAxisIndex;jS(a,function(o,s){var l=i[s],u=t.getComponent("parallelAxis",l),c=this._axesMap.set(o,new Hne(o,Wh(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)},r.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},r.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),n=t.axisBase,a=t.layoutBase,i=t.pixelDimIndex,o=e[1-i],s=e[i];return o>=n&&o<=n+t.axisLength&&s>=a&&s<=a+t.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(n){if(e.contains(n,t)){var a=n.getData();jS(this.dimensions,function(i){var o=this._axesMap.get(i);o.scale.unionExtentFromData(a,a.mapDimension(i)),Il(o.scale,o.model)},this)}},this)},r.prototype.resize=function(e,t){var n=lr(e,t).refContainer;this._rect=Dt(e.getBoxLayoutParams(),n),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,n=["x","y"],a=["width","height"],i=e.get("layout"),o=i==="horizontal"?0:1,s=t[a[o]],l=[0,s],u=this.dimensions.length,c=og(e.get("axisExpandWidth"),l),f=og(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&u>3&&u>f&&f>1&&c>0&&s>0,h=e.get("axisExpandWindow"),v;if(h)v=og(h[1]-h[0],l),h[1]=h[0]+v;else{v=og(c*(f-1),l);var y=e.get("axisExpandCenter")||GR(u/2);h=[c*y-v/2],h[1]=h[0]+v}var m=(s-v)/(u-f);m<3&&(m=0);var x=[GR(WR(h[0]/c,1))+1,Une(WR(h[1]/c,1))-1],_=m/c*h[0];return{layout:i,pixelDimIndex:o,layoutBase:t[n[o]],layoutLength:s,axisBase:t[n[1-o]],axisLength:t[a[1-o]],axisExpandable:d,axisExpandWidth:c,axisCollapseWidth:m,axisExpandWindow:h,axisCount:u,winInnerIndices:x,axisExpandWindow0Pos:_}},r.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,n=this.dimensions,a=this._makeLayoutInfo(),i=a.layout;t.each(function(o){var s=[0,a.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),jS(n,function(o,s){var l=(a.axisExpandable?Kne:Zne)(s,a),u={horizontal:{x:l.position,y:a.axisLength},vertical:{x:0,y:l.position}},c={horizontal:Yne/2,vertical:0},f=[u[i].x+e.x,u[i].y+e.y],d=c[i],h=hr();to(h,h,d),Ta(h,h,f),this._axesLayout[o]={position:f,rotation:d,transform:h,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(e){return this._axesMap.get(e)},r.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},r.prototype.eachActiveState=function(e,t,n,a){n==null&&(n=0),a==null&&(a=e.count());var i=this._axesMap,o=this.dimensions,s=[],l=[];z(o,function(m){s.push(e.mapDimension(m)),l.push(i.get(m).model)});for(var u=this.hasAxisBrushed(),c=n;c<a;c++){var f=void 0;if(!u)f="normal";else{f="active";for(var d=e.getValues(s,c),h=0,v=o.length;h<v;h++){var y=l[h].getActiveState(d[h]);if(y==="inactive"){f="inactive";break}}}t(f,c)}},r.prototype.hasAxisBrushed=function(){for(var e=this.dimensions,t=this._axesMap,n=!1,a=0,i=e.length;a<i;a++)t.get(e[a]).model.getActiveState()!=="normal"&&(n=!0);return n},r.prototype.axisCoordToPoint=function(e,t){var n=this._axesLayout[t];return _a([e,0],n.transform)},r.prototype.getAxisLayout=function(e){return Ae(this._axesLayout[e])},r.prototype.getSlidedAxisExpandWindow=function(e){var t=this._makeLayoutInfo(),n=t.pixelDimIndex,a=t.axisExpandWindow.slice(),i=a[1]-a[0],o=[0,t.axisExpandWidth*(t.axisCount-1)];if(!this.containPoint(e))return{behavior:"none",axisExpandWindow:a};var s=e[n]-t.layoutBase-t.axisExpandWindow0Pos,l,u="slide",c=t.axisCollapseWidth,f=this._model.get("axisExpandSlideTriggerArea"),d=f[0]!=null;if(c)d&&c&&s<i*f[0]?(u="jump",l=s-i*f[2]):d&&c&&s>i*(1-f[0])?(u="jump",l=s-i*(1-f[2])):(l=s-i*f[1])>=0&&(l=s-i*(1-f[1]))<=0&&(l=0),l*=t.axisExpandWidth/c,l?rs(l,a,o,"all"):u="none";else{var h=a[1]-a[0],v=o[1]*s/h;a=[nF(0,v-h/2)],a[1]=rF(o[1],a[0]+h),a[0]=a[1]-h}return{axisExpandWindow:a,behavior:u}},r})();function og(r,e){return rF(nF(r,e[0]),e[1])}function Zne(r,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*r,axisNameAvailableWidth:t,axisLabelShow:!0}}function Kne(r,e){var t=e.layoutLength,n=e.axisExpandWidth,a=e.axisCount,i=e.axisCollapseWidth,o=e.winInnerIndices,s,l=i,u=!1,c;return r<o[0]?(s=r*i,c=i):r<=o[1]?(s=e.axisExpandWindow0Pos+r*n-e.axisExpandWindow[0],l=n,u=!0):(s=t-(a-1-r)*i,c=i),{position:s,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:c}}function qne(r,e){var t=[];return r.eachComponent("parallel",function(n,a){var i=new Xne(n,r,e);i.name="parallel_"+a,i.resize(n,e),n.coordinateSystem=i,i.model=n,t.push(i)}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="parallel"){var a=n.getReferringComponents("parallel",jt).models[0];n.coordinateSystem=a.coordinateSystem}}),t}var Qne={create:qne},dw=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.activeIntervals=[],t}return e.prototype.getAreaSelectStyle=function(){return Cl([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},e.prototype.setActiveIntervals=function(t){var n=this.activeIntervals=Ae(t);if(n)for(var a=n.length-1;a>=0;a--)kn(n[a])},e.prototype.getActiveState=function(t){var n=this.activeIntervals;if(!n.length)return"normal";if(t==null||isNaN(+t))return"inactive";if(n.length===1){var a=n[0];if(a[0]<=t&&t<=a[1])return"active"}else for(var i=0,o=n.length;i<o;i++)if(n[i][0]<=t&&t<=n[i][1])return"active";return"inactive"},e})(Je);Wt(dw,$c);var Dl=!0,_h=Math.min,bc=Math.max,Jne=Math.pow,eae=1e4,tae=6,rae=6,$R="globalPan",nae={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},aae={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},HR={brushStyle:{lineWidth:2,stroke:ee.color.backgroundTint,fill:ee.color.borderTint},transformable:!0,brushMode:"single",removeOnClick:!1},iae=0,KC=(function(r){Q(e,r);function e(t){var n=r.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=t,n.group=new Le,n._uid="brushController_"+iae++,z(dae,function(a,i){this._handlers[i]=ye(a,this)},n),n}return e.prototype.enableBrush=function(t){return this._brushType&&this._doDisableBrush(),t.brushType&&this._doEnableBrush(t),this},e.prototype._doEnableBrush=function(t){var n=this._zr;this._enableGlobalPan||Gee(n,$R,this._uid),z(this._handlers,function(a,i){n.on(i,a)}),this._brushType=t.brushType,this._brushOption=Ye(Ae(HR),t,!0)},e.prototype._doDisableBrush=function(){var t=this._zr;Wee(t,$R,this._uid),z(this._handlers,function(n,a){t.off(a,n)}),this._brushType=this._brushOption=null},e.prototype.setPanels=function(t){if(t&&t.length){var n=this._panels={};z(t,function(a){n[a.panelId]=Ae(a)})}else this._panels=null;return this},e.prototype.mount=function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var n=this.group;return this._zr.add(n),n.attr({x:t.x||0,y:t.y||0,rotation:t.rotation||0,scaleX:t.scaleX||1,scaleY:t.scaleY||1}),this._transform=n.getLocalTransform(),this},e.prototype.updateCovers=function(t){t=ue(t,function(d){return Ye(Ae(HR),d,!0)});var n="\0-brush-index-",a=this._covers,i=this._covers=[],o=this,s=this._creatingCover;return new Ki(a,t,u,l).add(c).update(c).remove(f).execute(),this;function l(d,h){return(d.id!=null?d.id:n+h)+"-"+d.brushType}function u(d,h){return l(d.__brushOption,h)}function c(d,h){var v=t[d];if(h!=null&&a[h]===s)i[d]=a[h];else{var y=i[d]=h!=null?(a[h].__brushOption=v,a[h]):iF(o,aF(o,v));qC(o,y)}}function f(d){a[d]!==s&&o.group.remove(a[d])}},e.prototype.unmount=function(){return this.enableBrush(!1),hw(this),this._zr.remove(this.group),this},e.prototype.dispose=function(){this.unmount(),this.off()},e})(ra);function aF(r,e){var t=Hm[e.brushType].createCover(r,e);return t.__brushOption=e,sF(t,e),r.group.add(t),t}function iF(r,e){var t=QC(e);return t.endCreating&&(t.endCreating(r,e),sF(e,e.__brushOption)),e}function oF(r,e){var t=e.__brushOption;QC(e).updateCoverShape(r,e,t.range,t)}function sF(r,e){var t=e.z;t==null&&(t=eae),r.traverse(function(n){n.z=t,n.z2=t})}function qC(r,e){QC(e).updateCommon(r,e),oF(r,e)}function QC(r){return Hm[r.__brushOption.brushType]}function JC(r,e,t){var n=r._panels;if(!n)return Dl;var a,i=r._transform;return z(n,function(o){o.isTargetByCursor(e,t,i)&&(a=o)}),a}function lF(r,e){var t=r._panels;if(!t)return Dl;var n=e.__brushOption.panelId;return n!=null?t[n]:Dl}function hw(r){var e=r._covers,t=e.length;return z(e,function(n){r.group.remove(n)},r),e.length=0,!!t}function Pl(r,e){var t=ue(r._covers,function(n){var a=n.__brushOption,i=Ae(a.range);return{brushType:a.brushType,panelId:a.panelId,range:i}});r.trigger("brush",{areas:t,isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function oae(r){var e=r._track;if(!e.length)return!1;var t=e[e.length-1],n=e[0],a=t[0]-n[0],i=t[1]-n[1],o=Jne(a*a+i*i,.5);return o>tae}function uF(r){var e=r.length-1;return e<0&&(e=0),[r[0],r[e]]}function cF(r,e,t,n){var a=new Le;return a.add(new Qe({name:"main",style:e2(t),silent:!0,draggable:!0,cursor:"move",drift:$e(UR,r,e,a,["n","s","w","e"]),ondragend:$e(Pl,e,{isEnd:!0})})),z(n,function(i){a.add(new Qe({name:i.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:$e(UR,r,e,a,i),ondragend:$e(Pl,e,{isEnd:!0})}))}),a}function fF(r,e,t,n){var a=n.brushStyle.lineWidth||0,i=bc(a,rae),o=t[0][0],s=t[1][0],l=o-a/2,u=s-a/2,c=t[0][1],f=t[1][1],d=c-i+a/2,h=f-i+a/2,v=c-o,y=f-s,m=v+a,x=y+a;Ci(r,e,"main",o,s,v,y),n.transformable&&(Ci(r,e,"w",l,u,i,x),Ci(r,e,"e",d,u,i,x),Ci(r,e,"n",l,u,m,i),Ci(r,e,"s",l,h,m,i),Ci(r,e,"nw",l,u,i,i),Ci(r,e,"ne",d,u,i,i),Ci(r,e,"sw",l,h,i,i),Ci(r,e,"se",d,h,i,i))}function pw(r,e){var t=e.__brushOption,n=t.transformable,a=e.childAt(0);a.useStyle(e2(t)),a.attr({silent:!n,cursor:n?"move":"default"}),z([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(i){var o=e.childOfName(i.join("")),s=i.length===1?vw(r,i[0]):lae(r,i);o&&o.attr({silent:!n,invisible:!n,cursor:n?aae[s]+"-resize":null})})}function Ci(r,e,t,n,a,i,o){var s=e.childOfName(t);s&&s.setShape(cae(t2(r,e,[[n,a],[n+i,a+o]])))}function e2(r){return De({strokeNoScale:!0},r.brushStyle)}function dF(r,e,t,n){var a=[_h(r,t),_h(e,n)],i=[bc(r,t),bc(e,n)];return[[a[0],i[0]],[a[1],i[1]]]}function sae(r){return Xo(r.group)}function vw(r,e){var t={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},a=km(t[e],sae(r));return n[a]}function lae(r,e){var t=[vw(r,e[0]),vw(r,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function UR(r,e,t,n,a,i){var o=t.__brushOption,s=r.toRectRange(o.range),l=hF(e,a,i);z(n,function(u){var c=nae[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=r.fromRectRange(dF(s[0][0],s[1][0],s[0][1],s[1][1])),qC(e,t),Pl(e,{isEnd:!1})}function uae(r,e,t,n){var a=e.__brushOption.range,i=hF(r,t,n);z(a,function(o){o[0]+=i[0],o[1]+=i[1]}),qC(r,e),Pl(r,{isEnd:!1})}function hF(r,e,t){var n=r.group,a=n.transformCoordToLocal(e,t),i=n.transformCoordToLocal(0,0);return[a[0]-i[0],a[1]-i[1]]}function t2(r,e,t){var n=lF(r,e);return n&&n!==Dl?n.clipPath(t,r._transform):Ae(t)}function cae(r){var e=_h(r[0][0],r[1][0]),t=_h(r[0][1],r[1][1]),n=bc(r[0][0],r[1][0]),a=bc(r[0][1],r[1][1]);return{x:e,y:t,width:n-e,height:a-t}}function fae(r,e,t){if(!(!r._brushType||hae(r,e.offsetX,e.offsetY))){var n=r._zr,a=r._covers,i=JC(r,e,t);if(!r._dragging)for(var o=0;o<a.length;o++){var s=a[o].__brushOption;if(i&&(i===Dl||s.panelId===i.panelId)&&Hm[s.brushType].contain(a[o],t[0],t[1]))return}i&&n.setCursorStyle("crosshair")}}function gw(r){var e=r.event;e.preventDefault&&e.preventDefault()}function yw(r,e,t){return r.childOfName("main").contain(e,t)}function pF(r,e,t,n){var a=r._creatingCover,i=r._creatingPanel,o=r._brushOption,s;if(r._track.push(t.slice()),oae(r)||a){if(i&&!a){o.brushMode==="single"&&hw(r);var l=Ae(o);l.brushType=YR(l.brushType,i),l.panelId=i===Dl?null:i.panelId,a=r._creatingCover=aF(r,l),r._covers.push(a)}if(a){var u=Hm[YR(r._brushType,i)],c=a.__brushOption;c.range=u.getCreatingRange(t2(r,a,r._track)),n&&(iF(r,a),u.updateCommon(r,a)),oF(r,a),s={isEnd:n}}}else n&&o.brushMode==="single"&&o.removeOnClick&&JC(r,e,t)&&hw(r)&&(s={isEnd:n,removeOnClick:!0});return s}function YR(r,e){return r==="auto"?e.defaultBrushType:r}var dae={mousedown:function(r){if(this._dragging)XR(this,r);else if(!r.target||!r.target.draggable){gw(r);var e=this.group.transformCoordToLocal(r.offsetX,r.offsetY);this._creatingCover=null;var t=this._creatingPanel=JC(this,r,e);t&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(r){var e=r.offsetX,t=r.offsetY,n=this.group.transformCoordToLocal(e,t);if(fae(this,r,n),this._dragging){gw(r);var a=pF(this,r,n,!1);a&&Pl(this,a)}},mouseup:function(r){XR(this,r)}};function XR(r,e){if(r._dragging){gw(e);var t=e.offsetX,n=e.offsetY,a=r.group.transformCoordToLocal(t,n),i=pF(r,e,a,!0);r._dragging=!1,r._track=[],r._creatingCover=null,i&&Pl(r,i)}}function hae(r,e,t){var n=r._zr;return e<0||e>n.getWidth()||t<0||t>n.getHeight()}var Hm={lineX:ZR(0),lineY:ZR(1),rect:{createCover:function(r,e){function t(n){return n}return cF({toRectRange:t,fromRectRange:t},r,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var e=uF(r);return dF(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(r,e,t,n){fF(r,e,t,n)},updateCommon:pw,contain:yw},polygon:{createCover:function(r,e){var t=new Le;return t.add(new Cr({name:"main",style:e2(e),silent:!0})),t},getCreatingRange:function(r){return r},endCreating:function(r,e){e.remove(e.childAt(0)),e.add(new zr({name:"main",draggable:!0,drift:$e(uae,r,e),ondragend:$e(Pl,r,{isEnd:!0})}))},updateCoverShape:function(r,e,t,n){e.childAt(0).setShape({points:t2(r,e,t)})},updateCommon:pw,contain:yw}};function ZR(r){return{createCover:function(e,t){return cF({toRectRange:function(n){var a=[n,[0,100]];return r&&a.reverse(),a},fromRectRange:function(n){return n[r]}},e,t,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(e){var t=uF(e),n=_h(t[0][r],t[1][r]),a=bc(t[0][r],t[1][r]);return[n,a]},updateCoverShape:function(e,t,n,a){var i,o=lF(e,t);if(o!==Dl&&o.getLinearBrushOtherExtent)i=o.getLinearBrushOtherExtent(r);else{var s=e._zr;i=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[n,i];r&&l.reverse(),fF(e,t,l,a)},updateCommon:pw,contain:yw}}function vF(r){return r=r2(r),function(e){return DT(e,r)}}function gF(r,e){return r=r2(r),function(t){var n=e??t,a=n?r.width:r.height,i=n?r.x:r.y;return[i,i+(a||0)]}}function yF(r,e,t){var n=r2(r);return function(a,i){return n.contain(i[0],i[1])&&!_4(a,e,t)}}function r2(r){return ze.create(r)}var pae=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){r.prototype.init.apply(this,arguments),(this._brushController=new KC(n.getZr())).on("brush",ye(this._onBrush,this))},e.prototype.render=function(t,n,a,i){if(!vae(t,n,i)){this.axisModel=t,this.api=a,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Le,this.group.add(this._axisGroup),!!t.get("show")){var s=yae(t,n),l=s.coordinateSystem,u=t.getAreaSelectStyle(),c=u.width,f=t.axis.dim,d=l.getAxisLayout(f),h=ie({strokeContainThreshold:c},d),v=new Jr(t,a,h);v.build(),this._axisGroup.add(v.group),this._refreshBrushController(h,u,t,s,c,a),Bh(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,n,a,i,o,s){var l=a.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),f=ze.create({x:l[0],y:-o/2,width:u,height:o});f.x-=c,f.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:vF(f),isTargetByCursor:yF(f,s,i),getLinearBrushOtherExtent:gF(f,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(gae(a))},e.prototype._onBrush=function(t){var n=t.areas,a=this.axisModel,i=a.axis,o=ue(n,function(s){return[i.coordToData(s.range[0],!0),i.coordToData(s.range[1],!0)]});(!a.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:a.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e})(Ct);function vae(r,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===r}function gae(r){var e=r.axis;return ue(r.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function yae(r,e){return e.getComponent("parallel",r.get("parallelIndex"))}var mae={type:"axisAreaSelect",event:"axisAreaSelected"};function xae(r){r.registerAction(mae,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(n){n.axis.model.setActiveIntervals(e.intervals)})}),r.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(n){n.setAxisExpand(e)})})}var Sae={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function mF(r){r.registerComponentView(Gne),r.registerComponentModel($ne),r.registerCoordinateSystem("parallel",Qne),r.registerPreprocessor(jne),r.registerComponentModel(dw),r.registerComponentView(pae),xc(r,"parallel",dw,Sae),xae(r)}function bae(r){Ze(mF),r.registerChartView(Ine),r.registerSeriesModel(Rne),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,Nne)}var _ae=(function(){function r(){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 r})(),wae=(function(r){Q(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new _ae},e.prototype.buildPath=function(t,n){var a=n.extent;t.moveTo(n.x1,n.y1),t.bezierCurveTo(n.cpx1,n.cpy1,n.cpx2,n.cpy2,n.x2,n.y2),n.orient==="vertical"?(t.lineTo(n.x2+a,n.y2),t.bezierCurveTo(n.cpx2+a,n.cpy2,n.cpx1+a,n.cpy1,n.x1+a,n.y1)):(t.lineTo(n.x2,n.y2+a),t.bezierCurveTo(n.cpx2,n.cpy2+a,n.cpx1,n.cpy1+a,n.x1,n.y1+a)),t.closePath()},e.prototype.highlight=function(){Xi(this)},e.prototype.downplay=function(){Zi(this)},e})(nt),Tae=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._mainGroup=new Le,t._focusAdjacencyDisabled=!1,t}return e.prototype.init=function(t,n){this._controller=new Vl(n.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,n,a){var i=this,o=t.getGraph(),s=this._mainGroup,l=t.layoutInfo,u=l.width,c=l.height,f=t.getData(),d=t.getData("edge"),h=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,this._updateViewCoordSys(t,a),w4(t,a,s,this._controller,this._controllerHost,null),o.eachEdge(function(v){var y=new wae,m=je(y);m.dataIndex=v.dataIndex,m.seriesIndex=t.seriesIndex,m.dataType="edge";var x=v.getModel(),_=x.getModel("lineStyle"),T=_.get("curveness"),C=v.node1.getLayout(),k=v.node1.getModel(),A=k.get("localX"),L=k.get("localY"),D=v.node2.getLayout(),P=v.node2.getModel(),E=P.get("localX"),O=P.get("localY"),B=v.getLayout(),N,W,H,$,Z,G,X,K;y.shape.extent=Math.max(1,B.dy),y.shape.orient=h,h==="vertical"?(N=(A!=null?A*u:C.x)+B.sy,W=(L!=null?L*c:C.y)+C.dy,H=(E!=null?E*u:D.x)+B.ty,$=O!=null?O*c:D.y,Z=N,G=W*(1-T)+$*T,X=H,K=W*T+$*(1-T)):(N=(A!=null?A*u:C.x)+C.dx,W=(L!=null?L*c:C.y)+B.sy,H=E!=null?E*u:D.x,$=(O!=null?O*c:D.y)+B.ty,Z=N*(1-T)+H*T,G=W,X=N*T+H*(1-T),K=$),y.setShape({x1:N,y1:W,x2:H,y2:$,cpx1:Z,cpy1:G,cpx2:X,cpy2:K}),y.useStyle(_.getItemStyle()),KR(y.style,h,v);var V=""+x.get("value"),U=sr(x,"edgeLabel");vr(y,U,{labelFetcher:{getFormattedLabel:function(re,_e,Ne,ve,fe,Te){return t.getFormattedLabel(re,_e,"edge",ve,hn(fe,U.normal&&U.normal.get("formatter"),V),Te)}},labelDataIndex:v.dataIndex,defaultText:V}),y.setTextConfig({position:"inside"});var ae=x.getModel("emphasis");or(y,x,"lineStyle",function(re){var _e=re.getItemStyle();return KR(_e,h,v),_e}),s.add(y),d.setItemGraphicEl(v.dataIndex,y);var ce=ae.get("focus");Pt(y,ce==="adjacency"?v.getAdjacentDataIndices():ce==="trajectory"?v.getTrajectoryDataIndices():ce,ae.get("blurScope"),ae.get("disabled"))}),o.eachNode(function(v){var y=v.getLayout(),m=v.getModel(),x=m.get("localX"),_=m.get("localY"),T=m.getModel("emphasis"),C=m.get(["itemStyle","borderRadius"])||0,k=new Qe({shape:{x:x!=null?x*u:y.x,y:_!=null?_*c:y.y,width:y.dx,height:y.dy,r:C},style:m.getModel("itemStyle").getItemStyle(),z2:10});vr(k,sr(m),{labelFetcher:{getFormattedLabel:function(L,D){return t.getFormattedLabel(L,D,"node")}},labelDataIndex:v.dataIndex,defaultText:v.id}),k.disableLabelAnimation=!0,k.setStyle("fill",v.getVisual("color")),k.setStyle("decal",v.getVisual("style").decal),or(k,m),s.add(k),f.setItemGraphicEl(v.dataIndex,k),je(k).dataType="node";var A=T.get("focus");Pt(k,A==="adjacency"?v.getAdjacentDataIndices():A==="trajectory"?v.getTrajectoryDataIndices():A,T.get("blurScope"),T.get("disabled"))}),f.eachItemGraphicEl(function(v,y){var m=f.getItemModel(y);m.get("draggable")&&(v.drift=function(x,_){i._focusAdjacencyDisabled=!0,this.shape.x+=x,this.shape.y+=_,this.dirty(),a.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:f.getRawIndex(y),localX:this.shape.x/u,localY:this.shape.y/c})},v.ondragend=function(){i._focusAdjacencyDisabled=!1},v.draggable=!0,v.cursor="move")}),!this._data&&t.isAnimationEnabled()&&s.setClipPath(Cae(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._updateViewCoordSys=function(t,n){var a=t.layoutInfo,i=a.width,o=a.height,s=t.coordinateSystem=new Gl(null,{api:n,ecModel:t.ecModel});s.zoomLimit=t.get("scaleLimit"),s.setBoundingRect(0,0,i,o),s.setCenter(t.get("center")),s.setZoom(t.get("zoom")),this._controllerHost.target.attr({x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY})},e.type="sankey",e})(mt);function KR(r,e,t){switch(r.fill){case"source":r.fill=t.node1.getVisual("color"),r.decal=t.node1.getVisual("style").decal;break;case"target":r.fill=t.node2.getVisual("color"),r.decal=t.node2.getVisual("style").decal;break;case"gradient":var n=t.node1.getVisual("color"),a=t.node2.getVisual("color");pe(n)&&pe(a)&&(r.fill=new zl(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:n,offset:0},{color:a,offset:1}]))}}function Cae(r,e,t){var n=new Qe({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return It(n,{shape:{width:r.width+20}},e,t),n}var Mae=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,n){var a=t.edges||t.links||[],i=t.data||t.nodes||[],o=t.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=ZC(i,a,this,!0,c);return u.data;function c(f,d){f.wrapMethod("getItemModel",function(h,v){var y=h.parentModel,m=y.getData().getItemLayout(v);if(m){var x=m.depth,_=y.levelModels[x];_&&(h.parentModel=_)}return h}),d.wrapMethod("getItemModel",function(h,v){var y=h.parentModel,m=y.getGraph().getEdgeByIndex(v),x=m.node1.getLayout();if(x){var _=x.depth,T=y.levelModels[_];T&&(h.parentModel=T)}return h})}},e.prototype.setNodePosition=function(t,n){var a=this.option.data||this.option.nodes,i=a[t];i.localX=n[0],i.localY=n[1]},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,n,a){function i(h){return isNaN(h)||h==null}if(a==="edge"){var o=this.getDataParams(t,a),s=o.data,l=o.value,u=s.source+" -- "+s.target;return rr("nameValue",{name:u,value:l,noValue:i(l)})}else{var c=this.getGraph().getNodeByIndex(t),f=c.getLayout().value,d=this.getDataParams(t,a).data.name;return rr("nameValue",{name:d!=null?d+"":null,value:f,noValue:i(f)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,n){var a=r.prototype.getDataParams.call(this,t,n);if(a.value==null&&n==="node"){var i=this.getGraph().getNodeByIndex(t),o=i.getLayout().value;a.value=o}return a},e.type="series.sankey",e.layoutMode="box",e.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:ee.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:ee.color.primary}},animationEasing:"linear",animationDuration:1e3},e})(St);function kae(r,e){r.eachSeriesByType("sankey",function(t){var n=t.get("nodeWidth"),a=t.get("nodeGap"),i=lr(t,e).refContainer,o=Dt(t.getBoxLayoutParams(),i);t.layoutInfo=o;var s=o.width,l=o.height,u=t.getGraph(),c=u.nodes,f=u.edges;Lae(c);var d=ht(c,function(m){return m.getLayout().value===0}),h=d.length!==0?0:t.get("layoutIterations"),v=t.get("orient"),y=t.get("nodeAlign");Aae(c,f,n,a,s,l,h,v,y)})}function Aae(r,e,t,n,a,i,o,s,l){Iae(r,e,t,a,i,s,l),Eae(r,e,i,a,n,o,s),Wae(r,s)}function Lae(r){z(r,function(e){var t=qo(e.outEdges,Fy),n=qo(e.inEdges,Fy),a=e.getValue()||0,i=Math.max(t,n,a);e.setLayout({value:i},!0)})}function Iae(r,e,t,n,a,i,o){for(var s=[],l=[],u=[],c=[],f=0,d=0;d<e.length;d++)s[d]=1;for(var d=0;d<r.length;d++)l[d]=r[d].inEdges.length,l[d]===0&&u.push(r[d]);for(var h=-1;u.length;){for(var v=0;v<u.length;v++){var y=u[v],m=y.hostGraph.data.getRawDataItem(y.dataIndex),x=m.depth!=null&&m.depth>=0;x&&m.depth>h&&(h=m.depth),y.setLayout({depth:x?m.depth:f},!0),i==="vertical"?y.setLayout({dy:t},!0):y.setLayout({dx:t},!0);for(var _=0;_<y.outEdges.length;_++){var T=y.outEdges[_],C=e.indexOf(T);s[C]=0;var k=T.node2,A=r.indexOf(k);--l[A]===0&&c.indexOf(k)<0&&c.push(k)}}++f,u=c,c=[]}for(var d=0;d<s.length;d++)if(s[d]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var L=h>f-1?h:f-1;o&&o!=="left"&&Dae(r,o,i,L);var D=i==="vertical"?(a-t)/L:(n-t)/L;Rae(r,D,i)}function xF(r){var e=r.hostGraph.data.getRawDataItem(r.dataIndex);return e.depth!=null&&e.depth>=0}function Dae(r,e,t,n){if(e==="right"){for(var a=[],i=r,o=0;i.length;){for(var s=0;s<i.length;s++){var l=i[s];l.setLayout({skNodeHeight:o},!0);for(var u=0;u<l.inEdges.length;u++){var c=l.inEdges[u];a.indexOf(c.node1)<0&&a.push(c.node1)}}i=a,a=[],++o}z(r,function(f){xF(f)||f.setLayout({depth:Math.max(0,n-f.getLayout().skNodeHeight)},!0)})}else e==="justify"&&Pae(r,n)}function Pae(r,e){z(r,function(t){!xF(t)&&!t.outEdges.length&&t.setLayout({depth:e},!0)})}function Rae(r,e,t){z(r,function(n){var a=n.getLayout().depth*e;t==="vertical"?n.setLayout({y:a},!0):n.setLayout({x:a},!0)})}function Eae(r,e,t,n,a,i,o){var s=zae(r,o);Oae(s,e,t,n,a,o),BS(s,a,t,n,o);for(var l=1;i>0;i--)l*=.99,Nae(s,l,o),BS(s,a,t,n,o),Gae(s,l,o),BS(s,a,t,n,o)}function zae(r,e){var t=[],n=e==="vertical"?"y":"x",a=r_(r,function(i){return i.getLayout()[n]});return a.keys.sort(function(i,o){return i-o}),z(a.keys,function(i){t.push(a.buckets.get(i))}),t}function Oae(r,e,t,n,a,i){var o=1/0;z(r,function(s){var l=s.length,u=0;z(s,function(f){u+=f.getLayout().value});var c=i==="vertical"?(n-(l-1)*a)/u:(t-(l-1)*a)/u;c<o&&(o=c)}),z(r,function(s){z(s,function(l,u){var c=l.getLayout().value*o;i==="vertical"?(l.setLayout({x:u},!0),l.setLayout({dx:c},!0)):(l.setLayout({y:u},!0),l.setLayout({dy:c},!0))})}),z(e,function(s){var l=+s.getValue()*o;s.setLayout({dy:l},!0)})}function BS(r,e,t,n,a){var i=a==="vertical"?"x":"y";z(r,function(o){o.sort(function(y,m){return y.getLayout()[i]-m.getLayout()[i]});for(var s,l,u,c=0,f=o.length,d=a==="vertical"?"dx":"dy",h=0;h<f;h++)l=o[h],u=c-l.getLayout()[i],u>0&&(s=l.getLayout()[i]+u,a==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[i]+l.getLayout()[d]+e;var v=a==="vertical"?n:t;if(u=c-e-v,u>0){s=l.getLayout()[i]-u,a==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var h=f-2;h>=0;--h)l=o[h],u=l.getLayout()[i]+l.getLayout()[d]+e-c,u>0&&(s=l.getLayout()[i]-u,a==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[i]}})}function Nae(r,e,t){z(r.slice().reverse(),function(n){z(n,function(a){if(a.outEdges.length){var i=qo(a.outEdges,jae,t)/qo(a.outEdges,Fy);if(isNaN(i)){var o=a.outEdges.length;i=o?qo(a.outEdges,Bae,t)/o:0}if(t==="vertical"){var s=a.getLayout().x+(i-ns(a,t))*e;a.setLayout({x:s},!0)}else{var l=a.getLayout().y+(i-ns(a,t))*e;a.setLayout({y:l},!0)}}})})}function jae(r,e){return ns(r.node2,e)*r.getValue()}function Bae(r,e){return ns(r.node2,e)}function Fae(r,e){return ns(r.node1,e)*r.getValue()}function Vae(r,e){return ns(r.node1,e)}function ns(r,e){return e==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function Fy(r){return r.getValue()}function qo(r,e,t){for(var n=0,a=r.length,i=-1;++i<a;){var o=+e(r[i],t);isNaN(o)||(n+=o)}return n}function Gae(r,e,t){z(r,function(n){z(n,function(a){if(a.inEdges.length){var i=qo(a.inEdges,Fae,t)/qo(a.inEdges,Fy);if(isNaN(i)){var o=a.inEdges.length;i=o?qo(a.inEdges,Vae,t)/o:0}if(t==="vertical"){var s=a.getLayout().x+(i-ns(a,t))*e;a.setLayout({x:s},!0)}else{var l=a.getLayout().y+(i-ns(a,t))*e;a.setLayout({y:l},!0)}}})})}function Wae(r,e){var t=e==="vertical"?"x":"y";z(r,function(n){n.outEdges.sort(function(a,i){return a.node2.getLayout()[t]-i.node2.getLayout()[t]}),n.inEdges.sort(function(a,i){return a.node1.getLayout()[t]-i.node1.getLayout()[t]})}),z(r,function(n){var a=0,i=0;z(n.outEdges,function(o){o.setLayout({sy:a},!0),a+=o.getLayout().dy}),z(n.inEdges,function(o){o.setLayout({ty:i},!0),i+=o.getLayout().dy})})}function $ae(r){r.eachSeriesByType("sankey",function(e){var t=e.getGraph(),n=t.nodes,a=t.edges;if(n.length){var i=1/0,o=-1/0;z(n,function(s){var l=s.getLayout().value;l<i&&(i=l),l>o&&(o=l)}),z(n,function(s){var l=new pr({type:"color",mappingMethod:"linear",dataExtent:[i,o],visual:e.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}))})}a.length&&z(a,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function Hae(r){r.registerChartView(Tae),r.registerSeriesModel(Mae),r.registerLayout(kae),r.registerVisual($ae),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(n){n.setNodePosition(e.dataIndex,[e.localX,e.localY])})}),r.registerAction({type:"sankeyRoam",event:"sankeyRoam",update:"none"},function(e,t,n){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(a){var i=a.coordinateSystem,o=Vm(i,e,a.get("scaleLimit"));a.setCenter(o.center),a.setZoom(o.zoom)})})}var SF=(function(){function r(){}return r.prototype._hasEncodeRule=function(e){var t=this.getEncode();return t&&t.get(e)!=null},r.prototype.getInitialData=function(e,t){var n,a=t.getComponent("xAxis",this.get("xAxisIndex")),i=t.getComponent("yAxis",this.get("yAxisIndex")),o=a.get("type"),s=i.get("type"),l;o==="category"?(e.layout="horizontal",n=a.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(e.layout="vertical",n=i.getOrdinalMeta(),l=!this._hasEncodeRule("y")):e.layout=e.layout||"horizontal";var u=["x","y"],c=e.layout==="horizontal"?0:1,f=this._baseAxisDim=u[c],d=u[1-c],h=[a,i],v=h[c].get("type"),y=h[1-c].get("type"),m=e.data;if(m&&l){var x=[];z(m,function(C,k){var A;le(C)?(A=C.slice(),C.unshift(k)):le(C.value)?(A=ie({},C),A.value=A.value.slice(),C.value.unshift(k)):A=C,x.push(A)}),e.data=x}var _=this.defaultValueDimensions,T=[{name:f,type:wy(v),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:d,type:wy(y),dimsDef:_.slice()}];return Uc(this,{coordDimensions:T,dimensionsCount:_.length+1,encodeDefaulter:$e(I5,T,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r})(),bF=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:ee.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:ee.color.shadow}},animationDuration:800},e})(St);Wt(bF,SF,!0);var Uae=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=t.get("layout")==="horizontal"?1:0;i.diff(s).add(function(u){if(i.hasValue(u)){var c=i.getItemLayout(u),f=qR(c,i,u,l,!0);i.setItemGraphicEl(u,f),o.add(f)}}).update(function(u,c){var f=s.getItemGraphicEl(c);if(!i.hasValue(u)){o.remove(f);return}var d=i.getItemLayout(u);f?(ta(f),_F(d,f,i,u)):f=qR(d,i,u,l),o.add(f),i.setItemGraphicEl(u,f)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).execute(),this._data=i},e.prototype.remove=function(t){var n=this.group,a=this._data;this._data=null,a&&a.eachItemGraphicEl(function(i){i&&n.remove(i)})},e.type="boxplot",e})(mt),Yae=(function(){function r(){}return r})(),Xae=(function(r){Q(e,r);function e(t){var n=r.call(this,t)||this;return n.type="boxplotBoxPath",n}return e.prototype.getDefaultShape=function(){return new Yae},e.prototype.buildPath=function(t,n){var a=n.points,i=0;for(t.moveTo(a[i][0],a[i][1]),i++;i<4;i++)t.lineTo(a[i][0],a[i][1]);for(t.closePath();i<a.length;i++)t.moveTo(a[i][0],a[i][1]),i++,t.lineTo(a[i][0],a[i][1])},e})(nt);function qR(r,e,t,n,a){var i=r.ends,o=new Xae({shape:{points:a?Zae(i,n,r):i}});return _F(r,o,e,t,a),o}function _F(r,e,t,n,a){var i=t.hostModel,o=Ol[a?"initProps":"updateProps"];o(e,{shape:{points:r.ends}},i,n),e.useStyle(t.getItemVisual(n,"style")),e.style.strokeNoScale=!0,e.z2=100;var s=t.getItemModel(n),l=s.getModel("emphasis");or(e,s),Pt(e,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function Zae(r,e,t){return ue(r,function(n){return n=n.slice(),n[e]=t.initBaseline,n})}var $d=z;function Kae(r){var e=qae(r);$d(e,function(t){var n=t.seriesModels;n.length&&(Qae(t),$d(n,function(a,i){Jae(a,t.boxOffsetList[i],t.boxWidthList[i])}))})}function qae(r){var e=[],t=[];return r.eachSeriesByType("boxplot",function(n){var a=n.getBaseAxis(),i=Ue(t,a);i<0&&(i=t.length,t[i]=a,e[i]={axis:a,seriesModels:[]}),e[i].seriesModels.push(n)}),e}function Qae(r){var e=r.axis,t=r.seriesModels,n=t.length,a=r.boxWidthList=[],i=r.boxOffsetList=[],o=[],s;if(e.type==="category")s=e.getBandWidth();else{var l=0;$d(t,function(v){l=Math.max(l,v.getData().count())});var u=e.getExtent();s=Math.abs(u[1]-u[0])/l}$d(t,function(v){var y=v.get("boxWidth");le(y)||(y=[y,y]),o.push([he(y[0],s)||0,he(y[1],s)||0])});var c=s*.8-2,f=c/n*.3,d=(c-f*(n-1))/n,h=d/2-c/2;$d(t,function(v,y){i.push(h),h+=f+d,a.push(Math.min(Math.max(d,o[y][0]),o[y][1]))})}function Jae(r,e,t){var n=r.coordinateSystem,a=r.getData(),i=t/2,o=r.get("layout")==="horizontal"?0:1,s=1-o,l=["x","y"],u=a.mapDimension(l[o]),c=a.mapDimensionsAll(l[s]);if(u==null||c.length<5)return;for(var f=0;f<a.count();f++){var d=a.get(u,f),h=T(d,c[2],f),v=T(d,c[0],f),y=T(d,c[1],f),m=T(d,c[3],f),x=T(d,c[4],f),_=[];C(_,y,!1),C(_,m,!0),_.push(v,y,x,m),k(_,v),k(_,x),k(_,h),a.setItemLayout(f,{initBaseline:h[s],ends:_})}function T(A,L,D){var P=a.get(L,D),E=[];E[o]=A,E[s]=P;var O;return isNaN(A)||isNaN(P)?O=[NaN,NaN]:(O=n.dataToPoint(E),O[o]+=e),O}function C(A,L,D){var P=L.slice(),E=L.slice();P[o]+=i,E[o]-=i,D?A.push(P,E):A.push(E,P)}function k(A,L){var D=L.slice(),P=L.slice();D[o]-=i,P[o]+=i,A.push(D,P)}}function eie(r,e){e=e||{};for(var t=[],n=[],a=e.boundIQR,i=a==="none"||a===0,o=0;o<r.length;o++){var s=kn(r[o].slice()),l=Lg(s,.25),u=Lg(s,.5),c=Lg(s,.75),f=s[0],d=s[s.length-1],h=(a??1.5)*(c-l),v=i?f:Math.max(f,l-h),y=i?d:Math.min(d,c+h),m=e.itemNameFormatter,x=Me(m)?m({value:o}):pe(m)?m.replace("{value}",o+""):o+"";t.push([x,v,l,u,c,y]);for(var _=0;_<s.length;_++){var T=s[_];if(T<v||T>y){var C=[x,T];n.push(C)}}}return{boxData:t,outliers:n}}var tie={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==Mr){var n="";gt(n)}var a=eie(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:a.boxData},{data:a.outliers}]}};function rie(r){r.registerSeriesModel(bF),r.registerChartView(Uae),r.registerLayout(Kae),r.registerTransform(tie)}var nie=["itemStyle","borderColor"],aie=["itemStyle","borderColor0"],iie=["itemStyle","borderColorDoji"],oie=["itemStyle","color"],sie=["itemStyle","color0"];function n2(r,e){return e.get(r>0?oie:sie)}function a2(r,e){return e.get(r===0?iie:r>0?nie:aie)}var lie={seriesType:"candlestick",plan:Bc(),performRawSeries:!0,reset:function(r,e){if(!e.isSeriesFiltered(r)){var t=r.pipelineContext.large;return!t&&{progress:function(n,a){for(var i;(i=n.next())!=null;){var o=a.getItemModel(i),s=a.getItemLayout(i).sign,l=o.getItemStyle();l.fill=n2(s,o),l.stroke=a2(s,o)||l.fill;var u=a.ensureUniqueItemVisual(i,"style");ie(u,l)}}}}}},uie=["color","borderColor"],cie=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,n,a){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,n,a,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,n):this._incrementalRenderNormal(t,n)},e.prototype.eachRendered=function(t){ls(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var n=t.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(t){var n=t.getData(),a=this._data,i=this.group,o=n.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||i.removeAll(),n.diff(a).add(function(c){if(n.hasValue(c)){var f=n.getItemLayout(c);if(s&&QR(u,f))return;var d=FS(f,c,!0);It(d,{shape:{points:f.ends}},t,c),VS(d,n,c,o),i.add(d),n.setItemGraphicEl(c,d)}}).update(function(c,f){var d=a.getItemGraphicEl(f);if(!n.hasValue(c)){i.remove(d);return}var h=n.getItemLayout(c);if(s&&QR(u,h)){i.remove(d);return}d?(ct(d,{shape:{points:h.ends}},t,c),ta(d)):d=FS(h),VS(d,n,c,o),i.add(d),n.setItemGraphicEl(c,d)}).remove(function(c){var f=a.getItemGraphicEl(c);f&&i.remove(f)}).execute(),this._data=n},e.prototype._renderLarge=function(t){this._clear(),JR(t,this.group);var n=t.get("clip",!0)?Uh(t.coordinateSystem,!1,t):null;n?this.group.setClipPath(n):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,n){for(var a=n.getData(),i=a.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=a.getItemLayout(o),l=FS(s);VS(l,a,o,i),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,n){JR(n,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e})(mt),fie=(function(){function r(){}return r})(),die=(function(r){Q(e,r);function e(t){var n=r.call(this,t)||this;return n.type="normalCandlestickBox",n}return e.prototype.getDefaultShape=function(){return new fie},e.prototype.buildPath=function(t,n){var a=n.points;this.__simpleBox?(t.moveTo(a[4][0],a[4][1]),t.lineTo(a[6][0],a[6][1])):(t.moveTo(a[0][0],a[0][1]),t.lineTo(a[1][0],a[1][1]),t.lineTo(a[2][0],a[2][1]),t.lineTo(a[3][0],a[3][1]),t.closePath(),t.moveTo(a[4][0],a[4][1]),t.lineTo(a[5][0],a[5][1]),t.moveTo(a[6][0],a[6][1]),t.lineTo(a[7][0],a[7][1]))},e})(nt);function FS(r,e,t){var n=r.ends;return new die({shape:{points:t?hie(n,r):n},z2:100})}function QR(r,e){for(var t=!0,n=0;n<e.ends.length;n++)if(r.contain(e.ends[n][0],e.ends[n][1])){t=!1;break}return t}function VS(r,e,t,n){var a=e.getItemModel(t);r.useStyle(e.getItemVisual(t,"style")),r.style.strokeNoScale=!0,r.__simpleBox=n,or(r,a);var i=e.getItemLayout(t).sign;z(r.states,function(s,l){var u=a.getModel(l),c=n2(i,u),f=a2(i,u)||c,d=s.style||(s.style={});c&&(d.fill=c),f&&(d.stroke=f)});var o=a.getModel("emphasis");Pt(r,o.get("focus"),o.get("blurScope"),o.get("disabled"))}function hie(r,e){return ue(r,function(t){return t=t.slice(),t[1]=e.initBaseline,t})}var pie=(function(){function r(){}return r})(),GS=(function(r){Q(e,r);function e(t){var n=r.call(this,t)||this;return n.type="largeCandlestickBox",n}return e.prototype.getDefaultShape=function(){return new pie},e.prototype.buildPath=function(t,n){for(var a=n.points,i=0;i<a.length;)if(this.__sign===a[i++]){var o=a[i++];t.moveTo(o,a[i++]),t.lineTo(o,a[i++])}else i+=3},e})(nt);function JR(r,e,t,n){var a=r.getData(),i=a.getLayout("largePoints"),o=new GS({shape:{points:i},__sign:1,ignoreCoarsePointer:!0});e.add(o);var s=new GS({shape:{points:i},__sign:-1,ignoreCoarsePointer:!0});e.add(s);var l=new GS({shape:{points:i},__sign:0,ignoreCoarsePointer:!0});e.add(l),WS(1,o,r),WS(-1,s,r),WS(0,l,r),n&&(o.incremental=!0,s.incremental=!0),t&&t.push(o,s)}function WS(r,e,t,n){var a=a2(r,t)||n2(r,t),i=t.getModel("itemStyle").getItemStyle(uie);e.useStyle(i),e.style.fill=null,e.style.stroke=a}var wF=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],t}return e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,n,a){var i=n.getItemLayout(t);return i&&a.rect(i.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.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},e})(St);Wt(wF,SF,!0);function vie(r){!r||!le(r.series)||z(r.series,function(e){Pe(e)&&e.type==="k"&&(e.type="candlestick")})}var gie={seriesType:"candlestick",plan:Bc(),reset:function(r){var e=r.coordinateSystem,t=r.getData(),n=yie(r,t),a=0,i=1,o=["x","y"],s=t.getDimensionIndex(t.mapDimension(o[a])),l=ue(t.mapDimensionsAll(o[i]),t.getDimensionIndex,t),u=l[0],c=l[1],f=l[2],d=l[3];if(t.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),s<0||l.length<4)return;return{progress:r.pipelineContext.large?v:h};function h(y,m){for(var x,_=m.getStore();(x=y.next())!=null;){var T=_.get(s,x),C=_.get(u,x),k=_.get(c,x),A=_.get(f,x),L=_.get(d,x),D=Math.min(C,k),P=Math.max(C,k),E=Z(D,T),O=Z(P,T),B=Z(A,T),N=Z(L,T),W=[];G(W,O,0),G(W,E,1),W.push(K(N),K(O),K(B),K(E));var H=m.getItemModel(x),$=!!H.get(["itemStyle","borderColorDoji"]);m.setItemLayout(x,{sign:eE(_,x,C,k,c,$),initBaseline:C>k?O[i]:E[i],ends:W,brushRect:X(A,L,T)})}function Z(V,U){var ae=[];return ae[a]=U,ae[i]=V,isNaN(U)||isNaN(V)?[NaN,NaN]:e.dataToPoint(ae)}function G(V,U,ae){var ce=U.slice(),re=U.slice();ce[a]=Dg(ce[a]+n/2,1,!1),re[a]=Dg(re[a]-n/2,1,!0),ae?V.push(ce,re):V.push(re,ce)}function X(V,U,ae){var ce=Z(V,ae),re=Z(U,ae);return ce[a]-=n/2,re[a]-=n/2,{x:ce[0],y:ce[1],width:n,height:re[1]-ce[1]}}function K(V){return V[a]=Dg(V[a],1),V}}function v(y,m){for(var x=Za(y.count*4),_=0,T,C=[],k=[],A,L=m.getStore(),D=!!r.get(["itemStyle","borderColorDoji"]);(A=y.next())!=null;){var P=L.get(s,A),E=L.get(u,A),O=L.get(c,A),B=L.get(f,A),N=L.get(d,A);if(isNaN(P)||isNaN(B)||isNaN(N)){x[_++]=NaN,_+=3;continue}x[_++]=eE(L,A,E,O,c,D),C[a]=P,C[i]=B,T=e.dataToPoint(C,null,k),x[_++]=T?T[0]:NaN,x[_++]=T?T[1]:NaN,C[i]=N,T=e.dataToPoint(C,null,k),x[_++]=T?T[1]:NaN}m.setLayout("largePoints",x)}}};function eE(r,e,t,n,a,i){var o;return t>n?o=-1:t<n?o=1:o=i?0:e>0?r.get(a,e-1)<=n?1:-1:1,o}function yie(r,e){var t=r.getBaseAxis(),n,a=t.type==="category"?t.getBandWidth():(n=t.getExtent(),Math.abs(n[1]-n[0])/e.count()),i=he(Ce(r.get("barMaxWidth"),a),a),o=he(Ce(r.get("barMinWidth"),1),a),s=r.get("barWidth");return s!=null?he(s,a):Math.max(Math.min(a/2,i),o)}function mie(r){r.registerChartView(cie),r.registerSeriesModel(wF),r.registerPreprocessor(vie),r.registerVisual(lie),r.registerLayout(gie)}function tE(r,e){var t=e.rippleEffectColor||e.color;r.eachChild(function(n){n.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var xie=(function(r){Q(e,r);function e(t,n){var a=r.call(this)||this,i=new $h(t,n),o=new Le;return a.add(i),a.add(o),a.updateData(t,n),a}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var n=t.symbolType,a=t.color,i=t.rippleNumber,o=this.childAt(1),s=0;s<i;s++){var l=Kt(n,-1,-1,2,2,a);l.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var u=-s/i*t.period+t.effectOffset;l.animate("",!0).when(t.period,{scaleX:t.rippleScale/2,scaleY:t.rippleScale/2}).delay(u).start(),l.animateStyle(!0).when(t.period,{opacity:0}).delay(u).start(),o.add(l)}tE(o,t)},e.prototype.updateEffectAnimation=function(t){for(var n=this._effectCfg,a=this.childAt(1),i=["symbolType","period","rippleScale","rippleNumber"],o=0;o<i.length;o++){var s=i[o];if(n[s]!==t[s]){this.stopEffectAnimation(),this.startEffectAnimation(t);return}}tE(a,t)},e.prototype.highlight=function(){Xi(this)},e.prototype.downplay=function(){Zi(this)},e.prototype.getSymbolType=function(){var t=this.childAt(0);return t&&t.getSymbolType()},e.prototype.updateData=function(t,n){var a=this,i=t.hostModel;this.childAt(0).updateData(t,n);var o=this.childAt(1),s=t.getItemModel(n),l=t.getItemVisual(n,"symbol"),u=Vc(t.getItemVisual(n,"symbolSize")),c=t.getItemVisual(n,"style"),f=c&&c.fill,d=s.getModel("emphasis");o.setScale(u),o.traverse(function(m){m.setStyle("fill",f)});var h=Bl(t.getItemVisual(n,"symbolOffset"),u);h&&(o.x=h[0],o.y=h[1]);var v=t.getItemVisual(n,"symbolRotate");o.rotation=(v||0)*Math.PI/180||0;var y={};y.showEffectOn=i.get("showEffectOn"),y.rippleScale=s.get(["rippleEffect","scale"]),y.brushType=s.get(["rippleEffect","brushType"]),y.period=s.get(["rippleEffect","period"])*1e3,y.effectOffset=n/t.count(),y.z=i.getShallow("z")||0,y.zlevel=i.getShallow("zlevel")||0,y.symbolType=l,y.color=f,y.rippleEffectColor=s.get(["rippleEffect","color"]),y.rippleNumber=s.get(["rippleEffect","number"]),y.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(y):this.startEffectAnimation(y),this._effectCfg=y):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(m){m==="emphasis"?y.showEffectOn!=="render"&&a.startEffectAnimation(y):m==="normal"&&y.showEffectOn!=="render"&&a.stopEffectAnimation()}),this._effectCfg=y,Pt(this,d.get("focus"),d.get("blurScope"),d.get("disabled"))},e.prototype.fadeOut=function(t){t&&t()},e})(Le),Sie=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._symbolDraw=new Hh(xie)},e.prototype.render=function(t,n,a){var i=t.getData(),o=this._symbolDraw;o.updateData(i,{clipShape:this._getClipShape(t)}),this.group.add(o.group)},e.prototype._getClipShape=function(t){var n=t.coordinateSystem,a=n&&n.getArea&&n.getArea();return t.get("clip",!0)?a:null},e.prototype.updateTransform=function(t,n,a){var i=t.getData();this.group.dirty();var o=Yh("").reset(t,n,a);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout()},e.prototype._updateGroupTransform=function(t){var n=t.coordinateSystem;n&&n.getRoamTransform&&(this.group.transform=DN(n.getRoamTransform()),this.group.decomposeTransform())},e.prototype.remove=function(t,n){this._symbolDraw&&this._symbolDraw.remove(!0)},e.type="effectScatter",e})(mt),bie=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,n){return di(null,this,{useEncodeDefaulter:!0})},e.prototype.brushSelector=function(t,n,a){return a.point(n.getItemLayout(t))},e.type="series.effectScatter",e.dependencies=["grid","polar"],e.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},e})(St);function _ie(r){r.registerChartView(Sie),r.registerSeriesModel(bie),r.registerLayout(Yh("effectScatter"))}var TF=(function(r){Q(e,r);function e(t,n,a){var i=r.call(this)||this;return i.add(i.createLine(t,n,a)),i._updateEffectSymbol(t,n),i}return e.prototype.createLine=function(t,n,a){return new YC(t,n,a)},e.prototype._updateEffectSymbol=function(t,n){var a=t.getItemModel(n),i=a.getModel("effect"),o=i.get("symbolSize"),s=i.get("symbol");le(o)||(o=[o,o]);var l=t.getItemVisual(n,"style"),u=i.get("color")||l&&l.stroke,c=this.childAt(1);this._symbolType!==s&&(this.remove(c),c=Kt(s,-.5,-.5,1,1,u),c.z2=100,c.culling=!0,this.add(c)),c&&(c.setStyle("shadowColor",u),c.setStyle(i.getItemStyle(["color"])),c.scaleX=o[0],c.scaleY=o[1],c.setColor(u),this._symbolType=s,this._symbolScale=o,this._updateEffectAnimation(t,i,n))},e.prototype._updateEffectAnimation=function(t,n,a){var i=this.childAt(1);if(i){var o=t.getItemLayout(a),s=n.get("period")*1e3,l=n.get("loop"),u=n.get("roundTrip"),c=n.get("constantSpeed"),f=Tr(n.get("delay"),function(h){return h/t.count()*s/3});if(i.ignore=!0,this._updateAnimationPoints(i,o),c>0&&(s=this._getLineLength(i)/c*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){i.stopAnimation();var d=void 0;Me(f)?d=f(a):d=f,i.__t>0&&(d=-s*i.__t),this._animateSymbol(i,s,d,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(t,n,a,i,o){if(n>0){t.__t=0;var s=this,l=t.animate("",i).when(o?n*2:n,{__t:o?2:1}).delay(a).during(function(){s._updateSymbolPosition(t)});i||l.done(function(){s.remove(t)}),l.start()}},e.prototype._getLineLength=function(t){return Ei(t.__p1,t.__cp1)+Ei(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,n){t.__p1=n[0],t.__p2=n[1],t.__cp1=n[2]||[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]},e.prototype.updateData=function(t,n,a){this.childAt(0).updateData(t,n,a),this._updateEffectSymbol(t,n)},e.prototype._updateSymbolPosition=function(t){var n=t.__p1,a=t.__p2,i=t.__cp1,o=t.__t<1?t.__t:2-t.__t,s=[t.x,t.y],l=s.slice(),u=wr,c=Fb;s[0]=u(n[0],i[0],a[0],o),s[1]=u(n[1],i[1],a[1],o);var f=t.__t<1?c(n[0],i[0],a[0],o):c(a[0],i[0],n[0],1-o),d=t.__t<1?c(n[1],i[1],a[1],o):c(a[1],i[1],n[1],1-o);t.rotation=-Math.atan2(d,f)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT<t.__t?(t.scaleY=Ei(l,s)*1.05,o===1&&(s[0]=l[0]+(s[0]-l[0])/2,s[1]=l[1]+(s[1]-l[1])/2)):t.__lastT===1?t.scaleY=2*Ei(n,s):t.scaleY=this._symbolScale[1]),t.__lastT=t.__t,t.ignore=!1,t.x=s[0],t.y=s[1]},e.prototype.updateLayout=function(t,n){this.childAt(0).updateLayout(t,n);var a=t.getItemModel(n).getModel("effect");this._updateEffectAnimation(t,a,n)},e})(Le),CF=(function(r){Q(e,r);function e(t,n,a){var i=r.call(this)||this;return i._createPolyline(t,n,a),i}return e.prototype._createPolyline=function(t,n,a){var i=t.getItemLayout(n),o=new Cr({shape:{points:i}});this.add(o),this._updateCommonStl(t,n,a)},e.prototype.updateData=function(t,n,a){var i=t.hostModel,o=this.childAt(0),s={shape:{points:t.getItemLayout(n)}};ct(o,s,i,n),this._updateCommonStl(t,n,a)},e.prototype._updateCommonStl=function(t,n,a){var i=this.childAt(0),o=t.getItemModel(n),s=a&&a.emphasisLineStyle,l=a&&a.focus,u=a&&a.blurScope,c=a&&a.emphasisDisabled;if(!a||t.hasItemOption){var f=o.getModel("emphasis");s=f.getModel("lineStyle").getLineStyle(),c=f.get("disabled"),l=f.get("focus"),u=f.get("blurScope")}i.useStyle(t.getItemVisual(n,"style")),i.style.fill=null,i.style.strokeNoScale=!0;var d=i.ensureState("emphasis");d.style=s,Pt(this,l,u,c)},e.prototype.updateLayout=function(t,n){var a=this.childAt(0);a.setShape("points",t.getItemLayout(n))},e})(Le),wie=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._lastFrame=0,t._lastFramePercent=0,t}return e.prototype.createLine=function(t,n,a){return new CF(t,n,a)},e.prototype._updateAnimationPoints=function(t,n){this._points=n;for(var a=[0],i=0,o=1;o<n.length;o++){var s=n[o-1],l=n[o];i+=Ei(s,l),a.push(i)}if(i===0){this._length=0;return}for(var o=0;o<a.length;o++)a[o]/=i;this._offsets=a,this._length=i},e.prototype._getLineLength=function(){return this._length},e.prototype._updateSymbolPosition=function(t){var n=t.__t<1?t.__t:2-t.__t,a=this._points,i=this._offsets,o=a.length;if(i){var s=this._lastFrame,l;if(n<this._lastFramePercent){var u=Math.min(s+1,o-1);for(l=u;l>=0&&!(i[l]<=n);l--);l=Math.min(l,o-2)}else{for(l=s;l<o&&!(i[l]>n);l++);l=Math.min(l-1,o-2)}var c=(n-i[l])/(i[l+1]-i[l]),f=a[l],d=a[l+1];t.x=f[0]*(1-c)+c*d[0],t.y=f[1]*(1-c)+c*d[1];var h=t.__t<1?d[0]-f[0]:f[0]-d[0],v=t.__t<1?d[1]-f[1]:f[1]-d[1];t.rotation=-Math.atan2(v,h)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=n,t.ignore=!1}},e})(TF),Tie=(function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r})(),Cie=(function(r){Q(e,r);function e(t){var n=r.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:ee.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new Tie},e.prototype.buildPath=function(t,n){var a=n.segs,i=n.curveness,o;if(n.polyline)for(o=this._off;o<a.length;){var s=a[o++];if(s>0){t.moveTo(a[o++],a[o++]);for(var l=1;l<s;l++)t.lineTo(a[o++],a[o++])}}else for(o=this._off;o<a.length;){var u=a[o++],c=a[o++],f=a[o++],d=a[o++];if(t.moveTo(u,c),i>0){var h=(u+f)/2-(c-d)*i,v=(c+d)/2-(f-u)*i;t.quadraticCurveTo(h,v,f,d)}else t.lineTo(f,d)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,n){var a=this.shape,i=a.segs,o=a.curveness,s=this.style.lineWidth;if(a.polyline)for(var l=0,u=0;u<i.length;){var c=i[u++];if(c>0)for(var f=i[u++],d=i[u++],h=1;h<c;h++){var v=i[u++],y=i[u++];if(zo(f,d,v,y,s,t,n))return l}l++}else for(var l=0,u=0;u<i.length;){var f=i[u++],d=i[u++],v=i[u++],y=i[u++];if(o>0){var m=(f+v)/2-(d-y)*o,x=(d+y)/2-(v-f)*o;if(Cj(f,d,m,x,v,y,s,t,n))return l}else if(zo(f,d,v,y,s,t,n))return l;l++}return-1},e.prototype.contain=function(t,n){var a=this.transformCoordToLocal(t,n),i=this.getBoundingRect();if(t=a[0],n=a[1],i.contain(t,n)){var o=this.hoverDataIdx=this.findDataIndex(t,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var n=this.shape,a=n.segs,i=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u<a.length;){var c=a[u++],f=a[u++];i=Math.min(c,i),s=Math.max(c,s),o=Math.min(f,o),l=Math.max(f,l)}t=this._rect=new ze(i,o,s,l)}return t},e})(nt),Mie=(function(){function r(){this.group=new Le}return r.prototype.updateData=function(e){this._clear();var t=this._create();t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e)},r.prototype.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clear()},r.prototype.incrementalUpdate=function(e,t){var n=this._newAdded[0],a=t.getLayout("linesPoints"),i=n&&n.shape.segs;if(i&&i.length<2e4){var o=i.length,s=new Float32Array(o+a.length);s.set(i),s.set(a,o),n.setShape({segs:s})}else{this._newAdded=[];var l=this._create();l.incremental=!0,l.setShape({segs:a}),this._setCommon(l,t),l.__startIndex=e.start}},r.prototype.remove=function(){this._clear()},r.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},r.prototype._create=function(){var e=new Cie({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(e),this.group.add(e),e},r.prototype._setCommon=function(e,t,n){var a=t.hostModel;e.setShape({polyline:a.get("polyline"),curveness:a.get(["lineStyle","curveness"])}),e.useStyle(a.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var i=t.getVisual("style");i&&i.stroke&&e.setStyle("stroke",i.stroke),e.setStyle("fill",null);var o=je(e);o.seriesIndex=a.seriesIndex,e.on("mousemove",function(s){o.dataIndex=null;var l=e.hoverDataIdx;l>0&&(o.dataIndex=l+e.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r})(),MF={seriesType:"lines",plan:Bc(),reset:function(r){var e=r.coordinateSystem;if(e){var t=r.get("polyline"),n=r.pipelineContext.large;return{progress:function(a,i){var o=[];if(n){var s=void 0,l=a.end-a.start;if(t){for(var u=0,c=a.start;c<a.end;c++)u+=r.getLineCoordsCount(c);s=new Float32Array(l+u*2)}else s=new Float32Array(l*4);for(var f=0,d=[],c=a.start;c<a.end;c++){var h=r.getLineCoords(c,o);t&&(s[f++]=h);for(var v=0;v<h;v++)d=e.dataToPoint(o[v],!1,d),s[f++]=d[0],s[f++]=d[1]}i.setLayout("linesPoints",s)}else for(var c=a.start;c<a.end;c++){var y=i.getItemModel(c),h=r.getLineCoords(c,o),m=[];if(t)for(var x=0;x<h;x++)m.push(e.dataToPoint(o[x]));else{m[0]=e.dataToPoint(o[0]),m[1]=e.dataToPoint(o[1]);var _=y.get(["lineStyle","curveness"]);+_&&(m[2]=[(m[0][0]+m[1][0])/2-(m[0][1]-m[1][1])*_,(m[0][1]+m[1][1])/2-(m[1][0]-m[0][0])*_])}i.setItemLayout(c,m)}}}}}},kie=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this._updateLineDraw(i,t),s=t.get("zlevel"),l=t.get(["effect","trailLength"]),u=a.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(t)&&l>0&&(c||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(i);var f=t.get("clip",!0)&&Uh(t.coordinateSystem,!1,t);f?this.group.setClipPath(f):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,n,a){var i=t.getData(),o=this._updateLineDraw(i,t);o.incrementalPrepareUpdate(i),this._clearLayer(a),this._finished=!1},e.prototype.incrementalRender=function(t,n,a){this._lineDraw.incrementalUpdate(t,n.getData()),this._finished=t.end===n.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,n,a){var i=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=MF.reset(t,n,a);s.progress&&s.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(a)},e.prototype._updateLineDraw=function(t,n){var a=this._lineDraw,i=this._showEffect(n),o=!!n.get("polyline"),s=n.pipelineContext,l=s.large;return(!a||i!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(a&&a.remove(),a=this._lineDraw=l?new Mie:new XC(o?i?wie:CF:i?TF:YC),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=l),this.group.add(a.group),a},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var n=t.getZr(),a=n.painter.getType()==="svg";!a&&this._lastZlevel!=null&&n.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,n){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(n)},e.prototype.dispose=function(t,n){this.remove(t,n)},e.type="lines",e})(mt),Aie=typeof Uint32Array>"u"?Array:Uint32Array,Lie=typeof Float64Array>"u"?Array:Float64Array;function rE(r){var e=r.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(r.data=ue(e,function(t){var n=[t[0].coord,t[1].coord],a={coords:n};return t[0].name&&(a.fromName=t[0].name),t[1].name&&(a.toName=t[1].name),fm([a,t[0],t[1]])}))}var Iie=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.init=function(t){t.data=t.data||[],rE(t);var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count)),r.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(rE(t),t.data){var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count))}r.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var n=this._processFlatCoordsArray(t.data);n.flatCoords&&(this._flatCoords?(this._flatCoords=sc(this._flatCoords,n.flatCoords),this._flatCoordsOffset=sc(this._flatCoordsOffset,n.flatCoordsOffset)):(this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset),t.data=new Float32Array(n.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var n=this.getData().getItemModel(t),a=n.option instanceof Array?n.option:n.getShallow("coords");return a},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,n){if(this._flatCoordsOffset){for(var a=this._flatCoordsOffset[t*2],i=this._flatCoordsOffset[t*2+1],o=0;o<i;o++)n[o]=n[o]||[],n[o][0]=this._flatCoords[a+o*2],n[o][1]=this._flatCoords[a+o*2+1];return i}else{for(var s=this._getCoordsFromItemModel(t),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}},e.prototype._processFlatCoordsArray=function(t){var n=0;if(this._flatCoords&&(n=this._flatCoords.length),ut(t[0])){for(var a=t.length,i=new Aie(a),o=new Lie(a),s=0,l=0,u=0,c=0;c<a;){u++;var f=t[c++];i[l++]=s+n,i[l++]=f;for(var d=0;d<f;d++){var h=t[c++],v=t[c++];o[s++]=h,o[s++]=v}}return{flatCoordsOffset:new Uint32Array(i.buffer,0,l),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},e.prototype.getInitialData=function(t,n){var a=new Ur(["value"],this);return a.hasItemOption=!1,a.initData(t.data,[],function(i,o,s,l){if(i instanceof Array)return NaN;a.hasItemOption=!0;var u=i.value;if(u!=null)return u instanceof Array?u[l]:u}),a},e.prototype.formatTooltip=function(t,n,a){var i=this.getData(),o=i.getItemModel(t),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),rr("nameValue",{name:c.join(" > ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?1e4:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?2e4:this.get("progressiveThreshold"))},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),n=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&n>0?n+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.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}},e})(St);function sg(r){return r instanceof Array||(r=[r,r]),r}var Die={seriesType:"lines",reset:function(r){var e=sg(r.get("symbol")),t=sg(r.get("symbolSize")),n=r.getData();n.setVisual("fromSymbol",e&&e[0]),n.setVisual("toSymbol",e&&e[1]),n.setVisual("fromSymbolSize",t&&t[0]),n.setVisual("toSymbolSize",t&&t[1]);function a(i,o){var s=i.getItemModel(o),l=sg(s.getShallow("symbol",!0)),u=sg(s.getShallow("symbolSize",!0));l[0]&&i.setItemVisual(o,"fromSymbol",l[0]),l[1]&&i.setItemVisual(o,"toSymbol",l[1]),u[0]&&i.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&i.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:n.hasItemOption?a:null}}};function Pie(r){r.registerChartView(kie),r.registerSeriesModel(Iie),r.registerLayout(MF),r.registerVisual(Die)}var Rie=256,Eie=(function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=pn.createCanvas();this.canvas=e}return r.prototype.update=function(e,t,n,a,i,o){var s=this._getBrush(),l=this._getGradient(i,"inRange"),u=this._getGradient(i,"outOfRange"),c=this.pointSize+this.blurSize,f=this.canvas,d=f.getContext("2d"),h=e.length;f.width=t,f.height=n;for(var v=0;v<h;++v){var y=e[v],m=y[0],x=y[1],_=y[2],T=a(_);d.globalAlpha=T,d.drawImage(s,m-c,x-c)}if(!f.width||!f.height)return f;for(var C=d.getImageData(0,0,f.width,f.height),k=C.data,A=0,L=k.length,D=this.minOpacity,P=this.maxOpacity,E=P-D;A<L;){var T=k[A+3]/256,O=Math.floor(T*(Rie-1))*4;if(T>0){var B=o(T)?l:u;T>0&&(T=T*E+D),k[A++]=B[O],k[A++]=B[O+1],k[A++]=B[O+2],k[A++]=B[O+3]*T*256}else A+=4}return d.putImageData(C,0,0),f},r.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=pn.createCanvas()),t=this.pointSize+this.blurSize,n=t*2;e.width=n,e.height=n;var a=e.getContext("2d");return a.clearRect(0,0,n,n),a.shadowOffsetX=n,a.shadowBlur=this.blurSize,a.shadowColor=ee.color.neutral99,a.beginPath(),a.arc(-t,t,this.pointSize,0,Math.PI*2,!0),a.closePath(),a.fill(),e},r.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,a=n[t]||(n[t]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,i),a[o++]=i[0],a[o++]=i[1],a[o++]=i[2],a[o++]=i[3];return a},r})();function zie(r,e,t){var n=r[1]-r[0];e=ue(e,function(o){return{interval:[(o.interval[0]-r[0])/n,(o.interval[1]-r[0])/n]}});var a=e.length,i=0;return function(o){var s;for(s=i;s<a;s++){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}if(s===a)for(s=i-1;s>=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}return s>=0&&s<a&&t[s]}}function Oie(r,e){var t=r[1]-r[0];return e=[(e[0]-r[0])/t,(e[1]-r[0])/t],function(n){return n>=e[0]&&n<=e[1]}}function nE(r){var e=r.dimensions;return e[0]==="lng"&&e[1]==="lat"}var Nie=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i;n.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===t&&(i=s)})}),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"||o.type==="matrix"?this._renderOnGridLike(t,a,0,t.getData().count()):nE(o)&&this._renderOnGeo(o,t,i,a)},e.prototype.incrementalPrepareRender=function(t,n,a){this.group.removeAll()},e.prototype.incrementalRender=function(t,n,a,i){var o=n.coordinateSystem;o&&(nE(o)?this.render(n,a,i):(this._progressiveEls=[],this._renderOnGridLike(n,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){ls(this._progressiveEls||this.group,t)},e.prototype._renderOnGridLike=function(t,n,a,i,o){var s=t.coordinateSystem,l=ts(s,"cartesian2d"),u=ts(s,"matrix"),c,f,d,h;if(l){var v=s.getAxis("x"),y=s.getAxis("y");c=v.getBandWidth()+.5,f=y.getBandWidth()+.5,d=v.scale.getExtent(),h=y.scale.getExtent()}for(var m=this.group,x=t.getData(),_=t.getModel(["emphasis","itemStyle"]).getItemStyle(),T=t.getModel(["blur","itemStyle"]).getItemStyle(),C=t.getModel(["select","itemStyle"]).getItemStyle(),k=t.get(["itemStyle","borderRadius"]),A=sr(t),L=t.getModel("emphasis"),D=L.get("focus"),P=L.get("blurScope"),E=L.get("disabled"),O=l||u?[x.mapDimension("x"),x.mapDimension("y"),x.mapDimension("value")]:[x.mapDimension("time"),x.mapDimension("value")],B=a;B<i;B++){var N=void 0,W=x.getItemVisual(B,"style");if(l){var H=x.get(O[0],B),$=x.get(O[1],B);if(isNaN(x.get(O[2],B))||isNaN(H)||isNaN($)||H<d[0]||H>d[1]||$<h[0]||$>h[1])continue;var Z=s.dataToPoint([H,$]);N=new Qe({shape:{x:Z[0]-c/2,y:Z[1]-f/2,width:c,height:f},style:W})}else if(u){var G=s.dataToLayout([x.get(O[0],B),x.get(O[1],B)]).rect;if(Dr(G.x))continue;N=new Qe({z2:1,shape:G,style:W})}else{if(isNaN(x.get(O[1],B)))continue;var X=s.dataToLayout([x.get(O[0],B)]),G=X.contentRect||X.rect;if(Dr(G.x)||Dr(G.y))continue;N=new Qe({z2:1,shape:G,style:W})}if(x.hasItemOption){var K=x.getItemModel(B),V=K.getModel("emphasis");_=V.getModel("itemStyle").getItemStyle(),T=K.getModel(["blur","itemStyle"]).getItemStyle(),C=K.getModel(["select","itemStyle"]).getItemStyle(),k=K.get(["itemStyle","borderRadius"]),D=V.get("focus"),P=V.get("blurScope"),E=V.get("disabled"),A=sr(K)}N.shape.r=k;var U=t.getRawValue(B),ae="-";U&&U[2]!=null&&(ae=U[2]+""),vr(N,A,{labelFetcher:t,labelDataIndex:B,defaultOpacity:W.opacity,defaultText:ae}),N.ensureState("emphasis").style=_,N.ensureState("blur").style=T,N.ensureState("select").style=C,Pt(N,D,P,E),N.incremental=o,o&&(N.states.emphasis.hoverLayer=!0),m.add(N),x.setItemGraphicEl(B,N),this._progressiveEls&&this._progressiveEls.push(N)}},e.prototype._renderOnGeo=function(t,n,a,i){var o=a.targetVisuals.inRange,s=a.targetVisuals.outOfRange,l=n.getData(),u=this._hmLayer||this._hmLayer||new Eie;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var c=t.getViewRect().clone(),f=t.getRoamTransform();c.applyTransform(f);var d=Math.max(c.x,0),h=Math.max(c.y,0),v=Math.min(c.width+c.x,i.getWidth()),y=Math.min(c.height+c.y,i.getHeight()),m=v-d,x=y-h,_=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],T=l.mapArray(_,function(L,D,P){var E=t.dataToPoint([L,D]);return E[0]-=d,E[1]-=h,E.push(P),E}),C=a.getExtent(),k=a.type==="visualMap.continuous"?Oie(C,a.option.range):zie(C,a.getPieceList(),a.option.selected);u.update(T,m,x,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},k);var A=new gr({style:{width:m,height:x,x:d,y:h,image:u.canvas},silent:!0});this.group.add(A)},e.type="heatmap",e})(mt),jie=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,n){return di(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=jc.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:ee.color.primary}}},e})(St);function Bie(r){r.registerChartView(Nie),r.registerSeriesModel(jie)}var Fie=["itemStyle","borderWidth"],aE=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],$S=new fi,Vie=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),f=l.master.getRect(),d={ecSize:{width:a.getWidth(),height:a.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[f.x,f.x+f.width],[f.y,f.y+f.height]],isHorizontal:c,valueDim:aE[+c],categoryDim:aE[1-+c]};o.diff(s).add(function(v){if(o.hasValue(v)){var y=oE(o,v),m=iE(o,v,y,d),x=sE(o,d,m);o.setItemGraphicEl(v,x),i.add(x),uE(x,d,m)}}).update(function(v,y){var m=s.getItemGraphicEl(y);if(!o.hasValue(v)){i.remove(m);return}var x=oE(o,v),_=iE(o,v,x,d),T=PF(o,_);m&&T!==m.__pictorialShapeStr&&(i.remove(m),o.setItemGraphicEl(v,null),m=null),m?Xie(m,d,_):m=sE(o,d,_,!0),o.setItemGraphicEl(v,m),m.__pictorialSymbolMeta=_,i.add(m),uE(m,d,_)}).remove(function(v){var y=s.getItemGraphicEl(v);y&&lE(s,v,y.__pictorialSymbolMeta.animationModel,y)}).execute();var h=t.get("clip",!0)?Uh(t.coordinateSystem,!1,t):null;return h?i.setClipPath(h):i.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(t,n){var a=this.group,i=this._data;t.get("animation")?i&&i.eachItemGraphicEl(function(o){lE(i,je(o).dataIndex,t,o)}):a.removeAll()},e.type="pictorialBar",e})(mt);function iE(r,e,t,n){var a=r.getItemLayout(e),i=t.get("symbolRepeat"),o=t.get("symbolClip"),s=t.get("symbolPosition")||"start",l=t.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=t.get("symbolPatternSize")||2,f=t.isAnimationEnabled(),d={dataIndex:e,layout:a,itemModel:t,symbolType:r.getItemVisual(e,"symbol")||"circle",style:r.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:i,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:f?t:null,hoverScale:f&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};Gie(t,i,a,n,d),Wie(r,e,a,i,o,d.boundingLength,d.pxSign,c,n,d),$ie(t,d.symbolScale,u,n,d);var h=d.symbolSize,v=Bl(t.get("symbolOffset"),h);return Hie(t,h,a,i,o,v,s,d.valueLineWidth,d.boundingLength,d.repeatCutLength,n,d),d}function Gie(r,e,t,n,a){var i=n.valueDim,o=r.get("symbolBoundingData"),s=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(t[i.wh]<=0),c;if(le(o)){var f=[HS(s,o[0])-l,HS(s,o[1])-l];f[1]<f[0]&&f.reverse(),c=f[u]}else o!=null?c=HS(s,o)-l:e?c=n.coordSysExtent[i.index][u]-l:c=t[i.wh];a.boundingLength=c,e&&(a.repeatCutLength=t[i.wh]);var d=i.xy==="x",h=s.inverse;a.pxSign=d&&!h||!d&&h?c>=0?1:-1:c>0?1:-1}function HS(r,e){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(e)))}function Wie(r,e,t,n,a,i,o,s,l,u){var c=l.valueDim,f=l.categoryDim,d=Math.abs(t[f.wh]),h=r.getItemVisual(e,"symbolSize"),v;le(h)?v=h.slice():h==null?v=["100%","100%"]:v=[h,h],v[f.index]=he(v[f.index],d),v[c.index]=he(v[c.index],n?d:Math.abs(i)),u.symbolSize=v;var y=u.symbolScale=[v[0]/s,v[1]/s];y[c.index]*=(l.isHorizontal?-1:1)*o}function $ie(r,e,t,n,a){var i=r.get(Fie)||0;i&&($S.attr({scaleX:e[0],scaleY:e[1],rotation:t}),$S.updateTransform(),i/=$S.getLineScale(),i*=e[n.valueDim.index]),a.valueLineWidth=i||0}function Hie(r,e,t,n,a,i,o,s,l,u,c,f){var d=c.categoryDim,h=c.valueDim,v=f.pxSign,y=Math.max(e[h.index]+s,0),m=y;if(n){var x=Math.abs(l),_=Tr(r.get("symbolMargin"),"15%")+"",T=!1;_.lastIndexOf("!")===_.length-1&&(T=!0,_=_.slice(0,_.length-1));var C=he(_,e[h.index]),k=Math.max(y+C*2,0),A=T?0:C*2,L=pT(n),D=L?n:cE((x+A)/k),P=x-D*y;C=P/2/(T?D:Math.max(D-1,1)),k=y+C*2,A=T?0:C*2,!L&&n!=="fixed"&&(D=u?cE((Math.abs(u)+A)/k):0),m=D*k-A,f.repeatTimes=D,f.symbolMargin=C}var E=v*(m/2),O=f.pathPosition=[];O[d.index]=t[d.wh]/2,O[h.index]=o==="start"?E:o==="end"?l-E:l/2,i&&(O[0]+=i[0],O[1]+=i[1]);var B=f.bundlePosition=[];B[d.index]=t[d.xy],B[h.index]=t[h.xy];var N=f.barRectShape=ie({},t);N[h.wh]=v*Math.max(Math.abs(t[h.wh]),Math.abs(O[h.index]+E)),N[d.wh]=t[d.wh];var W=f.clipShape={};W[d.xy]=-t[d.xy],W[d.wh]=c.ecSize[d.wh],W[h.xy]=0,W[h.wh]=t[h.wh]}function kF(r){var e=r.symbolPatternSize,t=Kt(r.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function AF(r,e,t,n){var a=r.__pictorialBundle,i=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,c=0,f=i[e.valueDim.index]+o+t.symbolMargin*2;for(i2(r,function(y){y.__pictorialAnimationIndex=c,y.__pictorialRepeatTimes=u,c<u?nc(y,null,v(c),t,n):nc(y,null,{scaleX:0,scaleY:0},t,n,function(){a.remove(y)}),c++});c<u;c++){var d=kF(t);d.__pictorialAnimationIndex=c,d.__pictorialRepeatTimes=u,a.add(d);var h=v(c);nc(d,{x:h.x,y:h.y,scaleX:0,scaleY:0},{scaleX:h.scaleX,scaleY:h.scaleY,rotation:h.rotation},t,n)}function v(y){var m=s.slice(),x=t.pxSign,_=y;return(t.symbolRepeatDirection==="start"?x>0:x<0)&&(_=u-1-y),m[l.index]=f*(_-u/2+.5)+s[l.index],{x:m[0],y:m[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function LF(r,e,t,n){var a=r.__pictorialBundle,i=r.__pictorialMainPath;i?nc(i,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,n):(i=r.__pictorialMainPath=kF(t),a.add(i),nc(i,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:0,scaleY:0,rotation:t.rotation},{scaleX:t.symbolScale[0],scaleY:t.symbolScale[1]},t,n))}function IF(r,e,t){var n=ie({},e.barRectShape),a=r.__pictorialBarRect;a?nc(a,null,{shape:n},e,t):(a=r.__pictorialBarRect=new Qe({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),a.disableMorphing=!0,r.add(a))}function DF(r,e,t,n){if(t.symbolClip){var a=r.__pictorialClipPath,i=ie({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(a)ct(a,{shape:i},s,l);else{i[o.wh]=0,a=new Qe({shape:i}),r.__pictorialBundle.setClipPath(a),r.__pictorialClipPath=a;var u={};u[o.wh]=t.clipShape[o.wh],Ol[n?"updateProps":"initProps"](a,{shape:u},s,l)}}}function oE(r,e){var t=r.getItemModel(e);return t.getAnimationDelayParams=Uie,t.isAnimationEnabled=Yie,t}function Uie(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function Yie(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function sE(r,e,t,n){var a=new Le,i=new Le;return a.add(i),a.__pictorialBundle=i,i.x=t.bundlePosition[0],i.y=t.bundlePosition[1],t.symbolRepeat?AF(a,e,t):LF(a,e,t),IF(a,t,n),DF(a,e,t,n),a.__pictorialShapeStr=PF(r,t),a.__pictorialSymbolMeta=t,a}function Xie(r,e,t){var n=t.animationModel,a=t.dataIndex,i=r.__pictorialBundle;ct(i,{x:t.bundlePosition[0],y:t.bundlePosition[1]},n,a),t.symbolRepeat?AF(r,e,t,!0):LF(r,e,t,!0),IF(r,t,!0),DF(r,e,t,!0)}function lE(r,e,t,n){var a=n.__pictorialBarRect;a&&a.removeTextContent();var i=[];i2(n,function(o){i.push(o)}),n.__pictorialMainPath&&i.push(n.__pictorialMainPath),n.__pictorialClipPath&&(t=null),z(i,function(o){es(o,{scaleX:0,scaleY:0},t,e,function(){n.parent&&n.parent.remove(n)})}),r.setItemGraphicEl(e,null)}function PF(r,e){return[r.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function i2(r,e,t){z(r.__pictorialBundle.children(),function(n){n!==r.__pictorialBarRect&&e.call(t,n)})}function nc(r,e,t,n,a,i){e&&r.attr(e),n.symbolClip&&!a?t&&r.attr(t):t&&Ol[a?"updateProps":"initProps"](r,t,n.animationModel,n.dataIndex,i)}function uE(r,e,t){var n=t.dataIndex,a=t.itemModel,i=a.getModel("emphasis"),o=i.getModel("itemStyle").getItemStyle(),s=a.getModel(["blur","itemStyle"]).getItemStyle(),l=a.getModel(["select","itemStyle"]).getItemStyle(),u=a.getShallow("cursor"),c=i.get("focus"),f=i.get("blurScope"),d=i.get("scale");i2(r,function(y){if(y instanceof gr){var m=y.style;y.useStyle(ie({image:m.image,x:m.x,y:m.y,width:m.width,height:m.height},t.style))}else y.useStyle(t.style);var x=y.ensureState("emphasis");x.style=o,d&&(x.scaleX=y.scaleX*1.1,x.scaleY=y.scaleY*1.1),y.ensureState("blur").style=s,y.ensureState("select").style=l,u&&(y.cursor=u),y.z2=t.z2});var h=e.valueDim.posDesc[+(t.boundingLength>0)],v=r.__pictorialBarRect;v.ignoreClip=!0,vr(v,sr(a),{labelFetcher:e.seriesModel,labelDataIndex:n,defaultText:mc(e.seriesModel.getData(),n),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:h}),Pt(r,c,f,i.get("disabled"))}function cE(r){var e=Math.round(r);return Math.abs(r-e)<1e-4?e:Math.ceil(r)}var Zie=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t.defaultSymbol="roundRect",t}return e.prototype.getInitialData=function(t){return t.stack=null,r.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=us(gh.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:ee.color.primary}}}),e})(gh);function Kie(r){r.registerChartView(Vie),r.registerSeriesModel(Zie),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,$e(QB,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,JB("pictorialBar"))}var qie=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=i.getLayout("layoutInfo"),c=u.rect,f=u.boundaryGap;s.x=0,s.y=c.y+f[0];function d(m){return m.name}var h=new Ki(this._layersSeries||[],l,d,d),v=[];h.add(ye(y,this,"add")).update(ye(y,this,"update")).remove(ye(y,this,"remove")).execute();function y(m,x,_){var T=o._layers;if(m==="remove"){s.remove(T[x]);return}for(var C=[],k=[],A,L=l[x].indices,D=0;D<L.length;D++){var P=i.getItemLayout(L[D]),E=P.x,O=P.y0,B=P.y;C.push(E,O),k.push(E,O+B),A=i.getItemVisual(L[D],"style")}var N,W=i.getItemLayout(L[0]),H=t.getModel("label"),$=H.get("margin"),Z=t.getModel("emphasis");if(m==="add"){var G=v[x]=new Le;N=new W3({shape:{points:C,stackedOnPoints:k,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),G.add(N),s.add(G),t.isAnimationEnabled()&&N.setClipPath(Qie(N.getBoundingRect(),t,function(){N.removeClipPath()}))}else{var G=T[_];N=G.childAt(0),s.add(G),v[x]=G,ct(N,{shape:{points:C,stackedOnPoints:k}},t),ta(N)}vr(N,sr(t),{labelDataIndex:L[D-1],defaultText:i.getName(L[D-1]),inheritColor:A.fill},{normal:{verticalAlign:"middle"}}),N.setTextConfig({position:null,local:!0});var X=N.getTextContent();X&&(X.x=W.x-$,X.y=W.y0+W.y/2),N.useStyle(A),i.setItemGraphicEl(x,N),or(N,t),Pt(N,Z.get("focus"),Z.get("blurScope"),Z.get("disabled"))}this._layersSeries=l,this._layers=v},e.type="themeRiver",e})(mt);function Qie(r,e,t){var n=new Qe({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return It(n,{shape:{x:r.x-50,width:r.width+100,height:r.height+20}},e,t),n}var US=2,Jie=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Yc(ye(this.getData,this),ye(this.getRawData,this))},e.prototype.fixData=function(t){var n=t.length,a={},i=r_(t,function(d){return a.hasOwnProperty(d[0]+"")||(a[d[0]+""]=-1),d[2]}),o=[];i.buckets.each(function(d,h){o.push({name:h,dataList:d})});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]+"";a[f]=l}for(var f in a)a.hasOwnProperty(f)&&a[f]!==l&&(a[f]=l,t[n]=[f,0,u],n++)}return t},e.prototype.getInitialData=function(t,n){for(var a=this.getReferringComponents("singleAxis",jt).models[0],i=a.get("type"),o=ht(t.data,function(v){return v[2]!==void 0}),s=this.fixData(o||[]),l=[],u=this.nameMap=we(),c=0,f=0;f<s.length;++f)l.push(s[f][US]),u.get(s[f][US])||(u.set(s[f][US],c),c++);var d=Gc(s,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:wy(i)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,h=new Ur(d,this);return h.initData(s),h},e.prototype.getLayerSeries=function(){for(var t=this.getData(),n=t.count(),a=[],i=0;i<n;++i)a[i]=i;var o=t.mapDimension("single"),s=r_(a,function(u){return t.get("name",u)}),l=[];return s.buckets.each(function(u,c){u.sort(function(f,d){return t.get(o,f)-t.get(o,d)}),l.push({name:c,indices:u})}),l},e.prototype.getAxisTooltipData=function(t,n,a){le(t)||(t=t?[t]:[]);for(var i=this.getData(),o=this.getLayerSeries(),s=[],l=o.length,u,c=0;c<l;++c){for(var f=Number.MAX_VALUE,d=-1,h=o[c].indices.length,v=0;v<h;++v){var y=i.get(t[0],o[c].indices[v]),m=Math.abs(y-n);m<=f&&(u=y,f=m,d=o[c].indices[v])}s.push(d)}return{dataIndices:s,nestestValue:u}},e.prototype.formatTooltip=function(t,n,a){var i=this.getData(),o=i.getName(t),s=i.get(i.mapDimension("value"),t);return rr("nameValue",{name:o,value:s})},e.type="series.themeRiver",e.dependencies=["singleAxis"],e.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}}},e})(St);function eoe(r,e){r.eachSeriesByType("themeRiver",function(t){var n=t.getData(),a=t.coordinateSystem,i={},o=a.getRect();i.rect=o;var s=t.get("boundaryGap"),l=a.getAxis();if(i.boundaryGap=s,l.orient==="horizontal"){s[0]=he(s[0],o.height),s[1]=he(s[1],o.height);var u=o.height-s[0]-s[1];fE(n,t,u)}else{s[0]=he(s[0],o.width),s[1]=he(s[1],o.width);var c=o.width-s[0]-s[1];fE(n,t,c)}n.setLayout("layoutInfo",i)})}function fE(r,e,t){if(r.count())for(var n=e.coordinateSystem,a=e.getLayerSeries(),i=r.mapDimension("single"),o=r.mapDimension("value"),s=ue(a,function(m){return ue(m.indices,function(x){var _=n.dataToPoint(r.get(i,x));return _[1]=r.get(o,x),_})}),l=toe(s),u=l.y0,c=t/l.max,f=a.length,d=a[0].indices.length,h,v=0;v<d;++v){h=u[v]*c,r.setItemLayout(a[0].indices[v],{layerIndex:0,x:s[0][v][0],y0:h,y:s[0][v][1]*c});for(var y=1;y<f;++y)h+=s[y-1][v][1]*c,r.setItemLayout(a[y].indices[v],{layerIndex:y,x:s[y][v][0],y0:h,y:s[y][v][1]*c})}}function toe(r){for(var e=r.length,t=r[0].length,n=[],a=[],i=0,o=0;o<t;++o){for(var s=0,l=0;l<e;++l)s+=r[l][o][1];s>i&&(i=s),n.push(s)}for(var u=0;u<t;++u)a[u]=(i-n[u])/2;i=0;for(var c=0;c<t;++c){var f=n[c]+a[c];f>i&&(i=f)}return{y0:a,max:i}}function roe(r){r.registerChartView(qie),r.registerSeriesModel(Jie),r.registerLayout(eoe),r.registerProcessor(Hc("themeRiver"))}var noe=2,aoe=4,dE=(function(r){Q(e,r);function e(t,n,a,i){var o=r.call(this)||this;o.z2=noe,o.textConfig={inside:!0},je(o).seriesIndex=n.seriesIndex;var s=new lt({z2:aoe,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,n,a,i),o}return e.prototype.updateData=function(t,n,a,i,o){this.node=n,n.piece=this,a=a||this._seriesModel,i=i||this._ecModel;var s=this;je(s).dataIndex=n.dataIndex;var l=n.getModel(),u=l.getModel("emphasis"),c=n.getLayout(),f=ie({},c);f.label=null;var d=n.getVisual("style");d.lineJoin="bevel";var h=n.getVisual("decal");h&&(d.decal=vc(h,o));var v=qa(l.getModel("itemStyle"),f,!0);ie(f,v),z(tn,function(_){var T=s.ensureState(_),C=l.getModel([_,"itemStyle"]);T.style=C.getItemStyle();var k=qa(C,f);k&&(T.shape=k)}),t?(s.setShape(f),s.shape.r=c.r0,It(s,{shape:{r:c.r}},a,n.dataIndex)):(ct(s,{shape:f},a),ta(s)),s.useStyle(d),this._updateLabel(a);var y=l.getShallow("cursor");y&&s.attr("cursor",y),this._seriesModel=a||this._seriesModel,this._ecModel=i||this._ecModel;var m=u.get("focus"),x=m==="relative"?sc(n.getAncestorsIndices(),n.getDescendantIndices()):m==="ancestor"?n.getAncestorsIndices():m==="descendant"?n.getDescendantIndices():m;Pt(this,x,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var n=this,a=this.node.getModel(),i=a.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,d=f.getTextContent(),h=this.node.dataIndex,v=i.get("minAngle")/180*Math.PI,y=i.get("show")&&!(v!=null&&Math.abs(s)<v);d.ignore=!y,z(rh,function(x){var _=x==="normal"?a.getModel("label"):a.getModel([x,"label"]),T=x==="normal",C=T?d:d.ensureState(x),k=t.getFormattedLabel(h,x);T&&(k=k||n.node.name),C.style=wt(_,{},null,x!=="normal",!0),k&&(C.style.text=k);var A=_.get("show");A!=null&&!T&&(C.ignore=!A);var L=m(_,"position"),D=T?f:f.states[x],P=D.style.fill;D.textConfig={outsideFill:_.get("color")==="inherit"?P:null,inside:L!=="outside"};var E,O=m(_,"distance")||0,B=m(_,"align"),N=m(_,"rotate"),W=Math.PI*.5,H=Math.PI*1.5,$=An(N==="tangential"?Math.PI/2-l:l),Z=$>W&&!cc($-W)&&$<H;L==="outside"?(E=o.r+O,B=Z?"right":"left"):!B||B==="center"?(s===2*Math.PI&&o.r0===0?E=0:E=(o.r+o.r0)/2,B="center"):B==="left"?(E=o.r0+O,B=Z?"right":"left"):B==="right"&&(E=o.r-O,B=Z?"left":"right"),C.style.align=B,C.style.verticalAlign=m(_,"verticalAlign")||"middle",C.x=E*u+o.cx,C.y=E*c+o.cy;var G=0;N==="radial"?G=An(-l)+(Z?Math.PI:0):N==="tangential"?G=An(Math.PI/2-l)+(Z?Math.PI:0):ut(N)&&(G=N*Math.PI/180),C.rotation=An(G)});function m(x,_){var T=x.get(_);return T??i.get(_)}d.dirtyStyle()},e})(Er),mw="sunburstRootToNode",hE="sunburstHighlight",ioe="sunburstUnhighlight";function ooe(r){r.registerAction({type:mw,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},n);function n(a,i){var o=mh(e,[mw],a);if(o){var s=a.getViewRoot();s&&(e.direction=GC(s,o.node)?"rollUp":"drillDown"),a.resetViewRoot(o.node)}}}),r.registerAction({type:hE,update:"none"},function(e,t,n){e=ie({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},a);function a(i){var o=mh(e,[hE],i);o&&(e.dataIndex=o.node.dataIndex)}n.dispatchAction(ie(e,{type:"highlight"}))}),r.registerAction({type:ioe,update:"updateView"},function(e,t,n){e=ie({},e),n.dispatchAction(ie(e,{type:"downplay"}))})}var soe=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a,i){var o=this;this.seriesModel=t,this.api=a,this.ecModel=n;var s=t.getData(),l=s.tree.root,u=t.getViewRoot(),c=this.group,f=t.get("renderLabelForZeroData"),d=[];u.eachNode(function(_){d.push(_)});var h=this._oldChildren||[];v(d,h),x(l,u),this._initEvents(),this._oldChildren=d;function v(_,T){if(_.length===0&&T.length===0)return;new Ki(T,_,C,C).add(k).update(k).remove($e(k,null)).execute();function C(A){return A.getId()}function k(A,L){var D=A==null?null:_[A],P=L==null?null:T[L];y(D,P)}}function y(_,T){if(!f&&_&&!_.getValue()&&(_=null),_!==l&&T!==l){if(T&&T.piece)_?(T.piece.updateData(!1,_,t,n,a),s.setItemGraphicEl(_.dataIndex,T.piece)):m(T);else if(_){var C=new dE(_,t,n,a);c.add(C),s.setItemGraphicEl(_.dataIndex,C)}}}function m(_){_&&_.piece&&(c.remove(_.piece),_.piece=null)}function x(_,T){T.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,_,t,n,a):(o.virtualPiece=new dE(_,t,n,a),c.add(o.virtualPiece)),T.piece.off("click"),o.virtualPiece.on("click",function(C){o._rootToNode(T.parentNode)})):o.virtualPiece&&(c.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(n){var a=!1,i=t.seriesModel.getViewRoot();i.eachNode(function(o){if(!a&&o.piece&&o.piece===n.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")t._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var c=l.get("target",!0)||"_blank";hy(u,c)}}a=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:mw,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,n){var a=n.getData(),i=a.getItemLayout(0);if(i){var o=t[0]-i.cx,s=t[1]-i.cy,l=Math.sqrt(o*o+s*s);return l<=i.r&&l>=i.r0}},e.type="sunburst",e})(mt),loe=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,n){var a={name:t.name,children:t.data};RF(a);var i=this._levelModels=ue(t.levels||[],function(l){return new rt(l,this,n)},this),o=VC.createTree(a,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var f=o.getNodeByDataIndex(c),d=i[f.depth];return d&&(u.parentModel=d),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(t);return n.treePathInfo=Wm(a,this),n},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var n=this.getRawData().tree.root;(!t||t!==n&&!n.contains(t))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){N4(this)},e.type="series.sunburst",e.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"},e})(St);function RF(r){var e=0;z(r.children,function(n){RF(n);var a=n.value;le(a)&&(a=a[0]),e+=a});var t=r.value;le(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),le(r.value)?r.value[0]=t:r.value=t}var pE=Math.PI/180;function uoe(r,e,t){e.eachSeriesByType(r,function(n){var a=n.get("center"),i=n.get("radius");le(i)||(i=[0,i]),le(a)||(a=[a,a]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=he(a[0],o),c=he(a[1],s),f=he(i[0],l/2),d=he(i[1],l/2),h=-n.get("startAngle")*pE,v=n.get("minAngle")*pE,y=n.getData().tree.root,m=n.getViewRoot(),x=m.depth,_=n.get("sort");_!=null&&EF(m,_);var T=0;z(m.children,function($){!isNaN($.getValue())&&T++});var C=m.getValue(),k=Math.PI/(C||T)*2,A=m.depth>0,L=m.height-(A?-1:1),D=(d-f)/(L||1),P=n.get("clockwise"),E=n.get("stillShowZeroSum"),O=P?1:-1,B=function($,Z){if($){var G=Z;if($!==y){var X=$.getValue(),K=C===0&&E?k:X*k;K<v&&(K=v),G=Z+O*K;var V=$.depth-x-(A?-1:1),U=f+D*V,ae=f+D*(V+1),ce=n.getLevelModel($);if(ce){var re=ce.get("r0",!0),_e=ce.get("r",!0),Ne=ce.get("radius",!0);Ne!=null&&(re=Ne[0],_e=Ne[1]),re!=null&&(U=he(re,l/2)),_e!=null&&(ae=he(_e,l/2))}$.setLayout({angle:K,startAngle:Z,endAngle:G,clockwise:P,cx:u,cy:c,r0:U,r:ae})}if($.children&&$.children.length){var ve=0;z($.children,function(fe){ve+=B(fe,Z+ve)})}return G-Z}};if(A){var N=f,W=f+D,H=Math.PI*2;y.setLayout({angle:H,startAngle:h,endAngle:h+H,clockwise:P,cx:u,cy:c,r0:N,r:W})}B(m,h)})}function EF(r,e){var t=r.children||[];r.children=coe(t,e),t.length&&z(r.children,function(n){EF(n,e)})}function coe(r,e){if(Me(e)){var t=ue(r,function(a,i){var o=a.getValue();return{params:{depth:a.depth,height:a.height,dataIndex:a.dataIndex,getValue:function(){return o}},index:i}});return t.sort(function(a,i){return e(a.params,i.params)}),ue(t,function(a){return r[a.index]})}else{var n=e==="asc";return r.sort(function(a,i){var o=(a.getValue()-i.getValue())*(n?1:-1);return o===0?(a.dataIndex-i.dataIndex)*(n?-1:1):o})}}function foe(r){var e={};function t(n,a,i){if(n.depth===0)return ee.color.neutral50;for(var o=n;o&&o.depth>1;)o=o.parentNode;var s=a.getColorFromPalette(o.name||o.dataIndex+"",e);return n.depth>1&&pe(s)&&(s=Jg(s,(n.depth-1)/(i-1)*.5)),s}r.eachSeriesByType("sunburst",function(n){var a=n.getData(),i=a.tree;i.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,n,i.root.height));var u=a.ensureUniqueItemVisual(o.dataIndex,"style");ie(u,l)})})}function doe(r){r.registerChartView(soe),r.registerSeriesModel(loe),r.registerLayout($e(uoe,"sunburst")),r.registerProcessor($e(Hc,"sunburst")),r.registerVisual(foe),ooe(r)}var vE={color:"fill",borderColor:"stroke"},hoe={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Gi=et(),poe=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,n){return di(null,this)},e.prototype.getDataParams=function(t,n,a){var i=r.prototype.getDataParams.call(this,t,n);return a&&(i.info=Gi(a).info),i},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e})(St);function voe(r,e){return e=e||[0,0],ue(["x","y"],function(t,n){var a=this.getAxis(t),i=e[n],o=r[n]/2;return a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(i-o)-a.dataToCoord(i+o))},this)}function goe(r){var e=r.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:ye(voe,r)}}}function yoe(r,e){return e=e||[0,0],ue([0,1],function(t){var n=e[t],a=r[t]/2,i=[],o=[];return i[t]=n-a,o[t]=n+a,i[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(i)[t]-this.dataToPoint(o)[t])},this)}function moe(r){var e=r.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:r.getZoom()},api:{coord:function(t){return r.dataToPoint(t)},size:ye(yoe,r)}}}function xoe(r,e){var t=this.getAxis(),n=e instanceof Array?e[0]:e,a=(r instanceof Array?r[0]:r)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(n-a)-t.dataToCoord(n+a))}function Soe(r){var e=r.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:ye(xoe,r)}}}function boe(r,e){return e=e||[0,0],ue(["Radius","Angle"],function(t,n){var a="get"+t+"Axis",i=this[a](),o=e[n],s=r[n]/2,l=i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(o-s)-i.dataToCoord(o+s));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function _oe(r){var e=r.getRadiusAxis(),t=r.getAngleAxis(),n=e.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:n[1],r0:n[0]},api:{coord:function(a){var i=e.dataToRadius(a[0]),o=t.dataToAngle(a[1]),s=r.coordToPoint([i,o]);return s.push(i,o*Math.PI/180),s},size:ye(boe,r)}}}function woe(r){var e=r.getRect(),t=r.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(n,a){return r.dataToPoint(n,a)},layout:function(n,a){return r.dataToLayout(n,a)}}}}function Toe(r){var e=r.getRect();return{coordSys:{type:"matrix",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t,n){return r.dataToPoint(t,n)},layout:function(t,n){return r.dataToLayout(t,n)}}}}function zF(r,e,t,n){return r&&(r.legacy||r.legacy!==!1&&!t&&!n&&e!=="tspan"&&(e==="text"||Se(r,"text")))}function OF(r,e,t){var n=r,a,i,o;if(e==="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),i={type:"text",style:o,silent:!0},a={};var s=Se(n,"textPosition");t?a.position=s?n.textPosition:"inside":s&&(a.position=n.textPosition),Se(n,"textPosition")&&(a.position=n.textPosition),Se(n,"textOffset")&&(a.offset=n.textOffset),Se(n,"textRotation")&&(a.rotation=n.textRotation),Se(n,"textDistance")&&(a.distance=n.textDistance)}return gE(o,r),z(o.rich,function(l){gE(l,l)}),{textConfig:a,textContent:i}}function gE(r,e){e&&(e.font=e.textFont||e.font,Se(e,"textStrokeWidth")&&(r.lineWidth=e.textStrokeWidth),Se(e,"textAlign")&&(r.align=e.textAlign),Se(e,"textVerticalAlign")&&(r.verticalAlign=e.textVerticalAlign),Se(e,"textLineHeight")&&(r.lineHeight=e.textLineHeight),Se(e,"textWidth")&&(r.width=e.textWidth),Se(e,"textHeight")&&(r.height=e.textHeight),Se(e,"textBackgroundColor")&&(r.backgroundColor=e.textBackgroundColor),Se(e,"textPadding")&&(r.padding=e.textPadding),Se(e,"textBorderColor")&&(r.borderColor=e.textBorderColor),Se(e,"textBorderWidth")&&(r.borderWidth=e.textBorderWidth),Se(e,"textBorderRadius")&&(r.borderRadius=e.textBorderRadius),Se(e,"textBoxShadowColor")&&(r.shadowColor=e.textBoxShadowColor),Se(e,"textBoxShadowBlur")&&(r.shadowBlur=e.textBoxShadowBlur),Se(e,"textBoxShadowOffsetX")&&(r.shadowOffsetX=e.textBoxShadowOffsetX),Se(e,"textBoxShadowOffsetY")&&(r.shadowOffsetY=e.textBoxShadowOffsetY))}function yE(r,e,t){var n=r;n.textPosition=n.textPosition||t.position||"inside",t.offset!=null&&(n.textOffset=t.offset),t.rotation!=null&&(n.textRotation=t.rotation),t.distance!=null&&(n.textDistance=t.distance);var a=n.textPosition.indexOf("inside")>=0,i=r.fill||ee.color.neutral99;mE(n,e);var o=n.textFill==null;return a?o&&(n.textFill=t.insideFill||ee.color.neutral00,!n.textStroke&&t.insideStroke&&(n.textStroke=t.insideStroke),!n.textStroke&&(n.textStroke=i),n.textStrokeWidth==null&&(n.textStrokeWidth=2)):(o&&(n.textFill=r.fill||t.outsideFill||ee.color.neutral00),!n.textStroke&&t.outsideStroke&&(n.textStroke=t.outsideStroke)),n.text=e.text,n.rich=e.rich,z(e.rich,function(s){mE(s,s)}),n}function mE(r,e){e&&(Se(e,"fill")&&(r.textFill=e.fill),Se(e,"stroke")&&(r.textStroke=e.fill),Se(e,"lineWidth")&&(r.textStrokeWidth=e.lineWidth),Se(e,"font")&&(r.font=e.font),Se(e,"fontStyle")&&(r.fontStyle=e.fontStyle),Se(e,"fontWeight")&&(r.fontWeight=e.fontWeight),Se(e,"fontSize")&&(r.fontSize=e.fontSize),Se(e,"fontFamily")&&(r.fontFamily=e.fontFamily),Se(e,"align")&&(r.textAlign=e.align),Se(e,"verticalAlign")&&(r.textVerticalAlign=e.verticalAlign),Se(e,"lineHeight")&&(r.textLineHeight=e.lineHeight),Se(e,"width")&&(r.textWidth=e.width),Se(e,"height")&&(r.textHeight=e.height),Se(e,"backgroundColor")&&(r.textBackgroundColor=e.backgroundColor),Se(e,"padding")&&(r.textPadding=e.padding),Se(e,"borderColor")&&(r.textBorderColor=e.borderColor),Se(e,"borderWidth")&&(r.textBorderWidth=e.borderWidth),Se(e,"borderRadius")&&(r.textBorderRadius=e.borderRadius),Se(e,"shadowColor")&&(r.textBoxShadowColor=e.shadowColor),Se(e,"shadowBlur")&&(r.textBoxShadowBlur=e.shadowBlur),Se(e,"shadowOffsetX")&&(r.textBoxShadowOffsetX=e.shadowOffsetX),Se(e,"shadowOffsetY")&&(r.textBoxShadowOffsetY=e.shadowOffsetY),Se(e,"textShadowColor")&&(r.textShadowColor=e.textShadowColor),Se(e,"textShadowBlur")&&(r.textShadowBlur=e.textShadowBlur),Se(e,"textShadowOffsetX")&&(r.textShadowOffsetX=e.textShadowOffsetX),Se(e,"textShadowOffsetY")&&(r.textShadowOffsetY=e.textShadowOffsetY))}var NF={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},xE=st(NF);Qn(ni,function(r,e){return r[e]=1,r},{});ni.join(", ");var Vy=["","style","shape","extra"],_c=et();function o2(r,e,t,n,a){var i=r+"Animation",o=Rc(r,n,a)||{},s=_c(e).userDuring;return o.duration>0&&(o.during=s?ye(Loe,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=r),ie(o,t[i]),o}function Bg(r,e,t,n){n=n||{};var a=n.dataIndex,i=n.isInit,o=n.clearStyle,s=t.isAnimationEnabled(),l=_c(r),u=e.style;l.userDuring=e.during;var c={},f={};if(Doe(r,e,f),r.type==="compound")for(var d=r.shape.paths,h=e.shape.paths,v=0;v<h.length;v++){var y=h[v];YS("shape",y,d[v])}else YS("shape",e,f),YS("extra",e,f);if(!i&&s&&(Ioe(r,e,c),SE("shape",r,e,c),SE("extra",r,e,c),Poe(r,e,u,c)),f.style=u,Coe(r,f,o),koe(r,e),s)if(i){var m={};z(Vy,function(_){var T=_?e[_]:e;T&&T.enterFrom&&(_&&(m[_]=m[_]||{}),ie(_?m[_]:m,T.enterFrom))});var x=o2("enter",r,e,t,a);x.duration>0&&r.animateFrom(m,x)}else Moe(r,e,a||0,t,c);jF(r,e),u?r.dirty():r.markRedraw()}function jF(r,e){for(var t=_c(r).leaveToProps,n=0;n<Vy.length;n++){var a=Vy[n],i=a?e[a]:e;i&&i.leaveTo&&(t||(t=_c(r).leaveToProps={}),a&&(t[a]=t[a]||{}),ie(a?t[a]:t,i.leaveTo))}}function Um(r,e,t,n){if(r){var a=r.parent,i=_c(r).leaveToProps;if(i){var o=o2("update",r,e,t,0);o.done=function(){a&&a.remove(r)},r.animateTo(i,o)}else a&&a.remove(r)}}function bl(r){return r==="all"}function Coe(r,e,t){var n=e.style;if(!r.isGroup&&n){if(t){r.useStyle({});for(var a=r.animators,i=0;i<a.length;i++){var o=a[i];o.targetName==="style"&&o.changeTarget(r.style)}}r.setStyle(n)}e&&(e.style=null,e&&r.attr(e),e.style=n)}function Moe(r,e,t,n,a){if(a){var i=o2("update",r,e,n,t);i.duration>0&&r.animateFrom(a,i)}}function koe(r,e){Se(e,"silent")&&(r.silent=e.silent),Se(e,"ignore")&&(r.ignore=e.ignore),r instanceof ea&&Se(e,"invisible")&&(r.invisible=e.invisible),r instanceof nt&&Se(e,"autoBatch")&&(r.autoBatch=e.autoBatch)}var Va={},Aoe={setTransform:function(r,e){return Va.el[r]=e,this},getTransform:function(r){return Va.el[r]},setShape:function(r,e){var t=Va.el,n=t.shape||(t.shape={});return n[r]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(r){var e=Va.el.shape;if(e)return e[r]},setStyle:function(r,e){var t=Va.el,n=t.style;return n&&(n[r]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(r){var e=Va.el.style;if(e)return e[r]},setExtra:function(r,e){var t=Va.el.extra||(Va.el.extra={});return t[r]=e,this},getExtra:function(r){var e=Va.el.extra;if(e)return e[r]}};function Loe(){var r=this,e=r.el;if(e){var t=_c(e).userDuring,n=r.userDuring;if(t!==n){r.el=r.userDuring=null;return}Va.el=e,n(Aoe)}}function SE(r,e,t,n){var a=t[r];if(a){var i=e[r],o;if(i){var s=t.transition,l=a.transition;if(l)if(!o&&(o=n[r]={}),bl(l))ie(o,i);else for(var u=Tt(l),c=0;c<u.length;c++){var f=u[c],d=i[f];o[f]=d}else if(bl(s)||Ue(s,r)>=0){!o&&(o=n[r]={});for(var h=st(i),c=0;c<h.length;c++){var f=h[c],d=i[f];Roe(a[f],d)&&(o[f]=d)}}}}}function YS(r,e,t){var n=e[r];if(n)for(var a=t[r]={},i=st(n),o=0;o<i.length;o++){var s=i[o];a[s]=Nd(n[s])}}function Ioe(r,e,t){for(var n=e.transition,a=bl(n)?ni:Tt(n||[]),i=0;i<a.length;i++){var o=a[i];if(!(o==="style"||o==="shape"||o==="extra")){var s=r[o];t[o]=s}}}function Doe(r,e,t){for(var n=0;n<xE.length;n++){var a=xE[n],i=NF[a],o=e[a];o&&(t[i[0]]=o[0],t[i[1]]=o[1])}for(var n=0;n<ni.length;n++){var s=ni[n];e[s]!=null&&(t[s]=e[s])}}function Poe(r,e,t,n){if(t){var a=r.style,i;if(a){var o=t.transition,s=e.transition;if(o&&!bl(o)){var l=Tt(o);!i&&(i=n.style={});for(var u=0;u<l.length;u++){var c=l[u],f=a[c];i[c]=f}}else if(r.getAnimationStyleProps&&(bl(s)||bl(o)||Ue(s,"style")>=0)){var d=r.getAnimationStyleProps(),h=d?d.style:null;if(h){!i&&(i=n.style={});for(var v=st(t),u=0;u<v.length;u++){var c=v[u];if(h[c]){var f=a[c];i[c]=f}}}}}}}function Roe(r,e){return Pr(r)?r!==e:r!=null&&isFinite(r)}var BF=et(),Eoe=["percent","easing","shape","style","extra"];function FF(r){r.stopAnimation("keyframe"),r.attr(BF(r))}function Gy(r,e,t){if(!(!t.isAnimationEnabled()||!e)){if(le(e)){z(e,function(s){Gy(r,s,t)});return}var n=e.keyframes,a=e.duration;if(t&&a==null){var i=Rc("enter",t,0);a=i&&i.duration}if(!(!n||!a)){var o=BF(r);z(Vy,function(s){if(!(s&&!r[s])){var l;n.sort(function(u,c){return u.percent-c.percent}),z(n,function(u){var c=r.animators,f=s?u[s]:u;if(f){var d=st(f);if(s||(d=ht(d,function(y){return Ue(Eoe,y)<0})),!!d.length){l||(l=r.animate(s,e.loop,!0),l.scope="keyframe");for(var h=0;h<c.length;h++)c[h]!==l&&c[h].targetName===l.targetName&&c[h].stopTracks(d);s&&(o[s]=o[s]||{});var v=s?o[s]:o;z(d,function(y){v[y]=((s?r[s]:r)||{})[y]}),l.whenWithKeys(a*u.percent,f,d,u.easing)}}}),l&&l.delay(e.delay||0).duration(a).start(e.easing)}})}}}var Wi="emphasis",Go="normal",s2="blur",l2="select",as=[Go,Wi,s2,l2],XS={normal:["itemStyle"],emphasis:[Wi,"itemStyle"],blur:[s2,"itemStyle"],select:[l2,"itemStyle"]},ZS={normal:["label"],emphasis:[Wi,"label"],blur:[s2,"label"],select:[l2,"label"]},zoe=["x","y"],Ooe="e\0\0",Vn={normal:{},emphasis:{},blur:{},select:{}},Noe={cartesian2d:goe,geo:moe,single:Soe,polar:_oe,calendar:woe,matrix:Toe};function xw(r){return r instanceof nt}function Sw(r){return r instanceof ea}function joe(r,e){e.copyTransform(r),Sw(e)&&Sw(r)&&(e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel,e.invisible=r.invisible,e.ignore=r.ignore,xw(e)&&xw(r)&&e.setShape(r.shape))}var Boe=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a,i){this._progressiveEls=null;var o=this._data,s=t.getData(),l=this.group,u=bE(t,s,n,a);o||l.removeAll(),s.diff(o).add(function(f){KS(a,null,f,u(f,i),t,l,s)}).remove(function(f){var d=o.getItemGraphicEl(f);d&&Um(d,Gi(d).option,t)}).update(function(f,d){var h=o.getItemGraphicEl(d);KS(a,h,f,u(f,i),t,l,s)}).execute();var c=t.get("clip",!0)?Uh(t.coordinateSystem,!1,t):null;c?l.setClipPath(c):l.removeClipPath(),this._data=s},e.prototype.incrementalPrepareRender=function(t,n,a){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,n,a,i,o){var s=n.getData(),l=bE(n,s,a,i),u=this._progressiveEls=[];function c(h){h.isGroup||(h.incremental=!0,h.ensureState("emphasis").hoverLayer=!0)}for(var f=t.start;f<t.end;f++){var d=KS(null,null,f,l(f,o),n,this.group,s);d&&(d.traverse(c),u.push(d))}},e.prototype.eachRendered=function(t){ls(this._progressiveEls||this.group,t)},e.prototype.filterForExposedEvent=function(t,n,a,i){var o=n.element;if(o==null||a.name===o)return!0;for(;(a=a.__hostTarget||a.parent)&&a!==this.group;)if(a.name===o)return!0;return!1},e.type="custom",e})(mt);function u2(r){var e=r.type,t;if(e==="path"){var n=r.shape,a=n.width!=null&&n.height!=null?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,i=WF(n);t=dc(i,null,a,n.layout||"center"),Gi(t).customPathData=i}else if(e==="image")t=new gr({}),Gi(t).customImagePath=r.style.image;else if(e==="text")t=new lt({});else if(e==="group")t=new Le;else if(e==="compoundPath"){var n=r.shape;if(!n||!n.paths){var o="";gt(o)}var s=ue(n.paths,function(c){if(c.type==="path")return dc(c.shape.pathData,c,null);var f=ah(c.type);if(!f){var d="";gt(d)}return new f});t=new jh({shape:{paths:s}})}else{var l=ah(e);if(!l){var o="";gt(o)}t=new l}return Gi(t).customGraphicType=e,t.name=r.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function c2(r,e,t,n,a,i,o){FF(e);var s=a&&a.normal.cfg;s&&e.setTextConfig(s),n&&n.transition==null&&(n.transition=zoe);var l=n&&n.style;if(l){if(e.type==="text"){var u=l;Se(u,"textFill")&&(u.fill=u.textFill),Se(u,"textStroke")&&(u.stroke=u.textStroke)}var c=void 0,f=xw(e)?l.decal:null;r&&f&&(f.dirty=!0,c=vc(f,r)),l.__decalPattern=c}if(Sw(e)&&l){var c=l.__decalPattern;c&&(l.decal=c)}Bg(e,n,i,{dataIndex:t,isInit:o,clearStyle:!0}),Gy(e,n.keyframeAnimation,i)}function VF(r,e,t,n,a){var i=e.isGroup?null:e,o=a&&a[r].cfg;if(i){var s=i.ensureState(r);if(n===!1){var l=i.getState(r);l&&(l.style=null)}else s.style=n||null;o&&(s.textConfig=o),Ml(i)}}function Foe(r,e,t){if(!r.isGroup){var n=r,a=t.currentZ,i=t.currentZLevel;n.z=a,n.zlevel=i;var o=e.z2;o!=null&&(n.z2=o||0);for(var s=0;s<as.length;s++)Voe(n,e,as[s])}}function Voe(r,e,t){var n=t===Go,a=n?e:Wy(e,t),i=a?a.z2:null,o;i!=null&&(o=n?r:r.ensureState(t),o.z2=i||0)}function bE(r,e,t,n){var a=r.get("renderItem");if(typeof a=="string"){var i=EZ(a);i&&(a=i)}var o=r.coordinateSystem,s={};o&&(s=o.prepareCustoms?o.prepareCustoms(o):Noe[o.type](o));for(var l=De({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:k,style:L,ordinalRawValue:A,styleEmphasis:D,visual:O,barLayout:B,currentSeriesIndices:N,font:W},s.api||{}),u={context:{},seriesId:r.id,seriesName:r.name,seriesIndex:r.seriesIndex,coordSys:s.coordSys,dataInsideLength:e.count(),encode:Goe(r.getData()),itemPayload:r.get("itemPayload")||{}},c,f,d={},h={},v={},y={},m=0;m<as.length;m++){var x=as[m];v[x]=r.getModel(XS[x]),y[x]=r.getModel(ZS[x])}function _(H){return H===c?f||(f=e.getItemModel(H)):e.getItemModel(H)}function T(H,$){return e.hasItemOption?H===c?d[$]||(d[$]=_(H).getModel(XS[$])):_(H).getModel(XS[$]):v[$]}function C(H,$){return e.hasItemOption?H===c?h[$]||(h[$]=_(H).getModel(ZS[$])):_(H).getModel(ZS[$]):y[$]}return function(H,$){return c=H,f=null,d={},h={},a&&a(De({dataIndexInside:H,dataIndex:e.getRawIndex(H),actionType:$?$.type:null},u),l)};function k(H,$){return $==null&&($=c),e.getStore().get(e.getDimensionIndex(H||0),$)}function A(H,$){$==null&&($=c),H=H||0;var Z=e.getDimensionInfo(H);if(!Z){var G=e.getDimensionIndex(H);return G>=0?e.getStore().get(G,$):void 0}var X=e.get(Z.name,$),K=Z&&Z.ordinalMeta;return K?K.categories[X]:X}function L(H,$){$==null&&($=c);var Z=e.getItemVisual($,"style"),G=Z&&Z.fill,X=Z&&Z.opacity,K=T($,Go).getItemStyle();G!=null&&(K.fill=G),X!=null&&(K.opacity=X);var V={inheritColor:pe(G)?G:ee.color.neutral99},U=C($,Go),ae=wt(U,null,V,!1,!0);ae.text=U.getShallow("show")?Ce(r.getFormattedLabel($,Go),mc(e,$)):null;var ce=cy(U,V,!1);return E(H,K),K=yE(K,ae,ce),H&&P(K,H),K.legacy=!0,K}function D(H,$){$==null&&($=c);var Z=T($,Wi).getItemStyle(),G=C($,Wi),X=wt(G,null,null,!0,!0);X.text=G.getShallow("show")?hn(r.getFormattedLabel($,Wi),r.getFormattedLabel($,Go),mc(e,$)):null;var K=cy(G,null,!0);return E(H,Z),Z=yE(Z,X,K),H&&P(Z,H),Z.legacy=!0,Z}function P(H,$){for(var Z in $)Se($,Z)&&(H[Z]=$[Z])}function E(H,$){H&&(H.textFill&&($.textFill=H.textFill),H.textPosition&&($.textPosition=H.textPosition))}function O(H,$){if($==null&&($=c),Se(vE,H)){var Z=e.getItemVisual($,"style");return Z?Z[vE[H]]:null}if(Se(hoe,H))return e.getItemVisual($,H)}function B(H){if(o.type==="cartesian2d"){var $=o.getBaseAxis();return NK(De({axis:$},H))}}function N(){return t.getCurrentSeriesIndices()}function W(H){return ET(H,t)}}function Goe(r){var e={};return z(r.dimensions,function(t){var n=r.getDimensionInfo(t);if(!n.isExtraCoord){var a=n.coordDim,i=e[a]=e[a]||[];i[n.coordDimIndex]=r.getDimensionIndex(t)}}),e}function KS(r,e,t,n,a,i,o){if(!n){i.remove(e);return}var s=f2(r,e,t,n,a,i);return s&&o.setItemGraphicEl(t,s),s&&Pt(s,n.focus,n.blurScope,n.emphasisDisabled),s}function f2(r,e,t,n,a,i){var o=-1,s=e;e&&GF(e,n,a)&&(o=Ue(i.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=u2(n),s&&joe(s,u)),n.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),n.tooltipDisabled&&(u.tooltipDisabled=!0),Vn.normal.cfg=Vn.normal.conOpt=Vn.emphasis.cfg=Vn.emphasis.conOpt=Vn.blur.cfg=Vn.blur.conOpt=Vn.select.cfg=Vn.select.conOpt=null,Vn.isLegacy=!1,$oe(u,t,n,a,l,Vn),Woe(u,t,n,a,l),c2(r,u,t,n,Vn,a,l),Se(n,"info")&&(Gi(u).info=n.info);for(var c=0;c<as.length;c++){var f=as[c];if(f!==Go){var d=Wy(n,f),h=d2(n,d,f);VF(f,u,d,h,Vn)}}return Foe(u,n,a),n.type==="group"&&Hoe(r,u,t,n,a),o>=0?i.replaceAt(u,o):i.add(u),u}function GF(r,e,t){var n=Gi(r),a=e.type,i=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||a!=null&&a!==n.customGraphicType||a==="path"&&Zoe(i)&&WF(i)!==n.customPathData||a==="image"&&Se(o,"image")&&o.image!==n.customImagePath}function Woe(r,e,t,n,a){var i=t.clipPath;if(i===!1)r&&r.getClipPath()&&r.removeClipPath();else if(i){var o=r.getClipPath();o&&GF(o,i,n)&&(o=null),o||(o=u2(i),r.setClipPath(o)),c2(null,o,e,i,null,n,a)}}function $oe(r,e,t,n,a,i){if(!(r.isGroup||r.type==="compoundPath")){_E(t,null,i),_E(t,Wi,i);var o=i.normal.conOpt,s=i.emphasis.conOpt,l=i.blur.conOpt,u=i.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var c=r.getTextContent();if(o===!1)c&&r.removeTextContent();else{o=i.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=u2(o),r.setTextContent(c)),c2(null,c,e,o,null,n,a);for(var f=o&&o.style,d=0;d<as.length;d++){var h=as[d];if(h!==Go){var v=i[h].conOpt;VF(h,c,v,d2(o,v,h),null)}}f?c.dirty():c.markRedraw()}}}}function _E(r,e,t){var n=e?Wy(r,e):r,a=e?d2(r,n,Wi):r.style,i=r.type,o=n?n.textConfig:null,s=r.textContent,l=s?e?Wy(s,e):s:null;if(a&&(t.isLegacy||zF(a,i,!!o,!!l))){t.isLegacy=!0;var u=OF(a,i,!e);!o&&u.textConfig&&(o=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var c=l;!c.type&&(c.type="text")}var f=e?t[e]:t.normal;f.cfg=o,f.conOpt=l}function Wy(r,e){return e?r?r[e]:null:r}function d2(r,e,t){var n=e&&e.style;return n==null&&t===Wi&&r&&(n=r.styleEmphasis),n}function Hoe(r,e,t,n,a){var i=n.children,o=i?i.length:0,s=n.$mergeChildren,l=s==="byName"||n.diffChildrenByName,u=s===!1;if(!(!o&&!l&&!u)){if(l){Yoe({api:r,oldChildren:e.children()||[],newChildren:i||[],dataIndex:t,seriesModel:a,group:e});return}u&&e.removeAll();for(var c=0;c<o;c++){var f=i[c],d=e.childAt(c);f?(f.ignore==null&&(f.ignore=!1),f2(r,d,t,f,a,e)):d.ignore=!0}for(var h=e.childCount()-1;h>=c;h--){var v=e.childAt(h);Uoe(e,v,a)}}}function Uoe(r,e,t){e&&Um(e,Gi(r).option,t)}function Yoe(r){new Ki(r.oldChildren,r.newChildren,wE,wE,r).add(TE).update(TE).remove(Xoe).execute()}function wE(r,e){var t=r&&r.name;return t??Ooe+e}function TE(r,e){var t=this.context,n=r!=null?t.newChildren[r]:null,a=e!=null?t.oldChildren[e]:null;f2(t.api,a,t.dataIndex,n,t.seriesModel,t.group)}function Xoe(r){var e=this.context,t=e.oldChildren[r];t&&Um(t,Gi(t).option,e.seriesModel)}function WF(r){return r&&(r.pathData||r.d)}function Zoe(r){return r&&(Se(r,"pathData")||Se(r,"d"))}function Koe(r){r.registerChartView(Boe),r.registerSeriesModel(poe)}var ol=et(),CE=Ae,qS=ye,h2=(function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(e,t,n,a){var i=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,!(!a&&this._lastValue===i&&this._lastStatus===o)){this._lastValue=i,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,i,e,t,n);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var f=this._moveAnimation=this.determineAnimation(e,t);if(!s)s=this._group=new Le,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),n.getZr().add(s);else{var d=$e(ME,t,f);this.updatePointerEl(s,u,d),this.updateLabelEl(s,u,d,t)}AE(s,t,!0),this._renderHandle(i)}},r.prototype.remove=function(e){this.clear(e)},r.prototype.dispose=function(e){this.clear(e)},r.prototype.determineAnimation=function(e,t){var n=t.get("animation"),a=e.axis,i=a.type==="category",o=t.get("snap");if(!o&&!i)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(i&&a.getBandWidth()>s)return!0;if(o){var l=EC(e).seriesDataCount,u=a.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},r.prototype.makeElOption=function(e,t,n,a,i){},r.prototype.createPointerEl=function(e,t,n,a){var i=t.pointer;if(i){var o=ol(e).pointerEl=new Ol[i.type](CE(t.pointer));e.add(o)}},r.prototype.createLabelEl=function(e,t,n,a){if(t.label){var i=ol(e).labelEl=new lt(CE(t.label));e.add(i),kE(i,a)}},r.prototype.updatePointerEl=function(e,t,n){var a=ol(e).pointerEl;a&&t.pointer&&(a.setStyle(t.pointer.style),n(a,{shape:t.pointer.shape}))},r.prototype.updateLabelEl=function(e,t,n,a){var i=ol(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),kE(i,a))},r.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,n=this._api.getZr(),a=this._handle,i=t.getModel("handle"),o=t.get("status");if(!i.get("show")||!o||o==="hide"){a&&n.remove(a),this._handle=null;return}var s;this._handle||(s=!0,a=this._handle=Ec(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Yi(u.event)},onmousedown:qS(this._onHandleDragMove,this,0,0),drift:qS(this._onHandleDragMove,this),ondragend:qS(this._onHandleDragEnd,this)}),n.add(a)),AE(a,t,!1),a.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=i.get("size");le(l)||(l=[l,l]),a.scaleX=l[0]/2,a.scaleY=l[1]/2,Fc(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},r.prototype._moveHandleToValue=function(e,t){ME(this._axisPointerModel,!t&&this._moveAnimation,this._handle,QS(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var a=this.updateHandleTransform(QS(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=a,n.stopAnimation(),n.attr(QS(a)),ol(n).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var t=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,a=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),a&&t.remove(a),this._group=null,this._handle=null,this._payloadInfo=null),lh(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(e,t,n){return n=n||0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},r})();function ME(r,e,t,n){$F(ol(t).lastProp,n)||(ol(t).lastProp=n,e?ct(t,n,r):(t.stopAnimation(),t.attr(n)))}function $F(r,e){if(Pe(r)&&Pe(e)){var t=!0;return z(e,function(n,a){t=t&&$F(r[a],n)}),!!t}else return r===e}function kE(r,e){r[e.get(["label","show"])?"show":"hide"]()}function QS(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function AE(r,e,t){var n=e.get("z"),a=e.get("zlevel");r&&r.traverse(function(i){i.type!=="group"&&(n!=null&&(i.z=n),a!=null&&(i.zlevel=a),i.silent=t)})}function p2(r){var e=r.get("type"),t=r.getModel(e+"Style"),n;return e==="line"?(n=t.getLineStyle(),n.fill=null):e==="shadow"&&(n=t.getAreaStyle(),n.stroke=null),n}function HF(r,e,t,n,a){var i=t.get("value"),o=UF(i,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=Nc(s.get("padding")||0),u=s.getFont(),c=gm(o,u),f=a.position,d=c.width+l[1]+l[3],h=c.height+l[0]+l[2],v=a.align;v==="right"&&(f[0]-=d),v==="center"&&(f[0]-=d/2);var y=a.verticalAlign;y==="bottom"&&(f[1]-=h),y==="middle"&&(f[1]-=h/2),qoe(f,d,h,n);var m=s.get("backgroundColor");(!m||m==="auto")&&(m=e.get(["axisLine","lineStyle","color"])),r.label={x:f[0],y:f[1],style:wt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:m}),z2:10}}function qoe(r,e,t,n){var a=n.getWidth(),i=n.getHeight();r[0]=Math.min(r[0]+e,a)-e,r[1]=Math.min(r[1]+t,i)-t,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function UF(r,e,t,n,a){r=e.scale.parse(r);var i=e.scale.getLabel({value:r},{precision:a.precision}),o=a.formatter;if(o){var s={value:Ty(e,{value:r}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};z(n,function(l){var u=t.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,f=u&&u.getDataParams(c);f&&s.seriesData.push(f)}),pe(o)?i=o.replace("{value}",i):Me(o)&&(i=o(s))}return i}function v2(r,e,t){var n=hr();return to(n,n,t.rotation),Ta(n,n,t.position),_a([r.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],n)}function YF(r,e,t,n,a,i){var o=Jr.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=a.get(["label","margin"]),HF(e,n,a,i,{position:v2(n.axis,r,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function g2(r,e,t){return t=t||0,{x1:r[t],y1:r[1-t],x2:e[t],y2:e[1-t]}}function XF(r,e,t){return t=t||0,{x:r[t],y:r[1-t],width:e[t],height:e[1-t]}}function LE(r,e,t,n,a,i){return{cx:r,cy:e,r0:t,r:n,startAngle:a,endAngle:i,clockwise:!0}}var Qoe=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,a,i,o){var s=a.axis,l=s.grid,u=i.get("type"),c=IE(l,s).getOtherAxis(s).getGlobalExtent(),f=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var d=p2(i),h=Joe[u](s,f,c);h.style=d,t.graphicKey=h.type,t.pointer=h}var v=Ey(l.getRect(),a);YF(n,t,v,a,i,o)},e.prototype.getHandleTransform=function(t,n,a){var i=Ey(n.axis.grid.getRect(),n,{labelInside:!1});i.labelMargin=a.get(["handle","margin"]);var o=v2(n.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,n,a,i){var o=a.axis,s=o.grid,l=o.getGlobalExtent(!0),u=IE(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,f=[t.x,t.y];f[c]+=n[c],f[c]=Math.min(l[1],f[c]),f[c]=Math.max(l[0],f[c]);var d=(u[1]+u[0])/2,h=[d,d];h[c]=f[c];var v=[{verticalAlign:"middle"},{align:"center"}];return{x:f[0],y:f[1],rotation:t.rotation,cursorPoint:h,tooltipOption:v[c]}},e})(h2);function IE(r,e){var t={};return t[e.dim+"AxisIndex"]=e.index,r.getCartesian(t)}var Joe={line:function(r,e,t){var n=g2([e,t[0]],[e,t[1]],DE(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,e,t){var n=Math.max(1,r.getBandWidth()),a=t[1]-t[0];return{type:"Rect",shape:XF([e-n/2,t[0]],[n,a],DE(r))}}};function DE(r){return r.dim==="x"?0:1}var ese=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:ee.color.border,width:1,type:"dashed"},shadowStyle:{color:ee.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:ee.color.neutral00,padding:[5,7,5,7],backgroundColor:ee.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:ee.color.accent40,throttle:40}},e})(Je),ji=et(),tse=z;function ZF(r,e,t){if(!ot.node){var n=e.getZr();ji(n).records||(ji(n).records={}),rse(n,e);var a=ji(n).records[r]||(ji(n).records[r]={});a.handler=t}}function rse(r,e){if(ji(r).initialized)return;ji(r).initialized=!0,t("click",$e(PE,"click")),t("mousemove",$e(PE,"mousemove")),t("globalout",ase);function t(n,a){r.on(n,function(i){var o=ise(e);tse(ji(r).records,function(s){s&&a(s,i,o.dispatchAction)}),nse(o.pendings,e)})}}function nse(r,e){var t=r.showTip.length,n=r.hideTip.length,a;t?a=r.showTip[t-1]:n&&(a=r.hideTip[n-1]),a&&(a.dispatchAction=null,e.dispatchAction(a))}function ase(r,e,t){r.handler("leave",null,t)}function PE(r,e,t,n){e.handler(r,t,n)}function ise(r){var e={showTip:[],hideTip:[]},t=function(n){var a=e[n.type];a?a.push(n):(n.dispatchAction=t,r.dispatchAction(n))};return{dispatchAction:t,pendings:e}}function bw(r,e){if(!ot.node){var t=e.getZr(),n=(ji(t).records||{})[r];n&&(ji(t).records[r]=null)}}var ose=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=n.getComponent("tooltip"),o=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";ZF("axisPointer",a,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})})},e.prototype.remove=function(t,n){bw("axisPointer",n)},e.prototype.dispose=function(t,n){bw("axisPointer",n)},e.type="axisPointer",e})(Ct);function KF(r,e){var t=[],n=r.seriesIndex,a;if(n==null||!(a=e.getSeriesByIndex(n)))return{point:[]};var i=a.getData(),o=Tl(i,r);if(o==null||o<0||le(o))return{point:[]};var s=i.getItemGraphicEl(o),l=a.coordinateSystem;if(a.getTooltipPosition)t=a.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),f=c.dim,d=u.dim,h=f==="x"||f==="radius"?1:0,v=i.mapDimension(d),y=[];y[h]=i.get(v,o),y[1-h]=i.get(i.getCalculationInfo("stackResultDimension"),o),t=l.dataToPoint(y)||[]}else t=l.dataToPoint(i.getValues(ue(l.dimensions,function(x){return i.mapDimension(x)}),o))||[];else if(s){var m=s.getBoundingRect().clone();m.applyTransform(s.transform),t=[m.x+m.width/2,m.y+m.height/2]}return{point:t,el:s}}var RE=et();function sse(r,e,t){var n=r.currTrigger,a=[r.x,r.y],i=r,o=r.dispatchAction||ye(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Fg(a)&&(a=KF({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},e).point);var l=Fg(a),u=i.axesInfo,c=s.axesInfo,f=n==="leave"||Fg(a),d={},h={},v={list:[],map:{}},y={showPointer:$e(use,h),showTooltip:$e(cse,v)};z(s.coordSysMap,function(x,_){var T=l||x.containPoint(a);z(s.coordSysAxesInfo[_],function(C,k){var A=C.axis,L=pse(u,C);if(!f&&T&&(!u||L)){var D=L&&L.value;D==null&&!l&&(D=A.pointToData(a)),D!=null&&EE(C,D,y,!1,d)}})});var m={};return z(c,function(x,_){var T=x.linkGroup;T&&!h[_]&&z(T.axesInfo,function(C,k){var A=h[k];if(C!==x&&A){var L=A.value;T.mapper&&(L=x.axis.scale.parse(T.mapper(L,zE(C),zE(x)))),m[x.key]=L}})}),z(m,function(x,_){EE(c[_],x,y,!0,d)}),fse(h,c,d),dse(v,a,r,o),hse(c,o,t),d}}function EE(r,e,t,n,a){var i=r.axis;if(!(i.scale.isBlank()||!i.containData(e))){if(!r.involveSeries){t.showPointer(r,e);return}var o=lse(e,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&a.seriesIndex==null&&ie(a,s[0]),!n&&r.snap&&i.containData(l)&&l!=null&&(e=l),t.showPointer(r,e,s),t.showTooltip(r,o,l)}}function lse(r,e){var t=e.axis,n=t.dim,a=r,i=[],o=Number.MAX_VALUE,s=-1;return z(e.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(n),f,d;if(l.getAxisTooltipData){var h=l.getAxisTooltipData(c,r,t);d=h.dataIndices,f=h.nestestValue}else{if(d=l.indicesOfNearest(n,c[0],r,t.type==="category"?.5:null),!d.length)return;f=l.getData().get(c[0],d[0])}if(!(f==null||!isFinite(f))){var v=r-f,y=Math.abs(v);y<=o&&((y<o||v>=0&&s<0)&&(o=y,s=v,a=f,i.length=0),z(d,function(m){i.push({seriesIndex:l.seriesIndex,dataIndexInside:m,dataIndex:l.getData().getRawIndex(m)})}))}}),{payloadBatch:i,snapToValue:a}}function use(r,e,t,n){r[e.key]={value:t,payloadBatch:n}}function cse(r,e,t,n){var a=t.payloadBatch,i=e.axis,o=i.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!a.length)){var l=e.coordSys.model,u=yh(l),c=r.map[u];c||(c=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(c)),c.dataByAxis.push({axisDim:i.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:a.slice()})}}function fse(r,e,t){var n=t.axesInfo=[];z(e,function(a,i){var o=a.axisPointerModel.option,s=r[i];s?(!a.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!a.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:a.axis.dim,axisIndex:a.axis.model.componentIndex,value:o.value})})}function dse(r,e,t,n){if(Fg(e)||!r.list.length){n({type:"hideTip"});return}var a=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:a.dataIndexInside,dataIndex:a.dataIndex,seriesIndex:a.seriesIndex,dataByCoordSys:r.list})}function hse(r,e,t){var n=t.getZr(),a="axisPointerLastHighlights",i=RE(n)[a]||{},o=RE(n)[a]={};z(r,function(u,c){var f=u.axisPointerModel.option;f.status==="show"&&u.triggerEmphasis&&z(f.seriesDataIndices,function(d){var h=d.seriesIndex+" | "+d.dataIndex;o[h]=d})});var s=[],l=[];z(i,function(u,c){!o[c]&&l.push(u)}),z(o,function(u,c){!i[c]&&s.push(u)}),l.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function pse(r,e){for(var t=0;t<(r||[]).length;t++){var n=r[t];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function zE(r){var e=r.axis.model,t={},n=t.axisDim=r.axis.dim;return t.axisIndex=t[n+"AxisIndex"]=e.componentIndex,t.axisName=t[n+"AxisName"]=e.name,t.axisId=t[n+"AxisId"]=e.id,t}function Fg(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function Zh(r){Fl.registerAxisPointerClass("CartesianAxisPointer",Qoe),r.registerComponentModel(ese),r.registerComponentView(ose),r.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!le(t)&&(e.axisPointer.link=[t])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=vee(e,t)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},sse)}function vse(r){Ze(S4),Ze(Zh)}var gse=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,a,i,o){var s=a.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),c=u.getExtent(),f=s.dataToCoord(n),d=i.get("type");if(d&&d!=="none"){var h=p2(i),v=mse[d](s,l,f,c);v.style=h,t.graphicKey=v.type,t.pointer=v}var y=i.get(["label","margin"]),m=yse(n,a,i,l,y);HF(t,a,i,o,m)},e})(h2);function yse(r,e,t,n,a){var i=e.axis,o=i.dataToCoord(r),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=n.getRadiusAxis().getExtent(),u,c,f;if(i.dim==="radius"){var d=hr();to(d,d,s),Ta(d,d,[n.cx,n.cy]),u=_a([o,-a],d);var h=e.getModel("axisLabel").get("rotate")||0,v=Jr.innerTextLayout(s,h*Math.PI/180,-1);c=v.textAlign,f=v.textVerticalAlign}else{var y=l[1];u=n.coordToPoint([y+a,o]);var m=n.cx,x=n.cy;c=Math.abs(u[0]-m)/y<.3?"center":u[0]>m?"left":"right",f=Math.abs(u[1]-x)/y<.3?"middle":u[1]>x?"top":"bottom"}return{position:u,align:c,verticalAlign:f}}var mse={line:function(r,e,t,n){return r.dim==="angle"?{type:"Line",shape:g2(e.coordToPoint([n[0],t]),e.coordToPoint([n[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(r,e,t,n){var a=Math.max(1,r.getBandWidth()),i=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:LE(e.cx,e.cy,n[0],n[1],(-t-a/2)*i,(-t+a/2)*i)}:{type:"Sector",shape:LE(e.cx,e.cy,t-a/2,t+a/2,0,Math.PI*2)}}},xse=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var n,a=this.ecModel;return a.eachComponent(t,function(i){i.getCoordSysModel()===this&&(n=i)},this),n},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e})(Je),y2=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",jt).models[0]},e.type="polarAxis",e})(Je);Wt(y2,$c);var Sse=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e})(y2),bse=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e})(y2),m2=(function(r){Q(e,r);function e(t,n){return r.call(this,"radius",t,n)||this}return e.prototype.pointToData=function(t,n){return this.polar.pointToData(t,n)[this.dim==="radius"?0:1]},e})(aa);m2.prototype.dataToRadius=aa.prototype.dataToCoord;m2.prototype.radiusToData=aa.prototype.coordToData;var _se=et(),x2=(function(r){Q(e,r);function e(t,n){return r.call(this,"angle",t,n||[0,360])||this}return e.prototype.pointToData=function(t,n){return this.polar.pointToData(t,n)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,n=t.getLabelModel(),a=t.scale,i=a.getExtent(),o=a.count();if(i[1]-i[0]<1)return 0;var s=i[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l),c=gm(s==null?"":s+"",n.getFont(),"center","top"),f=Math.max(c.height,7),d=f/u;isNaN(d)&&(d=1/0);var h=Math.max(0,Math.floor(d)),v=_se(t.model),y=v.lastAutoInterval,m=v.lastTickCount;return y!=null&&m!=null&&Math.abs(y-h)<=1&&Math.abs(m-o)<=1&&y>h?h=y:(v.lastTickCount=o,v.lastAutoInterval=h),h},e})(aa);x2.prototype.dataToAngle=aa.prototype.dataToCoord;x2.prototype.angleToData=aa.prototype.coordToData;var qF=["radius","angle"],wse=(function(){function r(e){this.dimensions=qF,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new m2,this._angleAxis=new x2,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},r.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},r.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(e){var t=[],n=this._angleAxis,a=this._radiusAxis;return n.scale.type===e&&t.push(n),a.scale.type===e&&t.push(a),t},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},r.prototype.dataToPoint=function(e,t,n){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)],n)},r.prototype.pointToData=function(e,t,n){n=n||[];var a=this.pointToCoord(e);return n[0]=this._radiusAxis.radiusToData(a[0],t),n[1]=this._angleAxis.angleToData(a[1],t),n},r.prototype.pointToCoord=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,a=this.getAngleAxis(),i=a.getExtent(),o=Math.min(i[0],i[1]),s=Math.max(i[0],i[1]);a.inverse?o=s-360:s=o+360;var l=Math.sqrt(t*t+n*n);t/=l,n/=l;for(var u=Math.atan2(-n,t)/Math.PI*180,c=u<o?1:-1;u<o||u>s;)u+=c*360;return[l,u]},r.prototype.coordToPoint=function(e,t){t=t||[];var n=e[0],a=e[1]/180*Math.PI;return t[0]=Math.cos(a)*n+this.cx,t[1]=-Math.sin(a)*n+this.cy,t},r.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),n=t.getExtent().slice();n[0]>n[1]&&n.reverse();var a=e.getExtent(),i=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-a[0]*i,endAngle:-a[1]*i,clockwise:e.inverse,contain:function(s,l){var u=s-this.cx,c=l-this.cy,f=u*u+c*c,d=this.r,h=this.r0;return d!==h&&f-o<=d*d&&f+o>=h*h},x:this.cx-n[1],y:this.cy-n[1],width:n[1]*2,height:n[1]*2}},r.prototype.convertToPixel=function(e,t,n){var a=OE(t);return a===this?this.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var a=OE(t);return a===this?this.pointToData(n):null},r})();function OE(r){var e=r.seriesModel,t=r.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function Tse(r,e,t){var n=e.get("center"),a=lr(e,t).refContainer;r.cx=he(n[0],a.width)+a.x,r.cy=he(n[1],a.height)+a.y;var i=r.getRadiusAxis(),o=Math.min(a.width,a.height)/2,s=e.get("radius");s==null?s=[0,"100%"]:le(s)||(s=[0,s]);var l=[he(s[0],o),he(s[1],o)];i.inverse?i.setExtent(l[1],l[0]):i.setExtent(l[0],l[1])}function Cse(r,e){var t=this,n=t.getAngleAxis(),a=t.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),a.scale.setExtent(1/0,-1/0),r.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();z(Cy(l,"radius"),function(u){a.scale.unionExtentFromData(l,u)}),z(Cy(l,"angle"),function(u){n.scale.unionExtentFromData(l,u)})}}),Il(n.scale,n.model),Il(a.scale,a.model),n.type==="category"&&!n.onBand){var i=n.getExtent(),o=360/n.scale.count();n.inverse?i[1]+=o:i[1]-=o,n.setExtent(i[0],i[1])}}function Mse(r){return r.mainType==="angleAxis"}function NE(r,e){var t;if(r.type=e.get("type"),r.scale=Wh(e),r.onBand=e.get("boundaryGap")&&r.type==="category",r.inverse=e.get("inverse"),Mse(e)){r.inverse=r.inverse!==e.get("clockwise");var n=e.get("startAngle"),a=(t=e.get("endAngle"))!==null&&t!==void 0?t:n+(r.inverse?-360:360);r.setExtent(n,a)}e.axis=r,r.model=e}var kse={dimensions:qF,create:function(r,e){var t=[];return r.eachComponent("polar",function(n,a){var i=new wse(a+"");i.update=Cse;var o=i.getRadiusAxis(),s=i.getAngleAxis(),l=n.findAxisModel("radiusAxis"),u=n.findAxisModel("angleAxis");NE(o,l),NE(s,u),Tse(i,n,e),t.push(i),n.coordinateSystem=i,i.model=n}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="polar"){var a=n.getReferringComponents("polar",jt).models[0];n.coordinateSystem=a.coordinateSystem}}),t}},Ase=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function lg(r,e,t){e[1]>e[0]&&(e=e.slice().reverse());var n=r.coordToPoint([e[0],t]),a=r.coordToPoint([e[1],t]);return{x1:n[0],y1:n[1],x2:a[0],y2:a[1]}}function ug(r){var e=r.getRadiusAxis();return e.inverse?0:1}function jE(r){var e=r[0],t=r[r.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&r.pop()}var Lse=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,n){if(this.group.removeAll(),!!t.get("show")){var a=t.axis,i=a.polar,o=i.getRadiusAxis().getExtent(),s=a.getTicksCoords({breakTicks:"none"}),l=a.getMinorTicksCoords(),u=ue(a.getViewLabels(),function(c){c=Ae(c);var f=a.scale,d=f.type==="ordinal"?f.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=a.dataToCoord(d),c});jE(u),jE(s),z(Ase,function(c){t.get([c,"show"])&&(!a.scale.isBlank()||c==="axisLine")&&Ise[c](this.group,t,i,s,l,o,u)},this)}},e.type="angleAxis",e})(Fl),Ise={axisLine:function(r,e,t,n,a,i){var o=e.getModel(["axisLine","lineStyle"]),s=t.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),c=ug(t),f=c?0:1,d,h=Math.abs(u[1]-u[0])===360?"Circle":"Arc";i[f]===0?d=new Ol[h]({shape:{cx:t.cx,cy:t.cy,r:i[c],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):d=new Dc({shape:{cx:t.cx,cy:t.cy,r:i[c],r0:i[f]},style:o.getLineStyle(),z2:1,silent:!0}),d.style.fill=null,r.add(d)},axisTick:function(r,e,t,n,a,i){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=i[ug(t)],u=ue(n,function(c){return new Zt({shape:lg(t,[l,l+s],c.coord)})});r.add(Cn(u,{style:De(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,e,t,n,a,i){if(a.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=i[ug(t)],c=[],f=0;f<a.length;f++)for(var d=0;d<a[f].length;d++)c.push(new Zt({shape:lg(t,[u,u+l],a[f][d].coord)}));r.add(Cn(c,{style:De(s.getModel("lineStyle").getLineStyle(),De(o.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(r,e,t,n,a,i,o){var s=e.getCategories(!0),l=e.getModel("axisLabel"),u=l.get("margin"),c=e.get("triggerEvent");z(o,function(f,d){var h=l,v=f.tickValue,y=i[ug(t)],m=t.coordToPoint([y+u,f.coord]),x=t.cx,_=t.cy,T=Math.abs(m[0]-x)/y<.3?"center":m[0]>x?"left":"right",C=Math.abs(m[1]-_)/y<.3?"middle":m[1]>_?"top":"bottom";if(s&&s[v]){var k=s[v];Pe(k)&&k.textStyle&&(h=new rt(k.textStyle,l,l.ecModel))}var A=new lt({silent:Jr.isLabelSilent(e),style:wt(h,{x:m[0],y:m[1],fill:h.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:f.formattedLabel,align:T,verticalAlign:C})});if(r.add(A),no({el:A,componentModel:e,itemName:f.formattedLabel,formatterParamsExtra:{isTruncated:function(){return A.isTruncated},value:f.rawLabel,tickIndex:d}}),c){var L=Jr.makeAxisEventDataBase(e);L.targetType="axisLabel",L.value=f.rawLabel,je(A).eventData=L}},this)},splitLine:function(r,e,t,n,a,i){var o=e.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 d=u++%l.length;c[d]=c[d]||[],c[d].push(new Zt({shape:lg(t,i,n[f].coord)}))}for(var f=0;f<c.length;f++)r.add(Cn(c[f],{style:De({stroke:l[f%l.length]},s.getLineStyle()),silent:!0,z:e.get("z")}))},minorSplitLine:function(r,e,t,n,a,i){if(a.length){for(var o=e.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=[],u=0;u<a.length;u++)for(var c=0;c<a[u].length;c++)l.push(new Zt({shape:lg(t,i,a[u][c].coord)}));r.add(Cn(l,{style:s.getLineStyle(),silent:!0,z:e.get("z")}))}},splitArea:function(r,e,t,n,a,i){if(n.length){var o=e.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,d=-n[0].coord*f,h=Math.min(i[0],i[1]),v=Math.max(i[0],i[1]),y=e.get("clockwise"),m=1,x=n.length;m<=x;m++){var _=m===x?n[0].coord:n[m].coord,T=u++%l.length;c[T]=c[T]||[],c[T].push(new Er({shape:{cx:t.cx,cy:t.cy,r0:h,r:v,startAngle:d,endAngle:-_*f,clockwise:y},silent:!0})),d=-_*f}for(var m=0;m<c.length;m++)r.add(Cn(c[m],{style:De({fill:l[m%l.length]},s.getAreaStyle()),silent:!0}))}}},Dse=["splitLine","splitArea","minorSplitLine"],Pse=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,n,a){if(this.group.removeAll(),!!t.get("show")){var i=this._axisGroup,o=this._axisGroup=new Le;this.group.add(o);var s=t.axis,l=s.polar,u=l.getAngleAxis(),c=s.getTicksCoords(),f=s.getMinorTicksCoords(),d=u.getExtent()[0],h=s.getExtent(),v=Ese(l,t,d),y=new Jr(t,a,v);y.build(),o.add(y.group),Bh(i,o,t),z(Dse,function(m){t.get([m,"show"])&&!s.scale.isBlank()&&Rse[m](this.group,t,l,d,h,c,f)},this)}},e.type="radiusAxis",e})(Fl),Rse={splitLine:function(r,e,t,n,a,i){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0,c=t.getAngleAxis(),f=Math.PI/180,d=c.getExtent(),h=Math.abs(d[1]-d[0])===360?"Circle":"Arc";l=l instanceof Array?l:[l];for(var v=[],y=0;y<i.length;y++){var m=u++%l.length;v[m]=v[m]||[],v[m].push(new Ol[h]({shape:{cx:t.cx,cy:t.cy,r:Math.max(i[y].coord,0),startAngle:-d[0]*f,endAngle:-d[1]*f,clockwise:c.inverse}}))}for(var y=0;y<v.length;y++)r.add(Cn(v[y],{style:De({stroke:l[y%l.length],fill:null},s.getLineStyle()),silent:!0}))},minorSplitLine:function(r,e,t,n,a,i,o){if(o.length){for(var s=e.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 fi({shape:{cx:t.cx,cy:t.cy,r:o[c][f].coord}}));r.add(Cn(u,{style:De({fill:null},l.getLineStyle()),silent:!0}))}},splitArea:function(r,e,t,n,a,i){if(i.length){var o=e.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=i[0].coord,d=1;d<i.length;d++){var h=u++%l.length;c[h]=c[h]||[],c[h].push(new Er({shape:{cx:t.cx,cy:t.cy,r0:f,r:i[d].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),f=i[d].coord}for(var d=0;d<c.length;d++)r.add(Cn(c[d],{style:De({fill:l[d%l.length]},s.getAreaStyle()),silent:!0}))}}};function Ese(r,e,t){return{position:[r.cx,r.cy],rotation:t/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}function QF(r){return r.get("stack")||"__ec_stack_"+r.seriesIndex}function JF(r,e){return e.dim+r.model.componentIndex}function zse(r,e,t){var n={},a=Ose(ht(e.getSeriesByType(r),function(i){return!e.isSeriesFiltered(i)&&i.coordinateSystem&&i.coordinateSystem.type==="polar"}));e.eachSeriesByType(r,function(i){if(i.coordinateSystem.type==="polar"){var o=i.getData(),s=i.coordinateSystem,l=s.getBaseAxis(),u=JF(s,l),c=QF(i),f=a[u][c],d=f.offset,h=f.width,v=s.getOtherAxis(l),y=i.coordinateSystem.cx,m=i.coordinateSystem.cy,x=i.get("barMinHeight")||0,_=i.get("barMinAngle")||0;n[c]=n[c]||[];for(var T=o.mapDimension(v.dim),C=o.mapDimension(l.dim),k=qi(o,T),A=l.dim!=="radius"||!i.get("roundCap",!0),L=v.model,D=L.get("startValue"),P=v.dataToCoord(D||0),E=0,O=o.count();E<O;E++){var B=o.get(T,E),N=o.get(C,E),W=B>=0?"p":"n",H=P;k&&(n[c][N]||(n[c][N]={p:P,n:P}),H=n[c][N][W]);var $=void 0,Z=void 0,G=void 0,X=void 0;if(v.dim==="radius"){var K=v.dataToCoord(B)-P,V=l.dataToCoord(N);Math.abs(K)<x&&(K=(K<0?-1:1)*x),$=H,Z=H+K,G=V-d,X=G-h,k&&(n[c][N][W]=Z)}else{var U=v.dataToCoord(B,A)-P,ae=l.dataToCoord(N);Math.abs(U)<_&&(U=(U<0?-1:1)*_),$=ae+d,Z=$+h,G=H,X=H+U,k&&(n[c][N][W]=X)}o.setItemLayout(E,{cx:y,cy:m,r0:$,r:Z,startAngle:-G*Math.PI/180,endAngle:-X*Math.PI/180,clockwise:G>=X})}}})}function Ose(r){var e={};z(r,function(n,a){var i=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=JF(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/i.count(),f=e[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},d=f.stacks;e[l]=f;var h=QF(n);d[h]||f.autoWidthCount++,d[h]=d[h]||{width:0,maxWidth:0};var v=he(n.get("barWidth"),c),y=he(n.get("barMaxWidth"),c),m=n.get("barGap"),x=n.get("barCategoryGap");v&&!d[h].width&&(v=Math.min(f.remainedWidth,v),d[h].width=v,f.remainedWidth-=v),y&&(d[h].maxWidth=y),m!=null&&(f.gap=m),x!=null&&(f.categoryGap=x)});var t={};return z(e,function(n,a){t[a]={};var i=n.stacks,o=n.bandWidth,s=he(n.categoryGap,o),l=he(n.gap,1),u=n.remainedWidth,c=n.autoWidthCount,f=(u-s)/(c+(c-1)*l);f=Math.max(f,0),z(i,function(y,m){var x=y.maxWidth;x&&x<f&&(x=Math.min(x,u),y.width&&(x=Math.min(x,y.width)),u-=x,y.width=x,c--)}),f=(u-s)/(c+(c-1)*l),f=Math.max(f,0);var d=0,h;z(i,function(y,m){y.width||(y.width=f),h=y,d+=y.width*(1+l)}),h&&(d-=h.width*l);var v=-d/2;z(i,function(y,m){t[a][m]=t[a][m]||{offset:v,width:y.width},v+=y.width*(1+l)})}),t}var Nse={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},jse={splitNumber:5},Bse=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="polar",e})(Ct);function Fse(r){Ze(Zh),Fl.registerAxisPointerClass("PolarAxisPointer",gse),r.registerCoordinateSystem("polar",kse),r.registerComponentModel(xse),r.registerComponentView(Bse),xc(r,"angle",Sse,Nse),xc(r,"radius",bse,jse),r.registerComponentView(Lse),r.registerComponentView(Pse),r.registerLayout($e(zse,"bar"))}function _w(r,e){e=e||{};var t=r.coordinateSystem,n=r.axis,a={},i=n.position,o=n.orient,s=t.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]}};a.position=[o==="vertical"?u.vertical[i]:l[0],o==="horizontal"?u.horizontal[i]:l[3]];var c={horizontal:0,vertical:1};a.rotation=Math.PI/2*c[o];var f={top:-1,bottom:1,right:1,left:-1};a.labelDirection=a.tickDirection=a.nameDirection=f[i],r.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),Tr(e.labelInside,r.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var d=r.get(["axisLabel","rotate"]);return a.labelRotate=i==="top"?-d:d,a.z2=1,a}var Vse=["splitArea","splitLine","breakArea"],Gse=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="SingleAxisPointer",t}return e.prototype.render=function(t,n,a,i){var o=this.group;o.removeAll();var s=this._axisGroup;this._axisGroup=new Le;var l=_w(t),u=new Jr(t,a,l);u.build(),o.add(this._axisGroup),o.add(u.group),z(Vse,function(c){t.get([c,"show"])&&Wse[c](this,this.group,this._axisGroup,t,a)},this),Bh(s,this._axisGroup,t),r.prototype.render.call(this,t,n,a,i)},e.prototype.remove=function(){y4(this)},e.type="singleAxis",e})(Fl),Wse={splitLine:function(r,e,t,n,a){var i=n.axis;if(!i.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=i.isHorizontal(),d=[],h=0,v=i.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),y=[],m=[],x=0;x<v.length;++x){var _=i.toGlobalCoord(v[x].coord);f?(y[0]=_,y[1]=c.y,m[0]=_,m[1]=c.y+c.height):(y[0]=c.x,y[1]=_,m[0]=c.x+c.width,m[1]=_);var T=new Zt({shape:{x1:y[0],y1:y[1],x2:m[0],y2:m[1]},silent:!0});hc(T.shape,u);var C=h++%l.length;d[C]=d[C]||[],d[C].push(T)}for(var k=s.getLineStyle(["color"]),x=0;x<d.length;++x)e.add(Cn(d[x],{style:De({stroke:l[x%l.length]},k),silent:!0}))}},splitArea:function(r,e,t,n,a){g4(r,t,n,n)},breakArea:function(r,e,t,n,a){var i=Xh(),o=n.axis.scale;i&&o.type!=="ordinal"&&i.rectCoordBuildBreakAxis(e,r,n,n.coordinateSystem.getRect(),a)}},Vg=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getCoordSysModel=function(){return this},e.type="singleAxis",e.layoutMode="box",e.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},e})(Je);Wt(Vg,$c.prototype);var $se=(function(r){Q(e,r);function e(t,n,a,i,o){var s=r.call(this,t,n,a)||this;return s.type=i||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.pointToData=function(t,n){return this.coordinateSystem.pointToData(t)[0]},e})(aa),e6=["single"],Hse=(function(){function r(e,t,n){this.type="single",this.dimension="single",this.dimensions=e6,this.axisPointerEnabled=!0,this.model=e,this._init(e,t,n)}return r.prototype._init=function(e,t,n){var a=this.dimension,i=new $se(a,Wh(e),[0,0],e.get("type"),e.get("position")),o=i.type==="category";i.onBand=o&&e.get("boundaryGap"),i.inverse=e.get("inverse"),i.orient=e.get("orient"),e.axis=i,i.model=e,i.coordinateSystem=this,this._axis=i},r.prototype.update=function(e,t){e.eachSeries(function(n){if(n.coordinateSystem===this){var a=n.getData();z(a.mapDimensionsAll(this.dimension),function(i){this._axis.scale.unionExtentFromData(a,i)},this),Il(this._axis.scale,this._axis.model)}},this)},r.prototype.resize=function(e,t){var n=lr(e,t).refContainer;this._rect=Dt(e.getBoxLayoutParams(),n),this._adjustAxis()},r.prototype.getRect=function(){return this._rect},r.prototype._adjustAxis=function(){var e=this._rect,t=this._axis,n=t.isHorizontal(),a=n?[0,e.width]:[0,e.height],i=t.inverse?1:0;t.setExtent(a[i],a[1-i]),this._updateAxisTransform(t,n?e.x:e.y)},r.prototype._updateAxisTransform=function(e,t){var n=e.getExtent(),a=n[0]+n[1],i=e.isHorizontal();e.toGlobalCoord=i?function(o){return o+t}:function(o){return a-o+t},e.toLocalCoord=i?function(o){return o-t}:function(o){return a-o+t}},r.prototype.getAxis=function(){return this._axis},r.prototype.getBaseAxis=function(){return this._axis},r.prototype.getAxes=function(){return[this._axis]},r.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},r.prototype.containPoint=function(e){var t=this.getRect(),n=this.getAxis(),a=n.orient;return a==="horizontal"?n.contain(n.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},r.prototype.pointToData=function(e,t,n){n=n||[];var a=this.getAxis();return n[0]=a.coordToData(a.toLocalCoord(e[a.orient==="horizontal"?0:1])),n},r.prototype.dataToPoint=function(e,t,n){var a=this.getAxis(),i=this.getRect();n=n||[];var o=a.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),n[o]=a.toGlobalCoord(a.dataToCoord(+e)),n[1-o]=o===0?i.y+i.height/2:i.x+i.width/2,n},r.prototype.convertToPixel=function(e,t,n){var a=BE(t);return a===this?this.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var a=BE(t);return a===this?this.pointToData(n):null},r})();function BE(r){var e=r.seriesModel,t=r.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function Use(r,e){var t=[];return r.eachComponent("singleAxis",function(n,a){var i=new Hse(n,r,e);i.name="single_"+a,i.resize(n,e),n.coordinateSystem=i,t.push(i)}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="singleAxis"){var a=n.getReferringComponents("singleAxis",jt).models[0];n.coordinateSystem=a&&a.coordinateSystem}}),t}var Yse={create:Use,dimensions:e6},FE=["x","y"],Xse=["width","height"],Zse=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,a,i,o){var s=a.axis,l=s.coordinateSystem,u=JS(l,1-$y(s)),c=l.dataToPoint(n)[0],f=i.get("type");if(f&&f!=="none"){var d=p2(i),h=Kse[f](s,c,u);h.style=d,t.graphicKey=h.type,t.pointer=h}var v=_w(a);YF(n,t,v,a,i,o)},e.prototype.getHandleTransform=function(t,n,a){var i=_w(n,{labelInside:!1});i.labelMargin=a.get(["handle","margin"]);var o=v2(n.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,n,a,i){var o=a.axis,s=o.coordinateSystem,l=$y(o),u=JS(s,l),c=[t.x,t.y];c[l]+=n[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var f=JS(s,1-l),d=(f[1]+f[0])/2,h=[d,d];return h[l]=c[l],{x:c[0],y:c[1],rotation:t.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}},e})(h2),Kse={line:function(r,e,t){var n=g2([e,t[0]],[e,t[1]],$y(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,e,t){var n=r.getBandWidth(),a=t[1]-t[0];return{type:"Rect",shape:XF([e-n/2,t[0]],[n,a],$y(r))}}};function $y(r){return r.isHorizontal()?0:1}function JS(r,e){var t=r.getRect();return[t[FE[e]],t[FE[e]]+t[Xse[e]]]}var qse=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e})(Ct);function Qse(r){Ze(Zh),Fl.registerAxisPointerClass("SingleAxisPointer",Zse),r.registerComponentView(qse),r.registerComponentView(Gse),r.registerComponentModel(Vg),xc(r,"single",Vg,Vg.defaultOption),r.registerCoordinateSystem("single",Yse)}var Jse=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n,a){var i=Nl(t);r.prototype.init.apply(this,arguments),VE(t,i)},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),VE(this.option,t)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.layoutMode="box",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:ee.color.axisLine,width:1,type:"solid"}},itemStyle:{color:ee.color.neutral00,borderWidth:1,borderColor:ee.color.neutral10},dayLabel:{show:!0,firstDay:0,position:"start",margin:ee.size.s,color:ee.color.secondary},monthLabel:{show:!0,position:"start",margin:ee.size.s,align:"center",formatter:null,color:ee.color.secondary},yearLabel:{show:!0,position:null,margin:ee.size.xl,formatter:null,color:ee.color.quaternary,fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e})(Je);function VE(r,e){var t=r.cellSize,n;le(t)?n=t:n=r.cellSize=[t,t],n.length===1&&(n[1]=n[0]);var a=ue([0,1],function(i){return bY(e,i)&&(n[i]="auto"),n[i]!=null&&n[i]!=="auto"});oi(r,e,{type:"box",ignoreSize:a})}var ele=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=this.group;i.removeAll();var o=t.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=n.getLocaleModel();this._renderDayRect(t,s,i),this._renderLines(t,s,l,i),this._renderYearText(t,s,l,i),this._renderMonthText(t,u,l,i),this._renderWeekText(t,u,s,l,i)},e.prototype._renderDayRect=function(t,n,a){for(var i=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),s=i.getCellWidth(),l=i.getCellHeight(),u=n.start.time;u<=n.end.time;u=i.getNextNDay(u,1).time){var c=i.dataToCalendarLayout([u],!1).tl,f=new Qe({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});a.add(f)}},e.prototype._renderLines=function(t,n,a,i){var o=this,s=t.coordinateSystem,l=t.getModel(["splitLine","lineStyle"]).getLineStyle(),u=t.get(["splitLine","show"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var f=n.start,d=0;f.time<=n.end.time;d++){v(f.formatedDate),d===0&&(f=s.getDateInfo(n.start.y+"-"+n.start.m));var h=f.date;h.setMonth(h.getMonth()+1),f=s.getDateInfo(h)}v(s.getNextNDay(n.end.time,1).formatedDate);function v(y){o._firstDayOfMonth.push(s.getDateInfo(y)),o._firstDayPoints.push(s.dataToCalendarLayout([y],!1).tl);var m=o._getLinePointsOfOneWeek(t,y,a);o._tlpoints.push(m[0]),o._blpoints.push(m[m.length-1]),u&&o._drawSplitline(m,l,i)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,c,a),l,i),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,a),l,i)},e.prototype._getEdgesPoints=function(t,n,a){var i=[t[0].slice(),t[t.length-1].slice()],o=a==="horizontal"?0:1;return i[0][o]=i[0][o]-n/2,i[1][o]=i[1][o]+n/2,i},e.prototype._drawSplitline=function(t,n,a){var i=new Cr({z2:20,shape:{points:t},style:n});a.add(i)},e.prototype._getLinePointsOfOneWeek=function(t,n,a){for(var i=t.coordinateSystem,o=i.getDateInfo(n),s=[],l=0;l<7;l++){var u=i.getNextNDay(o.time,l),c=i.dataToCalendarLayout([u.time],!1);s[2*u.day]=c.tl,s[2*u.day+1]=c[a==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,n){return pe(t)&&t?pY(t,n):Me(t)?t(n):n.nameMap},e.prototype._yearTextPositionControl=function(t,n,a,i,o){var s=n[0],l=n[1],u=["center","bottom"];i==="bottom"?(l+=o,u=["center","top"]):i==="left"?s-=o:i==="right"?(s+=o,u=["center","top"]):l-=o;var c=0;return(i==="left"||i==="right")&&(c=Math.PI/2),{rotation:c,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(t,n,a,i){var o=t.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=a!=="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,d=a==="horizontal"?0:1,h={top:[c,u[d][1]],bottom:[c,u[1-d][1]],left:[u[1-d][0],f],right:[u[d][0],f]},v=n.start.y;+n.end.y>+n.start.y&&(v=v+"-"+n.end.y);var y=o.get("formatter"),m={start:n.start.y,end:n.end.y,nameMap:v},x=this._formatterLabel(y,m),_=new lt({z2:30,style:wt(o,{text:x}),silent:o.get("silent")});_.attr(this._yearTextPositionControl(_,h[l],a,l,s)),i.add(_)}},e.prototype._monthTextPositionControl=function(t,n,a,i,o){var s="left",l="top",u=t[0],c=t[1];return a==="horizontal"?(c=c+o,n&&(s="center"),i==="start"&&(l="bottom")):(u=u+o,n&&(l="middle"),i==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(t,n,a,i){var o=t.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||pe(s))&&(s&&(n=y_(s)||n),s=n.get(["time","monthAbbr"])||[]);var d=u==="start"?0:1,h=a==="horizontal"?0:1;l=u==="start"?-l:l;for(var v=c==="center",y=o.get("silent"),m=0;m<f[d].length-1;m++){var x=f[d][m].slice(),_=this._firstDayOfMonth[m];if(v){var T=this._firstDayPoints[m];x[h]=(T[h]+f[0][m+1][h])/2}var C=o.get("formatter"),k=s[+_.m-1],A={yyyy:_.y,yy:(_.y+"").slice(2),MM:_.m,M:+_.m,nameMap:k},L=this._formatterLabel(C,A),D=new lt({z2:30,style:ie(wt(o,{text:L}),this._monthTextPositionControl(x,v,a,u,l)),silent:y});i.add(D)}}},e.prototype._weekTextPositionControl=function(t,n,a,i,o){var s="center",l="middle",u=t[0],c=t[1],f=a==="start";return n==="horizontal"?(u=u+i+(f?1:-1)*o[0]/2,s=f?"right":"left"):(c=c+i+(f?1:-1)*o[1]/2,l=f?"bottom":"top"),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderWeekText=function(t,n,a,i,o){var s=t.getModel("dayLabel");if(s.get("show")){var l=t.coordinateSystem,u=s.get("position"),c=s.get("nameMap"),f=s.get("margin"),d=l.getFirstDayOfWeek();if(!c||pe(c)){c&&(n=y_(c)||n);var h=n.get(["time","dayOfWeekShort"]);c=h||ue(n.get(["time","dayOfWeekAbbr"]),function(A){return A[0]})}var v=l.getNextNDay(a.end.time,7-a.lweek).time,y=[l.getCellWidth(),l.getCellHeight()];f=he(f,Math.min(y[1],y[0])),u==="start"&&(v=l.getNextNDay(a.start.time,-(7+a.fweek)).time,f=-f);for(var m=s.get("silent"),x=0;x<7;x++){var _=l.getNextNDay(v,x),T=l.dataToCalendarLayout([_.time],!1).center,C=x;C=Math.abs((x+d)%7);var k=new lt({z2:30,style:ie(wt(s,{text:c[C]}),this._weekTextPositionControl(T,i,u,f,y)),silent:m});o.add(k)}}},e.type="calendar",e})(Ct),eb=864e5,tle=(function(){function r(e,t,n){this.type="calendar",this.dimensions=r.dimensions,this.getDimensionsInfo=r.getDimensionsInfo,this._model=e,this._update(t,n)}return r.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},r.prototype.getRangeInfo=function(){return this._rangeInfo},r.prototype.getModel=function(){return this._model},r.prototype.getRect=function(){return this._rect},r.prototype.getCellWidth=function(){return this._sw},r.prototype.getCellHeight=function(){return this._sh},r.prototype.getOrient=function(){return this._orient},r.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},r.prototype.getDateInfo=function(e){e=ci(e);var t=e.getFullYear(),n=e.getMonth()+1,a=n<10?"0"+n:""+n,i=e.getDate(),o=i<10?"0"+i:""+i,s=e.getDay();return s=Math.abs((s+7-this.getFirstDayOfWeek())%7),{y:t+"",m:a,d:o,day:s,time:e.getTime(),formatedDate:t+"-"+a+"-"+o,date:e}},r.prototype.getNextNDay=function(e,t){return t=t||0,t===0?this.getDateInfo(e):(e=new Date(this.getDateInfo(e).time),e.setDate(e.getDate()+t),this.getDateInfo(e))},r.prototype._update=function(e,t){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,a=["width","height"],i=this._model.getCellSize().slice(),o=this._model.getBoxLayoutParams(),s=this._orient==="horizontal"?[n,7]:[7,n];z([0,1],function(f){c(i,f)&&(o[a[f]]=i[f]*s[f])});var l={width:t.getWidth(),height:t.getHeight()},u=this._rect=Dt(o,l);z([0,1],function(f){c(i,f)||(i[f]=u[a[f]]/s[f])});function c(f,d){return f[d]!=null&&f[d]!=="auto"}this._sw=i[0],this._sh=i[1]},r.prototype.dataToPoint=function(e,t,n){n=n||[],le(e)&&(e=e[0]),t==null&&(t=!0);var a=this.getDateInfo(e),i=this._rangeInfo,o=a.formatedDate;if(t&&!(a.time>=i.start.time&&a.time<i.end.time+eb))return n[0]=n[1]=NaN,n;var s=a.day,l=this._getRangeInfo([i.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},r.prototype.pointToData=function(e){var t=this.pointToDate(e);return t&&t.time},r.prototype.dataToLayout=function(e,t,n){n=n||{};var a=n.rect=n.rect||{},i=n.contentRect=n.contentRect||{},o=this.dataToPoint(e,t);return a.x=o[0]-this._sw/2,a.y=o[1]-this._sh/2,a.width=this._sw,a.height=this._sh,ze.copy(i,a),kl(i,this._lineWidth/2,!0,!0),n},r.prototype.dataToCalendarLayout=function(e,t){var n=this.dataToPoint(e,t);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]}},r.prototype.pointToDate=function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,n=Math.floor((e[1]-this._rect.y)/this._sh)+1,a=this._rangeInfo.range;return this._orient==="vertical"?this._getDateByWeeksAndDay(n,t-1,a):this._getDateByWeeksAndDay(t,n-1,a)},r.prototype.convertToPixel=function(e,t,n){var a=tb(t);return a===this?a.dataToPoint(n):null},r.prototype.convertToLayout=function(e,t,n){var a=tb(t);return a===this?a.dataToLayout(n):null},r.prototype.convertFromPixel=function(e,t,n){var a=tb(t);return a===this?a.pointToData(n):null},r.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},r.prototype._initRangeOption=function(){var e=this._model.get("range"),t;if(le(e)&&e.length===1&&(e=e[0]),le(e))t=e;else{var n=e.toString();if(/^\d{4}$/.test(n)&&(t=[n+"-01-01",n+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(n)){var a=this.getDateInfo(n),i=a.date;i.setMonth(i.getMonth()+1);var o=this.getNextNDay(i,-1);t=[a.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n)&&(t=[n,n])}if(!t)return e;var s=this._getRangeInfo(t);return s.start.time>s.end.time&&t.reverse(),t},r.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],n;t[0].time>t[1].time&&(n=!0,t.reverse());var a=Math.floor(t[1].time/eb)-Math.floor(t[0].time/eb)+1,i=new Date(t[0].time),o=i.getDate(),s=t[1].date.getDate();i.setDate(o+a-1);var l=i.getDate();if(l!==s)for(var u=i.getTime()-t[1].time>0?1:-1;(l=i.getDate())!==s&&(i.getTime()-t[1].time)*u>0;)a-=u,i.setDate(l-u);var c=Math.floor((a+t[0].day+6)/7),f=n?-c+1:c-1;return n&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:a,weeks:c,nthWeek:f,fweek:t[0].day,lweek:t[1].day}},r.prototype._getDateByWeeksAndDay=function(e,t,n){var a=this._getRangeInfo(n);if(e>a.weeks||e===0&&t<a.fweek||e===a.weeks&&t>a.lweek)return null;var i=(e-1)*7-a.fweek+t,o=new Date(a.start.time);return o.setDate(+a.start.d+i),this.getDateInfo(o)},r.create=function(e,t){var n=[];return e.eachComponent("calendar",function(a){var i=new r(a,e,t);n.push(i),a.coordinateSystem=i}),e.eachComponent(function(a,i){Vh({targetModel:i,coordSysType:"calendar",coordSysProvider:x5})}),n},r.dimensions=["time","value"],r})();function tb(r){var e=r.calendarModel,t=r.seriesModel,n=e?e.coordinateSystem:t?t.coordinateSystem:null;return n}function rle(r){r.registerComponentModel(Jse),r.registerComponentView(ele),r.registerCoordinateSystem("calendar",tle)}var Ri={level:1,leaf:2,nonLeaf:3},$i={none:0,all:1,body:2,corner:3};function ww(r,e,t){var n=e[Ge[t]].getCell(r);return!n&&ut(r)&&r<0&&(n=e[Ge[1-t]].getUnitLayoutInfo(t,Math.round(r))),n}function t6(r){var e=r||[];return e[0]=e[0]||[],e[1]=e[1]||[],e[0][0]=e[0][1]=e[1][0]=e[1][1]=NaN,e}function r6(r,e,t,n,a){GE(r[0],e,a,t,n,0),GE(r[1],e,a,t,n,1)}function GE(r,e,t,n,a,i){r[0]=1/0,r[1]=-1/0;var o=n[i],s=le(o)?o:[o],l=s.length,u=!!t;if(l>=1?(WE(r,e,s,u,a,i,0),l>1&&WE(r,e,s,u,a,i,l-1)):r[0]=r[1]=NaN,u){var c=-a[Ge[1-i]].getLocatorCount(i),f=a[Ge[i]].getLocatorCount(i)-1;t===$i.body?c=Yt(0,c):t===$i.corner&&(f=In(-1,f)),f<c&&(c=f=NaN),Dr(r[0])&&(r[0]=c),Dr(r[1])&&(r[1]=f),r[0]=Yt(In(r[0],f),c),r[1]=Yt(In(r[1],f),c)}}function WE(r,e,t,n,a,i,o){var s=ww(t[o],a,i);if(!s){r[0]=r[1]=NaN;return}var l=s.id[Ge[i]],u=l,c=ole(s);c&&(u+=c.span[Ge[i]]-1),r[0]=In(r[0],l,u),r[1]=Yt(r[1],l,u)}function cg(r,e){return Dr(r[e][0])||Dr(r[e][1])}function $E(r,e,t,n){e=e||nle;for(var a=0;a<n;a++)e[a]=!1;for(;;){for(var i=!1,a=0;a<n;a++){var o=t[a];!e[a]&&o.cellMergeOwner&&ale(r,o.locatorRange)&&(e[a]=!0,i=!0)}if(!i)break}}var nle=[];function ale(r,e){return!HE(r[0],e[0])||!HE(r[1],e[1])?!1:(r[0][0]=In(r[0][0],e[0][0]),r[0][1]=Yt(r[0][1],e[0][1]),r[1][0]=In(r[1][0],e[1][0]),r[1][1]=Yt(r[1][1],e[1][1]),!0)}function HE(r,e){return r[1]>=e[0]&&r[0]<=e[1]}function UE(r,e){r.id.set(e[0][0],e[1][0]),r.span.set(e[0][1]-r.id.x+1,e[1][1]-r.id.y+1)}function ile(r,e){r[0][0]=e[0][0],r[0][1]=e[0][1],r[1][0]=e[1][0],r[1][1]=e[1][1]}function YE(r,e,t,n){var a=ww(e[n][0],t,n),i=ww(e[n][1],t,n);r[Ge[n]]=r[tr[n]]=NaN,a&&i&&(r[Ge[n]]=a.xy,r[tr[n]]=i.xy+i.wh-a.xy)}function id(r,e,t,n){return r[Ge[e]]=t,r[Ge[1-e]]=n,r}function ole(r){return r&&(r.type===Ri.leaf||r.type===Ri.nonLeaf)?r:null}function Hy(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var XE=(function(){function r(e,t){this._cells=[],this._levels=[],this.dim=e,this.dimIdx=e==="x"?0:1,this._model=t,this._uniqueValueGen=sle(e);var n=t.get("data",!0);n!=null&&!le(n)&&(n=[]),n?this._initByDimModelData(n):this._initBySeriesData()}return r.prototype._initByDimModelData=function(e){var t=this,n=t._cells,a=t._levels,i=[],o=0;t._leavesCount=s(e,0,0),l();return;function s(u,c,f){var d=0;return u&&z(u,function(h,v){var y;pe(h)?y={value:h}:Pe(h)?(y=h,h.value!=null&&!pe(h.value)&&(y={value:null})):y={value:null};var m={type:Ri.nonLeaf,ordinal:NaN,level:f,firstLeafLocator:c,id:new Ee,span:id(new Ee,t.dimIdx,1,1),option:y,xy:NaN,wh:NaN,dim:t,rect:Hy()};o++,(i[c]||(i[c]=[])).push(m),a[f]||(a[f]={type:Ri.level,xy:NaN,wh:NaN,option:null,id:new Ee,dim:t});var x=s(y.children,c,f+1),_=Math.max(1,x);m.span[Ge[t.dimIdx]]=_,d+=_,c+=_}),d}function l(){for(var u=[];n.length<o;)for(var c=0;c<i.length;c++){var f=i[c].pop();if(f){f.ordinal=u.length;var d=f.option.value;u.push(d),n.push(f),t._uniqueValueGen.calcDupBase(d)}}t._uniqueValueGen.ensureValueUnique(u,n);var h=t._ordinalMeta=new dh({categories:u,needCollect:!1,deduplication:!1});t._scale=new gc({ordinalMeta:h});for(var v=0;v<t._leavesCount;v++){var y=t._cells[v];y.type=Ri.leaf,y.span[Ge[1-t.dimIdx]]=t._levels.length-y.level}t._initCellsId(),t._initLevelIdOptions()}},r.prototype._initBySeriesData=function(){var e=this;e._leavesCount=0,e._levels=[{type:Ri.level,xy:NaN,wh:NaN,option:null,id:new Ee,dim:e}],e._initLevelIdOptions();var t=e._ordinalMeta=new dh({needCollect:!0,deduplication:!0,onCollect:function(n,a){var i=e._cells[a]={type:Ri.leaf,ordinal:a,level:0,firstLeafLocator:a,id:new Ee,span:id(new Ee,e.dimIdx,1,1),option:{value:n+""},xy:NaN,wh:NaN,dim:e,rect:Hy()};e._leavesCount++,e._setCellId(i)}});e._scale=new gc({ordinalMeta:t})},r.prototype._setCellId=function(e){var t=this._levels.length,n=this.dimIdx;id(e.id,n,e.firstLeafLocator,e.level-t)},r.prototype._initCellsId=function(){var e=this._levels.length,t=this.dimIdx;z(this._cells,function(n){id(n.id,t,n.firstLeafLocator,n.level-e)})},r.prototype._initLevelIdOptions=function(){var e=this._levels.length,t=this.dimIdx,n=this._model.get("levels",!0);n=le(n)?n:[],z(this._levels,function(a,i){id(a.id,t,0,i-e),a.option=n[i]})},r.prototype.shouldShow=function(){return!!this._model.getShallow("show",!0)},r.prototype.resetLayoutIterator=function(e,t,n,a){if(e=e||new Uo,t===this.dimIdx){var i=this._leavesCount,o=n!=null?Math.max(0,n):0;a=a!=null?Math.min(a,i):i,e.reset(this._cells,o,o+a)}else{var i=this._levels.length,o=n!=null?Math.max(0,n+i):0;a=a!=null?Math.min(a,i):i,e.reset(this._levels,o,o+a)}return e},r.prototype.resetCellIterator=function(e){return(e||new Uo).reset(this._cells,0)},r.prototype.resetLevelIterator=function(e){return(e||new Uo).reset(this._levels,0)},r.prototype.getLayout=function(e,t,n){var a=this.getUnitLayoutInfo(t,n);e[Ge[t]]=a?a.xy:NaN,e[tr[t]]=a?a.wh:NaN},r.prototype.getUnitLayoutInfo=function(e,t){return e===this.dimIdx?t<this._leavesCount?this._cells[t]:void 0:this._levels[t+this._levels.length]},r.prototype.getCell=function(e){var t=this._scale.parse(e);return Dr(t)?void 0:this._cells[t]},r.prototype.getLocatorCount=function(e){return e===this.dimIdx?this._leavesCount:this._levels.length},r.prototype.getOrdinalMeta=function(){return this._ordinalMeta},r})();function sle(r){var e=r.toUpperCase(),t=new RegExp("^"+e+"([0-9]+)$"),n=0;function a(s){var l;s!=null&&(l=s.match(t))&&(n=Yt(n,+l[1]+1))}function i(){return""+e+n++}function o(s,l){for(var u=we(),c=0;c<s.length;c++){var f=s[c];(f==null||u.get(f)!=null)&&(s[c]=f=i(),l[c].option=De({value:f},l[c].option)),u.set(f,!0)}}return{calcDupBase:a,ensureValueUnique:o}}var ZE=(function(){function r(e,t,n){this._model=t,this._dims=n,this._kind=e,this._cellMergeOwnerList=[]}return r.prototype._ensureCellMap=function(){var e=this,t=e._cellMap;return t||(t=e._cellMap=we(),n()),t;function n(){var i=[],o=e._model.getShallow("data");o&&!le(o)&&(o=null),z(o,function(v,y){if(!(!Pe(v)||!le(v.coord))){var m=t6([]),x=null;if(r6(m,x,v.coord,e._dims,v.coordClamp?$i[e._kind]:$i.none),!(cg(m,0)||cg(m,1))){var _=v&&v.mergeCells,T={id:new Ee,span:new Ee,locatorRange:m,option:v,cellMergeOwner:_};UE(T,m),i.push(T)}}});for(var s=[],l=0;l<i.length;l++){var u=i[l];if(u.cellMergeOwner){var c=u.locatorRange;$E(c,s,i,l);for(var f=0;f<l;f++)s[f]&&(i[f].cellMergeOwner=!1);if(c[0][0]!==u.id.x||c[1][0]!==u.id.y){u.cellMergeOwner=!1;var d=ie({},u.option);d.coord=null;var h={id:new Ee,span:new Ee,locatorRange:c,option:d,cellMergeOwner:!0};UE(h,c),i.push(h)}}}z(i,function(v){var y=a(v.id.x,v.id.y);if(v.cellMergeOwner&&(y.cellMergeOwner=!0,y.span=v.span,y.locatorRange=v.locatorRange,y.spanRect=Hy(),e._cellMergeOwnerList.push(y)),!(!v.cellMergeOwner&&!v.option))for(var m=0;m<v.span.y;m++)for(var x=0;x<v.span.x;x++){var _=a(v.id.x+x,v.id.y+m);_.option=v.option,v.cellMergeOwner&&(_.inSpanOf=y)}})}function a(i,o){var s=KE(i,o),l=t.get(s);return l||(l=t.set(s,{id:new Ee(i,o),option:null,inSpanOf:null,span:null,spanRect:null,locatorRange:null,cellMergeOwner:!1})),l}},r.prototype.getCell=function(e){return this._ensureCellMap().get(KE(e[0],e[1]))},r.prototype.travelExistingCells=function(e){this._ensureCellMap().each(e)},r.prototype.expandRangeByCellMerge=function(e){if(!cg(e,0)&&!cg(e,1)&&e[0][0]===e[0][1]&&e[1][0]===e[1][1]){rb[0]=e[0][0],rb[1]=e[1][0];var t=this.getCell(rb),n=t&&t.inSpanOf;if(n){ile(e,n.locatorRange);return}}var a=this._cellMergeOwnerList;$E(e,null,a,a.length)},r})(),rb=[];function KE(r,e){return r+"|"+e}var S2={show:!0,color:ee.color.secondary,overflow:"break",lineOverflow:"truncate",padding:[2,3,2,3],distance:0};function b2(r){return{color:"none",borderWidth:1,borderColor:r?"none":ee.color.borderTint}}var qE={show:!0,label:S2,itemStyle:b2(!1),silent:void 0,dividerLineStyle:{width:1,color:ee.color.border}},lle={label:S2,itemStyle:b2(!1),silent:void 0},ule={label:S2,itemStyle:b2(!0),silent:void 0},cle={z:-50,left:"10%",top:"10%",right:"10%",bottom:"10%",x:qE,y:qE,body:lle,corner:ule,backgroundStyle:{color:"none",borderColor:ee.color.axisLine,borderWidth:1}},fle=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){var t=this._dimModels={x:new QE(this.get("x",!0)||{}),y:new QE(this.get("y",!0)||{})};t.x.option.type=t.y.option.type="category";var n=t.x.dim=new XE("x",t.x),a=t.y.dim=new XE("y",t.y),i={x:n,y:a};this._body=new ZE("body",new rt(this.getShallow("body")),i),this._corner=new ZE("corner",new rt(this.getShallow("corner")),i)},e.prototype.getDimensionModel=function(t){return this._dimModels[t]},e.prototype.getBody=function(){return this._body},e.prototype.getCorner=function(){return this._corner},e.type="matrix",e.layoutMode="box",e.defaultOption=cle,e})(Je),QE=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getOrdinalMeta=function(){return this.dim.getOrdinalMeta()},e})(rt),fg=Math.round,dle=0,hle=99,ple={normal:25,special:100},vle={normal:50,special:125},gle=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n){this.group.removeAll();var a=this.group,i=t.coordinateSystem,o=i.getRect(),s=t.getDimensionModel("x"),l=t.getDimensionModel("y"),u=s.dim,c=l.dim;yle(a,t,n),mle(a,t,u,c,n);var f=t.getShallow("borderZ2",!0),d=Ce(f,hle),h=d-1,v=t.getModel("backgroundStyle").getItemStyle(["borderWidth"]);v.lineWidth=0;var y=t.getModel("backgroundStyle").getItemStyle(["color","decal","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]);y.fill="none";var m=Tw(o.clone(),v,dle),x=Tw(o.clone(),y,d);m.silent=!0,x.silent=!0,a.add(m),a.add(x);var _=u.getUnitLayoutInfo(0,0),T=c.getUnitLayoutInfo(1,0);_&&T&&(u.shouldShow()&&a.add(JE({x1:o.x,y1:T.xy,x2:o.x+o.width,y2:T.xy},s.getModel("dividerLineStyle").getLineStyle(),h)),c.shouldShow()&&a.add(JE({x1:_.xy,y1:o.y,x2:_.xy,y2:o.y+o.height},l.getModel("dividerLineStyle").getLineStyle(),h)))},e.type="matrix",e})(Ct);function yle(r,e,t){n(0),n(1);function n(a){var i=e.getDimensionModel(Ge[a]),o=i.dim;if(o.shouldShow())for(var s=i.getModel("itemStyle"),l=i.getModel("label"),u=e.getShallow("tooltip",!0),c=[],f=o.resetCellIterator();f.next();){var d=f.item,h={};ze.copy(h,d.rect),hm(c,d.id.x,d.id.y),n6(c,e,r,t,d.option,s,l,i,h,d.option.value,vle,u)}}}function mle(r,e,t,n,a){i("body",e.getBody(),t,n),t.shouldShow()&&n.shouldShow()&&i("corner",e.getCorner(),n,t);function i(o,s,l,u){var c=new rt(e.getShallow(o,!0)),f=c.getModel("itemStyle"),d=c.getModel("label"),h=new Uo,v=new Uo,y=[],m=e.getShallow("tooltip",!0);for(u.resetLayoutIterator(v,1);v.next();)for(l.resetLayoutIterator(h,0);h.next();){var x=h.item,_=v.item;hm(y,x.id.x,_.id.y);var T=s.getCell(y);if(!(T&&T.inSpanOf&&T.inSpanOf!==T)){var C={};T&&T.span?ze.copy(C,T.spanRect):(x.dim.getLayout(C,0,y[0]),_.dim.getLayout(C,1,y[1]));var k=T?T.option:null;n6(y,e,r,a,k,f,d,c,C,k?k.value:null,ple,m)}}}}function n6(r,e,t,n,a,i,o,s,l,u,c,f){var d;dg.option=a?a.itemStyle:null,dg.parentModel=i,Ru.option=a,Ru.parentModel=s;var h=Ce(Ru.getShallow("z2"),a&&a.itemStyle?c.special:c.normal),v=f&&f.show,y=Tw(l,dg.getItemStyle(),h);t.add(y);var m=Ru.get("cursor");m!=null&&y.attr("cursor",m);var x;if(u!=null){var _=u+"";if(Eu.option=a?a.label:null,Eu.parentModel=o,Eu.ecModel=n,vr(y,{normal:Eu},{defaultText:_,autoOverflowArea:!0,layoutRect:Ae(y.shape)}),x=y.getTextContent(),x){x.z2=h+1;var T=x.style;if(T&&T.overflow&&T.overflow!=="none"&&T.lineOverflow){var C={};ze.copy(C,l),kl(C,(((d=y.style)===null||d===void 0?void 0:d.lineWidth)||0)/2,!0,!0),y.updateInnerText(),x.getLocalTransform(hg),Jn(hg,hg),ze.applyTransform(C,C,hg),x.setClipPath(new Qe({shape:C}))}}no({el:y,componentModel:e,itemName:_,itemTooltipOption:f,formatterParamsExtra:{xyLocator:r.slice()}})}if(x){var k=Eu.get("silent");k==null&&(k=!v),x.silent=k,x.ignoreHostSilent=!0}var A=Ru.get("silent");A==null&&(A=!y.style||y.style.fill==="none"||!y.style.fill),y.silent=A,v1(Ru),v1(dg),v1(Eu)}var Ru=new rt,dg=new rt,Eu=new rt,hg=[];function Tw(r,e,t){var n=e.lineWidth;if(n){var a=r.x+r.width,i=r.y+r.height;r.x=Ln(r.x,n,!0),r.y=Ln(r.y,n,!0),r.width=Ln(a,n,!0)-r.x,r.height=Ln(i,n,!0)-r.y}return new Qe({shape:r,style:e,z2:t})}function JE(r,e,t){var n=e.lineWidth;return n&&(fg(r.x1*2)===fg(r.x2*2)&&(r.x1=r.x2=Ln(r.x1,n,!0)),fg(r.y1*2)===fg(r.y2*2)&&(r.y1=r.y2=Ln(r.y1,n,!0))),new Zt({shape:r,style:e,silent:!0,z2:t})}var xle=(function(){function r(e,t,n){this.dimensions=r.dimensions,this.type="matrix",this._model=e;var a=this._dimModels={x:e.getDimensionModel("x"),y:e.getDimensionModel("y")};this._dims={x:a.x.dim,y:a.y.dim},this._resize(e,n)}return r.getDimensionsInfo=function(){return[{name:"x",type:"ordinal"},{name:"y",type:"ordinal"},{name:"value"}]},r.create=function(e,t){var n=[];return e.eachComponent("matrix",function(a){var i=new r(a,e,t);n.push(i),a.coordinateSystem=i}),e.eachComponent(function(a,i){Vh({targetModel:i,coordSysType:"matrix",coordSysProvider:x5})}),n},r.prototype.getRect=function(){return this._rect},r.prototype._resize=function(e,t){var n=this._dims,a=this._dimModels,i=this._rect=Dt(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()});ez(a,n,i,0),ez(a,n,i,1),tz(0,n),tz(1,n),rz(this._model.getBody(),n),rz(this._model.getCorner(),n)},r.prototype.dataToPoint=function(e,t,n){return n=n||[],this.dataToLayout(e,t,od),n[0]=od.rect.x+od.rect.width/2,n[1]=od.rect.y+od.rect.height/2,n},r.prototype.dataToLayout=function(e,t,n){var a=this._dims;n=n||{};var i=n.rect=n.rect||{};i.x=i.y=i.width=i.height=NaN;var o=n.matrixXYLocatorRange=t6(n.matrixXYLocatorRange);return le(e)&&(r6(o,null,e,a,Ce(t&&t.clamp,$i.none)),(!t||!t.ignoreMergeCells)&&((!t||t.clamp!==$i.corner)&&this._model.getBody().expandRangeByCellMerge(o),(!t||t.clamp!==$i.body)&&this._model.getCorner().expandRangeByCellMerge(o)),YE(i,o,a,0),YE(i,o,a,1)),n},r.prototype.pointToData=function(e,t,n){var a=this._dims;return nz(Ba,0,a,e,t&&t.clamp),nz(Ba,1,a,e,t&&t.clamp),n=n||[],n[0]=n[1]=NaN,Ba.y===Ir.inCorner&&Ba.x===Ir.inBody?az(Ba,n,0,a):Ba.x===Ir.inCorner&&Ba.y===Ir.inBody?az(Ba,n,1,a):(iz(Ba,n,0,a),iz(Ba,n,1,a)),n},r.prototype.convertToPixel=function(e,t,n,a){var i=ab(t);return i===this?i.dataToPoint(n,a):void 0},r.prototype.convertToLayout=function(e,t,n,a){var i=ab(t);return i===this?i.dataToLayout(n,a):void 0},r.prototype.convertFromPixel=function(e,t,n,a){var i=ab(t);return i===this?i.pointToData(n,a):void 0},r.prototype.containPoint=function(e){return this._rect.contain(e[0],e[1])},r.dimensions=["x","y","value"],r})(),od={rect:Hy()},pg=new Uo,nb=new Uo;function ez(r,e,t,n){for(var a=1-n,i=e[Ge[n]],o=e[Ge[a]],s=o.shouldShow(),l=i.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=t[tr[n]],f=i.getLocatorCount(n)+o.getLocatorCount(n),d=new rt,h=o.resetLevelIterator();h.next();)d.option=h.item.option,d.parentModel=r[Ge[a]],m(h.item,s?d.get("levelSize"):0);for(var v=new rt,y=i.resetCellIterator();y.next();)y.item.type===Ri.leaf&&(v.option=y.item.option,v.parentModel=void 0,m(y.item,v.get("size")));function m(L,D){var P=Sle(D,n,t);Dr(P)||(L.wh=Cw(P,c),c=Cw(c-L.wh),f--)}var x=f?c/f:0,_=!f&&c>=1,T=t[Ge[n]],C=i.getLocatorCount(n)-1,k=new Uo;for(o.resetLayoutIterator(k,n);k.next();)A(k.item);for(i.resetLayoutIterator(k,n);k.next();)A(k.item);function A(L){Dr(L.wh)&&(L.wh=x),L.xy=T,L.id[Ge[n]]===C&&!_&&(L.wh=t[Ge[n]]+t[tr[n]]-L.xy),T+=L.wh}}function tz(r,e){for(var t=e[Ge[r]].resetCellIterator();t.next();){var n=t.item;Uy(n.rect,r,n.id,n.span,e),Uy(n.rect,1-r,n.id,n.span,e),n.type===Ri.nonLeaf&&(n.xy=n.rect[Ge[r]],n.wh=n.rect[tr[r]])}}function rz(r,e){r.travelExistingCells(function(t){var n=t.span;if(n){var a=t.spanRect,i=t.id;Uy(a,0,i,n,e),Uy(a,1,i,n,e)}})}function Uy(r,e,t,n,a){r[tr[e]]=0;var i=t[Ge[e]],o=i<0?a[Ge[1-e]]:a[Ge[e]],s=o.getUnitLayoutInfo(e,t[Ge[e]]);if(r[Ge[e]]=s.xy,r[tr[e]]=s.wh,n[Ge[e]]>1){var l=o.getUnitLayoutInfo(e,t[Ge[e]]+n[Ge[e]]-1);r[tr[e]]=l.xy+l.wh-s.xy}}function Sle(r,e,t){var n=iy(r,t[tr[e]]);return Cw(n,t[tr[e]])}function Cw(r,e){return Math.max(Math.min(r,Ce(e,1/0)),0)}function ab(r){var e=r.matrixModel,t=r.seriesModel,n=e?e.coordinateSystem:t?t.coordinateSystem:null;return n}var Ir={inBody:1,inCorner:2,outside:3},Ba={x:null,y:null,point:[]};function nz(r,e,t,n,a){var i=t[Ge[e]],o=t[Ge[1-e]],s=i.getUnitLayoutInfo(e,i.getLocatorCount(e)-1),l=i.getUnitLayoutInfo(e,0),u=o.getUnitLayoutInfo(e,-o.getLocatorCount(e)),c=o.shouldShow()?o.getUnitLayoutInfo(e,-1):null,f=r.point[e]=n[e];if(!l&&!c){r[Ge[e]]=Ir.outside;return}if(a===$i.body){l?(r[Ge[e]]=Ir.inBody,f=In(s.xy+s.wh,Yt(l.xy,f)),r.point[e]=f):r[Ge[e]]=Ir.outside;return}else if(a===$i.corner){c?(r[Ge[e]]=Ir.inCorner,f=In(c.xy+c.wh,Yt(u.xy,f)),r.point[e]=f):r[Ge[e]]=Ir.outside;return}var d=l?l.xy:c?c.xy+c.wh:NaN,h=u?u.xy:d,v=s?s.xy+s.wh:d;if(f<h){if(!a){r[Ge[e]]=Ir.outside;return}f=h}else if(f>v){if(!a){r[Ge[e]]=Ir.outside;return}f=v}r.point[e]=f,r[Ge[e]]=d<=f&&f<=v?Ir.inBody:h<=f&&f<=d?Ir.inCorner:Ir.outside}function az(r,e,t,n){var a=1-t;if(r[Ge[t]]!==Ir.outside)for(n[Ge[t]].resetCellIterator(nb);nb.next();){var i=nb.item;if(oz(r.point[t],i.rect,t)&&oz(r.point[a],i.rect,a)){e[t]=i.ordinal,e[a]=i.id[Ge[a]];return}}}function iz(r,e,t,n){if(r[Ge[t]]!==Ir.outside){var a=r[Ge[t]]===Ir.inCorner?n[Ge[1-t]]:n[Ge[t]];for(a.resetLayoutIterator(pg,t);pg.next();)if(ble(r.point[t],pg.item)){e[t]=pg.item.id[Ge[t]];return}}}function ble(r,e){return e.xy<=r&&r<=e.xy+e.wh}function oz(r,e,t){return e[Ge[t]]<=r&&r<=e[Ge[t]]+e[tr[t]]}function _le(r){r.registerComponentModel(fle),r.registerComponentView(gle),r.registerCoordinateSystem("matrix",xle)}function wle(r,e){var t=r.existing;if(e.id=r.keyInfo.id,!e.type&&t&&(e.type=t.type),e.parentId==null){var n=e.parentOption;n?e.parentId=n.id:t&&(e.parentId=t.parentId)}e.parentOption=null}function sz(r,e){var t;return z(e,function(n){r[n]!=null&&r[n]!=="auto"&&(t=!0)}),t}function Tle(r,e,t){var n=ie({},t),a=r[e],i=t.$action||"merge";i==="merge"?a?(Ye(a,n,!0),oi(a,n,{ignoreSize:!0}),T5(t,a),vg(t,a),vg(t,a,"shape"),vg(t,a,"style"),vg(t,a,"extra"),t.clipPath=a.clipPath):r[e]=n:i==="replace"?r[e]=n:i==="remove"&&a&&(r[e]=null)}var a6=["transition","enterFrom","leaveTo"],Cle=a6.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function vg(r,e,t){if(t&&(!r[t]&&e[t]&&(r[t]={}),r=r[t],e=e[t]),!(!r||!e))for(var n=t?a6:Cle,a=0;a<n.length;a++){var i=n[a];r[i]==null&&e[i]!=null&&(r[i]=e[i])}}function Mle(r,e){if(r&&(r.hv=e.hv=[sz(e,["left","right"]),sz(e,["top","bottom"])],r.type==="group")){var t=r,n=e;t.width==null&&(t.width=n.width=0),t.height==null&&(t.height=n.height=0)}}var kle=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventAutoZ=!0,t}return e.prototype.mergeOption=function(t,n){var a=this.option.elements;this.option.elements=null,r.prototype.mergeOption.call(this,t,n),this.option.elements=a},e.prototype.optionUpdated=function(t,n){var a=this.option,i=(n?a:t).elements,o=a.elements=n?[]:a.elements,s=[];this._flatten(i,s,null);var l=pj(o,s,"normalMerge"),u=this._elOptionsToUpdate=[];z(l,function(c,f){var d=c.newOption;d&&(u.push(d),wle(c,d),Tle(o,f,d),Mle(o[f],d))},this),a.elements=ht(o,function(c){return c&&delete c.$action,c!=null})},e.prototype._flatten=function(t,n,a){z(t,function(i){if(i){a&&(i.parentOption=a),n.push(i);var o=i.children;o&&o.length&&this._flatten(o,n,i),delete i.children}},this)},e.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},e.type="graphic",e.defaultOption={elements:[]},e})(Je),lz={path:null,compoundPath:null,group:Le,image:gr,text:lt},Un=et(),Ale=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._elMap=we()},e.prototype.render=function(t,n,a){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,a)},e.prototype._updateElements=function(t){var n=t.useElOptionsToUpdate();if(n){var a=this._elMap,i=this.group,o=t.get("z"),s=t.get("zlevel");z(n,function(l){var u=ir(l.id,null),c=u!=null?a.get(u):null,f=ir(l.parentId,null),d=f!=null?a.get(f):i,h=l.type,v=l.style;h==="text"&&v&&l.hv&&l.hv[1]&&(v.textVerticalAlign=v.textBaseline=v.verticalAlign=v.align=null);var y=l.textContent,m=l.textConfig;if(v&&zF(v,h,!!m,!!y)){var x=OF(v,h,!0);!m&&x.textConfig&&(m=l.textConfig=x.textConfig),!y&&x.textContent&&(y=x.textContent)}var _=Lle(l),T=l.$action||"merge",C=T==="merge",k=T==="replace";if(C){var A=!c,L=c;A?L=uz(u,d,l.type,a):(L&&(Un(L).isNew=!1),FF(L)),L&&(Bg(L,_,t,{isInit:A}),cz(L,l,o,s))}else if(k){Gg(c,l,a,t);var D=uz(u,d,l.type,a);D&&(Bg(D,_,t,{isInit:!0}),cz(D,l,o,s))}else T==="remove"&&(jF(c,l),Gg(c,l,a,t));var P=a.get(u);if(P&&y)if(C){var E=P.getTextContent();E?E.attr(y):P.setTextContent(new lt(y))}else k&&P.setTextContent(new lt(y));if(P){var O=l.clipPath;if(O){var B=O.type,N=void 0,A=!1;if(C){var W=P.getClipPath();A=!W||Un(W).type!==B,N=A?Mw(B):W}else k&&(A=!0,N=Mw(B));P.setClipPath(N),Bg(N,O,t,{isInit:A}),Gy(N,O.keyframeAnimation,t)}var H=Un(P);P.setTextConfig(m),H.option=l,Ile(P,t,l),no({el:P,componentModel:t,itemName:P.name,itemTooltipOption:l.tooltip}),Gy(P,l.keyframeAnimation,t)}})}},e.prototype._relocate=function(t,n){for(var a=t.option.elements,i=this.group,o=this._elMap,s=n.getWidth(),l=n.getHeight(),u=["x","y"],c=0;c<a.length;c++){var f=a[c],d=ir(f.id,null),h=d!=null?o.get(d):null;if(!(!h||!h.isGroup)){var v=h.parent,y=v===i,m=Un(h),x=Un(v);m.width=he(m.option.width,y?s:x.width)||0,m.height=he(m.option.height,y?l:x.height)||0}}for(var c=a.length-1;c>=0;c--){var f=a[c],d=ir(f.id,null),h=d!=null?o.get(d):null;if(h){var v=h.parent,x=Un(v),_=v===i?{width:s,height:l}:{width:x.width,height:x.height},T={},C=Im(h,f,_,null,{hv:f.hv,boundingMode:f.bounding},T);if(!Un(h).isNew&&C){for(var k=f.transition,A={},L=0;L<u.length;L++){var D=u[L],P=T[D];k&&(bl(k)||Ue(k,D)>=0)?A[D]=P:h[D]=P}ct(h,A,t,0)}else h.attr(T)}}},e.prototype._clear=function(){var t=this,n=this._elMap;n.each(function(a){Gg(a,Un(a).option,n,t._lastGraphicModel)}),this._elMap=we()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e})(Ct);function Mw(r){var e=Se(lz,r)?lz[r]:ah(r),t=new e({});return Un(t).type=r,t}function uz(r,e,t,n){var a=Mw(t);return e.add(a),n.set(r,a),Un(a).id=r,Un(a).isNew=!0,a}function Gg(r,e,t,n){var a=r&&r.parent;a&&(r.type==="group"&&r.traverse(function(i){Gg(i,e,t,n)}),Um(r,e,n),t.removeKey(Un(r).id))}function cz(r,e,t,n){r.isGroup||z([["cursor",ea.prototype.cursor],["zlevel",n||0],["z",t||0],["z2",0]],function(a){var i=a[0];Se(e,i)?r[i]=Ce(e[i],a[1]):r[i]==null&&(r[i]=a[1])}),z(st(e),function(a){if(a.indexOf("on")===0){var i=e[a];r[a]=Me(i)?i:null}}),Se(e,"draggable")&&(r.draggable=e.draggable),e.name!=null&&(r.name=e.name),e.id!=null&&(r.id=e.id)}function Lle(r){return r=ie({},r),z(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(S5),function(e){delete r[e]}),r}function Ile(r,e,t){var n=je(r).eventData;!r.silent&&!r.ignore&&!n&&(n=je(r).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:r.name}),n&&(n.info=t.info)}function Dle(r){r.registerComponentModel(kle),r.registerComponentView(Ale),r.registerPreprocessor(function(e){var t=e.graphic;le(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var fz=["x","y","radius","angle","single"],Ple=["cartesian2d","polar","singleAxis"];function Rle(r){var e=r.get("coordinateSystem");return Ue(Ple,e)>=0}function Wo(r){return r+"Axis"}function Ele(r,e){var t=we(),n=[],a=we();r.eachComponent({mainType:"dataZoom",query:e},function(c){a.get(c.uid)||s(c)});var i;do i=!1,r.eachComponent("dataZoom",o);while(i);function o(c){!a.get(c.uid)&&l(c)&&(s(c),i=!0)}function s(c){a.set(c.uid,!0),n.push(c),u(c)}function l(c){var f=!1;return c.eachTargetAxis(function(d,h){var v=t.get(d);v&&v[h]&&(f=!0)}),f}function u(c){c.eachTargetAxis(function(f,d){(t.get(f)||t.set(f,[]))[d]=!0})}return n}function i6(r){var e=r.ecModel,t={infoList:[],infoMap:we()};return r.eachTargetAxis(function(n,a){var i=e.getComponent(Wo(n),a);if(i){var o=i.getCoordSysModel();if(o){var s=o.uid,l=t.infoMap.get(s);l||(l={model:o,axisModels:[]},t.infoList.push(l),t.infoMap.set(s,l)),l.axisModels.push(i)}}}),t}var ib=(function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},r})(),wh=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return e.prototype.init=function(t,n,a){var i=dz(t);this.settledOption=i,this.mergeDefaultAndTheme(t,a),this._doInit(i)},e.prototype.mergeOption=function(t){var n=dz(t);Ye(this.option,t,!0),Ye(this.settledOption,n,!0),this._doInit(n)},e.prototype._doInit=function(t){var n=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var a=this.settledOption;z([["start","startValue"],["end","endValue"]],function(i,o){this._rangePropMode[o]==="value"&&(n[i[0]]=a[i[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),n=this._targetAxisInfoMap=we(),a=this._fillSpecifiedTargetAxis(n);a?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(i){i.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var n=!1;return z(fz,function(a){var i=this.getReferringComponents(Wo(a),Q7);if(i.specified){n=!0;var o=new ib;z(i.models,function(s){o.add(s.componentIndex)}),t.set(a,o)}},this),n},e.prototype._fillAutoTargetAxisByOrient=function(t,n){var a=this.ecModel,i=!0;if(i){var o=n==="vertical"?"y":"x",s=a.findComponents({mainType:o+"Axis"});l(s,o)}if(i){var s=a.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 d=new ib;if(d.add(f.componentIndex),t.set(c,d),i=!1,c==="x"||c==="y"){var h=f.getReferringComponents("grid",jt).models[0];h&&z(u,function(v){f.componentIndex!==v.componentIndex&&h===v.getReferringComponents("grid",jt).models[0]&&d.add(v.componentIndex)})}}}i&&z(fz,function(u){if(i){var c=a.findComponents({mainType:Wo(u),filter:function(d){return d.get("type",!0)==="category"}});if(c[0]){var f=new ib;f.add(c[0].componentIndex),t.set(u,f),i=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(n){!t&&(t=n)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var n=this._rangePropMode,a=this.get("rangeMode");z([["start","startValue"],["end","endValue"]],function(i,o){var s=t[i[0]]!=null,l=t[i[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":a?n[o]=a[o]:s&&(n[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(n,a){t==null&&(t=this.ecModel.getComponent(Wo(n),a))},this),t},e.prototype.eachTargetAxis=function(t,n){this._targetAxisInfoMap.each(function(a,i){z(a.indexList,function(o){t.call(n,i,o)})})},e.prototype.getAxisProxy=function(t,n){var a=this.getAxisModel(t,n);if(a)return a.__dzAxisProxy},e.prototype.getAxisModel=function(t,n){var a=this._targetAxisInfoMap.get(t);if(a&&a.indexMap[n])return this.ecModel.getComponent(Wo(t),n)},e.prototype.setRawRange=function(t){var n=this.option,a=this.settledOption;z([["start","startValue"],["end","endValue"]],function(i){(t[i[0]]!=null||t[i[1]]!=null)&&(n[i[0]]=a[i[0]]=t[i[0]],n[i[1]]=a[i[1]]=t[i[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var n=this.option;z(["start","startValue","end","endValue"],function(a){n[a]=t[a]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,n){if(t==null&&n==null){var a=this.findRepresentativeAxisProxy();if(a)return a.getDataValueWindow()}else return this.getAxisProxy(t,n).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var n,a=this._targetAxisInfoMap.keys(),i=0;i<a.length;i++)for(var o=a[i],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},e.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},e.prototype.getOrient=function(){return this._orient},e.type="dataZoom",e.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],e.defaultOption={z:4,filterMode:"filter",start:0,end:100},e})(Je);function dz(r){var e={};return z(["start","end","startValue","endValue","throttle"],function(t){r.hasOwnProperty(t)&&(e[t]=r[t])}),e}var zle=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.select",e})(wh),_2=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a,i){this.dataZoomModel=t,this.ecModel=n,this.api=a},e.type="dataZoom",e})(Ct),Ole=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.select",e})(_2),Gu=z,hz=kn,Nle=(function(){function r(e,t,n,a){this._dimName=e,this._axisIndex=t,this.ecModel=a,this._dataZoomModel=n}return r.prototype.hostedBy=function(e){return this._dataZoomModel===e},r.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},r.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},r.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(Rle(t)){var n=Wo(this._dimName),a=t.getReferringComponents(n,jt).models[0];a&&this._axisIndex===a.componentIndex&&e.push(t)}},this),e},r.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},r.prototype.getMinMaxSpan=function(){return Ae(this._minMaxSpan)},r.prototype.calculateDataWindow=function(e){var t=this._dataExtent,n=this.getAxisModel(),a=n.axis.scale,i=this._dataZoomModel.getRangePropMode(),o=[0,100],s=[],l=[],u;Gu(["start","end"],function(d,h){var v=e[d],y=e[d+"Value"];i[h]==="percent"?(v==null&&(v=o[h]),y=a.parse(vt(v,o,t))):(u=!0,y=y==null?t[h]:a.parse(y),v=vt(y,t,o)),l[h]=y==null||isNaN(y)?t[h]:y,s[h]=v==null||isNaN(v)?o[h]:v}),hz(l),hz(s);var c=this._minMaxSpan;u?f(l,s,t,o,!1):f(s,l,o,t,!0);function f(d,h,v,y,m){var x=m?"Span":"ValueSpan";rs(0,d,v,"all",c["min"+x],c["max"+x]);for(var _=0;_<2;_++)h[_]=vt(d[_],v,y,!0),m&&(h[_]=a.parse(h[_]))}return{valueWindow:l,percentWindow:s}},r.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=jle(this,this._dimName,t),this._updateMinMaxSpan();var n=this.calculateDataWindow(e.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},r.prototype.filterData=function(e,t){if(e!==this._dataZoomModel)return;var n=this._dimName,a=this.getTargetSeriesModels(),i=e.get("filterMode"),o=this._valueWindow;if(i==="none")return;Gu(a,function(l){var u=l.getData(),c=u.mapDimensionsAll(n);if(c.length){if(i==="weakFilter"){var f=u.getStore(),d=ue(c,function(h){return u.getDimensionIndex(h)},u);u.filterSelf(function(h){for(var v,y,m,x=0;x<c.length;x++){var _=f.get(d[x],h),T=!isNaN(_),C=_<o[0],k=_>o[1];if(T&&!C&&!k)return!0;T&&(m=!0),C&&(v=!0),k&&(y=!0)}return m&&v&&y})}else Gu(c,function(h){if(i==="empty")l.setData(u=u.map(h,function(y){return s(y)?y:NaN}));else{var v={};v[h]=o,u.selectRange(v)}});Gu(c,function(h){u.setApproximateExtent(o,h)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;Gu(["min","max"],function(a){var i=t.get(a+"Span"),o=t.get(a+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?i=vt(n[0]+o,n,[0,100],!0):i!=null&&(o=vt(i,[0,100],n,!0)-n[0]),e[a+"Span"]=i,e[a+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var a=fT(n,[0,500]);a=Math.min(a,20);var i=e.axis.scale.rawExtentInfo;t[0]!==0&&i.setDeterminedMinMax("min",+n[0].toFixed(a)),t[1]!==100&&i.setDeterminedMinMax("max",+n[1].toFixed(a)),i.freeze()}},r})();function jle(r,e,t){var n=[1/0,-1/0];Gu(t,function(o){rq(n,o.getData(),e)});var a=r.getAxisModel(),i=a3(a.axis.scale,a,n).calculate();return[i.min,i.max]}var Ble={getTargetSeries:function(r){function e(a){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(o,s){var l=r.getComponent(Wo(o),s);a(o,s,l,i)})})}e(function(a,i,o,s){o.__dzAxisProxy=null});var t=[];e(function(a,i,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new Nle(a,i,s,r),t.push(o.__dzAxisProxy))});var n=we();return z(t,function(a){z(a.getTargetSeriesModels(),function(i){n.set(i.uid,i)})}),n},overallReset:function(r,e){r.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(n,a){t.getAxisProxy(n,a).reset(t)}),t.eachTargetAxis(function(n,a){t.getAxisProxy(n,a).filterData(t,e)})}),r.eachComponent("dataZoom",function(t){var n=t.findRepresentativeAxisProxy();if(n){var a=n.getDataPercentWindow(),i=n.getDataValueWindow();t.setCalculatedRange({start:a[0],end:a[1],startValue:i[0],endValue:i[1]})}})}};function Fle(r){r.registerAction("dataZoom",function(e,t){var n=Ele(t,e);z(n,function(a){a.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var pz=!1;function w2(r){pz||(pz=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,Ble),Fle(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function Vle(r){r.registerComponentModel(zle),r.registerComponentView(Ole),w2(r)}var Xn=(function(){function r(){}return r})(),o6={};function Wu(r,e){o6[r]=e}function s6(r){return o6[r]}var Gle=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;z(this.option.feature,function(n,a){var i=s6(a);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(t)),Ye(n,i.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:ee.color.border,borderRadius:0,borderWidth:0,padding:ee.size.m,itemSize:15,itemGap:ee.size.s,showTitle:!0,iconStyle:{borderColor:ee.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:ee.color.accent50}},tooltip:{show:!1,position:"bottom"}},e})(Je);function l6(r,e){var t=Nc(e.get("padding")),n=e.getItemStyle(["color","opacity"]);n.fill=e.get("backgroundColor");var a=new Qe({shape:{x:r.x-t[3],y:r.y-t[0],width:r.width+t[1]+t[3],height:r.height+t[0]+t[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1});return a}var Wle=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,a,i){var o=this.group;if(o.removeAll(),!t.get("show"))return;var s=+t.get("itemSize"),l=t.get("orient")==="vertical",u=t.get("feature")||{},c=this._features||(this._features={}),f=[];z(u,function(_,T){f.push(T)}),new Ki(this._featureNames||[],f).add(d).update(d).remove($e(d,null)).execute(),this._featureNames=f;function d(_,T){var C=f[_],k=f[T],A=u[C],L=new rt(A,t,t.ecModel),D;if(i&&i.newTitle!=null&&i.featureName===C&&(A.title=i.newTitle),C&&!k){if($le(C))D={onclick:L.option.onclick,featureName:C};else{var P=s6(C);if(!P)return;D=new P}c[C]=D}else if(D=c[k],!D)return;D.uid=Oc("toolbox-feature"),D.model=L,D.ecModel=n,D.api=a;var E=D instanceof Xn;if(!C&&k){E&&D.dispose&&D.dispose(n,a);return}if(!L.get("show")||E&&D.unusable){E&&D.remove&&D.remove(n,a);return}h(L,D,C),L.setIconStatus=function(O,B){var N=this.option,W=this.iconPaths;N.iconStatus=N.iconStatus||{},N.iconStatus[O]=B,W[O]&&(B==="emphasis"?Xi:Zi)(W[O])},D instanceof Xn&&D.render&&D.render(L,n,a,i)}function h(_,T,C){var k=_.getModel("iconStyle"),A=_.getModel(["emphasis","iconStyle"]),L=T instanceof Xn&&T.getIcons?T.getIcons():_.get("icon"),D=_.get("title")||{},P,E;pe(L)?(P={},P[C]=L):P=L,pe(D)?(E={},E[C]=D):E=D;var O=_.iconPaths={};z(P,function(B,N){var W=Ec(B,{},{x:-s/2,y:-s/2,width:s,height:s});W.setStyle(k.getItemStyle());var H=W.ensureState("emphasis");H.style=A.getItemStyle();var $=new lt({style:{text:E[N],align:A.get("textAlign"),borderRadius:A.get("textBorderRadius"),padding:A.get("textPadding"),fill:null,font:ET({fontStyle:A.get("textFontStyle"),fontFamily:A.get("textFontFamily"),fontSize:A.get("textFontSize"),fontWeight:A.get("textFontWeight")},n)},ignore:!0});W.setTextContent($),no({el:W,componentModel:t,itemName:N,formatterParamsExtra:{title:E[N]}}),W.__title=E[N],W.on("mouseover",function(){var Z=A.getItemStyle(),G=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";$.setStyle({fill:A.get("textFill")||Z.fill||Z.stroke||ee.color.neutral99,backgroundColor:A.get("textBackgroundColor")}),W.setTextConfig({position:A.get("textPosition")||G}),$.ignore=!t.get("showTitle"),a.enterEmphasis(this)}).on("mouseout",function(){_.get(["iconStatus",N])!=="emphasis"&&a.leaveEmphasis(this),$.hide()}),(_.get(["iconStatus",N])==="emphasis"?Xi:Zi)(W),o.add(W),W.on("click",ye(T.onclick,T,n,a,N)),O[N]=W})}var v=lr(t,a).refContainer,y=t.getBoxLayoutParams(),m=t.get("padding"),x=Dt(y,v,m);ml(t.get("orient"),o,t.get("itemGap"),x.width,x.height),Im(o,y,v,m),o.add(l6(o.getBoundingRect(),t)),l||o.eachChild(function(_){var T=_.__title,C=_.ensureState("emphasis"),k=C.textConfig||(C.textConfig={}),A=_.getTextContent(),L=A&&A.ensureState("emphasis");if(L&&!Me(L)&&T){var D=L.style||(L.style={}),P=gm(T,lt.makeFont(D)),E=_.x+o.x,O=_.y+o.y+s,B=!1;O+P.height>a.getHeight()&&(k.position="top",B=!0);var N=B?-5-P.height:s+10;E+P.width/2>a.getWidth()?(k.position=["100%",N],D.align="right"):E-P.width/2<0&&(k.position=[0,N],D.align="left")}})},e.prototype.updateView=function(t,n,a,i){z(this._features,function(o){o instanceof Xn&&o.updateView&&o.updateView(o.model,n,a,i)})},e.prototype.remove=function(t,n){z(this._features,function(a){a instanceof Xn&&a.remove&&a.remove(t,n)}),this.group.removeAll()},e.prototype.dispose=function(t,n){z(this._features,function(a){a instanceof Xn&&a.dispose&&a.dispose(t,n)})},e.type="toolbox",e})(Ct);function $le(r){return r.indexOf("my")===0}var Hle=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,n){var a=this.model,i=a.get("name")||t.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":a.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:a.get("backgroundColor",!0)||t.get("backgroundColor")||ee.color.neutral00,connectedBackgroundColor:a.get("connectedBackgroundColor"),excludeComponents:a.get("excludeComponents"),pixelRatio:a.get("pixelRatio")}),u=ot.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=i+"."+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 d=l.split(","),h=d[0].indexOf("base64")>-1,v=o?decodeURIComponent(d[1]):d[1];h&&(v=window.atob(v));var y=i+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var m=v.length,x=new Uint8Array(m);m--;)x[m]=v.charCodeAt(m);var _=new Blob([x]);window.navigator.msSaveOrOpenBlob(_,y)}else{var T=document.createElement("iframe");document.body.appendChild(T);var C=T.contentWindow,k=C.document;k.open("image/svg+xml","replace"),k.write(v),k.close(),C.focus(),k.execCommand("SaveAs",!0,y),document.body.removeChild(T)}}else{var A=a.get("lang"),L='<body style="margin:0;"><img src="'+l+'" style="max-width:100%;" title="'+(A&&A[0]||"")+'" /></body>',D=window.open();D.document.write(L),D.document.title=i}},e.getDefaultOption=function(t){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:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:ee.color.neutral00,name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},e})(Xn),vz="__ec_magicType_stack__",Ule=[["line","bar"],["stack"]],Yle=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getIcons=function(){var t=this.model,n=t.get("icon"),a={};return z(t.get("type"),function(i){n[i]&&(a[i]=n[i])}),a},e.getDefaultOption=function(t){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:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},e.prototype.onclick=function(t,n,a){var i=this.model,o=i.get(["seriesIndex",a]);if(gz[a]){var s={series:[]},l=function(f){var d=f.subType,h=f.id,v=gz[a](d,h,f,i);v&&(De(v,f.option),s.series.push(v));var y=f.coordinateSystem;if(y&&y.type==="cartesian2d"&&(a==="line"||a==="bar")){var m=y.getAxesByScale("ordinal")[0];if(m){var x=m.dim,_=x+"Axis",T=f.getReferringComponents(_,jt).models[0],C=T.componentIndex;s[_]=s[_]||[];for(var k=0;k<=C;k++)s[_][C]=s[_][C]||{};s[_][C].boundaryGap=a==="bar"}}};z(Ule,function(f){Ue(f,a)>=0&&z(f,function(d){i.setIconStatus(d,"normal")})}),i.setIconStatus(a,"emphasis"),t.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=a;a==="stack"&&(u=Ye({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),i.get(["iconStatus",a])!=="emphasis"&&(c="tiled")),n.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},e})(Xn),gz={line:function(r,e,t,n){if(r==="bar")return Ye({id:e,type:"line",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(r,e,t,n){if(r==="line")return Ye({id:e,type:"bar",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(r,e,t,n){var a=t.get("stack")===vz;if(r==="line"||r==="bar")return n.setIconStatus("stack",a?"normal":"emphasis"),Ye({id:e,stack:a?"":vz},n.get(["option","stack"])||{},!0)}};Aa({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,e){e.mergeOption(r.newOption)});var Ym=new Array(60).join("-"),wc=" ";function Xle(r){var e={},t=[],n=[];return r.eachRawSeries(function(a){var i=a.coordinateSystem;if(i&&(i.type==="cartesian2d"||i.type==="polar")){var o=i.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:i.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(a)}else t.push(a)}else t.push(a)}),{seriesGroupByCategoryAxis:e,other:t,meta:n}}function Zle(r){var e=[];return z(r,function(t,n){var a=t.categoryAxis,i=t.valueAxis,o=i.dim,s=[" "].concat(ue(t.series,function(h){return h.name})),l=[a.model.getCategories()];z(t.series,function(h){var v=h.getRawData();l.push(h.getRawData().mapArray(v.mapDimension(o),function(y){return y}))});for(var u=[s.join(wc)],c=0;c<l[0].length;c++){for(var f=[],d=0;d<l.length;d++)f.push(l[d][c]);u.push(f.join(wc))}e.push(u.join(`
|
|
41
|
+
`))}),e.join(`
|
|
42
|
+
|
|
43
|
+
`+Ym+`
|
|
44
|
+
|
|
45
|
+
`)}function Kle(r){return ue(r,function(e){var t=e.getRawData(),n=[e.name],a=[];return t.each(t.dimensions,function(){for(var i=arguments.length,o=arguments[i-1],s=t.getName(o),l=0;l<i-1;l++)a[l]=arguments[l];n.push((s?s+wc:"")+a.join(wc))}),n.join(`
|
|
46
|
+
`)}).join(`
|
|
47
|
+
|
|
48
|
+
`+Ym+`
|
|
49
|
+
|
|
50
|
+
`)}function qle(r){var e=Xle(r);return{value:ht([Zle(e.seriesGroupByCategoryAxis),Kle(e.other)],function(t){return!!t.replace(/[\n\t\s]/g,"")}).join(`
|
|
51
|
+
|
|
52
|
+
`+Ym+`
|
|
53
|
+
|
|
54
|
+
`),meta:e.meta}}function Yy(r){return r.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Qle(r){var e=r.slice(0,r.indexOf(`
|
|
55
|
+
`));if(e.indexOf(wc)>=0)return!0}var kw=new RegExp("["+wc+"]+","g");function Jle(r){for(var e=r.split(/\n+/g),t=Yy(e.shift()).split(kw),n=[],a=ue(t,function(l){return{name:l,data:[]}}),i=0;i<e.length;i++){var o=Yy(e[i]).split(kw);n.push(o.shift());for(var s=0;s<o.length;s++)a[s]&&(a[s].data[i]=o[s])}return{series:a,categories:n}}function eue(r){for(var e=r.split(/\n+/g),t=Yy(e.shift()),n=[],a=0;a<e.length;a++){var i=Yy(e[a]);if(i){var o=i.split(kw),s="",l=void 0,u=!1;isNaN(o[0])?(u=!0,s=o[0],o=o.slice(1),n[a]={name:s,value:[]},l=n[a].value):l=n[a]=[];for(var c=0;c<o.length;c++)l.push(+o[c]);l.length===1&&(u?n[a].value=l[0]:n[a]=l[0])}}return{name:t,data:n}}function tue(r,e){var t=r.split(new RegExp(`
|
|
56
|
+
*`+Ym+`
|
|
57
|
+
*`,"g")),n={series:[]};return z(t,function(a,i){if(Qle(a)){var o=Jle(a),s=e[i],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=eue(a);n.series.push(o)}}),n}var rue=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,n){setTimeout(function(){n.dispatchAction({type:"hideTip"})});var a=n.getDom(),i=this.model;this._dom&&a.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=i.get("backgroundColor")||ee.color.neutral00;var s=document.createElement("h4"),l=i.get("lang")||[];s.innerHTML=l[0]||i.get("title"),s.style.cssText="margin:10px 20px",s.style.color=i.get("textColor");var u=document.createElement("div"),c=document.createElement("textarea");u.style.cssText="overflow:auto";var f=i.get("optionToContent"),d=i.get("contentToOption"),h=qle(t);if(Me(f)){var v=f(n.getOption());pe(v)?u.innerHTML=v:_l(v)&&u.appendChild(v)}else{c.readOnly=i.get("readOnly");var y=c.style;y.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",y.color=i.get("textColor"),y.borderColor=i.get("textareaBorderColor"),y.backgroundColor=i.get("textareaColor"),c.value=h.value,u.appendChild(c)}var m=h.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",T=document.createElement("div"),C=document.createElement("div");_+=";background-color:"+i.get("buttonColor"),_+=";color:"+i.get("buttonTextColor");var k=this;function A(){a.removeChild(o),k._dom=null}Nb(T,"click",A),Nb(C,"click",function(){if(d==null&&f!=null||d!=null&&f==null){A();return}var L;try{Me(d)?L=d(u,n.getOption()):L=tue(c.value,m)}catch(D){throw A(),new Error("Data view format error "+D)}L&&n.dispatchAction({type:"changeDataView",newOption:L}),A()}),T.innerHTML=l[1],C.innerHTML=l[2],C.style.cssText=T.style.cssText=_,!i.get("readOnly")&&x.appendChild(C),x.appendChild(T),o.appendChild(s),o.appendChild(u),o.appendChild(x),u.style.height=a.clientHeight-80+"px",a.appendChild(o),this._dom=o},e.prototype.remove=function(t,n){this._dom&&n.getDom().removeChild(this._dom)},e.prototype.dispose=function(t,n){this.remove(t,n)},e.getDefaultOption=function(t){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:t.getLocaleModel().get(["toolbox","dataView","title"]),lang:t.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:ee.color.background,textColor:ee.color.primary,textareaColor:ee.color.background,textareaBorderColor:ee.color.border,buttonColor:ee.color.accent50,buttonTextColor:ee.color.neutral00};return n},e})(Xn);function nue(r,e){return ue(r,function(t,n){var a=e&&e[n];if(Pe(a)&&!le(a)){var i=Pe(t)&&!le(t);i||(t={value:t});var o=a.name!=null&&t.name==null;return t=De(t,a),o&&delete t.name,t}else return t})}Aa({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(r,e){var t=[];z(r.newOption.series,function(n){var a=e.getSeriesByName(n.name)[0];if(!a)t.push(ie({type:"scatter"},n));else{var i=a.get("data");t.push({name:n.name,data:nue(n.data,i)})}}),e.mergeOption(De({series:t},r.newOption))});var u6=z,c6=et();function aue(r,e){var t=T2(r);u6(e,function(n,a){for(var i=t.length-1;i>=0;i--){var o=t[i];if(o[a])break}if(i<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:a})[0];if(s){var l=s.getPercentRange();t[0][a]={dataZoomId:a,start:l[0],end:l[1]}}}}),t.push(e)}function iue(r){var e=T2(r),t=e[e.length-1];e.length>1&&e.pop();var n={};return u6(t,function(a,i){for(var o=e.length-1;o>=0;o--)if(a=e[o][i],a){n[i]=a;break}}),n}function oue(r){c6(r).snapshots=null}function sue(r){return T2(r).length}function T2(r){var e=c6(r);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var lue=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,n){oue(t),n.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){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:t.getLocaleModel().get(["toolbox","restore","title"])};return n},e})(Xn);Aa({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,e){e.resetOption("recreate")});var uue=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],C2=(function(){function r(e,t,n){var a=this;this._targetInfoList=[];var i=yz(t,e);z(cue,function(o,s){(!n||!n.include||Ue(n.include,s)>=0)&&o(i,a._targetInfoList)})}return r.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(n,a,i){if((n.coordRanges||(n.coordRanges=[])).push(a),!n.coordRange){n.coordRange=a;var o=ob[n.brushType](0,i,a);n.__rangeOffset={offset:bz[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},r.prototype.matchOutputRanges=function(e,t,n){z(e,function(a){var i=this.findTargetInfo(a,t);i&&i!==!0&&z(i.coordSyses,function(o){var s=ob[a.brushType](1,o,a.range,!0);n(a,s.values,o,t)})},this)},r.prototype.setInputRanges=function(e,t){z(e,function(n){var a=this.findTargetInfo(n,t);if(n.range=n.range||[],a&&a!==!0){n.panelId=a.panelId;var i=ob[n.brushType](0,a.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?bz[n.brushType](i.values,o.offset,fue(i.xyMinMax,o.xyMinMax)):i.values}},this)},r.prototype.makePanelOpts=function(e,t){return ue(this._targetInfoList,function(n){var a=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:vF(a),isTargetByCursor:yF(a,e,n.coordSysModel),getLinearBrushOtherExtent:gF(a)}})},r.prototype.controlSeries=function(e,t,n){var a=this.findTargetInfo(e,n);return a===!0||a&&Ue(a.coordSyses,t.coordinateSystem)>=0},r.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,a=yz(t,e),i=0;i<n.length;i++){var o=n[i],s=e.panelId;if(s){if(o.panelId===s)return o}else for(var l=0;l<mz.length;l++)if(mz[l](a,o))return o}return!0},r})();function Aw(r){return r[0]>r[1]&&r.reverse(),r}function yz(r,e){return ec(r,e,{includeMainTypes:uue})}var cue={grid:function(r,e){var t=r.xAxisModels,n=r.yAxisModels,a=r.gridModels,i=we(),o={},s={};!t&&!n&&!a||(z(t,function(l){var u=l.axis.grid.model;i.set(u.id,u),o[u.id]=!0}),z(n,function(l){var u=l.axis.grid.model;i.set(u.id,u),s[u.id]=!0}),z(a,function(l){i.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),i.each(function(l){var u=l.coordinateSystem,c=[];z(u.getCartesians(),function(f,d){(Ue(t,f.getAxis("x").model)>=0||Ue(n,f.getAxis("y").model)>=0)&&c.push(f)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:xz.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,e){z(r.geoModels,function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:xz.geo})})}},mz=[function(r,e){var t=r.xAxisModel,n=r.yAxisModel,a=r.gridModel;return!a&&t&&(a=t.axis.grid.model),!a&&n&&(a=n.axis.grid.model),a&&a===e.gridModel},function(r,e){var t=r.geoModel;return t&&t===e.geoModel}],xz={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,e=r.getBoundingRect().clone();return e.applyTransform(Xo(r)),e}},ob={lineX:$e(Sz,0),lineY:$e(Sz,1),rect:function(r,e,t,n){var a=r?e.pointToData([t[0][0],t[1][0]],n):e.dataToPoint([t[0][0],t[1][0]],n),i=r?e.pointToData([t[0][1],t[1][1]],n):e.dataToPoint([t[0][1],t[1][1]],n),o=[Aw([a[0],i[0]]),Aw([a[1],i[1]])];return{values:o,xyMinMax:o}},polygon:function(r,e,t,n){var a=[[1/0,-1/0],[1/0,-1/0]],i=ue(t,function(o){var s=r?e.pointToData(o,n):e.dataToPoint(o,n);return a[0][0]=Math.min(a[0][0],s[0]),a[1][0]=Math.min(a[1][0],s[1]),a[0][1]=Math.max(a[0][1],s[0]),a[1][1]=Math.max(a[1][1],s[1]),s});return{values:i,xyMinMax:a}}};function Sz(r,e,t,n){var a=t.getAxis(["x","y"][r]),i=Aw(ue([0,1],function(s){return e?a.coordToData(a.toLocalCoord(n[s]),!0):a.toGlobalCoord(a.dataToCoord(n[s]))})),o=[];return o[r]=i,o[1-r]=[NaN,NaN],{values:i,xyMinMax:o}}var bz={lineX:$e(_z,0),lineY:$e(_z,1),rect:function(r,e,t){return[[r[0][0]-t[0]*e[0][0],r[0][1]-t[0]*e[0][1]],[r[1][0]-t[1]*e[1][0],r[1][1]-t[1]*e[1][1]]]},polygon:function(r,e,t){return ue(r,function(n,a){return[n[0]-t[0]*e[a][0],n[1]-t[1]*e[a][1]]})}};function _z(r,e,t,n){return[e[0]-n[r]*t[0],e[1]-n[r]*t[1]]}function fue(r,e){var t=wz(r),n=wz(e),a=[t[0]/n[0],t[1]/n[1]];return isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a}function wz(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var Lw=z,due=Y7("toolbox-dataZoom_"),hue=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,a,i){this._brushController||(this._brushController=new KC(a.getZr()),this._brushController.on("brush",ye(this._onBrush,this)).mount()),gue(t,n,this,i,a),vue(t,n)},e.prototype.onclick=function(t,n,a){pue[a].call(this)},e.prototype.remove=function(t,n){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,n){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var n=t.areas;if(!t.isEnd||!n.length)return;var a={},i=this.ecModel;this._brushController.updateCovers([]);var o=new C2(M2(this.model),i,{include:["grid"]});o.matchOutputRanges(n,i,function(u,c,f){if(f.type==="cartesian2d"){var d=u.brushType;d==="rect"?(s("x",f,c[0]),s("y",f,c[1])):s({lineX:"x",lineY:"y"}[d],f,c)}}),aue(i,a),this._dispatchZoomAction(a);function s(u,c,f){var d=c.getAxis(u),h=d.model,v=l(u,h,i),y=v.findRepresentativeAxisProxy(h).getMinMaxSpan();(y.minValueSpan!=null||y.maxValueSpan!=null)&&(f=rs(0,f.slice(),d.scale.getExtent(),0,y.minValueSpan,y.maxValueSpan)),v&&(a[v.id]={dataZoomId:v.id,startValue:f[0],endValue:f[1]})}function l(u,c,f){var d;return f.eachComponent({mainType:"dataZoom",subType:"select"},function(h){var v=h.getAxisModel(u,c.componentIndex);v&&(d=h)}),d}},e.prototype._dispatchZoomAction=function(t){var n=[];Lw(t,function(a,i){n.push(Ae(a))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},e.getDefaultOption=function(t){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:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:ee.color.backgroundTint}};return n},e})(Xn),pue={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(iue(this.ecModel))}};function M2(r){var e={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function vue(r,e){r.setIconStatus("back",sue(e)>1?"emphasis":"normal")}function gue(r,e,t,n,a){var i=t._isZoomActive;n&&n.type==="takeGlobalCursor"&&(i=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),t._isZoomActive=i,r.setIconStatus("zoom",i?"emphasis":"normal");var o=new C2(M2(r),e,{include:["grid"]}),s=o.makePanelOpts(a,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});t._brushController.setPanels(s).enableBrush(i&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}AY("dataZoom",function(r){var e=r.getComponent("toolbox",0),t=["feature","dataZoom"];if(!e||e.get(t)==null)return;var n=e.getModel(t),a=[],i=M2(n),o=ec(r,i);Lw(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),Lw(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var f=l.componentIndex,d={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:due+u+f};d[c]=f,a.push(d)}return a});function yue(r){r.registerComponentModel(Gle),r.registerComponentView(Wle),Wu("saveAsImage",Hle),Wu("magicType",Yle),Wu("dataView",rue),Wu("dataZoom",hue),Wu("restore",lue),Ze(Vle)}var mue=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="tooltip",e.dependencies=["axisPointer"],e.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:ee.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:ee.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:ee.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:ee.color.tertiary,fontSize:14}},e})(Je);function f6(r){var e=r.get("confine");return e!=null?!!e:r.get("renderMode")==="richText"}function d6(r){if(ot.domSupported){for(var e=document.documentElement.style,t=0,n=r.length;t<n;t++)if(r[t]in e)return r[t]}}var h6=d6(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),xue=d6(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function p6(r,e){if(!r)return e;e=YT(e,!0);var t=r.indexOf(e);return r=t===-1?e:"-"+r.slice(0,t)+"-"+e,r.toLowerCase()}function Sue(r,e){var t=r.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(r);return t?t[e]:null}var bue=p6(xue,"transition"),k2=p6(h6,"transform"),_ue="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(ot.transform3dSupported?"will-change:transform;":"");function wue(r){return r=r==="left"?"right":r==="right"?"left":r==="top"?"bottom":"top",r}function Tue(r,e,t){if(!pe(t)||t==="inside")return"";var n=r.get("backgroundColor"),a=r.get("borderWidth");e=Ll(e);var i=wue(t),o=Math.max(Math.round(a)*1.5,6),s="",l=k2+":",u;Ue(["left","right"],i)>-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=i==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=i==="top"?225:45)+"deg)");var c=u*Math.PI/180,f=o+a,d=f*Math.abs(Math.cos(c))+f*Math.abs(Math.sin(c)),h=Math.round(((d-Math.SQRT2*a)/2+Math.SQRT2*a-(d-f)/2)*100)/100;s+=";"+i+":-"+h+"px";var v=e+" solid "+a+"px;",y=["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="'+y.join("")+'"></div>'}function Cue(r,e,t){var n="cubic-bezier(0.23,1,0.32,1)",a="",i="";return t&&(a=" "+r/2+"s "+n,i="opacity"+a+",visibility"+a),e||(a=" "+r+"s "+n,i+=(i.length?",":"")+(ot.transformSupported?""+k2+a:",left"+a+",top"+a)),bue+":"+i}function Tz(r,e,t){var n=r.toFixed(0)+"px",a=e.toFixed(0)+"px";if(!ot.transformSupported)return t?"top:"+a+";left:"+n+";":[["top",a],["left",n]];var i=ot.transform3dSupported,o="translate"+(i?"3d":"")+"("+n+","+a+(i?",0":"")+")";return t?"top:0;left:0;"+k2+":"+o+";":[["top",0],["left",0],[h6,o]]}function Mue(r){var e=[],t=r.get("fontSize"),n=r.getTextColor();n&&e.push("color:"+n),e.push("font:"+r.getFont());var a=Ce(r.get("lineHeight"),Math.round(t*3/2));t&&e.push("line-height:"+a+"px");var i=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return i&&o&&e.push("text-shadow:"+s+"px "+l+"px "+o+"px "+i),z(["decoration","align"],function(u){var c=r.get(u);c&&e.push("text-"+u+":"+c)}),e.join(";")}function kue(r,e,t,n){var a=[],i=r.get("transitionDuration"),o=r.get("backgroundColor"),s=r.get("shadowBlur"),l=r.get("shadowColor"),u=r.get("shadowOffsetX"),c=r.get("shadowOffsetY"),f=r.getModel("textStyle"),d=rB(r,"html"),h=u+"px "+c+"px "+s+"px "+l;return a.push("box-shadow:"+h),e&&i>0&&a.push(Cue(i,t,n)),o&&a.push("background-color:"+o),z(["width","color","radius"],function(v){var y="border-"+v,m=YT(y),x=r.get(m);x!=null&&a.push(y+":"+x+(v==="color"?"":"px"))}),a.push(Mue(f)),d!=null&&a.push("padding:"+Nc(d).join("px ")+"px"),a.join(";")+";"}function Cz(r,e,t,n,a){var i=e&&e.painter;if(t){var o=i&&i.getViewportRoot();o&&dH(r,o,t,n,a)}else{r[0]=n,r[1]=a;var s=i&&i.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var Aue=(function(){function r(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,ot.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var a=this._zr=e.getZr(),i=t.appendTo,o=i&&(pe(i)?document.querySelector(i):_l(i)?i:Me(i)&&i(e.getDom()));Cz(this._styleCoord,a,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(n),this._api=e,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=a.handler,c=a.painter.getViewportRoot();Wn(c,l,!0),u.dispatch("mousemove",l)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=Sue(t,"position"),a=t.style;a.position!=="absolute"&&n!=="absolute"&&(a.position="relative")}var i=e.get("alwaysShowContent");i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get("displayTransition")&&e.get("transitionDuration")>0,this.el.className=e.get("className")||""},r.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,a=n.style,i=this._styleCoord;n.innerHTML?a.cssText=_ue+kue(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+Tz(i[0],i[1],!0)+("border-color:"+Ll(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):a.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(e,t,n,a,i){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(pe(i)&&n.get("trigger")==="item"&&!f6(n)&&(s=Tue(n,a,i)),pe(e))o.innerHTML=e+s;else if(e){o.innerHTML="",le(e)||(e=[e]);for(var l=0;l<e.length;l++)_l(e[l])&&e[l].parentNode!==o&&o.appendChild(e[l]);if(s&&o.childNodes.length){var u=document.createElement("div");u.innerHTML=s,o.appendChild(u)}}},r.prototype.setEnterable=function(e){this._enterable=e},r.prototype.getSize=function(){var e=this.el;return e?[e.offsetWidth,e.offsetHeight]:[0,0]},r.prototype.moveTo=function(e,t){if(this.el){var n=this._styleCoord;if(Cz(n,this._zr,this._container,e,t),n[0]!=null&&n[1]!=null){var a=this.el.style,i=Tz(n[0],n[1]);z(i,function(o){a[o[0]]=o[1]})}}},r.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},r.prototype.hide=function(){var e=this,t=this.el.style;this._enableDisplayTransition?(t.visibility="hidden",t.opacity="0"):t.display="none",ot.transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},r.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(ye(this.hide,this),e)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this._zr;hH(e&&e.painter&&e.painter.getViewportRoot(),this._container);var t=this.el;if(t){t.onmouseenter=t.onmousemove=t.onmouseleave=null;var n=t.parentNode;n&&n.removeChild(t)}this.el=this._container=null},r})(),Lue=(function(){function r(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),kz(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return r.prototype.update=function(e){var t=e.get("alwaysShowContent");t&&this._moveIfResized(),this._alwaysShowContent=t},r.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},r.prototype.setContent=function(e,t,n,a,i){var o=this;Pe(e)&>(""),this.el&&this._zr.remove(this.el);var s=n.getModel("textStyle");this.el=new lt({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:a,textShadowColor:s.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:rB(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),z(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){o.el.style[u]=n.get(u)}),z(["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})},r.prototype.setEnterable=function(e){this._enterable=e},r.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),n=Mz(e.style);return[t.width+n.left+n.right,t.height+n.top+n.bottom]},r.prototype.moveTo=function(e,t){var n=this.el;if(n){var a=this._styleCoord;kz(a,this._zr,e,t),e=a[0],t=a[1];var i=n.style,o=Eo(i.borderWidth||0),s=Mz(i);n.x=e+o+s.left,n.y=t+o+s.top,n.markRedraw()}},r.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},r.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},r.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(ye(this.hide,this),e)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){this._zr.remove(this.el)},r})();function Eo(r){return Math.max(0,r)}function Mz(r){var e=Eo(r.shadowBlur||0),t=Eo(r.shadowOffsetX||0),n=Eo(r.shadowOffsetY||0);return{left:Eo(e-t),right:Eo(e+t),top:Eo(e-n),bottom:Eo(e+n)}}function kz(r,e,t,n){r[0]=t,r[1]=n,r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var Iue=new Qe({shape:{x:-1,y:-1,width:2,height:2}}),Due=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){if(!(ot.node||!n.getDom())){var a=t.getComponent("tooltip"),i=this._renderMode=e9(a.get("renderMode"));this._tooltipContent=i==="richText"?new Lue(n):new Aue(n,{appendTo:a.get("appendToBody",!0)?"body":a.get("appendTo",!0)})}},e.prototype.render=function(t,n,a){if(!(ot.node||!a.getDom())){this.group.removeAll(),this._tooltipModel=t,this._ecModel=n,this._api=a;var i=this._tooltipContent;i.update(t),i.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&t.get("transitionDuration")?Fc(this,"_updatePosition",50,"fixRate"):lh(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var t=this._tooltipModel,n=t.get("triggerOn");ZF("itemTooltip",this._api,ye(function(a,i,o){n!=="none"&&(n.indexOf(a)>=0?this._tryShow(i,o):a==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,n=this._ecModel,a=this._api,i=t.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&i!=="none"&&i!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!a.isDisposed()&&o.manuallyShowTip(t,n,a,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,n,a,i){if(!(i.from===this.uid||ot.node||!a.getDom())){var o=Az(i,a);this._ticket="";var s=i.dataByCoordSys,l=zue(i,n,a);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:i.position,positionDefault:"bottom"},o)}else if(i.tooltip&&i.x!=null&&i.y!=null){var c=Iue;c.x=i.x,c.y=i.y,c.update(),je(c).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:c},o)}else if(s)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:s,tooltipOption:i.tooltipOption},o);else if(i.seriesIndex!=null){if(this._manuallyAxisShowTip(t,n,a,i))return;var f=KF(i,n),d=f.point[0],h=f.point[1];d!=null&&h!=null&&this._tryShow({offsetX:d,offsetY:h,target:f.el,position:i.position,positionDefault:"bottom"},o)}else i.x!=null&&i.y!=null&&(a.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:a.getZr().findHover(i.x,i.y).target},o))}},e.prototype.manuallyHideTip=function(t,n,a,i){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(Az(i,a))},e.prototype._manuallyAxisShowTip=function(t,n,a,i){var o=i.seriesIndex,s=i.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=sd([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(f.get("trigger")==="axis")return a.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:i.position}),!0}}},e.prototype._tryShow=function(t,n){var a=t.target,i=this._tooltipModel;if(i){this._lastX=t.offsetX,this._lastY=t.offsetY;var o=t.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,t);else if(a){var s=je(a);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;dl(a,function(c){if(c.tooltipDisabled)return l=u=null,!0;l||u||(je(c).dataIndex!=null?l=c:je(c).tooltipConfig!=null&&(u=c))},!0),l?this._showSeriesItemTooltip(t,l,n):u?this._showComponentItemTooltip(t,u,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},e.prototype._showOrMove=function(t,n){var a=t.get("showDelay");n=ye(n,this),clearTimeout(this._showTimout),a>0?this._showTimout=setTimeout(n,a):n()},e.prototype._showAxisTooltip=function(t,n){var a=this._ecModel,i=this._tooltipModel,o=[n.offsetX,n.offsetY],s=sd([n.tooltipOption],i),l=this._renderMode,u=[],c=rr("section",{blocks:[],noHeader:!0}),f=[],d=new V1;z(t,function(_){z(_.dataByAxis,function(T){var C=a.getComponent(T.axisDim+"Axis",T.axisIndex),k=T.value;if(!(!C||k==null)){var A=UF(k,C.axis,a,T.seriesDataIndices,T.valueLabelOpt),L=rr("section",{header:A,noHeader:!Mn(A),sortBlocks:!0,blocks:[]});c.blocks.push(L),z(T.seriesDataIndices,function(D){var P=a.getSeriesByIndex(D.seriesIndex),E=D.dataIndexInside,O=P.getDataParams(E);if(!(O.dataIndex<0)){O.axisDim=T.axisDim,O.axisIndex=T.axisIndex,O.axisType=T.axisType,O.axisId=T.axisId,O.axisValue=Ty(C.axis,{value:k}),O.axisValueLabel=A,O.marker=d.makeTooltipMarker("item",Ll(O.color),l);var B=$I(P.formatTooltip(E,!0,null)),N=B.frag;if(N){var W=sd([P],i).get("valueFormatter");L.blocks.push(W?ie({valueFormatter:W},N):N)}B.text&&f.push(B.text),u.push(O)}})}})}),c.blocks.reverse(),f.reverse();var h=n.position,v=s.get("order"),y=KI(c,d,l,v,a.get("useUTC"),s.get("textStyle"));y&&f.unshift(y);var m=l==="richText"?`
|
|
58
|
+
|
|
59
|
+
`:"<br/>",x=f.join(m);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(s,h,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,x,u,Math.random()+"",o[0],o[1],h,null,d)})},e.prototype._showSeriesItemTooltip=function(t,n,a){var i=this._ecModel,o=je(n),s=o.seriesIndex,l=i.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,f=o.dataType,d=u.getData(f),h=this._renderMode,v=t.positionDefault,y=sd([d.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,v?{position:v}:null),m=y.get("trigger");if(!(m!=null&&m!=="item")){var x=u.getDataParams(c,f),_=new V1;x.marker=_.makeTooltipMarker("item",Ll(x.color),h);var T=$I(u.formatTooltip(c,!1,f)),C=y.get("order"),k=y.get("valueFormatter"),A=T.frag,L=A?KI(k?ie({valueFormatter:k},A):A,_,h,C,i.get("useUTC"),y.get("textStyle")):T.text,D="item_"+u.name+"_"+c;this._showOrMove(y,function(){this._showTooltipContent(y,L,x,D,t.offsetX,t.offsetY,t.position,t.target,_)}),a({type:"showTip",dataIndexInside:c,dataIndex:d.getRawIndex(c),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,n,a){var i=this._renderMode==="html",o=je(n),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(pe(l)){var c=l;l={content:c,formatter:c},u=!0}u&&i&&l.content&&(l=Ae(l),l.content=$r(l.content));var f=[l],d=this._ecModel.getComponent(o.componentMainType,o.componentIndex);d&&f.push(d),f.push({formatter:l.content});var h=t.positionDefault,v=sd(f,this._tooltipModel,h?{position:h}:null),y=v.get("content"),m=Math.random()+"",x=new V1;this._showOrMove(v,function(){var _=Ae(v.get("formatterParams")||{});this._showTooltipContent(v,y,_,m,t.offsetX,t.offsetY,t.position,n,x)}),a({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,n,a,i,o,s,l,u,c){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var f=this._tooltipContent;f.setEnterable(t.get("enterable"));var d=t.get("formatter");l=l||t.get("position");var h=n,v=this._getNearestPoint([o,s],a,t.get("trigger"),t.get("borderColor"),t.get("defaultBorderColor",!0)),y=v.color;if(d)if(pe(d)){var m=t.ecModel.get("useUTC"),x=le(a)?a[0]:a,_=x&&x.axisType&&x.axisType.indexOf("time")>=0;h=d,_&&(h=Fh(x.axisValue,h,m)),h=XT(h,a,!0)}else if(Me(d)){var T=ye(function(C,k){C===this._ticket&&(f.setContent(k,c,t,y,l),this._updatePosition(t,l,o,s,f,a,u))},this);this._ticket=i,h=d(a,i,T)}else h=d;f.setContent(h,c,t,y,l),f.show(t,y),this._updatePosition(t,l,o,s,f,a,u)}},e.prototype._getNearestPoint=function(t,n,a,i,o){if(a==="axis"||le(n))return{color:i||o};if(!le(n))return{color:i||n.color||n.borderColor}},e.prototype._updatePosition=function(t,n,a,i,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();n=n||t.get("position");var f=o.getSize(),d=t.get("align"),h=t.get("verticalAlign"),v=l&&l.getBoundingRect().clone();if(l&&v.applyTransform(l.transform),Me(n)&&(n=n([a,i],s,o.el,v,{viewSize:[u,c],contentSize:f.slice()})),le(n))a=he(n[0],u),i=he(n[1],c);else if(Pe(n)){var y=n;y.width=f[0],y.height=f[1];var m=Dt(y,{width:u,height:c});a=m.x,i=m.y,d=null,h=null}else if(pe(n)&&l){var x=Eue(n,v,f,t.get("borderWidth"));a=x[0],i=x[1]}else{var x=Pue(a,i,o,u,c,d?null:20,h?null:20);a=x[0],i=x[1]}if(d&&(a-=Lz(d)?f[0]/2:d==="right"?f[0]:0),h&&(i-=Lz(h)?f[1]/2:h==="bottom"?f[1]:0),f6(t)){var x=Rue(a,i,o,u,c);a=x[0],i=x[1]}o.moveTo(a,i)},e.prototype._updateContentNotChangedOnAxis=function(t,n){var a=this._lastDataByCoordSys,i=this._cbParamsList,o=!!a&&a.length===t.length;return o&&z(a,function(s,l){var u=s.dataByAxis||[],c=t[l]||{},f=c.dataByAxis||[];o=o&&u.length===f.length,o&&z(u,function(d,h){var v=f[h]||{},y=d.seriesDataIndices||[],m=v.seriesDataIndices||[];o=o&&d.value===v.value&&d.axisType===v.axisType&&d.axisId===v.axisId&&y.length===m.length,o&&z(y,function(x,_){var T=m[_];o=o&&x.seriesIndex===T.seriesIndex&&x.dataIndex===T.dataIndex}),i&&z(d.seriesDataIndices,function(x){var _=x.seriesIndex,T=n[_],C=i[_];T&&C&&C.data!==T.data&&(o=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=n,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,n){ot.node||!n.getDom()||(lh(this,"_updatePosition"),this._tooltipContent.dispose(),bw("itemTooltip",n))},e.type="tooltip",e})(Ct);function sd(r,e,t){var n=e.ecModel,a;t?(a=new rt(t,n,n),a=new rt(e.option,a,n)):a=e;for(var i=r.length-1;i>=0;i--){var o=r[i];o&&(o instanceof rt&&(o=o.get("tooltip",!0)),pe(o)&&(o={formatter:o}),o&&(a=new rt(o,a,n)))}return a}function Az(r,e){return r.dispatchAction||ye(e.dispatchAction,e)}function Pue(r,e,t,n,a,i,o){var s=t.getSize(),l=s[0],u=s[1];return i!=null&&(r+l+i+2>n?r-=l+i:r+=i),o!=null&&(e+u+o>a?e-=u+o:e+=o),[r,e]}function Rue(r,e,t,n,a){var i=t.getSize(),o=i[0],s=i[1];return r=Math.min(r+o,n)-o,e=Math.min(e+s,a)-s,r=Math.max(r,0),e=Math.max(e,0),[r,e]}function Eue(r,e,t,n){var a=t[0],i=t[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=e.width,c=e.height;switch(r){case"inside":s=e.x+u/2-a/2,l=e.y+c/2-i/2;break;case"top":s=e.x+u/2-a/2,l=e.y-i-o;break;case"bottom":s=e.x+u/2-a/2,l=e.y+c+o;break;case"left":s=e.x-a-o,l=e.y+c/2-i/2;break;case"right":s=e.x+u+o,l=e.y+c/2-i/2}return[s,l]}function Lz(r){return r==="center"||r==="middle"}function zue(r,e,t){var n=gT(r).queryOptionMap,a=n.keys()[0];if(!(!a||a==="series")){var i=Lc(e,a,n.get(a),{useDefault:!1,enableAll:!1,enableNone:!1}),o=i.models[0];if(o){var s=t.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=je(u).tooltipConfig;if(c&&c.name===r.name)return l=u,!0}),l)return{componentMainType:a,componentIndex:o.componentIndex,el:l}}}}function Oue(r){Ze(Zh),r.registerComponentModel(mue),r.registerComponentView(Due),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Vt),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Vt)}var Nue=["rect","polygon","keep","clear"];function jue(r,e){var t=Tt(r?r.brush:[]);if(t.length){var n=[];z(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(n=n.concat(u))});var a=r&&r.toolbox;le(a)&&(a=a[0]),a||(a={feature:{}},r.toolbox=[a]);var i=a.feature||(a.feature={}),o=i.brush||(i.brush={}),s=o.type||(o.type=[]);s.push.apply(s,n),Bue(s),e&&!s.length&&s.push.apply(s,Nue)}}function Bue(r){var e={};z(r,function(t){e[t]=1}),r.length=0,z(e,function(t,n){r.push(n)})}var Iz=z;function Dz(r){if(r){for(var e in r)if(r.hasOwnProperty(e))return!0}}function Iw(r,e,t){var n={};return Iz(e,function(i){var o=n[i]=a();Iz(r[i],function(s,l){if(pr.isValidType(l)){var u={type:l,visual:s};t&&t(u,i),o[l]=new pr(u),l==="opacity"&&(u=Ae(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new pr(u))}})}),n;function a(){var i=function(){};i.prototype.__hidden=i.prototype;var o=new i;return o}}function v6(r,e,t){var n;z(t,function(a){e.hasOwnProperty(a)&&Dz(e[a])&&(n=!0)}),n&&z(t,function(a){e.hasOwnProperty(a)&&Dz(e[a])?r[a]=Ae(e[a]):delete r[a]})}function Fue(r,e,t,n,a,i){var o={};z(r,function(f){var d=pr.prepareVisualTypes(e[f]);o[f]=d});var s;function l(f){return aC(t,s,f)}function u(f,d){dB(t,s,f,d)}t.each(c);function c(f,d){s=f;var h=t.getRawDataItem(s);if(!(h&&h.visualMap===!1))for(var v=n.call(a,f),y=e[v],m=o[v],x=0,_=m.length;x<_;x++){var T=m[x];y[T]&&y[T].applyVisual(f,l,u)}}}function Vue(r,e,t,n){var a={};return z(r,function(i){var o=pr.prepareVisualTypes(e[i]);a[i]=o}),{progress:function(o,s){var l;n!=null&&(l=s.getDimensionIndex(n));function u(k){return aC(s,f,k)}function c(k,A){dB(s,f,k,A)}for(var f,d=s.getStore();(f=o.next())!=null;){var h=s.getRawDataItem(f);if(!(h&&h.visualMap===!1))for(var v=n!=null?d.get(l,f):f,y=t(v),m=e[y],x=a[y],_=0,T=x.length;_<T;_++){var C=x[_];m[C]&&m[C].applyVisual(v,u,c)}}}}}function Gue(r){var e=r.brushType,t={point:function(n){return Pz[e].point(n,t,r)},rect:function(n){return Pz[e].rect(n,t,r)}};return t}var Pz={lineX:Rz(0),lineY:Rz(1),rect:{point:function(r,e,t){return r&&t.boundingRect.contain(r[0],r[1])},rect:function(r,e,t){return r&&t.boundingRect.intersect(r)}},polygon:{point:function(r,e,t){return r&&t.boundingRect.contain(r[0],r[1])&&al(t.range,r[0],r[1])},rect:function(r,e,t){var n=t.range;if(!r||n.length<=1)return!1;var a=r.x,i=r.y,o=r.width,s=r.height,l=n[0];if(al(n,a,i)||al(n,a+o,i)||al(n,a,i+s)||al(n,a+o,i+s)||ze.create(r).contain(l[0],l[1])||xd(a,i,a+o,i,n)||xd(a,i,a,i+s,n)||xd(a+o,i,a+o,i+s,n)||xd(a,i+s,a+o,i+s,n))return!0}}};function Rz(r){var e=["x","y"],t=["width","height"];return{point:function(n,a,i){if(n){var o=i.range,s=n[r];return ld(s,o)}},rect:function(n,a,i){if(n){var o=i.range,s=[n[e[r]],n[e[r]]+n[t[r]]];return s[1]<s[0]&&s.reverse(),ld(s[0],o)||ld(s[1],o)||ld(o[0],s)||ld(o[1],s)}}}}function ld(r,e){return e[0]<=r&&r<=e[1]}var Ez=["inBrush","outOfBrush"],sb="__ecBrushSelect",Dw="__ecInBrushSelectEvent";function g6(r){r.eachComponent({mainType:"brush"},function(e){var t=e.brushTargetManager=new C2(e.option,r);t.setInputRanges(e.areas,r)})}function Wue(r,e,t){var n=[],a,i;r.eachComponent({mainType:"brush"},function(o){t&&t.type==="takeGlobalCursor"&&o.setBrushOption(t.key==="brush"?t.brushOption:{brushType:!1})}),g6(r),r.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:Ae(o.areas),selected:[]};n.push(l);var u=o.option,c=u.brushLink,f=[],d=[],h=[],v=!1;s||(a=u.throttleType,i=u.throttleDelay);var y=ue(o.areas,function(k){var A=Yue[k.brushType],L=De({boundingRect:A?A(k):void 0},k);return L.selectors=Gue(L),L}),m=Iw(o.option,Ez,function(k){k.mappingMethod="fixed"});le(c)&&z(c,function(k){f[k]=1});function x(k){return c==="all"||!!f[k]}function _(k){return!!k.length}r.eachSeries(function(k,A){var L=h[A]=[];k.subType==="parallel"?T(k,A):C(k,A,L)});function T(k,A){var L=k.coordinateSystem;v=v||L.hasAxisBrushed(),x(A)&&L.eachActiveState(k.getData(),function(D,P){D==="active"&&(d[P]=1)})}function C(k,A,L){if(!(!k.brushSelector||Uue(o,A))&&(z(y,function(P){o.brushTargetManager.controlSeries(P,k,r)&&L.push(P),v=v||_(L)}),x(A)&&_(L))){var D=k.getData();D.each(function(P){zz(k,L,D,P)&&(d[P]=1)})}}r.eachSeries(function(k,A){var L={seriesId:k.id,seriesIndex:A,seriesName:k.name,dataIndex:[]};l.selected.push(L);var D=h[A],P=k.getData(),E=x(A)?function(O){return d[O]?(L.dataIndex.push(P.getRawIndex(O)),"inBrush"):"outOfBrush"}:function(O){return zz(k,D,P,O)?(L.dataIndex.push(P.getRawIndex(O)),"inBrush"):"outOfBrush"};(x(A)?v:_(D))&&Fue(Ez,m,P,E)})}),$ue(e,a,i,n,t)}function $ue(r,e,t,n,a){if(a){var i=r.getZr();if(!i[Dw]){i[sb]||(i[sb]=Hue);var o=Fc(i,sb,t,e);o(r,n)}}}function Hue(r,e){if(!r.isDisposed()){var t=r.getZr();t[Dw]=!0,r.dispatchAction({type:"brushSelect",batch:e}),t[Dw]=!1}}function zz(r,e,t,n){for(var a=0,i=e.length;a<i;a++){var o=e[a];if(r.brushSelector(n,t,o.selectors,o))return!0}}function Uue(r,e){var t=r.option.seriesIndex;return t!=null&&t!=="all"&&(le(t)?Ue(t,e)<0:e!==t)}var Yue={rect:function(r){return Oz(r.range)},polygon:function(r){for(var e,t=r.range,n=0,a=t.length;n<a;n++){e=e||[[1/0,-1/0],[1/0,-1/0]];var i=t[n];i[0]<e[0][0]&&(e[0][0]=i[0]),i[0]>e[0][1]&&(e[0][1]=i[0]),i[1]<e[1][0]&&(e[1][0]=i[1]),i[1]>e[1][1]&&(e[1][1]=i[1])}return e&&Oz(e)}};function Oz(r){return new ze(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var Xue=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){this.ecModel=t,this.api=n,this.model,(this._brushController=new KC(n.getZr())).on("brush",ye(this._onBrush,this)).mount()},e.prototype.render=function(t,n,a,i){this.model=t,this._updateController(t,n,a,i)},e.prototype.updateTransform=function(t,n,a,i){g6(n),this._updateController(t,n,a,i)},e.prototype.updateVisual=function(t,n,a,i){this.updateTransform(t,n,a,i)},e.prototype.updateView=function(t,n,a,i){this._updateController(t,n,a,i)},e.prototype._updateController=function(t,n,a,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(a)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var n=this.model.id,a=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:Ae(a),$from:n}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:Ae(a),$from:n})},e.type="brush",e})(Ct),Zue=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,n){var a=this.option;!n&&v6(a,t,["inBrush","outOfBrush"]);var i=a.inBrush=a.inBrush||{};a.outOfBrush=a.outOfBrush||{color:this.option.defaultOutOfBrushColor},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=ue(t,function(n){return Nz(this.option,n)},this))},e.prototype.setBrushOption=function(t){this.brushOption=Nz(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:ee.color.backgroundTint,borderColor:ee.color.borderTint},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:ee.color.disabled},e})(Je);function Nz(r,e){return Ye({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new rt(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}var Kue=["rect","polygon","lineX","lineY","keep","clear"],que=(function(r){Q(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,a){var i,o,s;n.eachComponent({mainType:"brush"},function(l){i=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=i,this._brushMode=o,z(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===i)?"emphasis":"normal")})},e.prototype.updateView=function(t,n,a){this.render(t,n,a)},e.prototype.getIcons=function(){var t=this.model,n=t.get("icon",!0),a={};return z(t.get("type",!0),function(i){n[i]&&(a[i]=n[i])}),a},e.prototype.onclick=function(t,n,a){var i=this._brushType,o=this._brushMode;a==="clear"?(n.dispatchAction({type:"axisAreaSelect",intervals:[]}),n.dispatchAction({type:"brush",command:"clear",areas:[]})):n.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:a==="keep"?i:i===a?!1:a,brushMode:a==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var n={show:!0,type:Kue.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:t.getLocaleModel().get(["toolbox","brush","title"])};return n},e})(Xn);function Que(r){r.registerComponentView(Xue),r.registerComponentModel(Zue),r.registerPreprocessor(jue),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,Wue),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(n){n.setAreas(e.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Vt),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Vt),Wu("brush",que)}var Jue=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:ee.size.m,backgroundColor:ee.color.transparent,borderColor:ee.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:ee.color.primary},subtextStyle:{fontSize:12,color:ee.color.quaternary}},e})(Je),ece=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){if(this.group.removeAll(),!!t.get("show")){var i=this.group,o=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),u=Ce(t.get("textBaseline"),t.get("textVerticalAlign")),c=new lt({style:wt(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),f=c.getBoundingRect(),d=t.get("subtext"),h=new lt({style:wt(s,{text:d,fill:s.getTextColor(),y:f.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),v=t.get("link"),y=t.get("sublink"),m=t.get("triggerEvent",!0);c.silent=!v&&!m,h.silent=!y&&!m,v&&c.on("click",function(){hy(v,"_"+t.get("target"))}),y&&h.on("click",function(){hy(y,"_"+t.get("subtarget"))}),je(c).eventData=je(h).eventData=m?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(c),d&&i.add(h);var x=i.getBoundingRect(),_=t.getBoxLayoutParams();_.width=x.width,_.height=x.height;var T=lr(t,a),C=Dt(_,T.refContainer,t.get("padding"));l||(l=t.get("left")||t.get("right"),l==="middle"&&(l="center"),l==="right"?C.x+=C.width:l==="center"&&(C.x+=C.width/2)),u||(u=t.get("top")||t.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?C.y+=C.height:u==="middle"&&(C.y+=C.height/2),u=u||"top"),i.x=C.x,i.y=C.y,i.markRedraw();var k={align:l,verticalAlign:u};c.setStyle(k),h.setStyle(k),x=i.getBoundingRect();var A=C.margin,L=t.getItemStyle(["color","opacity"]);L.fill=t.get("backgroundColor");var D=new Qe({shape:{x:x.x-A[3],y:x.y-A[0],width:x.width+A[1]+A[3],height:x.height+A[0]+A[2],r:t.get("borderRadius")},style:L,subPixelOptimize:!0,silent:!0});i.add(D)}},e.type="title",e})(Ct);function tce(r){r.registerComponentModel(Jue),r.registerComponentView(ece)}var jz=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a),this._initData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){t==null&&(t=this.option.currentIndex);var n=this._data.count();this.option.loop?t=(t%n+n)%n:(t>=n&&(t=n-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t=this.option,n=t.data||[],a=t.axisType,i=this._names=[],o;a==="category"?(o=[],z(n,function(u,c){var f=ir(Ac(u),""),d;Pe(u)?(d=Ae(u),d.value=c):d=c,o.push(d),i.push(f)})):o=n;var s={category:"ordinal",time:"time",value:"number"}[a]||"number",l=this._data=new Ur([{name:"value",type:s}],this);l.initData(o,i)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:ee.size.m,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:ee.color.secondary},data:[]},e})(Je),y6=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=us(jz.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:ee.color.border,borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:ee.color.accent10},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:ee.color.tertiary},itemStyle:{color:ee.color.accent20,borderWidth:0},checkpointStyle:{symbol:"circle",symbolSize:15,color:ee.color.accent50,borderColor:ee.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:ee.color.accent50,borderColor:ee.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:ee.color.accent60},itemStyle:{color:ee.color.accent60,borderColor:ee.color.accent60},controlStyle:{color:ee.color.accent70,borderColor:ee.color.accent70}},progress:{lineStyle:{color:ee.color.accent30},itemStyle:{color:ee.color.accent40}},data:[]}),e})(jz);Wt(y6,Pm.prototype);var rce=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e})(Ct),nce=(function(r){Q(e,r);function e(t,n,a,i){var o=r.call(this,t,n,a)||this;return o.type=i||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e})(aa),lb=Math.PI,Bz=et(),ace=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){this.api=n},e.prototype.render=function(t,n,a){if(this.model=t,this.api=a,this.ecModel=n,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,a),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(i,t);t.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return rr("nameValue",{noName:!0,value:c})},z(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](i,o,l,t)},this),this._renderAxisLabel(i,s,l,t),this._position(i,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,n){var a=t.get(["label","position"]),i=t.get("orient"),o=oce(t,n),s;a==null||a==="auto"?s=i==="horizontal"?o.y+o.height/2<n.getHeight()/2?"-":"+":o.x+o.width/2<n.getWidth()/2?"+":"-":pe(a)?s={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[i][a]:s=a;var l={horizontal:"center",vertical:s>=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:lb/2},f=i==="vertical"?o.height:o.width,d=t.getModel("controlStyle"),h=d.get("show",!0),v=h?d.get("itemSize"):0,y=h?d.get("itemGap"):0,m=v+y,x=t.get(["label","rotate"])||0;x=x*lb/180;var _,T,C,k=d.get("position",!0),A=h&&d.get("showPlayBtn",!0),L=h&&d.get("showPrevBtn",!0),D=h&&d.get("showNextBtn",!0),P=0,E=f;k==="left"||k==="bottom"?(A&&(_=[0,0],P+=m),L&&(T=[P,0],P+=m),D&&(C=[E-v,0],E-=m)):(A&&(_=[E-v,0],E-=m),L&&(T=[0,0],P+=m),D&&(C=[E-v,0],E-=m));var O=[P,E];return t.get("inverse")&&O.reverse(),{viewRect:o,mainLength:f,orient:i,rotation:c[i],labelRotation:x,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[i],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[i],playPosition:_,prevBtnPosition:T,nextBtnPosition:C,axisExtent:O,controlSize:v,controlGap:y}},e.prototype._position=function(t,n){var a=this._mainGroup,i=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=hr(),l=o.x,u=o.y+o.height;Ta(s,s,[-l,-u]),to(s,s,-lb/2),Ta(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=_(o),f=_(a.getBoundingRect()),d=_(i.getBoundingRect()),h=[a.x,a.y],v=[i.x,i.y];v[0]=h[0]=c[0][0];var y=t.labelPosOpt;if(y==null||pe(y)){var m=y==="+"?0:1;T(h,f,c,1,m),T(v,d,c,1,1-m)}else{var m=y>=0?0:1;T(h,f,c,1,m),v[1]=h[1]+y}a.setPosition(h),i.setPosition(v),a.rotation=i.rotation=t.rotation,x(a),x(i);function x(C){C.originX=c[0][0]-C.x,C.originY=c[1][0]-C.y}function _(C){return[[C.x,C.x+C.width],[C.y,C.y+C.height]]}function T(C,k,A,L,D){C[L]+=A[L][D]-k[L][D]}},e.prototype._createAxis=function(t,n){var a=n.getData(),i=n.get("axisType"),o=ice(n,i);o.getTicks=function(){return a.mapArray(["value"],function(u){return{value:u}})};var s=a.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new nce("value",o,t.axisExtent,i);return l.model=n,l},e.prototype._createGroup=function(t){var n=this[t]=new Le;return this.group.add(n),n},e.prototype._renderAxisLine=function(t,n,a,i){var o=a.getExtent();if(i.get(["lineStyle","show"])){var s=new Zt({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:ie({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(s);var l=this._progressLine=new Zt({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:De({lineCap:"round",lineWidth:s.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});n.add(l)}},e.prototype._renderAxisTick=function(t,n,a,i){var o=this,s=i.getData(),l=a.scale.getTicks();this._tickSymbols=[],z(l,function(u){var c=a.dataToCoord(u.value),f=s.getItemModel(u.value),d=f.getModel("itemStyle"),h=f.getModel(["emphasis","itemStyle"]),v=f.getModel(["progress","itemStyle"]),y={x:c,y:0,onclick:ye(o._changeTimeline,o,u.value)},m=Fz(f,d,n,y);m.ensureState("emphasis").style=h.getItemStyle(),m.ensureState("progress").style=v.getItemStyle(),Yo(m);var x=je(m);f.get("tooltip")?(x.dataIndex=u.value,x.dataModel=i):x.dataIndex=x.dataModel=null,o._tickSymbols.push(m)})},e.prototype._renderAxisLabel=function(t,n,a,i){var o=this,s=a.getLabelModel();if(s.get("show")){var l=i.getData(),u=a.getViewLabels();this._tickLabels=[],z(u,function(c){var f=c.tickValue,d=l.getItemModel(f),h=d.getModel("label"),v=d.getModel(["emphasis","label"]),y=d.getModel(["progress","label"]),m=a.dataToCoord(c.tickValue),x=new lt({x:m,y:0,rotation:t.labelRotation-t.rotation,onclick:ye(o._changeTimeline,o,f),silent:!1,style:wt(h,{text:c.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});x.ensureState("emphasis").style=wt(v),x.ensureState("progress").style=wt(y),n.add(x),Yo(x),Bz(x).dataIndex=f,o._tickLabels.push(x)})}},e.prototype._renderControl=function(t,n,a,i){var o=t.controlSize,s=t.rotation,l=i.getModel("controlStyle").getItemStyle(),u=i.getModel(["emphasis","controlStyle"]).getItemStyle(),c=i.getPlayState(),f=i.get("inverse",!0);d(t.nextBtnPosition,"next",ye(this._changeTimeline,this,f?"-":"+")),d(t.prevBtnPosition,"prev",ye(this._changeTimeline,this,f?"+":"-")),d(t.playPosition,c?"stop":"play",ye(this._handlePlayClick,this,!c),!0);function d(h,v,y,m){if(h){var x=Ca(Ce(i.get(["controlStyle",v+"BtnSize"]),o),o),_=[0,-x/2,x,x],T=sce(i,v+"Icon",_,{x:h[0],y:h[1],originX:o/2,originY:0,rotation:m?-s:0,rectHover:!0,style:l,onclick:y});T.ensureState("emphasis").style=u,n.add(T),Yo(T)}}},e.prototype._renderCurrentPointer=function(t,n,a,i){var o=i.getData(),s=i.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(f){f.draggable=!0,f.drift=ye(u._handlePointerDrag,u),f.ondragend=ye(u._handlePointerDragend,u),Vz(f,u._progressLine,s,a,i,!0)},onUpdate:function(f){Vz(f,u._progressLine,s,a,i)}};this._currentPointer=Fz(l,l,this._mainGroup,{},this._currentPointer,c)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,n,a){this._clearTimer(),this._pointerChangeTimeline([a.offsetX,a.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,n){var a=this._toAxisCoord(t)[0],i=this._axis,o=kn(i.getExtent().slice());a>o[1]&&(a=o[1]),a<o[0]&&(a=o[0]),this._currentPointer.x=a,this._currentPointer.markRedraw();var s=this._progressLine;s&&(s.shape.x2=a,s.dirty());var l=this._findNearestTick(a),u=this.model;(n||l!==u.getCurrentIndex()&&u.get("realtime"))&&this._changeTimeline(l)},e.prototype._doPlayStop=function(){var t=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var n=t.model;t._changeTimeline(n.getCurrentIndex()+(n.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},e.prototype._toAxisCoord=function(t){var n=this._mainGroup.getLocalTransform();return _a(t,n,!0)},e.prototype._findNearestTick=function(t){var n=this.model.getData(),a=1/0,i,o=this._axis;return n.each(["value"],function(s,l){var u=o.dataToCoord(s),c=Math.abs(u-t);c<a&&(a=c,i=l)}),i},e.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},e.prototype._changeTimeline=function(t){var n=this.model.getCurrentIndex();t==="+"?t=n+1:t==="-"&&(t=n-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})},e.prototype._updateTicksStatus=function(){var t=this.model.getCurrentIndex(),n=this._tickSymbols,a=this._tickLabels;if(n)for(var i=0;i<n.length;i++)n&&n[i]&&n[i].toggleState("progress",i<t);if(a)for(var i=0;i<a.length;i++)a&&a[i]&&a[i].toggleState("progress",Bz(a[i]).dataIndex<=t)},e.type="timeline.slider",e})(rce);function ice(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new gc({ordinalMeta:r.getCategories(),extent:[1/0,-1/0]});case"time":return new SC({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new Qi}}function oce(r,e){return Dt(r.getBoxLayoutParams(),lr(r,e).refContainer,r.get("padding"))}function sce(r,e,t,n){var a=n.style,i=Ec(r.get(["controlStyle",e]),n||{},new ze(t[0],t[1],t[2],t[3]));return a&&i.setStyle(a),i}function Fz(r,e,t,n,a,i){var o=e.get("color");if(a)a.setColor(o),t.add(a),i&&i.onUpdate(a);else{var s=r.get("symbol");a=Kt(s,-1,-1,2,2,o),a.setStyle("strokeNoScale",!0),t.add(a),i&&i.onCreate(a)}var l=e.getItemStyle(["color"]);a.setStyle(l),n=Ye({rectHover:!0,z2:100},n,!0);var u=Vc(r.get("symbolSize"));n.scaleX=u[0]/2,n.scaleY=u[1]/2;var c=Bl(r.get("symbolOffset"),u);c&&(n.x=(n.x||0)+c[0],n.y=(n.y||0)+c[1]);var f=r.get("symbolRotate");return n.rotation=(f||0)*Math.PI/180||0,a.attr(n),a.updateTransform(),a}function Vz(r,e,t,n,a,i){if(!r.dragging){var o=a.getModel("checkpointStyle"),s=n.dataToCoord(a.getData().get("value",t));if(i||!o.get("animation",!0))r.attr({x:s,y:0}),e&&e.attr({shape:{x2:s}});else{var l={duration:o.get("animationDuration",!0),easing:o.get("animationEasing",!0)};r.stopAnimation(null,!0),r.animateTo({x:s,y:0},l),e&&e.animateTo({shape:{x2:s}},l)}}}function lce(r){r.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(e,t,n){var a=t.getComponent("timeline");return a&&e.currentIndex!=null&&(a.setCurrentIndex(e.currentIndex),!a.get("loop",!0)&&a.isIndexMax()&&a.getPlayState()&&(a.setPlayState(!1),n.dispatchAction({type:"timelinePlayChange",playState:!1,from:e.from}))),t.resetOption("timeline",{replaceMerge:a.get("replaceMerge",!0)}),De({currentIndex:a.option.currentIndex},e)}),r.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(e,t){var n=t.getComponent("timeline");n&&e.playState!=null&&n.setPlayState(e.playState)})}function uce(r){var e=r&&r.timeline;le(e)||(e=e?[e]:[]),z(e,function(t){t&&cce(t)})}function cce(r){var e=r.type,t={number:"value",time:"time"};if(t[e]&&(r.axisType=t[e],delete r.type),Gz(r),sl(r,"controlPosition")){var n=r.controlStyle||(r.controlStyle={});sl(n,"position")||(n.position=r.controlPosition),n.position==="none"&&!sl(n,"show")&&(n.show=!1,delete n.position),delete r.controlPosition}z(r.data||[],function(a){Pe(a)&&!le(a)&&(!sl(a,"value")&&sl(a,"name")&&(a.value=a.name),Gz(a))})}function Gz(r){var e=r.itemStyle||(r.itemStyle={}),t=e.emphasis||(e.emphasis={}),n=r.label||r.label||{},a=n.normal||(n.normal={}),i={normal:1,emphasis:1};z(n,function(o,s){!i[s]&&!sl(a,s)&&(a[s]=o)}),t.label&&!sl(n,"emphasis")&&(n.emphasis=t.label,delete t.label)}function sl(r,e){return r.hasOwnProperty(e)}function fce(r){r.registerComponentModel(y6),r.registerComponentView(ace),r.registerSubTypeDefaulter("timeline",function(){return"slider"}),lce(r),r.registerPreprocessor(uce)}function A2(r,e){if(!r)return!1;for(var t=le(r)?r:[r],n=0;n<t.length;n++)if(t[n]&&t[n][e])return!0;return!1}function gg(r){wl(r,"label",["show"])}var yg=et(),li=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.createdBySelf=!1,t.preventAutoZ=!0,t}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a),this._mergeOption(t,a,!1,!0)},e.prototype.isAnimationEnabled=function(){if(ot.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},e.prototype.mergeOption=function(t,n){this._mergeOption(t,n,!1,!1)},e.prototype._mergeOption=function(t,n,a,i){var o=this.mainType;a||n.eachSeries(function(s){var l=s.get(this.mainType,!0),u=yg(s)[o];if(!l||!l.data){yg(s)[o]=null;return}u?u._mergeOption(l,n,!0):(i&&gg(l),z(l.data,function(c){c instanceof Array?(gg(c[0]),gg(c[1])):gg(c)}),u=this.createMarkerModelFromSeries(l,this,n),ie(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),yg(s)[o]=u},this)},e.prototype.formatTooltip=function(t,n,a){var i=this.getData(),o=this.getRawValue(t),s=i.getName(t);return rr("section",{header:this.name,blocks:[rr("nameValue",{name:s,value:o,noName:!s,noValue:o==null})]})},e.prototype.getData=function(){return this._data},e.prototype.setData=function(t){this._data=t},e.prototype.getDataParams=function(t,n){var a=Pm.prototype.getDataParams.call(this,t,n),i=this.__hostSeries;return i&&(a.seriesId=i.id,a.seriesName=i.name,a.seriesType=i.subType),a},e.getMarkerModelFromSeries=function(t,n){return yg(t)[n]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e})(Je);Wt(li,Pm.prototype);var dce=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,n,a){return new e(t,n,a)},e.type="markPoint",e.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},e})(li);function Pw(r){return!(isNaN(parseFloat(r.x))&&isNaN(parseFloat(r.y)))}function hce(r){return!isNaN(parseFloat(r.x))&&!isNaN(parseFloat(r.y))}function mg(r,e,t,n,a,i,o){var s=[],l=qi(e,a),u=l?e.getCalculationInfo("stackResultDimension"):a,c=Xy(e,u,r),f=e.hostModel,d=f.indicesOfNearest(t,u,c)[0];s[i]=e.get(n,d),s[o]=e.get(u,d);var h=e.get(a,d),v=ma(e.get(a,d));return v=Math.min(v,20),v>=0&&(s[o]=+s[o].toFixed(v)),[s,h]}var xg={min:$e(mg,"min"),max:$e(mg,"max"),average:$e(mg,"average"),median:$e(mg,"median")};function Th(r,e){if(e){var t=r.getData(),n=r.coordinateSystem,a=n&&n.dimensions;if(!hce(e)&&!le(e.coord)&&le(a)){var i=m6(e,t,n,r);if(e=Ae(e),e.type&&xg[e.type]&&i.baseAxis&&i.valueAxis){var o=Ue(a,i.baseAxis.dim),s=Ue(a,i.valueAxis.dim),l=xg[e.type](t,i.valueAxis.dim,i.baseDataDim,i.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!le(a)){e.coord=[];var u=r.getBaseAxis();if(u&&e.type&&xg[e.type]){var c=n.getOtherAxis(u);c&&(e.value=Xy(t,t.mapDimension(c.dim),e.type))}}else for(var f=e.coord,d=0;d<2;d++)xg[f[d]]&&(f[d]=Xy(t,t.mapDimension(a[d]),f[d]));return e}}function m6(r,e,t,n){var a={};return r.valueIndex!=null||r.valueDim!=null?(a.valueDataDim=r.valueIndex!=null?e.getDimension(r.valueIndex):r.valueDim,a.valueAxis=t.getAxis(pce(n,a.valueDataDim)),a.baseAxis=t.getOtherAxis(a.valueAxis),a.baseDataDim=e.mapDimension(a.baseAxis.dim)):(a.baseAxis=n.getBaseAxis(),a.valueAxis=t.getOtherAxis(a.baseAxis),a.baseDataDim=e.mapDimension(a.baseAxis.dim),a.valueDataDim=e.mapDimension(a.valueAxis.dim)),a}function pce(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function Ch(r,e){return r&&r.containData&&e.coord&&!Pw(e)?r.containData(e.coord):!0}function vce(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!Pw(e)&&!Pw(t)?r.containZone(e.coord,t.coord):!0}function x6(r,e){return r?function(t,n,a,i){var o=i<2?t.coord&&t.coord[i]:t.value;return Ko(o,e[i])}:function(t,n,a,i){return Ko(t.value,e[i])}}function Xy(r,e,t){if(t==="average"){var n=0,a=0;return r.each(e,function(i,o){isNaN(i)||(n+=i,a++)}),n/a}else return t==="median"?r.getMedian(e):r.getDataExtent(e)[t==="max"?1:0]}var ub=et(),L2=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=we()},e.prototype.render=function(t,n,a){var i=this,o=this.markerGroupMap;o.each(function(s){ub(s).keep=!1}),n.eachSeries(function(s){var l=li.getMarkerModelFromSeries(s,i.type);l&&i.renderSeries(s,l,n,a)}),o.each(function(s){!ub(s).keep&&i.group.remove(s.group)}),gce(n,o,this.type)},e.prototype.markKeep=function(t){ub(t).keep=!0},e.prototype.toggleBlurSeries=function(t,n){var a=this;z(t,function(i){var o=li.getMarkerModelFromSeries(i,a.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?Ej(l):TT(l))})}})},e.type="marker",e})(Ct);function gce(r,e,t){r.eachSeries(function(n){var a=li.getMarkerModelFromSeries(n,t),i=e.get(n.id);if(a&&i&&i.group){var o=Al(a),s=o.z,l=o.zlevel;Am(i.group,s,l)}})}function Wz(r,e,t){var n=e.coordinateSystem,a=t.getWidth(),i=t.getHeight(),o=n&&n.getArea&&n.getArea();r.each(function(s){var l=r.getItemModel(s),u=l.get("relativeTo")==="coordinate",c=u?o?o.width:0:a,f=u?o?o.height:0:i,d=u&&o?o.x:0,h=u&&o?o.y:0,v,y=he(l.get("x"),c)+d,m=he(l.get("y"),f)+h;if(!isNaN(y)&&!isNaN(m))v=[y,m];else if(e.getMarkerPosition)v=e.getMarkerPosition(r.getValues(r.dimensions,s));else if(n){var x=r.get(n.dimensions[0],s),_=r.get(n.dimensions[1],s);v=n.dataToPoint([x,_])}isNaN(y)||(v[0]=y),isNaN(m)||(v[1]=m),r.setItemLayout(s,v)})}var yce=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,n,a){n.eachSeries(function(i){var o=li.getMarkerModelFromSeries(i,"markPoint");o&&(Wz(o.getData(),i,a),this.markerGroupMap.get(i.id).updateLayout())},this)},e.prototype.renderSeries=function(t,n,a,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new Hh),f=mce(o,t,n);n.setData(f),Wz(n.getData(),t,i),f.each(function(d){var h=f.getItemModel(d),v=h.getShallow("symbol"),y=h.getShallow("symbolSize"),m=h.getShallow("symbolRotate"),x=h.getShallow("symbolOffset"),_=h.getShallow("symbolKeepAspect");if(Me(v)||Me(y)||Me(m)||Me(x)){var T=n.getRawValue(d),C=n.getDataParams(d);Me(v)&&(v=v(T,C)),Me(y)&&(y=y(T,C)),Me(m)&&(m=m(T,C)),Me(x)&&(x=x(T,C))}var k=h.getModel("itemStyle").getItemStyle(),A=h.get("z2"),L=Gh(l,"color");k.fill||(k.fill=L),f.setItemVisual(d,{z2:Ce(A,0),symbol:v,symbolSize:y,symbolRotate:m,symbolOffset:x,symbolKeepAspect:_,style:k})}),c.updateData(f),this.group.add(c.group),f.eachItemGraphicEl(function(d){d.traverse(function(h){je(h).dataModel=n})}),this.markKeep(c),c.group.silent=n.get("silent")||t.get("silent")},e.type="markPoint",e})(L2);function mce(r,e,t){var n;r?n=ue(r&&r.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return ie(ie({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var a=new Ur(n,t),i=ue(t.get("data"),$e(Th,e));r&&(i=ht(i,$e(Ch,r)));var o=x6(!!r,n);return a.initData(i,null,o),a}function xce(r){r.registerComponentModel(dce),r.registerComponentView(yce),r.registerPreprocessor(function(e){A2(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var Sce=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,n,a){return new e(t,n,a)},e.type="markLine",e.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"},e})(li),Sg=et(),bce=function(r,e,t,n){var a=r.getData(),i;if(le(n))i=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=e.getAxis(n.yAxis!=null?"y":"x"),l=Tr(n.yAxis,n.xAxis);else{var u=m6(n,a,e,r);s=u.valueAxis;var c=yC(a,u.valueDataDim);l=Xy(a,c,o)}var f=s.dim==="x"?0:1,d=1-f,h=Ae(n),v={coord:[]};h.type=null,h.coord=[],h.coord[d]=-1/0,v.coord[d]=1/0;var y=t.get("precision");y>=0&&ut(l)&&(l=+l.toFixed(Math.min(y,20))),h.coord[f]=v.coord[f]=l,i=[h,v,{type:o,valueIndex:n.valueIndex,value:l}]}else i=[]}var m=[Th(r,i[0]),Th(r,i[1]),ie({},i[2])];return m[2].type=m[2].type||null,Ye(m[2],m[0]),Ye(m[2],m[1]),m};function Zy(r){return!isNaN(r)&&!isFinite(r)}function $z(r,e,t,n){var a=1-r,i=n.dimensions[r];return Zy(e[a])&&Zy(t[a])&&e[r]===t[r]&&n.getAxis(i).containData(e[r])}function _ce(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,n=e[1].coord;if(t&&n&&($z(1,t,n,r)||$z(0,t,n,r)))return!0}return Ch(r,e[0])&&Ch(r,e[1])}function cb(r,e,t,n,a){var i=n.coordinateSystem,o=r.getItemModel(e),s,l=he(o.get("x"),a.getWidth()),u=he(o.get("y"),a.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition)s=n.getMarkerPosition(r.getValues(r.dimensions,e));else{var c=i.dimensions,f=r.get(c[0],e),d=r.get(c[1],e);s=i.dataToPoint([f,d])}if(ts(i,"cartesian2d")){var h=i.getAxis("x"),v=i.getAxis("y"),c=i.dimensions;Zy(r.get(c[0],e))?s[0]=h.toGlobalCoord(h.getExtent()[t?0:1]):Zy(r.get(c[1],e))&&(s[1]=v.toGlobalCoord(v.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(e,s)}var wce=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,n,a){n.eachSeries(function(i){var o=li.getMarkerModelFromSeries(i,"markLine");if(o){var s=o.getData(),l=Sg(o).from,u=Sg(o).to;l.each(function(c){cb(l,c,!0,i,a),cb(u,c,!1,i,a)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(i.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,n,a,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new XC);this.group.add(c.group);var f=Tce(o,t,n),d=f.from,h=f.to,v=f.line;Sg(n).from=d,Sg(n).to=h,n.setData(v);var y=n.get("symbol"),m=n.get("symbolSize"),x=n.get("symbolRotate"),_=n.get("symbolOffset");le(y)||(y=[y,y]),le(m)||(m=[m,m]),le(x)||(x=[x,x]),le(_)||(_=[_,_]),f.from.each(function(C){T(d,C,!0),T(h,C,!1)}),v.each(function(C){var k=v.getItemModel(C),A=k.getModel("lineStyle").getLineStyle();v.setItemLayout(C,[d.getItemLayout(C),h.getItemLayout(C)]);var L=k.get("z2");A.stroke==null&&(A.stroke=d.getItemVisual(C,"style").fill),v.setItemVisual(C,{z2:Ce(L,0),fromSymbolKeepAspect:d.getItemVisual(C,"symbolKeepAspect"),fromSymbolOffset:d.getItemVisual(C,"symbolOffset"),fromSymbolRotate:d.getItemVisual(C,"symbolRotate"),fromSymbolSize:d.getItemVisual(C,"symbolSize"),fromSymbol:d.getItemVisual(C,"symbol"),toSymbolKeepAspect:h.getItemVisual(C,"symbolKeepAspect"),toSymbolOffset:h.getItemVisual(C,"symbolOffset"),toSymbolRotate:h.getItemVisual(C,"symbolRotate"),toSymbolSize:h.getItemVisual(C,"symbolSize"),toSymbol:h.getItemVisual(C,"symbol"),style:A})}),c.updateData(v),f.line.eachItemGraphicEl(function(C){je(C).dataModel=n,C.traverse(function(k){je(k).dataModel=n})});function T(C,k,A){var L=C.getItemModel(k);cb(C,k,A,t,i);var D=L.getModel("itemStyle").getItemStyle();D.fill==null&&(D.fill=Gh(l,"color")),C.setItemVisual(k,{symbolKeepAspect:L.get("symbolKeepAspect"),symbolOffset:Ce(L.get("symbolOffset",!0),_[A?0:1]),symbolRotate:Ce(L.get("symbolRotate",!0),x[A?0:1]),symbolSize:Ce(L.get("symbolSize"),m[A?0:1]),symbol:Ce(L.get("symbol",!0),y[A?0:1]),style:D})}this.markKeep(c),c.group.silent=n.get("silent")||t.get("silent")},e.type="markLine",e})(L2);function Tce(r,e,t){var n;r?n=ue(r&&r.dimensions,function(u){var c=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return ie(ie({},c),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var a=new Ur(n,t),i=new Ur(n,t),o=new Ur([],t),s=ue(t.get("data"),$e(bce,e,r,t));r&&(s=ht(s,$e(_ce,r)));var l=x6(!!r,n);return a.initData(ue(s,function(u){return u[0]}),null,l),i.initData(ue(s,function(u){return u[1]}),null,l),o.initData(ue(s,function(u){return u[2]})),o.hasItemOption=!0,{from:a,to:i,line:o}}function Cce(r){r.registerComponentModel(Sce),r.registerComponentView(wce),r.registerPreprocessor(function(e){A2(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var Mce=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,n,a){return new e(t,n,a)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e})(li),bg=et(),kce=function(r,e,t,n){var a=n[0],i=n[1];if(!(!a||!i)){var o=Th(r,a),s=Th(r,i),l=o.coord,u=s.coord;l[0]=Tr(l[0],-1/0),l[1]=Tr(l[1],-1/0),u[0]=Tr(u[0],1/0),u[1]=Tr(u[1],1/0);var c=fm([{},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 Ky(r){return!isNaN(r)&&!isFinite(r)}function Hz(r,e,t,n){var a=1-r;return Ky(e[a])&&Ky(t[a])}function Ace(r,e){var t=e.coord[0],n=e.coord[1],a={coord:t,x:e.x0,y:e.y0},i={coord:n,x:e.x1,y:e.y1};return ts(r,"cartesian2d")?t&&n&&(Hz(1,t,n)||Hz(0,t,n))?!0:vce(r,a,i):Ch(r,a)||Ch(r,i)}function Uz(r,e,t,n,a){var i=n.coordinateSystem,o=r.getItemModel(e),s,l=he(o.get(t[0]),a.getWidth()),u=he(o.get(t[1]),a.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition){var c=r.getValues(["x0","y0"],e),f=r.getValues(["x1","y1"],e),d=i.clampData(c),h=i.clampData(f),v=[];t[0]==="x0"?v[0]=d[0]>h[0]?f[0]:c[0]:v[0]=d[0]>h[0]?c[0]:f[0],t[1]==="y0"?v[1]=d[1]>h[1]?f[1]:c[1]:v[1]=d[1]>h[1]?c[1]:f[1],s=n.getMarkerPosition(v,t,!0)}else{var y=r.get(t[0],e),m=r.get(t[1],e),x=[y,m];i.clampData&&i.clampData(x,x),s=i.dataToPoint(x,!0)}if(ts(i,"cartesian2d")){var _=i.getAxis("x"),T=i.getAxis("y"),y=r.get(t[0],e),m=r.get(t[1],e);Ky(y)?s[0]=_.toGlobalCoord(_.getExtent()[t[0]==="x0"?0:1]):Ky(m)&&(s[1]=T.toGlobalCoord(T.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var Yz=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],Lce=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,n,a){n.eachSeries(function(i){var o=li.getMarkerModelFromSeries(i,"markArea");if(o){var s=o.getData();s.each(function(l){var u=ue(Yz,function(f){return Uz(s,l,f,i,a)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,n,a,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new Le});this.group.add(c.group),this.markKeep(c);var f=Ice(o,t,n);n.setData(f),f.each(function(d){var h=ue(Yz,function(E){return Uz(f,d,E,t,i)}),v=o.getAxis("x").scale,y=o.getAxis("y").scale,m=v.getExtent(),x=y.getExtent(),_=[v.parse(f.get("x0",d)),v.parse(f.get("x1",d))],T=[y.parse(f.get("y0",d)),y.parse(f.get("y1",d))];kn(_),kn(T);var C=!(m[0]>_[1]||m[1]<_[0]||x[0]>T[1]||x[1]<T[0]),k=!C;f.setItemLayout(d,{points:h,allClipped:k});var A=f.getItemModel(d),L=A.getModel("itemStyle").getItemStyle(),D=A.get("z2"),P=Gh(l,"color");L.fill||(L.fill=P,pe(L.fill)&&(L.fill=Qd(L.fill,.4))),L.stroke||(L.stroke=P),f.setItemVisual(d,"style",L),f.setItemVisual(d,"z2",Ce(D,0))}),f.diff(bg(c).data).add(function(d){var h=f.getItemLayout(d),v=f.getItemVisual(d,"z2");if(!h.allClipped){var y=new zr({z2:Ce(v,0),shape:{points:h.points}});f.setItemGraphicEl(d,y),c.group.add(y)}}).update(function(d,h){var v=bg(c).data.getItemGraphicEl(h),y=f.getItemLayout(d),m=f.getItemVisual(d,"z2");y.allClipped?v&&c.group.remove(v):(v?ct(v,{z2:Ce(m,0),shape:{points:y.points}},n,d):v=new zr({shape:{points:y.points}}),f.setItemGraphicEl(d,v),c.group.add(v))}).remove(function(d){var h=bg(c).data.getItemGraphicEl(d);c.group.remove(h)}).execute(),f.eachItemGraphicEl(function(d,h){var v=f.getItemModel(h),y=f.getItemVisual(h,"style");d.useStyle(f.getItemVisual(h,"style")),vr(d,sr(v),{labelFetcher:n,labelDataIndex:h,defaultText:f.getName(h)||"",inheritColor:pe(y.fill)?Qd(y.fill,1):ee.color.neutral99}),or(d,v),Pt(d,null,null,v.get(["emphasis","disabled"])),je(d).dataModel=n}),bg(c).data=f,c.group.silent=n.get("silent")||t.get("silent")},e.type="markArea",e})(L2);function Ice(r,e,t){var n,a,i=["x0","y0","x1","y1"];if(r){var o=ue(r&&r.dimensions,function(u){var c=e.getData(),f=c.getDimensionInfo(c.mapDimension(u))||{};return ie(ie({},f),{name:u,ordinalMeta:null})});a=ue(i,function(u,c){return{name:u,type:o[c%2].type}}),n=new Ur(a,t)}else a=[{name:"value",type:"float"}],n=new Ur(a,t);var s=ue(t.get("data"),$e(kce,e,r,t));r&&(s=ht(s,$e(Ace,r)));var l=r?function(u,c,f,d){var h=u.coord[Math.floor(d/2)][d%2];return Ko(h,a[d])}:function(u,c,f,d){return Ko(u.value,a[d])};return n.initData(s,null,l),n.hasItemOption=!0,n}function Dce(r){r.registerComponentModel(Mce),r.registerComponentView(Lce),r.registerPreprocessor(function(e){A2(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var Pce=function(r,e){if(e==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(e==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},Rw=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},e.prototype._updateSelector=function(t){var n=t.selector,a=this.ecModel;n===!0&&(n=t.selector=["all","inverse"]),le(n)&&z(n,function(i,o){pe(i)&&(i={type:i}),n[o]=Ye(i,Pce(a,i.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&this.get("selectedMode")==="single"){for(var n=!1,a=0;a<t.length;a++){var i=t[a].get("name");if(this.isSelected(i)){this.select(i),n=!0;break}}!n&&this.select(t[0].get("name"))}},e.prototype._updateData=function(t){var n=[],a=[];t.eachRawSeries(function(l){var u=l.name;a.push(u);var c;if(l.legendVisualProvider){var f=l.legendVisualProvider,d=f.getAllNames();t.isSeriesFiltered(l)||(a=a.concat(d)),d.length?n=n.concat(d):c=!0}else c=!0;c&&vT(l)&&n.push(l.name)}),this._availableNames=a;var i=this.get("data")||n,o=we(),s=ue(i,function(l){return(pe(l)||ut(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new rt(l,this,this.ecModel))},this);this._data=ht(s,function(l){return!!l})},e.prototype.getData=function(){return this._data},e.prototype.select=function(t){var n=this.option.selected,a=this.get("selectedMode");if(a==="single"){var i=this._data;z(i,function(o){n[o.get("name")]=!1})}n[t]=!0},e.prototype.unSelect=function(t){this.get("selectedMode")!=="single"&&(this.option.selected[t]=!1)},e.prototype.toggleSelected=function(t){var n=this.option.selected;n.hasOwnProperty(t)||(n[t]=!0),this[n[t]?"unSelect":"select"](t)},e.prototype.allSelect=function(){var t=this._data,n=this.option.selected;z(t,function(a){n[a.get("name",!0)]=!0})},e.prototype.inverseSelect=function(){var t=this._data,n=this.option.selected;z(t,function(a){var i=a.get("name",!0);n.hasOwnProperty(i)||(n[i]=!0),n[i]=!n[i]})},e.prototype.isSelected=function(t){var n=this.option.selected;return!(n.hasOwnProperty(t)&&!n[t])&&Ue(this._availableNames,t)>=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:ee.size.m,align:"auto",backgroundColor:ee.color.transparent,borderColor:ee.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:ee.color.disabled,inactiveBorderColor:ee.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:ee.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:ee.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:ee.color.tertiary,borderWidth:1,borderColor:ee.color.border},emphasis:{selectorLabel:{show:!0,color:ee.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},e})(Je),zu=$e,Ew=z,_g=Le,S6=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!1,t}return e.prototype.init=function(){this.group.add(this._contentGroup=new _g),this.group.add(this._selectorGroup=new _g),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,n,a){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var o=t.get("align"),s=t.get("orient");(!o||o==="auto")&&(o=t.get("left")==="right"&&s==="vertical"?"right":"left");var l=t.get("selector",!0),u=t.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,t,n,a,l,s,u);var c=lr(t,a).refContainer,f=t.getBoxLayoutParams(),d=t.get("padding"),h=Dt(f,c,d),v=this.layoutInner(t,o,h,i,l,u),y=Dt(De({width:v.width,height:v.height},f),c,d);this.group.x=y.x-v.x,this.group.y=y.y-v.y,this.group.markRedraw(),this.group.add(this._backgroundEl=l6(v,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,n,a,i,o,s,l){var u=this.getContentGroup(),c=we(),f=n.get("selectedMode"),d=n.get("triggerEvent"),h=[];a.eachRawSeries(function(v){!v.get("legendHoverLink")&&h.push(v.id)}),Ew(n.getData(),function(v,y){var m=this,x=v.get("name");if(!this.newlineDisabled&&(x===""||x===`
|
|
60
|
+
`)){var _=new _g;_.newline=!0,u.add(_);return}var T=a.getSeriesByName(x)[0];if(!c.get(x))if(T){var C=T.getData(),k=C.getVisual("legendLineStyle")||{},A=C.getVisual("legendIcon"),L=C.getVisual("style"),D=this._createItem(T,x,y,v,n,t,k,L,A,f,i);D.on("click",zu(Xz,x,null,i,h)).on("mouseover",zu(zw,T.name,null,i,h)).on("mouseout",zu(Ow,T.name,null,i,h)),a.ssr&&D.eachChild(function(P){var E=je(P);E.seriesIndex=T.seriesIndex,E.dataIndex=y,E.ssrType="legend"}),d&&D.eachChild(function(P){m.packEventData(P,n,T,y,x)}),c.set(x,!0)}else a.eachRawSeries(function(P){var E=this;if(!c.get(x)&&P.legendVisualProvider){var O=P.legendVisualProvider;if(!O.containName(x))return;var B=O.indexOfName(x),N=O.getItemVisual(B,"style"),W=O.getItemVisual(B,"legendIcon"),H=Hr(N.fill);H&&H[3]===0&&(H[3]=.2,N=ie(ie({},N),{fill:Kn(H,"rgba")}));var $=this._createItem(P,x,y,v,n,t,{},N,W,f,i);$.on("click",zu(Xz,null,x,i,h)).on("mouseover",zu(zw,null,x,i,h)).on("mouseout",zu(Ow,null,x,i,h)),a.ssr&&$.eachChild(function(Z){var G=je(Z);G.seriesIndex=P.seriesIndex,G.dataIndex=y,G.ssrType="legend"}),d&&$.eachChild(function(Z){E.packEventData(Z,n,P,y,x)}),c.set(x,!0)}},this)},this),o&&this._createSelector(o,n,i,s,l)},e.prototype.packEventData=function(t,n,a,i,o){var s={componentType:"legend",componentIndex:n.componentIndex,dataIndex:i,value:o,seriesIndex:a.seriesIndex};je(t).eventData=s},e.prototype._createSelector=function(t,n,a,i,o){var s=this.getSelectorGroup();Ew(t,function(u){var c=u.type,f=new lt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){a.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});s.add(f);var d=n.getModel("selectorLabel"),h=n.getModel(["emphasis","selectorLabel"]);vr(f,{normal:d,emphasis:h},{defaultText:u.title}),Yo(f)})},e.prototype._createItem=function(t,n,a,i,o,s,l,u,c,f,d){var h=t.visualDrawType,v=o.get("itemWidth"),y=o.get("itemHeight"),m=o.isSelected(n),x=i.get("symbolRotate"),_=i.get("symbolKeepAspect"),T=i.get("icon");c=T||c||"roundRect";var C=Rce(c,i,l,u,h,m,d),k=new _g,A=i.getModel("textStyle");if(Me(t.getLegendIcon)&&(!T||T==="inherit"))k.add(t.getLegendIcon({itemWidth:v,itemHeight:y,icon:c,iconRotate:x,itemStyle:C.itemStyle,lineStyle:C.lineStyle,symbolKeepAspect:_}));else{var L=T==="inherit"&&t.getData().getVisual("symbol")?x==="inherit"?t.getData().getVisual("symbolRotate"):x:0;k.add(Ece({itemWidth:v,itemHeight:y,icon:c,iconRotate:L,itemStyle:C.itemStyle,symbolKeepAspect:_}))}var D=s==="left"?v+5:-5,P=s,E=o.get("formatter"),O=n;pe(E)&&E?O=E.replace("{name}",n??""):Me(E)&&(O=E(n));var B=m?A.getTextColor():i.get("inactiveColor");k.add(new lt({style:wt(A,{text:O,x:D,y:y/2,fill:B,align:P,verticalAlign:"middle"},{inheritColor:B})}));var N=new Qe({shape:k.getBoundingRect(),style:{fill:"transparent"}}),W=i.getModel("tooltip");return W.get("show")&&no({el:N,componentModel:o,itemName:n,itemTooltipOption:W.option}),k.add(N),k.eachChild(function(H){H.silent=!0}),N.silent=!f,this.getContentGroup().add(k),Yo(k),k.__legendDataIndex=a,k},e.prototype.layoutInner=function(t,n,a,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();ml(t.get("orient"),l,t.get("itemGap"),a.width,a.height);var c=l.getBoundingRect(),f=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){ml("horizontal",u,t.get("selectorItemGap",!0));var d=u.getBoundingRect(),h=[-d.x,-d.y],v=t.get("selectorButtonGap",!0),y=t.getOrient().index,m=y===0?"width":"height",x=y===0?"height":"width",_=y===0?"y":"x";s==="end"?h[y]+=c[m]+v:f[y]+=d[m]+v,h[1-y]+=c[x]/2-d[x]/2,u.x=h[0],u.y=h[1],l.x=f[0],l.y=f[1];var T={x:0,y:0};return T[m]=c[m]+v+d[m],T[x]=Math.max(c[x],d[x]),T[_]=Math.min(0,d[_]+h[1-y]),T}else return l.x=f[0],l.y=f[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e})(Ct);function Rce(r,e,t,n,a,i,o){function s(m,x){m.lineWidth==="auto"&&(m.lineWidth=x.lineWidth>0?2:0),Ew(m,function(_,T){m[T]==="inherit"&&(m[T]=x[T])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),c=r.lastIndexOf("empty",0)===0?"fill":"stroke",f=l.getShallow("decal");u.decal=!f||f==="inherit"?n.decal:vc(f,o),u.fill==="inherit"&&(u.fill=n[a]),u.stroke==="inherit"&&(u.stroke=n[c]),u.opacity==="inherit"&&(u.opacity=(a==="fill"?n:t).opacity),s(u,n);var d=e.getModel("lineStyle"),h=d.getLineStyle();if(s(h,t),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),h.stroke==="auto"&&(h.stroke=n.fill),!i){var v=e.get("inactiveBorderWidth"),y=u[c];u.lineWidth=v==="auto"?n.lineWidth>0&&y?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),h.stroke=d.get("inactiveColor"),h.lineWidth=d.get("inactiveWidth")}return{itemStyle:u,lineStyle:h}}function Ece(r){var e=r.icon||"roundRect",t=Kt(e,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return t.setStyle(r.itemStyle),t.rotation=(r.iconRotate||0)*Math.PI/180,t.setOrigin([r.itemWidth/2,r.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill=ee.color.neutral00,t.style.lineWidth=2),t}function Xz(r,e,t,n){Ow(r,e,t,n),t.dispatchAction({type:"legendToggleSelect",name:r??e}),zw(r,e,t,n)}function b6(r){for(var e=r.getZr().storage.getDisplayList(),t,n=0,a=e.length;n<a&&!(t=e[n].states.emphasis);)n++;return t&&t.hoverLayer}function zw(r,e,t,n){b6(t)||t.dispatchAction({type:"highlight",seriesName:r,name:e,excludeSeriesId:n})}function Ow(r,e,t,n){b6(t)||t.dispatchAction({type:"downplay",seriesName:r,name:e,excludeSeriesId:n})}function zce(r){var e=r.findComponents({mainType:"legend"});e&&e.length&&r.filterSeries(function(t){for(var n=0;n<e.length;n++)if(!e[n].isSelected(t.name))return!1;return!0})}function ud(r,e,t){var n=r==="allSelect"||r==="inverseSelect",a={},i=[];t.eachComponent({mainType:"legend",query:e},function(s){n?s[r]():s[r](e.name),Zz(s,a),i.push(s.componentIndex)});var o={};return t.eachComponent("legend",function(s){z(a,function(l,u){s[l?"select":"unSelect"](u)}),Zz(s,o)}),n?{selected:o,legendIndex:i}:{name:e.name,selected:o}}function Zz(r,e){var t=e||{};return z(r.getData(),function(n){var a=n.get("name");if(!(a===`
|
|
61
|
+
`||a==="")){var i=r.isSelected(a);Se(t,a)?t[a]=t[a]&&i:t[a]=i}}),t}function Oce(r){r.registerAction("legendToggleSelect","legendselectchanged",$e(ud,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",$e(ud,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",$e(ud,"inverseSelect")),r.registerAction("legendSelect","legendselected",$e(ud,"select")),r.registerAction("legendUnSelect","legendunselected",$e(ud,"unSelect"))}function _6(r){r.registerComponentModel(Rw),r.registerComponentView(S6),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,zce),r.registerSubTypeDefaulter("legend",function(){return"plain"}),Oce(r)}var Nce=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.setScrollDataIndex=function(t){this.option.scrollDataIndex=t},e.prototype.init=function(t,n,a){var i=Nl(t);r.prototype.init.call(this,t,n,a),Kz(this,t,i)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),Kz(this,this.option,t)},e.type="legend.scroll",e.defaultOption=us(Rw.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:ee.color.accent50,pageIconInactiveColor:ee.color.accent10,pageIconSize:15,pageTextStyle:{color:ee.color.tertiary},animationDurationUpdate:800}),e})(Rw);function Kz(r,e,t){var n=r.getOrient(),a=[1,1];a[n.index]=0,oi(e,t,{type:"box",ignoreSize:!!a})}var qz=Le,fb=["width","height"],db=["x","y"],jce=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!0,t._currentIndex=0,t}return e.prototype.init=function(){r.prototype.init.call(this),this.group.add(this._containerGroup=new qz),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new qz)},e.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},e.prototype.renderInner=function(t,n,a,i,o,s,l){var u=this;r.prototype.renderInner.call(this,t,n,a,i,o,s,l);var c=this._controllerGroup,f=n.get("pageIconSize",!0),d=le(f)?f:[f,f];v("pagePrev",0);var h=n.getModel("pageTextStyle");c.add(new lt({name:"pageText",style:{text:"xx/xx",fill:h.getTextColor(),font:h.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),v("pageNext",1);function v(y,m){var x=y+"DataIndex",_=Ec(n.get("pageIcons",!0)[n.getOrient().name][m],{onclick:ye(u._pageGo,u,x,n,i)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});_.name=y,c.add(_)}},e.prototype.layoutInner=function(t,n,a,i,o,s){var l=this.getSelectorGroup(),u=t.getOrient().index,c=fb[u],f=db[u],d=fb[1-u],h=db[1-u];o&&ml("horizontal",l,t.get("selectorItemGap",!0));var v=t.get("selectorButtonGap",!0),y=l.getBoundingRect(),m=[-y.x,-y.y],x=Ae(a);o&&(x[c]=a[c]-y[c]-v);var _=this._layoutContentAndController(t,i,x,u,c,d,h,f);if(o){if(s==="end")m[u]+=_[c]+v;else{var T=y[c]+v;m[u]-=T,_[f]-=T}_[c]+=y[c]+v,m[1-u]+=_[h]+_[d]/2-y[d]/2,_[d]=Math.max(_[d],y[d]),_[h]=Math.min(_[h],y[h]+m[1-u]),l.x=m[0],l.y=m[1],l.markRedraw()}return _},e.prototype._layoutContentAndController=function(t,n,a,i,o,s,l,u){var c=this.getContentGroup(),f=this._containerGroup,d=this._controllerGroup;ml(t.get("orient"),c,t.get("itemGap"),i?a.width:null,i?null:a.height),ml("horizontal",d,t.get("pageButtonItemGap",!0));var h=c.getBoundingRect(),v=d.getBoundingRect(),y=this._showController=h[o]>a[o],m=[-h.x,-h.y];n||(m[i]=c[u]);var x=[0,0],_=[-v.x,-v.y],T=Ce(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(y){var C=t.get("pageButtonPosition",!0);C==="end"?_[i]+=a[o]-v[o]:x[i]+=v[o]+T}_[1-i]+=h[s]/2-v[s]/2,c.setPosition(m),f.setPosition(x),d.setPosition(_);var k={x:0,y:0};if(k[o]=y?a[o]:h[o],k[s]=Math.max(h[s],v[s]),k[l]=Math.min(0,v[l]+_[1-i]),f.__rectSize=a[o],y){var A={x:0,y:0};A[o]=Math.max(a[o]-v[o]-T,0),A[s]=k[s],f.setClipPath(new Qe({shape:A})),f.__rectSize=A[o]}else d.eachChild(function(D){D.attr({invisible:!0,silent:!0})});var L=this._getPageInfo(t);return L.pageIndex!=null&&ct(c,{x:L.contentPosition[0],y:L.contentPosition[1]},y?t:null),this._updatePageInfoView(t,L),k},e.prototype._pageGo=function(t,n,a){var i=this._getPageInfo(n)[t];i!=null&&a.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:n.id})},e.prototype._updatePageInfoView=function(t,n){var a=this._controllerGroup;z(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",d=n[f]!=null,h=a.childOfName(c);h&&(h.setStyle("fill",d?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),h.cursor=d?"pointer":"default")});var i=a.childOfName("pageText"),o=t.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;i&&o&&i.setStyle("text",pe(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(t){var n=t.get("scrollDataIndex",!0),a=this.getContentGroup(),i=this._containerGroup.__rectSize,o=t.getOrient().index,s=fb[o],l=db[o],u=this._findTargetItemIndex(n),c=a.children(),f=c[u],d=c.length,h=d?1:0,v={contentPosition:[a.x,a.y],pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return v;var y=C(f);v.contentPosition[o]=-y.s;for(var m=u+1,x=y,_=y,T=null;m<=d;++m)T=C(c[m]),(!T&&_.e>x.s+i||T&&!k(T,x.s))&&(_.i>x.i?x=_:x=T,x&&(v.pageNextDataIndex==null&&(v.pageNextDataIndex=x.i),++v.pageCount)),_=T;for(var m=u-1,x=y,_=y,T=null;m>=-1;--m)T=C(c[m]),(!T||!k(_,T.s))&&x.i<_.i&&(_=x,v.pagePrevDataIndex==null&&(v.pagePrevDataIndex=x.i),++v.pageCount,++v.pageIndex),x=T;return v;function C(A){if(A){var L=A.getBoundingRect(),D=L[l]+A[l];return{s:D,e:D+L[s],i:A.__legendDataIndex}}}function k(A,L){return A.e>=L&&A.s<=L+i}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var n,a=this.getContentGroup(),i;return a.eachChild(function(o,s){var l=o.__legendDataIndex;i==null&&l!=null&&(i=s),l===t&&(n=s)}),n??i},e.type="legend.scroll",e})(S6);function Bce(r){r.registerAction("legendScroll","legendscroll",function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(a){a.setScrollDataIndex(n)})})}function Fce(r){Ze(_6),r.registerComponentModel(Nce),r.registerComponentView(jce),Bce(r)}function Vce(r){Ze(_6),Ze(Fce)}var Gce=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=us(wh.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e})(wh),I2=et();function Wce(r,e,t){I2(r).coordSysRecordMap.each(function(n){var a=n.dataZoomInfoMap.get(e.uid);a&&(a.getRange=t)})}function $ce(r,e){for(var t=I2(r).coordSysRecordMap,n=t.keys(),a=0;a<n.length;a++){var i=n[a],o=t.get(i),s=o.dataZoomInfoMap;if(s){var l=e.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||w6(t,o))}}}function w6(r,e){if(e){r.removeKey(e.model.uid);var t=e.controller;t&&t.dispose()}}function Hce(r,e){var t={model:e,containsPoint:$e(Yce,e),dispatchAction:$e(Uce,r),dataZoomInfoMap:null,controller:null},n=t.controller=new Vl(r.getZr());return z(["pan","zoom","scrollMove"],function(a){n.on(a,function(i){var o=[];t.dataZoomInfoMap.each(function(s){if(i.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[a],u=l&&l(s.dzReferCoordSysInfo,t.model.mainType,t.controller,i);!s.model.get("disabled",!0)&&u&&o.push({dataZoomId:s.model.id,start:u[0],end:u[1]})}}),o.length&&t.dispatchAction(o)})}),t}function Uce(r,e){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function Yce(r,e,t,n){return r.coordinateSystem.containPoint([t,n])}function Xce(r,e,t){var n,a="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;return r.each(function(s){var l=s.model,u=l.get("disabled",!0)?!1:l.get("zoomLock",!0)?"move":!0;i[a+u]>i[a+n]&&(n=u),o=o&&l.get("preventDefaultMouseMove",!0)}),{controlType:n,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:t,zInfo:{component:e.model},triggerInfo:{roamTrigger:null,isInSelf:e.containsPoint}}}}function Zce(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var n=I2(t),a=n.coordSysRecordMap||(n.coordSysRecordMap=we());a.each(function(i){i.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=i6(i);z(o.infoList,function(s){var l=s.model.uid,u=a.get(l)||a.set(l,Hce(t,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=we());c.set(i.uid,{dzReferCoordSysInfo:s,model:i,getRange:null})})}),a.each(function(i){var o=i.controller,s,l=i.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){w6(a,i);return}var c=Xce(l,i,t);o.enable(c.controlType,c.opt),Fc(i,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var Kce=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,n,a){if(r.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),Wce(a,t,{pan:ye(hb.pan,this),zoom:ye(hb.zoom,this),scrollMove:ye(hb.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){$ce(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e})(_2),hb={zoom:function(r,e,t,n){var a=this.range,i=a.slice(),o=r.axisModels[0];if(o){var s=pb[e](null,[n.originX,n.originY],o,t,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(i[1]-i[0])+i[0],u=Math.max(1/n.scale,0);i[0]=(i[0]-l)*u+l,i[1]=(i[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(rs(0,i,[0,100],0,c.minSpan,c.maxSpan),this.range=i,a[0]!==i[0]||a[1]!==i[1])return i}},pan:Qz(function(r,e,t,n,a,i){var o=pb[n]([i.oldX,i.oldY],[i.newX,i.newY],e,a,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:Qz(function(r,e,t,n,a,i){var o=pb[n]([0,0],[i.scrollDelta,i.scrollDelta],e,a,t);return o.signal*(r[1]-r[0])*i.scrollDelta})};function Qz(r){return function(e,t,n,a){var i=this.range,o=i.slice(),s=e.axisModels[0];if(s){var l=r(o,s,e,t,n,a);if(rs(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var pb={grid:function(r,e,t,n,a){var i=t.axis,o={},s=a.model.coordinateSystem.getRect();return r=r||[0,0],i.dim==="x"?(o.pixel=e[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=i.inverse?-1:1),o},polar:function(r,e,t,n,a){var i=t.axis,o={},s=a.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=i.inverse?-1:1),o},singleAxis:function(r,e,t,n,a){var i=t.axis,o=a.model.coordinateSystem.getRect(),s={};return r=r||[0,0],i.orient==="horizontal"?(s.pixel=e[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=i.inverse?1:-1):(s.pixel=e[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=i.inverse?-1:1),s}};function T6(r){w2(r),r.registerComponentModel(Gce),r.registerComponentView(Kce),Zce(r)}var qce=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=us(wh.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:ee.color.accent10,borderRadius:0,backgroundColor:ee.color.transparent,dataBackground:{lineStyle:{color:ee.color.accent30,width:.5},areaStyle:{color:ee.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:ee.color.accent40,width:.5},areaStyle:{color:ee.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:ee.color.neutral00,borderColor:ee.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:ee.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:ee.color.tertiary},brushSelect:!0,brushStyle:{color:ee.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:ee.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),e})(wh),cd=Qe,Qce=1,vb=30,Jce=7,fd="horizontal",Jz="vertical",efe=5,tfe=["line","bar","candlestick","scatter"],rfe={easing:"cubicOut",duration:100,delay:0},nfe=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,n){this.api=n,this._onBrush=ye(this._onBrush,this),this._onBrushEnd=ye(this._onBrushEnd,this)},e.prototype.render=function(t,n,a,i){if(r.prototype.render.apply(this,arguments),Fc(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),t.get("show")===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!=="dataZoom"||i.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){lh(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new Le;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(n),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,n=this.api,a=t.get("brushSelect"),i=a?Jce:0,o=lr(t,n).refContainer,s=this._findCoordRect(),l=t.get("defaultLocationEdgeGap",!0)||0,u=this._orient===fd?{right:o.width-s.x-s.width,top:o.height-vb-l-i,width:s.width,height:vb}:{right:l,top:s.y,width:vb,height:s.height},c=Nl(t.option);z(["right","top","width","height"],function(d){c[d]==="ph"&&(c[d]=u[d])});var f=Dt(c,o);this._location={x:f.x,y:f.y},this._size=[f.width,f.height],this._orient===Jz&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,n=this._location,a=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(a===fd&&!o?{scaleY:l?1:-1,scaleX:1}:a===fd&&o?{scaleY:l?1:-1,scaleX:-1}:a===Jz&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=t.getBoundingRect([s]);t.x=n.x-u.x,t.y=n.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,n=this._size,a=this._displayables.sliderGroup,i=t.get("brushSelect");a.add(new cd({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new cd({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:ye(this._onClickPanel,this)}),s=this.api.getZr();i?(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)),a.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var n=this._size,a=this._shadowSize||[],i=t.series,o=i.getRawData(),s=i.getShadowDim&&i.getShadowDim(),l=s&&o.getDimensionInfo(s)?i.getShadowDim():t.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==a[0]||n[1]!==a[1]){var f=o.getDataExtent(t.thisDim),d=o.getDataExtent(l),h=(d[1]-d[0])*.3;d=[d[0]-h,d[1]+h];var v=[0,n[1]],y=[0,n[0]],m=[[n[0],0],[0,0]],x=[],_=y[1]/Math.max(1,o.count()-1),T=n[0]/(f[1]-f[0]),C=t.thisAxis.type==="time",k=-_,A=Math.round(o.count()/n[0]),L;o.each([t.thisDim,l],function(B,N,W){if(A>0&&W%A){C||(k+=_);return}k=C?(+B-f[0])*T:k+_;var H=N==null||isNaN(N)||N==="",$=H?0:vt(N,d,v,!0);H&&!L&&W?(m.push([m[m.length-1][0],0]),x.push([x[x.length-1][0],0])):!H&&L&&(m.push([k,0]),x.push([k,0])),H||(m.push([k,$]),x.push([k,$])),L=H}),u=this._shadowPolygonPts=m,c=this._shadowPolylinePts=x}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var D=this.dataZoomModel;function P(B){var N=D.getModel(B?"selectedDataBackground":"dataBackground"),W=new Le,H=new zr({shape:{points:u},segmentIgnoreThreshold:1,style:N.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),$=new Cr({shape:{points:c},segmentIgnoreThreshold:1,style:N.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return W.add(H),W.add($),W}for(var E=0;E<3;E++){var O=P(E===1);this._displayables.sliderGroup.add(O),this._displayables.dataShadowSegs.push(O)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,n=t.get("showDataShadow");if(n!==!1){var a,i=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();z(l,function(u){if(!a&&!(n!==!0&&Ue(tfe,u.get("type"))<0)){var c=i.getComponent(Wo(o),s).axis,f=afe(o),d,h=u.coordinateSystem;f!=null&&h.getOtherAxis&&(d=h.getOtherAxis(c).inverse),f=u.getData().mapDimension(f);var v=u.getData().mapDimension(o);a={thisAxis:c,series:u,thisDim:v,otherDim:f,otherAxisInverse:d}}},this)},this),a}},e.prototype._renderHandle=function(){var t=this.group,n=this._displayables,a=n.handles=[null,null],i=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"),d=n.filler=new cd({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(d),o.add(new cd({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:Qce,fill:ee.color.transparent}})),z([0,1],function(T){var C=l.get("handleIcon");!gy[C]&&C.indexOf("path://")<0&&C.indexOf("image://")<0&&(C="path://"+C);var k=Kt(C,-1,0,2,2,null,!0);k.attr({cursor:ife(this._orient),draggable:!0,drift:ye(this._onDragMove,this,T),ondragend:ye(this._onDragEnd,this),onmouseover:ye(this._showDataInfo,this,!0),onmouseout:ye(this._showDataInfo,this,!1),z2:5});var A=k.getBoundingRect(),L=l.get("handleSize");this._handleHeight=he(L,this._size[1]),this._handleWidth=A.width/A.height*this._handleHeight,k.setStyle(l.getModel("handleStyle").getItemStyle()),k.style.strokeNoScale=!0,k.rectHover=!0,k.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),Yo(k);var D=l.get("handleColor");D!=null&&(k.style.fill=D),o.add(a[T]=k);var P=l.getModel("textStyle"),E=l.get("handleLabel")||{},O=E.show||!1;t.add(i[T]=new lt({silent:!0,invisible:!O,style:wt(P,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:P.getTextColor(),font:P.getFont()}),z2:10}))},this);var h=d;if(f){var v=he(l.get("moveHandleSize"),s[1]),y=n.moveHandle=new Qe({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:v}}),m=v*.8,x=n.moveHandleIcon=Kt(l.get("moveHandleIcon"),-m/2,-m/2,m,m,ee.color.neutral00,!0);x.silent=!0,x.y=s[1]+v/2-.5,y.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var _=Math.min(s[1]/2,Math.max(v,10));h=n.moveZone=new Qe({invisible:!0,shape:{y:s[1]-_,height:v+_}}),h.on("mouseover",function(){u.enterEmphasis(y)}).on("mouseout",function(){u.leaveEmphasis(y)}),o.add(y),o.add(x),o.add(h)}h.attr({draggable:!0,cursor:"default",drift:ye(this._onDragMove,this,"all"),ondragstart:ye(this._showDataInfo,this,!0),ondragend:ye(this._onDragEnd,this),onmouseover:ye(this._showDataInfo,this,!0),onmouseout:ye(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[vt(t[0],[0,100],n,!0),vt(t[1],[0,100],n,!0)]},e.prototype._updateInterval=function(t,n){var a=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),s=a.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];rs(n,i,o,a.get("zoomLock")?"all":t,s.minSpan!=null?vt(s.minSpan,l,o,!0):null,s.maxSpan!=null?vt(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=kn([vt(i[0],o,l,!0),vt(i[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},e.prototype._updateView=function(t){var n=this._displayables,a=this._handleEnds,i=kn(a.slice()),o=this._size;z([0,1],function(h){var v=n.handles[h],y=this._handleHeight;v.attr({scaleX:y/2,scaleY:y/2,x:a[h]+(h?-1:1),y:o[1]/2-y/2})},this),n.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var s={x:i[0],width:i[1]-i[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,i[0],i[1],o[0]],c=0;c<l.length;c++){var f=l[c],d=f.getClipPath();d||(d=new Qe,f.setClipPath(d)),d.setShape({x:u[c],y:0,width:u[c+1]-u[c],height:o[1]})}this._updateDataInfo(t)},e.prototype._updateDataInfo=function(t){var n=this.dataZoomModel,a=this._displayables,i=a.handleLabels,o=this._orient,s=["",""];if(n.get("showDetail")){var l=n.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,c=this._range,f=t?l.calculateDataWindow({start:c[0],end:c[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(f[0],u),this._formatLabel(f[1],u)]}}var d=kn(this._handleEnds.slice());h.call(this,0),h.call(this,1);function h(v){var y=Xo(a.handles[v].parent,this.group),m=km(v===0?"right":"left",y),x=this._handleWidth/2+efe,_=_a([d[v]+(v===0?-x:x),this._size[1]/2],y);i[v].setStyle({x:_[0],y:_[1],verticalAlign:o===fd?"middle":m,align:o===fd?m:"center",text:s[v]})}},e.prototype._formatLabel=function(t,n){var a=this.dataZoomModel,i=a.get("labelFormatter"),o=a.get("labelPrecision");(o==null||o==="auto")&&(o=n.getPixelPrecision());var s=t==null||isNaN(t)?"":n.type==="category"||n.type==="time"?n.scale.getLabel({value:Math.round(t)}):t.toFixed(Math.min(o,20));return Me(i)?i(t,s):pe(i)?i.replace("{value}",s):s},e.prototype._showDataInfo=function(t){var n=this.dataZoomModel.get("handleLabel")||{},a=n.show||!1,i=this.dataZoomModel.getModel(["emphasis","handleLabel"]),o=i.get("show")||!1,s=t||this._dragging?o:a,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)},e.prototype._onDragMove=function(t,n,a,i){this._dragging=!0,Yi(i.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=_a([n,a],o,!0),l=this._updateInterval(t,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},e.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var t=this.dataZoomModel.get("realtime");!t&&this._dispatchZoomAction(!1)},e.prototype._onClickPanel=function(t){var n=this._size,a=this._displayables.sliderGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(a[0]<0||a[0]>n[0]||a[1]<0||a[1]>n[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,s=this._updateInterval("all",a[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var n=t.offsetX,a=t.offsetY;this._brushStart=new Ee(n,a),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var a=n.shape,i=+new Date;if(!(i-this._brushStartTime<200&&Math.abs(a.width)<5)){var o=this._getViewExtent(),s=[0,100],l=this._handleEnds=[a.x,a.x+a.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();rs(0,l,o,0,u.minSpan!=null?vt(u.minSpan,s,o,!0):null,u.maxSpan!=null?vt(u.maxSpan,s,o,!0):null),this._range=kn([vt(l[0],o,s,!0),vt(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(Yi(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,n){var a=this._displayables,i=this.dataZoomModel,o=a.brushRect;o||(o=a.brushRect=new cd({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),a.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,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]})},e.prototype._dispatchZoomAction=function(t){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?rfe:null,start:n[0],end:n[1]})},e.prototype._findCoordRect=function(){var t,n=i6(this.dataZoomModel).infoList;if(!t&&n.length){var a=n[0].model.coordinateSystem;t=a.getRect&&a.getRect()}if(!t){var i=this.api.getWidth(),o=this.api.getHeight();t={x:i*.2,y:o*.2,width:i*.6,height:o*.6}}return t},e.type="dataZoom.slider",e})(_2);function afe(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function ife(r){return r==="vertical"?"ns-resize":"ew-resize"}function C6(r){r.registerComponentModel(qce),r.registerComponentView(nfe),w2(r)}function ofe(r){Ze(T6),Ze(C6)}var M6={get:function(r,e,t){var n=Ae((sfe[r]||{})[e]);return t&&le(n)?n[n.length-1]:n}},sfe={color:{active:["#006edd","#e0ffff"],inactive:[ee.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]}},eO=pr.mapVisual,lfe=pr.eachVisual,ufe=le,tO=z,cfe=kn,ffe=vt,qy=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a)},e.prototype.optionUpdated=function(t,n){var a=this.option;!n&&v6(a,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var n=this.stateList;t=ye(t,this),this.controllerVisuals=Iw(this.option.controller,n,t),this.targetVisuals=Iw(this.option.target,n,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesId,n=this.option.seriesIndex;n==null&&t==null&&(n="all");var a=Lc(this.ecModel,"series",{index:n,id:t},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return ue(a,function(i){return i.componentIndex})},e.prototype.eachTargetSeries=function(t,n){z(this.getTargetSeriesIndices(),function(a){var i=this.ecModel.getSeriesByIndex(a);i&&t.call(n,i)},this)},e.prototype.isTargetSeries=function(t){var n=!1;return this.eachTargetSeries(function(a){a===t&&(n=!0)}),n},e.prototype.formatValueText=function(t,n,a){var i=this.option,o=i.precision,s=this.dataBound,l=i.formatter,u;a=a||["<",">"],le(t)&&(t=t.slice(),u=!0);var c=n?t:u?[f(t[0]),f(t[1])]:f(t);if(pe(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(Me(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?a[0]+" "+c[1]:t[1]===s[1]?a[1]+" "+c[0]:c[0]+" - "+c[1];return c;function f(d){return d===s[0]?"min":d===s[1]?"max":(+d).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,n=cfe([t.min,t.max]);this._dataExtent=n},e.prototype.getDataDimensionIndex=function(t){var n=this.option.dimension;if(n!=null)return t.getDimensionIndex(n);for(var a=t.dimensions,i=a.length-1;i>=0;i--){var o=a[i],s=t.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,n=this.option,a={inRange:n.inRange,outOfRange:n.outOfRange},i=n.target||(n.target={}),o=n.controller||(n.controller={});Ye(i,a),Ye(o,a);var s=this.isCategory();l.call(this,i),l.call(this,o),u.call(this,i,"inRange","outOfRange"),c.call(this,o);function l(f){ufe(n.color)&&!f.inRange&&(f.inRange={color:n.color.slice().reverse()}),f.inRange=f.inRange||{color:t.get("gradientColor")}}function u(f,d,h){var v=f[d],y=f[h];v&&!y&&(y=f[h]={},tO(v,function(m,x){if(pr.isValidType(x)){var _=M6.get(x,"inactive",s);_!=null&&(y[x]=_,x==="color"&&!y.hasOwnProperty("opacity")&&!y.hasOwnProperty("colorAlpha")&&(y.opacity=[0,0]))}}))}function c(f){var d=(f.inRange||{}).symbol||(f.outOfRange||{}).symbol,h=(f.inRange||{}).symbolSize||(f.outOfRange||{}).symbolSize,v=this.get("inactiveColor"),y=this.getItemSymbol(),m=y||"roundRect";tO(this.stateList,function(x){var _=this.itemSize,T=f[x];T||(T=f[x]={color:s?v:[v]}),T.symbol==null&&(T.symbol=d&&Ae(d)||(s?m:[m])),T.symbolSize==null&&(T.symbolSize=h&&Ae(h)||(s?_[0]:[_[0],_[0]])),T.symbol=eO(T.symbol,function(A){return A==="none"?m:A});var C=T.symbolSize;if(C!=null){var k=-1/0;lfe(C,function(A){A>k&&(k=A)}),T.symbolSize=eO(C,function(A){return ffe(A,[0,k],[0,_[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.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:ee.color.transparent,borderColor:ee.color.borderTint,contentColor:ee.color.theme[0],inactiveColor:ee.color.disabled,borderWidth:0,padding:ee.size.m,textGap:10,precision:0,textStyle:{color:ee.color.secondary}},e})(Je),rO=[20,140],dfe=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,n){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(a){a.mappingMethod="linear",a.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=rO[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=rO[1])},e.prototype._resetRange=function(){var t=this.getExtent(),n=this.option.range;!n||n.auto?(t.auto=1,this.option.range=t):le(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],t[0]),n[1]=Math.min(n[1],t[1]))},e.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),z(this.stateList,function(t){var n=this.option.controller[t].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),n=kn((this.get("range")||[]).slice());return n[0]>t[1]&&(n[0]=t[1]),n[1]>t[1]&&(n[1]=t[1]),n[0]<t[0]&&(n[0]=t[0]),n[1]<t[0]&&(n[1]=t[0]),n},e.prototype.getValueState=function(t){var n=this.option.range,a=this.getExtent(),i=Ce(this.option.unboundedRange,!0);return(i&&n[0]<=a[0]||n[0]<=t)&&(i&&n[1]>=a[1]||t<=n[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var n=[];return this.eachTargetSeries(function(a){var i=[],o=a.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&i.push(l)},this),n.push({seriesId:a.id,dataIndex:i})},this),n},e.prototype.getVisualMeta=function(t){var n=nO(this,"outOfRange",this.getExtent()),a=nO(this,"inRange",this.option.range.slice()),i=[];function o(h,v){i.push({value:h,color:t(h,v)})}for(var s=0,l=0,u=a.length,c=n.length;l<c&&(!a.length||n[l]<=a[0]);l++)n[l]<a[s]&&o(n[l],"outOfRange");for(var f=1;s<u;s++,f=0)f&&i.length&&o(a[s],"outOfRange"),o(a[s],"inRange");for(var f=1;l<c;l++)(!a.length||a[a.length-1]<n[l])&&(f&&(i.length&&o(i[i.length-1].value,"outOfRange"),f=0),o(n[l],"outOfRange"));var d=i.length;return{stops:i,outerColors:[d?i[0].color:"transparent",d?i[d-1].color:"transparent"]}},e.type="visualMap.continuous",e.defaultOption=us(qy.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:ee.color.neutral00,borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:ee.color.neutral00,borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:ee.color.shadow}}),e})(qy);function nO(r,e,t){if(t[0]===t[1])return t.slice();for(var n=200,a=(t[1]-t[0])/n,i=t[0],o=[],s=0;s<=n&&i<t[1];s++)o.push(i),i+=a;return o.push(t[1]),o}var k6=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.autoPositionValues={left:1,right:1,top:1,bottom:1},t}return e.prototype.init=function(t,n){this.ecModel=t,this.api=n},e.prototype.render=function(t,n,a,i){if(this.visualMapModel=t,t.get("show")===!1){this.group.removeAll();return}this.doRender(t,n,a,i)},e.prototype.renderBackground=function(t){var n=this.visualMapModel,a=Nc(n.get("padding")||0),i=t.getBoundingRect();t.add(new Qe({z2:-1,silent:!0,shape:{x:i.x-a[3],y:i.y-a[0],width:i.width+a[3]+a[1],height:i.height+a[0]+a[2]},style:{fill:n.get("backgroundColor"),stroke:n.get("borderColor"),lineWidth:n.get("borderWidth")}}))},e.prototype.getControllerVisual=function(t,n,a){a=a||{};var i=a.forceState,o=this.visualMapModel,s={};if(n==="color"){var l=o.get("contentColor");s.color=l}function u(h){return s[h]}function c(h,v){s[h]=v}var f=o.controllerVisuals[i||o.getValueState(t)],d=pr.prepareVisualTypes(f);return z(d,function(h){var v=f[h];a.convertOpacityToAlpha&&h==="opacity"&&(h="colorAlpha",v=f.__alphaForOpacity),pr.dependsOn(h,n)&&v&&v.applyVisual(t,u,c)}),s[n]},e.prototype.positionGroup=function(t){var n=this.visualMapModel,a=this.api,i=lr(n,a).refContainer;Im(t,n.getBoxLayoutParams(),i)},e.prototype.doRender=function(t,n,a,i){},e.type="visualMap",e})(Ct),aO=[["left","right","width"],["top","bottom","height"]];function A6(r,e,t){var n=r.option,a=n.align;if(a!=null&&a!=="auto")return a;for(var i={width:e.getWidth(),height:e.getHeight()},o=n.orient==="horizontal"?1:0,s=aO[o],l=[0,null,10],u={},c=0;c<3;c++)u[aO[1-o][c]]=l[c],u[s[c]]=c===2?t[0]:n[s[c]];var f=[["x","width",3],["y","height",0]][o],d=Dt(u,i,n.padding);return s[(d.margin[f[2]]||0)+d[f[0]]+d[f[1]]*.5<i[f[1]]*.5?0:1]}function Wg(r,e){return z(r||[],function(t){t.dataIndex!=null&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),r}var Ga=vt,hfe=z,iO=Math.min,gb=Math.max,pfe=12,vfe=6,gfe=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._shapes={},t._dataInterval=[],t._handleEnds=[],t._hoverLinkDataIndices=[],t}return e.prototype.init=function(t,n){r.prototype.init.call(this,t,n),this._hoverLinkFromSeriesMouseOver=ye(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=ye(this._hideIndicator,this)},e.prototype.doRender=function(t,n,a,i){(!i||i.type!=="selectDataRange"||i.from!==this.uid)&&this._buildView()},e.prototype._buildView=function(){this.group.removeAll();var t=this.visualMapModel,n=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(n);var a=t.get("text");this._renderEndsText(n,a,0),this._renderEndsText(n,a,1),this._updateView(!0),this.renderBackground(n),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(n)},e.prototype._renderEndsText=function(t,n,a){if(n){var i=n[1-a];i=i!=null?i+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,c=this._applyTransform([l[0]/2,a===0?-s:l[1]+s],u),f=this._applyTransform(a===0?"bottom":"top",u),d=this._orient,h=this.visualMapModel.textStyleModel;this.group.add(new lt({style:wt(h,{x:c[0],y:c[1],verticalAlign:h.get("verticalAlign")||(d==="horizontal"?"middle":f),align:h.get("align")||(d==="horizontal"?f:"center"),text:i})}))}},e.prototype._renderBar=function(t){var n=this.visualMapModel,a=this._shapes,i=n.itemSize,o=this._orient,s=this._useHandle,l=A6(n,this.api,i),u=a.mainGroup=this._createBarGroup(l),c=new Le;u.add(c),c.add(a.outOfRange=oO()),c.add(a.inRange=oO(null,s?lO(this._orient):null,ye(this._dragHandle,this,"all",!1),ye(this._dragHandle,this,"all",!0))),c.setClipPath(new Qe({shape:{x:0,y:0,width:i[0],height:i[1],r:3}}));var f=n.textStyleModel.getTextRect("国"),d=gb(f.width,f.height);s&&(a.handleThumbs=[],a.handleLabels=[],a.handleLabelPoints=[],this._createHandle(n,u,0,i,d,o),this._createHandle(n,u,1,i,d,o)),this._createIndicator(n,u,i,d,o),t.add(u)},e.prototype._createHandle=function(t,n,a,i,o,s){var l=ye(this._dragHandle,this,a,!1),u=ye(this._dragHandle,this,a,!0),c=Ca(t.get("handleSize"),i[0]),f=Kt(t.get("handleIcon"),-c/2,-c/2,c,c,null,!0),d=lO(this._orient);f.attr({cursor:d,draggable:!0,drift:l,ondragend:u,onmousemove:function(x){Yi(x.event)}}),f.x=i[0]/2,f.useStyle(t.getModel("handleStyle").getItemStyle()),f.setStyle({strokeNoScale:!0,strokeFirst:!0}),f.style.lineWidth*=2,f.ensureState("emphasis").style=t.getModel(["emphasis","handleStyle"]).getItemStyle(),cl(f,!0),n.add(f);var h=this.visualMapModel.textStyleModel,v=new lt({cursor:d,draggable:!0,drift:l,onmousemove:function(x){Yi(x.event)},ondragend:u,style:wt(h,{x:0,y:0,text:""})});v.ensureState("blur").style={opacity:.1},v.stateTransition={duration:200},this.group.add(v);var y=[c,0],m=this._shapes;m.handleThumbs[a]=f,m.handleLabelPoints[a]=y,m.handleLabels[a]=v},e.prototype._createIndicator=function(t,n,a,i,o){var s=Ca(t.get("indicatorSize"),a[0]),l=Kt(t.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:a[0]/2});var u=t.getModel("indicatorStyle").getItemStyle();if(l instanceof gr){var c=l.style;l.useStyle(ie({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,d=new lt({silent:!0,invisible:!0,style:wt(f,{x:0,y:0,text:""})});this.group.add(d);var h=[(o==="horizontal"?i/2:vfe)+a[0]/2,0],v=this._shapes;v.indicator=l,v.indicatorLabel=d,v.indicatorLabelPoint=h,this._firstShowIndicator=!0},e.prototype._dragHandle=function(t,n,a,i){if(this._useHandle){if(this._dragging=!n,!n){var o=this._applyTransform([a,i],this._shapes.mainGroup,!0);this._updateInterval(t,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():sO(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},e.prototype._resetInterval=function(){var t=this.visualMapModel,n=this._dataInterval=t.getSelected(),a=t.getExtent(),i=[0,t.itemSize[1]];this._handleEnds=[Ga(n[0],a,i,!0),Ga(n[1],a,i,!0)]},e.prototype._updateInterval=function(t,n){n=n||0;var a=this.visualMapModel,i=this._handleEnds,o=[0,a.itemSize[1]];rs(n,i,o,t,0);var s=a.getExtent();this._dataInterval=[Ga(i[0],o,s,!0),Ga(i[1],o,s,!0)]},e.prototype._updateView=function(t){var n=this.visualMapModel,a=n.getExtent(),i=this._shapes,o=[0,n.itemSize[1]],s=t?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,a,s,"inRange"),u=this._createBarVisual(a,a,o,"outOfRange");i.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),i.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},e.prototype._createBarVisual=function(t,n,a,i){var o={forceState:i,convertOpacityToAlpha:!0},s=this._makeColorGradient(t,o),l=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],u=this._createBarPoints(a,l);return{barColor:new zl(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},e.prototype._makeColorGradient=function(t,n){var a=100,i=[],o=(t[1]-t[0])/a;i.push({color:this.getControllerVisual(t[0],"color",n),offset:0});for(var s=1;s<a;s++){var l=t[0]+o*s;if(l>t[1])break;i.push({color:this.getControllerVisual(l,"color",n),offset:s/a})}return i.push({color:this.getControllerVisual(t[1],"color",n),offset:1}),i},e.prototype._createBarPoints=function(t,n){var a=this.visualMapModel.itemSize;return[[a[0]-n[0],t[0]],[a[0],t[0]],[a[0],t[1]],[a[0]-n[1],t[1]]]},e.prototype._createBarGroup=function(t){var n=this._orient,a=this.visualMapModel.get("inverse");return new Le(n==="horizontal"&&!a?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&a?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!a?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,n){if(this._useHandle){var a=this._shapes,i=this.visualMapModel,o=a.handleThumbs,s=a.handleLabels,l=i.itemSize,u=i.getExtent(),c=this._applyTransform("left",a.mainGroup);hfe([0,1],function(f){var d=o[f];d.setStyle("fill",n.handlesColor[f]),d.y=t[f];var h=Ga(t[f],[0,l[1]],u,!0),v=this.getControllerVisual(h,"symbolSize");d.scaleX=d.scaleY=v/l[0],d.x=l[0]-v/2;var y=_a(a.handleLabelPoints[f],Xo(d,this.group));if(this._orient==="horizontal"){var m=c==="left"||c==="top"?(l[0]-v)/2:(l[0]-v)/-2;y[1]+=m}s[f].setStyle({x:y[0],y:y[1],text:i.formatValueText(this._dataInterval[f]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",a.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,n,a,i){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 d={convertOpacityToAlpha:!0},h=this.getControllerVisual(t,"color",d),v=this.getControllerVisual(t,"symbolSize"),y=Ga(t,s,u,!0),m=l[0]-v/2,x={x:f.x,y:f.y};f.y=y,f.x=m;var _=_a(c.indicatorLabelPoint,Xo(f,this.group)),T=c.indicatorLabel;T.attr("invisible",!1);var C=this._applyTransform("left",c.mainGroup),k=this._orient,A=k==="horizontal";T.setStyle({text:(a||"")+o.formatValueText(n),verticalAlign:A?C:"middle",align:A?"center":C});var L={x:m,y,style:{fill:h}},D={style:{x:_[0],y:_[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var P={duration:100,easing:"cubicInOut",additive:!0};f.x=x.x,f.y=x.y,f.animateTo(L,P),T.animateTo(D,P)}else f.attr(L),T.attr(D);this._firstShowIndicator=!1;var E=this._shapes.handleLabels;if(E)for(var O=0;O<E.length;O++)this.api.enterBlur(E[O])}},e.prototype._enableHoverLinkToSeries=function(){var t=this;this._shapes.mainGroup.on("mousemove",function(n){if(t._hovering=!0,!t._dragging){var a=t.visualMapModel.itemSize,i=t._applyTransform([n.offsetX,n.offsetY],t._shapes.mainGroup,!0,!0);i[1]=iO(gb(0,i[1]),a[1]),t._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=a[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},e.prototype._enableHoverLinkFromSeries=function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},e.prototype._doHoverLinkToSeries=function(t,n){var a=this.visualMapModel,i=a.itemSize;if(a.option.hoverLink){var o=[0,i[1]],s=a.getExtent();t=iO(gb(o[0],t),o[1]);var l=yfe(a,s,o),u=[t-l,t+l],c=Ga(t,o,s,!0),f=[Ga(u[0],o,s,!0),Ga(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 d=this._hoverLinkDataIndices,h=[];(n||sO(a))&&(h=this._hoverLinkDataIndices=a.findTargetDataIndices(f));var v=K7(d,h);this._dispatchHighDown("downplay",Wg(v[0],a)),this._dispatchHighDown("highlight",Wg(v[1],a))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var n;if(dl(t.target,function(l){var u=je(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var a=this.ecModel.getSeriesByIndex(n.seriesIndex),i=this.visualMapModel;if(i.isTargetSeries(a)){var o=a.getData(n.dataType),s=o.getStore().get(i.getDataDimensionIndex(o),n.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var a=0;a<n.length;a++)this.api.leaveBlur(n[a])},e.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Wg(t,this.visualMapModel)),t.length=0},e.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},e.prototype._applyTransform=function(t,n,a,i){var o=Xo(n,i?null:this.group);return le(t)?_a(t,o,a):km(t,o,a)},e.prototype._dispatchHighDown=function(t,n){n&&n.length&&this.api.dispatchAction({type:t,batch:n})},e.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.type="visualMap.continuous",e})(k6);function oO(r,e,t,n){return new zr({shape:{points:r},draggable:!!t,cursor:e,drift:t,onmousemove:function(a){Yi(a.event)},ondragend:n})}function yfe(r,e,t){var n=pfe/2,a=r.get("hoverLinkDataSize");return a&&(n=Ga(a,e,t,!0)/2),n}function sO(r){var e=r.get("hoverLinkOnHandle");return!!(e??r.get("realtime"))}function lO(r){return r==="vertical"?"ns-resize":"ew-resize"}var mfe={type:"selectDataRange",event:"dataRangeSelected",update:"update"},xfe=function(r,e){e.eachComponent({mainType:"visualMap",query:r},function(t){t.setSelected(r.selected)})},Sfe=[{createOnAllSeries:!0,reset:function(r,e){var t=[];return e.eachComponent("visualMap",function(n){var a=r.pipelineContext;!n.isTargetSeries(r)||a&&a.large||t.push(Vue(n.stateList,n.targetVisuals,ye(n.getValueState,n),n.getDataDimensionIndex(r.getData())))}),t}},{createOnAllSeries:!0,reset:function(r,e){var t=r.getData(),n=[];e.eachComponent("visualMap",function(a){if(a.isTargetSeries(r)){var i=a.getVisualMeta(ye(bfe,null,r,a))||{stops:[],outerColors:[]},o=a.getDataDimensionIndex(t);o>=0&&(i.dimension=o,n.push(i))}}),r.getData().setVisual("visualMeta",n)}}];function bfe(r,e,t,n){for(var a=e.targetVisuals[n],i=pr.prepareVisualTypes(a),o={color:Gh(r.getData(),"color")},s=0,l=i.length;s<l;s++){var u=i[s],c=a[u==="opacity"?"__alphaForOpacity":u];c&&c.applyVisual(t,f,d)}return o.color;function f(h){return o[h]}function d(h,v){o[h]=v}}var uO=z;function _fe(r){var e=r&&r.visualMap;le(e)||(e=e?[e]:[]),uO(e,function(t){if(t){Ou(t,"splitList")&&!Ou(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var n=t.pieces;n&&le(n)&&uO(n,function(a){Pe(a)&&(Ou(a,"start")&&!Ou(a,"min")&&(a.min=a.start),Ou(a,"end")&&!Ou(a,"max")&&(a.max=a.end))})}})}function Ou(r,e){return r&&r.hasOwnProperty&&r.hasOwnProperty(e)}var cO=!1;function L6(r){cO||(cO=!0,r.registerSubTypeDefaulter("visualMap",function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(mfe,xfe),z(Sfe,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(_fe))}function I6(r){r.registerComponentModel(dfe),r.registerComponentView(gfe),L6(r)}var wfe=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,n){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var a=this._mode=this._determineMode();this._pieceList=[],Tfe[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(o,s){a==="categories"?(o.mappingMethod="category",o.categories=Ae(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=ue(this._pieceList,function(l){return l=Ae(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,n={},a=pr.listVisualTypes(),i=this.isCategory();z(t.pieces,function(s){z(a,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),z(n,function(s,l){var u=!1;z(this.stateList,function(c){u=u||o(t,c,l)||o(t.target,c,l)},this),!u&&z(this.stateList,function(c){(t[c]||(t[c]={}))[l]=M6.get(l,c==="inRange"?"active":"inactive",i)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,n){var a=this.option,i=this._pieceList,o=(n?a:t).selected||{};if(a.selected=o,z(i,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),a.selectedMode==="single"){var s=!1;z(i,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return this._mode==="categories"?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=Ae(t)},e.prototype.getValueState=function(t){var n=pr.findPieceIndex(t,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var n=[],a=this._pieceList;return this.eachTargetSeries(function(i){var o=[],s=i.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=pr.findPieceIndex(l,a);c===t&&o.push(u)},this),n.push({seriesId:i.id,dataIndex:o})},this),n},e.prototype.getRepresentValue=function(t){var n;if(this.isCategory())n=t.value;else if(t.value!=null)n=t.value;else{var a=t.interval||[];n=a[0]===-1/0&&a[1]===1/0?0:(a[0]+a[1])/2}return n},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var n=[],a=["",""],i=this;function o(c,f){var d=i.getRepresentValue({interval:c});f||(f=i.getValueState(d));var h=t(d,f);c[0]===-1/0?a[0]=h:c[1]===1/0?a[1]=h:n.push({value:c[0],color:h},{value:c[1],color:h})}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 z(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:a}},e.type="visualMap.piecewise",e.defaultOption=us(qy.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}),e})(qy),Tfe={splitNumber:function(r){var e=this.option,t=Math.min(e.precision,20),n=this.getExtent(),a=e.splitNumber;a=Math.max(parseInt(a,10),1),e.splitNumber=a;for(var i=(n[1]-n[0])/a;+i.toFixed(t)!==i&&t<5;)t++;e.precision=t,i=+i.toFixed(t),e.minOpen&&r.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o<a;s+=i,o++){var l=o===a-1?n[1]:s+i;r.push({interval:[s,l],close:[1,1]})}e.maxOpen&&r.push({interval:[n[1],1/0],close:[0,0]}),t_(r),z(r,function(u,c){u.index=c,u.text=this.formatValueText(u.interval)},this)},categories:function(r){var e=this.option;z(e.categories,function(t){r.push({text:this.formatValueText(t,!0),value:t})},this),fO(e,r)},pieces:function(r){var e=this.option;z(e.pieces,function(t,n){Pe(t)||(t={value:t});var a={text:"",index:n};if(t.label!=null&&(a.text=t.label),t.hasOwnProperty("value")){var i=a.value=t.value;a.interval=[i,i],a.close=[1,1]}else{for(var o=a.interval=[],s=a.close=[0,0],l=[1,0,1],u=[-1/0,1/0],c=[],f=0;f<2;f++){for(var d=[["gte","gt","min"],["lte","lt","max"]][f],h=0;h<3&&o[f]==null;h++)o[f]=t[d[h]],s[f]=l[h],c[f]=h===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]&&(a.value=o[0])}a.visual=pr.retrieveVisuals(t),r.push(a)},this),fO(e,r),t_(r),z(r,function(t){var n=t.close,a=[["<","≤"][n[1]],[">","≥"][n[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,a)},this)}};function fO(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}var Cfe=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var n=this.visualMapModel,a=n.get("textGap"),i=n.textStyleModel,o=this._getItemAlign(),s=n.itemSize,l=this._getViewData(),u=l.endsText,c=Tr(n.get("showLabel",!0),!u),f=!n.get("selectedMode");u&&this._renderEndsText(t,u[0],s,c,o),z(l.viewPieceList,function(d){var h=d.piece,v=new Le;v.onclick=ye(this._onItemClick,this,h),this._enableHoverLink(v,d.indexInModelPieceList);var y=n.getRepresentValue(h);if(this._createItemSymbol(v,y,[0,0,s[0],s[1]],f),c){var m=this.visualMapModel.getValueState(y),x=i.get("align")||o;v.add(new lt({style:wt(i,{x:x==="right"?-a:s[0]+a,y:s[1]/2,text:h.text,verticalAlign:i.get("verticalAlign")||"middle",align:x,opacity:Ce(i.get("opacity"),m==="outOfRange"?.5:1)}),silent:f}))}t.add(v)},this),u&&this._renderEndsText(t,u[1],s,c,o),ml(n.get("orient"),t,n.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,n){var a=this;t.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(o){var s=a.visualMapModel;s.option.hoverLink&&a.api.dispatchAction({type:o,batch:Wg(s.findTargetDataIndices(n),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,n=t.option;if(n.orient==="vertical")return A6(t,this.api,t.itemSize);var a=n.align;return(!a||a==="auto")&&(a="left"),a},e.prototype._renderEndsText=function(t,n,a,i,o){if(n){var s=new Le,l=this.visualMapModel.textStyleModel;s.add(new lt({style:wt(l,{x:i?o==="right"?a[0]:0:a[0]/2,y:a[1]/2,verticalAlign:"middle",align:i?o:"center",text:n})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,n=ue(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),a=t.get("text"),i=t.get("orient"),o=t.get("inverse");return(i==="horizontal"?o:!o)?n.reverse():a&&(a=a.slice().reverse()),{viewPieceList:n,endsText:a}},e.prototype._createItemSymbol=function(t,n,a,i){var o=Kt(this.getControllerVisual(n,"symbol"),a[0],a[1],a[2],a[3],this.getControllerVisual(n,"color"));o.silent=i,t.add(o)},e.prototype._onItemClick=function(t){var n=this.visualMapModel,a=n.option,i=a.selectedMode;if(i){var o=Ae(a.selected),s=n.getSelectedMapKey(t);i==="single"||i===!0?(o[s]=!0,z(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})}},e.type="visualMap.piecewise",e})(k6);function D6(r){r.registerComponentModel(wfe),r.registerComponentView(Cfe),L6(r)}function Mfe(r){Ze(I6),Ze(D6)}var kfe=(function(){function r(e){this._thumbnailModel=e}return r.prototype.reset=function(e){this._renderVersion=e.getMainProcessVersion()},r.prototype.renderContent=function(e){var t=e.api.getViewOfComponentModel(this._thumbnailModel);t&&(e.group.silent=!0,t.renderContent({group:e.group,targetTrans:e.targetTrans,z2Range:t5(e.group),roamType:e.roamType,viewportRect:e.viewportRect,renderVersion:this._renderVersion}))},r.prototype.updateWindow=function(e,t){var n=t.getViewOfComponentModel(this._thumbnailModel);n&&n.updateWindow({targetTrans:e,renderVersion:this._renderVersion})},r})(),Afe=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventAutoZ=!0,t}return e.prototype.optionUpdated=function(t,n){this._updateBridge()},e.prototype._updateBridge=function(){var t=this._birdge=this._birdge||new kfe(this);if(this._target=null,this.ecModel.eachSeries(function(a){OR(a,null)}),this.shouldShow()){var n=this.getTarget();OR(n.baseMapProvider,t)}},e.prototype.shouldShow=function(){return this.getShallow("show",!0)},e.prototype.getBridge=function(){return this._birdge},e.prototype.getTarget=function(){if(this._target)return this._target;var t=this.getReferringComponents("series",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return t?t.subType!=="graph"&&(t=null):t=this.ecModel.queryComponents({mainType:"series",subType:"graph"})[0],this._target={baseMapProvider:t},this._target},e.type="thumbnail",e.layoutMode="box",e.dependencies=["series","geo"],e.defaultOption={show:!0,right:1,bottom:1,height:"25%",width:"25%",itemStyle:{borderColor:ee.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:ee.color.neutral30,borderColor:ee.color.neutral40,opacity:.3},z:10},e})(Je),Lfe=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){if(this._api=a,this._model=t,this._coordSys||(this._coordSys=new Gl),!this._isEnabled()){this._clear();return}this._renderVersion=a.getMainProcessVersion();var i=this.group;i.removeAll();var o=t.getModel("itemStyle"),s=o.getItemStyle();s.fill==null&&(s.fill=n.get("backgroundColor")||ee.color.neutral00);var l=lr(t,a).refContainer,u=Dt(b5(t,!0),l),c=s.lineWidth||0,f=this._contentRect=kl(u.clone(),c/2,!0,!0),d=new Le;i.add(d),d.setClipPath(new Qe({shape:f.plain()}));var h=this._targetGroup=new Le;d.add(h);var v=u.plain();v.r=o.getShallow("borderRadius",!0),i.add(this._bgRect=new Qe({style:s,shape:v,silent:!1,cursor:"grab"}));var y=t.getModel("windowStyle"),m=y.getShallow("borderRadius",!0);d.add(this._windowRect=new Qe({shape:{x:0,y:0,width:0,height:0,r:m},style:y.getItemStyle(),silent:!1,cursor:"grab"})),this._dealRenderContent(),this._dealUpdateWindow(),hO(t,this)},e.prototype.renderContent=function(t){this._bridgeRendered=t,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),hO(this._model,this))},e.prototype._dealRenderContent=function(){var t=this._bridgeRendered;if(!(!t||t.renderVersion!==this._renderVersion)){var n=this._targetGroup,a=this._coordSys,i=this._contentRect;if(n.removeAll(),!!t){var o=t.group,s=o.getBoundingRect();n.add(o),this._bgRect.z2=t.z2Range.min-10,a.setBoundingRect(s.x,s.y,s.width,s.height);var l=Dt({left:"center",top:"center",aspect:s.width/s.height},i);a.setViewRect(l.x,l.y,l.width,l.height),o.attr(a.getTransformInfo().raw),this._windowRect.z2=t.z2Range.max+10,this._resetRoamController(t.roamType)}}},e.prototype.updateWindow=function(t){var n=this._bridgeRendered;n&&n.renderVersion===t.renderVersion&&(n.targetTrans=t.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},e.prototype._dealUpdateWindow=function(){var t=this._bridgeRendered;if(!(!t||t.renderVersion!==this._renderVersion)){var n=Jn([],t.targetTrans),a=Sa([],this._coordSys.transform,n);this._transThisToTarget=Jn([],a);var i=t.viewportRect;i?i=i.clone():i=new ze(0,0,this._api.getWidth(),this._api.getHeight()),i.applyTransform(a);var o=this._windowRect,s=o.shape.r;o.setShape(De({r:s},i))}},e.prototype._resetRoamController=function(t){var n=this,a=this._api,i=this._roamController;if(i||(i=this._roamController=new Vl(a.getZr())),!t||!this._isEnabled()){i.disable();return}i.enable(t,{api:a,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(o,s,l){return n._contentRect.contain(s,l)}}}),i.off("pan").off("zoom").on("pan",ye(this._onPan,this)).on("zoom",ye(this._onZoom,this))},e.prototype._onPan=function(t){var n=this._transThisToTarget;if(!(!this._isEnabled()||!n)){var a=Gt([],[t.oldX,t.oldY],n),i=Gt([],[t.oldX-t.dx,t.oldY-t.dy],n);this._api.dispatchAction(dO(this._model.getTarget().baseMapProvider,{dx:i[0]-a[0],dy:i[1]-a[1]}))}},e.prototype._onZoom=function(t){var n=this._transThisToTarget;if(!(!this._isEnabled()||!n)){var a=Gt([],[t.originX,t.originY],n);this._api.dispatchAction(dO(this._model.getTarget().baseMapProvider,{zoom:1/t.scale,originX:a[0],originY:a[1]}))}},e.prototype._isEnabled=function(){var t=this._model;if(!t||!t.shouldShow())return!1;var n=t.getTarget().baseMapProvider;return!!n},e.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},e.prototype.remove=function(){this._clear()},e.prototype.dispose=function(){this._clear()},e.type="thumbnail",e})(Ct);function dO(r,e){var t=r.mainType==="series"?r.subType+"Roam":r.mainType+"Roam",n={type:t};return n[r.mainType+"Id"]=r.id,ie(n,e),n}function hO(r,e){var t=Al(r);Am(e.group,t.z,t.zlevel)}function Ife(r){r.registerComponentModel(Afe),r.registerComponentView(Lfe)}var Dfe={label:{enabled:!0},decal:{show:!1}},pO=et(),Pfe={};function Rfe(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var n=Ae(Dfe);Ye(n.label,r.getLocaleModel().get("aria"),!1),Ye(t.option,n,!1),a(),i();function a(){var u=t.getModel("decal"),c=u.get("show");if(c){var f=we();r.eachSeries(function(d){if(!d.isColorBySeries()){var h=f.get(d.type);h||(h={},f.set(d.type,h)),pO(d).scope=h}}),r.eachRawSeries(function(d){if(r.isSeriesFiltered(d))return;if(Me(d.enableAriaDecal)){d.enableAriaDecal();return}var h=d.getData();if(d.isColorBySeries()){var _=__(d.ecModel,d.name,Pfe,r.getSeriesCount()),T=h.getVisual("decal");h.setVisual("decal",C(T,_))}else{var v=d.getRawData(),y={},m=pO(d).scope;h.each(function(k){var A=h.getRawIndex(k);y[A]=k});var x=v.count();v.each(function(k){var A=y[k],L=v.getName(k)||k+"",D=__(d.ecModel,L,m,x),P=h.getItemVisual(A,"decal");h.setItemVisual(A,"decal",C(P,D))})}function C(k,A){var L=k?ie(ie({},A),k):A;return L.dirty=!0,L}})}}function i(){var u=e.getZr().dom;if(u){var c=r.getLocaleModel().get("aria"),f=t.getModel("label");if(f.option=De(f.option,c),!!f.get("enabled")){if(u.setAttribute("role","img"),f.get("description")){u.setAttribute("aria-label",f.get("description"));return}var d=r.getSeriesCount(),h=f.get(["data","maxCount"])||10,v=f.get(["series","maxCount"])||10,y=Math.min(d,v),m;if(!(d<1)){var x=s();if(x){var _=f.get(["general","withTitle"]);m=o(_,{title:x})}else m=f.get(["general","withoutTitle"]);var T=[],C=d>1?f.get(["series","multiple","prefix"]):f.get(["series","single","prefix"]);m+=o(C,{seriesCount:d}),r.eachSeries(function(D,P){if(P<y){var E=void 0,O=D.get("name"),B=O?"withName":"withoutName";E=d>1?f.get(["series","multiple",B]):f.get(["series","single",B]),E=o(E,{seriesId:D.seriesIndex,seriesName:D.get("name"),seriesType:l(D.subType)});var N=D.getData();if(N.count()>h){var W=f.get(["data","partialData"]);E+=o(W,{displayCnt:h})}else E+=f.get(["data","allData"]);for(var H=f.get(["data","separator","middle"]),$=f.get(["data","separator","end"]),Z=f.get(["data","excludeDimensionId"]),G=[],X=0;X<N.count();X++)if(X<h){var K=N.getName(X),V=Z?ht(N.getValues(X),function(ae,ce){return Ue(Z,ce)===-1}):N.getValues(X),U=f.get(["data",K?"withName":"withoutName"]);G.push(o(U,{name:K,value:V.join(H)}))}E+=G.join(H)+$,T.push(E)}});var k=f.getModel(["series","multiple","separator"]),A=k.get("middle"),L=k.get("end");m+=T.join(A)+L,u.setAttribute("aria-label",m)}}}}function o(u,c){if(!pe(u))return u;var f=u;return z(c,function(d,h){f=f.replace(new RegExp("\\{\\s*"+h+"\\s*\\}","g"),d)}),f}function s(){var u=r.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){var c=r.getLocaleModel().get(["series","typeNames"]);return c[u]||c.chart}}function Efe(r){if(!(!r||!r.aria)){var e=r.aria;e.show!=null&&(e.enabled=e.show),e.label=e.label||{},z(["description","general","series","data"],function(t){e[t]!=null&&(e.label[t]=e[t])})}}function zfe(r){r.registerPreprocessor(Efe),r.registerVisual(r.PRIORITY.VISUAL.ARIA,Rfe)}var vO={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},Ofe=(function(){function r(e){var t=this._condVal=pe(e)?new RegExp(e):CN(e)?e:null;if(t==null){var n="";gt(n)}}return r.prototype.evaluate=function(e){var t=typeof e;return pe(t)?this._condVal.test(e):ut(t)?this._condVal.test(e+""):!1},r})(),Nfe=(function(){function r(){}return r.prototype.evaluate=function(){return this.value},r})(),jfe=(function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0},r})(),Bfe=(function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1},r})(),Ffe=(function(){function r(){}return r.prototype.evaluate=function(){return!this.child.evaluate()},r})(),Vfe=(function(){function r(){}return r.prototype.evaluate=function(){for(var e=!!this.valueParser,t=this.getValue,n=t(this.valueGetterParam),a=e?this.valueParser(n):null,i=0;i<this.subCondList.length;i++)if(!this.subCondList[i].evaluate(e?a:n))return!1;return!0},r})();function D2(r,e){if(r===!0||r===!1){var t=new Nfe;return t.value=r,t}var n="";return P6(r)||gt(n),r.and?gO("and",r,e):r.or?gO("or",r,e):r.not?Gfe(r,e):Wfe(r,e)}function gO(r,e,t){var n=e[r],a="";le(n)||gt(a),n.length||gt(a);var i=r==="and"?new jfe:new Bfe;return i.children=ue(n,function(o){return D2(o,t)}),i.children.length||gt(a),i}function Gfe(r,e){var t=r.not,n="";P6(t)||gt(n);var a=new Ffe;return a.child=D2(t,e),a.child||gt(n),a}function Wfe(r,e){for(var t="",n=e.prepareGetValue(r),a=[],i=st(r),o=r.parser,s=o?W5(o):null,l=0;l<i.length;l++){var u=i[l];if(!(u==="parser"||e.valueGetterAttrMap.get(u))){var c=Se(vO,u)?vO[u]:u,f=r[u],d=s?s(f):f,h=uX(c,d)||c==="reg"&&new Ofe(d);h||gt(t),a.push(h)}}a.length||gt(t);var v=new Vfe;return v.valueGetterParam=n,v.valueParser=s,v.getValue=e.getValue,v.subCondList=a,v}function P6(r){return Pe(r)&&!Pr(r)}var $fe=(function(){function r(e,t){this._cond=D2(e,t)}return r.prototype.evaluate=function(){return this._cond.evaluate()},r})();function Hfe(r,e){return new $fe(r,e)}var Ufe={type:"echarts:filter",transform:function(r){for(var e=r.upstream,t,n=Hfe(r.config,{valueGetterAttrMap:we({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;Se(s,"dimension")||gt(l);var c=e.getDimensionInfo(u);return c||gt(l),{dimIdx:c.index}},getValue:function(s){return e.retrieveValueFromItem(t,s.dimIdx)}}),a=[],i=0,o=e.count();i<o;i++)t=e.getRawDataItem(i),n.evaluate()&&a.push(t);return{data:a}}},Yfe={type:"echarts:sort",transform:function(r){var e=r.upstream,t=r.config,n="",a=Tt(t);a.length||gt(n);var i=[];z(a,function(c){var f=c.dimension,d=c.order,h=c.parser,v=c.incomparable;if(f==null&>(n),d!=="asc"&&d!=="desc"&>(n),v&&v!=="min"&&v!=="max"){var y="";gt(y)}if(d!=="asc"&&d!=="desc"){var m="";gt(m)}var x=e.getDimensionInfo(f);x||gt(n);var _=h?W5(h):null;h&&!_&>(n),i.push({dimIdx:x.index,parser:_,comparator:new H5(d,v)})});var o=e.sourceFormat;o!==Mr&&o!==Pn&>(n);for(var s=[],l=0,u=e.count();l<u;l++)s.push(e.getRawDataItem(l));return s.sort(function(c,f){for(var d=0;d<i.length;d++){var h=i[d],v=e.retrieveValueFromItem(c,h.dimIdx),y=e.retrieveValueFromItem(f,h.dimIdx);h.parser&&(v=h.parser(v),y=h.parser(y));var m=h.comparator.evaluate(v,y);if(m!==0)return m}return 0}),{data:s}}};function Xfe(r){r.registerTransform(Ufe),r.registerTransform(Yfe)}var Zfe=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.prototype.init=function(t,n,a){r.prototype.init.call(this,t,n,a),this._sourceManager=new Z5(this),XI(this)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),XI(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:wa},e})(Je),Kfe=(function(r){Q(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.type="dataset",e})(Ct);function qfe(r){r.registerComponentModel(Zfe),r.registerComponentView(Kfe)}var Fa=ii.CMD;function Ku(r,e){return Math.abs(r-e)<1e-5}function Nw(r){var e=r.data,t=r.len(),n=[],a,i=0,o=0,s=0,l=0;function u(N,W){a&&a.length>2&&n.push(a),a=[N,W]}function c(N,W,H,$){Ku(N,H)&&Ku(W,$)||a.push(N,W,H,$,H,$)}function f(N,W,H,$,Z,G){var X=Math.abs(W-N),K=Math.tan(X/4)*4/3,V=W<N?-1:1,U=Math.cos(N),ae=Math.sin(N),ce=Math.cos(W),re=Math.sin(W),_e=U*Z+H,Ne=ae*G+$,ve=ce*Z+H,fe=re*G+$,Te=Z*K*V,xe=G*K*V;a.push(_e-Te*ae,Ne+xe*U,ve+Te*re,fe-xe*ce,ve,fe)}for(var d,h,v,y,m=0;m<t;){var x=e[m++],_=m===1;switch(_&&(i=e[m],o=e[m+1],s=i,l=o,(x===Fa.L||x===Fa.C||x===Fa.Q)&&(a=[s,l])),x){case Fa.M:i=s=e[m++],o=l=e[m++],u(s,l);break;case Fa.L:d=e[m++],h=e[m++],c(i,o,d,h),i=d,o=h;break;case Fa.C:a.push(e[m++],e[m++],e[m++],e[m++],i=e[m++],o=e[m++]);break;case Fa.Q:d=e[m++],h=e[m++],v=e[m++],y=e[m++],a.push(i+2/3*(d-i),o+2/3*(h-o),v+2/3*(d-v),y+2/3*(h-y),v,y),i=v,o=y;break;case Fa.A:var T=e[m++],C=e[m++],k=e[m++],A=e[m++],L=e[m++],D=e[m++]+L;m+=1;var P=!e[m++];d=Math.cos(L)*k+T,h=Math.sin(L)*A+C,_?(s=d,l=h,u(s,l)):c(i,o,d,h),i=Math.cos(D)*k+T,o=Math.sin(D)*A+C;for(var E=(P?-1:1)*Math.PI/2,O=L;P?O>D:O<D;O+=E){var B=P?Math.max(O+E,D):Math.min(O+E,D);f(O,B,T,C,k,A)}break;case Fa.R:s=i=e[m++],l=o=e[m++],d=s+e[m++],h=l+e[m++],u(d,l),c(d,l,d,h),c(d,h,s,h),c(s,h,s,l),c(s,l,d,l);break;case Fa.Z:a&&c(i,o,s,l),i=s,o=l;break}}return a&&a.length>2&&n.push(a),n}function jw(r,e,t,n,a,i,o,s,l,u){if(Ku(r,t)&&Ku(e,n)&&Ku(a,o)&&Ku(i,s)){l.push(o,s);return}var c=2/u,f=c*c,d=o-r,h=s-e,v=Math.sqrt(d*d+h*h);d/=v,h/=v;var y=t-r,m=n-e,x=a-o,_=i-s,T=y*y+m*m,C=x*x+_*_;if(T<f&&C<f){l.push(o,s);return}var k=d*y+h*m,A=-d*x-h*_,L=T-k*k,D=C-A*A;if(L<f&&k>=0&&D<f&&A>=0){l.push(o,s);return}var P=[],E=[];Jo(r,t,a,o,.5,P),Jo(e,n,i,s,.5,E),jw(P[0],E[0],P[1],E[1],P[2],E[2],P[3],E[3],l,u),jw(P[4],E[4],P[5],E[5],P[6],E[6],P[7],E[7],l,u)}function Qfe(r,e){var t=Nw(r),n=[];e=e||1;for(var a=0;a<t.length;a++){var i=t[a],o=[],s=i[0],l=i[1];o.push(s,l);for(var u=2;u<i.length;){var c=i[u++],f=i[u++],d=i[u++],h=i[u++],v=i[u++],y=i[u++];jw(s,l,c,f,d,h,v,y,o,e),s=v,l=y}n.push(o)}return n}function R6(r,e,t){var n=r[e],a=r[1-e],i=Math.abs(n/a),o=Math.ceil(Math.sqrt(i*t)),s=Math.floor(t/o);s===0&&(s=1,o=t);for(var l=[],u=0;u<o;u++)l.push(s);var c=o*s,f=t-c;if(f>0)for(var u=0;u<f;u++)l[u%o]+=1;return l}function yO(r,e,t){for(var n=r.r0,a=r.r,i=r.startAngle,o=r.endAngle,s=Math.abs(o-i),l=s*a,u=a-n,c=l>Math.abs(u),f=R6([l,u],c?0:1,e),d=(c?s:u)/f.length,h=0;h<f.length;h++)for(var v=(c?u:s)/f[h],y=0;y<f[h];y++){var m={};c?(m.startAngle=i+d*h,m.endAngle=i+d*(h+1),m.r0=n+v*y,m.r=n+v*(y+1)):(m.startAngle=i+v*y,m.endAngle=i+v*(y+1),m.r0=n+d*h,m.r=n+d*(h+1)),m.clockwise=r.clockwise,m.cx=r.cx,m.cy=r.cy,t.push(m)}}function Jfe(r,e,t){for(var n=r.width,a=r.height,i=n>a,o=R6([n,a],i?0:1,e),s=i?"width":"height",l=i?"height":"width",u=i?"x":"y",c=i?"y":"x",f=r[s]/o.length,d=0;d<o.length;d++)for(var h=r[l]/o[d],v=0;v<o[d];v++){var y={};y[u]=d*f,y[c]=v*h,y[s]=f,y[l]=h,y.x+=r.x,y.y+=r.y,t.push(y)}}function mO(r,e,t,n){return r*n-t*e}function ede(r,e,t,n,a,i,o,s){var l=t-r,u=n-e,c=o-a,f=s-i,d=mO(c,f,l,u);if(Math.abs(d)<1e-6)return null;var h=r-a,v=e-i,y=mO(h,v,c,f)/d;return y<0||y>1?null:new Ee(y*l+r,y*u+e)}function tde(r,e,t){var n=new Ee;Ee.sub(n,t,e),n.normalize();var a=new Ee;Ee.sub(a,r,e);var i=a.dot(n);return i}function Nu(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function rde(r,e,t){for(var n=r.length,a=[],i=0;i<n;i++){var o=r[i],s=r[(i+1)%n],l=ede(o[0],o[1],s[0],s[1],e.x,e.y,t.x,t.y);l&&a.push({projPt:tde(l,e,t),pt:l,idx:i})}if(a.length<2)return[{points:r},{points:r}];a.sort(function(m,x){return m.projPt-x.projPt});var u=a[0],c=a[a.length-1];if(c.idx<u.idx){var f=u;u=c,c=f}for(var d=[u.pt.x,u.pt.y],h=[c.pt.x,c.pt.y],v=[d],y=[h],i=u.idx+1;i<=c.idx;i++)Nu(v,r[i].slice());Nu(v,h),Nu(v,d);for(var i=c.idx+1;i<=u.idx+n;i++)Nu(y,r[i%n].slice());return Nu(y,d),Nu(y,h),[{points:v},{points:y}]}function xO(r){var e=r.points,t=[],n=[];_m(e,t,n);var a=new ze(t[0],t[1],n[0]-t[0],n[1]-t[1]),i=a.width,o=a.height,s=a.x,l=a.y,u=new Ee,c=new Ee;return i>o?(u.x=c.x=s+i/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+i),rde(e,u,c)}function Qy(r,e,t,n){if(t===1)n.push(e);else{var a=Math.floor(t/2),i=r(e);Qy(r,i[0],a,n),Qy(r,i[1],t-a,n)}return n}function nde(r,e){for(var t=[],n=0;n<e;n++)t.push(MT(r));return t}function ade(r,e){e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel}function ide(r){for(var e=[],t=0;t<r.length;)e.push([r[t++],r[t++]]);return e}function ode(r,e){var t=[],n=r.shape,a;switch(r.type){case"rect":Jfe(n,e,t),a=Qe;break;case"sector":yO(n,e,t),a=Er;break;case"circle":yO({r0:0,r:n.r,startAngle:0,endAngle:Math.PI*2,cx:n.cx,cy:n.cy},e,t),a=Er;break;default:var i=r.getComputedTransform(),o=i?Math.sqrt(Math.max(i[0]*i[0]+i[1]*i[1],i[2]*i[2]+i[3]*i[3])):1,s=ue(Qfe(r.getUpdatedPathProxy(),o),function(x){return ide(x)}),l=s.length;if(l===0)Qy(xO,{points:s[0]},e,t);else if(l===e)for(var u=0;u<l;u++)t.push({points:s[u]});else{var c=0,f=ue(s,function(x){var _=[],T=[];_m(x,_,T);var C=(T[1]-_[1])*(T[0]-_[0]);return c+=C,{poly:x,area:C}});f.sort(function(x,_){return _.area-x.area});for(var d=e,u=0;u<l;u++){var h=f[u];if(d<=0)break;var v=u===l-1?d:Math.ceil(h.area/c*e);v<0||(Qy(xO,{points:h.poly},v,t),d-=v)}}a=zr;break}if(!a)return nde(r,e);for(var y=[],u=0;u<t.length;u++){var m=new a;m.setShape(t[u]),ade(r,m),y.push(m)}return y}function sde(r,e){var t=r.length,n=e.length;if(t===n)return[r,e];for(var a=[],i=[],o=t<n?r:e,s=Math.min(t,n),l=Math.abs(n-t)/6,u=(s-2)/6,c=Math.ceil(l/u)+1,f=[o[0],o[1]],d=l,h=2;h<s;){var v=o[h-2],y=o[h-1],m=o[h++],x=o[h++],_=o[h++],T=o[h++],C=o[h++],k=o[h++];if(d<=0){f.push(m,x,_,T,C,k);continue}for(var A=Math.min(d,c-1)+1,L=1;L<=A;L++){var D=L/A;Jo(v,m,_,C,D,a),Jo(y,x,T,k,D,i),v=a[3],y=i[3],f.push(a[1],i[1],a[2],i[2],v,y),m=a[5],x=i[5],_=a[6],T=i[6]}d-=A-1}return o===r?[f,e]:[r,f]}function SO(r,e){for(var t=r.length,n=r[t-2],a=r[t-1],i=[],o=0;o<e.length;)i[o++]=n,i[o++]=a;return i}function lde(r,e){for(var t,n,a,i=[],o=[],s=0;s<Math.max(r.length,e.length);s++){var l=r[s],u=e[s],c=void 0,f=void 0;l?u?(t=sde(l,u),c=t[0],f=t[1],n=c,a=f):(f=SO(a||l,l),c=l):(c=SO(n||u,u),f=u),i.push(c),o.push(f)}return[i,o]}function bO(r){for(var e=0,t=0,n=0,a=r.length,i=0,o=a-2;i<a;o=i,i+=2){var s=r[o],l=r[o+1],u=r[i],c=r[i+1],f=s*c-u*l;e+=f,t+=(s+u)*f,n+=(l+c)*f}return e===0?[r[0]||0,r[1]||0]:[t/e/3,n/e/3,e]}function ude(r,e,t,n){for(var a=(r.length-2)/6,i=1/0,o=0,s=r.length,l=s-2,u=0;u<a;u++){for(var c=u*6,f=0,d=0;d<s;d+=2){var h=d===0?c:(c+d-2)%l+2,v=r[h]-t[0],y=r[h+1]-t[1],m=e[d]-n[0],x=e[d+1]-n[1],_=m-v,T=x-y;f+=_*_+T*T}f<i&&(i=f,o=u)}return o}function cde(r){for(var e=[],t=r.length,n=0;n<t;n+=2)e[n]=r[t-n-2],e[n+1]=r[t-n-1];return e}function fde(r,e,t,n){for(var a=[],i,o=0;o<r.length;o++){var s=r[o],l=e[o],u=bO(s),c=bO(l);i==null&&(i=u[2]<0!=c[2]<0);var f=[],d=[],h=0,v=1/0,y=[],m=s.length;i&&(s=cde(s));for(var x=ude(s,l,u,c)*6,_=m-2,T=0;T<_;T+=2){var C=(x+T)%_+2;f[T+2]=s[C]-u[0],f[T+3]=s[C+1]-u[1]}f[0]=s[x]-u[0],f[1]=s[x+1]-u[1];for(var k=n/t,A=-n/2;A<=n/2;A+=k){for(var L=Math.sin(A),D=Math.cos(A),P=0,T=0;T<s.length;T+=2){var E=f[T],O=f[T+1],B=l[T]-c[0],N=l[T+1]-c[1],W=B*D-N*L,H=B*L+N*D;y[T]=W,y[T+1]=H;var $=W-E,Z=H-O;P+=$*$+Z*Z}if(P<v){v=P,h=A;for(var G=0;G<y.length;G++)d[G]=y[G]}}a.push({from:f,to:d,fromCp:u,toCp:c,rotation:-h})}return a}function Jy(r){return r.__isCombineMorphing}var E6="__mOriginal_";function em(r,e,t){var n=E6+e,a=r[n]||r[e];r[n]||(r[n]=r[e]);var i=t.replace,o=t.after,s=t.before;r[e]=function(){var l=arguments,u;return s&&s.apply(this,l),i?u=i.apply(this,l):u=a.apply(this,l),o&&o.apply(this,l),u}}function Hd(r,e){var t=E6+e;r[t]&&(r[e]=r[t],r[t]=null)}function _O(r,e){for(var t=0;t<r.length;t++)for(var n=r[t],a=0;a<n.length;){var i=n[a],o=n[a+1];n[a++]=e[0]*i+e[2]*o+e[4],n[a++]=e[1]*i+e[3]*o+e[5]}}function z6(r,e){var t=r.getUpdatedPathProxy(),n=e.getUpdatedPathProxy(),a=lde(Nw(t),Nw(n)),i=a[0],o=a[1],s=r.getComputedTransform(),l=e.getComputedTransform();function u(){this.transform=null}s&&_O(i,s),l&&_O(o,l),em(e,"updateTransform",{replace:u}),e.transform=null;var c=fde(i,o,10,Math.PI),f=[];em(e,"buildPath",{replace:function(d){for(var h=e.__morphT,v=1-h,y=[],m=0;m<c.length;m++){var x=c[m],_=x.from,T=x.to,C=x.rotation*h,k=x.fromCp,A=x.toCp,L=Math.sin(C),D=Math.cos(C);Rd(y,k,A,h);for(var P=0;P<_.length;P+=2){var E=_[P],O=_[P+1],B=T[P],N=T[P+1],W=E*v+B*h,H=O*v+N*h;f[P]=W*D-H*L+y[0],f[P+1]=W*L+H*D+y[1]}var $=f[0],Z=f[1];d.moveTo($,Z);for(var P=2;P<_.length;){var B=f[P++],N=f[P++],G=f[P++],X=f[P++],K=f[P++],V=f[P++];$===B&&Z===N&&G===K&&X===V?d.lineTo(K,V):d.bezierCurveTo(B,N,G,X,K,V),$=K,Z=V}}}})}function P2(r,e,t){if(!r||!e)return e;var n=t.done,a=t.during;z6(r,e),e.__morphT=0;function i(){Hd(e,"buildPath"),Hd(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},De({during:function(o){e.dirtyShape(),a&&a(o)},done:function(){i(),n&&n()}},t)),e}function dde(r,e,t,n,a,i){var o=16;r=a===t?0:Math.round(32767*(r-t)/(a-t)),e=i===n?0:Math.round(32767*(e-n)/(i-n));for(var s=0,l,u=(1<<o)/2;u>0;u/=2){var c=0,f=0;(r&u)>0&&(c=1),(e&u)>0&&(f=1),s+=u*u*(3*c^f),f===0&&(c===1&&(r=u-1-r,e=u-1-e),l=r,r=e,e=l)}return s}function tm(r){var e=1/0,t=1/0,n=-1/0,a=-1/0,i=ue(r,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 e=Math.min(c,e),t=Math.min(f,t),n=Math.max(c,n),a=Math.max(f,a),[c,f]}),o=ue(i,function(s,l){return{cp:s,z:dde(s[0],s[1],e,t,n,a),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function O6(r){return ode(r.path,r.count)}function Bw(){return{fromIndividuals:[],toIndividuals:[],count:0}}function hde(r,e,t){var n=[];function a(k){for(var A=0;A<k.length;A++){var L=k[A];Jy(L)?a(L.childrenRef()):L instanceof nt&&n.push(L)}}a(r);var i=n.length;if(!i)return Bw();var o=t.dividePath||O6,s=o({path:e,count:i});if(s.length!==i)return console.error("Invalid morphing: unmatched splitted path"),Bw();n=tm(n),s=tm(s);for(var l=t.done,u=t.during,c=t.individualDelay,f=new Ni,d=0;d<i;d++){var h=n[d],v=s[d];v.parent=e,v.copyTransform(f),c||z6(h,v)}e.__isCombineMorphing=!0,e.childrenRef=function(){return s};function y(k){for(var A=0;A<s.length;A++)s[A].addSelfToZr(k)}em(e,"addSelfToZr",{after:function(k){y(k)}}),em(e,"removeSelfFromZr",{after:function(k){for(var A=0;A<s.length;A++)s[A].removeSelfFromZr(k)}});function m(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,Hd(e,"addSelfToZr"),Hd(e,"removeSelfFromZr")}var x=s.length;if(c)for(var _=x,T=function(){_--,_===0&&(m(),l&&l())},d=0;d<x;d++){var C=c?De({delay:(t.delay||0)+c(d,x,n[d],s[d]),done:T},t):t;P2(n[d],s[d],C)}else e.__morphT=0,e.animateTo({__morphT:1},De({during:function(k){for(var A=0;A<x;A++){var L=s[A];L.__morphT=e.__morphT,L.dirtyShape()}u&&u(k)},done:function(){m();for(var k=0;k<r.length;k++)Hd(r[k],"updateTransform");l&&l()}},t));return e.__zr&&y(e.__zr),{fromIndividuals:n,toIndividuals:s,count:x}}function pde(r,e,t){var n=e.length,a=[],i=t.dividePath||O6;function o(h){for(var v=0;v<h.length;v++){var y=h[v];Jy(y)?o(y.childrenRef()):y instanceof nt&&a.push(y)}}if(Jy(r)){o(r.childrenRef());var s=a.length;if(s<n)for(var l=0,u=s;u<n;u++)a.push(MT(a[l++%s]));a.length=n}else{a=i({path:r,count:n});for(var c=r.getComputedTransform(),u=0;u<a.length;u++)a[u].setLocalTransform(c);if(a.length!==n)return console.error("Invalid morphing: unmatched splitted path"),Bw()}a=tm(a),e=tm(e);for(var f=t.individualDelay,u=0;u<n;u++){var d=f?De({delay:(t.delay||0)+f(u,n,a[u],e[u])},t):t;P2(a[u],e[u],d)}return{fromIndividuals:a,toIndividuals:e,count:e.length}}function wO(r){return le(r[0])}function TO(r,e){for(var t=[],n=r.length,a=0;a<n;a++)t.push({one:r[a],many:[]});for(var a=0;a<e.length;a++){var i=e[a].length,o=void 0;for(o=0;o<i;o++)t[o%n].many.push(e[a][o])}for(var s=0,a=n-1;a>=0;a--)if(!t[a].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var i=l.length,u=Math.ceil(i/2);t[a].many=l.slice(u,i),t[s].many=l.slice(0,u),s++}return t}var vde={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),n=0;n<r.count;n++){var a=MT(r.path);a.setStyle("opacity",t),e.push(a)}return e},split:null};function yb(r,e,t,n,a,i){if(!r.length||!e.length)return;var o=Rc("update",n,a);if(!(o&&o.duration>0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;wO(r)&&(u=r,c=e),wO(e)&&(u=e,c=r);function f(x,_,T,C,k){var A=x.many,L=x.one;if(A.length===1&&!k){var D=_?A[0]:L,P=_?L:A[0];if(Jy(D))f({many:[D],one:P},!0,T,C,!0);else{var E=s?De({delay:s(T,C)},l):l;P2(D,P,E),i(D,P,D,P,E)}}else for(var O=De({dividePath:vde[t],individualDelay:s&&function(Z,G,X,K){return s(Z+T,C)}},l),B=_?hde(A,L,O):pde(L,A,O),N=B.fromIndividuals,W=B.toIndividuals,H=N.length,$=0;$<H;$++){var E=s?De({delay:s($,H)},l):l;i(N[$],W[$],_?A[$]:x.one,_?x.one:A[$],E)}}for(var d=u?u===r:r.length>e.length,h=u?TO(c,u):TO(d?e:r,[d?r:e]),v=0,y=0;y<h.length;y++)v+=h[y].many.length;for(var m=0,y=0;y<h.length;y++)f(h[y],d,m,v),m+=h[y].many.length}function nl(r){if(!r)return[];if(le(r)){for(var e=[],t=0;t<r.length;t++)e.push(nl(r[t]));return e}var n=[];return r.traverse(function(a){a instanceof nt&&!a.disableMorphing&&!a.invisible&&!a.ignore&&n.push(a)}),n}var N6=1e4,gde=0,CO=1,MO=2,yde=et();function mde(r,e){for(var t=r.dimensions,n=0;n<t.length;n++){var a=r.getDimensionInfo(t[n]);if(a&&a.otherDims[e]===0)return t[n]}}function xde(r,e,t){var n=r.getDimensionInfo(t),a=n&&n.ordinalMeta;if(n){var i=r.get(n.name,e);return a&&a.categories[i]||i+""}}function kO(r,e,t,n){var a=n?"itemChildGroupId":"itemGroupId",i=mde(r,a);if(i){var o=xde(r,e,i);return o}var s=r.getRawDataItem(e),l=n?"childGroupId":"groupId";if(s&&s[l])return s[l]+"";if(!n)return t||r.getId(e)}function AO(r){var e=[];return z(r,function(t){var n=t.data,a=t.dataGroupId;if(!(n.count()>N6))for(var i=n.getIndices(),o=0;o<i.length;o++)e.push({data:n,groupId:kO(n,o,a,!1),childGroupId:kO(n,o,a,!0),divide:t.divide,dataIndex:o})}),e}function mb(r,e,t){r.traverse(function(n){n instanceof nt&&It(n,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function xb(r){if(r.parent){var e=r.getComputedTransform();r.setLocalTransform(e),r.parent.remove(r)}}function ju(r){r.stopAnimation(),r.isGroup&&r.traverse(function(e){e.stopAnimation()})}function Sde(r,e,t){var n=Rc("update",t,e);n&&r.traverse(function(a){if(a instanceof ea){var i=NU(a);i&&a.animateFrom({style:i},n)}})}function bde(r,e){var t=r.length;if(t!==e.length)return!1;for(var n=0;n<t;n++){var a=r[n],i=e[n];if(a.data.getId(a.dataIndex)!==i.data.getId(i.dataIndex))return!1}return!0}function j6(r,e,t){var n=AO(r),a=AO(e);function i(T,C,k,A,L){(k||T)&&C.animateFrom({style:k&&k!==T?ie(ie({},k.style),T.style):T.style},L)}var o=!1,s=gde,l=we(),u=we();n.forEach(function(T){T.groupId&&l.set(T.groupId,!0),T.childGroupId&&u.set(T.childGroupId,!0)});for(var c=0;c<a.length;c++){var f=a[c].groupId;if(u.get(f)){s=CO;break}var d=a[c].childGroupId;if(d&&l.get(d)){s=MO;break}}function h(T,C){return function(k){var A=k.data,L=k.dataIndex;return C?A.getId(L):T?s===CO?k.childGroupId:k.groupId:s===MO?k.childGroupId:k.groupId}}var v=bde(n,a),y={};if(!v)for(var c=0;c<a.length;c++){var m=a[c],x=m.data.getItemGraphicEl(m.dataIndex);x&&(y[x.id]=!0)}function _(T,C){var k=n[C],A=a[T],L=A.data.hostModel,D=k.data.getItemGraphicEl(k.dataIndex),P=A.data.getItemGraphicEl(A.dataIndex);if(D===P){P&&Sde(P,A.dataIndex,L);return}D&&y[D.id]||P&&(ju(P),D?(ju(D),xb(D),o=!0,yb(nl(D),nl(P),A.divide,L,T,i)):mb(P,L,T))}new Ki(n,a,h(!0,v),h(!1,v),null,"multiple").update(_).updateManyToOne(function(T,C){var k=a[T],A=k.data,L=A.hostModel,D=A.getItemGraphicEl(k.dataIndex),P=ht(ue(C,function(E){return n[E].data.getItemGraphicEl(n[E].dataIndex)}),function(E){return E&&E!==D&&!y[E.id]});D&&(ju(D),P.length?(z(P,function(E){ju(E),xb(E)}),o=!0,yb(nl(P),nl(D),k.divide,L,T,i)):mb(D,L,k.dataIndex))}).updateOneToMany(function(T,C){var k=n[C],A=k.data.getItemGraphicEl(k.dataIndex);if(!(A&&y[A.id])){var L=ht(ue(T,function(P){return a[P].data.getItemGraphicEl(a[P].dataIndex)}),function(P){return P&&P!==A}),D=a[T[0]].data.hostModel;L.length&&(z(L,function(P){return ju(P)}),A?(ju(A),xb(A),o=!0,yb(nl(A),nl(L),k.divide,D,T[0],i)):z(L,function(P){return mb(P,D,T[0])}))}}).updateManyToMany(function(T,C){new Ki(C,T,function(k){return n[k].data.getId(n[k].dataIndex)},function(k){return a[k].data.getId(a[k].dataIndex)}).update(function(k,A){_(T[k],C[A])}).execute()}).execute(),o&&z(e,function(T){var C=T.data,k=C.hostModel,A=k&&t.getViewOfSeriesModel(k),L=Rc("update",k,0);A&&k.isAnimationEnabled()&&L&&L.duration>0&&A.group.traverse(function(D){D instanceof nt&&!D.animators.length&&D.animateFrom({style:{opacity:0}},L)})})}function LO(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function IO(r){return le(r)?r.sort().join(","):r}function Oo(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function _de(r,e){var t=we(),n=we(),a=we();return z(r.oldSeries,function(i,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=LO(i),c=IO(u);n.set(c,{dataGroupId:s,data:l}),le(u)&&z(u,function(f){a.set(f,{key:c,dataGroupId:s,data:l})})}),z(e.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.get("dataGroupId"),s=i.getData(),l=LO(i),u=IO(l),c=n.get(u);if(c)t.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:Oo(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:Oo(s),data:s}]});else if(le(l)){var f=[];z(l,function(v){var y=n.get(v);y.data&&f.push({dataGroupId:y.dataGroupId,divide:Oo(y.data),data:y.data})}),f.length&&t.set(u,{oldSeries:f,newSeries:[{dataGroupId:o,data:s,divide:Oo(s)}]})}else{var d=a.get(l);if(d){var h=t.get(d.key);h||(h={oldSeries:[{dataGroupId:d.dataGroupId,data:d.data,divide:Oo(d.data)}],newSeries:[]},t.set(d.key,h)),h.newSeries.push({dataGroupId:o,data:s,divide:Oo(s)})}}}}),t}function DO(r,e){for(var t=0;t<r.length;t++){var n=e.seriesIndex!=null&&e.seriesIndex===r[t].seriesIndex||e.seriesId!=null&&e.seriesId===r[t].id;if(n)return t}}function wde(r,e,t,n){var a=[],i=[];z(Tt(r.from),function(o){var s=DO(e.oldSeries,o);s>=0&&a.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Oo(e.oldData[s]),groupIdDim:o.dimension})}),z(Tt(r.to),function(o){var s=DO(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();i.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:Oo(l),groupIdDim:o.dimension})}}),a.length>0&&i.length>0&&j6(a,i,n)}function Tde(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){z(Tt(n.seriesTransition),function(a){z(Tt(a.to),function(i){for(var o=n.updatedSeries,s=0;s<o.length;s++)(i.seriesIndex!=null&&i.seriesIndex===o[s].seriesIndex||i.seriesId!=null&&i.seriesId===o[s].id)&&(o[s][Og]=!0)})})}),r.registerUpdateLifecycle("series:transition",function(e,t,n){var a=yde(t);if(a.oldSeries&&n.updatedSeries&&n.optionChanged){var i=n.seriesTransition;if(i)z(Tt(i),function(h){wde(h,a,n,t)});else{var o=_de(a,n);z(o.keys(),function(h){var v=o.get(h);j6(v.oldSeries,v.newSeries,t)})}z(n.updatedSeries,function(h){h[Og]&&(h[Og]=!1)})}for(var s=e.getSeries(),l=a.oldSeries=[],u=a.oldDataGroupIds=[],c=a.oldData=[],f=0;f<s.length;f++){var d=s[f].getData();d.count()<N6&&(l.push(s[f]),u.push(s[f].get("dataGroupId")),c.push(d))}})}var Cde=(function(){function r(){this.breaks=[],this._elapsedExtent=[1/0,-1/0]}return r.prototype.setBreaks=function(e){this.breaks=e.breaks},r.prototype.update=function(e){kde(this,e);var t=this._elapsedExtent;t[0]=this.elapse(e[0]),t[1]=this.elapse(e[1])},r.prototype.hasBreaks=function(){return!!this.breaks.length},r.prototype.calcNiceTickMultiple=function(e,t){for(var n=0;n<this.breaks.length;n++){var a=this.breaks[n];if(a.vmin<e&&e<a.vmax){var i=t(e,a.vmax);return i}}return 0},r.prototype.getExtentSpan=function(){return this._elapsedExtent[1]-this._elapsedExtent[0]},r.prototype.normalize=function(e){var t=this._elapsedExtent[1]-this._elapsedExtent[0];return t===0?.5:(this.elapse(e)-this._elapsedExtent[0])/t},r.prototype.scale=function(e){return this.unelapse(e*(this._elapsedExtent[1]-this._elapsedExtent[0])+this._elapsedExtent[0])},r.prototype.elapse=function(e){for(var t=PO,n=RO,a=!0,i=0;i<this.breaks.length;i++){var o=this.breaks[i];if(e<=o.vmax){e>o.vmin?t+=o.vmin-n+(e-o.vmin)/(o.vmax-o.vmin)*o.gapReal:t+=e-n,n=o.vmax,a=!1;break}t+=o.vmin-n+o.gapReal,n=o.vmax}return a&&(t+=e-n),t},r.prototype.unelapse=function(e){for(var t=PO,n=RO,a=!0,i=0,o=0;o<this.breaks.length;o++){var s=this.breaks[o],l=t+s.vmin-n,u=l+s.gapReal;if(e<=u){e>l?i=s.vmin+(e-l)/(u-l)*(s.vmax-s.vmin):i=n+e-t,n=s.vmax,a=!1;break}t=u,n=s.vmax}return a&&(i=n+e-t),i},r})();function Mde(){return new Cde}var PO=0,RO=0;function kde(r,e){var t=0,n={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},a=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},i={S:{tpAbs:a(),tpPrct:a()},E:{tpAbs:a(),tpPrct:a()}};z(r.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(t+=l.val);var u=R2(s,e);if(u){var c=u.vmin!==s.vmin,f=u.vmax!==s.vmax,d=u.vmax-u.vmin;if(!(c&&f))if(c||f){var h=c?"S":"E";i[h][l.type].has=!0,i[h][l.type].span=d,i[h][l.type].inExtFrac=d/(s.vmax-s.vmin),i[h][l.type].val=l.val}else n[l.type].span+=d,n[l.type].val+=l.val}});var o=t*(0+(e[1]-e[0])+(n.tpAbs.val-n.tpAbs.span)+(i.S.tpAbs.has?(i.S.tpAbs.val-i.S.tpAbs.span)*i.S.tpAbs.inExtFrac:0)+(i.E.tpAbs.has?(i.E.tpAbs.val-i.E.tpAbs.span)*i.E.tpAbs.inExtFrac:0)-n.tpPrct.span-(i.S.tpPrct.has?i.S.tpPrct.span*i.S.tpPrct.inExtFrac:0)-(i.E.tpPrct.has?i.E.tpPrct.span*i.E.tpPrct.inExtFrac:0))/(1-n.tpPrct.val-(i.S.tpPrct.has?i.S.tpPrct.val*i.S.tpPrct.inExtFrac:0)-(i.E.tpPrct.has?i.E.tpPrct.val*i.E.tpPrct.inExtFrac:0));z(r.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(s.gapReal=t!==0?Math.max(o,0)*l.val/t:0),l.type==="tpAbs"&&(s.gapReal=l.val),s.gapReal==null&&(s.gapReal=0)})}function Ade(r,e,t,n,a,i){r!=="no"&&z(t,function(o){var s=R2(o,i);if(s)for(var l=e.length-1;l>=0;l--){var u=e[l],c=n(u),f=a*3/4;c>s.vmin-f&&c<s.vmax+f&&(r!=="preserve_extent_bound"||c!==i[0]&&c!==i[1])&&e.splice(l,1)}})}function Lde(r,e,t,n){z(e,function(a){var i=R2(a,t);i&&(r.push({value:i.vmin,break:{type:"vmin",parsedBreak:i},time:n?n(i):void 0}),r.push({value:i.vmax,break:{type:"vmax",parsedBreak:i},time:n?n(i):void 0}))}),e.length&&r.sort(function(a,i){return a.value-i.value})}function R2(r,e){var t=Math.max(r.vmin,e[0]),n=Math.min(r.vmax,e[1]);return t<n||t===n&&t>e[0]&&t<e[1]?{vmin:t,vmax:n,breakOption:r.breakOption,gapParsed:r.gapParsed,gapReal:r.gapReal}:null}function Fw(r,e,t){var n=[];if(!r)return{breaks:n};function a(o,s){return o>=0&&o<1-1e-5}z(r,function(o){if(!(!o||o.start==null||o.end==null)&&!o.isExpanded){var s={breakOption:Ae(o),vmin:e(o.start),vmax:e(o.end),gapParsed:{type:"tpAbs",val:0},gapReal:null};if(o.gap!=null){var l=!1;if(pe(o.gap)){var u=Mn(o.gap);if(u.match(/%$/)){var c=parseFloat(u)/100;a(c)||(c=0),s.gapParsed.type="tpPrct",s.gapParsed.val=c,l=!0}}if(!l){var f=e(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),t&&t.noNegative&&z(["vmin","vmax"],function(h){s[h]<0&&(s[h]=0)}),s.vmin>s.vmax){var d=s.vmax;s.vmax=s.vmin,s.vmin=d}n.push(s)}}),n.sort(function(o,s){return o.vmin-s.vmin});var i=-1/0;return z(n,function(o,s){i>o.vmin&&(n[s]=null),i=o.vmax}),{breaks:n.filter(function(o){return!!o})}}function E2(r,e){return Vw(e)===Vw(r)}function Vw(r){return r.start+"_\0_"+r.end}function Ide(r,e,t){var n=[];z(r,function(i,o){var s=e(i);s&&s.type==="vmin"&&n.push([o])}),z(r,function(i,o){var s=e(i);if(s&&s.type==="vmax"){var l=os(n,function(u){return E2(e(r[u[0]]).parsedBreak.breakOption,s.parsedBreak.breakOption)});l&&l.push(o)}});var a=[];return z(n,function(i){i.length===2&&a.push(t?i:[r[i[0]],r[i[1]]])}),a}function Dde(r,e,t,n){var a,i;if(r.break){var o=r.break.parsedBreak,s=os(t,function(f){return E2(f.breakOption,r.break.parsedBreak.breakOption)}),l=n(Math.pow(e,o.vmin),s.vmin),u=n(Math.pow(e,o.vmax),s.vmax),c={type:o.gapParsed.type,val:o.gapParsed.type==="tpAbs"?Xt(Math.pow(e,o.vmin+o.gapParsed.val))-l:o.gapParsed.val};a={type:r.break.type,parsedBreak:{breakOption:o.breakOption,vmin:l,vmax:u,gapParsed:c,gapReal:o.gapReal}},i=s[r.break.type]}return{brkRoundingCriterion:i,vBreak:a}}function Pde(r,e,t){var n={noNegative:!0},a=Fw(r,t,n),i=Fw(r,t,n),o=Math.log(e);return i.breaks=ue(i.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:a,parsedLogged:i}}var Rde={vmin:"start",vmax:"end"};function Ede(r,e){return e&&(r=r||{},r.break={type:Rde[e.type],start:e.parsedBreak.vmin,end:e.parsedBreak.vmax}),r}function zde(){nY({createScaleBreakContext:Mde,pruneTicksByBreak:Ade,addBreaksToTicks:Lde,parseAxisBreakOption:Fw,identifyAxisBreak:E2,serializeAxisBreakIdentifier:Vw,retrieveAxisBreakPairs:Ide,getTicksLogTransformBreak:Dde,logarithmicParseBreaksFromOption:Pde,makeAxisLabelFormatterParamBreak:Ede})}var EO=et();function Ode(r,e){var t=os(r,function(n){return er().identifyAxisBreak(n.parsedBreak.breakOption,e.breakOption)});return t||r.push(t={zigzagRandomList:[],parsedBreak:e,shouldRemove:!1}),t}function Nde(r){z(r,function(e){return e.shouldRemove=!0})}function jde(r){for(var e=r.length-1;e>=0;e--)r[e].shouldRemove&&r.splice(e,1)}function Bde(r,e,t,n,a){var i=t.axis;if(i.scale.isBlank()||!er())return;var o=er().retrieveAxisBreakPairs(i.scale.getTicks({breakTicks:"only_break"}),function(P){return P.break},!1);if(!o.length)return;var s=t.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"),d=s.get("zigzagZ"),h=s.getModel("itemStyle"),v=h.getItemStyle(),y=v.stroke,m=v.lineWidth,x=v.lineDash,_=v.fill,T=new Le({ignoreModelZ:!0}),C=i.isHorizontal(),k=EO(e).visualList||(EO(e).visualList=[]);Nde(k);for(var A=function(P){var E=o[P][0].break.parsedBreak,O=[];O[0]=i.toGlobalCoord(i.dataToCoord(E.vmin,!0)),O[1]=i.toGlobalCoord(i.dataToCoord(E.vmax,!0)),O[1]<O[0]&&O.reverse();var B=Ode(k,E);B.shouldRemove=!1;var N=new Le;D(B.zigzagRandomList,N,O[0],O[1],C,E),f&&N.on("click",function(){var W={type:Bm,breaks:[{start:E.breakOption.start,end:E.breakOption.end}]};W[i.dim+"AxisIndex"]=t.componentIndex,a.dispatchAction(W)}),N.silent=!f,T.add(N)},L=0;L<o.length;L++)A(L);r.add(T),jde(k);function D(P,E,O,B,N,W){var H={stroke:y,lineWidth:m,lineDash:x,fill:"none"},$=N?0:1,Z=1-$,G=n[Ge[Z]]+n[tr[Z]];function X(dt){var ke=[],He=[];ke[$]=He[$]=dt,ke[Z]=n[Ge[Z]],He[Z]=G;var tt={x1:ke[0],y1:ke[1],x2:He[0],y2:He[1]};return Tm(tt,tt,{lineWidth:1}),ke[0]=tt.x1,ke[1]=tt.y1,ke[$]}O=X(O),B=X(B);for(var K=[],V=[],U=!0,ae=n[Ge[Z]],ce=0;;ce++){var re=ae===n[Ge[Z]],_e=ae>=G;_e&&(ae=G);var Ne=[],ve=[];Ne[$]=O,ve[$]=B,!re&&!_e&&(Ne[$]+=U?-l:l,ve[$]-=U?l:-l),Ne[Z]=ae,ve[Z]=ae,K.push(Ne),V.push(ve);var fe=void 0;if(ce<P.length?fe=P[ce]:(fe=Math.random(),P.push(fe)),ae+=fe*(c-u)+u,U=!U,_e)break}var Te=er().serializeAxisBreakIdentifier(W.breakOption);if(E.add(new Cr({anid:"break_a_"+Te,shape:{points:K},style:H,z:d})),W.gapReal!==0){E.add(new Cr({anid:"break_b_"+Te,shape:{points:V},style:H,z:d}));var xe=V.slice();xe.reverse();var Ie=K.concat(xe);E.add(new zr({anid:"break_c_"+Te,shape:{points:Ie},style:{fill:_,opacity:v.opacity},z:d}))}}}function Fde(r,e,t,n){var a=r.axis,i=t.transform;Rr(n.style);var o=a.getExtent();a.inverse&&(o=o.slice(),o.reverse());var s=er().retrieveAxisBreakPairs(a.scale.getTicks({breakTicks:"only_break"}),function(m){return m.break},!1),l=ue(s,function(m){var x=m[0].break.parsedBreak,_=[a.dataToCoord(x.vmin,!0),a.dataToCoord(x.vmax,!0)];return _[0]>_[1]&&_.reverse(),{coordPair:_,brkId:er().serializeAxisBreakIdentifier(x.breakOption)}});l.sort(function(m,x){return m.coordPair[0]-x.coordPair[0]});for(var u=o[0],c=null,f=0;f<l.length;f++){var d=l[f],h=Math.max(d.coordPair[0],o[0]),v=Math.min(d.coordPair[1],o[1]);u<=h&&y(u,h,c,d),u=v,c=d}u<=o[1]&&y(u,o[1],c,null);function y(m,x,_,T){function C(O,B){i&&(Gt(O,O,i),Gt(B,B,i))}function k(O,B){var N={x1:O[0],y1:O[1],x2:B[0],y2:B[1]};Tm(N,N,n.style),O[0]=N.x1,O[1]=N.y1,B[0]=N.x2,B[1]=N.y2}var A=[m,0],L=[x,0],D=[m,5],P=[x,5];C(A,D),k(A,D),C(L,P),k(L,P),k(A,L);var E=new Zt(ie({shape:{x1:A[0],y1:A[1],x2:L[0],y2:L[1]}},n));e.add(E),E.anid="breakLine_"+(_?_.brkId:"\0")+"_\0_"+(T?T.brkId:"\0")}}function Vde(r,e,t){if(os(t,function(_){return!_}))return;var n=new Ee;if(!Nm(t[0],t[1],n,{direction:-(r?e+Math.PI:e),touchThreshold:0,bidirectional:!1}))return;var a=hr();to(a,a,-e);var i=ue(t,function(_){return _.transform?Sa(hr(),a,_.transform):a});function o(_){var T=t[0].localRect,C=new Ee(T[tr[_]]*i[0][0],T[tr[_]]*i[0][1]);return Math.abs(C.y)<1e-5}var s=.5;if(o(0)||o(1)){var l=ue(t,function(_,T){var C=_.localRect.clone();return C.applyTransform(i[T]),C}),u=new Ee;u.copy(t[0].label).add(t[1].label).scale(.5),u.transform(a);var c=n.clone().transform(a),f=l[0].x+l[1].x+(c.x>=0?l[0].width:l[1].width),d=(f+c.x)/2-u.x,h=Math.min(d,d-c.x),v=Math.max(d,d-c.x),y=v<0?v:h>0?h:0;s=(d-y)/c.x}var m=new Ee,x=new Ee;Ee.scale(m,n,-s),Ee.scale(x,n,1-s),G_(t[0],m),G_(t[1],x)}function Gde(r,e){var t={breaks:[]};return z(e.breaks,function(n){if(n){var a=os(r.get("breaks",!0),function(s){return er().identifyAxisBreak(s,n)});if(a){var i=e.type,o={isExpanded:!!a.isExpanded};a.isExpanded=i===Bm?!0:i===i4?!1:i===o4?!a.isExpanded:a.isExpanded,t.breaks.push({start:a.start,end:a.end,isExpanded:!!a.isExpanded,old:o})}}}),t}function Wde(){jJ({adjustBreakLabelPair:Vde,buildAxisBreakLine:Fde,rectCoordBuildBreakAxis:Bde,updateModelAxisBreak:Gde})}function $de(r){$J(r),zde(),Wde()}function Hde(){fee(Ude)}function Ude(r,e){z(r,function(t){if(!t.model.get(["axisLabel","inside"])){var n=Yde(t);if(n){var a=t.isHorizontal()?"height":"width",i=t.model.get(["axisLabel","margin"]);e[a]-=n[a]+i,t.position==="top"?e.y+=n.height+i:t.position==="left"&&(e.x+=n.width+i)}}})}function Yde(r){var e=r.model,t=r.scale;if(!e.get(["axisLabel","show"])||t.isBlank())return;var n,a,i=t.getExtent();t instanceof gc?a=t.count():(n=t.getTicks(),a=n.length);var o=r.getLabelModel(),s=Wc(r),l,u=1;a>40&&(u=Math.ceil(a/40));for(var c=0;c<a;c+=u){var f=n?n[c]:{value:i[0]+c},d=s(f,c),h=o.getTextRect(d),v=y(h,o.get("rotate")||0);l?l.union(v):l=v}return l;function y(m,x){var _=x*Math.PI/180,T=m.width,C=m.height,k=T*Math.abs(Math.cos(_))+Math.abs(C*Math.sin(_)),A=T*Math.abs(Math.sin(_))+Math.abs(C*Math.cos(_)),L=new ze(m.x,m.y,k,A);return L}}Ze([OQ]);Ze([DQ]);Ze([rJ,yJ,kJ,Iee,Vee,Ite,nre,Fre,sne,pne,Sne,Ane,bae,Hae,rie,mie,_ie,Pie,Bie,Kie,roe,doe,Koe]);Ze(vse);Ze(Fse);Ze(P4);Ze(Qse);Ze(mF);Ze(rle);Ze(_le);Ze(Dle);Ze(yue);Ze(Oue);Ze(Zh);Ze(Que);Ze(tce);Ze(fce);Ze(xce);Ze(Cce);Ze(Dce);Ze(Vce);Ze(ofe);Ze(T6);Ze(C6);Ze(Mfe);Ze(I6);Ze(D6);Ze(Ife);Ze(zfe);Ze(Xfe);Ze(qfe);Ze(Tde);Ze(qq);Ze($de);Ze(Hde);Ze(Dee);const Xde=Object.freeze(Object.defineProperty({__proto__:null,Axis:aa,ChartView:mt,ComponentModel:Je,ComponentView:Ct,List:Ur,Model:rt,PRIORITY:MB,SeriesModel:St,color:ZH,connect:eK,dataTool:lK,dependencies:OZ,disConnect:tK,disconnect:EB,dispose:rK,env:ot,extendChartView:Oq,extendComponentModel:Rq,extendComponentView:Eq,extendSeriesModel:zq,format:mq,getCoordinateSystemDimensions:aK,getInstanceByDom:cC,getInstanceById:nK,getMap:sK,graphic:yq,helper:uq,init:JZ,innerDrawElementOnCanvas:oC,matrix:TH,number:vq,parseGeoJSON:F_,parseGeoJson:F_,registerAction:Aa,registerCoordinateSystem:NB,registerCustomSeries:iK,registerLayout:jB,registerLoading:vC,registerLocale:NT,registerMap:BB,registerPostInit:zB,registerPostUpdate:OB,registerPreprocessor:dC,registerProcessor:hC,registerTheme:fC,registerTransform:FB,registerUpdateLifecycle:Om,registerVisual:cs,setCanvasCreator:oK,setPlatformAPI:bN,throttle:Em,time:gq,use:Ze,util:xq,vector:uH,version:zZ,zrUtil:rH,zrender:D7},Symbol.toStringTag,{value:"Module"}));var Mi={},ki={},Sb={},zO;function Zde(){return zO||(zO=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var e=1;r.default=function(){return"".concat(e++)}})(Sb)),Sb}var dd={},hd={},bb={},OO;function B6(){return OO||(OO=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,r.default=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,a=null;return function(){for(var i=this,o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];clearTimeout(a),a=setTimeout(function(){t.apply(i,s)},n)}}})(bb)),bb}var Ai={},NO;function z2(){return NO||(NO=1,Object.defineProperty(Ai,"__esModule",{value:!0}),Ai.SizeSensorId=Ai.SensorTabIndex=Ai.SensorClassName=void 0,Ai.SizeSensorId="size-sensor-id",Ai.SensorClassName="size-sensor-object",Ai.SensorTabIndex="-1"),Ai}var jO;function Kde(){if(jO)return hd;jO=1,Object.defineProperty(hd,"__esModule",{value:!0}),hd.createSensor=void 0;var r=t(B6()),e=z2();function t(n){return n&&n.__esModule?n:{default:n}}return hd.createSensor=function(a,i){var o=void 0,s=[],l=function(){getComputedStyle(a).position==="static"&&(a.style.position="relative");var v=document.createElement("object");return v.onload=function(){v.contentDocument.defaultView.addEventListener("resize",u),u()},v.style.display="block",v.style.position="absolute",v.style.top="0",v.style.left="0",v.style.height="100%",v.style.width="100%",v.style.overflow="hidden",v.style.pointerEvents="none",v.style.zIndex="-1",v.style.opacity="0",v.setAttribute("class",e.SensorClassName),v.setAttribute("tabindex",e.SensorTabIndex),v.type="text/html",a.appendChild(v),v.data="about:blank",v},u=(0,r.default)(function(){s.forEach(function(h){h(a)})}),c=function(v){o||(o=l()),s.indexOf(v)===-1&&s.push(v)},f=function(){o&&o.parentNode&&(o.contentDocument&&o.contentDocument.defaultView.removeEventListener("resize",u),o.parentNode.removeChild(o),a.removeAttribute(e.SizeSensorId),o=void 0,s=[],i&&i())},d=function(v){var y=s.indexOf(v);y!==-1&&s.splice(y,1),s.length===0&&o&&f()};return{element:a,bind:c,destroy:f,unbind:d}},hd}var pd={},BO;function qde(){if(BO)return pd;BO=1,Object.defineProperty(pd,"__esModule",{value:!0}),pd.createSensor=void 0;var r=z2(),e=t(B6());function t(n){return n&&n.__esModule?n:{default:n}}return pd.createSensor=function(a,i){var o=void 0,s=[],l=(0,e.default)(function(){s.forEach(function(h){h(a)})}),u=function(){var v=new ResizeObserver(l);return v.observe(a),l(),v},c=function(v){o||(o=u()),s.indexOf(v)===-1&&s.push(v)},f=function(){o&&o.disconnect(),s=[],o=void 0,a.removeAttribute(r.SizeSensorId),i&&i()},d=function(v){var y=s.indexOf(v);y!==-1&&s.splice(y,1),s.length===0&&o&&f()};return{element:a,bind:c,destroy:f,unbind:d}},pd}var FO;function Qde(){if(FO)return dd;FO=1,Object.defineProperty(dd,"__esModule",{value:!0}),dd.createSensor=void 0;var r=Kde(),e=qde();return dd.createSensor=typeof ResizeObserver<"u"?e.createSensor:r.createSensor,dd}var VO;function Jde(){if(VO)return ki;VO=1,Object.defineProperty(ki,"__esModule",{value:!0}),ki.removeSensor=ki.getSensor=ki.Sensors=void 0;var r=n(Zde()),e=Qde(),t=z2();function n(o){return o&&o.__esModule?o:{default:o}}var a=ki.Sensors={};function i(o){o&&a[o]&&delete a[o]}return ki.getSensor=function(s){var l=s.getAttribute(t.SizeSensorId);if(l&&a[l])return a[l];var u=(0,r.default)();s.setAttribute(t.SizeSensorId,u);var c=(0,e.createSensor)(s,function(){return i(u)});return a[u]=c,c},ki.removeSensor=function(s){var l=s.element.getAttribute(t.SizeSensorId);s.destroy(),i(l)},ki}var GO;function ehe(){if(GO)return Mi;GO=1,Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.ver=Mi.clear=Mi.bind=void 0;var r=Jde();return Mi.bind=function(t,n){var a=(0,r.getSensor)(t);return a.bind(n),function(){a.unbind(n)}},Mi.clear=function(t){var n=(0,r.getSensor)(t);(0,r.removeSensor)(n)},Mi.ver="1.0.3",Mi}var WO=ehe();function $O(r,e){var t={};return e.forEach(function(n){t[n]=r[n]}),t}function _b(r){return typeof r=="function"}function the(r){return typeof r=="string"}var wb,HO;function rhe(){return HO||(HO=1,wb=function r(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,a,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(a=n;a--!==0;)if(!r(e[a],t[a]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(a=n;a--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[a]))return!1;for(a=n;a--!==0;){var o=i[a];if(!r(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}),wb}var nhe=rhe();const Bu=Hw(nhe);var ahe=(function(r){Q(e,r);function e(t){var n=r.call(this,t)||this;return n.echarts=t.echarts,n.ele=null,n.isInitialResize=!0,n.eventHandlerRefs={},n}return e.prototype.componentDidMount=function(){this.renderNewEcharts()},e.prototype.componentDidUpdate=function(t){var n=this.props.shouldSetOption;if(!(_b(n)&&!n(t,this.props))){if(!Bu(t.theme,this.props.theme)||!Bu(t.opts,this.props.opts)){this.dispose(),this.renderNewEcharts();return}var a=this.getEchartsInstance();Bu(t.onEvents,this.props.onEvents)||(this.unbindEvents(a),this.bindEvents(a,this.props.onEvents));var i=["option","notMerge","replaceMerge","lazyUpdate","showLoading","loadingOption"];Bu($O(this.props,i),$O(t,i))||this.updateEChartsOption(),(!Bu(t.style,this.props.style)||!Bu(t.className,this.props.className))&&this.resize()}},e.prototype.componentWillUnmount=function(){this.dispose()},e.prototype.initEchartsInstance=function(){return aL(this,void 0,void 0,function(){var t=this;return iL(this,function(n){return[2,new Promise(function(a){t.echarts.init(t.ele,t.props.theme,t.props.opts);var i=t.getEchartsInstance();i.on("finished",function(){var o=t.ele.clientWidth,s=t.ele.clientHeight;t.echarts.dispose(t.ele);var l=Id({width:o,height:s},t.props.opts);a(t.echarts.init(t.ele,t.props.theme,l))})})]})})},e.prototype.getEchartsInstance=function(){return this.echarts.getInstanceByDom(this.ele)},e.prototype.dispose=function(){if(this.ele){try{WO.clear(this.ele)}catch(t){console.warn(t)}this.echarts.dispose(this.ele)}},e.prototype.renderNewEcharts=function(){return aL(this,void 0,void 0,function(){var t,n,a,i,o,s,l=this;return iL(this,function(u){switch(u.label){case 0:return t=this.props,n=t.onEvents,a=t.onChartReady,i=t.autoResize,o=i===void 0?!0:i,[4,this.initEchartsInstance()];case 1:return u.sent(),s=this.updateEChartsOption(),this.bindEvents(s,n||{}),_b(a)&&a(s),this.ele&&o&&WO.bind(this.ele,function(){l.resize()}),[2]}})})},e.prototype.bindEvents=function(t,n){var a=this,i=function(s,l){if(the(s)&&_b(l)){var u=function(c){l(c,t)};t.on(s,u),a.eventHandlerRefs[s]=u}};for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&i(o,n[o])},e.prototype.unbindEvents=function(t){for(var n=0,a=Object.entries(this.eventHandlerRefs);n<a.length;n++){var i=a[n],o=i[0],s=i[1];t.off(o,s)}this.eventHandlerRefs={}},e.prototype.updateEChartsOption=function(){var t=this.props,n=t.option,a=t.notMerge,i=a===void 0?!1:a,o=t.replaceMerge,s=o===void 0?null:o,l=t.lazyUpdate,u=l===void 0?!1:l,c=t.showLoading,f=t.loadingOption,d=f===void 0?null:f,h=this.getEchartsInstance();return h.setOption(n,{notMerge:i,replaceMerge:s,lazyUpdate:u}),c?h.showLoading(d):h.hideLoading(),h},e.prototype.resize=function(){var t=this.getEchartsInstance();if(!this.isInitialResize)try{t.resize({width:"auto",height:"auto"})}catch(n){console.warn(n)}this.isInitialResize=!1},e.prototype.render=function(){var t=this,n=this.props,a=n.style,i=n.className,o=i===void 0?"":i;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=j$(n,["style","className","echarts","option","theme","notMerge","replaceMerge","lazyUpdate","showLoading","loadingOption","opts","onChartReady","onEvents","shouldSetOption","autoResize"]),l=Id({height:300},a);return Ad.createElement("div",Id({ref:function(u){t.ele=u},style:l,className:"echarts-for-react ".concat(o)},s))},e})(Y.PureComponent),Xm=(function(r){Q(e,r);function e(t){var n=r.call(this,t)||this;return n.echarts=Xde,n}return e})(ahe);function O2({title:r,children:e,height:t="180px"}){return b.jsxs("div",{style:{background:S.bgCard,borderRadius:"8px",border:`1px solid ${S.borderLight}`,padding:"14px",boxShadow:`0 1px 3px ${S.shadowSm}`},children:[b.jsx("h4",{style:{fontSize:"10px",fontWeight:"600",color:S.textTertiary,fontFamily:j.body,margin:"0 0 10px 0",textTransform:"uppercase",letterSpacing:"0.05em"},children:r}),b.jsx("div",{style:{height:t},children:e})]})}const F6={critical:S.error,high:"#ea580c",medium:"#b45309",low:"#0d9488",info:S.textTertiary},Gw={"owasp-mcp":"#0d9488","agentic-security":"#374151",yara:"#57534e","general-security":S.accentGreen},UO={"owasp-mcp":"OWASP MCP","agentic-security":"Agentic","general-security":"General"},rm={MCP01:"owasp-mcp",MCP02:"owasp-mcp",MCP03:"owasp-mcp",MCP04:"owasp-mcp",MCP05:"owasp-mcp",MCP06:"owasp-mcp",MCP07:"owasp-mcp",MCP08:"owasp-mcp",MCP09:"owasp-mcp",MCP10:"owasp-mcp",ASI01:"agentic-security",ASI02:"agentic-security",ASI03:"agentic-security",ASI04:"agentic-security",ASI05:"agentic-security",ASI06:"agentic-security",ASI07:"agentic-security",ASI08:"agentic-security",ASI09:"agentic-security",ASI10:"agentic-security"};function ihe(r){const e=r.owasp_id?.toUpperCase();return e&&rm[e]?rm[e]:"general-security"}function ohe({findings:r}){const e=[],t=[],n=new Set,a={},i={};for(const s of r){const l=ihe(s),u=s.owasp_id||"OTHER",c=s.severity||"info",f=`${l}|${u}`;a[f]=(a[f]||0)+1;const d=`${u}|${c}`;if(i[d]=(i[d]||0)+1,n.has(l)||(n.add(l),e.push({name:UO[l]||l,itemStyle:{color:Gw[l]}})),!n.has(u)){n.add(u);const h=rm[u]||"general-security";e.push({name:u,itemStyle:{color:Gw[h]}})}n.has(c)||(n.add(c),e.push({name:c.charAt(0).toUpperCase()+c.slice(1),itemStyle:{color:F6[c]}}))}for(const[s,l]of Object.entries(a)){const[u,c]=s.split("|");t.push({source:UO[u]||u,target:c,value:l})}for(const[s,l]of Object.entries(i)){const[u,c]=s.split("|");t.push({source:u,target:c.charAt(0).toUpperCase()+c.slice(1),value:l})}const o={tooltip:{trigger:"item",triggerOn:"mousemove",backgroundColor:S.bgCard,borderColor:S.borderLight,textStyle:{color:S.textPrimary,fontFamily:j.body,fontSize:11}},series:[{type:"sankey",layout:"none",emphasis:{focus:"adjacency"},nodeAlign:"left",data:e,links:t,lineStyle:{color:"gradient",curveness:.5,opacity:.25},label:{color:S.textSecondary,fontFamily:j.body,fontSize:10},itemStyle:{borderWidth:0}}]};return b.jsx(O2,{title:"Findings Flow",height:"200px",children:b.jsx(Xm,{option:o,style:{height:"100%"}})})}function she({findings:r}){const e=r.reduce((o,s)=>{const l=s.severity||"info";return o[l]=(o[l]||0)+1,o},{}),t=["critical","high","medium","low","info"],n=["Critical","High","Medium","Low","Info"],a=t.map(o=>e[o]||0),i={tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:S.bgCard,borderColor:S.borderLight,textStyle:{color:S.textPrimary,fontFamily:j.body,fontSize:11}},grid:{left:"3%",right:"4%",bottom:"3%",top:"8%",containLabel:!0},xAxis:{type:"category",data:n,axisLabel:{color:S.textSecondary,fontFamily:j.body,fontSize:10},axisLine:{lineStyle:{color:S.borderLight}},axisTick:{show:!1}},yAxis:{type:"value",axisLabel:{color:S.textTertiary,fontFamily:j.body,fontSize:10},axisLine:{show:!1},splitLine:{lineStyle:{color:S.borderLight,type:"dashed"}}},series:[{type:"bar",data:a.map((o,s)=>({value:o,itemStyle:{color:F6[t[s]]}})),barWidth:"50%",itemStyle:{borderRadius:[3,3,0,0]},label:{show:!0,position:"top",color:S.textTertiary,fontFamily:j.body,fontSize:10,formatter:o=>o.value>0?o.value:""}}]};return b.jsx(O2,{title:"Severity Distribution",children:b.jsx(Xm,{option:i,style:{height:"100%"}})})}function lhe({findings:r}){const e=r.reduce((l,u)=>{const c=u.owasp_id||"OTHER";return l[c]=(l[c]||0)+1,l},{}),t=Object.entries(e).sort((l,u)=>u[1]-l[1]).slice(0,8),n=t.map(([l])=>l).reverse(),a=t.map(([,l])=>l).reverse(),i=n.map(l=>{const u=rm[l]||"general-security";return Gw[u]}),o={tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:S.bgCard,borderColor:S.borderLight,textStyle:{color:S.textPrimary,fontFamily:j.body,fontSize:11}},grid:{left:"3%",right:"12%",bottom:"3%",top:"3%",containLabel:!0},xAxis:{type:"value",axisLabel:{color:S.textTertiary,fontFamily:j.body,fontSize:10},axisLine:{show:!1},splitLine:{lineStyle:{color:S.borderLight,type:"dashed"}}},yAxis:{type:"category",data:n,axisLabel:{color:S.textSecondary,fontFamily:j.mono,fontSize:10},axisLine:{lineStyle:{color:S.borderLight}},axisTick:{show:!1}},series:[{type:"bar",data:a.map((l,u)=>({value:l,itemStyle:{color:i[u]}})),barWidth:"60%",itemStyle:{borderRadius:[0,3,3,0]},label:{show:!0,position:"right",color:S.textTertiary,fontFamily:j.body,fontSize:10}}]},s=Math.max(160,t.length*22);return b.jsx(O2,{title:"Top Vulnerability Types",height:`${s}px`,children:b.jsx(Xm,{option:o,style:{height:"100%"}})})}function uhe({findings:r}){return!r||r.length===0?null:b.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"12px",marginBottom:"16px"},children:[b.jsx(she,{findings:r}),b.jsx(lhe,{findings:r}),b.jsx("div",{style:{gridColumn:"span 2"},children:b.jsx(ohe,{findings:r})})]})}const che={critical:{color:S.error,label:"Critical"},high:{color:"#ea580c",label:"High"},medium:{color:"#b45309",label:"Medium"},low:{color:"#0d9488",label:"Low"}};function fhe({count:r,label:e,color:t}){const n=r>0;return b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",padding:"6px 10px",background:n?`${t}10`:S.bgTertiary,border:`1px solid ${n?`${t}30`:S.borderLight}`,borderRadius:"6px"},children:[b.jsx("span",{style:{fontSize:"14px",fontWeight:"600",color:n?t:S.textTertiary,fontFamily:j.body},children:r||0}),b.jsx("span",{style:{fontSize:"11px",color:n?t:S.textTertiary,fontFamily:j.body},children:e})]})}function dhe({summary:r}){if(!r)return b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",padding:"8px 12px",background:S.bgTertiary,border:`1px solid ${S.borderLight}`,borderRadius:"6px"},children:[b.jsx(Cc,{size:14,color:S.textTertiary,stroke:1.5}),b.jsx("span",{style:{fontSize:"12px",color:S.textSecondary,fontFamily:j.body},children:"Run a scan to analyze MCP traffic"})]});const{total:e,bySeverity:t}=r;return b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap"},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",padding:"6px 12px",background:e>0?`${S.error}10`:`${S.accentGreen}10`,border:`1px solid ${e>0?`${S.error}30`:`${S.accentGreen}30`}`,borderRadius:"6px"},children:[b.jsx("span",{style:{fontSize:"16px",fontWeight:"700",color:e>0?S.error:S.accentGreen,fontFamily:j.body},children:e}),b.jsx("span",{style:{fontSize:"12px",color:e>0?S.error:S.accentGreen,fontFamily:j.body},children:e===1?"Finding":"Findings"})]}),Object.entries(che).map(([n,a])=>b.jsx(fhe,{count:t?.[n]||0,label:a.label,color:a.color},n))]})}const Tb={critical:S.error,high:"#ea580c",medium:"#b45309",low:"#0d9488",info:S.textTertiary},Mh={tool:{icon:sm,color:"#0d9488",label:"Tools"},prompt:{icon:is,color:"#374151",label:"Prompts"},resource:{icon:qu,color:S.accentGreen,label:"Resources"},server:{icon:qu,color:"#57534e",label:"Servers"},packet:{icon:qu,color:S.accentPink,label:"Network Traffic"}};function hhe({targetName:r,targetType:e,findings:t,selectedFinding:n,onSelectFinding:a}){const[i,o]=Y.useState(!0),s=Mh[e]||Mh.tool,l=s.icon,u=t.reduce((d,h)=>(d[h.severity||"info"]=(d[h.severity||"info"]||0)+1,d),{}),c=["critical","high","medium","low","info"],f=c.find(d=>u[d]>0)||"info";return b.jsxs("div",{style:{marginBottom:"6px",background:S.bgCard,borderRadius:"6px",border:`1px solid ${S.borderLight}`,overflow:"hidden"},children:[b.jsxs("button",{type:"button",onClick:()=>o(!i),"aria-expanded":i,style:{display:"flex",alignItems:"center",gap:"8px",padding:"8px 12px",width:"100%",background:"transparent",border:"none",borderLeft:`3px solid ${Tb[f]}`,cursor:"pointer",textAlign:"left",transition:"background 0.15s"},onMouseEnter:d=>{d.currentTarget.style.background=S.bgTertiary},onMouseLeave:d=>{d.currentTarget.style.background="transparent"},children:[i?b.jsx(ui,{size:12,color:S.textTertiary}):b.jsx(Rl,{size:12,color:S.textTertiary}),b.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"20px",height:"20px",borderRadius:"4px",background:`${s.color}15`},children:b.jsx(l,{size:10,color:s.color,stroke:1.5})}),b.jsx("span",{style:{flex:1,fontSize:"12px",fontWeight:"500",color:S.textPrimary,fontFamily:j.mono},children:r}),b.jsx("div",{style:{display:"flex",gap:"4px",alignItems:"center"},children:c.map(d=>u[d]>0&&b.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"2px",fontSize:"10px",color:Tb[d],fontWeight:"500"},children:[b.jsx("span",{style:{width:"5px",height:"5px",borderRadius:"50%",background:Tb[d]}}),u[d]]},d))}),b.jsx("span",{style:{padding:"2px 6px",background:S.bgTertiary,borderRadius:"8px",fontSize:"10px",color:S.textSecondary,fontWeight:"500"},children:t.length})]}),i&&b.jsx("div",{style:{padding:"10px",paddingLeft:"36px",background:S.bgTertiary,borderTop:`1px solid ${S.borderLight}`},children:t.map(d=>b.jsx(Qw,{finding:d,isExpanded:n?.id===d.id,onToggle:()=>a(n?.id===d.id?null:d)},d.id))})]})}function phe({targetType:r,targets:e,selectedFinding:t,onSelectFinding:n}){const[a,i]=Y.useState(!0),o=Mh[r]||Mh.tool,s=o.icon,l=Object.values(e).reduce((c,f)=>c+f.length,0),u=Object.keys(e).length;return b.jsxs("div",{style:{marginBottom:"16px"},children:[b.jsxs("button",{type:"button",onClick:()=>i(!a),"aria-expanded":a,style:{display:"flex",alignItems:"center",gap:"10px",padding:"12px 14px",width:"100%",background:S.bgCard,border:`1px solid ${S.borderLight}`,borderRadius:"8px",cursor:"pointer",textAlign:"left",marginBottom:a?"10px":0,transition:"background 0.15s"},onMouseEnter:c=>{c.currentTarget.style.background=S.bgTertiary},onMouseLeave:c=>{c.currentTarget.style.background=S.bgCard},children:[b.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",borderRadius:"6px",background:`${o.color}15`,border:`1px solid ${o.color}30`},children:b.jsx(s,{size:16,color:o.color,stroke:1.5})}),b.jsxs("div",{style:{flex:1},children:[b.jsx("div",{style:{fontSize:"13px",fontWeight:"500",color:S.textPrimary,fontFamily:j.body},children:o.label}),b.jsxs("div",{style:{fontSize:"11px",color:S.textTertiary,fontFamily:j.body},children:[u," ",u===1?"target":"targets"," with issues"]})]}),b.jsxs("div",{style:{textAlign:"right",marginRight:"6px"},children:[b.jsx("div",{style:{fontSize:"16px",fontWeight:"600",color:o.color,lineHeight:1},children:l}),b.jsx("div",{style:{fontSize:"10px",color:S.textTertiary},children:l===1?"finding":"findings"})]}),a?b.jsx(ui,{size:16,color:S.textTertiary}):b.jsx(Rl,{size:16,color:S.textTertiary})]}),a&&b.jsx("div",{style:{marginLeft:"10px"},children:Object.entries(e).sort((c,f)=>f[1].length-c[1].length).map(([c,f])=>b.jsx(hhe,{targetName:c,targetType:r,findings:f,selectedFinding:t,onSelectFinding:n},c))})]})}function vhe({findings:r,selectedFinding:e,onSelectFinding:t}){const n={};for(const l of r){const u=l.target_type||"tool",c=l.target_name||"Unknown";n[u]||(n[u]={}),n[u][c]||(n[u][c]=[]),n[u][c].push(l)}const i=["tool","prompt","resource","server","packet"].filter(l=>n[l]&&Object.keys(n[l]).length>0),o=Y.useCallback(l=>{const u=document.getElementById(`target-type-${l}`);u&&u.scrollIntoView({behavior:"smooth",block:"start"})},[]),s=l=>n[l]?Object.values(n[l]).reduce((u,c)=>u+c.length,0):0;return i.length===0?b.jsx("div",{style:{background:S.bgCard,borderRadius:"8px",border:`1px solid ${S.borderLight}`,padding:"40px",textAlign:"center"},children:b.jsx("p",{style:{fontSize:"13px",color:S.textSecondary,fontFamily:j.body,margin:0},children:"No findings yet."})}):b.jsxs("div",{children:[b.jsx("div",{style:{display:"flex",gap:"8px",marginBottom:"16px",flexWrap:"wrap"},children:i.map(l=>{const u=Mh[l],c=u.icon;return b.jsxs("button",{type:"button",onClick:()=>o(l),style:{display:"flex",alignItems:"center",gap:"6px",padding:"6px 12px",background:`${u.color}10`,border:`1px solid ${u.color}30`,borderRadius:"6px",cursor:"pointer",fontFamily:j.body,fontSize:"12px",color:u.color,fontWeight:500,transition:"all 0.15s"},onMouseEnter:f=>{f.currentTarget.style.background=`${u.color}20`,f.currentTarget.style.borderColor=`${u.color}50`},onMouseLeave:f=>{f.currentTarget.style.background=`${u.color}10`,f.currentTarget.style.borderColor=`${u.color}30`},children:[b.jsx(c,{size:14,stroke:1.5}),u.label,b.jsx("span",{style:{background:u.color,color:"#fff",borderRadius:"10px",padding:"1px 6px",fontSize:"10px",fontWeight:600},children:s(l)})]},l)})}),i.map(l=>b.jsx("div",{id:`target-type-${l}`,children:b.jsx(phe,{targetType:l,targets:n[l],selectedFinding:e,onSelectFinding:t})},l))]})}function ghe(r){const e=(r||"").toUpperCase();return e==="HIGH"?S.error:e==="MEDIUM"?S.warning:S.textSecondary}function yhe({snapshot:r,loading:e,error:t,onRefresh:n,onReplay:a}){const i=r?.toxicFlows??[],o=r?.servers??[],s=r?.replay;return b.jsxs("div",{style:{marginBottom:"20px",padding:"14px 16px",background:S.bgSecondary,border:`1px solid ${S.borderLight}`,borderRadius:"8px"},children:[b.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"12px",flexWrap:"wrap",marginBottom:"10px"},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",minWidth:0},children:[b.jsx(rW,{size:18,stroke:1.5,style:{color:S.textMuted,flexShrink:0}}),b.jsxs("div",{children:[b.jsx("div",{style:{fontSize:"13px",fontWeight:600,color:S.textPrimary,fontFamily:j.body},children:"Toxic flows (proxy traffic)"}),b.jsxs("div",{style:{fontSize:"11px",color:S.textSecondary,fontFamily:j.body,marginTop:"2px",maxWidth:"720px",lineHeight:1.45},children:["Heuristic cross-server pairs from ",b.jsx("strong",{children:"tools/list"})," responses seen through the HTTP proxy. Run MCP clients through mcp-shark, trigger tool discovery, then refresh or replay from the packet database. Clearing findings or all captured traffic resets this in-memory model."]})]})]}),b.jsxs("div",{style:{display:"flex",gap:"8px",flexShrink:0},children:[b.jsxs("button",{type:"button",disabled:e,onClick:()=>n(),style:{display:"flex",alignItems:"center",gap:"6px",padding:"6px 12px",fontSize:"11px",fontWeight:500,fontFamily:j.body,background:S.buttonSecondary,border:`1px solid ${S.borderLight}`,borderRadius:"4px",cursor:e?"wait":"pointer",color:S.textPrimary},children:[b.jsx(Qo,{size:14,stroke:1.5}),"Refresh"]}),b.jsxs("button",{type:"button",disabled:e,onClick:()=>a(),style:{display:"flex",alignItems:"center",gap:"6px",padding:"6px 12px",fontSize:"11px",fontWeight:500,fontFamily:j.body,background:S.buttonPrimary,border:"none",borderRadius:"4px",cursor:e?"wait":"pointer",color:S.textInverse},children:[b.jsx(dN,{size:14,stroke:1.5}),"Replay from DB"]})]})]}),t&&b.jsx("div",{style:{fontSize:"12px",color:S.error,background:S.errorBg,padding:"8px 10px",borderRadius:"4px",marginBottom:"10px",fontFamily:j.body},children:t}),e&&!r&&!t&&b.jsx("div",{style:{fontSize:"12px",color:S.textSecondary,fontFamily:j.body},children:"Loading…"}),r&&!t&&b.jsx("div",{style:{fontSize:"11px",color:S.textSecondary,fontFamily:j.body},children:o.length>0?b.jsxs("span",{children:[b.jsx("strong",{style:{color:S.textPrimary},children:o.length})," server",o.length!==1?"s":""," with tool metadata",r.computedAt?` · updated ${new Date(r.computedAt).toLocaleString()}`:"",s!=null?` · replay scanned ${s.packetRows} packet row${s.packetRows!==1?"s":""}`:""]}):b.jsxs("span",{children:["No ",b.jsx("code",{style:{fontFamily:j.mono},children:"tools/list"})," traffic captured yet. Use the proxy, open a client that lists tools, then Refresh or Replay from DB."]})}),i.length>0&&b.jsx("ul",{style:{listStyle:"none",margin:"12px 0 0",padding:0,display:"flex",flexDirection:"column",gap:"10px"},children:i.map((l,u)=>b.jsxs("li",{style:{padding:"10px 12px",background:S.bgCard,border:`1px solid ${S.borderLight}`,borderRadius:"6px"},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap"},children:[b.jsx("span",{style:{fontSize:"10px",fontWeight:700,letterSpacing:"0.04em",color:ghe(l.risk),fontFamily:j.body},children:(l.risk||"").toUpperCase()}),b.jsx("span",{style:{fontSize:"12px",fontWeight:600,color:S.textPrimary,fontFamily:j.body},children:l.title})]}),b.jsxs("div",{style:{fontSize:"11px",color:S.accentBlue,fontFamily:j.mono,marginTop:"4px"},children:[l.source," → ",l.target]}),l.scenario&&b.jsx("div",{style:{fontSize:"11px",color:S.textSecondary,fontFamily:j.body,marginTop:"6px",lineHeight:1.45},children:l.scenario})]},`${l.source}-${l.target}-${l.title}-${u}`))}),r&&o.length>0&&b.jsx("div",{style:{marginTop:"12px",fontSize:"10px",color:S.textTertiary,fontFamily:j.body,lineHeight:1.4},children:r.note})]})}const mhe=2e4,xhe=[{id:"dashboard",label:"Dashboard",icon:FG},{id:"severity",label:"By Severity",icon:vN},{id:"category",label:"By Category",icon:jG},{id:"target",label:"By Target",icon:sm}];function She({onNavigateToSmartScan:r}){return b.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"16px",padding:"10px 16px",marginBottom:"16px",background:S.bgSecondary,border:`1px solid ${S.borderLight}`,borderRadius:"6px"},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px"},children:[b.jsx(is,{size:16,stroke:1.5,style:{color:S.textMuted,flexShrink:0}}),b.jsxs("span",{style:{fontSize:"12px",color:S.textSecondary,fontFamily:j.body},children:[b.jsx("strong",{style:{color:S.textPrimary},children:"Static Analysis"})," — Rule-based pattern matching on MCP configurations. For deeper semantic analysis, try AI-powered scanning."]})]}),b.jsxs("button",{type:"button",onClick:r,style:{display:"flex",alignItems:"center",gap:"6px",padding:"6px 12px",background:S.accentGreen,color:"#fff",border:"none",borderRadius:"4px",fontSize:"11px",fontWeight:500,fontFamily:j.body,cursor:"pointer",transition:"opacity 0.15s"},onMouseEnter:e=>{e.currentTarget.style.opacity="0.9"},onMouseLeave:e=>{e.currentTarget.style.opacity="1"},children:[b.jsx(zW,{size:13,stroke:2}),"Try AI-Powered Smart Scan",b.jsx($g,{size:12,stroke:2})]})]})}function bhe({viewMode:r,onViewModeChange:e}){return b.jsx("div",{style:{display:"inline-flex",alignItems:"center",background:S.bgTertiary,borderRadius:"6px",border:`1px solid ${S.borderLight}`,padding:"2px"},children:xhe.map(t=>{const n=t.icon,a=r===t.id;return b.jsxs("button",{onClick:()=>e(t.id),type:"button",style:{display:"flex",alignItems:"center",gap:"5px",padding:"5px 10px",background:a?S.bgCard:"transparent",color:a?S.textPrimary:S.textSecondary,border:"none",borderRadius:"4px",fontSize:"11px",fontWeight:a?"500":"400",fontFamily:j.body,cursor:"pointer",transition:"all 0.15s",boxShadow:a?`0 1px 2px ${S.shadowSm}`:"none"},onMouseEnter:i=>{a||(i.currentTarget.style.color=S.textPrimary)},onMouseLeave:i=>{a||(i.currentTarget.style.color=S.textSecondary)},children:[b.jsx(n,{size:12,stroke:1.5}),t.label]},t.id)})})}function _he({error:r,scanning:e,findings:t,summary:n,selectedFinding:a,onSelectFinding:i,loadSummary:o,onNavigateToSmartScan:s,onNavigateToSetup:l,scanHistory:u,selectedScanId:c,onSelectScan:f,showHistory:d,serversAvailable:h,scanComplete:v,trafficToxicSnapshot:y,trafficToxicLoading:m,trafficToxicError:x,loadTrafficToxicFlows:_,replayTrafficToxicFlows:T}){const[C,k]=Y.useState("dashboard"),A=t&&t.length>0,L=!r&&!e&&!A&&!d;return Y.useEffect(()=>{if(r||e)return;const D=setInterval(()=>{_()},mhe);return()=>clearInterval(D)},[r,e,_]),b.jsxs("div",{style:{flex:1,overflowY:"auto",overflowX:"hidden",padding:"20px",background:S.bgPrimary},children:[b.jsx(L$,{error:r,onNavigateToSetup:l}),b.jsx(N$,{scanning:e}),!r&&!e&&b.jsx(She,{onNavigateToSmartScan:s}),!r&&!e&&b.jsx(h$,{}),!r&&!e&&b.jsx(yhe,{snapshot:y,loading:m,error:x,onRefresh:_,onReplay:T}),d&&!e&&b.jsx(R$,{history:u,onSelectScan:f,selectedScanId:c,expanded:!0}),L&&b.jsx(z$,{onNavigateToSetup:l,serversAvailable:h,scanComplete:v}),A&&!e&&!r&&b.jsxs(b.Fragment,{children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"12px",marginBottom:"16px",flexWrap:"wrap"},children:[b.jsx(dhe,{summary:n,onRefresh:o}),b.jsx(bhe,{viewMode:C,onViewModeChange:k})]}),C==="dashboard"&&b.jsxs(b.Fragment,{children:[b.jsx(uhe,{findings:t}),b.jsx(rL,{findings:t,selectedFinding:a,onSelectFinding:i,showFilter:!1})]}),C==="severity"&&b.jsx(rL,{findings:t,selectedFinding:a,onSelectFinding:i}),C==="category"&&b.jsx(A$,{findings:t,selectedFinding:a,onSelectFinding:i}),C==="target"&&b.jsx(vhe,{findings:t,selectedFinding:a,onSelectFinding:i})]})]})}function whe({onScan:r,scanning:e,onClear:t,clearing:n,onToggleHistory:a,showHistory:i,historyCount:o,serversAvailable:s}){const l=e||!s;return b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[b.jsxs("button",{type:"button",onClick:r,disabled:l,title:s?"":"No MCP servers running. Go to Setup to start servers.",style:{display:"flex",alignItems:"center",gap:"6px",padding:"8px 14px",background:l?S.buttonSecondary:S.buttonPrimary,color:l?S.textTertiary:S.textInverse,border:"none",borderRadius:"6px",fontSize:"12px",fontFamily:j.body,fontWeight:"600",cursor:l?"not-allowed":"pointer",opacity:!s&&!e?.6:1,transition:"all 0.2s ease",whiteSpace:"nowrap"},onMouseEnter:u=>{l||(u.currentTarget.style.background=S.buttonPrimaryHover,u.currentTarget.style.transform="translateY(-1px)")},onMouseLeave:u=>{l||(u.currentTarget.style.background=S.buttonPrimary,u.currentTarget.style.transform="translateY(0)")},children:[e?b.jsx(Lb,{size:12,className:"spin"}):b.jsx(Kw,{size:12}),e?"Analysing...":"Analyse"]}),b.jsxs("button",{type:"button",onClick:a,style:{display:"flex",alignItems:"center",gap:"6px",padding:"8px 14px",background:i?S.accentGreen:S.buttonSecondary,color:i?"#fff":S.textSecondary,border:`1px solid ${i?S.accentGreen:S.borderLight}`,borderRadius:"8px",fontSize:"12px",fontFamily:j.body,fontWeight:"500",cursor:"pointer",transition:"all 0.2s ease",whiteSpace:"nowrap"},onMouseEnter:u=>{i||(u.currentTarget.style.background=S.buttonSecondaryHover,u.currentTarget.style.color=S.textPrimary)},onMouseLeave:u=>{i||(u.currentTarget.style.background=S.buttonSecondary,u.currentTarget.style.color=S.textSecondary)},children:[b.jsx(aW,{size:14,stroke:1.5}),"History",o>0&&b.jsx("span",{style:{background:i?"rgba(255,255,255,0.2)":S.bgTertiary,color:i?"#fff":S.textMuted,padding:"1px 6px",borderRadius:"10px",fontSize:"10px",fontWeight:600,fontFamily:j.mono},children:o})]}),b.jsxs("button",{type:"button",onClick:t,disabled:n,style:{display:"flex",alignItems:"center",gap:"6px",padding:"8px 14px",background:S.buttonSecondary,color:n?S.textTertiary:S.textSecondary,border:`1px solid ${S.borderLight}`,borderRadius:"8px",fontSize:"12px",fontFamily:j.body,fontWeight:"500",cursor:n?"not-allowed":"pointer",opacity:n?.6:1,transition:"all 0.2s ease",whiteSpace:"nowrap"},onMouseEnter:u=>{n||(u.currentTarget.style.background=S.buttonSecondaryHover,u.currentTarget.style.color=S.textPrimary)},onMouseLeave:u=>{n||(u.currentTarget.style.background=S.buttonSecondary,u.currentTarget.style.color=S.textSecondary)},children:[n?b.jsx(Lb,{size:14,className:"spin"}):b.jsx(Mc,{size:14,stroke:1.5}),n?"Clearing...":"Clear"]})]})}function The(){return b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginRight:"auto"},children:[b.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"40px",height:"40px",borderRadius:"10px",background:`${S.error}15`,border:`1px solid ${S.error}30`,flexShrink:0},children:b.jsx(Cc,{size:20,color:S.error,stroke:1.5})}),b.jsxs("div",{children:[b.jsx("h1",{style:{fontSize:"18px",fontWeight:"700",color:S.textPrimary,fontFamily:j.body,margin:0,letterSpacing:"-0.2px"},children:"Local Static Analysis"}),b.jsx("p",{style:{fontSize:"11px",color:S.textSecondary,fontFamily:j.body,margin:0,lineHeight:"1.3"},children:"Offline YARA-based scanning of captured MCP traffic"})]})]})}function Che({activeTab:r,setActiveTab:e}){return b.jsxs("div",{style:{display:"flex",gap:"8px",border:`1px solid ${S.borderLight}`,borderRadius:"8px",padding:"4px",background:S.bgSecondary},children:[b.jsx("button",{type:"button",onClick:()=>e("scanner"),style:{padding:"6px 14px",background:r==="scanner"?S.bgCard:"transparent",border:"none",color:r==="scanner"?S.textPrimary:S.textSecondary,borderRadius:"6px",fontSize:"12px",fontFamily:j.body,fontWeight:r==="scanner"?"600":"400",cursor:"pointer",transition:"all 0.2s"},children:"OWASP Local Static Analysis"}),b.jsx("button",{type:"button",onClick:()=>e("rules"),style:{padding:"6px 14px",background:r==="rules"?S.bgCard:"transparent",border:"none",color:r==="rules"?S.textPrimary:S.textSecondary,borderRadius:"6px",fontSize:"12px",fontFamily:j.body,fontWeight:r==="rules"?"600":"400",cursor:"pointer",transition:"all 0.2s"},children:"YARA Detection"})]})}async function Mhe(){return(await fetch("/api/security/rules")).json()}async function khe(r){const e=new URLSearchParams;return r.severity&&e.append("severity",r.severity),r.owasp_id&&e.append("owasp_id",r.owasp_id),r.server_name&&e.append("server_name",r.server_name),r.finding_type&&e.append("finding_type",r.finding_type),e.append("limit","100"),(await fetch(`/api/security/findings?${e.toString()}`)).json()}async function Ahe(){return(await fetch("/api/security/summary")).json()}async function Lhe(r=20){return(await fetch(`/api/security/history?limit=${r}`)).json()}async function Ihe(){return(await fetch("/api/security/analyse",{method:"POST",headers:{"Content-Type":"application/json"}})).json()}async function Dhe(){return(await fetch("/api/server/connected")).json()}async function Phe(){return(await fetch("/api/security/findings/clear",{method:"POST"})).json()}async function Rhe(){return(await fetch("/api/security/traffic-toxic-flows")).json()}async function Ehe(){return(await fetch("/api/security/traffic-toxic-flows/replay",{method:"POST",headers:{"Content-Type":"application/json"}})).json()}async function zhe(){return(await fetch("/api/security/community-rules")).json()}async function Ohe(){return(await fetch("/api/security/sources")).json()}async function Nhe(){return(await fetch("/api/security/engine/status")).json()}async function jhe(){return(await fetch("/api/security/sources/initialize",{method:"POST"})).json()}async function Bhe(){return(await fetch("/api/security/sources/sync",{method:"POST"})).json()}async function Fhe(r){return(await fetch(`/api/security/sources/${encodeURIComponent(r)}/sync`,{method:"POST"})).json()}async function Vhe(r,e){return(await fetch(`/api/security/community-rules/${encodeURIComponent(r)}/enabled`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:e})})).json()}async function Ghe(r){return(await fetch("/api/security/community-rules",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)})).json()}async function Whe(r){return(await fetch(`/api/security/community-rules/${encodeURIComponent(r)}`,{method:"DELETE"})).json()}async function $he(){return(await fetch("/api/security/yara/reset-defaults",{method:"POST"})).json()}function Hhe(){const[r,e]=Y.useState([]),[t,n]=Y.useState([]),[a,i]=Y.useState(null),[o,s]=Y.useState(!1),[l,u]=Y.useState(null),c=Y.useCallback(async()=>{try{const C=await zhe();C.success&&(e(C.rules),i(C.summary))}catch(C){console.error("Failed to load community rules:",C)}},[]),f=Y.useCallback(async()=>{try{const C=await Ohe();C.success&&n(C.sources)}catch(C){console.error("Failed to load rule sources:",C)}},[]),d=Y.useCallback(async()=>{try{const C=await Nhe();C.success&&u(C)}catch(C){console.error("Failed to load engine status:",C)}},[]),h=Y.useCallback(async()=>{try{const C=await jhe();return C.success&&await f(),C}catch(C){return console.error("Failed to initialize sources:",C),{success:!1,error:C.message}}},[f]),v=Y.useCallback(async()=>{s(!0);try{const C=await Bhe();return C.success&&(await c(),await f()),C}catch(C){return console.error("Failed to sync sources:",C),{success:!1,error:C.message}}finally{s(!1)}},[c,f]),y=Y.useCallback(async C=>{s(!0);try{const k=await Fhe(C);return k.success&&(await c(),await f()),k}catch(k){return console.error("Failed to sync source:",k),{success:!1,error:k.message}}finally{s(!1)}},[c,f]),m=Y.useCallback(async(C,k)=>{try{const A=await Vhe(C,k);return A.success&&await c(),A}catch(A){return console.error("Failed to set rule enabled:",A),{success:!1,error:A.message}}},[c]),x=Y.useCallback(async C=>{try{const k=await Ghe(C);return k.success&&await c(),k}catch(k){return console.error("Failed to save custom rule:",k),{success:!1,error:k.message}}},[c]),_=Y.useCallback(async C=>{try{const k=await Whe(C);return k.success&&await c(),k}catch(k){return console.error("Failed to delete custom rule:",k),{success:!1,error:k.message}}},[c]),T=Y.useCallback(async()=>{try{const C=await $he();return C.success&&await c(),C}catch(C){return console.error("Failed to reset defaults:",C),{success:!1,error:C.message}}},[c]);return Y.useEffect(()=>{f(),d(),c()},[f,d,c]),{communityRules:r,ruleSources:t,rulesSummary:a,syncing:o,engineStatus:l,loadCommunityRules:c,loadRuleSources:f,initializeSources:h,syncAllSources:v,syncSource:y,setRuleEnabled:m,saveCustomRule:x,deleteCustomRule:_,resetDefaults:T}}function Uhe(){const[r,e]=Y.useState([]),[t,n]=Y.useState([]),[a,i]=Y.useState(null),[o,s]=Y.useState(!1),[l,u]=Y.useState(!1),[c,f]=Y.useState(null),[d,h]=Y.useState({}),[v,y]=Y.useState(null),[m,x]=Y.useState([]),[_,T]=Y.useState(null),[C,k]=Y.useState(0),[A,L]=Y.useState(!1),[D,P]=Y.useState(null),[E,O]=Y.useState(!1),[B,N]=Y.useState(null),W=Hhe(),H=Y.useCallback(async()=>{try{const re=await Mhe();re.success&&e(re.rules)}catch(re){console.error("Failed to load rules:",re)}},[]),$=Y.useCallback(async()=>{try{const re=await khe(d);re.success&&n(re.findings)}catch(re){console.error("Failed to load findings:",re)}},[d]),Z=Y.useCallback(async()=>{try{const re=await Ahe();re.success&&i(re.summary)}catch(re){console.error("Failed to load summary:",re)}},[]),G=Y.useCallback(async()=>{try{const re=await Lhe();re.success&&x(re.history)}catch(re){console.error("Failed to load scan history:",re)}},[]),X=Y.useCallback(async()=>{try{const re=await Dhe();re.success&&k(re.count)}catch(re){console.error("Failed to check running servers:",re)}},[]),K=Y.useCallback(async()=>{O(!0),N(null);try{const re=await Rhe();re&&re.success===!1?(N(re.error||"Could not load traffic toxic flows"),P(null)):re?.error&&!re.toxicFlows?(N(re.error),P(null)):P(re)}catch(re){console.error("Traffic toxic flows:",re),N(re.message||"Request failed"),P(null)}finally{O(!1)}},[]),V=Y.useCallback(async()=>{O(!0),N(null);try{const re=await Ehe();re.success===!1||re.error?(N(re.error||"Replay failed"),P(null)):P(re)}catch(re){console.error("Traffic toxic replay:",re),N(re.message||"Request failed")}finally{O(!1)}},[]),U=Y.useCallback(async()=>{s(!0),f(null),n([]),i(null),T(null),L(!1);try{const re=await Ihe();if(re.success)await $(),await Z(),await G(),L(!0),await K();else{const _e={message:re.error||"Analysis failed",requiresSetup:re.requiresSetup||!1};f(_e)}}catch(re){console.error("Analysis error:",re),f({message:re.message,requiresSetup:!1})}finally{s(!1)}},[$,Z,G,K]),ae=Y.useCallback(async()=>{u(!0);try{(await Phe()).success&&(n([]),i(null),y(null),T(null),f(null),L(!1),await G(),await K())}catch(re){console.error("Failed to clear findings:",re)}finally{u(!1)}},[G,K]),ce=Y.useCallback(async re=>{T(re),f(null);try{const _e=new URLSearchParams;_e.append("scan_id",re),_e.append("limit","100");const ve=await(await fetch(`/api/security/findings?${_e.toString()}`)).json();ve.success&&n(ve.findings)}catch(_e){console.error("Failed to load historical findings:",_e)}},[]);return Y.useEffect(()=>{H(),G(),X(),K()},[H,G,X,K]),{rules:r,findings:t,summary:a,scanning:o,clearing:l,error:c,discoverAndScan:U,clearFindings:ae,loadFindings:$,loadSummary:Z,filters:d,setFilters:h,selectedFinding:v,setSelectedFinding:y,scanHistory:m,selectedScanId:_,selectHistoricalScan:ce,runningServersCount:C,checkRunningServers:X,scanComplete:A,trafficToxicSnapshot:D,trafficToxicLoading:E,trafficToxicError:B,loadTrafficToxicFlows:K,replayTrafficToxicFlows:V,...W}}function Yhe({onNavigateToSmartScan:r,onNavigateToSetup:e}){const[t,n]=Y.useState("scanner"),[a,i]=Y.useState(!1),{rules:o,findings:s,summary:l,scanning:u,clearing:c,error:f,discoverAndScan:d,clearFindings:h,loadSummary:v,selectedFinding:y,setSelectedFinding:m,scanHistory:x,selectedScanId:_,selectHistoricalScan:T,runningServersCount:C,scanComplete:k,trafficToxicSnapshot:A,trafficToxicLoading:L,trafficToxicError:D,loadTrafficToxicFlows:P,replayTrafficToxicFlows:E,communityRules:O,engineStatus:B,setRuleEnabled:N,saveCustomRule:W,deleteCustomRule:H,resetDefaults:$}=Uhe();return b.jsxs("div",{"data-tab-content":!0,style:{flex:1,overflow:"hidden",display:"flex",flexDirection:"column",background:S.bgPrimary},children:[b.jsx("div",{style:{background:S.bgCard,borderBottom:`1px solid ${S.borderLight}`,padding:"16px 24px",boxShadow:`0 2px 4px ${S.shadowSm}`},children:b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"24px",flexWrap:"wrap"},children:[b.jsx(The,{}),b.jsx(Che,{activeTab:t,setActiveTab:n}),t==="scanner"&&b.jsx(whe,{onScan:d,scanning:u,onClear:h,clearing:c,onToggleHistory:()=>i(Z=>!Z),showHistory:a,historyCount:x.length,serversAvailable:C>0})]})}),t==="scanner"&&b.jsx(_he,{error:f,scanning:u,findings:s,summary:l,selectedFinding:y,onSelectFinding:m,rules:o,loadSummary:v,onNavigateToSmartScan:r,onNavigateToSetup:e,scanHistory:x,selectedScanId:_,onSelectScan:T,showHistory:a,serversAvailable:C>0,scanComplete:k,trafficToxicSnapshot:A,trafficToxicLoading:L,trafficToxicError:D,loadTrafficToxicFlows:P,replayTrafficToxicFlows:E}),t==="rules"&&b.jsx(c$,{communityRules:O,engineStatus:B,onToggleRule:N,onSaveRule:W,onDeleteRule:H,onResetDefaults:$})]})}function Xhe(){const[r,e]=Y.useState(3);return Y.useEffect(()=>{const t=setInterval(()=>{e(n=>n<=1?(clearInterval(t),window.location.href="/",0):n-1)},1e3);return()=>clearInterval(t)},[]),b.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",background:S.bgPrimary,fontFamily:j.body,padding:"20px",textAlign:"center"},children:b.jsxs("div",{style:{maxWidth:"500px",width:"100%"},children:[b.jsx("h1",{style:{fontSize:"32px",fontWeight:"600",color:S.textPrimary,margin:"0 0 16px 0"},children:"MCP Shark Shutdown"}),b.jsx("p",{style:{fontSize:"16px",color:S.textSecondary,margin:"0 0 32px 0",lineHeight:"1.6"},children:"MCP Shark has been shut down."}),b.jsx("div",{style:{padding:"24px",background:S.bgCard,borderRadius:"12px",border:`1px solid ${S.borderLight}`,boxShadow:`0 4px 12px ${S.shadowMd}`},children:b.jsxs("p",{style:{fontSize:"14px",color:S.textSecondary,margin:"0 0 16px 0",lineHeight:"1.6"},children:["The MCP Shark server has been stopped. Redirecting in ",r," second",r!==1?"s":"","..."]})})]})})}function ac({title:r,count:e,children:t,defaultExpanded:n=!1}){const[a,i]=Y.useState(n);return b.jsxs("div",{style:{background:S.bgTertiary,borderRadius:"8px",border:`1px solid ${S.borderLight}`,overflow:"hidden"},children:[b.jsxs("button",{type:"button",onClick:()=>i(!a),style:{width:"100%",padding:"8px 12px",display:"flex",alignItems:"center",justifyContent:"space-between",background:"transparent",border:"none",cursor:"pointer",fontFamily:j.body,transition:"background 0.15s"},onMouseEnter:o=>{o.currentTarget.style.background=S.bgCard},onMouseLeave:o=>{o.currentTarget.style.background="transparent"},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[b.jsx("span",{style:{fontSize:"12px",fontWeight:"600",color:S.textPrimary,fontFamily:j.body},children:r}),e!==void 0&&b.jsx("span",{style:{padding:"2px 6px",background:S.bgCard,borderRadius:"4px",fontSize:"10px",fontWeight:"500",color:S.textSecondary,border:`1px solid ${S.borderLight}`,fontFamily:j.body},children:e})]}),b.jsxs("svg",{style:{width:"14px",height:"14px",color:S.textSecondary,transform:a?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.15s"},fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",role:"img","aria-label":"Chevron icon",children:[b.jsx("title",{children:"Chevron icon"}),b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})]})]}),a&&b.jsx("div",{style:{padding:"12px",borderTop:`1px solid ${S.borderLight}`,background:S.bgCard},children:t})]})}function Kh(r){if(!r)return S.textTertiary;switch(r.toLowerCase()){case"none":return S.accentGreen;case"low":return S.accentBlue;case"medium":return S.accentOrange;case"high":return S.error;case"critical":return S.error;default:return S.textTertiary}}function Cb({findings:r,type:e}){return b.jsx("div",{style:{overflowX:"auto"},children:b.jsxs("table",{style:{width:"100%",fontSize:"12px",fontFamily:j.body},children:[b.jsx("thead",{children:b.jsxs("tr",{style:{borderBottom:`1px solid ${S.borderLight}`,background:S.bgTertiary},children:[b.jsx("th",{style:{textAlign:"left",padding:"6px 8px",fontSize:"10px",fontWeight:"600",color:S.textTertiary,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Name"}),b.jsx("th",{style:{textAlign:"left",padding:"6px 8px",fontSize:"10px",fontWeight:"600",color:S.textTertiary,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Risk Level"}),b.jsx("th",{style:{textAlign:"left",padding:"6px 8px",fontSize:"10px",fontWeight:"600",color:S.textTertiary,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Risk Score"}),b.jsx("th",{style:{textAlign:"left",padding:"6px 8px",fontSize:"10px",fontWeight:"600",color:S.textTertiary,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Tags"}),b.jsx("th",{style:{textAlign:"left",padding:"6px 8px",fontSize:"10px",fontWeight:"600",color:S.textTertiary,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Reasons"}),b.jsx("th",{style:{textAlign:"left",padding:"6px 8px",fontSize:"10px",fontWeight:"600",color:S.textTertiary,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Safe Use Notes"}),e==="tool"&&b.jsx("th",{style:{textAlign:"left",padding:"6px 8px",fontSize:"10px",fontWeight:"600",color:S.textTertiary,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Poisoned"})]})}),b.jsx("tbody",{children:r.map((t,n)=>b.jsxs("tr",{style:{borderBottom:`1px solid ${S.borderLight}`,transition:"background 0.15s"},onMouseEnter:a=>{a.currentTarget.style.background=S.bgTertiary},onMouseLeave:a=>{a.currentTarget.style.background="transparent"},children:[b.jsx("td",{style:{padding:"8px",fontSize:"12px",color:S.textPrimary,fontWeight:"500",fontFamily:j.body},children:t.name}),b.jsx("td",{style:{padding:"8px"},children:b.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:"2px 6px",borderRadius:"4px",fontSize:"10px",fontWeight:"700",color:S.textInverse,background:Kh(t.risk_level),fontFamily:j.body},children:t.risk_level?.toUpperCase()})}),b.jsx("td",{style:{padding:"8px",fontSize:"12px",color:S.textSecondary,fontFamily:j.body},children:t.risk_score}),b.jsx("td",{style:{padding:"8px"},children:b.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"2px"},children:t.risk_tags?.map((a,i)=>b.jsx("span",{style:{padding:"2px 6px",background:S.bgCard,borderRadius:"4px",fontSize:"10px",color:S.textSecondary,border:`1px solid ${S.borderLight}`,fontFamily:j.body},children:a},`tag-${String(a)}-${i}`))})}),b.jsx("td",{style:{padding:"8px",fontSize:"12px",color:S.textSecondary,fontFamily:j.body},children:b.jsx("ul",{style:{listStyle:"disc",listStylePosition:"inside",margin:0,padding:0},children:t.reasons?.map((a,i)=>b.jsx("li",{style:{fontSize:"10px",marginBottom:"2px"},children:a},`reason-${i}-${a.substring(0,20)}`))})}),b.jsx("td",{style:{padding:"8px",fontSize:"10px",color:S.textSecondary,maxWidth:"200px",fontFamily:j.body},children:t.safe_use_notes}),e==="tool"&&Object.prototype.hasOwnProperty.call(t,"is_potentially_poisoned")&&b.jsx("td",{style:{padding:"8px"},children:t.is_potentially_poisoned?b.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:"2px 6px",fontSize:"10px",fontWeight:"500",borderRadius:"4px",background:`${S.error}20`,color:S.error,border:`1px solid ${S.error}40`,fontFamily:j.body},children:"Yes"}):b.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:"2px 6px",fontSize:"10px",fontWeight:"500",borderRadius:"4px",background:`${S.accentGreen}20`,color:S.accentGreen,border:`1px solid ${S.accentGreen}40`,fontFamily:j.body},children:"No"})})]},`finding-${t.id||t.name||n}-${n}`))})]})})}function Zhe({patterns:r}){return!r||r.length===0?null:b.jsx(ac,{title:"Notable Patterns",count:r.length,defaultExpanded:!1,children:b.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:r.map((e,t)=>b.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:"8px",padding:"8px",background:`${S.accentOrange}10`,borderRadius:"6px",border:`1px solid ${S.accentOrange}20`,transition:"all 0.15s"},onMouseEnter:n=>{n.currentTarget.style.background=`${S.accentOrange}15`,n.currentTarget.style.borderColor=`${S.accentOrange}40`},onMouseLeave:n=>{n.currentTarget.style.background=`${S.accentOrange}10`,n.currentTarget.style.borderColor=`${S.accentOrange}20`},children:[b.jsx("div",{style:{flexShrink:0,marginTop:"2px",width:"16px",height:"16px",borderRadius:"50%",background:`${S.accentOrange}30`,border:`1px solid ${S.accentOrange}60`,display:"flex",alignItems:"center",justifyContent:"center"},children:b.jsxs("svg",{style:{width:"10px",height:"10px",color:S.accentOrange},fill:"currentColor",viewBox:"0 0 20 20",role:"img","aria-label":"Pattern icon",children:[b.jsx("title",{children:"Pattern icon"}),b.jsx("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})]})}),b.jsx("p",{style:{fontSize:"12px",color:S.textPrimary,lineHeight:"1.5",flex:1,margin:0,fontFamily:j.body},children:e})]},`pattern-${e.type||t}-${t}`))})})}function Khe(r){const e=r.includes(`
|
|
62
|
+
`)?`
|
|
63
|
+
`:r.includes(" | ")?" | ":null;return e?b.jsx("ul",{style:{listStyle:"disc",listStylePosition:"inside",margin:0,paddingLeft:"8px"},children:r.split(e).map((t,n)=>b.jsx("li",{style:{fontSize:"12px",marginBottom:"2px"},children:t.trim()},`reason-${n}-${t.trim().substring(0,20)}`))}):b.jsx("p",{style:{fontSize:"12px"},children:r})}function qhe({overallRiskLevel:r,overallReason:e}){return r?b.jsx(ac,{title:"Overall Summary",count:e?1:0,defaultExpanded:!0,children:b.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[b.jsx("span",{style:{fontSize:"12px",fontWeight:"600",color:S.textPrimary,fontFamily:j.body},children:"Overall Risk Level:"}),b.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:"2px 8px",borderRadius:"4px",fontSize:"10px",fontWeight:"700",color:S.textInverse,background:Kh(r),fontFamily:j.body},children:r.toUpperCase()})]}),e&&b.jsx("div",{style:{fontSize:"12px",color:S.textSecondary,fontFamily:j.body},children:Khe(e)})]})}):null}function Qhe({recommendations:r}){return!r||r.length===0?null:b.jsx(ac,{title:"Recommendations",count:r.length,defaultExpanded:!1,children:b.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:r.map((e,t)=>b.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:"8px",padding:"8px",background:`${S.accentBlue}10`,borderRadius:"6px",border:`1px solid ${S.accentBlue}20`,transition:"all 0.15s"},onMouseEnter:n=>{n.currentTarget.style.background=`${S.accentBlue}15`,n.currentTarget.style.borderColor=`${S.accentBlue}40`},onMouseLeave:n=>{n.currentTarget.style.background=`${S.accentBlue}10`,n.currentTarget.style.borderColor=`${S.accentBlue}20`},children:[b.jsx("div",{style:{flexShrink:0,marginTop:"2px",width:"16px",height:"16px",borderRadius:"50%",background:`${S.accentBlue}30`,border:`1px solid ${S.accentBlue}60`,display:"flex",alignItems:"center",justifyContent:"center"},children:b.jsx("span",{style:{fontSize:"10px",fontWeight:"600",color:S.accentBlue,fontFamily:j.body},children:t+1})}),b.jsx("p",{style:{fontSize:"12px",color:S.textPrimary,lineHeight:"1.5",flex:1,margin:0,fontFamily:j.body},children:e})]},`recommendation-${e.type||t}-${t}`))})})}function Jhe({analysis:r}){if(!r)return b.jsx("div",{style:{padding:"12px",background:`${S.bgTertiary}80`,borderRadius:"6px",border:`1px solid ${S.borderLight}`,fontSize:"12px",color:S.textSecondary,fontFamily:j.body},children:"No analysis data available."});const e=r.tool_findings||[],t=r.prompt_findings||[],n=r.resource_findings||[];return b.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"10px"},children:[b.jsx(qhe,{overallRiskLevel:r.overall_risk_level,overallReason:r.overall_reason}),e.length>0&&b.jsx(ac,{title:"Tool Findings",count:e.length,defaultExpanded:!0,children:b.jsx(Cb,{findings:e,type:"tool"})}),t.length>0&&b.jsx(ac,{title:"Prompt Findings",count:t.length,defaultExpanded:!0,children:b.jsx(Cb,{findings:t,type:"prompt"})}),n.length>0&&b.jsx(ac,{title:"Resource Findings",count:n.length,defaultExpanded:!0,children:b.jsx(Cb,{findings:n,type:"resource"})}),b.jsx(Qhe,{recommendations:r.recommendations}),b.jsx(Zhe,{patterns:r.notable_patterns})]})}function epe({scan:r,scanId:e,serverName:t,analysisResult:n}){return b.jsxs("details",{style:{marginBottom:"16px"},children:[b.jsx("summary",{style:{cursor:"pointer",padding:"8px 12px",background:S.bgTertiary,borderRadius:"6px",fontSize:"11px",fontFamily:j.body,color:S.textSecondary,border:`1px solid ${S.borderLight}`,userSelect:"none"},onMouseEnter:a=>{a.currentTarget.style.background=S.bgSecondary,a.currentTarget.style.color=S.textPrimary},onMouseLeave:a=>{a.currentTarget.style.background=S.bgTertiary,a.currentTarget.style.color=S.textSecondary},children:"Debug Info (click to expand)"}),b.jsx("div",{style:{marginTop:"8px",padding:"12px",background:S.bgTertiary,borderRadius:"6px",fontSize:"11px",fontFamily:"monospace",border:`1px solid ${S.borderLight}`},children:b.jsxs("div",{style:{fontSize:"10px",color:S.textSecondary,lineHeight:"1.6"},children:[b.jsxs("div",{children:["scanId: ",e?`"${e}"`:"missing"]}),b.jsxs("div",{children:['serverName: "',t,'"']}),b.jsxs("div",{children:["analysisResult: ",n?"found":"missing"]}),b.jsxs("div",{children:["has scan.result: ",r.result?"yes":"no"]}),b.jsxs("div",{children:["has scan.data: ",r.data?"yes":"no"]}),b.jsxs("div",{children:["scan keys: ",Object.keys(r||{}).join(", ")]}),r.result&&b.jsxs("div",{children:["scan.result keys: ",Object.keys(r.result||{}).join(", ")]}),r.data&&b.jsxs("div",{children:["scan.data keys: ",Object.keys(r.data||{}).join(", ")]})]})})]})}function tpe({scan:r}){return b.jsxs("div",{style:{marginBottom:"24px"},children:[b.jsx("h3",{style:{fontSize:"13px",fontWeight:"600",color:S.textPrimary,fontFamily:j.body,marginBottom:"12px",paddingBottom:"8px",borderBottom:`1px solid ${S.borderLight}`},children:"Raw Data"}),b.jsxs("details",{children:[b.jsx("summary",{style:{cursor:"pointer",padding:"8px",background:S.bgTertiary,borderRadius:"4px",fontSize:"11px",color:S.textSecondary,fontFamily:j.body,marginBottom:"8px"},children:"Click to view raw JSON data"}),b.jsx("pre",{style:{padding:"12px",background:S.bgTertiary,borderRadius:"6px",fontSize:"11px",fontFamily:"monospace",color:S.textPrimary,overflow:"auto",maxHeight:"400px",margin:0},children:JSON.stringify(r,null,2)})]})]})}function rpe({scanId:r,serverName:e,onClose:t}){return b.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"20px"},children:[b.jsxs("div",{children:[b.jsx("h2",{style:{fontSize:"16px",fontWeight:"600",color:S.textPrimary,fontFamily:j.body,margin:0,marginBottom:"8px"},children:e}),r&&b.jsxs("div",{style:{fontSize:"12px",color:S.textTertiary,fontFamily:j.body},children:["ID: ",r]})]}),b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[r&&b.jsxs("a",{href:`https://smart.mcpshark.sh/scan-results?id=${r}`,target:"_blank",rel:"noopener noreferrer",style:{padding:"6px 12px",background:S.buttonPrimary,border:"none",color:S.textInverse,borderRadius:"6px",fontSize:"12px",fontFamily:j.body,fontWeight:"500",textDecoration:"none",cursor:"pointer",display:"flex",alignItems:"center",gap:"6px"},children:[b.jsx(Xw,{size:14,stroke:1.5}),"View on Smart Scan"]}),b.jsx("button",{type:"button",onClick:t,style:{padding:"6px",background:"transparent",border:"none",color:S.textSecondary,cursor:"pointer",borderRadius:"4px",display:"flex",alignItems:"center",justifyContent:"center"},onMouseEnter:n=>{n.currentTarget.style.background=S.bgTertiary,n.currentTarget.style.color=S.textPrimary},onMouseLeave:n=>{n.currentTarget.style.background="transparent",n.currentTarget.style.color=S.textSecondary},children:b.jsx(kh,{size:20,stroke:1.5})})]})]})}function npe({status:r,overallRiskLevel:e,createdAt:t,updatedAt:n}){const a=i=>i?new Date(i).toLocaleString():"N/A";return b.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:"16px",padding:"16px",background:S.bgTertiary,borderRadius:"8px"},children:[r&&b.jsxs("div",{children:[b.jsx("div",{style:{fontSize:"11px",color:S.textTertiary,fontFamily:j.body,marginBottom:"4px"},children:"Status"}),b.jsx("div",{style:{fontSize:"13px",color:S.textPrimary,fontFamily:j.body,fontWeight:"500"},children:r})]}),e&&b.jsxs("div",{children:[b.jsx("div",{style:{fontSize:"11px",color:S.textTertiary,fontFamily:j.body,marginBottom:"4px"},children:"Overall Risk Level"}),b.jsx("span",{style:{padding:"4px 10px",borderRadius:"6px",fontSize:"11px",fontWeight:"700",fontFamily:j.body,background:Kh(e),color:S.textInverse,display:"inline-block"},children:e.toLowerCase()})]}),t&&b.jsxs("div",{children:[b.jsx("div",{style:{fontSize:"11px",color:S.textTertiary,fontFamily:j.body,marginBottom:"4px"},children:"Created At"}),b.jsx("div",{style:{fontSize:"13px",color:S.textPrimary,fontFamily:j.body,fontWeight:"500"},children:a(t)})]}),n&&b.jsxs("div",{children:[b.jsx("div",{style:{fontSize:"11px",color:S.textTertiary,fontFamily:j.body,marginBottom:"4px"},children:"Updated At"}),b.jsx("div",{style:{fontSize:"13px",color:S.textPrimary,fontFamily:j.body,fontWeight:"500"},children:a(n)})]})]})}function ape({serverData:r}){return r?b.jsxs("div",{style:{marginBottom:"24px"},children:[b.jsx("h3",{style:{fontSize:"13px",fontWeight:"600",color:S.textPrimary,fontFamily:j.body,marginBottom:"12px",paddingBottom:"8px",borderBottom:`1px solid ${S.borderLight}`},children:"Server Information"}),b.jsxs("div",{style:{padding:"12px",background:S.bgTertiary,borderRadius:"6px",fontSize:"12px",fontFamily:j.body},children:[b.jsxs("div",{style:{marginBottom:"8px"},children:[b.jsx("strong",{style:{color:S.textTertiary},children:"Name: "}),b.jsx("span",{style:{color:S.textPrimary},children:r.name||"N/A"})]}),r.description&&b.jsxs("div",{children:[b.jsx("strong",{style:{color:S.textTertiary},children:"Description: "}),b.jsx("span",{style:{color:S.textPrimary},children:r.description})]})]})]}):null}function yt(r,e){return e.split(".").reduce((n,a)=>n&&typeof n=="object"&&a in n?n[a]:null,r)}function ipe(r){const e=r.result||r.data||r,t=yt(r,"result.id")||yt(r,"id")||yt(r,"scan_id")||yt(r,"data.id")||yt(r,"data.scan_id")||e?.id||e?.scan_id,n=r.serverName||r.server_name||yt(r,"result.mcp_server_data.server.name")||yt(r,"mcp_server_data.server.name")||yt(r,"server.name")||yt(r,"data.server.name")||yt(r,"data.data.server.name")||r.server?.name||"Unknown Server",a=yt(r,"result.status")||yt(r,"status")||yt(r,"data.status"),i=yt(r,"result.overall_risk_level")||yt(r,"overall_risk_level")||yt(r,"data.overall_risk_level")||yt(r,"data.data.overall_risk_level"),o=yt(r,"result.created_at")||yt(r,"created_at")||yt(r,"data.created_at")||yt(r,"data.data.created_at"),s=yt(r,"result.updated_at")||yt(r,"updated_at")||yt(r,"data.updated_at")||yt(r,"data.data.updated_at"),l=yt(r,"result.analysis_result")||yt(r,"analysis_result")||yt(r,"data.analysis_result")||yt(r,"data.data.analysis_result")||yt(r,"data.data.data.analysis_result"),c=((d,h)=>{if(d)return d;if(h&&typeof h=="object"){if(h.tool_findings||h.prompt_findings||h.resource_findings)return h;if(h.analysis_result)return h.analysis_result}return null})(l,e),f=yt(r,"result.mcp_server_data.server")||yt(r,"mcp_server_data.server")||yt(r,"server")||yt(r,"data.server")||yt(r,"data.data.server")||yt(r,"mcp_server_data");return{scanId:t,serverName:n,status:a,overallRiskLevel:i,createdAt:o,updatedAt:s,analysisResult:c,serverData:f}}function V6({scan:r,loading:e,onClose:t}){if(e)return b.jsx("div",{style:{background:S.bgCard,border:`1px solid ${S.borderLight}`,borderRadius:"8px",padding:"24px",textAlign:"center"},children:b.jsx("p",{style:{color:S.textSecondary,fontFamily:j.body},children:"Loading scan details..."})});if(!r)return b.jsx("div",{style:{background:S.bgCard,border:`1px solid ${S.borderLight}`,borderRadius:"8px",padding:"24px",textAlign:"center"},children:b.jsx("p",{style:{color:S.textSecondary,fontFamily:j.body},children:"No scan data available"})});const{scanId:n,serverName:a,status:i,overallRiskLevel:o,createdAt:s,updatedAt:l,analysisResult:u,serverData:c}=ipe(r);return b.jsxs("div",{style:{background:S.bgCard,border:`1px solid ${S.borderLight}`,borderRadius:"8px",padding:"24px",boxShadow:`0 1px 3px ${S.shadowSm}`,position:"relative"},children:[b.jsx(rpe,{scanId:n,serverName:a,onClose:t}),b.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[b.jsx(epe,{scan:r,scanId:n,serverName:a,analysisResult:u}),b.jsx(npe,{status:i,overallRiskLevel:o,createdAt:s,updatedAt:l}),b.jsx(ape,{serverData:c}),u?b.jsxs("div",{style:{marginBottom:"24px"},children:[b.jsx("h3",{style:{fontSize:"13px",fontWeight:"600",color:S.textPrimary,fontFamily:j.body,marginBottom:"12px",paddingBottom:"8px",borderBottom:`1px solid ${S.borderLight}`},children:"Analysis Result"}),b.jsx(Jhe,{analysis:u})]}):b.jsxs("div",{style:{marginBottom:"24px"},children:[b.jsx("h3",{style:{fontSize:"13px",fontWeight:"600",color:S.textPrimary,fontFamily:j.body,marginBottom:"12px",paddingBottom:"8px",borderBottom:`1px solid ${S.borderLight}`},children:"Analysis Result"}),b.jsx("div",{style:{padding:"12px",background:`${S.bgTertiary}80`,borderRadius:"6px",border:`1px solid ${S.borderLight}`,fontSize:"12px",color:S.textSecondary,fontFamily:j.body},children:"No analysis result available for this scan. Check the Raw Data section below to see the scan structure."})]}),b.jsx(tpe,{scan:r})]})]})}function ope({result:r,onViewScan:e}){const t=r.serverName||r.server_name||r.server?.name||"Unknown Server";return console.log("[BatchResultItem] Rendering with result:",{serverName:r.serverName,extractedServerName:t,hasServerName:!!r.serverName,resultKeys:Object.keys(r)}),b.jsxs("div",{style:{background:S.bgTertiary,border:`1px solid ${r.success?S.borderLight:S.error}`,borderRadius:"8px",padding:"10px 16px",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"12px"},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",flex:1,minWidth:0},children:[b.jsx("h3",{style:{fontSize:"13px",fontWeight:"600",color:S.textPrimary,fontFamily:j.body,margin:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t}),r.success&&b.jsxs(b.Fragment,{children:[r.data?.data?.overall_risk_level&&b.jsxs("span",{style:{padding:"4px 10px",borderRadius:"6px",fontSize:"10px",fontWeight:"700",fontFamily:j.body,background:Kh(r.data.data.overall_risk_level),color:S.textInverse,whiteSpace:"nowrap"},children:[r.data.data.overall_risk_level.toLowerCase()," risk"]}),e&&r.data&&b.jsxs("button",{type:"button",onClick:()=>e(r.data),style:{display:"inline-flex",alignItems:"center",gap:"6px",padding:"4px 10px",borderRadius:"6px",background:S.buttonPrimary,border:"none",color:S.textInverse,cursor:"pointer",transition:"all 0.2s",fontSize:"11px",fontWeight:"500",fontFamily:j.body,whiteSpace:"nowrap"},onMouseEnter:n=>{n.currentTarget.style.background=S.buttonPrimaryHover},onMouseLeave:n=>{n.currentTarget.style.background=S.buttonPrimary},children:[b.jsx(Zw,{size:12,stroke:1.5}),b.jsx("span",{children:"View"})]}),r.data?.scan_id&&b.jsxs("a",{href:`https://smart.mcpshark.sh/scan-results?id=${r.data.scan_id}`,target:"_blank",rel:"noopener noreferrer",style:{display:"inline-flex",alignItems:"center",gap:"6px",padding:"4px 10px",borderRadius:"6px",background:S.bgSecondary,border:`1px solid ${S.borderLight}`,color:S.accentBlue,textDecoration:"none",cursor:"pointer",transition:"all 0.2s",fontSize:"11px",fontWeight:"500",fontFamily:j.body,whiteSpace:"nowrap"},onMouseEnter:n=>{n.currentTarget.style.background=S.bgTertiary,n.currentTarget.style.borderColor=S.accentBlue},onMouseLeave:n=>{n.currentTarget.style.background=S.bgSecondary,n.currentTarget.style.borderColor=S.borderLight},children:[b.jsx("span",{children:"open"}),b.jsx(lm,{size:12,color:S.accentBlue})]})]})]}),b.jsx("div",{style:{display:"flex",alignItems:"center",gap:"8px",flexShrink:0},children:r.success?b.jsxs(b.Fragment,{children:[r.cached&&b.jsxs("span",{style:{padding:"4px 8px",borderRadius:"6px",fontSize:"10px",fontWeight:"600",fontFamily:j.body,background:S.bgSecondary,color:S.textSecondary,border:`1px solid ${S.borderLight}`,display:"inline-flex",alignItems:"center",gap:"4px",whiteSpace:"nowrap"},title:"This result was retrieved from cache",children:[b.jsx(xN,{size:10,color:S.textSecondary}),b.jsx("span",{children:"Cached"})]}),b.jsxs("span",{style:{padding:"4px 8px",borderRadius:"6px",fontSize:"10px",fontWeight:"700",fontFamily:j.body,background:S.accentGreen,color:S.textInverse,display:"inline-flex",alignItems:"center",gap:"4px",whiteSpace:"nowrap"},children:[b.jsx(Ld,{size:10,color:S.textInverse}),b.jsx("span",{children:"Success"})]})]}):b.jsxs(b.Fragment,{children:[b.jsx("span",{style:{padding:"4px 8px",borderRadius:"6px",fontSize:"10px",fontWeight:"700",fontFamily:j.body,background:S.error,color:S.textInverse,whiteSpace:"nowrap"},children:"✗ Failed"}),r.error&&b.jsx("span",{style:{fontSize:"11px",color:S.error,fontFamily:j.body,whiteSpace:"nowrap",maxWidth:"200px",overflow:"hidden",textOverflow:"ellipsis"},title:r.error,children:r.error})]})})]})}function spe({scanResults:r}){const e=r.filter(a=>a.cached).length,t=r.filter(a=>a.success&&!a.cached).length,n=r.every(a=>a.cached);return b.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px"},children:[b.jsxs("div",{children:[b.jsxs("h2",{style:{fontSize:"14px",fontWeight:"600",color:S.textPrimary,fontFamily:j.body,margin:0,marginBottom:"4px"},children:["Scan Results (",r.length," server",r.length!==1?"s":"",")"]}),n&&b.jsx("p",{style:{fontSize:"12px",color:S.textTertiary,fontFamily:j.body,margin:0},children:"Showing cached results. Run a new scan to get the latest analysis."})]}),r.length>0&&b.jsxs("div",{style:{display:"flex",gap:"12px",alignItems:"center",fontSize:"13px",color:S.textSecondary,fontFamily:j.body},children:[e>0&&b.jsxs("span",{style:{padding:"6px 10px",background:S.bgTertiary,borderRadius:"6px",fontSize:"11px",fontWeight:"600",display:"inline-flex",alignItems:"center",gap:"4px",fontFamily:j.body},children:[b.jsx(xN,{size:12,color:S.textSecondary}),b.jsxs("span",{children:[e," cached"]})]}),t>0&&b.jsxs("span",{style:{padding:"6px 10px",background:S.bgTertiary,borderRadius:"6px",fontSize:"11px",fontWeight:"600",display:"inline-flex",alignItems:"center",gap:"4px"},children:[b.jsx(Ld,{size:12,color:S.accentGreen}),b.jsxs("span",{children:[t," scanned"]})]})]})]})}function lpe({scanResults:r,onViewScan:e}){return r.length===0?null:b.jsxs("div",{style:{background:S.bgCard,border:`1px solid ${S.borderLight}`,borderRadius:"8px",padding:"20px",boxShadow:`0 1px 3px ${S.shadowSm}`},children:[b.jsx(spe,{scanResults:r}),b.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:r.map((t,n)=>b.jsx(ope,{result:t,onViewScan:e},t.scanId||`batch-result-${n}`))})]})}function upe(){return b.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"400px",textAlign:"center",padding:"40px"},children:[b.jsx("div",{style:{marginBottom:"24px",opacity:.6},children:b.jsxs("svg",{width:64,height:64,viewBox:"0 0 24 24",fill:"none",stroke:S.textTertiary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",style:{opacity:.5},role:"img","aria-label":"Empty state icon",children:[b.jsx("title",{children:"Empty state icon"}),b.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"}),b.jsx("path",{d:"M9 12l2 2 4-4"})]})}),b.jsx("h3",{style:{fontSize:"20px",fontWeight:"600",color:S.textPrimary,fontFamily:j.body,marginBottom:"8px"},children:"Ready to Scan"}),b.jsx("p",{style:{fontSize:"14px",color:S.textSecondary,fontFamily:j.body,maxWidth:"400px",lineHeight:"1.6"},children:"Configure your API token and discover MCP servers to start security scanning. Results will appear here."})]})}function cpe({error:r}){return r?b.jsxs("div",{style:{background:S.bgCard,border:`1px solid ${S.error}`,borderRadius:"12px",padding:"16px 20px",marginBottom:"24px",display:"flex",gap:"12px",alignItems:"flex-start"},children:[b.jsx(O$,{size:20,color:S.error,style:{flexShrink:0,marginTop:"2px"}}),b.jsxs("div",{style:{flex:1},children:[b.jsx("p",{style:{fontSize:"14px",color:S.error,fontFamily:j.body,margin:0,fontWeight:"600",marginBottom:"4px"},children:"Error"}),b.jsx("p",{style:{fontSize:"13px",color:S.textSecondary,fontFamily:j.body,margin:0,lineHeight:"1.5"},children:r})]})]}):null}function fpe({scanning:r,selectedServers:e}){return r?b.jsx("div",{style:{background:S.bgCard,border:`1px solid ${S.borderLight}`,borderRadius:"12px",padding:"24px",marginBottom:"24px",boxShadow:`0 2px 8px ${S.shadowSm}`},children:b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[b.jsx(Yd,{size:20}),b.jsxs("div",{style:{flex:1},children:[b.jsxs("p",{style:{fontSize:"14px",fontWeight:"600",color:S.textPrimary,fontFamily:j.body,margin:0,marginBottom:"4px"},children:["Scanning ",e.size," server",e.size!==1?"s":"","..."]}),b.jsx("p",{style:{fontSize:"12px",color:S.textSecondary,fontFamily:j.body,margin:0},children:"Analyzing security vulnerabilities and risks"})]})]})}):null}function dpe({scanResult:r}){return r?b.jsxs("div",{style:{background:S.bgCard,border:`1px solid ${S.borderLight}`,borderRadius:"8px",padding:"20px",boxShadow:`0 1px 3px ${S.shadowSm}`},children:[b.jsx("h2",{style:{fontSize:"16px",fontWeight:"600",color:S.textPrimary,fontFamily:j.body,marginBottom:"16px"},children:"Scan Results"}),r.data?.overall_risk_level&&b.jsxs("div",{style:{background:S.bgTertiary,border:`1px solid ${S.borderLight}`,borderRadius:"8px",padding:"16px",marginBottom:"20px"},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginBottom:"8px"},children:[b.jsx("span",{style:{padding:"4px 12px",borderRadius:"6px",fontSize:"12px",fontWeight:"700",fontFamily:j.body,background:Kh(r.data.overall_risk_level),color:S.textInverse},children:r.data.overall_risk_level.toUpperCase()}),b.jsx("span",{style:{fontSize:"14px",color:S.textSecondary,fontFamily:j.body},children:"Overall Risk Level"})]}),r.data.overall_reason&&b.jsx("p",{style:{fontSize:"13px",color:S.textSecondary,fontFamily:j.body,margin:0},children:r.data.overall_reason})]}),b.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:"12px",marginBottom:"20px"},children:[r.data?.tool_findings?.length>0&&b.jsxs("div",{style:{background:S.bgTertiary,border:`1px solid ${S.borderLight}`,borderRadius:"8px",padding:"12px"},children:[b.jsx("div",{style:{fontSize:"24px",fontWeight:"700",color:S.textPrimary,fontFamily:j.body},children:r.data.tool_findings.length}),b.jsx("div",{style:{fontSize:"12px",color:S.textSecondary,fontFamily:j.body},children:"Tool Findings"})]}),r.data?.resource_findings?.length>0&&b.jsxs("div",{style:{background:S.bgTertiary,border:`1px solid ${S.borderLight}`,borderRadius:"8px",padding:"12px"},children:[b.jsx("div",{style:{fontSize:"24px",fontWeight:"700",color:S.textPrimary,fontFamily:j.body},children:r.data.resource_findings.length}),b.jsx("div",{style:{fontSize:"12px",color:S.textSecondary,fontFamily:j.body},children:"Resource Findings"})]}),r.data?.prompt_findings?.length>0&&b.jsxs("div",{style:{background:S.bgTertiary,border:`1px solid ${S.borderLight}`,borderRadius:"8px",padding:"12px"},children:[b.jsx("div",{style:{fontSize:"24px",fontWeight:"700",color:S.textPrimary,fontFamily:j.body},children:r.data.prompt_findings.length}),b.jsx("div",{style:{fontSize:"12px",color:S.textSecondary,fontFamily:j.body},children:"Prompt Findings"})]})]}),r.data?.recommendations?.length>0&&b.jsxs("div",{style:{background:S.bgTertiary,border:`1px solid ${S.borderLight}`,borderRadius:"8px",padding:"16px",marginBottom:"20px"},children:[b.jsx("h3",{style:{fontSize:"14px",fontWeight:"600",color:S.textPrimary,fontFamily:j.body,marginBottom:"12px"},children:"Recommendations"}),b.jsx("ul",{style:{margin:0,paddingLeft:"20px",fontSize:"13px",color:S.textSecondary,fontFamily:j.body,lineHeight:"1.8"},children:r.data.recommendations.map((e,t)=>b.jsx("li",{children:e},`recommendation-${t}-${e.substring(0,30)}`))})]}),r.scan_id&&b.jsx("div",{style:{marginTop:"20px",paddingTop:"20px",borderTop:`1px solid ${S.borderLight}`},children:b.jsxs("a",{href:`https://smart.mcpshark.sh/scan-results?id=${r.scan_id}`,target:"_blank",rel:"noopener noreferrer",style:{display:"inline-flex",alignItems:"center",gap:"8px",padding:"10px 20px",background:S.buttonSecondary,color:S.textPrimary,border:`1px solid ${S.borderMedium}`,borderRadius:"8px",textDecoration:"none",fontSize:"13px",fontWeight:"600",fontFamily:j.body,transition:"all 0.2s ease"},onMouseEnter:e=>{e.currentTarget.style.background=S.buttonSecondaryHover},onMouseLeave:e=>{e.currentTarget.style.background=S.buttonSecondary},children:[b.jsx("span",{children:"View Full Results"}),b.jsx(lm,{size:14,color:S.textPrimary})]})})]}):null}function G6({error:r,scanning:e,selectedServers:t,scanResults:n,scanResult:a,onViewScan:i}){return b.jsxs("div",{style:{flex:1,overflowY:"auto",overflowX:"hidden",padding:"24px",background:S.bgPrimary},children:[!r&&n.length===0&&!a&&!e&&b.jsx(upe,{}),b.jsx(cpe,{error:r}),b.jsx(fpe,{scanning:e,selectedServers:t}),n.length>0&&b.jsx(lpe,{scanResults:n,onViewScan:i}),a&&n.length===0&&b.jsx(dpe,{scanResult:a})]})}function hpe({error:r,loadingScans:e,selectedScan:t,loadingScanDetail:n,allScans:a,setSelectedScan:i,loadScanDetail:o,onViewScan:s}){return e?b.jsx("div",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",padding:"24px",background:S.bgPrimary},children:b.jsx("p",{style:{color:S.textSecondary,fontFamily:j.body},children:"Loading cached scans..."})}):t?b.jsx(V6,{scan:t,loading:n,onClose:()=>{i(null),o(null)}}):b.jsxs(b.Fragment,{children:[r&&b.jsx("div",{style:{padding:"12px 16px",background:`${S.error}20`,border:`1px solid ${S.error}`,borderRadius:"8px",marginBottom:"16px",color:S.error,fontSize:"13px",fontFamily:j.body},children:r}),b.jsx(G6,{error:r,scanning:!1,selectedServers:[],scanResults:a,scanResult:null,onViewScan:s})]})}function ppe({discoveredServers:r,selectedServers:e,setSelectedServers:t,runScan:n,scanning:a,apiToken:i}){const o=()=>{e.size===r.length?t(new Set):t(new Set(r.map(s=>s.name)))};return b.jsx("div",{style:{background:S.bgSecondary,borderBottom:`1px solid ${S.borderLight}`,padding:"12px 24px"},children:b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"16px",flexWrap:"wrap"},children:[b.jsx("div",{style:{fontSize:"12px",fontWeight:"600",color:S.textSecondary,fontFamily:j.body,whiteSpace:"nowrap"},children:"Select servers to scan:"}),b.jsx("div",{style:{display:"flex",alignItems:"center",gap:"12px",flexWrap:"wrap",flex:1},children:r.map((s,l)=>{const u=e.has(s.name);return b.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"8px",padding:"8px 12px",background:u?S.bgCard:S.bgTertiary,border:`1px solid ${u?S.accentBlue:S.borderLight}`,borderRadius:"8px",cursor:"pointer",transition:"all 0.2s ease",fontSize:"12px",fontFamily:j.body,fontWeight:u?"600":"500",color:u?S.textPrimary:S.textSecondary},onMouseEnter:c=>{c.currentTarget.style.borderColor=S.accentBlue,c.currentTarget.style.boxShadow=`0 2px 4px ${S.shadowSm}`},onMouseLeave:c=>{u||(c.currentTarget.style.borderColor=S.borderLight,c.currentTarget.style.boxShadow="none")},children:[b.jsx("input",{type:"checkbox",checked:u,onChange:c=>{const f=new Set(e);c.target.checked?f.add(s.name):f.delete(s.name),t(f)},style:{width:"16px",height:"16px",cursor:"pointer",accentColor:S.accentBlue}}),b.jsx("span",{children:s.name}),b.jsxs("span",{style:{fontSize:"10px",color:S.textTertiary,fontWeight:"400"},children:["(",s.tools?.length||0," tools, ",s.resources?.length||0," resources,"," ",s.prompts?.length||0," prompts)"]})]},s.name||`server-${l}`)})}),b.jsx("button",{type:"button",onClick:o,style:{padding:"6px 12px",background:S.buttonSecondary,color:S.textPrimary,border:`1px solid ${S.borderMedium}`,borderRadius:"6px",fontSize:"11px",fontWeight:"600",fontFamily:j.body,cursor:"pointer",transition:"all 0.2s ease",whiteSpace:"nowrap"},onMouseEnter:s=>{s.currentTarget.style.background=S.buttonSecondaryHover},onMouseLeave:s=>{s.currentTarget.style.background=S.buttonSecondary},children:e.size===r.length?"Deselect All":"Select All"}),b.jsx("button",{type:"button",onClick:n,disabled:!i||e.size===0||a,style:{padding:"8px 16px",background:i&&e.size>0&&!a?S.buttonPrimary:S.buttonSecondary,color:i&&e.size>0&&!a?S.textInverse:S.textTertiary,border:"none",borderRadius:"6px",fontSize:"13px",fontWeight:"600",fontFamily:j.body,cursor:i&&e.size>0&&!a?"pointer":"not-allowed",transition:"all 0.2s ease",display:"flex",alignItems:"center",gap:"8px",whiteSpace:"nowrap"},onMouseEnter:s=>{i&&e.size>0&&!a&&(s.currentTarget.style.background=S.buttonPrimaryHover,s.currentTarget.style.transform="translateY(-1px)",s.currentTarget.style.boxShadow=`0 4px 12px ${S.shadowMd}`)},onMouseLeave:s=>{i&&e.size>0&&!a&&(s.currentTarget.style.background=S.buttonPrimary,s.currentTarget.style.transform="translateY(0)",s.currentTarget.style.boxShadow="none")},children:a?b.jsxs(b.Fragment,{children:[b.jsx(Yd,{size:14,color:S.textInverse}),b.jsxs("span",{children:["Scanning ",e.size," server",e.size!==1?"s":"","..."]})]}):b.jsxs(b.Fragment,{children:[b.jsx(mN,{size:14,color:i&&e.size>0?S.textInverse:S.textTertiary}),b.jsxs("span",{children:["Run Scan (",e.size,")"]})]})})]})})}function vpe({discoveredServers:r,selectedServers:e,setSelectedServers:t,runScan:n,scanning:a,apiToken:i,error:o,scanResults:s,scanResult:l,selectedScan:u,loadingScanDetail:c,setSelectedScan:f,loadScanDetail:d,onViewScan:h}){return u?b.jsx("div",{style:{flex:1,overflowY:"auto",overflowX:"hidden",padding:"24px",background:S.bgPrimary},children:b.jsx(V6,{scan:u,loading:c,onClose:()=>{f(null),d(null)}})}):b.jsxs(b.Fragment,{children:[r.length>0&&b.jsx(ppe,{discoveredServers:r,selectedServers:e,setSelectedServers:t,runScan:n,scanning:a,apiToken:i}),b.jsx(G6,{error:o,scanning:a,selectedServers:e,scanResults:s,scanResult:l,onViewScan:h})]})}function gpe({apiToken:r,setApiToken:e,saveToken:t,loadingData:n,discoverMcpData:a,discoveredServers:i,_selectedServers:o,_setSelectedServers:s,scanning:l,clearCache:u,clearingCache:c,...f}){const{runScan:d}=f,h=Y.useRef(null),[v,y]=Y.useState(!1),m=x=>{e(x),h.current&&clearTimeout(h.current),x?h.current=setTimeout(()=>{t(x)},1e3):t("")};return b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"20px",flexWrap:"wrap",flex:1,justifyContent:"flex-end"},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[b.jsx("label",{htmlFor:"api-token-input",style:{fontSize:"12px",fontWeight:"600",color:S.textSecondary,fontFamily:j.body,whiteSpace:"nowrap"},children:"API Token:"}),b.jsxs("div",{style:{position:"relative",width:"200px"},children:[b.jsx("input",{id:"api-token-input",type:"password",value:r,onChange:x=>m(x.target.value),placeholder:"sk_...",style:{width:"100%",padding:"8px 10px",paddingRight:r?"28px":"10px",border:`1px solid ${r?S.accentGreen:S.borderMedium}`,borderRadius:"8px",fontSize:"12px",fontFamily:j.body,background:S.bgCard,color:S.textPrimary,boxSizing:"border-box",transition:"all 0.2s ease"},onFocus:x=>{x.currentTarget.style.borderColor=S.accentBlue,x.currentTarget.style.boxShadow=`0 0 0 2px ${S.accentBlue}20`},onBlur:x=>{x.currentTarget.style.borderColor=r?S.accentGreen:S.borderMedium,x.currentTarget.style.boxShadow="none"}}),r&&b.jsx("div",{style:{position:"absolute",right:"8px",top:"50%",transform:"translateY(-50%)"},children:b.jsx(Ld,{size:12,color:S.accentGreen})})]}),b.jsxs("a",{href:"https://smart.mcpshark.sh/tokens",target:"_blank",rel:"noopener noreferrer",style:{display:"inline-flex",alignItems:"center",gap:"4px",fontSize:"11px",color:S.accentBlue,textDecoration:"none",fontFamily:j.body,fontWeight:"500",whiteSpace:"nowrap"},onMouseEnter:x=>{x.currentTarget.style.textDecoration="underline"},onMouseLeave:x=>{x.currentTarget.style.textDecoration="none"},children:[b.jsx("span",{children:"Get token"}),b.jsx(lm,{size:10,color:S.accentBlue})]})]}),b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[b.jsx("label",{htmlFor:"servers-label",style:{fontSize:"12px",fontWeight:"600",color:S.textSecondary,fontFamily:j.body,whiteSpace:"nowrap"},children:"Servers:"}),b.jsx("button",{type:"button",onClick:a,disabled:n,style:{padding:"8px 14px",background:n?S.buttonSecondary:S.buttonPrimary,color:n?S.textTertiary:S.textInverse,border:"none",borderRadius:"6px",fontSize:"12px",fontWeight:"600",fontFamily:j.body,cursor:n?"not-allowed":"pointer",transition:"all 0.2s ease",display:"flex",alignItems:"center",gap:"6px",whiteSpace:"nowrap"},onMouseEnter:x=>{n||(x.currentTarget.style.background=S.buttonPrimaryHover,x.currentTarget.style.transform="translateY(-1px)")},onMouseLeave:x=>{n||(x.currentTarget.style.background=S.buttonPrimary,x.currentTarget.style.transform="translateY(0)")},children:n?b.jsxs(b.Fragment,{children:[b.jsx(Yd,{size:12}),b.jsx("span",{children:"Discovering..."})]}):b.jsxs(b.Fragment,{children:[b.jsx(Ld,{size:12,color:S.textInverse}),b.jsx("span",{children:"Discover"})]})}),i.length>0&&b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px",padding:"6px 10px",background:S.bgTertiary,borderRadius:"8px",fontSize:"11px",fontWeight:"600",color:S.textPrimary,fontFamily:j.body},children:[b.jsx(Ld,{size:12,color:S.accentGreen}),b.jsxs("span",{children:[i.length," server",i.length!==1?"s":""]})]})]}),b.jsx("button",{type:"button",onClick:()=>y(!0),disabled:c,style:{padding:"8px 14px",background:S.buttonSecondary,border:`1px solid ${S.borderLight}`,color:S.textSecondary,cursor:c?"not-allowed":"pointer",fontSize:"12px",fontWeight:"500",fontFamily:j.body,borderRadius:"8px",transition:"all 0.2s ease",display:"flex",alignItems:"center",gap:"6px",whiteSpace:"nowrap",opacity:c?.5:1},onMouseEnter:x=>{c||(x.currentTarget.style.background=S.buttonSecondaryHover,x.currentTarget.style.color=S.textPrimary)},onMouseLeave:x=>{c||(x.currentTarget.style.background=S.buttonSecondary,x.currentTarget.style.color=S.textSecondary)},title:"Clear cached scan results",children:c?b.jsxs(b.Fragment,{children:[b.jsx(Yd,{size:12}),b.jsx("span",{children:"Clearing..."})]}):b.jsxs(b.Fragment,{children:[b.jsx(Mc,{size:14,stroke:1.5}),b.jsx("span",{children:"Clear Cache"})]})}),b.jsx(Ah,{isOpen:v,onClose:()=>y(!1),onConfirm:async()=>{(await u()).success&&y(!1)},title:"Clear Scan Cache?",message:"Are you sure you want to clear all cached scan results? This will force fresh scans for all servers on the next scan.",confirmText:"Clear Cache",cancelText:"Cancel",danger:!1})]})}function ype(){return b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginRight:"auto"},children:[b.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"40px",height:"40px",borderRadius:"10px",background:`linear-gradient(135deg, ${S.accentBlue}20, ${S.accentGreen}20)`,border:`2px solid ${S.accentBlue}40`,flexShrink:0},children:b.jsx(mN,{size:20,color:S.accentBlue})}),b.jsxs("div",{children:[b.jsx("h1",{style:{fontSize:"18px",fontWeight:"700",color:S.textPrimary,fontFamily:j.body,margin:0,letterSpacing:"-0.2px"},children:b.jsxs("a",{href:"https://smart.mcpshark.sh/#get-started",target:"_blank",rel:"noopener noreferrer",style:{color:S.textPrimary,textDecoration:"none",display:"inline-flex",alignItems:"center",gap:"6px",transition:"color 0.2s ease"},onMouseEnter:r=>{r.currentTarget.style.color=S.accentBlue},onMouseLeave:r=>{r.currentTarget.style.color=S.textPrimary},children:["Smart Scan",b.jsx(lm,{size:12,color:"currentColor"})]})}),b.jsx("p",{style:{fontSize:"11px",color:S.textSecondary,fontFamily:j.body,margin:0,lineHeight:"1.3"},children:"AI-powered security analysis for Model Context Protocol (MCP) servers"})]})]})}function mpe({viewMode:r,setViewMode:e,onSwitchToScan:t,onSwitchToList:n}){return b.jsxs("div",{style:{display:"flex",gap:"8px",border:`1px solid ${S.borderLight}`,borderRadius:"8px",padding:"4px",background:S.bgSecondary},children:[b.jsx("button",{type:"button",onClick:()=>{e("scan"),t?.()},style:{padding:"6px 14px",background:r==="scan"?S.bgCard:"transparent",border:"none",color:r==="scan"?S.textPrimary:S.textSecondary,borderRadius:"6px",fontSize:"12px",fontFamily:j.body,fontWeight:r==="scan"?"600":"400",cursor:"pointer",transition:"all 0.2s"},children:"Scan Servers"}),b.jsx("button",{type:"button",onClick:()=>{e("list"),n?.()},style:{padding:"6px 14px",background:r==="list"?S.bgCard:"transparent",border:"none",color:r==="list"?S.textPrimary:S.textSecondary,borderRadius:"6px",fontSize:"12px",fontFamily:j.body,fontWeight:r==="list"?"600":"400",cursor:"pointer",transition:"all 0.2s"},children:"View All Scans"})]})}function xpe(r,e,t){const[n,a]=Y.useState(!1);return{clearingCache:n,clearCache:async()=>{a(!0),t(null);try{const o=await fetch("/api/smartscan/cache/clear",{method:"POST"}),s=await o.json();if(o.ok)return r.length>0&&await e(),{success:!0,message:s.message};throw new Error(s.error||"Failed to clear cache")}catch(o){return t(o.message||"Failed to clear cache"),{success:!1,error:o.message}}finally{a(!1)}}}}function Spe(r){const[e,t]=Y.useState(null),[n,a]=Y.useState([]),[i,o]=Y.useState(new Set),[s,l]=Y.useState(!1),[u,c]=Y.useState(null);return{mcpData:e,discoveredServers:n,selectedServers:i,setSelectedServers:o,loadingData:s,discoverMcpData:async()=>{l(!0),r(null),t(null),a([]);try{const h=await fetch("/api/smartscan/discover");if(!h.ok){const y=await h.json();throw new Error(y.message||"Failed to discover servers")}const v=await h.json();if(!v.success||!v.servers||v.servers.length===0)throw new Error("No MCP servers found in config. Please configure servers in the Setup tab.");if(a(v.servers),v.servers.length>0){o(new Set(v.servers.map(y=>y.name)));try{const y=await fetch("/api/smartscan/cached-results",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({servers:v.servers})});if(y.ok){const m=await y.json();m.success&&m.results&&m.results.filter(_=>_.success&&_.cached).length>0}}catch(y){console.debug("Could not load cached results:",y)}}if(v.servers.length>0){const y=v.servers[0];t({server:{name:y.name,description:"Discovered from MCP config"},tools:y.tools||[],resources:y.resources||[],prompts:y.prompts||[]})}}catch(h){r(h.message||"Failed to discover MCP server data")}finally{l(!1)}},makeMcpRequest:async(h,v={})=>{const y={"Content-Type":"application/json"};u&&(y["Mcp-Session-Id"]=u);const m=await fetch("/api/playground/proxy",{method:"POST",headers:y,body:JSON.stringify({method:h,params:v})}),x=await m.json(),_=m.headers.get("Mcp-Session-Id")||m.headers.get("mcp-session-id")||x._sessionId;if(_&&_!==u&&c(_),!m.ok)throw new Error(x.error?.message||x.message||"Request failed");return x.result||x}}}function bpe(r,e){const[t,n]=Y.useState([]),[a,i]=Y.useState(!1),[o,s]=Y.useState(null),[l,u]=Y.useState(!1);return{allScans:t,loadingScans:a,loadAllScans:async()=>{i(!0),e(null);try{console.log("Loading cached scans from local storage...");const d=await fetch("/api/smartscan/scans?cache=true"),h=await d.json();if(console.log("Cache response:",{status:d.status,ok:d.ok,cacheData:h}),d.ok){const v=h.scans||[];console.log(`[useScanList] Loaded ${v.length} cached scans from API`),console.log("[useScanList] Full cacheData:",h),v.length>0&&console.log("[useScanList] First scan structure:",{keys:Object.keys(v[0]),serverName:v[0].serverName,server_name:v[0].server_name,server:v[0].server,fullScan:v[0]});const y=v.map((m,x)=>{console.log(`[useScanList] Transforming scan ${x}:`,{scanId:m.id||m.scan_id,serverName:m.serverName,server_name:m.server_name,server:m.server,hasServerName:!!m.serverName,hasServerNameAlt:!!m.server_name,hasServer:!!m.server});const _=m.serverName?.trim()||m.server_name?.trim()||m.server?.name?.trim()||"Unknown Server";console.log(`[useScanList] Extracted serverName for scan ${x}: "${_}"`),_==="Unknown Server"&&console.error("[useScanList] Could not find server name in scan:",{scanId:m.id||m.scan_id,hasServerName:!!m.serverName,hasServerNameAlt:!!m.server_name,hasServer:!!m.server,serverNameValue:m.serverName,serverNameAltValue:m.server_name,serverNameFromServer:m.server?.name,scanKeys:Object.keys(m),fullScanObject:m});const T=m.data||m.result||m,C=T?.data&&typeof T.data=="object"?T.data:T,k={serverName:_,success:!0,cached:!0,data:{scan_id:m.scan_id||m.id,data:C}};return console.log(`[useScanList] Transformed result ${x}:`,{serverName:k.serverName,scan_id:k.data.scan_id}),k});console.log("[useScanList] Final transformed scanResults:",y.map(m=>({serverName:m.serverName,scan_id:m.data.scan_id}))),console.log("[useScanList] Setting allScans state with:",y.length,"items"),console.log("[useScanList] First item serverName:",y[0]?.serverName),console.log("[useScanList] Second item serverName:",y[1]?.serverName),n(y),y.length===0&&e("No cached scans found. Please run a scan first to see results here.")}else e(h.error||h.message||"Failed to load cached scans")}catch(d){e(d.message||"Failed to load cached scans")}finally{i(!1)}},selectedScan:o,setSelectedScan:s,loadingScanDetail:l,loadScanDetail:async d=>{if(!d){s(null);return}const h=t.find(v=>v.data?.scan_id===d||v.data?.data?.id===d||v.data?.data?.scan_id===d);if(h?.cached&&h.data?.data){const v=h.data.data;s({...v,scan_id:h.data.scan_id||v.id||v.scan_id});return}if(!r){e("Please enter your API token to view scan details");return}u(!0),e(null);try{const v=await fetch(`/api/smartscan/scans/${d}`,{headers:{Authorization:`Bearer ${r}`}}),y=await v.json();v.ok?s(y.result||y):e(y.error||y.message||"Failed to load scan details")}catch(v){e(v.message||"Failed to load scan details")}finally{u(!1)}}}}function _pe(r,e,t,n){const[a,i]=Y.useState(!1),[o,s]=Y.useState(null),[l,u]=Y.useState([]);return{scanning:a,scanResult:o,scanResults:l,runScan:async()=>{if(!r){n("Please enter your API token");return}if(!e||e.length===0){n("Please discover MCP servers first");return}if(t.size===0){n("Please select at least one server to scan");return}i(!0),n(null),s(null),u([]);const f=e.filter(d=>t.has(d.name));try{const d=await fetch("/api/smartscan/scans/batch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiToken:r,servers:f})}),h=await d.json();if(!d.ok){const v=m=>Array.isArray(m)?`Validation failed: ${m.map(x=>typeof x=="string"?x:x.field&&x.message?`${x.field}: ${x.message}`:JSON.stringify(x)).join("; ")}`:null,y=d.status===400&&h.details?v(h.details)||h.error||h.message||`API error: ${d.status}`:h.error||h.message||`API error: ${d.status}`;n(y);return}if(h.results&&Array.isArray(h.results)){u(h.results);const v=h.results.find(y=>y.success);v&&s(v.data)}}catch(d){n(d.message||"Failed to run scan")}finally{i(!1)}}}}function wpe(){const[r,e]=Y.useState(null);Y.useEffect(()=>{t();const n=setInterval(t,2e3);return()=>clearInterval(n)},[]);const t=async()=>{try{const n=await fetch("/api/composite/status");if(!n.ok)throw new Error("Server not available");const a=await n.json();e(a)}catch{e({running:!1})}};return{serverStatus:r}}function Tpe(){const[r,e]=Y.useState(""),t=Y.useRef(null);Y.useEffect(()=>(n(),()=>{t.current&&clearTimeout(t.current)}),[]);const n=async()=>{try{const i=await fetch("/api/smartscan/token");if(i.ok){const o=await i.json();o.token&&e(o.token)}}catch{console.debug("No stored token found")}};return{apiToken:r,setApiToken:e,saveToken:async i=>{try{(await fetch("/api/smartscan/token",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:i})})).ok||console.error("Failed to save token")}catch(o){console.error("Error saving token:",o)}},saveTokenTimeoutRef:t}}function Cpe(){const[r,e]=Y.useState(null),{apiToken:t,setApiToken:n,saveToken:a,saveTokenTimeoutRef:i}=Tpe(),{serverStatus:o}=wpe(),{mcpData:s,discoveredServers:l,selectedServers:u,setSelectedServers:c,loadingData:f,discoverMcpData:d,makeMcpRequest:h}=Spe(e),{scanning:v,scanResult:y,scanResults:m,runScan:x}=_pe(t,l,u,e),{allScans:_,loadingScans:T,loadAllScans:C,selectedScan:k,setSelectedScan:A,loadingScanDetail:L,loadScanDetail:D}=bpe(t,e),{clearingCache:P,clearCache:E}=xpe(l,d,e);return{apiToken:t,setApiToken:n,serverStatus:o,mcpData:s,discoveredServers:l,selectedServers:u,setSelectedServers:c,loadingData:f,scanning:v,scanResult:y,scanResults:m,error:r,saveToken:a,discoverMcpData:d,runScan:x,clearCache:E,clearingCache:P,saveTokenTimeoutRef:i,allScans:_,loadingScans:T,loadAllScans:C,selectedScan:k,setSelectedScan:A,loadingScanDetail:L,loadScanDetail:D,makeMcpRequest:h}}function Mpe(){const[r,e]=Y.useState("scan"),{apiToken:t,setApiToken:n,discoveredServers:a,selectedServers:i,setSelectedServers:o,loadingData:s,scanning:l,scanResult:u,scanResults:c,error:f,saveToken:d,discoverMcpData:h,runScan:v,clearCache:y,clearingCache:m,allScans:x,loadingScans:_,loadAllScans:T,selectedScan:C,setSelectedScan:k,loadingScanDetail:A,loadScanDetail:L}=Cpe();return b.jsxs("div",{"data-tab-content":!0,style:{flex:1,overflow:"hidden",display:"flex",flexDirection:"column",background:S.bgPrimary},children:[b.jsx("div",{style:{background:S.bgCard,borderBottom:`1px solid ${S.borderLight}`,padding:"16px 24px",boxShadow:`0 2px 4px ${S.shadowSm}`},children:b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"24px",flexWrap:"wrap"},children:[b.jsx(ype,{}),b.jsx(mpe,{viewMode:r,setViewMode:e,onSwitchToScan:()=>k(null),onSwitchToList:()=>{k(null),x.length===0&&T()}}),r==="scan"&&b.jsx(gpe,{apiToken:t,setApiToken:n,saveToken:d,loadingData:s,discoverMcpData:h,discoveredServers:a,selectedServers:i,setSelectedServers:o,runScan:v,scanning:l,clearCache:y,clearingCache:m})]})}),r==="scan"?b.jsx(vpe,{discoveredServers:a,selectedServers:i,setSelectedServers:o,runScan:v,scanning:l,apiToken:t,error:f,scanResults:c,scanResult:u,selectedScan:C,loadingScanDetail:A,setSelectedScan:k,loadScanDetail:L,onViewScan:D=>{if(console.log("onViewScan - scanData:",D),D.scan_id&&t)L(D.scan_id);else if(D.data&&typeof D.data=="object"){const P=D.data;k({...P,scan_id:D.scan_id||P.id||P.scan_id})}else k(D)}}):b.jsx("div",{style:{flex:1,overflowY:"auto",overflowX:"hidden",padding:"24px",background:S.bgPrimary},children:b.jsx(hpe,{error:f,loadingScans:_,selectedScan:C,loadingScanDetail:A,allScans:x,setSelectedScan:k,loadScanDetail:L,onViewScan:D=>{console.log("onViewScan - scanData:",D);const P=D.scan_id||D.id||D.hash,O=x.find(B=>B.data?.scan_id===P||B.data?.data?.scan_id===P)?.serverName||D.serverName||"Unknown Server";if(D?.data&&typeof D.data=="object"){const B=D.data;k({...B,scan_id:P||B.id||B.scan_id||B.hash,serverName:O})}else D&&typeof D=="object"?k({...D,scan_id:P||D.id||D.hash,serverName:O}):console.warn("Invalid scanData structure:",D)}})})]})}const kpe=({size:r=32,className:e="",style:t={}})=>b.jsx("img",{src:"/og-image.png",alt:"MCP Shark Logo",width:r,height:r,className:e,style:{width:`${r}px`,height:`${r}px`,objectFit:"contain",...t},"aria-label":"MCP Shark Logo"});var W6={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},N2={duration:1e3,delay:0,endDelay:0,easing:"easeOutElastic(1, .5)",round:0},Ape=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],nm={CSS:{},springs:{}};function Qa(r,e,t){return Math.min(Math.max(r,e),t)}function Ud(r,e){return r.indexOf(e)>-1}function Mb(r,e){return r.apply(null,e)}var Xe={arr:function(r){return Array.isArray(r)},obj:function(r){return Ud(Object.prototype.toString.call(r),"Object")},pth:function(r){return Xe.obj(r)&&r.hasOwnProperty("totalLength")},svg:function(r){return r instanceof SVGElement},inp:function(r){return r instanceof HTMLInputElement},dom:function(r){return r.nodeType||Xe.svg(r)},str:function(r){return typeof r=="string"},fnc:function(r){return typeof r=="function"},und:function(r){return typeof r>"u"},nil:function(r){return Xe.und(r)||r===null},hex:function(r){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(r)},rgb:function(r){return/^rgb/.test(r)},hsl:function(r){return/^hsl/.test(r)},col:function(r){return Xe.hex(r)||Xe.rgb(r)||Xe.hsl(r)},key:function(r){return!W6.hasOwnProperty(r)&&!N2.hasOwnProperty(r)&&r!=="targets"&&r!=="keyframes"}};function $6(r){var e=/\(([^)]+)\)/.exec(r);return e?e[1].split(",").map(function(t){return parseFloat(t)}):[]}function H6(r,e){var t=$6(r),n=Qa(Xe.und(t[0])?1:t[0],.1,100),a=Qa(Xe.und(t[1])?100:t[1],.1,100),i=Qa(Xe.und(t[2])?10:t[2],.1,100),o=Qa(Xe.und(t[3])?0:t[3],.1,100),s=Math.sqrt(a/n),l=i/(2*Math.sqrt(a*n)),u=l<1?s*Math.sqrt(1-l*l):0,c=1,f=l<1?(l*s+-o)/u:-o+s;function d(v){var y=e?e*v/1e3:v;return l<1?y=Math.exp(-y*l*s)*(c*Math.cos(u*y)+f*Math.sin(u*y)):y=(c+f*y)*Math.exp(-y*s),v===0||v===1?v:1-y}function h(){var v=nm.springs[r];if(v)return v;for(var y=1/6,m=0,x=0;;)if(m+=y,d(m)===1){if(x++,x>=16)break}else x=0;var _=m*y*1e3;return nm.springs[r]=_,_}return e?d:h}function Lpe(r){return r===void 0&&(r=10),function(e){return Math.ceil(Qa(e,1e-6,1)*r)*(1/r)}}var Ipe=(function(){var r=11,e=1/(r-1);function t(c,f){return 1-3*f+3*c}function n(c,f){return 3*f-6*c}function a(c){return 3*c}function i(c,f,d){return((t(f,d)*c+n(f,d))*c+a(f))*c}function o(c,f,d){return 3*t(f,d)*c*c+2*n(f,d)*c+a(f)}function s(c,f,d,h,v){var y,m,x=0;do m=f+(d-f)/2,y=i(m,h,v)-c,y>0?d=m:f=m;while(Math.abs(y)>1e-7&&++x<10);return m}function l(c,f,d,h){for(var v=0;v<4;++v){var y=o(f,d,h);if(y===0)return f;var m=i(f,d,h)-c;f-=m/y}return f}function u(c,f,d,h){if(!(0<=c&&c<=1&&0<=d&&d<=1))return;var v=new Float32Array(r);if(c!==f||d!==h)for(var y=0;y<r;++y)v[y]=i(y*e,c,d);function m(x){for(var _=0,T=1,C=r-1;T!==C&&v[T]<=x;++T)_+=e;--T;var k=(x-v[T])/(v[T+1]-v[T]),A=_+k*e,L=o(A,c,d);return L>=.001?l(x,A,c,d):L===0?A:s(x,_,_+e,c,d)}return function(x){return c===f&&d===h||x===0||x===1?x:i(m(x),f,h)}}return u})(),U6=(function(){var r={linear:function(){return function(n){return n}}},e={Sine:function(){return function(n){return 1-Math.cos(n*Math.PI/2)}},Expo:function(){return function(n){return n?Math.pow(2,10*n-10):0}},Circ:function(){return function(n){return 1-Math.sqrt(1-n*n)}},Back:function(){return function(n){return n*n*(3*n-2)}},Bounce:function(){return function(n){for(var a,i=4;n<((a=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((a*3-2)/22-n,2)}},Elastic:function(n,a){n===void 0&&(n=1),a===void 0&&(a=.5);var i=Qa(n,1,10),o=Qa(a,.1,2);return function(s){return s===0||s===1?s:-i*Math.pow(2,10*(s-1))*Math.sin((s-1-o/(Math.PI*2)*Math.asin(1/i))*(Math.PI*2)/o)}}},t=["Quad","Cubic","Quart","Quint"];return t.forEach(function(n,a){e[n]=function(){return function(i){return Math.pow(i,a+2)}}}),Object.keys(e).forEach(function(n){var a=e[n];r["easeIn"+n]=a,r["easeOut"+n]=function(i,o){return function(s){return 1-a(i,o)(1-s)}},r["easeInOut"+n]=function(i,o){return function(s){return s<.5?a(i,o)(s*2)/2:1-a(i,o)(s*-2+2)/2}},r["easeOutIn"+n]=function(i,o){return function(s){return s<.5?(1-a(i,o)(1-s*2))/2:(a(i,o)(s*2-1)+1)/2}}}),r})();function j2(r,e){if(Xe.fnc(r))return r;var t=r.split("(")[0],n=U6[t],a=$6(r);switch(t){case"spring":return H6(r,e);case"cubicBezier":return Mb(Ipe,a);case"steps":return Mb(Lpe,a);default:return Mb(n,a)}}function Y6(r){try{var e=document.querySelectorAll(r);return e}catch{return}}function Zm(r,e){for(var t=r.length,n=arguments.length>=2?arguments[1]:void 0,a=[],i=0;i<t;i++)if(i in r){var o=r[i];e.call(n,o,i,r)&&a.push(o)}return a}function Km(r){return r.reduce(function(e,t){return e.concat(Xe.arr(t)?Km(t):t)},[])}function YO(r){return Xe.arr(r)?r:(Xe.str(r)&&(r=Y6(r)||r),r instanceof NodeList||r instanceof HTMLCollection?[].slice.call(r):[r])}function B2(r,e){return r.some(function(t){return t===e})}function F2(r){var e={};for(var t in r)e[t]=r[t];return e}function Ww(r,e){var t=F2(r);for(var n in r)t[n]=e.hasOwnProperty(n)?e[n]:r[n];return t}function qm(r,e){var t=F2(r);for(var n in e)t[n]=Xe.und(r[n])?e[n]:r[n];return t}function Dpe(r){var e=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(r);return e?"rgba("+e[1]+",1)":r}function Ppe(r){var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,t=r.replace(e,function(s,l,u,c){return l+l+u+u+c+c}),n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t),a=parseInt(n[1],16),i=parseInt(n[2],16),o=parseInt(n[3],16);return"rgba("+a+","+i+","+o+",1)"}function Rpe(r){var e=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(r)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(r),t=parseInt(e[1],10)/360,n=parseInt(e[2],10)/100,a=parseInt(e[3],10)/100,i=e[4]||1;function o(d,h,v){return v<0&&(v+=1),v>1&&(v-=1),v<1/6?d+(h-d)*6*v:v<1/2?h:v<2/3?d+(h-d)*(2/3-v)*6:d}var s,l,u;if(n==0)s=l=u=a;else{var c=a<.5?a*(1+n):a+n-a*n,f=2*a-c;s=o(f,c,t+1/3),l=o(f,c,t),u=o(f,c,t-1/3)}return"rgba("+s*255+","+l*255+","+u*255+","+i+")"}function Epe(r){if(Xe.rgb(r))return Dpe(r);if(Xe.hex(r))return Ppe(r);if(Xe.hsl(r))return Rpe(r)}function Hi(r){var e=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(r);if(e)return e[1]}function zpe(r){if(Ud(r,"translate")||r==="perspective")return"px";if(Ud(r,"rotate")||Ud(r,"skew"))return"deg"}function $w(r,e){return Xe.fnc(r)?r(e.target,e.id,e.total):r}function Ja(r,e){return r.getAttribute(e)}function V2(r,e,t){var n=Hi(e);if(B2([t,"deg","rad","turn"],n))return e;var a=nm.CSS[e+t];if(!Xe.und(a))return a;var i=100,o=document.createElement(r.tagName),s=r.parentNode&&r.parentNode!==document?r.parentNode:document.body;s.appendChild(o),o.style.position="absolute",o.style.width=i+t;var l=i/o.offsetWidth;s.removeChild(o);var u=l*parseFloat(e);return nm.CSS[e+t]=u,u}function X6(r,e,t){if(e in r.style){var n=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),a=r.style[e]||getComputedStyle(r).getPropertyValue(n)||"0";return t?V2(r,a,t):a}}function G2(r,e){if(Xe.dom(r)&&!Xe.inp(r)&&(!Xe.nil(Ja(r,e))||Xe.svg(r)&&r[e]))return"attribute";if(Xe.dom(r)&&B2(Ape,e))return"transform";if(Xe.dom(r)&&e!=="transform"&&X6(r,e))return"css";if(r[e]!=null)return"object"}function Z6(r){if(Xe.dom(r)){for(var e=r.style.transform||"",t=/(\w+)\(([^)]*)\)/g,n=new Map,a;a=t.exec(e);)n.set(a[1],a[2]);return n}}function Ope(r,e,t,n){var a=Ud(e,"scale")?1:0+zpe(e),i=Z6(r).get(e)||a;return t&&(t.transforms.list.set(e,i),t.transforms.last=e),n?V2(r,i,n):i}function W2(r,e,t,n){switch(G2(r,e)){case"transform":return Ope(r,e,n,t);case"css":return X6(r,e,t);case"attribute":return Ja(r,e);default:return r[e]||0}}function $2(r,e){var t=/^(\*=|\+=|-=)/.exec(r);if(!t)return r;var n=Hi(r)||0,a=parseFloat(e),i=parseFloat(r.replace(t[0],""));switch(t[0][0]){case"+":return a+i+n;case"-":return a-i+n;case"*":return a*i+n}}function K6(r,e){if(Xe.col(r))return Epe(r);if(/\s/g.test(r))return r;var t=Hi(r),n=t?r.substr(0,r.length-t.length):r;return e?n+e:n}function H2(r,e){return Math.sqrt(Math.pow(e.x-r.x,2)+Math.pow(e.y-r.y,2))}function Npe(r){return Math.PI*2*Ja(r,"r")}function jpe(r){return Ja(r,"width")*2+Ja(r,"height")*2}function Bpe(r){return H2({x:Ja(r,"x1"),y:Ja(r,"y1")},{x:Ja(r,"x2"),y:Ja(r,"y2")})}function q6(r){for(var e=r.points,t=0,n,a=0;a<e.numberOfItems;a++){var i=e.getItem(a);a>0&&(t+=H2(n,i)),n=i}return t}function Fpe(r){var e=r.points;return q6(r)+H2(e.getItem(e.numberOfItems-1),e.getItem(0))}function Q6(r){if(r.getTotalLength)return r.getTotalLength();switch(r.tagName.toLowerCase()){case"circle":return Npe(r);case"rect":return jpe(r);case"line":return Bpe(r);case"polyline":return q6(r);case"polygon":return Fpe(r)}}function Vpe(r){var e=Q6(r);return r.setAttribute("stroke-dasharray",e),e}function Gpe(r){for(var e=r.parentNode;Xe.svg(e)&&Xe.svg(e.parentNode);)e=e.parentNode;return e}function J6(r,e){var t=e||{},n=t.el||Gpe(r),a=n.getBoundingClientRect(),i=Ja(n,"viewBox"),o=a.width,s=a.height,l=t.viewBox||(i?i.split(" "):[0,0,o,s]);return{el:n,viewBox:l,x:l[0]/1,y:l[1]/1,w:o,h:s,vW:l[2],vH:l[3]}}function Wpe(r,e){var t=Xe.str(r)?Y6(r)[0]:r,n=e||100;return function(a){return{property:a,el:t,svg:J6(t),totalLength:Q6(t)*(n/100)}}}function $pe(r,e,t){function n(c){c===void 0&&(c=0);var f=e+c>=1?e+c:0;return r.el.getPointAtLength(f)}var a=J6(r.el,r.svg),i=n(),o=n(-1),s=n(1),l=t?1:a.w/a.vW,u=t?1:a.h/a.vH;switch(r.property){case"x":return(i.x-a.x)*l;case"y":return(i.y-a.y)*u;case"angle":return Math.atan2(s.y-o.y,s.x-o.x)*180/Math.PI}}function XO(r,e){var t=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,n=K6(Xe.pth(r)?r.totalLength:r,e)+"";return{original:n,numbers:n.match(t)?n.match(t).map(Number):[0],strings:Xe.str(r)||e?n.split(t):[]}}function U2(r){var e=r?Km(Xe.arr(r)?r.map(YO):YO(r)):[];return Zm(e,function(t,n,a){return a.indexOf(t)===n})}function eV(r){var e=U2(r);return e.map(function(t,n){return{target:t,id:n,total:e.length,transforms:{list:Z6(t)}}})}function Hpe(r,e){var t=F2(e);if(/^spring/.test(t.easing)&&(t.duration=H6(t.easing)),Xe.arr(r)){var n=r.length,a=n===2&&!Xe.obj(r[0]);a?r={value:r}:Xe.fnc(e.duration)||(t.duration=e.duration/n)}var i=Xe.arr(r)?r:[r];return i.map(function(o,s){var l=Xe.obj(o)&&!Xe.pth(o)?o:{value:o};return Xe.und(l.delay)&&(l.delay=s?0:e.delay),Xe.und(l.endDelay)&&(l.endDelay=s===i.length-1?e.endDelay:0),l}).map(function(o){return qm(o,t)})}function Upe(r){for(var e=Zm(Km(r.map(function(i){return Object.keys(i)})),function(i){return Xe.key(i)}).reduce(function(i,o){return i.indexOf(o)<0&&i.push(o),i},[]),t={},n=function(i){var o=e[i];t[o]=r.map(function(s){var l={};for(var u in s)Xe.key(u)?u==o&&(l.value=s[u]):l[u]=s[u];return l})},a=0;a<e.length;a++)n(a);return t}function Ype(r,e){var t=[],n=e.keyframes;n&&(e=qm(Upe(n),e));for(var a in e)Xe.key(a)&&t.push({name:a,tweens:Hpe(e[a],r)});return t}function Xpe(r,e){var t={};for(var n in r){var a=$w(r[n],e);Xe.arr(a)&&(a=a.map(function(i){return $w(i,e)}),a.length===1&&(a=a[0])),t[n]=a}return t.duration=parseFloat(t.duration),t.delay=parseFloat(t.delay),t}function Zpe(r,e){var t;return r.tweens.map(function(n){var a=Xpe(n,e),i=a.value,o=Xe.arr(i)?i[1]:i,s=Hi(o),l=W2(e.target,r.name,s,e),u=t?t.to.original:l,c=Xe.arr(i)?i[0]:u,f=Hi(c)||Hi(l),d=s||f;return Xe.und(o)&&(o=u),a.from=XO(c,d),a.to=XO($2(o,c),d),a.start=t?t.end:0,a.end=a.start+a.delay+a.duration+a.endDelay,a.easing=j2(a.easing,a.duration),a.isPath=Xe.pth(i),a.isPathTargetInsideSVG=a.isPath&&Xe.svg(e.target),a.isColor=Xe.col(a.from.original),a.isColor&&(a.round=1),t=a,a})}var tV={css:function(r,e,t){return r.style[e]=t},attribute:function(r,e,t){return r.setAttribute(e,t)},object:function(r,e,t){return r[e]=t},transform:function(r,e,t,n,a){if(n.list.set(e,t),e===n.last||a){var i="";n.list.forEach(function(o,s){i+=s+"("+o+") "}),r.style.transform=i}}};function rV(r,e){var t=eV(r);t.forEach(function(n){for(var a in e){var i=$w(e[a],n),o=n.target,s=Hi(i),l=W2(o,a,s,n),u=s||Hi(l),c=$2(K6(i,u),l),f=G2(o,a);tV[f](o,a,c,n.transforms,!0)}})}function Kpe(r,e){var t=G2(r.target,e.name);if(t){var n=Zpe(e,r),a=n[n.length-1];return{type:t,property:e.name,animatable:r,tweens:n,duration:a.end,delay:n[0].delay,endDelay:a.endDelay}}}function qpe(r,e){return Zm(Km(r.map(function(t){return e.map(function(n){return Kpe(t,n)})})),function(t){return!Xe.und(t)})}function nV(r,e){var t=r.length,n=function(i){return i.timelineOffset?i.timelineOffset:0},a={};return a.duration=t?Math.max.apply(Math,r.map(function(i){return n(i)+i.duration})):e.duration,a.delay=t?Math.min.apply(Math,r.map(function(i){return n(i)+i.delay})):e.delay,a.endDelay=t?a.duration-Math.max.apply(Math,r.map(function(i){return n(i)+i.duration-i.endDelay})):e.endDelay,a}var ZO=0;function Qpe(r){var e=Ww(W6,r),t=Ww(N2,r),n=Ype(t,r),a=eV(r.targets),i=qpe(a,n),o=nV(i,t),s=ZO;return ZO++,qm(e,{id:s,children:[],animatables:a,animations:i,duration:o.duration,delay:o.delay,endDelay:o.endDelay})}var ya=[],aV=(function(){var r;function e(){!r&&(!KO()||!ft.suspendWhenDocumentHidden)&&ya.length>0&&(r=requestAnimationFrame(t))}function t(a){for(var i=ya.length,o=0;o<i;){var s=ya[o];s.paused?(ya.splice(o,1),i--):(s.tick(a),o++)}r=o>0?requestAnimationFrame(t):void 0}function n(){ft.suspendWhenDocumentHidden&&(KO()?r=cancelAnimationFrame(r):(ya.forEach(function(a){return a._onDocumentVisibility()}),aV()))}return typeof document<"u"&&document.addEventListener("visibilitychange",n),e})();function KO(){return!!document&&document.hidden}function ft(r){r===void 0&&(r={});var e=0,t=0,n=0,a,i=0,o=null;function s(_){var T=window.Promise&&new Promise(function(C){return o=C});return _.finished=T,T}var l=Qpe(r);s(l);function u(){var _=l.direction;_!=="alternate"&&(l.direction=_!=="normal"?"normal":"reverse"),l.reversed=!l.reversed,a.forEach(function(T){return T.reversed=l.reversed})}function c(_){return l.reversed?l.duration-_:_}function f(){e=0,t=c(l.currentTime)*(1/ft.speed)}function d(_,T){T&&T.seek(_-T.timelineOffset)}function h(_){if(l.reversePlayback)for(var C=i;C--;)d(_,a[C]);else for(var T=0;T<i;T++)d(_,a[T])}function v(_){for(var T=0,C=l.animations,k=C.length;T<k;){var A=C[T],L=A.animatable,D=A.tweens,P=D.length-1,E=D[P];P&&(E=Zm(D,function(_e){return _<_e.end})[0]||E);for(var O=Qa(_-E.start-E.delay,0,E.duration)/E.duration,B=isNaN(O)?1:E.easing(O),N=E.to.strings,W=E.round,H=[],$=E.to.numbers.length,Z=void 0,G=0;G<$;G++){var X=void 0,K=E.to.numbers[G],V=E.from.numbers[G]||0;E.isPath?X=$pe(E.value,B*K,E.isPathTargetInsideSVG):X=V+B*(K-V),W&&(E.isColor&&G>2||(X=Math.round(X*W)/W)),H.push(X)}var U=N.length;if(!U)Z=H[0];else{Z=N[0];for(var ae=0;ae<U;ae++){N[ae];var ce=N[ae+1],re=H[ae];isNaN(re)||(ce?Z+=re+ce:Z+=re+" ")}}tV[A.type](L.target,A.property,Z,L.transforms),A.currentValue=Z,T++}}function y(_){l[_]&&!l.passThrough&&l[_](l)}function m(){l.remaining&&l.remaining!==!0&&l.remaining--}function x(_){var T=l.duration,C=l.delay,k=T-l.endDelay,A=c(_);l.progress=Qa(A/T*100,0,100),l.reversePlayback=A<l.currentTime,a&&h(A),!l.began&&l.currentTime>0&&(l.began=!0,y("begin")),!l.loopBegan&&l.currentTime>0&&(l.loopBegan=!0,y("loopBegin")),A<=C&&l.currentTime!==0&&v(0),(A>=k&&l.currentTime!==T||!T)&&v(T),A>C&&A<k?(l.changeBegan||(l.changeBegan=!0,l.changeCompleted=!1,y("changeBegin")),y("change"),v(A)):l.changeBegan&&(l.changeCompleted=!0,l.changeBegan=!1,y("changeComplete")),l.currentTime=Qa(A,0,T),l.began&&y("update"),_>=T&&(t=0,m(),l.remaining?(e=n,y("loopComplete"),l.loopBegan=!1,l.direction==="alternate"&&u()):(l.paused=!0,l.completed||(l.completed=!0,y("loopComplete"),y("complete"),!l.passThrough&&"Promise"in window&&(o(),s(l)))))}return l.reset=function(){var _=l.direction;l.passThrough=!1,l.currentTime=0,l.progress=0,l.paused=!0,l.began=!1,l.loopBegan=!1,l.changeBegan=!1,l.completed=!1,l.changeCompleted=!1,l.reversePlayback=!1,l.reversed=_==="reverse",l.remaining=l.loop,a=l.children,i=a.length;for(var T=i;T--;)l.children[T].reset();(l.reversed&&l.loop!==!0||_==="alternate"&&l.loop===1)&&l.remaining++,v(l.reversed?l.duration:0)},l._onDocumentVisibility=f,l.set=function(_,T){return rV(_,T),l},l.tick=function(_){n=_,e||(e=n),x((n+(t-e))*ft.speed)},l.seek=function(_){x(c(_))},l.pause=function(){l.paused=!0,f()},l.play=function(){l.paused&&(l.completed&&l.reset(),l.paused=!1,ya.push(l),f(),aV())},l.reverse=function(){u(),l.completed=!l.reversed,f()},l.restart=function(){l.reset(),l.play()},l.remove=function(_){var T=U2(_);iV(T,l)},l.reset(),l.autoplay&&l.play(),l}function qO(r,e){for(var t=e.length;t--;)B2(r,e[t].animatable.target)&&e.splice(t,1)}function iV(r,e){var t=e.animations,n=e.children;qO(r,t);for(var a=n.length;a--;){var i=n[a],o=i.animations;qO(r,o),!o.length&&!i.children.length&&n.splice(a,1)}!t.length&&!n.length&&e.pause()}function Jpe(r){for(var e=U2(r),t=ya.length;t--;){var n=ya[t];iV(e,n)}}function eve(r,e){e===void 0&&(e={});var t=e.direction||"normal",n=e.easing?j2(e.easing):null,a=e.grid,i=e.axis,o=e.from||0,s=o==="first",l=o==="center",u=o==="last",c=Xe.arr(r),f=parseFloat(c?r[0]:r),d=c?parseFloat(r[1]):0,h=Hi(c?r[1]:r)||0,v=e.start||0+(c?f:0),y=[],m=0;return function(x,_,T){if(s&&(o=0),l&&(o=(T-1)/2),u&&(o=T-1),!y.length){for(var C=0;C<T;C++){if(!a)y.push(Math.abs(o-C));else{var k=l?(a[0]-1)/2:o%a[0],A=l?(a[1]-1)/2:Math.floor(o/a[0]),L=C%a[0],D=Math.floor(C/a[0]),P=k-L,E=A-D,O=Math.sqrt(P*P+E*E);i==="x"&&(O=-P),i==="y"&&(O=-E),y.push(O)}m=Math.max.apply(Math,y)}n&&(y=y.map(function(N){return n(N/m)*m})),t==="reverse"&&(y=y.map(function(N){return i?N<0?N*-1:-N:Math.abs(m-N)}))}var B=c?(d-f)/m:f;return v+B*(Math.round(y[_]*100)/100)+h}}function tve(r){r===void 0&&(r={});var e=ft(r);return e.duration=0,e.add=function(t,n){var a=ya.indexOf(e),i=e.children;a>-1&&ya.splice(a,1);function o(d){d.passThrough=!0}for(var s=0;s<i.length;s++)o(i[s]);var l=qm(t,Ww(N2,r));l.targets=l.targets||r.targets;var u=e.duration;l.autoplay=!1,l.direction=e.direction,l.timelineOffset=Xe.und(n)?u:$2(n,u),o(e),e.seek(l.timelineOffset);var c=ft(l);o(c),i.push(c);var f=nV(i,r);return e.delay=f.delay,e.endDelay=f.endDelay,e.duration=f.duration,e.seek(0),e.reset(),e.autoplay&&e.play(),e},e}ft.version="3.2.1";ft.speed=1;ft.suspendWhenDocumentHidden=!0;ft.running=ya;ft.remove=Jpe;ft.get=W2;ft.set=rV;ft.convertPx=V2;ft.path=Wpe;ft.setDashoffset=Vpe;ft.stagger=eve;ft.timeline=tve;ft.easing=j2;ft.penner=U6;ft.random=function(r,e){return Math.floor(Math.random()*(e-r+1))+r};function rve({tabs:r,activeTab:e,onTabChange:t,tabRefs:n,indicatorRef:a}){return Y.useEffect(()=>{const i=n.current[e];if(i&&a.current){const{offsetLeft:o,offsetWidth:s}=i;ft({targets:a.current,left:o,width:s,duration:400,easing:"easeOutExpo"})}},[e,n,a]),b.jsxs("div",{style:{position:"relative",display:"flex",flex:1},children:[r.map(i=>b.jsxs("button",{type:"button",ref:o=>{o&&(n.current[i.id]=o)},onClick:()=>t(i.id),style:{padding:"14px 24px",background:e===i.id?S.bgSecondary:"transparent",border:"none",borderBottom:"3px solid transparent",color:e===i.id?S.textPrimary:S.textSecondary,cursor:"pointer",fontSize:"13px",fontFamily:j.body,fontWeight:e===i.id?"600":"400",display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"4px",position:"relative",borderRadius:"8px 8px 0 0",zIndex:1},onMouseEnter:o=>{e!==i.id&&ft({targets:o.currentTarget,background:S.bgHover,color:S.textPrimary,duration:200,easing:"easeOutQuad"})},onMouseLeave:o=>{e!==i.id&&ft({targets:o.currentTarget,background:"transparent",color:S.textSecondary,duration:200,easing:"easeOutQuad"})},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[b.jsx("div",{style:{display:"flex",alignItems:"center",color:"currentColor"},children:b.jsx(i.icon,{size:16})}),b.jsx("span",{children:i.label})]}),b.jsx("div",{style:{fontSize:"11px",color:e===i.id?S.textSecondary:S.textTertiary,fontWeight:"400",fontFamily:j.body},children:i.description})]},i.id)),b.jsx("div",{ref:a,style:{position:"absolute",bottom:0,height:"3px",background:S.accentBlue,borderRadius:"3px 3px 0 0",zIndex:2,pointerEvents:"none"}})]})}const nve=({size:r=16,color:e="currentColor"})=>b.jsx(om,{size:r,stroke:1.5,color:e}),ave=({size:r=16,color:e="currentColor"})=>b.jsx(qG,{size:r,stroke:1.5,color:e}),ive=({size:r=16,color:e="currentColor"})=>b.jsx(Ib,{size:r,stroke:1.5,color:e}),ove=({size:r=16,color:e="currentColor"})=>b.jsx(EG,{size:r,stroke:1.5,color:e}),sve=({size:r=16,color:e="currentColor"})=>b.jsx(qw,{size:r,stroke:1.5,color:e}),lve=({size:r=16,color:e="currentColor"})=>b.jsx(gN,{size:r,stroke:1.5,color:e}),uve=({size:r=16,color:e="currentColor"})=>b.jsx(ui,{size:r,stroke:1.5,color:e}),cve=({size:r=16,color:e="currentColor"})=>b.jsx(Cc,{size:r,stroke:1.5,color:e}),fve=({size:r=16,color:e="currentColor"})=>b.jsx(im,{size:r,stroke:1.5,color:e});function dve({tabs:r,activeTab:e,onTabChange:t,isDropdownOpen:n,setIsDropdownOpen:a,dropdownRef:i}){return b.jsxs("div",{style:{position:"relative",flex:1,display:"flex",justifyContent:"flex-end"},ref:i,children:[b.jsxs("button",{type:"button",onClick:()=>a(!n),style:{display:"flex",alignItems:"center",gap:"8px",padding:"10px 16px",background:n?S.bgSecondary:"transparent",border:"none",borderRadius:"8px",color:S.textPrimary,cursor:"pointer",fontSize:"14px",fontFamily:j.body,fontWeight:"500"},onMouseEnter:o=>{n||(o.currentTarget.style.background=S.bgHover)},onMouseLeave:o=>{n||(o.currentTarget.style.background="transparent")},children:[b.jsx(lve,{size:18,color:S.textPrimary}),b.jsx("span",{children:r.find(o=>o.id===e)?.label||"Menu"}),b.jsx("div",{style:{transform:n?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s",display:"flex",alignItems:"center"},children:b.jsx(uve,{size:14,color:S.textPrimary})})]}),n&&b.jsx("div",{style:{position:"absolute",top:"100%",right:0,marginTop:"8px",background:S.bgCard,border:`1px solid ${S.borderLight}`,borderRadius:"8px",boxShadow:`0 4px 12px ${S.shadowSm}`,minWidth:"280px",zIndex:1e3,overflow:"hidden"},children:r.map(o=>{const s=o.icon;return b.jsxs("button",{type:"button",onClick:()=>{t(o.id),a(!1)},style:{width:"100%",padding:"14px 16px",background:e===o.id?S.bgSecondary:"transparent",border:"none",borderLeft:e===o.id?`3px solid ${S.accentBlue}`:"3px solid transparent",color:e===o.id?S.textPrimary:S.textSecondary,cursor:"pointer",fontSize:"13px",fontFamily:j.body,fontWeight:e===o.id?"600":"400",display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"4px",textAlign:"left",transition:"all 0.2s"},onMouseEnter:l=>{e!==o.id&&(l.currentTarget.style.background=S.bgHover,l.currentTarget.style.color=S.textPrimary)},onMouseLeave:l=>{e!==o.id&&(l.currentTarget.style.background="transparent",l.currentTarget.style.color=S.textSecondary)},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",width:"100%"},children:[b.jsx("div",{style:{display:"flex",alignItems:"center",color:"currentColor"},children:b.jsx(s,{size:16})}),b.jsx("span",{style:{flex:1},children:o.label})]}),b.jsx("div",{style:{fontSize:"11px",color:e===o.id?S.textSecondary:S.textTertiary,fontWeight:"400",fontFamily:j.body,marginLeft:"26px"},children:o.description})]},o.id)})})]})}function hve({activeTab:r,onTabChange:e}){const t=[{id:"traffic",label:"Traffic Capture",icon:nve,description:"Wireshark-like HTTP request/response analysis for forensic investigation"},{id:"logs",label:"MCP Shark Logs",icon:ave,description:"View MCP Shark server console output and debug logs"},{id:"setup",label:"MCP Server Setup",icon:ive,description:"Configure and manage MCP Shark server"},{id:"playground",label:"MCP Playground",icon:ove,description:"Test and interact with MCP tools, prompts, and resources"},{id:"security",label:"Local Analysis",icon:cve,description:"Local static analysis of captured MCP traffic"},{id:"aauth-explorer",label:"AAuth Explorer",icon:fve,description:"Live knowledge graph of AAuth signals (agents, missions, resources, signing, access) observed in captured traffic"},{id:"smart-scan",label:"Smart Scan",icon:sve,description:"AI-powered security analysis via remote API"}],n=Y.useRef({}),a=Y.useRef(null),[i,o]=Y.useState(!1),[s,l]=Y.useState(!1),u=Y.useRef(null);return Y.useEffect(()=>{const c=()=>{o(window.innerWidth<1200)};return c(),window.addEventListener("resize",c),()=>window.removeEventListener("resize",c)},[]),Y.useEffect(()=>{const c=f=>{u.current&&!u.current.contains(f.target)&&l(!1)};return s&&document.addEventListener("mousedown",c),()=>{document.removeEventListener("mousedown",c)}},[s]),b.jsx("div",{style:{borderBottom:`1px solid ${S.borderLight}`,background:S.bgCard,boxShadow:`0 1px 3px ${S.shadowSm}`},children:b.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"0 16px",gap:"12px"},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",paddingRight:"12px",borderRight:`1px solid ${S.borderLight}`},children:[b.jsx(kpe,{size:24}),b.jsx("span",{style:{fontSize:"16px",fontWeight:"600",color:S.textPrimary,fontFamily:j.body},children:"MCP Shark"})]}),i?b.jsx(dve,{tabs:t,activeTab:r,onTabChange:e,isDropdownOpen:s,setIsDropdownOpen:l,dropdownRef:u}):b.jsx(rve,{tabs:t,activeTab:r,onTabChange:e,tabRefs:n,indicatorRef:a})]})})}const kb={agent:{color:"#1a73e8",symbolSize:38,label:"Agent"},mission:{color:"#e8710a",symbolSize:32,label:"Mission"},resource:{color:"#137333",symbolSize:38,label:"Resource"},signing:{color:"#9334e6",symbolSize:28,label:"Signing"},access:{color:"#b06000",symbolSize:28,label:"Access"}},QO={calls:"calls",pursues:"pursues",targets:"targets","signs-with":"signs with",requires:"requires"};function pve({graph:r,onNodeSelect:e,selectedNodeId:t}){const n=Y.useRef(null),a=Y.useMemo(()=>{const i=(r?.categories||[]).map(c=>({name:c.label,itemStyle:{color:kb[c.id]?.color||"#888"}})),o=Object.fromEntries((r?.categories||[]).map((c,f)=>[c.id,f])),s=(r?.nodes||[]).reduce((c,f)=>Math.max(c,f.packet_count||0),1),l=(r?.nodes||[]).map(c=>{const f=kb[c.category]||{symbolSize:24,color:"#888"},d=Math.min(20,Math.round(c.packet_count/s*18));return{id:c.id,name:c.name,category:o[c.category]??0,symbolSize:f.symbolSize+d,value:c.packet_count,label:{show:!0,formatter:gve(c.name,c.category),fontSize:11,fontFamily:j.body,color:S.textPrimary},itemStyle:{color:f.color,borderColor:c.id===t?S.textPrimary:"transparent",borderWidth:c.id===t?3:0,shadowBlur:c.id===t?12:0,shadowColor:f.color},_raw:c}}),u=(r?.edges||[]).map(c=>({source:c.source,target:c.target,value:c.weight,lineStyle:{width:Math.max(1,Math.min(6,c.weight)),color:"source",opacity:.55,curveness:.12},label:{show:!1,formatter:QO[c.kind]||c.kind,fontSize:10,color:S.textTertiary},_kind:c.kind}));return{backgroundColor:"transparent",tooltip:{trigger:"item",backgroundColor:"#fff",borderColor:S.borderLight,textStyle:{color:S.textPrimary,fontFamily:j.body,fontSize:12},formatter:c=>{if(c.dataType==="edge")return`<strong>${QO[c.data._kind]||c.data._kind}</strong><br/>weight: ${c.data.value}`;const f=c.data._raw||{};return[`<strong>${yve(f.name)}</strong>`,`<span style="color:${S.textSecondary}">${kb[f.category]?.label||f.category}</span>`,`${f.packet_count} observation${f.packet_count===1?"":"s"}`].join("<br/>")}},legend:[{data:i.map(c=>c.name),orient:"horizontal",top:0,left:"center",textStyle:{color:S.textSecondary,fontFamily:j.body,fontSize:11},itemWidth:10,itemHeight:10}],animationDuration:800,animationEasingUpdate:"quinticInOut",series:[{name:"AAuth observations",type:"graph",layout:"force",legendHoverLink:!0,roam:!0,draggable:!0,focusNodeAdjacency:!0,categories:i,data:l,links:u,force:{repulsion:220,edgeLength:[80,180],gravity:.08,friction:.6},emphasis:{focus:"adjacency",label:{show:!0,fontSize:12,fontFamily:j.body},lineStyle:{width:3}},label:{position:"right",color:S.textPrimary},lineStyle:{color:"source",curveness:.1}}]}},[r,t]);return!r||(r.nodes?.length||0)===0?b.jsxs("div",{style:{height:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",gap:"12px",padding:"40px",color:S.textSecondary,fontFamily:j.body},children:[b.jsx("div",{style:{fontSize:"32px"},children:"·· · ··"}),b.jsxs("div",{style:{fontSize:"13px",textAlign:"center",maxWidth:520,lineHeight:1.5},children:["No AAuth signals have been observed yet. To preview this view with fake data, click"," ",b.jsx("strong",{children:"Generate sample data"})," in the header above. For real signals, capture AAuth-bearing traffic through the mcp-shark proxy (e.g. by exercising any AAuth-aware MCP from your IDE)."]})]}):b.jsx(Xm,{ref:n,option:a,notMerge:!0,lazyUpdate:!0,style:{height:"100%",width:"100%"},onEvents:{click:i=>{if(i.dataType==="node"&&typeof e=="function"){const o=i.data._raw||{};e({category:vve(r,i.data.category),id:o.name,nodeKey:i.data.id,raw:o})}}}})}function vve(r,e){return r?.categories?.[e]?.id||null}function gve(r,e){return r?e==="resource"&&r.length>22?`${r.slice(0,20)}…`:e==="mission"&&r.length>28?`${r.slice(0,26)}…`:e==="agent"&&r.length>28?`${r.slice(0,26)}…`:r:""}function yve(r){return typeof r!="string"?"":r.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}const mve={agent:"Agent",mission:"Mission",resource:"Resource",signing:"Signing algorithm",access:"Access mode"},JO={signed:S.success,"aauth-aware":"#1a73e8",bearer:S.warning,none:S.textTertiary};function xve({selection:r,onClose:e,onOpenPacket:t}){const[n,a]=Y.useState(null),[i,o]=Y.useState(!1),[s,l]=Y.useState(null);return Y.useEffect(()=>{if(!r){a(null);return}let u=!1;return o(!0),l(null),fetch(`/api/aauth/node/${encodeURIComponent(r.category)}/${encodeURIComponent(r.id)}`).then(async c=>{if(!c.ok)throw new Error(`HTTP ${c.status}`);return c.json()}).then(c=>{u||a(c)}).catch(c=>{u||l(c.message||"Failed to load node packets")}).finally(()=>{u||o(!1)}),()=>{u=!0}},[r]),r?b.jsxs("div",{style:{width:"380px",minWidth:"320px",height:"100%",background:S.bgCard,borderLeft:`1px solid ${S.borderLight}`,display:"flex",flexDirection:"column",boxShadow:`-2px 0 8px ${S.shadowSm}`},children:[b.jsxs("div",{style:{padding:"14px 16px",borderBottom:`1px solid ${S.borderLight}`,display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"12px"},children:[b.jsxs("div",{style:{minWidth:0},children:[b.jsx("div",{style:{fontSize:"11px",fontFamily:j.body,color:S.textTertiary,textTransform:"uppercase",letterSpacing:"0.05em"},children:mve[r.category]||r.category}),b.jsx("div",{style:{fontSize:"14px",fontFamily:j.body,fontWeight:600,color:S.textPrimary,marginTop:"2px",wordBreak:"break-all"},children:r.id}),r.raw?.packet_count!=null&&b.jsxs("div",{style:{fontSize:"11px",fontFamily:j.body,color:S.textSecondary,marginTop:"4px"},children:[r.raw.packet_count," observation",r.raw.packet_count===1?"":"s"]})]}),b.jsx("button",{type:"button",onClick:e,"aria-label":"Close detail panel",style:{padding:"4px",background:"transparent",border:"none",cursor:"pointer",color:S.textSecondary},children:b.jsx(kh,{size:16,stroke:1.5})})]}),b.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"8px 0"},children:[i&&b.jsx("div",{style:{padding:"14px 16px",fontSize:"12px",fontFamily:j.body,color:S.textSecondary},children:"Loading observations…"}),s&&b.jsx("div",{style:{padding:"14px 16px",fontSize:"12px",fontFamily:j.body,color:S.error},children:s}),n&&n.packets?.length===0&&!i&&b.jsx("div",{style:{padding:"14px 16px",fontSize:"12px",fontFamily:j.body,color:S.textSecondary},children:"No matching packets are currently in the capture buffer."}),n?.packets?.map(u=>b.jsxs("button",{type:"button",onClick:()=>t?.(u.frame_number),style:{display:"block",width:"100%",textAlign:"left",padding:"10px 16px",borderTop:"none",borderRight:"none",borderLeft:`3px solid ${JO[u.posture]||S.textTertiary}`,borderBottom:`1px solid ${S.borderLight}`,background:"transparent",cursor:"pointer",fontFamily:j.body},onMouseEnter:c=>{c.currentTarget.style.background=S.bgHover},onMouseLeave:c=>{c.currentTarget.style.background="transparent"},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"8px",marginBottom:"4px"},children:[b.jsxs("span",{style:{fontSize:"11px",fontFamily:j.mono,color:S.textSecondary},children:["#",u.frame_number," · ",u.direction,u.method?` · ${u.method}`:"",u.status_code?` · ${u.status_code}`:""]}),b.jsx(Xw,{size:11,stroke:1.5,style:{color:S.textTertiary}})]}),b.jsx("div",{style:{fontSize:"12px",color:S.textPrimary,wordBreak:"break-all"},children:u.jsonrpc_method||u.url||u.host||"(no destination)"}),b.jsxs("div",{style:{fontSize:"10px",marginTop:"4px",display:"flex",gap:"8px",flexWrap:"wrap",color:S.textTertiary,fontFamily:j.mono},children:[b.jsx("span",{style:{color:JO[u.posture]||S.textTertiary},children:u.posture}),u.agent&&b.jsxs("span",{children:["agent=",eN(u.agent,32)]}),u.mission&&b.jsxs("span",{children:["mission=",eN(u.mission,28)]}),u.sig_alg&&b.jsxs("span",{children:["alg=",u.sig_alg]})]})]},u.frame_number))]})]}):null}function eN(r,e){return!r||r.length<=e?r:`${r.slice(0,e-1)}…`}const Sve={agent:{label:"Agents",color:"#1a73e8"},mission:{label:"Missions",color:"#e8710a"},resource:{label:"Resources",color:"#137333"},signing:{label:"Signing",color:"#9334e6"},access:{label:"Access modes",color:"#b06000"}},bve=5e3;function _ve({onOpenPacket:r}){const[e,t]=Y.useState(null),[n,a]=Y.useState(!1),[i,o]=Y.useState(!1),[s,l]=Y.useState(null),[u,c]=Y.useState(null),[f,d]=Y.useState(!0),[h,v]=Y.useState(null),[y,m]=Y.useState(0),x=Y.useCallback(async()=>{l(null);try{const[C,k]=await Promise.all([fetch("/api/aauth/graph"),fetch("/api/aauth/upstreams")]);if(!C.ok)throw new Error(`HTTP ${C.status}`);const A=await C.json();if(t(A),k.ok){const L=await k.json();m(L.count||0)}}catch(C){l(C.message||"Failed to load AAuth graph")}},[]),_=Y.useCallback(async()=>{o(!0),l(null);try{const C=await fetch("/api/aauth/self-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({rounds:2})});if(!C.ok)throw new Error(`HTTP ${C.status}`);const k=await C.json();v(k),await x()}catch(C){l(C.message||"Failed to generate sample traffic")}finally{o(!1)}},[x]);Y.useEffect(()=>{a(!0),x().finally(()=>a(!1))},[x]),Y.useEffect(()=>{if(!f)return;const C=setInterval(x,bve);return()=>clearInterval(C)},[f,x]);const T=e?.stats||{observed_packets:0,node_counts:{},edge_count:0};return b.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",width:"100%",background:S.bgPrimary},children:[b.jsx(wve,{running:i,loading:n,upstreamCount:y,autoRefresh:f,onToggleAutoRefresh:()=>d(C=>!C),onRefresh:()=>{a(!0),x().finally(()=>a(!1))},onGenerateSample:_}),h&&b.jsxs("div",{style:{padding:"8px 16px",background:`${S.warning}1A`,borderBottom:`1px solid ${S.warning}55`,fontSize:"11px",fontFamily:j.body,color:S.textSecondary},children:[b.jsx("strong",{children:"Sample data inserted:"})," ",h.inserted," fake packets across"," ",h.targets?.length||0," upstream",(h.targets?.length||0)===1?"":"s"," (tagged"," ",b.jsx("code",{style:{fontFamily:j.mono},children:"user-agent: mcp-shark-self-test/1.0"}),") ·"," ",Object.entries(h.by_posture||{}).map(([C,k])=>`${C}=${k}`).join(" · ")]}),s&&b.jsx("div",{style:{padding:"10px 16px",background:S.errorBg,borderBottom:`1px solid ${S.error}55`,fontSize:"12px",fontFamily:j.body,color:S.error},children:s}),b.jsx(Tve,{stats:T}),b.jsxs("div",{style:{flex:1,display:"flex",minHeight:0},children:[b.jsxs("div",{style:{flex:1,position:"relative",minWidth:0,background:S.bgPrimary,borderTop:`1px solid ${S.borderLight}`},children:[b.jsx(pve,{graph:e,onNodeSelect:C=>c(C),selectedNodeId:u?.nodeKey||null}),b.jsx(Cve,{})]}),u&&b.jsx(xve,{selection:u,onClose:()=>c(null),onOpenPacket:r})]})]})}function wve({running:r,loading:e,upstreamCount:t,autoRefresh:n,onToggleAutoRefresh:a,onRefresh:i,onGenerateSample:o}){return b.jsxs("div",{style:{padding:"16px 20px",background:S.bgCard,borderBottom:`1px solid ${S.borderLight}`,display:"flex",alignItems:"center",justifyContent:"space-between",gap:"16px",flexWrap:"wrap"},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[b.jsx(im,{size:22,stroke:1.5,style:{color:"#1a73e8"}}),b.jsxs("div",{children:[b.jsx("div",{style:{fontSize:"16px",fontWeight:600,fontFamily:j.body,color:S.textPrimary,lineHeight:1.1},children:"AAuth Explorer"}),b.jsxs("div",{style:{fontSize:"11px",color:S.textSecondary,fontFamily:j.body,marginTop:"2px"},children:["Auto-detected from captured traffic ·"," ",t>0?`${t} HTTP upstream${t===1?"":"s"} configured`:"no HTTP upstreams configured"," ","· observation only, no verification"]})]})]}),b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[b.jsxs("label",{style:{display:"inline-flex",alignItems:"center",gap:"6px",fontSize:"11px",fontFamily:j.body,color:S.textSecondary,cursor:"pointer"},children:[b.jsx("input",{type:"checkbox",checked:n,onChange:a,style:{cursor:"pointer"}}),"Live refresh"]}),b.jsxs("button",{type:"button",onClick:i,disabled:e,"aria-label":"Refresh AAuth graph",style:{display:"inline-flex",alignItems:"center",gap:"6px",padding:"6px 12px",background:"transparent",border:`1px solid ${S.borderLight}`,borderRadius:"6px",color:S.textSecondary,fontSize:"12px",fontFamily:j.body,cursor:e?"wait":"pointer"},children:[b.jsx(Qo,{size:13,stroke:1.5}),"Refresh"]}),b.jsxs("button",{type:"button",onClick:o,disabled:r,title:"Inserts fake AAuth packets so you can see how the visualization works. Not real traffic — synthetic packets are tagged with user-agent mcp-shark-self-test/1.0.","aria-label":"Generate fake sample AAuth traffic for demo purposes",style:{display:"inline-flex",alignItems:"center",gap:"6px",padding:"6px 14px",background:S.warning,border:`1px solid ${S.warning}`,borderRadius:"6px",color:"#fff",fontSize:"12px",fontFamily:j.body,fontWeight:500,cursor:r?"wait":"pointer",opacity:r?.7:1},children:[b.jsx(pN,{size:13,stroke:1.5}),r?"Generating…":"Generate sample data"]})]})]})}function Tve({stats:r}){const e=r.node_counts||{};return b.jsxs("div",{style:{display:"flex",gap:"24px",padding:"10px 20px",background:S.bgSecondary,borderBottom:`1px solid ${S.borderLight}`,fontFamily:j.body,fontSize:"11px",color:S.textSecondary,flexWrap:"wrap"},children:[Object.entries(Sve).map(([t,n])=>b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[b.jsx("span",{"aria-hidden":"true",style:{width:"10px",height:"10px",borderRadius:"50%",background:n.color,display:"inline-block"}}),b.jsx("span",{children:n.label}),b.jsx("strong",{style:{color:S.textPrimary,fontFamily:j.mono},children:e[t]||0})]},t)),b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px",marginLeft:"auto"},children:[b.jsx("span",{children:"Edges"}),b.jsx("strong",{style:{color:S.textPrimary,fontFamily:j.mono},children:r.edge_count||0}),b.jsx("span",{style:{marginLeft:"12px"},children:"Observed packets"}),b.jsx("strong",{style:{color:S.textPrimary,fontFamily:j.mono},children:r.observed_packets||0})]})]})}function Cve(){return b.jsxs("div",{style:{position:"absolute",bottom:12,left:12,padding:"6px 10px",background:`${S.bgCard}E6`,border:`1px solid ${S.borderLight}`,borderRadius:"6px",fontSize:"10px",fontFamily:j.body,color:S.textSecondary,display:"inline-flex",alignItems:"center",gap:"6px",boxShadow:`0 1px 2px ${S.shadowSm}`},children:[b.jsx(Cc,{size:11,stroke:1.5}),"Observation only · no signature verification is performed"]})}function Mve({style:r,onClick:e,onMouseEnter:t,onMouseLeave:n}){const a=()=>{window.open("/api-docs","_blank"),e&&e()},i={position:"fixed",bottom:"20px",right:"80px",background:S.bgCard,border:`1px solid ${S.borderLight}`,borderRadius:"50%",width:"48px",height:"48px",padding:0,color:S.textSecondary,cursor:"pointer",fontFamily:j.body,boxShadow:`0 4px 12px ${S.shadowMd}`,display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999,transition:"all 0.2s ease",...r},o=l=>{l.currentTarget.style.background=S.bgHover,l.currentTarget.style.color=S.textPrimary,l.currentTarget.style.borderColor=S.borderMedium,l.currentTarget.style.transform="scale(1.1)",l.currentTarget.style.boxShadow=`0 6px 16px ${S.shadowLg}`,t&&t(l)},s=l=>{l.currentTarget.style.background=S.bgCard,l.currentTarget.style.color=S.textSecondary,l.currentTarget.style.borderColor=S.borderLight,l.currentTarget.style.transform="scale(1)",l.currentTarget.style.boxShadow=`0 4px 12px ${S.shadowMd}`,n&&n(l)};return b.jsx("button",{type:"button",onClick:a,style:i,onMouseEnter:o,onMouseLeave:s,title:"View API Documentation",children:b.jsx(LG,{size:20,stroke:1.5})})}function oV({isOpen:r,onClose:e,title:t,message:n,type:a="error"}){if(!r)return null;const i=a==="error";return b.jsx("dialog",{open:!0,"aria-modal":"true",style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,border:"none",margin:0,width:"100%",height:"100%"},onClick:e,onKeyDown:o=>{(o.key==="Escape"||o.key==="Enter")&&e()},children:b.jsxs("div",{role:"document",style:{background:S.bgCard,borderRadius:"12px",padding:"24px",maxWidth:"500px",width:"90%",boxShadow:`0 4px 20px ${S.shadowLg}`,fontFamily:j.body},onClick:o=>o.stopPropagation(),onKeyDown:o=>o.stopPropagation(),children:[b.jsx("h3",{style:{margin:"0 0 12px 0",fontSize:"18px",fontWeight:"600",color:i?S.error:S.textPrimary},children:t||(i?"Error":"Information")}),b.jsx("p",{style:{margin:"0 0 24px 0",fontSize:"14px",color:S.textSecondary,lineHeight:"1.5"},children:n}),b.jsx("div",{style:{display:"flex",gap:"12px",justifyContent:"flex-end"},children:b.jsx("button",{type:"button",onClick:e,style:{padding:"10px 20px",background:i?S.buttonDanger:S.buttonPrimary,border:"none",borderRadius:"8px",color:S.textInverse,fontSize:"14px",fontWeight:"500",fontFamily:j.body,cursor:"pointer",transition:"all 0.2s"},onMouseEnter:o=>{o.currentTarget.style.background=i?S.buttonDangerHover:S.buttonPrimaryHover},onMouseLeave:o=>{o.currentTarget.style.background=i?S.buttonDanger:S.buttonPrimary},children:"OK"})})]})})}function kve({isOpen:r}){return r?b.jsx("dialog",{open:!0,"aria-modal":"true",style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.7)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4,border:"none",margin:0,width:"100%",height:"100%"},children:b.jsxs("div",{role:"document",style:{background:S.bgCard,borderRadius:"12px",padding:"32px",maxWidth:"400px",width:"90%",boxShadow:`0 4px 20px ${S.shadowLg}`,fontFamily:j.body,textAlign:"center"},children:[b.jsx("h3",{style:{margin:"0 0 16px 0",fontSize:"20px",fontWeight:"600",color:S.textPrimary},children:"Shutting Down..."}),b.jsx("p",{style:{margin:"0 0 24px 0",fontSize:"14px",color:S.textSecondary,lineHeight:"1.5"},children:"MCP Shark is shutting down. The server will stop in a moment."}),b.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",marginBottom:"16px"},children:b.jsx(Lb,{size:48,stroke:2,color:S.error,style:{animation:"shutdown-spin 1s linear infinite"}})}),b.jsx("style",{children:`
|
|
64
|
+
@keyframes shutdown-spin {
|
|
65
|
+
from {
|
|
66
|
+
transform: rotate(0deg);
|
|
67
|
+
}
|
|
68
|
+
to {
|
|
69
|
+
transform: rotate(360deg);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
`})]})}):null}function Ave({style:r,onClick:e,onMouseEnter:t,onMouseLeave:n}){const[a,i]=Y.useState(!1),[o,s]=Y.useState(!1),[l,u]=Y.useState(!1),[c,f]=Y.useState(""),d=async()=>{u(!0);const{success:x,message:_}=await Lve();x?(console.log("Shutdown successful"),window.location.reload()):(u(!1),f(_),s(!0))},h=()=>{i(!0),e&&e()},v={position:"fixed",bottom:"20px",left:"20px",background:S.bgCard,border:`1px solid ${S.borderLight}`,borderRadius:"50%",width:"48px",height:"48px",padding:0,color:S.textSecondary,cursor:"pointer",fontFamily:j.body,boxShadow:`0 4px 12px ${S.shadowMd}`,display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999,transition:"all 0.2s ease",...r},y=x=>{x.currentTarget.style.background=S.bgHover,x.currentTarget.style.color=S.error,x.currentTarget.style.borderColor=S.borderMedium,x.currentTarget.style.transform="scale(1.1)",x.currentTarget.style.boxShadow=`0 6px 16px ${S.shadowLg}`,t&&t(x)},m=x=>{x.currentTarget.style.background=S.bgCard,x.currentTarget.style.color=S.textSecondary,x.currentTarget.style.borderColor=S.borderLight,x.currentTarget.style.transform="scale(1)",x.currentTarget.style.boxShadow=`0 4px 12px ${S.shadowMd}`,n&&n(x)};return b.jsxs(b.Fragment,{children:[b.jsx("button",{type:"button",onClick:h,style:v,onMouseEnter:y,onMouseLeave:m,title:"Shutdown MCP Shark",children:b.jsx(bW,{size:20,stroke:1.5})}),b.jsx(Ah,{isOpen:a,onClose:()=>i(!1),onConfirm:d,title:"Shutdown MCP Shark",message:"Are you sure you want to shutdown MCP Shark? This will stop the server and all services.",confirmText:"Shutdown",cancelText:"Cancel",danger:!0}),b.jsx(oV,{isOpen:o,onClose:()=>s(!1),title:"Shutdown Failed",message:c,type:"error"}),b.jsx(kve,{isOpen:l})]})}async function Lve(){return Promise.race([Dve(),Ive(3e3)])}async function Ive(r){return new Promise(e=>setTimeout(()=>e({success:!0,message:"Shutdown timed out"}),r))}async function Dve(){try{const r=await fetch("/api/composite/shutdown",{method:"POST"});return{success:r.ok,message:r.message}}catch(r){return console.error("Shutdown error:",r),{success:!1,message:r.message||"Failed to shutdown server"}}}function Pve(){const[r,e]=Y.useState(!1),t=Y.useRef(null);Y.useEffect(()=>{const i=o=>{t.current&&!t.current.contains(o.target)&&e(!1)};if(r)return document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)},[r]);const n={position:"fixed",bottom:"20px",right:"20px",background:S.bgCard,border:`1px solid ${S.borderLight}`,borderRadius:"50%",width:"48px",height:"48px",padding:0,color:S.textSecondary,cursor:"pointer",fontFamily:j.body,boxShadow:`0 4px 12px ${S.shadowMd}`,display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999,transition:"all 0.2s ease"},a={position:"absolute",right:"0",background:S.bgCard,border:`1px solid ${S.borderLight}`,borderRadius:"50%",width:"48px",height:"48px",padding:0,color:S.textSecondary,cursor:"pointer",fontFamily:j.body,boxShadow:`0 4px 12px ${S.shadowMd}`,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",opacity:r?1:0,pointerEvents:r?"auto":"none",transform:r?"scale(1) translateY(0)":"scale(0.8) translateY(10px)"};return b.jsxs("div",{ref:t,style:{position:"fixed",bottom:"20px",right:"20px",zIndex:9999},children:[b.jsx(Mve,{style:{...a,bottom:r?"120px":"0",position:"absolute",left:"auto"},onClick:()=>e(!1),onMouseEnter:i=>{r&&(i.currentTarget.style.transform="scale(1.1) translateY(0)",i.currentTarget.style.boxShadow=`0 6px 16px ${S.shadowLg}`)},onMouseLeave:i=>{r&&(i.currentTarget.style.transform="scale(1) translateY(0)",i.currentTarget.style.boxShadow=`0 4px 12px ${S.shadowMd}`)}}),b.jsx(Ave,{style:{...a,bottom:r?"60px":"0",position:"absolute",left:"auto"},onClick:()=>e(!1),onMouseEnter:i=>{r&&(i.currentTarget.style.transform="scale(1.1) translateY(0)",i.currentTarget.style.boxShadow=`0 6px 16px ${S.shadowLg}`)},onMouseLeave:i=>{r&&(i.currentTarget.style.transform="scale(1) translateY(0)",i.currentTarget.style.boxShadow=`0 4px 12px ${S.shadowMd}`)}}),b.jsx("button",{type:"button",onClick:()=>e(!r),style:{...n,background:r?S.accentBlue:S.bgCard,color:r?S.textInverse:S.textSecondary},onMouseEnter:i=>{r||(i.currentTarget.style.background=S.bgHover,i.currentTarget.style.color=S.textPrimary,i.currentTarget.style.borderColor=S.borderMedium,i.currentTarget.style.transform="scale(1.1)",i.currentTarget.style.boxShadow=`0 6px 16px ${S.shadowLg}`)},onMouseLeave:i=>{r||(i.currentTarget.style.background=S.bgCard,i.currentTarget.style.color=S.textSecondary,i.currentTarget.style.borderColor=S.borderLight,i.currentTarget.style.transform="scale(1)",i.currentTarget.style.boxShadow=`0 4px 12px ${S.shadowMd}`)},title:r?"Close menu":"Open menu",children:r?b.jsx(kh,{size:20,stroke:1.5}):b.jsx(gN,{size:20,stroke:1.5})})]})}const Rve=({size:r=12,color:e="currentColor"})=>b.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{display:"inline-block",verticalAlign:"middle",marginRight:"4px"},role:"img","aria-label":"Chevron icon",children:[b.jsx("title",{children:"Chevron icon"}),b.jsx("polyline",{points:"6 9 12 15 18 9"})]});function eo({title:r,children:e,titleColor:t=S.accentBlue,defaultExpanded:n=!0}){const[a,i]=Y.useState(n);return b.jsxs("div",{style:{marginBottom:"16px"},children:[b.jsxs("button",{type:"button",style:{color:t,fontWeight:"600",fontFamily:j.body,fontSize:"12px",marginBottom:"8px",cursor:"pointer",userSelect:"none",display:"flex",alignItems:"center",gap:"6px",padding:"4px 0",transition:"color 0.15s ease",background:"transparent",border:"none",textAlign:"left",width:"100%"},onClick:()=>i(!a),onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),i(!a))},onMouseEnter:o=>{o.currentTarget.style.color=t===S.accentBlue?S.accentBlueHover:t},onMouseLeave:o=>{o.currentTarget.style.color=t},children:[b.jsx("span",{style:{transform:a?"rotate(0deg)":"rotate(-90deg)",transition:"transform 0.2s ease",display:"inline-block"},children:b.jsx(Rve,{size:12,color:t})}),r]}),a&&b.jsx("div",{style:{paddingLeft:"20px",color:S.textPrimary,fontFamily:j.body,fontSize:"12px",lineHeight:"1.6"},children:e})]})}const tN={signed:{label:"Signed",color:S.success,bg:"rgba(56, 161, 105, 0.10)",border:"rgba(56, 161, 105, 0.35)",Icon:Cc,description:"AAuth identity headers and an HTTP Message Signature were observed. mcp-shark does not verify signatures."},"aauth-aware":{label:"AAuth-aware",color:S.accentBlue,bg:"rgba(45, 55, 72, 0.08)",border:"rgba(45, 55, 72, 0.30)",Icon:im,description:"AAuth headers were observed but no full HTTP Message Signature was present."},bearer:{label:"Bearer",color:S.warning,bg:"rgba(214, 158, 46, 0.12)",border:"rgba(214, 158, 46, 0.40)",Icon:sW,description:"A Bearer token was observed in the Authorization header. No AAuth identity present."},none:{label:"No auth",color:S.textTertiary,bg:"rgba(128, 134, 139, 0.10)",border:"rgba(128, 134, 139, 0.30)",Icon:dW,description:"No AAuth identity or Bearer credential was observed."}};function Eve(r,e){const t=[e.description];return r?.agent&&t.push(`Agent: ${r.agent}`),r?.sig_alg&&t.push(`Algorithm: ${r.sig_alg}`),r?.mission&&t.push(`Mission: ${r.mission}`),t.join(`
|
|
73
|
+
`)}function sV({aauth:r,size:e="md",showLabel:t=!0}){const n=r?.posture||"none",a=tN[n]||tN.none,i=a.Icon,o=e==="sm"?{padding:"2px 6px",fontSize:"10px",iconSize:11}:{padding:"3px 8px",fontSize:"11px",iconSize:13};return b.jsxs("span",{title:Eve(r,a),style:{display:"inline-flex",alignItems:"center",gap:"4px",padding:o.padding,background:a.bg,border:`1px solid ${a.border}`,borderRadius:"999px",color:a.color,fontSize:o.fontSize,fontFamily:j.body,fontWeight:500,lineHeight:1.2,whiteSpace:"nowrap"},children:[b.jsx(i,{size:o.iconSize,stroke:1.6}),t&&b.jsx("span",{children:a.label})]})}function Li({label:r,value:e,mono:t=!1}){return e?b.jsxs("div",{style:{display:"flex",gap:"12px",padding:"4px 0"},children:[b.jsx("div",{style:{minWidth:"140px",color:S.textSecondary,fontSize:"11px",fontFamily:j.body,fontWeight:500,textTransform:"uppercase",letterSpacing:"0.04em"},children:r}),b.jsx("div",{style:{color:S.textPrimary,fontSize:"12px",fontFamily:t?j.mono:j.body,wordBreak:"break-all"},children:e})]}):null}function lV({aauth:r,titleColor:e}){if(!r||!(r.posture!=="none"||r.agent||r.mission||r.requirement||r.sig_present||r.error))return null;const n=Array.isArray(r.sig_covered)&&r.sig_covered.length>0?r.sig_covered.join(", "):null;return b.jsx(eo,{title:b.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"8px"},children:["Identity",b.jsx(sV,{aauth:r,size:"sm"})]}),titleColor:e||S.accentBlue,defaultExpanded:!0,children:b.jsxs("div",{style:{padding:"12px 14px",background:S.bgSecondary,border:`1px solid ${S.borderLight}`,borderRadius:"8px"},children:[b.jsx(Li,{label:"Agent",value:r.agent,mono:!0}),b.jsx(Li,{label:"Mission",value:r.mission,mono:!0}),b.jsx(Li,{label:"Signature",value:r.sig_present?"present (not verified)":null}),b.jsx(Li,{label:"Algorithm",value:r.sig_alg,mono:!0}),b.jsx(Li,{label:"Key ID",value:r.sig_keyid_short||r.sig_keyid,mono:!0}),b.jsx(Li,{label:"Key thumbprint",value:r.key_thumbprint_short,mono:!0}),b.jsx(Li,{label:"Covered components",value:n,mono:!0}),b.jsx(Li,{label:"Requirement",value:r.requirement}),b.jsx(Li,{label:"Signature error",value:r.error}),b.jsxs("div",{style:{marginTop:"10px",paddingTop:"8px",borderTop:`1px dashed ${S.borderLight}`,color:S.textTertiary,fontSize:"11px",fontFamily:j.body,lineHeight:1.45},children:["mcp-shark records AAuth signals as observed only. No signatures are cryptographically verified. Learn more at"," ",b.jsx("a",{href:"https://www.aauth.dev",target:"_blank",rel:"noreferrer noopener",style:{color:S.accentBlue},children:"aauth.dev"}),"."]})]})})}function uV({body:r,title:e,titleColor:t}){return r?b.jsx(eo,{title:e||"Body",titleColor:t,children:b.jsx("pre",{style:{background:S.bgSecondary,padding:"16px",borderRadius:"8px",overflow:"auto",fontSize:"12px",fontFamily:j.mono,maxHeight:"400px",border:`1px solid ${S.borderLight}`,color:S.textPrimary,lineHeight:"1.5"},children:typeof r=="object"?JSON.stringify(r,null,2):r})}):null}function cV({title:r,titleColor:e,children:t,defaultExpanded:n=!0}){const[a,i]=Y.useState(n);return b.jsxs("div",{style:{background:S.bgCard,borderRadius:"8px",border:`1px solid ${S.borderLight}`,overflow:"hidden",marginBottom:"20px"},children:[b.jsx("button",{type:"button",onClick:()=>i(!a),onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),i(!a))},"aria-label":`Toggle ${r} section`,style:{padding:"16px 20px",background:a?S.bgCard:S.bgSecondary,borderBottom:a?`1px solid ${S.borderLight}`:"none",cursor:"pointer",userSelect:"none",display:"flex",alignItems:"center",justifyContent:"space-between",transition:"background-color 0.15s ease",width:"100%",border:"none",textAlign:"left"},onMouseEnter:o=>{o.currentTarget.style.background=S.bgHover},onMouseLeave:o=>{o.currentTarget.style.background=a?S.bgCard:S.bgSecondary},children:b.jsxs("div",{style:{fontSize:"13px",fontWeight:"600",color:e,textTransform:"uppercase",letterSpacing:"0.05em",fontFamily:j.body,display:"flex",alignItems:"center",gap:"8px"},children:[b.jsx(ui,{size:14,stroke:1.5,style:{transform:a?"rotate(0deg)":"rotate(-90deg)",transition:"transform 0.2s ease"}}),r]})}),a&&b.jsx("div",{style:{padding:"20px"},children:t})]})}function fV({headers:r,titleColor:e}){return!r||Object.keys(r).length===0?null:b.jsx(eo,{title:"Headers",children:Object.entries(r).map(([t,n])=>b.jsxs("div",{style:{marginBottom:"6px",fontSize:"12px",fontFamily:j.body},children:[b.jsxs("span",{style:{color:e,fontWeight:"500",fontFamily:j.mono},children:[t,":"]})," ",b.jsx("span",{style:{color:S.textPrimary},children:String(n)})]},t))})}function rN(r,e){if(!(r.session_id===e.session_id))return!1;const n=am(r),a=am(e);return!n||!a?r.jsonrpc_id&&e.jsonrpc_id?r.jsonrpc_id===e.jsonrpc_id:!1:n===a?r.jsonrpc_id&&e.jsonrpc_id?r.jsonrpc_id===e.jsonrpc_id:!0:!1}function dV(r){const e=[],t=new Set;return r.forEach(n=>{if(!t.has(n.frame_number))if(n.direction==="request"){const a=r.find(i=>i.direction==="response"&&!t.has(i.frame_number)&&rN(n,i)&&i.frame_number>n.frame_number);a?(e.push({request:n,response:a,frame_number:n.frame_number}),t.add(n.frame_number),t.add(a.frame_number)):(e.push({request:n,response:null,frame_number:n.frame_number}),t.add(n.frame_number))}else n.direction==="response"&&(r.find(i=>i.direction==="request"&&!t.has(i.frame_number)&&rN(i,n)&&i.frame_number<n.frame_number)||(e.push({request:null,response:n,frame_number:n.frame_number}),t.add(n.frame_number)))}),e.sort((n,a)=>a.frame_number-n.frame_number)}const nN="LLM Server";function Y2(r,e){return e?((new Date(r)-new Date(e))/1e3).toFixed(6):"0.000000"}function X2(r){if(!r)return"-";try{return new Date(r).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}catch{return r}}function Z2(r){return r.direction==="request"?{source:nN,dest:r.remote_address||"Unknown MCP Client"}:{source:r.remote_address||"Unknown MCP Server",dest:nN}}function Qm(r){if(r.direction==="request"){if(r.body_json)try{const e=typeof r.body_json=="string"?JSON.parse(r.body_json):r.body_json;if(e&&typeof e=="object"&&e.method)return e.method}catch{}if(r.body_raw)try{const e=typeof r.body_raw=="string"?JSON.parse(r.body_raw):r.body_raw;if(e&&typeof e=="object"&&e.method)return e.method}catch{}if(r.jsonrpc_method)return r.jsonrpc_method;if(r.url)try{const e=new URL(r.url);return e.pathname+(e.search||"")}catch{const t=r.url,n=t.match(/^https?:\/\/[^\/]+(\/.*)$/);return n?n[1]:t}}return"-"}function zve(r){if(r.direction==="request"){const n=Qm(r),a=r.method||"",i=r.url||"";return n&&n!=="-"?a&&i?`${a} ${n}`:a?`${a} ${n}`:n:a&&i?`${a} ${i}`:a||i||"Request"}const e=r.status_code||"",t=r.jsonrpc_method||am(r);return e&&t?`${e} ${t}`:e?`Status: ${e}`:t||"Response"}function am(r){if(r.jsonrpc_method)return r.jsonrpc_method;if(r.direction==="request"){if(r.body_json)try{const e=typeof r.body_json=="string"?JSON.parse(r.body_json):r.body_json;if(e&&typeof e=="object"&&e.method)return e.method}catch{}if(r.body_raw)try{const e=typeof r.body_raw=="string"?JSON.parse(r.body_raw):r.body_raw;if(e&&typeof e=="object"&&e.method)return e.method}catch{}}if(r.direction==="response"&&r.body_json)try{const e=typeof r.body_json=="string"?JSON.parse(r.body_json):r.body_json}catch{}return null}function hV({data:r,titleColor:e}){if(!r)return null;const t=zve(r);return b.jsx(eo,{title:"Info",titleColor:e,defaultExpanded:!1,children:b.jsx("div",{style:{background:S.bgSecondary,padding:"12px 16px",borderRadius:"6px",border:`1px solid ${S.borderLight}`,fontFamily:j.mono,fontSize:"12px",color:e,wordBreak:"break-word"},children:t})})}function pV({data:r,showUserAgent:e=!1}){return b.jsxs(eo,{title:"Network Information",children:[b.jsxs("div",{style:{fontSize:"12px",color:S.textPrimary,fontFamily:j.body,marginBottom:"4px"},children:["Remote Address:"," ",b.jsx("span",{style:{color:S.textSecondary,fontFamily:j.mono},children:r.remote_address||"N/A"})]}),b.jsxs("div",{style:{fontSize:"12px",color:S.textPrimary,fontFamily:j.body,marginBottom:"4px"},children:["Host:"," ",b.jsx("span",{style:{color:S.textSecondary,fontFamily:j.mono},children:r.host||"N/A"})]}),e&&r.user_agent&&b.jsxs("div",{style:{fontSize:"12px",color:S.textPrimary,fontFamily:j.body,marginBottom:"4px"},children:["User Agent:"," ",b.jsx("span",{style:{color:S.textSecondary,fontSize:"11px"},children:r.user_agent})]}),r.session_id&&b.jsxs("div",{style:{fontSize:"12px",color:S.textPrimary,fontFamily:j.body,marginBottom:"4px"},children:["Session ID:"," ",b.jsx("span",{style:{color:S.textSecondary,fontFamily:j.mono},children:r.session_id})]})]})}function vV({data:r,titleColor:e}){return b.jsxs(eo,{title:`${r.protocol||"HTTP"} Protocol`,children:[b.jsxs("div",{style:{fontSize:"12px",color:S.textPrimary,fontFamily:j.body,marginBottom:"4px"},children:["Direction: ",b.jsx("span",{style:{color:e,fontWeight:"500"},children:r.direction})]}),r.status_code&&b.jsxs("div",{style:{fontSize:"12px",color:S.textPrimary,fontFamily:j.body,marginBottom:"4px"},children:["Status Code:"," ",b.jsx("span",{style:{color:r.status_code>=400?S.error:r.status_code>=300?S.warning:S.success,fontFamily:j.mono,fontWeight:"600"},children:r.status_code})]}),r.jsonrpc_method&&b.jsxs("div",{style:{fontSize:"12px",color:S.textPrimary,fontFamily:j.body,marginBottom:"4px"},children:["JSON-RPC Method:"," ",b.jsx("span",{style:{color:S.textSecondary,fontFamily:j.mono},children:r.jsonrpc_method})]}),r.jsonrpc_id&&b.jsxs("div",{style:{fontSize:"12px",color:S.textPrimary,fontFamily:j.body,marginBottom:"4px"},children:["JSON-RPC ID:"," ",b.jsx("span",{style:{color:S.textSecondary,fontFamily:j.mono},children:r.jsonrpc_id})]})]})}function Ove({request:r,requestHeaders:e,requestBody:t}){return r?b.jsxs(cV,{title:"Request",titleColor:S.accentBlue,defaultExpanded:!0,children:[b.jsx(hV,{data:r,titleColor:S.accentBlue}),b.jsx(pV,{data:r,showUserAgent:!0}),b.jsx(vV,{data:r,titleColor:S.accentBlue}),b.jsx(lV,{aauth:r.aauth,titleColor:S.accentBlue}),b.jsx(fV,{headers:e,titleColor:S.accentBlue}),b.jsx(uV,{body:t,titleColor:S.accentBlue}),r.jsonrpc_params&&b.jsx(eo,{title:"JSON-RPC Params",titleColor:S.accentBlue,children:b.jsx("pre",{style:{background:S.bgSecondary,padding:"16px",borderRadius:"8px",overflow:"auto",fontSize:"12px",fontFamily:"monospace",maxHeight:"400px",border:`1px solid ${S.borderLight}`,color:S.textPrimary,lineHeight:"1.5"},children:JSON.stringify(JSON.parse(r.jsonrpc_params),null,2)})})]}):null}function Nve({response:r,responseHeaders:e,responseBody:t}){return r?b.jsxs(cV,{title:"Response",titleColor:S.accentGreen,defaultExpanded:!0,children:[b.jsx(hV,{data:r,titleColor:S.accentGreen}),b.jsx(pV,{data:r}),b.jsx(vV,{data:r,titleColor:S.accentGreen}),b.jsx(lV,{aauth:r.aauth,titleColor:S.accentGreen}),b.jsx(fV,{headers:e,titleColor:S.accentGreen}),b.jsx(uV,{body:t,titleColor:S.accentGreen}),r.jsonrpc_result&&b.jsx(eo,{title:"JSON-RPC Result",titleColor:S.accentGreen,children:b.jsx("pre",{style:{background:S.bgSecondary,padding:"16px",borderRadius:"8px",overflow:"auto",fontSize:"12px",fontFamily:j.mono,maxHeight:"400px",border:`1px solid ${S.borderLight}`,color:S.textPrimary,lineHeight:"1.5"},children:JSON.stringify(JSON.parse(r.jsonrpc_result),null,2)})}),r.jsonrpc_error&&b.jsx(eo,{title:"JSON-RPC Error",titleColor:S.error,children:b.jsx("pre",{style:{background:S.bgSecondary,padding:"16px",borderRadius:"8px",overflow:"auto",fontSize:"12px",fontFamily:j.mono,maxHeight:"400px",border:`1px solid ${S.borderLight}`,color:S.error,lineHeight:"1.5"},children:JSON.stringify(JSON.parse(r.jsonrpc_error),null,2)})})]}):null}function jve({request:r,response:e,requestHeaders:t,requestBody:n,responseHeaders:a,responseBody:i}){return b.jsx("div",{style:{padding:"20px",overflow:"auto",flex:1,background:S.bgPrimary},children:b.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"0"},children:[b.jsx(Ove,{request:r,requestHeaders:t,requestBody:n}),b.jsx(Nve,{response:e,responseHeaders:a,responseBody:i})]})})}const Bve=({size:r=14,color:e="currentColor",rotated:t=!1})=>b.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{display:"inline-block",verticalAlign:"middle",transform:t?"rotate(-90deg)":"rotate(0deg)",transition:"transform 0.2s ease"},role:"img","aria-label":"Chevron down icon",children:[b.jsx("title",{children:"Chevron down icon"}),b.jsx("polyline",{points:"6 9 12 15 18 9"})]});function aN({title:r,titleColor:e,children:t,defaultExpanded:n=!0}){const[a,i]=Y.useState(n);return b.jsxs("div",{style:{background:S.bgCard,borderRadius:"8px",border:`1px solid ${S.borderLight}`,overflow:"hidden",marginBottom:"20px"},children:[b.jsx("button",{type:"button",onClick:()=>i(!a),onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),i(!a))},style:{padding:"16px 20px",background:a?S.bgCard:S.bgSecondary,borderBottom:a?`1px solid ${S.borderLight}`:"none",cursor:"pointer",userSelect:"none",display:"flex",alignItems:"center",justifyContent:"space-between",transition:"background-color 0.15s ease",width:"100%",border:"none",textAlign:"left"},onMouseEnter:o=>{o.currentTarget.style.background=S.bgHover},onMouseLeave:o=>{o.currentTarget.style.background=a?S.bgCard:S.bgSecondary},children:b.jsxs("div",{style:{fontSize:"13px",fontWeight:"600",color:e,textTransform:"uppercase",letterSpacing:"0.05em",fontFamily:j.body,display:"flex",alignItems:"center",gap:"8px"},children:[b.jsx(Bve,{size:14,color:e,rotated:!a}),r]})}),a&&b.jsx("div",{style:{padding:"20px"},children:t})]})}function Fve({requestHexLines:r,responseHexLines:e,hasRequest:t,hasResponse:n}){return b.jsx("div",{style:{padding:"20px",overflow:"auto",flex:1,background:S.bgPrimary},children:b.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"0"},children:[t&&b.jsx(aN,{title:"Request Hex Dump",titleColor:S.accentBlue,defaultExpanded:!0,children:b.jsx("div",{style:{background:S.bgSecondary,padding:"16px",borderRadius:"8px",border:`1px solid ${S.borderLight}`,maxHeight:"calc(100vh - 300px)",overflow:"auto"},children:r.length>0?r.map((a,i)=>b.jsxs("div",{style:{display:"flex",gap:"16px",padding:"4px 0",color:S.textPrimary,fontFamily:j.mono,fontSize:"12px",lineHeight:"1.5"},children:[b.jsx("span",{style:{color:S.textTertiary,minWidth:"80px"},children:a.offset}),b.jsx("span",{style:{minWidth:"400px",color:S.textPrimary},children:a.hex.padEnd(48)}),b.jsx("span",{style:{color:S.textSecondary},children:a.ascii})]},`request-${a.offset}-${i}`)):b.jsx("div",{style:{color:S.textTertiary,fontFamily:j.body,fontSize:"12px"},children:"(empty)"})})}),n&&b.jsx(aN,{title:"Response Hex Dump",titleColor:S.accentGreen,defaultExpanded:!0,children:b.jsx("div",{style:{background:S.bgSecondary,padding:"16px",borderRadius:"8px",border:`1px solid ${S.borderLight}`,maxHeight:"calc(100vh - 300px)",overflow:"auto"},children:e.length>0?e.map((a,i)=>b.jsxs("div",{style:{display:"flex",gap:"16px",padding:"4px 0",color:S.textPrimary,fontFamily:j.mono,fontSize:"12px",lineHeight:"1.5"},children:[b.jsx("span",{style:{color:S.textTertiary,minWidth:"80px"},children:a.offset}),b.jsx("span",{style:{minWidth:"400px",color:S.textPrimary},children:a.hex.padEnd(48)}),b.jsx("span",{style:{color:S.textSecondary},children:a.ascii})]},`response-${a.offset}-${i}`)):b.jsx("div",{style:{color:S.textTertiary,fontFamily:j.body,fontSize:"12px"},children:"(empty)"})})})]})})}function Vve({request:r,onClose:e,matchingPair:t}){const n=a=>a<1024?`${a} B`:a<1048576?`${(a/1024).toFixed(2)} KB`:`${(a/1048576).toFixed(2)} MB`;return b.jsxs("div",{style:{padding:"12px 16px",borderBottom:`1px solid ${S.borderLight}`,display:"flex",justifyContent:"space-between",alignItems:"center",background:S.bgCard,boxShadow:`0 1px 3px ${S.shadowSm}`},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[b.jsxs("h3",{style:{fontSize:"14px",fontWeight:"600",color:S.textPrimary,margin:0,fontFamily:j.body},children:["#",r.frame_number,":"," ",r.direction==="request"?"HTTP Request":"HTTP Response",t&&b.jsxs("span",{style:{fontSize:"11px",color:S.textTertiary,fontWeight:"400",marginLeft:"8px"},children:["(with #",t.frame_number,")"]})]}),b.jsxs("span",{style:{fontSize:"11px",color:S.textSecondary,padding:"4px 8px",background:S.bgSecondary,borderRadius:"8px",fontFamily:j.mono},children:[n(r.length)," bytes"]})]}),b.jsx("button",{type:"button",onClick:e,style:{background:"none",border:"none",color:S.textSecondary,cursor:"pointer",fontSize:"20px",padding:"4px 8px",borderRadius:"8px",transition:"all 0.2s"},onMouseEnter:a=>{a.currentTarget.style.background=S.bgHover,a.currentTarget.style.color=S.textPrimary},onMouseLeave:a=>{a.currentTarget.style.background="none",a.currentTarget.style.color=S.textSecondary},children:b.jsx(kh,{size:20,stroke:1.5})})]})}const Gve=({size:r=14,color:e="currentColor",rotated:t=!1})=>b.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{display:"inline-block",verticalAlign:"middle",transform:t?"rotate(-90deg)":"rotate(0deg)",transition:"transform 0.2s ease"},role:"img","aria-label":"Chevron down icon",children:[b.jsx("title",{children:"Chevron down icon"}),b.jsx("polyline",{points:"6 9 12 15 18 9"})]});function iN({title:r,titleColor:e,children:t,defaultExpanded:n=!0}){const[a,i]=Y.useState(n);return b.jsxs("div",{style:{background:S.bgCard,borderRadius:"8px",border:`1px solid ${S.borderLight}`,overflow:"hidden",marginBottom:"20px"},children:[b.jsx("button",{type:"button",onClick:()=>i(!a),onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),i(!a))},style:{padding:"16px 20px",background:a?S.bgCard:S.bgSecondary,borderBottom:a?`1px solid ${S.borderLight}`:"none",cursor:"pointer",userSelect:"none",display:"flex",alignItems:"center",justifyContent:"space-between",transition:"background-color 0.15s ease",width:"100%",border:"none",textAlign:"left"},onMouseEnter:o=>{o.currentTarget.style.background=S.bgHover},onMouseLeave:o=>{o.currentTarget.style.background=a?S.bgCard:S.bgSecondary},children:b.jsxs("div",{style:{fontSize:"13px",fontWeight:"600",color:e,textTransform:"uppercase",letterSpacing:"0.05em",fontFamily:j.body,display:"flex",alignItems:"center",gap:"8px"},children:[b.jsx(Gve,{size:14,color:e,rotated:!a}),r]})}),a&&b.jsx("div",{style:{padding:"20px"},children:t})]})}function Wve({requestFullText:r,responseFullText:e,hasRequest:t,hasResponse:n}){return b.jsx("div",{style:{padding:"20px",overflow:"auto",flex:1,background:S.bgPrimary},children:b.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"0"},children:[t&&b.jsx(iN,{title:"Raw Request Data",titleColor:S.accentBlue,defaultExpanded:!0,children:b.jsx("pre",{style:{background:S.bgSecondary,padding:"16px",borderRadius:"8px",overflow:"auto",fontSize:"12px",fontFamily:j.mono,color:S.textPrimary,border:`1px solid ${S.borderLight}`,whiteSpace:"pre-wrap",wordBreak:"break-all",lineHeight:"1.5",maxHeight:"calc(100vh - 300px)"},children:r||"(empty)"})}),n&&b.jsx(iN,{title:"Raw Response Data",titleColor:S.accentGreen,defaultExpanded:!0,children:b.jsx("pre",{style:{background:S.bgSecondary,padding:"16px",borderRadius:"8px",overflow:"auto",fontSize:"12px",fontFamily:j.mono,color:S.textPrimary,border:`1px solid ${S.borderLight}`,whiteSpace:"pre-wrap",wordBreak:"break-all",lineHeight:"1.5",maxHeight:"calc(100vh - 300px)"},children:e||"(empty)"})})]})})}function $ve({tabs:r,activeTab:e,onTabChange:t}){const n=Y.useRef({}),a=Y.useRef(null);return Y.useEffect(()=>{const i=n.current[e];if(i&&a.current){const{offsetLeft:o,offsetWidth:s}=i;ft({targets:a.current,left:o,width:s,duration:300,easing:"easeOutExpo"})}},[e]),b.jsxs("div",{style:{display:"flex",borderBottom:`1px solid ${S.borderLight}`,background:`${S.bgCard}CC`,backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",position:"relative",boxShadow:`0 1px 3px ${S.shadowSm}`},children:[r.map(i=>b.jsx("button",{type:"button",ref:o=>{o&&(n.current[i]=o)},onClick:()=>t(i),style:{padding:"10px 18px",background:e===i?S.bgSecondary:"transparent",border:"none",borderBottom:"2px solid transparent",color:e===i?S.textPrimary:S.textSecondary,cursor:"pointer",fontSize:"13px",fontFamily:j.body,fontWeight:e===i?"500":"400",textTransform:"capitalize",borderRadius:"8px 8px 0 0",transition:"all 0.2s",position:"relative",zIndex:1},onMouseEnter:o=>{e!==i&&ft({targets:o.currentTarget,background:S.bgHover,color:S.textPrimary,duration:200,easing:"easeOutQuad"})},onMouseLeave:o=>{e!==i&&ft({targets:o.currentTarget,background:"transparent",color:S.textSecondary,duration:200,easing:"easeOutQuad"})},children:i},i)),b.jsx("div",{ref:a,style:{position:"absolute",bottom:0,height:"2px",background:S.accentBlue,borderRadius:"2px 2px 0 0",zIndex:2}})]})}const oN=(r,e={})=>{const{fade:t=!0,duration:n=400,delay:a=50,easing:i="easeOutExpo",translateY:o=[20,0],...s}=e,l={targets:r,translateY:o,duration:n,delay:ft.stagger(a),easing:i,...s};return t?l.opacity=[0,1]:l.opacity=1,ft(l)},K2=(r,e={})=>ft({targets:r,opacity:[0,1],duration:e.duration||300,easing:e.easing||"easeOutQuad",...e}),Hve=(r,e={})=>ft({targets:r,translateX:[e.width||600,0],opacity:[0,1],duration:e.duration||400,easing:e.easing||"easeOutExpo",...e});function sN(r){if(!r)return[];const e=new TextEncoder().encode(r),t=[],n=16,a=Math.ceil(e.length/n);for(const i of Array.from({length:a},(o,s)=>s)){const o=i*n,s=e.slice(o,o+n),l=Array.from(s).map(f=>f.toString(16).padStart(2,"0")).join(" "),u=Array.from(s).map(f=>f>=32&&f<127?String.fromCharCode(f):".").join(""),c=o.toString(16).padStart(8,"0");t.push({offset:c,hex:l,ascii:u})}return t}function lN(r,e){return Object.entries(r).map(([n,a])=>`${n}: ${a}`).join(`\r
|
|
74
|
+
`)+(e?`\r
|
|
75
|
+
\r
|
|
76
|
+
${e}`:"")}function Uve({request:r,onClose:e,requests:t=[]}){const[n,a]=Y.useState("details"),i=Y.useRef(null),o=Y.useRef(n);if(Y.useEffect(()=>{o.current!==n&&i.current&&(K2(i.current,{duration:300}),o.current=n)},[n]),!r)return null;const s=C=>{if(C.jsonrpc_method)return C.jsonrpc_method;if(C.direction==="request"){if(C.body_json)try{const k=typeof C.body_json=="string"?JSON.parse(C.body_json):C.body_json;if(k&&typeof k=="object"&&k.method)return k.method}catch{}if(C.body_raw)try{const k=typeof C.body_raw=="string"?JSON.parse(C.body_raw):C.body_raw;if(k&&typeof k=="object"&&k.method)return k.method}catch{}}return null},u=(()=>{const C=(k,A)=>{if(k.session_id!==A.session_id)return!1;const L=s(k),D=s(A);return!L||!D?k.jsonrpc_id&&A.jsonrpc_id?k.jsonrpc_id===A.jsonrpc_id:!1:L!==D?!1:k.jsonrpc_id&&A.jsonrpc_id?k.jsonrpc_id===A.jsonrpc_id:!0};return r.direction==="request"?t.find(k=>k.direction==="response"&&C(r,k)&&k.frame_number>r.frame_number):t.find(k=>k.direction==="request"&&C(k,r)&&k.frame_number<r.frame_number)})(),c=r.direction==="request"?r:u||r,f=r.direction==="response"?r:u,d=c?.headers_json?JSON.parse(c.headers_json):{},h=c?.body_json?JSON.parse(c.body_json):c?.body_raw,v=c?lN(d,c.body_raw):"",y=c?sN(v):[],m=f?.headers_json?JSON.parse(f.headers_json):{},x=f?.body_json?JSON.parse(f.body_json):f?.body_raw,_=f?lN(m,f.body_raw):"",T=f?sN(_):[];return b.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column",background:S.bgPrimary},children:[b.jsx(Vve,{request:r,onClose:e,matchingPair:u}),b.jsx($ve,{tabs:["details","hex","raw"],activeTab:n,onTabChange:a}),b.jsxs("div",{ref:i,style:{flex:1,overflow:"auto",background:S.bgPrimary},children:[n==="details"&&b.jsx(jve,{request:c,response:f,requestHeaders:d,requestBody:h,responseHeaders:m,responseBody:x}),n==="hex"&&b.jsx(Fve,{requestHexLines:y,responseHexLines:T,hasRequest:!!c,hasResponse:!!f}),n==="raw"&&b.jsx(Wve,{requestFullText:v,responseFullText:_,hasRequest:!!c,hasResponse:!!f})]})]})}const Yve=[{id:null,label:"All",dotColor:S.textTertiary},{id:"signed",label:"Signed",dotColor:S.success},{id:"aauth-aware",label:"AAuth-aware",dotColor:S.accentBlue},{id:"bearer",label:"Bearer",dotColor:S.warning},{id:"none",label:"No auth",dotColor:S.textTertiary}];function Xve({value:r,onChange:e}){return b.jsxs("div",{title:"Filter packets by observed AAuth posture (no verification)",style:{display:"inline-flex",alignItems:"center",gap:0,background:S.bgPrimary,border:`1px solid ${S.borderLight}`,borderRadius:"999px",padding:"2px",height:"34px"},children:[b.jsx("span",{style:{fontSize:"10px",fontFamily:j.body,color:S.textTertiary,textTransform:"uppercase",letterSpacing:"0.05em",padding:"0 8px 0 10px"},children:"AAuth"}),Yve.map(t=>{const n=(r||null)===(t.id||null);return b.jsxs("button",{type:"button",onClick:()=>e(t.id),style:{display:"inline-flex",alignItems:"center",gap:"6px",padding:"4px 10px",border:"none",cursor:"pointer",fontSize:"11px",fontFamily:j.body,fontWeight:n?600:500,color:n?S.textPrimary:S.textSecondary,background:n?S.bgSelected:"transparent",borderRadius:"999px",transition:"background-color 0.15s ease"},children:[b.jsx("span",{"aria-hidden":"true",style:{width:"6px",height:"6px",borderRadius:"50%",background:t.dotColor,display:"inline-block"}}),t.label]},t.label)})]})}function Zve({stats:r,onExport:e}){return b.jsxs("div",{style:{display:"flex",gap:"16px",alignItems:"center",marginLeft:"auto"},children:[r&&b.jsxs(b.Fragment,{children:[b.jsxs("span",{style:{color:S.textSecondary,fontSize:"12px",fontFamily:j.body},children:["Total:"," ",b.jsx("span",{style:{color:S.textPrimary,fontWeight:"500"},children:r.total_packets||0})]}),b.jsxs("span",{style:{color:S.textSecondary,fontSize:"12px",fontFamily:j.body},children:["Requests:"," ",b.jsx("span",{style:{color:S.accentBlue,fontWeight:"500"},children:r.total_requests||0})]}),b.jsxs("span",{style:{color:S.textSecondary,fontSize:"12px",fontFamily:j.body},children:["Responses:"," ",b.jsx("span",{style:{color:S.accentGreen,fontWeight:"500"},children:r.total_responses||0})]}),b.jsxs("span",{style:{color:S.textSecondary,fontSize:"12px",fontFamily:j.body},children:["Errors:"," ",b.jsx("span",{style:{color:S.error,fontWeight:"500"},children:r.total_errors||0})]}),b.jsxs("span",{style:{color:S.textSecondary,fontSize:"12px",fontFamily:j.body},children:["Sessions:"," ",b.jsx("span",{style:{color:S.textPrimary,fontWeight:"500"},children:r.unique_sessions||0})]})]}),b.jsxs("div",{style:{display:"flex",gap:"6px",alignItems:"center",marginLeft:"12px",paddingLeft:"12px",borderLeft:`1px solid ${S.borderLight}`},children:[b.jsxs("button",{type:"button",onClick:()=>e("json"),style:{padding:"8px 14px",background:S.buttonPrimary,border:"none",color:S.textInverse,fontSize:"12px",fontFamily:j.body,fontWeight:"500",borderRadius:"8px",cursor:"pointer",display:"flex",alignItems:"center",gap:"6px",transition:"all 0.2s",boxShadow:`0 2px 4px ${S.shadowSm}`},onMouseEnter:t=>{ft({targets:t.currentTarget,background:S.buttonPrimaryHover,translateY:-1,boxShadow:[`0 2px 4px ${S.shadowSm}`,`0 4px 8px ${S.shadowMd}`],duration:200,easing:"easeOutQuad"})},onMouseLeave:t=>{ft({targets:t.currentTarget,background:S.buttonPrimary,translateY:0,boxShadow:[`0 4px 8px ${S.shadowMd}`,`0 2px 4px ${S.shadowSm}`],duration:200,easing:"easeOutQuad"})},title:"Export as JSON",children:[b.jsx(hN,{size:14,stroke:1.5}),"Export"]}),b.jsxs("select",{onChange:t=>e(t.target.value),value:"",style:{padding:"8px 10px",background:S.bgCard,border:`1px solid ${S.borderLight}`,color:S.textPrimary,fontSize:"11px",fontFamily:j.body,borderRadius:"8px",cursor:"pointer",transition:"all 0.2s"},onFocus:t=>{t.currentTarget.style.borderColor=S.accentBlue},onBlur:t=>{t.currentTarget.style.borderColor=S.borderLight},children:[b.jsx("option",{value:"",disabled:!0,children:"Format"}),b.jsx("option",{value:"json",children:"JSON"}),b.jsx("option",{value:"csv",children:"CSV"}),b.jsx("option",{value:"txt",children:"TXT"})]})]})]})}function Ii({type:r="text",placeholder:e,value:t,onChange:n,style:a={},...i}){const o={padding:"8px 12px",background:S.bgCard,border:`1px solid ${S.borderLight}`,color:S.textPrimary,fontSize:"13px",fontFamily:r==="number"||e?.includes("JSON-RPC")||e?.includes("HTTP")?j.mono:j.body,borderRadius:"8px",transition:"all 0.2s",...a},s=u=>{ft({targets:u.currentTarget,borderColor:S.accentBlue,boxShadow:[`0 0 0 0px ${S.accentBlue}20`,`0 0 0 3px ${S.accentBlue}20`],duration:200,easing:"easeOutQuad"})},l=u=>{ft({targets:u.currentTarget,borderColor:S.borderLight,boxShadow:"none",duration:200,easing:"easeOutQuad"})};return b.jsx("input",{type:r,placeholder:e,value:t||"",onChange:n,style:o,onFocus:s,onBlur:l,...i})}function Kve({filters:r,onFilterChange:e,stats:t,onClear:n}){const a=Y.useRef(null),[i,o]=Y.useState(!1),[s,l]=Y.useState(!1),[u,c]=Y.useState("");Y.useEffect(()=>{a.current&&K2(a.current,{duration:400})},[]);const f=async(d="json")=>{try{const h=new URLSearchParams;r.search&&h.append("search",r.search),r.serverName&&h.append("serverName",r.serverName),r.sessionId&&h.append("sessionId",r.sessionId),r.method&&h.append("method",r.method),r.jsonrpcMethod&&h.append("jsonrpcMethod",r.jsonrpcMethod),r.statusCode&&h.append("statusCode",r.statusCode),r.jsonrpcId&&h.append("jsonrpcId",r.jsonrpcId),r.aauthPosture&&h.append("aauthPosture",r.aauthPosture),r.aauthAgent&&h.append("aauthAgent",r.aauthAgent),r.aauthMission&&h.append("aauthMission",r.aauthMission),h.append("format",d);const y=await(await fetch(`/api/requests/export?${h}`)).blob(),m=window.URL.createObjectURL(y),x=document.createElement("a");x.href=m;const _=d==="csv"?"csv":d==="txt"?"txt":"json";x.download=`mcp-shark-traffic-${new Date().toISOString().replace(/[:.]/g,"-")}.${_}`,document.body.appendChild(x),x.click(),window.URL.revokeObjectURL(m),document.body.removeChild(x)}catch(h){console.error("Failed to export traffic:",h),c("Failed to export traffic. Please try again."),l(!0)}};return b.jsxs("div",{ref:a,style:{padding:"12px 16px",borderBottom:`1px solid ${S.borderLight}`,background:S.bgSecondary,display:"flex",gap:"10px",alignItems:"center",flexWrap:"wrap",boxShadow:`0 1px 3px ${S.shadowSm}`},children:[b.jsxs("div",{style:{position:"relative",width:"300px"},children:[b.jsx(Kw,{size:16,stroke:1.5,style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",color:S.textTertiary,pointerEvents:"none",zIndex:1}}),b.jsx(Ii,{type:"text",placeholder:"Search everything (partial match)...",value:r.search||"",onChange:d=>e({...r,search:d.target.value||null}),style:{width:"100%",fontWeight:r.search?"500":"400",paddingLeft:"36px"}})]}),b.jsx(Ii,{type:"text",placeholder:"MCP Server Name...",value:r.serverName||"",onChange:d=>e({...r,serverName:d.target.value||null}),style:{width:"200px"}}),b.jsx(Ii,{type:"text",placeholder:"Session ID...",value:r.sessionId||"",onChange:d=>e({...r,sessionId:d.target.value||null}),style:{width:"200px"}}),b.jsx(Ii,{type:"text",placeholder:"HTTP Method...",value:r.method||"",onChange:d=>e({...r,method:d.target.value||null}),style:{width:"150px"}}),b.jsx(Ii,{type:"text",placeholder:"JSON-RPC Method...",value:r.jsonrpcMethod||"",onChange:d=>e({...r,jsonrpcMethod:d.target.value||null}),style:{width:"200px"}}),b.jsx(Ii,{type:"number",placeholder:"Status Code...",value:r.statusCode||"",onChange:d=>e({...r,statusCode:d.target.value?Number.parseInt(d.target.value):null}),style:{width:"120px"}}),b.jsx(Ii,{type:"text",placeholder:"JSON-RPC ID...",value:r.jsonrpcId||"",onChange:d=>e({...r,jsonrpcId:d.target.value||null}),style:{width:"150px"}}),b.jsx(Xve,{value:r.aauthPosture||null,onChange:d=>e({...r,aauthPosture:d})}),b.jsx(Ii,{type:"text",placeholder:"AAuth Agent (aauth:..)",value:r.aauthAgent||"",onChange:d=>e({...r,aauthAgent:d.target.value||null}),style:{width:"200px"}}),b.jsx(Ii,{type:"text",placeholder:"AAuth Mission...",value:r.aauthMission||"",onChange:d=>e({...r,aauthMission:d.target.value||null}),style:{width:"180px"}}),b.jsx(Zve,{stats:t,onExport:f}),b.jsxs("button",{type:"button",onClick:()=>o(!0),style:{padding:"8px 14px",background:S.buttonDanger,border:"none",color:S.textInverse,fontSize:"12px",fontFamily:j.body,fontWeight:"500",borderRadius:"8px",cursor:"pointer",display:"flex",alignItems:"center",gap:"6px",transition:"all 0.2s",boxShadow:`0 2px 4px ${S.shadowSm}`,marginLeft:"12px"},onMouseEnter:d=>{ft({targets:d.currentTarget,background:S.buttonDangerHover,translateY:-1,boxShadow:[`0 2px 4px ${S.shadowSm}`,`0 4px 8px ${S.shadowMd}`],duration:200,easing:"easeOutQuad"})},onMouseLeave:d=>{ft({targets:d.currentTarget,background:S.buttonDanger,translateY:0,boxShadow:[`0 4px 8px ${S.shadowMd}`,`0 2px 4px ${S.shadowSm}`],duration:200,easing:"easeOutQuad"})},title:"Clear all captured traffic",children:[b.jsx(Mc,{size:14,stroke:1.5}),"Clear"]}),b.jsx(Ah,{isOpen:i,onClose:()=>o(!1),onConfirm:async()=>{try{const d=await fetch("/api/requests/clear",{method:"POST"});if(d.ok)n&&n();else{const h=await d.json();c(`Failed to clear traffic: ${h.error||"Unknown error"}`),l(!0)}}catch(d){console.error("Failed to clear traffic:",d),c("Failed to clear traffic. Please try again."),l(!0)}},title:"Clear All Captured Traffic",message:"Are you sure you want to delete all captured traffic? This action cannot be undone and will permanently remove all requests and responses from the database.",confirmText:"Clear All",cancelText:"Cancel",danger:!0}),b.jsx(oV,{isOpen:s,onClose:()=>l(!1),title:"Error",message:u,type:"error"})]})}const Lt={LIFECYCLE:"lifecycle",TOOLS:"tools",RESOURCES:"resources",PROMPTS:"prompts",NOTIFICATIONS:"notifications",CLIENT_FEATURES:"client-features",OTHER:"other"};function qve(r){return r?r==="initialize"||r==="notifications/initialized"?Lt.LIFECYCLE:r.startsWith("tools/")?Lt.TOOLS:r.startsWith("resources/")?Lt.RESOURCES:r.startsWith("prompts/")?Lt.PROMPTS:r.startsWith("notifications/")?Lt.NOTIFICATIONS:r.startsWith("elicitation/")||r.startsWith("sampling/")||r.startsWith("logging/")?Lt.CLIENT_FEATURES:Lt.OTHER:Lt.OTHER}function Qve(r){return{[Lt.LIFECYCLE]:"Lifecycle",[Lt.TOOLS]:"Tools",[Lt.RESOURCES]:"Resources",[Lt.PROMPTS]:"Prompts",[Lt.NOTIFICATIONS]:"Notifications",[Lt.CLIENT_FEATURES]:"Client Features",[Lt.OTHER]:"Other"}[r]||"Unknown"}function Jve(r){return{[Lt.LIFECYCLE]:Qo,[Lt.TOOLS]:sm,[Lt.RESOURCES]:dN,[Lt.PROMPTS]:vW,[Lt.NOTIFICATIONS]:PG,[Lt.CLIENT_FEATURES]:BW,[Lt.OTHER]:JA}[r]||JA}function ege(r){const e=dV(r),t=new Map;return e.forEach(n=>{const a=n.request||n.response;if(!a)return;const i=a.session_id||"__NO_SESSION__",o=am(a),s=qve(o||"");t.has(i)||t.set(i,{sessionId:i==="__NO_SESSION__"?null:i,categories:new Map,firstTimestamp:a.timestamp_iso});const l=t.get(i);l.categories.has(s)||l.categories.set(s,[]),l.categories.get(s).push(n),new Date(a.timestamp_iso)<new Date(l.firstTimestamp)&&(l.firstTimestamp=a.timestamp_iso)}),Array.from(t.entries()).map(([n,a])=>({sessionId:a.sessionId,firstTimestamp:a.firstTimestamp,categories:Array.from(a.categories.entries()).map(([i,o])=>({category:i,label:Qve(i),pairs:o.sort((s,l)=>{const u=(s.request||s.response)?.timestamp_iso||"",c=(l.request||l.response)?.timestamp_iso||"";return new Date(u)-new Date(c)})})).sort((i,o)=>{const s=[Lt.LIFECYCLE,Lt.TOOLS,Lt.RESOURCES,Lt.PROMPTS,Lt.NOTIFICATIONS,Lt.CLIENT_FEATURES,Lt.OTHER],l=s.indexOf(i.category),u=s.indexOf(o.category);return l-u})})).sort((n,a)=>new Date(a.firstTimestamp)-new Date(n.firstTimestamp))}const tge=({size:r=12,color:e="currentColor"})=>b.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{display:"inline-block",verticalAlign:"middle"},role:"img","aria-label":"Chevron down icon",children:[b.jsx("title",{children:"Chevron down icon"}),b.jsx("polyline",{points:"6 9 12 15 18 9"})]}),rge=({size:r=12,color:e="currentColor"})=>b.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{display:"inline-block",verticalAlign:"middle"},role:"img","aria-label":"Chevron right icon",children:[b.jsx("title",{children:"Chevron right icon"}),b.jsx("polyline",{points:"9 18 15 12 9 6"})]});function uN({children:r,onClick:e,isExpanded:t,indent:n=0}){return b.jsx("tr",{onClick:e,onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),e())},tabIndex:0,"aria-label":`Toggle group ${r}`,style:{cursor:"pointer",background:S.bgSecondary,borderBottom:`1px solid ${S.borderLight}`,borderTop:`1px solid ${S.borderLight}`},onMouseEnter:a=>{a.currentTarget.style.background=S.bgCard},onMouseLeave:a=>{a.currentTarget.style.background=S.bgSecondary},children:b.jsxs("td",{colSpan:11,style:{padding:n>0?"12px 16px 12px 40px":"12px 16px",color:S.textPrimary,fontFamily:j.body,fontWeight:"600",fontSize:n>0?"11px":"12px"},children:[b.jsx("span",{style:{marginRight:"8px",userSelect:"none",display:"inline-flex",alignItems:"center"},children:t?b.jsx(tge,{size:12}):b.jsx(rge,{size:12})}),r]})})}function nge({response:r,selected:e,firstRequestTime:t,onSelect:n}){const a=e?.frame_number===r.frame_number,{source:i,dest:o}=Z2(r),s=Y2(r.timestamp_iso,t);return b.jsxs("tr",{onClick:()=>n(r),onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),n(r))},tabIndex:0,"aria-label":`Select orphaned response ${r.frame_number}`,style:{cursor:"pointer",background:a?S.bgSelected:S.bgUnpaired,borderBottom:`1px solid ${S.borderLight}`,fontFamily:j.body,transition:"background-color 0.15s ease",opacity:.85},onMouseEnter:l=>{a||(l.currentTarget.style.background=ic(S.accentOrange,.1))},onMouseLeave:l=>{a||(l.currentTarget.style.background=S.bgUnpaired)},children:[b.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${S.borderLight}`,color:S.textPrimary,textAlign:"right",fontFamily:j.mono,fontSize:"12px"},children:b.jsxs("span",{style:{color:S.accentOrange,fontWeight:"500"},children:["#",r.frame_number," (orphaned)"]})}),b.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${S.borderLight}`,color:S.textPrimary,fontFamily:j.mono,fontSize:"12px"},children:s}),b.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${S.borderLight}`,color:S.textPrimary,fontFamily:j.body,fontSize:"12px"},children:X2(r.timestamp_iso)}),b.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${S.borderLight}`,color:S.accentOrange,fontFamily:j.mono,fontSize:"12px",fontWeight:"500"},children:i}),b.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${S.borderLight}`,color:S.accentOrange,fontFamily:j.mono,fontSize:"12px",fontWeight:"500"},children:o}),b.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${S.borderLight}`,color:S.textPrimary,fontFamily:j.mono,fontSize:"12px",fontWeight:"500"},children:r.protocol||"HTTP"}),b.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${S.borderLight}`,color:S.textSecondary,fontFamily:j.mono,fontSize:"12px",fontWeight:"500"},children:"-"}),b.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${S.borderLight}`,fontFamily:j.mono,fontSize:"12px",fontWeight:"500"},children:b.jsx("div",{style:{color:r.status_code>=400?S.error:r.status_code>=300?S.warning:S.success,fontWeight:"600"},children:r.status_code||"-"})}),b.jsx("td",{style:{padding:"16px",color:S.textPrimary,fontFamily:j.mono,fontSize:"12px"},children:Qm(r)})]})}const age=({size:r=12,rotated:e=!1})=>b.jsx(ui,{size:r,stroke:1.5,style:{display:"inline-block",verticalAlign:"middle",transform:e?"rotate(-90deg)":"rotate(0deg)",transition:"transform 0.2s ease"}});function ige({request:r,response:e,selected:t,firstRequestTime:n,onSelect:a,isExpanded:i,onToggleExpand:o,isUnpaired:s}){const l=t?.frame_number===r.frame_number,{source:u,dest:c}=Z2(r),f=Y2(r.timestamp_iso,n),d=!!e;return b.jsx(b.Fragment,{children:b.jsxs("tr",{onClick:()=>a(r),onKeyDown:h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),a(r))},tabIndex:0,"aria-label":`Select request ${r.frame_number}`,style:{cursor:"pointer",background:l?S.bgSelected:s?S.bgUnpaired:S.bgSecondary,borderBottom:`1px solid ${S.borderLight}`,fontFamily:j.body,transition:"background-color 0.15s ease",opacity:s?.85:1},onMouseEnter:h=>{l||(h.currentTarget.style.background=s?ic(S.accentOrange,.1):S.bgCard)},onMouseLeave:h=>{l||(h.currentTarget.style.background=s?S.bgUnpaired:S.bgSecondary)},children:[b.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${S.borderLight}`,color:S.textPrimary,textAlign:"right",fontFamily:j.mono,fontSize:"12px"},children:b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",justifyContent:"flex-end"},children:[d&&b.jsx("button",{type:"button",onClick:h=>{h.stopPropagation(),o()},style:{background:"none",border:"none",cursor:"pointer",padding:"2px",display:"flex",alignItems:"center",color:S.textSecondary},onMouseEnter:h=>{h.currentTarget.style.color=S.textPrimary},onMouseLeave:h=>{h.currentTarget.style.color=S.textSecondary},children:b.jsx(age,{size:14,rotated:!i})}),b.jsxs("span",{style:{color:s?S.accentOrange:S.accentBlue,fontWeight:"500"},children:["#",r.frame_number,s&&b.jsx("span",{style:{fontSize:"10px",color:S.textSecondary,marginLeft:"4px",fontStyle:"italic"},children:"(no response)"})]})]})}),b.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${S.borderLight}`,color:S.textPrimary,fontFamily:j.mono,fontSize:"12px"},children:f}),b.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${S.borderLight}`,color:S.textPrimary,fontFamily:j.body,fontSize:"12px"},children:X2(r.timestamp_iso)}),b.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${S.borderLight}`,color:S.accentBlue,fontFamily:j.mono,fontSize:"12px",fontWeight:"500"},children:u}),b.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${S.borderLight}`,color:S.accentBlue,fontFamily:j.mono,fontSize:"12px",fontWeight:"500"},children:b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap"},children:[b.jsx("span",{children:c}),r.aauth&&r.aauth.posture!=="none"&&b.jsx(sV,{aauth:r.aauth,size:"sm",showLabel:!1})]})}),b.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${S.borderLight}`,color:S.textPrimary,fontFamily:j.mono,fontSize:"12px",fontWeight:"500"},children:r.protocol||"HTTP"}),b.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${S.borderLight}`,color:S.textPrimary,fontFamily:j.mono,fontSize:"12px",fontWeight:"500"},children:b.jsx("div",{style:{color:S.accentBlue},children:r.method||"REQ"})}),b.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${S.borderLight}`,fontFamily:j.mono,fontSize:"12px",fontWeight:"500"},children:d&&b.jsx("div",{style:{color:e.status_code>=400?S.error:e.status_code>=300?S.warning:S.success,fontWeight:"600"},children:e.status_code||"-"})}),b.jsx("td",{style:{padding:"16px",color:S.textPrimary,fontFamily:j.mono,fontSize:"12px"},children:Qm(r)})]})})}function oge({response:r,selected:e,firstRequestTime:t,onSelect:n}){const a=e?.frame_number===r.frame_number,{source:i,dest:o}=Z2(r),s=Y2(r.timestamp_iso,t);return b.jsxs("tr",{onClick:()=>n(r),onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),n(r))},tabIndex:0,"aria-label":`Select response ${r.frame_number}`,style:{cursor:"pointer",background:a&&e?.frame_number===r.frame_number?S.bgSelected:S.bgTertiary,borderBottom:`1px solid ${S.borderLight}`,fontFamily:j.body,transition:"background-color 0.15s ease"},onMouseEnter:l=>{a&&e?.frame_number===r.frame_number||(l.currentTarget.style.background=S.bgSecondary)},onMouseLeave:l=>{a&&e?.frame_number===r.frame_number||(l.currentTarget.style.background=S.bgTertiary)},children:[b.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${S.borderLight}`,color:S.textPrimary,textAlign:"right",fontFamily:j.mono,fontSize:"12px",paddingLeft:"40px"},children:b.jsxs("span",{style:{color:S.accentGreen,fontWeight:"500"},children:["#",r.frame_number]})}),b.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${S.borderLight}`,color:S.textPrimary,fontFamily:j.mono,fontSize:"12px"},children:s}),b.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${S.borderLight}`,color:S.textPrimary,fontFamily:j.body,fontSize:"12px"},children:X2(r.timestamp_iso)}),b.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${S.borderLight}`,color:S.accentGreen,fontFamily:j.mono,fontSize:"12px",fontWeight:"500"},children:i}),b.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${S.borderLight}`,color:S.accentGreen,fontFamily:j.mono,fontSize:"12px",fontWeight:"500"},children:o}),b.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${S.borderLight}`,color:S.textPrimary,fontFamily:j.mono,fontSize:"12px",fontWeight:"500"},children:r.protocol||"HTTP"}),b.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${S.borderLight}`,color:S.textSecondary,fontFamily:j.mono,fontSize:"12px",fontWeight:"500"},children:"-"}),b.jsx("td",{style:{padding:"16px",borderRight:`1px solid ${S.borderLight}`,fontFamily:j.mono,fontSize:"12px",fontWeight:"500"},children:b.jsx("div",{style:{color:r.status_code>=400?S.error:r.status_code>=300?S.warning:S.success,fontWeight:"600"},children:r.status_code||"-"})}),b.jsx("td",{style:{padding:"16px",color:S.textPrimary,fontFamily:j.mono,fontSize:"12px"},children:Qm(r)})]})}function gV({pair:r,request:e,selected:t,firstRequestTime:n,onSelect:a,isExpanded:i=!1,onToggleExpand:o=()=>{}}){const l=((h,v)=>h?{request:h.request,response:h.response}:v?{request:v,response:null}:null)(r,e);if(!l)return null;const{request:u,response:c}=l,f=!u||!c;if(!u&&c)return b.jsx(nge,{response:c,selected:t,firstRequestTime:n,onSelect:a});if(!u)return null;const d=!!c;return b.jsxs(b.Fragment,{children:[b.jsx(ige,{request:u,response:c,selected:t,firstRequestTime:n,onSelect:a,isExpanded:i,onToggleExpand:o,isUnpaired:f}),d&&i&&b.jsx(oge,{response:c,selected:t,firstRequestTime:n,onSelect:a,request:u})]})}function sge({groupedData:r,selected:e,firstRequestTime:t,onSelect:n,expandedSessions:a,expandedCategories:i,onToggleSession:o,onToggleCategory:s}){return b.jsx("tbody",{children:r.map(l=>{const u=l.sessionId||"__NO_SESSION__",c=a.has(u);return b.jsxs(Ad.Fragment,{children:[b.jsxs(uN,{onClick:()=>o(u),isExpanded:c,indent:0,children:[b.jsxs("span",{style:{color:S.accentBlue,marginRight:"8px"},children:["Session: ",l.sessionId||"No Session"]}),b.jsxs("span",{style:{color:S.textTertiary,fontSize:"11px",fontWeight:"400"},children:["(",l.categories.reduce((f,d)=>f+d.pairs.length,0)," ","operations)"]})]}),c&&l.categories.map(f=>{const d=`${u}::${f.category}`,h=i.has(d);return b.jsxs(Ad.Fragment,{children:[b.jsxs(uN,{onClick:()=>s(d),isExpanded:h,indent:1,children:[b.jsx("span",{style:{marginRight:"8px",display:"inline-flex",alignItems:"center"},children:Ad.createElement(Jve(f.category),{size:16,stroke:1.5,color:S.accentBlue})}),b.jsx("span",{style:{color:S.textPrimary},children:f.label}),b.jsxs("span",{style:{color:S.textTertiary,fontSize:"11px",fontWeight:"400",marginLeft:"8px"},children:["(",f.pairs.length," ",f.pairs.length===1?"operation":"operations",")"]})]}),h&&f.pairs.map(v=>b.jsx(gV,{pair:v,selected:e,firstRequestTime:t,onSelect:n,isExpanded:!1,onToggleExpand:()=>{}},v.frame_number))]},d)})]},u)})})}function lge({columnWidths:r}){return b.jsx("thead",{style:{position:"sticky",top:0,background:S.bgSecondary,zIndex:10,boxShadow:`0 2px 4px ${S.shadowSm}`},children:b.jsxs("tr",{children:[b.jsx("th",{style:{padding:"12px 16px",textAlign:"left",borderBottom:`1px solid ${S.borderLight}`,borderRight:`1px solid ${S.borderLight}`,width:`${r.frame}px`,minWidth:`${r.frame}px`,color:S.textSecondary,fontWeight:"600",fontFamily:j.body,fontSize:"11px",textTransform:"uppercase",letterSpacing:"0.05em",background:S.bgSecondary},children:"No."}),b.jsx("th",{style:{padding:"8px 12px",textAlign:"left",borderBottom:`1px solid ${S.borderLight}`,borderRight:`1px solid ${S.borderLight}`,width:`${r.time}px`,minWidth:`${r.time}px`,color:S.textPrimary,fontWeight:"600",fontFamily:j.body,fontSize:"11px"},children:"Time"}),b.jsx("th",{style:{padding:"8px 12px",textAlign:"left",borderBottom:`1px solid ${S.borderLight}`,borderRight:`1px solid ${S.borderLight}`,width:`${r.datetime}px`,minWidth:`${r.datetime}px`,color:S.textPrimary,fontWeight:"600",fontFamily:j.body,fontSize:"11px"},children:"Date/Time"}),b.jsx("th",{style:{padding:"8px 12px",textAlign:"left",borderBottom:`1px solid ${S.borderLight}`,borderRight:`1px solid ${S.borderLight}`,width:`${r.source}px`,minWidth:`${r.source}px`,color:S.textPrimary,fontWeight:"600",fontFamily:j.body,fontSize:"11px"},children:"Source"}),b.jsx("th",{style:{padding:"8px 12px",textAlign:"left",borderBottom:`1px solid ${S.borderLight}`,borderRight:`1px solid ${S.borderLight}`,width:`${r.destination}px`,minWidth:`${r.destination}px`,color:S.textPrimary,fontWeight:"600",fontFamily:j.body,fontSize:"11px"},children:"Destination"}),b.jsx("th",{style:{padding:"8px 12px",textAlign:"left",borderBottom:`1px solid ${S.borderLight}`,borderRight:`1px solid ${S.borderLight}`,width:`${r.protocol}px`,minWidth:`${r.protocol}px`,color:S.textPrimary,fontWeight:"600",fontFamily:j.body,fontSize:"11px"},children:"Protocol"}),b.jsx("th",{style:{padding:"8px 12px",textAlign:"left",borderBottom:`1px solid ${S.borderLight}`,borderRight:`1px solid ${S.borderLight}`,width:`${r.method}px`,minWidth:`${r.method}px`,color:S.textPrimary,fontWeight:"600",fontFamily:j.body,fontSize:"11px"},children:"Method"}),b.jsx("th",{style:{padding:"8px 12px",textAlign:"left",borderBottom:`1px solid ${S.borderLight}`,borderRight:`1px solid ${S.borderLight}`,width:`${r.status}px`,minWidth:`${r.status}px`,color:S.textPrimary,fontWeight:"600",fontFamily:j.body,fontSize:"11px"},children:"Status"}),b.jsx("th",{style:{padding:"8px 12px",textAlign:"left",borderBottom:`1px solid ${S.borderLight}`,color:S.textPrimary,fontWeight:"600",fontFamily:j.body,fontSize:"11px"},children:"Endpoint"})]})})}function uge({viewMode:r,onViewModeChange:e}){return b.jsxs("div",{style:{display:"flex",borderBottom:`1px solid ${S.borderLight}`,background:S.bgSecondary,padding:"0 12px",boxShadow:`0 1px 3px ${S.shadowSm}`,flexShrink:0},children:[b.jsxs("button",{type:"button",onClick:()=>e("general"),style:{padding:"10px 18px",background:r==="general"?S.bgCard:"transparent",fontFamily:j.body,border:"none",borderBottom:r==="general"?`2px solid ${S.accentBlue}`:"2px solid transparent",color:r==="general"?S.textPrimary:S.textSecondary,borderRadius:"8px 8px 0 0",cursor:"pointer",fontSize:"12px",fontWeight:r==="general"?"500":"normal",display:"flex",alignItems:"center",gap:"6px"},onMouseEnter:t=>{r!=="general"&&(t.currentTarget.style.background=S.bgHover,t.currentTarget.style.color=S.textPrimary)},onMouseLeave:t=>{r!=="general"&&(t.currentTarget.style.background="transparent",t.currentTarget.style.color=S.textSecondary)},children:[b.jsx(vN,{size:16,stroke:1.5}),"General List"]}),b.jsxs("button",{type:"button",onClick:()=>e("groupedByMcp"),style:{padding:"10px 18px",background:r==="groupedByMcp"?S.bgCard:"transparent",fontFamily:j.body,border:"none",borderBottom:r==="groupedByMcp"?`2px solid ${S.accentBlue}`:"2px solid transparent",color:r==="groupedByMcp"?S.textPrimary:S.textSecondary,cursor:"pointer",fontSize:"12px",fontWeight:r==="groupedByMcp"?"500":"normal",borderRadius:"8px 8px 0 0",display:"flex",alignItems:"center",gap:"6px"},onMouseEnter:t=>{r!=="groupedByMcp"&&(t.currentTarget.style.background=S.bgHover,t.currentTarget.style.color=S.textPrimary)},onMouseLeave:t=>{r!=="groupedByMcp"&&(t.currentTarget.style.background="transparent",t.currentTarget.style.color=S.textSecondary)},children:[b.jsx(om,{size:16,stroke:1.5}),"MCP Protocol View"]})]})}function cge({requests:r,selected:e,onSelect:t,firstRequestTime:n}){const[a,i]=Y.useState("general"),[o]=Y.useState({frame:90,time:120,datetime:180,source:200,destination:200,protocol:90,method:90,status:80,endpoint:500}),[s,l]=Y.useState(new Set),[u,c]=Y.useState(new Set),[f,d]=Y.useState(new Set),h=Y.useRef(null),v=Y.useRef(0),y=Y.useMemo(()=>ege(r),[r]);Y.useEffect(()=>{if(h.current&&r.length>0){const k=h.current.querySelectorAll("tr");if(k.length>0){if(r.length>v.current){const A=Array.from(k).slice(v.current);A.length>0&&oN(A,{delay:30,duration:300,fade:!1})}else oN(k,{delay:20,duration:300,fade:!1});v.current=r.length}}},[r]),Y.useEffect(()=>{if(a==="groupedByMcp"){const k=new Set(y.map(A=>A.sessionId||"__NO_SESSION__"));c(A=>{const L=new Set(A);return k.forEach(D=>L.add(D)),L}),d(A=>{const L=new Set(A);return y.forEach(D=>{const P=D.sessionId||"__NO_SESSION__";D.categories.forEach(E=>{L.add(`${P}::${E.category}`)})}),L})}},[y,a]);const m=k=>{c(A=>{const L=new Set(A);return L.has(k)?L.delete(k):L.add(k),L})},x=k=>{d(A=>{const L=new Set(A);return L.has(k)?L.delete(k):L.add(k),L})},_=Y.useMemo(()=>dV(r),[r]),T=k=>{l(A=>{const L=new Set(A);return L.has(k)?L.delete(k):L.add(k),L})},C=()=>b.jsx("tbody",{ref:h,children:_.map(k=>b.jsx(gV,{pair:k,selected:e,firstRequestTime:n,onSelect:t,isExpanded:s.has(k.frame_number),onToggleExpand:()=>T(k.frame_number)},k.frame_number))});return b.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",background:S.bgPrimary,minHeight:0,overflow:"hidden"},children:[b.jsx(uge,{viewMode:a,onViewModeChange:i}),b.jsx("div",{style:{flex:1,overflowY:"auto",overflowX:"auto",minHeight:0,WebkitOverflowScrolling:"touch"},children:b.jsxs("table",{style:{width:"100%",borderCollapse:"separate",borderSpacing:0,fontSize:"12px",fontFamily:j.body,background:S.bgPrimary},children:[b.jsx(lge,{columnWidths:o}),a==="general"?C():b.jsx(sge,{groupedData:y,expandedSessions:u,expandedCategories:f,onToggleSession:m,onToggleCategory:x,selected:e,firstRequestTime:n,onSelect:t})]})})]})}function fge({requests:r,selected:e,onSelect:t,filters:n,onFilterChange:a,stats:i,firstRequestTime:o,onClear:s}){const l=Y.useRef(null);return Y.useEffect(()=>{e&&l.current&&setTimeout(()=>{l.current&&(l.current.style.opacity="0",l.current.style.transform="translateX(600px)",Hve(l.current,{width:600}))},10)},[e]),b.jsxs("div",{"data-tab-content":!0,style:{display:"flex",flex:1,overflow:"hidden",minHeight:0},children:[b.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",minWidth:0,minHeight:0},children:[b.jsx(Kve,{filters:n,onFilterChange:a,stats:i,onExport:()=>{},onClear:s}),b.jsx(cge,{requests:r,selected:e,onSelect:t,firstRequestTime:o})]}),e&&b.jsx("div",{ref:l,style:{width:"40%",minWidth:"500px",maxWidth:"700px",borderLeft:`1px solid ${S.borderLight}`,overflow:"hidden",display:"flex",flexDirection:"column",background:S.bgCard,flexShrink:0},children:b.jsx(Uve,{request:e,onClose:()=>t(null),requests:r})})]})}function Po(r,e){e.search&&r.append("search",e.search),e.serverName&&r.append("serverName",e.serverName),e.sessionId&&r.append("sessionId",e.sessionId),e.method&&r.append("method",e.method),e.jsonrpcMethod&&r.append("jsonrpcMethod",e.jsonrpcMethod),e.statusCode&&r.append("statusCode",e.statusCode),e.jsonrpcId&&r.append("jsonrpcId",e.jsonrpcId),e.aauthPosture&&r.append("aauthPosture",e.aauthPosture),e.aauthAgent&&r.append("aauthAgent",e.aauthAgent),e.aauthMission&&r.append("aauthMission",e.aauthMission)}const dge=["traffic","logs","setup","playground","security","aauth-explorer","smart-scan","shutdown"],hge="traffic";function Ab(){const r=window.location.hash.slice(1),e=r.startsWith("/")?r.slice(1):r;return dge.includes(e)?e:hge}function cN(r){const e=`#/${r}`;window.location.hash!==e&&window.history.replaceState(null,"",e)}function pge(){const[r,e]=Y.useState(()=>Ab()),[t,n]=Y.useState([]),[a,i]=Y.useState(null),[o,s]=Y.useState({}),[l,u]=Y.useState(null),[c,f]=Y.useState(null),d=Y.useRef(null),h=Y.useRef(r),v=Y.useRef(o);Y.useEffect(()=>{if(!window.location.hash||window.location.hash==="#"){const x=Ab();cN(x)}},[]),Y.useEffect(()=>{cN(r)},[r]),Y.useEffect(()=>{const x=()=>{const _=Ab();_!==r&&e(_)};return window.addEventListener("hashchange",x),()=>window.removeEventListener("hashchange",x)},[r]);const y=async()=>{try{const x=new URLSearchParams;Po(x,o);const T=await(await fetch(`/api/statistics?${x}`)).json();u(T)}catch(x){console.error("Failed to load statistics:",x)}},m=async()=>{try{const x=new URLSearchParams;Po(x,o),x.append("limit","5000");const T=await(await fetch(`/api/requests?${x}`)).json();if(n(T),T.length>0){const C=T[T.length-1]?.timestamp_iso;C&&f(C)}await y()}catch(x){console.error("Failed to load requests:",x)}};return Y.useEffect(()=>{(async()=>{try{const T=new URLSearchParams;Po(T,o),T.append("limit","5000");const k=await(await fetch(`/api/requests?${T}`)).json();if(n(k),k.length>0){const P=k[k.length-1]?.timestamp_iso;P&&f(P)}const A=new URLSearchParams;Po(A,o);const D=await(await fetch(`/api/statistics?${A}`)).json();u(D)}catch(T){console.error("Failed to load requests:",T)}})();const _=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}`;try{const T=new WebSocket(_);d.current=T,T.onmessage=async C=>{const k=JSON.parse(C.data);if(k.type==="update"){if(n(k.data),k.data.length>0){const A=k.data[k.data.length-1]?.timestamp_iso;A&&f(A)}try{const A=new URLSearchParams;Po(A,o);const D=await(await fetch(`/api/statistics?${A}`)).json();u(D)}catch(A){console.error("Failed to load statistics:",A)}}},T.onerror=()=>{},T.onclose=()=>{}}catch{}return()=>{d.current&&d.current.readyState===WebSocket.OPEN&&d.current.close()}},[o]),Y.useEffect(()=>{(async()=>{try{const _=new URLSearchParams;Po(_,o),_.append("limit","5000");const C=await(await fetch(`/api/requests?${_}`)).json();if(n(C),C.length>0){const D=C[C.length-1]?.timestamp_iso;D&&f(D)}const k=new URLSearchParams;Po(k,o);const L=await(await fetch(`/api/statistics?${k}`)).json();u(L)}catch(_){console.error("Failed to load requests:",_)}})()},[o]),Y.useEffect(()=>{v.current=o},[o]),Y.useEffect(()=>{if(r!=="traffic")return;const x=setInterval(async()=>{try{const _=new URLSearchParams;Po(_,v.current);const C=await(await fetch(`/api/statistics?${_}`)).json();u(C)}catch(_){console.error("Failed to load statistics:",_)}},2e3);return()=>clearInterval(x)},[r]),{activeTab:r,setActiveTab:e,requests:t,selected:a,setSelected:i,filters:o,setFilters:s,stats:l,firstRequestTime:c,prevTabRef:h,wsRef:d,loadRequests:m}}function vge({show:r}){const e=Y.useRef(null),t=Y.useRef([]);return Y.useEffect(()=>{r&&e.current?(ft({targets:e.current,opacity:[0,1],scale:[.9,1],duration:400,easing:"easeOutExpo"}),t.current.length>0&&ft({targets:t.current,translateY:[0,-10,0],duration:1200,delay:ft.stagger(200),loop:!0,easing:"easeInOutQuad"})):!r&&e.current&&ft({targets:e.current,opacity:[1,0],scale:[1,.9],duration:300,easing:"easeInExpo",complete:()=>{e.current&&(e.current.style.display="none")}})},[r]),r?b.jsx("div",{ref:e,style:{position:"absolute",top:0,left:0,right:0,bottom:0,background:"rgba(245, 243, 240, 0.9)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,borderRadius:"8px",backdropFilter:"blur(2px)"},children:b.jsxs("div",{style:{background:S.bgCard,borderRadius:"16px",padding:"32px",boxShadow:`0 8px 32px ${S.shadowMd}`,maxWidth:"320px",width:"90%",textAlign:"center"},children:[b.jsx("h3",{style:{fontSize:"16px",fontWeight:"600",color:S.textPrimary,fontFamily:j.body,marginBottom:"20px"},children:"Waiting for MCP server to start"}),b.jsx("div",{style:{display:"flex",justifyContent:"center",gap:"8px"},children:[0,1,2].map(n=>b.jsx("div",{ref:a=>{a&&(t.current[n]=a)},style:{width:"12px",height:"12px",borderRadius:"50%",background:S.accentBlue}},n))})]})}):null}function gge({prompt:r,promptArgs:e,onPromptArgsChange:t,promptResult:n,onGetPrompt:a,loading:i}){return b.jsxs("div",{style:{flex:1,border:`1px solid ${S.borderLight}`,borderRadius:"8px",overflow:"hidden",display:"flex",flexDirection:"column"},children:[b.jsxs("div",{style:{padding:"12px",background:S.bgSecondary,borderBottom:`1px solid ${S.borderLight}`,fontWeight:"500",fontSize:"14px",color:S.textPrimary},children:["Get Prompt: ",r.name]}),b.jsxs("div",{style:{flex:1,overflow:"auto",padding:"16px",display:"flex",flexDirection:"column",gap:"12px"},children:[b.jsxs("div",{children:[b.jsx("label",{htmlFor:"prompt-args-textarea",style:{display:"block",fontSize:"12px",fontWeight:"500",color:S.textSecondary,marginBottom:"6px"},children:"Arguments (JSON)"}),b.jsx("textarea",{id:"prompt-args-textarea",value:e,onChange:o=>t(o.target.value),style:{width:"100%",minHeight:"150px",padding:"10px",border:`1px solid ${S.borderLight}`,borderRadius:"6px",fontFamily:j.mono,fontSize:"12px",background:S.bgCard,color:S.textPrimary,resize:"vertical"}})]}),b.jsx("button",{type:"button",onClick:a,disabled:i,style:{padding:"10px 20px",background:S.buttonPrimary,color:S.textInverse,border:"none",borderRadius:"6px",cursor:i?"not-allowed":"pointer",fontFamily:j.body,fontSize:"13px",fontWeight:"500",opacity:i?.6:1},children:i?"Getting...":"Get Prompt"}),n&&b.jsxs("div",{children:[b.jsx("label",{htmlFor:"prompt-result-pre",style:{display:"block",fontSize:"12px",fontWeight:"500",color:S.textSecondary,marginBottom:"6px"},children:"Result"}),b.jsx("pre",{id:"prompt-result-pre",style:{padding:"12px",background:S.bgSecondary,border:`1px solid ${S.borderLight}`,borderRadius:"6px",fontSize:"12px",fontFamily:j.mono,color:n.error?S.error:S.textPrimary,overflow:"auto",maxHeight:"300px",margin:0},children:JSON.stringify(n,null,2)})]})]})]})}function q2({message:r}){return b.jsx("div",{style:{padding:"40px",textAlign:"center",color:S.textSecondary,fontFamily:j.body,fontSize:"13px"},children:r})}function Q2({message:r}){return b.jsx("div",{style:{padding:"40px",textAlign:"center",color:S.error,fontFamily:j.body,fontSize:"13px"},children:r})}function Tc({message:r}){return b.jsx("div",{style:{padding:"40px",textAlign:"center",color:S.textSecondary,fontFamily:j.body,fontSize:"13px"},children:r})}function yge({prompt:r,isSelected:e,onClick:t}){return b.jsx("button",{type:"button",onClick:t,"aria-label":`Select prompt ${r.name}`,style:{padding:"16px 20px",margin:"4px 8px",borderRadius:"8px",cursor:"pointer",background:e?S.bgSelected:S.bgCard,border:e?`2px solid ${S.accentBlue}`:`1px solid ${S.borderLight}`,boxShadow:e?`0 2px 4px ${S.shadowSm}`:"none",transition:"all 0.2s ease",position:"relative",width:"100%",textAlign:"left"},onMouseEnter:n=>{e||(n.currentTarget.style.background=S.bgHover,n.currentTarget.style.borderColor=S.borderMedium,n.currentTarget.style.boxShadow=`0 2px 4px ${S.shadowSm}`)},onMouseLeave:n=>{e||(n.currentTarget.style.background=S.bgCard,n.currentTarget.style.borderColor=S.borderLight,n.currentTarget.style.boxShadow="none")},children:b.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:"12px"},children:[b.jsx("div",{style:{width:"6px",height:"6px",borderRadius:"50%",background:e?S.accentBlue:S.textTertiary,marginTop:"6px",flexShrink:0,transition:"background 0.2s"}}),b.jsxs("div",{style:{flex:1,minWidth:0},children:[b.jsx("div",{style:{fontWeight:e?"600":"500",fontSize:"14px",color:S.textPrimary,marginBottom:r.description?"6px":"0",lineHeight:"1.4"},children:r.name}),r.description&&b.jsx("div",{style:{fontSize:"12px",color:S.textSecondary,lineHeight:"1.5",marginTop:"4px"},children:r.description})]})]})})}function mge({serverStatus:r,promptsLoading:e,promptsLoaded:t,error:n,prompts:a,selectedPrompt:i,onSelectPrompt:o}){return b.jsx("div",{style:{flex:1,overflow:"auto",background:S.bgCard,position:"relative"},children:r?.running?e||!t?b.jsx(Tc,{message:"Loading prompts..."}):n?.includes("prompts:")?b.jsx(Q2,{message:`Error loading prompts: ${n.replace("prompts: ","")}`}):a.length===0?b.jsx(q2,{message:"No prompts available."}):b.jsx("div",{style:{padding:"8px 0"},children:a.map((s,l)=>b.jsx(yge,{prompt:s,isSelected:i?.name===s.name,onClick:()=>o(s)},s.name||`prompt-${l}`))}):b.jsx(Tc,{message:"Waiting for MCP server to start..."})})}function xge({prompts:r,selectedPrompt:e,onSelectPrompt:t,promptArgs:n,onPromptArgsChange:a,promptResult:i,onGetPrompt:o,loading:s,promptsLoading:l,promptsLoaded:u,serverStatus:c,error:f,onRefresh:d}){const h=v=>{t(v);const y=v.arguments?v.arguments.reduce((m,x)=>(m[x.name]=x.default!==void 0?x.default:"",m),{}):{};a(JSON.stringify(y,null,2))};return b.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px",height:"100%"},children:[b.jsxs("div",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[b.jsx("button",{type:"button",onClick:d,disabled:s||l,style:{padding:"8px 16px",background:S.buttonPrimary,color:S.textInverse,border:"none",borderRadius:"6px",cursor:s||l?"not-allowed":"pointer",fontFamily:j.body,fontSize:"13px",fontWeight:"500",opacity:s||l?.6:1},children:l?"Loading...":"Refresh Prompts"}),b.jsx("span",{style:{color:S.textSecondary,fontSize:"13px"},children:l?"Loading prompts...":`${r.length} prompt${r.length!==1?"s":""} available`})]}),b.jsxs("div",{style:{display:"flex",gap:"16px",flex:1,minHeight:0},children:[b.jsxs("div",{style:{flex:1,border:`1px solid ${S.borderLight}`,borderRadius:"8px",overflow:"hidden",display:"flex",flexDirection:"column"},children:[b.jsx("div",{style:{padding:"12px",background:S.bgSecondary,borderBottom:`1px solid ${S.borderLight}`,fontWeight:"500",fontSize:"14px",color:S.textPrimary},children:"Available Prompts"}),b.jsx(mge,{serverStatus:c,promptsLoading:l,promptsLoaded:u,error:f,prompts:r,selectedPrompt:e,onSelectPrompt:h})]}),e&&b.jsx(gge,{prompt:e,promptArgs:n,onPromptArgsChange:a,promptResult:i,onGetPrompt:o,loading:s})]})]})}function Sge({resource:r,resourceResult:e,onReadResource:t,loading:n}){return b.jsxs("div",{style:{flex:1,border:`1px solid ${S.borderLight}`,borderRadius:"8px",overflow:"hidden",display:"flex",flexDirection:"column"},children:[b.jsxs("div",{style:{padding:"12px",background:S.bgSecondary,borderBottom:`1px solid ${S.borderLight}`,fontWeight:"500",fontSize:"14px",color:S.textPrimary},children:["Read Resource: ",r.uri]}),b.jsxs("div",{style:{flex:1,overflow:"auto",padding:"16px",display:"flex",flexDirection:"column",gap:"12px"},children:[b.jsx("button",{type:"button",onClick:t,disabled:n,style:{padding:"10px 20px",background:S.buttonPrimary,color:S.textInverse,border:"none",borderRadius:"6px",cursor:n?"not-allowed":"pointer",fontFamily:j.body,fontSize:"13px",fontWeight:"500",opacity:n?.6:1},children:n?"Reading...":"Read Resource"}),e&&b.jsxs("div",{children:[b.jsx("label",{htmlFor:"resource-result-pre",style:{display:"block",fontSize:"12px",fontWeight:"500",color:S.textSecondary,marginBottom:"6px"},children:"Result"}),b.jsx("pre",{id:"resource-result-pre",style:{padding:"12px",background:S.bgSecondary,border:`1px solid ${S.borderLight}`,borderRadius:"6px",fontSize:"12px",fontFamily:j.mono,color:e.error?S.error:S.textPrimary,overflow:"auto",maxHeight:"400px",margin:0},children:JSON.stringify(e,null,2)})]})]})]})}function bge({resource:r,isSelected:e,onClick:t}){return b.jsx("button",{type:"button",onClick:t,"aria-label":`Select resource ${r.uri}`,style:{padding:"16px 20px",margin:"4px 8px",borderRadius:"8px",cursor:"pointer",background:e?S.bgSelected:S.bgCard,border:e?`2px solid ${S.accentBlue}`:`1px solid ${S.borderLight}`,boxShadow:e?`0 2px 4px ${S.shadowSm}`:"none",transition:"all 0.2s ease",position:"relative",width:"100%",textAlign:"left"},onMouseEnter:n=>{e||(n.currentTarget.style.background=S.bgHover,n.currentTarget.style.borderColor=S.borderMedium,n.currentTarget.style.boxShadow=`0 2px 4px ${S.shadowSm}`)},onMouseLeave:n=>{e||(n.currentTarget.style.background=S.bgCard,n.currentTarget.style.borderColor=S.borderLight,n.currentTarget.style.boxShadow="none")},children:b.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:"12px"},children:[b.jsx("div",{style:{width:"6px",height:"6px",borderRadius:"50%",background:e?S.accentBlue:S.textTertiary,marginTop:"6px",flexShrink:0,transition:"background 0.2s"}}),b.jsxs("div",{style:{flex:1,minWidth:0},children:[b.jsx("div",{style:{fontWeight:e?"600":"500",fontSize:"14px",color:S.textPrimary,marginBottom:r.name||r.description?"6px":"0",lineHeight:"1.4",wordBreak:"break-word"},children:r.uri}),r.name&&b.jsx("div",{style:{fontSize:"13px",color:S.textPrimary,fontWeight:"500",lineHeight:"1.5",marginTop:"4px"},children:r.name}),r.description&&b.jsx("div",{style:{fontSize:"12px",color:S.textSecondary,lineHeight:"1.5",marginTop:r.name?"2px":"4px"},children:r.description})]})]})})}function _ge({serverStatus:r,resourcesLoading:e,resourcesLoaded:t,error:n,resources:a,selectedResource:i,onSelectResource:o}){return b.jsx("div",{style:{flex:1,overflow:"auto",background:S.bgCard,position:"relative"},children:r?.running?e||!t?b.jsx(Tc,{message:"Loading resources..."}):n?.includes("resources:")?b.jsx(Q2,{message:`Error loading resources: ${n.replace("resources: ","")}`}):a.length===0?b.jsx(q2,{message:"No resources available."}):b.jsx("div",{style:{padding:"8px 0"},children:a.map((s,l)=>b.jsx(bge,{resource:s,isSelected:i?.uri===s.uri,onClick:()=>o(s)},s.uri||`resource-${l}`))}):b.jsx(Tc,{message:"Waiting for MCP server to start..."})})}function wge({resources:r,selectedResource:e,onSelectResource:t,resourceResult:n,onReadResource:a,loading:i,resourcesLoading:o,resourcesLoaded:s,serverStatus:l,error:u,onRefresh:c}){return b.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px",height:"100%"},children:[b.jsxs("div",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[b.jsx("button",{type:"button",onClick:c,disabled:i||o,style:{padding:"8px 16px",background:S.buttonPrimary,color:S.textInverse,border:"none",borderRadius:"6px",cursor:i||o?"not-allowed":"pointer",fontFamily:j.body,fontSize:"13px",fontWeight:"500",opacity:i||o?.6:1},children:o?"Loading...":"Refresh Resources"}),b.jsx("span",{style:{color:S.textSecondary,fontSize:"13px"},children:o?"Loading resources...":`${r.length} resource${r.length!==1?"s":""} available`})]}),b.jsxs("div",{style:{display:"flex",gap:"16px",flex:1,minHeight:0},children:[b.jsxs("div",{style:{flex:1,border:`1px solid ${S.borderLight}`,borderRadius:"8px",overflow:"hidden",display:"flex",flexDirection:"column"},children:[b.jsx("div",{style:{padding:"12px",background:S.bgSecondary,borderBottom:`1px solid ${S.borderLight}`,fontWeight:"500",fontSize:"14px",color:S.textPrimary},children:"Available Resources"}),b.jsx(_ge,{serverStatus:l,resourcesLoading:o,resourcesLoaded:s,error:u,resources:r,selectedResource:e,onSelectResource:t})]}),e&&b.jsx(Sge,{resource:e,resourceResult:n,onReadResource:a,loading:i})]})]})}function Tge({tool:r,toolArgs:e,onToolArgsChange:t,toolResult:n,onCallTool:a,loading:i}){return b.jsxs("div",{style:{flex:1,border:`1px solid ${S.borderLight}`,borderRadius:"8px",overflow:"hidden",display:"flex",flexDirection:"column"},children:[b.jsxs("div",{style:{padding:"12px",background:S.bgSecondary,borderBottom:`1px solid ${S.borderLight}`,fontWeight:"500",fontSize:"14px",color:S.textPrimary},children:["Call Tool: ",r.name]}),b.jsxs("div",{style:{flex:1,overflow:"auto",padding:"16px",display:"flex",flexDirection:"column",gap:"12px"},children:[b.jsxs("div",{children:[b.jsx("label",{htmlFor:"tool-args-textarea",style:{display:"block",fontSize:"12px",fontWeight:"500",color:S.textSecondary,marginBottom:"6px"},children:"Arguments (JSON)"}),b.jsx("textarea",{id:"tool-args-textarea",value:e,onChange:o=>t(o.target.value),style:{width:"100%",minHeight:"150px",padding:"10px",border:`1px solid ${S.borderLight}`,borderRadius:"6px",fontFamily:j.mono,fontSize:"12px",background:S.bgCard,color:S.textPrimary,resize:"vertical"}})]}),b.jsx("button",{type:"button",onClick:a,disabled:i,style:{padding:"10px 20px",background:S.buttonPrimary,color:S.textInverse,border:"none",borderRadius:"6px",cursor:i?"not-allowed":"pointer",fontFamily:j.body,fontSize:"13px",fontWeight:"500",opacity:i?.6:1},children:i?"Calling...":"Call Tool"}),n&&b.jsxs("div",{children:[b.jsx("label",{htmlFor:"tool-result-pre",style:{display:"block",fontSize:"12px",fontWeight:"500",color:S.textSecondary,marginBottom:"6px"},children:"Result"}),b.jsx("pre",{id:"tool-result-pre",style:{padding:"12px",background:S.bgSecondary,border:`1px solid ${S.borderLight}`,borderRadius:"6px",fontSize:"12px",fontFamily:j.mono,color:n.error?S.error:S.textPrimary,overflow:"auto",maxHeight:"300px",margin:0},children:JSON.stringify(n,null,2)})]})]})]})}function Cge({tool:r,isSelected:e,onClick:t}){return b.jsx("button",{type:"button",onClick:t,"aria-label":`Select tool ${r.name}`,style:{padding:"16px 20px",margin:"4px 8px",borderRadius:"8px",cursor:"pointer",background:e?S.bgSelected:S.bgCard,border:e?`2px solid ${S.accentBlue}`:`1px solid ${S.borderLight}`,boxShadow:e?`0 2px 4px ${S.shadowSm}`:"none",transition:"all 0.2s ease",position:"relative",width:"100%",textAlign:"left"},onMouseEnter:n=>{e||(n.currentTarget.style.background=S.bgHover,n.currentTarget.style.borderColor=S.borderMedium,n.currentTarget.style.boxShadow=`0 2px 4px ${S.shadowSm}`)},onMouseLeave:n=>{e||(n.currentTarget.style.background=S.bgCard,n.currentTarget.style.borderColor=S.borderLight,n.currentTarget.style.boxShadow="none")},children:b.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:"12px"},children:[b.jsx("div",{style:{width:"6px",height:"6px",borderRadius:"50%",background:e?S.accentBlue:S.textTertiary,marginTop:"6px",flexShrink:0,transition:"background 0.2s"}}),b.jsxs("div",{style:{flex:1,minWidth:0},children:[b.jsx("div",{style:{fontWeight:e?"600":"500",fontSize:"14px",color:S.textPrimary,marginBottom:r.description?"6px":"0",lineHeight:"1.4"},children:r.name}),r.description&&b.jsx("div",{style:{fontSize:"12px",color:S.textSecondary,lineHeight:"1.5",marginTop:"4px"},children:r.description})]})]})})}function Mge({serverStatus:r,toolsLoading:e,toolsLoaded:t,error:n,tools:a,selectedTool:i,onSelectTool:o}){return b.jsx("div",{style:{flex:1,overflow:"auto",background:S.bgCard,position:"relative"},children:r?.running?e||!t?b.jsx(Tc,{message:"Loading tools..."}):n?.includes("tools:")?b.jsx(Q2,{message:`Error loading tools: ${n.replace("tools: ","")}`}):a.length===0?b.jsx(q2,{message:"No tools available."}):b.jsx("div",{style:{padding:"8px 0"},children:a.map((s,l)=>b.jsx(Cge,{tool:s,isSelected:i?.name===s.name,onClick:()=>o(s)},s.name||`tool-${l}`))}):b.jsx(Tc,{message:"Waiting for MCP server to start..."})})}function kge({tools:r,selectedTool:e,onSelectTool:t,toolArgs:n,onToolArgsChange:a,toolResult:i,onCallTool:o,loading:s,toolsLoading:l,toolsLoaded:u,serverStatus:c,error:f,onRefresh:d}){const h=v=>{t(v);const y=v.inputSchema?.properties?Object.keys(v.inputSchema.properties).reduce((m,x)=>{const _=v.inputSchema.properties[x];return m[x]=_.default!==void 0?_.default:"",m},{}):{};a(JSON.stringify(y,null,2))};return b.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px",height:"100%"},children:[b.jsxs("div",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[b.jsx("button",{type:"button",onClick:d,disabled:s||l,style:{padding:"8px 16px",background:S.buttonPrimary,color:S.textInverse,border:"none",borderRadius:"6px",cursor:s||l?"not-allowed":"pointer",fontFamily:j.body,fontSize:"13px",fontWeight:"500",opacity:s||l?.6:1},children:l?"Loading...":"Refresh Tools"}),b.jsx("span",{style:{color:S.textSecondary,fontSize:"13px"},children:l?"Loading tools...":`${r.length} tool${r.length!==1?"s":""} available`})]}),b.jsxs("div",{style:{display:"flex",gap:"16px",flex:1,minHeight:0},children:[b.jsxs("div",{style:{flex:1,border:`1px solid ${S.borderLight}`,borderRadius:"8px",overflow:"hidden",display:"flex",flexDirection:"column"},children:[b.jsx("div",{style:{padding:"12px",background:S.bgSecondary,borderBottom:`1px solid ${S.borderLight}`,fontWeight:"500",fontSize:"14px",color:S.textPrimary},children:"Available Tools"}),b.jsx(Mge,{serverStatus:c,toolsLoading:l,toolsLoaded:u,error:f,tools:r,selectedTool:e,onSelectTool:h})]}),e&&b.jsx(Tge,{tool:e,toolArgs:n,onToolArgsChange:a,toolResult:i,onCallTool:o,loading:s})]})]})}function Age(r,e,t){const[n,a]=Y.useState([]),[i,o]=Y.useState([]),[s,l]=Y.useState([]),[u,c]=Y.useState(!1),[f,d]=Y.useState(!1),[h,v]=Y.useState(!1),[y,m]=Y.useState(!1),[x,_]=Y.useState(!1),[T,C]=Y.useState(!1),k=Y.useCallback(async()=>{if(!e){t("tools: No server selected"),m(!0);return}c(!0),t(null);try{const P=await r("tools/list");a(P?.tools||[]),m(!0)}catch(P){const E=P.message||"Failed to load tools";t(`tools: ${E}`),m(!0),console.error("Failed to load tools:",P)}finally{c(!1)}},[e,r,t]),A=Y.useCallback(async()=>{if(!e){t("prompts: No server selected"),_(!0);return}d(!0),t(null);try{const P=await r("prompts/list");o(P?.prompts||[]),_(!0)}catch(P){const E=P.message||"Failed to load prompts";t(`prompts: ${E}`),_(!0),console.error("Failed to load prompts:",P)}finally{d(!1)}},[e,r,t]),L=Y.useCallback(async()=>{if(!e){t("resources: No server selected"),C(!0);return}v(!0),t(null);try{const P=await r("resources/list");l(P?.resources||[]),C(!0)}catch(P){const E=P.message||"Failed to load resources";t(`resources: ${E}`),C(!0),console.error("Failed to load resources:",P)}finally{v(!1)}},[e,r,t]),D=Y.useCallback(()=>{m(!1),_(!1),C(!1),a([]),o([]),l([])},[]);return{tools:n,prompts:i,resources:s,toolsLoading:u,promptsLoading:f,resourcesLoading:h,toolsLoaded:y,promptsLoaded:x,resourcesLoaded:T,loadTools:k,loadPrompts:A,loadResources:L,resetData:D}}function Lge(r){const[e,t]=Y.useState(!1),[n,a]=Y.useState(null),[i,o]=Y.useState(null),s=Y.useRef(i);s.current=i;const l=Y.useCallback(async(c,f={})=>{if(!r)throw new Error("No server selected");a(null),t(!0);try{const d={"Content-Type":"application/json"},h=s.current;h&&(d["Mcp-Session-Id"]=h);const v=await fetch("/api/playground/proxy",{method:"POST",headers:d,body:JSON.stringify({method:c,params:f,serverName:r})}),y=await v.json(),m=v.headers.get("Mcp-Session-Id")||v.headers.get("mcp-session-id")||y._sessionId;if(m&&m!==h&&o(m),!v.ok)throw new Error(y.error?.message||y.message||"Request failed");return y.result||y}catch(d){throw a(d.message),d}finally{t(!1)}},[r]),u=Y.useCallback(()=>{o(null)},[]);return{makeMcpRequest:l,loading:e,error:n,setError:a,resetSession:u}}function Ige(){const[r,e]=Y.useState(null),[t,n]=Y.useState(!1),[a,i]=Y.useState([]),[o,s]=Y.useState(null),l=Y.useCallback(async()=>{try{const c=await fetch("/api/composite/status");if(!c.ok)throw new Error("Server not available");const f=await c.json();e(d=>{const h=d?.running;return f.running?n(v=>v&&!1):n(v=>!v||h?!0:v),f})}catch{e({running:!1}),n(f=>f||!0)}},[]),u=Y.useCallback(async()=>{try{const c=await fetch("/api/composite/servers");if(c.ok){const f=await c.json();i(f.servers||[]),s(d=>!d&&f.servers&&f.servers.length>0?f.servers[0]:d)}}catch(c){console.error("Failed to load servers:",c)}},[]);return Y.useEffect(()=>{u()},[u]),Y.useEffect(()=>{l();const c=setInterval(l,2e3);return()=>clearInterval(c)},[l]),Y.useEffect(()=>{a.length>0&&!o&&s(a[0])},[a,o]),{serverStatus:r,showLoadingModal:t,availableServers:a,selectedServer:o,setSelectedServer:s,checkServerStatus:l}}function Dge(){const[r,e]=Y.useState("tools"),[t,n]=Y.useState(null),[a,i]=Y.useState("{}"),[o,s]=Y.useState(null),[l,u]=Y.useState(null),[c,f]=Y.useState("{}"),[d,h]=Y.useState(null),[v,y]=Y.useState(null),[m,x]=Y.useState(null),{serverStatus:_,showLoadingModal:T,availableServers:C,selectedServer:k,setSelectedServer:A}=Ige(),{makeMcpRequest:L,loading:D,error:P,setError:E,resetSession:O}=Lge(k),{tools:B,prompts:N,resources:W,toolsLoading:H,promptsLoading:$,resourcesLoading:Z,toolsLoaded:G,promptsLoaded:X,resourcesLoaded:K,loadTools:V,loadPrompts:U,loadResources:ae,resetData:ce}=Age(L,k,E),re=Y.useRef(r);return re.current=r,Y.useEffect(()=>{if(!k||!_?.running)return;ce(),n(null),u(null),y(null),s(null),h(null),x(null),i("{}"),f("{}"),O(),E(null);const fe=setTimeout(()=>{const Te=re.current;Te==="tools"?V():Te==="prompts"?U():Te==="resources"&&ae()},100);return()=>clearTimeout(fe)},[k,_?.running,ce,V,U,ae,O,E]),Y.useEffect(()=>{if(!(!_?.running||!k)){if(r==="tools"&&!G&&!H){const fe=setTimeout(()=>{V()},100);return()=>clearTimeout(fe)}if(r==="prompts"&&!X&&!$){const fe=setTimeout(()=>{U()},100);return()=>clearTimeout(fe)}if(r==="resources"&&!K&&!Z){const fe=setTimeout(()=>{ae()},100);return()=>clearTimeout(fe)}}},[r,_?.running,k,G,H,X,$,K,Z,V,U,ae]),{activeSection:r,setActiveSection:e,tools:B,prompts:N,resources:W,loading:D,error:P,selectedTool:t,setSelectedTool:n,toolArgs:a,setToolArgs:i,toolResult:o,selectedPrompt:l,setSelectedPrompt:u,promptArgs:c,setPromptArgs:f,promptResult:d,selectedResource:v,setSelectedResource:y,resourceResult:m,serverStatus:_,showLoadingModal:T,toolsLoading:H,promptsLoading:$,resourcesLoading:Z,toolsLoaded:G,promptsLoaded:X,resourcesLoaded:K,loadTools:V,loadPrompts:U,loadResources:ae,handleCallTool:async()=>{if(t)try{const Te=(Ie=>{try{return JSON.parse(Ie)}catch{return null}})(a);if(Te===null){E("Invalid JSON in arguments");return}const xe=await L("tools/call",{name:t.name,arguments:Te});s(xe)}catch(fe){s({error:fe.message})}},handleGetPrompt:async()=>{if(l)try{const Te=(Ie=>{try{return JSON.parse(Ie)}catch{return null}})(c);if(Te===null){E("Invalid JSON in arguments");return}const xe=await L("prompts/get",{name:l.name,arguments:Te});h(xe)}catch(fe){h({error:fe.message})}},handleReadResource:async()=>{if(v)try{const fe=await L("resources/read",{uri:v.uri});x(fe)}catch(fe){x({error:fe.message})}},availableServers:C,selectedServer:k,setSelectedServer:A}}function Pge(){const{activeSection:r,setActiveSection:e,tools:t,prompts:n,resources:a,loading:i,error:o,selectedTool:s,setSelectedTool:l,toolArgs:u,setToolArgs:c,toolResult:f,selectedPrompt:d,setSelectedPrompt:h,promptArgs:v,setPromptArgs:y,promptResult:m,selectedResource:x,setSelectedResource:_,resourceResult:T,serverStatus:C,showLoadingModal:k,toolsLoading:A,promptsLoading:L,resourcesLoading:D,toolsLoaded:P,promptsLoaded:E,resourcesLoaded:O,loadTools:B,loadPrompts:N,loadResources:W,handleCallTool:H,handleGetPrompt:$,handleReadResource:Z,availableServers:G,selectedServer:X,setSelectedServer:K}=Dge();return b.jsxs(b.Fragment,{children:[b.jsx("style",{children:`
|
|
77
|
+
@keyframes spin {
|
|
78
|
+
from { transform: rotate(0deg); }
|
|
79
|
+
to { transform: rotate(360deg); }
|
|
80
|
+
}
|
|
81
|
+
`}),b.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",background:S.bgPrimary,padding:"20px",gap:"16px",position:"relative"},children:[b.jsx(vge,{show:k}),o&&!o.includes(":")&&b.jsxs("div",{style:{padding:"12px 16px",background:S.error,color:S.textInverse,borderRadius:"6px",fontSize:"13px",fontFamily:j.body},children:["Error: ",o]}),b.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[G.length>0&&b.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[b.jsx("label",{htmlFor:"mcp-server-select",style:{fontSize:"13px",fontFamily:j.body,color:S.textSecondary,fontWeight:"500"},children:"Server:"}),b.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px"},children:G.map(V=>b.jsx("button",{type:"button",onClick:()=>K(V),style:{padding:"10px 18px",background:X===V?S.accentBlue:S.bgSecondary,border:X===V?`2px solid ${S.accentBlue}`:`1px solid ${S.borderLight}`,borderRadius:"8px",color:X===V?S.textInverse:S.textPrimary,fontSize:"13px",fontFamily:j.body,fontWeight:X===V?"600":"500",cursor:"pointer",transition:"all 0.2s ease",boxShadow:X===V?`0 2px 4px ${S.shadowSm}`:"none"},onMouseEnter:U=>{X!==V&&(U.currentTarget.style.background=S.bgHover,U.currentTarget.style.borderColor=S.borderMedium,U.currentTarget.style.boxShadow=`0 2px 4px ${S.shadowSm}`)},onMouseLeave:U=>{X!==V&&(U.currentTarget.style.background=S.bgSecondary,U.currentTarget.style.borderColor=S.borderLight,U.currentTarget.style.boxShadow="none")},children:V},V))})]}),b.jsx("div",{style:{display:"flex",gap:"8px",borderBottom:`1px solid ${S.borderLight}`},children:["tools","prompts","resources"].map(V=>b.jsx("button",{type:"button",onClick:()=>e(V),style:{padding:"10px 18px",background:r===V?S.bgSecondary:"transparent",border:"none",borderBottom:`2px solid ${r===V?S.accentBlue:"transparent"}`,color:r===V?S.textPrimary:S.textSecondary,cursor:"pointer",fontSize:"13px",fontFamily:j.body,fontWeight:r===V?"500":"400",textTransform:"capitalize",borderRadius:"6px 6px 0 0",transition:"all 0.2s"},children:V},V))})]}),b.jsxs("div",{style:{flex:1,overflow:"hidden",minHeight:0},children:[r==="tools"&&b.jsx(kge,{tools:t,selectedTool:s,onSelectTool:l,toolArgs:u,onToolArgsChange:c,toolResult:f,onCallTool:H,loading:i,toolsLoading:A,toolsLoaded:P,serverStatus:C,error:o,onRefresh:B}),r==="prompts"&&b.jsx(xge,{prompts:n,selectedPrompt:d,onSelectPrompt:h,promptArgs:v,onPromptArgsChange:y,promptResult:m,onGetPrompt:$,loading:i,promptsLoading:L,promptsLoaded:E,serverStatus:C,error:o,onRefresh:N}),r==="resources"&&b.jsx(wge,{resources:a,selectedResource:x,onSelectResource:_,resourceResult:T,onReadResource:Z,loading:i,resourcesLoading:D,resourcesLoaded:O,serverStatus:C,error:o,onRefresh:W})]})]})]})}function Rge(){const{activeTab:r,setActiveTab:e,requests:t,selected:n,setSelected:a,filters:i,setFilters:o,stats:s,firstRequestTime:l,prevTabRef:u,loadRequests:c}=pge();return Y.useEffect(()=>{if(u.current!==r){const f=document.querySelector("[data-tab-content]");f&&K2(f,{duration:300}),u.current=r}},[r,u]),b.jsxs("div",{style:{display:"flex",height:"100vh",flexDirection:"column",background:S.bgPrimary},children:[b.jsx("div",{style:{position:"relative"},children:b.jsx(hve,{activeTab:r,onTabChange:e})}),b.jsx(Pve,{}),r==="traffic"&&b.jsx(fge,{requests:t,selected:n,onSelect:a,filters:i,onFilterChange:o,stats:s,firstRequestTime:l,onClear:()=>{a(null),c()}}),r==="logs"&&b.jsx("div",{"data-tab-content":!0,style:{flex:1,overflow:"hidden",display:"flex",flexDirection:"column"},children:b.jsx(GW,{})}),r==="setup"&&b.jsx("div",{"data-tab-content":!0,style:{flex:1,overflow:"hidden",width:"100%",height:"100%"},children:b.jsx(t$,{})}),r==="playground"&&b.jsx("div",{"data-tab-content":!0,style:{flex:1,overflow:"hidden",width:"100%",height:"100%"},children:b.jsx(Pge,{})}),r==="smart-scan"&&b.jsx("div",{"data-tab-content":!0,style:{flex:1,overflow:"auto",width:"100%",height:"100%"},children:b.jsx(Mpe,{})}),r==="shutdown"&&b.jsx("div",{"data-tab-content":!0,style:{flex:1,overflow:"hidden",width:"100%",height:"100%"},children:b.jsx(Xhe,{})}),r==="security"&&b.jsx("div",{"data-tab-content":!0,style:{flex:1,overflow:"auto",width:"100%",height:"100%"},children:b.jsx(Yhe,{onNavigateToSmartScan:()=>e("smart-scan"),onNavigateToSetup:()=>e("setup")})}),r==="aauth-explorer"&&b.jsx("div",{"data-tab-content":!0,style:{flex:1,overflow:"hidden",width:"100%",height:"100%"},children:b.jsx(_ve,{onOpenPacket:f=>{if(f==null)return;const d=t?.find?.(h=>h.frame_number===f);a(d||{frame_number:f}),e("traffic")}})})]})}_G.createRoot(document.getElementById("root")).render(b.jsx(Ad.StrictMode,{children:b.jsx(Rge,{})}));
|