iobroker.admin 7.7.2 → 7.7.3
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 +42 -8
- package/admin/admin.png +0 -0
- package/admin/i18n/de.json +1 -1
- package/admin/i18n/es.json +1 -1
- package/admin/i18n/fr.json +1 -1
- package/admin/i18n/it.json +1 -1
- package/admin/i18n/nl.json +1 -1
- package/admin/i18n/pl.json +1 -1
- package/admin/i18n/pt.json +1 -1
- package/admin/i18n/ru.json +1 -1
- package/admin/i18n/uk.json +1 -1
- package/admin/i18n/zh-cn.json +1 -1
- package/admin/jsonConfig.json5 +1 -2
- package/adminWww/assets/{AdapterUpdateDialog-DHGhgEEq.js → AdapterUpdateDialog-BQUTMe7v.js} +1 -1
- package/adminWww/assets/Adapters-KuMqwfzU.js +9 -0
- package/adminWww/assets/Config-LH40Fzyp.js +1 -0
- package/adminWww/assets/CustomModal-UQ6ICKdg.js +1 -0
- package/adminWww/assets/CustomTab-CE2qvngn.js +1 -0
- package/adminWww/assets/DefaultPropsProvider-BxjOYH1h.js +30 -0
- package/adminWww/assets/EasyMode-XXQKZmWs.js +1 -0
- package/adminWww/assets/{Enums-BSICIhWI.js → Enums-Ddmi-fYo.js} +3 -3
- package/adminWww/assets/{Fields-C3JkTmfP.js → Fields-CQNdUYkd.js} +1 -1
- package/adminWww/assets/{Files-DK85-COY.js → Files-DgOiCRiN.js} +2 -2
- package/adminWww/assets/FilledInput-B9JSi0Ta.js +2 -0
- package/adminWww/assets/Hosts-BgDpLhdl.js +121 -0
- package/adminWww/assets/Instances-DikJwBl0.js +2 -0
- package/adminWww/assets/Intro-vxIHtYzr.js +2 -0
- package/adminWww/assets/Logs-DZUWTbJn.js +1 -0
- package/adminWww/assets/Objects-Dm1_4aGR.js +60 -0
- package/adminWww/assets/{State-BqfD2ABf.js → State-CrcWiBdx.js} +1 -1
- package/adminWww/assets/TextField-j-uewRwI.js +138 -0
- package/adminWww/assets/ThemeProvider-DHntAcOp.js +29 -0
- package/adminWww/assets/Users-GcWjwa7A.js +1 -0
- package/adminWww/assets/ace-1DqSbvTN.js +985 -0
- package/adminWww/assets/{bootstrap-BYQTdf9r.js → bootstrap-B3ZI_-0g.js} +112 -112
- package/adminWww/assets/{createSvgIcon-Bh3KWtyp.js → createSvgIcon-Ds12z7B3.js} +1 -1
- package/adminWww/assets/emotion-cache.browser.esm-BgJfNZJN.js +1 -0
- package/adminWww/assets/emotion-react.browser.esm-CBtpmfsG.js +8 -0
- package/adminWww/assets/emotion-serialize.esm-Q4o_CgeF.js +1 -0
- package/adminWww/assets/emotion-styled.browser.esm-BeD8nBzN.js +1 -0
- package/adminWww/assets/emotion-use-insertion-effect-with-fallbacks.browser.esm-BIy6Leuu.js +1 -0
- package/adminWww/assets/geosearch.module-B6h9BuIR.js +1 -0
- package/adminWww/assets/hostInit-fzxL8JAx.js +1 -1
- package/adminWww/assets/iconBase-BAOnvyiQ.js +1 -0
- package/adminWww/assets/{index-Qa7Q_Dz5.js → index-BOnh7es7.js} +1 -1
- package/adminWww/assets/{index-B1ITPhEY.js → index-BSfwmoAE.js} +3 -3
- package/adminWww/assets/{index-rKfs-rCa.js → index-BVgYaw7t.js} +1 -1
- package/adminWww/assets/{index-D--ojYan.js → index-C9i3HTsG.js} +1 -1
- package/adminWww/assets/{index-wN1ZlPSW.js → index-CELb-gCK.js} +2 -2
- package/adminWww/assets/{index-DPDg2YA0.js → index-CU6eZCem.js} +1 -1
- package/adminWww/assets/{index-DTGUg51P.js → index-DZ0MncEz.js} +2 -2
- package/adminWww/assets/index-Dg-s3k0-.js +10 -0
- package/adminWww/assets/index-tS5iCAF7.js +55 -0
- package/adminWww/assets/{iobroker_admin__loadShare___mf_0_emotion_mf_1_react__loadShare__-BOKYvG_W.js → iobroker_admin__loadShare___mf_0_emotion_mf_1_react__loadShare__-CXogaIXO.js} +1 -1
- package/adminWww/assets/{iobroker_admin__loadShare__leaflet__loadShare__-h9SMNPLU.js → iobroker_admin__loadShare__leaflet__loadShare__-DIpcqFbm.js} +1 -1
- package/adminWww/assets/{iobroker_admin__loadShare__prop_mf_2_types__loadShare__-BnsS7SOQ.js → iobroker_admin__loadShare__prop_mf_2_types__loadShare__-pDONiJUe.js} +1 -1
- package/adminWww/assets/{iobroker_admin__loadShare__react__loadShare__-Bis6NHgw.js → iobroker_admin__loadShare__react__loadShare__-CuzHmAOj.js} +1 -1
- package/adminWww/assets/iobroker_admin__mf_v__runtimeInit__mf_v__-CHE4rLsT.js +5 -0
- package/adminWww/assets/leaflet-src-BRBM-1HK.js +4 -0
- package/adminWww/assets/{sentry-H_UdJ2zx.js → sentry-B6yHtsbd.js} +1 -1
- package/adminWww/assets/{zh-cn-vvAC9zpl.js → zh-cn-heTcsLnU.js} +13 -13
- package/adminWww/img/admin.png +0 -0
- package/adminWww/index.html +2 -2
- package/adminWww/mf-manifest.json +1 -1
- package/adminWww/remoteEntry.js +2 -2
- package/build/i18n/de.json +18 -0
- package/build/i18n/es.json +18 -0
- package/build/i18n/fr.json +18 -0
- package/build/i18n/it.json +18 -0
- package/build/i18n/nl.json +18 -0
- package/build/i18n/pl.json +18 -0
- package/build/i18n/pt.json +18 -0
- package/build/i18n/ru.json +18 -0
- package/build/i18n/uk.json +18 -0
- package/build/i18n/zh-cn.json +18 -0
- package/build/lib/DockerManager.js +1315 -0
- package/build/lib/DockerManager.js.map +1 -0
- package/build/lib/dockerManager.types.js +3 -0
- package/build/lib/dockerManager.types.js.map +1 -0
- package/{build-backend → build}/lib/testPassword.js +1 -1
- package/{build-backend → build}/lib/testPassword.js.map +1 -1
- package/{build-backend → build}/lib/translations.js +16 -1
- package/build/lib/translations.js.map +1 -0
- package/{build-backend → build}/main.js +58 -5
- package/build/main.js.map +1 -0
- package/io-package.json +14 -14
- package/package.json +7 -7
- package/adminWww/assets/Adapters-CgSIajcF.js +0 -7
- package/adminWww/assets/Config-BQSl4bfA.js +0 -1
- package/adminWww/assets/CustomModal-DNMTLv4y.js +0 -1
- package/adminWww/assets/CustomTab-Bl8S8QZW.js +0 -1
- package/adminWww/assets/DefaultPropsProvider-u5xB1Fxz.js +0 -30
- package/adminWww/assets/EasyMode-xDbqrply.js +0 -1
- package/adminWww/assets/FilledInput-CysG4ax_.js +0 -2
- package/adminWww/assets/Hosts-qIsB4Gub.js +0 -121
- package/adminWww/assets/Instances-BA_DCzs8.js +0 -2
- package/adminWww/assets/Intro-00oh6SLw.js +0 -2
- package/adminWww/assets/Logs-Cvpgh-zN.js +0 -1
- package/adminWww/assets/Objects-Dp71iotS.js +0 -60
- package/adminWww/assets/Tabs-sxfWgN0b.js +0 -138
- package/adminWww/assets/Users-CDcWqTfZ.js +0 -1
- package/adminWww/assets/ace-BG5WYul1.js +0 -985
- package/adminWww/assets/blueGrey-DYsiMDOn.js +0 -29
- package/adminWww/assets/emotion-cache.browser.esm-B8BFze5o.js +0 -1
- package/adminWww/assets/emotion-react.browser.esm-BCDt9NrH.js +0 -8
- package/adminWww/assets/emotion-serialize.esm-BUa21YfQ.js +0 -1
- package/adminWww/assets/emotion-styled.browser.esm-CyFqGgyG.js +0 -1
- package/adminWww/assets/emotion-utils.browser.esm-pglN4_eI.js +0 -1
- package/adminWww/assets/geosearch.module-DH4NhiPj.js +0 -1
- package/adminWww/assets/iconBase-C3vi24ZE.js +0 -1
- package/adminWww/assets/index-D3IAEXXP.js +0 -10
- package/adminWww/assets/index-qcIeekse.js +0 -55
- package/adminWww/assets/iobroker_admin__mf_v__runtimeInit__mf_v__-CTkuGOOk.js +0 -5
- package/adminWww/assets/leaflet-src-A2ZHl6nF.js +0 -4
- package/build-backend/i18n/de.json +0 -18
- package/build-backend/i18n/es.json +0 -18
- package/build-backend/i18n/fr.json +0 -18
- package/build-backend/i18n/it.json +0 -18
- package/build-backend/i18n/nl.json +0 -18
- package/build-backend/i18n/pl.json +0 -18
- package/build-backend/i18n/pt.json +0 -18
- package/build-backend/i18n/ru.json +0 -18
- package/build-backend/i18n/uk.json +0 -18
- package/build-backend/i18n/zh-cn.json +0 -18
- package/build-backend/lib/translations.js.map +0 -1
- package/build-backend/main.js.map +0 -1
- /package/{build-backend → build}/i18n/en.json +0 -0
- /package/{build-backend → build}/lib/checkLinuxPass.js +0 -0
- /package/{build-backend → build}/lib/checkLinuxPass.js.map +0 -0
- /package/{build-backend → build}/lib/utils.js +0 -0
- /package/{build-backend → build}/lib/utils.js.map +0 -0
- /package/{build-backend → build}/lib/web.js +0 -0
- /package/{build-backend → build}/lib/web.js.map +0 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import{j as y}from"./DefaultPropsProvider-BxjOYH1h.js";import{i as at,a as vh}from"./iobroker_admin__loadShare__react__loadShare__-CuzHmAOj.js";import{w as Gn,f as en,J as gh,i as w,a as H,u as $l,v as Bx,D as mh,x as zx,y as Zt,z as Cs,U as jt,B as Vx,M as Md,R as yh,I as $,E as Ym,K as Dd,N as Hx,O as Id,P as Wx,b as ya,Q as Xm,q as Gx,V as Ts,W as $x}from"./bootstrap-B3ZI_-0g.js";import{l as Ux}from"./index-8HslT92O.js";import{a as Yx,b as Xx}from"./iobroker_admin__mf_v__runtimeInit__mf_v__-CHE4rLsT.js";import{c as Zx,d as qx,e as Kx,f as Pd}from"./index-CU6eZCem.js";import{a as Jx}from"./_commonjsHelpers-D6-XlEtG.js";import{h as Ul}from"./zh-cn-heTcsLnU.js";import{C as Qx}from"./CustomModal-UQ6ICKdg.js";import"./iobroker_admin__loadShare__prop_mf_2_types__loadShare__-pDONiJUe.js";import"./emotion-serialize.esm-Q4o_CgeF.js";import"./iobroker_admin__loadShare___mf_0_emotion_mf_1_react__loadShare__-CXogaIXO.js";import"./ace-1DqSbvTN.js";import"./FilledInput-B9JSi0Ta.js";import"./preload-helper-Dp1pzeXC.js";import"./ThemeProvider-DHntAcOp.js";import"./emotion-cache.browser.esm-BgJfNZJN.js";import"./iobroker_admin__loadShare__leaflet__loadShare__-DIpcqFbm.js";import"./extends-CF3RwP-h.js";import"./iconBase-BAOnvyiQ.js";const $t={paper:{height:"100%",maxHeight:"100%",maxWidth:"100%",overflow:"hidden"},headingIcon:{marginRight:5,width:32,height:32},titleEnabled:{float:"right",fontSize:16,color:"#7ff57f",textTransform:"uppercase",fontWeight:"bold",paddingLeft:20},scrollDiv:{width:"100%",height:"100%",overflow:"auto"},enabledControl:{width:130,display:"inline-block",verticalAlign:"top"},customControls:{width:"calc(100% - 130px)",maxWidth:800,display:"inline-block",verticalAlign:"top",paddingTop:16},accordionOdd:{},accordionEven:{backgroundColor:"rgba(128, 128, 128, 0.1)"},accordionHeaderOdd:{backgroundColor:"rgba(128, 128, 128, 0.2)"},accordionHeaderEven:{backgroundColor:"rgba(128, 128, 128, 0.3)"},accordionHeaderEnabledOdd:{backgroundColor:"rgba(128, 255, 128, 0.2)"},accordionHeaderEnabledEven:{backgroundColor:"rgba(128, 255, 128, 0.2)"},enabledVisible:{display:"inline-block"},enabledInvisible:{display:"none"}},tw=".";class As extends at.Component{changedIds;scrollDivRef;jsonConfigs;refTemplate;customObj;commonConfig={};cb;cachedNewValues;constructor(t){super(t);let e;try{e=JSON.parse((window._localStorage||window.localStorage).getItem("App.customsExpanded")||"[]")}catch{e=[]}this.changedIds=[],this.state={loaded:!1,expanded:e,newValues:{},confirmed:!1,showConfirmation:!1,maxOids:0,systemConfig:this.props.systemConfig},this.scrollDivRef=at.createRef(),this.jsonConfigs={},this.refTemplate={},this.props.customsInstances.map(i=>this.refTemplate[i]=at.createRef()),this.customObj=this.props.objectIDs.length>1?{common:{custom:{}},native:{}}:en.deepClone(this.props.objects[this.props.objectIDs[0]]||null),this.customObj&&this.loadAllCustoms().then(()=>{this.commonConfig=this.getCommonConfig(),this.setState({loaded:!0,newValues:{}})})}async componentDidMount(){this.state.systemConfig||this.setState({systemConfig:await this.props.socket.getCompactSystemConfig()}),this.props.registerSaveFunc&&this.props.registerSaveFunc(this.onSave)}componentWillUnmount(){this.props.registerSaveFunc&&this.props.registerSaveFunc()}async loadAllCustoms(){const t=[];for(const e of this.props.customsInstances){if(e==="_")continue;const i=e.replace(/\.\d+$/,"").replace("system.adapter.","");this.jsonConfigs[i]===void 0&&(this.jsonConfigs[i]=null,t.push(this.getCustomTemplate(i)))}await Promise.all(t),this.props.customsInstances.forEach(e=>{var n,a;const i=e.replace(/\.\d+$/,"").replace("system.adapter.","");this.jsonConfigs[i]&&(this.jsonConfigs[i].instanceObjs=this.jsonConfigs[i].instanceObjs||{},this.jsonConfigs[i].instanceObjs[e]={_id:e,common:JSON.parse(JSON.stringify((n=this.props.objects[`system.adapter.${e}`])==null?void 0:n.common)),native:JSON.parse(JSON.stringify((a=this.props.objects[`system.adapter.${e}`])==null?void 0:a.native)),type:"instance",instanceObjects:[],objects:[]})})}async getCustomTemplate(t){var i;const e=this.props.objects[`system.adapter.${t}`]?en.deepClone(this.props.objects[`system.adapter.${t}`]):null;if(!e){console.error(`Cannot find adapter "${t}"`);return}if(en.fixAdminUI(e),((i=e.common)==null?void 0:i.adminUI.custom)==="json")try{const n=await this.props.socket.fileExists(`${t}.admin`,"jsonCustom.json5");let a,o;n?o=await this.props.socket.readFile(`${t}.admin`,"jsonCustom.json5"):o=await this.props.socket.readFile(`${t}.admin`,"jsonCustom.json"),o.file!==void 0?a=o.file:a=o;let s;try{s=Ux.parse(a),this.jsonConfigs[t]=this.jsonConfigs[t]||{},this.jsonConfigs[t].json=s}catch(l){console.error(`Cannot parse jsonConfig of ${t}: ${l}`),window.alert(`Cannot parse jsonConfig of ${t}: ${l}`)}await gh.loadI18n(this.props.socket,s.i18n,t);return}catch(n){console.error(`Cannot load jsonConfig of ${t}: ${n}`),window.alert(`Cannot load jsonConfig of ${t}: ${n}`)}console.error(`Adapter ${t} is not yet supported by this version of admin`),window.alert(`Adapter ${t} is not yet supported by this version of admin`)}_executeCustom(t,e,i,n,a,o,s){if(s.includes(o))return;s.push(o);let l=[],u;if(t&&typeof t=="object"?(l=t.alsoDependsOn||[],typeof l=="string"&&(l=[l]),u=t.func):u=t,l.forEach(h=>{if(!a[h])console.error(`[JsonConfigComponent] attribute "${h}" does not exist!`);else if(!a[h].defaultFunc)console.error(`[JsonConfigComponent] attribute "${h}" is not required to be includes in "alsoDependsOn" while has static value!`);else{const c=this._executeCustom(a[h].defaultFunc,e,i,n,a,h,s);c!==void 0&&(e[h]=c)}}),!u)e[o]=a[o].default===void 0?null:a[o].default;else try{const h=new Function("data","originalData","_system","instanceObj","customObj","_socket",u.includes("return")?u:`return ${u}`);e[o]=h(e||this.props.data,this.props.originalData,this.props.systemConfig,n,i,this.props.socket)}catch(h){console.error(`Cannot execute ${t}: ${h}`),e[o]=!a[o]||a[o].default===void 0?null:a[o].default}return e[o]}static flattenItems(t,e={}){return t&&Object.keys(t).forEach(i=>{t[i].items?As.flattenItems(t[i].items,e):e[i]=t[i]}),e}getDefaultValues(t,e){const i={enabled:!1},n=t.split(".")[0];if(this.jsonConfigs[n]&&!this.jsonConfigs[n].disabled){const a=As.flattenItems(this.jsonConfigs[n].json.items);if(a){const o=[],s=Object.keys(a).filter(l=>a[l]);s.forEach(l=>{!a[l].defaultFunc&&a[l].default!==void 0&&(i[l]=a[l].default)}),s.forEach(l=>{a[l].defaultFunc&&this._executeCustom(a[l].defaultFunc,i,e,this.jsonConfigs[n].instanceObjs[t],a,l,o)})}}return i}getCommonConfig(){const t=this.props.objectIDs||[],e=this.props.objects,i={};return this.props.customsInstances.forEach(n=>{const a=n.split(".")[0];this.jsonConfigs[a]&&this.jsonConfigs[a].disabled||(i[n]={},t.forEach(o=>{var u;const s=e[o],l=(u=s==null?void 0:s.common)!=null&&u.custom&&s.common.custom[n]||null;if(l)Object.keys(l).forEach(h=>{h.startsWith("_")||(i[n][h]===void 0?i[n][h]=l[h]:i[n][h]!==l[h]&&(Array.isArray(i[n][h])||(i[n][h]=[i[n][h]]),i[n][h].includes(l[h])||i[n][h].push(l[h])))});else{const h=this.getDefaultValues(n,s);h.enabled=!1,Object.keys(h).forEach(c=>{c.startsWith("_")||(i[n][c]===void 0?i[n][c]=h[c]:i[n][c]!==h[c]&&(Array.isArray(i[n][c])||(i[n][c]=[i[n][c]]),i[n][c].includes(h[c])||i[n][c].push(h[c])))})}}),Object.keys(i[n]).forEach(o=>{Array.isArray(i[n][o])&&i[n][o].sort()}))}),i}isChanged(t){return t=t||this.state.newValues,Object.keys(t).find(e=>t[e]===null||t[e]&&Object.keys(t[e]).find(i=>!i.startsWith("_")))}combineNewAndOld(t,e=!1){const i={...this.commonConfig[t]||{},...this.state.newValues[t]||{}};return e&&Object.keys(i).forEach(n=>{n.startsWith("_")&&delete i[n]}),this.state.newValues[t]===null&&(i.enabled=!1),i}renderOneCustom(t,e,i,n){var p,v;const a=t.split(".")[0],o=`${tw}/adapter/${a}/${this.props.objects[`system.adapter.${a}`].common.icon}`,s=this.state.newValues[t]!==void 0&&(!this.state.newValues[t]||this.state.newValues[t].enabled!==void 0)?!!(this.state.newValues[t]&&this.state.newValues[t].enabled):this.state.newValues[t]===null?!1:this.commonConfig[t].enabled,l=Array.isArray(s)&&(!this.state.newValues[t]||this.state.newValues[t].enabled===void 0),u=(v=(p=this.jsonConfigs[a])==null?void 0:p.json)==null?void 0:v.disabled,h=this.combineNewAndOld(t),c=this.jsonConfigs[a].json.hidden;if(u&&c===!0||typeof c=="string"&&this._executeCustom(c,h,i,e,this.jsonConfigs[a].json.items,"enabled",[]))return null;let f=null;const d=this.jsonConfigs[a].json.help;return u&&d&&(typeof d=="object"?f=d[this.props.lang]||d.en:f=this.props.t(d)),y.jsxs(w.Accordion,{id:`Accordion_${t}`,style:n%2?$t.accordionOdd:$t.accordionEven,expanded:this.state.expanded.includes(t),ref:this.refTemplate[t],onChange:()=>{const g=[...this.state.expanded],m=g.indexOf(t);m===-1?g.push(t):g.splice(m,1),(window._localStorage||window.localStorage).setItem("App.customsExpanded",JSON.stringify(g)),m===-1&&(window._localStorage||window.localStorage).setItem("App.customsLastExpanded",t),this.setState({expanded:g})},children:[y.jsxs(w.AccordionSummary,{expandIcon:y.jsx(H.ExpandMore,{}),"data-id":t,style:n%2?s?$t.accordionHeaderEnabledOdd:$t.accordionHeaderOdd:s?$t.accordionHeaderEnabledEven:$t.accordionHeaderEven,children:[y.jsx("img",{src:o,style:$t.headingIcon,alt:""}),y.jsx(w.Typography,{style:$t.heading,children:this.props.t("Settings %s",t)}),y.jsx("div",{className:"titleEnabled",style:{...$t.titleEnabled,...s?$t.enabledVisible:$t.enabledInvisible},children:this.props.t("Enabled")})]}),y.jsxs(w.AccordionDetails,{children:[y.jsx("div",{style:$t.enabledControl,children:y.jsx(w.FormControlLabel,{style:$t.formControl,control:y.jsx(w.Checkbox,{indeterminate:l,checked:!!s,disabled:!!u,onChange:g=>{this.cachedNewValues=this.cachedNewValues||this.state.newValues;const m=en.deepClone(this.cachedNewValues);m[t]=m[t]||{},l||g.target.checked?m[t].enabled=!0:s&&this.commonConfig[t].enabled?m[t]=null:delete m[t],this.cachedNewValues=m,this.setState({newValues:m,hasChanges:this.isChanged(m)},()=>{this.cachedNewValues=void 0,this.props.onChange&&this.props.onChange(!!this.state.hasChanges)})}}),label:this.props.t("Enabled")})}),y.jsxs("div",{style:$t.customControls,children:[!u&&(s||l)&&this.state.systemConfig?y.jsx(gh,{instanceObj:e,customObj:i,custom:!0,adapterName:a,instance:parseInt((t==null?void 0:t.split(".").pop())??"0",10)||0,socket:this.props.socket,themeName:this.props.themeName,themeType:this.props.themeType,theme:this.props.theme,multiEdit:this.props.objectIDs.length>1,schema:this.jsonConfigs[a].json,data:h,isFloatComma:this.props.systemConfig.common.isFloatComma,dateFormat:this.props.systemConfig.common.dateFormat,onError:g=>this.setState({error:g},()=>this.props.onError&&this.props.onError(g)),onValueChange:(g,m)=>{var b;this.cachedNewValues=this.cachedNewValues||this.state.newValues,console.log(`${g} => ${m}`);const _=en.deepClone(this.cachedNewValues);_[t]=_[t]||{},JSON.stringify($l.getValue((b=this.commonConfig)==null?void 0:b[t],g))===JSON.stringify(m)?($l.setValue(_[t],g,null),Object.keys(_[t]).length||delete _[t]):$l.setValue(_[t],g,m),this.cachedNewValues=_,this.setState({newValues:_,hasChanges:this.isChanged(_)},()=>{this.cachedNewValues=void 0,this.props.onChange&&this.props.onChange(!!this.state.hasChanges)})}}):null,f]})]})]},t)}renderErrorMessage(){return!!this.state.error&&y.jsx(Bx,{title:this.props.t("Error"),text:this.state.error?"Error":"",onClose:()=>this.setState({error:!1})})}getObject(t,e,i){return t[i]?Promise.resolve(t[i]):this.props.socket.getObject(i).then(n=>(e[i]=en.deepClone(n),t[i]=n,n))}saveOneState(t,e,i,n){if(i=i||{},n=n||{},t!=null&&t.length){const a=this.state.maxOids||t.length;this.state.maxOids===null&&this.setState({maxOids:t.length},()=>this.props.onProgress(!0)),this.setState({progress:Math.round((a-t.length)/a*50)});const o=t.shift();this.getObject(i,n,o).then(s=>{var u,h,c;if(!s){window.alert(`Invalid object ${o}`);return}(u=s.common)!=null&&u.custom&&Object.keys(s.common.custom).forEach(f=>{(!s.common.custom[f]||!s.common.custom[f].enabled)&&(s.common.custom[f]=null)});const l=Object.keys(this.state.newValues);for(let f=0;f<l.length;f++){const d=l[f],p=this.combineNewAndOld(d,!0);if(p.enabled===!1)(c=(h=s.common)==null?void 0:h.custom)!=null&&c[d]&&(s.common.custom[d]=null);else if(p.enabled){if(s.common=s.common||{},Array.isArray(p.enabled)&&(!s.common.custom||!s.common.custom[d]||!s.common.custom[d].enabled)){s.common.custom&&s.common.custom[d]&&(s.common.custom[d]=null);continue}if(s.common.custom=s.common.custom||{},!s.common.custom[d]||!s.common.custom[d].enabled){const g=this.getDefaultValues(d,s);s.common.custom[d]=JSON.parse(JSON.stringify(g||{})),Object.keys(s.common.custom[d]).forEach(m=>{m.startsWith("_")&&delete s.common.custom[d][m]})}const v=this.props.objectIDs.length>1;s.common.custom[d].enabled=!0,Object.keys(p).forEach(g=>{if(!g.startsWith("_")){if(Array.isArray(p[g])&&v)return;s.common.custom[d][g]=p[g]}})}}setTimeout(()=>this.saveOneState(t,e,i,n),0)})}else{const a=Object.keys(i);if(!a.length)this.setState({maxOids:0},()=>this.props.onProgress(!1)),e&&e();else{this.setState({progress:Math.round((this.state.maxOids-a.length)/this.state.maxOids*50)+50});const o=a.shift();if(JSON.stringify(i[o].common)!==JSON.stringify(n[o].common)){this.changedIds.includes(o)||this.changedIds.push(o),this.props.socket.setObject(o,i[o]).then(async()=>{delete i[o],delete n[o],this.props.objects[o]=await this.props.socket.getObject(o),setTimeout(()=>this.saveOneState(t,e,i,n),0)});return}delete i[o],delete n[o],setTimeout(()=>this.saveOneState(t,e,i,n),0)}}}renderConfirmationDialog(){return this.state.showConfirmation?y.jsx(mh,{text:this.props.t("The changes will be applied to %s states. Are you sure?",this.props.objectIDs.length.toString()),ok:this.props.t("Yes"),onClose:t=>{t?this.setState({showConfirmation:!1,confirmed:!0},()=>{const e=this.cb;this.cb=void 0,this.onSave(e)}):(this.cb=void 0,this.setState({showConfirmation:!1}))}}):null}onSave=t=>{this.props.objectIDs.length>10&&!this.state.confirmed?(this.cb=t,this.setState({showConfirmation:!0})):this.saveOneState([...this.props.objectIDs],()=>{this.cachedNewValues={},this.commonConfig=this.getCommonConfig(),this.setState({confirmed:!1,hasChanges:void 0,newValues:{}},()=>{this.props.reportChangedIds(this.changedIds),this.props.onChange(!1,!0),t&&setTimeout(()=>t(),100)})})};render(){if(this.customObj===null)return y.jsx("div",{style:{color:"#F55",fontSize:32},children:this.props.t("Object does not exist!")});if(!this.state.loaded)return y.jsx(w.LinearProgress,{});let t=0;return y.jsxs(w.Paper,{style:$t.paper,children:[this.state.maxOids>1&&y.jsx(w.LinearProgress,{color:"secondary",variant:"determinate",value:this.state.progress}),y.jsx("div",{style:$t.scrollDiv,ref:this.scrollDivRef,children:this.state.maxOids===0&&Object.values(this.jsonConfigs).map(e=>e?Object.keys(e.instanceObjs).map(i=>this.renderOneCustom(i,e.instanceObjs[i],this.customObj,t++)):null)}),this.renderErrorMessage(),this.renderConfirmationDialog()]})}}const ew=Gn()(As),{loadShare:rw}=Xx,{initPromise:iw}=Yx,nw=iw.then(r=>rw("date-fns/locale",{customShareInfo:{shareConfig:{singleton:!0,strictVersion:!1,requiredVersion:"*"}}})),aw=await nw.then(r=>r());var we=aw;const Ms={en:we.enUS,fr:we.fr,ru:we.ru,de:we.de,es:we.es,br:we.ptBR,nl:we.nl,it:we.it,pt:we.pt,pl:we.pl,uk:we.uk,"zh-cn":we.zhCN},rt={paper:{height:"100%",maxHeight:"100%",maxWidth:"100%",overflow:"hidden"},tableDiv:r=>({height:`calc(100% - ${parseInt(r.mixins.toolbar.minHeight,10)+8}px)`,overflow:"hidden",width:"100%"}),container:{height:"100%"},table:r=>({minWidth:960,width:"100%","& td:nth-of-type(5)":{overflow:"hidden",whiteSpace:"nowrap"},"& tr:nth-child(even)":{backgroundColor:r.palette.mode==="dark"?"#383838":"#b2b2b2"}}),row:{userSelect:"none",position:"relative","&:hover":{opacity:.7},"& td":{position:"relative"}},updatedRow:{animation:"updated 1s"},rowInterpolated:{opacity:.5},selectHistoryControl:{width:130},selectRelativeTime:{marginLeft:10,width:200},notAliveInstance:{opacity:.5},customRange:r=>({color:r.palette.primary.main}),rowSelected:r=>({backgroundColor:r.palette.secondary.main,color:r.palette.secondary.contrastText,"& td":{color:r.palette.secondary.contrastText,backgroundColor:r.palette.secondary.main}}),rowFocused:r=>({position:"absolute",pointerEvents:"none",top:0,bottom:0,left:0,right:0,m:"3px",border:`1px dotted ${r.palette.action.active}`}),grow:{flexGrow:1},msInput:{width:50,pt:"10px",ml:"5px","& label":{mt:"15px"}},cellAckTrue:r=>({color:r.palette.mode==="dark"?"#66ff7f":"#04a821"}),cellAckFalse:{color:"#FF6666"},toolbarDate:{width:124,mt:"9px","& fieldset":{display:"none"},"& input":{padding:"8px 0 0 0"},"& .MuiInputAdornment-root":{ml:0,mt:"7px"}},toolbarTime:{width:84,mt:"9px","& fieldset":{display:"none"},"& input":{padding:"8px 0 0 0"},"& .MuiInputAdornment-root":{ml:0,mt:"7px"}},toolbarTimeGrid:{position:"relative",marginLeft:8,paddingLeft:8,paddingRight:8,paddingTop:4,paddingBottom:4,border:"1px dotted #AAAAAA",borderRadius:8,display:"flex"},toolbarTimeLabel:{position:"absolute",padding:8,fontSize:"0.8rem",left:2,top:-9},noLoadingProgress:{width:"100%",height:4},colValue:{},colAck:{},colFrom:{},colLastChange:{},colTs:{}};class Ds extends at.Component{adminInstance;supportedFeaturesPromises;unit;timeTimer;readSupportedFeaturesTimeout;rangeValues;rangeRef;subscribes;localStorage;constructor(t){super(t),this.localStorage=window._localStorage||window.localStorage;let e=this.localStorage.getItem("App.relativeRange")||"absolute";const i=parseInt(this.localStorage.getItem("App.absoluteStart"),10)||0,n=parseInt(this.localStorage.getItem("App.absoluteEnd"),10)||0,a=this.localStorage.getItem("App.historySelected")||"",o=parseInt(this.localStorage.getItem("App.historyLastSelected"),10)||null,s=this.localStorage.getItem("App.historyLastSelectedColumn")||null;(!i||!n)&&(!e||e==="absolute")&&(e="30"),i&&n&&(e="absolute");let l;try{l=JSON.parse(a)}catch{l=[]}this.state={start:i,end:n,values:null,relativeRange:e,selected:l,lastSelected:o,lastSelectedColumn:s,historyInstance:"",updateOpened:!1,insertOpened:!1,historyInstances:null,lcVisible:!0,ackVisible:!0,fromVisible:!0,supportedFeatures:[],ampm:!1,edit:{}},this.adminInstance=parseInt(window.location.search.slice(1),10)||0,this.supportedFeaturesPromises={},this.unit=this.props.obj.common&&this.props.obj.common.unit?` ${this.props.obj.common.unit}`:"",this.timeTimer=void 0,this.subscribes=[],this.prepareData().then(()=>this.readHistoryRange()).then(()=>{e!=="absolute"?this.setRelativeInterval(this.state.relativeRange,!0):this.readHistory()})}readSupportedFeatures(t){return t=t||this.state.historyInstance,t?this.supportedFeaturesPromises[t]instanceof Promise?this.supportedFeaturesPromises[t]:(this.supportedFeaturesPromises[t]=new Promise(e=>{this.readSupportedFeaturesTimeout&&clearTimeout(this.readSupportedFeaturesTimeout),this.readSupportedFeaturesTimeout=setTimeout(()=>{this.readSupportedFeaturesTimeout=void 0,e([])},2e3),this.props.socket.sendTo(t,"features",null).then(i=>{this.readSupportedFeaturesTimeout?(clearTimeout(this.readSupportedFeaturesTimeout),this.readSupportedFeaturesTimeout=void 0,e(i?i.supportedFeatures||[]:[])):this.setState({supportedFeatures:i?i.supportedFeatures||[]:[]})})}),this.supportedFeaturesPromises[t]):Promise.resolve([])}async componentDidMount(){await this.props.socket.subscribeState(this.props.obj._id,this.onChange)}componentWillUnmount(){this.timeTimer&&(clearTimeout(this.timeTimer),this.timeTimer=void 0);for(let t=0;t<this.subscribes.length;t++)this.props.socket.unsubscribeState(this.subscribes[t],this.onChange);this.subscribes=[],this.props.socket.unsubscribeState(this.props.obj._id,this.onChange)}onChange=(t,e)=>{if(t===this.props.obj._id&&e&&this.state.values&&(!this.state.values.length||this.state.values[this.state.values.length-1].ts<e.ts)){const i=[...this.state.values,e];this.setState({values:i})}else if(t.startsWith("system.adapter.")&&t.endsWith(".alive")){const i=t.substring(15,t.length-6),n=this.state.historyInstances,a=n.findIndex(o=>o.id===i);if(a!==-1&&n[a].alive!==!!(e!=null&&e.val)){const o=JSON.parse(JSON.stringify(n));o[a].alive=!!(e!=null&&e.val),this.setState({historyInstances:o},()=>{o[a].alive&&this.state.historyInstance===i&&this.readHistoryRange().then(()=>this.readHistory())})}}};async prepareData(){var o;const t=await this.getHistoryInstances(),e=await this.props.socket.getCompactSystemConfig(),i=(o=e==null?void 0:e.common)==null?void 0:o.defaultHistory;let n=this.localStorage.getItem("App.historyInstance")||"";if((!n||!t.find(s=>s.id===n&&s.alive))&&(n=i),!n||!t.find(s=>s.id===n&&s.alive)){const s=t.find(l=>l.alive);s&&(n=s.id)}!n&&t.length&&(n=i);const a=await this.readSupportedFeatures(n);await new Promise(s=>{this.setState({ampm:(e.common.dateFormat||"").includes("/"),historyInstances:t,historyInstance:n,supportedFeatures:a},()=>s())})}getHistoryInstances(){const t=[],e=[];return this.props.customsInstances.forEach(i=>{const n=this.props.objects[`system.adapter.${i}`];if(n&&n.common&&n.common.getHistory){const a={id:i,alive:!1};t.push(a),e.push(`system.adapter.${i}.alive`)}}),e.length?this.props.socket.getForeignStates(e).then(async i=>{Object.keys(i).forEach(n=>{var o;const a=t.find(s=>n.endsWith(`${s.id}.alive`));a&&(a.alive=!!((o=i[n])!=null&&o.val))}),this.subscribes=e;for(let n=0;n<e.length;n++)await this.props.socket.subscribeState(e[n],this.onChange);return t}):Promise.resolve(t)}readHistory(t,e){var i;return t=t||this.state.start,e=e||this.state.end,!this.state.historyInstance||!((i=this.state.historyInstances)!=null&&i.find(n=>n.id===this.state.historyInstance&&n.alive))?null:(this.setState({loading:!0}),this.props.socket.getHistory(this.props.obj._id,{instance:this.state.historyInstance,start:t,end:e,from:!0,ack:!0,q:!0,addId:!1,aggregate:"none",returnNewestEntries:!0}).then(n=>{const a=[],o=this.rangeValues;let s=!1,l=!1,u=!1;if(o&&o.length&&(!n||!n.length||o[0].ts<n[0].ts)&&(a.push(o[0]),a.push({ts:o[0].ts+1,e:!0}),console.log(`add ${new Date(o[0].ts).toISOString()}: ${o[0].val}`),!l&&o[0].ack!==void 0&&(l=!0),!u&&o[0].from&&(u=!0)),n!=null&&n.length)for(let h=0;h<n.length;h++)n[h]&&(!a.length||a[a.length-1].ts<n[h].ts)?(a.push(n[h]),n[h].from&&(n[h].from.startsWith("system.adapter.")?n[h].from=n[h].from.substring(15):n[h].from.startsWith("system.host.")&&(n[h].from=n[h].from.substring(7))),!s&&n[h].lc&&(s=!0),!l&&n[h].ack!==void 0&&(l=!0),!u&&n[h].from&&(u=!0),console.log(`add value ${new Date(n[h].ts).toISOString()}: ${n[h].val}`)):a[a.length-1].ts===n[h].ts&&a[a.length-1].val!==n[h].ts&&console.error("Strange data!");else a.push({noDataForPeriod:!0});a.length||a.push({noData:!0}),this.setState({loading:!1,values:a,lcVisible:s,fromVisible:u,ackVisible:l})}))}readHistoryRange(){var i;const t=new Date,e=new Date(2e3,0,1);return!this.state.historyInstance||!((i=this.state.historyInstances)!=null&&i.find(n=>n.id===this.state.historyInstance&&n.alive))?Promise.resolve():(this.setState({loading:!0}),this.props.socket.getHistory(this.props.obj._id,{instance:this.state.historyInstance,start:e.getTime(),end:t.getTime(),limit:1,from:!1,ack:!1,q:!1,addId:!1,aggregate:"none"}).then(n=>{n.length?((n[0].val===null||n[0].ts===e.getTime())&&n.shift(),n.forEach(a=>a.i=!0),this.rangeValues=n,this.setState({loading:!1})):(this.rangeValues=[],this.setState({loading:!1}))}))}onToggleSelect(t,e,i){let n=[...this.state.selected];const a=n.indexOf(e);if(t.shiftKey&&this.state.lastSelected){let o=-1,s=-1;n=[];for(let l=0;l<this.state.values.length&&!(this.state.values[l].ts===e&&(o=l,s!==o&&n.push(this.state.values[l].ts),o!==-1&&s!==-1)||this.state.values[l].ts===this.state.lastSelected&&(s=l,s!==o&&n.push(this.state.values[l].ts),o!==-1&&s!==-1));l++)(o!==-1||s!==-1)&&n.push(this.state.values[l].ts)}else t.ctrlKey?(a!==-1?n.splice(a,1):n.push(e),n.sort()):n=[e];this.localStorage.setItem("App.historyLastSelected",e.toString()),this.localStorage.setItem("App.historyLastSelectedColumn",i),this.localStorage.setItem("App.historySelected",JSON.stringify(n)),this.setState({selected:n,lastSelected:e,lastSelectedColumn:i})}getTableRows(){const t=[];for(let e=this.state.values.length-1;e>=0;e--){const i=this.state.values[e],n=i.ts;if(i.e)t.push(y.jsxs(w.TableRow,{sx:{...rt.row,...rt.updatedRow,...rt.rowInterpolated},hover:!0,children:[y.jsx(w.TableCell,{}),y.jsx(w.TableCell,{children:"..."}),this.state.ackVisible?y.jsx(w.TableCell,{}):null,this.state.fromVisible?y.jsx(w.TableCell,{}):null,this.state.lcVisible?y.jsx(w.TableCell,{}):null]},n));else if(i.noData||i.noDataForPeriod)t.push(y.jsxs(w.TableRow,{sx:{...rt.row,...rt.updatedRow,...rt.rowNoData},hover:!0,children:[y.jsx(w.TableCell,{}),y.jsx(w.TableCell,{children:i.noData?this.props.t("No data in history"):this.props.t("No data in history for selected period")}),this.state.ackVisible?y.jsx(w.TableCell,{}):null,this.state.fromVisible?y.jsx(w.TableCell,{}):null,this.state.lcVisible?y.jsx(w.TableCell,{}):null]},i.noData?"nodata":""));else{const a=i.i,o=this.state.lastSelected===n;let s=i.val;this.props.isFloatComma&&this.props.obj.common.type==="number"&&s&&(s=s.toString().replace(".",",")),s===null&&(s="null"),s===void 0&&(s="_");const l=this.state.selected.includes(n);t.push(y.jsxs(w.TableRow,{sx:{...rt.row,...rt.updatedRow,...a?rt.rowInterpolated:void 0,...l?rt.rowSelected:void 0},children:[y.jsxs(w.TableCell,{onClick:u=>!a&&this.onToggleSelect(u,n,"ts"),children:[`${Ds.formatTimestamp(i.ts)}`,o&&this.state.lastSelectedColumn==="ts"?y.jsx(w.Box,{component:"div",sx:rt.rowFocused}):""]}),y.jsxs(w.TableCell,{onClick:u=>!a&&this.onToggleSelect(u,n,"val"),children:[s+this.unit,o&&this.state.lastSelectedColumn==="val"?y.jsx(w.Box,{component:"div",sx:rt.rowFocused}):""]}),this.state.ackVisible?y.jsxs(w.TableCell,{onClick:u=>!a&&this.onToggleSelect(u,n,"ack"),sx:i.ack?rt.cellAckTrue:rt.cellAckFalse,children:[i.ack?"true":"false",o&&this.state.lastSelectedColumn==="ack"?y.jsx(w.Box,{component:"div",sx:rt.rowFocused}):""]}):null,this.state.fromVisible?y.jsxs(w.TableCell,{onClick:u=>!a&&this.onToggleSelect(u,n,"from"),children:[i.from||"",o&&this.state.lastSelectedColumn==="from"?y.jsx(w.Box,{component:"div",sx:rt.rowFocused}):""]}):null,this.state.lcVisible?y.jsxs(w.TableCell,{onClick:u=>!a&&this.onToggleSelect(u,n,"lc"),children:[i.lc?`${new Date(i.lc).toLocaleDateString()} ${new Date(i.lc).toLocaleTimeString()}.${(i.ts%1e3).toString().padStart(3,"0")}`:"",o&&this.state.lastSelectedColumn==="lc"?y.jsx(w.Box,{component:"div",sx:rt.rowFocused}):""]}):null]},n.toString()+(i.val||"").toString()))}}return t}shiftTime(){const t=new Date,e=6e4-t.getSeconds()-(1e3-t.getMilliseconds());t.getMilliseconds()&&t.setMilliseconds(1e3),t.getSeconds()&&t.setSeconds(60);const i=t.getTime();let n;const a=this.state.relativeRange;if(a==="day")t.setHours(0),t.setMinutes(0),t.setSeconds(0),n=t.getTime();else if(a==="week"){t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0);const o=t.getDay()||7;o!==1&&t.setHours(-24*(o-1)),n=t.getTime()}else if(a==="2weeks"){t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setDate(t.getDate()-7);const o=t.getDay()||7;o!==1&&t.setHours(-24*(o-1)),n=t.getTime()}else a==="month"?(t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setDate(1),n=t.getTime()):a==="year"?(t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setDate(1),t.setMonth(0),n=t.getTime()):a==="12months"?(t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setFullYear(t.getFullYear()-1),n=t.getTime()):n=i-parseInt(a,10)*6e4;this.setState({start:n,end:i},()=>this.readHistory()),this.timeTimer=setTimeout(()=>{this.timeTimer=void 0,this.shiftTime()},e||6e4)}setRelativeInterval(t,e){if(e||(this.localStorage.setItem("App.relativeRange",t.toString()),this.setState({relativeRange:t})),t==="absolute"){this.timeTimer&&(clearTimeout(this.timeTimer),this.timeTimer=void 0);return}this.localStorage.removeItem("App.absoluteStart"),this.localStorage.removeItem("App.absolute");const i=new Date;if(!this.timeTimer){const o=6e4-i.getSeconds()-(1e3-i.getMilliseconds());this.timeTimer=setTimeout(()=>{this.timeTimer=void 0,this.shiftTime()},o||6e4)}i.getMilliseconds()&&i.setMilliseconds(1e3),i.getSeconds()&&i.setSeconds(60);const n=i.getTime();let a;if(t==="day")i.setHours(0),i.setMinutes(0),i.setSeconds(0),a=i.getTime();else if(t==="week"){i.setHours(0),i.setMinutes(0),i.setSeconds(0);const o=i.getDay()||7;o!==1&&i.setHours(-24*(o-1)),a=i.getTime()}else if(t==="2weeks"){i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setDate(i.getDate()-7);const o=i.getDay()||7;o!==1&&i.setHours(-24*(o-1)),a=i.getTime()}else t==="month"?(i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setDate(1),a=i.getTime()):t==="year"?(i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setDate(1),i.setMonth(0),a=i.getTime()):t==="12months"?(i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setFullYear(i.getFullYear()-1),a=i.getTime()):(t=Number(t),a=n-t*6e4);this.setState({start:a,end:n},()=>this.readHistory())}renderTable(){var t;if(!this.state.historyInstance)return y.jsx("div",{style:{marginTop:20,fontSize:24},children:this.props.t("History instance not selected")});if(!((t=this.state.historyInstances)!=null&&t.find(e=>e.id===this.state.historyInstance&&e.alive)))return y.jsx("div",{style:{marginTop:20,fontSize:24},children:this.props.t("History instance not alive")});if(this.state.values){const e=[200,"auto"],i=[190,100];return this.state.ackVisible&&(e.push(50),i.push(50)),this.state.fromVisible&&(e.push(150),i.push(150)),this.state.lcVisible&&(e.push(200),i.push(190)),y.jsx(w.TableContainer,{style:rt.container,children:y.jsxs(zx,{stickyHeader:!0,sx:rt.table,initialWidths:e,minWidths:i,dblTitle:this.props.t("ra_Double click to reset table layout"),children:[y.jsx(w.TableHead,{children:y.jsxs(w.TableRow,{children:[y.jsx(w.TableCell,{style:rt.colTs,children:this.props.t("Timestamp")}),y.jsx(w.TableCell,{style:rt.colValue,children:this.props.t("Value")}),this.state.ackVisible?y.jsx(w.TableCell,{style:rt.colAck,children:this.props.t("Ack")}):null,this.state.fromVisible?y.jsx(w.TableCell,{style:rt.colFrom,children:this.props.t("From")}):null,this.state.lcVisible?y.jsx(w.TableCell,{style:rt.colLastChange,children:this.props.t("lc")}):null]})}),y.jsx(w.TableBody,{children:this.getTableRows()})]})})}return y.jsx(w.LinearProgress,{})}renderDialogConfirm(){return y.jsxs(w.Dialog,{open:!!this.state.areYouSure,onClose:()=>this.setState({areYouSure:!1}),"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[y.jsx(w.DialogTitle,{id:"alert-dialog-title"}),y.jsxs(w.DialogContent,{children:[y.jsx(w.DialogContentText,{id:"alert-dialog-description",children:this.props.t("Are you sure?")}),y.jsx(w.FormControlLabel,{control:y.jsx(w.Checkbox,{value:this.state.suppressMessage,onChange:()=>this.setState({suppressMessage:!0})}),label:this.props.t("Suppress for 5 minutes")})]}),y.jsxs(w.DialogActions,{children:[y.jsx(w.Button,{variant:"contained",onClick:()=>this.setState({areYouSure:!1,suppressMessage:this.state.suppressMessage&&Date.now()},()=>this.onDelete()),color:"primary",autoFocus:!0,startIcon:y.jsx(H.Delete,{}),children:this.props.t("Delete")}),y.jsx(w.Button,{variant:"contained",onClick:()=>this.setState({areYouSure:!1}),color:"secondary",startIcon:y.jsx(H.Close,{}),children:this.props.t("Cancel")})]})]})}onDelete(){const t=this.state.selected.map(e=>({state:{ts:e},id:this.props.obj._id}));this.props.socket.sendTo(this.state.historyInstance,"delete",t).then(()=>this.readHistory())}onUpdate(){let t=this.state.edit.val;this.props.obj.common&&(this.props.obj.common.type==="number"?typeof t!="number"&&(t=parseFloat(t.toString().replace(",","."))):this.props.obj.common.type==="boolean"&&(t=t==="true"||t==="TRUE"||t===!0||t==="1"||t===1));const e={val:t,ack:this.state.edit.ack,ts:this.state.selected[0],from:`system.adapter.admin.${this.adminInstance}`,q:this.state.edit.q};for(const[i,n]of Object.entries(e))n===void 0&&delete e[i];!this.state.lcVisible&&e.lc&&delete e.lc,this.props.socket.sendTo(this.state.historyInstance,"update",[{id:this.props.obj._id,state:e}]).then(()=>this.readHistory())}onInsert(){let t=this.state.edit.val;this.props.obj.common&&(this.props.obj.common.type==="number"?t=parseFloat(t.toString().replace(",",".")):this.props.obj.common.type==="boolean"&&(t=t==="true"||t==="TRUE"||t===!0||t==="1"||t===1));const e=this.state.edit.date;e.setHours(this.state.edit.time.getHours()),e.setMinutes(this.state.edit.time.getMinutes()),e.setSeconds(this.state.edit.time.getSeconds()),e.setMilliseconds(parseInt(this.state.edit.ms,10));const i={ts:e.getTime(),val:t,ack:this.state.edit.ack,from:`system.adapter.admin.${this.adminInstance}`,q:this.state.edit.q||0};!this.state.lcVisible&&i.lc&&delete i.lc;for(const[n,a]of Object.entries(i))a===void 0&&delete i[n];this.props.socket.sendTo(this.state.historyInstance,"insert",[{id:this.props.obj._id,state:i}]).then(()=>this.readHistory())}updateEdit(t,e){const i=JSON.parse(JSON.stringify(this.state.edit));i.time=new Date(i.time),i.date=new Date(i.date),i[t]=e,this.setState({edit:i})}renderEditDialog(){return y.jsxs(w.Dialog,{open:this.state.updateOpened||this.state.insertOpened,onClose:()=>this.setState({updateOpened:!1,insertOpened:!1}),"aria-labelledby":"edit-dialog-title","aria-describedby":"edit-dialog-description",children:[y.jsx(w.DialogTitle,{id:"edit-dialog-title",children:this.state.updateOpened?this.props.t("Update entry"):this.props.t("Insert entry")}),y.jsx(w.DialogContent,{children:y.jsxs("form",{noValidate:!0,autoComplete:"off",children:[typeof this.state.edit.val=="boolean"?y.jsx(w.FormControlLabel,{control:y.jsx(w.Checkbox,{checked:this.state.edit.val,onChange:t=>this.updateEdit("val",t.target.checked)}),label:this.props.t("Value")}):y.jsx(w.TextField,{variant:"standard",label:this.props.t("Value"),value:this.state.edit.val,onChange:t=>this.updateEdit("val",t.target.value)}),y.jsx("br",{}),y.jsx(w.FormControlLabel,{control:y.jsx(w.Checkbox,{checked:this.state.edit.ack,onChange:t=>this.updateEdit("ack",t.target.checked)}),label:this.props.t("Acknowledged")}),this.state.insertOpened?y.jsx(Zt.LocalizationProvider,{dateAdapter:Cs,adapterLocale:Ms[this.props.lang],children:y.jsxs("div",{style:rt.toolbarTimeGrid,children:[y.jsx("div",{style:rt.toolbarTimeLabel,children:this.props.t("Time")}),y.jsx(Zt.DatePicker,{sx:rt.toolbarDate,value:this.state.edit.date,onChange:t=>this.updateEdit("date",t)}),y.jsx(Zt.TimePicker,{sx:rt.toolbarTime,ampm:this.state.ampm,views:["hours","minutes","seconds"],value:this.state.edit.time,onChange:t=>this.updateEdit("time",t)}),y.jsx(w.TextField,{variant:"standard",sx:rt.msInput,helperText:this.props.t("ms"),type:"number",slotProps:{htmlInput:{max:999,min:0}},value:this.state.edit.ms,onChange:t=>this.updateEdit("ms",t.target.value)})]})}):null]})}),y.jsxs(w.DialogActions,{children:[y.jsx(w.Button,{variant:"contained",disabled:this.state.edit.val==="",onClick:()=>{const t=this.state.updateOpened;this.setState({updateOpened:!1,insertOpened:!1},()=>t?this.onUpdate():this.onInsert())},color:"primary",autoFocus:!0,children:this.state.updateOpened?this.props.t("Update"):this.props.t("Add")}),y.jsx(w.Button,{variant:"contained",onClick:()=>this.setState({updateOpened:!1,insertOpened:!1}),color:"grey",children:this.props.t("Cancel")})]})]})}setStartDate(t){const e=t.getTime();this.timeTimer&&(clearTimeout(this.timeTimer),this.timeTimer=void 0),this.localStorage.setItem("App.relativeRange","absolute"),this.localStorage.setItem("App.absoluteStart",e.toString()),this.localStorage.setItem("App.absoluteEnd",this.state.end.toString()),this.setState({start:e,relativeRange:"absolute"},()=>this.readHistory())}setEndDate(t){const e=t.getTime();this.localStorage.setItem("App.relativeRange","absolute"),this.localStorage.setItem("App.absoluteStart",this.state.start.toString()),this.localStorage.setItem("App.absoluteEnd",e.toString()),this.timeTimer&&(clearTimeout(this.timeTimer),this.timeTimer=void 0),this.setState({end:e,relativeRange:"absolute"},()=>this.readHistory())}renderToolbar(){var t,e;return y.jsxs(w.Toolbar,{children:[y.jsxs(w.FormControl,{variant:"standard",style:rt.selectHistoryControl,children:[y.jsx(w.InputLabel,{children:this.props.t("History instance")}),y.jsx(w.Select,{variant:"standard",value:this.state.historyInstance||"",onChange:i=>{const n=i.target.value;this.localStorage.setItem("App.historyInstance",n),this.readSupportedFeatures(n).then(a=>this.setState({historyInstance:n,supportedFeatures:a},()=>this.readHistory()))},children:(t=this.state.historyInstances)==null?void 0:t.map(i=>y.jsx(w.MenuItem,{value:i.id,style:i.alive?void 0:rt.notAliveInstance,children:i.id},i.id))})]}),y.jsxs(w.FormControl,{variant:"standard",style:rt.selectRelativeTime,children:[y.jsx(w.InputLabel,{children:this.props.t("Relative")}),y.jsxs(w.Select,{variant:"standard",ref:this.rangeRef,value:this.state.relativeRange,onChange:i=>this.setRelativeInterval(i.target.value),children:[y.jsx(w.MenuItem,{value:"absolute",sx:rt.customRange,children:this.props.t("custom range")},"custom"),y.jsx(w.MenuItem,{value:10,children:this.props.t("last 10 minutes")},"1"),y.jsx(w.MenuItem,{value:30,children:this.props.t("last 30 minutes")},"2"),y.jsx(w.MenuItem,{value:60,children:this.props.t("last hour")},"3"),y.jsx(w.MenuItem,{value:"day",children:this.props.t("this day")},"4"),y.jsx(w.MenuItem,{value:1440,children:this.props.t("last 24 hours")},"5"),y.jsx(w.MenuItem,{value:"week",children:this.props.t("this week")},"6"),y.jsx(w.MenuItem,{value:1440*7,children:this.props.t("last week")},"7"),y.jsx(w.MenuItem,{value:"2weeks",children:this.props.t("this 2 weeks")},"8"),y.jsx(w.MenuItem,{value:1440*14,children:this.props.t("last 2 weeks")},"9"),y.jsx(w.MenuItem,{value:"month",children:this.props.t("this month")},"10"),y.jsx(w.MenuItem,{value:720*60,children:this.props.t("last 30 days")},"11"),y.jsx(w.MenuItem,{value:"year",children:this.props.t("this year")},"12"),y.jsx(w.MenuItem,{value:"12months",children:this.props.t("last 12 months")},"13")]})]}),y.jsxs(Zt.LocalizationProvider,{dateAdapter:Cs,adapterLocale:Ms[this.props.lang],children:[y.jsxs("div",{style:rt.toolbarTimeGrid,children:[y.jsx("div",{style:{...rt.toolbarTimeLabel,opacity:this.state.relativeRange!=="absolute"?.5:void 0},children:this.props.t("Start time")}),y.jsx(Zt.DatePicker,{sx:rt.toolbarDate,disabled:this.state.relativeRange!=="absolute",value:new Date(this.state.start),onChange:i=>this.setStartDate(i)}),y.jsx(Zt.TimePicker,{disabled:this.state.relativeRange!=="absolute",sx:rt.toolbarTime,ampm:this.state.ampm,value:new Date(this.state.start),onChange:i=>this.setStartDate(i)})]}),y.jsxs("div",{style:rt.toolbarTimeGrid,children:[y.jsx("div",{style:{...rt.toolbarTimeLabel,opacity:this.state.relativeRange!=="absolute"?.5:void 0},children:this.props.t("End time")}),y.jsx(Zt.DatePicker,{disabled:this.state.relativeRange!=="absolute",sx:rt.toolbarDate,value:new Date(this.state.end),onChange:i=>this.setEndDate(i)}),y.jsx(Zt.TimePicker,{disabled:this.state.relativeRange!=="absolute",sx:rt.toolbarTime,ampm:this.state.ampm,value:new Date(this.state.end),onChange:i=>this.setEndDate(i)})]})]}),y.jsx(w.Box,{component:"div",sx:rt.grow}),(e=this.state.values)!=null&&e.length?y.jsx(w.IconButton,{size:"large",onClick:()=>this.exportData(),title:this.props.t("Save data as csv"),children:y.jsx(Zx,{})}):null,this.state.supportedFeatures.includes("insert")&&this.props.expertMode?y.jsx(w.IconButton,{size:"large",onClick:()=>{const i=new Date,n={ack:this.state.values[this.state.values.length-1].ack,val:this.state.values[this.state.values.length-1].val,date:new Date(i),ms:0,time:new Date(i),q:0};this.setState({edit:n,insertOpened:!0})},children:y.jsx(qx,{})}):null,this.state.supportedFeatures.includes("update")&&this.props.expertMode?y.jsx(w.IconButton,{size:"large",disabled:this.state.selected.length!==1,onClick:()=>{const i=JSON.parse(JSON.stringify(this.state.values.find(a=>a.ts===this.state.lastSelected))),n=new Date(i.ts);i.date=new Date(n),i.time=new Date(n),this.setState({edit:i,updateOpened:!0})},children:y.jsx(H.Edit,{})}):null,this.state.supportedFeatures.includes("delete")&&this.props.expertMode?y.jsx(w.IconButton,{size:"large",disabled:!this.state.selected.length,onClick:()=>{typeof this.state.suppressMessage=="number"&&Date.now()-this.state.suppressMessage<3e5?this.onDelete():this.setState({areYouSure:!0})},children:y.jsx(H.Delete,{})}):null]})}exportData(){let t=window.document.getElementById("export-file");t||(t=document.createElement("a"),t.setAttribute("id","export-file"),t.style.display="none",document.body.appendChild(t));const e=["timestamp;value;acknowledged;from;"];this.state.values.forEach(i=>!i.i&&!i.e&&e.push([Ds.formatTimestamp(i.ts),i.val===null||i.val===void 0?"null":i.val.toString(),i.ack?"true":"false",i.from||""].join(";"))),t.setAttribute("href",`data:text/plain;charset=utf-8,${encodeURIComponent(e.join(`
|
|
2
|
+
`))}`),t.setAttribute("download",`${jt.getObjectName({[this.props.obj._id]:this.props.obj},this.props.obj._id,this.props.lang)}.csv`),t.click(),document.body.removeChild(t)}render(){return this.state.historyInstances?y.jsxs(w.Paper,{style:rt.paper,children:[this.state.loading?y.jsx(w.LinearProgress,{}):y.jsx("div",{style:rt.noLoadingProgress}),this.renderToolbar(),y.jsx(w.Box,{component:"div",sx:rt.tableDiv,children:this.renderTable()}),this.renderDialogConfirm(),this.renderEditDialog()]}):y.jsx(w.LinearProgress,{})}static formatTimestamp(t){return`${new Date(t).toLocaleDateString()} ${new Date(t).toLocaleTimeString()}.${(t%1e3).toString().padStart(3,"0")}`}}const ow=Gn()(Ds);var Zm={};/*! *****************************************************************************
|
|
3
|
+
Copyright (c) Microsoft Corporation.
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
+
***************************************************************************** */var _h=function(r,t){return _h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])},_h(r,t)};function F(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");_h(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var bh=function(){return bh=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++){e=arguments[i];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])}return t},bh.apply(this,arguments)};function sw(r,t){var e={};for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&t.indexOf(i)<0&&(e[i]=r[i]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,i=Object.getOwnPropertySymbols(r);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(r,i[n])&&(e[i[n]]=r[i[n]]);return e}function lw(r,t,e,i){var n=arguments.length,a=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(r,t,e,i);else for(var s=r.length-1;s>=0;s--)(o=r[s])&&(a=(n<3?o(a):n>3?o(t,e,a):o(t,e))||a);return n>3&&a&&Object.defineProperty(t,e,a),a}function uw(r,t){return function(e,i){t(e,i,r)}}function hw(r,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,t)}function cw(r,t,e,i){function n(a){return a instanceof e?a:new e(function(o){o(a)})}return new(e||(e=Promise))(function(a,o){function s(h){try{u(i.next(h))}catch(c){o(c)}}function l(h){try{u(i.throw(h))}catch(c){o(c)}}function u(h){h.done?a(h.value):n(h.value).then(s,l)}u((i=i.apply(r,t||[])).next())})}function fw(r,t){var e={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,n,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(u){return function(h){return l([u,h])}}function l(u){if(i)throw new TypeError("Generator is already executing.");for(;e;)try{if(i=1,n&&(a=u[0]&2?n.return:u[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,u[1])).done)return a;switch(n=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return e.label++,{value:u[1],done:!1};case 5:e.label++,n=u[1],u=[0];continue;case 7:u=e.ops.pop(),e.trys.pop();continue;default:if(a=e.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){e.label=u[1];break}if(u[0]===6&&e.label<a[1]){e.label=a[1],a=u;break}if(a&&e.label<a[2]){e.label=a[2],e.ops.push(u);break}a[2]&&e.ops.pop(),e.trys.pop();continue}u=t.call(r,e)}catch(h){u=[6,h],n=0}finally{i=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var Nc=Object.create?(function(r,t,e,i){i===void 0&&(i=e),Object.defineProperty(r,i,{enumerable:!0,get:function(){return t[e]}})}):(function(r,t,e,i){i===void 0&&(i=e),r[i]=t[e]});function dw(r,t){for(var e in r)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Nc(t,r,e)}function xh(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],i=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function qm(r,t){var e=typeof Symbol=="function"&&r[Symbol.iterator];if(!e)return r;var i=e.call(r),n,a=[],o;try{for(;(t===void 0||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(s){o={error:s}}finally{try{n&&!n.done&&(e=i.return)&&e.call(i)}finally{if(o)throw o.error}}return a}function pw(){for(var r=[],t=0;t<arguments.length;t++)r=r.concat(qm(arguments[t]));return r}function vw(){for(var r=0,t=0,e=arguments.length;t<e;t++)r+=arguments[t].length;for(var i=Array(r),n=0,t=0;t<e;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,n++)i[n]=a[o];return i}function gw(r,t,e){if(e||arguments.length===2)for(var i=0,n=t.length,a;i<n;i++)(a||!(i in t))&&(a||(a=Array.prototype.slice.call(t,0,i)),a[i]=t[i]);return r.concat(a||t)}function Ha(r){return this instanceof Ha?(this.v=r,this):new Ha(r)}function mw(r,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=e.apply(r,t||[]),n,a=[];return n={},o("next"),o("throw"),o("return"),n[Symbol.asyncIterator]=function(){return this},n;function o(f){i[f]&&(n[f]=function(d){return new Promise(function(p,v){a.push([f,d,p,v])>1||s(f,d)})})}function s(f,d){try{l(i[f](d))}catch(p){c(a[0][3],p)}}function l(f){f.value instanceof Ha?Promise.resolve(f.value.v).then(u,h):c(a[0][2],f)}function u(f){s("next",f)}function h(f){s("throw",f)}function c(f,d){f(d),a.shift(),a.length&&s(a[0][0],a[0][1])}}function yw(r){var t,e;return t={},i("next"),i("throw",function(n){throw n}),i("return"),t[Symbol.iterator]=function(){return this},t;function i(n,a){t[n]=r[n]?function(o){return(e=!e)?{value:Ha(r[n](o)),done:n==="return"}:a?a(o):o}:a}}function _w(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=r[Symbol.asyncIterator],e;return t?t.call(r):(r=typeof xh=="function"?xh(r):r[Symbol.iterator](),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(a){e[a]=r[a]&&function(o){return new Promise(function(s,l){o=r[a](o),n(s,l,o.done,o.value)})}}function n(a,o,s,l){Promise.resolve(l).then(function(u){a({value:u,done:s})},o)}}function bw(r,t){return Object.defineProperty?Object.defineProperty(r,"raw",{value:t}):r.raw=t,r}var xw=Object.create?(function(r,t){Object.defineProperty(r,"default",{enumerable:!0,value:t})}):function(r,t){r.default=t};function ww(r){if(r&&r.__esModule)return r;var t={};if(r!=null)for(var e in r)e!=="default"&&Object.prototype.hasOwnProperty.call(r,e)&&Nc(t,r,e);return xw(t,r),t}function Sw(r){return r&&r.__esModule?r:{default:r}}function Cw(r,t,e,i){if(e==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?r!==t||!i:!t.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?i:e==="a"?i.call(r):i?i.value:t.get(r)}function Tw(r,t,e,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?r!==t||!n:!t.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(r,e):n?n.value=e:t.set(r,e),e}const Aw=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return bh},__asyncDelegator:yw,__asyncGenerator:mw,__asyncValues:_w,__await:Ha,__awaiter:cw,__classPrivateFieldGet:Cw,__classPrivateFieldSet:Tw,__createBinding:Nc,__decorate:lw,__exportStar:dw,__extends:F,__generator:fw,__importDefault:Sw,__importStar:ww,__makeTemplateObject:bw,__metadata:hw,__param:uw,__read:qm,__rest:sw,__spread:pw,__spreadArray:gw,__spreadArrays:vw,__values:xh},Symbol.toStringTag,{value:"Module"})),Km=Jx(Aw);var Wr={},Gr={},Jm={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var t=1,e=function(){return"".concat(t++)};r.default=e})(Jm);var tl={},el={},Fc={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var t=function(i){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,a=null;return function(){for(var o=this,s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];clearTimeout(a),a=setTimeout(function(){i.apply(o,l)},n)}};r.default=t})(Fc);var lr={};Object.defineProperty(lr,"__esModule",{value:!0});lr.SizeSensorId=lr.SensorTabIndex=lr.SensorClassName=void 0;var Mw="size-sensor-id";lr.SizeSensorId=Mw;var Dw="size-sensor-object";lr.SensorClassName=Dw;var Iw="-1";lr.SensorTabIndex=Iw;Object.defineProperty(el,"__esModule",{value:!0});el.createSensor=void 0;var Pw=kw(Fc),Yl=lr;function kw(r){return r&&r.__esModule?r:{default:r}}var Rw=function(t,e){var i=void 0,n=[],a=function(){getComputedStyle(t).position==="static"&&(t.style.position="relative");var c=document.createElement("object");return c.onload=function(){c.contentDocument.defaultView.addEventListener("resize",o),o()},c.style.display="block",c.style.position="absolute",c.style.top="0",c.style.left="0",c.style.height="100%",c.style.width="100%",c.style.overflow="hidden",c.style.pointerEvents="none",c.style.zIndex="-1",c.style.opacity="0",c.setAttribute("class",Yl.SensorClassName),c.setAttribute("tabindex",Yl.SensorTabIndex),c.type="text/html",t.appendChild(c),c.data="about:blank",c},o=(0,Pw.default)(function(){n.forEach(function(h){h(t)})}),s=function(c){i||(i=a()),n.indexOf(c)===-1&&n.push(c)},l=function(){i&&i.parentNode&&(i.contentDocument&&i.contentDocument.defaultView.removeEventListener("resize",o),i.parentNode.removeChild(i),t.removeAttribute(Yl.SizeSensorId),i=void 0,n=[],e&&e())},u=function(c){var f=n.indexOf(c);f!==-1&&n.splice(f,1),n.length===0&&i&&l()};return{element:t,bind:s,destroy:l,unbind:u}};el.createSensor=Rw;var rl={};Object.defineProperty(rl,"__esModule",{value:!0});rl.createSensor=void 0;var Lw=lr,Ow=Ew(Fc);function Ew(r){return r&&r.__esModule?r:{default:r}}var jw=function(t,e){var i=void 0,n=[],a=(0,Ow.default)(function(){n.forEach(function(h){h(t)})}),o=function(){var c=new ResizeObserver(a);return c.observe(t),a(),c},s=function(c){i||(i=o()),n.indexOf(c)===-1&&n.push(c)},l=function(){i.disconnect(),n=[],i=void 0,t.removeAttribute(Lw.SizeSensorId),e&&e()},u=function(c){var f=n.indexOf(c);f!==-1&&n.splice(f,1),n.length===0&&i&&l()};return{element:t,bind:s,destroy:l,unbind:u}};rl.createSensor=jw;Object.defineProperty(tl,"__esModule",{value:!0});tl.createSensor=void 0;var Nw=el,Fw=rl,Bw=typeof ResizeObserver<"u"?Fw.createSensor:Nw.createSensor;tl.createSensor=Bw;Object.defineProperty(Gr,"__esModule",{value:!0});Gr.removeSensor=Gr.getSensor=Gr.Sensors=void 0;var zw=Hw(Jm),Vw=tl,wh=lr;function Hw(r){return r&&r.__esModule?r:{default:r}}var In={};Gr.Sensors=In;function Qm(r){r&&In[r]&&delete In[r]}var Ww=function(t){var e=t.getAttribute(wh.SizeSensorId);if(e&&In[e])return In[e];var i=(0,zw.default)();t.setAttribute(wh.SizeSensorId,i);var n=(0,Vw.createSensor)(t,function(){return Qm(i)});return In[i]=n,n};Gr.getSensor=Ww;var Gw=function(t){var e=t.element.getAttribute(wh.SizeSensorId);t.destroy(),Qm(e)};Gr.removeSensor=Gw;Object.defineProperty(Wr,"__esModule",{value:!0});Wr.ver=Wr.clear=Wr.bind=void 0;var Sh=Gr,$w=function(t,e){var i=(0,Sh.getSensor)(t);return i.bind(e),function(){i.unbind(e)}};Wr.bind=$w;var Uw=function(t){var e=(0,Sh.getSensor)(t);(0,Sh.removeSensor)(e)};Wr.clear=Uw;var Yw="1.0.2";Wr.ver=Yw;var il={};Object.defineProperty(il,"__esModule",{value:!0});il.pick=void 0;function Xw(r,t){var e={};return t.forEach(function(i){e[i]=r[i]}),e}il.pick=Xw;var nl={};Object.defineProperty(nl,"__esModule",{value:!0});nl.isFunction=void 0;function Zw(r){return typeof r=="function"}nl.isFunction=Zw;var al={};Object.defineProperty(al,"__esModule",{value:!0});al.isString=void 0;function qw(r){return typeof r=="string"}al.isString=qw;var ol={};Object.defineProperty(ol,"__esModule",{value:!0});ol.isEqual=void 0;var Kw=Km,Jw=(0,Kw.__importDefault)(Vx);ol.isEqual=Jw.default;Object.defineProperty(Zm,"__esModule",{value:!0});var Ch=Km,kd=(0,Ch.__importStar)(at),Rd=Wr,Ld=il,Xl=nl,Qw=al,rn=ol,t1=(function(r){(0,Ch.__extends)(t,r);function t(e){var i=r.call(this,e)||this;return i.echarts=e.echarts,i.ele=null,i.isInitialResize=!0,i}return t.prototype.componentDidMount=function(){this.renderNewEcharts()},t.prototype.componentDidUpdate=function(e){var i=this.props.shouldSetOption;if(!((0,Xl.isFunction)(i)&&!i(e,this.props))){if(!(0,rn.isEqual)(e.theme,this.props.theme)||!(0,rn.isEqual)(e.opts,this.props.opts)||!(0,rn.isEqual)(e.onEvents,this.props.onEvents)){this.dispose(),this.renderNewEcharts();return}var n=["option","notMerge","lazyUpdate","showLoading","loadingOption"];(0,rn.isEqual)((0,Ld.pick)(this.props,n),(0,Ld.pick)(e,n))||this.updateEChartsOption(),(!(0,rn.isEqual)(e.style,this.props.style)||!(0,rn.isEqual)(e.className,this.props.className))&&this.resize()}},t.prototype.componentWillUnmount=function(){this.dispose()},t.prototype.getEchartsInstance=function(){return this.echarts.getInstanceByDom(this.ele)||this.echarts.init(this.ele,this.props.theme,this.props.opts)},t.prototype.dispose=function(){if(this.ele){try{(0,Rd.clear)(this.ele)}catch(e){console.warn(e)}this.echarts.dispose(this.ele)}},t.prototype.renderNewEcharts=function(){var e=this,i=this.props,n=i.onEvents,a=i.onChartReady,o=this.updateEChartsOption();this.bindEvents(o,n||{}),(0,Xl.isFunction)(a)&&a(o),this.ele&&(0,Rd.bind)(this.ele,function(){e.resize()})},t.prototype.bindEvents=function(e,i){function n(o,s){(0,Qw.isString)(o)&&(0,Xl.isFunction)(s)&&e.on(o,function(l){s(l,e)})}for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&n(a,i[a])},t.prototype.updateEChartsOption=function(){var e=this.props,i=e.option,n=e.notMerge,a=n===void 0?!1:n,o=e.lazyUpdate,s=o===void 0?!1:o,l=e.showLoading,u=e.loadingOption,h=u===void 0?null:u,c=this.getEchartsInstance();return c.setOption(i,a,s),l?c.showLoading(h):c.hideLoading(),c},t.prototype.resize=function(){var e=this.getEchartsInstance();if(!this.isInitialResize)try{e.resize()}catch(i){console.warn(i)}this.isInitialResize=!1},t.prototype.render=function(){var e=this,i=this.props,n=i.style,a=i.className,o=a===void 0?"":a,s=(0,Ch.__assign)({height:300},n);return kd.default.createElement("div",{ref:function(l){e.ele=l},style:s,className:"echarts-for-react "+o})},t})(kd.PureComponent),e1=Zm.default=t1,r1=(function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r})(),i1=(function(){function r(){this.browser=new r1,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})(),J=new i1;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(J.wxa=!0,J.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?J.worker=!0:!J.hasGlobalWindow||"Deno"in window?(J.node=!0,J.svgSupported=!0):n1(navigator.userAgent,J);function n1(r,t){var e=t.browser,i=r.match(/Firefox\/([\d.]+)/),n=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),a=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);i&&(e.firefox=!0,e.version=i[1]),n&&(e.ie=!0,e.version=n[1]),a&&(e.edge=!0,e.version=a[1],e.newEdge=+a[1].split(".")[0]>18),o&&(e.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!e.ie&&!e.edge,t.pointerEventsSupported="onpointerdown"in window&&(e.edge||e.ie&&+e.version>=11),t.domSupported=typeof document<"u";var s=document.documentElement.style;t.transform3dSupported=(e.ie&&"transition"in s||e.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||e.ie&&+e.version>=9}var Bc=12,ty="sans-serif",Zr=Bc+"px "+ty,a1=20,o1=100,s1="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function l1(r){var t={};if(typeof JSON>"u")return t;for(var e=0;e<r.length;e++){var i=String.fromCharCode(e+32),n=(r.charCodeAt(e)-a1)/o1;t[i]=n}return t}var u1=l1(s1),qr={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:(function(){var r,t;return function(e,i){if(!r){var n=qr.createCanvas();r=n&&n.getContext("2d")}if(r)return t!==i&&(t=r.font=i||Zr),r.measureText(e);e=e||"",i=i||Zr;var a=/((?:\d+)?\.?\d*)px/.exec(i),o=a&&+a[1]||Bc,s=0;if(i.indexOf("mono")>=0)s=o*e.length;else for(var l=0;l<e.length;l++){var u=u1[e[l]];s+=u==null?o:u*o}return{width:s}}})(),loadImage:function(r,t,e){var i=new Image;return i.onload=t,i.onerror=e,i.src=r,i}};function ey(r){for(var t in qr)r[t]&&(qr[t]=r[t])}var ry=ur(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(r,t){return r["[object "+t+"]"]=!0,r},{}),iy=ur(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(r,t){return r["[object "+t+"Array]"]=!0,r},{}),$n=Object.prototype.toString,sl=Array.prototype,h1=sl.forEach,c1=sl.filter,zc=sl.slice,f1=sl.map,Od=function(){}.constructor,Io=Od?Od.prototype:null,Vc="__proto__",d1=2311;function Hc(){return d1++}function Wc(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];typeof console<"u"&&console.error.apply(console,r)}function it(r){if(r==null||typeof r!="object")return r;var t=r,e=$n.call(r);if(e==="[object Array]"){if(!Pn(r)){t=[];for(var i=0,n=r.length;i<n;i++)t[i]=it(r[i])}}else if(iy[e]){if(!Pn(r)){var a=r.constructor;if(a.from)t=a.from(r);else{t=new a(r.length);for(var i=0,n=r.length;i<n;i++)t[i]=r[i]}}}else if(!ry[e]&&!Pn(r)&&!Vi(r)){t={};for(var o in r)r.hasOwnProperty(o)&&o!==Vc&&(t[o]=it(r[o]))}return t}function st(r,t,e){if(!q(t)||!q(r))return e?it(t):r;for(var i in t)if(t.hasOwnProperty(i)&&i!==Vc){var n=r[i],a=t[i];q(a)&&q(n)&&!W(a)&&!W(n)&&!Vi(a)&&!Vi(n)&&!Th(a)&&!Th(n)&&!Pn(a)&&!Pn(n)?st(n,a,e):(e||!(i in r))&&(r[i]=it(t[i]))}return r}function p1(r,t){for(var e=r[0],i=1,n=r.length;i<n;i++)e=st(e,r[i],t);return e}function N(r,t){if(Object.assign)Object.assign(r,t);else for(var e in t)t.hasOwnProperty(e)&&e!==Vc&&(r[e]=t[e]);return r}function lt(r,t,e){for(var i=vt(t),n=0,a=i.length;n<a;n++){var o=i[n];(e?t[o]!=null:r[o]==null)&&(r[o]=t[o])}return r}var v1=qr.createCanvas;function pt(r,t){if(r){if(r.indexOf)return r.indexOf(t);for(var e=0,i=r.length;e<i;e++)if(r[e]===t)return e}return-1}function Gc(r,t){var e=r.prototype;function i(){}i.prototype=t.prototype,r.prototype=new i;for(var n in e)e.hasOwnProperty(n)&&(r.prototype[n]=e[n]);r.prototype.constructor=r,r.superClass=t}function xe(r,t,e){if(r="prototype"in r?r.prototype:r,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(t),n=0;n<i.length;n++){var a=i[n];a!=="constructor"&&(e?t[a]!=null:r[a]==null)&&(r[a]=t[a])}else lt(r,t,e)}function ae(r){return!r||typeof r=="string"?!1:typeof r.length=="number"}function A(r,t,e){if(r&&t)if(r.forEach&&r.forEach===h1)r.forEach(t,e);else if(r.length===+r.length)for(var i=0,n=r.length;i<n;i++)t.call(e,r[i],i,r);else for(var a in r)r.hasOwnProperty(a)&&t.call(e,r[a],a,r)}function V(r,t,e){if(!r)return[];if(!t)return ul(r);if(r.map&&r.map===f1)return r.map(t,e);for(var i=[],n=0,a=r.length;n<a;n++)i.push(t.call(e,r[n],n,r));return i}function ur(r,t,e,i){if(r&&t){for(var n=0,a=r.length;n<a;n++)e=t.call(i,e,r[n],n,r);return e}}function It(r,t,e){if(!r)return[];if(!t)return ul(r);if(r.filter&&r.filter===c1)return r.filter(t,e);for(var i=[],n=0,a=r.length;n<a;n++)t.call(e,r[n],n,r)&&i.push(r[n]);return i}function g1(r,t,e){if(r&&t){for(var i=0,n=r.length;i<n;i++)if(t.call(e,r[i],i,r))return r[i]}}function vt(r){if(!r)return[];if(Object.keys)return Object.keys(r);var t=[];for(var e in r)r.hasOwnProperty(e)&&t.push(e);return t}function m1(r,t){for(var e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];return function(){return r.apply(t,e.concat(zc.call(arguments)))}}var ct=Io&&tt(Io.bind)?Io.call.bind(Io.bind):m1;function Ct(r){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return function(){return r.apply(this,t.concat(zc.call(arguments)))}}function W(r){return Array.isArray?Array.isArray(r):$n.call(r)==="[object Array]"}function tt(r){return typeof r=="function"}function U(r){return typeof r=="string"}function Is(r){return $n.call(r)==="[object String]"}function At(r){return typeof r=="number"}function q(r){var t=typeof r;return t==="function"||!!r&&t==="object"}function Th(r){return!!ry[$n.call(r)]}function oe(r){return!!iy[$n.call(r)]}function Vi(r){return typeof r=="object"&&typeof r.nodeType=="number"&&typeof r.ownerDocument=="object"}function ll(r){return r.colorStops!=null}function y1(r){return r.image!=null}function _1(r){return $n.call(r)==="[object RegExp]"}function Wa(r){return r!==r}function En(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];for(var e=0,i=r.length;e<i;e++)if(r[e]!=null)return r[e]}function Q(r,t){return r??t}function Ma(r,t,e){return r??t??e}function ul(r){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return zc.apply(r,t)}function $c(r){if(typeof r=="number")return[r,r,r,r];var t=r.length;return t===2?[r[0],r[1],r[0],r[1]]:t===3?[r[0],r[1],r[2],r[1]]:r}function be(r,t){if(!r)throw new Error(t)}function Ge(r){return r==null?null:typeof r.trim=="function"?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var ny="__ec_primitive__";function Ps(r){r[ny]=!0}function Pn(r){return r[ny]}var b1=(function(){function r(){this.data={}}return r.prototype.delete=function(t){var e=this.has(t);return e&&delete this.data[t],e},r.prototype.has=function(t){return this.data.hasOwnProperty(t)},r.prototype.get=function(t){return this.data[t]},r.prototype.set=function(t,e){return this.data[t]=e,this},r.prototype.keys=function(){return vt(this.data)},r.prototype.forEach=function(t){var e=this.data;for(var i in e)e.hasOwnProperty(i)&&t(e[i],i)},r})(),ay=typeof Map=="function";function x1(){return ay?new Map:new b1}var oy=(function(){function r(t){var e=W(t);this.data=x1();var i=this;t instanceof r?t.each(n):t&&A(t,n);function n(a,o){e?i.set(a,o):i.set(o,a)}}return r.prototype.hasKey=function(t){return this.data.has(t)},r.prototype.get=function(t){return this.data.get(t)},r.prototype.set=function(t,e){return this.data.set(t,e),e},r.prototype.each=function(t,e){this.data.forEach(function(i,n){t.call(e,i,n)})},r.prototype.keys=function(){var t=this.data.keys();return ay?Array.from(t):t},r.prototype.removeKey=function(t){this.data.delete(t)},r})();function nt(r){return new oy(r)}function sy(r,t){for(var e=new r.constructor(r.length+t.length),i=0;i<r.length;i++)e[i]=r[i];for(var n=r.length,i=0;i<t.length;i++)e[i+n]=t[i];return e}function fo(r,t){var e;if(Object.create)e=Object.create(r);else{var i=function(){};i.prototype=r,e=new i}return t&&N(e,t),e}function w1(r){var t=r.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function Hi(r,t){return r.hasOwnProperty(t)}function Gt(){}var Da=180/Math.PI;const S1=Object.freeze(Object.defineProperty({__proto__:null,HashMap:oy,RADIAN_TO_DEGREE:Da,assert:be,bind:ct,clone:it,concatArray:sy,createCanvas:v1,createHashMap:nt,createObject:fo,curry:Ct,defaults:lt,disableUserSelect:w1,each:A,eqNaN:Wa,extend:N,filter:It,find:g1,guid:Hc,hasOwn:Hi,indexOf:pt,inherits:Gc,isArray:W,isArrayLike:ae,isBuiltInObject:Th,isDom:Vi,isFunction:tt,isGradientObject:ll,isImagePatternObject:y1,isNumber:At,isObject:q,isPrimitive:Pn,isRegExp:_1,isString:U,isStringSafe:Is,isTypedArray:oe,keys:vt,logError:Wc,map:V,merge:st,mergeAll:p1,mixin:xe,noop:Gt,normalizeCssArray:$c,reduce:ur,retrieve:En,retrieve2:Q,retrieve3:Ma,setAsPrimitive:Ps,slice:ul,trim:Ge},Symbol.toStringTag,{value:"Module"}));function Zi(r,t){return r==null&&(r=0),t==null&&(t=0),[r,t]}function C1(r,t){return r[0]=t[0],r[1]=t[1],r}function ly(r){return[r[0],r[1]]}function T1(r,t,e){return r[0]=t,r[1]=e,r}function Ah(r,t,e){return r[0]=t[0]+e[0],r[1]=t[1]+e[1],r}function A1(r,t,e,i){return r[0]=t[0]+e[0]*i,r[1]=t[1]+e[1]*i,r}function uy(r,t,e){return r[0]=t[0]-e[0],r[1]=t[1]-e[1],r}function Uc(r){return Math.sqrt(Yc(r))}var M1=Uc;function Yc(r){return r[0]*r[0]+r[1]*r[1]}var D1=Yc;function I1(r,t,e){return r[0]=t[0]*e[0],r[1]=t[1]*e[1],r}function P1(r,t,e){return r[0]=t[0]/e[0],r[1]=t[1]/e[1],r}function k1(r,t){return r[0]*t[0]+r[1]*t[1]}function hs(r,t,e){return r[0]=t[0]*e,r[1]=t[1]*e,r}function hy(r,t){var e=Uc(t);return e===0?(r[0]=0,r[1]=0):(r[0]=t[0]/e,r[1]=t[1]/e),r}function ks(r,t){return Math.sqrt((r[0]-t[0])*(r[0]-t[0])+(r[1]-t[1])*(r[1]-t[1]))}var cy=ks;function fy(r,t){return(r[0]-t[0])*(r[0]-t[0])+(r[1]-t[1])*(r[1]-t[1])}var Ei=fy;function R1(r,t){return r[0]=-t[0],r[1]=-t[1],r}function L1(r,t,e,i){return r[0]=t[0]+i*(e[0]-t[0]),r[1]=t[1]+i*(e[1]-t[1]),r}function ie(r,t,e){var i=t[0],n=t[1];return r[0]=e[0]*i+e[2]*n+e[4],r[1]=e[1]*i+e[3]*n+e[5],r}function Nr(r,t,e){return r[0]=Math.min(t[0],e[0]),r[1]=Math.min(t[1],e[1]),r}function Fr(r,t,e){return r[0]=Math.max(t[0],e[0]),r[1]=Math.max(t[1],e[1]),r}const O1=Object.freeze(Object.defineProperty({__proto__:null,add:Ah,applyTransform:ie,clone:ly,copy:C1,create:Zi,dist:cy,distSquare:Ei,distance:ks,distanceSquare:fy,div:P1,dot:k1,len:Uc,lenSquare:Yc,length:M1,lengthSquare:D1,lerp:L1,max:Fr,min:Nr,mul:I1,negate:R1,normalize:hy,scale:hs,scaleAndAdd:A1,set:T1,sub:uy},Symbol.toStringTag,{value:"Module"}));var nn=(function(){function r(t,e){this.target=t,this.topTarget=e&&e.topTarget}return r})(),E1=(function(){function r(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return r.prototype._dragStart=function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent||e.__hostTarget;e&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new nn(e,t),"dragstart",t.event))},r.prototype._drag=function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,a=i-this._x,o=n-this._y;this._x=i,this._y=n,e.drift(a,o,t),this.handler.dispatchToElement(new nn(e,t),"drag",t.event);var s=this.handler.findHover(i,n,e).target,l=this._dropTarget;this._dropTarget=s,e!==s&&(l&&s!==l&&this.handler.dispatchToElement(new nn(l,t),"dragleave",t.event),s&&s!==l&&this.handler.dispatchToElement(new nn(s,t),"dragenter",t.event))}},r.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new nn(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new nn(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},r})(),cr=(function(){function r(t){t&&(this._$eventProcessor=t)}return r.prototype.on=function(t,e,i,n){this._$handlers||(this._$handlers={});var a=this._$handlers;if(typeof e=="function"&&(n=i,i=e,e=null),!i||!t)return this;var o=this._$eventProcessor;e!=null&&o&&o.normalizeQuery&&(e=o.normalizeQuery(e)),a[t]||(a[t]=[]);for(var s=0;s<a[t].length;s++)if(a[t][s].h===i)return this;var l={h:i,query:e,ctx:n||this,callAtLast:i.zrEventfulCallAtLast},u=a[t].length-1,h=a[t][u];return h&&h.callAtLast?a[t].splice(u,0,l):a[t].push(l),this},r.prototype.isSilent=function(t){var e=this._$handlers;return!e||!e[t]||!e[t].length},r.prototype.off=function(t,e){var i=this._$handlers;if(!i)return this;if(!t)return this._$handlers={},this;if(e){if(i[t]){for(var n=[],a=0,o=i[t].length;a<o;a++)i[t][a].h!==e&&n.push(i[t][a]);i[t]=n}i[t]&&i[t].length===0&&delete i[t]}else delete i[t];return this},r.prototype.trigger=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(!this._$handlers)return this;var n=this._$handlers[t],a=this._$eventProcessor;if(n)for(var o=e.length,s=n.length,l=0;l<s;l++){var u=n[l];if(!(a&&a.filter&&u.query!=null&&!a.filter(t,u.query)))switch(o){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,e[0]);break;case 2:u.h.call(u.ctx,e[0],e[1]);break;default:u.h.apply(u.ctx,e);break}}return a&&a.afterTrigger&&a.afterTrigger(t),this},r.prototype.triggerWithContext=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(!this._$handlers)return this;var n=this._$handlers[t],a=this._$eventProcessor;if(n)for(var o=e.length,s=e[o-1],l=n.length,u=0;u<l;u++){var h=n[u];if(!(a&&a.filter&&h.query!=null&&!a.filter(t,h.query)))switch(o){case 0:h.h.call(s);break;case 1:h.h.call(s,e[0]);break;case 2:h.h.call(s,e[0],e[1]);break;default:h.h.apply(s,e.slice(1,o-1));break}}return a&&a.afterTrigger&&a.afterTrigger(t),this},r})(),j1=Math.log(2);function Mh(r,t,e,i,n,a){var o=i+"-"+n,s=r.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var l=Math.round(Math.log((1<<s)-1&~n)/j1);return r[e][l]}for(var u=i|1<<e,h=e+1;i&1<<h;)h++;for(var c=0,f=0,d=0;f<s;f++){var p=1<<f;p&n||(c+=(d%2?-1:1)*r[e][f]*Mh(r,t-1,h,u,n|p,a),d++)}return a[o]=c,c}function Ed(r,t){var e=[[r[0],r[1],1,0,0,0,-t[0]*r[0],-t[0]*r[1]],[0,0,0,r[0],r[1],1,-t[1]*r[0],-t[1]*r[1]],[r[2],r[3],1,0,0,0,-t[2]*r[2],-t[2]*r[3]],[0,0,0,r[2],r[3],1,-t[3]*r[2],-t[3]*r[3]],[r[4],r[5],1,0,0,0,-t[4]*r[4],-t[4]*r[5]],[0,0,0,r[4],r[5],1,-t[5]*r[4],-t[5]*r[5]],[r[6],r[7],1,0,0,0,-t[6]*r[6],-t[6]*r[7]],[0,0,0,r[6],r[7],1,-t[7]*r[6],-t[7]*r[7]]],i={},n=Mh(e,8,0,0,0,i);if(n!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]==null&&(a[s]=0),a[s]+=((o+s)%2?-1:1)*Mh(e,7,o===0?1:0,1<<o,1<<s,i)/n*t[o];return function(l,u,h){var c=u*a[6]+h*a[7]+1;l[0]=(u*a[0]+h*a[1]+a[2])/c,l[1]=(u*a[3]+h*a[4]+a[5])/c}}}var jd="___zrEVENTSAVED",Zl=[];function N1(r,t,e,i,n){return Dh(Zl,t,i,n,!0)&&Dh(r,e,Zl[0],Zl[1])}function Dh(r,t,e,i,n){if(t.getBoundingClientRect&&J.domSupported&&!dy(t)){var a=t[jd]||(t[jd]={}),o=F1(t,a),s=B1(o,a,n);if(s)return s(r,e,i),!0}return!1}function F1(r,t){var e=t.markers;if(e)return e;e=t.markers=[];for(var i=["left","right"],n=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),s=o.style,l=a%2,u=(a>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",n[u]+":0",i[1-l]+":auto",n[1-u]+":auto",""].join("!important;"),r.appendChild(o),e.push(o)}return e}function B1(r,t,e){for(var i=e?"invTrans":"trans",n=t[i],a=t.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var h=r[u].getBoundingClientRect(),c=2*u,f=h.left,d=h.top;o.push(f,d),l=l&&a&&f===a[c]&&d===a[c+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&n?n:(t.srcCoords=o,t[i]=e?Ed(s,o):Ed(o,s))}function dy(r){return r.nodeName.toUpperCase()==="CANVAS"}var z1=/([&<>"'])/g,V1={"&":"&","<":"<",">":">",'"':""","'":"'"};function Kt(r){return r==null?"":(r+"").replace(z1,function(t,e){return V1[e]})}var H1=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ql=[],W1=J.browser.firefox&&+J.browser.version.split(".")[0]<39;function Ih(r,t,e,i){return e=e||{},i?Nd(r,t,e):W1&&t.layerX!=null&&t.layerX!==t.offsetX?(e.zrX=t.layerX,e.zrY=t.layerY):t.offsetX!=null?(e.zrX=t.offsetX,e.zrY=t.offsetY):Nd(r,t,e),e}function Nd(r,t,e){if(J.domSupported&&r.getBoundingClientRect){var i=t.clientX,n=t.clientY;if(dy(r)){var a=r.getBoundingClientRect();e.zrX=i-a.left,e.zrY=n-a.top;return}else if(Dh(ql,r,i,n)){e.zrX=ql[0],e.zrY=ql[1];return}}e.zrX=e.zrY=0}function Xc(r){return r||window.event}function Ae(r,t,e){if(t=Xc(t),t.zrX!=null)return t;var i=t.type,n=i&&i.indexOf("touch")>=0;if(n){var o=i!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&Ih(r,o,t,e)}else{Ih(r,t,t,e);var a=G1(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&H1.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function G1(r){var t=r.wheelDelta;if(t)return t;var e=r.deltaX,i=r.deltaY;if(e==null||i==null)return t;var n=Math.abs(i!==0?i:e),a=i>0?-1:i<0?1:e>0?-1:1;return 3*n*a}function Ph(r,t,e,i){r.addEventListener(t,e,i)}function $1(r,t,e,i){r.removeEventListener(t,e,i)}var py=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0},U1=(function(){function r(){this._track=[]}return r.prototype.recognize=function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(t,e,i){var n=t.touches;if(n){for(var a={points:[],touches:[],target:e,event:t},o=0,s=n.length;o<s;o++){var l=n[o],u=Ih(i,l,{});a.points.push([u.zrX,u.zrY]),a.touches.push(l)}this._track.push(a)}},r.prototype._recognize=function(t){for(var e in Kl)if(Kl.hasOwnProperty(e)){var i=Kl[e](this._track,t);if(i)return i}},r})();function Fd(r){var t=r[1][0]-r[0][0],e=r[1][1]-r[0][1];return Math.sqrt(t*t+e*e)}function Y1(r){return[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2]}var Kl={pinch:function(r,t){var e=r.length;if(e){var i=(r[e-1]||{}).points,n=(r[e-2]||{}).points||i;if(n&&n.length>1&&i&&i.length>1){var a=Fd(i)/Fd(n);!isFinite(a)&&(a=1),t.pinchScale=a;var o=Y1(i);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:r[0].target,event:t}}}}};function br(){return[1,0,0,1,0,0]}function po(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function Zc(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r}function $r(r,t,e){var i=t[0]*e[0]+t[2]*e[1],n=t[1]*e[0]+t[3]*e[1],a=t[0]*e[2]+t[2]*e[3],o=t[1]*e[2]+t[3]*e[3],s=t[0]*e[4]+t[2]*e[5]+t[4],l=t[1]*e[4]+t[3]*e[5]+t[5];return r[0]=i,r[1]=n,r[2]=a,r[3]=o,r[4]=s,r[5]=l,r}function jn(r,t,e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4]+e[0],r[5]=t[5]+e[1],r}function vo(r,t,e,i){i===void 0&&(i=[0,0]);var n=t[0],a=t[2],o=t[4],s=t[1],l=t[3],u=t[5],h=Math.sin(e),c=Math.cos(e);return r[0]=n*c+s*h,r[1]=-n*h+s*c,r[2]=a*c+l*h,r[3]=-a*h+c*l,r[4]=c*(o-i[0])+h*(u-i[1])+i[0],r[5]=c*(u-i[1])-h*(o-i[0])+i[1],r}function vy(r,t,e){var i=e[0],n=e[1];return r[0]=t[0]*i,r[1]=t[1]*n,r[2]=t[2]*i,r[3]=t[3]*n,r[4]=t[4]*i,r[5]=t[5]*n,r}function go(r,t){var e=t[0],i=t[2],n=t[4],a=t[1],o=t[3],s=t[5],l=e*o-a*i;return l?(l=1/l,r[0]=o*l,r[1]=-a*l,r[2]=-i*l,r[3]=e*l,r[4]=(i*s-o*n)*l,r[5]=(a*n-e*s)*l,r):null}function X1(r){var t=br();return Zc(t,r),t}const Z1=Object.freeze(Object.defineProperty({__proto__:null,clone:X1,copy:Zc,create:br,identity:po,invert:go,mul:$r,rotate:vo,scale:vy,translate:jn},Symbol.toStringTag,{value:"Module"}));var wt=(function(){function r(t,e){this.x=t||0,this.y=e||0}return r.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(t,e){return this.x=t,this.y=e,this},r.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},r.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},r.prototype.scale=function(t){this.x*=t,this.y*=t},r.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},r.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},r.prototype.dot=function(t){return this.x*t.x+this.y*t.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 t=this.len();return this.x/=t,this.y/=t,this},r.prototype.distance=function(t){var e=this.x-t.x,i=this.y-t.y;return Math.sqrt(e*e+i*i)},r.prototype.distanceSquare=function(t){var e=this.x-t.x,i=this.y-t.y;return e*e+i*i},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(t){if(t){var e=this.x,i=this.y;return this.x=t[0]*e+t[2]*i+t[4],this.y=t[1]*e+t[3]*i+t[5],this}},r.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},r.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},r.set=function(t,e,i){t.x=e,t.y=i},r.copy=function(t,e){t.x=e.x,t.y=e.y},r.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},r.lenSquare=function(t){return t.x*t.x+t.y*t.y},r.dot=function(t,e){return t.x*e.x+t.y*e.y},r.add=function(t,e,i){t.x=e.x+i.x,t.y=e.y+i.y},r.sub=function(t,e,i){t.x=e.x-i.x,t.y=e.y-i.y},r.scale=function(t,e,i){t.x=e.x*i,t.y=e.y*i},r.scaleAndAdd=function(t,e,i,n){t.x=e.x+i.x*n,t.y=e.y+i.y*n},r.lerp=function(t,e,i,n){var a=1-n;t.x=a*e.x+n*i.x,t.y=a*e.y+n*i.y},r})(),Po=Math.min,ko=Math.max,oi=new wt,si=new wt,li=new wt,ui=new wt,Jn=new wt,Qn=new wt,mt=(function(){function r(t,e,i,n){i<0&&(t=t+i,i=-i),n<0&&(e=e+n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}return r.prototype.union=function(t){var e=Po(t.x,this.x),i=Po(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=ko(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=ko(t.y+t.height,this.y+this.height)-i:this.height=t.height,this.x=e,this.y=i},r.prototype.applyTransform=function(t){r.applyTransform(this,this,t)},r.prototype.calculateTransform=function(t){var e=this,i=t.width/e.width,n=t.height/e.height,a=br();return jn(a,a,[-e.x,-e.y]),vy(a,a,[i,n]),jn(a,a,[t.x,t.y]),a},r.prototype.intersect=function(t,e){if(!t)return!1;t instanceof r||(t=r.create(t));var i=this,n=i.x,a=i.x+i.width,o=i.y,s=i.y+i.height,l=t.x,u=t.x+t.width,h=t.y,c=t.y+t.height,f=!(a<l||u<n||s<h||c<o);if(e){var d=1/0,p=0,v=Math.abs(a-l),g=Math.abs(u-n),m=Math.abs(s-h),_=Math.abs(c-o),b=Math.min(v,g),x=Math.min(m,_);a<l||u<n?b>p&&(p=b,v<g?wt.set(Qn,-v,0):wt.set(Qn,g,0)):b<d&&(d=b,v<g?wt.set(Jn,v,0):wt.set(Jn,-g,0)),s<h||c<o?x>p&&(p=x,m<_?wt.set(Qn,0,-m):wt.set(Qn,0,_)):b<d&&(d=b,m<_?wt.set(Jn,0,m):wt.set(Jn,0,-_))}return e&&wt.copy(e,f?Jn:Qn),f},r.prototype.contain=function(t,e){var i=this;return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(t){r.copy(this,t)},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(t){return new r(t.x,t.y,t.width,t.height)},r.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},r.applyTransform=function(t,e,i){if(!i){t!==e&&r.copy(t,e);return}if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var n=i[0],a=i[3],o=i[4],s=i[5];t.x=e.x*n+o,t.y=e.y*a+s,t.width=e.width*n,t.height=e.height*a,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}oi.x=li.x=e.x,oi.y=ui.y=e.y,si.x=ui.x=e.x+e.width,si.y=li.y=e.y+e.height,oi.transform(i),ui.transform(i),si.transform(i),li.transform(i),t.x=Po(oi.x,si.x,li.x,ui.x),t.y=Po(oi.y,si.y,li.y,ui.y);var l=ko(oi.x,si.x,li.x,ui.x),u=ko(oi.y,si.y,li.y,ui.y);t.width=l-t.x,t.height=u-t.y},r})(),gy="silent";function q1(r,t,e){return{type:r,event:e,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:e.zrX,offsetY:e.zrY,gestureEvent:e.gestureEvent,pinchX:e.pinchX,pinchY:e.pinchY,pinchScale:e.pinchScale,wheelDelta:e.zrDelta,zrByTouch:e.zrByTouch,which:e.which,stop:K1}}function K1(){py(this.event)}var J1=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.handler=null,e}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t})(cr),ta=(function(){function r(t,e){this.x=t,this.y=e}return r})(),Q1=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Jl=new mt(0,0,0,0),my=(function(r){F(t,r);function t(e,i,n,a,o){var s=r.call(this)||this;return s._hovered=new ta(0,0),s.storage=e,s.painter=i,s.painterRoot=a,s._pointerSize=o,n=n||new J1,s.proxy=null,s.setHandlerProxy(n),s._draggingMgr=new E1(s),s}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(A(Q1,function(i){e.on&&e.on(i,this[i],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var i=e.zrX,n=e.zrY,a=yy(this,i,n),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=a?new ta(i,n):this.findHover(i,n),u=l.target,h=this.proxy;h.setCursor&&h.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",e),this.dispatchToElement(l,"mousemove",e),u&&u!==s&&this.dispatchToElement(l,"mouseover",e)},t.prototype.mouseout=function(e){var i=e.zrEventControl;i!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",e),i!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new ta(0,0)},t.prototype.dispatch=function(e,i){var n=this[e];n&&n.call(this,i)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var i=this.proxy;i.setCursor&&i.setCursor(e)},t.prototype.dispatchToElement=function(e,i,n){e=e||{};var a=e.target;if(!(a&&a.silent)){for(var o="on"+i,s=q1(i,e,n);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(i,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(i,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(i,s)}))}},t.prototype.findHover=function(e,i,n){var a=this.storage.getDisplayList(),o=new ta(e,i);if(Bd(a,o,e,i,n),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,h=new mt(e-u,i-u,l,l),c=a.length-1;c>=0;c--){var f=a[c];f!==n&&!f.ignore&&!f.ignoreCoarsePointer&&(!f.parent||!f.parent.ignoreCoarsePointer)&&(Jl.copy(f.getBoundingRect()),f.transform&&Jl.applyTransform(f.transform),Jl.intersect(h)&&s.push(f))}if(s.length)for(var d=4,p=Math.PI/12,v=Math.PI*2,g=0;g<u;g+=d)for(var m=0;m<v;m+=p){var _=e+g*Math.cos(m),b=i+g*Math.sin(m);if(Bd(s,o,_,b,n),o.target)return o}}return o},t.prototype.processGesture=function(e,i){this._gestureMgr||(this._gestureMgr=new U1);var n=this._gestureMgr;i==="start"&&n.clear();var a=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if(i==="end"&&n.clear(),a){var o=a.type;e.gestureEvent=o;var s=new ta;s.target=a.target,this.dispatchToElement(s,o,a.event)}},t})(cr);A(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){my.prototype[r]=function(t){var e=t.zrX,i=t.zrY,n=yy(this,e,i),a,o;if((r!=="mouseup"||!n)&&(a=this.findHover(e,i),o=a.target),r==="mousedown")this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(r==="mouseup")this._upEl=o;else if(r==="click"){if(this._downEl!==this._upEl||!this._downPoint||cy(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,r,t)}});function tS(r,t,e){if(r[r.rectHover?"rectContain":"contain"](t,e)){for(var i=r,n=void 0,a=!1;i;){if(i.ignoreClip&&(a=!0),!a){var o=i.getClipPath();if(o&&!o.contain(t,e))return!1}i.silent&&(n=!0);var s=i.__hostTarget;i=s||i.parent}return n?gy:!0}return!1}function Bd(r,t,e,i,n){for(var a=r.length-1;a>=0;a--){var o=r[a],s=void 0;if(o!==n&&!o.ignore&&(s=tS(o,e,i))&&(!t.topTarget&&(t.topTarget=o),s!==gy)){t.target=o;break}}}function yy(r,t,e){var i=r.painter;return t<0||t>i.getWidth()||e<0||e>i.getHeight()}var _y=32,ea=7;function eS(r){for(var t=0;r>=_y;)t|=r&1,r>>=1;return r+t}function zd(r,t,e,i){var n=t+1;if(n===e)return 1;if(i(r[n++],r[t])<0){for(;n<e&&i(r[n],r[n-1])<0;)n++;rS(r,t,n)}else for(;n<e&&i(r[n],r[n-1])>=0;)n++;return n-t}function rS(r,t,e){for(e--;t<e;){var i=r[t];r[t++]=r[e],r[e--]=i}}function Vd(r,t,e,i,n){for(i===t&&i++;i<e;i++){for(var a=r[i],o=t,s=i,l;o<s;)l=o+s>>>1,n(a,r[l])<0?s=l:o=l+1;var u=i-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]=a}}function Ql(r,t,e,i,n,a){var o=0,s=0,l=1;if(a(r,t[e+n])>0){for(s=i-n;l<s&&a(r,t[e+n+l])>0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}else{for(s=n+1;l<s&&a(r,t[e+n-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=n-l,l=n-u}for(o++;o<l;){var h=o+(l-o>>>1);a(r,t[e+h])>0?o=h+1:l=h}return l}function tu(r,t,e,i,n,a){var o=0,s=0,l=1;if(a(r,t[e+n])<0){for(s=n+1;l<s&&a(r,t[e+n-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=n-l,l=n-u}else{for(s=i-n;l<s&&a(r,t[e+n+l])>=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}for(o++;o<l;){var h=o+(l-o>>>1);a(r,t[e+h])<0?l=h:o=h+1}return l}function iS(r,t){var e=ea,i,n,a=0,o=[];i=[],n=[];function s(d,p){i[a]=d,n[a]=p,a+=1}function l(){for(;a>1;){var d=a-2;if(d>=1&&n[d-1]<=n[d]+n[d+1]||d>=2&&n[d-2]<=n[d]+n[d-1])n[d-1]<n[d+1]&&d--;else if(n[d]>n[d+1])break;h(d)}}function u(){for(;a>1;){var d=a-2;d>0&&n[d-1]<n[d+1]&&d--,h(d)}}function h(d){var p=i[d],v=n[d],g=i[d+1],m=n[d+1];n[d]=v+m,d===a-3&&(i[d+1]=i[d+2],n[d+1]=n[d+2]),a--;var _=tu(r[g],r,p,v,0,t);p+=_,v-=_,v!==0&&(m=Ql(r[p+v-1],r,g,m,m-1,t),m!==0&&(v<=m?c(p,v,g,m):f(p,v,g,m)))}function c(d,p,v,g){var m=0;for(m=0;m<p;m++)o[m]=r[d+m];var _=0,b=v,x=d;if(r[x++]=r[b++],--g===0){for(m=0;m<p;m++)r[x+m]=o[_+m];return}if(p===1){for(m=0;m<g;m++)r[x+m]=r[b+m];r[x+g]=o[_];return}for(var C=e,S,T,M;;){S=0,T=0,M=!1;do if(t(r[b],o[_])<0){if(r[x++]=r[b++],T++,S=0,--g===0){M=!0;break}}else if(r[x++]=o[_++],S++,T=0,--p===1){M=!0;break}while((S|T)<C);if(M)break;do{if(S=tu(r[b],o,_,p,0,t),S!==0){for(m=0;m<S;m++)r[x+m]=o[_+m];if(x+=S,_+=S,p-=S,p<=1){M=!0;break}}if(r[x++]=r[b++],--g===0){M=!0;break}if(T=Ql(o[_],r,b,g,0,t),T!==0){for(m=0;m<T;m++)r[x+m]=r[b+m];if(x+=T,b+=T,g-=T,g===0){M=!0;break}}if(r[x++]=o[_++],--p===1){M=!0;break}C--}while(S>=ea||T>=ea);if(M)break;C<0&&(C=0),C+=2}if(e=C,e<1&&(e=1),p===1){for(m=0;m<g;m++)r[x+m]=r[b+m];r[x+g]=o[_]}else{if(p===0)throw new Error;for(m=0;m<p;m++)r[x+m]=o[_+m]}}function f(d,p,v,g){var m=0;for(m=0;m<g;m++)o[m]=r[v+m];var _=d+p-1,b=g-1,x=v+g-1,C=0,S=0;if(r[x--]=r[_--],--p===0){for(C=x-(g-1),m=0;m<g;m++)r[C+m]=o[m];return}if(g===1){for(x-=p,_-=p,S=x+1,C=_+1,m=p-1;m>=0;m--)r[S+m]=r[C+m];r[x]=o[b];return}for(var T=e;;){var M=0,D=0,I=!1;do if(t(o[b],r[_])<0){if(r[x--]=r[_--],M++,D=0,--p===0){I=!0;break}}else if(r[x--]=o[b--],D++,M=0,--g===1){I=!0;break}while((M|D)<T);if(I)break;do{if(M=p-tu(o[b],r,d,p,p-1,t),M!==0){for(x-=M,_-=M,p-=M,S=x+1,C=_+1,m=M-1;m>=0;m--)r[S+m]=r[C+m];if(p===0){I=!0;break}}if(r[x--]=o[b--],--g===1){I=!0;break}if(D=g-Ql(r[_],o,0,g,g-1,t),D!==0){for(x-=D,b-=D,g-=D,S=x+1,C=b+1,m=0;m<D;m++)r[S+m]=o[C+m];if(g<=1){I=!0;break}}if(r[x--]=r[_--],--p===0){I=!0;break}T--}while(M>=ea||D>=ea);if(I)break;T<0&&(T=0),T+=2}if(e=T,e<1&&(e=1),g===1){for(x-=p,_-=p,S=x+1,C=_+1,m=p-1;m>=0;m--)r[S+m]=r[C+m];r[x]=o[b]}else{if(g===0)throw new Error;for(C=x-(g-1),m=0;m<g;m++)r[C+m]=o[m]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function cs(r,t,e,i){e||(e=0),i||(i=r.length);var n=i-e;if(!(n<2)){var a=0;if(n<_y){a=zd(r,e,i,t),Vd(r,e,i,e+a,t);return}var o=iS(r,t),s=eS(n);do{if(a=zd(r,e,i,t),a<s){var l=n;l>s&&(l=s),Vd(r,e,e+l,e+a,t),a=l}o.pushRun(e,a),o.mergeRuns(),n-=a,e+=a}while(n!==0);o.forceMergeRuns()}}var nr=1,_a=2,bn=4,Hd=!1;function eu(){Hd||(Hd=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Wd(r,t){return r.zlevel===t.zlevel?r.z===t.z?r.z2-t.z2:r.z-t.z:r.zlevel-t.zlevel}var nS=(function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Wd}return r.prototype.traverse=function(t,e){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(t,e)},r.prototype.getDisplayList=function(t,e){e=e||!1;var i=this._displayList;return(t||!i.length)&&this.updateDisplayList(e),i},r.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var e=this._roots,i=this._displayList,n=0,a=e.length;n<a;n++)this._updateAndAddDisplayable(e[n],null,t);i.length=this._displayListLen,cs(i,Wd)},r.prototype._updateAndAddDisplayable=function(t,e,i){if(!(t.ignore&&!i)){t.beforeUpdate(),t.update(),t.afterUpdate();var n=t.getClipPath();if(t.ignoreClip)e=null;else if(n){e?e=e.slice():e=[];for(var a=n,o=t;a;)a.parent=o,a.updateTransform(),e.push(a),o=a,a=a.getClipPath()}if(t.childrenRef){for(var s=t.childrenRef(),l=0;l<s.length;l++){var u=s[l];t.__dirty&&(u.__dirty|=nr),this._updateAndAddDisplayable(u,e,i)}t.__dirty=0}else{var h=t;e&&e.length?h.__clipPaths=e:h.__clipPaths&&h.__clipPaths.length>0&&(h.__clipPaths=[]),isNaN(h.z)&&(eu(),h.z=0),isNaN(h.z2)&&(eu(),h.z2=0),isNaN(h.zlevel)&&(eu(),h.zlevel=0),this._displayList[this._displayListLen++]=h}var c=t.getDecalElement&&t.getDecalElement();c&&this._updateAndAddDisplayable(c,e,i);var f=t.getTextGuideLine();f&&this._updateAndAddDisplayable(f,e,i);var d=t.getTextContent();d&&this._updateAndAddDisplayable(d,e,i)}},r.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},r.prototype.delRoot=function(t){if(t instanceof Array){for(var e=0,i=t.length;e<i;e++)this.delRoot(t[e]);return}var n=pt(this._roots,t);n>=0&&this._roots.splice(n,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})(),kh;kh=J.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var Ia={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 t,e=.1,i=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=i/4):t=i*Math.asin(1/e)/(2*Math.PI),-(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/i)))},elasticOut:function(r){var t,e=.1,i=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=i/4):t=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*r)*Math.sin((r-t)*(2*Math.PI)/i)+1)},elasticInOut:function(r){var t,e=.1,i=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=i/4):t=i*Math.asin(1/e)/(2*Math.PI),(r*=2)<1?-.5*(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/i)):e*Math.pow(2,-10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/i)*.5+1)},backIn:function(r){var t=1.70158;return r*r*((t+1)*r-t)},backOut:function(r){var t=1.70158;return--r*r*((t+1)*r+t)+1},backInOut:function(r){var t=2.5949095;return(r*=2)<1?.5*(r*r*((t+1)*r-t)):.5*((r-=2)*r*((t+1)*r+t)+2)},bounceIn:function(r){return 1-Ia.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?Ia.bounceIn(r*2)*.5:Ia.bounceOut(r*2-1)*.5+.5}},Ro=Math.pow,Ur=Math.sqrt,Rs=1e-8,by=1e-4,Gd=Ur(3),Lo=1/3,ar=Zi(),Ie=Zi(),kn=Zi();function Br(r){return r>-Rs&&r<Rs}function xy(r){return r>Rs||r<-Rs}function Wt(r,t,e,i,n){var a=1-n;return a*a*(a*r+3*n*t)+n*n*(n*i+3*a*e)}function $d(r,t,e,i,n){var a=1-n;return 3*(((t-r)*a+2*(e-t)*n)*a+(i-e)*n*n)}function Ls(r,t,e,i,n,a){var o=i+3*(t-e)-r,s=3*(e-t*2+r),l=3*(t-r),u=r-n,h=s*s-3*o*l,c=s*l-9*o*u,f=l*l-3*s*u,d=0;if(Br(h)&&Br(c))if(Br(s))a[0]=0;else{var p=-l/s;p>=0&&p<=1&&(a[d++]=p)}else{var v=c*c-4*h*f;if(Br(v)){var g=c/h,p=-s/o+g,m=-g/2;p>=0&&p<=1&&(a[d++]=p),m>=0&&m<=1&&(a[d++]=m)}else if(v>0){var _=Ur(v),b=h*s+1.5*o*(-c+_),x=h*s+1.5*o*(-c-_);b<0?b=-Ro(-b,Lo):b=Ro(b,Lo),x<0?x=-Ro(-x,Lo):x=Ro(x,Lo);var p=(-s-(b+x))/(3*o);p>=0&&p<=1&&(a[d++]=p)}else{var C=(2*h*s-3*o*c)/(2*Ur(h*h*h)),S=Math.acos(C)/3,T=Ur(h),M=Math.cos(S),p=(-s-2*T*M)/(3*o),m=(-s+T*(M+Gd*Math.sin(S)))/(3*o),D=(-s+T*(M-Gd*Math.sin(S)))/(3*o);p>=0&&p<=1&&(a[d++]=p),m>=0&&m<=1&&(a[d++]=m),D>=0&&D<=1&&(a[d++]=D)}}return d}function wy(r,t,e,i,n){var a=6*e-12*t+6*r,o=9*t+3*i-3*r-9*e,s=3*t-3*r,l=0;if(Br(o)){if(xy(a)){var u=-s/a;u>=0&&u<=1&&(n[l++]=u)}}else{var h=a*a-4*o*s;if(Br(h))n[0]=-a/(2*o);else if(h>0){var c=Ur(h),u=(-a+c)/(2*o),f=(-a-c)/(2*o);u>=0&&u<=1&&(n[l++]=u),f>=0&&f<=1&&(n[l++]=f)}}return l}function Os(r,t,e,i,n,a){var o=(t-r)*n+r,s=(e-t)*n+t,l=(i-e)*n+e,u=(s-o)*n+o,h=(l-s)*n+s,c=(h-u)*n+u;a[0]=r,a[1]=o,a[2]=u,a[3]=c,a[4]=c,a[5]=h,a[6]=l,a[7]=i}function aS(r,t,e,i,n,a,o,s,l,u,h){var c,f=.005,d=1/0,p,v,g,m;ar[0]=l,ar[1]=u;for(var _=0;_<1;_+=.05)Ie[0]=Wt(r,e,n,o,_),Ie[1]=Wt(t,i,a,s,_),g=Ei(ar,Ie),g<d&&(c=_,d=g);d=1/0;for(var b=0;b<32&&!(f<by);b++)p=c-f,v=c+f,Ie[0]=Wt(r,e,n,o,p),Ie[1]=Wt(t,i,a,s,p),g=Ei(Ie,ar),p>=0&&g<d?(c=p,d=g):(kn[0]=Wt(r,e,n,o,v),kn[1]=Wt(t,i,a,s,v),m=Ei(kn,ar),v<=1&&m<d?(c=v,d=m):f*=.5);return Ur(d)}function oS(r,t,e,i,n,a,o,s,l){for(var u=r,h=t,c=0,f=1/l,d=1;d<=l;d++){var p=d*f,v=Wt(r,e,n,o,p),g=Wt(t,i,a,s,p),m=v-u,_=g-h;c+=Math.sqrt(m*m+_*_),u=v,h=g}return c}function ce(r,t,e,i){var n=1-i;return n*(n*r+2*i*t)+i*i*e}function Ud(r,t,e,i){return 2*((1-i)*(t-r)+i*(e-t))}function sS(r,t,e,i,n){var a=r-2*t+e,o=2*(t-r),s=r-i,l=0;if(Br(a)){if(xy(o)){var u=-s/o;u>=0&&u<=1&&(n[l++]=u)}}else{var h=o*o-4*a*s;if(Br(h)){var u=-o/(2*a);u>=0&&u<=1&&(n[l++]=u)}else if(h>0){var c=Ur(h),u=(-o+c)/(2*a),f=(-o-c)/(2*a);u>=0&&u<=1&&(n[l++]=u),f>=0&&f<=1&&(n[l++]=f)}}return l}function Sy(r,t,e){var i=r+e-2*t;return i===0?.5:(r-t)/i}function Es(r,t,e,i,n){var a=(t-r)*i+r,o=(e-t)*i+t,s=(o-a)*i+a;n[0]=r,n[1]=a,n[2]=s,n[3]=s,n[4]=o,n[5]=e}function lS(r,t,e,i,n,a,o,s,l){var u,h=.005,c=1/0;ar[0]=o,ar[1]=s;for(var f=0;f<1;f+=.05){Ie[0]=ce(r,e,n,f),Ie[1]=ce(t,i,a,f);var d=Ei(ar,Ie);d<c&&(u=f,c=d)}c=1/0;for(var p=0;p<32&&!(h<by);p++){var v=u-h,g=u+h;Ie[0]=ce(r,e,n,v),Ie[1]=ce(t,i,a,v);var d=Ei(Ie,ar);if(v>=0&&d<c)u=v,c=d;else{kn[0]=ce(r,e,n,g),kn[1]=ce(t,i,a,g);var m=Ei(kn,ar);g<=1&&m<c?(u=g,c=m):h*=.5}}return Ur(c)}function uS(r,t,e,i,n,a,o){for(var s=r,l=t,u=0,h=1/o,c=1;c<=o;c++){var f=c*h,d=ce(r,e,n,f),p=ce(t,i,a,f),v=d-s,g=p-l;u+=Math.sqrt(v*v+g*g),s=d,l=p}return u}var hS=/cubic-bezier\(([0-9,\.e ]+)\)/;function qc(r){var t=r&&hS.exec(r);if(t){var e=t[1].split(","),i=+Ge(e[0]),n=+Ge(e[1]),a=+Ge(e[2]),o=+Ge(e[3]);if(isNaN(i+n+a+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:Ls(0,i,a,1,l,s)&&Wt(0,n,o,1,s[0])}}}var cS=(function(){function r(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||Gt,this.ondestroy=t.ondestroy||Gt,this.onrestart=t.onrestart||Gt,t.easing&&this.setEasing(t.easing)}return r.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=e;return}var i=this._life,n=t-this._startTime-this._pausedTime,a=n/i;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=n%i;this._startTime=t-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(t){this.easing=t,this.easingFunc=tt(t)?t:Ia[t]||qc(t)},r})(),Cy=(function(){function r(t){this.value=t}return r})(),fS=(function(){function r(){this._len=0}return r.prototype.insert=function(t){var e=new Cy(t);return this.insertEntry(e),e},r.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},r.prototype.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r})(),mo=(function(){function r(t){this._list=new fS,this._maxSize=10,this._map={},this._maxSize=t}return r.prototype.put=function(t,e){var i=this._list,n=this._map,a=null;if(n[t]==null){var o=i.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=i.head;i.remove(l),delete n[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new Cy(e),s.key=t,i.insertEntry(s),n[t]=s}return a},r.prototype.get=function(t){var e=this._map[t],i=this._list;if(e!=null)return e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r})(),Yd={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 $e(r){return r=Math.round(r),r<0?0:r>255?255:r}function dS(r){return r=Math.round(r),r<0?0:r>360?360:r}function Ga(r){return r<0?0:r>1?1:r}function ru(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?$e(parseFloat(t)/100*255):$e(parseInt(t,10))}function ji(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?Ga(parseFloat(t)/100):Ga(parseFloat(t))}function iu(r,t,e){return e<0?e+=1:e>1&&(e-=1),e*6<1?r+(t-r)*e*6:e*2<1?t:e*3<2?r+(t-r)*(2/3-e)*6:r}function zr(r,t,e){return r+(t-r)*e}function Te(r,t,e,i,n){return r[0]=t,r[1]=e,r[2]=i,r[3]=n,r}function Rh(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r}var Ty=new mo(20),Oo=null;function an(r,t){Oo&&Rh(Oo,t),Oo=Ty.put(r,Oo||t.slice())}function me(r,t){if(r){t=t||[];var e=Ty.get(r);if(e)return Rh(t,e);r=r+"";var i=r.replace(/ /g,"").toLowerCase();if(i in Yd)return Rh(t,Yd[i]),an(r,t),t;var n=i.length;if(i.charAt(0)==="#"){if(n===4||n===5){var a=parseInt(i.slice(1,4),16);if(!(a>=0&&a<=4095)){Te(t,0,0,0,1);return}return Te(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,n===5?parseInt(i.slice(4),16)/15:1),an(r,t),t}else if(n===7||n===9){var a=parseInt(i.slice(1,7),16);if(!(a>=0&&a<=16777215)){Te(t,0,0,0,1);return}return Te(t,(a&16711680)>>16,(a&65280)>>8,a&255,n===9?parseInt(i.slice(7),16)/255:1),an(r,t),t}return}var o=i.indexOf("("),s=i.indexOf(")");if(o!==-1&&s+1===n){var l=i.substr(0,o),u=i.substr(o+1,s-(o+1)).split(","),h=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Te(t,+u[0],+u[1],+u[2],1):Te(t,0,0,0,1);h=ji(u.pop());case"rgb":if(u.length>=3)return Te(t,ru(u[0]),ru(u[1]),ru(u[2]),u.length===3?h:ji(u[3])),an(r,t),t;Te(t,0,0,0,1);return;case"hsla":if(u.length!==4){Te(t,0,0,0,1);return}return u[3]=ji(u[3]),Lh(u,t),an(r,t),t;case"hsl":if(u.length!==3){Te(t,0,0,0,1);return}return Lh(u,t),an(r,t),t;default:return}}Te(t,0,0,0,1)}}function Lh(r,t){var e=(parseFloat(r[0])%360+360)%360/360,i=ji(r[1]),n=ji(r[2]),a=n<=.5?n*(i+1):n+i-n*i,o=n*2-a;return t=t||[],Te(t,$e(iu(o,a,e+1/3)*255),$e(iu(o,a,e)*255),$e(iu(o,a,e-1/3)*255),1),r.length===4&&(t[3]=r[3]),t}function pS(r){if(r){var t=r[0]/255,e=r[1]/255,i=r[2]/255,n=Math.min(t,e,i),a=Math.max(t,e,i),o=a-n,s=(a+n)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+n):u=o/(2-a-n);var h=((a-t)/6+o/2)/o,c=((a-e)/6+o/2)/o,f=((a-i)/6+o/2)/o;t===a?l=f-c:e===a?l=1/3+h-f:i===a&&(l=2/3+c-h),l<0&&(l+=1),l>1&&(l-=1)}var d=[l*360,u,s];return r[3]!=null&&d.push(r[3]),d}}function Oh(r,t){var e=me(r);if(e){for(var i=0;i<3;i++)t<0?e[i]=e[i]*(1-t)|0:e[i]=(255-e[i])*t+e[i]|0,e[i]>255?e[i]=255:e[i]<0&&(e[i]=0);return qi(e,e.length===4?"rgba":"rgb")}}function vS(r){var t=me(r);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function Ay(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){e=e||[];var i=r*(t.length-1),n=Math.floor(i),a=Math.ceil(i),o=t[n],s=t[a],l=i-n;return e[0]=$e(zr(o[0],s[0],l)),e[1]=$e(zr(o[1],s[1],l)),e[2]=$e(zr(o[2],s[2],l)),e[3]=Ga(zr(o[3],s[3],l)),e}}var gS=Ay;function Kc(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){var i=r*(t.length-1),n=Math.floor(i),a=Math.ceil(i),o=me(t[n]),s=me(t[a]),l=i-n,u=qi([$e(zr(o[0],s[0],l)),$e(zr(o[1],s[1],l)),$e(zr(o[2],s[2],l)),Ga(zr(o[3],s[3],l))],"rgba");return e?{color:u,leftIndex:n,rightIndex:a,value:i}:u}}var mS=Kc;function yS(r,t,e,i){var n=me(r);if(r)return n=pS(n),t!=null&&(n[0]=dS(t)),e!=null&&(n[1]=ji(e)),i!=null&&(n[2]=ji(i)),qi(Lh(n),"rgba")}function _S(r,t){var e=me(r);if(e&&t!=null)return e[3]=Ga(t),qi(e,"rgba")}function qi(r,t){if(!(!r||!r.length)){var e=r[0]+","+r[1]+","+r[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(e+=","+r[3]),t+"("+e+")"}}function $a(r,t){var e=me(r);return e?(.299*e[0]+.587*e[1]+.114*e[2])*e[3]/255+(1-e[3])*t:0}function bS(){return qi([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],"rgb")}var Xd=new mo(100);function js(r){if(U(r)){var t=Xd.get(r);return t||(t=Oh(r,-.1),Xd.put(r,t)),t}else if(ll(r)){var e=N({},r);return e.colorStops=V(r.colorStops,function(i){return{offset:i.offset,color:Oh(i.color,-.1)}}),e}return r}const xS=Object.freeze(Object.defineProperty({__proto__:null,fastLerp:Ay,fastMapToColor:gS,lerp:Kc,lift:Oh,liftColor:js,lum:$a,mapToColor:mS,modifyAlpha:_S,modifyHSL:yS,parse:me,random:bS,stringify:qi,toHex:vS},Symbol.toStringTag,{value:"Module"}));var Ns=Math.round;function Ua(r){var t;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var e=me(r);e&&(r="rgb("+e[0]+","+e[1]+","+e[2]+")",t=e[3])}return{color:r,opacity:t??1}}var Zd=1e-4;function Vr(r){return r<Zd&&r>-Zd}function Eo(r){return Ns(r*1e3)/1e3}function Eh(r){return Ns(r*1e4)/1e4}function wS(r){return"matrix("+Eo(r[0])+","+Eo(r[1])+","+Eo(r[2])+","+Eo(r[3])+","+Eh(r[4])+","+Eh(r[5])+")"}var SS={left:"start",right:"end",center:"middle",middle:"middle"};function CS(r,t,e){return e==="top"?r+=t/2:e==="bottom"&&(r-=t/2),r}function TS(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function AS(r){var t=r.style,e=r.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),e[0],e[1]].join(",")}function My(r){return r&&!!r.image}function MS(r){return r&&!!r.svgElement}function Jc(r){return My(r)||MS(r)}function Dy(r){return r.type==="linear"}function Iy(r){return r.type==="radial"}function Py(r){return r&&(r.type==="linear"||r.type==="radial")}function hl(r){return"url(#"+r+")"}function ky(r){var t=r.getGlobalScale(),e=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(e)/Math.log(10)),1)}function Ry(r){var t=r.x||0,e=r.y||0,i=(r.rotation||0)*Da,n=Q(r.scaleX,1),a=Q(r.scaleY,1),o=r.skewX||0,s=r.skewY||0,l=[];return(t||e)&&l.push("translate("+t+"px,"+e+"px)"),i&&l.push("rotate("+i+")"),(n!==1||a!==1)&&l.push("scale("+n+","+a+")"),(o||s)&&l.push("skew("+Ns(o*Da)+"deg, "+Ns(s*Da)+"deg)"),l.join(" ")}var DS=(function(){return J.hasGlobalWindow&&tt(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}})(),jh=Array.prototype.slice;function mr(r,t,e){return(t-r)*e+r}function nu(r,t,e,i){for(var n=t.length,a=0;a<n;a++)r[a]=mr(t[a],e[a],i);return r}function IS(r,t,e,i){for(var n=t.length,a=n&&t[0].length,o=0;o<n;o++){r[o]||(r[o]=[]);for(var s=0;s<a;s++)r[o][s]=mr(t[o][s],e[o][s],i)}return r}function jo(r,t,e,i){for(var n=t.length,a=0;a<n;a++)r[a]=t[a]+e[a]*i;return r}function qd(r,t,e,i){for(var n=t.length,a=n&&t[0].length,o=0;o<n;o++){r[o]||(r[o]=[]);for(var s=0;s<a;s++)r[o][s]=t[o][s]+e[o][s]*i}return r}function PS(r,t){for(var e=r.length,i=t.length,n=e>i?t:r,a=Math.min(e,i),o=n[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(e,i);s++)n.push({offset:o.offset,color:o.color.slice()})}function kS(r,t,e){var i=r,n=t;if(!(!i.push||!n.push)){var a=i.length,o=n.length;if(a!==o){var s=a>o;if(s)i.length=o;else for(var l=a;l<o;l++)i.push(e===1?n[l]:jh.call(n[l]))}for(var u=i[0]&&i[0].length,l=0;l<i.length;l++)if(e===1)isNaN(i[l])&&(i[l]=n[l]);else for(var h=0;h<u;h++)isNaN(i[l][h])&&(i[l][h]=n[l][h])}}function fs(r){if(ae(r)){var t=r.length;if(ae(r[0])){for(var e=[],i=0;i<t;i++)e.push(jh.call(r[i]));return e}return jh.call(r)}return r}function ds(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 RS(r){return ae(r&&r[0])?2:1}var No=0,ps=1,Ly=2,ba=3,Nh=4,Fh=5,Kd=6;function Jd(r){return r===Nh||r===Fh}function Fo(r){return r===ps||r===Ly}var ra=[0,0,0,0],LS=(function(){function r(t){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=t}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(t,e,i){this._needsSort=!0;var n=this.keyframes,a=n.length,o=!1,s=Kd,l=e;if(ae(e)){var u=RS(e);s=u,(u===1&&!At(e[0])||u===2&&!At(e[0][0]))&&(o=!0)}else if(At(e)&&!Wa(e))s=No;else if(U(e))if(!isNaN(+e))s=No;else{var h=me(e);h&&(l=h,s=ba)}else if(ll(e)){var c=N({},l);c.colorStops=V(e.colorStops,function(d){return{offset:d.offset,color:me(d.color)}}),Dy(e)?s=Nh:Iy(e)&&(s=Fh),l=c}a===0?this.valType=s:(s!==this.valType||s===Kd)&&(o=!0),this.discrete=this.discrete||o;var f={time:t,value:l,rawValue:e,percent:0};return i&&(f.easing=i,f.easingFunc=tt(i)?i:Ia[i]||qc(i)),n.push(f),f},r.prototype.prepare=function(t,e){var i=this.keyframes;this._needsSort&&i.sort(function(v,g){return v.time-g.time});for(var n=this.valType,a=i.length,o=i[a-1],s=this.discrete,l=Fo(n),u=Jd(n),h=0;h<a;h++){var c=i[h],f=c.value,d=o.value;c.percent=c.time/t,s||(l&&h!==a-1?kS(f,d,n):u&&PS(f.colorStops,d.colorStops))}if(!s&&n!==Fh&&e&&this.needsAnimate()&&e.needsAnimate()&&n===e.valType&&!e._finished){this._additiveTrack=e;for(var p=i[0].value,h=0;h<a;h++)n===No?i[h].additiveValue=i[h].value-p:n===ba?i[h].additiveValue=jo([],i[h].value,p,-1):Fo(n)&&(i[h].additiveValue=n===ps?jo([],i[h].value,p,-1):qd([],i[h].value,p,-1))}},r.prototype.step=function(t,e){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var i=this._additiveTrack!=null,n=i?"additiveValue":"value",a=this.valType,o=this.keyframes,s=o.length,l=this.propName,u=a===ba,h,c=this._lastFr,f=Math.min,d,p;if(s===1)d=p=o[0];else{if(e<0)h=0;else if(e<this._lastFrP){var v=f(c+1,s-1);for(h=v;h>=0&&!(o[h].percent<=e);h--);h=f(h,s-2)}else{for(h=c;h<s&&!(o[h].percent>e);h++);h=f(h-1,s-2)}p=o[h+1],d=o[h]}if(d&&p){this._lastFr=h,this._lastFrP=e;var g=p.percent-d.percent,m=g===0?1:f((e-d.percent)/g,1);p.easingFunc&&(m=p.easingFunc(m));var _=i?this._additiveValue:u?ra:t[l];if((Fo(a)||u)&&!_&&(_=this._additiveValue=[]),this.discrete)t[l]=m<1?d.rawValue:p.rawValue;else if(Fo(a))a===ps?nu(_,d[n],p[n],m):IS(_,d[n],p[n],m);else if(Jd(a)){var b=d[n],x=p[n],C=a===Nh;t[l]={type:C?"linear":"radial",x:mr(b.x,x.x,m),y:mr(b.y,x.y,m),colorStops:V(b.colorStops,function(T,M){var D=x.colorStops[M];return{offset:mr(T.offset,D.offset,m),color:ds(nu([],T.color,D.color,m))}}),global:x.global},C?(t[l].x2=mr(b.x2,x.x2,m),t[l].y2=mr(b.y2,x.y2,m)):t[l].r=mr(b.r,x.r,m)}else if(u)nu(_,d[n],p[n],m),i||(t[l]=ds(_));else{var S=mr(d[n],p[n],m);i?this._additiveValue=S:t[l]=S}i&&this._addToTarget(t)}}},r.prototype._addToTarget=function(t){var e=this.valType,i=this.propName,n=this._additiveValue;e===No?t[i]=t[i]+n:e===ba?(me(t[i],ra),jo(ra,ra,n,1),t[i]=ds(ra)):e===ps?jo(t[i],t[i],n,1):e===Ly&&qd(t[i],t[i],n,1)},r})(),Qc=(function(){function r(t,e,i,n){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&n){Wc("Can' use additive animation on looped animation.");return}this._additiveAnimators=n,this._allowDiscrete=i}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(t){this._target=t},r.prototype.when=function(t,e,i){return this.whenWithKeys(t,e,vt(e),i)},r.prototype.whenWithKeys=function(t,e,i,n){for(var a=this._tracks,o=0;o<i.length;o++){var s=i[o],l=a[s];if(!l){l=a[s]=new LS(s);var u=void 0,h=this._getAdditiveTrack(s);if(h){var c=h.keyframes,f=c[c.length-1];u=f&&f.value,h.valType===ba&&u&&(u=ds(u))}else u=this._target[s];if(u==null)continue;t>0&&l.addKeyframe(0,fs(u),n),this._trackKeys.push(s)}l.addKeyframe(t,fs(e[s]),n)}return this._maxTime=Math.max(this._maxTime,t),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(t){return this._maxTime=t,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,i=0;i<e;i++)t[i].call(this)},r.prototype._abortedCallback=function(){this._setTracksFinished();var t=this.animation,e=this._abortedCbs;if(t&&t.removeClip(this._clip),this._clip=null,e)for(var i=0;i<e.length;i++)e[i].call(this)},r.prototype._setTracksFinished=function(){for(var t=this._tracks,e=this._trackKeys,i=0;i<e.length;i++)t[e[i]].setFinished()},r.prototype._getAdditiveTrack=function(t){var e,i=this._additiveAnimators;if(i)for(var n=0;n<i.length;n++){var a=i[n].getTrack(t);a&&(e=a)}return e},r.prototype.start=function(t){if(!(this._started>0)){this._started=1;for(var e=this,i=[],n=this._maxTime||0,a=0;a<this._trackKeys.length;a++){var o=this._trackKeys[a],s=this._tracks[o],l=this._getAdditiveTrack(o),u=s.keyframes,h=u.length;if(s.prepare(n,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var c=u[h-1];c&&(e._target[s.propName]=c.rawValue),s.setFinished()}else i.push(s)}if(i.length||this._force){var f=new cS({life:n,loop:this._loop,delay:this._delay||0,onframe:function(d){e._started=2;var p=e._additiveAnimators;if(p){for(var v=!1,g=0;g<p.length;g++)if(p[g]._clip){v=!0;break}v||(e._additiveAnimators=null)}for(var g=0;g<i.length;g++)i[g].step(e._target,d);var m=e._onframeCbs;if(m)for(var g=0;g<m.length;g++)m[g](e._target,d)},ondestroy:function(){e._doneCallback()}});this._clip=f,this.animation&&this.animation.addClip(f),t&&f.setEasing(t)}else this._doneCallback();return this}},r.prototype.stop=function(t){if(this._clip){var e=this._clip;t&&e.onframe(1),this._abortedCallback()}},r.prototype.delay=function(t){return this._delay=t,this},r.prototype.during=function(t){return t&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(t)),this},r.prototype.done=function(t){return t&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(t)),this},r.prototype.aborted=function(t){return t&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(t)),this},r.prototype.getClip=function(){return this._clip},r.prototype.getTrack=function(t){return this._tracks[t]},r.prototype.getTracks=function(){var t=this;return V(this._trackKeys,function(e){return t._tracks[e]})},r.prototype.stopTracks=function(t,e){if(!t.length||!this._clip)return!0;for(var i=this._tracks,n=this._trackKeys,a=0;a<t.length;a++){var o=i[t[a]];o&&!o.isFinished()&&(e?o.step(this._target,1):this._started===1&&o.step(this._target,0),o.setFinished())}for(var s=!0,a=0;a<n.length;a++)if(!i[n[a]].isFinished()){s=!1;break}return s&&this._abortedCallback(),s},r.prototype.saveTo=function(t,e,i){if(t){e=e||this._trackKeys;for(var n=0;n<e.length;n++){var a=e[n],o=this._tracks[a];if(!(!o||o.isFinished())){var s=o.keyframes,l=s[i?0:s.length-1];l&&(t[a]=fs(l.rawValue))}}}},r.prototype.__changeFinalValue=function(t,e){e=e||vt(t);for(var i=0;i<e.length;i++){var n=e[i],a=this._tracks[n];if(a){var o=a.keyframes;if(o.length>1){var s=o.pop();a.addKeyframe(s.time,t[n]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},r})();function Cn(){return new Date().getTime()}var OS=(function(r){F(t,r);function t(e){var i=r.call(this)||this;return i._running=!1,i._time=0,i._pausedTime=0,i._pauseStart=0,i._paused=!1,e=e||{},i.stage=e.stage||{},i}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var i=e.getClip();i&&this.addClip(i)},t.prototype.removeClip=function(e){if(e.animation){var i=e.prev,n=e.next;i?i.next=n:this._head=n,n?n.prev=i:this._tail=i,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var i=e.getClip();i&&this.removeClip(i),e.animation=null},t.prototype.update=function(e){for(var i=Cn()-this._pausedTime,n=i-this._time,a=this._head;a;){var o=a.next,s=a.step(i,n);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=i,e||(this.trigger("frame",n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function i(){e._running&&(kh(i),!e._paused&&e.update())}kh(i)},t.prototype.start=function(){this._running||(this._time=Cn(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=Cn(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=Cn()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var i=e.next;e.prev=e.next=e.animation=null,e=i}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,i){i=i||{},this.start();var n=new Qc(e,i.loop);return this.addAnimator(n),n},t})(cr),ES=300,au=J.domSupported,ou=(function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],e={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},i=V(r,function(n){var a=n.replace("mouse","pointer");return e.hasOwnProperty(a)?a:n});return{mouse:r,touch:t,pointer:i}})(),Qd={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},tp=!1;function Bh(r){var t=r.pointerType;return t==="pen"||t==="touch"}function jS(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 su(r){r&&(r.zrByTouch=!0)}function NS(r,t){return Ae(r.dom,new FS(r,t),!0)}function Oy(r,t){for(var e=t,i=!1;e&&e.nodeType!==9&&!(i=e.domBelongToZr||e!==t&&e===r.painterRoot);)e=e.parentNode;return i}var FS=(function(){function r(t,e){this.stopPropagation=Gt,this.stopImmediatePropagation=Gt,this.preventDefault=Gt,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}return r})(),Ve={mousedown:function(r){r=Ae(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=Ae(this.dom,r);var t=this.__mayPointerCapture;t&&(r.zrX!==t[0]||r.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=Ae(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=Ae(this.dom,r);var t=r.toElement||r.relatedTarget;Oy(this,t)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){tp=!0,r=Ae(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){tp||(r=Ae(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=Ae(this.dom,r),su(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),Ve.mousemove.call(this,r),Ve.mousedown.call(this,r)},touchmove:function(r){r=Ae(this.dom,r),su(r),this.handler.processGesture(r,"change"),Ve.mousemove.call(this,r)},touchend:function(r){r=Ae(this.dom,r),su(r),this.handler.processGesture(r,"end"),Ve.mouseup.call(this,r),+new Date-+this.__lastTouchMoment<ES&&Ve.click.call(this,r)},pointerdown:function(r){Ve.mousedown.call(this,r)},pointermove:function(r){Bh(r)||Ve.mousemove.call(this,r)},pointerup:function(r){Ve.mouseup.call(this,r)},pointerout:function(r){Bh(r)||Ve.mouseout.call(this,r)}};A(["click","dblclick","contextmenu"],function(r){Ve[r]=function(t){t=Ae(this.dom,t),this.trigger(r,t)}});var zh={pointermove:function(r){Bh(r)||zh.mousemove.call(this,r)},pointerup:function(r){zh.mouseup.call(this,r)},mousemove:function(r){this.trigger("mousemove",r)},mouseup:function(r){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",r),t&&(r.zrEventControl="only_globalout",this.trigger("mouseout",r))}};function BS(r,t){var e=t.domHandlers;J.pointerEventsSupported?A(ou.pointer,function(i){vs(t,i,function(n){e[i].call(r,n)})}):(J.touchEventsSupported&&A(ou.touch,function(i){vs(t,i,function(n){e[i].call(r,n),jS(t)})}),A(ou.mouse,function(i){vs(t,i,function(n){n=Xc(n),t.touching||e[i].call(r,n)})}))}function zS(r,t){J.pointerEventsSupported?A(Qd.pointer,e):J.touchEventsSupported||A(Qd.mouse,e);function e(i){function n(a){a=Xc(a),Oy(r,a.target)||(a=NS(r,a),t.domHandlers[i].call(r,a))}vs(t,i,n,{capture:!0})}}function vs(r,t,e,i){r.mounted[t]=e,r.listenerOpts[t]=i,Ph(r.domTarget,t,e,i)}function lu(r){var t=r.mounted;for(var e in t)t.hasOwnProperty(e)&&$1(r.domTarget,e,t[e],r.listenerOpts[e]);r.mounted={}}var ep=(function(){function r(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e}return r})(),VS=(function(r){F(t,r);function t(e,i){var n=r.call(this)||this;return n.__pointerCapturing=!1,n.dom=e,n.painterRoot=i,n._localHandlerScope=new ep(e,Ve),au&&(n._globalHandlerScope=new ep(document,zh)),BS(n,n._localHandlerScope),n}return t.prototype.dispose=function(){lu(this._localHandlerScope),au&&lu(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,au&&+this.__pointerCapturing^+e){this.__pointerCapturing=e;var i=this._globalHandlerScope;e?zS(this,i):lu(i)}},t})(cr),Ey=1;J.hasGlobalWindow&&(Ey=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var rp=Ey,Vh=.4,Hh="#333",Wh="#ccc",HS="#eee",ip=po,np=5e-5;function hi(r){return r>np||r<-np}var ci=[],on=[],uu=br(),hu=Math.abs,tf=(function(){function r(){}return r.prototype.getLocalTransform=function(t){return r.getLocalTransform(this,t)},r.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},r.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},r.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},r.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},r.prototype.needLocalTransform=function(){return hi(this.rotation)||hi(this.x)||hi(this.y)||hi(this.scaleX-1)||hi(this.scaleY-1)||hi(this.skewX)||hi(this.skewY)},r.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),i=this.transform;if(!(e||t)){i&&(ip(i),this.invTransform=null);return}i=i||br(),e?this.getLocalTransform(i):ip(i),t&&(e?$r(i,t,i):Zc(i,t)),this.transform=i,this._resolveGlobalScaleRatio(i)},r.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(e!=null&&e!==1){this.getGlobalScale(ci);var i=ci[0]<0?-1:1,n=ci[1]<0?-1:1,a=((ci[0]-i)*e+i)/ci[0]||0,o=((ci[1]-n)*e+n)/ci[1]||0;t[0]*=a,t[1]*=a,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||br(),go(this.invTransform,t)},r.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},r.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],n=Math.atan2(t[1],t[0]),a=Math.PI/2+n-Math.atan2(t[3],t[2]);i=Math.sqrt(i)*Math.cos(a),e=Math.sqrt(e),this.skewX=a,this.skewY=0,this.rotation=-n,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=i,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||br(),$r(on,t.invTransform,e),e=on);var i=this.originX,n=this.originY;(i||n)&&(uu[4]=i,uu[5]=n,$r(on,e,uu),on[4]-=i,on[5]-=n,e=on),this.setLocalTransform(e)}},r.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},r.prototype.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&ie(i,i,n),i},r.prototype.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&ie(i,i,n),i},r.prototype.getLineScale=function(){var t=this.transform;return t&&hu(t[0]-1)>1e-10&&hu(t[3]-1)>1e-10?Math.sqrt(hu(t[0]*t[3]-t[2]*t[1])):1},r.prototype.copyTransform=function(t){jy(this,t)},r.getLocalTransform=function(t,e){e=e||[];var i=t.originX||0,n=t.originY||0,a=t.scaleX,o=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,h=t.x,c=t.y,f=t.skewX?Math.tan(t.skewX):0,d=t.skewY?Math.tan(-t.skewY):0;if(i||n||s||l){var p=i+s,v=n+l;e[4]=-p*a-f*v*o,e[5]=-v*o-d*p*a}else e[4]=e[5]=0;return e[0]=a,e[3]=o,e[1]=d*a,e[2]=f*o,u&&vo(e,e,u),e[4]+=i+h,e[5]+=n+c,e},r.initDefaultProps=(function(){var t=r.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),r})(),Ya=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function jy(r,t){for(var e=0;e<Ya.length;e++){var i=Ya[e];r[i]=t[i]}}var ap={};function ye(r,t){t=t||Zr;var e=ap[t];e||(e=ap[t]=new mo(500));var i=e.get(r);return i==null&&(i=qr.measureText(r,t).width,e.put(r,i)),i}function op(r,t,e,i){var n=ye(r,t),a=fl(t),o=xa(0,n,e),s=xn(0,a,i),l=new mt(o,s,n,a);return l}function cl(r,t,e,i){var n=((r||"")+"").split(`
|
|
16
|
+
`),a=n.length;if(a===1)return op(n[0],t,e,i);for(var o=new mt(0,0,0,0),s=0;s<n.length;s++){var l=op(n[s],t,e,i);s===0?o.copy(l):o.union(l)}return o}function xa(r,t,e){return e==="right"?r-=t:e==="center"&&(r-=t/2),r}function xn(r,t,e){return e==="middle"?r-=t/2:e==="bottom"&&(r-=t),r}function fl(r){return ye("国",r)}function Kr(r,t){return typeof r=="string"?r.lastIndexOf("%")>=0?parseFloat(r)/100*t:parseFloat(r):r}function Ny(r,t,e){var i=t.position||"inside",n=t.distance!=null?t.distance:5,a=e.height,o=e.width,s=a/2,l=e.x,u=e.y,h="left",c="top";if(i instanceof Array)l+=Kr(i[0],e.width),u+=Kr(i[1],e.height),h=null,c=null;else switch(i){case"left":l-=n,u+=s,h="right",c="middle";break;case"right":l+=n+o,u+=s,c="middle";break;case"top":l+=o/2,u-=n,h="center",c="bottom";break;case"bottom":l+=o/2,u+=a+n,h="center";break;case"inside":l+=o/2,u+=s,h="center",c="middle";break;case"insideLeft":l+=n,u+=s,c="middle";break;case"insideRight":l+=o-n,u+=s,h="right",c="middle";break;case"insideTop":l+=o/2,u+=n,h="center";break;case"insideBottom":l+=o/2,u+=a-n,h="center",c="bottom";break;case"insideTopLeft":l+=n,u+=n;break;case"insideTopRight":l+=o-n,u+=n,h="right";break;case"insideBottomLeft":l+=n,u+=a-n,c="bottom";break;case"insideBottomRight":l+=o-n,u+=a-n,h="right",c="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=h,r.verticalAlign=c,r}var cu="__zr_normal__",fu=Ya.concat(["ignore"]),WS=ur(Ya,function(r,t){return r[t]=!0,r},{ignore:!1}),sn={},GS=new mt(0,0,0,0),dl=(function(){function r(t){this.id=Hc(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return r.prototype._init=function(t){this.attr(t)},r.prototype.drift=function(t,e,i){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0;break}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=t,n[5]+=e,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(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var i=this.textConfig,n=i.local,a=e.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=n?this:null;var u=!1;if(a.copyTransform(e),i.position!=null){var h=GS;i.layoutRect?h.copy(i.layoutRect):h.copy(this.getBoundingRect()),n||h.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(sn,i,h):Ny(sn,i,h),a.x=sn.x,a.y=sn.y,o=sn.align,s=sn.verticalAlign;var c=i.origin;if(c&&i.rotation!=null){var f=void 0,d=void 0;c==="center"?(f=h.width*.5,d=h.height*.5):(f=Kr(c[0],h.width),d=Kr(c[1],h.height)),u=!0,a.originX=-a.x+f+(n?0:h.x),a.originY=-a.y+d+(n?0:h.y)}}i.rotation!=null&&(a.rotation=i.rotation);var p=i.offset;p&&(a.x+=p[0],a.y+=p[1],u||(a.originX=-p[0],a.originY=-p[1]));var v=i.inside==null?typeof i.position=="string"&&i.position.indexOf("inside")>=0:i.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),m=void 0,_=void 0,b=void 0;v&&this.canBeInsideText()?(m=i.insideFill,_=i.insideStroke,(m==null||m==="auto")&&(m=this.getInsideTextFill()),(_==null||_==="auto")&&(_=this.getInsideTextStroke(m),b=!0)):(m=i.outsideFill,_=i.outsideStroke,(m==null||m==="auto")&&(m=this.getOutsideFill()),(_==null||_==="auto")&&(_=this.getOutsideStroke(m),b=!0)),m=m||"#000",(m!==g.fill||_!==g.stroke||b!==g.autoStroke||o!==g.align||s!==g.verticalAlign)&&(l=!0,g.fill=m,g.stroke=_,g.autoStroke=b,g.align=o,g.verticalAlign=s,e.setDefaultTextStyle(g)),e.__dirty|=nr,l&&e.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(t){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Wh:Hh},r.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),i=typeof e=="string"&&me(e);i||(i=[255,255,255,1]);for(var n=i[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)i[o]=i[o]*n+(a?0:255)*(1-n);return i[3]=1,qi(i,"rgba")},r.prototype.traverse=function(t,e){},r.prototype.attrKV=function(t,e){t==="textConfig"?this.setTextConfig(e):t==="textContent"?this.setTextContent(e):t==="clipPath"?this.setClipPath(e):t==="extra"?(this.extra=this.extra||{},N(this.extra,e)):this[t]=e},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(t,e){if(typeof t=="string")this.attrKV(t,e);else if(q(t))for(var i=t,n=vt(i),a=0;a<n.length;a++){var o=n[a];this.attrKV(o,t[o])}return this.markRedraw(),this},r.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var e=this._normalState,i=0;i<this.animators.length;i++){var n=this.animators[i],a=n.__fromStateTransition;if(!(n.getLoop()||a&&a!==cu)){var o=n.targetName,s=o?e[o]:e;n.saveTo(s)}}},r.prototype._innerSaveToNormal=function(t){var e=this._normalState;e||(e=this._normalState={}),t.textConfig&&!e.textConfig&&(e.textConfig=this.textConfig),this._savePrimaryToNormal(t,e,fu)},r.prototype._savePrimaryToNormal=function(t,e,i){for(var n=0;n<i.length;n++){var a=i[n];t[a]!=null&&!(a in e)&&(e[a]=this[a])}},r.prototype.hasState=function(){return this.currentStates.length>0},r.prototype.getState=function(t){return this.states[t]},r.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},r.prototype.clearStates=function(t){this.useState(cu,!1,t)},r.prototype.useState=function(t,e,i,n){var a=t===cu,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(pt(s,t)>=0&&(e||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(t)),u||(u=this.states&&this.states[t]),!u&&!a){Wc("State "+t+" not exists.");return}a||this.saveCurrentToNormalState(u);var h=!!(u&&u.hoverLayer||n);h&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,u,this._normalState,e,!i&&!this.__inHover&&l&&l.duration>0,l);var c=this._textContent,f=this._textGuide;return c&&c.useState(t,e,i,h),f&&f.useState(t,e,i,h),a?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~nr),u}}},r.prototype.useStates=function(t,e,i){if(!t.length)this.clearStates();else{var n=[],a=this.currentStates,o=t.length,s=o===a.length;if(s){for(var l=0;l<o;l++)if(t[l]!==a[l]){s=!1;break}}if(s)return;for(var l=0;l<o;l++){var u=t[l],h=void 0;this.stateProxy&&(h=this.stateProxy(u,t)),h||(h=this.states[u]),h&&n.push(h)}var c=n[o-1],f=!!(c&&c.hoverLayer||i);f&&this._toggleHoverLayerFlag(!0);var d=this._mergeStates(n),p=this.stateTransition;this.saveCurrentToNormalState(d),this._applyStateObj(t.join(","),d,this._normalState,!1,!e&&!this.__inHover&&p&&p.duration>0,p);var v=this._textContent,g=this._textGuide;v&&v.useStates(t,e,f),g&&g.useStates(t,e,f),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~nr)}},r.prototype.isSilent=function(){for(var t=this.silent,e=this.parent;!t&&e;){if(e.silent){t=!0;break}e=e.parent}return t},r.prototype._updateAnimationTargets=function(){for(var t=0;t<this.animators.length;t++){var e=this.animators[t];e.targetName&&e.changeTarget(this[e.targetName])}},r.prototype.removeState=function(t){var e=pt(this.currentStates,t);if(e>=0){var i=this.currentStates.slice();i.splice(e,1),this.useStates(i)}},r.prototype.replaceState=function(t,e,i){var n=this.currentStates.slice(),a=pt(n,t),o=pt(n,e)>=0;a>=0?o?n.splice(a,1):n[a]=e:i&&!o&&n.push(e),this.useStates(n)},r.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},r.prototype._mergeStates=function(t){for(var e={},i,n=0;n<t.length;n++){var a=t[n];N(e,a),a.textConfig&&(i=i||{},N(i,a.textConfig))}return i&&(e.textConfig=i),e},r.prototype._applyStateObj=function(t,e,i,n,a,o){var s=!(e&&n);e&&e.textConfig?(this.textConfig=N({},n?this.textConfig:i.textConfig),N(this.textConfig,e.textConfig)):s&&i.textConfig&&(this.textConfig=i.textConfig);for(var l={},u=!1,h=0;h<fu.length;h++){var c=fu[h],f=a&&WS[c];e&&e[c]!=null?f?(u=!0,l[c]=e[c]):this[c]=e[c]:s&&i[c]!=null&&(f?(u=!0,l[c]=i[c]):this[c]=i[c])}if(!a)for(var h=0;h<this.animators.length;h++){var d=this.animators[h],p=d.targetName;d.getLoop()||d.__changeFinalValue(p?(e||i)[p]:e||i)}u&&this._transitionState(t,l,o)},r.prototype._attachComponent=function(t){if(!(t.__zr&&!t.__hostTarget)&&t!==this){var e=this.__zr;e&&t.addSelfToZr(e),t.__zr=e,t.__hostTarget=this}},r.prototype._detachComponent=function(t){t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__hostTarget=null},r.prototype.getClipPath=function(){return this._clipPath},r.prototype.setClipPath=function(t){this._clipPath&&this._clipPath!==t&&this.removeClipPath(),this._attachComponent(t),this._clipPath=t,this.markRedraw()},r.prototype.removeClipPath=function(){var t=this._clipPath;t&&(this._detachComponent(t),this._clipPath=null,this.markRedraw())},r.prototype.getTextContent=function(){return this._textContent},r.prototype.setTextContent=function(t){var e=this._textContent;e!==t&&(e&&e!==t&&this.removeTextContent(),t.innerTransformable=new tf,this._attachComponent(t),this._textContent=t,this.markRedraw())},r.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),N(this.textConfig,t),this.markRedraw()},r.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},r.prototype.removeTextContent=function(){var t=this._textContent;t&&(t.innerTransformable=null,this._detachComponent(t),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},r.prototype.getTextGuideLine=function(){return this._textGuide},r.prototype.setTextGuideLine=function(t){this._textGuide&&this._textGuide!==t&&this.removeTextGuideLine(),this._attachComponent(t),this._textGuide=t,this.markRedraw()},r.prototype.removeTextGuideLine=function(){var t=this._textGuide;t&&(this._detachComponent(t),this._textGuide=null,this.markRedraw())},r.prototype.markRedraw=function(){this.__dirty|=nr;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},r.prototype.dirty=function(){this.markRedraw()},r.prototype._toggleHoverLayerFlag=function(t){this.__inHover=t;var e=this._textContent,i=this._textGuide;e&&(e.__inHover=t),i&&(i.__inHover=t)},r.prototype.addSelfToZr=function(t){if(this.__zr!==t){this.__zr=t;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.addAnimator(e[i]);this._clipPath&&this._clipPath.addSelfToZr(t),this._textContent&&this._textContent.addSelfToZr(t),this._textGuide&&this._textGuide.addSelfToZr(t)}},r.prototype.removeSelfFromZr=function(t){if(this.__zr){this.__zr=null;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.removeAnimator(e[i]);this._clipPath&&this._clipPath.removeSelfFromZr(t),this._textContent&&this._textContent.removeSelfFromZr(t),this._textGuide&&this._textGuide.removeSelfFromZr(t)}},r.prototype.animate=function(t,e,i){var n=t?this[t]:this,a=new Qc(n,e,i);return t&&(a.targetName=t),this.addAnimator(a,t),a},r.prototype.addAnimator=function(t,e){var i=this.__zr,n=this;t.during(function(){n.updateDuringAnimation(e)}).done(function(){var a=n.animators,o=pt(a,t);o>=0&&a.splice(o,1)}),this.animators.push(t),i&&i.animation.addAnimator(t),i&&i.wakeUp()},r.prototype.updateDuringAnimation=function(t){this.markRedraw()},r.prototype.stopAnimation=function(t,e){for(var i=this.animators,n=i.length,a=[],o=0;o<n;o++){var s=i[o];!t||t===s.scope?s.stop(e):a.push(s)}return this.animators=a,this},r.prototype.animateTo=function(t,e,i){du(this,t,e,i)},r.prototype.animateFrom=function(t,e,i){du(this,t,e,i,!0)},r.prototype._transitionState=function(t,e,i,n){for(var a=du(this,e,i,n),o=0;o<a.length;o++)a[o].__fromStateTransition=t},r.prototype.getBoundingRect=function(){return null},r.prototype.getPaintRect=function(){return null},r.initDefaultProps=(function(){var t=r.prototype;t.type="element",t.name="",t.ignore=t.silent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=t.__inHover=!1,t.__dirty=nr;function e(i,n,a,o){Object.defineProperty(t,i,{get:function(){if(!this[n]){var l=this[n]=[];s(this,l)}return this[n]},set:function(l){this[a]=l[0],this[o]=l[1],this[n]=l,s(this,l)}});function s(l,u){Object.defineProperty(u,0,{get:function(){return l[a]},set:function(h){l[a]=h}}),Object.defineProperty(u,1,{get:function(){return l[o]},set:function(h){l[o]=h}})}}Object.defineProperty&&(e("position","_legacyPos","x","y"),e("scale","_legacyScale","scaleX","scaleY"),e("origin","_legacyOrigin","originX","originY"))})(),r})();xe(dl,cr);xe(dl,tf);function du(r,t,e,i,n){e=e||{};var a=[];Fy(r,"",r,t,e,i,a,n);var o=a.length,s=!1,l=e.done,u=e.aborted,h=function(){s=!0,o--,o<=0&&(s?l&&l():u&&u())},c=function(){o--,o<=0&&(s?l&&l():u&&u())};o||l&&l(),a.length>0&&e.during&&a[0].during(function(p,v){e.during(v)});for(var f=0;f<a.length;f++){var d=a[f];h&&d.done(h),c&&d.aborted(c),e.force&&d.duration(e.duration),d.start(e.easing)}return a}function pu(r,t,e){for(var i=0;i<e;i++)r[i]=t[i]}function $S(r){return ae(r[0])}function US(r,t,e){if(ae(t[e]))if(ae(r[e])||(r[e]=[]),oe(t[e])){var i=t[e].length;r[e].length!==i&&(r[e]=new t[e].constructor(i),pu(r[e],t[e],i))}else{var n=t[e],a=r[e],o=n.length;if($S(n))for(var s=n[0].length,l=0;l<o;l++)a[l]?pu(a[l],n[l],s):a[l]=Array.prototype.slice.call(n[l]);else pu(a,n,o);a.length=n.length}else r[e]=t[e]}function YS(r,t){return r===t||ae(r)&&ae(t)&&XS(r,t)}function XS(r,t){var e=r.length;if(e!==t.length)return!1;for(var i=0;i<e;i++)if(r[i]!==t[i])return!1;return!0}function Fy(r,t,e,i,n,a,o,s){for(var l=vt(i),u=n.duration,h=n.delay,c=n.additive,f=n.setToFinal,d=!q(a),p=r.animators,v=[],g=0;g<l.length;g++){var m=l[g],_=i[m];if(_!=null&&e[m]!=null&&(d||a[m]))if(q(_)&&!ae(_)&&!ll(_)){if(t){s||(e[m]=_,r.updateDuringAnimation(t));continue}Fy(r,m,e[m],_,n,a&&a[m],o,s)}else v.push(m);else s||(e[m]=_,r.updateDuringAnimation(t),v.push(m))}var b=v.length;if(!c&&b)for(var x=0;x<p.length;x++){var C=p[x];if(C.targetName===t){var S=C.stopTracks(v);if(S){var T=pt(p,C);p.splice(T,1)}}}if(n.force||(v=It(v,function(P){return!YS(i[P],e[P])}),b=v.length),b>0||n.force&&!o.length){var M=void 0,D=void 0,I=void 0;if(s){D={},f&&(M={});for(var x=0;x<b;x++){var m=v[x];D[m]=e[m],f?M[m]=i[m]:e[m]=i[m]}}else if(f){I={};for(var x=0;x<b;x++){var m=v[x];I[m]=fs(e[m]),US(e,i,m)}}var C=new Qc(e,!1,!1,c?It(p,function(k){return k.targetName===t}):null);C.targetName=t,n.scope&&(C.scope=n.scope),f&&M&&C.whenWithKeys(0,M,v),I&&C.whenWithKeys(0,I,v),C.whenWithKeys(u??500,s?D:i,v).delay(h||0),r.addAnimator(C,t),o.push(C)}}var Bt=(function(r){F(t,r);function t(e){var i=r.call(this)||this;return i.isGroup=!0,i._children=[],i.attr(e),i}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var i=this._children,n=0;n<i.length;n++)if(i[n].name===e)return i[n]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},t.prototype.addBefore=function(e,i){if(e&&e!==this&&e.parent!==this&&i&&i.parent===this){var n=this._children,a=n.indexOf(i);a>=0&&(n.splice(a,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,i){var n=pt(this._children,e);return n>=0&&this.replaceAt(i,n),this},t.prototype.replaceAt=function(e,i){var n=this._children,a=n[i];if(e&&e!==this&&e.parent!==this&&e!==a){n[i]=e,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var i=this.__zr;i&&i!==e.__zr&&e.addSelfToZr(i),i&&i.refresh()},t.prototype.remove=function(e){var i=this.__zr,n=this._children,a=pt(n,e);return a<0?this:(n.splice(a,1),e.parent=null,i&&e.removeSelfFromZr(i),i&&i.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,i=this.__zr,n=0;n<e.length;n++){var a=e[n];i&&a.removeSelfFromZr(i),a.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,i){for(var n=this._children,a=0;a<n.length;a++){var o=n[a];e.call(i,o,a)}return this},t.prototype.traverse=function(e,i){for(var n=0;n<this._children.length;n++){var a=this._children[n],o=e.call(i,a);a.isGroup&&!o&&a.traverse(e,i)}return this},t.prototype.addSelfToZr=function(e){r.prototype.addSelfToZr.call(this,e);for(var i=0;i<this._children.length;i++){var n=this._children[i];n.addSelfToZr(e)}},t.prototype.removeSelfFromZr=function(e){r.prototype.removeSelfFromZr.call(this,e);for(var i=0;i<this._children.length;i++){var n=this._children[i];n.removeSelfFromZr(e)}},t.prototype.getBoundingRect=function(e){for(var i=new mt(0,0,0,0),n=e||this._children,a=[],o=null,s=0;s<n.length;s++){var l=n[s];if(!(l.ignore||l.invisible)){var u=l.getBoundingRect(),h=l.getLocalTransform(a);h?(mt.applyTransform(i,u,h),o=o||i.clone(),o.union(i)):(o=o||u.clone(),o.union(u))}}return o||i},t})(dl);Bt.prototype.type="group";/*!
|
|
17
|
+
* ZRender, a high performance 2d drawing library.
|
|
18
|
+
*
|
|
19
|
+
* Copyright (c) 2013, Baidu Inc.
|
|
20
|
+
* All rights reserved.
|
|
21
|
+
*
|
|
22
|
+
* LICENSE
|
|
23
|
+
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
|
|
24
|
+
*/var gs={},Ri={};function ZS(r){delete Ri[r]}function qS(r){if(!r)return!1;if(typeof r=="string")return $a(r,1)<Vh;if(r.colorStops){for(var t=r.colorStops,e=0,i=t.length,n=0;n<i;n++)e+=$a(t[n].color,1);return e/=i,e<Vh}return!1}var KS=(function(){function r(t,e,i){var n=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,i=i||{},this.dom=e,this.id=t;var a=new nS,o=i.renderer||"canvas";gs[o]||(o=vt(gs)[0]),i.useDirtyRect=i.useDirtyRect==null?!1:i.useDirtyRect;var s=new gs[o](e,a,i,t),l=i.ssr||s.ssrOnly;this.storage=a,this.painter=s;var u=!J.node&&!J.worker&&!l?new VS(s.getViewportRoot(),s.root):null,h=i.useCoarsePointer,c=h==null||h==="auto"?J.touchEventsSupported:!!h,f=44,d;c&&(d=Q(i.pointerSize,f)),this.handler=new my(a,s,u,s.root,d),this.animation=new OS({stage:{update:l?null:function(){return n._flush(!0)}}}),l||this.animation.start()}return r.prototype.add=function(t){this._disposed||!t||(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},r.prototype.remove=function(t){this._disposed||!t||(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},r.prototype.configLayer=function(t,e){this._disposed||(this.painter.configLayer&&this.painter.configLayer(t,e),this.refresh())},r.prototype.setBackgroundColor=function(t){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=qS(t))},r.prototype.getBackgroundColor=function(){return this._backgroundColor},r.prototype.setDarkMode=function(t){this._darkMode=t},r.prototype.isDarkMode=function(){return this._darkMode},r.prototype.refreshImmediately=function(t){this._disposed||(t||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(t){var e,i=Cn();this._needsRefresh&&(e=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(e=!0,this.refreshHoverImmediately());var n=Cn();e?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:n-i})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},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(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.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(t){this._disposed||this.handler.setCursorStyle(t)},r.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},r.prototype.on=function(t,e,i){return this._disposed||this.handler.on(t,e,i),this},r.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},r.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},r.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e<t.length;e++)t[e]instanceof Bt&&t[e].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,ZS(this.id))},r})();function Gh(r,t){var e=new KS(Hc(),r,t);return Ri[e.id]=e,e}function JS(r){r.dispose()}function QS(){for(var r in Ri)Ri.hasOwnProperty(r)&&Ri[r].dispose();Ri={}}function tC(r){return Ri[r]}function By(r,t){gs[r]=t}var $h;function zy(r){if(typeof $h=="function")return $h(r)}function Vy(r){$h=r}var eC="5.6.1";const rC=Object.freeze(Object.defineProperty({__proto__:null,dispose:JS,disposeAll:QS,getElementSSRData:zy,getInstance:tC,init:Gh,registerPainter:By,registerSSRDataGetter:Vy,version:eC},Symbol.toStringTag,{value:"Module"}));var sp=1e-4,Hy=20;function iC(r){return r.replace(/^\s+|\s+$/g,"")}function jr(r,t,e,i){var n=t[0],a=t[1],o=e[0],s=e[1],l=a-n,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(i)if(l>0){if(r<=n)return o;if(r>=a)return s}else{if(r>=n)return o;if(r<=a)return s}else{if(r===n)return o;if(r===a)return s}return(r-n)/l*u+o}function ee(r,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 U(r)?iC(r).match(/%$/)?parseFloat(r)/100*t:parseFloat(r):r==null?NaN:+r}function Pt(r,t,e){return t==null&&(t=10),t=Math.min(Math.max(0,t),Hy),r=(+r).toFixed(t),e?r:+r}function ef(r){return r.sort(function(t,e){return t-e}),r}function or(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var t=1,e=0;e<15;e++,t*=10)if(Math.round(r*t)/t===r)return e}return Wy(r)}function Wy(r){var t=r.toString().toLowerCase(),e=t.indexOf("e"),i=e>0?+t.slice(e+1):0,n=e>0?e:t.length,a=t.indexOf("."),o=a<0?0:n-1-a;return Math.max(0,o-i)}function rf(r,t){var e=Math.log,i=Math.LN10,n=Math.floor(e(r[1]-r[0])/i),a=Math.round(e(Math.abs(t[1]-t[0]))/i),o=Math.min(Math.max(-n+a,0),20);return isFinite(o)?o:20}function nC(r,t,e){if(!r[t])return 0;var i=aC(r,e);return i[t]||0}function aC(r,t){var e=ur(r,function(d,p){return d+(isNaN(p)?0:p)},0);if(e===0)return[];for(var i=Math.pow(10,t),n=V(r,function(d){return(isNaN(d)?0:d)/e*i*100}),a=i*100,o=V(n,function(d){return Math.floor(d)}),s=ur(o,function(d,p){return d+p},0),l=V(n,function(d,p){return d-o[p]});s<a;){for(var u=Number.NEGATIVE_INFINITY,h=null,c=0,f=l.length;c<f;++c)l[c]>u&&(u=l[c],h=c);++o[h],l[h]=0,++s}return V(o,function(d){return d/i})}function oC(r,t){var e=Math.max(or(r),or(t)),i=r+t;return e>Hy?i:Pt(i,e)}var sC=9007199254740991;function nf(r){var t=Math.PI*2;return(r%t+t)%t}function Xa(r){return r>-sp&&r<sp}var lC=/^(?:(\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 Le(r){if(r instanceof Date)return r;if(U(r)){var t=lC.exec(r);if(!t)return new Date(NaN);if(t[8]){var e=+t[4]||0;return t[8].toUpperCase()!=="Z"&&(e-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,e,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}else return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}else if(r==null)return new Date(NaN);return new Date(Math.round(r))}function Gy(r){return Math.pow(10,pl(r))}function pl(r){if(r===0)return 0;var t=Math.floor(Math.log(r)/Math.LN10);return r/Math.pow(10,t)>=10&&t++,t}function af(r,t){var e=pl(r),i=Math.pow(10,e),n=r/i,a;return t?n<1.5?a=1:n<2.5?a=2:n<4?a=3:n<7?a=5:a=10:n<1?a=1:n<2?a=2:n<3?a=3:n<5?a=5:a=10,r=a*i,e>=-20?+r.toFixed(e<0?-e:0):r}function uC(r,t){var e=(r.length-1)*t+1,i=Math.floor(e),n=+r[i-1],a=e-i;return a?n+a*(r[i]-n):n}function hC(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var t=-1/0,e=1,i=0;i<r.length;){for(var n=r[i].interval,a=r[i].close,o=0;o<2;o++)n[o]<=t&&(n[o]=t,a[o]=o?1:1-e),t=n[o],e=a[o];n[0]===n[1]&&a[0]*a[1]!==1?r.splice(i,1):i++}return r;function s(l,u,h){return l.interval[h]<u.interval[h]||l.interval[h]===u.interval[h]&&(l.close[h]-u.close[h]===(h?-1:1)||!h&&s(l,u,1))}}function Za(r){var t=parseFloat(r);return t==r&&(t!==0||!U(r)||r.indexOf("x")<=0)?t:NaN}function $y(r){return!isNaN(Za(r))}function Uy(){return Math.round(Math.random()*9)}function Yy(r,t){return t===0?r:Yy(t,r%t)}function lp(r,t){return r==null?t:t==null?r:r*t/Yy(r,t)}function fe(r){throw new Error(r)}function up(r,t,e){return(t-r)*e+r}var Xy="series\0",Zy="\0_ec_\0";function ne(r){return r instanceof Array?r:r==null?[]:[r]}function hp(r,t,e){if(r){r[t]=r[t]||{},r.emphasis=r.emphasis||{},r.emphasis[t]=r.emphasis[t]||{};for(var i=0,n=e.length;i<n;i++){var a=e[i];!r.emphasis[t].hasOwnProperty(a)&&r[t].hasOwnProperty(a)&&(r.emphasis[t][a]=r[t][a])}}}var cp=["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 Un(r){return q(r)&&!W(r)&&!(r instanceof Date)?r.value:r}function cC(r){return q(r)&&!(r instanceof Array)}function fC(r,t,e){var i=e==="normalMerge",n=e==="replaceMerge",a=e==="replaceAll";r=r||[],t=(t||[]).slice();var o=nt();A(t,function(l,u){if(!q(l)){t[u]=null;return}});var s=dC(r,o,e);return(i||n)&&pC(s,r,o,t),i&&vC(s,t),i||n?gC(s,t,n):a&&mC(s,t),yC(s),s}function dC(r,t,e){var i=[];if(e==="replaceAll")return i;for(var n=0;n<r.length;n++){var a=r[n];a&&a.id!=null&&t.set(a.id,n),i.push({existing:e==="replaceMerge"||qa(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return i}function pC(r,t,e,i){A(i,function(n,a){if(!(!n||n.id==null)){var o=Pa(n.id),s=e.get(o);if(s!=null){var l=r[s];be(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=n,l.existing=t[s],i[a]=null}}})}function vC(r,t){A(t,function(e,i){if(!(!e||e.name==null))for(var n=0;n<r.length;n++){var a=r[n].existing;if(!r[n].newOption&&a&&(a.id==null||e.id==null)&&!qa(e)&&!qa(a)&&qy("name",a,e)){r[n].newOption=e,t[i]=null;return}}})}function gC(r,t,e){A(t,function(i){if(i){for(var n,a=0;(n=r[a])&&(n.newOption||qa(n.existing)||n.existing&&i.id!=null&&!qy("id",i,n.existing));)a++;n?(n.newOption=i,n.brandNew=e):r.push({newOption:i,brandNew:e,existing:null,keyInfo:null}),a++}})}function mC(r,t){A(t,function(e){r.push({newOption:e,brandNew:!0,existing:null,keyInfo:null})})}function yC(r){var t=nt();A(r,function(e){var i=e.existing;i&&t.set(i.id,e)}),A(r,function(e){var i=e.newOption;be(!i||i.id==null||!t.get(i.id)||t.get(i.id)===e,"id duplicates: "+(i&&i.id)),i&&i.id!=null&&t.set(i.id,e),!e.keyInfo&&(e.keyInfo={})}),A(r,function(e,i){var n=e.existing,a=e.newOption,o=e.keyInfo;if(q(a)){if(o.name=a.name!=null?Pa(a.name):n?n.name:Xy+i,n)o.id=Pa(n.id);else if(a.id!=null)o.id=Pa(a.id);else{var s=0;do o.id="\0"+o.name+"\0"+s++;while(t.get(o.id))}t.set(o.id,e)}})}function qy(r,t,e){var i=Ue(t[r],null),n=Ue(e[r],null);return i!=null&&n!=null&&i===n}function Pa(r){return Ue(r,"")}function Ue(r,t){return r==null?t:U(r)?r:At(r)||Is(r)?r+"":t}function Ky(r){var t=r.name;return!!(t&&t.indexOf(Xy))}function qa(r){return r&&r.id!=null&&Pa(r.id).indexOf(Zy)===0}function _C(r){return Zy+r}function bC(r,t,e){A(r,function(i){var n=i.newOption;q(n)&&(i.keyInfo.mainType=t,i.keyInfo.subType=xC(t,n,i.existing,e))})}function xC(r,t,e,i){var n=t.type?t.type:e?e.subType:i.determineSubType(r,t);return n}function Wi(r,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return W(t.dataIndex)?V(t.dataIndex,function(e){return r.indexOfRawIndex(e)}):r.indexOfRawIndex(t.dataIndex);if(t.name!=null)return W(t.name)?V(t.name,function(e){return r.indexOfName(e)}):r.indexOfName(t.name)}function kt(){var r="__ec_inner_"+wC++;return function(t){return t[r]||(t[r]={})}}var wC=Uy();function ka(r,t,e){var i=of(t,e),n=i.mainTypeSpecified,a=i.queryOptionMap,o=i.others,s=o,l=e?e.defaultMainType:null;return!n&&l&&a.set(l,{}),a.each(function(u,h){var c=yo(r,h,u,{useDefault:l===h,enableAll:e&&e.enableAll!=null?e.enableAll:!0,enableNone:e&&e.enableNone!=null?e.enableNone:!0});s[h+"Models"]=c.models,s[h+"Model"]=c.models[0]}),s}function of(r,t){var e;if(U(r)){var i={};i[r+"Index"]=0,e=i}else e=r;var n=nt(),a={},o=!1;return A(e,function(s,l){if(l==="dataIndex"||l==="dataIndexInside"){a[l]=s;return}var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],h=u[1],c=(u[2]||"").toLowerCase();if(!(!h||!c||t&&t.includeMainTypes&&pt(t.includeMainTypes,h)<0)){o=o||!!h;var f=n.get(h)||n.set(h,{});f[c]=s}}),{mainTypeSpecified:o,queryOptionMap:n,others:a}}var re={useDefault:!0,enableAll:!1,enableNone:!1},SC={useDefault:!1,enableAll:!0,enableNone:!0};function yo(r,t,e,i){i=i||re;var n=e.index,a=e.id,o=e.name,s={models:null,specified:n!=null||a!=null||o!=null};if(!s.specified){var l=void 0;return s.models=i.useDefault&&(l=r.getComponent(t))?[l]:[],s}return n==="none"||n===!1?(be(i.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):(n==="all"&&(be(i.enableAll,'`"all"` is not a valid value on index option.'),n=a=o=null),s.models=r.queryComponents({mainType:t,index:n,id:a,name:o}),s)}function Jy(r,t,e){r.setAttribute?r.setAttribute(t,e):r[t]=e}function CC(r,t){return r.getAttribute?r.getAttribute(t):r[t]}function TC(r){return r==="auto"?J.domSupported?"html":"richText":r||"html"}function AC(r,t,e,i,n){var a=t==null||t==="auto";if(i==null)return i;if(At(i)){var o=up(e||0,i,n);return Pt(o,a?Math.max(or(e||0),or(i)):t)}else{if(U(i))return n<1?e:i;for(var s=[],l=e,u=i,h=Math.max(l?l.length:0,u.length),c=0;c<h;++c){var f=r.getDimensionInfo(c);if(f&&f.type==="ordinal")s[c]=(n<1&&l?l:u)[c];else{var d=l&&l[c]?l[c]:0,p=u[c],o=up(d,p,n);s[c]=Pt(o,a?Math.max(or(d),or(p)):t)}}return s}}var MC=".",fi="___EC__COMPONENT__CONTAINER___",Qy="___EC__EXTENDED_CLASS___";function sr(r){var t={main:"",sub:""};if(r){var e=r.split(MC);t.main=e[0]||"",t.sub=e[1]||""}return t}function DC(r){be(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function IC(r){return!!(r&&r[Qy])}function sf(r,t){r.$constructor=r,r.extend=function(e){var i=this,n;return PC(i)?n=(function(a){F(o,a);function o(){return a.apply(this,arguments)||this}return o})(i):(n=function(){(e.$constructor||i).apply(this,arguments)},Gc(n,this)),N(n.prototype,e),n[Qy]=!0,n.extend=this.extend,n.superCall=LC,n.superApply=OC,n.superClass=i,n}}function PC(r){return tt(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function t0(r,t){r.extend=t.extend}var kC=Math.round(Math.random()*10);function RC(r){var t=["__\0is_clz",kC++].join("_");r.prototype[t]=!0,r.isInstance=function(e){return!!(e&&e[t])}}function LC(r,t){for(var e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];return this.superClass.prototype[t].apply(r,e)}function OC(r,t,e){return this.superClass.prototype[t].apply(r,e)}function vl(r){var t={};r.registerClass=function(i){var n=i.type||i.prototype.type;if(n){DC(n),i.prototype.type=n;var a=sr(n);if(!a.sub)t[a.main]=i;else if(a.sub!==fi){var o=e(a);o[a.sub]=i}}return i},r.getClass=function(i,n,a){var o=t[i];if(o&&o[fi]&&(o=n?o[n]:null),a&&!o)throw new Error(n?"Component "+i+"."+(n||"")+" is used but not imported.":i+".type should be specified.");return o},r.getClassesByMainType=function(i){var n=sr(i),a=[],o=t[n.main];return o&&o[fi]?A(o,function(s,l){l!==fi&&a.push(s)}):a.push(o),a},r.hasClass=function(i){var n=sr(i);return!!t[n.main]},r.getAllClassMainTypes=function(){var i=[];return A(t,function(n,a){i.push(a)}),i},r.hasSubTypes=function(i){var n=sr(i),a=t[n.main];return a&&a[fi]};function e(i){var n=t[i.main];return(!n||!n[fi])&&(n=t[i.main]={},n[fi]=!0),n}}function Ka(r,t){for(var e=0;e<r.length;e++)r[e][1]||(r[e][1]=r[e][0]);return t=t||!1,function(i,n,a){for(var o={},s=0;s<r.length;s++){var l=r[s][1];if(!(n&&pt(n,l)>=0||a&&pt(a,l)<0)){var u=i.getShallow(l,t);u!=null&&(o[r[s][0]]=u)}}return o}}var EC=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],jC=Ka(EC),NC=(function(){function r(){}return r.prototype.getAreaStyle=function(t,e){return jC(this,t,e)},r})(),Uh=new mo(50);function FC(r){if(typeof r=="string"){var t=Uh.get(r);return t&&t.image}else return r}function lf(r,t,e,i,n){if(r)if(typeof r=="string"){if(t&&t.__zrImageSrc===r||!e)return t;var a=Uh.get(r),o={hostEl:e,cb:i,cbPayload:n};return a?(t=a.image,!gl(t)&&a.pending.push(o)):(t=qr.loadImage(r,fp,fp),t.__zrImageSrc=r,Uh.put(r,t.__cachedImgObj={image:t,pending:[o]})),t}else return r;else return t}function fp(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<r.pending.length;t++){var e=r.pending[t],i=e.cb;i&&i(this,e.cbPayload),e.hostEl.dirty()}r.pending.length=0}function gl(r){return r&&r.width&&r.height}var vu=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function BC(r,t,e,i,n){var a={};return e0(a,r,t,e,i,n),a.text}function e0(r,t,e,i,n,a){if(!e){r.text="",r.isTruncated=!1;return}var o=(t+"").split(`
|
|
25
|
+
`);a=r0(e,i,n,a);for(var s=!1,l={},u=0,h=o.length;u<h;u++)i0(l,o[u],a),o[u]=l.textLine,s=s||l.isTruncated;r.text=o.join(`
|
|
26
|
+
`),r.isTruncated=s}function r0(r,t,e,i){i=i||{};var n=N({},i);n.font=t,e=Q(e,"..."),n.maxIterations=Q(i.maxIterations,2);var a=n.minChar=Q(i.minChar,0);n.cnCharWidth=ye("国",t);var o=n.ascCharWidth=ye("a",t);n.placeholder=Q(i.placeholder,"");for(var s=r=Math.max(0,r-1),l=0;l<a&&s>=o;l++)s-=o;var u=ye(e,t);return u>s&&(e="",u=0),s=r-u,n.ellipsis=e,n.ellipsisWidth=u,n.contentWidth=s,n.containerWidth=r,n}function i0(r,t,e){var i=e.containerWidth,n=e.font,a=e.contentWidth;if(!i){r.textLine="",r.isTruncated=!1;return}var o=ye(t,n);if(o<=i){r.textLine=t,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=a||s>=e.maxIterations){t+=e.ellipsis;break}var l=s===0?zC(t,a,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*a/o):0;t=t.substr(0,l),o=ye(t,n)}t===""&&(t=e.placeholder),r.textLine=t,r.isTruncated=!0}function zC(r,t,e,i){for(var n=0,a=0,o=r.length;a<o&&n<t;a++){var s=r.charCodeAt(a);n+=0<=s&&s<=127?e:i}return a}function VC(r,t){r!=null&&(r+="");var e=t.overflow,i=t.padding,n=t.font,a=e==="truncate",o=fl(n),s=Q(t.lineHeight,o),l=!!t.backgroundColor,u=t.lineOverflow==="truncate",h=!1,c=t.width,f;c!=null&&(e==="break"||e==="breakAll")?f=r?n0(r,t.font,c,e==="breakAll",0).lines:[]:f=r?r.split(`
|
|
27
|
+
`):[];var d=f.length*s,p=Q(t.height,d);if(d>p&&u){var v=Math.floor(p/s);h=h||f.length>v,f=f.slice(0,v)}if(r&&a&&c!=null)for(var g=r0(c,n,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),m={},_=0;_<f.length;_++)i0(m,f[_],g),f[_]=m.textLine,h=h||m.isTruncated;for(var b=p,x=0,_=0;_<f.length;_++)x=Math.max(ye(f[_],n),x);c==null&&(c=x);var C=x;return i&&(b+=i[0]+i[2],C+=i[1]+i[3],c+=i[1]+i[3]),l&&(C=c),{lines:f,height:p,outerWidth:C,outerHeight:b,lineHeight:s,calculatedLineHeight:o,contentWidth:x,contentHeight:d,width:c,isTruncated:h}}var HC=(function(){function r(){}return r})(),dp=(function(){function r(t){this.tokens=[],t&&(this.tokens=t)}return r})(),WC=(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 GC(r,t){var e=new WC;if(r!=null&&(r+=""),!r)return e;for(var i=t.width,n=t.height,a=t.overflow,o=(a==="break"||a==="breakAll")&&i!=null?{width:i,accumWidth:0,breakAll:a==="breakAll"}:null,s=vu.lastIndex=0,l;(l=vu.exec(r))!=null;){var u=l.index;u>s&&gu(e,r.substring(s,u),t,o),gu(e,l[2],t,o,l[1]),s=vu.lastIndex}s<r.length&&gu(e,r.substring(s,r.length),t,o);var h=[],c=0,f=0,d=t.padding,p=a==="truncate",v=t.lineOverflow==="truncate",g={};function m(et,ut,ot){et.width=ut,et.lineHeight=ot,c+=ot,f=Math.max(f,ut)}t:for(var _=0;_<e.lines.length;_++){for(var b=e.lines[_],x=0,C=0,S=0;S<b.tokens.length;S++){var T=b.tokens[S],M=T.styleName&&t.rich[T.styleName]||{},D=T.textPadding=M.padding,I=D?D[1]+D[3]:0,P=T.font=M.font||t.font;T.contentHeight=fl(P);var k=Q(M.height,T.contentHeight);if(T.innerHeight=k,D&&(k+=D[0]+D[2]),T.height=k,T.lineHeight=Ma(M.lineHeight,t.lineHeight,k),T.align=M&&M.align||t.align,T.verticalAlign=M&&M.verticalAlign||"middle",v&&n!=null&&c+T.lineHeight>n){var R=e.lines.length;S>0?(b.tokens=b.tokens.slice(0,S),m(b,C,x),e.lines=e.lines.slice(0,_+1)):e.lines=e.lines.slice(0,_),e.isTruncated=e.isTruncated||e.lines.length<R;break t}var L=M.width,j=L==null||L==="auto";if(typeof L=="string"&&L.charAt(L.length-1)==="%")T.percentWidth=L,h.push(T),T.contentWidth=ye(T.text,P);else{if(j){var E=M.backgroundColor,Z=E&&E.image;Z&&(Z=FC(Z),gl(Z)&&(T.width=Math.max(T.width,Z.width*k/Z.height)))}var G=p&&i!=null?i-C:null;G!=null&&G<T.width?!j||G<I?(T.text="",T.width=T.contentWidth=0):(e0(g,T.text,G-I,P,t.ellipsis,{minChar:t.truncateMinChar}),T.text=g.text,e.isTruncated=e.isTruncated||g.isTruncated,T.width=T.contentWidth=ye(T.text,P)):T.contentWidth=ye(T.text,P)}T.width+=I,C+=T.width,M&&(x=Math.max(x,T.lineHeight))}m(b,C,x)}e.outerWidth=e.width=Q(i,f),e.outerHeight=e.height=Q(n,c),e.contentHeight=c,e.contentWidth=f,d&&(e.outerWidth+=d[1]+d[3],e.outerHeight+=d[0]+d[2]);for(var _=0;_<h.length;_++){var T=h[_],Y=T.percentWidth;T.width=parseInt(Y,10)/100*e.width}return e}function gu(r,t,e,i,n){var a=t==="",o=n&&e.rich[n]||{},s=r.lines,l=o.font||e.font,u=!1,h,c;if(i){var f=o.padding,d=f?f[1]+f[3]:0;if(o.width!=null&&o.width!=="auto"){var p=Kr(o.width,i.width)+d;s.length>0&&p+i.accumWidth>i.width&&(h=t.split(`
|
|
28
|
+
`),u=!0),i.accumWidth=p}else{var v=n0(t,l,i.width,i.breakAll,i.accumWidth);i.accumWidth=v.accumWidth+d,c=v.linesWidths,h=v.lines}}else h=t.split(`
|
|
29
|
+
`);for(var g=0;g<h.length;g++){var m=h[g],_=new HC;if(_.styleName=n,_.text=m,_.isLineHolder=!m&&!a,typeof o.width=="number"?_.width=o.width:_.width=c?c[g]:ye(m,l),!g&&!u){var b=(s[s.length-1]||(s[0]=new dp)).tokens,x=b.length;x===1&&b[0].isLineHolder?b[0]=_:(m||!x||a)&&b.push(_)}else s.push(new dp([_]))}}function $C(r){var t=r.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var UC=ur(",&?/;] ".split(""),function(r,t){return r[t]=!0,r},{});function YC(r){return $C(r)?!!UC[r]:!0}function n0(r,t,e,i,n){for(var a=[],o=[],s="",l="",u=0,h=0,c=0;c<r.length;c++){var f=r.charAt(c);if(f===`
|
|
30
|
+
`){l&&(s+=l,h+=u),a.push(s),o.push(h),s="",l="",u=0,h=0;continue}var d=ye(f,t),p=i?!1:!YC(f);if(a.length?h+d>e:n+h+d>e){h?(s||l)&&(p?(s||(s=l,l="",u=0,h=u),a.push(s),o.push(h-u),l+=f,u+=d,s="",h=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(h),s=f,h=d)):p?(a.push(l),o.push(u),l=f,u=d):(a.push(f),o.push(d));continue}h+=d,p?(l+=f,u+=d):(l&&(s+=l,l="",u=0),s+=f)}return!a.length&&!s&&(s=r,l="",u=0),l&&(s+=l),s&&(a.push(s),o.push(h)),a.length===1&&(h+=n),{accumWidth:h,lines:a,linesWidths:o}}var Yh="__zr_style_"+Math.round(Math.random()*10),Ni={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},ml={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Ni[Yh]=!0;var pp=["z","z2","invisible"],XC=["invisible"],_o=(function(r){F(t,r);function t(e){return r.call(this,e)||this}return t.prototype._init=function(e){for(var i=vt(e),n=0;n<i.length;n++){var a=i[n];a==="style"?this.useStyle(e[a]):r.prototype.attrKV.call(this,a,e[a])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(e,i,n,a){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&ZC(this,e,i)||o&&!o[0]&&!o[3])return!1;if(n&&this.__clipPaths){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(a&&this.parent)for(var l=this.parent;l;){if(l.ignore)return!1;l=l.parent}return!0},t.prototype.contain=function(e,i){return this.rectContain(e,i)},t.prototype.traverse=function(e,i){e.call(i,this)},t.prototype.rectContain=function(e,i){var n=this.transformCoordToLocal(e,i),a=this.getBoundingRect();return a.contain(n[0],n[1])},t.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var i=this.transform,n=this.getBoundingRect(),a=this.style,o=a.shadowBlur||0,s=a.shadowOffsetX||0,l=a.shadowOffsetY||0;e=this._paintRect||(this._paintRect=new mt(0,0,0,0)),i?mt.applyTransform(e,n,i):e.copy(n),(o||s||l)&&(e.width+=o*2+Math.abs(s),e.height+=o*2+Math.abs(l),e.x=Math.min(e.x,e.x+s-o),e.y=Math.min(e.y,e.y+l-o));var u=this.dirtyRectTolerance;e.isZero()||(e.x=Math.floor(e.x-u),e.y=Math.floor(e.y-u),e.width=Math.ceil(e.width+1+u*2),e.height=Math.ceil(e.height+1+u*2))}return e},t.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new mt(0,0,0,0),this._prevPaintRect.copy(e)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(e){return this.animate("style",e)},t.prototype.updateDuringAnimation=function(e){e==="style"?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(e,i){e!=="style"?r.prototype.attrKV.call(this,e,i):this.style?this.setStyle(i):this.useStyle(i)},t.prototype.setStyle=function(e,i){return typeof e=="string"?this.style[e]=i:N(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=_a,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&_a)},t.prototype.styleUpdated=function(){this.__dirty&=~_a},t.prototype.createStyle=function(e){return fo(Ni,e)},t.prototype.useStyle=function(e){e[Yh]||(e=this.createStyle(e)),this.__inHover?this.__hoverStyle=e:this.style=e,this.dirtyStyle()},t.prototype.isStyleObject=function(e){return e[Yh]},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var i=this._normalState;e.style&&!i.style&&(i.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(e,i,pp)},t.prototype._applyStateObj=function(e,i,n,a,o,s){r.prototype._applyStateObj.call(this,e,i,n,a,o,s);var l=!(i&&a),u;if(i&&i.style?o?a?u=i.style:(u=this._mergeStyle(this.createStyle(),n.style),this._mergeStyle(u,i.style)):(u=this._mergeStyle(this.createStyle(),a?this.style:n.style),this._mergeStyle(u,i.style)):l&&(u=n.style),u)if(o){var h=this.style;if(this.style=this.createStyle(l?{}:h),l)for(var c=vt(h),f=0;f<c.length;f++){var d=c[f];d in u&&(u[d]=u[d],this.style[d]=h[d])}for(var p=vt(u),f=0;f<p.length;f++){var d=p[f];this.style[d]=this.style[d]}this._transitionState(e,{style:u},s,this.getAnimationStyleProps())}else this.useStyle(u);for(var v=this.__inHover?XC:pp,f=0;f<v.length;f++){var d=v[f];i&&i[d]!=null?this[d]=i[d]:l&&n[d]!=null&&(this[d]=n[d])}},t.prototype._mergeStates=function(e){for(var i=r.prototype._mergeStates.call(this,e),n,a=0;a<e.length;a++){var o=e[a];o.style&&(n=n||{},this._mergeStyle(n,o.style))}return n&&(i.style=n),i},t.prototype._mergeStyle=function(e,i){return N(e,i),e},t.prototype.getAnimationStyleProps=function(){return ml},t.initDefaultProps=(function(){var e=t.prototype;e.type="displayable",e.invisible=!1,e.z=0,e.z2=0,e.zlevel=0,e.culling=!1,e.cursor="pointer",e.rectHover=!1,e.incremental=!1,e._rect=null,e.dirtyRectTolerance=0,e.__dirty=nr|_a})(),t})(dl),mu=new mt(0,0,0,0),yu=new mt(0,0,0,0);function ZC(r,t,e){return mu.copy(r.getBoundingRect()),r.transform&&mu.applyTransform(r.transform),yu.width=t,yu.height=e,!mu.intersect(yu)}var Pe=Math.min,ke=Math.max,_u=Math.sin,bu=Math.cos,di=Math.PI*2,Bo=Zi(),zo=Zi(),Vo=Zi();function vp(r,t,e,i,n,a){n[0]=Pe(r,e),n[1]=Pe(t,i),a[0]=ke(r,e),a[1]=ke(t,i)}var gp=[],mp=[];function qC(r,t,e,i,n,a,o,s,l,u){var h=wy,c=Wt,f=h(r,e,n,o,gp);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var d=0;d<f;d++){var p=c(r,e,n,o,gp[d]);l[0]=Pe(p,l[0]),u[0]=ke(p,u[0])}f=h(t,i,a,s,mp);for(var d=0;d<f;d++){var v=c(t,i,a,s,mp[d]);l[1]=Pe(v,l[1]),u[1]=ke(v,u[1])}l[0]=Pe(r,l[0]),u[0]=ke(r,u[0]),l[0]=Pe(o,l[0]),u[0]=ke(o,u[0]),l[1]=Pe(t,l[1]),u[1]=ke(t,u[1]),l[1]=Pe(s,l[1]),u[1]=ke(s,u[1])}function KC(r,t,e,i,n,a,o,s){var l=Sy,u=ce,h=ke(Pe(l(r,e,n),1),0),c=ke(Pe(l(t,i,a),1),0),f=u(r,e,n,h),d=u(t,i,a,c);o[0]=Pe(r,n,f),o[1]=Pe(t,a,d),s[0]=ke(r,n,f),s[1]=ke(t,a,d)}function JC(r,t,e,i,n,a,o,s,l){var u=Nr,h=Fr,c=Math.abs(n-a);if(c%di<1e-4&&c>1e-4){s[0]=r-e,s[1]=t-i,l[0]=r+e,l[1]=t+i;return}if(Bo[0]=bu(n)*e+r,Bo[1]=_u(n)*i+t,zo[0]=bu(a)*e+r,zo[1]=_u(a)*i+t,u(s,Bo,zo),h(l,Bo,zo),n=n%di,n<0&&(n=n+di),a=a%di,a<0&&(a=a+di),n>a&&!o?a+=di:n<a&&o&&(n+=di),o){var f=a;a=n,n=f}for(var d=0;d<a;d+=Math.PI/2)d>n&&(Vo[0]=bu(d)*e+r,Vo[1]=_u(d)*i+t,u(s,Vo,s),h(l,Vo,l))}var yt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},pi=[],vi=[],Je=[],Ar=[],Qe=[],tr=[],xu=Math.min,wu=Math.max,gi=Math.cos,mi=Math.sin,pr=Math.abs,Xh=Math.PI,Or=Xh*2,Su=typeof Float32Array<"u",ia=[];function Cu(r){var t=Math.round(r/Xh*1e8)/1e8;return t%2*Xh}function QC(r,t){var e=Cu(r[0]);e<0&&(e+=Or);var i=e-r[0],n=r[1];n+=i,!t&&n-e>=Or?n=e+Or:t&&e-n>=Or?n=e-Or:!t&&e>n?n=e+(Or-Cu(e-n)):t&&e<n&&(n=e-(Or-Cu(n-e))),r[0]=e,r[1]=n}var Jr=(function(){function r(t){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}return r.prototype.increaseVersion=function(){this._version++},r.prototype.getVersion=function(){return this._version},r.prototype.setScale=function(t,e,i){i=i||0,i>0&&(this._ux=pr(i/rp/t)||0,this._uy=pr(i/rp/e)||0)},r.prototype.setDPR=function(t){this.dpr=t},r.prototype.setContext=function(t){this._ctx=t},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(t,e){return this._drawPendingPt(),this.addData(yt.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},r.prototype.lineTo=function(t,e){var i=pr(t-this._xi),n=pr(e-this._yi),a=i>this._ux||n>this._uy;if(this.addData(yt.L,t,e),this._ctx&&a&&this._ctx.lineTo(t,e),a)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=i*i+n*n;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(t,e,i,n,a,o){return this._drawPendingPt(),this.addData(yt.C,t,e,i,n,a,o),this._ctx&&this._ctx.bezierCurveTo(t,e,i,n,a,o),this._xi=a,this._yi=o,this},r.prototype.quadraticCurveTo=function(t,e,i,n){return this._drawPendingPt(),this.addData(yt.Q,t,e,i,n),this._ctx&&this._ctx.quadraticCurveTo(t,e,i,n),this._xi=i,this._yi=n,this},r.prototype.arc=function(t,e,i,n,a,o){this._drawPendingPt(),ia[0]=n,ia[1]=a,QC(ia,o),n=ia[0],a=ia[1];var s=a-n;return this.addData(yt.A,t,e,i,i,n,s,0,o?0:1),this._ctx&&this._ctx.arc(t,e,i,n,a,o),this._xi=gi(a)*i+t,this._yi=mi(a)*i+e,this},r.prototype.arcTo=function(t,e,i,n,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,i,n,a),this},r.prototype.rect=function(t,e,i,n){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,i,n),this.addData(yt.R,t,e,i,n),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(yt.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&t.closePath(),this._xi=e,this._yi=i,this},r.prototype.fill=function(t){t&&t.fill(),this.toStatic()},r.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(t){var e=t.length;!(this.data&&this.data.length===e)&&Su&&(this.data=new Float32Array(e));for(var i=0;i<e;i++)this.data[i]=t[i];this._len=e},r.prototype.appendPath=function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,n=this._len,a=0;a<e;a++)i+=t[a].len();Su&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(var a=0;a<e;a++)for(var o=t[a].data,s=0;s<o.length;s++)this.data[n++]=o[s];this._len=n},r.prototype.addData=function(t,e,i,n,a,o,s,l,u){if(this._saveData){var h=this.data;this._len+arguments.length>h.length&&(this._expandData(),h=this.data);for(var c=0;c<arguments.length;c++)h[this._len++]=arguments[c]}},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 t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},r.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var t=this.data;t instanceof Array&&(t.length=this._len,Su&&this._len>11&&(this.data=new Float32Array(t)))}},r.prototype.getBoundingRect=function(){Je[0]=Je[1]=Qe[0]=Qe[1]=Number.MAX_VALUE,Ar[0]=Ar[1]=tr[0]=tr[1]=-Number.MAX_VALUE;var t=this.data,e=0,i=0,n=0,a=0,o;for(o=0;o<this._len;){var s=t[o++],l=o===1;switch(l&&(e=t[o],i=t[o+1],n=e,a=i),s){case yt.M:e=n=t[o++],i=a=t[o++],Qe[0]=n,Qe[1]=a,tr[0]=n,tr[1]=a;break;case yt.L:vp(e,i,t[o],t[o+1],Qe,tr),e=t[o++],i=t[o++];break;case yt.C:qC(e,i,t[o++],t[o++],t[o++],t[o++],t[o],t[o+1],Qe,tr),e=t[o++],i=t[o++];break;case yt.Q:KC(e,i,t[o++],t[o++],t[o],t[o+1],Qe,tr),e=t[o++],i=t[o++];break;case yt.A:var u=t[o++],h=t[o++],c=t[o++],f=t[o++],d=t[o++],p=t[o++]+d;o+=1;var v=!t[o++];l&&(n=gi(d)*c+u,a=mi(d)*f+h),JC(u,h,c,f,d,p,v,Qe,tr),e=gi(p)*c+u,i=mi(p)*f+h;break;case yt.R:n=e=t[o++],a=i=t[o++];var g=t[o++],m=t[o++];vp(n,a,n+g,a+m,Qe,tr);break;case yt.Z:e=n,i=a;break}Nr(Je,Je,Qe),Fr(Ar,Ar,tr)}return o===0&&(Je[0]=Je[1]=Ar[0]=Ar[1]=0),new mt(Je[0],Je[1],Ar[0]-Je[0],Ar[1]-Je[1])},r.prototype._calculateLength=function(){var t=this.data,e=this._len,i=this._ux,n=this._uy,a=0,o=0,s=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,h=0,c=0,f=0;f<e;){var d=t[f++],p=f===1;p&&(a=t[f],o=t[f+1],s=a,l=o);var v=-1;switch(d){case yt.M:a=s=t[f++],o=l=t[f++];break;case yt.L:{var g=t[f++],m=t[f++],_=g-a,b=m-o;(pr(_)>i||pr(b)>n||f===e-1)&&(v=Math.sqrt(_*_+b*b),a=g,o=m);break}case yt.C:{var x=t[f++],C=t[f++],g=t[f++],m=t[f++],S=t[f++],T=t[f++];v=oS(a,o,x,C,g,m,S,T,10),a=S,o=T;break}case yt.Q:{var x=t[f++],C=t[f++],g=t[f++],m=t[f++];v=uS(a,o,x,C,g,m,10),a=g,o=m;break}case yt.A:var M=t[f++],D=t[f++],I=t[f++],P=t[f++],k=t[f++],R=t[f++],L=R+k;f+=1,p&&(s=gi(k)*I+M,l=mi(k)*P+D),v=wu(I,P)*xu(Or,Math.abs(R)),a=gi(L)*I+M,o=mi(L)*P+D;break;case yt.R:{s=a=t[f++],l=o=t[f++];var j=t[f++],E=t[f++];v=j*2+E*2;break}case yt.Z:{var _=s-a,b=l-o;v=Math.sqrt(_*_+b*b),a=s,o=l;break}}v>=0&&(u[c++]=v,h+=v)}return this._pathLen=h,h},r.prototype.rebuildPath=function(t,e){var i=this.data,n=this._ux,a=this._uy,o=this._len,s,l,u,h,c,f,d=e<1,p,v,g=0,m=0,_,b=0,x,C;if(!(d&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,v=this._pathLen,_=e*v,!_)))t:for(var S=0;S<o;){var T=i[S++],M=S===1;switch(M&&(u=i[S],h=i[S+1],s=u,l=h),T!==yt.L&&b>0&&(t.lineTo(x,C),b=0),T){case yt.M:s=u=i[S++],l=h=i[S++],t.moveTo(u,h);break;case yt.L:{c=i[S++],f=i[S++];var D=pr(c-u),I=pr(f-h);if(D>n||I>a){if(d){var P=p[m++];if(g+P>_){var k=(_-g)/P;t.lineTo(u*(1-k)+c*k,h*(1-k)+f*k);break t}g+=P}t.lineTo(c,f),u=c,h=f,b=0}else{var R=D*D+I*I;R>b&&(x=c,C=f,b=R)}break}case yt.C:{var L=i[S++],j=i[S++],E=i[S++],Z=i[S++],G=i[S++],Y=i[S++];if(d){var P=p[m++];if(g+P>_){var k=(_-g)/P;Os(u,L,E,G,k,pi),Os(h,j,Z,Y,k,vi),t.bezierCurveTo(pi[1],vi[1],pi[2],vi[2],pi[3],vi[3]);break t}g+=P}t.bezierCurveTo(L,j,E,Z,G,Y),u=G,h=Y;break}case yt.Q:{var L=i[S++],j=i[S++],E=i[S++],Z=i[S++];if(d){var P=p[m++];if(g+P>_){var k=(_-g)/P;Es(u,L,E,k,pi),Es(h,j,Z,k,vi),t.quadraticCurveTo(pi[1],vi[1],pi[2],vi[2]);break t}g+=P}t.quadraticCurveTo(L,j,E,Z),u=E,h=Z;break}case yt.A:var et=i[S++],ut=i[S++],ot=i[S++],ft=i[S++],gt=i[S++],B=i[S++],Rt=i[S++],Mt=!i[S++],Lt=ot>ft?ot:ft,xt=pr(ot-ft)>.001,z=gt+B,X=!1;if(d){var P=p[m++];g+P>_&&(z=gt+B*(_-g)/P,X=!0),g+=P}if(xt&&t.ellipse?t.ellipse(et,ut,ot,ft,Rt,gt,z,Mt):t.arc(et,ut,Lt,gt,z,Mt),X)break t;M&&(s=gi(gt)*ot+et,l=mi(gt)*ft+ut),u=gi(z)*ot+et,h=mi(z)*ft+ut;break;case yt.R:s=u=i[S],l=h=i[S+1],c=i[S++],f=i[S++];var K=i[S++],Ot=i[S++];if(d){var P=p[m++];if(g+P>_){var St=_-g;t.moveTo(c,f),t.lineTo(c+xu(St,K),f),St-=K,St>0&&t.lineTo(c+K,f+xu(St,Ot)),St-=Ot,St>0&&t.lineTo(c+wu(K-St,0),f+Ot),St-=K,St>0&&t.lineTo(c,f+wu(Ot-St,0));break t}g+=P}t.rect(c,f,K,Ot);break;case yt.Z:if(d){var P=p[m++];if(g+P>_){var k=(_-g)/P;t.lineTo(u*(1-k)+s*k,h*(1-k)+l*k);break t}g+=P}t.closePath(),u=s,h=l}}},r.prototype.clone=function(){var t=new r,e=this.data;return t.data=e.slice?e.slice():Array.prototype.slice.call(e),t._len=this._len,t},r.CMD=yt,r.initDefaultProps=(function(){var t=r.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),r})();function ln(r,t,e,i,n,a,o){if(n===0)return!1;var s=n,l=0,u=r;if(o>t+s&&o>i+s||o<t-s&&o<i-s||a>r+s&&a>e+s||a<r-s&&a<e-s)return!1;if(r!==e)l=(t-i)/(r-e),u=(r*i-e*t)/(r-e);else return Math.abs(a-r)<=s/2;var h=l*a-o+u,c=h*h/(l*l+1);return c<=s/2*s/2}function tT(r,t,e,i,n,a,o,s,l,u,h){if(l===0)return!1;var c=l;if(h>t+c&&h>i+c&&h>a+c&&h>s+c||h<t-c&&h<i-c&&h<a-c&&h<s-c||u>r+c&&u>e+c&&u>n+c&&u>o+c||u<r-c&&u<e-c&&u<n-c&&u<o-c)return!1;var f=aS(r,t,e,i,n,a,o,s,u,h);return f<=c/2}function eT(r,t,e,i,n,a,o,s,l){if(o===0)return!1;var u=o;if(l>t+u&&l>i+u&&l>a+u||l<t-u&&l<i-u&&l<a-u||s>r+u&&s>e+u&&s>n+u||s<r-u&&s<e-u&&s<n-u)return!1;var h=lS(r,t,e,i,n,a,s,l);return h<=u/2}var yp=Math.PI*2;function Ho(r){return r%=yp,r<0&&(r+=yp),r}var na=Math.PI*2;function rT(r,t,e,i,n,a,o,s,l){if(o===0)return!1;var u=o;s-=r,l-=t;var h=Math.sqrt(s*s+l*l);if(h-u>e||h+u<e)return!1;if(Math.abs(i-n)%na<1e-4)return!0;if(a){var c=i;i=Ho(n),n=Ho(c)}else i=Ho(i),n=Ho(n);i>n&&(n+=na);var f=Math.atan2(l,s);return f<0&&(f+=na),f>=i&&f<=n||f+na>=i&&f+na<=n}function yr(r,t,e,i,n,a){if(a>t&&a>i||a<t&&a<i||i===t)return 0;var o=(a-t)/(i-t),s=i<t?1:-1;(o===1||o===0)&&(s=i<t?.5:-.5);var l=o*(e-r)+r;return l===n?1/0:l>n?s:0}var Mr=Jr.CMD,yi=Math.PI*2,iT=1e-4;function nT(r,t){return Math.abs(r-t)<iT}var Qt=[-1,-1,-1],De=[-1,-1];function aT(){var r=De[0];De[0]=De[1],De[1]=r}function oT(r,t,e,i,n,a,o,s,l,u){if(u>t&&u>i&&u>a&&u>s||u<t&&u<i&&u<a&&u<s)return 0;var h=Ls(t,i,a,s,u,Qt);if(h===0)return 0;for(var c=0,f=-1,d=void 0,p=void 0,v=0;v<h;v++){var g=Qt[v],m=g===0||g===1?.5:1,_=Wt(r,e,n,o,g);_<l||(f<0&&(f=wy(t,i,a,s,De),De[1]<De[0]&&f>1&&aT(),d=Wt(t,i,a,s,De[0]),f>1&&(p=Wt(t,i,a,s,De[1]))),f===2?g<De[0]?c+=d<t?m:-m:g<De[1]?c+=p<d?m:-m:c+=s<p?m:-m:g<De[0]?c+=d<t?m:-m:c+=s<d?m:-m)}return c}function sT(r,t,e,i,n,a,o,s){if(s>t&&s>i&&s>a||s<t&&s<i&&s<a)return 0;var l=sS(t,i,a,s,Qt);if(l===0)return 0;var u=Sy(t,i,a);if(u>=0&&u<=1){for(var h=0,c=ce(t,i,a,u),f=0;f<l;f++){var d=Qt[f]===0||Qt[f]===1?.5:1,p=ce(r,e,n,Qt[f]);p<o||(Qt[f]<u?h+=c<t?d:-d:h+=a<c?d:-d)}return h}else{var d=Qt[0]===0||Qt[0]===1?.5:1,p=ce(r,e,n,Qt[0]);return p<o?0:a<t?d:-d}}function lT(r,t,e,i,n,a,o,s){if(s-=t,s>e||s<-e)return 0;var l=Math.sqrt(e*e-s*s);Qt[0]=-l,Qt[1]=l;var u=Math.abs(i-n);if(u<1e-4)return 0;if(u>=yi-1e-4){i=0,n=yi;var h=a?1:-1;return o>=Qt[0]+r&&o<=Qt[1]+r?h:0}if(i>n){var c=i;i=n,n=c}i<0&&(i+=yi,n+=yi);for(var f=0,d=0;d<2;d++){var p=Qt[d];if(p+r>o){var v=Math.atan2(s,p),h=a?1:-1;v<0&&(v=yi+v),(v>=i&&v<=n||v+yi>=i&&v+yi<=n)&&(v>Math.PI/2&&v<Math.PI*1.5&&(h=-h),f+=h)}}return f}function a0(r,t,e,i,n){for(var a=r.data,o=r.len(),s=0,l=0,u=0,h=0,c=0,f,d,p=0;p<o;){var v=a[p++],g=p===1;switch(v===Mr.M&&p>1&&(e||(s+=yr(l,u,h,c,i,n))),g&&(l=a[p],u=a[p+1],h=l,c=u),v){case Mr.M:h=a[p++],c=a[p++],l=h,u=c;break;case Mr.L:if(e){if(ln(l,u,a[p],a[p+1],t,i,n))return!0}else s+=yr(l,u,a[p],a[p+1],i,n)||0;l=a[p++],u=a[p++];break;case Mr.C:if(e){if(tT(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],t,i,n))return!0}else s+=oT(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],i,n)||0;l=a[p++],u=a[p++];break;case Mr.Q:if(e){if(eT(l,u,a[p++],a[p++],a[p],a[p+1],t,i,n))return!0}else s+=sT(l,u,a[p++],a[p++],a[p],a[p+1],i,n)||0;l=a[p++],u=a[p++];break;case Mr.A:var m=a[p++],_=a[p++],b=a[p++],x=a[p++],C=a[p++],S=a[p++];p+=1;var T=!!(1-a[p++]);f=Math.cos(C)*b+m,d=Math.sin(C)*x+_,g?(h=f,c=d):s+=yr(l,u,f,d,i,n);var M=(i-m)*x/b+m;if(e){if(rT(m,_,x,C,C+S,T,t,M,n))return!0}else s+=lT(m,_,x,C,C+S,T,M,n);l=Math.cos(C+S)*b+m,u=Math.sin(C+S)*x+_;break;case Mr.R:h=l=a[p++],c=u=a[p++];var D=a[p++],I=a[p++];if(f=h+D,d=c+I,e){if(ln(h,c,f,c,t,i,n)||ln(f,c,f,d,t,i,n)||ln(f,d,h,d,t,i,n)||ln(h,d,h,c,t,i,n))return!0}else s+=yr(f,c,f,d,i,n),s+=yr(h,d,h,c,i,n);break;case Mr.Z:if(e){if(ln(l,u,h,c,t,i,n))return!0}else s+=yr(l,u,h,c,i,n);l=h,u=c;break}}return!e&&!nT(u,c)&&(s+=yr(l,u,h,c,i,n)||0),s!==0}function uT(r,t,e){return a0(r,0,!1,t,e)}function hT(r,t,e,i){return a0(r,t,!0,e,i)}var Fs=lt({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Ni),cT={style:lt({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},ml.style)},Tu=Ya.concat(["invisible","culling","z","z2","zlevel","parent"]),bt=(function(r){F(t,r);function t(e){return r.call(this,e)||this}return t.prototype.update=function(){var e=this;r.prototype.update.call(this);var i=this.style;if(i.decal){var n=this._decalEl=this._decalEl||new t;n.buildPath===t.prototype.buildPath&&(n.buildPath=function(l){e.buildPath(l,e.shape)}),n.silent=!0;var a=n.style;for(var o in i)a[o]!==i[o]&&(a[o]=i[o]);a.fill=i.fill?i.decal:null,a.decal=null,a.shadowColor=null,i.strokeFirst&&(a.stroke=null);for(var s=0;s<Tu.length;++s)n[Tu[s]]=this[Tu[s]];n.__dirty|=nr}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(e){var i=vt(e);this.shape=this.getDefaultShape();var n=this.getDefaultStyle();n&&this.useStyle(n);for(var a=0;a<i.length;a++){var o=i[a],s=e[o];o==="style"?this.style?N(this.style,s):this.useStyle(s):o==="shape"?N(this.shape,s):r.prototype.attrKV.call(this,o,s)}this.style||this.useStyle({})},t.prototype.getDefaultStyle=function(){return null},t.prototype.getDefaultShape=function(){return{}},t.prototype.canBeInsideText=function(){return this.hasFill()},t.prototype.getInsideTextFill=function(){var e=this.style.fill;if(e!=="none"){if(U(e)){var i=$a(e,0);return i>.5?Hh:i>.2?HS:Wh}else if(e)return Wh}return Hh},t.prototype.getInsideTextStroke=function(e){var i=this.style.fill;if(U(i)){var n=this.__zr,a=!!(n&&n.isDarkMode()),o=$a(e,0)<Vh;if(a===o)return i}},t.prototype.buildPath=function(e,i,n){},t.prototype.pathUpdated=function(){this.__dirty&=~bn},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new Jr(!1)},t.prototype.hasStroke=function(){var e=this.style,i=e.stroke;return!(i==null||i==="none"||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style,i=e.fill;return i!=null&&i!=="none"},t.prototype.getBoundingRect=function(){var e=this._rect,i=this.style,n=!e;if(n){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&bn)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),e=o.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||n){s.copy(e);var l=i.strokeNoScale?this.getLineScale():1,u=i.lineWidth;if(!this.hasFill()){var h=this.strokeContainThreshold;u=Math.max(u,h??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 e},t.prototype.contain=function(e,i){var n=this.transformCoordToLocal(e,i),a=this.getBoundingRect(),o=this.style;if(e=n[0],i=n[1],a.contain(e,i)){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)),hT(s,l/u,e,i)))return!0}if(this.hasFill())return uT(s,e,i)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=bn,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){e==="style"?this.dirtyStyle():e==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(e,i){e==="shape"?this.setShape(i):r.prototype.attrKV.call(this,e,i)},t.prototype.setShape=function(e,i){var n=this.shape;return n||(n=this.shape={}),typeof e=="string"?n[e]=i:N(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&bn)},t.prototype.createStyle=function(e){return fo(Fs,e)},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var i=this._normalState;e.shape&&!i.shape&&(i.shape=N({},this.shape))},t.prototype._applyStateObj=function(e,i,n,a,o,s){r.prototype._applyStateObj.call(this,e,i,n,a,o,s);var l=!(i&&a),u;if(i&&i.shape?o?a?u=i.shape:(u=N({},n.shape),N(u,i.shape)):(u=N({},a?this.shape:n.shape),N(u,i.shape)):l&&(u=n.shape),u)if(o){this.shape=N({},this.shape);for(var h={},c=vt(u),f=0;f<c.length;f++){var d=c[f];typeof u[d]=="object"?this.shape[d]=u[d]:h[d]=u[d]}this._transitionState(e,{shape:h},s)}else this.shape=u,this.dirtyShape()},t.prototype._mergeStates=function(e){for(var i=r.prototype._mergeStates.call(this,e),n,a=0;a<e.length;a++){var o=e[a];o.shape&&(n=n||{},this._mergeStyle(n,o.shape))}return n&&(i.shape=n),i},t.prototype.getAnimationStyleProps=function(){return cT},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var i=(function(a){F(o,a);function o(s){var l=a.call(this,s)||this;return e.init&&e.init.call(l,s),l}return o.prototype.getDefaultStyle=function(){return it(e.style)},o.prototype.getDefaultShape=function(){return it(e.shape)},o})(t);for(var n in e)typeof e[n]=="function"&&(i.prototype[n]=e[n]);return i},t.initDefaultProps=(function(){var e=t.prototype;e.type="path",e.strokeContainThreshold=5,e.segmentIgnoreThreshold=0,e.subPixelOptimize=!1,e.autoBatch=!1,e.__dirty=nr|_a|bn})(),t})(_o),fT=lt({strokeFirst:!0,font:Zr,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},Fs),Ja=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.hasStroke=function(){var e=this.style,i=e.stroke;return i!=null&&i!=="none"&&e.lineWidth>0},t.prototype.hasFill=function(){var e=this.style,i=e.fill;return i!=null&&i!=="none"},t.prototype.createStyle=function(e){return fo(fT,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){var e=this.style;if(!this._rect){var i=e.text;i!=null?i+="":i="";var n=cl(i,e.font,e.textAlign,e.textBaseline);if(n.x+=e.x||0,n.y+=e.y||0,this.hasStroke()){var a=e.lineWidth;n.x-=a/2,n.y-=a/2,n.width+=a,n.height+=a}this._rect=n}return this._rect},t.initDefaultProps=(function(){var e=t.prototype;e.dirtyRectTolerance=10})(),t})(_o);Ja.prototype.type="tspan";var dT=lt({x:0,y:0},Ni),pT={style:lt({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},ml.style)};function vT(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var qe=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.createStyle=function(e){return fo(dT,e)},t.prototype._getSize=function(e){var i=this.style,n=i[e];if(n!=null)return n;var a=vT(i.image)?i.image:this.__image;if(!a)return 0;var o=e==="width"?"height":"width",s=i[o];return s==null?a[e]:a[e]/a[o]*s},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return pT},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new mt(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t})(_o);qe.prototype.type="image";function gT(r,t){var e=t.x,i=t.y,n=t.width,a=t.height,o=t.r,s,l,u,h;n<0&&(e=e+n,n=-n),a<0&&(i=i+a,a=-a),typeof o=="number"?s=l=u=h=o:o instanceof Array?o.length===1?s=l=u=h=o[0]:o.length===2?(s=u=o[0],l=h=o[1]):o.length===3?(s=o[0],l=h=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],h=o[3]):s=l=u=h=0;var c;s+l>n&&(c=s+l,s*=n/c,l*=n/c),u+h>n&&(c=u+h,u*=n/c,h*=n/c),l+u>a&&(c=l+u,l*=a/c,u*=a/c),s+h>a&&(c=s+h,s*=a/c,h*=a/c),r.moveTo(e+s,i),r.lineTo(e+n-l,i),l!==0&&r.arc(e+n-l,i+l,l,-Math.PI/2,0),r.lineTo(e+n,i+a-u),u!==0&&r.arc(e+n-u,i+a-u,u,0,Math.PI/2),r.lineTo(e+h,i+a),h!==0&&r.arc(e+h,i+a-h,h,Math.PI/2,Math.PI),r.lineTo(e,i+s),s!==0&&r.arc(e+s,i+s,s,Math.PI,Math.PI*1.5)}var Tn=Math.round;function o0(r,t,e){if(t){var i=t.x1,n=t.x2,a=t.y1,o=t.y2;r.x1=i,r.x2=n,r.y1=a,r.y2=o;var s=e&&e.lineWidth;return s&&(Tn(i*2)===Tn(n*2)&&(r.x1=r.x2=Li(i,s,!0)),Tn(a*2)===Tn(o*2)&&(r.y1=r.y2=Li(a,s,!0))),r}}function s0(r,t,e){if(t){var i=t.x,n=t.y,a=t.width,o=t.height;r.x=i,r.y=n,r.width=a,r.height=o;var s=e&&e.lineWidth;return s&&(r.x=Li(i,s,!0),r.y=Li(n,s,!0),r.width=Math.max(Li(i+a,s,!1)-r.x,a===0?0:1),r.height=Math.max(Li(n+o,s,!1)-r.y,o===0?0:1)),r}}function Li(r,t,e){if(!t)return r;var i=Tn(r*2);return(i+Tn(t))%2===0?i/2:(i+(e?1:-1))/2}var mT=(function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r})(),yT={},Ft=(function(r){F(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new mT},t.prototype.buildPath=function(e,i){var n,a,o,s;if(this.subPixelOptimize){var l=s0(yT,i,this.style);n=l.x,a=l.y,o=l.width,s=l.height,l.r=i.r,i=l}else n=i.x,a=i.y,o=i.width,s=i.height;i.r?gT(e,i):e.rect(n,a,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t})(bt);Ft.prototype.type="rect";var _p={fill:"#000"},bp=2,_T={style:lt({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},ml.style)},Vt=(function(r){F(t,r);function t(e){var i=r.call(this)||this;return i.type="text",i._children=[],i._defaultStyle=_p,i.attr(e),i}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;e<this._children.length;e++){var i=this._children[e];i.zlevel=this.zlevel,i.z=this.z,i.z2=this.z2,i.culling=this.culling,i.cursor=this.cursor,i.invisible=this.invisible}},t.prototype.updateTransform=function(){var e=this.innerTransformable;e?(e.updateTransform(),e.transform&&(this.transform=e.transform)):r.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(e){var i=this.innerTransformable;return i?i.getLocalTransform(e):r.prototype.getLocalTransform.call(this,e)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),r.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){this._childCursor=0,wT(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(e){r.prototype.addSelfToZr.call(this,e);for(var i=0;i<this._children.length;i++)this._children[i].__zr=e},t.prototype.removeSelfFromZr=function(e){r.prototype.removeSelfFromZr.call(this,e);for(var i=0;i<this._children.length;i++)this._children[i].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var e=new mt(0,0,0,0),i=this._children,n=[],a=null,o=0;o<i.length;o++){var s=i[o],l=s.getBoundingRect(),u=s.getLocalTransform(n);u?(e.copy(l),e.applyTransform(u),a=a||e.clone(),a.union(e)):(a=a||l.clone(),a.union(l))}this._rect=a||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||_p},t.prototype.setTextContent=function(e){},t.prototype._mergeStyle=function(e,i){if(!i)return e;var n=i.rich,a=e.rich||n&&{};return N(e,i),n&&a?(this._mergeRich(a,n),e.rich=a):a&&(e.rich=a),e},t.prototype._mergeRich=function(e,i){for(var n=vt(i),a=0;a<n.length;a++){var o=n[a];e[o]=e[o]||{},N(e[o],i[o])}},t.prototype.getAnimationStyleProps=function(){return _T},t.prototype._getOrCreateChild=function(e){var i=this._children[this._childCursor];return(!i||!(i instanceof e))&&(i=new e),this._children[this._childCursor++]=i,i.__zr=this.__zr,i.parent=this,i},t.prototype._updatePlainTexts=function(){var e=this.style,i=e.font||Zr,n=e.padding,a=Mp(e),o=VC(a,e),s=Au(e),l=!!e.backgroundColor,u=o.outerHeight,h=o.outerWidth,c=o.contentWidth,f=o.lines,d=o.lineHeight,p=this._defaultStyle;this.isTruncated=!!o.isTruncated;var v=e.x||0,g=e.y||0,m=e.align||p.align||"left",_=e.verticalAlign||p.verticalAlign||"top",b=v,x=xn(g,o.contentHeight,_);if(s||n){var C=xa(v,h,m),S=xn(g,u,_);s&&this._renderBackground(e,e,C,S,h,u)}x+=d/2,n&&(b=Ap(v,m,n),_==="top"?x+=n[0]:_==="bottom"&&(x-=n[2]));for(var T=0,M=!1,D=Tp("fill"in e?e.fill:(M=!0,p.fill)),I=Cp("stroke"in e?e.stroke:!l&&(!p.autoStroke||M)?(T=bp,p.stroke):null),P=e.textShadowBlur>0,k=e.width!=null&&(e.overflow==="truncate"||e.overflow==="break"||e.overflow==="breakAll"),R=o.calculatedLineHeight,L=0;L<f.length;L++){var j=this._getOrCreateChild(Ja),E=j.createStyle();j.useStyle(E),E.text=f[L],E.x=b,E.y=x,E.textAlign=m,E.textBaseline="middle",E.opacity=e.opacity,E.strokeFirst=!0,P&&(E.shadowBlur=e.textShadowBlur||0,E.shadowColor=e.textShadowColor||"transparent",E.shadowOffsetX=e.textShadowOffsetX||0,E.shadowOffsetY=e.textShadowOffsetY||0),E.stroke=I,E.fill=D,I&&(E.lineWidth=e.lineWidth||T,E.lineDash=e.lineDash,E.lineDashOffset=e.lineDashOffset||0),E.font=i,wp(E,e),x+=d,k&&j.setBoundingRect(new mt(xa(E.x,c,E.textAlign),xn(E.y,R,E.textBaseline),c,R))}},t.prototype._updateRichTexts=function(){var e=this.style,i=Mp(e),n=GC(i,e),a=n.width,o=n.outerWidth,s=n.outerHeight,l=e.padding,u=e.x||0,h=e.y||0,c=this._defaultStyle,f=e.align||c.align,d=e.verticalAlign||c.verticalAlign;this.isTruncated=!!n.isTruncated;var p=xa(u,o,f),v=xn(h,s,d),g=p,m=v;l&&(g+=l[3],m+=l[0]);var _=g+a;Au(e)&&this._renderBackground(e,e,p,v,o,s);for(var b=!!e.backgroundColor,x=0;x<n.lines.length;x++){for(var C=n.lines[x],S=C.tokens,T=S.length,M=C.lineHeight,D=C.width,I=0,P=g,k=_,R=T-1,L=void 0;I<T&&(L=S[I],!L.align||L.align==="left");)this._placeToken(L,e,M,m,P,"left",b),D-=L.width,P+=L.width,I++;for(;R>=0&&(L=S[R],L.align==="right");)this._placeToken(L,e,M,m,k,"right",b),D-=L.width,k-=L.width,R--;for(P+=(a-(P-g)-(_-k)-D)/2;I<=R;)L=S[I],this._placeToken(L,e,M,m,P+L.width/2,"center",b),P+=L.width,I++;m+=M}},t.prototype._placeToken=function(e,i,n,a,o,s,l){var u=i.rich[e.styleName]||{};u.text=e.text;var h=e.verticalAlign,c=a+n/2;h==="top"?c=a+e.height/2:h==="bottom"&&(c=a+n-e.height/2);var f=!e.isLineHolder&&Au(u);f&&this._renderBackground(u,i,s==="right"?o-e.width:s==="center"?o-e.width/2:o,c-e.height/2,e.width,e.height);var d=!!u.backgroundColor,p=e.textPadding;p&&(o=Ap(o,s,p),c-=e.height/2-p[0]-e.innerHeight/2);var v=this._getOrCreateChild(Ja),g=v.createStyle();v.useStyle(g);var m=this._defaultStyle,_=!1,b=0,x=Tp("fill"in u?u.fill:"fill"in i?i.fill:(_=!0,m.fill)),C=Cp("stroke"in u?u.stroke:"stroke"in i?i.stroke:!d&&!l&&(!m.autoStroke||_)?(b=bp,m.stroke):null),S=u.textShadowBlur>0||i.textShadowBlur>0;g.text=e.text,g.x=o,g.y=c,S&&(g.shadowBlur=u.textShadowBlur||i.textShadowBlur||0,g.shadowColor=u.textShadowColor||i.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||i.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||i.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=e.font||Zr,g.opacity=Ma(u.opacity,i.opacity,1),wp(g,u),C&&(g.lineWidth=Ma(u.lineWidth,i.lineWidth,b),g.lineDash=Q(u.lineDash,i.lineDash),g.lineDashOffset=i.lineDashOffset||0,g.stroke=C),x&&(g.fill=x);var T=e.contentWidth,M=e.contentHeight;v.setBoundingRect(new mt(xa(g.x,T,g.textAlign),xn(g.y,M,g.textBaseline),T,M))},t.prototype._renderBackground=function(e,i,n,a,o,s){var l=e.backgroundColor,u=e.borderWidth,h=e.borderColor,c=l&&l.image,f=l&&!c,d=e.borderRadius,p=this,v,g;if(f||e.lineHeight||u&&h){v=this._getOrCreateChild(Ft),v.useStyle(v.createStyle()),v.style.fill=null;var m=v.shape;m.x=n,m.y=a,m.width=o,m.height=s,m.r=d,v.dirtyShape()}if(f){var _=v.style;_.fill=l||null,_.fillOpacity=Q(e.fillOpacity,1)}else if(c){g=this._getOrCreateChild(qe),g.onload=function(){p.dirtyStyle()};var b=g.style;b.image=l.image,b.x=n,b.y=a,b.width=o,b.height=s}if(u&&h){var _=v.style;_.lineWidth=u,_.stroke=h,_.strokeOpacity=Q(e.strokeOpacity,1),_.lineDash=e.borderDash,_.lineDashOffset=e.borderDashOffset||0,v.strokeContainThreshold=0,v.hasFill()&&v.hasStroke()&&(_.strokeFirst=!0,_.lineWidth*=2)}var x=(v||g).style;x.shadowBlur=e.shadowBlur||0,x.shadowColor=e.shadowColor||"transparent",x.shadowOffsetX=e.shadowOffsetX||0,x.shadowOffsetY=e.shadowOffsetY||0,x.opacity=Ma(e.opacity,i.opacity,1)},t.makeFont=function(e){var i="";return u0(e)&&(i=[e.fontStyle,e.fontWeight,l0(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),i&&Ge(i)||e.textFont||e.font},t})(_o),bT={left:!0,right:1,center:1},xT={top:1,bottom:1,middle:1},xp=["fontStyle","fontWeight","fontSize","fontFamily"];function l0(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?Bc+"px":r+"px"}function wp(r,t){for(var e=0;e<xp.length;e++){var i=xp[e],n=t[i];n!=null&&(r[i]=n)}}function u0(r){return r.fontSize!=null||r.fontFamily||r.fontWeight}function wT(r){return Sp(r),A(r.rich,Sp),r}function Sp(r){if(r){r.font=Vt.makeFont(r);var t=r.align;t==="middle"&&(t="center"),r.align=t==null||bT[t]?t:"left";var e=r.verticalAlign;e==="center"&&(e="middle"),r.verticalAlign=e==null||xT[e]?e:"top";var i=r.padding;i&&(r.padding=$c(r.padding))}}function Cp(r,t){return r==null||t<=0||r==="transparent"||r==="none"?null:r.image||r.colorStops?"#000":r}function Tp(r){return r==null||r==="none"?null:r.image||r.colorStops?"#000":r}function Ap(r,t,e){return t==="right"?r-e[1]:t==="center"?r+e[3]/2-e[1]/2:r+e[3]}function Mp(r){var t=r.text;return t!=null&&(t+=""),t}function Au(r){return!!(r.backgroundColor||r.lineHeight||r.borderWidth&&r.borderColor)}var _t=kt(),ST=function(r,t,e,i){if(i){var n=_t(i);n.dataIndex=e,n.dataType=t,n.seriesIndex=r,n.ssrType="chart",i.type==="group"&&i.traverse(function(a){var o=_t(a);o.seriesIndex=r,o.dataIndex=e,o.dataType=t,o.ssrType="chart"})}},Dp=1,Ip={},h0=kt(),uf=kt(),hf=0,yl=1,_l=2,hr=["emphasis","blur","select"],Pp=["normal","emphasis","blur","select"],CT=10,TT=9,Fi="highlight",ms="downplay",Ra="select",ys="unselect",La="toggleSelect";function un(r){return r!=null&&r!=="none"}function bl(r,t,e){r.onHoverStateChange&&(r.hoverState||0)!==e&&r.onHoverStateChange(t),r.hoverState=e}function c0(r){bl(r,"emphasis",_l)}function f0(r){r.hoverState===_l&&bl(r,"normal",hf)}function cf(r){bl(r,"blur",yl)}function d0(r){r.hoverState===yl&&bl(r,"normal",hf)}function AT(r){r.selected=!0}function MT(r){r.selected=!1}function kp(r,t,e){t(r,e)}function wr(r,t,e){kp(r,t,e),r.isGroup&&r.traverse(function(i){kp(i,t,e)})}function Rp(r,t){switch(t){case"emphasis":r.hoverState=_l;break;case"normal":r.hoverState=hf;break;case"blur":r.hoverState=yl;break;case"select":r.selected=!0}}function DT(r,t,e,i){for(var n=r.style,a={},o=0;o<t.length;o++){var s=t[o],l=n[s];a[s]=l??(i&&i[s])}for(var o=0;o<r.animators.length;o++){var u=r.animators[o];u.__fromStateTransition&&u.__fromStateTransition.indexOf(e)<0&&u.targetName==="style"&&u.saveTo(a,t)}return a}function IT(r,t,e,i){var n=e&&pt(e,"select")>=0,a=!1;if(r instanceof bt){var o=h0(r),s=n&&o.selectFill||o.normalFill,l=n&&o.selectStroke||o.normalStroke;if(un(s)||un(l)){i=i||{};var u=i.style||{};u.fill==="inherit"?(a=!0,i=N({},i),u=N({},u),u.fill=s):!un(u.fill)&&un(s)?(a=!0,i=N({},i),u=N({},u),u.fill=js(s)):!un(u.stroke)&&un(l)&&(a||(i=N({},i),u=N({},u)),u.stroke=js(l)),i.style=u}}if(i&&i.z2==null){a||(i=N({},i));var h=r.z2EmphasisLift;i.z2=r.z2+(h??CT)}return i}function PT(r,t,e){if(e&&e.z2==null){e=N({},e);var i=r.z2SelectLift;e.z2=r.z2+(i??TT)}return e}function kT(r,t,e){var i=pt(r.currentStates,t)>=0,n=r.style.opacity,a=i?null:DT(r,["opacity"],t,{opacity:1});e=e||{};var o=e.style||{};return o.opacity==null&&(e=N({},e),o=N({opacity:i?n:a.opacity*.1},o),e.style=o),e}function Mu(r,t){var e=this.states[r];if(this.style){if(r==="emphasis")return IT(this,r,t,e);if(r==="blur")return kT(this,r,e);if(r==="select")return PT(this,r,e)}return e}function RT(r){r.stateProxy=Mu;var t=r.getTextContent(),e=r.getTextGuideLine();t&&(t.stateProxy=Mu),e&&(e.stateProxy=Mu)}function Lp(r,t){!m0(r,t)&&!r.__highByOuter&&wr(r,c0)}function Op(r,t){!m0(r,t)&&!r.__highByOuter&&wr(r,f0)}function Nn(r,t){r.__highByOuter|=1<<(t||0),wr(r,c0)}function Fn(r,t){!(r.__highByOuter&=~(1<<(t||0)))&&wr(r,f0)}function LT(r){wr(r,cf)}function p0(r){wr(r,d0)}function v0(r){wr(r,AT)}function g0(r){wr(r,MT)}function m0(r,t){return r.__highDownSilentOnTouch&&t.zrByTouch}function y0(r){var t=r.getModel(),e=[],i=[];t.eachComponent(function(n,a){var o=uf(a),s=n==="series",l=s?r.getViewOfSeriesModel(a):r.getViewOfComponentModel(a);!s&&i.push(l),o.isBlured&&(l.group.traverse(function(u){d0(u)}),s&&e.push(a)),o.isBlured=!1}),A(i,function(n){n&&n.toggleBlurSeries&&n.toggleBlurSeries(e,!1,t)})}function Zh(r,t,e,i){var n=i.getModel();e=e||"coordinateSystem";function a(u,h){for(var c=0;c<h.length;c++){var f=u.getItemGraphicEl(h[c]);f&&p0(f)}}if(r!=null&&!(!t||t==="none")){var o=n.getSeriesByIndex(r),s=o.coordinateSystem;s&&s.master&&(s=s.master);var l=[];n.eachSeries(function(u){var h=o===u,c=u.coordinateSystem;c&&c.master&&(c=c.master);var f=c&&s?c===s:h;if(!(e==="series"&&!h||e==="coordinateSystem"&&!f||t==="series"&&h)){var d=i.getViewOfSeriesModel(u);if(d.group.traverse(function(g){g.__highByOuter&&h&&t==="self"||cf(g)}),ae(t))a(u.getData(),t);else if(q(t))for(var p=vt(t),v=0;v<p.length;v++)a(u.getData(p[v]),t[p[v]]);l.push(u),uf(u).isBlured=!0}}),n.eachComponent(function(u,h){if(u!=="series"){var c=i.getViewOfComponentModel(h);c&&c.toggleBlurSeries&&c.toggleBlurSeries(l,!0,n)}})}}function qh(r,t,e){if(!(r==null||t==null)){var i=e.getModel().getComponent(r,t);if(i){uf(i).isBlured=!0;var n=e.getViewOfComponentModel(i);!n||!n.focusBlurEnabled||n.group.traverse(function(a){cf(a)})}}}function OT(r,t,e){var i=r.seriesIndex,n=r.getData(t.dataType);if(n){var a=Wi(n,t);a=(W(a)?a[0]:a)||0;var o=n.getItemGraphicEl(a);if(!o)for(var s=n.count(),l=0;!o&&l<s;)o=n.getItemGraphicEl(l++);if(o){var u=_t(o);Zh(i,u.focus,u.blurScope,e)}else{var h=r.get(["emphasis","focus"]),c=r.get(["emphasis","blurScope"]);h!=null&&Zh(i,h,c,e)}}}function ff(r,t,e,i){var n={focusSelf:!1,dispatchers:null};if(r==null||r==="series"||t==null||e==null)return n;var a=i.getModel().getComponent(r,t);if(!a)return n;var o=i.getViewOfComponentModel(a);if(!o||!o.findHighDownDispatchers)return n;for(var s=o.findHighDownDispatchers(e),l,u=0;u<s.length;u++)if(_t(s[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:s}}function ET(r,t,e){var i=_t(r),n=ff(i.componentMainType,i.componentIndex,i.componentHighDownName,e),a=n.dispatchers,o=n.focusSelf;a?(o&&qh(i.componentMainType,i.componentIndex,e),A(a,function(s){return Lp(s,t)})):(Zh(i.seriesIndex,i.focus,i.blurScope,e),i.focus==="self"&&qh(i.componentMainType,i.componentIndex,e),Lp(r,t))}function jT(r,t,e){y0(e);var i=_t(r),n=ff(i.componentMainType,i.componentIndex,i.componentHighDownName,e).dispatchers;n?A(n,function(a){return Op(a,t)}):Op(r,t)}function NT(r,t,e){if(Qh(t)){var i=t.dataType,n=r.getData(i),a=Wi(n,t);W(a)||(a=[a]),r[t.type===La?"toggleSelect":t.type===Ra?"select":"unselect"](a,i)}}function Ep(r){var t=r.getAllData();A(t,function(e){var i=e.data,n=e.type;i.eachItemGraphicEl(function(a,o){r.isSelected(o,n)?v0(a):g0(a)})})}function FT(r){var t=[];return r.eachSeries(function(e){var i=e.getAllData();A(i,function(n){n.data;var a=n.type,o=e.getSelectedDataIndices();if(o.length>0){var s={dataIndex:o,seriesIndex:e.seriesIndex};a!=null&&(s.dataType=a),t.push(s)}})}),t}function Oa(r,t,e){_0(r,!0),wr(r,RT),zT(r,t,e)}function BT(r){_0(r,!1)}function Kh(r,t,e,i){i?BT(r):Oa(r,t,e)}function zT(r,t,e){var i=_t(r);t!=null?(i.focus=t,i.blurScope=e):i.focus&&(i.focus=null)}var jp=["emphasis","blur","select"],VT={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Np(r,t,e,i){e=e||"itemStyle";for(var n=0;n<jp.length;n++){var a=jp[n],o=t.getModel([a,e]),s=r.ensureState(a);s.style=o[VT[e]]()}}function _0(r,t){var e=t===!1,i=r;r.highDownSilentOnTouch&&(i.__highDownSilentOnTouch=r.highDownSilentOnTouch),(!e||i.__highDownDispatcher)&&(i.__highByOuter=i.__highByOuter||0,i.__highDownDispatcher=!e)}function Jh(r){return!!(r&&r.__highDownDispatcher)}function HT(r){var t=Ip[r];return t==null&&Dp<=32&&(t=Ip[r]=Dp++),t}function Qh(r){var t=r.type;return t===Ra||t===ys||t===La}function Fp(r){var t=r.type;return t===Fi||t===ms}function WT(r){var t=h0(r);t.normalFill=r.style.fill,t.normalStroke=r.style.stroke;var e=r.states.select||{};t.selectFill=e.style&&e.style.fill||null,t.selectStroke=e.style&&e.style.stroke||null}var hn=Jr.CMD,GT=[[],[],[]],Bp=Math.sqrt,$T=Math.atan2;function UT(r,t){if(t){var e=r.data,i=r.len(),n,a,o,s,l,u,h=hn.M,c=hn.C,f=hn.L,d=hn.R,p=hn.A,v=hn.Q;for(o=0,s=0;o<i;){switch(n=e[o++],s=o,a=0,n){case h:a=1;break;case f:a=1;break;case c:a=3;break;case v:a=2;break;case p:var g=t[4],m=t[5],_=Bp(t[0]*t[0]+t[1]*t[1]),b=Bp(t[2]*t[2]+t[3]*t[3]),x=$T(-t[1]/b,t[0]/_);e[o]*=_,e[o++]+=g,e[o]*=b,e[o++]+=m,e[o++]*=_,e[o++]*=b,e[o++]+=x,e[o++]+=x,o+=2,s=o;break;case d:u[0]=e[o++],u[1]=e[o++],ie(u,u,t),e[s++]=u[0],e[s++]=u[1],u[0]+=e[o++],u[1]+=e[o++],ie(u,u,t),e[s++]=u[0],e[s++]=u[1]}for(l=0;l<a;l++){var C=GT[l];C[0]=e[o++],C[1]=e[o++],ie(C,C,t),e[s++]=C[0],e[s++]=C[1]}}r.increaseVersion()}}var Du=Math.sqrt,Wo=Math.sin,Go=Math.cos,aa=Math.PI;function zp(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function tc(r,t){return(r[0]*t[0]+r[1]*t[1])/(zp(r)*zp(t))}function Vp(r,t){return(r[0]*t[1]<r[1]*t[0]?-1:1)*Math.acos(tc(r,t))}function Hp(r,t,e,i,n,a,o,s,l,u,h){var c=l*(aa/180),f=Go(c)*(r-e)/2+Wo(c)*(t-i)/2,d=-1*Wo(c)*(r-e)/2+Go(c)*(t-i)/2,p=f*f/(o*o)+d*d/(s*s);p>1&&(o*=Du(p),s*=Du(p));var v=(n===a?-1:1)*Du((o*o*(s*s)-o*o*(d*d)-s*s*(f*f))/(o*o*(d*d)+s*s*(f*f)))||0,g=v*o*d/s,m=v*-s*f/o,_=(r+e)/2+Go(c)*g-Wo(c)*m,b=(t+i)/2+Wo(c)*g+Go(c)*m,x=Vp([1,0],[(f-g)/o,(d-m)/s]),C=[(f-g)/o,(d-m)/s],S=[(-1*f-g)/o,(-1*d-m)/s],T=Vp(C,S);if(tc(C,S)<=-1&&(T=aa),tc(C,S)>=1&&(T=0),T<0){var M=Math.round(T/aa*1e6)/1e6;T=aa*2+M%2*aa}h.addData(u,_,b,o,s,x,T,c,a)}var YT=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,XT=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function ZT(r){var t=new Jr;if(!r)return t;var e=0,i=0,n=e,a=i,o,s=Jr.CMD,l=r.match(YT);if(!l)return t;for(var u=0;u<l.length;u++){for(var h=l[u],c=h.charAt(0),f=void 0,d=h.match(XT)||[],p=d.length,v=0;v<p;v++)d[v]=parseFloat(d[v]);for(var g=0;g<p;){var m=void 0,_=void 0,b=void 0,x=void 0,C=void 0,S=void 0,T=void 0,M=e,D=i,I=void 0,P=void 0;switch(c){case"l":e+=d[g++],i+=d[g++],f=s.L,t.addData(f,e,i);break;case"L":e=d[g++],i=d[g++],f=s.L,t.addData(f,e,i);break;case"m":e+=d[g++],i+=d[g++],f=s.M,t.addData(f,e,i),n=e,a=i,c="l";break;case"M":e=d[g++],i=d[g++],f=s.M,t.addData(f,e,i),n=e,a=i,c="L";break;case"h":e+=d[g++],f=s.L,t.addData(f,e,i);break;case"H":e=d[g++],f=s.L,t.addData(f,e,i);break;case"v":i+=d[g++],f=s.L,t.addData(f,e,i);break;case"V":i=d[g++],f=s.L,t.addData(f,e,i);break;case"C":f=s.C,t.addData(f,d[g++],d[g++],d[g++],d[g++],d[g++],d[g++]),e=d[g-2],i=d[g-1];break;case"c":f=s.C,t.addData(f,d[g++]+e,d[g++]+i,d[g++]+e,d[g++]+i,d[g++]+e,d[g++]+i),e+=d[g-2],i+=d[g-1];break;case"S":m=e,_=i,I=t.len(),P=t.data,o===s.C&&(m+=e-P[I-4],_+=i-P[I-3]),f=s.C,M=d[g++],D=d[g++],e=d[g++],i=d[g++],t.addData(f,m,_,M,D,e,i);break;case"s":m=e,_=i,I=t.len(),P=t.data,o===s.C&&(m+=e-P[I-4],_+=i-P[I-3]),f=s.C,M=e+d[g++],D=i+d[g++],e+=d[g++],i+=d[g++],t.addData(f,m,_,M,D,e,i);break;case"Q":M=d[g++],D=d[g++],e=d[g++],i=d[g++],f=s.Q,t.addData(f,M,D,e,i);break;case"q":M=d[g++]+e,D=d[g++]+i,e+=d[g++],i+=d[g++],f=s.Q,t.addData(f,M,D,e,i);break;case"T":m=e,_=i,I=t.len(),P=t.data,o===s.Q&&(m+=e-P[I-4],_+=i-P[I-3]),e=d[g++],i=d[g++],f=s.Q,t.addData(f,m,_,e,i);break;case"t":m=e,_=i,I=t.len(),P=t.data,o===s.Q&&(m+=e-P[I-4],_+=i-P[I-3]),e+=d[g++],i+=d[g++],f=s.Q,t.addData(f,m,_,e,i);break;case"A":b=d[g++],x=d[g++],C=d[g++],S=d[g++],T=d[g++],M=e,D=i,e=d[g++],i=d[g++],f=s.A,Hp(M,D,e,i,S,T,b,x,C,f,t);break;case"a":b=d[g++],x=d[g++],C=d[g++],S=d[g++],T=d[g++],M=e,D=i,e+=d[g++],i+=d[g++],f=s.A,Hp(M,D,e,i,S,T,b,x,C,f,t);break}}(c==="z"||c==="Z")&&(f=s.Z,t.addData(f),e=n,i=a),o=f}return t.toStatic(),t}var b0=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.applyTransform=function(e){},t})(bt);function x0(r){return r.setData!=null}function w0(r,t){var e=ZT(r),i=N({},t);return i.buildPath=function(n){if(x0(n)){n.setData(e.data);var a=n.getContext();a&&n.rebuildPath(a,1)}else{var a=n;e.rebuildPath(a,1)}},i.applyTransform=function(n){UT(e,n),this.dirtyShape()},i}function qT(r,t){return new b0(w0(r,t))}function KT(r,t){var e=w0(r,t),i=(function(n){F(a,n);function a(o){var s=n.call(this,o)||this;return s.applyTransform=e.applyTransform,s.buildPath=e.buildPath,s}return a})(b0);return i}function JT(r,t){for(var e=[],i=r.length,n=0;n<i;n++){var a=r[n];e.push(a.getUpdatedPathProxy(!0))}var o=new bt(t);return o.createPathProxy(),o.buildPath=function(s){if(x0(s)){s.appendPath(e);var l=s.getContext();l&&s.rebuildPath(l,1)}},o}var QT=(function(){function r(){this.cx=0,this.cy=0,this.r=0}return r})(),bo=(function(r){F(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new QT},t.prototype.buildPath=function(e,i){e.moveTo(i.cx+i.r,i.cy),e.arc(i.cx,i.cy,i.r,0,Math.PI*2)},t})(bt);bo.prototype.type="circle";var tA=(function(){function r(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return r})(),xl=(function(r){F(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new tA},t.prototype.buildPath=function(e,i){var n=.5522848,a=i.cx,o=i.cy,s=i.rx,l=i.ry,u=s*n,h=l*n;e.moveTo(a-s,o),e.bezierCurveTo(a-s,o-h,a-u,o-l,a,o-l),e.bezierCurveTo(a+u,o-l,a+s,o-h,a+s,o),e.bezierCurveTo(a+s,o+h,a+u,o+l,a,o+l),e.bezierCurveTo(a-u,o+l,a-s,o+h,a-s,o),e.closePath()},t})(bt);xl.prototype.type="ellipse";var S0=Math.PI,Iu=S0*2,_i=Math.sin,cn=Math.cos,eA=Math.acos,Ut=Math.atan2,Wp=Math.abs,Ea=Math.sqrt,wa=Math.max,er=Math.min,ze=1e-4;function rA(r,t,e,i,n,a,o,s){var l=e-r,u=i-t,h=o-n,c=s-a,f=c*l-h*u;if(!(f*f<ze))return f=(h*(t-a)-c*(r-n))/f,[r+f*l,t+f*u]}function $o(r,t,e,i,n,a,o){var s=r-e,l=t-i,u=(o?a:-a)/Ea(s*s+l*l),h=u*l,c=-u*s,f=r+h,d=t+c,p=e+h,v=i+c,g=(f+p)/2,m=(d+v)/2,_=p-f,b=v-d,x=_*_+b*b,C=n-a,S=f*v-p*d,T=(b<0?-1:1)*Ea(wa(0,C*C*x-S*S)),M=(S*b-_*T)/x,D=(-S*_-b*T)/x,I=(S*b+_*T)/x,P=(-S*_+b*T)/x,k=M-g,R=D-m,L=I-g,j=P-m;return k*k+R*R>L*L+j*j&&(M=I,D=P),{cx:M,cy:D,x0:-h,y0:-c,x1:M*(n/C-1),y1:D*(n/C-1)}}function iA(r){var t;if(W(r)){var e=r.length;if(!e)return r;e===1?t=[r[0],r[0],0,0]:e===2?t=[r[0],r[0],r[1],r[1]]:e===3?t=r.concat(r[2]):t=r}else t=[r,r,r,r];return t}function nA(r,t){var e,i=wa(t.r,0),n=wa(t.r0||0,0),a=i>0,o=n>0;if(!(!a&&!o)){if(a||(i=n,n=0),n>i){var s=i;i=n,n=s}var l=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var h=t.cx,c=t.cy,f=!!t.clockwise,d=Wp(u-l),p=d>Iu&&d%Iu;if(p>ze&&(d=p),!(i>ze))r.moveTo(h,c);else if(d>Iu-ze)r.moveTo(h+i*cn(l),c+i*_i(l)),r.arc(h,c,i,l,u,!f),n>ze&&(r.moveTo(h+n*cn(u),c+n*_i(u)),r.arc(h,c,n,u,l,f));else{var v=void 0,g=void 0,m=void 0,_=void 0,b=void 0,x=void 0,C=void 0,S=void 0,T=void 0,M=void 0,D=void 0,I=void 0,P=void 0,k=void 0,R=void 0,L=void 0,j=i*cn(l),E=i*_i(l),Z=n*cn(u),G=n*_i(u),Y=d>ze;if(Y){var et=t.cornerRadius;et&&(e=iA(et),v=e[0],g=e[1],m=e[2],_=e[3]);var ut=Wp(i-n)/2;if(b=er(ut,m),x=er(ut,_),C=er(ut,v),S=er(ut,g),D=T=wa(b,x),I=M=wa(C,S),(T>ze||M>ze)&&(P=i*cn(u),k=i*_i(u),R=n*cn(l),L=n*_i(l),d<S0)){var ot=rA(j,E,R,L,P,k,Z,G);if(ot){var ft=j-ot[0],gt=E-ot[1],B=P-ot[0],Rt=k-ot[1],Mt=1/_i(eA((ft*B+gt*Rt)/(Ea(ft*ft+gt*gt)*Ea(B*B+Rt*Rt)))/2),Lt=Ea(ot[0]*ot[0]+ot[1]*ot[1]);D=er(T,(i-Lt)/(Mt+1)),I=er(M,(n-Lt)/(Mt-1))}}}if(!Y)r.moveTo(h+j,c+E);else if(D>ze){var xt=er(m,D),z=er(_,D),X=$o(R,L,j,E,i,xt,f),K=$o(P,k,Z,G,i,z,f);r.moveTo(h+X.cx+X.x0,c+X.cy+X.y0),D<T&&xt===z?r.arc(h+X.cx,c+X.cy,D,Ut(X.y0,X.x0),Ut(K.y0,K.x0),!f):(xt>0&&r.arc(h+X.cx,c+X.cy,xt,Ut(X.y0,X.x0),Ut(X.y1,X.x1),!f),r.arc(h,c,i,Ut(X.cy+X.y1,X.cx+X.x1),Ut(K.cy+K.y1,K.cx+K.x1),!f),z>0&&r.arc(h+K.cx,c+K.cy,z,Ut(K.y1,K.x1),Ut(K.y0,K.x0),!f))}else r.moveTo(h+j,c+E),r.arc(h,c,i,l,u,!f);if(!(n>ze)||!Y)r.lineTo(h+Z,c+G);else if(I>ze){var xt=er(v,I),z=er(g,I),X=$o(Z,G,P,k,n,-z,f),K=$o(j,E,R,L,n,-xt,f);r.lineTo(h+X.cx+X.x0,c+X.cy+X.y0),I<M&&xt===z?r.arc(h+X.cx,c+X.cy,I,Ut(X.y0,X.x0),Ut(K.y0,K.x0),!f):(z>0&&r.arc(h+X.cx,c+X.cy,z,Ut(X.y0,X.x0),Ut(X.y1,X.x1),!f),r.arc(h,c,n,Ut(X.cy+X.y1,X.cx+X.x1),Ut(K.cy+K.y1,K.cx+K.x1),f),xt>0&&r.arc(h+K.cx,c+K.cy,xt,Ut(K.y1,K.x1),Ut(K.y0,K.x0),!f))}else r.lineTo(h+Z,c+G),r.arc(h,c,n,u,l,f)}r.closePath()}}}var aA=(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})(),xo=(function(r){F(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new aA},t.prototype.buildPath=function(e,i){nA(e,i)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t})(bt);xo.prototype.type="sector";var oA=(function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r})(),wl=(function(r){F(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new oA},t.prototype.buildPath=function(e,i){var n=i.cx,a=i.cy,o=Math.PI*2;e.moveTo(n+i.r,a),e.arc(n,a,i.r,0,o,!1),e.moveTo(n+i.r0,a),e.arc(n,a,i.r0,0,o,!0)},t})(bt);wl.prototype.type="ring";function sA(r,t,e,i){var n=[],a=[],o=[],s=[],l,u,h,c;if(i){h=[1/0,1/0],c=[-1/0,-1/0];for(var f=0,d=r.length;f<d;f++)Nr(h,h,r[f]),Fr(c,c,r[f]);Nr(h,h,i[0]),Fr(c,c,i[1])}for(var f=0,d=r.length;f<d;f++){var p=r[f];if(e)l=r[f?f-1:d-1],u=r[(f+1)%d];else if(f===0||f===d-1){n.push(ly(r[f]));continue}else l=r[f-1],u=r[f+1];uy(a,u,l),hs(a,a,t);var v=ks(p,l),g=ks(p,u),m=v+g;m!==0&&(v/=m,g/=m),hs(o,a,-v),hs(s,a,g);var _=Ah([],p,o),b=Ah([],p,s);i&&(Fr(_,_,h),Nr(_,_,c),Fr(b,b,h),Nr(b,b,c)),n.push(_),n.push(b)}return e&&n.push(n.shift()),n}function C0(r,t,e){var i=t.smooth,n=t.points;if(n&&n.length>=2){if(i){var a=sA(n,i,e,t.smoothConstraint);r.moveTo(n[0][0],n[0][1]);for(var o=n.length,s=0;s<(e?o:o-1);s++){var l=a[s*2],u=a[s*2+1],h=n[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{r.moveTo(n[0][0],n[0][1]);for(var s=1,c=n.length;s<c;s++)r.lineTo(n[s][0],n[s][1])}e&&r.closePath()}}var lA=(function(){function r(){this.points=null,this.smooth=0,this.smoothConstraint=null}return r})(),wo=(function(r){F(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new lA},t.prototype.buildPath=function(e,i){C0(e,i,!0)},t})(bt);wo.prototype.type="polygon";var uA=(function(){function r(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return r})(),So=(function(r){F(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new uA},t.prototype.buildPath=function(e,i){C0(e,i,!1)},t})(bt);So.prototype.type="polyline";var hA={},cA=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r})(),Xe=(function(r){F(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new cA},t.prototype.buildPath=function(e,i){var n,a,o,s;if(this.subPixelOptimize){var l=o0(hA,i,this.style);n=l.x1,a=l.y1,o=l.x2,s=l.y2}else n=i.x1,a=i.y1,o=i.x2,s=i.y2;var u=i.percent;u!==0&&(e.moveTo(n,a),u<1&&(o=n*(1-u)+o*u,s=a*(1-u)+s*u),e.lineTo(o,s))},t.prototype.pointAt=function(e){var i=this.shape;return[i.x1*(1-e)+i.x2*e,i.y1*(1-e)+i.y2*e]},t})(bt);Xe.prototype.type="line";var le=[],fA=(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 Gp(r,t,e){var i=r.cpx2,n=r.cpy2;return i!=null||n!=null?[(e?$d:Wt)(r.x1,r.cpx1,r.cpx2,r.x2,t),(e?$d:Wt)(r.y1,r.cpy1,r.cpy2,r.y2,t)]:[(e?Ud:ce)(r.x1,r.cpx1,r.x2,t),(e?Ud:ce)(r.y1,r.cpy1,r.y2,t)]}var Sl=(function(r){F(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new fA},t.prototype.buildPath=function(e,i){var n=i.x1,a=i.y1,o=i.x2,s=i.y2,l=i.cpx1,u=i.cpy1,h=i.cpx2,c=i.cpy2,f=i.percent;f!==0&&(e.moveTo(n,a),h==null||c==null?(f<1&&(Es(n,l,o,f,le),l=le[1],o=le[2],Es(a,u,s,f,le),u=le[1],s=le[2]),e.quadraticCurveTo(l,u,o,s)):(f<1&&(Os(n,l,h,o,f,le),l=le[1],h=le[2],o=le[3],Os(a,u,c,s,f,le),u=le[1],c=le[2],s=le[3]),e.bezierCurveTo(l,u,h,c,o,s)))},t.prototype.pointAt=function(e){return Gp(this.shape,e,!1)},t.prototype.tangentAt=function(e){var i=Gp(this.shape,e,!0);return hy(i,i)},t})(bt);Sl.prototype.type="bezier-curve";var dA=(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})(),Co=(function(r){F(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new dA},t.prototype.buildPath=function(e,i){var n=i.cx,a=i.cy,o=Math.max(i.r,0),s=i.startAngle,l=i.endAngle,u=i.clockwise,h=Math.cos(s),c=Math.sin(s);e.moveTo(h*o+n,c*o+a),e.arc(n,a,o,s,l,!u)},t})(bt);Co.prototype.type="arc";var df=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="compound",e}return t.prototype._updatePathDirty=function(){for(var e=this.shape.paths,i=this.shapeChanged(),n=0;n<e.length;n++)i=i||e[n].shapeChanged();i&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],i=this.getGlobalScale(),n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(i[0],i[1],e[n].segmentIgnoreThreshold)},t.prototype.buildPath=function(e,i){for(var n=i.paths||[],a=0;a<n.length;a++)n[a].buildPath(e,n[a].shape,!0)},t.prototype.afterBrush=function(){for(var e=this.shape.paths||[],i=0;i<e.length;i++)e[i].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),bt.prototype.getBoundingRect.call(this)},t})(bt),T0=(function(){function r(t){this.colorStops=t||[]}return r.prototype.addColorStop=function(t,e){this.colorStops.push({offset:t,color:e})},r})(),pf=(function(r){F(t,r);function t(e,i,n,a,o,s){var l=r.call(this,o)||this;return l.x=e??0,l.y=i??0,l.x2=n??1,l.y2=a??0,l.type="linear",l.global=s||!1,l}return t})(T0),A0=(function(r){F(t,r);function t(e,i,n,a,o){var s=r.call(this,a)||this;return s.x=e??.5,s.y=i??.5,s.r=n??.5,s.type="radial",s.global=o||!1,s}return t})(T0),bi=[0,0],xi=[0,0],Uo=new wt,Yo=new wt,Bs=(function(){function r(t,e){this._corners=[],this._axes=[],this._origin=[0,0];for(var i=0;i<4;i++)this._corners[i]=new wt;for(var i=0;i<2;i++)this._axes[i]=new wt;t&&this.fromBoundingRect(t,e)}return r.prototype.fromBoundingRect=function(t,e){var i=this._corners,n=this._axes,a=t.x,o=t.y,s=a+t.width,l=o+t.height;if(i[0].set(a,o),i[1].set(s,o),i[2].set(s,l),i[3].set(a,l),e)for(var u=0;u<4;u++)i[u].transform(e);wt.sub(n[0],i[1],i[0]),wt.sub(n[1],i[3],i[0]),n[0].normalize(),n[1].normalize();for(var u=0;u<2;u++)this._origin[u]=n[u].dot(i[0])},r.prototype.intersect=function(t,e){var i=!0,n=!e;return Uo.set(1/0,1/0),Yo.set(0,0),!this._intersectCheckOneSide(this,t,Uo,Yo,n,1)&&(i=!1,n)||!this._intersectCheckOneSide(t,this,Uo,Yo,n,-1)&&(i=!1,n)||n||wt.copy(e,i?Uo:Yo),i},r.prototype._intersectCheckOneSide=function(t,e,i,n,a,o){for(var s=!0,l=0;l<2;l++){var u=this._axes[l];if(this._getProjMinMaxOnAxis(l,t._corners,bi),this._getProjMinMaxOnAxis(l,e._corners,xi),bi[1]<xi[0]||bi[0]>xi[1]){if(s=!1,a)return s;var h=Math.abs(xi[0]-bi[1]),c=Math.abs(bi[0]-xi[1]);Math.min(h,c)>n.len()&&(h<c?wt.scale(n,u,-h*o):wt.scale(n,u,c*o))}else if(i){var h=Math.abs(xi[0]-bi[1]),c=Math.abs(bi[0]-xi[1]);Math.min(h,c)<i.len()&&(h<c?wt.scale(i,u,h*o):wt.scale(i,u,-c*o))}}return s},r.prototype._getProjMinMaxOnAxis=function(t,e,i){for(var n=this._axes[t],a=this._origin,o=e[0].dot(n)+a[t],s=o,l=o,u=1;u<e.length;u++){var h=e[u].dot(n)+a[t];s=Math.min(h,s),l=Math.max(h,l)}i[0]=s,i[1]=l},r})(),pA=[],M0=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.notClear=!0,e.incremental=!0,e._displayables=[],e._temporaryDisplayables=[],e._cursor=0,e}return t.prototype.traverse=function(e,i){e.call(i,this)},t.prototype.useStyle=function(){this.style={}},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(e,i){i?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,i){i=i||!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],i)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(e){for(var i=this._cursor;i<this._displayables.length;i++)e&&e(this._displayables[i]);for(var i=0;i<this._temporaryDisplayables.length;i++)e&&e(this._temporaryDisplayables[i])},t.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){var i=this._displayables[e];i.parent=this,i.update(),i.parent=null}for(var e=0;e<this._temporaryDisplayables.length;e++){var i=this._temporaryDisplayables[e];i.parent=this,i.update(),i.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new mt(1/0,1/0,-1/0,-1/0),i=0;i<this._displayables.length;i++){var n=this._displayables[i],a=n.getBoundingRect().clone();n.needLocalTransform()&&a.applyTransform(n.getLocalTransform(pA)),e.union(a)}this._rect=e}return this._rect},t.prototype.contain=function(e,i){var n=this.transformCoordToLocal(e,i),a=this.getBoundingRect();if(a.contain(n[0],n[1]))for(var o=0;o<this._displayables.length;o++){var s=this._displayables[o];if(s.contain(e,i))return!0}return!1},t})(_o),vA=kt();function gA(r,t,e,i,n){var a;if(t&&t.ecModel){var o=t.ecModel.getUpdatePayload();a=o&&o.animation}var s=t&&t.isAnimationEnabled(),l=r==="update";if(s){var u=void 0,h=void 0,c=void 0;i?(u=Q(i.duration,200),h=Q(i.easing,"cubicOut"),c=0):(u=t.getShallow(l?"animationDurationUpdate":"animationDuration"),h=t.getShallow(l?"animationEasingUpdate":"animationEasing"),c=t.getShallow(l?"animationDelayUpdate":"animationDelay")),a&&(a.duration!=null&&(u=a.duration),a.easing!=null&&(h=a.easing),a.delay!=null&&(c=a.delay)),tt(c)&&(c=c(e,n)),tt(u)&&(u=u(e));var f={duration:u||0,delay:c,easing:h};return f}else return null}function vf(r,t,e,i,n,a,o){var s=!1,l;tt(n)?(o=a,a=n,n=null):q(n)&&(a=n.cb,o=n.during,s=n.isFrom,l=n.removeOpt,n=n.dataIndex);var u=r==="leave";u||t.stopAnimation("leave");var h=gA(r,i,n,u?l||{}:null,i&&i.getAnimationDelayParams?i.getAnimationDelayParams(t,n):null);if(h&&h.duration>0){var c=h.duration,f=h.delay,d=h.easing,p={duration:c,delay:f||0,easing:d,done:a,force:!!a||!!o,setToFinal:!u,scope:r,during:o};s?t.animateFrom(e,p):t.animateTo(e,p)}else t.stopAnimation(),!s&&t.attr(e),o&&o(1),a&&a()}function Qr(r,t,e,i,n,a){vf("update",r,t,e,i,n,a)}function Yn(r,t,e,i,n,a){vf("enter",r,t,e,i,n,a)}function ja(r){if(!r.__zr)return!0;for(var t=0;t<r.animators.length;t++){var e=r.animators[t];if(e.scope==="leave")return!0}return!1}function zs(r,t,e,i,n,a){ja(r)||vf("leave",r,t,e,i,n,a)}function $p(r,t,e,i){r.removeTextContent(),r.removeTextGuideLine(),zs(r,{style:{opacity:0}},t,e,i)}function mA(r,t,e){function i(){r.parent&&r.parent.remove(r)}r.isGroup?r.traverse(function(n){n.isGroup||$p(n,t,e,i)}):$p(r,t,e,i)}function yA(r){vA(r).oldStyle=r.style}var Vs=Math.max,Hs=Math.min,ec={};function D0(r){return bt.extend(r)}var _A=KT;function I0(r,t){return _A(r,t)}function Oe(r,t){ec[r]=t}function P0(r){if(ec.hasOwnProperty(r))return ec[r]}function Cl(r,t,e,i){var n=qT(r,t);return e&&(i==="center"&&(e=k0(e,n.getBoundingRect())),mf(n,e)),n}function gf(r,t,e){var i=new qe({style:{image:r,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(n){if(e==="center"){var a={width:n.width,height:n.height};i.setStyle(k0(t,a))}}});return i}function k0(r,t){var e=t.width/t.height,i=r.height*e,n;i<=r.width?n=r.height:(i=r.width,n=i/e);var a=r.x+r.width/2,o=r.y+r.height/2;return{x:a-i/2,y:o-n/2,width:i,height:n}}var R0=JT;function mf(r,t){if(r.applyTransform){var e=r.getBoundingRect(),i=e.calculateTransform(t);r.applyTransform(i)}}function Qa(r,t){return o0(r,r,{lineWidth:t}),r}function bA(r){return s0(r.shape,r.shape,r.style),r}var xA=Li;function Tl(r,t){for(var e=po([]);r&&r!==t;)$r(e,r.getLocalTransform(),e),r=r.parent;return e}function Al(r,t,e){return t&&!ae(t)&&(t=tf.getLocalTransform(t)),e&&(t=go([],t)),ie([],r,t)}function L0(r,t,e){var i=t[4]===0||t[5]===0||t[0]===0?1:Math.abs(2*t[4]/t[0]),n=t[4]===0||t[5]===0||t[2]===0?1:Math.abs(2*t[4]/t[2]),a=[r==="left"?-i:r==="right"?i:0,r==="top"?-n:r==="bottom"?n:0];return a=Al(a,t,e),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function Up(r){return!r.isGroup}function wA(r){return r.shape!=null}function O0(r,t,e){if(!r||!t)return;function i(o){var s={};return o.traverse(function(l){Up(l)&&l.anid&&(s[l.anid]=l)}),s}function n(o){var s={x:o.x,y:o.y,rotation:o.rotation};return wA(o)&&(s.shape=N({},o.shape)),s}var a=i(r);t.traverse(function(o){if(Up(o)&&o.anid){var s=a[o.anid];if(s){var l=n(o);o.attr(n(s)),Qr(o,l,e,_t(o).dataIndex)}}})}function yf(r,t){return V(r,function(e){var i=e[0];i=Vs(i,t.x),i=Hs(i,t.x+t.width);var n=e[1];return n=Vs(n,t.y),n=Hs(n,t.y+t.height),[i,n]})}function E0(r,t){var e=Vs(r.x,t.x),i=Hs(r.x+r.width,t.x+t.width),n=Vs(r.y,t.y),a=Hs(r.y+r.height,t.y+t.height);if(i>=e&&a>=n)return{x:e,y:n,width:i-e,height:a-n}}function To(r,t,e){var i=N({rectHover:!0},t),n=i.style={strokeNoScale:!0};if(e=e||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(n.image=r.slice(8),lt(n,e),new qe(i)):Cl(r.replace("path://",""),i,e,"center")}function SA(r,t,e,i,n){for(var a=0,o=n[n.length-1];a<n.length;a++){var s=n[a];if(j0(r,t,e,i,s[0],s[1],o[0],o[1]))return!0;o=s}}function j0(r,t,e,i,n,a,o,s){var l=e-r,u=i-t,h=o-n,c=s-a,f=Pu(h,c,l,u);if(CA(f))return!1;var d=r-n,p=t-a,v=Pu(d,p,l,u)/f;if(v<0||v>1)return!1;var g=Pu(d,p,h,c)/f;return!(g<0||g>1)}function Pu(r,t,e,i){return r*i-e*t}function CA(r){return r<=1e-6&&r>=-1e-6}function Ml(r){var t=r.itemTooltipOption,e=r.componentModel,i=r.itemName,n=U(t)?{formatter:t}:t,a=e.mainType,o=e.componentIndex,s={componentType:a,name:i,$vars:["name"]};s[a+"Index"]=o;var l=r.formatterParamsExtra;l&&A(vt(l),function(h){Hi(s,h)||(s[h]=l[h],s.$vars.push(h))});var u=_t(r.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:i,option:lt({content:i,encodeHTMLContent:!0,formatterParams:s},n)}}function Yp(r,t){var e;r.isGroup&&(e=t(r)),e||r.traverse(t)}function _f(r,t){if(r)if(W(r))for(var e=0;e<r.length;e++)Yp(r[e],t);else Yp(r,t)}Oe("circle",bo);Oe("ellipse",xl);Oe("sector",xo);Oe("ring",wl);Oe("polygon",wo);Oe("polyline",So);Oe("rect",Ft);Oe("line",Xe);Oe("bezierCurve",Sl);Oe("arc",Co);const TA=Object.freeze(Object.defineProperty({__proto__:null,Arc:Co,BezierCurve:Sl,BoundingRect:mt,Circle:bo,CompoundPath:df,Ellipse:xl,Group:Bt,Image:qe,IncrementalDisplayable:M0,Line:Xe,LinearGradient:pf,OrientedBoundingRect:Bs,Path:bt,Point:wt,Polygon:wo,Polyline:So,RadialGradient:A0,Rect:Ft,Ring:wl,Sector:xo,Text:Vt,applyTransform:Al,clipPointsByRect:yf,clipRectByRect:E0,createIcon:To,extendPath:I0,extendShape:D0,getShapeClass:P0,getTransform:Tl,groupTransition:O0,initProps:Yn,isElementRemoved:ja,lineLineIntersect:j0,linePolygonIntersect:SA,makeImage:gf,makePath:Cl,mergePath:R0,registerShape:Oe,removeElement:zs,removeElementWithFadeOut:mA,resizePath:mf,setTooltipConfig:Ml,subPixelOptimize:xA,subPixelOptimizeLine:Qa,subPixelOptimizeRect:bA,transformDirection:L0,traverseElements:_f,updateProps:Qr},Symbol.toStringTag,{value:"Module"}));var Dl={};function AA(r,t){for(var e=0;e<hr.length;e++){var i=hr[e],n=t[i],a=r.ensureState(i);a.style=a.style||{},a.style.text=n}var o=r.currentStates.slice();r.clearStates(!0),r.setStyle({text:t.normal}),r.useStates(o,!0)}function Xp(r,t,e){var i=r.labelFetcher,n=r.labelDataIndex,a=r.labelDimIndex,o=t.normal,s;i&&(s=i.getFormattedLabel(n,"normal",null,a,o&&o.get("formatter"),e!=null?{interpolatedValue:e}:null)),s==null&&(s=tt(r.defaultText)?r.defaultText(n,r,e):r.defaultText);for(var l={normal:s},u=0;u<hr.length;u++){var h=hr[u],c=t[h];l[h]=Q(i?i.getFormattedLabel(n,h,null,a,c&&c.get("formatter")):null,s)}return l}function N0(r,t,e,i){e=e||Dl;for(var n=r instanceof Vt,a=!1,o=0;o<Pp.length;o++){var s=t[Pp[o]];if(s&&s.getShallow("show")){a=!0;break}}var l=n?r:r.getTextContent();if(a){n||(l||(l=new Vt,r.setTextContent(l)),r.stateProxy&&(l.stateProxy=r.stateProxy));var u=Xp(e,t),h=t.normal,c=!!h.getShallow("show"),f=Ye(h,i&&i.normal,e,!1,!n);f.text=u.normal,n||r.setTextConfig(Zp(h,e,!1));for(var o=0;o<hr.length;o++){var d=hr[o],s=t[d];if(s){var p=l.ensureState(d),v=!!Q(s.getShallow("show"),c);if(v!==c&&(p.ignore=!v),p.style=Ye(s,i&&i[d],e,!0,!n),p.style.text=u[d],!n){var g=r.ensureState(d);g.textConfig=Zp(s,e,!0)}}}l.silent=!!h.getShallow("silent"),l.style.x!=null&&(f.x=l.style.x),l.style.y!=null&&(f.y=l.style.y),l.ignore=!c,l.useStyle(f),l.dirty(),e.enableTextSetter&&(B0(l).setLabelText=function(m){var _=Xp(e,t,m);AA(l,_)})}else l&&(l.ignore=!0);r.dirty()}function bf(r,t){t=t||"label";for(var e={normal:r.getModel(t)},i=0;i<hr.length;i++){var n=hr[i];e[n]=r.getModel([n,t])}return e}function Ye(r,t,e,i,n){var a={};return MA(a,r,e,i,n),t&&N(a,t),a}function Zp(r,t,e){t=t||{};var i={},n,a=r.getShallow("rotate"),o=Q(r.getShallow("distance"),e?null:5),s=r.getShallow("offset");return n=r.getShallow("position")||(e?null:"inside"),n==="outside"&&(n=t.defaultOutsidePosition||"top"),n!=null&&(i.position=n),s!=null&&(i.offset=s),a!=null&&(a*=Math.PI/180,i.rotation=a),o!=null&&(i.distance=o),i.outsideFill=r.get("color")==="inherit"?t.inheritColor||null:"auto",i}function MA(r,t,e,i,n){e=e||Dl;var a=t.ecModel,o=a&&a.option.textStyle,s=DA(t),l;if(s){l={};for(var u in s)if(s.hasOwnProperty(u)){var h=t.getModel(["rich",u]);Qp(l[u]={},h,o,e,i,n,!1,!0)}}l&&(r.rich=l);var c=t.get("overflow");c&&(r.overflow=c);var f=t.get("minMargin");f!=null&&(r.margin=f),Qp(r,t,o,e,i,n,!0,!1)}function DA(r){for(var t;r&&r!==r.ecModel;){var e=(r.option||Dl).rich;if(e){t=t||{};for(var i=vt(e),n=0;n<i.length;n++){var a=i[n];t[a]=1}}r=r.parentModel}return t}var qp=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],Kp=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],Jp=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function Qp(r,t,e,i,n,a,o,s){e=!n&&e||Dl;var l=i&&i.inheritColor,u=t.getShallow("color"),h=t.getShallow("textBorderColor"),c=Q(t.getShallow("opacity"),e.opacity);(u==="inherit"||u==="auto")&&(l?u=l:u=null),(h==="inherit"||h==="auto")&&(l?h=l:h=null),a||(u=u||e.color,h=h||e.textBorderColor),u!=null&&(r.fill=u),h!=null&&(r.stroke=h);var f=Q(t.getShallow("textBorderWidth"),e.textBorderWidth);f!=null&&(r.lineWidth=f);var d=Q(t.getShallow("textBorderType"),e.textBorderType);d!=null&&(r.lineDash=d);var p=Q(t.getShallow("textBorderDashOffset"),e.textBorderDashOffset);p!=null&&(r.lineDashOffset=p),!n&&c==null&&!s&&(c=i&&i.defaultOpacity),c!=null&&(r.opacity=c),!n&&!a&&r.fill==null&&i.inheritColor&&(r.fill=i.inheritColor);for(var v=0;v<qp.length;v++){var g=qp[v],m=Q(t.getShallow(g),e[g]);m!=null&&(r[g]=m)}for(var v=0;v<Kp.length;v++){var g=Kp[v],m=t.getShallow(g);m!=null&&(r[g]=m)}if(r.verticalAlign==null){var _=t.getShallow("baseline");_!=null&&(r.verticalAlign=_)}if(!o||!i.disableBox){for(var v=0;v<Jp.length;v++){var g=Jp[v],m=t.getShallow(g);m!=null&&(r[g]=m)}var b=t.getShallow("borderType");b!=null&&(r.borderDash=b),(r.backgroundColor==="auto"||r.backgroundColor==="inherit")&&l&&(r.backgroundColor=l),(r.borderColor==="auto"||r.borderColor==="inherit")&&l&&(r.borderColor=l)}}function F0(r,t){var e=t&&t.getModel("textStyle");return Ge([r.fontStyle||e&&e.getShallow("fontStyle")||"",r.fontWeight||e&&e.getShallow("fontWeight")||"",(r.fontSize||e&&e.getShallow("fontSize")||12)+"px",r.fontFamily||e&&e.getShallow("fontFamily")||"sans-serif"].join(" "))}var B0=kt(),IA=["textStyle","color"],ku=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],Ru=new Vt,PA=(function(){function r(){}return r.prototype.getTextColor=function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(IA):null)},r.prototype.getFont=function(){return F0({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},r.prototype.getTextRect=function(t){for(var e={text:t,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},i=0;i<ku.length;i++)e[ku[i]]=this.getShallow(ku[i]);return Ru.useStyle(e),Ru.update(),Ru.getBoundingRect()},r})(),z0=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],kA=Ka(z0),RA=(function(){function r(){}return r.prototype.getLineStyle=function(t){return kA(this,t)},r})(),V0=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],LA=Ka(V0),OA=(function(){function r(){}return r.prototype.getItemStyle=function(t,e){return LA(this,t,e)},r})(),Tt=(function(){function r(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}return r.prototype.init=function(t,e,i){},r.prototype.mergeOption=function(t,e){st(this.option,t,!0)},r.prototype.get=function(t,e){return t==null?this.option:this._doGet(this.parsePath(t),!e&&this.parentModel)},r.prototype.getShallow=function(t,e){var i=this.option,n=i==null?i:i[t];if(n==null&&!e){var a=this.parentModel;a&&(n=a.getShallow(t))}return n},r.prototype.getModel=function(t,e){var i=t!=null,n=i?this.parsePath(t):null,a=i?this._doGet(n):this.option;return e=e||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(n)),new r(a,e,this.ecModel)},r.prototype.isEmpty=function(){return this.option==null},r.prototype.restoreData=function(){},r.prototype.clone=function(){var t=this.constructor;return new t(it(this.option))},r.prototype.parsePath=function(t){return typeof t=="string"?t.split("."):t},r.prototype.resolveParentPath=function(t){return t},r.prototype.isAnimationEnabled=function(){if(!J.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},r.prototype._doGet=function(t,e){var i=this.option;if(!t)return i;for(var n=0;n<t.length&&!(t[n]&&(i=i&&typeof i=="object"?i[t[n]]:null,i==null));n++);return i==null&&e&&(i=e._doGet(this.resolveParentPath(t),e.parentModel)),i},r})();sf(Tt);RC(Tt);xe(Tt,RA);xe(Tt,OA);xe(Tt,NC);xe(Tt,PA);var EA=Math.round(Math.random()*10);function Ao(r){return[r||"",EA++].join("_")}function jA(r){var t={};r.registerSubTypeDefaulter=function(e,i){var n=sr(e);t[n.main]=i},r.determineSubType=function(e,i){var n=i.type;if(!n){var a=sr(e).main;r.hasSubTypes(e)&&t[a]&&(n=t[a](i))}return n}}function NA(r,t){r.topologicalTravel=function(a,o,s,l){if(!a.length)return;var u=e(o),h=u.graph,c=u.noEntryList,f={};for(A(a,function(_){f[_]=!0});c.length;){var d=c.pop(),p=h[d],v=!!f[d];v&&(s.call(l,d,p.originalDeps.slice()),delete f[d]),A(p.successor,v?m:g)}A(f,function(){var _="";throw new Error(_)});function g(_){h[_].entryCount--,h[_].entryCount===0&&c.push(_)}function m(_){f[_]=!0,g(_)}};function e(a){var o={},s=[];return A(a,function(l){var u=i(o,l),h=u.originalDeps=t(l),c=n(h,a);u.entryCount=c.length,u.entryCount===0&&s.push(l),A(c,function(f){pt(u.predecessor,f)<0&&u.predecessor.push(f);var d=i(o,f);pt(d.successor,f)<0&&d.successor.push(l)})}),{graph:o,noEntryList:s}}function i(a,o){return a[o]||(a[o]={predecessor:[],successor:[]}),a[o]}function n(a,o){var s=[];return A(a,function(l){pt(o,l)>=0&&s.push(l)}),s}}function FA(r,t){return st(st({},r,!0),t,!0)}const BA={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:". "}}}},zA={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 Ws="ZH",xf="EN",Rn=xf,_s={},wf={},H0=J.domSupported?(function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||Rn).toUpperCase();return r.indexOf(Ws)>-1?Ws:Rn})():Rn;function Sf(r,t){r=r.toUpperCase(),wf[r]=new Tt(t),_s[r]=t}function VA(r){if(U(r)){var t=_s[r.toUpperCase()]||{};return r===Ws||r===xf?it(t):st(it(t),it(_s[Rn]),!1)}else return st(it(r),it(_s[Rn]),!1)}function HA(r){return wf[r]}function WA(){return wf[Rn]}Sf(xf,BA);Sf(Ws,zA);var Cf=1e3,Tf=Cf*60,Na=Tf*60,Re=Na*24,tv=Re*365,Sa={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},Xo="{yyyy}-{MM}-{dd}",ev={year:"{yyyy}",month:"{yyyy}-{MM}",day:Xo,hour:Xo+" "+Sa.hour,minute:Xo+" "+Sa.minute,second:Xo+" "+Sa.second,millisecond:Sa.none},Lu=["year","month","day","hour","minute","second","millisecond"],W0=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function te(r,t){return r+="","0000".substr(0,t-r.length)+r}function Ln(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 GA(r){return r===Ln(r)}function $A(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Mo(r,t,e,i){var n=Le(r),a=n[Af(e)](),o=n[On(e)]()+1,s=Math.floor((o-1)/3)+1,l=n[Il(e)](),u=n["get"+(e?"UTC":"")+"Day"](),h=n[to(e)](),c=(h-1)%12+1,f=n[Pl(e)](),d=n[kl(e)](),p=n[Rl(e)](),v=h>=12?"pm":"am",g=v.toUpperCase(),m=i instanceof Tt?i:HA(i||H0)||WA(),_=m.getModel("time"),b=_.get("month"),x=_.get("monthAbbr"),C=_.get("dayOfWeek"),S=_.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,v+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,te(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,b[o-1]).replace(/{MMM}/g,x[o-1]).replace(/{MM}/g,te(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,te(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,C[u]).replace(/{ee}/g,S[u]).replace(/{e}/g,u+"").replace(/{HH}/g,te(h,2)).replace(/{H}/g,h+"").replace(/{hh}/g,te(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,te(f,2)).replace(/{m}/g,f+"").replace(/{ss}/g,te(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,te(p,3)).replace(/{S}/g,p+"")}function UA(r,t,e,i,n){var a=null;if(U(e))a=e;else if(tt(e))a=e(r.value,t,{level:r.level});else{var o=N({},Sa);if(r.level>0)for(var s=0;s<Lu.length;++s)o[Lu[s]]="{primary|"+o[Lu[s]]+"}";var l=e?e.inherit===!1?e:lt(e,o):o,u=G0(r.value,n);if(l[u])a=l[u];else if(l.inherit){for(var h=W0.indexOf(u),s=h-1;s>=0;--s)if(l[u]){a=l[u];break}a=a||o.none}if(W(a)){var c=r.level==null?0:r.level>=0?r.level:a.length+r.level;c=Math.min(c,a.length-1),a=a[c]}}return Mo(new Date(r.value),a,n,i)}function G0(r,t){var e=Le(r),i=e[On(t)]()+1,n=e[Il(t)](),a=e[to(t)](),o=e[Pl(t)](),s=e[kl(t)](),l=e[Rl(t)](),u=l===0,h=u&&s===0,c=h&&o===0,f=c&&a===0,d=f&&n===1,p=d&&i===1;return p?"year":d?"month":f?"day":c?"hour":h?"minute":u?"second":"millisecond"}function rv(r,t,e){var i=At(r)?Le(r):r;switch(t=t||G0(r,e),t){case"year":return i[Af(e)]();case"half-year":return i[On(e)]()>=6?1:0;case"quarter":return Math.floor((i[On(e)]()+1)/4);case"month":return i[On(e)]();case"day":return i[Il(e)]();case"half-day":return i[to(e)]()/24;case"hour":return i[to(e)]();case"minute":return i[Pl(e)]();case"second":return i[kl(e)]();case"millisecond":return i[Rl(e)]()}}function Af(r){return r?"getUTCFullYear":"getFullYear"}function On(r){return r?"getUTCMonth":"getMonth"}function Il(r){return r?"getUTCDate":"getDate"}function to(r){return r?"getUTCHours":"getHours"}function Pl(r){return r?"getUTCMinutes":"getMinutes"}function kl(r){return r?"getUTCSeconds":"getSeconds"}function Rl(r){return r?"getUTCMilliseconds":"getMilliseconds"}function YA(r){return r?"setUTCFullYear":"setFullYear"}function $0(r){return r?"setUTCMonth":"setMonth"}function U0(r){return r?"setUTCDate":"setDate"}function Y0(r){return r?"setUTCHours":"setHours"}function X0(r){return r?"setUTCMinutes":"setMinutes"}function Z0(r){return r?"setUTCSeconds":"setSeconds"}function q0(r){return r?"setUTCMilliseconds":"setMilliseconds"}function XA(r,t,e,i,n,a,o,s){var l=new Vt({style:{text:r,font:t,align:e,verticalAlign:i,padding:n,rich:a,overflow:o?"truncate":null,lineHeight:s}});return l.getBoundingRect()}function Mf(r){if(!$y(r))return U(r)?r:"-";var t=(r+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function Df(r,t){return r=(r||"").toLowerCase().replace(/-(.)/g,function(e,i){return i.toUpperCase()}),t&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var Do=$c;function rc(r,t,e){var i="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function n(h){return h&&Ge(h)?h:"-"}function a(h){return!!(h!=null&&!isNaN(h)&&isFinite(h))}var o=t==="time",s=r instanceof Date;if(o||s){var l=o?Le(r):r;if(isNaN(+l)){if(s)return"-"}else return Mo(l,i,e)}if(t==="ordinal")return Is(r)?n(r):At(r)&&a(r)?r+"":"-";var u=Za(r);return a(u)?Mf(u):Is(r)?n(r):typeof r=="boolean"?r+"":"-"}var iv=["a","b","c","d","e","f","g"],Ou=function(r,t){return"{"+r+(t??"")+"}"};function If(r,t,e){W(t)||(t=[t]);var i=t.length;if(!i)return"";for(var n=t[0].$vars||[],a=0;a<n.length;a++){var o=iv[a];r=r.replace(Ou(o),Ou(o,0))}for(var s=0;s<i;s++)for(var l=0;l<n.length;l++){var u=t[s][n[l]];r=r.replace(Ou(iv[l],s),e?Kt(u):u)}return r}function K0(r,t){var e=U(r)?{color:r,extraCssText:t}:r||{},i=e.color,n=e.type;t=e.extraCssText;var a=e.renderMode||"html";if(!i)return"";if(a==="html")return n==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Kt(i)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+Kt(i)+";"+(t||"")+'"></span>';var o=e.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:n==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}}function ZA(r,t,e){(r==="week"||r==="month"||r==="quarter"||r==="half-year"||r==="year")&&(r=`MM-dd
|
|
31
|
+
yyyy`);var i=Le(t),n=e?"getUTC":"get",a=i[n+"FullYear"](),o=i[n+"Month"]()+1,s=i[n+"Date"](),l=i[n+"Hours"](),u=i[n+"Minutes"](),h=i[n+"Seconds"](),c=i[n+"Milliseconds"]();return r=r.replace("MM",te(o,2)).replace("M",o).replace("yyyy",a).replace("yy",te(a%100+"",2)).replace("dd",te(s,2)).replace("d",s).replace("hh",te(l,2)).replace("h",l).replace("mm",te(u,2)).replace("m",u).replace("ss",te(h,2)).replace("s",h).replace("SSS",te(c,3)),r}function qA(r){return r&&r.charAt(0).toUpperCase()+r.substr(1)}function Gi(r,t){return t=t||"transparent",U(r)?r:q(r)&&r.colorStops&&(r.colorStops[0]||{}).color||t}function nv(r,t){if(t==="_blank"||t==="blank"){var e=window.open();e.opener=null,e.location.href=r}else window.open(r,t)}var bs=A,KA=["left","right","top","bottom","width","height"],Zo=[["width","left","right"],["height","top","bottom"]];function Pf(r,t,e,i,n){var a=0,o=0;i==null&&(i=1/0),n==null&&(n=1/0);var s=0;t.eachChild(function(l,u){var h=l.getBoundingRect(),c=t.childAt(u+1),f=c&&c.getBoundingRect(),d,p;if(r==="horizontal"){var v=h.width+(f?-f.x+h.x:0);d=a+v,d>i||l.newline?(a=0,d=v,o+=s+e,s=h.height):s=Math.max(s,h.height)}else{var g=h.height+(f?-f.y+h.y:0);p=o+g,p>n||l.newline?(a+=s+e,o=0,p=g,s=h.width):s=Math.max(s,h.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),r==="horizontal"?a=d+e:o=p+e)})}var JA=Pf;Ct(Pf,"vertical");Ct(Pf,"horizontal");function Ki(r,t,e){e=Do(e||0);var i=t.width,n=t.height,a=ee(r.left,i),o=ee(r.top,n),s=ee(r.right,i),l=ee(r.bottom,n),u=ee(r.width,i),h=ee(r.height,n),c=e[2]+e[0],f=e[1]+e[3],d=r.aspect;switch(isNaN(u)&&(u=i-s-f-a),isNaN(h)&&(h=n-l-c-o),d!=null&&(isNaN(u)&&isNaN(h)&&(d>i/n?u=i*.8:h=n*.8),isNaN(u)&&(u=d*h),isNaN(h)&&(h=u/d)),isNaN(a)&&(a=i-s-u-f),isNaN(o)&&(o=n-l-h-c),r.left||r.right){case"center":a=i/2-u/2-e[3];break;case"right":a=i-u-f;break}switch(r.top||r.bottom){case"middle":case"center":o=n/2-h/2-e[0];break;case"bottom":o=n-h-c;break}a=a||0,o=o||0,isNaN(u)&&(u=i-f-a-(s||0)),isNaN(h)&&(h=n-c-o-(l||0));var p=new mt(a+e[3],o+e[0],u,h);return p.margin=e,p}function QA(r,t,e,i,n,a){a=a||r,a.x=r.x,a.y=r.y;var o;if(o=r.getBoundingRect(),r.needLocalTransform()){var s=r.getLocalTransform();o=o.clone(),o.applyTransform(s)}var l=Ki(lt({width:o.width,height:o.height},t),e,i),u=l.x-o.x,h=l.y-o.y;return a.x+=u,a.y+=h,a===r&&r.markRedraw(),!0}function eo(r){var t=r.layoutMode||r.constructor.layoutMode;return q(t)?t:t?{type:t}:null}function ro(r,t,e){var i=e&&e.ignoreSize;!W(i)&&(i=[i,i]);var n=o(Zo[0],0),a=o(Zo[1],1);u(Zo[0],r,n),u(Zo[1],r,a);function o(h,c){var f={},d=0,p={},v=0,g=2;if(bs(h,function(b){p[b]=r[b]}),bs(h,function(b){s(t,b)&&(f[b]=p[b]=t[b]),l(f,b)&&d++,l(p,b)&&v++}),i[c])return l(t,h[1])?p[h[2]]=null:l(t,h[2])&&(p[h[1]]=null),p;if(v===g||!d)return p;if(d>=g)return f;for(var m=0;m<h.length;m++){var _=h[m];if(!s(f,_)&&s(r,_)){f[_]=r[_];break}}return f}function s(h,c){return h.hasOwnProperty(c)}function l(h,c){return h[c]!=null&&h[c]!=="auto"}function u(h,c,f){bs(h,function(d){c[d]=f[d]})}}function kf(r){return tM({},r)}function tM(r,t){return t&&r&&bs(KA,function(e){t.hasOwnProperty(e)&&(r[e]=t[e])}),r}var eM=kt(),dt=(function(r){F(t,r);function t(e,i,n){var a=r.call(this,e,i,n)||this;return a.uid=Ao("ec_cpt_model"),a}return t.prototype.init=function(e,i,n){this.mergeDefaultAndTheme(e,n)},t.prototype.mergeDefaultAndTheme=function(e,i){var n=eo(this),a=n?kf(e):{},o=i.getTheme();st(e,o.get(this.mainType)),st(e,this.getDefaultOption()),n&&ro(e,a,n)},t.prototype.mergeOption=function(e,i){st(this.option,e,!0);var n=eo(this);n&&ro(this.option,e,n)},t.prototype.optionUpdated=function(e,i){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!IC(e))return e.defaultOption;var i=eM(this);if(!i.defaultOption){for(var n=[],a=e;a;){var o=a.prototype.defaultOption;o&&n.push(o),a=a.superClass}for(var s={},l=n.length-1;l>=0;l--)s=st(s,n[l],!0);i.defaultOption=s}return i.defaultOption},t.prototype.getReferringComponents=function(e,i){var n=e+"Index",a=e+"Id";return yo(this.ecModel,e,{index:this.get(n,!0),id:this.get(a,!0)},i)},t.prototype.getBoxLayoutParams=function(){var e=this;return{left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=(function(){var e=t.prototype;e.type="component",e.id="",e.name="",e.mainType="",e.subType="",e.componentIndex=0})(),t})(Tt);t0(dt,Tt);vl(dt);jA(dt);NA(dt,rM);function rM(r){var t=[];return A(dt.getClassesByMainType(r),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=V(t,function(e){return sr(e).main}),r!=="dataset"&&pt(t,"dataset")<=0&&t.unshift("dataset"),t}var J0="";typeof navigator<"u"&&(J0=navigator.platform||"");var fn="rgba(0, 0, 0, 0.2)";const iM={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:fn,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:fn,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:fn,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:fn,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:fn,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:fn,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:J0.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 Q0=nt(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Ee="original",pe="arrayRows",fr="objectRows",Sr="keyedColumns",Yr="typedArray",t_="unknown",xr="column",Xn="row",ge={Must:1,Might:2,Not:3},e_=kt();function nM(r){e_(r).datasetMap=nt()}function aM(r,t,e){var i={},n=r_(t);if(!n||!r)return i;var a=[],o=[],s=t.ecModel,l=e_(s).datasetMap,u=n.uid+"_"+e.seriesLayoutBy,h,c;r=r.slice(),A(r,function(v,g){var m=q(v)?v:r[g]={name:v};m.type==="ordinal"&&h==null&&(h=g,c=p(m)),i[m.name]=[]});var f=l.get(u)||l.set(u,{categoryWayDim:c,valueWayDim:0});A(r,function(v,g){var m=v.name,_=p(v);if(h==null){var b=f.valueWayDim;d(i[m],b,_),d(o,b,_),f.valueWayDim+=_}else if(h===g)d(i[m],0,_),d(a,0,_);else{var b=f.categoryWayDim;d(i[m],b,_),d(o,b,_),f.categoryWayDim+=_}});function d(v,g,m){for(var _=0;_<m;_++)v.push(g+_)}function p(v){var g=v.dimsDef;return g?g.length:1}return a.length&&(i.itemName=a),o.length&&(i.seriesName=o),i}function r_(r){var t=r.get("data",!0);if(!t)return yo(r.ecModel,"dataset",{index:r.get("datasetIndex",!0),id:r.get("datasetId",!0)},re).models[0]}function oM(r){return!r.get("transform",!0)&&!r.get("fromTransformResult",!0)?[]:yo(r.ecModel,"dataset",{index:r.get("fromDatasetIndex",!0),id:r.get("fromDatasetId",!0)},re).models}function i_(r,t){return sM(r.data,r.sourceFormat,r.seriesLayoutBy,r.dimensionsDefine,r.startIndex,t)}function sM(r,t,e,i,n,a){var o,s=5;if(oe(r))return ge.Not;var l,u;if(i){var h=i[a];q(h)?(l=h.name,u=h.type):U(h)&&(l=h)}if(u!=null)return u==="ordinal"?ge.Must:ge.Not;if(t===pe){var c=r;if(e===Xn){for(var f=c[a],d=0;d<(f||[]).length&&d<s;d++)if((o=x(f[n+d]))!=null)return o}else for(var d=0;d<c.length&&d<s;d++){var p=c[n+d];if(p&&(o=x(p[a]))!=null)return o}}else if(t===fr){var v=r;if(!l)return ge.Not;for(var d=0;d<v.length&&d<s;d++){var g=v[d];if(g&&(o=x(g[l]))!=null)return o}}else if(t===Sr){var m=r;if(!l)return ge.Not;var f=m[l];if(!f||oe(f))return ge.Not;for(var d=0;d<f.length&&d<s;d++)if((o=x(f[d]))!=null)return o}else if(t===Ee)for(var _=r,d=0;d<_.length&&d<s;d++){var g=_[d],b=Un(g);if(!W(b))return ge.Not;if((o=x(b[a]))!=null)return o}function x(C){var S=U(C);if(C!=null&&Number.isFinite(Number(C))&&C!=="")return S?ge.Might:ge.Not;if(S&&C!=="-")return ge.Must}return ge.Not}var ic=nt();function lM(r,t){be(ic.get(r)==null&&t),ic.set(r,t)}function uM(r,t,e){var i=ic.get(t);if(!i)return e;var n=i(r);return n?e.concat(n):e}var av=kt();kt();var Rf=(function(){function r(){}return r.prototype.getColorFromPalette=function(t,e,i){var n=ne(this.get("color",!0)),a=this.get("colorLayer",!0);return cM(this,av,n,a,t,e,i)},r.prototype.clearColorPalette=function(){fM(this,av)},r})();function hM(r,t){for(var e=r.length,i=0;i<e;i++)if(r[i].length>t)return r[i];return r[e-1]}function cM(r,t,e,i,n,a,o){a=a||r;var s=t(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(n))return u[n];var h=o==null||!i?e:hM(i,o);if(h=h||e,!(!h||!h.length)){var c=h[l];return n&&(u[n]=c),s.paletteIdx=(l+1)%h.length,c}}function fM(r,t){t(r).paletteIdx=0,t(r).paletteNameMap={}}var qo,oa,ov,sv="\0_ec_inner",dM=1,Lf=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e,i,n,a,o,s){a=a||{},this.option=null,this._theme=new Tt(a),this._locale=new Tt(o),this._optionManager=s},t.prototype.setOption=function(e,i,n){var a=hv(i);this._optionManager.setOption(e,n,a),this._resetOption(null,a)},t.prototype.resetOption=function(e,i){return this._resetOption(e,hv(i))},t.prototype._resetOption=function(e,i){var n=!1,a=this._optionManager;if(!e||e==="recreate"){var o=a.mountOption(e==="recreate");!this.option||e==="recreate"?ov(this,o):(this.restoreData(),this._mergeOption(o,i)),n=!0}if((e==="timeline"||e==="media")&&this.restoreData(),!e||e==="recreate"||e==="timeline"){var s=a.getTimelineOption(this);s&&(n=!0,this._mergeOption(s,i))}if(!e||e==="recreate"||e==="media"){var l=a.getMediaOption(this);l.length&&A(l,function(u){n=!0,this._mergeOption(u,i)},this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,i){var n=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=nt(),u=i&&i.replaceMergeMainTypeMap;nM(this),A(e,function(c,f){c!=null&&(dt.hasClass(f)?f&&(s.push(f),l.set(f,!0)):n[f]=n[f]==null?it(c):st(n[f],c,!0))}),u&&u.each(function(c,f){dt.hasClass(f)&&!l.get(f)&&(s.push(f),l.set(f,!0))}),dt.topologicalTravel(s,dt.getAllClassMainTypes(),h,this);function h(c){var f=uM(this,c,ne(e[c])),d=a.get(c),p=d?u&&u.get(c)?"replaceMerge":"normalMerge":"replaceAll",v=fC(d,f,p);bC(v,c,dt),n[c]=null,a.set(c,null),o.set(c,0);var g=[],m=[],_=0,b;A(v,function(x,C){var S=x.existing,T=x.newOption;if(!T)S&&(S.mergeOption({},this),S.optionUpdated({},!1));else{var M=c==="series",D=dt.getClass(c,x.keyInfo.subType,!M);if(!D)return;if(c==="tooltip"){if(b)return;b=!0}if(S&&S.constructor===D)S.name=x.keyInfo.name,S.mergeOption(T,this),S.optionUpdated(T,!1);else{var I=N({componentIndex:C},x.keyInfo);S=new D(T,this,this,I),N(S,I),x.brandNew&&(S.__requireNewView=!0),S.init(T,this,this),S.optionUpdated(null,!0)}}S?(g.push(S.option),m.push(S),_++):(g.push(void 0),m.push(void 0))},this),n[c]=g,a.set(c,m),o.set(c,_),c==="series"&&qo(this)}this._seriesIndices||qo(this)},t.prototype.getOption=function(){var e=it(this.option);return A(e,function(i,n){if(dt.hasClass(n)){for(var a=ne(i),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!qa(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,e[n]=a}}),delete e[sv],e},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,i){var n=this._componentsMap.get(e);if(n){var a=n[i||0];if(a)return a;if(i==null){for(var o=0;o<n.length;o++)if(n[o])return n[o]}}},t.prototype.queryComponents=function(e){var i=e.mainType;if(!i)return[];var n=e.index,a=e.id,o=e.name,s=this._componentsMap.get(i);if(!s||!s.length)return[];var l;return n!=null?(l=[],A(ne(n),function(u){s[u]&&l.push(s[u])})):a!=null?l=lv("id",a,s):o!=null?l=lv("name",o,s):l=It(s,function(u){return!!u}),uv(l,e)},t.prototype.findComponents=function(e){var i=e.query,n=e.mainType,a=s(i),o=a?this.queryComponents(a):It(this._componentsMap.get(n),function(u){return!!u});return l(uv(o,e));function s(u){var h=n+"Index",c=n+"Id",f=n+"Name";return u&&(u[h]!=null||u[c]!=null||u[f]!=null)?{mainType:n,index:u[h],id:u[c],name:u[f]}:null}function l(u){return e.filter?It(u,e.filter):u}},t.prototype.eachComponent=function(e,i,n){var a=this._componentsMap;if(tt(e)){var o=i,s=e;a.each(function(c,f){for(var d=0;c&&d<c.length;d++){var p=c[d];p&&s.call(o,f,p,p.componentIndex)}})}else for(var l=U(e)?a.get(e):q(e)?this.findComponents(e):null,u=0;l&&u<l.length;u++){var h=l[u];h&&i.call(n,h,h.componentIndex)}},t.prototype.getSeriesByName=function(e){var i=Ue(e,null);return It(this._componentsMap.get("series"),function(n){return!!n&&i!=null&&n.name===i})},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get("series")[e]},t.prototype.getSeriesByType=function(e){return It(this._componentsMap.get("series"),function(i){return!!i&&i.subType===e})},t.prototype.getSeries=function(){return It(this._componentsMap.get("series"),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(e,i){oa(this),A(this._seriesIndices,function(n){var a=this._componentsMap.get("series")[n];e.call(i,a,n)},this)},t.prototype.eachRawSeries=function(e,i){A(this._componentsMap.get("series"),function(n){n&&e.call(i,n,n.componentIndex)})},t.prototype.eachSeriesByType=function(e,i,n){oa(this),A(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];o.subType===e&&i.call(n,o,a)},this)},t.prototype.eachRawSeriesByType=function(e,i,n){return A(this.getSeriesByType(e),i,n)},t.prototype.isSeriesFiltered=function(e){return oa(this),this._seriesIndicesMap.get(e.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,i){oa(this);var n=[];A(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];e.call(i,o,a)&&n.push(a)},this),this._seriesIndices=n,this._seriesIndicesMap=nt(n)},t.prototype.restoreData=function(e){qo(this);var i=this._componentsMap,n=[];i.each(function(a,o){dt.hasClass(o)&&n.push(o)}),dt.topologicalTravel(n,dt.getAllClassMainTypes(),function(a){A(i.get(a),function(o){o&&(a!=="series"||!pM(o,e))&&o.restoreData()})})},t.internalField=(function(){qo=function(e){var i=e._seriesIndices=[];A(e._componentsMap.get("series"),function(n){n&&i.push(n.componentIndex)}),e._seriesIndicesMap=nt(i)},oa=function(e){},ov=function(e,i){e.option={},e.option[sv]=dM,e._componentsMap=nt({series:[]}),e._componentsCount=nt();var n=i.aria;q(n)&&n.enabled==null&&(n.enabled=!0),vM(i,e._theme.option),st(i,iM,!1),e._mergeOption(i,null)}})(),t})(Tt);function pM(r,t){if(t){var e=t.seriesIndex,i=t.seriesId,n=t.seriesName;return e!=null&&r.componentIndex!==e||i!=null&&r.id!==i||n!=null&&r.name!==n}}function vM(r,t){var e=r.color&&!r.colorLayer;A(t,function(i,n){n==="colorLayer"&&e||dt.hasClass(n)||(typeof i=="object"?r[n]=r[n]?st(r[n],i,!1):it(i):r[n]==null&&(r[n]=i))})}function lv(r,t,e){if(W(t)){var i=nt();return A(t,function(a){if(a!=null){var o=Ue(a,null);o!=null&&i.set(a,!0)}}),It(e,function(a){return a&&i.get(a[r])})}else{var n=Ue(t,null);return It(e,function(a){return a&&n!=null&&a[r]===n})}}function uv(r,t){return t.hasOwnProperty("subType")?It(r,function(e){return e&&e.subType===t.subType}):r}function hv(r){var t=nt();return r&&A(ne(r.replaceMerge),function(e){t.set(e,!0)}),{replaceMergeMainTypeMap:t}}xe(Lf,Rf);var gM=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],n_=(function(){function r(t){A(gM,function(e){this[e]=ct(t[e],t)},this)}return r})(),Eu={},Ll=(function(){function r(){this._coordinateSystems=[]}return r.prototype.create=function(t,e){var i=[];A(Eu,function(n,a){var o=n.create(t,e);i=i.concat(o||[])}),this._coordinateSystems=i},r.prototype.update=function(t,e){A(this._coordinateSystems,function(i){i.update&&i.update(t,e)})},r.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},r.register=function(t,e){Eu[t]=e},r.get=function(t){return Eu[t]},r})(),mM=/^(min|max)?(.+)$/,yM=(function(){function r(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}return r.prototype.setOption=function(t,e,i){t&&(A(ne(t.series),function(o){o&&o.data&&oe(o.data)&&Ps(o.data)}),A(ne(t.dataset),function(o){o&&o.source&&oe(o.source)&&Ps(o.source)})),t=it(t);var n=this._optionBackup,a=_M(t,e,!n);this._newBaseOption=a.baseOption,n?(a.timelineOptions.length&&(n.timelineOptions=a.timelineOptions),a.mediaList.length&&(n.mediaList=a.mediaList),a.mediaDefault&&(n.mediaDefault=a.mediaDefault)):this._optionBackup=a},r.prototype.mountOption=function(t){var e=this._optionBackup;return this._timelineOptions=e.timelineOptions,this._mediaList=e.mediaList,this._mediaDefault=e.mediaDefault,this._currentMediaIndices=[],it(t?e.baseOption:this._newBaseOption)},r.prototype.getTimelineOption=function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=it(i[n.getCurrentIndex()]))}return e},r.prototype.getMediaOption=function(t){var e=this._api.getWidth(),i=this._api.getHeight(),n=this._mediaList,a=this._mediaDefault,o=[],s=[];if(!n.length&&!a)return s;for(var l=0,u=n.length;l<u;l++)bM(n[l].query,e,i)&&o.push(l);return!o.length&&a&&(o=[-1]),o.length&&!wM(o,this._currentMediaIndices)&&(s=V(o,function(h){return it(h===-1?a.option:n[h].option)})),this._currentMediaIndices=o,s},r})();function _M(r,t,e){var i=[],n,a,o=r.baseOption,s=r.timeline,l=r.options,u=r.media,h=!!r.media,c=!!(l||s||o&&o.timeline);o?(a=o,a.timeline||(a.timeline=s)):((c||h)&&(r.options=r.media=null),a=r),h&&W(u)&&A(u,function(d){d&&d.option&&(d.query?i.push(d):n||(n=d))}),f(a),A(l,function(d){return f(d)}),A(i,function(d){return f(d.option)});function f(d){A(t,function(p){p(d,e)})}return{baseOption:a,timelineOptions:l||[],mediaDefault:n,mediaList:i}}function bM(r,t,e){var i={width:t,height:e,aspectratio:t/e},n=!0;return A(r,function(a,o){var s=o.match(mM);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();xM(i[u],a,l)||(n=!1)}}),n}function xM(r,t,e){return e==="min"?r>=t:e==="max"?r<=t:r===t}function wM(r,t){return r.join(",")===t.join(",")}var Ne=A,io=q,cv=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function ju(r){var t=r&&r.itemStyle;if(t)for(var e=0,i=cv.length;e<i;e++){var n=cv[e],a=t.normal,o=t.emphasis;a&&a[n]&&(r[n]=r[n]||{},r[n].normal?st(r[n].normal,a[n]):r[n].normal=a[n],a[n]=null),o&&o[n]&&(r[n]=r[n]||{},r[n].emphasis?st(r[n].emphasis,o[n]):r[n].emphasis=o[n],o[n]=null)}}function qt(r,t,e){if(r&&r[t]&&(r[t].normal||r[t].emphasis)){var i=r[t].normal,n=r[t].emphasis;i&&(e?(r[t].normal=r[t].emphasis=null,lt(r[t],i)):r[t]=i),n&&(r.emphasis=r.emphasis||{},r.emphasis[t]=n,n.focus&&(r.emphasis.focus=n.focus),n.blurScope&&(r.emphasis.blurScope=n.blurScope))}}function Ca(r){qt(r,"itemStyle"),qt(r,"lineStyle"),qt(r,"areaStyle"),qt(r,"label"),qt(r,"labelLine"),qt(r,"upperLabel"),qt(r,"edgeLabel")}function Dt(r,t){var e=io(r)&&r[t],i=io(e)&&e.textStyle;if(i)for(var n=0,a=cp.length;n<a;n++){var o=cp[n];i.hasOwnProperty(o)&&(e[o]=i[o])}}function Me(r){r&&(Ca(r),Dt(r,"label"),r.emphasis&&Dt(r.emphasis,"label"))}function SM(r){if(io(r)){ju(r),Ca(r),Dt(r,"label"),Dt(r,"upperLabel"),Dt(r,"edgeLabel"),r.emphasis&&(Dt(r.emphasis,"label"),Dt(r.emphasis,"upperLabel"),Dt(r.emphasis,"edgeLabel"));var t=r.markPoint;t&&(ju(t),Me(t));var e=r.markLine;e&&(ju(e),Me(e));var i=r.markArea;i&&Me(i);var n=r.data;if(r.type==="graph"){n=n||r.nodes;var a=r.links||r.edges;if(a&&!oe(a))for(var o=0;o<a.length;o++)Me(a[o]);A(r.categories,function(u){Ca(u)})}if(n&&!oe(n))for(var o=0;o<n.length;o++)Me(n[o]);if(t=r.markPoint,t&&t.data)for(var s=t.data,o=0;o<s.length;o++)Me(s[o]);if(e=r.markLine,e&&e.data)for(var l=e.data,o=0;o<l.length;o++)W(l[o])?(Me(l[o][0]),Me(l[o][1])):Me(l[o]);r.type==="gauge"?(Dt(r,"axisLabel"),Dt(r,"title"),Dt(r,"detail")):r.type==="treemap"?(qt(r.breadcrumb,"itemStyle"),A(r.levels,function(u){Ca(u)})):r.type==="tree"&&Ca(r.leaves)}}function vr(r){return W(r)?r:r?[r]:[]}function fv(r){return(W(r)?r[0]:r)||{}}function CM(r,t){Ne(vr(r.series),function(i){io(i)&&SM(i)});var e=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&e.push("valueAxis","categoryAxis","logAxis","timeAxis"),Ne(e,function(i){Ne(vr(r[i]),function(n){n&&(Dt(n,"axisLabel"),Dt(n.axisPointer,"label"))})}),Ne(vr(r.parallel),function(i){var n=i&&i.parallelAxisDefault;Dt(n,"axisLabel"),Dt(n&&n.axisPointer,"label")}),Ne(vr(r.calendar),function(i){qt(i,"itemStyle"),Dt(i,"dayLabel"),Dt(i,"monthLabel"),Dt(i,"yearLabel")}),Ne(vr(r.radar),function(i){Dt(i,"name"),i.name&&i.axisName==null&&(i.axisName=i.name,delete i.name),i.nameGap!=null&&i.axisNameGap==null&&(i.axisNameGap=i.nameGap,delete i.nameGap)}),Ne(vr(r.geo),function(i){io(i)&&(Me(i),Ne(vr(i.regions),function(n){Me(n)}))}),Ne(vr(r.timeline),function(i){Me(i),qt(i,"label"),qt(i,"itemStyle"),qt(i,"controlStyle",!0);var n=i.data;W(n)&&A(n,function(a){q(a)&&(qt(a,"label"),qt(a,"itemStyle"))})}),Ne(vr(r.toolbox),function(i){qt(i,"iconStyle"),Ne(i.feature,function(n){qt(n,"iconStyle")})}),Dt(fv(r.axisPointer),"label"),Dt(fv(r.tooltip).axisPointer,"label")}function TM(r,t){for(var e=t.split(","),i=r,n=0;n<e.length&&(i=i&&i[e[n]],i!=null);n++);return i}function AM(r,t,e,i){for(var n=t.split(","),a=r,o,s=0;s<n.length-1;s++)o=n[s],a[o]==null&&(a[o]={}),a=a[o];a[n[s]]==null&&(a[n[s]]=e)}function dv(r){r&&A(MM,function(t){t[0]in r&&!(t[1]in r)&&(r[t[1]]=r[t[0]])})}var MM=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],DM=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Nu=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function sa(r){var t=r&&r.itemStyle;if(t)for(var e=0;e<Nu.length;e++){var i=Nu[e][1],n=Nu[e][0];t[i]!=null&&(t[n]=t[i])}}function pv(r){r&&r.alignTo==="edge"&&r.margin!=null&&r.edgeDistance==null&&(r.edgeDistance=r.margin)}function vv(r){r&&r.downplay&&!r.blur&&(r.blur=r.downplay)}function IM(r){r&&r.focusNodeAdjacency!=null&&(r.emphasis=r.emphasis||{},r.emphasis.focus==null&&(r.emphasis.focus="adjacency"))}function a_(r,t){if(r)for(var e=0;e<r.length;e++)t(r[e]),r[e]&&a_(r[e].children,t)}function o_(r,t){CM(r,t),r.series=ne(r.series),A(r.series,function(e){if(q(e)){var i=e.type;if(i==="line")e.clipOverflow!=null&&(e.clip=e.clipOverflow);else if(i==="pie"||i==="gauge"){e.clockWise!=null&&(e.clockwise=e.clockWise),pv(e.label);var n=e.data;if(n&&!oe(n))for(var a=0;a<n.length;a++)pv(n[a]);e.hoverOffset!=null&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(e.emphasis.scaleSize=e.hoverOffset))}else if(i==="gauge"){var o=TM(e,"pointer.color");o!=null&&AM(e,"itemStyle.color",o)}else if(i==="bar"){sa(e),sa(e.backgroundStyle),sa(e.emphasis);var n=e.data;if(n&&!oe(n))for(var a=0;a<n.length;a++)typeof n[a]=="object"&&(sa(n[a]),sa(n[a]&&n[a].emphasis))}else if(i==="sunburst"){var s=e.highlightPolicy;s&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=s)),vv(e),a_(e.data,vv)}else i==="graph"||i==="sankey"?IM(e):i==="map"&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&<(e,e.mapLocation));e.hoverAnimation!=null&&(e.emphasis=e.emphasis||{},e.emphasis&&e.emphasis.scale==null&&(e.emphasis.scale=e.hoverAnimation)),dv(e)}}),r.dataRange&&(r.visualMap=r.dataRange),A(DM,function(e){var i=r[e];i&&(W(i)||(i=[i]),A(i,function(n){dv(n)}))})}function PM(r){var t=nt();r.eachSeries(function(e){var i=e.get("stack");if(i){var n=t.get(i)||t.set(i,[]),a=e.getData(),o={stackResultDimension:a.getCalculationInfo("stackResultDimension"),stackedOverDimension:a.getCalculationInfo("stackedOverDimension"),stackedDimension:a.getCalculationInfo("stackedDimension"),stackedByDimension:a.getCalculationInfo("stackedByDimension"),isStackedByIndex:a.getCalculationInfo("isStackedByIndex"),data:a,seriesModel:e};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;n.length&&a.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(o)}}),t.each(kM)}function kM(r){A(r,function(t,e){var i=[],n=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";o.modify(a,function(u,h,c){var f=o.get(t.stackedDimension,c);if(isNaN(f))return n;var d,p;s?p=o.getRawIndex(c):d=o.get(t.stackedByDimension,c);for(var v=NaN,g=e-1;g>=0;g--){var m=r[g];if(s||(p=m.data.rawIndexOf(m.stackedByDimension,d)),p>=0){var _=m.data.getByRawIndex(m.stackResultDimension,p);if(l==="all"||l==="positive"&&_>0||l==="negative"&&_<0||l==="samesign"&&f>=0&&_>0||l==="samesign"&&f<=0&&_<0){f=oC(f,_),v=_;break}}}return i[0]=f,i[1]=v,i})})}var Ol=(function(){function r(t){this.data=t.data||(t.sourceFormat===Sr?{}:[]),this.sourceFormat=t.sourceFormat||t_,this.seriesLayoutBy=t.seriesLayoutBy||xr,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var i=0;i<e.length;i++){var n=e[i];n.type==null&&i_(this,i)===ge.Must&&(n.type="ordinal")}}return r})();function Of(r){return r instanceof Ol}function nc(r,t,e){e=e||l_(r);var i=t.seriesLayoutBy,n=LM(r,e,i,t.sourceHeader,t.dimensions),a=new Ol({data:r,sourceFormat:e,seriesLayoutBy:i,dimensionsDefine:n.dimensionsDefine,startIndex:n.startIndex,dimensionsDetectedCount:n.dimensionsDetectedCount,metaRawOption:it(t)});return a}function s_(r){return new Ol({data:r,sourceFormat:oe(r)?Yr:Ee})}function RM(r){return new Ol({data:r.data,sourceFormat:r.sourceFormat,seriesLayoutBy:r.seriesLayoutBy,dimensionsDefine:it(r.dimensionsDefine),startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount})}function l_(r){var t=t_;if(oe(r))t=Yr;else if(W(r)){r.length===0&&(t=pe);for(var e=0,i=r.length;e<i;e++){var n=r[e];if(n!=null){if(W(n)||oe(n)){t=pe;break}else if(q(n)){t=fr;break}}}}else if(q(r)){for(var a in r)if(Hi(r,a)&&ae(r[a])){t=Sr;break}}return t}function LM(r,t,e,i,n){var a,o;if(!r)return{dimensionsDefine:gv(n),startIndex:o,dimensionsDetectedCount:a};if(t===pe){var s=r;i==="auto"||i==null?mv(function(u){u!=null&&u!=="-"&&(U(u)?o==null&&(o=1):o=0)},e,s,10):o=At(i)?i:i?1:0,!n&&o===1&&(n=[],mv(function(u,h){n[h]=u!=null?u+"":""},e,s,1/0)),a=n?n.length:e===Xn?s.length:s[0]?s[0].length:null}else if(t===fr)n||(n=OM(r));else if(t===Sr)n||(n=[],A(r,function(u,h){n.push(h)}));else if(t===Ee){var l=Un(r[0]);a=W(l)&&l.length||1}return{startIndex:o,dimensionsDefine:gv(n),dimensionsDetectedCount:a}}function OM(r){for(var t=0,e;t<r.length&&!(e=r[t++]););if(e)return vt(e)}function gv(r){if(r){var t=nt();return V(r,function(e,i){e=q(e)?e:{name:e};var n={name:e.name,displayName:e.displayName,type:e.type};if(n.name==null)return n;n.name+="",n.displayName==null&&(n.displayName=n.name);var a=t.get(n.name);return a?n.name+="-"+a.count++:t.set(n.name,{count:1}),n})}}function mv(r,t,e,i){if(t===Xn)for(var n=0;n<e.length&&n<i;n++)r(e[n]?e[n][0]:null,n);else for(var a=e[0]||[],n=0;n<a.length&&n<i;n++)r(a[n],n)}function u_(r){var t=r.sourceFormat;return t===fr||t===Sr}var wi,Si,Ci,yv,_v,h_=(function(){function r(t,e){var i=Of(t)?t:s_(t);this._source=i;var n=this._data=i.data;i.sourceFormat===Yr&&(this._offset=0,this._dimSize=e,this._data=n),_v(this,n,i)}return r.prototype.getSource=function(){return this._source},r.prototype.count=function(){return 0},r.prototype.getItem=function(t,e){},r.prototype.appendData=function(t){},r.prototype.clean=function(){},r.protoInitialize=(function(){var t=r.prototype;t.pure=!1,t.persistent=!0})(),r.internalField=(function(){var t;_v=function(o,s,l){var u=l.sourceFormat,h=l.seriesLayoutBy,c=l.startIndex,f=l.dimensionsDefine,d=yv[Ef(u,h)];if(N(o,d),u===Yr)o.getItem=e,o.count=n,o.fillStorage=i;else{var p=c_(u,h);o.getItem=ct(p,null,s,c,f);var v=f_(u,h);o.count=ct(v,null,s,c,f)}};var e=function(o,s){o=o-this._offset,s=s||[];for(var l=this._data,u=this._dimSize,h=u*o,c=0;c<u;c++)s[c]=l[h+c];return s},i=function(o,s,l,u){for(var h=this._data,c=this._dimSize,f=0;f<c;f++){for(var d=u[f],p=d[0]==null?1/0:d[0],v=d[1]==null?-1/0:d[1],g=s-o,m=l[f],_=0;_<g;_++){var b=h[_*c+f];m[o+_]=b,b<p&&(p=b),b>v&&(v=b)}d[0]=p,d[1]=v}},n=function(){return this._data?this._data.length/this._dimSize:0};yv=(t={},t[pe+"_"+xr]={pure:!0,appendData:a},t[pe+"_"+Xn]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[fr]={pure:!0,appendData:a},t[Sr]={pure:!0,appendData:function(o){var s=this._data;A(o,function(l,u){for(var h=s[u]||(s[u]=[]),c=0;c<(l||[]).length;c++)h.push(l[c])})}},t[Ee]={appendData:a},t[Yr]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function a(o){for(var s=0;s<o.length;s++)this._data.push(o[s])}})(),r})(),bv=function(r,t,e,i){return r[i]},EM=(wi={},wi[pe+"_"+xr]=function(r,t,e,i){return r[i+t]},wi[pe+"_"+Xn]=function(r,t,e,i,n){i+=t;for(var a=n||[],o=r,s=0;s<o.length;s++){var l=o[s];a[s]=l?l[i]:null}return a},wi[fr]=bv,wi[Sr]=function(r,t,e,i,n){for(var a=n||[],o=0;o<e.length;o++){var s=e[o].name,l=r[s];a[o]=l?l[i]:null}return a},wi[Ee]=bv,wi);function c_(r,t){var e=EM[Ef(r,t)];return e}var xv=function(r,t,e){return r.length},jM=(Si={},Si[pe+"_"+xr]=function(r,t,e){return Math.max(0,r.length-t)},Si[pe+"_"+Xn]=function(r,t,e){var i=r[0];return i?Math.max(0,i.length-t):0},Si[fr]=xv,Si[Sr]=function(r,t,e){var i=e[0].name,n=r[i];return n?n.length:0},Si[Ee]=xv,Si);function f_(r,t){var e=jM[Ef(r,t)];return e}var Fu=function(r,t,e){return r[t]},NM=(Ci={},Ci[pe]=Fu,Ci[fr]=function(r,t,e){return r[e]},Ci[Sr]=Fu,Ci[Ee]=function(r,t,e){var i=Un(r);return i instanceof Array?i[t]:i},Ci[Yr]=Fu,Ci);function d_(r){var t=NM[r];return t}function Ef(r,t){return r===pe?r+"_"+t:r}function Bn(r,t,e){if(r){var i=r.getRawDataItem(t);if(i!=null){var n=r.getStore(),a=n.getSource().sourceFormat;if(e!=null){var o=r.getDimensionIndex(e),s=n.getDimensionProperty(o);return d_(a)(i,o,s)}else{var l=i;return a===Ee&&(l=Un(i)),l}}}}var FM=/\{@(.+?)\}/g,p_=(function(){function r(){}return r.prototype.getDataParams=function(t,e){var i=this.getData(e),n=this.getRawValue(t,e),a=i.getRawIndex(t),o=i.getName(t),s=i.getRawDataItem(t),l=i.getItemVisual(t,"style"),u=l&&l[i.getItemVisual(t,"drawType")||"fill"],h=l&&l.stroke,c=this.mainType,f=c==="series",d=i.userOutput&&i.userOutput.get();return{componentType:c,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:f?this.subType:null,seriesIndex:this.seriesIndex,seriesId:f?this.id:null,seriesName:f?this.name:null,name:o,dataIndex:a,data:s,dataType:e,value:n,color:u,borderColor:h,dimensionNames:d?d.fullDimensions:null,encode:d?d.encode:null,$vars:["seriesName","name","value"]}},r.prototype.getFormattedLabel=function(t,e,i,n,a,o){e=e||"normal";var s=this.getData(i),l=this.getDataParams(t,i);if(o&&(l.value=o.interpolatedValue),n!=null&&W(l.value)&&(l.value=l.value[n]),!a){var u=s.getItemModel(t);a=u.get(e==="normal"?["label","formatter"]:[e,"label","formatter"])}if(tt(a))return l.status=e,l.dimensionIndex=n,a(l);if(U(a)){var h=If(a,l);return h.replace(FM,function(c,f){var d=f.length,p=f;p.charAt(0)==="["&&p.charAt(d-1)==="]"&&(p=+p.slice(1,d-1));var v=Bn(s,t,p);if(o&&W(o.interpolatedValue)){var g=s.getDimensionIndex(p);g>=0&&(v=o.interpolatedValue[g])}return v!=null?v+"":""})}},r.prototype.getRawValue=function(t,e){return Bn(this.getData(e),t)},r.prototype.formatTooltip=function(t,e,i){},r})();function wv(r){var t,e;return q(r)?r.type&&(e=r):t=r,{text:t,frag:e}}function Fa(r){return new BM(r)}var BM=(function(){function r(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return r.prototype.perform=function(t){var e=this._upstream,i=t&&t.skip;if(this._dirty&&e){var n=this.context;n.data=n.outputData=e.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!i&&(a=this._plan(this.context));var o=h(this._modBy),s=this._modDataCount||0,l=h(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(a="reset");function h(_){return!(_>=1)&&(_=1),_}var c;(this._dirty||a==="reset")&&(this._dirty=!1,c=this._doReset(i)),this._modBy=l,this._modDataCount=u;var f=t&&t.step;if(e?this._dueEnd=e._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,p=Math.min(f!=null?this._dueIndex+f:1/0,this._dueEnd);if(!i&&(c||d<p)){var v=this._progress;if(W(v))for(var g=0;g<v.length;g++)this._doProgress(v[g],d,p,l,u);else this._doProgress(v,d,p,l,u)}this._dueIndex=p;var m=this._settedOutputEnd!=null?this._settedOutputEnd:p;this._outputDueEnd=m}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(t,e,i,n,a){Sv.reset(e,i,n,a),this._callingProgress=t,this._callingProgress({start:e,end:i,count:i-e,next:Sv.next},this.context)},r.prototype._doReset=function(t){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var e,i;!t&&this._reset&&(e=this._reset(this.context),e&&e.progress&&(i=e.forceFirstProgress,e=e.progress),W(e)&&!e.length&&(e=null)),this._progress=e,this._modBy=this._modDataCount=null;var n=this._downstream;return n&&n.dirty(),i},r.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},r.prototype.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.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(t){this._outputDueEnd=this._settedOutputEnd=t},r})(),Sv=(function(){var r,t,e,i,n,a={reset:function(l,u,h,c){t=l,r=u,e=h,i=c,n=Math.ceil(i/e),a.next=e>1&&i>0?s:o}};return a;function o(){return t<r?t++:null}function s(){var l=t%n*e+Math.ceil(t/n),u=t>=r?null:l<i?l:t;return t++,u}})();function xs(r,t){var e=t&&t.type;return e==="ordinal"?r:(e==="time"&&!At(r)&&r!=null&&r!=="-"&&(r=+Le(r)),r==null||r===""?NaN:Number(r))}nt({number:function(r){return parseFloat(r)},time:function(r){return+Le(r)},trim:function(r){return U(r)?Ge(r):r}});var zM=(function(){function r(t,e){var i=t==="desc";this._resultLT=i?1:-1,e==null&&(e=i?"min":"max"),this._incomparable=e==="min"?-1/0:1/0}return r.prototype.evaluate=function(t,e){var i=At(t)?t:Za(t),n=At(e)?e:Za(e),a=isNaN(i),o=isNaN(n);if(a&&(i=this._incomparable),o&&(n=this._incomparable),a&&o){var s=U(t),l=U(e);s&&(i=l?t:0),l&&(n=s?e:0)}return i<n?this._resultLT:i>n?-this._resultLT:0},r})(),VM=(function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(t){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(t){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(t,e){},r.prototype.retrieveValueFromItem=function(t,e){},r.prototype.convertValue=function(t,e){return xs(t,e)},r})();function HM(r,t){var e=new VM,i=r.data,n=e.sourceFormat=r.sourceFormat,a=r.startIndex,o="";r.seriesLayoutBy!==xr&&fe(o);var s=[],l={},u=r.dimensionsDefine;if(u)A(u,function(v,g){var m=v.name,_={index:g,name:m,displayName:v.displayName};if(s.push(_),m!=null){var b="";Hi(l,m)&&fe(b),l[m]=_}});else for(var h=0;h<r.dimensionsDetectedCount;h++)s.push({index:h});var c=c_(n,xr);t.__isBuiltIn&&(e.getRawDataItem=function(v){return c(i,a,s,v)},e.getRawData=ct(WM,null,r)),e.cloneRawData=ct(GM,null,r);var f=f_(n,xr);e.count=ct(f,null,i,a,s);var d=d_(n);e.retrieveValue=function(v,g){var m=c(i,a,s,v);return p(m,g)};var p=e.retrieveValueFromItem=function(v,g){if(v!=null){var m=s[g];if(m)return d(v,g,m.name)}};return e.getDimensionInfo=ct($M,null,s,l),e.cloneAllDimensionInfo=ct(UM,null,s),e}function WM(r){var t=r.sourceFormat;if(!jf(t)){var e="";fe(e)}return r.data}function GM(r){var t=r.sourceFormat,e=r.data;if(!jf(t)){var i="";fe(i)}if(t===pe){for(var n=[],a=0,o=e.length;a<o;a++)n.push(e[a].slice());return n}else if(t===fr){for(var n=[],a=0,o=e.length;a<o;a++)n.push(N({},e[a]));return n}}function $M(r,t,e){if(e!=null){if(At(e)||!isNaN(e)&&!Hi(t,e))return r[e];if(Hi(t,e))return t[e]}}function UM(r){return it(r)}var v_=nt();function YM(r){r=it(r);var t=r.type,e="";t||fe(e);var i=t.split(":");i.length!==2&&fe(e);var n=!1;i[0]==="echarts"&&(t=i[1],n=!0),r.__isBuiltIn=n,v_.set(t,r)}function XM(r,t,e){var i=ne(r),n=i.length,a="";n||fe(a);for(var o=0,s=n;o<s;o++){var l=i[o];t=ZM(l,t),o!==s-1&&(t.length=Math.max(t.length,1))}return t}function ZM(r,t,e,i){var n="";t.length||fe(n),q(r)||fe(n);var a=r.type,o=v_.get(a);o||fe(n);var s=V(t,function(u){return HM(u,o)}),l=ne(o.transform({upstream:s[0],upstreamList:s,config:it(r.config)}));return V(l,function(u,h){var c="";q(u)||fe(c),u.data||fe(c);var f=l_(u.data);jf(f)||fe(c);var d,p=t[0];if(p&&h===0&&!u.dimensions){var v=p.startIndex;v&&(u.data=p.data.slice(0,v).concat(u.data)),d={seriesLayoutBy:xr,sourceHeader:v,dimensions:p.metaRawOption.dimensions}}else d={seriesLayoutBy:xr,sourceHeader:0,dimensions:u.dimensions};return nc(u.data,d,null)})}function jf(r){return r===pe||r===fr}var El="undefined",qM=typeof Uint32Array===El?Array:Uint32Array,KM=typeof Uint16Array===El?Array:Uint16Array,g_=typeof Int32Array===El?Array:Int32Array,Cv=typeof Float64Array===El?Array:Float64Array,m_={float:Cv,int:g_,ordinal:Array,number:Array,time:Cv},Bu;function dn(r){return r>65535?qM:KM}function pn(){return[1/0,-1/0]}function JM(r){var t=r.constructor;return t===Array?r.slice():new t(r)}function Tv(r,t,e,i,n){var a=m_[e||"float"];if(n){var o=r[t],s=o&&o.length;if(s!==i){for(var l=new a(i),u=0;u<s;u++)l[u]=o[u];r[t]=l}}else r[t]=new a(i)}var ac=(function(){function r(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=nt()}return r.prototype.initData=function(t,e,i){this._provider=t,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var n=t.getSource(),a=this.defaultDimValueGetter=Bu[n.sourceFormat];this._dimValueGetter=i||a,this._rawExtent=[],u_(n),this._dimensions=V(e,function(o){return{type:o.type,property:o.property}}),this._initDataFromProvider(0,t.count())},r.prototype.getProvider=function(){return this._provider},r.prototype.getSource=function(){return this._provider.getSource()},r.prototype.ensureCalculationDimension=function(t,e){var i=this._calcDimNameToIdx,n=this._dimensions,a=i.get(t);if(a!=null){if(n[a].type===e)return a}else a=n.length;return n[a]={type:e},i.set(t,a),this._chunks[a]=new m_[e||"float"](this._rawCount),this._rawExtent[a]=pn(),a},r.prototype.collectOrdinalMeta=function(t,e){var i=this._chunks[t],n=this._dimensions[t],a=this._rawExtent,o=n.ordinalOffset||0,s=i.length;o===0&&(a[t]=pn());for(var l=a[t],u=o;u<s;u++){var h=i[u]=e.parseAndCollect(i[u]);isNaN(h)||(l[0]=Math.min(h,l[0]),l[1]=Math.max(h,l[1]))}n.ordinalMeta=e,n.ordinalOffset=s,n.type="ordinal"},r.prototype.getOrdinalMeta=function(t){var e=this._dimensions[t],i=e.ordinalMeta;return i},r.prototype.getDimensionProperty=function(t){var e=this._dimensions[t];return e&&e.property},r.prototype.appendData=function(t){var e=this._provider,i=this.count();e.appendData(t);var n=e.count();return e.persistent||(n+=i),i<n&&this._initDataFromProvider(i,n,!0),[i,n]},r.prototype.appendValues=function(t,e){for(var i=this._chunks,n=this._dimensions,a=n.length,o=this._rawExtent,s=this.count(),l=s+Math.max(t.length,e||0),u=0;u<a;u++){var h=n[u];Tv(i,u,h.type,l,!0)}for(var c=[],f=s;f<l;f++)for(var d=f-s,p=0;p<a;p++){var h=n[p],v=Bu.arrayRows.call(this,t[d]||c,h.property,d,p);i[p][f]=v;var g=o[p];v<g[0]&&(g[0]=v),v>g[1]&&(g[1]=v)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(t,e,i){for(var n=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=V(o,function(_){return _.property}),h=0;h<s;h++){var c=o[h];l[h]||(l[h]=pn()),Tv(a,h,c.type,e,i)}if(n.fillStorage)n.fillStorage(t,e,a,l);else for(var f=[],d=t;d<e;d++){f=n.getItem(d,f);for(var p=0;p<s;p++){var v=a[p],g=this._dimValueGetter(f,u[p],d,p);v[d]=g;var m=l[p];g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}!n.persistent&&n.clean&&n.clean(),this._rawCount=this._count=e,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(t,e){if(!(e>=0&&e<this._count))return NaN;var i=this._chunks[t];return i?i[this.getRawIndex(e)]:NaN},r.prototype.getValues=function(t,e){var i=[],n=[];if(e==null){e=t,t=[];for(var a=0;a<this._dimensions.length;a++)n.push(a)}else n=t;for(var a=0,o=n.length;a<o;a++)i.push(this.get(n[a],e));return i},r.prototype.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return NaN;var i=this._chunks[t];return i?i[e]:NaN},r.prototype.getSum=function(t){var e=this._chunks[t],i=0;if(e)for(var n=0,a=this.count();n<a;n++){var o=this.get(t,n);isNaN(o)||(i+=o)}return i},r.prototype.getMedian=function(t){var e=[];this.each([t],function(a){isNaN(a)||e.push(a)});var i=e.sort(function(a,o){return a-o}),n=this.count();return n===0?0:n%2===1?i[(n-1)/2]:(i[n/2]+i[n/2-1])/2},r.prototype.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,i=e[t];if(i!=null&&i<this._count&&i===t)return t;for(var n=0,a=this._count-1;n<=a;){var o=(n+a)/2|0;if(e[o]<t)n=o+1;else if(e[o]>t)a=o-1;else return o}return-1},r.prototype.indicesOfNearest=function(t,e,i){var n=this._chunks,a=n[t],o=[];if(!a)return o;i==null&&(i=1/0);for(var s=1/0,l=-1,u=0,h=0,c=this.count();h<c;h++){var f=this.getRawIndex(h),d=e-a[f],p=Math.abs(d);p<=i&&((p<s||p===s&&d>=0&&l<0)&&(s=p,l=d,u=0),d===l&&(o[u++]=h))}return o.length=u,o},r.prototype.getIndices=function(){var t,e=this._indices;if(e){var i=e.constructor,n=this._count;if(i===Array){t=new i(n);for(var a=0;a<n;a++)t[a]=e[a]}else t=new i(e.buffer,0,n)}else{var i=dn(this._rawCount);t=new i(this.count());for(var a=0;a<t.length;a++)t[a]=a}return t},r.prototype.filter=function(t,e){if(!this._count)return this;for(var i=this.clone(),n=i.count(),a=dn(i._rawCount),o=new a(n),s=[],l=t.length,u=0,h=t[0],c=i._chunks,f=0;f<n;f++){var d=void 0,p=i.getRawIndex(f);if(l===0)d=e(f);else if(l===1){var v=c[h][p];d=e(v,f)}else{for(var g=0;g<l;g++)s[g]=c[t[g]][p];s[g]=f,d=e.apply(null,s)}d&&(o[u++]=p)}return u<n&&(i._indices=o),i._count=u,i._extent=[],i._updateGetRawIdx(),i},r.prototype.selectRange=function(t){var e=this.clone(),i=e._count;if(!i)return this;var n=vt(t),a=n.length;if(!a)return this;var o=e.count(),s=dn(e._rawCount),l=new s(o),u=0,h=n[0],c=t[h][0],f=t[h][1],d=e._chunks,p=!1;if(!e._indices){var v=0;if(a===1){for(var g=d[n[0]],m=0;m<i;m++){var _=g[m];(_>=c&&_<=f||isNaN(_))&&(l[u++]=v),v++}p=!0}else if(a===2){for(var g=d[n[0]],b=d[n[1]],x=t[n[1]][0],C=t[n[1]][1],m=0;m<i;m++){var _=g[m],S=b[m];(_>=c&&_<=f||isNaN(_))&&(S>=x&&S<=C||isNaN(S))&&(l[u++]=v),v++}p=!0}}if(!p)if(a===1)for(var m=0;m<o;m++){var T=e.getRawIndex(m),_=d[n[0]][T];(_>=c&&_<=f||isNaN(_))&&(l[u++]=T)}else for(var m=0;m<o;m++){for(var M=!0,T=e.getRawIndex(m),D=0;D<a;D++){var I=n[D],_=d[I][T];(_<t[I][0]||_>t[I][1])&&(M=!1)}M&&(l[u++]=e.getRawIndex(m))}return u<o&&(e._indices=l),e._count=u,e._extent=[],e._updateGetRawIdx(),e},r.prototype.map=function(t,e){var i=this.clone(t);return this._updateDims(i,t,e),i},r.prototype.modify=function(t,e){this._updateDims(this,t,e)},r.prototype._updateDims=function(t,e,i){for(var n=t._chunks,a=[],o=e.length,s=t.count(),l=[],u=t._rawExtent,h=0;h<e.length;h++)u[e[h]]=pn();for(var c=0;c<s;c++){for(var f=t.getRawIndex(c),d=0;d<o;d++)l[d]=n[e[d]][f];l[o]=c;var p=i&&i.apply(null,l);if(p!=null){typeof p!="object"&&(a[0]=p,p=a);for(var h=0;h<p.length;h++){var v=e[h],g=p[h],m=u[v],_=n[v];_&&(_[f]=g),g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}}},r.prototype.lttbDownSample=function(t,e){var i=this.clone([t],!0),n=i._chunks,a=n[t],o=this.count(),s=0,l=Math.floor(1/e),u=this.getRawIndex(0),h,c,f,d=new(dn(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));d[s++]=u;for(var p=1;p<o-1;p+=l){for(var v=Math.min(p+l,o-1),g=Math.min(p+l*2,o),m=(g+v)/2,_=0,b=v;b<g;b++){var x=this.getRawIndex(b),C=a[x];isNaN(C)||(_+=C)}_/=g-v;var S=p,T=Math.min(p+l,o),M=p-1,D=a[u];h=-1,f=S;for(var I=-1,P=0,b=S;b<T;b++){var x=this.getRawIndex(b),C=a[x];if(isNaN(C)){P++,I<0&&(I=x);continue}c=Math.abs((M-m)*(C-D)-(M-b)*(_-D)),c>h&&(h=c,f=x)}P>0&&P<T-S&&(d[s++]=Math.min(I,f),f=Math.max(I,f)),d[s++]=f,u=f}return d[s++]=this.getRawIndex(o-1),i._count=s,i._indices=d,i.getRawIndex=this._getRawIdx,i},r.prototype.minmaxDownSample=function(t,e){for(var i=this.clone([t],!0),n=i._chunks,a=Math.floor(1/e),o=n[t],s=this.count(),l=new(dn(this._rawCount))(Math.ceil(s/a)*2),u=0,h=0;h<s;h+=a){var c=h,f=o[this.getRawIndex(c)],d=h,p=o[this.getRawIndex(d)],v=a;h+a>s&&(v=s-h);for(var g=0;g<v;g++){var m=this.getRawIndex(h+g),_=o[m];_<f&&(f=_,c=h+g),_>p&&(p=_,d=h+g)}var b=this.getRawIndex(c),x=this.getRawIndex(d);c<d?(l[u++]=b,l[u++]=x):(l[u++]=x,l[u++]=b)}return i._count=u,i._indices=l,i._updateGetRawIdx(),i},r.prototype.downSample=function(t,e,i,n){for(var a=this.clone([t],!0),o=a._chunks,s=[],l=Math.floor(1/e),u=o[t],h=this.count(),c=a._rawExtent[t]=pn(),f=new(dn(this._rawCount))(Math.ceil(h/l)),d=0,p=0;p<h;p+=l){l>h-p&&(l=h-p,s.length=l);for(var v=0;v<l;v++){var g=this.getRawIndex(p+v);s[v]=u[g]}var m=i(s),_=this.getRawIndex(Math.min(p+n(s,m)||0,h-1));u[_]=m,m<c[0]&&(c[0]=m),m>c[1]&&(c[1]=m),f[d++]=_}return a._count=d,a._indices=f,a._updateGetRawIdx(),a},r.prototype.each=function(t,e){if(this._count)for(var i=t.length,n=this._chunks,a=0,o=this.count();a<o;a++){var s=this.getRawIndex(a);switch(i){case 0:e(a);break;case 1:e(n[t[0]][s],a);break;case 2:e(n[t[0]][s],n[t[1]][s],a);break;default:for(var l=0,u=[];l<i;l++)u[l]=n[t[l]][s];u[l]=a,e.apply(null,u)}}},r.prototype.getDataExtent=function(t){var e=this._chunks[t],i=pn();if(!e)return i;var n=this.count(),a=!this._indices,o;if(a)return this._rawExtent[t].slice();if(o=this._extent[t],o)return o.slice();o=i;for(var s=o[0],l=o[1],u=0;u<n;u++){var h=this.getRawIndex(u),c=e[h];c<s&&(s=c),c>l&&(l=c)}return o=[s,l],this._extent[t]=o,o},r.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var i=[],n=this._chunks,a=0;a<n.length;a++)i.push(n[a][e]);return i},r.prototype.clone=function(t,e){var i=new r,n=this._chunks,a=t&&ur(t,function(s,l){return s[l]=!0,s},{});if(a)for(var o=0;o<n.length;o++)i._chunks[o]=a[o]?JM(n[o]):n[o];else i._chunks=n;return this._copyCommonProps(i),e||(i._indices=this._cloneIndices()),i._updateGetRawIdx(),i},r.prototype._copyCommonProps=function(t){t._count=this._count,t._rawCount=this._rawCount,t._provider=this._provider,t._dimensions=this._dimensions,t._extent=it(this._extent),t._rawExtent=it(this._rawExtent)},r.prototype._cloneIndices=function(){if(this._indices){var t=this._indices.constructor,e=void 0;if(t===Array){var i=this._indices.length;e=new t(i);for(var n=0;n<i;n++)e[n]=this._indices[n]}else e=new t(this._indices);return e}return null},r.prototype._getRawIdxIdentity=function(t){return t},r.prototype._getRawIdx=function(t){return t<this._count&&t>=0?this._indices[t]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=(function(){function t(e,i,n,a){return xs(e[a],this._dimensions[a])}Bu={arrayRows:t,objectRows:function(e,i,n,a){return xs(e[i],this._dimensions[a])},keyedColumns:t,original:function(e,i,n,a){var o=e&&(e.value==null?e:e.value);return xs(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(e,i,n,a){return e[a]}}})(),r})(),QM=(function(){function r(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,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 t=this._sourceHost,e=this._getUpstreamSourceManagers(),i=!!e.length,n,a;if(Ko(t)){var o=t,s=void 0,l=void 0,u=void 0;if(i){var h=e[0];h.prepareSource(),u=h.getSource(),s=u.data,l=u.sourceFormat,a=[h._getVersionSign()]}else s=o.get("data",!0),l=oe(s)?Yr:Ee,a=[];var c=this._getSourceMetaRawOption()||{},f=u&&u.metaRawOption||{},d=Q(c.seriesLayoutBy,f.seriesLayoutBy)||null,p=Q(c.sourceHeader,f.sourceHeader),v=Q(c.dimensions,f.dimensions),g=d!==f.seriesLayoutBy||!!p!=!!f.sourceHeader||v;n=g?[nc(s,{seriesLayoutBy:d,sourceHeader:p,dimensions:v},l)]:[]}else{var m=t;if(i){var _=this._applyTransform(e);n=_.sourceList,a=_.upstreamSignList}else{var b=m.get("source",!0);n=[nc(b,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(n,a)},r.prototype._applyTransform=function(t){var e=this._sourceHost,i=e.get("transform",!0),n=e.get("fromTransformResult",!0);if(n!=null){var a="";t.length!==1&&Av(a)}var o,s=[],l=[];return A(t,function(u){u.prepareSource();var h=u.getSource(n||0),c="";n!=null&&!h&&Av(c),s.push(h),l.push(u._getVersionSign())}),i?o=XM(i,s,{datasetIndex:e.componentIndex}):n!=null&&(o=[RM(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e<t.length;e++){var i=t[e];if(i._isDirty()||this._upstreamSignList[e]!==i._getVersionSign())return!0}},r.prototype.getSource=function(t){t=t||0;var e=this._sourceList[t];if(!e){var i=this._getUpstreamSourceManagers();return i[0]&&i[0].getSource(t)}return e},r.prototype.getSharedDataStore=function(t){var e=t.makeStoreSchema();return this._innerGetDataStore(e.dimensions,t.source,e.hash)},r.prototype._innerGetDataStore=function(t,e,i){var n=0,a=this._storeList,o=a[n];o||(o=a[n]={});var s=o[i];if(!s){var l=this._getUpstreamSourceManagers()[0];Ko(this._sourceHost)&&l?s=l._innerGetDataStore(t,e,i):(s=new ac,s.initData(new h_(e,t.length),t)),o[i]=s}return s},r.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if(Ko(t)){var e=r_(t);return e?[e.getSourceManager()]:[]}else return V(oM(t),function(i){return i.getSourceManager()})},r.prototype._getSourceMetaRawOption=function(){var t=this._sourceHost,e,i,n;if(Ko(t))e=t.get("seriesLayoutBy",!0),i=t.get("sourceHeader",!0),n=t.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var a=t;e=a.get("seriesLayoutBy",!0),i=a.get("sourceHeader",!0),n=a.get("dimensions",!0)}return{seriesLayoutBy:e,sourceHeader:i,dimensions:n}},r})();function Ko(r){return r.mainType==="series"}function Av(r){throw new Error(r)}var tD="line-height:1";function y_(r){var t=r.lineHeight;return t==null?tD:"line-height:"+Kt(t+"")+"px"}function __(r,t){var e=r.color||"#6e7079",i=r.fontSize||12,n=r.fontWeight||"400",a=r.color||"#464646",o=r.fontSize||14,s=r.fontWeight||"900";return t==="html"?{nameStyle:"font-size:"+Kt(i+"")+"px;color:"+Kt(e)+";font-weight:"+Kt(n+""),valueStyle:"font-size:"+Kt(o+"")+"px;color:"+Kt(a)+";font-weight:"+Kt(s+"")}:{nameStyle:{fontSize:i,fill:e,fontWeight:n},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var eD=[0,10,20,30],rD=["",`
|
|
32
|
+
`,`
|
|
33
|
+
|
|
34
|
+
`,`
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
`];function zn(r,t){return t.type=r,t}function oc(r){return r.type==="section"}function b_(r){return oc(r)?iD:nD}function x_(r){if(oc(r)){var t=0,e=r.blocks.length,i=e>1||e>0&&!r.noHeader;return A(r.blocks,function(n){var a=x_(n);a>=t&&(t=a+ +(i&&(!a||oc(n)&&!n.noHeader)))}),t}return 0}function iD(r,t,e,i){var n=t.noHeader,a=aD(x_(t)),o=[],s=t.blocks||[];be(!s||W(s)),s=s||[];var l=r.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(Hi(u,l)){var h=new zM(u[l],null);s.sort(function(v,g){return h.evaluate(v.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}A(s,function(v,g){var m=t.valueFormatter,_=b_(v)(m?N(N({},r),{valueFormatter:m}):r,v,g>0?a.html:0,i);_!=null&&o.push(_)});var c=r.renderMode==="richText"?o.join(a.richText):sc(i,o.join(""),n?e:a.html);if(n)return c;var f=rc(t.header,"ordinal",r.useUTC),d=__(i,r.renderMode).nameStyle,p=y_(i);return r.renderMode==="richText"?w_(r,f,d)+a.richText+c:sc(i,'<div style="'+d+";"+p+';">'+Kt(f)+"</div>"+c,e)}function nD(r,t,e,i){var n=r.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=r.useUTC,h=t.valueFormatter||r.valueFormatter||function(x){return x=W(x)?x:[x],V(x,function(C,S){return rc(C,W(d)?d[S]:d,u)})};if(!(a&&o)){var c=s?"":r.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",n),f=a?"":rc(l,"ordinal",u),d=t.valueType,p=o?[]:h(t.value,t.dataIndex),v=!s||!a,g=!s&&a,m=__(i,n),_=m.nameStyle,b=m.valueStyle;return n==="richText"?(s?"":c)+(a?"":w_(r,f,_))+(o?"":lD(r,p,v,g,b)):sc(i,(s?"":c)+(a?"":oD(f,!s,_))+(o?"":sD(p,v,g,b)),e)}}function Mv(r,t,e,i,n,a){if(r){var o=b_(r),s={useUTC:n,renderMode:e,orderMode:i,markupStyleCreator:t,valueFormatter:r.valueFormatter};return o(s,r,0,a)}}function aD(r){return{html:eD[r],richText:rD[r]}}function sc(r,t,e){var i='<div style="clear:both"></div>',n="margin: "+e+"px 0 0",a=y_(r);return'<div style="'+n+";"+a+';">'+t+i+"</div>"}function oD(r,t,e){var i=t?"margin-left:2px":"";return'<span style="'+e+";"+i+'">'+Kt(r)+"</span>"}function sD(r,t,e,i){var n=e?"10px":"20px",a=t?"float:right;margin-left:"+n:"";return r=W(r)?r:[r],'<span style="'+a+";"+i+'">'+V(r,function(o){return Kt(o)}).join(" ")+"</span>"}function w_(r,t,e){return r.markupStyleCreator.wrapRichTextStyle(t,e)}function lD(r,t,e,i,n){var a=[n],o=i?10:20;return e&&a.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(W(t)?t.join(" "):t,a)}function uD(r,t){var e=r.getData().getItemVisual(t,"style"),i=e[r.visualDrawType];return Gi(i)}function S_(r,t){var e=r.get("padding");return e??(t==="richText"?[8,10]:10)}var zu=(function(){function r(){this.richTextStyles={},this._nextStyleNameId=Uy()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(t,e,i){var n=i==="richText"?this._generateStyleName():null,a=K0({color:e,type:t,renderMode:i,markerId:n});return U(a)?a:(this.richTextStyles[n]=a.style,a.content)},r.prototype.wrapRichTextStyle=function(t,e){var i={};W(e)?A(e,function(a){return N(i,a)}):N(i,e);var n=this._generateStyleName();return this.richTextStyles[n]=i,"{"+n+"|"+t+"}"},r})();function hD(r){var t=r.series,e=r.dataIndex,i=r.multipleSeries,n=t.getData(),a=n.mapDimensionsAll("defaultedTooltip"),o=a.length,s=t.getRawValue(e),l=W(s),u=uD(t,e),h,c,f,d;if(o>1||l&&!o){var p=cD(s,t,e,a,u);h=p.inlineValues,c=p.inlineValueTypes,f=p.blocks,d=p.inlineValues[0]}else if(o){var v=n.getDimensionInfo(a[0]);d=h=Bn(n,e,a[0]),c=v.type}else d=h=l?s[0]:s;var g=Ky(t),m=g&&t.name||"",_=n.getName(e),b=i?m:_;return zn("section",{header:m,noHeader:i||!g,sortParam:d,blocks:[zn("nameValue",{markerType:"item",markerColor:u,name:b,noName:!Ge(b),value:h,valueType:c,dataIndex:e})].concat(f||[])})}function cD(r,t,e,i,n){var a=t.getData(),o=ur(r,function(c,f,d){var p=a.getDimensionInfo(d);return c=c||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];i.length?A(i,function(c){h(Bn(a,e,c),c)}):A(r,h);function h(c,f){var d=a.getDimensionInfo(f);!d||d.otherDims.tooltip===!1||(o?u.push(zn("nameValue",{markerType:"subItem",markerColor:n,name:d.displayName,value:c,valueType:d.type})):(s.push(c),l.push(d.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Dr=kt();function Jo(r,t){return r.getName(t)||r.getId(t)}var fD="__universalTransitionEnabled",Ze=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return t.prototype.init=function(e,i,n){this.seriesIndex=this.componentIndex,this.dataTask=Fa({count:pD,reset:vD}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n);var a=Dr(this).sourceManager=new QM(this);a.prepareSource();var o=this.getInitialData(e,n);Iv(o,this),this.dataTask.context.data=o,Dr(this).dataBeforeProcessed=o,Dv(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(e,i){var n=eo(this),a=n?kf(e):{},o=this.subType;dt.hasClass(o)&&(o+="Series"),st(e,i.getTheme().get(this.subType)),st(e,this.getDefaultOption()),hp(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&ro(e,a,n)},t.prototype.mergeOption=function(e,i){e=st(this.option,e,!0),this.fillDataTextStyle(e.data);var n=eo(this);n&&ro(this.option,e,n);var a=Dr(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(e,i);Iv(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Dr(this).dataBeforeProcessed=o,Dv(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(e){if(e&&!oe(e))for(var i=["show"],n=0;n<e.length;n++)e[n]&&e[n].label&&hp(e[n],"label",i)},t.prototype.getInitialData=function(e,i){},t.prototype.appendData=function(e){var i=this.getRawData();i.appendData(e.data)},t.prototype.getData=function(e){var i=lc(this);if(i){var n=i.context.data;return e==null||!n.getLinkedData?n:n.getLinkedData(e)}else return Dr(this).data},t.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},t.prototype.setData=function(e){var i=lc(this);if(i){var n=i.context;n.outputData=e,i!==this.dataTask&&(n.data=e)}Dr(this).data=e},t.prototype.getEncode=function(){var e=this.get("encode",!0);if(e)return nt(e)},t.prototype.getSourceManager=function(){return Dr(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return Dr(this).dataBeforeProcessed},t.prototype.getColorBy=function(){var e=this.get("colorBy");return e||"series"},t.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},t.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},t.prototype.formatTooltip=function(e,i,n){return hD({series:this,dataIndex:e,multipleSeries:i})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(J.node&&!(e&&e.ssr))return!1;var i=this.getShallow("animation");return i&&this.getData().count()>this.getShallow("animationThreshold")&&(i=!1),!!i},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,i,n){var a=this.ecModel,o=Rf.prototype.getColorFromPalette.call(this,e,i,n);return o||(o=a.getColorFromPalette(e,i,n)),o},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,i){this._innerSelect(this.getData(i),e)},t.prototype.unselect=function(e,i){var n=this.option.selectedMap;if(n){var a=this.option.selectedMode,o=this.getData(i);if(a==="series"||n==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<e.length;s++){var l=e[s],u=Jo(o,l);n[u]=!1,this._selectedDataIndicesMap[u]=-1}}},t.prototype.toggleSelect=function(e,i){for(var n=[],a=0;a<e.length;a++)n[0]=e[a],this.isSelected(e[a],i)?this.unselect(n,i):this.select(n,i)},t.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,i=vt(e),n=[],a=0;a<i.length;a++){var o=e[i[a]];o>=0&&n.push(o)}return n},t.prototype.isSelected=function(e,i){var n=this.option.selectedMap;if(!n)return!1;var a=this.getData(i);return(n==="all"||n[Jo(a,e)])&&!a.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[fD])return!0;var e=this.option.universalTransition;return e?e===!0?!0:e&&e.enabled:!1},t.prototype._innerSelect=function(e,i){var n,a,o=this.option,s=o.selectedMode,l=i.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){q(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,h=0;h<l;h++){var c=i[h],f=Jo(e,c);u[f]=!0,this._selectedDataIndicesMap[f]=e.getRawIndex(c)}}else if(s==="single"||s===!0){var d=i[l-1],f=Jo(e,d);o.selectedMap=(n={},n[f]=!0,n),this._selectedDataIndicesMap=(a={},a[f]=e.getRawIndex(d),a)}}},t.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var i=[];e.hasItemOption&&e.each(function(n){var a=e.getRawDataItem(n);a&&a.selected&&i.push(n)}),i.length>0&&this._innerSelect(e,i)}},t.registerClass=function(e){return dt.registerClass(e)},t.protoInitialize=(function(){var e=t.prototype;e.type="series.__base__",e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol="circle",e.visualStyleAccessPath="itemStyle",e.visualDrawType="fill"})(),t})(dt);xe(Ze,p_);xe(Ze,Rf);t0(Ze,dt);function Dv(r){var t=r.name;Ky(r)||(r.name=dD(r)||t)}function dD(r){var t=r.getRawData(),e=t.mapDimensionsAll("seriesName"),i=[];return A(e,function(n){var a=t.getDimensionInfo(n);a.displayName&&i.push(a.displayName)}),i.join(" ")}function pD(r){return r.model.getRawData().count()}function vD(r){var t=r.model;return t.setData(t.getRawData().cloneShallow()),gD}function gD(r,t){t.outputData&&r.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Iv(r,t){A(sy(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(e){r.wrapMethod(e,Ct(mD,t))})}function mD(r,t){var e=lc(r);return e&&e.setOutputEnd((t||this).count()),t}function lc(r){var t=(r.ecModel||{}).scheduler,e=t&&t.getPipeline(r.uid);if(e){var i=e.currentTask;if(i){var n=i.agentStubMap;n&&(i=n.get(r.uid))}return i}}var Jt=(function(){function r(){this.group=new Bt,this.uid=Ao("viewComponent")}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,i,n){},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,i,n){},r.prototype.updateLayout=function(t,e,i,n){},r.prototype.updateVisual=function(t,e,i,n){},r.prototype.toggleBlurSeries=function(t,e,i){},r.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},r})();sf(Jt);vl(Jt);function C_(){var r=kt();return function(t){var e=r(t),i=t.pipelineContext,n=!!e.large,a=!!e.progressiveRender,o=e.large=!!(i&&i.large),s=e.progressiveRender=!!(i&&i.progressiveRender);return(n!==o||a!==s)&&"reset"}}var T_=kt(),yD=C_(),_e=(function(){function r(){this.group=new Bt,this.uid=Ao("viewChart"),this.renderTask=Fa({plan:_D,reset:bD}),this.renderTask.context={view:this}}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,i,n){},r.prototype.highlight=function(t,e,i,n){var a=t.getData(n&&n.dataType);a&&kv(a,n,"emphasis")},r.prototype.downplay=function(t,e,i,n){var a=t.getData(n&&n.dataType);a&&kv(a,n,"normal")},r.prototype.remove=function(t,e){this.group.removeAll()},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,i,n){this.render(t,e,i,n)},r.prototype.updateLayout=function(t,e,i,n){this.render(t,e,i,n)},r.prototype.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},r.prototype.eachRendered=function(t){_f(this.group,t)},r.markUpdateMethod=function(t,e){T_(t).updateMethod=e},r.protoInitialize=(function(){var t=r.prototype;t.type="chart"})(),r})();function Pv(r,t,e){r&&Jh(r)&&(t==="emphasis"?Nn:Fn)(r,e)}function kv(r,t,e){var i=Wi(r,t),n=t&&t.highlightKey!=null?HT(t.highlightKey):null;i!=null?A(ne(i),function(a){Pv(r.getItemGraphicEl(a),e,n)}):r.eachItemGraphicEl(function(a){Pv(a,e,n)})}sf(_e);vl(_e);function _D(r){return yD(r.model)}function bD(r){var t=r.model,e=r.ecModel,i=r.api,n=r.payload,a=t.pipelineContext.progressiveRender,o=r.view,s=n&&T_(n).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,e,i,n),xD[l]}var xD={incrementalPrepareRender:{progress:function(r,t){t.view.incrementalRender(r,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(r,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},Gs="\0__throttleOriginMethod",Rv="\0__throttleRate",Lv="\0__throttleType";function Nf(r,t,e){var i,n=0,a=0,o=null,s,l,u,h;t=t||0;function c(){a=new Date().getTime(),o=null,r.apply(l,u||[])}var f=function(){for(var d=[],p=0;p<arguments.length;p++)d[p]=arguments[p];i=new Date().getTime(),l=this,u=d;var v=h||t,g=h||e;h=null,s=i-(g?n:a)-v,clearTimeout(o),g?o=setTimeout(c,v):s>=0?c():o=setTimeout(c,-s),n=i};return f.clear=function(){o&&(clearTimeout(o),o=null)},f.debounceNextCall=function(d){h=d},f}function A_(r,t,e,i){var n=r[t];if(n){var a=n[Gs]||n,o=n[Lv],s=n[Rv];if(s!==e||o!==i){if(e==null||!i)return r[t]=a;n=r[t]=Nf(a,e,i==="debounce"),n[Gs]=a,n[Lv]=i,n[Rv]=e}return n}}function uc(r,t){var e=r[t];e&&e[Gs]&&(e.clear&&e.clear(),r[t]=e[Gs])}var Ov=kt(),Ev={itemStyle:Ka(V0,!0),lineStyle:Ka(z0,!0)},wD={lineStyle:"stroke",itemStyle:"fill"};function M_(r,t){var e=r.visualStyleMapper||Ev[t];return e||(console.warn("Unknown style type '"+t+"'."),Ev.itemStyle)}function D_(r,t){var e=r.visualDrawType||wD[t];return e||(console.warn("Unknown style type '"+t+"'."),"fill")}var SD={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData(),i=r.visualStyleAccessPath||"itemStyle",n=r.getModel(i),a=M_(r,i),o=a(n),s=n.getShallow("decal");s&&(e.setVisual("decal",s),s.dirty=!0);var l=D_(r,i),u=o[l],h=tt(u)?u:null,c=o.fill==="auto"||o.stroke==="auto";if(!o[l]||h||c){var f=r.getColorFromPalette(r.name,null,t.getSeriesCount());o[l]||(o[l]=f,e.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||tt(o.fill)?f:o.fill,o.stroke=o.stroke==="auto"||tt(o.stroke)?f:o.stroke}if(e.setVisual("style",o),e.setVisual("drawType",l),!t.isSeriesFiltered(r)&&h)return e.setVisual("colorFromPalette",!1),{dataEach:function(d,p){var v=r.getDataParams(p),g=N({},o);g[l]=h(v),d.setItemVisual(p,"style",g)}}}},la=new Tt,CD={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!(r.ignoreStyleOnData||t.isSeriesFiltered(r))){var e=r.getData(),i=r.visualStyleAccessPath||"itemStyle",n=M_(r,i),a=e.getVisual("drawType");return{dataEach:e.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[i]){la.option=l[i];var u=n(la),h=o.ensureUniqueItemVisual(s,"style");N(h,u),la.option.decal&&(o.setItemVisual(s,"decal",la.option.decal),la.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},TD={performRawSeries:!0,overallReset:function(r){var t=nt();r.eachSeries(function(e){var i=e.getColorBy();if(!e.isColorBySeries()){var n=e.type+"-"+i,a=t.get(n);a||(a={},t.set(n,a)),Ov(e).scope=a}}),r.eachSeries(function(e){if(!(e.isColorBySeries()||r.isSeriesFiltered(e))){var i=e.getRawData(),n={},a=e.getData(),o=Ov(e).scope,s=e.visualStyleAccessPath||"itemStyle",l=D_(e,s);a.each(function(u){var h=a.getRawIndex(u);n[h]=u}),i.each(function(u){var h=n[u],c=a.getItemVisual(h,"colorFromPalette");if(c){var f=a.ensureUniqueItemVisual(h,"style"),d=i.getName(u)||u+"",p=i.count();f[l]=e.getColorFromPalette(d,o,p)}})}})}},Qo=Math.PI;function AD(r,t){t=t||{},lt(t,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var e=new Bt,i=new Ft({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});e.add(i);var n=new Vt({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Ft({style:{fill:"none"},textContent:n,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});e.add(a);var o;return t.showSpinner&&(o=new Co({shape:{startAngle:-Qo/2,endAngle:-Qo/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Qo*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Qo*3/2}).delay(300).start("circularInOut"),e.add(o)),e.resize=function(){var s=n.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(r.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),h=r.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:h}),a.setShape({x:u-l,y:h-l,width:l*2,height:l*2}),i.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},e.resize(),e}var I_=(function(){function r(t,e,i,n){this._stageTaskMap=nt(),this.ecInstance=t,this.api=e,i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice(),this._allHandlers=i.concat(n)}return r.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(i){var n=i.overallTask;n&&n.dirty()})},r.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),n=i.context,a=!e&&i.progressiveEnabled&&(!n||n.progressiveRender)&&t.__idxInPipeline>i.blockIndex,o=a?i.step:null,s=n&&n.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},r.prototype.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData(),a=n.count(),o=i.progressiveEnabled&&e.incrementalPrepareRender&&a>=i.threshold,s=t.get("large")&&a>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?a:null;t.pipelineContext=i.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(t){var e=this,i=e._pipelineMap=nt();t.eachSeries(function(n){var a=n.getProgressive(),o=n.uid;i.set(o,{id:o,head:null,tail:null,threshold:n.getProgressiveThreshold(),progressiveEnabled:a&&!(n.preventIncremental&&n.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),e._pipe(n,n.dataTask)})},r.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),i=this.api;A(this._allHandlers,function(n){var a=t.get(n.uid)||t.set(n.uid,{}),o="";be(!(n.reset&&n.overallReset),o),n.reset&&this._createSeriesStageTask(n,a,e,i),n.overallReset&&this._createOverallStageTask(n,a,e,i)},this)},r.prototype.prepareView=function(t,e,i,n){var a=t.renderTask,o=a.context;o.model=e,o.ecModel=i,o.api=n,a.__block=!t.incrementalPrepareRender,this._pipe(e,a)},r.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},r.prototype.performVisualTasks=function(t,e,i){this._performStageTasks(this._visualHandlers,t,e,i)},r.prototype._performStageTasks=function(t,e,i,n){n=n||{};var a=!1,o=this;A(t,function(l,u){if(!(n.visualType&&n.visualType!==l.visualType)){var h=o._stageTaskMap.get(l.uid),c=h.seriesTaskMap,f=h.overallTask;if(f){var d,p=f.agentStubMap;p.each(function(g){s(n,g)&&(g.dirty(),d=!0)}),d&&f.dirty(),o.updatePayload(f,i);var v=o.getPerformArgs(f,n.block);p.each(function(g){g.perform(v)}),f.perform(v)&&(a=!0)}else c&&c.each(function(g,m){s(n,g)&&g.dirty();var _=o.getPerformArgs(g,n.block);_.skip=!l.performRawSeries&&e.isSeriesFiltered(g.context.model),o.updatePayload(g,i),g.perform(_)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},r.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(i){e=i.dataTask.perform()||e}),this.unfinished=e||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})},r.prototype.updatePayload=function(t,e){e!=="remain"&&(t.context.payload=e)},r.prototype._createSeriesStageTask=function(t,e,i,n){var a=this,o=e.seriesTaskMap,s=e.seriesTaskMap=nt(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?i.eachRawSeries(h):l?i.eachRawSeriesByType(l,h):u&&u(i,n).each(h);function h(c){var f=c.uid,d=s.set(f,o&&o.get(f)||Fa({plan:kD,reset:RD,count:OD}));d.context={model:c,ecModel:i,api:n,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:a},a._pipe(c,d)}},r.prototype._createOverallStageTask=function(t,e,i,n){var a=this,o=e.overallTask=e.overallTask||Fa({reset:MD});o.context={ecModel:i,api:n,overallReset:t.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=nt(),u=t.seriesType,h=t.getTargetSeries,c=!0,f=!1,d="";be(!t.createOnAllSeries,d),u?i.eachRawSeriesByType(u,p):h?h(i,n).each(p):(c=!1,A(i.getSeries(),p));function p(v){var g=v.uid,m=l.set(g,s&&s.get(g)||(f=!0,Fa({reset:DD,onDirty:PD})));m.context={model:v,overallProgress:c},m.agent=o,m.__block=c,a._pipe(v,m)}f&&o.dirty()},r.prototype._pipe=function(t,e){var i=t.uid,n=this._pipelineMap.get(i);!n.head&&(n.head=e),n.tail&&n.tail.pipe(e),n.tail=e,e.__idxInPipeline=n.count++,e.__pipeline=n},r.wrapStageHandler=function(t,e){return tt(t)&&(t={overallReset:t,seriesType:ED(t)}),t.uid=Ao("stageHandler"),e&&(t.visualType=e),t},r})();function MD(r){r.overallReset(r.ecModel,r.api,r.payload)}function DD(r){return r.overallProgress&&ID}function ID(){this.agent.dirty(),this.getDownstream().dirty()}function PD(){this.agent&&this.agent.dirty()}function kD(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function RD(r){r.useClearVisual&&r.data.clearAllVisual();var t=r.resetDefines=ne(r.reset(r.model,r.ecModel,r.api,r.payload));return t.length>1?V(t,function(e,i){return P_(i)}):LD}var LD=P_(0);function P_(r){return function(t,e){var i=e.data,n=e.resetDefines[r];if(n&&n.dataEach)for(var a=t.start;a<t.end;a++)n.dataEach(i,a);else n&&n.progress&&n.progress(t,i)}}function OD(r){return r.data.count()}function ED(r){$s=null;try{r(no,k_)}catch{}return $s}var no={},k_={},$s;R_(no,Lf);R_(k_,n_);no.eachSeriesByType=no.eachRawSeriesByType=function(r){$s=r};no.eachComponent=function(r){r.mainType==="series"&&r.subType&&($s=r.subType)};function R_(r,t){for(var e in t.prototype)r[e]=Gt}var jv=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const jD={color:jv,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],jv]};var Xt="#B9B8CE",Nv="#100C2A",ts=function(){return{axisLine:{lineStyle:{color:Xt}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},Fv=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],L_={darkMode:!0,color:Fv,backgroundColor:Nv,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:Xt},pageTextStyle:{color:Xt}},textStyle:{color:Xt},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:Xt}},dataZoom:{borderColor:"#71708A",textStyle:{color:Xt},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:Xt}},timeline:{lineStyle:{color:Xt},label:{color:Xt},controlStyle:{color:Xt,borderColor:Xt}},calendar:{itemStyle:{color:Nv},dayLabel:{color:Xt},monthLabel:{color:Xt},yearLabel:{color:Xt}},timeAxis:ts(),logAxis:ts(),valueAxis:ts(),categoryAxis:ts(),line:{symbol:"circle"},graph:{color:Fv},gauge:{title:{color:Xt},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:Xt},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};L_.categoryAxis.splitLine.show=!1;var ND=(function(){function r(){}return r.prototype.normalizeQuery=function(t){var e={},i={},n={};if(U(t)){var a=sr(t);e.mainType=a.main||null,e.subType=a.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};A(t,function(l,u){for(var h=!1,c=0;c<o.length;c++){var f=o[c],d=u.lastIndexOf(f);if(d>0&&d===u.length-f.length){var p=u.slice(0,d);p!=="data"&&(e.mainType=p,e[f.toLowerCase()]=l,h=!0)}}s.hasOwnProperty(u)&&(i[u]=l,h=!0),h||(n[u]=l)})}return{cptQuery:e,dataQuery:i,otherQuery:n}},r.prototype.filter=function(t,e){var i=this.eventInfo;if(!i)return!0;var n=i.targetEl,a=i.packedEvent,o=i.model,s=i.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return h(l,o,"mainType")&&h(l,o,"subType")&&h(l,o,"index","componentIndex")&&h(l,o,"name")&&h(l,o,"id")&&h(u,a,"name")&&h(u,a,"dataIndex")&&h(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,n,a));function h(c,f,d,p){return c[d]==null||f[p||d]===c[d]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r})(),hc=["symbol","symbolSize","symbolRotate","symbolOffset"],Bv=hc.concat(["symbolKeepAspect"]),FD={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData();if(r.legendIcon&&e.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var i={},n={},a=!1,o=0;o<hc.length;o++){var s=hc[o],l=r.get(s);tt(l)?(a=!0,n[s]=l):i[s]=l}if(i.symbol=i.symbol||r.defaultSymbol,e.setVisual(N({legendIcon:r.legendIcon||i.symbol,symbolKeepAspect:r.get("symbolKeepAspect")},i)),t.isSeriesFiltered(r))return;var u=vt(n);function h(c,f){for(var d=r.getRawValue(f),p=r.getDataParams(f),v=0;v<u.length;v++){var g=u[v];c.setItemVisual(f,g,n[g](d,p))}}return{dataEach:a?h:null}}},BD={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!r.hasSymbolVisual||t.isSeriesFiltered(r))return;var e=r.getData();function i(n,a){for(var o=n.getItemModel(a),s=0;s<Bv.length;s++){var l=Bv[s],u=o.getShallow(l,!0);u!=null&&n.setItemVisual(a,l,u)}}return{dataEach:e.hasItemOption?i:null}}};function zD(r,t,e){switch(e){case"color":var i=r.getItemVisual(t,"style");return i[r.getVisual("drawType")];case"opacity":return r.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getItemVisual(t,e)}}function VD(r,t){switch(t){case"color":var e=r.getVisual("style");return e[r.getVisual("drawType")];case"opacity":return r.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getVisual(t)}}function vn(r,t,e,i,n){var a=r+t;e.isSilent(a)||i.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=n.selected,h=0;h<u.length;h++)if(u[h].seriesIndex===s){var c=o.getData(),f=Wi(c,n.fromActionPayload);e.trigger(a,{type:a,seriesId:o.id,name:W(f)?c.getName(f[0]):c.getName(f),selected:U(l)?l:N({},l)})}})}function HD(r,t,e){r.on("selectchanged",function(i){var n=e.getModel();i.isFromClick?(vn("map","selectchanged",t,n,i),vn("pie","selectchanged",t,n,i)):i.fromAction==="select"?(vn("map","selected",t,n,i),vn("pie","selected",t,n,i)):i.fromAction==="unselect"&&(vn("map","unselected",t,n,i),vn("pie","unselected",t,n,i))})}function Ta(r,t,e){for(var i;r&&!(t(r)&&(i=r,e));)r=r.__hostTarget||r.parent;return i}var WD=Math.round(Math.random()*9),GD=typeof Object.defineProperty=="function",$D=(function(){function r(){this._id="__ec_inner_"+WD++}return r.prototype.get=function(t){return this._guard(t)[this._id]},r.prototype.set=function(t,e){var i=this._guard(t);return GD?Object.defineProperty(i,this._id,{value:e,enumerable:!1,configurable:!0}):i[this._id]=e,this},r.prototype.delete=function(t){return this.has(t)?(delete this._guard(t)[this._id],!0):!1},r.prototype.has=function(t){return!!this._guard(t)[this._id]},r.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},r})(),UD=bt.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,t){var e=t.cx,i=t.cy,n=t.width/2,a=t.height/2;r.moveTo(e,i-a),r.lineTo(e+n,i+a),r.lineTo(e-n,i+a),r.closePath()}}),YD=bt.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,t){var e=t.cx,i=t.cy,n=t.width/2,a=t.height/2;r.moveTo(e,i-a),r.lineTo(e+n,i),r.lineTo(e,i+a),r.lineTo(e-n,i),r.closePath()}}),XD=bt.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,t){var e=t.x,i=t.y,n=t.width/5*3,a=Math.max(n,t.height),o=n/2,s=o*o/(a-o),l=i-a+o+s,u=Math.asin(s/o),h=Math.cos(u)*o,c=Math.sin(u),f=Math.cos(u),d=o*.6,p=o*.7;r.moveTo(e-h,l+s),r.arc(e,l,o,Math.PI-u,Math.PI*2+u),r.bezierCurveTo(e+h-c*d,l+s+f*d,e,i-p,e,i),r.bezierCurveTo(e,i-p,e-h+c*d,l+s+f*d,e-h,l+s),r.closePath()}}),ZD=bt.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,t){var e=t.height,i=t.width,n=t.x,a=t.y,o=i/3*2;r.moveTo(n,a),r.lineTo(n+o,a+e),r.lineTo(n,a+e/4*3),r.lineTo(n-o,a+e),r.lineTo(n,a),r.closePath()}}),qD={line:Xe,rect:Ft,roundRect:Ft,square:Ft,circle:bo,diamond:YD,pin:XD,arrow:ZD,triangle:UD},KD={line:function(r,t,e,i,n){n.x1=r,n.y1=t+i/2,n.x2=r+e,n.y2=t+i/2},rect:function(r,t,e,i,n){n.x=r,n.y=t,n.width=e,n.height=i},roundRect:function(r,t,e,i,n){n.x=r,n.y=t,n.width=e,n.height=i,n.r=Math.min(e,i)/4},square:function(r,t,e,i,n){var a=Math.min(e,i);n.x=r,n.y=t,n.width=a,n.height=a},circle:function(r,t,e,i,n){n.cx=r+e/2,n.cy=t+i/2,n.r=Math.min(e,i)/2},diamond:function(r,t,e,i,n){n.cx=r+e/2,n.cy=t+i/2,n.width=e,n.height=i},pin:function(r,t,e,i,n){n.x=r+e/2,n.y=t+i/2,n.width=e,n.height=i},arrow:function(r,t,e,i,n){n.x=r+e/2,n.y=t+i/2,n.width=e,n.height=i},triangle:function(r,t,e,i,n){n.cx=r+e/2,n.cy=t+i/2,n.width=e,n.height=i}},cc={};A(qD,function(r,t){cc[t]=new r});var JD=bt.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(r,t,e){var i=Ny(r,t,e),n=this.shape;return n&&n.symbolType==="pin"&&t.position==="inside"&&(i.y=e.y+e.height*.4),i},buildPath:function(r,t,e){var i=t.symbolType;if(i!=="none"){var n=cc[i];n||(i="rect",n=cc[i]),KD[i](t.x,t.y,t.width,t.height,n.shape),n.buildPath(r,n.shape,e)}}});function QD(r,t){if(this.type!=="image"){var e=this.style;this.__isEmptyBrush?(e.stroke=r,e.fill=t||"#fff",e.lineWidth=2):this.shape.symbolType==="line"?e.stroke=r:e.fill=r,this.markRedraw()}}function $i(r,t,e,i,n,a,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=gf(r.slice(8),new mt(t,e,i,n),o?"center":"cover"):r.indexOf("path://")===0?l=Cl(r.slice(7),{},new mt(t,e,i,n),o?"center":"cover"):l=new JD({shape:{symbolType:r,x:t,y:e,width:i,height:n}}),l.__isEmptyBrush=s,l.setColor=QD,a&&l.setColor(a),l}function O_(r){return W(r)||(r=[+r,+r]),[r[0]||0,r[1]||0]}function Ff(r,t){if(r!=null)return W(r)||(r=[r,r]),[ee(r[0],t[0])||0,ee(Q(r[1],r[0]),t[1])||0]}function Oi(r){return isFinite(r)}function tI(r,t,e){var i=t.x==null?0:t.x,n=t.x2==null?1:t.x2,a=t.y==null?0:t.y,o=t.y2==null?0:t.y2;t.global||(i=i*e.width+e.x,n=n*e.width+e.x,a=a*e.height+e.y,o=o*e.height+e.y),i=Oi(i)?i:0,n=Oi(n)?n:1,a=Oi(a)?a:0,o=Oi(o)?o:0;var s=r.createLinearGradient(i,a,n,o);return s}function eI(r,t,e){var i=e.width,n=e.height,a=Math.min(i,n),o=t.x==null?.5:t.x,s=t.y==null?.5:t.y,l=t.r==null?.5:t.r;t.global||(o=o*i+e.x,s=s*n+e.y,l=l*a),o=Oi(o)?o:.5,s=Oi(s)?s:.5,l=l>=0&&Oi(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function zv(r,t,e){for(var i=t.type==="radial"?eI(r,t,e):tI(r,t,e),n=t.colorStops,a=0;a<n.length;a++)i.addColorStop(n[a].offset,n[a].color);return i}function rI(r,t){if(r===t||!r&&!t)return!1;if(!r||!t||r.length!==t.length)return!0;for(var e=0;e<r.length;e++)if(r[e]!==t[e])return!0;return!1}function es(r){return parseInt(r,10)}function Vv(r,t,e){var i=["width","height"][t],n=["clientWidth","clientHeight"][t],a=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(e[i]!=null&&e[i]!=="auto")return parseFloat(e[i]);var s=document.defaultView.getComputedStyle(r);return(r[n]||es(s[i])||es(r.style[i]))-(es(s[a])||0)-(es(s[o])||0)|0}function iI(r,t){return!r||r==="solid"||!(t>0)?null:r==="dashed"?[4*t,2*t]:r==="dotted"?[t]:At(r)?[r]:W(r)?r:null}function Bf(r){var t=r.style,e=t.lineDash&&t.lineWidth>0&&iI(t.lineDash,t.lineWidth),i=t.lineDashOffset;if(e){var n=t.strokeNoScale&&r.getLineScale?r.getLineScale():1;n&&n!==1&&(e=V(e,function(a){return a/n}),i/=n)}return[e,i]}var nI=new Jr(!0);function Us(r){var t=r.stroke;return!(t==null||t==="none"||!(r.lineWidth>0))}function Hv(r){return typeof r=="string"&&r!=="none"}function Ys(r){var t=r.fill;return t!=null&&t!=="none"}function Wv(r,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.fillOpacity*t.opacity,r.fill(),r.globalAlpha=e}else r.fill()}function Gv(r,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.strokeOpacity*t.opacity,r.stroke(),r.globalAlpha=e}else r.stroke()}function $v(r,t,e){var i=lf(t.image,t.__image,e);if(gl(i)){var n=r.createPattern(i,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&n&&n.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*Da),a.scaleSelf(t.scaleX||1,t.scaleY||1),n.setTransform(a)}return n}}function aI(r,t,e,i){var n,a=Us(e),o=Ys(e),s=e.strokePercent,l=s<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var h=t.path||nI,c=t.__dirty;if(!i){var f=e.fill,d=e.stroke,p=o&&!!f.colorStops,v=a&&!!d.colorStops,g=o&&!!f.image,m=a&&!!d.image,_=void 0,b=void 0,x=void 0,C=void 0,S=void 0;(p||v)&&(S=t.getBoundingRect()),p&&(_=c?zv(r,f,S):t.__canvasFillGradient,t.__canvasFillGradient=_),v&&(b=c?zv(r,d,S):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),g&&(x=c||!t.__canvasFillPattern?$v(r,f,t):t.__canvasFillPattern,t.__canvasFillPattern=x),m&&(C=c||!t.__canvasStrokePattern?$v(r,d,t):t.__canvasStrokePattern,t.__canvasStrokePattern=x),p?r.fillStyle=_:g&&(x?r.fillStyle=x:o=!1),v?r.strokeStyle=b:m&&(C?r.strokeStyle=C:a=!1)}var T=t.getGlobalScale();h.setScale(T[0],T[1],t.segmentIgnoreThreshold);var M,D;r.setLineDash&&e.lineDash&&(n=Bf(t),M=n[0],D=n[1]);var I=!0;(u||c&bn)&&(h.setDPR(r.dpr),l?h.setContext(null):(h.setContext(r),I=!1),h.reset(),t.buildPath(h,t.shape,i),h.toStatic(),t.pathUpdated()),I&&h.rebuildPath(r,l?s:1),M&&(r.setLineDash(M),r.lineDashOffset=D),i||(e.strokeFirst?(a&&Gv(r,e),o&&Wv(r,e)):(o&&Wv(r,e),a&&Gv(r,e))),M&&r.setLineDash([])}function oI(r,t,e){var i=t.__image=lf(e.image,t.__image,t,t.onload);if(!(!i||!gl(i))){var n=e.x||0,a=e.y||0,o=t.getWidth(),s=t.getHeight(),l=i.width/i.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=i.width,s=i.height),e.sWidth&&e.sHeight){var u=e.sx||0,h=e.sy||0;r.drawImage(i,u,h,e.sWidth,e.sHeight,n,a,o,s)}else if(e.sx&&e.sy){var u=e.sx,h=e.sy,c=o-u,f=s-h;r.drawImage(i,u,h,c,f,n,a,o,s)}else r.drawImage(i,n,a,o,s)}}function sI(r,t,e){var i,n=e.text;if(n!=null&&(n+=""),n){r.font=e.font||Zr,r.textAlign=e.textAlign,r.textBaseline=e.textBaseline;var a=void 0,o=void 0;r.setLineDash&&e.lineDash&&(i=Bf(t),a=i[0],o=i[1]),a&&(r.setLineDash(a),r.lineDashOffset=o),e.strokeFirst?(Us(e)&&r.strokeText(n,e.x,e.y),Ys(e)&&r.fillText(n,e.x,e.y)):(Ys(e)&&r.fillText(n,e.x,e.y),Us(e)&&r.strokeText(n,e.x,e.y)),a&&r.setLineDash([])}}var Uv=["shadowBlur","shadowOffsetX","shadowOffsetY"],Yv=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function E_(r,t,e,i,n){var a=!1;if(!i&&(e=e||{},t===e))return!1;if(i||t.opacity!==e.opacity){de(r,n),a=!0;var o=Math.max(Math.min(t.opacity,1),0);r.globalAlpha=isNaN(o)?Ni.opacity:o}(i||t.blend!==e.blend)&&(a||(de(r,n),a=!0),r.globalCompositeOperation=t.blend||Ni.blend);for(var s=0;s<Uv.length;s++){var l=Uv[s];(i||t[l]!==e[l])&&(a||(de(r,n),a=!0),r[l]=r.dpr*(t[l]||0))}return(i||t.shadowColor!==e.shadowColor)&&(a||(de(r,n),a=!0),r.shadowColor=t.shadowColor||Ni.shadowColor),a}function Xv(r,t,e,i,n){var a=ao(t,n.inHover),o=i?null:e&&ao(e,n.inHover)||{};if(a===o)return!1;var s=E_(r,a,o,i,n);if((i||a.fill!==o.fill)&&(s||(de(r,n),s=!0),Hv(a.fill)&&(r.fillStyle=a.fill)),(i||a.stroke!==o.stroke)&&(s||(de(r,n),s=!0),Hv(a.stroke)&&(r.strokeStyle=a.stroke)),(i||a.opacity!==o.opacity)&&(s||(de(r,n),s=!0),r.globalAlpha=a.opacity==null?1:a.opacity),t.hasStroke()){var l=a.lineWidth,u=l/(a.strokeNoScale&&t.getLineScale?t.getLineScale():1);r.lineWidth!==u&&(s||(de(r,n),s=!0),r.lineWidth=u)}for(var h=0;h<Yv.length;h++){var c=Yv[h],f=c[0];(i||a[f]!==o[f])&&(s||(de(r,n),s=!0),r[f]=a[f]||c[1])}return s}function lI(r,t,e,i,n){return E_(r,ao(t,n.inHover),e&&ao(e,n.inHover),i,n)}function j_(r,t){var e=t.transform,i=r.dpr||1;e?r.setTransform(i*e[0],i*e[1],i*e[2],i*e[3],i*e[4],i*e[5]):r.setTransform(i,0,0,i,0,0)}function uI(r,t,e){for(var i=!1,n=0;n<r.length;n++){var a=r[n];i=i||a.isZeroArea(),j_(t,a),t.beginPath(),a.buildPath(t,a.shape),t.clip()}e.allClipped=i}function hI(r,t){return r&&t?r[0]!==t[0]||r[1]!==t[1]||r[2]!==t[2]||r[3]!==t[3]||r[4]!==t[4]||r[5]!==t[5]:!(!r&&!t)}var Zv=1,qv=2,Kv=3,Jv=4;function cI(r){var t=Ys(r),e=Us(r);return!(r.lineDash||!(+t^+e)||t&&typeof r.fill!="string"||e&&typeof r.stroke!="string"||r.strokePercent<1||r.strokeOpacity<1||r.fillOpacity<1)}function de(r,t){t.batchFill&&r.fill(),t.batchStroke&&r.stroke(),t.batchFill="",t.batchStroke=""}function ao(r,t){return t&&r.__hoverStyle||r.style}function N_(r,t){fc(r,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function fc(r,t,e,i){var n=t.transform;if(!t.shouldBePainted(e.viewWidth,e.viewHeight,!1,!1)){t.__dirty&=~nr,t.__isRendered=!1;return}var a=t.__clipPaths,o=e.prevElClipPaths,s=!1,l=!1;if((!o||rI(a,o))&&(o&&o.length&&(de(r,e),r.restore(),l=s=!0,e.prevElClipPaths=null,e.allClipped=!1,e.prevEl=null),a&&a.length&&(de(r,e),r.save(),uI(a,r,e),s=!0),e.prevElClipPaths=a),e.allClipped){t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var u=e.prevEl;u||(l=s=!0);var h=t instanceof bt&&t.autoBatch&&cI(t.style);s||hI(n,u.transform)?(de(r,e),j_(r,t)):h||de(r,e);var c=ao(t,e.inHover);t instanceof bt?(e.lastDrawType!==Zv&&(l=!0,e.lastDrawType=Zv),Xv(r,t,u,l,e),(!h||!e.batchFill&&!e.batchStroke)&&r.beginPath(),aI(r,t,c,h),h&&(e.batchFill=c.fill||"",e.batchStroke=c.stroke||"")):t instanceof Ja?(e.lastDrawType!==Kv&&(l=!0,e.lastDrawType=Kv),Xv(r,t,u,l,e),sI(r,t,c)):t instanceof qe?(e.lastDrawType!==qv&&(l=!0,e.lastDrawType=qv),lI(r,t,u,l,e),oI(r,t,c)):t.getTemporalDisplayables&&(e.lastDrawType!==Jv&&(l=!0,e.lastDrawType=Jv),fI(r,t,e)),h&&i&&de(r,e),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),e.prevEl=t,t.__dirty=0,t.__isRendered=!0}function fI(r,t,e){var i=t.getDisplayables(),n=t.getTemporalDisplayables();r.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:e.viewWidth,viewHeight:e.viewHeight,inHover:e.inHover},o,s;for(o=t.getCursor(),s=i.length;o<s;o++){var l=i[o];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),fc(r,l,a,o===s-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}for(var u=0,h=n.length;u<h;u++){var l=n[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),fc(r,l,a,u===h-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}t.clearTemporalDisplayables(),t.notClear=!0,r.restore()}var Vu=new $D,Qv=new mo(100),tg=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function eg(r,t){if(r==="none")return null;var e=t.getDevicePixelRatio(),i=t.getZr(),n=i.painter.type==="svg";r.dirty&&Vu.delete(r);var a=Vu.get(r);if(a)return a;var o=lt(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=n?1:1/e,Vu.set(r,s),r.dirty=!1,s;function l(u){for(var h=[e],c=!0,f=0;f<tg.length;++f){var d=o[tg[f]];if(d!=null&&!W(d)&&!U(d)&&!At(d)&&typeof d!="boolean"){c=!1;break}h.push(d)}var p;if(c){p=h.join(",")+(n?"-svg":"");var v=Qv.get(p);v&&(n?u.svgElement=v:u.image=v)}var g=B_(o.dashArrayX),m=dI(o.dashArrayY),_=F_(o.symbol),b=pI(g),x=z_(m),C=!n&&qr.createCanvas(),S=n&&{tag:"g",attrs:{},key:"dcl",children:[]},T=D(),M;C&&(C.width=T.width*e,C.height=T.height*e,M=C.getContext("2d")),I(),c&&Qv.put(p,C||S),u.image=C,u.svgElement=S,u.svgWidth=T.width,u.svgHeight=T.height;function D(){for(var P=1,k=0,R=b.length;k<R;++k)P=lp(P,b[k]);for(var L=1,k=0,R=_.length;k<R;++k)L=lp(L,_[k].length);P*=L;var j=x*b.length*_.length;return{width:Math.max(1,Math.min(P,o.maxTileWidth)),height:Math.max(1,Math.min(j,o.maxTileHeight))}}function I(){M&&(M.clearRect(0,0,C.width,C.height),o.backgroundColor&&(M.fillStyle=o.backgroundColor,M.fillRect(0,0,C.width,C.height)));for(var P=0,k=0;k<m.length;++k)P+=m[k];if(P<=0)return;for(var R=-x,L=0,j=0,E=0;R<T.height;){if(L%2===0){for(var Z=j/2%_.length,G=0,Y=0,et=0;G<T.width*2;){for(var ut=0,k=0;k<g[E].length;++k)ut+=g[E][k];if(ut<=0)break;if(Y%2===0){var ot=(1-o.symbolSize)*.5,ft=G+g[E][Y]*ot,gt=R+m[L]*ot,B=g[E][Y]*o.symbolSize,Rt=m[L]*o.symbolSize,Mt=et/2%_[Z].length;Lt(ft,gt,B,Rt,_[Z][Mt])}G+=g[E][Y],++et,++Y,Y===g[E].length&&(Y=0)}++E,E===g.length&&(E=0)}R+=m[L],++j,++L,L===m.length&&(L=0)}function Lt(xt,z,X,K,Ot){var St=n?1:e,se=$i(Ot,xt*St,z*St,X*St,K*St,o.color,o.symbolKeepAspect);if(n){var je=i.painter.renderOneToVNode(se);je&&S.children.push(je)}else N_(M,se)}}}}function F_(r){if(!r||r.length===0)return[["rect"]];if(U(r))return[[r]];for(var t=!0,e=0;e<r.length;++e)if(!U(r[e])){t=!1;break}if(t)return F_([r]);for(var i=[],e=0;e<r.length;++e)U(r[e])?i.push([r[e]]):i.push(r[e]);return i}function B_(r){if(!r||r.length===0)return[[0,0]];if(At(r)){var t=Math.ceil(r);return[[t,t]]}for(var e=!0,i=0;i<r.length;++i)if(!At(r[i])){e=!1;break}if(e)return B_([r]);for(var n=[],i=0;i<r.length;++i)if(At(r[i])){var t=Math.ceil(r[i]);n.push([t,t])}else{var t=V(r[i],function(s){return Math.ceil(s)});t.length%2===1?n.push(t.concat(t)):n.push(t)}return n}function dI(r){if(!r||typeof r=="object"&&r.length===0)return[0,0];if(At(r)){var t=Math.ceil(r);return[t,t]}var e=V(r,function(i){return Math.ceil(i)});return r.length%2?e.concat(e):e}function pI(r){return V(r,function(t){return z_(t)})}function z_(r){for(var t=0,e=0;e<r.length;++e)t+=r[e];return r.length%2===1?t*2:t}function vI(r,t){r.eachRawSeries(function(e){if(!r.isSeriesFiltered(e)){var i=e.getData();i.hasItemVisual()&&i.each(function(o){var s=i.getItemVisual(o,"decal");if(s){var l=i.ensureUniqueItemVisual(o,"style");l.decal=eg(s,t)}});var n=i.getVisual("decal");if(n){var a=i.getVisual("style");a.decal=eg(n,t)}}})}var He=new cr,V_={};function gI(r,t){V_[r]=t}function H_(r){return V_[r]}var mI="5.6.0",yI={zrender:"5.6.1"},_I=1,bI=800,xI=900,wI=1e3,SI=2e3,CI=5e3,W_=1e3,TI=1100,zf=2e3,G_=3e3,AI=4e3,jl=4500,MI=4600,DI=5e3,II=6e3,$_=7e3,U_={PROCESSOR:{FILTER:wI,SERIES_FILTER:bI,STATISTIC:CI},VISUAL:{LAYOUT:W_,PROGRESSIVE_LAYOUT:TI,GLOBAL:zf,CHART:G_,POST_CHART_LAYOUT:MI,COMPONENT:AI,BRUSH:DI,CHART_ITEM:jl,ARIA:II,DECAL:$_}},Yt="__flagInMainProcess",ue="__pendingUpdate",Hu="__needsUpdateStatus",rg=/^[a-zA-Z0-9_]+$/,Wu="__connectUpdateStatus",ig=0,PI=1,kI=2;function Y_(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(this.isDisposed()){this.id;return}return Z_(this,r,t)}}function X_(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Z_(this,r,t)}}function Z_(r,t,e){return e[0]=e[0]&&e[0].toLowerCase(),cr.prototype[t].apply(r,e)}var q_=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t})(cr),K_=q_.prototype;K_.on=X_("on");K_.off=X_("off");var gn,Gu,rs,Ir,$u,Uu,Yu,ua,ha,ng,ag,Xu,og,is,sg,J_,Se,lg,Xs=(function(r){F(t,r);function t(e,i,n){var a=r.call(this,new ND)||this;a._chartsViews=[],a._chartsMap={},a._componentsViews=[],a._componentsMap={},a._pendingActions=[],n=n||{},U(i)&&(i=Q_[i]),a._dom=e;var o="canvas",s="auto",l=!1;n.ssr&&Vy(function(f){var d=_t(f),p=d.dataIndex;if(p!=null){var v=nt();return v.set("series_index",d.seriesIndex),v.set("data_index",p),d.ssrType&&v.set("ssr_type",d.ssrType),v}});var u=a._zr=Gh(e,{renderer:n.renderer||o,devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height,ssr:n.ssr,useDirtyRect:Q(n.useDirtyRect,l),useCoarsePointer:Q(n.useCoarsePointer,s),pointerSize:n.pointerSize});a._ssr=n.ssr,a._throttledZrFlush=Nf(ct(u.flush,u),17),i=it(i),i&&o_(i,!0),a._theme=i,a._locale=VA(n.locale||H0),a._coordSysMgr=new Ll;var h=a._api=sg(a);function c(f,d){return f.__prio-d.__prio}return cs(qs,c),cs(dc,c),a._scheduler=new I_(a,h,dc,qs),a._messageCenter=new q_,a._initEvents(),a.resize=ct(a.resize,a),u.animation.on("frame",a._onframe,a),ng(u,a),ag(u,a),Ps(a),a}return t.prototype._onframe=function(){if(!this._disposed){lg(this);var e=this._scheduler;if(this[ue]){var i=this[ue].silent;this[Yt]=!0;try{gn(this),Ir.update.call(this,null,this[ue].updateParams)}catch(l){throw this[Yt]=!1,this[ue]=null,l}this._zr.flush(),this[Yt]=!1,this[ue]=null,ua.call(this,i),ha.call(this,i)}else if(e.unfinished){var n=_I,a=this._model,o=this._api;e.unfinished=!1;do{var s=+new Date;e.performSeriesTasks(a),e.performDataProcessorTasks(a),Uu(this,a),e.performVisualTasks(a),is(this,this._model,o,"remain",{}),n-=+new Date-s}while(n>0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,i,n){if(!this[Yt]){if(this._disposed){this.id;return}var a,o,s;if(q(i)&&(n=i.lazyUpdate,a=i.silent,o=i.replaceMerge,s=i.transition,i=i.notMerge),this[Yt]=!0,!this._model||i){var l=new yM(this._api),u=this._theme,h=this._model=new Lf;h.scheduler=this._scheduler,h.ssr=this._ssr,h.init(null,null,null,u,this._locale,l)}this._model.setOption(e,{replaceMerge:o},pc);var c={seriesTransition:s,optionChanged:!0};if(n)this[ue]={silent:a,updateParams:c},this[Yt]=!1,this.getZr().wakeUp();else{try{gn(this),Ir.update.call(this,null,c)}catch(f){throw this[ue]=null,this[Yt]=!1,f}this._ssr||this._zr.flush(),this[ue]=null,this[Yt]=!1,ua.call(this,a),ha.call(this,a)}}},t.prototype.setTheme=function(){},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||J.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e=e||{};var i=this._zr.painter;return i.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e=e||{};var i=this._zr.painter;return i.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(J.svgSupported){var e=this._zr,i=e.storage.getDisplayList();return A(i,function(n){n.stopAnimation(null,!0)}),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e=e||{};var i=e.excludeComponents,n=this._model,a=[],o=this;A(i,function(l){n.eachComponent({mainType:l},function(u){var h=o._componentsMap[u.__viewId];h.group.ignore||(a.push(h),h.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return A(a,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var i=e.type==="svg",n=this.group,a=Math.min,o=Math.max,s=1/0;if(Ks[n]){var l=s,u=s,h=-s,c=-s,f=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();A(Bi,function(b,x){if(b.group===n){var C=i?b.getZr().painter.getSvgDom().innerHTML:b.renderToCanvas(it(e)),S=b.getDom().getBoundingClientRect();l=a(S.left,l),u=a(S.top,u),h=o(S.right,h),c=o(S.bottom,c),f.push({dom:C,left:S.left,top:S.top})}}),l*=d,u*=d,h*=d,c*=d;var p=h-l,v=c-u,g=qr.createCanvas(),m=Gh(g,{renderer:i?"svg":"canvas"});if(m.resize({width:p,height:v}),i){var _="";return A(f,function(b){var x=b.left-l,C=b.top-u;_+='<g transform="translate('+x+","+C+')">'+b.dom+"</g>"}),m.painter.getSvgRoot().innerHTML=_,e.connectedBackgroundColor&&m.painter.setBackgroundColor(e.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}else return e.connectedBackgroundColor&&m.add(new Ft({shape:{x:0,y:0,width:p,height:v},style:{fill:e.connectedBackgroundColor}})),A(f,function(b){var x=new qe({style:{x:b.left*d-l,y:b.top*d-u,image:b.dom}});m.add(x)}),m.refreshImmediately(),g.toDataURL("image/"+(e&&e.type||"png"))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,i){return $u(this,"convertToPixel",e,i)},t.prototype.convertFromPixel=function(e,i){return $u(this,"convertFromPixel",e,i)},t.prototype.containPixel=function(e,i){if(this._disposed){this.id;return}var n=this._model,a,o=ka(n,e);return A(o,function(s,l){l.indexOf("Models")>=0&&A(s,function(u){var h=u.coordinateSystem;if(h&&h.containPoint)a=a||!!h.containPoint(i);else if(l==="seriesModels"){var c=this._chartsMap[u.__viewId];c&&c.containPoint&&(a=a||c.containPoint(i,u))}},this)},this),!!a},t.prototype.getVisual=function(e,i){var n=this._model,a=ka(n,e,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?zD(s,l,i):VD(s,i)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;A(RI,function(i){var n=function(a){var o=e.getModel(),s=a.target,l,u=i==="globalout";if(u?l={}:s&&Ta(s,function(p){var v=_t(p);if(v&&v.dataIndex!=null){var g=v.dataModel||o.getSeriesByIndex(v.seriesIndex);return l=g&&g.getDataParams(v.dataIndex,v.dataType,s)||{},!0}else if(v.eventData)return l=N({},v.eventData),!0},!0),l){var h=l.componentType,c=l.componentIndex;(h==="markLine"||h==="markPoint"||h==="markArea")&&(h="series",c=l.seriesIndex);var f=h&&c!=null&&o.getComponent(h,c),d=f&&e[f.mainType==="series"?"_chartsMap":"_componentsMap"][f.__viewId];l.event=a,l.type=i,e._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:f,view:d},e.trigger(i,l)}};n.zrEventfulCallAtLast=!0,e._zr.on(i,n,e)}),A(Ba,function(i,n){e._messageCenter.on(n,function(a){this.trigger(n,a)},e)}),A(["selectchanged"],function(i){e._messageCenter.on(i,function(n){this.trigger(i,n)},e)}),HD(this._messageCenter,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var e=this.getDom();e&&Jy(this.getDom(),Hf,"");var i=this,n=i._api,a=i._model;A(i._componentsViews,function(o){o.dispose(a,n)}),A(i._chartsViews,function(o){o.dispose(a,n)}),i._zr.dispose(),i._dom=i._model=i._chartsMap=i._componentsMap=i._chartsViews=i._componentsViews=i._scheduler=i._api=i._zr=i._throttledZrFlush=i._theme=i._coordSysMgr=i._messageCenter=null,delete Bi[i.id]},t.prototype.resize=function(e){if(!this[Yt]){if(this._disposed){this.id;return}this._zr.resize(e);var i=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!i){var n=i.resetOption("media"),a=e&&e.silent;this[ue]&&(a==null&&(a=this[ue].silent),n=!0,this[ue]=null),this[Yt]=!0;try{n&&gn(this),Ir.update.call(this,{type:"resize",animation:N({duration:0},e&&e.animation)})}catch(o){throw this[Yt]=!1,o}this[Yt]=!1,ua.call(this,a),ha.call(this,a)}}},t.prototype.showLoading=function(e,i){if(this._disposed){this.id;return}if(q(e)&&(i=e,e=""),e=e||"default",this.hideLoading(),!!vc[e]){var n=vc[e](this._api,i),a=this._zr;this._loadingFX=n,a.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var i=N({},e);return i.type=Ba[e.type],i},t.prototype.dispatchAction=function(e,i){if(this._disposed){this.id;return}if(q(i)||(i={silent:!!i}),!!Zs[e.type]&&this._model){if(this[Yt]){this._pendingActions.push(e);return}var n=i.silent;Yu.call(this,e,n);var a=i.flush;a?this._zr.flush():a!==!1&&J.browser.weChat&&this._throttledZrFlush(),ua.call(this,n),ha.call(this,n)}},t.prototype.updateLabelLayout=function(){He.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var i=e.seriesIndex,n=this.getModel(),a=n.getSeriesByIndex(i);a.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=(function(){gn=function(c){var f=c._scheduler;f.restorePipelines(c._model),f.prepareStageTasks(),Gu(c,!0),Gu(c,!1),f.plan()},Gu=function(c,f){for(var d=c._model,p=c._scheduler,v=f?c._componentsViews:c._chartsViews,g=f?c._componentsMap:c._chartsMap,m=c._zr,_=c._api,b=0;b<v.length;b++)v[b].__alive=!1;f?d.eachComponent(function(S,T){S!=="series"&&x(T)}):d.eachSeries(x);function x(S){var T=S.__requireNewView;S.__requireNewView=!1;var M="_ec_"+S.id+"_"+S.type,D=!T&&g[M];if(!D){var I=sr(S.type),P=f?Jt.getClass(I.main,I.sub):_e.getClass(I.sub);D=new P,D.init(d,_),g[M]=D,v.push(D),m.add(D.group)}S.__viewId=D.__id=M,D.__alive=!0,D.__model=S,D.group.__ecComponentInfo={mainType:S.mainType,index:S.componentIndex},!f&&p.prepareView(D,S,d,_)}for(var b=0;b<v.length;){var C=v[b];C.__alive?b++:(!f&&C.renderTask.dispose(),m.remove(C.group),C.dispose(d,_),v.splice(b,1),g[C.__id]===C&&delete g[C.__id],C.__id=C.group.__ecComponentInfo=null)}},rs=function(c,f,d,p,v){var g=c._model;if(g.setUpdatePayload(d),!p){A([].concat(c._componentsViews).concat(c._chartsViews),C);return}var m={};m[p+"Id"]=d[p+"Id"],m[p+"Index"]=d[p+"Index"],m[p+"Name"]=d[p+"Name"];var _={mainType:p,query:m};v&&(_.subType=v);var b=d.excludeSeriesId,x;b!=null&&(x=nt(),A(ne(b),function(S){var T=Ue(S,null);T!=null&&x.set(T,!0)})),g&&g.eachComponent(_,function(S){var T=x&&x.get(S.id)!=null;if(!T)if(Fp(d))if(S instanceof Ze)d.type===Fi&&!d.notBlur&&!S.get(["emphasis","disabled"])&&OT(S,d,c._api);else{var M=ff(S.mainType,S.componentIndex,d.name,c._api),D=M.focusSelf,I=M.dispatchers;d.type===Fi&&D&&!d.notBlur&&qh(S.mainType,S.componentIndex,c._api),I&&A(I,function(P){d.type===Fi?Nn(P):Fn(P)})}else Qh(d)&&S instanceof Ze&&(NT(S,d,c._api),Ep(S),Se(c))},c),g&&g.eachComponent(_,function(S){var T=x&&x.get(S.id)!=null;T||C(c[p==="series"?"_chartsMap":"_componentsMap"][S.__viewId])},c);function C(S){S&&S.__alive&&S[f]&&S[f](S.__model,g,c._api,d)}},Ir={prepareAndUpdate:function(c){gn(this),Ir.update.call(this,c,{optionChanged:c.newOption!=null})},update:function(c,f){var d=this._model,p=this._api,v=this._zr,g=this._coordSysMgr,m=this._scheduler;if(d){d.setUpdatePayload(c),m.restoreData(d,c),m.performSeriesTasks(d),g.create(d,p),m.performDataProcessorTasks(d,c),Uu(this,d),g.update(d,p),e(d),m.performVisualTasks(d,c),Xu(this,d,p,c,f);var _=d.get("backgroundColor")||"transparent",b=d.get("darkMode");v.setBackgroundColor(_),b!=null&&b!=="auto"&&v.setDarkMode(b),He.trigger("afterupdate",d,p)}},updateTransform:function(c){var f=this,d=this._model,p=this._api;if(d){d.setUpdatePayload(c);var v=[];d.eachComponent(function(m,_){if(m!=="series"){var b=f.getViewOfComponentModel(_);if(b&&b.__alive)if(b.updateTransform){var x=b.updateTransform(_,d,p,c);x&&x.update&&v.push(b)}else v.push(b)}});var g=nt();d.eachSeries(function(m){var _=f._chartsMap[m.__viewId];if(_.updateTransform){var b=_.updateTransform(m,d,p,c);b&&b.update&&g.set(m.uid,1)}else g.set(m.uid,1)}),e(d),this._scheduler.performVisualTasks(d,c,{setDirty:!0,dirtyMap:g}),is(this,d,p,c,{},g),He.trigger("afterupdate",d,p)}},updateView:function(c){var f=this._model;f&&(f.setUpdatePayload(c),_e.markUpdateMethod(c,"updateView"),e(f),this._scheduler.performVisualTasks(f,c,{setDirty:!0}),Xu(this,f,this._api,c,{}),He.trigger("afterupdate",f,this._api))},updateVisual:function(c){var f=this,d=this._model;d&&(d.setUpdatePayload(c),d.eachSeries(function(p){p.getData().clearAllVisual()}),_e.markUpdateMethod(c,"updateVisual"),e(d),this._scheduler.performVisualTasks(d,c,{visualType:"visual",setDirty:!0}),d.eachComponent(function(p,v){if(p!=="series"){var g=f.getViewOfComponentModel(v);g&&g.__alive&&g.updateVisual(v,d,f._api,c)}}),d.eachSeries(function(p){var v=f._chartsMap[p.__viewId];v.updateVisual(p,d,f._api,c)}),He.trigger("afterupdate",d,this._api))},updateLayout:function(c){Ir.update.call(this,c)}},$u=function(c,f,d,p){if(c._disposed){c.id;return}for(var v=c._model,g=c._coordSysMgr.getCoordinateSystems(),m,_=ka(v,d),b=0;b<g.length;b++){var x=g[b];if(x[f]&&(m=x[f](v,_,p))!=null)return m}},Uu=function(c,f){var d=c._chartsMap,p=c._scheduler;f.eachSeries(function(v){p.updateStreamModes(v,d[v.__viewId])})},Yu=function(c,f){var d=this,p=this.getModel(),v=c.type,g=c.escapeConnect,m=Zs[v],_=m.actionInfo,b=(_.update||"update").split(":"),x=b.pop(),C=b[0]!=null&&sr(b[0]);this[Yt]=!0;var S=[c],T=!1;c.batch&&(T=!0,S=V(c.batch,function(L){return L=lt(N({},L),c),L.batch=null,L}));var M=[],D,I=Qh(c),P=Fp(c);if(P&&y0(this._api),A(S,function(L){if(D=m.action(L,d._model,d._api),D=D||N({},L),D.type=_.event||D.type,M.push(D),P){var j=of(c),E=j.queryOptionMap,Z=j.mainTypeSpecified,G=Z?E.keys()[0]:"series";rs(d,x,L,G),Se(d)}else I?(rs(d,x,L,"series"),Se(d)):C&&rs(d,x,L,C.main,C.sub)}),x!=="none"&&!P&&!I&&!C)try{this[ue]?(gn(this),Ir.update.call(this,c),this[ue]=null):Ir[x].call(this,c)}catch(L){throw this[Yt]=!1,L}if(T?D={type:_.event||v,escapeConnect:g,batch:M}:D=M[0],this[Yt]=!1,!f){var k=this._messageCenter;if(k.trigger(D.type,D),I){var R={type:"selectchanged",escapeConnect:g,selected:FT(p),isFromClick:c.isFromClick||!1,fromAction:c.type,fromActionPayload:c};k.trigger(R.type,R)}}},ua=function(c){for(var f=this._pendingActions;f.length;){var d=f.shift();Yu.call(this,d,c)}},ha=function(c){!c&&this.trigger("updated")},ng=function(c,f){c.on("rendered",function(d){f.trigger("rendered",d),c.animation.isFinished()&&!f[ue]&&!f._scheduler.unfinished&&!f._pendingActions.length&&f.trigger("finished")})},ag=function(c,f){c.on("mouseover",function(d){var p=d.target,v=Ta(p,Jh);v&&(ET(v,d,f._api),Se(f))}).on("mouseout",function(d){var p=d.target,v=Ta(p,Jh);v&&(jT(v,d,f._api),Se(f))}).on("click",function(d){var p=d.target,v=Ta(p,function(_){return _t(_).dataIndex!=null},!0);if(v){var g=v.selected?"unselect":"select",m=_t(v);f._api.dispatchAction({type:g,dataType:m.dataType,dataIndexInside:m.dataIndex,seriesIndex:m.seriesIndex,isFromClick:!0})}})};function e(c){c.clearColorPalette(),c.eachSeries(function(f){f.clearColorPalette()})}function i(c){var f=[],d=[],p=!1;if(c.eachComponent(function(_,b){var x=b.get("zlevel")||0,C=b.get("z")||0,S=b.getZLevelKey();p=p||!!S,(_==="series"?d:f).push({zlevel:x,z:C,idx:b.componentIndex,type:_,key:S})}),p){var v=f.concat(d),g,m;cs(v,function(_,b){return _.zlevel===b.zlevel?_.z-b.z:_.zlevel-b.zlevel}),A(v,function(_){var b=c.getComponent(_.type,_.idx),x=_.zlevel,C=_.key;g!=null&&(x=Math.max(g,x)),C?(x===g&&C!==m&&x++,m=C):m&&(x===g&&x++,m=""),g=x,b.setZLevel(x)})}}Xu=function(c,f,d,p,v){i(f),og(c,f,d,p,v),A(c._chartsViews,function(g){g.__alive=!1}),is(c,f,d,p,v),A(c._chartsViews,function(g){g.__alive||g.remove(f,d)})},og=function(c,f,d,p,v,g){A(g||c._componentsViews,function(m){var _=m.__model;u(_,m),m.render(_,f,d,p),s(_,m),h(_,m)})},is=function(c,f,d,p,v,g){var m=c._scheduler;v=N(v||{},{updatedSeries:f.getSeries()}),He.trigger("series:beforeupdate",f,d,v);var _=!1;f.eachSeries(function(b){var x=c._chartsMap[b.__viewId];x.__alive=!0;var C=x.renderTask;m.updatePayload(C,p),u(b,x),g&&g.get(b.uid)&&C.dirty(),C.perform(m.getPerformArgs(C))&&(_=!0),x.group.silent=!!b.get("silent"),o(b,x),Ep(b)}),m.unfinished=_||m.unfinished,He.trigger("series:layoutlabels",f,d,v),He.trigger("series:transition",f,d,v),f.eachSeries(function(b){var x=c._chartsMap[b.__viewId];s(b,x),h(b,x)}),a(c,f),He.trigger("series:afterupdate",f,d,v)},Se=function(c){c[Hu]=!0,c.getZr().wakeUp()},lg=function(c){c[Hu]&&(c.getZr().storage.traverse(function(f){ja(f)||n(f)}),c[Hu]=!1)};function n(c){for(var f=[],d=c.currentStates,p=0;p<d.length;p++){var v=d[p];v==="emphasis"||v==="blur"||v==="select"||f.push(v)}c.selected&&c.states.select&&f.push("select"),c.hoverState===_l&&c.states.emphasis?f.push("emphasis"):c.hoverState===yl&&c.states.blur&&f.push("blur"),c.useStates(f)}function a(c,f){var d=c._zr,p=d.storage,v=0;p.traverse(function(g){g.isGroup||v++}),v>f.get("hoverLayerThreshold")&&!J.node&&!J.worker&&f.eachSeries(function(g){if(!g.preventUsingHoverLayer){var m=c._chartsMap[g.__viewId];m.__alive&&m.eachRendered(function(_){_.states.emphasis&&(_.states.emphasis.hoverLayer=!0)})}})}function o(c,f){var d=c.get("blendMode")||null;f.eachRendered(function(p){p.isGroup||(p.style.blend=d)})}function s(c,f){if(!c.preventAutoZ){var d=c.get("z")||0,p=c.get("zlevel")||0;f.eachRendered(function(v){return l(v,d,p,-1/0),!0})}}function l(c,f,d,p){var v=c.getTextContent(),g=c.getTextGuideLine(),m=c.isGroup;if(m)for(var _=c.childrenRef(),b=0;b<_.length;b++)p=Math.max(l(_[b],f,d,p),p);else c.z=f,c.zlevel=d,p=Math.max(c.z2,p);if(v&&(v.z=f,v.zlevel=d,isFinite(p)&&(v.z2=p+2)),g){var x=c.textGuideLineConfig;g.z=f,g.zlevel=d,isFinite(p)&&(g.z2=p+(x&&x.showAbove?1:-1))}return p}function u(c,f){f.eachRendered(function(d){if(!ja(d)){var p=d.getTextContent(),v=d.getTextGuideLine();d.stateTransition&&(d.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),v&&v.stateTransition&&(v.stateTransition=null),d.hasState()?(d.prevStates=d.currentStates,d.clearStates()):d.prevStates&&(d.prevStates=null)}})}function h(c,f){var d=c.getModel("stateAnimation"),p=c.isAnimationEnabled(),v=d.get("duration"),g=v>0?{duration:v,delay:d.get("delay"),easing:d.get("easing")}:null;f.eachRendered(function(m){if(m.states&&m.states.emphasis){if(ja(m))return;if(m instanceof bt&&WT(m),m.__dirty){var _=m.prevStates;_&&m.useStates(_)}if(p){m.stateTransition=g;var b=m.getTextContent(),x=m.getTextGuideLine();b&&(b.stateTransition=g),x&&(x.stateTransition=g)}m.__dirty&&n(m)}})}sg=function(c){return new((function(f){F(d,f);function d(){return f!==null&&f.apply(this,arguments)||this}return d.prototype.getCoordinateSystems=function(){return c._coordSysMgr.getCoordinateSystems()},d.prototype.getComponentByElement=function(p){for(;p;){var v=p.__ecComponentInfo;if(v!=null)return c._model.getComponent(v.mainType,v.index);p=p.parent}},d.prototype.enterEmphasis=function(p,v){Nn(p,v),Se(c)},d.prototype.leaveEmphasis=function(p,v){Fn(p,v),Se(c)},d.prototype.enterBlur=function(p){LT(p),Se(c)},d.prototype.leaveBlur=function(p){p0(p),Se(c)},d.prototype.enterSelect=function(p){v0(p),Se(c)},d.prototype.leaveSelect=function(p){g0(p),Se(c)},d.prototype.getModel=function(){return c.getModel()},d.prototype.getViewOfComponentModel=function(p){return c.getViewOfComponentModel(p)},d.prototype.getViewOfSeriesModel=function(p){return c.getViewOfSeriesModel(p)},d})(n_))(c)},J_=function(c){function f(d,p){for(var v=0;v<d.length;v++){var g=d[v];g[Wu]=p}}A(Ba,function(d,p){c._messageCenter.on(p,function(v){if(Ks[c.group]&&c[Wu]!==ig){if(v&&v.escapeConnect)return;var g=c.makeActionFromEvent(v),m=[];A(Bi,function(_){_!==c&&_.group===c.group&&m.push(_)}),f(m,ig),A(m,function(_){_[Wu]!==PI&&_.dispatchAction(g)}),f(m,kI)}})})}})(),t})(cr),Vf=Xs.prototype;Vf.on=Y_("on");Vf.off=Y_("off");Vf.one=function(r,t,e){var i=this;function n(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];t&&t.apply&&t.apply(this,a),i.off(r,n)}this.on.call(this,r,n,e)};var RI=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var Zs={},Ba={},dc=[],pc=[],qs=[],Q_={},vc={},Bi={},Ks={},LI=+new Date-0,OI=+new Date-0,Hf="_echarts_instance_";function EI(r,t,e){var i=!(e&&e.ssr);if(i){var n=Wf(r);if(n)return n}var a=new Xs(r,t,e);return a.id="ec_"+LI++,Bi[a.id]=a,i&&Jy(r,Hf,a.id),J_(a),He.trigger("afterinit",a),a}function jI(r){if(W(r)){var t=r;r=null,A(t,function(e){e.group!=null&&(r=e.group)}),r=r||"g_"+OI++,A(t,function(e){e.group=r})}return Ks[r]=!0,r}function tb(r){Ks[r]=!1}var NI=tb;function FI(r){U(r)?r=Bi[r]:r instanceof Xs||(r=Wf(r)),r instanceof Xs&&!r.isDisposed()&&r.dispose()}function Wf(r){return Bi[CC(r,Hf)]}function BI(r){return Bi[r]}function Gf(r,t){Q_[r]=t}function $f(r){pt(pc,r)<0&&pc.push(r)}function Uf(r,t){Yf(dc,r,t,SI)}function eb(r){Nl("afterinit",r)}function rb(r){Nl("afterupdate",r)}function Nl(r,t){He.on(r,t)}function Ke(r,t,e){tt(t)&&(e=t,t="");var i=q(r)?r.type:[r,r={event:t}][0];r.event=(r.event||i).toLowerCase(),t=r.event,!Ba[t]&&(be(rg.test(i)&&rg.test(t)),Zs[i]||(Zs[i]={action:e,actionInfo:r}),Ba[t]=i)}function ib(r,t){Ll.register(r,t)}function zI(r){var t=Ll.get(r);if(t)return t.getDimensionsInfo?t.getDimensionsInfo():t.dimensions.slice()}function nb(r,t){Yf(qs,r,t,W_,"layout")}function ti(r,t){Yf(qs,r,t,G_,"visual")}var ug=[];function Yf(r,t,e,i,n){if((tt(t)||q(t))&&(e=t,t=i),!(pt(ug,e)>=0)){ug.push(e);var a=I_.wrapStageHandler(e,n);a.__prio=t,a.__raw=e,r.push(a)}}function Xf(r,t){vc[r]=t}function VI(r){ey({createCanvas:r})}function ab(r,t,e){var i=H_("registerMap");i&&i(r,t,e)}function HI(r){var t=H_("getMap");return t&&t(r)}var ob=YM;ti(zf,SD);ti(jl,CD);ti(jl,TD);ti(zf,FD);ti(jl,BD);ti($_,vI);$f(o_);Uf(xI,PM);Xf("default",AD);Ke({type:Fi,event:Fi,update:Fi},Gt);Ke({type:ms,event:ms,update:ms},Gt);Ke({type:Ra,event:Ra,update:Ra},Gt);Ke({type:ys,event:ys,update:ys},Gt);Ke({type:La,event:La,update:La},Gt);Gf("light",jD);Gf("dark",L_);var WI={};function ca(r){return r==null?0:r.length||1}function hg(r){return r}var Zf=(function(){function r(t,e,i,n,a,o){this._old=t,this._new=e,this._oldKeyGetter=i||hg,this._newKeyGetter=n||hg,this.context=a,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(t){return this._add=t,this},r.prototype.update=function(t){return this._update=t,this},r.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},r.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},r.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},r.prototype.remove=function(t){return this._remove=t,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var t=this._old,e=this._new,i={},n=new Array(t.length),a=new Array(e.length);this._initIndexMap(t,null,n,"_oldKeyGetter"),this._initIndexMap(e,i,a,"_newKeyGetter");for(var o=0;o<t.length;o++){var s=n[o],l=i[s],u=ca(l);if(u>1){var h=l.shift();l.length===1&&(i[s]=l[0]),this._update&&this._update(h,o)}else u===1?(i[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,i)},r.prototype._executeMultiple=function(){var t=this._old,e=this._new,i={},n={},a=[],o=[];this._initIndexMap(t,i,a,"_oldKeyGetter"),this._initIndexMap(e,n,o,"_newKeyGetter");for(var s=0;s<a.length;s++){var l=a[s],u=i[l],h=n[l],c=ca(u),f=ca(h);if(c>1&&f===1)this._updateManyToOne&&this._updateManyToOne(h,u),n[l]=null;else if(c===1&&f>1)this._updateOneToMany&&this._updateOneToMany(h,u),n[l]=null;else if(c===1&&f===1)this._update&&this._update(h,u),n[l]=null;else if(c>1&&f>1)this._updateManyToMany&&this._updateManyToMany(h,u),n[l]=null;else if(c>1)for(var d=0;d<c;d++)this._remove&&this._remove(u[d]);else this._remove&&this._remove(u)}this._performRestAdd(o,n)},r.prototype._performRestAdd=function(t,e){for(var i=0;i<t.length;i++){var n=t[i],a=e[n],o=ca(a);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(a[s]);else o===1&&this._add&&this._add(a);e[n]=null}},r.prototype._initIndexMap=function(t,e,i,n){for(var a=this._diffModeMultiple,o=0;o<t.length;o++){var s="_ec_"+this[n](t[o],o);if(a||(i[o]=s),!!e){var l=e[s],u=ca(l);u===0?(e[s]=o,a&&i.push(s)):u===1?e[s]=[l,o]:l.push(o)}}},r})(),GI=(function(){function r(t,e){this._encode=t,this._schema=e}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 $I(r,t){var e={},i=e.encode={},n=nt(),a=[],o=[],s={};A(r.dimensions,function(f){var d=r.getDimensionInfo(f),p=d.coordDim;if(p){var v=d.coordDimIndex;Zu(i,p)[v]=f,d.isExtraCoord||(n.set(p,1),YI(d.type)&&(a[0]=f),Zu(s,p)[v]=r.getDimensionIndex(d.name)),d.defaultTooltip&&o.push(f)}Q0.each(function(g,m){var _=Zu(i,m),b=d.otherDims[m];b!=null&&b!==!1&&(_[b]=d.name)})});var l=[],u={};n.each(function(f,d){var p=i[d];u[d]=p[0],l=l.concat(p)}),e.dataDimsOnCoord=l,e.dataDimIndicesOnCoord=V(l,function(f){return r.getDimensionInfo(f).storeDimIndex}),e.encodeFirstDimNotExtra=u;var h=i.label;h&&h.length&&(a=h.slice());var c=i.tooltip;return c&&c.length?o=c.slice():o.length||(o=a.slice()),i.defaultedLabel=a,i.defaultedTooltip=o,e.userOutput=new GI(s,t),e}function Zu(r,t){return r.hasOwnProperty(t)||(r[t]=[]),r[t]}function UI(r){return r==="category"?"ordinal":r==="time"?"time":"float"}function YI(r){return!(r==="ordinal"||r==="time")}var ws=(function(){function r(t){this.otherDims={},t!=null&&N(this,t)}return r})(),XI=kt(),ZI={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},sb=(function(){function r(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return r.prototype.isDimensionOmitted=function(){return this._dimOmitted},r.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=hb(this.source)))},r.prototype.getSourceDimensionIndex=function(t){return Q(this._dimNameMap.get(t),-1)},r.prototype.getSourceDimension=function(t){var e=this.source.dimensionsDefine;if(e)return e[t]},r.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,e=u_(this.source),i=!cb(t),n="",a=[],o=0,s=0;o<t;o++){var l=void 0,u=void 0,h=void 0,c=this.dimensions[s];if(c&&c.storeDimIndex===o)l=e?c.name:null,u=c.type,h=c.ordinalMeta,s++;else{var f=this.getSourceDimension(o);f&&(l=e?f.name:null,u=f.type)}a.push({property:l,type:u,ordinalMeta:h}),e&&l!=null&&(!c||!c.isCalculationCoord)&&(n+=i?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),n+="$",n+=ZI[u]||"f",h&&(n+=h.uid),n+="$"}var d=this.source,p=[d.seriesLayoutBy,d.startIndex,n].join("$$");return{dimensions:a,hash:p}},r.prototype.makeOutputDimensionNames=function(){for(var t=[],e=0,i=0;e<this._fullDimCount;e++){var n=void 0,a=this.dimensions[i];if(a&&a.storeDimIndex===e)a.isCalculationCoord||(n=a.name),i++;else{var o=this.getSourceDimension(e);o&&(n=o.name)}t.push(n)}return t},r.prototype.appendCalculationDimension=function(t){this.dimensions.push(t),t.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},r})();function lb(r){return r instanceof sb}function ub(r){for(var t=nt(),e=0;e<(r||[]).length;e++){var i=r[e],n=q(i)?i.name:i;n!=null&&t.get(n)==null&&t.set(n,e)}return t}function hb(r){var t=XI(r);return t.dimNameMap||(t.dimNameMap=ub(r.dimensionsDefine))}function cb(r){return r>30}var fa=q,Pr=V,qI=typeof Int32Array>"u"?Array:Int32Array,KI="e\0\0",cg=-1,JI=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],QI=["_approximateExtent"],fg,ns,da,pa,qu,va,Ku,qf=(function(){function r(t,e){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 i,n=!1;lb(t)?(i=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(n=!0,i=t),i=i||["x","y"];for(var a={},o=[],s={},l=!1,u={},h=0;h<i.length;h++){var c=i[h],f=U(c)?new ws({name:c}):c instanceof ws?c:new ws(c),d=f.name;f.type=f.type||"float",f.coordDim||(f.coordDim=d,f.coordDimIndex=0);var p=f.otherDims=f.otherDims||{};o.push(d),a[d]=f,u[d]!=null&&(l=!0),f.createInvertedIndices&&(s[d]=[]),p.itemName===0&&(this._nameDimIdx=h),p.itemId===0&&(this._idDimIdx=h),n&&(f.storeDimIndex=h)}if(this.dimensions=o,this._dimInfos=a,this._initGetDimensionInfo(l),this.hostModel=e,this._invertedIndicesMap=s,this._dimOmitted){var v=this._dimIdxToName=nt();A(o,function(g){v.set(a[g].storeDimIndex,g)})}}return r.prototype.getDimension=function(t){var e=this._recognizeDimIndex(t);if(e==null)return t;if(e=t,!this._dimOmitted)return this.dimensions[e];var i=this._dimIdxToName.get(e);if(i!=null)return i;var n=this._schema.getSourceDimension(e);if(n)return n.name},r.prototype.getDimensionIndex=function(t){var e=this._recognizeDimIndex(t);if(e!=null)return e;if(t==null)return-1;var i=this._getDimInfo(t);return i?i.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(t):-1},r.prototype._recognizeDimIndex=function(t){if(At(t)||t!=null&&!isNaN(t)&&!this._getDimInfo(t)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(t)<0))return+t},r.prototype._getStoreDimIndex=function(t){var e=this.getDimensionIndex(t);return e},r.prototype.getDimensionInfo=function(t){return this._getDimInfo(this.getDimension(t))},r.prototype._initGetDimensionInfo=function(t){var e=this._dimInfos;this._getDimInfo=t?function(i){return e.hasOwnProperty(i)?e[i]:void 0}:function(i){return e[i]}},r.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},r.prototype.mapDimension=function(t,e){var i=this._dimSummary;if(e==null)return i.encodeFirstDimNotExtra[t];var n=i.encode[t];return n?n[e]:null},r.prototype.mapDimensionsAll=function(t){var e=this._dimSummary,i=e.encode[t];return(i||[]).slice()},r.prototype.getStore=function(){return this._store},r.prototype.initData=function(t,e,i){var n=this,a;if(t instanceof ac&&(a=t),!a){var o=this.dimensions,s=Of(t)||ae(t)?new h_(t,o.length):t;a=new ac;var l=Pr(o,function(u){return{type:n._dimInfos[u].type,property:u}});a.initData(s,l,i)}this._store=a,this._nameList=(e||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,a.count()),this._dimSummary=$I(this,this._schema),this.userOutput=this._dimSummary.userOutput},r.prototype.appendData=function(t){var e=this._store.appendData(t);this._doInit(e[0],e[1])},r.prototype.appendValues=function(t,e){var i=this._store.appendValues(t,e&&e.length),n=i.start,a=i.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),e)for(var s=n;s<a;s++){var l=s-n;this._nameList[s]=e[l],o&&Ku(this,s)}},r.prototype._updateOrdinalMeta=function(){for(var t=this._store,e=this.dimensions,i=0;i<e.length;i++){var n=this._dimInfos[e[i]];n.ordinalMeta&&t.collectOrdinalMeta(n.storeDimIndex,n.ordinalMeta)}},r.prototype._shouldMakeIdFromName=function(){var t=this._store.getProvider();return this._idDimIdx==null&&t.getSource().sourceFormat!==Yr&&!t.fillStorage},r.prototype._doInit=function(t,e){if(!(t>=e)){var i=this._store,n=i.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=n.getSource().sourceFormat,l=s===Ee;if(l&&!n.pure)for(var u=[],h=t;h<e;h++){var c=n.getItem(h,u);if(!this.hasItemOption&&cC(c)&&(this.hasItemOption=!0),c){var f=c.name;a[h]==null&&f!=null&&(a[h]=Ue(f,null));var d=c.id;o[h]==null&&d!=null&&(o[h]=Ue(d,null))}}if(this._shouldMakeIdFromName())for(var h=t;h<e;h++)Ku(this,h);fg(this)}},r.prototype.getApproximateExtent=function(t){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t))},r.prototype.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},r.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},r.prototype.setCalculationInfo=function(t,e){fa(t)?N(this._calculationInfo,t):this._calculationInfo[t]=e},r.prototype.getName=function(t){var e=this.getRawIndex(t),i=this._nameList[e];return i==null&&this._nameDimIdx!=null&&(i=da(this,this._nameDimIdx,e)),i==null&&(i=""),i},r.prototype._getCategory=function(t,e){var i=this._store.get(t,e),n=this._store.getOrdinalMeta(t);return n?n.categories[i]:i},r.prototype.getId=function(t){return ns(this,this.getRawIndex(t))},r.prototype.count=function(){return this._store.count()},r.prototype.get=function(t,e){var i=this._store,n=this._dimInfos[t];if(n)return i.get(n.storeDimIndex,e)},r.prototype.getByRawIndex=function(t,e){var i=this._store,n=this._dimInfos[t];if(n)return i.getByRawIndex(n.storeDimIndex,e)},r.prototype.getIndices=function(){return this._store.getIndices()},r.prototype.getDataExtent=function(t){return this._store.getDataExtent(this._getStoreDimIndex(t))},r.prototype.getSum=function(t){return this._store.getSum(this._getStoreDimIndex(t))},r.prototype.getMedian=function(t){return this._store.getMedian(this._getStoreDimIndex(t))},r.prototype.getValues=function(t,e){var i=this,n=this._store;return W(t)?n.getValues(Pr(t,function(a){return i._getStoreDimIndex(a)}),e):n.getValues(t)},r.prototype.hasValue=function(t){for(var e=this._dimSummary.dataDimIndicesOnCoord,i=0,n=e.length;i<n;i++)if(isNaN(this._store.get(e[i],t)))return!1;return!0},r.prototype.indexOfName=function(t){for(var e=0,i=this._store.count();e<i;e++)if(this.getName(e)===t)return e;return-1},r.prototype.getRawIndex=function(t){return this._store.getRawIndex(t)},r.prototype.indexOfRawIndex=function(t){return this._store.indexOfRawIndex(t)},r.prototype.rawIndexOf=function(t,e){var i=t&&this._invertedIndicesMap[t],n=i&&i[e];return n==null||isNaN(n)?cg:n},r.prototype.indicesOfNearest=function(t,e,i){return this._store.indicesOfNearest(this._getStoreDimIndex(t),e,i)},r.prototype.each=function(t,e,i){tt(t)&&(i=e,e=t,t=[]);var n=i||this,a=Pr(pa(t),this._getStoreDimIndex,this);this._store.each(a,n?ct(e,n):e)},r.prototype.filterSelf=function(t,e,i){tt(t)&&(i=e,e=t,t=[]);var n=i||this,a=Pr(pa(t),this._getStoreDimIndex,this);return this._store=this._store.filter(a,n?ct(e,n):e),this},r.prototype.selectRange=function(t){var e=this,i={},n=vt(t);return A(n,function(a){var o=e._getStoreDimIndex(a);i[o]=t[a]}),this._store=this._store.selectRange(i),this},r.prototype.mapArray=function(t,e,i){tt(t)&&(i=e,e=t,t=[]),i=i||this;var n=[];return this.each(t,function(){n.push(e&&e.apply(this,arguments))},i),n},r.prototype.map=function(t,e,i,n){var a=i||n||this,o=Pr(pa(t),this._getStoreDimIndex,this),s=va(this);return s._store=this._store.map(o,a?ct(e,a):e),s},r.prototype.modify=function(t,e,i,n){var a=i||n||this,o=Pr(pa(t),this._getStoreDimIndex,this);this._store.modify(o,a?ct(e,a):e)},r.prototype.downSample=function(t,e,i,n){var a=va(this);return a._store=this._store.downSample(this._getStoreDimIndex(t),e,i,n),a},r.prototype.minmaxDownSample=function(t,e){var i=va(this);return i._store=this._store.minmaxDownSample(this._getStoreDimIndex(t),e),i},r.prototype.lttbDownSample=function(t,e){var i=va(this);return i._store=this._store.lttbDownSample(this._getStoreDimIndex(t),e),i},r.prototype.getRawDataItem=function(t){return this._store.getRawDataItem(t)},r.prototype.getItemModel=function(t){var e=this.hostModel,i=this.getRawDataItem(t);return new Tt(i,e,e&&e.ecModel)},r.prototype.diff=function(t){var e=this;return new Zf(t?t.getStore().getIndices():[],this.getStore().getIndices(),function(i){return ns(t,i)},function(i){return ns(e,i)})},r.prototype.getVisual=function(t){var e=this._visual;return e&&e[t]},r.prototype.setVisual=function(t,e){this._visual=this._visual||{},fa(t)?N(this._visual,t):this._visual[t]=e},r.prototype.getItemVisual=function(t,e){var i=this._itemVisuals[t],n=i&&i[e];return n??this.getVisual(e)},r.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},r.prototype.ensureUniqueItemVisual=function(t,e){var i=this._itemVisuals,n=i[t];n||(n=i[t]={});var a=n[e];return a==null&&(a=this.getVisual(e),W(a)?a=a.slice():fa(a)&&(a=N({},a)),n[e]=a),a},r.prototype.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{};this._itemVisuals[t]=n,fa(e)?N(n,e):n[e]=i},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(t,e){fa(t)?N(this._layout,t):this._layout[t]=e},r.prototype.getLayout=function(t){return this._layout[t]},r.prototype.getItemLayout=function(t){return this._itemLayouts[t]},r.prototype.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?N(this._itemLayouts[t]||{},e):e},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(t,e){var i=this.hostModel&&this.hostModel.seriesIndex;ST(i,this.dataType,t,e),this._graphicEls[t]=e},r.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},r.prototype.eachItemGraphicEl=function(t,e){A(this._graphicEls,function(i,n){i&&t&&t.call(e,i,n)})},r.prototype.cloneShallow=function(t){return t||(t=new r(this._schema?this._schema:Pr(this.dimensions,this._getDimInfo,this),this.hostModel)),qu(t,this),t._store=this._store,t},r.prototype.wrapMethod=function(t,e){var i=this[t];tt(i)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var n=i.apply(this,arguments);return e.apply(this,[n].concat(ul(arguments)))})},r.internalField=(function(){fg=function(t){var e=t._invertedIndicesMap;A(e,function(i,n){var a=t._dimInfos[n],o=a.ordinalMeta,s=t._store;if(o){i=e[n]=new qI(o.categories.length);for(var l=0;l<i.length;l++)i[l]=cg;for(var l=0;l<s.count();l++)i[s.get(a.storeDimIndex,l)]=l}})},da=function(t,e,i){return Ue(t._getCategory(e,i),null)},ns=function(t,e){var i=t._idList[e];return i==null&&t._idDimIdx!=null&&(i=da(t,t._idDimIdx,e)),i==null&&(i=KI+e),i},pa=function(t){return W(t)||(t=t!=null?[t]:[]),t},va=function(t){var e=new r(t._schema?t._schema:Pr(t.dimensions,t._getDimInfo,t),t.hostModel);return qu(e,t),e},qu=function(t,e){A(JI.concat(e.__wrappedMethods||[]),function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t.__wrappedMethods=e.__wrappedMethods,A(QI,function(i){t[i]=it(e[i])}),t._calculationInfo=N({},e._calculationInfo)},Ku=function(t,e){var i=t._nameList,n=t._idList,a=t._nameDimIdx,o=t._idDimIdx,s=i[e],l=n[e];if(s==null&&a!=null&&(i[e]=s=da(t,a,e)),l==null&&o!=null&&(n[e]=l=da(t,o,e)),l==null&&s!=null){var u=t._nameRepeatCount,h=u[s]=(u[s]||0)+1;l=s,h>1&&(l+="__ec__"+h),n[e]=l}}})(),r})();function t2(r,t){return fb(r,t).dimensions}function fb(r,t){Of(r)||(r=s_(r)),t=t||{};var e=t.coordDimensions||[],i=t.dimensionsDefine||r.dimensionsDefine||[],n=nt(),a=[],o=r2(r,e,i,t.dimensionsCount),s=t.canOmitUnusedDimensions&&cb(o),l=i===r.dimensionsDefine,u=l?hb(r):ub(i),h=t.encodeDefine;!h&&t.encodeDefaulter&&(h=t.encodeDefaulter(r,o));for(var c=nt(h),f=new g_(o),d=0;d<f.length;d++)f[d]=-1;function p(D){var I=f[D];if(I<0){var P=i[D],k=q(P)?P:{name:P},R=new ws,L=k.name;L!=null&&u.get(L)!=null&&(R.name=R.displayName=L),k.type!=null&&(R.type=k.type),k.displayName!=null&&(R.displayName=k.displayName);var j=a.length;return f[D]=j,R.storeDimIndex=D,a.push(R),R}return a[I]}if(!s)for(var d=0;d<o;d++)p(d);c.each(function(D,I){var P=ne(D).slice();if(P.length===1&&!U(P[0])&&P[0]<0){c.set(I,!1);return}var k=c.set(I,[]);A(P,function(R,L){var j=U(R)?u.get(R):R;j!=null&&j<o&&(k[L]=j,g(p(j),I,L))})});var v=0;A(e,function(D){var I,P,k,R;if(U(D))I=D,R={};else{R=D,I=R.name;var L=R.ordinalMeta;R.ordinalMeta=null,R=N({},R),R.ordinalMeta=L,P=R.dimsDef,k=R.otherDims,R.name=R.coordDim=R.coordDimIndex=R.dimsDef=R.otherDims=null}var j=c.get(I);if(j!==!1){if(j=ne(j),!j.length)for(var E=0;E<(P&&P.length||1);E++){for(;v<o&&p(v).coordDim!=null;)v++;v<o&&j.push(v++)}A(j,function(Z,G){var Y=p(Z);if(l&&R.type!=null&&(Y.type=R.type),g(lt(Y,R),I,G),Y.name==null&&P){var et=P[G];!q(et)&&(et={name:et}),Y.name=Y.displayName=et.name,Y.defaultTooltip=et.defaultTooltip}k&<(Y.otherDims,k)})}});function g(D,I,P){Q0.get(I)!=null?D.otherDims[I]=P:(D.coordDim=I,D.coordDimIndex=P,n.set(I,!0))}var m=t.generateCoord,_=t.generateCoordCount,b=_!=null;_=m?_||1:0;var x=m||"value";function C(D){D.name==null&&(D.name=D.coordDim)}if(s)A(a,function(D){C(D)}),a.sort(function(D,I){return D.storeDimIndex-I.storeDimIndex});else for(var S=0;S<o;S++){var T=p(S),M=T.coordDim;M==null&&(T.coordDim=i2(x,n,b),T.coordDimIndex=0,(!m||_<=0)&&(T.isExtraCoord=!0),_--),C(T),T.type==null&&(i_(r,S)===ge.Must||T.isExtraCoord&&(T.otherDims.itemName!=null||T.otherDims.seriesName!=null))&&(T.type="ordinal")}return e2(a),new sb({source:r,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function e2(r){for(var t=nt(),e=0;e<r.length;e++){var i=r[e],n=i.name,a=t.get(n)||0;a>0&&(i.name=n+(a-1)),a++,t.set(n,a)}}function r2(r,t,e,i){var n=Math.max(r.dimensionsDetectedCount||1,t.length,e.length,i||0);return A(t,function(a){var o;q(a)&&(o=a.dimsDef)&&(n=Math.max(n,o.length))}),n}function i2(r,t,e){if(e||t.hasKey(r)){for(var i=0;t.hasKey(r+i);)i++;r+=i}return t.set(r,!0),r}var n2=(function(){function r(t){this.coordSysDims=[],this.axisMap=nt(),this.categoryAxisMap=nt(),this.coordSysName=t}return r})();function a2(r){var t=r.get("coordinateSystem"),e=new n2(t),i=o2[t];if(i)return i(r,e,e.axisMap,e.categoryAxisMap),e}var o2={cartesian2d:function(r,t,e,i){var n=r.getReferringComponents("xAxis",re).models[0],a=r.getReferringComponents("yAxis",re).models[0];t.coordSysDims=["x","y"],e.set("x",n),e.set("y",a),mn(n)&&(i.set("x",n),t.firstCategoryDimIndex=0),mn(a)&&(i.set("y",a),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(r,t,e,i){var n=r.getReferringComponents("singleAxis",re).models[0];t.coordSysDims=["single"],e.set("single",n),mn(n)&&(i.set("single",n),t.firstCategoryDimIndex=0)},polar:function(r,t,e,i){var n=r.getReferringComponents("polar",re).models[0],a=n.findAxisModel("radiusAxis"),o=n.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],e.set("radius",a),e.set("angle",o),mn(a)&&(i.set("radius",a),t.firstCategoryDimIndex=0),mn(o)&&(i.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(r,t,e,i){t.coordSysDims=["lng","lat"]},parallel:function(r,t,e,i){var n=r.ecModel,a=n.getComponent("parallel",r.get("parallelIndex")),o=t.coordSysDims=a.dimensions.slice();A(a.parallelAxisIndex,function(s,l){var u=n.getComponent("parallelAxis",s),h=o[l];e.set(h,u),mn(u)&&(i.set(h,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})}};function mn(r){return r.get("type")==="category"}function db(r,t,e){e=e||{};var i=e.byIndex,n=e.stackedCoordDimension,a,o,s;s2(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var l=!!(r&&r.get("stack")),u,h,c,f;if(A(a,function(_,b){U(_)&&(a[b]=_={name:_}),l&&!_.isExtraCoord&&(!i&&!u&&_.ordinalMeta&&(u=_),!h&&_.type!=="ordinal"&&_.type!=="time"&&(!n||n===_.coordDim)&&(h=_))}),h&&!i&&!u&&(i=!0),h){c="__\0ecstackresult_"+r.id,f="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var d=h.coordDim,p=h.type,v=0;A(a,function(_){_.coordDim===d&&v++});var g={name:c,coordDim:d,coordDimIndex:v,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},m={name:f,coordDim:f,coordDimIndex:v+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(f,p),m.storeDimIndex=s.ensureCalculationDimension(c,p)),o.appendCalculationDimension(g),o.appendCalculationDimension(m)):(a.push(g),a.push(m))}return{stackedDimension:h&&h.name,stackedByDimension:u&&u.name,isStackedByIndex:i,stackedOverDimension:f,stackResultDimension:c}}function s2(r){return!lb(r.schema)}function Vn(r,t){return!!t&&t===r.getCalculationInfo("stackedDimension")}function pb(r,t){return Vn(r,t)?r.getCalculationInfo("stackResultDimension"):t}function l2(r,t){var e=r.get("coordinateSystem"),i=Ll.get(e),n;return t&&t.coordSysDims&&(n=V(t.coordSysDims,function(a){var o={name:a},s=t.axisMap.get(a);if(s){var l=s.get("type");o.type=UI(l)}return o})),n||(n=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]),n}function u2(r,t,e){var i,n;return e&&A(r,function(a,o){var s=a.coordDim,l=e.categoryAxisMap.get(s);l&&(i==null&&(i=o),a.ordinalMeta=l.getOrdinalMeta(),t&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(n=!0)}),!n&&i!=null&&(r[i].otherDims.itemName=0),i}function vb(r,t,e){e=e||{};var i=t.getSourceManager(),n,a=!1;n=i.getSource(),a=n.sourceFormat===Ee;var o=a2(t),s=l2(t,o),l=e.useEncodeDefaulter,u=tt(l)?l:l?Ct(aM,s,t):null,h={coordDimensions:s,generateCoord:e.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},c=fb(n,h),f=u2(c.dimensions,e.createInvertedIndices,o),d=a?null:i.getSharedDataStore(c),p=db(t,{schema:c,store:d}),v=new qf(c,t);v.setCalculationInfo(p);var g=f!=null&&h2(n)?function(m,_,b,x){return x===f?b:this.defaultDimValueGetter(m,_,b,x)}:null;return v.hasItemOption=!1,v.initData(a?n:d,null,g),v}function h2(r){if(r.sourceFormat===Ee){var t=c2(r.data||[]);return!W(Un(t))}}function c2(r){for(var t=0;t<r.length&&r[t]==null;)t++;return r[t]}var dr=(function(){function r(t){this._setting=t||{},this._extent=[1/0,-1/0]}return r.prototype.getSetting=function(t){return this._setting[t]},r.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},r.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},r.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(t){this._isBlank=t},r})();vl(dr);var f2=0,gc=(function(){function r(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++f2}return r.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&V(i,d2);return new r({categories:n,needCollect:!n,deduplication:e.dedplication!==!1})},r.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},r.prototype.parseAndCollect=function(t){var e,i=this._needCollect;if(!U(t)&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=this._getOrCreateMap();return e=n.get(t),e==null&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e},r.prototype._getOrCreateMap=function(){return this._map||(this._map=nt(this.categories))},r})();function d2(r){return q(r)&&r.value!=null?r.value:r+""}function mc(r){return r.type==="interval"||r.type==="log"}function p2(r,t,e,i){var n={},a=r[1]-r[0],o=n.interval=af(a/t,!0);e!=null&&o<e&&(o=n.interval=e),i!=null&&o>i&&(o=n.interval=i);var s=n.intervalPrecision=gb(o),l=n.niceTickExtent=[Pt(Math.ceil(r[0]/o)*o,s),Pt(Math.floor(r[1]/o)*o,s)];return v2(l,r),n}function Ju(r){var t=Math.pow(10,pl(r)),e=r/t;return e?e===2?e=3:e===3?e=5:e*=2:e=1,Pt(e*t)}function gb(r){return or(r)+2}function dg(r,t,e){r[t]=Math.max(Math.min(r[t],e[1]),e[0])}function v2(r,t){!isFinite(r[0])&&(r[0]=t[0]),!isFinite(r[1])&&(r[1]=t[1]),dg(r,0,t),dg(r,1,t),r[0]>r[1]&&(r[0]=r[1])}function Fl(r,t){return r>=t[0]&&r<=t[1]}function Bl(r,t){return t[1]===t[0]?.5:(r-t[0])/(t[1]-t[0])}function zl(r,t){return r*(t[1]-t[0])+t[0]}var Vl=(function(r){F(t,r);function t(e){var i=r.call(this,e)||this;i.type="ordinal";var n=i.getSetting("ordinalMeta");return n||(n=new gc({})),W(n)&&(n=new gc({categories:V(n,function(a){return q(a)?a.value:a})})),i._ordinalMeta=n,i._extent=i.getSetting("extent")||[0,n.categories.length-1],i}return t.prototype.parse=function(e){return e==null?NaN:U(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return e=this.parse(e),Fl(e,this._extent)&&this._ordinalMeta.categories[e]!=null},t.prototype.normalize=function(e){return e=this._getTickNumber(this.parse(e)),Bl(e,this._extent)},t.prototype.scale=function(e){return e=Math.round(zl(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],i=this._extent,n=i[0];n<=i[1];)e.push({value:n}),n++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var i=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,i.length);o<l;++o){var u=i[o];n[o]=u,a[u]=o}for(var h=0;o<s;++o){for(;a[h]!=null;)h++;n.push(h),a[h]=o}},t.prototype._getTickNumber=function(e){var i=this._ticksByOrdinalNumber;return i&&e>=0&&e<i.length?i[e]:e},t.prototype.getRawOrdinalNumber=function(e){var i=this._ordinalNumbersByTick;return i&&e>=0&&e<i.length?i[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var i=this.getRawOrdinalNumber(e.value),n=this._ordinalMeta.categories[i];return n==null?"":n+""}},t.prototype.count=function(){return this._extent[1]-this._extent[0]+1},t.prototype.unionExtentFromData=function(e,i){this.unionExtent(e.getApproximateExtent(i))},t.prototype.isInExtentRange=function(e){return e=this._getTickNumber(e),this._extent[0]<=e&&this._extent[1]>=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t})(dr);dr.registerClass(Vl);var Ti=Pt,Ji=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return Fl(e,this._extent)},t.prototype.normalize=function(e){return Bl(e,this._extent)},t.prototype.scale=function(e){return zl(e,this._extent)},t.prototype.setExtent=function(e,i){var n=this._extent;isNaN(e)||(n[0]=parseFloat(e)),isNaN(i)||(n[1]=parseFloat(i))},t.prototype.unionExtent=function(e){var i=this._extent;e[0]<i[0]&&(i[0]=e[0]),e[1]>i[1]&&(i[1]=e[1]),this.setExtent(i[0],i[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=gb(e)},t.prototype.getTicks=function(e){var i=this._interval,n=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=[];if(!i)return s;var l=1e4;n[0]<a[0]&&(e?s.push({value:Ti(a[0]-i,o)}):s.push({value:n[0]}));for(var u=a[0];u<=a[1]&&(s.push({value:u}),u=Ti(u+i,o),u!==s[s.length-1].value);)if(s.length>l)return[];var h=s.length?s[s.length-1].value:a[1];return n[1]>h&&(e?s.push({value:Ti(h+i,o)}):s.push({value:n[1]})),s},t.prototype.getMinorTicks=function(e){for(var i=this.getTicks(!0),n=[],a=this.getExtent(),o=1;o<i.length;o++){for(var s=i[o],l=i[o-1],u=0,h=[],c=s.value-l.value,f=c/e;u<e-1;){var d=Ti(l.value+(u+1)*f);d>a[0]&&d<a[1]&&h.push(d),u++}n.push(h)}return n},t.prototype.getLabel=function(e,i){if(e==null)return"";var n=i&&i.precision;n==null?n=or(e.value)||0:n==="auto"&&(n=this._intervalPrecision);var a=Ti(e.value,n,!0);return Mf(a)},t.prototype.calcNiceTicks=function(e,i,n){e=e||5;var a=this._extent,o=a[1]-a[0];if(isFinite(o)){o<0&&(o=-o,a.reverse());var s=p2(a,e,i,n);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},t.prototype.calcNiceExtent=function(e){var i=this._extent;if(i[0]===i[1])if(i[0]!==0){var n=Math.abs(i[0]);e.fixMax||(i[1]+=n/2),i[0]-=n/2}else i[1]=1;var a=i[1]-i[0];isFinite(a)||(i[0]=0,i[1]=1),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval);var o=this._interval;e.fixMin||(i[0]=Ti(Math.floor(i[0]/o)*o)),e.fixMax||(i[1]=Ti(Math.ceil(i[1]/o)*o))},t.prototype.setNiceExtent=function(e,i){this._niceExtent=[e,i]},t.type="interval",t})(dr);dr.registerClass(Ji);var mb=typeof Float32Array<"u",g2=mb?Float32Array:Array;function An(r){return W(r)?mb?new Float32Array(r):r:new g2(r)}var m2="__ec_stack_";function y2(r){return r.get("stack")||m2+r.seriesIndex}function yb(r){return r.dim+r.index}function _2(r,t){var e=[];return t.eachSeriesByType(r,function(i){C2(i)&&e.push(i)}),e}function b2(r){var t={};A(r,function(l){var u=l.coordinateSystem,h=u.getBaseAxis();if(!(h.type!=="time"&&h.type!=="value"))for(var c=l.getData(),f=h.dim+"_"+h.index,d=c.getDimensionIndex(c.mapDimension(h.dim)),p=c.getStore(),v=0,g=p.count();v<g;++v){var m=p.get(d,v);t[f]?t[f].push(m):t[f]=[m]}});var e={};for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];if(n){n.sort(function(l,u){return l-u});for(var a=null,o=1;o<n.length;++o){var s=n[o]-n[o-1];s>0&&(a=a===null?s:Math.min(a,s))}e[i]=a}}return e}function x2(r){var t=b2(r),e=[];return A(r,function(i){var n=i.coordinateSystem,a=n.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=t[l],h=Math.abs(o[1]-o[0]),c=a.scale.getExtent(),f=Math.abs(c[1]-c[0]);s=u?h/f*u:h}else{var d=i.getData();s=Math.abs(o[1]-o[0])/d.count()}var p=ee(i.get("barWidth"),s),v=ee(i.get("barMaxWidth"),s),g=ee(i.get("barMinWidth")||(T2(i)?.5:1),s),m=i.get("barGap"),_=i.get("barCategoryGap");e.push({bandWidth:s,barWidth:p,barMaxWidth:v,barMinWidth:g,barGap:m,barCategoryGap:_,axisKey:yb(a),stackId:y2(i)})}),w2(e)}function w2(r){var t={};A(r,function(i,n){var a=i.axisKey,o=i.bandWidth,s=t[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;t[a]=s;var u=i.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var h=i.barWidth;h&&!l[u].width&&(l[u].width=h,h=Math.min(s.remainedWidth,h),s.remainedWidth-=h);var c=i.barMaxWidth;c&&(l[u].maxWidth=c);var f=i.barMinWidth;f&&(l[u].minWidth=f);var d=i.barGap;d!=null&&(s.gap=d);var p=i.barCategoryGap;p!=null&&(s.categoryGap=p)});var e={};return A(t,function(i,n){e[n]={};var a=i.stacks,o=i.bandWidth,s=i.categoryGap;if(s==null){var l=vt(a).length;s=Math.max(35-l*4,15)+"%"}var u=ee(s,o),h=ee(i.gap,1),c=i.remainedWidth,f=i.autoWidthCount,d=(c-u)/(f+(f-1)*h);d=Math.max(d,0),A(a,function(m){var _=m.maxWidth,b=m.minWidth;if(m.width){var x=m.width;_&&(x=Math.min(x,_)),b&&(x=Math.max(x,b)),m.width=x,c-=x+h*x,f--}else{var x=d;_&&_<x&&(x=Math.min(_,c)),b&&b>x&&(x=b),x!==d&&(m.width=x,c-=x+h*x,f--)}}),d=(c-u)/(f+(f-1)*h),d=Math.max(d,0);var p=0,v;A(a,function(m,_){m.width||(m.width=d),v=m,p+=m.width*(1+h)}),v&&(p-=v.width*h);var g=-p/2;A(a,function(m,_){e[n][_]=e[n][_]||{bandWidth:o,offset:g,width:m.width},g+=m.width*(1+h)})}),e}function S2(r,t,e){if(r&&t){var i=r[yb(t)];return i}}function C2(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function T2(r){return r.pipelineContext&&r.pipelineContext.large}var A2=function(r,t,e,i){for(;e<i;){var n=e+i>>>1;r[n][1]<t?e=n+1:i=n}return e},Kf=(function(r){F(t,r);function t(e){var i=r.call(this,e)||this;return i.type="time",i}return t.prototype.getLabel=function(e){var i=this.getSetting("useUTC");return Mo(e.value,ev[$A(Ln(this._minLevelUnit))]||ev.second,i,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(e,i,n){var a=this.getSetting("useUTC"),o=this.getSetting("locale");return UA(e,i,n,o,a)},t.prototype.getTicks=function(){var e=this._interval,i=this._extent,n=[];if(!e)return n;n.push({value:i[0],level:0});var a=this.getSetting("useUTC"),o=L2(this._minLevelUnit,this._approxInterval,a,i);return n=n.concat(o),n.push({value:i[1],level:0}),n},t.prototype.calcNiceExtent=function(e){var i=this._extent;if(i[0]===i[1]&&(i[0]-=Re,i[1]+=Re),i[1]===-1/0&&i[0]===1/0){var n=new Date;i[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),i[0]=i[1]-Re}this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval)},t.prototype.calcNiceTicks=function(e,i,n){e=e||10;var a=this._extent,o=a[1]-a[0];this._approxInterval=o/e,i!=null&&this._approxInterval<i&&(this._approxInterval=i),n!=null&&this._approxInterval>n&&(this._approxInterval=n);var s=as.length,l=Math.min(A2(as,this._approxInterval,0,s),s-1);this._interval=as[l][1],this._minLevelUnit=as[Math.max(l-1,0)][0]},t.prototype.parse=function(e){return At(e)?e:+Le(e)},t.prototype.contain=function(e){return Fl(this.parse(e),this._extent)},t.prototype.normalize=function(e){return Bl(this.parse(e),this._extent)},t.prototype.scale=function(e){return zl(e,this._extent)},t.type="time",t})(Ji),as=[["second",Cf],["minute",Tf],["hour",Na],["quarter-day",Na*6],["half-day",Na*12],["day",Re*1.2],["half-week",Re*3.5],["week",Re*7],["month",Re*31],["quarter",Re*95],["half-year",tv/2],["year",tv]];function M2(r,t,e,i){var n=Le(t),a=Le(e),o=function(p){return rv(n,p,i)===rv(a,p,i)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},h=function(){return u()&&o("hour")},c=function(){return h()&&o("minute")},f=function(){return c()&&o("second")},d=function(){return f()&&o("millisecond")};switch(r){case"year":return s();case"month":return l();case"day":return u();case"hour":return h();case"minute":return c();case"second":return f();case"millisecond":return d()}}function D2(r,t){return r/=Re,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function I2(r){var t=30*Re;return r/=t,r>6?6:r>3?3:r>2?2:1}function P2(r){return r/=Na,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function pg(r,t){return r/=t?Tf:Cf,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function k2(r){return af(r,!0)}function R2(r,t,e){var i=new Date(r);switch(Ln(t)){case"year":case"month":i[$0(e)](0);case"day":i[U0(e)](1);case"hour":i[Y0(e)](0);case"minute":i[X0(e)](0);case"second":i[Z0(e)](0),i[q0(e)](0)}return i.getTime()}function L2(r,t,e,i){var n=1e4,a=W0,o=0;function s(I,P,k,R,L,j,E){for(var Z=new Date(P),G=P,Y=Z[R]();G<k&&G<=i[1];)E.push({value:G}),Y+=I,Z[L](Y),G=Z.getTime();E.push({value:G,notAdd:!0})}function l(I,P,k){var R=[],L=!P.length;if(!M2(Ln(I),i[0],i[1],e)){L&&(P=[{value:R2(new Date(i[0]),I,e)},{value:i[1]}]);for(var j=0;j<P.length-1;j++){var E=P[j].value,Z=P[j+1].value;if(E!==Z){var G=void 0,Y=void 0,et=void 0,ut=!1;switch(I){case"year":G=Math.max(1,Math.round(t/Re/365)),Y=Af(e),et=YA(e);break;case"half-year":case"quarter":case"month":G=I2(t),Y=On(e),et=$0(e);break;case"week":case"half-week":case"day":G=D2(t),Y=Il(e),et=U0(e),ut=!0;break;case"half-day":case"quarter-day":case"hour":G=P2(t),Y=to(e),et=Y0(e);break;case"minute":G=pg(t,!0),Y=Pl(e),et=X0(e);break;case"second":G=pg(t,!1),Y=kl(e),et=Z0(e);break;case"millisecond":G=k2(t),Y=Rl(e),et=q0(e);break}s(G,E,Z,Y,et,ut,R),I==="year"&&k.length>1&&j===0&&k.unshift({value:k[0].value-G})}}for(var j=0;j<R.length;j++)k.push(R[j]);return R}}for(var u=[],h=[],c=0,f=0,d=0;d<a.length&&o++<n;++d){var p=Ln(a[d]);if(GA(a[d])){l(a[d],u[u.length-1]||[],h);var v=a[d+1]?Ln(a[d+1]):null;if(p!==v){if(h.length){f=c,h.sort(function(I,P){return I.value-P.value});for(var g=[],m=0;m<h.length;++m){var _=h[m].value;(m===0||h[m-1].value!==_)&&(g.push(h[m]),_>=i[0]&&_<=i[1]&&c++)}var b=(i[1]-i[0])/t;if(c>b*1.5&&f>b/1.5||(u.push(g),c>b||r===a[d]))break}h=[]}}}for(var x=It(V(u,function(I){return It(I,function(P){return P.value>=i[0]&&P.value<=i[1]&&!P.notAdd})}),function(I){return I.length>0}),C=[],S=x.length-1,d=0;d<x.length;++d)for(var T=x[d],M=0;M<T.length;++M)C.push({value:T[M].value,level:S-d});C.sort(function(I,P){return I.value-P.value});for(var D=[],d=0;d<C.length;++d)(d===0||C[d].value!==C[d-1].value)&&D.push(C[d]);return D}dr.registerClass(Kf);var vg=dr.prototype,za=Ji.prototype,O2=Pt,E2=Math.floor,j2=Math.ceil,os=Math.pow,Fe=Math.log,Jf=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new Ji,e._interval=0,e}return t.prototype.getTicks=function(e){var i=this._originalScale,n=this._extent,a=i.getExtent(),o=za.getTicks.call(this,e);return V(o,function(s){var l=s.value,u=Pt(os(this.base,l));return u=l===n[0]&&this._fixMin?ss(u,a[0]):u,u=l===n[1]&&this._fixMax?ss(u,a[1]):u,{value:u}},this)},t.prototype.setExtent=function(e,i){var n=Fe(this.base);e=Fe(Math.max(0,e))/n,i=Fe(Math.max(0,i))/n,za.setExtent.call(this,e,i)},t.prototype.getExtent=function(){var e=this.base,i=vg.getExtent.call(this);i[0]=os(e,i[0]),i[1]=os(e,i[1]);var n=this._originalScale,a=n.getExtent();return this._fixMin&&(i[0]=ss(i[0],a[0])),this._fixMax&&(i[1]=ss(i[1],a[1])),i},t.prototype.unionExtent=function(e){this._originalScale.unionExtent(e);var i=this.base;e[0]=Fe(e[0])/Fe(i),e[1]=Fe(e[1])/Fe(i),vg.unionExtent.call(this,e)},t.prototype.unionExtentFromData=function(e,i){this.unionExtent(e.getApproximateExtent(i))},t.prototype.calcNiceTicks=function(e){e=e||10;var i=this._extent,n=i[1]-i[0];if(!(n===1/0||n<=0)){var a=Gy(n),o=e/n*a;for(o<=.5&&(a*=10);!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0;)a*=10;var s=[Pt(j2(i[0]/a)*a),Pt(E2(i[1]/a)*a)];this._interval=a,this._niceExtent=s}},t.prototype.calcNiceExtent=function(e){za.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return e=Fe(e)/Fe(this.base),Fl(e,this._extent)},t.prototype.normalize=function(e){return e=Fe(e)/Fe(this.base),Bl(e,this._extent)},t.prototype.scale=function(e){return e=zl(e,this._extent),os(this.base,e)},t.type="log",t})(dr),_b=Jf.prototype;_b.getMinorTicks=za.getMinorTicks;_b.getLabel=za.getLabel;function ss(r,t){return O2(r,or(t))}dr.registerClass(Jf);var N2=(function(){function r(t,e,i){this._prepareParams(t,e,i)}return r.prototype._prepareParams=function(t,e,i){i[1]<i[0]&&(i=[NaN,NaN]),this._dataMin=i[0],this._dataMax=i[1];var n=this._isOrdinal=t.type==="ordinal";this._needCrossZero=t.type==="interval"&&e.getNeedCrossZero&&e.getNeedCrossZero();var a=e.get("min",!0);a==null&&(a=e.get("startValue",!0));var o=this._modelMinRaw=a;tt(o)?this._modelMinNum=ls(t,o({min:i[0],max:i[1]})):o!=="dataMin"&&(this._modelMinNum=ls(t,o));var s=this._modelMaxRaw=e.get("max",!0);if(tt(s)?this._modelMaxNum=ls(t,s({min:i[0],max:i[1]})):s!=="dataMax"&&(this._modelMaxNum=ls(t,s)),n)this._axisDataLen=e.getCategories().length;else{var l=e.get("boundaryGap"),u=W(l)?l:[l||0,l||0];typeof u[0]=="boolean"||typeof u[1]=="boolean"?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[Kr(u[0],1),Kr(u[1],1)]}},r.prototype.calculate=function(){var t=this._isOrdinal,e=this._dataMin,i=this._dataMax,n=this._axisDataLen,a=this._boundaryGapInner,o=t?null:i-e||Math.abs(e),s=this._modelMinRaw==="dataMin"?e:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?i:this._modelMaxNum,u=s!=null,h=l!=null;s==null&&(s=t?n?0:NaN:e-a[0]*o),l==null&&(l=t?n?n-1:NaN:i+a[1]*o),(s==null||!isFinite(s))&&(s=NaN),(l==null||!isFinite(l))&&(l=NaN);var c=Wa(s)||Wa(l)||t&&!n;this._needCrossZero&&(s>0&&l>0&&!u&&(s=0),s<0&&l<0&&!h&&(l=0));var f=this._determinedMin,d=this._determinedMax;return f!=null&&(s=f,u=!0),d!=null&&(l=d,h=!0),{min:s,max:l,minFixed:u,maxFixed:h,isBlank:c}},r.prototype.modifyDataMinMax=function(t,e){this[B2[t]]=e},r.prototype.setDeterminedMinMax=function(t,e){var i=F2[t];this[i]=e},r.prototype.freeze=function(){this.frozen=!0},r})(),F2={min:"_determinedMin",max:"_determinedMax"},B2={min:"_dataMin",max:"_dataMax"};function bb(r,t,e){var i=r.rawExtentInfo;return i||(i=new N2(r,t,e),r.rawExtentInfo=i,i)}function ls(r,t){return t==null?null:Wa(t)?NaN:r.parse(t)}function xb(r,t){var e=r.type,i=bb(r,t,r.getExtent()).calculate();r.setBlank(i.isBlank);var n=i.min,a=i.max,o=t.ecModel;if(o&&e==="time"){var s=_2("bar",o),l=!1;if(A(s,function(c){l=l||c.getBaseAxis()===t.axis}),l){var u=x2(s),h=z2(n,a,t,u);n=h.min,a=h.max}}return{extent:[n,a],fixMin:i.minFixed,fixMax:i.maxFixed}}function z2(r,t,e,i){var n=e.axis.getExtent(),a=Math.abs(n[1]-n[0]),o=S2(i,e.axis);if(o===void 0)return{min:r,max:t};var s=1/0;A(o,function(d){s=Math.min(d.offset,s)});var l=-1/0;A(o,function(d){l=Math.max(d.offset+d.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=t-r,c=1-(s+l)/a,f=h/c-h;return t+=f*(l/u),r-=f*(s/u),{min:r,max:t}}function yc(r,t){var e=t,i=xb(r,e),n=i.extent,a=e.get("splitNumber");r instanceof Jf&&(r.base=e.get("logBase"));var o=r.type,s=e.get("interval"),l=o==="interval"||o==="time";r.setExtent(n[0],n[1]),r.calcNiceExtent({splitNumber:a,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?e.get("minInterval"):null,maxInterval:l?e.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function wb(r,t){if(t=t||r.get("type"),t)switch(t){case"category":return new Vl({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new Kf({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(dr.getClass(t)||Ji)}}function V2(r){var t=r.scale.getExtent(),e=t[0],i=t[1];return!(e>0&&i>0||e<0&&i<0)}function Zn(r){var t=r.getLabelModel().get("formatter"),e=r.type==="category"?r.scale.getExtent()[0]:null;return r.scale.type==="time"?(function(i){return function(n,a){return r.scale.getFormattedLabel(n,a,i)}})(t):U(t)?(function(i){return function(n){var a=r.scale.getLabel(n),o=i.replace("{value}",a??"");return o}})(t):tt(t)?(function(i){return function(n,a){return e!=null&&(a=n.value-e),i(Qf(r,n),a,n.level!=null?{level:n.level}:null)}})(t):function(i){return r.scale.getLabel(i)}}function Qf(r,t){return r.type==="category"?r.scale.getLabel(t):t.value}function H2(r){var t=r.model,e=r.scale;if(!(!t.get(["axisLabel","show"])||e.isBlank())){var i,n,a=e.getExtent();e instanceof Vl?n=e.count():(i=e.getTicks(),n=i.length);var o=r.getLabelModel(),s=Zn(r),l,u=1;n>40&&(u=Math.ceil(n/40));for(var h=0;h<n;h+=u){var c=i?i[h]:{value:a[0]+h},f=s(c,h),d=o.getTextRect(f),p=W2(d,o.get("rotate")||0);l?l.union(p):l=p}return l}}function W2(r,t){var e=t*Math.PI/180,i=r.width,n=r.height,a=i*Math.abs(Math.cos(e))+Math.abs(n*Math.sin(e)),o=i*Math.abs(Math.sin(e))+Math.abs(n*Math.cos(e)),s=new mt(r.x,r.y,a,o);return s}function td(r){var t=r.get("interval");return t??"auto"}function Sb(r){return r.type==="category"&&td(r.getLabelModel())===0}function Cb(r,t){var e={};return A(r.mapDimensionsAll(t),function(i){e[pb(r,i)]=!0}),vt(e)}function G2(r,t,e){t&&A(Cb(t,e),function(i){var n=t.getApproximateExtent(i);n[0]<r[0]&&(r[0]=n[0]),n[1]>r[1]&&(r[1]=n[1])})}var Tb=(function(){function r(){}return r.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},r.prototype.getCoordSysModel=function(){},r})();function $2(r){return vb(null,r)}var U2={isDimensionStacked:Vn,enableDataStack:db,getStackedDimension:pb};function Y2(r,t){var e=t;t instanceof Tt||(e=new Tt(t));var i=wb(e);return i.setExtent(r[0],r[1]),yc(i,e),i}function X2(r){xe(r,Tb)}function Z2(r,t){return t=t||{},Ye(r,null,null,t.state!=="normal")}const q2=Object.freeze(Object.defineProperty({__proto__:null,createDimensions:t2,createList:$2,createScale:Y2,createSymbol:$i,createTextStyle:Z2,dataStack:U2,enableHoverEmphasis:Oa,getECData:_t,getLayoutRect:Ki,mixinAxisModelCommonMethods:X2},Symbol.toStringTag,{value:"Module"}));var gg=[],K2={registerPreprocessor:$f,registerProcessor:Uf,registerPostInit:eb,registerPostUpdate:rb,registerUpdateLifecycle:Nl,registerAction:Ke,registerCoordinateSystem:ib,registerLayout:nb,registerVisual:ti,registerTransform:ob,registerLoading:Xf,registerMap:ab,registerImpl:gI,PRIORITY:U_,ComponentModel:dt,ComponentView:Jt,SeriesModel:Ze,ChartView:_e,registerComponentModel:function(r){dt.registerClass(r)},registerComponentView:function(r){Jt.registerClass(r)},registerSeriesModel:function(r){Ze.registerClass(r)},registerChartView:function(r){_e.registerClass(r)},registerSubTypeDefaulter:function(r,t){dt.registerSubTypeDefaulter(r,t)},registerPainter:function(r,t){By(r,t)}};function Ui(r){if(W(r)){A(r,function(t){Ui(t)});return}pt(gg,r)>=0||(gg.push(r),tt(r)&&(r={install:r}),r.install(K2))}var J2=1e-8;function mg(r,t){return Math.abs(r-t)<J2}function yg(r,t,e){var i=0,n=r[0];if(!n)return!1;for(var a=1;a<r.length;a++){var o=r[a];i+=yr(n[0],n[1],o[0],o[1],t,e),n=o}var s=r[0];return(!mg(n[0],s[0])||!mg(n[1],s[1]))&&(i+=yr(n[0],n[1],s[0],s[1],t,e)),i!==0}var Q2=[];function Qu(r,t){for(var e=0;e<r.length;e++)ie(r[e],r[e],t)}function _g(r,t,e,i){for(var n=0;n<r.length;n++){var a=r[n];i&&(a=i.project(a)),a&&isFinite(a[0])&&isFinite(a[1])&&(Nr(t,t,a),Fr(e,e,a))}}function tP(r){for(var t=0,e=0,i=0,n=r.length,a=r[n-1][0],o=r[n-1][1],s=0;s<n;s++){var l=r[s][0],u=r[s][1],h=a*u-l*o;t+=h,e+=(a+l)*h,i+=(o+u)*h,a=l,o=u}return t?[e/t/3,i/t/3,t]:[r[0][0]||0,r[0][1]||0]}var Ab=(function(){function r(t){this.name=t}return r.prototype.setCenter=function(t){this._center=t},r.prototype.getCenter=function(){var t=this._center;return t||(t=this._center=this.calcCenter()),t},r})(),bg=(function(){function r(t,e){this.type="polygon",this.exterior=t,this.interiors=e}return r})(),xg=(function(){function r(t){this.type="linestring",this.points=t}return r})(),eP=(function(r){F(t,r);function t(e,i,n){var a=r.call(this,e)||this;return a.type="geoJSON",a.geometries=i,a._center=n&&[n[0],n[1]],a}return t.prototype.calcCenter=function(){for(var e=this.geometries,i,n=0,a=0;a<e.length;a++){var o=e[a],s=o.exterior,l=s&&s.length;l>n&&(i=o,n=l)}if(i)return tP(i.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},t.prototype.getBoundingRect=function(e){var i=this._rect;if(i&&!e)return i;var n=[1/0,1/0],a=[-1/0,-1/0],o=this.geometries;return A(o,function(s){s.type==="polygon"?_g(s.exterior,n,a,e):A(s.points,function(l){_g(l,n,a,e)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(a[0])&&isFinite(a[1])||(n[0]=n[1]=a[0]=a[1]=0),i=new mt(n[0],n[1],a[0]-n[0],a[1]-n[1]),e||(this._rect=i),i},t.prototype.contain=function(e){var i=this.getBoundingRect(),n=this.geometries;if(!i.contain(e[0],e[1]))return!1;t:for(var a=0,o=n.length;a<o;a++){var s=n[a];if(s.type==="polygon"){var l=s.exterior,u=s.interiors;if(yg(l,e[0],e[1])){for(var h=0;h<(u?u.length:0);h++)if(yg(u[h],e[0],e[1]))continue t;return!0}}}return!1},t.prototype.transformTo=function(e,i,n,a){var o=this.getBoundingRect(),s=o.width/o.height;n?a||(a=n/s):n=s*a;for(var l=new mt(e,i,n,a),u=o.calculateTransform(l),h=this.geometries,c=0;c<h.length;c++){var f=h[c];f.type==="polygon"?(Qu(f.exterior,u),A(f.interiors,function(d){Qu(d,u)})):A(f.points,function(d){Qu(d,u)})}o=this._rect,o.copy(l),this._center=[o.x+o.width/2,o.y+o.height/2]},t.prototype.cloneShallow=function(e){e==null&&(e=this.name);var i=new t(e,this.geometries,this._center);return i._rect=this._rect,i.transformTo=null,i},t})(Ab);(function(r){F(t,r);function t(e,i){var n=r.call(this,e)||this;return n.type="geoSVG",n._elOnlyForCalculate=i,n}return t.prototype.calcCenter=function(){for(var e=this._elOnlyForCalculate,i=e.getBoundingRect(),n=[i.x+i.width/2,i.y+i.height/2],a=po(Q2),o=e;o&&!o.isGeoSVGGraphicRoot;)$r(a,o.getLocalTransform(),a),o=o.parent;return go(a,a),ie(n,n,a),n},t})(Ab);function rP(r){if(!r.UTF8Encoding)return r;var t=r,e=t.UTF8Scale;e==null&&(e=1024);var i=t.features;return A(i,function(n){var a=n.geometry,o=a.encodeOffsets,s=a.coordinates;if(o)switch(a.type){case"LineString":a.coordinates=Mb(s,o,e);break;case"Polygon":th(s,o,e);break;case"MultiLineString":th(s,o,e);break;case"MultiPolygon":A(s,function(l,u){return th(l,o[u],e)})}}),t.UTF8Encoding=!1,t}function th(r,t,e){for(var i=0;i<r.length;i++)r[i]=Mb(r[i],t[i],e)}function Mb(r,t,e){for(var i=[],n=t[0],a=t[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+=n,l+=a,n=s,a=l,i.push([s/e,l/e])}return i}function wg(r,t){return r=rP(r),V(It(r.features,function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0}),function(e){var i=e.properties,n=e.geometry,a=[];switch(n.type){case"Polygon":var o=n.coordinates;a.push(new bg(o[0],o.slice(1)));break;case"MultiPolygon":A(n.coordinates,function(l){l[0]&&a.push(new bg(l[0],l.slice(1)))});break;case"LineString":a.push(new xg([n.coordinates]));break;case"MultiLineString":a.push(new xg(n.coordinates))}var s=new eP(i[t||"name"],a,i.cp);return s.properties=i,s})}const iP=Object.freeze(Object.defineProperty({__proto__:null,MAX_SAFE_INTEGER:sC,asc:ef,getPercentWithPrecision:nC,getPixelPrecision:rf,getPrecision:or,getPrecisionSafe:Wy,isNumeric:$y,isRadianAroundZero:Xa,linearMap:jr,nice:af,numericToNumber:Za,parseDate:Le,quantile:uC,quantity:Gy,quantityExponent:pl,reformIntervals:hC,remRadian:nf,round:Pt},Symbol.toStringTag,{value:"Module"})),nP=Object.freeze(Object.defineProperty({__proto__:null,format:Mo,parse:Le},Symbol.toStringTag,{value:"Module"})),aP=Object.freeze(Object.defineProperty({__proto__:null,Arc:Co,BezierCurve:Sl,BoundingRect:mt,Circle:bo,CompoundPath:df,Ellipse:xl,Group:Bt,Image:qe,IncrementalDisplayable:M0,Line:Xe,LinearGradient:pf,Polygon:wo,Polyline:So,RadialGradient:A0,Rect:Ft,Ring:wl,Sector:xo,Text:Vt,clipPointsByRect:yf,clipRectByRect:E0,createIcon:To,extendPath:I0,extendShape:D0,getShapeClass:P0,getTransform:Tl,initProps:Yn,makeImage:gf,makePath:Cl,mergePath:R0,registerShape:Oe,resizePath:mf,updateProps:Qr},Symbol.toStringTag,{value:"Module"})),oP=Object.freeze(Object.defineProperty({__proto__:null,addCommas:Mf,capitalFirst:qA,encodeHTML:Kt,formatTime:ZA,formatTpl:If,getTextRect:XA,getTooltipMarker:K0,normalizeCssArray:Do,toCamelCase:Df,truncateText:BC},Symbol.toStringTag,{value:"Module"})),sP=Object.freeze(Object.defineProperty({__proto__:null,bind:ct,clone:it,curry:Ct,defaults:lt,each:A,extend:N,filter:It,indexOf:pt,inherits:Gc,isArray:W,isFunction:tt,isObject:q,isString:U,map:V,merge:st,reduce:ur},Symbol.toStringTag,{value:"Module"}));var oo=kt();function Db(r,t){var e=V(t,function(i){return r.scale.parse(i)});return r.type==="time"&&e.length>0&&(e.sort(),e.unshift(e[0]),e.push(e[e.length-1])),e}function lP(r){var t=r.getLabelModel().get("customValues");if(t){var e=Zn(r),i=r.scale.getExtent(),n=Db(r,t),a=It(n,function(o){return o>=i[0]&&o<=i[1]});return{labels:V(a,function(o){var s={value:o};return{formattedLabel:e(s),rawLabel:r.scale.getLabel(s),tickValue:o}})}}return r.type==="category"?hP(r):fP(r)}function uP(r,t){var e=r.getTickModel().get("customValues");if(e){var i=r.scale.getExtent(),n=Db(r,e);return{ticks:It(n,function(a){return a>=i[0]&&a<=i[1]})}}return r.type==="category"?cP(r,t):{ticks:V(r.scale.getTicks(),function(a){return a.value})}}function hP(r){var t=r.getLabelModel(),e=Ib(r,t);return!t.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:e.labelCategoryInterval}:e}function Ib(r,t){var e=Pb(r,"labels"),i=td(t),n=kb(e,i);if(n)return n;var a,o;return tt(i)?a=Ob(r,i):(o=i==="auto"?dP(r):i,a=Lb(r,o)),Rb(e,i,{labels:a,labelCategoryInterval:o})}function cP(r,t){var e=Pb(r,"ticks"),i=td(t),n=kb(e,i);if(n)return n;var a,o;if((!t.get("show")||r.scale.isBlank())&&(a=[]),tt(i))a=Ob(r,i,!0);else if(i==="auto"){var s=Ib(r,r.getLabelModel());o=s.labelCategoryInterval,a=V(s.labels,function(l){return l.tickValue})}else o=i,a=Lb(r,o,!0);return Rb(e,i,{ticks:a,tickCategoryInterval:o})}function fP(r){var t=r.scale.getTicks(),e=Zn(r);return{labels:V(t,function(i,n){return{level:i.level,formattedLabel:e(i,n),rawLabel:r.scale.getLabel(i),tickValue:i.value}})}}function Pb(r,t){return oo(r)[t]||(oo(r)[t]=[])}function kb(r,t){for(var e=0;e<r.length;e++)if(r[e].key===t)return r[e].value}function Rb(r,t,e){return r.push({key:t,value:e}),e}function dP(r){var t=oo(r).autoInterval;return t??(oo(r).autoInterval=r.calculateCategoryInterval())}function pP(r){var t=vP(r),e=Zn(r),i=(t.axisRotate-t.labelRotate)/180*Math.PI,n=r.scale,a=n.getExtent(),o=n.count();if(a[1]-a[0]<1)return 0;var s=1;o>40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],u=r.dataToCoord(l+1)-r.dataToCoord(l),h=Math.abs(u*Math.cos(i)),c=Math.abs(u*Math.sin(i)),f=0,d=0;l<=a[1];l+=s){var p=0,v=0,g=cl(e({value:l}),t.font,"center","top");p=g.width*1.3,v=g.height*1.3,f=Math.max(f,p,7),d=Math.max(d,v,7)}var m=f/h,_=d/c;isNaN(m)&&(m=1/0),isNaN(_)&&(_=1/0);var b=Math.max(0,Math.floor(Math.min(m,_))),x=oo(r.model),C=r.getExtent(),S=x.lastAutoInterval,T=x.lastTickCount;return S!=null&&T!=null&&Math.abs(S-b)<=1&&Math.abs(T-o)<=1&&S>b&&x.axisExtent0===C[0]&&x.axisExtent1===C[1]?b=S:(x.lastTickCount=o,x.lastAutoInterval=b,x.axisExtent0=C[0],x.axisExtent1=C[1]),b}function vP(r){var t=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function Lb(r,t,e){var i=Zn(r),n=r.scale,a=n.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=a[0],h=n.count();u!==0&&l>1&&h/l>2&&(u=Math.round(Math.ceil(u/l)*l));var c=Sb(r),f=o.get("showMinLabel")||c,d=o.get("showMaxLabel")||c;f&&u!==a[0]&&v(a[0]);for(var p=u;p<=a[1];p+=l)v(p);d&&p-l!==a[1]&&v(a[1]);function v(g){var m={value:g};s.push(e?g:{formattedLabel:i(m),rawLabel:n.getLabel(m),tickValue:g})}return s}function Ob(r,t,e){var i=r.scale,n=Zn(r),a=[];return A(i.getTicks(),function(o){var s=i.getLabel(o),l=o.value;t(o.value,s)&&a.push(e?l:{formattedLabel:n(o),rawLabel:s,tickValue:l})}),a}var Sg=[0,1],ed=(function(){function r(t,e,i){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=i||[0,0]}return r.prototype.contain=function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&t<=n},r.prototype.containData=function(t){return this.scale.contain(t)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(t){return rf(t||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(t,e){var i=this._extent;i[0]=t,i[1]=e},r.prototype.dataToCoord=function(t,e){var i=this._extent,n=this.scale;return t=n.normalize(t),this.onBand&&n.type==="ordinal"&&(i=i.slice(),Cg(i,n.count())),jr(t,Sg,i,e)},r.prototype.coordToData=function(t,e){var i=this._extent,n=this.scale;this.onBand&&n.type==="ordinal"&&(i=i.slice(),Cg(i,n.count()));var a=jr(t,i,Sg,e);return this.scale.scale(a)},r.prototype.pointToData=function(t,e){},r.prototype.getTicksCoords=function(t){t=t||{};var e=t.tickModel||this.getTickModel(),i=uP(this,e),n=i.ticks,a=V(n,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=e.get("alignWithLabel");return gP(this,a,o,t.clamp),a},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var i=this.scale.getMinorTicks(e),n=V(i,function(a){return V(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return n},r.prototype.getViewLabels=function(){return lP(this).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),i=e[1]-e[0]+(this.onBand?1:0);i===0&&(i=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/i},r.prototype.calculateCategoryInterval=function(){return pP(this)},r})();function Cg(r,t){var e=r[1]-r[0],i=t,n=e/i/2;r[0]+=n,r[1]-=n}function gP(r,t,e,i){var n=t.length;if(!r.onBand||e||!n)return;var a=r.getExtent(),o,s;if(n===1)t[0].coord=a[0],o=t[1]={coord:a[1],tickValue:t[0].tickValue};else{var l=t[n-1].tickValue-t[0].tickValue,u=(t[n-1].coord-t[0].coord)/l;A(t,function(d){d.coord-=u/2});var h=r.scale.getExtent();s=1+h[1]-t[n-1].tickValue,o={coord:t[n-1].coord+u*s,tickValue:h[1]+1},t.push(o)}var c=a[0]>a[1];f(t[0].coord,a[0])&&(i?t[0].coord=a[0]:t.shift()),i&&f(a[0],t[0].coord)&&t.unshift({coord:a[0]}),f(a[1],o.coord)&&(i?o.coord=a[1]:t.pop()),i&&f(o.coord,a[1])&&t.push({coord:a[1]});function f(d,p){return d=Pt(d),p=Pt(p),c?d>p:d<p}}function mP(r){var t=dt.extend(r);return dt.registerClass(t),t}function yP(r){var t=Jt.extend(r);return Jt.registerClass(t),t}function _P(r){var t=Ze.extend(r);return Ze.registerClass(t),t}function bP(r){var t=_e.extend(r);return _e.registerClass(t),t}function xP(r){for(var t=[],e=0;e<r.length;e++){var i=r[e];if(!i.defaultAttr.ignore){var n=i.label,a=n.getComputedTransform(),o=n.getBoundingRect(),s=!a||a[1]<1e-5&&a[2]<1e-5,l=n.style.margin||0,u=o.clone();u.applyTransform(a),u.x-=l/2,u.y-=l/2,u.width+=l,u.height+=l;var h=s?new Bs(o,a):null;t.push({label:n,labelLine:i.labelLine,rect:u,localRect:o,obb:h,priority:i.priority,defaultAttr:i.defaultAttr,layoutOption:i.computedLayoutOption,axisAligned:s,transform:a})}}return t}function wP(r){var t=[];r.sort(function(v,g){return g.priority-v.priority});var e=new mt(0,0,0,0);function i(v){if(!v.ignore){var g=v.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}v.ignore=!0}for(var n=0;n<r.length;n++){var a=r[n],o=a.axisAligned,s=a.localRect,l=a.transform,u=a.label,h=a.labelLine;e.copy(a.rect),e.width-=.1,e.height-=.1,e.x+=.05,e.y+=.05;for(var c=a.obb,f=!1,d=0;d<t.length;d++){var p=t[d];if(e.intersect(p.rect)){if(o&&p.axisAligned){f=!0;break}if(p.obb||(p.obb=new Bs(p.localRect,p.transform)),c||(c=new Bs(s,l)),c.intersect(p.obb)){f=!0;break}}}f?(i(u),h&&i(h)):(u.attr("ignore",a.defaultAttr.ignore),h&&h.attr("ignore",a.defaultAttr.labelGuideIgnore),t.push(a))}}const SP=Object.freeze(Object.defineProperty({__proto__:null,Axis:ed,ChartView:_e,ComponentModel:dt,ComponentView:Jt,List:qf,Model:Tt,PRIORITY:U_,SeriesModel:Ze,color:xS,connect:jI,dataTool:WI,dependencies:yI,disConnect:NI,disconnect:tb,dispose:FI,env:J,extendChartView:bP,extendComponentModel:mP,extendComponentView:yP,extendSeriesModel:_P,format:oP,getCoordinateSystemDimensions:zI,getInstanceByDom:Wf,getInstanceById:BI,getMap:HI,graphic:aP,helper:q2,init:EI,innerDrawElementOnCanvas:N_,matrix:Z1,number:iP,parseGeoJSON:wg,parseGeoJson:wg,registerAction:Ke,registerCoordinateSystem:ib,registerLayout:nb,registerLoading:Xf,registerLocale:Sf,registerMap:ab,registerPostInit:eb,registerPostUpdate:rb,registerPreprocessor:$f,registerProcessor:Uf,registerTheme:Gf,registerTransform:ob,registerUpdateLifecycle:Nl,registerVisual:ti,setCanvasCreator:VI,setPlatformAPI:ey,throttle:Nf,time:nP,use:Ui,util:sP,vector:O1,version:mI,zrUtil:S1,zrender:rC},Symbol.toStringTag,{value:"Module"}));var CP=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e){return vb(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var i=new Bt,n=$i("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);i.add(n),n.setStyle(e.lineStyle);var a=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=a==="none"?"circle":a,l=e.itemHeight*.8,u=$i(s,(e.itemWidth-l)/2,(e.itemHeight-l)/2,l,l,e.itemStyle.fill);i.add(u),u.setStyle(e.itemStyle);var h=e.iconRotate==="inherit"?o:e.iconRotate||0;return u.rotation=h*Math.PI/180,u.setOrigin([e.itemWidth/2,e.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),i},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t})(Ze);function Eb(r,t){var e=r.mapDimensionsAll("defaultedLabel"),i=e.length;if(i===1){var n=Bn(r,t,e[0]);return n!=null?n+"":null}else if(i){for(var a=[],o=0;o<e.length;o++)a.push(Bn(r,t,e[o]));return a.join(" ")}}function TP(r,t){var e=r.mapDimensionsAll("defaultedLabel");if(!W(t))return t+"";for(var i=[],n=0;n<e.length;n++){var a=r.getDimensionIndex(e[n]);a>=0&&i.push(t[a])}return i.join(" ")}var rd=(function(r){F(t,r);function t(e,i,n,a){var o=r.call(this)||this;return o.updateData(e,i,n,a),o}return t.prototype._createSymbol=function(e,i,n,a,o){this.removeAll();var s=$i(e,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=AP,this._symbolType=e,this.add(s)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Nn(this.childAt(0))},t.prototype.downplay=function(){Fn(this.childAt(0))},t.prototype.setZ=function(e,i){var n=this.childAt(0);n.zlevel=e,n.z=i},t.prototype.setDraggable=function(e,i){var n=this.childAt(0);n.draggable=e,n.cursor=!i&&e?"move":n.cursor},t.prototype.updateData=function(e,i,n,a){this.silent=!1;var o=e.getItemVisual(i,"symbol")||"circle",s=e.hostModel,l=t.getSymbolSize(e,i),u=o!==this._symbolType,h=a&&a.disableAnimation;if(u){var c=e.getItemVisual(i,"symbolKeepAspect");this._createSymbol(o,e,i,l,c)}else{var f=this.childAt(0);f.silent=!1;var d={scaleX:l[0]/2,scaleY:l[1]/2};h?f.attr(d):Qr(f,d,s,i),yA(f)}if(this._updateCommon(e,i,l,n,a),u){var f=this.childAt(0);if(!h){var d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:f.style.opacity}};f.scaleX=f.scaleY=0,f.style.opacity=0,Yn(f,d,s,i)}}h&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,i,n,a,o){var s=this.childAt(0),l=e.hostModel,u,h,c,f,d,p,v,g,m;if(a&&(u=a.emphasisItemStyle,h=a.blurItemStyle,c=a.selectItemStyle,f=a.focus,d=a.blurScope,v=a.labelStatesModels,g=a.hoverScale,m=a.cursorStyle,p=a.emphasisDisabled),!a||e.hasItemOption){var _=a&&a.itemModel?a.itemModel:e.getItemModel(i),b=_.getModel("emphasis");u=b.getModel("itemStyle").getItemStyle(),c=_.getModel(["select","itemStyle"]).getItemStyle(),h=_.getModel(["blur","itemStyle"]).getItemStyle(),f=b.get("focus"),d=b.get("blurScope"),p=b.get("disabled"),v=bf(_),g=b.getShallow("scale"),m=_.getShallow("cursor")}var x=e.getItemVisual(i,"symbolRotate");s.attr("rotation",(x||0)*Math.PI/180||0);var C=Ff(e.getItemVisual(i,"symbolOffset"),n);C&&(s.x=C[0],s.y=C[1]),m&&s.attr("cursor",m);var S=e.getItemVisual(i,"style"),T=S.fill;if(s instanceof qe){var M=s.style;s.useStyle(N({image:M.image,x:M.x,y:M.y,width:M.width,height:M.height},S))}else s.__isEmptyBrush?s.useStyle(N({},S)):s.useStyle(S),s.style.decal=null,s.setColor(T,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var D=e.getItemVisual(i,"liftZ"),I=this._z2;D!=null?I==null&&(this._z2=s.z2,s.z2+=D):I!=null&&(s.z2=I,this._z2=null);var P=o&&o.useNameLabel;N0(s,v,{labelFetcher:l,labelDataIndex:i,defaultText:k,inheritColor:T,defaultOpacity:S.opacity});function k(j){return P?e.getName(j):Eb(e,j)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var R=s.ensureState("emphasis");R.style=u,s.ensureState("select").style=c,s.ensureState("blur").style=h;var L=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;R.scaleX=this._sizeX*L,R.scaleY=this._sizeY*L,this.setSymbolScale(1),Kh(this,f,d,p)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,i,n){var a=this.childAt(0),o=_t(this).dataIndex,s=n&&n.animation;if(this.silent=a.silent=!0,n&&n.fadeLabel){var l=a.getTextContent();l&&zs(l,{style:{opacity:0}},i,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();zs(a,{style:{opacity:0},scaleX:0,scaleY:0},i,{dataIndex:o,cb:e,removeOpt:s})},t.getSymbolSize=function(e,i){return O_(e.getItemVisual(i,"symbolSize"))},t})(Bt);function AP(r,t){this.parent.drift(r,t)}function eh(r,t,e,i){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(i.isIgnore&&i.isIgnore(e))&&!(i.clipShape&&!i.clipShape.contain(t[0],t[1]))&&r.getItemVisual(e,"symbol")!=="none"}function Tg(r){return r!=null&&!q(r)&&(r={isIgnore:r}),r||{}}function Ag(r){var t=r.hostModel,e=t.getModel("emphasis");return{emphasisItemStyle:e.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:e.get("focus"),blurScope:e.get("blurScope"),emphasisDisabled:e.get("disabled"),hoverScale:e.get("scale"),labelStatesModels:bf(t),cursorStyle:t.get("cursor")}}var MP=(function(){function r(t){this.group=new Bt,this._SymbolCtor=t||rd}return r.prototype.updateData=function(t,e){this._progressiveEls=null,e=Tg(e);var i=this.group,n=t.hostModel,a=this._data,o=this._SymbolCtor,s=e.disableAnimation,l=Ag(t),u={disableAnimation:s},h=e.getSymbolPoint||function(c){return t.getItemLayout(c)};a||i.removeAll(),t.diff(a).add(function(c){var f=h(c);if(eh(t,f,c,e)){var d=new o(t,c,l,u);d.setPosition(f),t.setItemGraphicEl(c,d),i.add(d)}}).update(function(c,f){var d=a.getItemGraphicEl(f),p=h(c);if(!eh(t,p,c,e)){i.remove(d);return}var v=t.getItemVisual(c,"symbol")||"circle",g=d&&d.getSymbolType&&d.getSymbolType();if(!d||g&&g!==v)i.remove(d),d=new o(t,c,l,u),d.setPosition(p);else{d.updateData(t,c,l,u);var m={x:p[0],y:p[1]};s?d.attr(m):Qr(d,m,n)}i.add(d),t.setItemGraphicEl(c,d)}).remove(function(c){var f=a.getItemGraphicEl(c);f&&f.fadeOut(function(){i.remove(f)},n)}).execute(),this._getSymbolPoint=h,this._data=t},r.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(i,n){var a=t._getSymbolPoint(n);i.setPosition(a),i.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=Ag(t),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e,i){this._progressiveEls=[],i=Tg(i);function n(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=t.start;a<t.end;a++){var o=e.getItemLayout(a);if(eh(e,o,a,i)){var s=new this._SymbolCtor(e,a,this._seriesScope);s.traverse(n),s.setPosition(o),this.group.add(s),e.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},r.prototype.eachRendered=function(t){_f(this._progressiveEls||this.group,t)},r.prototype.remove=function(t){var e=this.group,i=this._data;i&&t?i.eachItemGraphicEl(function(n){n.fadeOut(function(){e.remove(n)},i.hostModel)}):e.removeAll()},r})();function jb(r,t,e){var i=r.getBaseAxis(),n=r.getOtherAxis(i),a=DP(n,e),o=i.dim,s=n.dim,l=t.mapDimension(s),u=t.mapDimension(o),h=s==="x"||s==="radius"?1:0,c=V(r.dimensions,function(p){return t.mapDimension(p)}),f=!1,d=t.getCalculationInfo("stackResultDimension");return Vn(t,c[0])&&(f=!0,c[0]=d),Vn(t,c[1])&&(f=!0,c[1]=d),{dataDimsForPoint:c,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!f,valueDim:l,baseDim:u,baseDataOffset:h,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function DP(r,t){var e=0,i=r.scale.getExtent();return t==="start"?e=i[0]:t==="end"?e=i[1]:At(t)&&!isNaN(t)?e=t:i[0]>0?e=i[0]:i[1]<0&&(e=i[1]),e}function Nb(r,t,e,i){var n=NaN;r.stacked&&(n=e.get(e.getCalculationInfo("stackedOverDimension"),i)),isNaN(n)&&(n=r.valueStart);var a=r.baseDataOffset,o=[];return o[a]=e.get(r.baseDim,i),o[1-a]=n,t.dataToPoint(o)}function IP(r,t){var e=[];return t.diff(r).add(function(i){e.push({cmd:"+",idx:i})}).update(function(i,n){e.push({cmd:"=",idx:n,idx1:i})}).remove(function(i){e.push({cmd:"-",idx:i})}).execute(),e}function PP(r,t,e,i,n,a,o,s){for(var l=IP(r,t),u=[],h=[],c=[],f=[],d=[],p=[],v=[],g=jb(n,t,o),m=r.getLayout("points")||[],_=t.getLayout("points")||[],b=0;b<l.length;b++){var x=l[b],C=!0,S=void 0,T=void 0;switch(x.cmd){case"=":S=x.idx*2,T=x.idx1*2;var M=m[S],D=m[S+1],I=_[T],P=_[T+1];(isNaN(M)||isNaN(D))&&(M=I,D=P),u.push(M,D),h.push(I,P),c.push(e[S],e[S+1]),f.push(i[T],i[T+1]),v.push(t.getRawIndex(x.idx1));break;case"+":var k=x.idx,R=g.dataDimsForPoint,L=n.dataToPoint([t.get(R[0],k),t.get(R[1],k)]);T=k*2,u.push(L[0],L[1]),h.push(_[T],_[T+1]);var j=Nb(g,n,t,k);c.push(j[0],j[1]),f.push(i[T],i[T+1]),v.push(t.getRawIndex(k));break;case"-":C=!1}C&&(d.push(x),p.push(p.length))}p.sort(function(B,Rt){return v[B]-v[Rt]});for(var E=u.length,Z=An(E),G=An(E),Y=An(E),et=An(E),ut=[],b=0;b<p.length;b++){var ot=p[b],ft=b*2,gt=ot*2;Z[ft]=u[gt],Z[ft+1]=u[gt+1],G[ft]=h[gt],G[ft+1]=h[gt+1],Y[ft]=c[gt],Y[ft+1]=c[gt+1],et[ft]=f[gt],et[ft+1]=f[gt+1],ut[b]=d[ot]}return{current:Z,next:G,stackedOnCurrent:Y,stackedOnNext:et,status:ut}}var kr=Math.min,Rr=Math.max;function zi(r,t){return isNaN(r)||isNaN(t)}function _c(r,t,e,i,n,a,o,s,l){for(var u,h,c,f,d,p,v=e,g=0;g<i;g++){var m=t[v*2],_=t[v*2+1];if(v>=n||v<0)break;if(zi(m,_)){if(l){v+=a;continue}break}if(v===e)r[a>0?"moveTo":"lineTo"](m,_),c=m,f=_;else{var b=m-u,x=_-h;if(b*b+x*x<.5){v+=a;continue}if(o>0){for(var C=v+a,S=t[C*2],T=t[C*2+1];S===m&&T===_&&g<i;)g++,C+=a,v+=a,S=t[C*2],T=t[C*2+1],m=t[v*2],_=t[v*2+1],b=m-u,x=_-h;var M=g+1;if(l)for(;zi(S,T)&&M<i;)M++,C+=a,S=t[C*2],T=t[C*2+1];var D=.5,I=0,P=0,k=void 0,R=void 0;if(M>=i||zi(S,T))d=m,p=_;else{I=S-u,P=T-h;var L=m-u,j=S-m,E=_-h,Z=T-_,G=void 0,Y=void 0;if(s==="x"){G=Math.abs(L),Y=Math.abs(j);var et=I>0?1:-1;d=m-et*G*o,p=_,k=m+et*Y*o,R=_}else if(s==="y"){G=Math.abs(E),Y=Math.abs(Z);var ut=P>0?1:-1;d=m,p=_-ut*G*o,k=m,R=_+ut*Y*o}else G=Math.sqrt(L*L+E*E),Y=Math.sqrt(j*j+Z*Z),D=Y/(Y+G),d=m-I*o*(1-D),p=_-P*o*(1-D),k=m+I*o*D,R=_+P*o*D,k=kr(k,Rr(S,m)),R=kr(R,Rr(T,_)),k=Rr(k,kr(S,m)),R=Rr(R,kr(T,_)),I=k-m,P=R-_,d=m-I*G/Y,p=_-P*G/Y,d=kr(d,Rr(u,m)),p=kr(p,Rr(h,_)),d=Rr(d,kr(u,m)),p=Rr(p,kr(h,_)),I=m-d,P=_-p,k=m+I*Y/G,R=_+P*Y/G}r.bezierCurveTo(c,f,d,p,m,_),c=k,f=R}else r.lineTo(m,_)}u=m,h=_,v+=a}return g}var Fb=(function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r})(),kP=(function(r){F(t,r);function t(e){var i=r.call(this,e)||this;return i.type="ec-polyline",i}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Fb},t.prototype.buildPath=function(e,i){var n=i.points,a=0,o=n.length/2;if(i.connectNulls){for(;o>0&&zi(n[o*2-2],n[o*2-1]);o--);for(;a<o&&zi(n[a*2],n[a*2+1]);a++);}for(;a<o;)a+=_c(e,n,a,o,o,1,i.smooth,i.smoothMonotone,i.connectNulls)+1},t.prototype.getPointOn=function(e,i){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n=this.path,a=n.data,o=Jr.CMD,s,l,u=i==="x",h=[],c=0;c<a.length;){var f=a[c++],d=void 0,p=void 0,v=void 0,g=void 0,m=void 0,_=void 0,b=void 0;switch(f){case o.M:s=a[c++],l=a[c++];break;case o.L:if(d=a[c++],p=a[c++],b=u?(e-s)/(d-s):(e-l)/(p-l),b<=1&&b>=0){var x=u?(p-l)*b+l:(d-s)*b+s;return u?[e,x]:[x,e]}s=d,l=p;break;case o.C:d=a[c++],p=a[c++],v=a[c++],g=a[c++],m=a[c++],_=a[c++];var C=u?Ls(s,d,v,m,e,h):Ls(l,p,g,_,e,h);if(C>0)for(var S=0;S<C;S++){var T=h[S];if(T<=1&&T>=0){var x=u?Wt(l,p,g,_,T):Wt(s,d,v,m,T);return u?[e,x]:[x,e]}}s=m,l=_;break}}},t})(bt),RP=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t})(Fb),LP=(function(r){F(t,r);function t(e){var i=r.call(this,e)||this;return i.type="ec-polygon",i}return t.prototype.getDefaultShape=function(){return new RP},t.prototype.buildPath=function(e,i){var n=i.points,a=i.stackedOnPoints,o=0,s=n.length/2,l=i.smoothMonotone;if(i.connectNulls){for(;s>0&&zi(n[s*2-2],n[s*2-1]);s--);for(;o<s&&zi(n[o*2],n[o*2+1]);o++);}for(;o<s;){var u=_c(e,n,o,s,s,1,i.smooth,l,i.connectNulls);_c(e,a,o+u-1,u,s,-1,i.stackedOnSmooth,l,i.connectNulls),o+=u+1,e.closePath()}},t})(bt);function OP(r,t,e,i,n){var a=r.getArea(),o=a.x,s=a.y,l=a.width,u=a.height,h=e.get(["lineStyle","width"])||0;o-=h/2,s-=h/2,l+=h,u+=h,l=Math.ceil(l),o!==Math.floor(o)&&(o=Math.floor(o),l++);var c=new Ft({shape:{x:o,y:s,width:l,height:u}});if(t){var f=r.getBaseAxis(),d=f.isHorizontal(),p=f.inverse;d?(p&&(c.shape.x+=l),c.shape.width=0):(p||(c.shape.y+=u),c.shape.height=0);var v=tt(n)?function(g){n(g,c)}:null;Yn(c,{shape:{width:l,height:u,x:o,y:s}},e,null,i,v)}return c}function EP(r,t,e){var i=r.getArea(),n=Pt(i.r0,1),a=Pt(i.r,1),o=new xo({shape:{cx:Pt(r.cx,1),cy:Pt(r.cy,1),r0:n,r:a,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});if(t){var s=r.getBaseAxis().dim==="angle";s?o.shape.endAngle=i.startAngle:o.shape.r=n,Yn(o,{shape:{endAngle:i.endAngle,r:a}},e)}return o}function jP(r,t){return r.type===t}function Mg(r,t){if(r.length===t.length){for(var e=0;e<r.length;e++)if(r[e]!==t[e])return;return!0}}function Dg(r){for(var t=1/0,e=1/0,i=-1/0,n=-1/0,a=0;a<r.length;){var o=r[a++],s=r[a++];isNaN(o)||(t=Math.min(o,t),i=Math.max(o,i)),isNaN(s)||(e=Math.min(s,e),n=Math.max(s,n))}return[[t,e],[i,n]]}function Ig(r,t){var e=Dg(r),i=e[0],n=e[1],a=Dg(t),o=a[0],s=a[1];return Math.max(Math.abs(i[0]-o[0]),Math.abs(i[1]-o[1]),Math.abs(n[0]-s[0]),Math.abs(n[1]-s[1]))}function Pg(r){return At(r)?r:r?.5:0}function NP(r,t,e){if(!e.valueDim)return[];for(var i=t.count(),n=An(i*2),a=0;a<i;a++){var o=Nb(e,r,t,a);n[a*2]=o[0],n[a*2+1]=o[1]}return n}function Lr(r,t,e,i,n){var a=e.getBaseAxis(),o=a.dim==="x"||a.dim==="radius"?0:1,s=[],l=0,u=[],h=[],c=[],f=[];if(n){for(l=0;l<r.length;l+=2){var d=t||r;!isNaN(d[l])&&!isNaN(d[l+1])&&f.push(r[l],r[l+1])}r=f}for(l=0;l<r.length-2;l+=2)switch(c[0]=r[l+2],c[1]=r[l+3],h[0]=r[l],h[1]=r[l+1],s.push(h[0],h[1]),i){case"end":u[o]=c[o],u[1-o]=h[1-o],s.push(u[0],u[1]);break;case"middle":var p=(h[o]+c[o])/2,v=[];u[o]=v[o]=p,u[1-o]=h[1-o],v[1-o]=c[1-o],s.push(u[0],u[1]),s.push(v[0],v[1]);break;default:u[o]=h[o],u[1-o]=c[1-o],s.push(u[0],u[1])}return s.push(r[l++],r[l++]),s}function FP(r,t){var e=[],i=r.length,n,a;function o(h,c,f){var d=h.coord,p=(f-d)/(c.coord-d),v=Kc(p,[h.color,c.color]);return{coord:f,color:v}}for(var s=0;s<i;s++){var l=r[s],u=l.coord;if(u<0)n=l;else if(u>t){a?e.push(o(a,l,t)):n&&e.push(o(n,l,0),o(n,l,t));break}else n&&(e.push(o(n,l,0)),n=null),e.push(l),a=l}return e}function BP(r,t,e){var i=r.getVisual("visualMeta");if(!(!i||!i.length||!r.count())&&t.type==="cartesian2d"){for(var n,a,o=i.length-1;o>=0;o--){var s=r.getDimensionInfo(i[o].dimension);if(n=s&&s.coordDim,n==="x"||n==="y"){a=i[o];break}}if(a){var l=t.getAxis(n),u=V(a.stops,function(b){return{coord:l.toGlobalCoord(l.dataToCoord(b.value)),color:b.color}}),h=u.length,c=a.outerColors.slice();h&&u[0].coord>u[h-1].coord&&(u.reverse(),c.reverse());var f=FP(u,n==="x"?e.getWidth():e.getHeight()),d=f.length;if(!d&&h)return u[0].coord<0?c[1]?c[1]:u[h-1].color:c[0]?c[0]:u[0].color;var p=10,v=f[0].coord-p,g=f[d-1].coord+p,m=g-v;if(m<.001)return"transparent";A(f,function(b){b.offset=(b.coord-v)/m}),f.push({offset:d?f[d-1].offset:.5,color:c[1]||"transparent"}),f.unshift({offset:d?f[0].offset:.5,color:c[0]||"transparent"});var _=new pf(0,0,0,0,f,!0);return _[n]=v,_[n+"2"]=g,_}}}function zP(r,t,e){var i=r.get("showAllSymbol"),n=i==="auto";if(!(i&&!n)){var a=e.getAxesByScale("ordinal")[0];if(a&&!(n&&VP(a,t))){var o=t.mapDimension(a.dim),s={};return A(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function VP(r,t){var e=r.getExtent(),i=Math.abs(e[1]-e[0])/r.scale.count();isNaN(i)&&(i=0);for(var n=t.count(),a=Math.max(1,Math.round(n/5)),o=0;o<n;o+=a)if(rd.getSymbolSize(t,o)[r.isHorizontal()?1:0]*1.5>i)return!1;return!0}function HP(r,t){return isNaN(r)||isNaN(t)}function WP(r){for(var t=r.length/2;t>0&&HP(r[t*2-2],r[t*2-1]);t--);return t-1}function kg(r,t){return[r[t*2],r[t*2+1]]}function GP(r,t,e){for(var i=r.length/2,n=e==="x"?0:1,a,o,s=0,l=-1,u=0;u<i;u++)if(o=r[u*2+n],!(isNaN(o)||isNaN(r[u*2+1-n]))){if(u===0){a=o;continue}if(a<=t&&o>=t||a>=t&&o<=t){l=u;break}s=u,a=o}return{range:[s,l],t:(t-a)/(o-a)}}function Bb(r){if(r.get(["endLabel","show"]))return!0;for(var t=0;t<hr.length;t++)if(r.get([hr[t],"endLabel","show"]))return!0;return!1}function rh(r,t,e,i){if(jP(t,"cartesian2d")){var n=i.getModel("endLabel"),a=n.get("valueAnimation"),o=i.getData(),s={lastFrameIndex:0},l=Bb(i)?function(d,p){r._endLabelOnDuring(d,p,o,s,a,n,t)}:null,u=t.getBaseAxis().isHorizontal(),h=OP(t,e,i,function(){var d=r._endLabel;d&&e&&s.originalX!=null&&d.attr({x:s.originalX,y:s.originalY})},l);if(!i.get("clip",!0)){var c=h.shape,f=Math.max(c.width,c.height);u?(c.y-=f,c.height+=f*2):(c.x-=f,c.width+=f*2)}return l&&l(1,h),h}else return EP(t,e,i)}function $P(r,t){var e=t.getBaseAxis(),i=e.isHorizontal(),n=e.inverse,a=i?n?"right":"left":"center",o=i?"middle":n?"top":"bottom";return{normal:{align:r.get("align")||a,verticalAlign:r.get("verticalAlign")||o}}}var UP=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(){var e=new Bt,i=new MP;this.group.add(i.group),this._symbolDraw=i,this._lineGroup=e,this._changePolyState=ct(this._changePolyState,this)},t.prototype.render=function(e,i,n){var a=e.coordinateSystem,o=this.group,s=e.getData(),l=e.getModel("lineStyle"),u=e.getModel("areaStyle"),h=s.getLayout("points")||[],c=a.type==="polar",f=this._coordSys,d=this._symbolDraw,p=this._polyline,v=this._polygon,g=this._lineGroup,m=!i.ssr&&e.get("animation"),_=!u.isEmpty(),b=u.get("origin"),x=jb(a,s,b),C=_&&NP(a,s,x),S=e.get("showSymbol"),T=e.get("connectNulls"),M=S&&!c&&zP(e,s,a),D=this._data;D&&D.eachItemGraphicEl(function(B,Rt){B.__temp&&(o.remove(B),D.setItemGraphicEl(Rt,null))}),S||d.remove(),o.add(g);var I=c?!1:e.get("step"),P;a&&a.getArea&&e.get("clip",!0)&&(P=a.getArea(),P.width!=null?(P.x-=.1,P.y-=.1,P.width+=.2,P.height+=.2):P.r0&&(P.r0-=.5,P.r+=.5)),this._clipShapeForSymbol=P;var k=BP(s,a,n)||s.getVisual("style")[s.getVisual("drawType")];if(!(p&&f.type===a.type&&I===this._step))S&&d.updateData(s,{isIgnore:M,clipShape:P,disableAnimation:!0,getSymbolPoint:function(B){return[h[B*2],h[B*2+1]]}}),m&&this._initSymbolLabelAnimation(s,a,P),I&&(C&&(C=Lr(C,h,a,I,T)),h=Lr(h,null,a,I,T)),p=this._newPolyline(h),_?v=this._newPolygon(h,C):v&&(g.remove(v),v=this._polygon=null),c||this._initOrUpdateEndLabel(e,a,Gi(k)),g.setClipPath(rh(this,a,!0,e));else{_&&!v?v=this._newPolygon(h,C):v&&!_&&(g.remove(v),v=this._polygon=null),c||this._initOrUpdateEndLabel(e,a,Gi(k));var R=g.getClipPath();if(R){var L=rh(this,a,!1,e);Yn(R,{shape:L.shape},e)}else g.setClipPath(rh(this,a,!0,e));S&&d.updateData(s,{isIgnore:M,clipShape:P,disableAnimation:!0,getSymbolPoint:function(B){return[h[B*2],h[B*2+1]]}}),(!Mg(this._stackedOnPoints,C)||!Mg(this._points,h))&&(m?this._doUpdateAnimation(s,C,a,n,I,b,T):(I&&(C&&(C=Lr(C,h,a,I,T)),h=Lr(h,null,a,I,T)),p.setShape({points:h}),v&&v.setShape({points:h,stackedOnPoints:C})))}var j=e.getModel("emphasis"),E=j.get("focus"),Z=j.get("blurScope"),G=j.get("disabled");if(p.useStyle(lt(l.getLineStyle(),{fill:"none",stroke:k,lineJoin:"bevel"})),Np(p,e,"lineStyle"),p.style.lineWidth>0&&e.get(["emphasis","lineStyle","width"])==="bolder"){var Y=p.getState("emphasis").style;Y.lineWidth=+p.style.lineWidth+1}_t(p).seriesIndex=e.seriesIndex,Kh(p,E,Z,G);var et=Pg(e.get("smooth")),ut=e.get("smoothMonotone");if(p.setShape({smooth:et,smoothMonotone:ut,connectNulls:T}),v){var ot=s.getCalculationInfo("stackedOnSeries"),ft=0;v.useStyle(lt(u.getAreaStyle(),{fill:k,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),ot&&(ft=Pg(ot.get("smooth"))),v.setShape({smooth:et,stackedOnSmooth:ft,smoothMonotone:ut,connectNulls:T}),Np(v,e,"areaStyle"),_t(v).seriesIndex=e.seriesIndex,Kh(v,E,Z,G)}var gt=this._changePolyState;s.eachItemGraphicEl(function(B){B&&(B.onHoverStateChange=gt)}),this._polyline.onHoverStateChange=gt,this._data=s,this._coordSys=a,this._stackedOnPoints=C,this._points=h,this._step=I,this._valueOrigin=b,e.get("triggerLineEvent")&&(this.packEventData(e,p),v&&this.packEventData(e,v))},t.prototype.packEventData=function(e,i){_t(i).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,i,n,a){var o=e.getData(),s=Wi(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var h=l[s*2],c=l[s*2+1];if(isNaN(h)||isNaN(c)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(h,c))return;var f=e.get("zlevel")||0,d=e.get("z")||0;u=new rd(o,s),u.x=h,u.y=c,u.setZ(f,d);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=f,p.z=d,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else _e.prototype.highlight.call(this,e,i,n,a)},t.prototype.downplay=function(e,i,n,a){var o=e.getData(),s=Wi(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else _e.prototype.downplay.call(this,e,i,n,a)},t.prototype._changePolyState=function(e){var i=this._polygon;Rp(this._polyline,e),i&&Rp(i,e)},t.prototype._newPolyline=function(e){var i=this._polyline;return i&&this._lineGroup.remove(i),i=new kP({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(i),this._polyline=i,i},t.prototype._newPolygon=function(e,i){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new LP({shape:{points:e,stackedOnPoints:i},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,i,n){var a,o,s=i.getBaseAxis(),l=s.inverse;i.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):i.type==="polar"&&(a=s.dim==="angle",o=!0);var u=e.hostModel,h=u.get("animationDuration");tt(h)&&(h=h(null));var c=u.get("animationDelay")||0,f=tt(c)?c(null):c;e.eachItemGraphicEl(function(d,p){var v=d;if(v){var g=[d.x,d.y],m=void 0,_=void 0,b=void 0;if(n)if(o){var x=n,C=i.pointToCoord(g);a?(m=x.startAngle,_=x.endAngle,b=-C[1]/180*Math.PI):(m=x.r0,_=x.r,b=C[0])}else{var S=n;a?(m=S.x,_=S.x+S.width,b=d.x):(m=S.y+S.height,_=S.y,b=d.y)}var T=_===m?0:(b-m)/(_-m);l&&(T=1-T);var M=tt(c)?c(p):h*T+f,D=v.getSymbolPath(),I=D.getTextContent();v.attr({scaleX:0,scaleY:0}),v.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:M}),I&&I.animateFrom({style:{opacity:0}},{duration:300,delay:M}),D.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,i,n){var a=e.getModel("endLabel");if(Bb(e)){var o=e.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 Vt({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var h=WP(l);h>=0&&(N0(s,bf(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:h,defaultText:function(c,f,d){return d!=null?TP(o,d):Eb(o,c)},enableTextSetter:!0},$P(a,i)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,i,n,a,o,s,l){var u=this._endLabel,h=this._polyline;if(u){e<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var c=n.getLayout("points"),f=n.hostModel,d=f.get("connectNulls"),p=s.get("precision"),v=s.get("distance")||0,g=l.getBaseAxis(),m=g.isHorizontal(),_=g.inverse,b=i.shape,x=_?m?b.x:b.y+b.height:m?b.x+b.width:b.y,C=(m?v:0)*(_?-1:1),S=(m?0:-v)*(_?-1:1),T=m?"x":"y",M=GP(c,x,T),D=M.range,I=D[1]-D[0],P=void 0;if(I>=1){if(I>1&&!d){var k=kg(c,D[0]);u.attr({x:k[0]+C,y:k[1]+S}),o&&(P=f.getRawValue(D[0]))}else{var k=h.getPointOn(x,T);k&&u.attr({x:k[0]+C,y:k[1]+S});var R=f.getRawValue(D[0]),L=f.getRawValue(D[1]);o&&(P=AC(n,p,R,L,M.t))}a.lastFrameIndex=D[0]}else{var j=e===1||a.lastFrameIndex>0?D[0]:0,k=kg(c,j);o&&(P=f.getRawValue(j)),u.attr({x:k[0]+C,y:k[1]+S})}if(o){var E=B0(u);typeof E.setLabelText=="function"&&E.setLabelText(P)}}},t.prototype._doUpdateAnimation=function(e,i,n,a,o,s,l){var u=this._polyline,h=this._polygon,c=e.hostModel,f=PP(this._data,e,this._stackedOnPoints,i,this._coordSys,n,this._valueOrigin),d=f.current,p=f.stackedOnCurrent,v=f.next,g=f.stackedOnNext;if(o&&(p=Lr(f.stackedOnCurrent,f.current,n,o,l),d=Lr(f.current,null,n,o,l),g=Lr(f.stackedOnNext,f.next,n,o,l),v=Lr(f.next,null,n,o,l)),Ig(d,v)>3e3||h&&Ig(p,g)>3e3){u.stopAnimation(),u.setShape({points:v}),h&&(h.stopAnimation(),h.setShape({points:v,stackedOnPoints:g}));return}u.shape.__points=f.current,u.shape.points=d;var m={shape:{points:v}};f.current!==d&&(m.shape.__points=f.next),u.stopAnimation(),Qr(u,m,c),h&&(h.setShape({points:d,stackedOnPoints:p}),h.stopAnimation(),Qr(h,{shape:{stackedOnPoints:g}},c),u.shape.points!==h.shape.points&&(h.shape.points=u.shape.points));for(var _=[],b=f.status,x=0;x<b.length;x++){var C=b[x].cmd;if(C==="="){var S=e.getItemGraphicEl(b[x].idx1);S&&_.push({el:S,ptIdx:x})}}u.animators&&u.animators.length&&u.animators[0].during(function(){h&&h.dirtyShape();for(var T=u.shape.__points,M=0;M<_.length;M++){var D=_[M].el,I=_[M].ptIdx*2;D.x=T[I],D.y=T[I+1],D.markRedraw()}})},t.prototype.remove=function(e){var i=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl(function(a,o){a.__temp&&(i.remove(a),n.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t})(_e);function YP(r,t){return{seriesType:r,plan:C_(),reset:function(e){var i=e.getData(),n=e.coordinateSystem;if(e.pipelineContext,!!n){var a=V(n.dimensions,function(c){return i.mapDimension(c)}).slice(0,2),o=a.length,s=i.getCalculationInfo("stackResultDimension");Vn(i,a[0])&&(a[0]=s),Vn(i,a[1])&&(a[1]=s);var l=i.getStore(),u=i.getDimensionIndex(a[0]),h=i.getDimensionIndex(a[1]);return o&&{progress:function(c,f){for(var d=c.end-c.start,p=An(d*o),v=[],g=[],m=c.start,_=0;m<c.end;m++){var b=void 0;if(o===1){var x=l.get(u,m);b=n.dataToPoint(x,null,g)}else v[0]=l.get(u,m),v[1]=l.get(h,m),b=n.dataToPoint(v,null,g);p[_++]=b[0],p[_++]=b[1]}f.setLayout("points",p)}}}}}}var XP={average:function(r){for(var t=0,e=0,i=0;i<r.length;i++)isNaN(r[i])||(t+=r[i],e++);return e===0?NaN:t/e},sum:function(r){for(var t=0,e=0;e<r.length;e++)t+=r[e]||0;return t},max:function(r){for(var t=-1/0,e=0;e<r.length;e++)r[e]>t&&(t=r[e]);return isFinite(t)?t:NaN},min:function(r){for(var t=1/0,e=0;e<r.length;e++)r[e]<t&&(t=r[e]);return isFinite(t)?t:NaN},nearest:function(r){return r[0]}},ZP=function(r){return Math.round(r.length/2)};function qP(r){return{seriesType:r,reset:function(t,e,i){var n=t.getData(),a=t.get("sampling"),o=t.coordinateSystem,s=n.count();if(s>10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),h=l.getExtent(),c=i.getDevicePixelRatio(),f=Math.abs(h[1]-h[0])*(c||1),d=Math.round(s/f);if(isFinite(d)&&d>1){a==="lttb"?t.setData(n.lttbDownSample(n.mapDimension(u.dim),1/d)):a==="minmax"&&t.setData(n.minmaxDownSample(n.mapDimension(u.dim),1/d));var p=void 0;U(a)?p=XP[a]:tt(a)&&(p=a),p&&t.setData(n.downSample(n.mapDimension(u.dim),1/d,p,ZP))}}}}}function KP(r){r.registerChartView(UP),r.registerSeriesModel(CP),r.registerLayout(YP("line")),r.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),i=t.getModel("lineStyle").getLineStyle();i&&!i.stroke&&(i.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",i)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,qP("line"))}var JP=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},t})(dt),bc=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",re).models[0]},t.type="cartesian2dAxis",t})(dt);xe(bc,Tb);var zb={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:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},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},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},QP=st({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},zb),id=st({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},zb),tk=st({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},id),ek=lt({logBase:10},id);const rk={category:QP,value:id,time:tk,log:ek};var ik={value:1,category:1,time:1,log:1};function Rg(r,t,e,i){A(ik,function(n,a){var o=st(st({},rk[a],!0),i,!0),s=(function(l){F(u,l);function u(){var h=l!==null&&l.apply(this,arguments)||this;return h.type=t+"Axis."+a,h}return u.prototype.mergeDefaultAndTheme=function(h,c){var f=eo(this),d=f?kf(h):{},p=c.getTheme();st(h,p.get(a+"Axis")),st(h,this.getDefaultOption()),h.type=Lg(h),f&&ro(h,d,f)},u.prototype.optionUpdated=function(){var h=this.option;h.type==="category"&&(this.__ordinalMeta=gc.createByAxisModel(this))},u.prototype.getCategories=function(h){var c=this.option;if(c.type==="category")return h?c.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=t+"Axis."+a,u.defaultOption=o,u})(e);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(t+"Axis",Lg)}function Lg(r){return r.type||(r.data?"category":"value")}var nk=(function(){function r(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return r.prototype.getAxis=function(t){return this._axes[t]},r.prototype.getAxes=function(){return V(this._dimList,function(t){return this._axes[t]},this)},r.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),It(this.getAxes(),function(e){return e.scale.type===t})},r.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},r})(),xc=["x","y"];function Og(r){return r.type==="interval"||r.type==="time"}var ak=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=xc,e}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,i=this.getAxis("y").scale;if(!(!Og(e)||!Og(i))){var n=e.getExtent(),a=i.getExtent(),o=this.dataToPoint([n[0],a[0]]),s=this.dataToPoint([n[1],a[1]]),l=n[1]-n[0],u=a[1]-a[0];if(!(!l||!u)){var h=(s[0]-o[0])/l,c=(s[1]-o[1])/u,f=o[0]-n[0]*h,d=o[1]-a[0]*c,p=this._transform=[h,0,0,c,f,d];this._invTransform=go([],p)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var i=this.getAxis("x"),n=this.getAxis("y");return i.contain(i.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,i){var n=this.dataToPoint(e),a=this.dataToPoint(i),o=this.getArea(),s=new mt(n[0],n[1],a[0]-n[0],a[1]-n[1]);return o.intersect(s)},t.prototype.dataToPoint=function(e,i,n){n=n||[];var a=e[0],o=e[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return ie(n,e,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return n[0]=s.toGlobalCoord(s.dataToCoord(a,i)),n[1]=l.toGlobalCoord(l.dataToCoord(o,i)),n},t.prototype.clampData=function(e,i){var n=this.getAxis("x").scale,a=this.getAxis("y").scale,o=n.getExtent(),s=a.getExtent(),l=n.parse(e[0]),u=a.parse(e[1]);return i=i||[],i[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),i[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),i},t.prototype.pointToData=function(e,i){var n=[];if(this._invTransform)return ie(n,e,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return n[0]=a.coordToData(a.toLocalCoord(e[0]),i),n[1]=o.coordToData(o.toLocalCoord(e[1]),i),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim==="x"?"y":"x")},t.prototype.getArea=function(e){e=e||0;var i=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),a=Math.min(i[0],i[1])-e,o=Math.min(n[0],n[1])-e,s=Math.max(i[0],i[1])-a+e,l=Math.max(n[0],n[1])-o+e;return new mt(a,o,s,l)},t})(nk),ok=(function(r){F(t,r);function t(e,i,n,a,o){var s=r.call(this,e,i,n)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var e=this.position;return e==="top"||e==="bottom"},t.prototype.getGlobalExtent=function(e){var i=this.getExtent();return i[0]=this.toGlobalCoord(i[0]),i[1]=this.toGlobalCoord(i[1]),e&&i[0]>i[1]&&i.reverse(),i},t.prototype.pointToData=function(e,i){return this.coordToData(this.toLocalCoord(e[this.dim==="x"?0:1]),i)},t.prototype.setCategorySortInfo=function(e){if(this.type!=="category")return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t})(ed);function wc(r,t,e){e=e||{};var i=r.coordinateSystem,n=t.axis,a={},o=n.getAxesOnZeroOf()[0],s=n.position,l=o?"onZero":s,u=n.dim,h=i.getRect(),c=[h.x,h.x+h.width,h.y,h.y+h.height],f={left:0,right:1,top:0,bottom:1,onZero:2},d=t.get("offset")||0,p=u==="x"?[c[2]-d,c[3]+d]:[c[0]-d,c[1]+d];if(o){var v=o.toGlobalCoord(o.dataToCoord(0));p[f.onZero]=Math.max(Math.min(v,p[1]),p[0])}a.position=[u==="y"?p[f[l]]:c[0],u==="x"?p[f[l]]:c[3]],a.rotation=Math.PI/2*(u==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=g[s],a.labelOffset=o?p[f[s]]-p[f.onZero]:0,t.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),En(e.labelInside,t.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var m=t.get(["axisLabel","rotate"]);return a.labelRotate=l==="top"?-m:m,a.z2=1,a}function Eg(r){return r.get("coordinateSystem")==="cartesian2d"}function jg(r){var t={xAxisModel:null,yAxisModel:null};return A(t,function(e,i){var n=i.replace(/Model$/,""),a=r.getReferringComponents(n,re).models[0];t[i]=a}),t}var ih=Math.log;function sk(r,t,e){var i=Ji.prototype,n=i.getTicks.call(e),a=i.getTicks.call(e,!0),o=n.length-1,s=i.getInterval.call(e),l=xb(r,t),u=l.extent,h=l.fixMin,c=l.fixMax;if(r.type==="log"){var f=ih(r.base);u=[ih(u[0])/f,ih(u[1])/f]}r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:h,fixMax:c});var d=i.getExtent.call(r);h&&(u[0]=d[0]),c&&(u[1]=d[1]);var p=i.getInterval.call(r),v=u[0],g=u[1];if(h&&c)p=(g-v)/o;else if(h)for(g=u[0]+p*o;g<u[1]&&isFinite(g)&&isFinite(u[1]);)p=Ju(p),g=u[0]+p*o;else if(c)for(v=u[1]-p*o;v>u[0]&&isFinite(v)&&isFinite(u[0]);)p=Ju(p),v=u[1]-p*o;else{var m=r.getTicks().length-1;m>o&&(p=Ju(p));var _=p*o;g=Math.ceil(u[1]/p)*p,v=Pt(g-_),v<0&&u[0]>=0?(v=0,g=Pt(_)):g>0&&u[1]<=0&&(g=0,v=-Pt(_))}var b=(n[0].value-a[0].value)/s,x=(n[o].value-a[o].value)/s;i.setExtent.call(r,v+p*b,g+p*x),i.setInterval.call(r,p),(b||x)&&i.setNiceExtent.call(r,v+p,g-p)}var lk=(function(){function r(t,e,i){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=xc,this._initCartesian(t,e,i),this.model=t}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model);function n(o){var s,l=vt(o),u=l.length;if(u){for(var h=[],c=u-1;c>=0;c--){var f=+l[c],d=o[f],p=d.model,v=d.scale;mc(v)&&p.get("alignTicks")&&p.get("interval")==null?h.push(d):(yc(v,p),mc(v)&&(s=d))}h.length&&(s||(s=h.pop(),yc(s.scale,s.model)),A(h,function(g){sk(g.scale,g.model,s.scale)}))}}n(i.x),n(i.y);var a={};A(i.x,function(o){Ng(i,"y",o,a)}),A(i.y,function(o){Ng(i,"x",o,a)}),this.resize(this.model,e)},r.prototype.resize=function(t,e,i){var n=t.getBoxLayoutParams(),a=!i&&t.get("containLabel"),o=Ki(n,{width:e.getWidth(),height:e.getHeight()});this._rect=o;var s=this._axesList;l(),a&&(A(s,function(u){if(!u.model.get(["axisLabel","inside"])){var h=H2(u);if(h){var c=u.isHorizontal()?"height":"width",f=u.model.get(["axisLabel","margin"]);o[c]-=h[c]+f,u.position==="top"?o.y+=h.height+f:u.position==="left"&&(o.x+=h.width+f)}}}),l()),A(this._coordsList,function(u){u.calcAffineTransform()});function l(){A(s,function(u){var h=u.isHorizontal(),c=h?[0,o.width]:[0,o.height],f=u.inverse?1:0;u.setExtent(c[f],c[1-f]),uk(u,h?o.x:o.y)})}},r.prototype.getAxis=function(t,e){var i=this._axesMap[t];if(i!=null)return i[e||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(t,e){if(t!=null&&e!=null){var i="x"+t+"y"+e;return this._coordsMap[i]}q(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,a=this._coordsList;n<a.length;n++)if(a[n].getAxis("x").index===t||a[n].getAxis("y").index===e)return a[n]},r.prototype.getCartesians=function(){return this._coordsList.slice()},r.prototype.convertToPixel=function(t,e,i){var n=this._findConvertTarget(e);return n.cartesian?n.cartesian.dataToPoint(i):n.axis?n.axis.toGlobalCoord(n.axis.dataToCoord(i)):null},r.prototype.convertFromPixel=function(t,e,i){var n=this._findConvertTarget(e);return n.cartesian?n.cartesian.pointToData(i):n.axis?n.axis.coordToData(n.axis.toLocalCoord(i)):null},r.prototype._findConvertTarget=function(t){var e=t.seriesModel,i=t.xAxisModel||e&&e.getReferringComponents("xAxis",re).models[0],n=t.yAxisModel||e&&e.getReferringComponents("yAxis",re).models[0],a=t.gridModel,o=this._coordsList,s,l;if(e)s=e.coordinateSystem,pt(o,s)<0&&(s=null);else if(i&&n)s=this.getCartesian(i.componentIndex,n.componentIndex);else if(i)l=this.getAxis("x",i.componentIndex);else if(n)l=this.getAxis("y",n.componentIndex);else if(a){var u=a.coordinateSystem;u===this&&(s=this._coordsList[0])}return{cartesian:s,axis:l}},r.prototype.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},r.prototype._initCartesian=function(t,e,i){var n=this,a=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},l={x:0,y:0};if(e.eachComponent("xAxis",u("x"),this),e.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,A(s.x,function(h,c){A(s.y,function(f,d){var p="x"+c+"y"+d,v=new ak(p);v.master=n,v.model=t,n._coordsMap[p]=v,n._coordsList.push(v),v.addAxis(h),v.addAxis(f)})});function u(h){return function(c,f){if(nh(c,t)){var d=c.get("position");h==="x"?d!=="top"&&d!=="bottom"&&(d=o.bottom?"top":"bottom"):d!=="left"&&d!=="right"&&(d=o.left?"right":"left"),o[d]=!0;var p=new ok(h,wb(c),[0,0],c.get("type"),d),v=p.type==="category";p.onBand=v&&c.get("boundaryGap"),p.inverse=c.get("inverse"),c.axis=p,p.model=c,p.grid=a,p.index=f,a._axesList.push(p),s[h][f]=p,l[h]++}}}},r.prototype._updateScale=function(t,e){A(this._axesList,function(n){if(n.scale.setExtent(1/0,-1/0),n.type==="category"){var a=n.model.get("categorySortInfo");n.scale.setSortInfo(a)}}),t.eachSeries(function(n){if(Eg(n)){var a=jg(n),o=a.xAxisModel,s=a.yAxisModel;if(!nh(o,e)||!nh(s,e))return;var l=this.getCartesian(o.componentIndex,s.componentIndex),u=n.getData(),h=l.getAxis("x"),c=l.getAxis("y");i(u,h),i(u,c)}},this);function i(n,a){A(Cb(n,a.dim),function(o){a.scale.unionExtentFromData(n,o)})}},r.prototype.getTooltipAxes=function(t){var e=[],i=[];return A(this.getCartesians(),function(n){var a=t!=null&&t!=="auto"?n.getAxis(t):n.getBaseAxis(),o=n.getOtherAxis(a);pt(e,a)<0&&e.push(a),pt(i,o)<0&&i.push(o)}),{baseAxes:e,otherAxes:i}},r.create=function(t,e){var i=[];return t.eachComponent("grid",function(n,a){var o=new r(n,t,e);o.name="grid_"+a,o.resize(n,e,!0),n.coordinateSystem=o,i.push(o)}),t.eachSeries(function(n){if(Eg(n)){var a=jg(n),o=a.xAxisModel,s=a.yAxisModel,l=o.getCoordSysModel(),u=l.coordinateSystem;n.coordinateSystem=u.getCartesian(o.componentIndex,s.componentIndex)}}),i},r.dimensions=xc,r})();function nh(r,t){return r.getCoordSysModel()===t}function Ng(r,t,e,i){e.getAxesOnZeroOf=function(){return a?[a]:[]};var n=r[t],a,o=e.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)Fg(n[l])&&(a=n[l]);else for(var u in n)if(n.hasOwnProperty(u)&&Fg(n[u])&&!i[h(n[u])]){a=n[u];break}a&&(i[h(a)]=!0);function h(c){return c.dim+"_"+c.index}}function Fg(r){return r&&r.type!=="category"&&r.type!=="time"&&V2(r)}function uk(r,t){var e=r.getExtent(),i=e[0]+e[1];r.toGlobalCoord=r.dim==="x"?function(n){return n+t}:function(n){return i-n+t},r.toLocalCoord=r.dim==="x"?function(n){return n-t}:function(n){return i-n+t}}var Hr=Math.PI,Xr=(function(){function r(t,e){this.group=new Bt,this.opt=e,this.axisModel=t,lt(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var i=new Bt({x:e.position[0],y:e.position[1],rotation:e.rotation});i.updateTransform(),this._transformGroup=i}return r.prototype.hasBuilder=function(t){return!!Bg[t]},r.prototype.add=function(t){Bg[t](this.opt,this.axisModel,this.group,this._transformGroup)},r.prototype.getGroup=function(){return this.group},r.innerTextLayout=function(t,e,i){var n=nf(e-t),a,o;return Xa(n)?(o=i>0?"top":"bottom",a="center"):Xa(n-Hr)?(o=i>0?"bottom":"top",a="center"):(o="middle",n>0&&n<Hr?a=i>0?"right":"left":a=i>0?"left":"right"),{rotation:n,textAlign:a,textVerticalAlign:o}},r.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},r.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},r})(),Bg={axisLine:function(r,t,e,i){var n=t.get(["axisLine","show"]);if(n==="auto"&&r.handleAutoShown&&(n=r.handleAutoShown("axisLine")),!!n){var a=t.axis.getExtent(),o=i.transform,s=[a[0],0],l=[a[1],0],u=s[0]>l[0];o&&(ie(s,s,o),ie(l,l,o));var h=N({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),c=new Xe({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:h,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});Qa(c.shape,c.style.lineWidth),c.anid="line",e.add(c);var f=t.get(["axisLine","symbol"]);if(f!=null){var d=t.get(["axisLine","symbolSize"]);U(f)&&(f=[f,f]),(U(d)||At(d))&&(d=[d,d]);var p=Ff(t.get(["axisLine","symbolOffset"])||0,d),v=d[0],g=d[1];A([{rotate:r.rotation+Math.PI/2,offset:p[0],r:0},{rotate:r.rotation-Math.PI/2,offset:p[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(m,_){if(f[_]!=="none"&&f[_]!=null){var b=$i(f[_],-v/2,-g/2,v,g,h.stroke,!0),x=m.r+m.offset,C=u?l:s;b.attr({rotation:m.rotate,x:C[0]+x*Math.cos(r.rotation),y:C[1]-x*Math.sin(r.rotation),silent:!0,z2:11}),e.add(b)}})}}},axisTickLabel:function(r,t,e,i){var n=fk(e,i,t,r),a=pk(e,i,t,r);if(ck(t,a,n),dk(e,i,t,r.tickDirection),t.get(["axisLabel","hideOverlap"])){var o=xP(V(a,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));wP(o)}},axisName:function(r,t,e,i){var n=En(r.axisName,t.get("name"));if(n){var a=t.get("nameLocation"),o=r.nameDirection,s=t.getModel("nameTextStyle"),l=t.get("nameGap")||0,u=t.axis.getExtent(),h=u[0]>u[1]?-1:1,c=[a==="start"?u[0]-h*l:a==="end"?u[1]+h*l:(u[0]+u[1])/2,Vg(a)?r.labelOffset+o*l:0],f,d=t.get("nameRotate");d!=null&&(d=d*Hr/180);var p;Vg(a)?f=Xr.innerTextLayout(r.rotation,d??r.rotation,o):(f=hk(r.rotation,a,d||0,u),p=r.axisNameAvailableWidth,p!=null&&(p=Math.abs(p/Math.sin(f.rotation)),!isFinite(p)&&(p=null)));var v=s.getFont(),g=t.get("nameTruncate",!0)||{},m=g.ellipsis,_=En(r.nameTruncateMaxWidth,g.maxWidth,p),b=new Vt({x:c[0],y:c[1],rotation:f.rotation,silent:Xr.isLabelSilent(t),style:Ye(s,{text:n,font:v,overflow:"truncate",width:_,ellipsis:m,fill:s.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:s.get("align")||f.textAlign,verticalAlign:s.get("verticalAlign")||f.textVerticalAlign}),z2:1});if(Ml({el:b,componentModel:t,itemName:n}),b.__fullText=n,b.anid="name",t.get("triggerEvent")){var x=Xr.makeAxisEventDataBase(t);x.targetType="axisName",x.name=n,_t(b).eventData=x}i.add(b),b.updateTransform(),e.add(b),b.decomposeTransform()}}};function hk(r,t,e,i){var n=nf(e-r),a,o,s=i[0]>i[1],l=t==="start"&&!s||t!=="start"&&s;return Xa(n-Hr/2)?(o=l?"bottom":"top",a="center"):Xa(n-Hr*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",n<Hr*1.5&&n>Hr/2?a=l?"left":"right":a=l?"right":"left"),{rotation:n,textAlign:a,textVerticalAlign:o}}function ck(r,t,e){if(!Sb(r.axis)){var i=r.get(["axisLabel","showMinLabel"]),n=r.get(["axisLabel","showMaxLabel"]);t=t||[],e=e||[];var a=t[0],o=t[1],s=t[t.length-1],l=t[t.length-2],u=e[0],h=e[1],c=e[e.length-1],f=e[e.length-2];i===!1?(Ce(a),Ce(u)):zg(a,o)&&(i?(Ce(o),Ce(h)):(Ce(a),Ce(u))),n===!1?(Ce(s),Ce(c)):zg(l,s)&&(n?(Ce(l),Ce(f)):(Ce(s),Ce(c)))}}function Ce(r){r&&(r.ignore=!0)}function zg(r,t){var e=r&&r.getBoundingRect().clone(),i=t&&t.getBoundingRect().clone();if(!(!e||!i)){var n=po([]);return vo(n,n,-r.rotation),e.applyTransform($r([],n,r.getLocalTransform())),i.applyTransform($r([],n,t.getLocalTransform())),e.intersect(i)}}function Vg(r){return r==="middle"||r==="center"}function Vb(r,t,e,i,n){for(var a=[],o=[],s=[],l=0;l<r.length;l++){var u=r[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=e,t&&(ie(o,o,t),ie(s,s,t));var h=new Xe({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:i,z2:2,autoBatch:!0,silent:!0});Qa(h.shape,h.style.lineWidth),h.anid=n+"_"+r[l].tickValue,a.push(h)}return a}function fk(r,t,e,i){var n=e.axis,a=e.getModel("axisTick"),o=a.get("show");if(o==="auto"&&i.handleAutoShown&&(o=i.handleAutoShown("axisTick")),!(!o||n.scale.isBlank())){for(var s=a.getModel("lineStyle"),l=i.tickDirection*a.get("length"),u=n.getTicksCoords(),h=Vb(u,t.transform,l,lt(s.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;c<h.length;c++)r.add(h[c]);return h}}function dk(r,t,e,i){var n=e.axis,a=e.getModel("minorTick");if(!(!a.get("show")||n.scale.isBlank())){var o=n.getMinorTicksCoords();if(o.length)for(var s=a.getModel("lineStyle"),l=i*a.get("length"),u=lt(s.getLineStyle(),lt(e.getModel("axisTick").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})),h=0;h<o.length;h++)for(var c=Vb(o[h],t.transform,l,u,"minorticks_"+h),f=0;f<c.length;f++)r.add(c[f])}}function pk(r,t,e,i){var n=e.axis,a=En(i.axisLabelShow,e.get(["axisLabel","show"]));if(!(!a||n.scale.isBlank())){var o=e.getModel("axisLabel"),s=o.get("margin"),l=n.getViewLabels(),u=(En(i.labelRotate,o.get("rotate"))||0)*Hr/180,h=Xr.innerTextLayout(i.rotation,u,i.labelDirection),c=e.getCategories&&e.getCategories(!0),f=[],d=Xr.isLabelSilent(e),p=e.get("triggerEvent");return A(l,function(v,g){var m=n.scale.type==="ordinal"?n.scale.getRawOrdinalNumber(v.tickValue):v.tickValue,_=v.formattedLabel,b=v.rawLabel,x=o;if(c&&c[m]){var C=c[m];q(C)&&C.textStyle&&(x=new Tt(C.textStyle,o,e.ecModel))}var S=x.getTextColor()||e.get(["axisLine","lineStyle","color"]),T=n.dataToCoord(m),M=x.getShallow("align",!0)||h.textAlign,D=Q(x.getShallow("alignMinLabel",!0),M),I=Q(x.getShallow("alignMaxLabel",!0),M),P=x.getShallow("verticalAlign",!0)||x.getShallow("baseline",!0)||h.textVerticalAlign,k=Q(x.getShallow("verticalAlignMinLabel",!0),P),R=Q(x.getShallow("verticalAlignMaxLabel",!0),P),L=new Vt({x:T,y:i.labelOffset+i.labelDirection*s,rotation:h.rotation,silent:d,z2:10+(v.level||0),style:Ye(x,{text:_,align:g===0?D:g===l.length-1?I:M,verticalAlign:g===0?k:g===l.length-1?R:P,fill:tt(S)?S(n.type==="category"?b:n.type==="value"?m+"":m,g):S})});if(L.anid="label_"+m,Ml({el:L,componentModel:e,itemName:_,formatterParamsExtra:{isTruncated:function(){return L.isTruncated},value:b,tickIndex:g}}),p){var j=Xr.makeAxisEventDataBase(e);j.targetType="axisLabel",j.value=b,j.tickIndex=g,n.type==="category"&&(j.dataIndex=m),_t(L).eventData=j}t.add(L),L.updateTransform(),f.push(L),r.add(L),L.decomposeTransform()}),f}}function vk(r,t){var e={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return gk(e,r,t),e.seriesInvolved&&yk(e,r),e}function gk(r,t,e){var i=t.getComponent("tooltip"),n=t.getComponent("axisPointer"),a=n.get("link",!0)||[],o=[];A(e.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=so(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var h=s.model,c=h.getModel("tooltip",i);if(A(s.getAxes(),Ct(v,!1,null)),s.getTooltipAxes&&i&&c.get("show")){var f=c.get("trigger")==="axis",d=c.get(["axisPointer","type"])==="cross",p=s.getTooltipAxes(c.get(["axisPointer","axis"]));(f||d)&&A(p.baseAxes,Ct(v,d?"cross":!0,f)),d&&A(p.otherAxes,Ct(v,"cross",!1))}function v(g,m,_){var b=_.model.getModel("axisPointer",n),x=b.get("show");if(!(!x||x==="auto"&&!g&&!Sc(b))){m==null&&(m=b.get("triggerTooltip")),b=g?mk(_,c,n,t,g,m):b;var C=b.get("snap"),S=b.get("triggerEmphasis"),T=so(_.model),M=m||C||_.type==="category",D=r.axesInfo[T]={key:T,axis:_,coordSys:s,axisPointerModel:b,triggerTooltip:m,triggerEmphasis:S,involveSeries:M,snap:C,useHandle:Sc(b),seriesModels:[],linkGroup:null};u[T]=D,r.seriesInvolved=r.seriesInvolved||M;var I=_k(a,_);if(I!=null){var P=o[I]||(o[I]={axesInfo:{}});P.axesInfo[T]=D,P.mapper=a[I].mapper,D.linkGroup=P}}}})}function mk(r,t,e,i,n,a){var o=t.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};A(s,function(f){l[f]=it(o.get(f))}),l.snap=r.type!=="category"&&!!a,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),n==="cross"){var h=o.get(["label","show"]);if(u.show=h??!0,!a){var c=l.lineStyle=o.get("crossStyle");c&<(u,c.textStyle)}}return r.model.getModel("axisPointer",new Tt(l,e,i))}function yk(r,t){t.eachSeries(function(e){var i=e.coordinateSystem,n=e.get(["tooltip","trigger"],!0),a=e.get(["tooltip","show"],!0);!i||n==="none"||n===!1||n==="item"||a===!1||e.get(["axisPointer","show"],!0)===!1||A(r.coordSysAxesInfo[so(i.model)],function(o){var s=o.axis;i.getAxis(s.dim)===s&&(o.seriesModels.push(e),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=e.getData().count())})})}function _k(r,t){for(var e=t.model,i=t.dim,n=0;n<r.length;n++){var a=r[n]||{};if(ah(a[i+"AxisId"],e.id)||ah(a[i+"AxisIndex"],e.componentIndex)||ah(a[i+"AxisName"],e.name))return n}}function ah(r,t){return r==="all"||W(r)&&pt(r,t)>=0||r===t}function bk(r){var t=nd(r);if(t){var e=t.axisPointerModel,i=t.axis.scale,n=e.option,a=e.get("status"),o=e.get("value");o!=null&&(o=i.parse(o));var s=Sc(e);a==null&&(n.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),n.value=o,s&&(n.status=t.axis.scale.isBlank()?"hide":"show")}}function nd(r){var t=(r.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[so(r)]}function xk(r){var t=nd(r);return t&&t.axisPointerModel}function Sc(r){return!!r.get(["handle","show"])}function so(r){return r.type+"||"+r.id}var Hg={},Hb=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n,a){this.axisPointerClass&&bk(e),r.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(e,n,!0)},t.prototype.updateAxisPointer=function(e,i,n,a){this._doUpdateAxisPointerClass(e,n,!1)},t.prototype.remove=function(e,i){var n=this._axisPointer;n&&n.remove(i)},t.prototype.dispose=function(e,i){this._disposeAxisPointer(i),r.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,i,n){var a=t.getAxisPointerClass(this.axisPointerClass);if(a){var o=xk(e);o?(this._axisPointer||(this._axisPointer=new a)).render(e,o,i,n):this._disposeAxisPointer(i)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,i){Hg[e]=i},t.getAxisPointerClass=function(e){return e&&Hg[e]},t.type="axis",t})(Jt),Cc=kt();function wk(r,t,e,i){var n=e.axis;if(!n.scale.isBlank()){var a=e.getModel("splitArea"),o=a.getModel("areaStyle"),s=o.get("color"),l=i.coordinateSystem.getRect(),u=n.getTicksCoords({tickModel:a,clamp:!0});if(u.length){var h=s.length,c=Cc(r).splitAreaColors,f=nt(),d=0;if(c)for(var p=0;p<u.length;p++){var v=c.get(u[p].tickValue);if(v!=null){d=(v+(h-1)*p)%h;break}}var g=n.toGlobalCoord(u[0].coord),m=o.getAreaStyle();s=W(s)?s:[s];for(var p=1;p<u.length;p++){var _=n.toGlobalCoord(u[p].coord),b=void 0,x=void 0,C=void 0,S=void 0;n.isHorizontal()?(b=g,x=l.y,C=_-b,S=l.height,g=b+C):(b=l.x,x=g,C=l.width,S=_-x,g=x+S);var T=u[p-1].tickValue;T!=null&&f.set(T,d),t.add(new Ft({anid:T!=null?"area_"+T:null,shape:{x:b,y:x,width:C,height:S},style:lt({fill:s[d]},m),autoBatch:!0,silent:!0})),d=(d+1)%h}Cc(r).splitAreaColors=f}}}function Sk(r){Cc(r).splitAreaColors=null}var Ck=["axisLine","axisTickLabel","axisName"],Tk=["splitArea","splitLine","minorSplitLine"],Wb=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="CartesianAxisPointer",e}return t.prototype.render=function(e,i,n,a){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Bt,this.group.add(this._axisGroup),!!e.get("show")){var s=e.getCoordSysModel(),l=wc(s,e),u=new Xr(e,N({handleAutoShown:function(c){for(var f=s.coordinateSystem.getCartesians(),d=0;d<f.length;d++)if(mc(f[d].getOtherAxis(e.axis).scale))return!0;return!1}},l));A(Ck,u.add,u),this._axisGroup.add(u.getGroup()),A(Tk,function(c){e.get([c,"show"])&&Ak[c](this,this._axisGroup,e,s)},this);var h=a&&a.type==="changeAxisOrder"&&a.isInitSort;h||O0(o,this._axisGroup,e),r.prototype.render.call(this,e,i,n,a)}},t.prototype.remove=function(){Sk(this)},t.type="cartesianAxis",t})(Hb),Ak={splitLine:function(r,t,e,i){var n=e.axis;if(!n.scale.isBlank()){var a=e.getModel("splitLine"),o=a.getModel("lineStyle"),s=o.get("color"),l=a.get("showMinLine")!==!1,u=a.get("showMaxLine")!==!1;s=W(s)?s:[s];for(var h=i.coordinateSystem.getRect(),c=n.isHorizontal(),f=0,d=n.getTicksCoords({tickModel:a}),p=[],v=[],g=o.getLineStyle(),m=0;m<d.length;m++){var _=n.toGlobalCoord(d[m].coord);if(!(m===0&&!l||m===d.length-1&&!u)){var b=d[m].tickValue;c?(p[0]=_,p[1]=h.y,v[0]=_,v[1]=h.y+h.height):(p[0]=h.x,p[1]=_,v[0]=h.x+h.width,v[1]=_);var x=f++%s.length,C=new Xe({anid:b!=null?"line_"+b:null,autoBatch:!0,shape:{x1:p[0],y1:p[1],x2:v[0],y2:v[1]},style:lt({stroke:s[x]},g),silent:!0});Qa(C.shape,g.lineWidth),t.add(C)}}}},minorSplitLine:function(r,t,e,i){var n=e.axis,a=e.getModel("minorSplitLine"),o=a.getModel("lineStyle"),s=i.coordinateSystem.getRect(),l=n.isHorizontal(),u=n.getMinorTicksCoords();if(u.length)for(var h=[],c=[],f=o.getLineStyle(),d=0;d<u.length;d++)for(var p=0;p<u[d].length;p++){var v=n.toGlobalCoord(u[d][p].coord);l?(h[0]=v,h[1]=s.y,c[0]=v,c[1]=s.y+s.height):(h[0]=s.x,h[1]=v,c[0]=s.x+s.width,c[1]=v);var g=new Xe({anid:"minor_line_"+u[d][p].tickValue,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:c[0],y2:c[1]},style:f,silent:!0});Qa(g.shape,f.lineWidth),t.add(g)}},splitArea:function(r,t,e,i){wk(r,t,e,i)}},Gb=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="xAxis",t})(Wb),Mk=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=Gb.type,e}return t.type="yAxis",t})(Wb),Dk=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="grid",e}return t.prototype.render=function(e,i){this.group.removeAll(),e.get("show")&&this.group.add(new Ft({shape:e.coordinateSystem.getRect(),style:lt({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t})(Jt),Wg={offset:0};function Ik(r){r.registerComponentView(Dk),r.registerComponentModel(JP),r.registerCoordinateSystem("cartesian2d",lk),Rg(r,"x",bc,Wg),Rg(r,"y",bc,Wg),r.registerComponentView(Gb),r.registerComponentView(Mk),r.registerPreprocessor(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})}var Gg="\0_ec_interaction_mutex";function Pk(r,t,e){var i=$b(r);i[t]=e}function kk(r,t,e){var i=$b(r),n=i[t];n===e&&(i[t]=null)}function $b(r){return r[Gg]||(r[Gg]={})}Ke({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},Gt);var Rk={axisPointer:1,tooltip:1,brush:1};function Lk(r,t,e){var i=t.getComponentByElement(r.topTarget),n=i&&i.coordinateSystem;return i&&i!==e&&!Rk.hasOwnProperty(i.mainType)&&n&&n.model!==e}function Ub(r,t,e,i,n,a){r=r||0;var o=e[1]-e[0];if(n!=null&&(n=yn(n,[0,o])),a!=null&&(a=Math.max(a,n??0)),i==="all"){var s=Math.abs(t[1]-t[0]);s=yn(s,[0,o]),n=a=yn(s,[n,a]),i=0}t[0]=yn(t[0],e),t[1]=yn(t[1],e);var l=oh(t,i);t[i]+=r;var u=n||0,h=e.slice();l.sign<0?h[0]+=u:h[1]-=u,t[i]=yn(t[i],h);var c;return c=oh(t,i),n!=null&&(c.sign!==l.sign||c.span<n)&&(t[1-i]=t[i]+l.sign*n),c=oh(t,i),a!=null&&c.span>a&&(t[1-i]=t[i]+c.sign*a),t}function oh(r,t){var e=r[t]-r[1-t];return{span:Math.abs(e),sign:e>0?-1:e<0?1:t?-1:1}}function yn(r,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,r))}var Yi=!0,lo=Math.min,Hn=Math.max,Ok=Math.pow,Ek=1e4,jk=6,Nk=6,$g="globalPan",Fk={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},Bk={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},Ug={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},zk=0,Vk=(function(r){F(t,r);function t(e){var i=r.call(this)||this;return i._track=[],i._covers=[],i._handlers={},i._zr=e,i.group=new Bt,i._uid="brushController_"+zk++,A(Xk,function(n,a){this._handlers[a]=ct(n,this)},i),i}return t.prototype.enableBrush=function(e){return this._brushType&&this._doDisableBrush(),e.brushType&&this._doEnableBrush(e),this},t.prototype._doEnableBrush=function(e){var i=this._zr;this._enableGlobalPan||Pk(i,$g,this._uid),A(this._handlers,function(n,a){i.on(a,n)}),this._brushType=e.brushType,this._brushOption=st(it(Ug),e,!0)},t.prototype._doDisableBrush=function(){var e=this._zr;kk(e,$g,this._uid),A(this._handlers,function(i,n){e.off(n,i)}),this._brushType=this._brushOption=null},t.prototype.setPanels=function(e){if(e&&e.length){var i=this._panels={};A(e,function(n){i[n.panelId]=it(n)})}else this._panels=null;return this},t.prototype.mount=function(e){e=e||{},this._enableGlobalPan=e.enableGlobalPan;var i=this.group;return this._zr.add(i),i.attr({x:e.x||0,y:e.y||0,rotation:e.rotation||0,scaleX:e.scaleX||1,scaleY:e.scaleY||1}),this._transform=i.getLocalTransform(),this},t.prototype.updateCovers=function(e){e=V(e,function(f){return st(it(Ug),f,!0)});var i="\0-brush-index-",n=this._covers,a=this._covers=[],o=this,s=this._creatingCover;return new Zf(n,e,u,l).add(h).update(h).remove(c).execute(),this;function l(f,d){return(f.id!=null?f.id:i+d)+"-"+f.brushType}function u(f,d){return l(f.__brushOption,d)}function h(f,d){var p=e[f];if(d!=null&&n[d]===s)a[f]=n[d];else{var v=a[f]=d!=null?(n[d].__brushOption=p,n[d]):Xb(o,Yb(o,p));ad(o,v)}}function c(f){n[f]!==s&&o.group.remove(n[f])}},t.prototype.unmount=function(){return this.enableBrush(!1),Tc(this),this._zr.remove(this.group),this},t.prototype.dispose=function(){this.unmount(),this.off()},t})(cr);function Yb(r,t){var e=Hl[t.brushType].createCover(r,t);return e.__brushOption=t,qb(e,t),r.group.add(e),e}function Xb(r,t){var e=od(t);return e.endCreating&&(e.endCreating(r,t),qb(t,t.__brushOption)),t}function Zb(r,t){var e=t.__brushOption;od(t).updateCoverShape(r,t,e.range,e)}function qb(r,t){var e=t.z;e==null&&(e=Ek),r.traverse(function(i){i.z=e,i.z2=e})}function ad(r,t){od(t).updateCommon(r,t),Zb(r,t)}function od(r){return Hl[r.__brushOption.brushType]}function sd(r,t,e){var i=r._panels;if(!i)return Yi;var n,a=r._transform;return A(i,function(o){o.isTargetByCursor(t,e,a)&&(n=o)}),n}function Kb(r,t){var e=r._panels;if(!e)return Yi;var i=t.__brushOption.panelId;return i!=null?e[i]:Yi}function Tc(r){var t=r._covers,e=t.length;return A(t,function(i){r.group.remove(i)},r),t.length=0,!!e}function Xi(r,t){var e=V(r._covers,function(i){var n=i.__brushOption,a=it(n.range);return{brushType:n.brushType,panelId:n.panelId,range:a}});r.trigger("brush",{areas:e,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function Hk(r){var t=r._track;if(!t.length)return!1;var e=t[t.length-1],i=t[0],n=e[0]-i[0],a=e[1]-i[1],o=Ok(n*n+a*a,.5);return o>jk}function Jb(r){var t=r.length-1;return t<0&&(t=0),[r[0],r[t]]}function Qb(r,t,e,i){var n=new Bt;return n.add(new Ft({name:"main",style:ld(e),silent:!0,draggable:!0,cursor:"move",drift:Ct(Yg,r,t,n,["n","s","w","e"]),ondragend:Ct(Xi,t,{isEnd:!0})})),A(i,function(a){n.add(new Ft({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Ct(Yg,r,t,n,a),ondragend:Ct(Xi,t,{isEnd:!0})}))}),n}function tx(r,t,e,i){var n=i.brushStyle.lineWidth||0,a=Hn(n,Nk),o=e[0][0],s=e[1][0],l=o-n/2,u=s-n/2,h=e[0][1],c=e[1][1],f=h-a+n/2,d=c-a+n/2,p=h-o,v=c-s,g=p+n,m=v+n;gr(r,t,"main",o,s,p,v),i.transformable&&(gr(r,t,"w",l,u,a,m),gr(r,t,"e",f,u,a,m),gr(r,t,"n",l,u,g,a),gr(r,t,"s",l,d,g,a),gr(r,t,"nw",l,u,a,a),gr(r,t,"ne",f,u,a,a),gr(r,t,"sw",l,d,a,a),gr(r,t,"se",f,d,a,a))}function Ac(r,t){var e=t.__brushOption,i=e.transformable,n=t.childAt(0);n.useStyle(ld(e)),n.attr({silent:!i,cursor:i?"move":"default"}),A([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=t.childOfName(a.join("")),s=a.length===1?Mc(r,a[0]):Gk(r,a);o&&o.attr({silent:!i,invisible:!i,cursor:i?Bk[s]+"-resize":null})})}function gr(r,t,e,i,n,a,o){var s=t.childOfName(e);s&&s.setShape(Uk(ud(r,t,[[i,n],[i+a,n+o]])))}function ld(r){return lt({strokeNoScale:!0},r.brushStyle)}function ex(r,t,e,i){var n=[lo(r,e),lo(t,i)],a=[Hn(r,e),Hn(t,i)];return[[n[0],a[0]],[n[1],a[1]]]}function Wk(r){return Tl(r.group)}function Mc(r,t){var e={w:"left",e:"right",n:"top",s:"bottom"},i={left:"w",right:"e",top:"n",bottom:"s"},n=L0(e[t],Wk(r));return i[n]}function Gk(r,t){var e=[Mc(r,t[0]),Mc(r,t[1])];return(e[0]==="e"||e[0]==="w")&&e.reverse(),e.join("")}function Yg(r,t,e,i,n,a){var o=e.__brushOption,s=r.toRectRange(o.range),l=rx(t,n,a);A(i,function(u){var h=Fk[u];s[h[0]][h[1]]+=l[h[0]]}),o.range=r.fromRectRange(ex(s[0][0],s[1][0],s[0][1],s[1][1])),ad(t,e),Xi(t,{isEnd:!1})}function $k(r,t,e,i){var n=t.__brushOption.range,a=rx(r,e,i);A(n,function(o){o[0]+=a[0],o[1]+=a[1]}),ad(r,t),Xi(r,{isEnd:!1})}function rx(r,t,e){var i=r.group,n=i.transformCoordToLocal(t,e),a=i.transformCoordToLocal(0,0);return[n[0]-a[0],n[1]-a[1]]}function ud(r,t,e){var i=Kb(r,t);return i&&i!==Yi?i.clipPath(e,r._transform):it(e)}function Uk(r){var t=lo(r[0][0],r[1][0]),e=lo(r[0][1],r[1][1]),i=Hn(r[0][0],r[1][0]),n=Hn(r[0][1],r[1][1]);return{x:t,y:e,width:i-t,height:n-e}}function Yk(r,t,e){if(!(!r._brushType||Zk(r,t.offsetX,t.offsetY))){var i=r._zr,n=r._covers,a=sd(r,t,e);if(!r._dragging)for(var o=0;o<n.length;o++){var s=n[o].__brushOption;if(a&&(a===Yi||s.panelId===a.panelId)&&Hl[s.brushType].contain(n[o],e[0],e[1]))return}a&&i.setCursorStyle("crosshair")}}function Dc(r){var t=r.event;t.preventDefault&&t.preventDefault()}function Ic(r,t,e){return r.childOfName("main").contain(t,e)}function ix(r,t,e,i){var n=r._creatingCover,a=r._creatingPanel,o=r._brushOption,s;if(r._track.push(e.slice()),Hk(r)||n){if(a&&!n){o.brushMode==="single"&&Tc(r);var l=it(o);l.brushType=Xg(l.brushType,a),l.panelId=a===Yi?null:a.panelId,n=r._creatingCover=Yb(r,l),r._covers.push(n)}if(n){var u=Hl[Xg(r._brushType,a)],h=n.__brushOption;h.range=u.getCreatingRange(ud(r,n,r._track)),i&&(Xb(r,n),u.updateCommon(r,n)),Zb(r,n),s={isEnd:i}}}else i&&o.brushMode==="single"&&o.removeOnClick&&sd(r,t,e)&&Tc(r)&&(s={isEnd:i,removeOnClick:!0});return s}function Xg(r,t){return r==="auto"?t.defaultBrushType:r}var Xk={mousedown:function(r){if(this._dragging)Zg(this,r);else if(!r.target||!r.target.draggable){Dc(r);var t=this.group.transformCoordToLocal(r.offsetX,r.offsetY);this._creatingCover=null;var e=this._creatingPanel=sd(this,r,t);e&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(r){var t=r.offsetX,e=r.offsetY,i=this.group.transformCoordToLocal(t,e);if(Yk(this,r,i),this._dragging){Dc(r);var n=ix(this,r,i,!1);n&&Xi(this,n)}},mouseup:function(r){Zg(this,r)}};function Zg(r,t){if(r._dragging){Dc(t);var e=t.offsetX,i=t.offsetY,n=r.group.transformCoordToLocal(e,i),a=ix(r,t,n,!0);r._dragging=!1,r._track=[],r._creatingCover=null,a&&Xi(r,a)}}function Zk(r,t,e){var i=r._zr;return t<0||t>i.getWidth()||e<0||e>i.getHeight()}var Hl={lineX:qg(0),lineY:qg(1),rect:{createCover:function(r,t){function e(i){return i}return Qb({toRectRange:e,fromRectRange:e},r,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var t=Jb(r);return ex(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(r,t,e,i){tx(r,t,e,i)},updateCommon:Ac,contain:Ic},polygon:{createCover:function(r,t){var e=new Bt;return e.add(new So({name:"main",style:ld(t),silent:!0})),e},getCreatingRange:function(r){return r},endCreating:function(r,t){t.remove(t.childAt(0)),t.add(new wo({name:"main",draggable:!0,drift:Ct($k,r,t),ondragend:Ct(Xi,r,{isEnd:!0})}))},updateCoverShape:function(r,t,e,i){t.childAt(0).setShape({points:ud(r,t,e)})},updateCommon:Ac,contain:Ic}};function qg(r){return{createCover:function(t,e){return Qb({toRectRange:function(i){var n=[i,[0,100]];return r&&n.reverse(),n},fromRectRange:function(i){return i[r]}},t,e,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(t){var e=Jb(t),i=lo(e[0][r],e[1][r]),n=Hn(e[0][r],e[1][r]);return[i,n]},updateCoverShape:function(t,e,i,n){var a,o=Kb(t,e);if(o!==Yi&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(r);else{var s=t._zr;a=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[i,a];r&&l.reverse(),tx(t,e,l,n)},updateCommon:Ac,contain:Ic}}function qk(r){return r=hd(r),function(t){return yf(t,r)}}function Kk(r,t){return r=hd(r),function(e){var i=t??e,n=i?r.width:r.height,a=i?r.x:r.y;return[a,a+(n||0)]}}function Jk(r,t,e){var i=hd(r);return function(n,a){return i.contain(a[0],a[1])&&!Lk(n,t,e)}}function hd(r){return mt.create(r)}var Ii=kt(),Kg=it,sh=ct,Qk=(function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(t,e,i,n){var a=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,!(!n&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,a,t,e,i);var h=u.graphicKey;h!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=h;var c=this._moveAnimation=this.determineAnimation(t,e);if(!s)s=this._group=new Bt,this.createPointerEl(s,u,t,e),this.createLabelEl(s,u,t,e),i.getZr().add(s);else{var f=Ct(Jg,e,c);this.updatePointerEl(s,u,f),this.updateLabelEl(s,u,f,e)}tm(s,e,!0),this._renderHandle(a)}},r.prototype.remove=function(t){this.clear(t)},r.prototype.dispose=function(t){this.clear(t)},r.prototype.determineAnimation=function(t,e){var i=e.get("animation"),n=t.axis,a=n.type==="category",o=e.get("snap");if(!o&&!a)return!1;if(i==="auto"||i==null){var s=this.animationThreshold;if(a&&n.getBandWidth()>s)return!0;if(o){var l=nd(t).seriesDataCount,u=n.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return i===!0},r.prototype.makeElOption=function(t,e,i,n,a){},r.prototype.createPointerEl=function(t,e,i,n){var a=e.pointer;if(a){var o=Ii(t).pointerEl=new TA[a.type](Kg(e.pointer));t.add(o)}},r.prototype.createLabelEl=function(t,e,i,n){if(e.label){var a=Ii(t).labelEl=new Vt(Kg(e.label));t.add(a),Qg(a,n)}},r.prototype.updatePointerEl=function(t,e,i){var n=Ii(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},r.prototype.updateLabelEl=function(t,e,i,n){var a=Ii(t).labelEl;a&&(a.setStyle(e.label.style),i(a,{x:e.label.x,y:e.label.y}),Qg(a,n))},r.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var e=this._axisPointerModel,i=this._api.getZr(),n=this._handle,a=e.getModel("handle"),o=e.get("status");if(!a.get("show")||!o||o==="hide"){n&&i.remove(n),this._handle=null;return}var s;this._handle||(s=!0,n=this._handle=To(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){py(u.event)},onmousedown:sh(this._onHandleDragMove,this,0,0),drift:sh(this._onHandleDragMove,this),ondragend:sh(this._onHandleDragEnd,this)}),i.add(n)),tm(n,e,!1),n.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");W(l)||(l=[l,l]),n.scaleX=l[0]/2,n.scaleY=l[1]/2,A_(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},r.prototype._moveHandleToValue=function(t,e){Jg(this._axisPointerModel,!e&&this._moveAnimation,this._handle,lh(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(lh(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(lh(n)),Ii(i).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var e=this._payloadInfo,i=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:i.axis.dim,axisIndex:i.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),uc(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}},r})();function Jg(r,t,e,i){nx(Ii(e).lastProp,i)||(Ii(e).lastProp=i,t?Qr(e,i,r):(e.stopAnimation(),e.attr(i)))}function nx(r,t){if(q(r)&&q(t)){var e=!0;return A(t,function(i,n){e=e&&nx(r[n],i)}),!!e}else return r===t}function Qg(r,t){r[t.get(["label","show"])?"show":"hide"]()}function lh(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function tm(r,t,e){var i=t.get("z"),n=t.get("zlevel");r&&r.traverse(function(a){a.type!=="group"&&(i!=null&&(a.z=i),n!=null&&(a.zlevel=n),a.silent=e)})}function tR(r){var t=r.get("type"),e=r.getModel(t+"Style"),i;return t==="line"?(i=e.getLineStyle(),i.fill=null):t==="shadow"&&(i=e.getAreaStyle(),i.stroke=null),i}function eR(r,t,e,i,n){var a=e.get("value"),o=ax(a,t.axis,t.ecModel,e.get("seriesDataIndices"),{precision:e.get(["label","precision"]),formatter:e.get(["label","formatter"])}),s=e.getModel("label"),l=Do(s.get("padding")||0),u=s.getFont(),h=cl(o,u),c=n.position,f=h.width+l[1]+l[3],d=h.height+l[0]+l[2],p=n.align;p==="right"&&(c[0]-=f),p==="center"&&(c[0]-=f/2);var v=n.verticalAlign;v==="bottom"&&(c[1]-=d),v==="middle"&&(c[1]-=d/2),rR(c,f,d,i);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=t.get(["axisLine","lineStyle","color"])),r.label={x:c[0],y:c[1],style:Ye(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function rR(r,t,e,i){var n=i.getWidth(),a=i.getHeight();r[0]=Math.min(r[0]+t,n)-t,r[1]=Math.min(r[1]+e,a)-e,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function ax(r,t,e,i,n){r=t.scale.parse(r);var a=t.scale.getLabel({value:r},{precision:n.precision}),o=n.formatter;if(o){var s={value:Qf(t,{value:r}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};A(i,function(l){var u=e.getSeriesByIndex(l.seriesIndex),h=l.dataIndexInside,c=u&&u.getDataParams(h);c&&s.seriesData.push(c)}),U(o)?a=o.replace("{value}",a):tt(o)&&(a=o(s))}return a}function ox(r,t,e){var i=br();return vo(i,i,e.rotation),jn(i,i,e.position),Al([r.dataToCoord(t),(e.labelOffset||0)+(e.labelDirection||1)*(e.labelMargin||0)],i)}function iR(r,t,e,i,n,a){var o=Xr.innerTextLayout(e.rotation,0,e.labelDirection);e.labelMargin=n.get(["label","margin"]),eR(t,i,n,a,{position:ox(i.axis,r,e),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function nR(r,t,e){return e=e||0,{x1:r[e],y1:r[1-e],x2:t[e],y2:t[1-e]}}function aR(r,t,e){return e=e||0,{x:r[e],y:r[1-e],width:t[e],height:t[1-e]}}var oR=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,i,n,a,o){var s=n.axis,l=s.grid,u=a.get("type"),h=em(l,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(i,!0));if(u&&u!=="none"){var f=tR(a),d=sR[u](s,c,h);d.style=f,e.graphicKey=d.type,e.pointer=d}var p=wc(l.model,n);iR(i,e,p,n,a,o)},t.prototype.getHandleTransform=function(e,i,n){var a=wc(i.axis.grid.model,i,{labelInside:!1});a.labelMargin=n.get(["handle","margin"]);var o=ox(i.axis,e,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,i,n,a){var o=n.axis,s=o.grid,l=o.getGlobalExtent(!0),u=em(s,o).getOtherAxis(o).getGlobalExtent(),h=o.dim==="x"?0:1,c=[e.x,e.y];c[h]+=i[h],c[h]=Math.min(l[1],c[h]),c[h]=Math.max(l[0],c[h]);var f=(u[1]+u[0])/2,d=[f,f];d[h]=c[h];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:c[0],y:c[1],rotation:e.rotation,cursorPoint:d,tooltipOption:p[h]}},t})(Qk);function em(r,t){var e={};return e[t.dim+"AxisIndex"]=t.index,r.getCartesian(e)}var sR={line:function(r,t,e){var i=nR([t,e[0]],[t,e[1]],rm(r));return{type:"Line",subPixelOptimize:!0,shape:i}},shadow:function(r,t,e){var i=Math.max(1,r.getBandWidth()),n=e[1]-e[0];return{type:"Rect",shape:aR([t-i/2,e[0]],[i,n],rm(r))}}};function rm(r){return r.dim==="x"?0:1}var lR=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",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:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},t})(dt),_r=kt(),uR=A;function sx(r,t,e){if(!J.node){var i=t.getZr();_r(i).records||(_r(i).records={}),hR(i,t);var n=_r(i).records[r]||(_r(i).records[r]={});n.handler=e}}function hR(r,t){if(_r(r).initialized)return;_r(r).initialized=!0,e("click",Ct(im,"click")),e("mousemove",Ct(im,"mousemove")),e("globalout",fR);function e(i,n){r.on(i,function(a){var o=dR(t);uR(_r(r).records,function(s){s&&n(s,a,o.dispatchAction)}),cR(o.pendings,t)})}}function cR(r,t){var e=r.showTip.length,i=r.hideTip.length,n;e?n=r.showTip[e-1]:i&&(n=r.hideTip[i-1]),n&&(n.dispatchAction=null,t.dispatchAction(n))}function fR(r,t,e){r.handler("leave",null,e)}function im(r,t,e,i){t.handler(r,e,i)}function dR(r){var t={showTip:[],hideTip:[]},e=function(i){var n=t[i.type];n?n.push(i):(i.dispatchAction=e,r.dispatchAction(i))};return{dispatchAction:e,pendings:t}}function Pc(r,t){if(!J.node){var e=t.getZr(),i=(_r(e).records||{})[r];i&&(_r(e).records[r]=null)}}var pR=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n){var a=i.getComponent("tooltip"),o=e.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";sx("axisPointer",n,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},t.prototype.remove=function(e,i){Pc("axisPointer",i)},t.prototype.dispose=function(e,i){Pc("axisPointer",i)},t.type="axisPointer",t})(Jt);function lx(r,t){var e=[],i=r.seriesIndex,n;if(i==null||!(n=t.getSeriesByIndex(i)))return{point:[]};var a=n.getData(),o=Wi(a,r);if(o==null||o<0||W(o))return{point:[]};var s=a.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)e=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),h=l.getOtherAxis(u),c=h.dim,f=u.dim,d=c==="x"||c==="radius"?1:0,p=a.mapDimension(f),v=[];v[d]=a.get(p,o),v[1-d]=a.get(a.getCalculationInfo("stackResultDimension"),o),e=l.dataToPoint(v)||[]}else e=l.dataToPoint(a.getValues(V(l.dimensions,function(m){return a.mapDimension(m)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),e=[g.x+g.width/2,g.y+g.height/2]}return{point:e,el:s}}var nm=kt();function vR(r,t,e){var i=r.currTrigger,n=[r.x,r.y],a=r,o=r.dispatchAction||ct(e.dispatchAction,e),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){Ss(n)&&(n=lx({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var l=Ss(n),u=a.axesInfo,h=s.axesInfo,c=i==="leave"||Ss(n),f={},d={},p={list:[],map:{}},v={showPointer:Ct(mR,d),showTooltip:Ct(yR,p)};A(s.coordSysMap,function(m,_){var b=l||m.containPoint(n);A(s.coordSysAxesInfo[_],function(x,C){var S=x.axis,T=wR(u,x);if(!c&&b&&(!u||T)){var M=T&&T.value;M==null&&!l&&(M=S.pointToData(n)),M!=null&&am(x,M,v,!1,f)}})});var g={};return A(h,function(m,_){var b=m.linkGroup;b&&!d[_]&&A(b.axesInfo,function(x,C){var S=d[C];if(x!==m&&S){var T=S.value;b.mapper&&(T=m.axis.scale.parse(b.mapper(T,om(x),om(m)))),g[m.key]=T}})}),A(g,function(m,_){am(h[_],m,v,!0,f)}),_R(d,h,f),bR(p,n,r,o),xR(h,o,e),f}}function am(r,t,e,i,n){var a=r.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!r.involveSeries){e.showPointer(r,t);return}var o=gR(t,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&n.seriesIndex==null&&N(n,s[0]),!i&&r.snap&&a.containData(l)&&l!=null&&(t=l),e.showPointer(r,t,s),e.showTooltip(r,o,l)}}function gR(r,t){var e=t.axis,i=e.dim,n=r,a=[],o=Number.MAX_VALUE,s=-1;return A(t.seriesModels,function(l,u){var h=l.getData().mapDimensionsAll(i),c,f;if(l.getAxisTooltipData){var d=l.getAxisTooltipData(h,r,e);f=d.dataIndices,c=d.nestestValue}else{if(f=l.getData().indicesOfNearest(h[0],r,e.type==="category"?.5:null),!f.length)return;c=l.getData().get(h[0],f[0])}if(!(c==null||!isFinite(c))){var p=r-c,v=Math.abs(p);v<=o&&((v<o||p>=0&&s<0)&&(o=v,s=p,n=c,a.length=0),A(f,function(g){a.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:a,snapToValue:n}}function mR(r,t,e,i){r[t.key]={value:e,payloadBatch:i}}function yR(r,t,e,i){var n=e.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!n.length)){var l=t.coordSys.model,u=so(l),h=r.map[u];h||(h=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(h)),h.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:n.slice()})}}function _R(r,t,e){var i=e.axesInfo=[];A(t,function(n,a){var o=n.axisPointerModel.option,s=r[a];s?(!n.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!n.useHandle&&(o.status="hide"),o.status==="show"&&i.push({axisDim:n.axis.dim,axisIndex:n.axis.model.componentIndex,value:o.value})})}function bR(r,t,e,i){if(Ss(t)||!r.list.length){i({type:"hideTip"});return}var n=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:e.tooltipOption,position:e.position,dataIndexInside:n.dataIndexInside,dataIndex:n.dataIndex,seriesIndex:n.seriesIndex,dataByCoordSys:r.list})}function xR(r,t,e){var i=e.getZr(),n="axisPointerLastHighlights",a=nm(i)[n]||{},o=nm(i)[n]={};A(r,function(u,h){var c=u.axisPointerModel.option;c.status==="show"&&u.triggerEmphasis&&A(c.seriesDataIndices,function(f){var d=f.seriesIndex+" | "+f.dataIndex;o[d]=f})});var s=[],l=[];A(a,function(u,h){!o[h]&&l.push(u)}),A(o,function(u,h){!a[h]&&s.push(u)}),l.length&&e.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&e.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function wR(r,t){for(var e=0;e<(r||[]).length;e++){var i=r[e];if(t.axis.dim===i.axisDim&&t.axis.model.componentIndex===i.axisIndex)return i}}function om(r){var t=r.axis.model,e={},i=e.axisDim=r.axis.dim;return e.axisIndex=e[i+"AxisIndex"]=t.componentIndex,e.axisName=e[i+"AxisName"]=t.name,e.axisId=e[i+"AxisId"]=t.id,e}function Ss(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function ux(r){Hb.registerAxisPointerClass("CartesianAxisPointer",oR),r.registerComponentModel(lR),r.registerComponentView(pR),r.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!W(e)&&(t.axisPointer.link=[e])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=vk(t,e)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},vR)}function SR(r){Ui(Ik),Ui(ux)}var sm=["x","y","radius","angle","single"],CR=["cartesian2d","polar","singleAxis"];function TR(r){var t=r.get("coordinateSystem");return pt(CR,t)>=0}function Mn(r){return r+"Axis"}function AR(r,t){var e=nt(),i=[],n=nt();r.eachComponent({mainType:"dataZoom",query:t},function(h){n.get(h.uid)||s(h)});var a;do a=!1,r.eachComponent("dataZoom",o);while(a);function o(h){!n.get(h.uid)&&l(h)&&(s(h),a=!0)}function s(h){n.set(h.uid,!0),i.push(h),u(h)}function l(h){var c=!1;return h.eachTargetAxis(function(f,d){var p=e.get(f);p&&p[d]&&(c=!0)}),c}function u(h){h.eachTargetAxis(function(c,f){(e.get(c)||e.set(c,[]))[f]=!0})}return i}var uh=(function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},r})(),MR=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._autoThrottle=!0,e._noTarget=!0,e._rangePropMode=["percent","percent"],e}return t.prototype.init=function(e,i,n){var a=lm(e);this.settledOption=a,this.mergeDefaultAndTheme(e,n),this._doInit(a)},t.prototype.mergeOption=function(e){var i=lm(e);st(this.option,e,!0),st(this.settledOption,i,!0),this._doInit(i)},t.prototype._doInit=function(e){var i=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;A([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(i[a[0]]=n[a[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),i=this._targetAxisInfoMap=nt(),n=this._fillSpecifiedTargetAxis(i);n?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(i,this._orient)),this._noTarget=!0,i.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var i=!1;return A(sm,function(n){var a=this.getReferringComponents(Mn(n),SC);if(a.specified){i=!0;var o=new uh;A(a.models,function(s){o.add(s.componentIndex)}),e.set(n,o)}},this),i},t.prototype._fillAutoTargetAxisByOrient=function(e,i){var n=this.ecModel,a=!0;if(a){var o=i==="vertical"?"y":"x",s=n.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=n.findComponents({mainType:"singleAxis",filter:function(h){return h.get("orient",!0)===i}});l(s,"single")}function l(u,h){var c=u[0];if(c){var f=new uh;if(f.add(c.componentIndex),e.set(h,f),a=!1,h==="x"||h==="y"){var d=c.getReferringComponents("grid",re).models[0];d&&A(u,function(p){c.componentIndex!==p.componentIndex&&d===p.getReferringComponents("grid",re).models[0]&&f.add(p.componentIndex)})}}}a&&A(sm,function(u){if(a){var h=n.findComponents({mainType:Mn(u),filter:function(f){return f.get("type",!0)==="category"}});if(h[0]){var c=new uh;c.add(h[0].componentIndex),e.set(u,c),a=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(i){!e&&(e=i)},this),e==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var i=this.ecModel.option;this.option.throttle=i.animation&&i.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var i=this._rangePropMode,n=this.get("rangeMode");A([["start","startValue"],["end","endValue"]],function(a,o){var s=e[a[0]]!=null,l=e[a[1]]!=null;s&&!l?i[o]="percent":!s&&l?i[o]="value":n?i[o]=n[o]:s&&(i[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(i,n){e==null&&(e=this.ecModel.getComponent(Mn(i),n))},this),e},t.prototype.eachTargetAxis=function(e,i){this._targetAxisInfoMap.each(function(n,a){A(n.indexList,function(o){e.call(i,a,o)})})},t.prototype.getAxisProxy=function(e,i){var n=this.getAxisModel(e,i);if(n)return n.__dzAxisProxy},t.prototype.getAxisModel=function(e,i){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[i])return this.ecModel.getComponent(Mn(e),i)},t.prototype.setRawRange=function(e){var i=this.option,n=this.settledOption;A([["start","startValue"],["end","endValue"]],function(a){(e[a[0]]!=null||e[a[1]]!=null)&&(i[a[0]]=n[a[0]]=e[a[0]],i[a[1]]=n[a[1]]=e[a[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var i=this.option;A(["start","startValue","end","endValue"],function(n){i[n]=e[n]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,i){if(e==null&&i==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getDataValueWindow()}else return this.getAxisProxy(e,i).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var i,n=this._targetAxisInfoMap.keys(),a=0;a<n.length;a++)for(var o=n[a],s=this._targetAxisInfoMap.get(o),l=0;l<s.indexList.length;l++){var u=this.getAxisProxy(o,s.indexList[l]);if(u.hostedBy(this))return u;i||(i=u)}return i},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return this._orient},t.type="dataZoom",t.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],t.defaultOption={z:4,filterMode:"filter",start:0,end:100},t})(dt);function lm(r){var t={};return A(["start","end","startValue","endValue","throttle"],function(e){r.hasOwnProperty(e)&&(t[e]=r[e])}),t}var DR=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.select",t})(MR),IR=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n,a){this.dataZoomModel=e,this.ecModel=i,this.api=n},t.type="dataZoom",t})(Jt),PR=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.select",t})(IR),wn=A,um=ef,kR=(function(){function r(t,e,i,n){this._dimName=t,this._axisIndex=e,this.ecModel=n,this._dataZoomModel=i}return r.prototype.hostedBy=function(t){return this._dataZoomModel===t},r.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},r.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},r.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries(function(e){if(TR(e)){var i=Mn(this._dimName),n=e.getReferringComponents(i,re).models[0];n&&this._axisIndex===n.componentIndex&&t.push(e)}},this),t},r.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},r.prototype.getMinMaxSpan=function(){return it(this._minMaxSpan)},r.prototype.calculateDataWindow=function(t){var e=this._dataExtent,i=this.getAxisModel(),n=i.axis.scale,a=this._dataZoomModel.getRangePropMode(),o=[0,100],s=[],l=[],u;wn(["start","end"],function(f,d){var p=t[f],v=t[f+"Value"];a[d]==="percent"?(p==null&&(p=o[d]),v=n.parse(jr(p,o,e))):(u=!0,v=v==null?e[d]:n.parse(v),p=jr(v,e,o)),l[d]=v==null||isNaN(v)?e[d]:v,s[d]=p==null||isNaN(p)?o[d]:p}),um(l),um(s);var h=this._minMaxSpan;u?c(l,s,e,o,!1):c(s,l,o,e,!0);function c(f,d,p,v,g){var m=g?"Span":"ValueSpan";Ub(0,f,p,"all",h["min"+m],h["max"+m]);for(var _=0;_<2;_++)d[_]=jr(f[_],p,v,!0),g&&(d[_]=n.parse(d[_]))}return{valueWindow:l,percentWindow:s}},r.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=RR(this,this._dimName,e),this._updateMinMaxSpan();var i=this.calculateDataWindow(t.settledOption);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,this._setAxisModel()}},r.prototype.filterData=function(t,e){if(t!==this._dataZoomModel)return;var i=this._dimName,n=this.getTargetSeriesModels(),a=t.get("filterMode"),o=this._valueWindow;if(a==="none")return;wn(n,function(l){var u=l.getData(),h=u.mapDimensionsAll(i);if(h.length){if(a==="weakFilter"){var c=u.getStore(),f=V(h,function(d){return u.getDimensionIndex(d)},u);u.filterSelf(function(d){for(var p,v,g,m=0;m<h.length;m++){var _=c.get(f[m],d),b=!isNaN(_),x=_<o[0],C=_>o[1];if(b&&!x&&!C)return!0;b&&(g=!0),x&&(p=!0),C&&(v=!0)}return g&&p&&v})}else wn(h,function(d){if(a==="empty")l.setData(u=u.map(d,function(v){return s(v)?v:NaN}));else{var p={};p[d]=o,u.selectRange(p)}});wn(h,function(d){u.setApproximateExtent(o,d)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,i=this._dataExtent;wn(["min","max"],function(n){var a=e.get(n+"Span"),o=e.get(n+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=jr(i[0]+o,i,[0,100],!0):a!=null&&(o=jr(a,[0,100],i,!0)-i[0]),t[n+"Span"]=a,t[n+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,i=this._valueWindow;if(e){var n=rf(i,[0,500]);n=Math.min(n,20);var a=t.axis.scale.rawExtentInfo;e[0]!==0&&a.setDeterminedMinMax("min",+i[0].toFixed(n)),e[1]!==100&&a.setDeterminedMinMax("max",+i[1].toFixed(n)),a.freeze()}},r})();function RR(r,t,e){var i=[1/0,-1/0];wn(e,function(o){G2(i,o.getData(),t)});var n=r.getAxisModel(),a=bb(n.axis.scale,n,i).calculate();return[a.min,a.max]}var LR={getTargetSeries:function(r){function t(n){r.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=r.getComponent(Mn(o),s);n(o,s,l,a)})})}t(function(n,a,o,s){o.__dzAxisProxy=null});var e=[];t(function(n,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new kR(n,a,s,r),e.push(o.__dzAxisProxy))});var i=nt();return A(e,function(n){A(n.getTargetSeriesModels(),function(a){i.set(a.uid,a)})}),i},overallReset:function(r,t){r.eachComponent("dataZoom",function(e){e.eachTargetAxis(function(i,n){e.getAxisProxy(i,n).reset(e)}),e.eachTargetAxis(function(i,n){e.getAxisProxy(i,n).filterData(e,t)})}),r.eachComponent("dataZoom",function(e){var i=e.findRepresentativeAxisProxy();if(i){var n=i.getDataPercentWindow(),a=i.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:a[0],endValue:a[1]})}})}};function OR(r){r.registerAction("dataZoom",function(t,e){var i=AR(e,t);A(i,function(n){n.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var hm=!1;function ER(r){hm||(hm=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,LR),OR(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function jR(r){r.registerComponentModel(DR),r.registerComponentView(PR),ER(r)}var We=(function(){function r(){}return r})(),hx={};function ga(r,t){hx[r]=t}function cx(r){return hx[r]}var NR=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;A(this.option.feature,function(i,n){var a=cx(n);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(e)),st(i,a.defaultOption))})},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},t})(dt);function FR(r,t,e){var i=t.getBoxLayoutParams(),n=t.get("padding"),a={width:e.getWidth(),height:e.getHeight()},o=Ki(i,a,n);JA(t.get("orient"),r,t.get("itemGap"),o.width,o.height),QA(r,i,a,n)}function BR(r,t){var e=Do(t.get("padding")),i=t.getItemStyle(["color","opacity"]);return i.fill=t.get("backgroundColor"),r=new Ft({shape:{x:r.x-e[3],y:r.y-e[0],width:r.width+e[1]+e[3],height:r.height+e[0]+e[2],r:t.get("borderRadius")},style:i,silent:!0,z2:-1}),r}var zR=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,i,n,a){var o=this.group;if(o.removeAll(),!e.get("show"))return;var s=+e.get("itemSize"),l=e.get("orient")==="vertical",u=e.get("feature")||{},h=this._features||(this._features={}),c=[];A(u,function(p,v){c.push(v)}),new Zf(this._featureNames||[],c).add(f).update(f).remove(Ct(f,null)).execute(),this._featureNames=c;function f(p,v){var g=c[p],m=c[v],_=u[g],b=new Tt(_,e,e.ecModel),x;if(a&&a.newTitle!=null&&a.featureName===g&&(_.title=a.newTitle),g&&!m){if(VR(g))x={onclick:b.option.onclick,featureName:g};else{var C=cx(g);if(!C)return;x=new C}h[g]=x}else if(x=h[m],!x)return;x.uid=Ao("toolbox-feature"),x.model=b,x.ecModel=i,x.api=n;var S=x instanceof We;if(!g&&m){S&&x.dispose&&x.dispose(i,n);return}if(!b.get("show")||S&&x.unusable){S&&x.remove&&x.remove(i,n);return}d(b,x,g),b.setIconStatus=function(T,M){var D=this.option,I=this.iconPaths;D.iconStatus=D.iconStatus||{},D.iconStatus[T]=M,I[T]&&(M==="emphasis"?Nn:Fn)(I[T])},x instanceof We&&x.render&&x.render(b,i,n,a)}function d(p,v,g){var m=p.getModel("iconStyle"),_=p.getModel(["emphasis","iconStyle"]),b=v instanceof We&&v.getIcons?v.getIcons():p.get("icon"),x=p.get("title")||{},C,S;U(b)?(C={},C[g]=b):C=b,U(x)?(S={},S[g]=x):S=x;var T=p.iconPaths={};A(C,function(M,D){var I=To(M,{},{x:-s/2,y:-s/2,width:s,height:s});I.setStyle(m.getItemStyle());var P=I.ensureState("emphasis");P.style=_.getItemStyle();var k=new Vt({style:{text:S[D],align:_.get("textAlign"),borderRadius:_.get("textBorderRadius"),padding:_.get("textPadding"),fill:null,font:F0({fontStyle:_.get("textFontStyle"),fontFamily:_.get("textFontFamily"),fontSize:_.get("textFontSize"),fontWeight:_.get("textFontWeight")},i)},ignore:!0});I.setTextContent(k),Ml({el:I,componentModel:e,itemName:D,formatterParamsExtra:{title:S[D]}}),I.__title=S[D],I.on("mouseover",function(){var R=_.getItemStyle(),L=l?e.get("right")==null&&e.get("left")!=="right"?"right":"left":e.get("bottom")==null&&e.get("top")!=="bottom"?"bottom":"top";k.setStyle({fill:_.get("textFill")||R.fill||R.stroke||"#000",backgroundColor:_.get("textBackgroundColor")}),I.setTextConfig({position:_.get("textPosition")||L}),k.ignore=!e.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){p.get(["iconStatus",D])!=="emphasis"&&n.leaveEmphasis(this),k.hide()}),(p.get(["iconStatus",D])==="emphasis"?Nn:Fn)(I),o.add(I),I.on("click",ct(v.onclick,v,i,n,D)),T[D]=I})}FR(o,e,n),o.add(BR(o.getBoundingRect(),e)),l||o.eachChild(function(p){var v=p.__title,g=p.ensureState("emphasis"),m=g.textConfig||(g.textConfig={}),_=p.getTextContent(),b=_&&_.ensureState("emphasis");if(b&&!tt(b)&&v){var x=b.style||(b.style={}),C=cl(v,Vt.makeFont(x)),S=p.x+o.x,T=p.y+o.y+s,M=!1;T+C.height>n.getHeight()&&(m.position="top",M=!0);var D=M?-5-C.height:s+10;S+C.width/2>n.getWidth()?(m.position=["100%",D],x.align="right"):S-C.width/2<0&&(m.position=[0,D],x.align="left")}})},t.prototype.updateView=function(e,i,n,a){A(this._features,function(o){o instanceof We&&o.updateView&&o.updateView(o.model,i,n,a)})},t.prototype.remove=function(e,i){A(this._features,function(n){n instanceof We&&n.remove&&n.remove(e,i)}),this.group.removeAll()},t.prototype.dispose=function(e,i){A(this._features,function(n){n instanceof We&&n.dispose&&n.dispose(e,i)})},t.type="toolbox",t})(Jt);function VR(r){return r.indexOf("my")===0}var HR=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,i){var n=this.model,a=n.get("name")||e.get("title.0.text")||"echarts",o=i.getZr().painter.getType()==="svg",s=o?"svg":n.get("type",!0)||"png",l=i.getConnectedDataURL({type:s,backgroundColor:n.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),u=J.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var h=document.createElement("a");h.download=a+"."+s,h.target="_blank",h.href=l;var c=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});h.dispatchEvent(c)}else if(window.navigator.msSaveOrOpenBlob||o){var f=l.split(","),d=f[0].indexOf("base64")>-1,p=o?decodeURIComponent(f[1]):f[1];d&&(p=window.atob(p));var v=a+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=p.length,m=new Uint8Array(g);g--;)m[g]=p.charCodeAt(g);var _=new Blob([m]);window.navigator.msSaveOrOpenBlob(_,v)}else{var b=document.createElement("iframe");document.body.appendChild(b);var x=b.contentWindow,C=x.document;C.open("image/svg+xml","replace"),C.write(p),C.close(),x.focus(),C.execCommand("SaveAs",!0,v),document.body.removeChild(b)}}else{var S=n.get("lang"),T='<body style="margin:0;"><img src="'+l+'" style="max-width:100%;" title="'+(S&&S[0]||"")+'" /></body>',M=window.open();M.document.write(T),M.document.title=a}},t.getDefaultOption=function(e){var i={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:e.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:e.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return i},t})(We),cm="__ec_magicType_stack__",WR=[["line","bar"],["stack"]],GR=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getIcons=function(){var e=this.model,i=e.get("icon"),n={};return A(e.get("type"),function(a){i[a]&&(n[a]=i[a])}),n},t.getDefaultOption=function(e){var i={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:e.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return i},t.prototype.onclick=function(e,i,n){var a=this.model,o=a.get(["seriesIndex",n]);if(fm[n]){var s={series:[]},l=function(c){var f=c.subType,d=c.id,p=fm[n](f,d,c,a);p&&(lt(p,c.option),s.series.push(p));var v=c.coordinateSystem;if(v&&v.type==="cartesian2d"&&(n==="line"||n==="bar")){var g=v.getAxesByScale("ordinal")[0];if(g){var m=g.dim,_=m+"Axis",b=c.getReferringComponents(_,re).models[0],x=b.componentIndex;s[_]=s[_]||[];for(var C=0;C<=x;C++)s[_][x]=s[_][x]||{};s[_][x].boundaryGap=n==="bar"}}};A(WR,function(c){pt(c,n)>=0&&A(c,function(f){a.setIconStatus(f,"normal")})}),a.setIconStatus(n,"emphasis"),e.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,h=n;n==="stack"&&(u=st({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",n])!=="emphasis"&&(h="tiled")),i.dispatchAction({type:"changeMagicType",currentType:h,newOption:s,newTitle:u,featureName:"magicType"})}},t})(We),fm={line:function(r,t,e,i){if(r==="bar")return st({id:t,type:"line",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(r,t,e,i){if(r==="line")return st({id:t,type:"bar",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(r,t,e,i){var n=e.get("stack")===cm;if(r==="line"||r==="bar")return i.setIconStatus("stack",n?"normal":"emphasis"),st({id:t,stack:n?"":cm},i.get(["option","stack"])||{},!0)}};Ke({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,t){t.mergeOption(r.newOption)});var Wl=new Array(60).join("-"),Wn=" ";function $R(r){var t={},e=[],i=[];return r.eachRawSeries(function(n){var a=n.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var o=a.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;t[s]||(t[s]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},i.push({axisDim:o.dim,axisIndex:o.index})),t[s].series.push(n)}else e.push(n)}else e.push(n)}),{seriesGroupByCategoryAxis:t,other:e,meta:i}}function UR(r){var t=[];return A(r,function(e,i){var n=e.categoryAxis,a=e.valueAxis,o=a.dim,s=[" "].concat(V(e.series,function(d){return d.name})),l=[n.model.getCategories()];A(e.series,function(d){var p=d.getRawData();l.push(d.getRawData().mapArray(p.mapDimension(o),function(v){return v}))});for(var u=[s.join(Wn)],h=0;h<l[0].length;h++){for(var c=[],f=0;f<l.length;f++)c.push(l[f][h]);u.push(c.join(Wn))}t.push(u.join(`
|
|
38
|
+
`))}),t.join(`
|
|
39
|
+
|
|
40
|
+
`+Wl+`
|
|
41
|
+
|
|
42
|
+
`)}function YR(r){return V(r,function(t){var e=t.getRawData(),i=[t.name],n=[];return e.each(e.dimensions,function(){for(var a=arguments.length,o=arguments[a-1],s=e.getName(o),l=0;l<a-1;l++)n[l]=arguments[l];i.push((s?s+Wn:"")+n.join(Wn))}),i.join(`
|
|
43
|
+
`)}).join(`
|
|
44
|
+
|
|
45
|
+
`+Wl+`
|
|
46
|
+
|
|
47
|
+
`)}function XR(r){var t=$R(r);return{value:It([UR(t.seriesGroupByCategoryAxis),YR(t.other)],function(e){return!!e.replace(/[\n\t\s]/g,"")}).join(`
|
|
48
|
+
|
|
49
|
+
`+Wl+`
|
|
50
|
+
|
|
51
|
+
`),meta:t.meta}}function Js(r){return r.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function ZR(r){var t=r.slice(0,r.indexOf(`
|
|
52
|
+
`));if(t.indexOf(Wn)>=0)return!0}var kc=new RegExp("["+Wn+"]+","g");function qR(r){for(var t=r.split(/\n+/g),e=Js(t.shift()).split(kc),i=[],n=V(e,function(l){return{name:l,data:[]}}),a=0;a<t.length;a++){var o=Js(t[a]).split(kc);i.push(o.shift());for(var s=0;s<o.length;s++)n[s]&&(n[s].data[a]=o[s])}return{series:n,categories:i}}function KR(r){for(var t=r.split(/\n+/g),e=Js(t.shift()),i=[],n=0;n<t.length;n++){var a=Js(t[n]);if(a){var o=a.split(kc),s="",l=void 0,u=!1;isNaN(o[0])?(u=!0,s=o[0],o=o.slice(1),i[n]={name:s,value:[]},l=i[n].value):l=i[n]=[];for(var h=0;h<o.length;h++)l.push(+o[h]);l.length===1&&(u?i[n].value=l[0]:i[n]=l[0])}}return{name:e,data:i}}function JR(r,t){var e=r.split(new RegExp(`
|
|
53
|
+
*`+Wl+`
|
|
54
|
+
*`,"g")),i={series:[]};return A(e,function(n,a){if(ZR(n)){var o=qR(n),s=t[a],l=s.axisDim+"Axis";s&&(i[l]=i[l]||[],i[l][s.axisIndex]={data:o.categories},i.series=i.series.concat(o.series))}else{var o=KR(n);i.series.push(o)}}),i}var QR=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,i){setTimeout(function(){i.dispatchAction({type:"hideTip"})});var n=i.getDom(),a=this.model;this._dom&&n.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",o.style.backgroundColor=a.get("backgroundColor")||"#fff";var s=document.createElement("h4"),l=a.get("lang")||[];s.innerHTML=l[0]||a.get("title"),s.style.cssText="margin:10px 20px",s.style.color=a.get("textColor");var u=document.createElement("div"),h=document.createElement("textarea");u.style.cssText="overflow:auto";var c=a.get("optionToContent"),f=a.get("contentToOption"),d=XR(e);if(tt(c)){var p=c(i.getOption());U(p)?u.innerHTML=p:Vi(p)&&u.appendChild(p)}else{h.readOnly=a.get("readOnly");var v=h.style;v.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",v.color=a.get("textColor"),v.borderColor=a.get("textareaBorderColor"),v.backgroundColor=a.get("textareaColor"),h.value=d.value,u.appendChild(h)}var g=d.meta,m=document.createElement("div");m.style.cssText="position:absolute;bottom:5px;left:0;right:0";var _="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",b=document.createElement("div"),x=document.createElement("div");_+=";background-color:"+a.get("buttonColor"),_+=";color:"+a.get("buttonTextColor");var C=this;function S(){n.removeChild(o),C._dom=null}Ph(b,"click",S),Ph(x,"click",function(){if(f==null&&c!=null||f!=null&&c==null){S();return}var T;try{tt(f)?T=f(u,i.getOption()):T=JR(h.value,g)}catch(M){throw S(),new Error("Data view format error "+M)}T&&i.dispatchAction({type:"changeDataView",newOption:T}),S()}),b.innerHTML=l[1],x.innerHTML=l[2],x.style.cssText=b.style.cssText=_,!a.get("readOnly")&&m.appendChild(x),m.appendChild(b),o.appendChild(s),o.appendChild(u),o.appendChild(m),u.style.height=n.clientHeight-80+"px",n.appendChild(o),this._dom=o},t.prototype.remove=function(e,i){this._dom&&i.getDom().removeChild(this._dom)},t.prototype.dispose=function(e,i){this.remove(e,i)},t.getDefaultOption=function(e){var i={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:e.getLocaleModel().get(["toolbox","dataView","title"]),lang:e.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"};return i},t})(We);function tL(r,t){return V(r,function(e,i){var n=t&&t[i];if(q(n)&&!W(n)){var a=q(e)&&!W(e);a||(e={value:e});var o=n.name!=null&&e.name==null;return e=lt(e,n),o&&delete e.name,e}else return e})}Ke({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(r,t){var e=[];A(r.newOption.series,function(i){var n=t.getSeriesByName(i.name)[0];if(!n)e.push(N({type:"scatter"},i));else{var a=n.get("data");e.push({name:i.name,data:tL(i.data,a)})}}),t.mergeOption(lt({series:e},r.newOption))});var fx=A,dx=kt();function eL(r,t){var e=cd(r);fx(t,function(i,n){for(var a=e.length-1;a>=0;a--){var o=e[a];if(o[n])break}if(a<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(s){var l=s.getPercentRange();e[0][n]={dataZoomId:n,start:l[0],end:l[1]}}}}),e.push(t)}function rL(r){var t=cd(r),e=t[t.length-1];t.length>1&&t.pop();var i={};return fx(e,function(n,a){for(var o=t.length-1;o>=0;o--)if(n=t[o][a],n){i[a]=n;break}}),i}function iL(r){dx(r).snapshots=null}function nL(r){return cd(r).length}function cd(r){var t=dx(r);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var aL=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,i){iL(e),i.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(e){var i={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:e.getLocaleModel().get(["toolbox","restore","title"])};return i},t})(We);Ke({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,t){t.resetOption("recreate")});var oL=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],px=(function(){function r(t,e,i){var n=this;this._targetInfoList=[];var a=dm(e,t);A(sL,function(o,s){(!i||!i.include||pt(i.include,s)>=0)&&o(a,n._targetInfoList)})}return r.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,function(i,n,a){if((i.coordRanges||(i.coordRanges=[])).push(n),!i.coordRange){i.coordRange=n;var o=hh[i.brushType](0,a,n);i.__rangeOffset={offset:mm[i.brushType](o.values,i.range,[1,1]),xyMinMax:o.xyMinMax}}}),t},r.prototype.matchOutputRanges=function(t,e,i){A(t,function(n){var a=this.findTargetInfo(n,e);a&&a!==!0&&A(a.coordSyses,function(o){var s=hh[n.brushType](1,o,n.range,!0);i(n,s.values,o,e)})},this)},r.prototype.setInputRanges=function(t,e){A(t,function(i){var n=this.findTargetInfo(i,e);if(i.range=i.range||[],n&&n!==!0){i.panelId=n.panelId;var a=hh[i.brushType](0,n.coordSys,i.coordRange),o=i.__rangeOffset;i.range=o?mm[i.brushType](a.values,o.offset,lL(a.xyMinMax,o.xyMinMax)):a.values}},this)},r.prototype.makePanelOpts=function(t,e){return V(this._targetInfoList,function(i){var n=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:e?e(i):null,clipPath:qk(n),isTargetByCursor:Jk(n,t,i.coordSysModel),getLinearBrushOtherExtent:Kk(n)}})},r.prototype.controlSeries=function(t,e,i){var n=this.findTargetInfo(t,i);return n===!0||n&&pt(n.coordSyses,e.coordinateSystem)>=0},r.prototype.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=dm(e,t),a=0;a<i.length;a++){var o=i[a],s=t.panelId;if(s){if(o.panelId===s)return o}else for(var l=0;l<pm.length;l++)if(pm[l](n,o))return o}return!0},r})();function Rc(r){return r[0]>r[1]&&r.reverse(),r}function dm(r,t){return ka(r,t,{includeMainTypes:oL})}var sL={grid:function(r,t){var e=r.xAxisModels,i=r.yAxisModels,n=r.gridModels,a=nt(),o={},s={};!e&&!i&&!n||(A(e,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),A(i,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),A(n,function(l){a.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,h=[];A(u.getCartesians(),function(c,f){(pt(e,c.getAxis("x").model)>=0||pt(i,c.getAxis("y").model)>=0)&&h.push(c)}),t.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:h[0],coordSyses:h,getPanelRect:vm.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,t){A(r.geoModels,function(e){var i=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:i,coordSyses:[i],getPanelRect:vm.geo})})}},pm=[function(r,t){var e=r.xAxisModel,i=r.yAxisModel,n=r.gridModel;return!n&&e&&(n=e.axis.grid.model),!n&&i&&(n=i.axis.grid.model),n&&n===t.gridModel},function(r,t){var e=r.geoModel;return e&&e===t.geoModel}],vm={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,t=r.getBoundingRect().clone();return t.applyTransform(Tl(r)),t}},hh={lineX:Ct(gm,0),lineY:Ct(gm,1),rect:function(r,t,e,i){var n=r?t.pointToData([e[0][0],e[1][0]],i):t.dataToPoint([e[0][0],e[1][0]],i),a=r?t.pointToData([e[0][1],e[1][1]],i):t.dataToPoint([e[0][1],e[1][1]],i),o=[Rc([n[0],a[0]]),Rc([n[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(r,t,e,i){var n=[[1/0,-1/0],[1/0,-1/0]],a=V(e,function(o){var s=r?t.pointToData(o,i):t.dataToPoint(o,i);return n[0][0]=Math.min(n[0][0],s[0]),n[1][0]=Math.min(n[1][0],s[1]),n[0][1]=Math.max(n[0][1],s[0]),n[1][1]=Math.max(n[1][1],s[1]),s});return{values:a,xyMinMax:n}}};function gm(r,t,e,i){var n=e.getAxis(["x","y"][r]),a=Rc(V([0,1],function(s){return t?n.coordToData(n.toLocalCoord(i[s]),!0):n.toGlobalCoord(n.dataToCoord(i[s]))})),o=[];return o[r]=a,o[1-r]=[NaN,NaN],{values:a,xyMinMax:o}}var mm={lineX:Ct(ym,0),lineY:Ct(ym,1),rect:function(r,t,e){return[[r[0][0]-e[0]*t[0][0],r[0][1]-e[0]*t[0][1]],[r[1][0]-e[1]*t[1][0],r[1][1]-e[1]*t[1][1]]]},polygon:function(r,t,e){return V(r,function(i,n){return[i[0]-e[0]*t[n][0],i[1]-e[1]*t[n][1]]})}};function ym(r,t,e,i){return[t[0]-i[r]*e[0],t[1]-i[r]*e[1]]}function lL(r,t){var e=_m(r),i=_m(t),n=[e[0]/i[0],e[1]/i[1]];return isNaN(n[0])&&(n[0]=1),isNaN(n[1])&&(n[1]=1),n}function _m(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var Lc=A,uL=_C("toolbox-dataZoom_"),hL=(function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,i,n,a){this._brushController||(this._brushController=new Vk(n.getZr()),this._brushController.on("brush",ct(this._onBrush,this)).mount()),dL(e,i,this,a,n),fL(e,i)},t.prototype.onclick=function(e,i,n){cL[n].call(this)},t.prototype.remove=function(e,i){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,i){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var i=e.areas;if(!e.isEnd||!i.length)return;var n={},a=this.ecModel;this._brushController.updateCovers([]);var o=new px(fd(this.model),a,{include:["grid"]});o.matchOutputRanges(i,a,function(u,h,c){if(c.type==="cartesian2d"){var f=u.brushType;f==="rect"?(s("x",c,h[0]),s("y",c,h[1])):s({lineX:"x",lineY:"y"}[f],c,h)}}),eL(a,n),this._dispatchZoomAction(n);function s(u,h,c){var f=h.getAxis(u),d=f.model,p=l(u,d,a),v=p.findRepresentativeAxisProxy(d).getMinMaxSpan();(v.minValueSpan!=null||v.maxValueSpan!=null)&&(c=Ub(0,c.slice(),f.scale.getExtent(),0,v.minValueSpan,v.maxValueSpan)),p&&(n[p.id]={dataZoomId:p.id,startValue:c[0],endValue:c[1]})}function l(u,h,c){var f;return c.eachComponent({mainType:"dataZoom",subType:"select"},function(d){var p=d.getAxisModel(u,h.componentIndex);p&&(f=d)}),f}},t.prototype._dispatchZoomAction=function(e){var i=[];Lc(e,function(n,a){i.push(it(n))}),i.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:i})},t.getDefaultOption=function(e){var i={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:e.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return i},t})(We),cL={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(rL(this.ecModel))}};function fd(r){var t={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex="all"),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex="all"),t}function fL(r,t){r.setIconStatus("back",nL(t)>1?"emphasis":"normal")}function dL(r,t,e,i,n){var a=e._isZoomActive;i&&i.type==="takeGlobalCursor"&&(a=i.key==="dataZoomSelect"?i.dataZoomSelectActive:!1),e._isZoomActive=a,r.setIconStatus("zoom",a?"emphasis":"normal");var o=new px(fd(r),t,{include:["grid"]}),s=o.makePanelOpts(n,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});e._brushController.setPanels(s).enableBrush(a&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}lM("dataZoom",function(r){var t=r.getComponent("toolbox",0),e=["feature","dataZoom"];if(!t||t.get(e)==null)return;var i=t.getModel(e),n=[],a=fd(i),o=ka(r,a);Lc(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),Lc(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,h){var c=l.componentIndex,f={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:uL+u+c};f[h]=c,n.push(f)}return n});function pL(r){r.registerComponentModel(NR),r.registerComponentView(zR),ga("saveAsImage",HR),ga("magicType",GR),ga("dataView",QR),ga("dataZoom",hL),ga("restore",aL),Ui(jR)}var vL=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},t})(dt);function vx(r){var t=r.get("confine");return t!=null?!!t:r.get("renderMode")==="richText"}function gx(r){if(J.domSupported){for(var t=document.documentElement.style,e=0,i=r.length;e<i;e++)if(r[e]in t)return r[e]}}var mx=gx(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),gL=gx(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function yx(r,t){if(!r)return t;t=Df(t,!0);var e=r.indexOf(t);return r=e===-1?t:"-"+r.slice(0,e)+"-"+t,r.toLowerCase()}function mL(r,t){var e=r.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(r);return e?e[t]:null}var yL=yx(gL,"transition"),dd=yx(mx,"transform"),_L="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(J.transform3dSupported?"will-change:transform;":"");function bL(r){return r=r==="left"?"right":r==="right"?"left":r==="top"?"bottom":"top",r}function xL(r,t,e){if(!U(e)||e==="inside")return"";var i=r.get("backgroundColor"),n=r.get("borderWidth");t=Gi(t);var a=bL(e),o=Math.max(Math.round(n)*1.5,6),s="",l=dd+":",u;pt(["left","right"],a)>-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var h=u*Math.PI/180,c=o+n,f=c*Math.abs(Math.cos(h))+c*Math.abs(Math.sin(h)),d=Math.round(((f-Math.SQRT2*n)/2+Math.SQRT2*n-(f-c)/2)*100)/100;s+=";"+a+":-"+d+"px";var p=t+" solid "+n+"px;",v=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+i+";"];return'<div style="'+v.join("")+'"></div>'}function wL(r,t){var e="cubic-bezier(0.23,1,0.32,1)",i=" "+r/2+"s "+e,n="opacity"+i+",visibility"+i;return t||(i=" "+r+"s "+e,n+=J.transformSupported?","+dd+i:",left"+i+",top"+i),yL+":"+n}function bm(r,t,e){var i=r.toFixed(0)+"px",n=t.toFixed(0)+"px";if(!J.transformSupported)return e?"top:"+n+";left:"+i+";":[["top",n],["left",i]];var a=J.transform3dSupported,o="translate"+(a?"3d":"")+"("+i+","+n+(a?",0":"")+")";return e?"top:0;left:0;"+dd+":"+o+";":[["top",0],["left",0],[mx,o]]}function SL(r){var t=[],e=r.get("fontSize"),i=r.getTextColor();i&&t.push("color:"+i),t.push("font:"+r.getFont());var n=Q(r.get("lineHeight"),Math.round(e*3/2));e&&t.push("line-height:"+n+"px");var a=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return a&&o&&t.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),A(["decoration","align"],function(u){var h=r.get(u);h&&t.push("text-"+u+":"+h)}),t.join(";")}function CL(r,t,e){var i=[],n=r.get("transitionDuration"),a=r.get("backgroundColor"),o=r.get("shadowBlur"),s=r.get("shadowColor"),l=r.get("shadowOffsetX"),u=r.get("shadowOffsetY"),h=r.getModel("textStyle"),c=S_(r,"html"),f=l+"px "+u+"px "+o+"px "+s;return i.push("box-shadow:"+f),t&&n&&i.push(wL(n,e)),a&&i.push("background-color:"+a),A(["width","color","radius"],function(d){var p="border-"+d,v=Df(p),g=r.get(v);g!=null&&i.push(p+":"+g+(d==="color"?"":"px"))}),i.push(SL(h)),c!=null&&i.push("padding:"+Do(c).join("px ")+"px"),i.join(";")+";"}function xm(r,t,e,i,n){var a=t&&t.painter;if(e){var o=a&&a.getViewportRoot();o&&N1(r,o,e,i,n)}else{r[0]=i,r[1]=n;var s=a&&a.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var TL=(function(){function r(t,e){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,J.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var n=this._zr=t.getZr(),a=e.appendTo,o=a&&(U(a)?document.querySelector(a):Vi(a)?a:tt(a)&&a(t.getDom()));xm(this._styleCoord,n,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(i),this._api=t,this._container=o;var s=this;i.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},i.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=n.handler,h=n.painter.getViewportRoot();Ae(h,l,!0),u.dispatch("mousemove",l)}},i.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(t){if(!this._container){var e=this._api.getDom(),i=mL(e,"position"),n=e.style;n.position!=="absolute"&&i!=="absolute"&&(n.position="relative")}var a=t.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this.el.className=t.get("className")||""},r.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var i=this.el,n=i.style,a=this._styleCoord;i.innerHTML?n.cssText=_L+CL(t,!this._firstShow,this._longHide)+bm(a[0],a[1],!0)+("border-color:"+Gi(e)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):n.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(t,e,i,n,a){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(U(a)&&i.get("trigger")==="item"&&!vx(i)&&(s=xL(i,n,a)),U(t))o.innerHTML=t+s;else if(t){o.innerHTML="",W(t)||(t=[t]);for(var l=0;l<t.length;l++)Vi(t[l])&&t[l].parentNode!==o&&o.appendChild(t[l]);if(s&&o.childNodes.length){var u=document.createElement("div");u.innerHTML=s,o.appendChild(u)}}},r.prototype.setEnterable=function(t){this._enterable=t},r.prototype.getSize=function(){var t=this.el;return t?[t.offsetWidth,t.offsetHeight]:[0,0]},r.prototype.moveTo=function(t,e){if(this.el){var i=this._styleCoord;if(xm(i,this._zr,this._container,t,e),i[0]!=null&&i[1]!=null){var n=this.el.style,a=bm(i[0],i[1]);A(a,function(o){n[o[0]]=o[1]})}}},r.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},r.prototype.hide=function(){var t=this,e=this.el.style;e.visibility="hidden",e.opacity="0",J.transform3dSupported&&(e.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return t._longHide=!0},500)},r.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(ct(this.hide,this),t)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var t=this.el.parentNode;t&&t.removeChild(this.el),this.el=this._container=null},r})(),AL=(function(){function r(t){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=t.getZr(),Sm(this._styleCoord,this._zr,t.getWidth()/2,t.getHeight()/2)}return r.prototype.update=function(t){var e=t.get("alwaysShowContent");e&&this._moveIfResized(),this._alwaysShowContent=e},r.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},r.prototype.setContent=function(t,e,i,n,a){var o=this;q(t)&&fe(""),this.el&&this._zr.remove(this.el);var s=i.getModel("textStyle");this.el=new Vt({style:{rich:e.richTextStyles,text:t,lineHeight:22,borderWidth:1,borderColor:n,textShadowColor:s.get("textShadowColor"),fill:i.get(["textStyle","color"]),padding:S_(i,"richText"),verticalAlign:"top",align:"left"},z:i.get("z")}),A(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){o.el.style[u]=i.get(u)}),A(["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(t){this._enterable=t},r.prototype.getSize=function(){var t=this.el,e=this.el.getBoundingRect(),i=wm(t.style);return[e.width+i.left+i.right,e.height+i.top+i.bottom]},r.prototype.moveTo=function(t,e){var i=this.el;if(i){var n=this._styleCoord;Sm(n,this._zr,t,e),t=n[0],e=n[1];var a=i.style,o=Er(a.borderWidth||0),s=wm(a);i.x=t+o+s.left,i.y=e+o+s.top,i.markRedraw()}},r.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},r.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},r.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(ct(this.hide,this),t)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){this._zr.remove(this.el)},r})();function Er(r){return Math.max(0,r)}function wm(r){var t=Er(r.shadowBlur||0),e=Er(r.shadowOffsetX||0),i=Er(r.shadowOffsetY||0);return{left:Er(t-e),right:Er(t+e),top:Er(t-i),bottom:Er(t+i)}}function Sm(r,t,e,i){r[0]=e,r[1]=i,r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var ML=new Ft({shape:{x:-1,y:-1,width:2,height:2}}),DL=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,i){if(!(J.node||!i.getDom())){var n=e.getComponent("tooltip"),a=this._renderMode=TC(n.get("renderMode"));this._tooltipContent=a==="richText"?new AL(i):new TL(i,{appendTo:n.get("appendToBody",!0)?"body":n.get("appendTo",!0)})}},t.prototype.render=function(e,i,n){if(!(J.node||!n.getDom())){this.group.removeAll(),this._tooltipModel=e,this._ecModel=i,this._api=n;var a=this._tooltipContent;a.update(e),a.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&e.get("transitionDuration")?A_(this,"_updatePosition",50,"fixRate"):uc(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel,i=e.get("triggerOn");sx("itemTooltip",this._api,ct(function(n,a,o){i!=="none"&&(i.indexOf(n)>=0?this._tryShow(a,o):n==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,i=this._ecModel,n=this._api,a=e.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&o.manuallyShowTip(e,i,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,i,n,a){if(!(a.from===this.uid||J.node||!n.getDom())){var o=Cm(a,n);this._ticket="";var s=a.dataByCoordSys,l=RL(a,i,n);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var h=ML;h.x=a.x,h.y=a.y,h.update(),_t(h).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:h},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(e,i,n,a))return;var c=lx(a,i),f=c.point[0],d=c.point[1];f!=null&&d!=null&&this._tryShow({offsetX:f,offsetY:d,target:c.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(n.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:n.getZr().findHover(a.x,a.y).target},o))}},t.prototype.manuallyHideTip=function(e,i,n,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(Cm(a,n))},t.prototype._manuallyAxisShowTip=function(e,i,n,a){var o=a.seriesIndex,s=a.dataIndex,l=i.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=i.getSeriesByIndex(o);if(u){var h=u.getData(),c=ma([h.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(c.get("trigger")==="axis")return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},t.prototype._tryShow=function(e,i){var n=e.target,a=this._tooltipModel;if(a){this._lastX=e.offsetX,this._lastY=e.offsetY;var o=e.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,e);else if(n){var s=_t(n);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Ta(n,function(h){if(_t(h).dataIndex!=null)return l=h,!0;if(_t(h).tooltipConfig!=null)return u=h,!0},!0),l?this._showSeriesItemTooltip(e,l,i):u?this._showComponentItemTooltip(e,u,i):this._hide(i)}else this._lastDataByCoordSys=null,this._hide(i)}},t.prototype._showOrMove=function(e,i){var n=e.get("showDelay");i=ct(i,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(i,n):i()},t.prototype._showAxisTooltip=function(e,i){var n=this._ecModel,a=this._tooltipModel,o=[i.offsetX,i.offsetY],s=ma([i.tooltipOption],a),l=this._renderMode,u=[],h=zn("section",{blocks:[],noHeader:!0}),c=[],f=new zu;A(e,function(_){A(_.dataByAxis,function(b){var x=n.getComponent(b.axisDim+"Axis",b.axisIndex),C=b.value;if(!(!x||C==null)){var S=ax(C,x.axis,n,b.seriesDataIndices,b.valueLabelOpt),T=zn("section",{header:S,noHeader:!Ge(S),sortBlocks:!0,blocks:[]});h.blocks.push(T),A(b.seriesDataIndices,function(M){var D=n.getSeriesByIndex(M.seriesIndex),I=M.dataIndexInside,P=D.getDataParams(I);if(!(P.dataIndex<0)){P.axisDim=b.axisDim,P.axisIndex=b.axisIndex,P.axisType=b.axisType,P.axisId=b.axisId,P.axisValue=Qf(x.axis,{value:C}),P.axisValueLabel=S,P.marker=f.makeTooltipMarker("item",Gi(P.color),l);var k=wv(D.formatTooltip(I,!0,null)),R=k.frag;if(R){var L=ma([D],a).get("valueFormatter");T.blocks.push(L?N({valueFormatter:L},R):R)}k.text&&c.push(k.text),u.push(P)}})}})}),h.blocks.reverse(),c.reverse();var d=i.position,p=s.get("order"),v=Mv(h,f,l,p,n.get("useUTC"),s.get("textStyle"));v&&c.unshift(v);var g=l==="richText"?`
|
|
55
|
+
|
|
56
|
+
`:"<br/>",m=c.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(e,u)?this._updatePosition(s,d,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,m,u,Math.random()+"",o[0],o[1],d,null,f)})},t.prototype._showSeriesItemTooltip=function(e,i,n){var a=this._ecModel,o=_t(i),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,h=o.dataIndex,c=o.dataType,f=u.getData(c),d=this._renderMode,p=e.positionDefault,v=ma([f.getItemModel(h),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),g=v.get("trigger");if(!(g!=null&&g!=="item")){var m=u.getDataParams(h,c),_=new zu;m.marker=_.makeTooltipMarker("item",Gi(m.color),d);var b=wv(u.formatTooltip(h,!1,c)),x=v.get("order"),C=v.get("valueFormatter"),S=b.frag,T=S?Mv(C?N({valueFormatter:C},S):S,_,d,x,a.get("useUTC"),v.get("textStyle")):b.text,M="item_"+u.name+"_"+h;this._showOrMove(v,function(){this._showTooltipContent(v,T,m,M,e.offsetX,e.offsetY,e.position,e.target,_)}),n({type:"showTip",dataIndexInside:h,dataIndex:f.getRawIndex(h),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,i,n){var a=this._renderMode==="html",o=_t(i),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(U(l)){var h=l;l={content:h,formatter:h},u=!0}u&&a&&l.content&&(l=it(l),l.content=Kt(l.content));var c=[l],f=this._ecModel.getComponent(o.componentMainType,o.componentIndex);f&&c.push(f),c.push({formatter:l.content});var d=e.positionDefault,p=ma(c,this._tooltipModel,d?{position:d}:null),v=p.get("content"),g=Math.random()+"",m=new zu;this._showOrMove(p,function(){var _=it(p.get("formatterParams")||{});this._showTooltipContent(p,v,_,g,e.offsetX,e.offsetY,e.position,i,m)}),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,i,n,a,o,s,l,u,h){if(this._ticket="",!(!e.get("showContent")||!e.get("show"))){var c=this._tooltipContent;c.setEnterable(e.get("enterable"));var f=e.get("formatter");l=l||e.get("position");var d=i,p=this._getNearestPoint([o,s],n,e.get("trigger"),e.get("borderColor")),v=p.color;if(f)if(U(f)){var g=e.ecModel.get("useUTC"),m=W(n)?n[0]:n,_=m&&m.axisType&&m.axisType.indexOf("time")>=0;d=f,_&&(d=Mo(m.axisValue,d,g)),d=If(d,n,!0)}else if(tt(f)){var b=ct(function(x,C){x===this._ticket&&(c.setContent(C,h,e,v,l),this._updatePosition(e,l,o,s,c,n,u))},this);this._ticket=a,d=f(n,a,b)}else d=f;c.setContent(d,h,e,v,l),c.show(e,v),this._updatePosition(e,l,o,s,c,n,u)}},t.prototype._getNearestPoint=function(e,i,n,a){if(n==="axis"||W(i))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!W(i))return{color:a||i.color||i.borderColor}},t.prototype._updatePosition=function(e,i,n,a,o,s,l){var u=this._api.getWidth(),h=this._api.getHeight();i=i||e.get("position");var c=o.getSize(),f=e.get("align"),d=e.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),tt(i)&&(i=i([n,a],s,o.el,p,{viewSize:[u,h],contentSize:c.slice()})),W(i))n=ee(i[0],u),a=ee(i[1],h);else if(q(i)){var v=i;v.width=c[0],v.height=c[1];var g=Ki(v,{width:u,height:h});n=g.x,a=g.y,f=null,d=null}else if(U(i)&&l){var m=kL(i,p,c,e.get("borderWidth"));n=m[0],a=m[1]}else{var m=IL(n,a,o,u,h,f?null:20,d?null:20);n=m[0],a=m[1]}if(f&&(n-=Tm(f)?c[0]/2:f==="right"?c[0]:0),d&&(a-=Tm(d)?c[1]/2:d==="bottom"?c[1]:0),vx(e)){var m=PL(n,a,o,u,h);n=m[0],a=m[1]}o.moveTo(n,a)},t.prototype._updateContentNotChangedOnAxis=function(e,i){var n=this._lastDataByCoordSys,a=this._cbParamsList,o=!!n&&n.length===e.length;return o&&A(n,function(s,l){var u=s.dataByAxis||[],h=e[l]||{},c=h.dataByAxis||[];o=o&&u.length===c.length,o&&A(u,function(f,d){var p=c[d]||{},v=f.seriesDataIndices||[],g=p.seriesDataIndices||[];o=o&&f.value===p.value&&f.axisType===p.axisType&&f.axisId===p.axisId&&v.length===g.length,o&&A(v,function(m,_){var b=g[_];o=o&&m.seriesIndex===b.seriesIndex&&m.dataIndex===b.dataIndex}),a&&A(f.seriesDataIndices,function(m){var _=m.seriesIndex,b=i[_],x=a[_];b&&x&&x.data!==b.data&&(o=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=i,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,i){J.node||!i.getDom()||(uc(this,"_updatePosition"),this._tooltipContent.dispose(),Pc("itemTooltip",i))},t.type="tooltip",t})(Jt);function ma(r,t,e){var i=t.ecModel,n;e?(n=new Tt(e,i,i),n=new Tt(t.option,n,i)):n=t;for(var a=r.length-1;a>=0;a--){var o=r[a];o&&(o instanceof Tt&&(o=o.get("tooltip",!0)),U(o)&&(o={formatter:o}),o&&(n=new Tt(o,n,i)))}return n}function Cm(r,t){return r.dispatchAction||ct(t.dispatchAction,t)}function IL(r,t,e,i,n,a,o){var s=e.getSize(),l=s[0],u=s[1];return a!=null&&(r+l+a+2>i?r-=l+a:r+=a),o!=null&&(t+u+o>n?t-=u+o:t+=o),[r,t]}function PL(r,t,e,i,n){var a=e.getSize(),o=a[0],s=a[1];return r=Math.min(r+o,i)-o,t=Math.min(t+s,n)-s,r=Math.max(r,0),t=Math.max(t,0),[r,t]}function kL(r,t,e,i){var n=e[0],a=e[1],o=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=t.width,h=t.height;switch(r){case"inside":s=t.x+u/2-n/2,l=t.y+h/2-a/2;break;case"top":s=t.x+u/2-n/2,l=t.y-a-o;break;case"bottom":s=t.x+u/2-n/2,l=t.y+h+o;break;case"left":s=t.x-n-o,l=t.y+h/2-a/2;break;case"right":s=t.x+u+o,l=t.y+h/2-a/2}return[s,l]}function Tm(r){return r==="center"||r==="middle"}function RL(r,t,e){var i=of(r).queryOptionMap,n=i.keys()[0];if(!(!n||n==="series")){var a=yo(t,n,i.get(n),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=e.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var h=_t(u).tooltipConfig;if(h&&h.name===r.name)return l=u,!0}),l)return{componentMainType:n,componentIndex:o.componentIndex,el:l}}}}function LL(r){Ui(ux),r.registerComponentModel(vL),r.registerComponentView(DL),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Gt),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Gt)}var OL=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},t})(dt),EL=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n){if(this.group.removeAll(),!!e.get("show")){var a=this.group,o=e.getModel("textStyle"),s=e.getModel("subtextStyle"),l=e.get("textAlign"),u=Q(e.get("textBaseline"),e.get("textVerticalAlign")),h=new Vt({style:Ye(o,{text:e.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),c=h.getBoundingRect(),f=e.get("subtext"),d=new Vt({style:Ye(s,{text:f,fill:s.getTextColor(),y:c.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=e.get("link"),v=e.get("sublink"),g=e.get("triggerEvent",!0);h.silent=!p&&!g,d.silent=!v&&!g,p&&h.on("click",function(){nv(p,"_"+e.get("target"))}),v&&d.on("click",function(){nv(v,"_"+e.get("subtarget"))}),_t(h).eventData=_t(d).eventData=g?{componentType:"title",componentIndex:e.componentIndex}:null,a.add(h),f&&a.add(d);var m=a.getBoundingRect(),_=e.getBoxLayoutParams();_.width=m.width,_.height=m.height;var b=Ki(_,{width:n.getWidth(),height:n.getHeight()},e.get("padding"));l||(l=e.get("left")||e.get("right"),l==="middle"&&(l="center"),l==="right"?b.x+=b.width:l==="center"&&(b.x+=b.width/2)),u||(u=e.get("top")||e.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?b.y+=b.height:u==="middle"&&(b.y+=b.height/2),u=u||"top"),a.x=b.x,a.y=b.y,a.markRedraw();var x={align:l,verticalAlign:u};h.setStyle(x),d.setStyle(x),m=a.getBoundingRect();var C=b.margin,S=e.getItemStyle(["color","opacity"]);S.fill=e.get("backgroundColor");var T=new Ft({shape:{x:m.x-C[3],y:m.y-C[0],width:m.width+C[1]+C[3],height:m.height+C[0]+C[2],r:e.get("borderRadius")},style:S,subPixelOptimize:!0,silent:!0});a.add(T)}},t.type="title",t})(Jt);function jL(r){r.registerComponentModel(OL),r.registerComponentView(EL)}var Am=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode="box",e}return t.prototype.init=function(e,i,n){this.mergeDefaultAndTheme(e,n),this._initData()},t.prototype.mergeOption=function(e){r.prototype.mergeOption.apply(this,arguments),this._initData()},t.prototype.setCurrentIndex=function(e){e==null&&(e=this.option.currentIndex);var i=this._data.count();this.option.loop?e=(e%i+i)%i:(e>=i&&(e=i-1),e<0&&(e=0)),this.option.currentIndex=e},t.prototype.getCurrentIndex=function(){return this.option.currentIndex},t.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},t.prototype.setPlayState=function(e){this.option.autoPlay=!!e},t.prototype.getPlayState=function(){return!!this.option.autoPlay},t.prototype._initData=function(){var e=this.option,i=e.data||[],n=e.axisType,a=this._names=[],o;n==="category"?(o=[],A(i,function(u,h){var c=Ue(Un(u),""),f;q(u)?(f=it(u),f.value=h):f=h,o.push(f),a.push(c)})):o=i;var s={category:"ordinal",time:"time",value:"number"}[n]||"number",l=this._data=new qf([{name:"value",type:s}],this);l.initData(o,a)},t.prototype.getData=function(){return this._data},t.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},t.type="timeline",t.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},t})(dt),_x=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="timeline.slider",t.defaultOption=FA(Am.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),t})(Am);xe(_x,p_.prototype);var NL=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="timeline",t})(Jt),FL=(function(r){F(t,r);function t(e,i,n,a){var o=r.call(this,e,i,n)||this;return o.type=a||"value",o}return t.prototype.getLabelModel=function(){return this.model.getModel("label")},t.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},t})(ed),ch=Math.PI,Mm=kt(),BL=(function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,i){this.api=i},t.prototype.render=function(e,i,n){if(this.model=e,this.api=n,this.ecModel=i,this.group.removeAll(),e.get("show",!0)){var a=this._layout(e,n),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(a,e);e.formatTooltip=function(u){var h=l.scale.getLabel({value:u});return zn("nameValue",{noName:!0,value:h})},A(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](a,o,l,e)},this),this._renderAxisLabel(a,s,l,e),this._position(a,e)}this._doPlayStop(),this._updateTicksStatus()},t.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},t.prototype.dispose=function(){this._clearTimer()},t.prototype._layout=function(e,i){var n=e.get(["label","position"]),a=e.get("orient"),o=VL(e,i),s;n==null||n==="auto"?s=a==="horizontal"?o.y+o.height/2<i.getHeight()/2?"-":"+":o.x+o.width/2<i.getWidth()/2?"+":"-":U(n)?s={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[a][n]:s=n;var l={horizontal:"center",vertical:s>=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},h={horizontal:0,vertical:ch/2},c=a==="vertical"?o.height:o.width,f=e.getModel("controlStyle"),d=f.get("show",!0),p=d?f.get("itemSize"):0,v=d?f.get("itemGap"):0,g=p+v,m=e.get(["label","rotate"])||0;m=m*ch/180;var _,b,x,C=f.get("position",!0),S=d&&f.get("showPlayBtn",!0),T=d&&f.get("showPrevBtn",!0),M=d&&f.get("showNextBtn",!0),D=0,I=c;C==="left"||C==="bottom"?(S&&(_=[0,0],D+=g),T&&(b=[D,0],D+=g),M&&(x=[I-p,0],I-=g)):(S&&(_=[I-p,0],I-=g),T&&(b=[0,0],D+=g),M&&(x=[I-p,0],I-=g));var P=[D,I];return e.get("inverse")&&P.reverse(),{viewRect:o,mainLength:c,orient:a,rotation:h[a],labelRotation:m,labelPosOpt:s,labelAlign:e.get(["label","align"])||l[a],labelBaseline:e.get(["label","verticalAlign"])||e.get(["label","baseline"])||u[a],playPosition:_,prevBtnPosition:b,nextBtnPosition:x,axisExtent:P,controlSize:p,controlGap:v}},t.prototype._position=function(e,i){var n=this._mainGroup,a=this._labelGroup,o=e.viewRect;if(e.orient==="vertical"){var s=br(),l=o.x,u=o.y+o.height;jn(s,s,[-l,-u]),vo(s,s,-ch/2),jn(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var h=_(o),c=_(n.getBoundingRect()),f=_(a.getBoundingRect()),d=[n.x,n.y],p=[a.x,a.y];p[0]=d[0]=h[0][0];var v=e.labelPosOpt;if(v==null||U(v)){var g=v==="+"?0:1;b(d,c,h,1,g),b(p,f,h,1,1-g)}else{var g=v>=0?0:1;b(d,c,h,1,g),p[1]=d[1]+v}n.setPosition(d),a.setPosition(p),n.rotation=a.rotation=e.rotation,m(n),m(a);function m(x){x.originX=h[0][0]-x.x,x.originY=h[1][0]-x.y}function _(x){return[[x.x,x.x+x.width],[x.y,x.y+x.height]]}function b(x,C,S,T,M){x[T]+=S[T][M]-C[T][M]}},t.prototype._createAxis=function(e,i){var n=i.getData(),a=i.get("axisType"),o=zL(i,a);o.getTicks=function(){return n.mapArray(["value"],function(u){return{value:u}})};var s=n.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new FL("value",o,e.axisExtent,a);return l.model=i,l},t.prototype._createGroup=function(e){var i=this[e]=new Bt;return this.group.add(i),i},t.prototype._renderAxisLine=function(e,i,n,a){var o=n.getExtent();if(a.get(["lineStyle","show"])){var s=new Xe({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:N({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});i.add(s);var l=this._progressLine=new Xe({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:lt({lineCap:"round",lineWidth:s.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});i.add(l)}},t.prototype._renderAxisTick=function(e,i,n,a){var o=this,s=a.getData(),l=n.scale.getTicks();this._tickSymbols=[],A(l,function(u){var h=n.dataToCoord(u.value),c=s.getItemModel(u.value),f=c.getModel("itemStyle"),d=c.getModel(["emphasis","itemStyle"]),p=c.getModel(["progress","itemStyle"]),v={x:h,y:0,onclick:ct(o._changeTimeline,o,u.value)},g=Dm(c,f,i,v);g.ensureState("emphasis").style=d.getItemStyle(),g.ensureState("progress").style=p.getItemStyle(),Oa(g);var m=_t(g);c.get("tooltip")?(m.dataIndex=u.value,m.dataModel=a):m.dataIndex=m.dataModel=null,o._tickSymbols.push(g)})},t.prototype._renderAxisLabel=function(e,i,n,a){var o=this,s=n.getLabelModel();if(s.get("show")){var l=a.getData(),u=n.getViewLabels();this._tickLabels=[],A(u,function(h){var c=h.tickValue,f=l.getItemModel(c),d=f.getModel("label"),p=f.getModel(["emphasis","label"]),v=f.getModel(["progress","label"]),g=n.dataToCoord(h.tickValue),m=new Vt({x:g,y:0,rotation:e.labelRotation-e.rotation,onclick:ct(o._changeTimeline,o,c),silent:!1,style:Ye(d,{text:h.formattedLabel,align:e.labelAlign,verticalAlign:e.labelBaseline})});m.ensureState("emphasis").style=Ye(p),m.ensureState("progress").style=Ye(v),i.add(m),Oa(m),Mm(m).dataIndex=c,o._tickLabels.push(m)})}},t.prototype._renderControl=function(e,i,n,a){var o=e.controlSize,s=e.rotation,l=a.getModel("controlStyle").getItemStyle(),u=a.getModel(["emphasis","controlStyle"]).getItemStyle(),h=a.getPlayState(),c=a.get("inverse",!0);f(e.nextBtnPosition,"next",ct(this._changeTimeline,this,c?"-":"+")),f(e.prevBtnPosition,"prev",ct(this._changeTimeline,this,c?"+":"-")),f(e.playPosition,h?"stop":"play",ct(this._handlePlayClick,this,!h),!0);function f(d,p,v,g){if(d){var m=Kr(Q(a.get(["controlStyle",p+"BtnSize"]),o),o),_=[0,-m/2,m,m],b=HL(a,p+"Icon",_,{x:d[0],y:d[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:v});b.ensureState("emphasis").style=u,i.add(b),Oa(b)}}},t.prototype._renderCurrentPointer=function(e,i,n,a){var o=a.getData(),s=a.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,h={onCreate:function(c){c.draggable=!0,c.drift=ct(u._handlePointerDrag,u),c.ondragend=ct(u._handlePointerDragend,u),Im(c,u._progressLine,s,n,a,!0)},onUpdate:function(c){Im(c,u._progressLine,s,n,a)}};this._currentPointer=Dm(l,l,this._mainGroup,{},this._currentPointer,h)},t.prototype._handlePlayClick=function(e){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:e,from:this.uid})},t.prototype._handlePointerDrag=function(e,i,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},t.prototype._handlePointerDragend=function(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)},t.prototype._pointerChangeTimeline=function(e,i){var n=this._toAxisCoord(e)[0],a=this._axis,o=ef(a.getExtent().slice());n>o[1]&&(n=o[1]),n<o[0]&&(n=o[0]),this._currentPointer.x=n,this._currentPointer.markRedraw();var s=this._progressLine;s&&(s.shape.x2=n,s.dirty());var l=this._findNearestTick(n),u=this.model;(i||l!==u.getCurrentIndex()&&u.get("realtime"))&&this._changeTimeline(l)},t.prototype._doPlayStop=function(){var e=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var i=e.model;e._changeTimeline(i.getCurrentIndex()+(i.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},t.prototype._toAxisCoord=function(e){var i=this._mainGroup.getLocalTransform();return Al(e,i,!0)},t.prototype._findNearestTick=function(e){var i=this.model.getData(),n=1/0,a,o=this._axis;return i.each(["value"],function(s,l){var u=o.dataToCoord(s),h=Math.abs(u-e);h<n&&(n=h,a=l)}),a},t.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},t.prototype._changeTimeline=function(e){var i=this.model.getCurrentIndex();e==="+"?e=i+1:e==="-"&&(e=i-1),this.api.dispatchAction({type:"timelineChange",currentIndex:e,from:this.uid})},t.prototype._updateTicksStatus=function(){var e=this.model.getCurrentIndex(),i=this._tickSymbols,n=this._tickLabels;if(i)for(var a=0;a<i.length;a++)i&&i[a]&&i[a].toggleState("progress",a<e);if(n)for(var a=0;a<n.length;a++)n&&n[a]&&n[a].toggleState("progress",Mm(n[a]).dataIndex<=e)},t.type="timeline.slider",t})(NL);function zL(r,t){if(t=t||r.get("type"),t)switch(t){case"category":return new Vl({ordinalMeta:r.getCategories(),extent:[1/0,-1/0]});case"time":return new Kf({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new Ji}}function VL(r,t){return Ki(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()},r.get("padding"))}function HL(r,t,e,i){var n=i.style,a=To(r.get(["controlStyle",t]),i||{},new mt(e[0],e[1],e[2],e[3]));return n&&a.setStyle(n),a}function Dm(r,t,e,i,n,a){var o=t.get("color");if(n)n.setColor(o),e.add(n),a&&a.onUpdate(n);else{var s=r.get("symbol");n=$i(s,-1,-1,2,2,o),n.setStyle("strokeNoScale",!0),e.add(n),a&&a.onCreate(n)}var l=t.getItemStyle(["color"]);n.setStyle(l),i=st({rectHover:!0,z2:100},i,!0);var u=O_(r.get("symbolSize"));i.scaleX=u[0]/2,i.scaleY=u[1]/2;var h=Ff(r.get("symbolOffset"),u);h&&(i.x=(i.x||0)+h[0],i.y=(i.y||0)+h[1]);var c=r.get("symbolRotate");return i.rotation=(c||0)*Math.PI/180||0,n.attr(i),n.updateTransform(),n}function Im(r,t,e,i,n,a){if(!r.dragging){var o=n.getModel("checkpointStyle"),s=i.dataToCoord(n.getData().get("value",e));if(a||!o.get("animation",!0))r.attr({x:s,y:0}),t&&t.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),t&&t.animateTo({shape:{x2:s}},l)}}}function WL(r){r.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e,i){var n=e.getComponent("timeline");return n&&t.currentIndex!=null&&(n.setCurrentIndex(t.currentIndex),!n.get("loop",!0)&&n.isIndexMax()&&n.getPlayState()&&(n.setPlayState(!1),i.dispatchAction({type:"timelinePlayChange",playState:!1,from:t.from}))),e.resetOption("timeline",{replaceMerge:n.get("replaceMerge",!0)}),lt({currentIndex:n.option.currentIndex},t)}),r.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var i=e.getComponent("timeline");i&&t.playState!=null&&i.setPlayState(t.playState)})}function GL(r){var t=r&&r.timeline;W(t)||(t=t?[t]:[]),A(t,function(e){e&&$L(e)})}function $L(r){var t=r.type,e={number:"value",time:"time"};if(e[t]&&(r.axisType=e[t],delete r.type),Pm(r),Pi(r,"controlPosition")){var i=r.controlStyle||(r.controlStyle={});Pi(i,"position")||(i.position=r.controlPosition),i.position==="none"&&!Pi(i,"show")&&(i.show=!1,delete i.position),delete r.controlPosition}A(r.data||[],function(n){q(n)&&!W(n)&&(!Pi(n,"value")&&Pi(n,"name")&&(n.value=n.name),Pm(n))})}function Pm(r){var t=r.itemStyle||(r.itemStyle={}),e=t.emphasis||(t.emphasis={}),i=r.label||r.label||{},n=i.normal||(i.normal={}),a={normal:1,emphasis:1};A(i,function(o,s){!a[s]&&!Pi(n,s)&&(n[s]=o)}),e.label&&!Pi(i,"emphasis")&&(i.emphasis=e.label,delete e.label)}function Pi(r,t){return r.hasOwnProperty(t)}function UL(r){r.registerComponentModel(_x),r.registerComponentView(BL),r.registerSubTypeDefaulter("timeline",function(){return"slider"}),WL(r),r.registerPreprocessor(GL)}var fh=Math.sin,dh=Math.cos,bx=Math.PI,Ai=Math.PI*2,YL=180/bx,xx=(function(){function r(){}return r.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},r.prototype.moveTo=function(t,e){this._add("M",t,e)},r.prototype.lineTo=function(t,e){this._add("L",t,e)},r.prototype.bezierCurveTo=function(t,e,i,n,a,o){this._add("C",t,e,i,n,a,o)},r.prototype.quadraticCurveTo=function(t,e,i,n){this._add("Q",t,e,i,n)},r.prototype.arc=function(t,e,i,n,a,o){this.ellipse(t,e,i,i,0,n,a,o)},r.prototype.ellipse=function(t,e,i,n,a,o,s,l){var u=s-o,h=!l,c=Math.abs(u),f=Vr(c-Ai)||(h?u>=Ai:-u>=Ai),d=u>0?u%Ai:u%Ai+Ai,p=!1;f?p=!0:Vr(c)?p=!1:p=d>=bx==!!h;var v=t+i*dh(o),g=e+n*fh(o);this._start&&this._add("M",v,g);var m=Math.round(a*YL);if(f){var _=1/this._p,b=(h?1:-1)*(Ai-_);this._add("A",i,n,m,1,+h,t+i*dh(o+b),e+n*fh(o+b)),_>.01&&this._add("A",i,n,m,0,+h,v,g)}else{var x=t+i*dh(s),C=e+n*fh(s);this._add("A",i,n,m,+p,+h,x,C)}},r.prototype.rect=function(t,e,i,n){this._add("M",t,e),this._add("l",i,0),this._add("l",0,n),this._add("l",-i,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(t,e,i,n,a,o,s,l,u){for(var h=[],c=this._p,f=1;f<arguments.length;f++){var d=arguments[f];if(isNaN(d)){this._invalid=!0;return}h.push(Math.round(d*c)/c)}this._d.push(t+h.join(" ")),this._start=t==="Z"},r.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},r.prototype.getStr=function(){return this._str},r})(),pd="none",XL=Math.round;function ZL(r){var t=r.fill;return t!=null&&t!==pd}function qL(r){var t=r.stroke;return t!=null&&t!==pd}var Oc=["lineCap","miterLimit","lineJoin"],KL=V(Oc,function(r){return"stroke-"+r.toLowerCase()});function JL(r,t,e,i){var n=t.opacity==null?1:t.opacity;if(e instanceof qe){r("opacity",n);return}if(ZL(t)){var a=Ua(t.fill);r("fill",a.color);var o=t.fillOpacity!=null?t.fillOpacity*a.opacity*n:a.opacity*n;o<1&&r("fill-opacity",o)}else r("fill",pd);if(qL(t)){var s=Ua(t.stroke);r("stroke",s.color);var l=t.strokeNoScale?e.getLineScale():1,u=l?(t.lineWidth||0)/l:0,h=t.strokeOpacity!=null?t.strokeOpacity*s.opacity*n:s.opacity*n,c=t.strokeFirst;if(u!==1&&r("stroke-width",u),c&&r("paint-order",c?"stroke":"fill"),h<1&&r("stroke-opacity",h),t.lineDash){var f=Bf(e),d=f[0],p=f[1];d&&(p=XL(p||0),r("stroke-dasharray",d.join(",")),(p||i)&&r("stroke-dashoffset",p))}for(var v=0;v<Oc.length;v++){var g=Oc[v];if(t[g]!==Fs[g]){var m=t[g]||Fs[g];m&&r(KL[v],m)}}}}var Sx="http://www.w3.org/2000/svg",Cx="http://www.w3.org/1999/xlink",QL="http://www.w3.org/2000/xmlns/",tO="http://www.w3.org/XML/1998/namespace",km="ecmeta_";function Tx(r){return document.createElementNS(Sx,r)}function Nt(r,t,e,i,n){return{tag:r,attrs:e||{},children:i,text:n,key:t}}function eO(r,t){var e=[];if(t)for(var i in t){var n=t[i],a=i;n!==!1&&(n!==!0&&n!=null&&(a+='="'+n+'"'),e.push(a))}return"<"+r+" "+e.join(" ")+">"}function rO(r){return"</"+r+">"}function vd(r,t){t=t||{};var e=t.newline?`
|
|
57
|
+
`:"";function i(n){var a=n.children,o=n.tag,s=n.attrs,l=n.text;return eO(o,s)+(o!=="style"?Kt(l):l||"")+(a?""+e+V(a,function(u){return i(u)}).join(e)+e:"")+rO(o)}return i(r)}function iO(r,t,e){e=e||{};var i=e.newline?`
|
|
58
|
+
`:"",n=" {"+i,a=i+"}",o=V(vt(r),function(l){return l+n+V(vt(r[l]),function(u){return u+":"+r[l][u]+";"}).join(i)+a}).join(i),s=V(vt(t),function(l){return"@keyframes "+l+n+V(vt(t[l]),function(u){return u+n+V(vt(t[l][u]),function(h){var c=t[l][u][h];return h==="d"&&(c='path("'+c+'")'),h+":"+c+";"}).join(i)+a}).join(i)+a}).join(i);return!o&&!s?"":["<![CDATA[",o,s,"]]>"].join(i)}function Ec(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function Rm(r,t,e,i){return Nt("svg","root",{width:r,height:t,xmlns:Sx,"xmlns:xlink":Cx,version:"1.1",baseProfile:"full",viewBox:i?"0 0 "+r+" "+t:!1},e)}var nO=0;function Ax(){return nO++}var Lm={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"},Di="transform-origin";function aO(r,t,e){var i=N({},r.shape);N(i,t),r.buildPath(e,i);var n=new xx;return n.reset(ky(r)),e.rebuildPath(n,1),n.generateStr(),n.getStr()}function oO(r,t){var e=t.originX,i=t.originY;(e||i)&&(r[Di]=e+"px "+i+"px")}var sO={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function Mx(r,t){var e=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[e]=r,e}function lO(r,t,e){var i=r.shape.paths,n={},a,o;if(A(i,function(l){var u=Ec(e.zrId);u.animation=!0,Gl(l,{},u,!0);var h=u.cssAnims,c=u.cssNodes,f=vt(h),d=f.length;if(d){o=f[d-1];var p=h[o];for(var v in p){var g=p[v];n[v]=n[v]||{d:""},n[v].d+=g.d||""}for(var m in c){var _=c[m].animation;_.indexOf(o)>=0&&(a=_)}}}),!!a){t.d=!1;var s=Mx(n,e);return a.replace(o,s)}}function Om(r){return U(r)?Lm[r]?"cubic-bezier("+Lm[r]+")":qc(r)?r:"":""}function Gl(r,t,e,i){var n=r.animators,a=n.length,o=[];if(r instanceof df){var s=lO(r,t,e);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var l={},u=0;u<a;u++){var h=n[u],c=[h.getMaxTime()/1e3+"s"],f=Om(h.getClip().easing),d=h.getDelay();f?c.push(f):c.push("linear"),d&&c.push(d/1e3+"s"),h.getLoop()&&c.push("infinite");var p=c.join(" ");l[p]=l[p]||[p,[]],l[p][1].push(h)}function v(_){var b=_[1],x=b.length,C={},S={},T={},M="animation-timing-function";function D(Lt,xt,z){for(var X=Lt.getTracks(),K=Lt.getMaxTime(),Ot=0;Ot<X.length;Ot++){var St=X[Ot];if(St.needsAnimate()){var se=St.keyframes,je=St.propName;if(z&&(je=z(je)),je)for(var ei=0;ei<se.length;ei++){var Cr=se[ei],ri=Math.round(Cr.time/K*100)+"%",qn=Om(Cr.easing),Kn=Cr.rawValue;(U(Kn)||At(Kn))&&(xt[ri]=xt[ri]||{},xt[ri][je]=Cr.rawValue,qn&&(xt[ri][M]=qn))}}}}for(var I=0;I<x;I++){var P=b[I],k=P.targetName;k?k==="shape"&&D(P,S):!i&&D(P,C)}for(var R in C){var L={};jy(L,r),N(L,C[R]);var j=Ry(L),E=C[R][M];T[R]=j?{transform:j}:{},oO(T[R],L),E&&(T[R][M]=E)}var Z,G=!0;for(var R in S){T[R]=T[R]||{};var Y=!Z,E=S[R][M];Y&&(Z=new Jr);var et=Z.len();Z.reset(),T[R].d=aO(r,S[R],Z);var ut=Z.len();if(!Y&&et!==ut){G=!1;break}E&&(T[R][M]=E)}if(!G)for(var R in T)delete T[R].d;if(!i)for(var I=0;I<x;I++){var P=b[I],k=P.targetName;k==="style"&&D(P,T,function(X){return sO[X]})}for(var ot=vt(T),ft=!0,gt,I=1;I<ot.length;I++){var B=ot[I-1],Rt=ot[I];if(T[B][Di]!==T[Rt][Di]){ft=!1;break}gt=T[B][Di]}if(ft&>){for(var R in T)T[R][Di]&&delete T[R][Di];t[Di]=gt}if(It(ot,function(Lt){return vt(T[Lt]).length>0}).length){var Mt=Mx(T,e);return Mt+" "+_[0]+" both"}}for(var g in l){var s=v(l[g]);s&&o.push(s)}if(o.length){var m=e.zrId+"-cls-"+Ax();e.cssNodes["."+m]={animation:o.join(",")},t.class=m}}function uO(r,t,e){if(!r.ignore)if(r.isSilent()){var i={"pointer-events":"none"};Em(i,t,e)}else{var n=r.states.emphasis&&r.states.emphasis.style?r.states.emphasis.style:{},a=n.fill;if(!a){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&&(a=js(l))}var u=n.lineWidth;if(u){var h=!n.strokeNoScale&&r.transform?r.transform[0]:1;u=u/h}var i={cursor:"pointer"};a&&(i.fill=a),n.stroke&&(i.stroke=n.stroke),u&&(i["stroke-width"]=u),Em(i,t,e)}}function Em(r,t,e,i){var n=JSON.stringify(r),a=e.cssStyleCache[n];a||(a=e.zrId+"-cls-"+Ax(),e.cssStyleCache[n]=a,e.cssNodes["."+a+":hover"]=r),t.class=t.class?t.class+" "+a:a}var uo=Math.round;function Dx(r){return r&&U(r.src)}function Ix(r){return r&&tt(r.toDataURL)}function gd(r,t,e,i){JL(function(n,a){var o=n==="fill"||n==="stroke";o&&Py(a)?kx(t,r,n,i):o&&Jc(a)?Rx(e,r,n,i):r[n]=a,o&&i.ssr&&a==="none"&&(r["pointer-events"]="visible")},t,e,!1),gO(e,r,i)}function md(r,t){var e=zy(t);e&&(e.each(function(i,n){i!=null&&(r[(km+n).toLowerCase()]=i+"")}),t.isSilent()&&(r[km+"silent"]="true"))}function jm(r){return Vr(r[0]-1)&&Vr(r[1])&&Vr(r[2])&&Vr(r[3]-1)}function hO(r){return Vr(r[4])&&Vr(r[5])}function yd(r,t,e){if(t&&!(hO(t)&&jm(t))){var i=1e4;r.transform=jm(t)?"translate("+uo(t[4]*i)/i+" "+uo(t[5]*i)/i+")":wS(t)}}function Nm(r,t,e){for(var i=r.points,n=[],a=0;a<i.length;a++)n.push(uo(i[a][0]*e)/e),n.push(uo(i[a][1]*e)/e);t.points=n.join(" ")}function Fm(r){return!r.smooth}function cO(r){var t=V(r,function(e){return typeof e=="string"?[e,e]:e});return function(e,i,n){for(var a=0;a<t.length;a++){var o=t[a],s=e[o[0]];s!=null&&(i[o[1]]=uo(s*n)/n)}}}var fO={circle:[cO(["cx","cy","r"])],polyline:[Nm,Fm],polygon:[Nm,Fm]};function dO(r){for(var t=r.animators,e=0;e<t.length;e++)if(t[e].targetName==="shape")return!0;return!1}function Px(r,t){var e=r.style,i=r.shape,n=fO[r.type],a={},o=t.animation,s="path",l=r.style.strokePercent,u=t.compress&&ky(r)||4;if(n&&!t.willUpdate&&!(n[1]&&!n[1](i))&&!(o&&dO(r))&&!(l<1)){s=r.type;var h=Math.pow(10,u);n[0](i,a,h)}else{var c=!r.path||r.shapeChanged();r.path||r.createPathProxy();var f=r.path;c&&(f.beginPath(),r.buildPath(f,r.shape),r.pathUpdated());var d=f.getVersion(),p=r,v=p.__svgPathBuilder;(p.__svgPathVersion!==d||!v||l!==p.__svgPathStrokePercent)&&(v||(v=p.__svgPathBuilder=new xx),v.reset(u),f.rebuildPath(v,l),v.generateStr(),p.__svgPathVersion=d,p.__svgPathStrokePercent=l),a.d=v.getStr()}return yd(a,r.transform),gd(a,e,r,t),md(a,r),t.animation&&Gl(r,a,t),t.emphasis&&uO(r,a,t),Nt(s,r.id+"",a)}function pO(r,t){var e=r.style,i=e.image;if(i&&!U(i)&&(Dx(i)?i=i.src:Ix(i)&&(i=i.toDataURL())),!!i){var n=e.x||0,a=e.y||0,o=e.width,s=e.height,l={href:i,width:o,height:s};return n&&(l.x=n),a&&(l.y=a),yd(l,r.transform),gd(l,e,r,t),md(l,r),t.animation&&Gl(r,l,t),Nt("image",r.id+"",l)}}function vO(r,t){var e=r.style,i=e.text;if(i!=null&&(i+=""),!(!i||isNaN(e.x)||isNaN(e.y))){var n=e.font||Zr,a=e.x||0,o=CS(e.y||0,fl(n),e.textBaseline),s=SS[e.textAlign]||e.textAlign,l={"dominant-baseline":"central","text-anchor":s};if(u0(e)){var u="",h=e.fontStyle,c=l0(e.fontSize);if(!parseFloat(c))return;var f=e.fontFamily||ty,d=e.fontWeight;u+="font-size:"+c+";font-family:"+f+";",h&&h!=="normal"&&(u+="font-style:"+h+";"),d&&d!=="normal"&&(u+="font-weight:"+d+";"),l.style=u}else l.style="font: "+n;return i.match(/\s/)&&(l["xml:space"]="preserve"),a&&(l.x=a),o&&(l.y=o),yd(l,r.transform),gd(l,e,r,t),md(l,r),t.animation&&Gl(r,l,t),Nt("text",r.id+"",l,void 0,i)}}function Bm(r,t){if(r instanceof bt)return Px(r,t);if(r instanceof qe)return pO(r,t);if(r instanceof Ja)return vO(r,t)}function gO(r,t,e){var i=r.style;if(TS(i)){var n=AS(r),a=e.shadowCache,o=a[n];if(!o){var s=r.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var h=i.shadowOffsetX||0,c=i.shadowOffsetY||0,f=i.shadowBlur,d=Ua(i.shadowColor),p=d.opacity,v=d.color,g=f/2/l,m=f/2/u,_=g+" "+m;o=e.zrId+"-s"+e.shadowIdx++,e.defs[o]=Nt("filter",o,{id:o,x:"-100%",y:"-100%",width:"300%",height:"300%"},[Nt("feDropShadow","",{dx:h/l,dy:c/u,stdDeviation:_,"flood-color":v,"flood-opacity":p})]),a[n]=o}t.filter=hl(o)}}function kx(r,t,e,i){var n=r[e],a,o={gradientUnits:n.global?"userSpaceOnUse":"objectBoundingBox"};if(Dy(n))a="linearGradient",o.x1=n.x,o.y1=n.y,o.x2=n.x2,o.y2=n.y2;else if(Iy(n))a="radialGradient",o.cx=Q(n.x,.5),o.cy=Q(n.y,.5),o.r=Q(n.r,.5);else return;for(var s=n.colorStops,l=[],u=0,h=s.length;u<h;++u){var c=Eh(s[u].offset)*100+"%",f=s[u].color,d=Ua(f),p=d.color,v=d.opacity,g={offset:c};g["stop-color"]=p,v<1&&(g["stop-opacity"]=v),l.push(Nt("stop",u+"",g))}var m=Nt(a,"",o,l),_=vd(m),b=i.gradientCache,x=b[_];x||(x=i.zrId+"-g"+i.gradientIdx++,b[_]=x,o.id=x,i.defs[x]=Nt(a,x,o,l)),t[e]=hl(x)}function Rx(r,t,e,i){var n=r.style[e],a=r.getBoundingRect(),o={},s=n.repeat,l=s==="no-repeat",u=s==="repeat-x",h=s==="repeat-y",c;if(My(n)){var f=n.imageWidth,d=n.imageHeight,p=void 0,v=n.image;if(U(v)?p=v:Dx(v)?p=v.src:Ix(v)&&(p=v.toDataURL()),typeof Image>"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";be(f,g),be(d,g)}else if(f==null||d==null){var m=function(I,P){if(I){var k=I.elm,R=f||P.width,L=d||P.height;I.tag==="pattern"&&(u?(L=1,R/=a.width):h&&(R=1,L/=a.height)),I.attrs.width=R,I.attrs.height=L,k&&(k.setAttribute("width",R),k.setAttribute("height",L))}},_=lf(p,null,r,function(I){l||m(S,I),m(c,I)});_&&_.width&&_.height&&(f=f||_.width,d=d||_.height)}c=Nt("image","img",{href:p,width:f,height:d}),o.width=f,o.height=d}else n.svgElement&&(c=it(n.svgElement),o.width=n.svgWidth,o.height=n.svgHeight);if(c){var b,x;l?b=x=1:u?(x=1,b=o.width/a.width):h?(b=1,x=o.height/a.height):o.patternUnits="userSpaceOnUse",b!=null&&!isNaN(b)&&(o.width=b),x!=null&&!isNaN(x)&&(o.height=x);var C=Ry(n);C&&(o.patternTransform=C);var S=Nt("pattern","",o,[c]),T=vd(S),M=i.patternCache,D=M[T];D||(D=i.zrId+"-p"+i.patternIdx++,M[T]=D,o.id=D,S=i.defs[D]=Nt("pattern",D,o,[c])),t[e]=hl(D)}}function mO(r,t,e){var i=e.clipPathCache,n=e.defs,a=i[r.id];if(!a){a=e.zrId+"-c"+e.clipPathIdx++;var o={id:a};i[r.id]=a,n[a]=Nt("clipPath",a,o,[Px(r,e)])}t["clip-path"]=hl(a)}function zm(r){return document.createTextNode(r)}function ki(r,t,e){r.insertBefore(t,e)}function Vm(r,t){r.removeChild(t)}function Hm(r,t){r.appendChild(t)}function Lx(r){return r.parentNode}function Ox(r){return r.nextSibling}function ph(r,t){r.textContent=t}var Wm=58,yO=120,_O=Nt("","");function jc(r){return r===void 0}function ir(r){return r!==void 0}function bO(r,t,e){for(var i={},n=t;n<=e;++n){var a=r[n].key;a!==void 0&&(i[a]=n)}return i}function Aa(r,t){var e=r.key===t.key,i=r.tag===t.tag;return i&&e}function ho(r){var t,e=r.children,i=r.tag;if(ir(i)){var n=r.elm=Tx(i);if(_d(_O,r),W(e))for(t=0;t<e.length;++t){var a=e[t];a!=null&&Hm(n,ho(a))}else ir(r.text)&&!q(r.text)&&Hm(n,zm(r.text))}else r.elm=zm(r.text);return r.elm}function Ex(r,t,e,i,n){for(;i<=n;++i){var a=e[i];a!=null&&ki(r,ho(a),t)}}function Qs(r,t,e,i){for(;e<=i;++e){var n=t[e];if(n!=null)if(ir(n.tag)){var a=Lx(n.elm);Vm(a,n.elm)}else Vm(r,n.elm)}}function _d(r,t){var e,i=t.elm,n=r&&r.attrs||{},a=t.attrs||{};if(n!==a){for(e in a){var o=a[e],s=n[e];s!==o&&(o===!0?i.setAttribute(e,""):o===!1?i.removeAttribute(e):e==="style"?i.style.cssText=o:e.charCodeAt(0)!==yO?i.setAttribute(e,o):e==="xmlns:xlink"||e==="xmlns"?i.setAttributeNS(QL,e,o):e.charCodeAt(3)===Wm?i.setAttributeNS(tO,e,o):e.charCodeAt(5)===Wm?i.setAttributeNS(Cx,e,o):i.setAttribute(e,o))}for(e in n)e in a||i.removeAttribute(e)}}function xO(r,t,e){for(var i=0,n=0,a=t.length-1,o=t[0],s=t[a],l=e.length-1,u=e[0],h=e[l],c,f,d,p;i<=a&&n<=l;)o==null?o=t[++i]:s==null?s=t[--a]:u==null?u=e[++n]:h==null?h=e[--l]:Aa(o,u)?(Sn(o,u),o=t[++i],u=e[++n]):Aa(s,h)?(Sn(s,h),s=t[--a],h=e[--l]):Aa(o,h)?(Sn(o,h),ki(r,o.elm,Ox(s.elm)),o=t[++i],h=e[--l]):Aa(s,u)?(Sn(s,u),ki(r,s.elm,o.elm),s=t[--a],u=e[++n]):(jc(c)&&(c=bO(t,i,a)),f=c[u.key],jc(f)?ki(r,ho(u),o.elm):(d=t[f],d.tag!==u.tag?ki(r,ho(u),o.elm):(Sn(d,u),t[f]=void 0,ki(r,d.elm,o.elm))),u=e[++n]);(i<=a||n<=l)&&(i>a?(p=e[l+1]==null?null:e[l+1].elm,Ex(r,p,e,n,l)):Qs(r,t,i,a))}function Sn(r,t){var e=t.elm=r.elm,i=r.children,n=t.children;r!==t&&(_d(r,t),jc(t.text)?ir(i)&&ir(n)?i!==n&&xO(e,i,n):ir(n)?(ir(r.text)&&ph(e,""),Ex(e,null,n,0,n.length-1)):ir(i)?Qs(e,i,0,i.length-1):ir(r.text)&&ph(e,""):r.text!==t.text&&(ir(i)&&Qs(e,i,0,i.length-1),ph(e,t.text)))}function wO(r,t){if(Aa(r,t))Sn(r,t);else{var e=r.elm,i=Lx(e);ho(t),i!==null&&(ki(i,t.elm,Ox(e)),Qs(i,[r],0,0))}return t}var SO=0,CO=(function(){function r(t,e,i){if(this.type="svg",this.refreshHover=Gm(),this.configLayer=Gm(),this.storage=e,this._opts=i=N({},i),this.root=t,this._id="zr"+SO++,this._oldVNode=Rm(i.width,i.height),t&&!i.ssr){var n=this._viewport=document.createElement("div");n.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=Tx("svg");_d(null,this._oldVNode),n.appendChild(a),t.appendChild(n)}this.resize(i.width,i.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",wO(this._oldVNode,t),this._oldVNode=t}},r.prototype.renderOneToVNode=function(t){return Bm(t,Ec(this._id))},r.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),i=this._width,n=this._height,a=Ec(this._id);a.animation=t.animation,a.willUpdate=t.willUpdate,a.compress=t.compress,a.emphasis=t.emphasis,a.ssr=this._opts.ssr;var o=[],s=this._bgVNode=TO(i,n,this._backgroundColor,a);s&&o.push(s);var l=t.compress?null:this._mainVNode=Nt("g","main",{},[]);this._paintList(e,a,l?l.children:o),l&&o.push(l);var u=V(vt(a.defs),function(f){return a.defs[f]});if(u.length&&o.push(Nt("defs","defs",{},u)),t.animation){var h=iO(a.cssNodes,a.cssAnims,{newline:!0});if(h){var c=Nt("style","stl",{},[],h);o.push(c)}}return Rm(i,n,o,t.useViewBox)},r.prototype.renderToString=function(t){return t=t||{},vd(this.renderToVNode({animation:Q(t.cssAnimation,!0),emphasis:Q(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Q(t.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(t){this._backgroundColor=t},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(t,e,i){for(var n=t.length,a=[],o=0,s,l,u=0,h=0;h<n;h++){var c=t[h];if(!c.invisible){var f=c.__clipPaths,d=f&&f.length||0,p=l&&l.length||0,v=void 0;for(v=Math.max(d-1,p-1);v>=0&&!(f&&l&&f[v]===l[v]);v--);for(var g=p-1;g>v;g--)o--,s=a[o-1];for(var m=v+1;m<d;m++){var _={};mO(f[m],_,e);var b=Nt("g","clip-g-"+u++,_,[]);(s?s.children:i).push(b),a[o++]=b,s=b}l=f;var x=Bm(c,e);x&&(s?s.children:i).push(x)}}},r.prototype.resize=function(t,e){var i=this._opts,n=this.root,a=this._viewport;if(t!=null&&(i.width=t),e!=null&&(i.height=e),n&&a&&(a.style.display="none",t=Vv(n,0,i),e=Vv(n,1,i),a.style.display=""),this._width!==t||this._height!==e){if(this._width=t,this._height=e,a){var o=a.style;o.width=t+"px",o.height=e+"px"}if(Jc(this._backgroundColor))this.refresh();else{var s=this._svgDom;s&&(s.setAttribute("width",t),s.setAttribute("height",e));var l=this._bgVNode&&this._bgVNode.elm;l&&(l.setAttribute("width",t),l.setAttribute("height",e))}}},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(t){var e=this.renderToString(),i="data:image/svg+xml;";return t?(e=DS(e),e&&i+"base64,"+e):i+"charset=UTF-8,"+encodeURIComponent(e)},r})();function Gm(r){return function(){}}function TO(r,t,e,i){var n;if(e&&e!=="none")if(n=Nt("rect","bg",{width:r,height:t,x:"0",y:"0"}),Py(e))kx({fill:e},n.attrs,"fill",i);else if(Jc(e))Rx({style:{fill:e},dirty:Gt,getBoundingRect:function(){return{width:r,height:t}}},n.attrs,"fill",i);else{var a=Ua(e),o=a.color,s=a.opacity;n.attrs.fill=o,s<1&&(n.attrs["fill-opacity"]=s)}return n}function AO(r){r.registerPainter("svg",CO)}const MO=""+new URL("echarts-BDq-rBJC.png",import.meta.url).href;Ui([UL,pL,jL,LL,SR,KP,AO]);const Et={paper:{height:"100%",maxHeight:"100%",maxWidth:"100%",overflow:"hidden",width:"100%"},chart:{width:"100%",overflow:"hidden"},chartWithToolbar:r=>({height:`calc(100% - ${parseInt(r.mixins.toolbar.minHeight,10)+8}px)`}),chartWithoutToolbar:{height:"100%"},selectHistoryControl:{width:130},selectRelativeTime:{marginLeft:10,width:200},notAliveInstance:{opacity:.5},customRange:r=>({color:r.palette.primary.main}),splitLineButtonIcon:{marginRight:8},grow:{flexGrow:1},toolbarDate:{width:124,mt:"9px","& fieldset":{display:"none"},"& input":{padding:"8px 0 0 0"},"& .MuiInputAdornment-root":{ml:0,mt:"7px"}},toolbarTime:{width:84,mt:"9px","& fieldset":{display:"none"},"& input":{padding:"8px 0 0 0"},"& .MuiInputAdornment-root":{ml:0,mt:"7px"}},toolbarTimeLabel:{position:"absolute",padding:8,fontSize:"0.8rem",left:2,top:-9},toolbarTimeGrid:{position:"relative",marginLeft:8,paddingLeft:8,paddingRight:8,paddingTop:4,paddingBottom:4,border:"1px dotted #AAAAAA",borderRadius:8,display:"flex"},buttonIcon:{width:24,height:24},echartsButton:{marginRight:8,height:34,width:34}},he=80,Mi=25;class DO extends at.Component{echartsReact;rangeRef;readTimeout=null;chartValues;rangeValues;subscribes;unit;divRef;chart;timerResize=null;updateTimer=null;minY;maxY;timeTimer=null;maxYLenTimeout=null;mouseDown;start;end;localStorage;constructor(t){if(super(t),this.localStorage=window._localStorage||window.localStorage,this.props.from)this.start=this.props.from;else{const a=new Date;a.setHours(a.getHours()-168),this.start=a.getTime()}this.props.end?this.end=this.props.end:this.end=Date.now();let e=this.localStorage.getItem("App.relativeRange")||"30";const i=parseInt(this.localStorage.getItem("App.absoluteStart"),10)||0,n=parseInt(this.localStorage.getItem("App.absoluteEnd"),10)||0;(!i||!n)&&(!e||e==="absolute")&&(e="30"),n&&i&&(e="absolute"),this.state={historyInstance:this.props.historyInstance||"",historyInstances:null,defaultHistory:"",chartHeight:300,chartWidth:500,windowWidth:window.innerWidth,ampm:!1,relativeRange:e,splitLine:this.localStorage.getItem("App.splitLine")==="true",min:i,max:n,maxYLen:0,stepType:"",echartsJump:!1},this.echartsReact=null,this.rangeRef=at.createRef(),this.readTimeout=null,this.chartValues=null,this.rangeValues=null,this.subscribes=[],this.unit=this.props.obj.common&&this.props.obj.common.unit?` ${this.props.obj.common.unit}`:"",this.divRef=at.createRef(),this.chart={}}componentDidMount(){this.props.socket.subscribeState(this.props.obj._id,this.onChange),window.addEventListener("resize",this.onResize),this.prepareData().then(()=>!this.props.noToolbar&&this.readHistoryRange()).then(()=>this.setRelativeInterval(this.state.relativeRange,!0,()=>this.forceUpdate()))}componentWillUnmount(){this.readTimeout&&(clearTimeout(this.readTimeout),this.readTimeout=null),this.timeTimer&&(clearTimeout(this.timeTimer),this.timeTimer=null),this.maxYLenTimeout&&(clearTimeout(this.maxYLenTimeout),this.maxYLenTimeout=null),this.timerResize&&(clearTimeout(this.timerResize),this.timerResize=null),this.updateTimer&&(clearTimeout(this.updateTimer),this.updateTimer=null),this.echartsReact&&this.echartsReact.getEchartsInstance().dispose();for(let t=0;t<this.subscribes.length;t++)this.props.socket.unsubscribeState(this.subscribes[t],this.onChange);this.subscribes=[],this.props.socket.unsubscribeState(this.props.obj._id,this.onChange),window.removeEventListener("resize",this.onResize)}onResize=()=>{this.timerResize&&clearTimeout(this.timerResize),this.timerResize=setTimeout(()=>{this.timerResize=null,this.setState({windowWidth:window.innerWidth}),this.componentDidUpdate()})};onChange=(t,e)=>{if(t===this.props.obj._id&&e&&this.rangeValues&&(!this.rangeValues.length||this.rangeValues[this.rangeValues.length-1].ts<e.ts))(!this.state.max||e.ts-this.state.max<12e4)&&(this.chartValues&&this.chartValues.push({val:e.val,ts:e.ts}),this.rangeValues.push({val:e.val,ts:e.ts}),e.ts>=this.chart.min&&e.ts<=this.chart.max+3e5&&this.updateChart());else if(t.startsWith("system.adapter.")&&t.endsWith(".alive")&&this.state.historyInstances){const i=t.substring(15,t.length-6),n=this.state.historyInstances,a=n.findIndex(o=>o.id===i);if(a!==-1&&n[a].alive!==!!(e!=null&&e.val)){const o=JSON.parse(JSON.stringify(n));o[a].alive=!!(e!=null&&e.val),this.setState({historyInstances:o},()=>{o[a].alive&&this.state.historyInstance===i&&this.readHistoryRange().then(()=>this.updateChart())})}}};async prepareData(){var s;if(this.props.noToolbar){const l=this.props.defaultHistory&&await this.props.socket.getState(`system.adapter.${this.props.defaultHistory}.alive`);this.subscribes.length||(this.subscribes=[`system.adapter.${this.props.defaultHistory}.alive`],await this.props.socket.subscribeState(`system.adapter.${this.props.defaultHistory}.alive`,this.onChange)),await new Promise(u=>{this.setState({defaultHistory:this.props.defaultHistory,historyInstance:this.props.defaultHistory,historyInstances:[{id:this.props.defaultHistory,alive:!!(l!=null&&l.val)}]},()=>u(null))});return}let t=await this.getHistoryInstances();const e=await this.props.socket.getCompactSystemConfig();let i=[];this.props.showJumpToEchart&&(i=await this.props.socket.getAdapterInstances("echarts",!0));const n=!!i.find(l=>l._id.startsWith("system.adapter.echarts.")),a=e&&e.common&&e.common.defaultHistory;this.props.obj.common.custom&&(t=t.filter(l=>this.props.obj.common.custom[l.id]));let o=this.localStorage.getItem("App.historyInstance")||"";if((!o||!t.find(l=>l.id===o&&l.alive))&&(o=a),!o||!t.find(l=>l.id===o&&l.alive)){const l=t.find(u=>u.alive);l&&(o=l.id)}!o&&t.length&&(o=a),this.setState({ampm:e.common.dateFormat.includes("/"),historyInstances:t,defaultHistory:a,historyInstance:o,echartsJump:n,stepType:this.props.obj.common.custom&&((s=this.props.obj.common.custom[o])==null?void 0:s.chartStep)||""})}getHistoryInstances(){if(this.props.historyInstance)return Promise.resolve([]);const t=[],e=[];return this.props.customsInstances.forEach(i=>{var a;const n=this.props.objects[`system.adapter.${i}`];if((a=n==null?void 0:n.common)!=null&&a.getHistory){const o={id:i,alive:!1};t.push(o),e.push(`system.adapter.${i}.alive`)}}),e.length?this.props.socket.getForeignStates(e).then(async i=>{Object.keys(i).forEach(n=>{var o;const a=t.find(s=>n.endsWith(`${s.id}.alive`));a&&(a.alive=!!((o=i[n])!=null&&o.val))}),this.subscribes=e;for(let n=0;n<e.length;n++)await this.props.socket.subscribeState(e[n],this.onChange);return t}):Promise.resolve(t)}readHistoryRange(){var i;const t=new Date,e=new Date(2e3,0,1);return(i=this.state.historyInstances)!=null&&i.find(n=>n.id===this.state.historyInstance&&n.alive)?this.props.socket.getHistory(this.props.obj._id,{instance:this.state.historyInstance,start:e.getTime(),end:t.getTime(),limit:1,from:!1,ack:!1,q:!1,addId:!1,aggregate:"none"}).then(n=>{var a;n&&((a=n[0])==null?void 0:a.val)===null&&n.shift(),this.rangeValues=n}):Promise.resolve()}readHistory(t,e){var n;if(!this.state.historyInstance||!((n=this.state.historyInstances)!=null&&n.find(a=>a.id===this.state.historyInstance&&a.alive)))return Promise.resolve([]);const i={instance:this.state.historyInstance,start:t,end:e,from:!1,ack:!1,q:!1,addId:!1,aggregate:"none",returnNewestEntries:!0};return e-t>6e4*24&&!(this.props.obj.common.type==="boolean"||this.props.obj.common.type==="number"&&this.props.obj.common.states)&&(i.aggregate="minmax"),this.props.socket.getHistory(this.props.obj._id,i).then(a=>{const o=[];let s=0;const l=this.rangeValues;let u=null,h=null;for(let c=0;c<a.length;c++){if(l)for(;s<l.length&&l[s].ts<a[c].ts;)o.push(l[s]),s++;!o.length||o[o.length-1].ts<a[c].ts?o.push(a[c]):o[o.length-1].ts===a[c].ts&&o[o.length-1].val!==a[c].ts&&console.error("Strange data!"),(u===null||a[c].val<u)&&(u=a[c].val),(h===null||a[c].val>h)&&(h=a[c].val)}if(l)for(;s<l.length;)o.push(l[s]),console.log(`add range ${new Date(l[s].ts).toISOString()}: ${l[s].val}`),s++;return o.sort((c,f)=>c.ts>f.ts?1:c.ts<f.ts?-1:0),this.chartValues=o,this.minY=u,this.maxY=h,this.minY<10?this.minY=Math.round(this.minY*10)/10:this.minY=Math.ceil(this.minY),this.maxY<10?this.maxY=Math.round(this.maxY*10)/10:this.maxY=Math.ceil(this.maxY),o})}convertData(t){t=t||this.chartValues;const e=[];if(!t.length)return[];for(let i=0;i<t.length;i++){const n={value:[t[i].ts,t[i].val]};t[i].i&&(n.exact=!1),e.push(n)}return this.chart.min||(this.chart.min=t[0].ts,this.chart.max=t[t.length-1].ts),e}getOption(){let t;if(this.minY!==null&&this.minY!==void 0&&(t=(this.minY.toString()+this.unit).length*9+12),this.maxY!==null&&this.maxY!==void 0){const a=(this.maxY.toString()+this.unit).length*9+12;a>t&&(t=a)}if(this.state.maxYLen){const a=this.state.maxYLen*9+12;a>t&&(t=a)}const e={xAxisIndex:0,type:"line",step:this.state.stepType==="stepStart"?"end":this.state.stepType==="stepMiddle"?"middle":this.state.stepType==="stepEnd"?"start":void 0,showSymbol:!1,hoverAnimation:!0,animation:!1,data:this.convertData(),lineStyle:{color:"#4dabf5"},areaStyle:{}},i={type:"value",boundaryGap:[0,"100%"],splitLine:{show:this.props.noToolbar||!!this.state.splitLine},splitNumber:Math.round(this.state.chartHeight/50),axisLabel:{formatter:a=>{let o;return this.props.isFloatComma?o=a.toString().replace(",",".")+this.unit:o=a+this.unit,this.state.maxYLen<o.length&&(this.maxYLenTimeout&&clearTimeout(this.maxYLenTimeout),this.maxYLenTimeout=setTimeout(s=>{this.maxYLenTimeout=null,this.setState({maxYLen:s})},200,o.length)),o},showMaxLabel:!0,showMinLabel:!0},axisTick:{alignWithLabel:!0}};if(this.props.obj.common.type==="boolean")e.step="end",i.axisLabel.showMaxLabel=!1,i.axisLabel.formatter=a=>a===1?"TRUE":"FALSE",i.max=1.5,i.interval=1,t=50;else if(this.props.obj.common.type==="number"&&this.props.obj.common.states){e.step="end",i.axisLabel.showMaxLabel=!1;const a=this.props.obj.common.states;i.axisLabel.formatter=l=>a[l]!==void 0?a[l]:l;const o=Object.keys(this.props.obj.common.states);o.sort(),i.max=parseFloat(o[o.length-1])+.5,i.interval=1;let s="";for(let l=0;l<o.length;l++)typeof a[o[l]]=="string"&&a[o[l]].length>s.length&&(s=a[o[l]]);t=(s.length*9||50)+12}const n=this.chart.withSeconds?Math.round((this.state.chartWidth-Mi-he)/100):Math.round((this.state.chartWidth-Mi-he)/60);return{backgroundColor:"transparent",title:{text:this.props.noToolbar?"":jt.getObjectNameFromObj(this.props.obj,this.props.lang),padding:[10,0,0,t?t+10:he+10]},grid:{left:t||he,top:8,right:this.props.noToolbar?5:Mi,bottom:40},tooltip:{trigger:"axis",formatter:a=>{const o=a[0],s=new Date(o.value[0]);let l=o.value[1];return l!==null&&this.props.isFloatComma&&(l=l.toString().replace(".",",")),`${o.exact===!1?"i":""}${s.toLocaleString()}.${s.getMilliseconds().toString().padStart(3,"0")}: ${l}${this.unit}`},axisPointer:{animation:!0}},xAxis:{splitLine:{show:!1},splitNumber:n,min:this.chart.min,max:this.chart.max,axisTick:{alignWithLabel:!0},axisLabel:{formatter:a=>{const o=new Date(a);return this.chart.withSeconds?`${o.getHours().toString().padStart(2,"0")}:${o.getMinutes().toString().padStart(2,"0")}:${o.getSeconds().toString().padStart(2,"0")}`:this.chart.withTime?`${o.getHours().toString().padStart(2,"0")}:${o.getMinutes().toString().padStart(2,"0")}
|
|
59
|
+
${o.getDate().toString().padStart(2,"0")}.${(o.getMonth()+1).toString().padStart(2,"0")}`:`${o.getDate().toString().padStart(2,"0")}.${(o.getMonth()+1).toString().padStart(2,"0")}
|
|
60
|
+
${o.getFullYear()}`}}},yAxis:i,toolbox:{left:"right",feature:this.props.noToolbar?void 0:{saveAsImage:{title:this.props.t("Save as image"),show:!0}}},series:[e]}}static getDerivedStateFromProps(t,e){return null}updateChart(t,e,i,n){t&&(this.start=t),e&&(this.end=e),t=t||this.start,e=e||this.end,this.readTimeout&&clearTimeout(this.readTimeout),this.readTimeout=setTimeout(()=>{var o;this.readTimeout=null;const a=this.chart.max-this.chart.min;a!==this.chart.diff&&(this.chart.diff=a,this.chart.withTime=this.chart.diff<36e5*24*7,this.chart.withSeconds=this.chart.diff<6e4*30),i?this.readHistory(t,e).then(s=>{var l;typeof((l=this.echartsReact)==null?void 0:l.getEchartsInstance)=="function"&&this.echartsReact.getEchartsInstance().setOption({series:[{data:this.convertData(s)}],xAxis:{min:this.chart.min,max:this.chart.max}}),n&&n()}):(typeof((o=this.echartsReact)==null?void 0:o.getEchartsInstance)=="function"&&this.echartsReact.getEchartsInstance().setOption({series:[{data:this.convertData()}],xAxis:{min:this.chart.min,max:this.chart.max}}),n&&n())},400)}setNewRange(t){var e;this.chart.diff=this.chart.max-this.chart.min,this.chart.withTime=this.chart.diff<36e5*24*7,this.chart.withSeconds=this.chart.diff<6e4*30,this.state.relativeRange!=="absolute"?(this.setState({relativeRange:"absolute"}),this.timeTimer&&(clearTimeout(this.timeTimer),this.timeTimer=null)):typeof((e=this.echartsReact)==null?void 0:e.getEchartsInstance)=="function"&&(this.echartsReact.getEchartsInstance().setOption({xAxis:{min:this.chart.min,max:this.chart.max}}),t&&this.updateChart(this.chart.min,this.chart.max,!0))}shiftTime(){const t=new Date,e=6e4-t.getSeconds()-(1e3-t.getMilliseconds());t.getMilliseconds()&&t.setMilliseconds(1e3),t.getSeconds()&&t.setSeconds(60);const i=t.getTime();let n;const a=this.state.relativeRange;if(a==="day")t.setHours(0),t.setMinutes(0),t.setSeconds(0),n=t.getTime();else if(a==="week"){t.setHours(0),t.setMinutes(0),t.setSeconds(0);const o=t.getDay()||7;o!==1&&t.setHours(-24*(o-1)),n=t.getTime()}else if(a==="2weeks"){t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setDate(t.getDate()-7);const o=t.getDay()||7;o!==1&&t.setHours(-24*(o-1)),n=t.getTime()}else a==="month"?(t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setDate(1),n=t.getTime()):a==="year"?(t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setDate(1),t.setMonth(0),n=t.getTime()):a==="12months"?(t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setFullYear(t.getFullYear()-1),n=t.getTime()):n=i-parseInt(a,10)*6e4;this.chart.min=n,this.chart.max=i,this.setState({min:n,max:i},()=>this.updateChart(this.chart.min,this.chart.max,!0)),this.timeTimer=setTimeout(()=>{this.timeTimer=null,this.shiftTime()},e||6e4)}setRelativeInterval(t,e,i){if(e||(this.localStorage.setItem("App.relativeRange",t),this.setState({relativeRange:t})),t==="absolute"){this.timeTimer&&(clearTimeout(this.timeTimer),this.timeTimer=null),this.updateChart(this.chart.min,this.chart.max,!0,i);return}this.localStorage.removeItem("App.absoluteStart"),this.localStorage.removeItem("App.absoluteEnd");const n=new Date;if(!this.timeTimer){const a=6e4-n.getSeconds()-(1e3-n.getMilliseconds());this.timeTimer=setTimeout(()=>{this.timeTimer=null,this.shiftTime()},a||6e4)}if(n.getMilliseconds()&&n.setMilliseconds(1e3),n.getSeconds()&&n.setSeconds(60),this.chart.max=n.getTime(),t==="day")n.setHours(0),n.setMinutes(0),n.setSeconds(0),this.chart.min=n.getTime();else if(t==="week"){n.setHours(0),n.setMinutes(0),n.setSeconds(0);const a=n.getDay()||7;a!==1&&n.setHours(-24*(a-1)),this.chart.min=n.getTime()}else if(t==="2weeks"){n.setHours(0),n.setMinutes(0),n.setSeconds(0),n.setDate(n.getDate()-7);const a=n.getDay()||7;a!==1&&n.setHours(-24*(a-1)),this.chart.min=n.getTime()}else t==="month"?(n.setHours(0),n.setMinutes(0),n.setSeconds(0),n.setDate(1),this.chart.min=n.getTime()):t==="year"?(n.setHours(0),n.setMinutes(0),n.setSeconds(0),n.setDate(1),n.setMonth(0),this.chart.min=n.getTime()):t==="12months"?(n.setHours(0),n.setMinutes(0),n.setSeconds(0),n.setFullYear(n.getFullYear()-1),this.chart.min=n.getTime()):this.chart.min=this.chart.max-parseInt(t,10)*6e4;this.setState({min:this.chart.min,max:this.chart.max},()=>this.updateChart(this.chart.min,this.chart.max,!0,i))}installEventHandlers(){if(!this.echartsReact||typeof this.echartsReact.getEchartsInstance!="function")return;const t=this.echartsReact.getEchartsInstance().getZr();t._iobInstalled||(t._iobInstalled=!0,t.on("mousedown",e=>{console.log("mouse down"),this.mouseDown=!0,this.chart.lastX=e.offsetX}),t.on("mouseup",()=>{console.log("mouse up"),this.mouseDown=!1,this.setNewRange(!0)}),t.on("mousewheel",e=>{let i=this.chart.max-this.chart.min;const n=this.state.chartWidth-Mi-he,o=(e.offsetX-he)/n,s=i,l=e.wheelDelta>0?1.1:.9;i*=l;const u=s-i;this.chart.max+=u*(1-o),this.chart.min-=u*o,this.setNewRange()}),t.on("mousemove",e=>{if(this.mouseDown){const i=this.chart.lastX-(e.offsetX-he);this.chart.lastX=e.offsetX-he;const n=this.chart.max-this.chart.min,a=this.state.chartWidth-Mi-he,o=Math.round(i*n/a);this.chart.min+=o,this.chart.max+=o,this.setNewRange()}}),t.on("touchstart",e=>{e.preventDefault(),this.mouseDown=!0;const i=e.touches||e.originalEvent.touches;i&&(this.chart.lastX=i[i.length-1].pageX,i.length>1?this.chart.lastWidth=Math.abs(i[0].pageX-i[1].pageX):this.chart.lastWidth=null)}),t.on("touchend",e=>{e.preventDefault(),this.mouseDown=!1,this.setNewRange(!0)}),t.on("touchmove",e=>{e.preventDefault();const i=e.touches||e.originalEvent.touches;if(!i)return;const n=i[i.length-1].pageX-he;if(this.mouseDown)if(i.length>1){const a=Math.abs(i[0].pageX-i[1].pageX);if(this.chart.lastWidth!==null&&a!==this.chart.lastWidth){let o=this.chart.max-this.chart.min;const s=this.state.chartWidth-Mi-he,l=a>this.chart.lastWidth?1.1:.9,h=(i[0].pageX>i[1].pageX?i[1].pageX-he+a/2:i[0].pageX-he+a/2)/s,c=o;o*=l;const f=c-o;this.chart.max+=f*(1-h),this.chart.min-=f*h,this.setNewRange()}this.chart.lastWidth=a}else{const a=this.chart.lastX-n,o=this.chart.max-this.chart.min,s=this.state.chartWidth-Mi-he,l=Math.round(a*o/s);this.chart.min+=l,this.chart.max+=l,this.setNewRange()}this.chart.lastX=n}))}renderChart(){var t;return this.state.historyInstance?(t=this.state.historyInstances)!=null&&t.find(e=>e.id===this.state.historyInstance&&e.alive)?this.chartValues?y.jsx(e1,{ref:e=>this.echartsReact=e,echarts:SP,option:this.getOption(),notMerge:!0,lazyUpdate:!0,theme:this.props.themeType==="dark"?"dark":"",style:{height:`${this.state.chartHeight}px`,width:"100%"},opts:{renderer:"svg"},onEvents:{rendered:()=>this.installEventHandlers()}}):y.jsx(w.LinearProgress,{}):y.jsx("div",{style:{marginTop:20,fontSize:24,marginLeft:24},children:this.props.t("History instance not alive")}):y.jsx("div",{style:{marginTop:20,fontSize:24,marginLeft:24},children:this.props.t("History instance not selected")})}componentDidUpdate(){if(this.divRef.current){const t=this.divRef.current.offsetWidth,e=this.divRef.current.offsetHeight;this.state.chartHeight!==e&&(this.updateTimer&&clearTimeout(this.updateTimer),this.updateTimer=setTimeout(()=>{this.updateTimer=null,this.setState({chartHeight:e,chartWidth:t})},100))}}setStartDate(t){const e=t.getTime();this.timeTimer&&(clearTimeout(this.timeTimer),this.timeTimer=null),this.localStorage.setItem("App.relativeRange","absolute"),this.localStorage.setItem("App.absoluteStart",e.toString()),this.localStorage.setItem("App.absoluteEnd",this.state.max.toString()),this.chart.min=e,this.setState({min:e,relativeRange:"absolute"},()=>this.updateChart(this.chart.min,this.chart.max,!0))}setEndDate(t){const e=t.getTime();this.localStorage.setItem("App.relativeRange","absolute"),this.localStorage.setItem("App.absoluteStart",this.state.min.toString()),this.localStorage.setItem("App.absoluteEnd",e.toString()),this.timeTimer&&(clearTimeout(this.timeTimer),this.timeTimer=null),this.chart.max=e,this.setState({max:e,relativeRange:"absolute"},()=>this.updateChart(this.chart.min,this.chart.max,!0))}openEcharts(){const t=[`id=${window.encodeURIComponent(this.props.obj._id)}`,`instance=${window.encodeURIComponent(this.state.historyInstance)}`,"menuOpened=false"];this.state.relativeRange==="absolute"?(t.push(`start=${this.chart.min}`),t.push(`end=${this.chart.max}`)):t.push(`range=${this.state.relativeRange}`),window.open(`${window.location.protocol}//${window.location.host}/adapter/echarts/tab.html#${t.join("&")}`,"echarts")}async onStepChanged(t){const e=await this.props.socket.getObject(this.props.obj._id);e.common.custom&&e.common.custom[this.state.historyInstance]&&e.common.custom[this.state.historyInstance].chartStep!==t&&(e.common.custom[this.state.historyInstance].chartStep=t,await this.props.socket.setObject(e._id,e)),this.setState({stepType:t,showStepMenu:null})}renderToolbar(){if(this.props.noToolbar)return null;const t=this.state.windowWidth<960;return y.jsxs(w.Toolbar,{children:[!this.props.historyInstance&&y.jsxs(w.FormControl,{variant:"standard",style:Et.selectHistoryControl,children:[y.jsx(w.InputLabel,{children:this.props.t("History instance")}),y.jsx(w.Select,{variant:"standard",value:this.state.historyInstance,onChange:e=>{this.localStorage.setItem("App.historyInstance",e.target.value),this.setState({historyInstance:e.target.value})},children:this.state.historyInstances.map(e=>y.jsx(w.MenuItem,{value:e.id,style:e.alive?void 0:Et.notAliveInstance,children:e.id},e.id))})]}),y.jsxs(w.FormControl,{variant:"standard",style:Et.selectRelativeTime,children:[y.jsx(w.InputLabel,{children:this.props.t("Relative")}),y.jsxs(w.Select,{variant:"standard",ref:this.rangeRef,value:this.state.relativeRange,onChange:e=>this.setRelativeInterval(e.target.value),children:[y.jsx(w.MenuItem,{value:"absolute",sx:Et.customRange,children:this.props.t("custom range")},"custom"),y.jsx(w.MenuItem,{value:10,children:this.props.t("last 10 minutes")},"1"),y.jsx(w.MenuItem,{value:30,children:this.props.t("last 30 minutes")},"2"),y.jsx(w.MenuItem,{value:60,children:this.props.t("last hour")},"3"),y.jsx(w.MenuItem,{value:"day",children:this.props.t("this day")},"4"),y.jsx(w.MenuItem,{value:1440,children:this.props.t("last 24 hours")},"5"),y.jsx(w.MenuItem,{value:"week",children:this.props.t("this week")},"6"),y.jsx(w.MenuItem,{value:1440*7,children:this.props.t("last week")},"7"),y.jsx(w.MenuItem,{value:"2weeks",children:this.props.t("this 2 weeks")},"8"),y.jsx(w.MenuItem,{value:1440*14,children:this.props.t("last 2 weeks")},"9"),y.jsx(w.MenuItem,{value:"month",children:this.props.t("this month")},"10"),y.jsx(w.MenuItem,{value:720*60,children:this.props.t("last 30 days")},"11"),y.jsx(w.MenuItem,{value:"year",children:this.props.t("this year")},"12"),y.jsx(w.MenuItem,{value:"12months",children:this.props.t("last 12 months")},"13")]})]}),y.jsxs(Zt.LocalizationProvider,{dateAdapter:Cs,adapterLocale:Ms[this.props.lang],children:[y.jsxs("div",{style:Et.toolbarTimeGrid,children:[y.jsx("div",{style:{...Et.toolbarTimeLabel,opacity:this.state.relativeRange!=="absolute"?.5:void 0},children:this.props.t("Start time")}),y.jsx(Zt.DatePicker,{sx:Et.toolbarDate,disabled:this.state.relativeRange!=="absolute",value:new Date(this.state.min),onChange:e=>this.setStartDate(e)}),y.jsx(Zt.TimePicker,{disabled:this.state.relativeRange!=="absolute",sx:Et.toolbarTime,ampm:this.state.ampm,value:new Date(this.state.min),onChange:e=>this.setStartDate(e)})]}),y.jsxs("div",{style:Et.toolbarTimeGrid,children:[y.jsx("div",{style:{...Et.toolbarTimeLabel,opacity:this.state.relativeRange!=="absolute"?.5:void 0},children:this.props.t("End time")}),y.jsx(Zt.DatePicker,{disabled:this.state.relativeRange!=="absolute",sx:Et.toolbarDate,value:new Date(this.state.max),onChange:e=>this.setEndDate(e)}),y.jsx(Zt.TimePicker,{disabled:this.state.relativeRange!=="absolute",sx:Et.toolbarTime,ampm:this.state.ampm,value:new Date(this.state.max),onChange:e=>this.setEndDate(e)})]})]}),y.jsx("div",{style:Et.grow}),y.jsx(w.Button,{style:{marginRight:10},variant:"outlined",onClick:e=>this.setState({showStepMenu:e.target}),children:t?this.state.stepType===""?y.jsx(H.Remove,{}):this.state.stepType==="stepStart"?y.jsx(H.KeyboardArrowRight,{}):this.state.stepType==="stepMiddle"?y.jsx(H.MoreHoriz,{}):this.state.stepType==="stepEnd"?y.jsx(H.KeyboardArrowLeft,{}):this.props.t("Step type"):this.state.stepType?this.props.t(this.state.stepType):this.props.t("Step type")}),this.state.showStepMenu?y.jsxs(w.Menu,{open:!0,anchorEl:this.state.showStepMenu,onClose:()=>this.setState({showStepMenu:null}),children:[y.jsx(w.MenuItem,{selected:this.state.stepType==="",onClick:()=>this.onStepChanged(""),children:t?y.jsx(H.Remove,{}):this.props.t("None")}),y.jsx(w.MenuItem,{selected:this.state.stepType==="stepStart",onClick:()=>this.onStepChanged("stepStart"),children:t?y.jsx(H.KeyboardArrowRight,{}):this.props.t("stepStart")}),y.jsx(w.MenuItem,{selected:this.state.stepType==="stepMiddle",onClick:()=>this.onStepChanged("stepMiddle"),children:t?y.jsx(H.MoreHoriz,{}):this.props.t("stepMiddle")}),y.jsx(w.MenuItem,{selected:this.state.stepType==="stepEnd",onClick:()=>this.onStepChanged("stepEnd"),children:t?y.jsx(H.KeyboardArrowLeft,{}):this.props.t("stepEnd")})]}):null,this.props.showJumpToEchart&&this.state.echartsJump&&y.jsx(w.Fab,{style:Et.echartsButton,size:"small",onClick:()=>this.openEcharts(),title:this.props.t("Open charts in new window"),children:y.jsx("img",{src:MO,alt:"echarts",style:Et.buttonIcon})}),y.jsxs(w.Fab,{variant:"extended",size:"small",color:this.state.splitLine?"primary":"default","aria-label":"show lines",onClick:()=>{this.localStorage.setItem("App.splitLine",this.state.splitLine?"false":"true"),this.setState({splitLine:!this.state.splitLine})},children:[y.jsx(Kx,{style:Et.splitLineButtonIcon}),this.props.t("Show lines")]})]})}render(){return!this.state.historyInstances&&!this.state.defaultHistory?y.jsx(w.LinearProgress,{}):y.jsxs(w.Paper,{style:Et.paper,children:[this.renderToolbar(),y.jsx("div",{ref:this.divRef,style:jt.getStyle(this.props.theme,Et.chart,this.props.noToolbar?Et.chartWithoutToolbar:Et.chartWithToolbar),children:this.renderChart()})]})}}const jx=Gn()(DO),rr={dialog:{height:"100%"},paper:{height:"calc(100% - 64px)"},content:{textAlign:"center",overflow:"hidden"},tabPanel:r=>({width:"100%",overflow:"hidden",height:`calc(100% - ${r.mixins.toolbar.minHeight}px)`}),tabSelected:r=>({color:r.palette.mode==="dark"?r.palette.secondary.contrastText:"#FFFFFF !important"}),tabsIndicator:r=>({backgroundColor:r.palette.secondary.main})};class IO extends Md{chartAvailable;saveFunc=null;constructor(t){super(t);let e=parseInt((window._localStorage||window.localStorage).getItem("App.objectCustomTab")||"0",10);if(this.chartAvailable=this.isChartAvailable(),this.chartAvailable){const i=yh.getLocation();i.arg==="chart"?e=2:i.arg==="table"&&(e=1)}else e=0;this.state={hasChanges:!1,currentTab:e,confirmDialog:!1,mobile:Md.isMobile(),progressRunning:!1,showWarning:this.props.allVisibleObjects}}isChartAvailable(){var e,i;let t=this.props.objectIDs.length===1;if(t){const n=this.props.objectIDs[0];(i=(e=this.props.objects[n])==null?void 0:e.common)!=null&&i.custom?t=!!Object.keys(this.props.objects[n].common.custom).find(a=>{const o=this.props.objects[`system.adapter.${a}`];return o&&o.common&&o.common.getHistory}):t=!1}return t}renderCharts(){return y.jsx(jx,{id:"custom-tabpanel-chart",isFloatComma:this.props.isFloatComma,showJumpToEchart:!0,t:this.props.t,lang:this.props.lang,expertMode:this.props.expertMode,socket:this.props.socket,obj:this.props.objects[this.props.objectIDs[0]],customsInstances:this.props.customsInstances,themeType:this.props.themeType,theme:this.props.theme,objects:this.props.objects})}renderTable(){return y.jsx(ow,{id:"custom-tabpanel-history",t:this.props.t,isFloatComma:this.props.isFloatComma,lang:this.props.lang,expertMode:this.props.expertMode,socket:this.props.socket,obj:this.props.objects[this.props.objectIDs[0]],customsInstances:this.props.customsInstances,themeName:this.props.themeName,objects:this.props.objects})}renderCustomEditor(){return y.jsx(ew,{id:"custom-tabpanel-settings",registerSaveFunc:t=>this.saveFunc=t,t:this.props.t,allVisibleObjects:this.props.allVisibleObjects,lang:this.props.lang,expertMode:this.props.expertMode,socket:this.props.socket,objectIDs:this.props.objectIDs,customsInstances:this.props.customsInstances,objects:this.props.objects,onProgress:t=>this.setState({progressRunning:t}),reportChangedIds:this.props.reportChangedIds,onChange:(t,e)=>{this.setState({hasChanges:t},()=>{if(e){const i=this.isChartAvailable();i!==this.chartAvailable&&(this.chartAvailable=i,this.forceUpdate())}})},theme:this.props.theme,themeName:this.props.themeName,themeType:this.props.themeType,systemConfig:this.props.systemConfig})}renderDialogConfirm(){return this.state.confirmDialog?y.jsx(mh,{title:$.t("You have unsaved changes"),text:$.t("Discard?"),ok:$.t("Yes"),cancel:$.t("Cancel"),onClose:t=>this.setState({confirmDialog:!1},()=>t&&this.props.onClose())}):null}onClose(){this.state.hasChanges?this.setState({confirmDialog:!0}):this.props.onClose()}renderWarningDialog(){return this.state.showWarning?y.jsx(mh,{text:y.jsx("div",{style:{color:"#F00"},children:this.props.t("Your are intend to edit ALL objects. Are you sure?")}),ok:this.props.t("Yes"),onClose:t=>{this.setState({showWarning:!1}),t||this.onClose()}}):null}render(){var e,i;const t=(i=(e=this.props.objects[this.props.objectIDs[0]])==null?void 0:e.common)==null?void 0:i.type;return y.jsxs(w.Dialog,{sx:{"&.MuiDialog-scrollPaper":rr.dialog,"& .MuiDialog-paper":rr.paper},scroll:"paper",open:!0,onClose:()=>this.props.onClose(),fullWidth:!0,maxWidth:"xl","aria-labelledby":"form-dialog-title",children:[this.renderDialogConfirm(),this.renderWarningDialog(),y.jsx(w.DialogTitle,{children:this.props.objectIDs.length>1?this.props.t("Edit config for %s states",this.props.objectIDs.length):this.props.t("Edit config: %s",this.props.objectIDs[0])}),y.jsxs(w.DialogContent,{style:rr.content,children:[y.jsx(w.AppBar,{position:"static",children:y.jsxs(w.Tabs,{value:this.state.currentTab,onChange:(n,a)=>{yh.doNavigate(null,null,null,a===1?"table":a===2?"chart":"config"),this.setState({currentTab:a}),(window._localStorage||window.localStorage).setItem("App.objectCustomTab",a)},sx:{"& .MuiTabs-indicator":rr.tabsIndicator},indicatorColor:"secondary",children:[y.jsx(w.Tab,{disabled:this.state.progressRunning,label:this.props.t("Custom settings"),id:"custom-settings-tab","aria-controls":"custom-tabpanel-settings",sx:{"&.Mui-selected":rr.tabSelected}}),this.props.objectIDs.length===1&&this.chartAvailable?y.jsx(w.Tab,{disabled:this.state.progressRunning,label:this.props.t("History data"),id:"history-data-tab","aria-controls":"custom-tabpanel-history",sx:{"&.Mui-selected":rr.tabSelected}}):null,(t==="number"||t==="boolean")&&this.props.objectIDs.length===1&&this.chartAvailable?y.jsx(w.Tab,{disabled:this.state.progressRunning,label:this.props.t("Chart"),id:"chart-tab","aria-controls":"custom-tabpanel-chart",sx:{"&.Mui-selected":rr.tabSelected}}):null]})}),this.state.currentTab===0?y.jsx(w.Box,{component:"div",sx:rr.tabPanel,children:this.renderCustomEditor()}):null,this.props.objectIDs.length===1&&this.chartAvailable&&this.state.currentTab===1?y.jsx(w.Box,{component:"div",sx:rr.tabPanel,children:this.renderTable()}):null,(t==="number"||t==="boolean")&&this.props.objectIDs.length===1&&this.chartAvailable&&this.state.currentTab===2?y.jsx(w.Box,{component:"div",sx:rr.tabPanel,children:this.renderCharts()}):null]}),y.jsxs(w.DialogActions,{children:[this.state.currentTab===0&&y.jsx(w.Button,{id:"object-custom-dialog-save",variant:"contained",color:"primary",disabled:!this.state.hasChanges||this.state.progressRunning,onClick:()=>this.saveFunc&&this.saveFunc(),children:this.getButtonTitle(y.jsx(H.Save,{}),this.props.t("Save"))}),this.state.currentTab===0&&y.jsx(w.Button,{id:"object-custom-dialog-save-close",variant:"contained",color:"primary",disabled:!this.state.hasChanges||this.state.progressRunning,onClick:()=>{this.saveFunc?this.saveFunc(n=>!n&&this.onClose()):this.onClose()},children:this.getButtonTitle(y.jsx(H.Save,{}),this.props.t("Save & close"),y.jsx(H.Close,{}))}),y.jsx(w.Button,{id:"object-custom-dialog-close",disabled:this.state.progressRunning,variant:"contained",onClick:()=>this.onClose(),color:"grey",children:this.getButtonTitle(y.jsx(H.Close,{}),this.props.t("Close"))})]})]})}}const ve={formControl:{minWidth:100},quality:{width:"calc(100% - 88px)"},expire:{ml:1,width:80},readOnly:{backgroundColor:"#b74848"},readOnlyText:{color:"#b74848",marginLeft:8},wrapperButton:{"@media screen and (max-width: 465px)":{"& *":{fontSize:12}},"@media screen and (max-width: 380px)":{"& *":{fontSize:11}}},ackCheckbox:{marginLeft:4},dialog:{minHeight:window.clientHeight-50>500?500:window.clientHeight-50},tooltip:{pointerEvents:"none"}};class Dn extends at.Component{propsValue;chartFrom;ack;inputRef=vh.createRef();q;expire;constructor(t){super(t);let e=this.props.type;e||(e=typeof this.props.value);let i=this.props.value;if(this.propsValue=i,this.propsValue===null?this.propsValue="null":this.propsValue===void 0&&(this.propsValue="undefined"),this.props.states)e="states";else if(e==="string"||e==="json"){if(i&&typeof i=="string"&&(i.startsWith("[")&&i.endsWith("]")||i.startsWith("{")&&i.endsWith("}")))try{i=JSON.parse(i),i=JSON.stringify(i,null,2),this.propsValue=i,e="json"}catch{}}else e==="number"&&(i=parseFloat(this.propsValue)||0);this.state={type:e,chart:!1,chartEnabled:(window._localStorage||window.localStorage).getItem("App.chartSetValue")!=="false",fullScreen:(window._localStorage||window.localStorage).getItem("App.fullScreen")==="true",targetValue:i,valid:!0,jsonError:!1},this.ack=!1,this.q=0,this.expire=0,this.inputRef=vh.createRef(),this.chartFrom=Date.now()-36e5*2}componentDidMount(){var t,e,i;this.props.defaultHistory&&((e=(t=this.props.object)==null?void 0:t.common)!=null&&e.custom)&&((i=this.props.object.common.custom[this.props.defaultHistory])!=null&&i.enabled)&&this.props.socket.getState(`system.adapter.${this.props.defaultHistory}.alive`).then(n=>this.setState({chart:!!(n!=null&&n.val)})),setTimeout(()=>{var n;if((n=this.inputRef)!=null&&n.current){const a=this.inputRef.current,o=a.value||"",s=a.type;a.type==="number"&&(a.type="text"),a.setSelectionRange(0,o.length),s==="number"&&(a.type=s)}},200)}onUpdate(t){t&&(t.stopPropagation(),t.preventDefault());let e=this.state.targetValue;if(this.state.type==="states")if(e==="null")e=null;else{const i=this.props.type||typeof this.state.targetValue;e=typeof e=="object"?e.value:e,i==="number"?typeof e=="string"&&(e=parseFloat(e.replace(",","."))||0):i==="boolean"&&(e=e===!0||e==="true"||e==="1"||e==="ON"||e==="on")}else this.state.type==="number"?e==="null"?e=null:typeof e=="string"&&(e=parseFloat(e.replace(",","."))||0):this.state.type==="boolean"&&(e==="null"?e=null:e=e===!0||e==="true"||e==="1"||e==="ON"||e==="on");this.props.onClose({val:e,ack:this.ack,q:this.q,expire:parseInt(this.expire,10)||void 0})}static isNumberValid(t){const{common:e,value:i}=t;if(i==="")return!1;const n=Number(i);return typeof e.min=="number"&&n<e.min?!1:!(typeof e.max=="number"&&n>e.max)}renderTimePicker(){return y.jsxs(Zt.LocalizationProvider,{adapterLocale:Ms[this.props.lang],dateAdapter:Cs,children:[y.jsx(Zt.DatePicker,{value:Number(this.state.targetValue),onChange:t=>{t&&this.setState({targetValue:Math.round(t.getTime())})}}),y.jsx(Zt.TimePicker,{value:Number(this.state.targetValue),views:["hours","minutes","seconds"],onChange:t=>{t&&this.setState({targetValue:Math.round(t.getTime())})}})]})}renderChart(){return y.jsx(jx,{t:this.props.t,isFloatComma:this.props.isFloatComma,showJumpToEchart:!1,lang:this.props.lang,socket:this.props.socket,obj:this.props.object,themeType:this.props.themeType,theme:this.props.theme,from:this.chartFrom,end:Date.now(),noToolbar:!0,dateFormat:this.props.dateFormat,defaultHistory:this.props.defaultHistory})}static checkJsonError(t){try{return JSON.parse(t),!1}catch{return!0}}renderJsonEditor(){return y.jsx(Ym,{error:this.state.jsonError,editValueMode:!0,themeType:this.props.themeType,defaultValue:(this.propsValue||"").toString(),onChange:t=>this.setState({targetValue:t,jsonError:Dn.checkJsonError(t)})})}renderStates(){if(!this.props.states)return null;if(this.props.type==="number"&&this.props.object.common.max!==void 0&&this.props.object.common.min!==void 0){const t=Object.keys(this.props.states).map(e=>({label:this.props.states[e],value:e}));return y.jsx(w.Autocomplete,{style:ve.formControl,disablePortal:!0,defaultValue:this.props.states[this.propsValue]!==void 0?this.props.states[this.propsValue]:this.propsValue,options:t,noOptionsText:"",freeSolo:!0,getOptionLabel:e=>(e==null?void 0:e.label)||(e!=null?e.toString():""),onChange:(e,i)=>this.setState({targetValue:i}),onInputChange:(e,i)=>this.setState({targetValue:i}),onKeyUp:e=>e.key==="Enter"&&this.onUpdate(e),renderInput:e=>y.jsx(w.TextField,{...e,label:this.props.t("Value"),variant:"standard"})})}return y.jsxs(w.FormControl,{variant:"standard",style:ve.formControl,children:[y.jsx(w.InputLabel,{children:this.props.t("Value")}),y.jsx(w.Select,{variant:"standard",defaultValue:this.propsValue,onChange:t=>this.setState({targetValue:t.target.value}),children:Object.keys(this.props.states).map((t,e)=>y.jsx(w.MenuItem,{value:t,children:this.props.states[t]},e))})]})}render(){var e,i,n;const t=y.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[y.jsx(w.FormControlLabel,{style:{...ve.formControl,...this.props.expertMode?void 0:ve.ackCheckbox},control:y.jsx(w.Checkbox,{defaultChecked:!1,onChange:a=>this.ack=a.target.checked}),label:this.props.t("Acknowledged")}),y.jsx(w.Tooltip,{title:this.props.t("Acknowledged explanation"),slotProps:{popper:{sx:ve.tooltip}},children:y.jsx(H.Info,{color:"primary"})})]});return y.jsxs(w.Dialog,{open:!0,maxWidth:this.state.type==="number"||this.state.type==="boolean"||this.state.type==="states"?this.state.chart&&this.state.chartEnabled?"lg":void 0:"md",fullWidth:this.state.type==="json"&&this.state.fullScreen||this.state.type!=="number"&&this.state.type!=="boolean"&&this.state.type!=="states"||this.state.chart&&this.state.chartEnabled,fullScreen:this.state.type==="json"&&this.state.fullScreen,onClose:()=>this.props.onClose(),"aria-labelledby":"edit-value-dialog-title","aria-describedby":"edit-value-dialog-description",sx:{"&. MuiDialog-paper":this.state.type==="json"?ve.dialog:void 0},children:[y.jsxs(w.DialogTitle,{id:"edit-value-dialog-title",children:[this.props.t("Write value"),((e=this.props.object.common)==null?void 0:e.write)===!1?y.jsxs("span",{style:ve.readOnlyText,children:["(",this.props.t("read only"),")"]}):null,this.state.chart?y.jsx(w.Fab,{style:{float:"right"},size:"small",color:this.state.chartEnabled?"primary":"default",onClick:()=>{(window._localStorage||window.localStorage).setItem("App.chartSetValue",this.state.chartEnabled?"false":"true"),this.setState({chartEnabled:!this.state.chartEnabled})},children:y.jsx(H.ShowChart,{})}):null,this.state.type==="json"?y.jsx(w.IconButton,{style:{float:"right"},onClick:()=>{(window._localStorage||window.localStorage).setItem("App.fullScreen",this.state.fullScreen?"false":"true"),this.setState({fullScreen:!this.state.fullScreen})},children:this.state.fullScreen?y.jsx(H.FullscreenExit,{}):y.jsx(H.Fullscreen,{})}):null]}),y.jsx(w.DialogContent,{children:y.jsx("form",{noValidate:!0,autoComplete:"off",onSubmit:()=>!1,style:{...ve.dialogForm,height:"100%"},children:y.jsxs(w.Grid2,{container:!0,direction:"row",spacing:2,style:{height:"100%"},children:[y.jsx(w.Grid2,{size:{xs:this.state.chart&&this.state.chartEnabled?6:12},style:{height:"100%"},children:y.jsxs(w.Grid2,{container:!0,direction:"column",spacing:2,style:{marginTop:0,height:"100%"},children:[this.props.expertMode?y.jsx(w.Grid2,{children:y.jsxs(w.Grid2,{container:!0,direction:"row",spacing:2,style:{marginTop:0},children:[this.props.expertMode?y.jsx(w.Grid2,{children:y.jsxs(w.FormControl,{style:ve.formControl,children:[y.jsx(w.InputLabel,{style:{marginTop:10,marginLeft:-14},children:this.props.t("Value type")}),y.jsxs(w.Select,{variant:"standard",value:this.state.type,onChange:a=>{this.setState({type:a.target.value,valid:a.target.value==="number"?Dn.isNumberValid({value:this.state.targetValue,common:this.props.object.common}):!0,jsonError:!1},()=>{this.state.type==="json"&&this.setState({targetValue:(this.state.targetValue||"").toString(),jsonError:Dn.checkJsonError((this.state.targetValue||"").toString())})})},children:[y.jsx(w.MenuItem,{value:"string",children:"String"}),y.jsx(w.MenuItem,{value:"number",children:"Number"}),y.jsx(w.MenuItem,{value:"boolean",children:"Boolean"}),y.jsx(w.MenuItem,{value:"json",children:"JSON"}),this.props.states?y.jsx(w.MenuItem,{value:"states",children:"States"}):null]})]})}):null,this.state.type==="json"?y.jsx(w.Grid2,{flex:1}):null]})}):null,y.jsx(w.Grid2,{flex:this.state.type==="json"&&this.state.fullScreen?1:void 0,style:{paddingTop:0},children:this.state.type==="boolean"?y.jsx(w.Typography,{component:"div",style:this.props.expertMode?{marginTop:20,width:"100%",backgroundColor:this.props.themeType==="dark"?"#595959":"#dadada",borderRadius:5,padding:5}:void 0,children:y.jsxs(w.Grid2,{component:"label",container:!0,alignItems:"center",spacing:1,children:[y.jsxs(w.Grid2,{style:{marginRight:10},children:[this.props.t("Value"),":"]}),y.jsx(w.Grid2,{children:"FALSE"}),y.jsx(w.Grid2,{children:y.jsx(w.Switch,{autoFocus:!0,defaultChecked:this.propsValue==="null"||this.propsValue==="undefined"?!1:!!this.propsValue,onKeyUp:a=>a.key==="Enter"&&this.onUpdate(a),onChange:a=>this.setState({targetValue:a.target.checked})})}),y.jsx(w.Grid2,{children:"TRUE"})]})}):this.state.type==="number"?y.jsx(w.TextField,{variant:"standard",fullWidth:!0,autoFocus:!0,error:!this.state.valid,type:"number",slotProps:{htmlInput:{step:this.props.object.common.step,min:this.props.object.common.min,max:this.props.object.common.max}},inputRef:this.inputRef,helperText:this.props.t("Press ENTER to write the value, when focused"),value:this.state.targetValue.toString(),label:this.props.t("Value")+(this.props.object.common.min!==void 0||this.props.object.common.unit==="%"?`, ${this.props.t("min:")} ${this.props.object.common.min!==void 0?this.props.object.common.min:0}`:"")+(this.props.object.common.max!==void 0||this.props.object.common.unit==="%"?`, ${this.props.t("max:")} ${this.props.object.common.max!==void 0?this.props.object.common.max:100}`:""),onKeyUp:a=>a.key==="Enter"&&this.state.valid&&this.onUpdate(a),onChange:a=>{this.setState({targetValue:a.target.value,valid:Dn.isNumberValid({value:a.target.value,common:this.props.object.common})})}}):this.state.type==="json"?this.renderJsonEditor():this.state.type==="states"?this.renderStates():y.jsx(w.TextField,{variant:"standard",fullWidth:!0,inputRef:this.inputRef,autoFocus:!0,helperText:this.props.t("Press CTRL+ENTER to write the value, when focused"),label:this.props.t("Value"),multiline:!0,onKeyDown:a=>a.ctrlKey&&a.key==="Enter"&&this.onUpdate(a),defaultValue:this.propsValue.toString(),onChange:a=>this.setState({targetValue:a.target.value})})}),(this.props.role==="date"||(i=this.props.role)!=null&&i.startsWith("date."))&&this.state.type==="number"?y.jsx(w.Grid2,{style:{display:"flex",gap:"5px"},size:{xs:6},children:this.renderTimePicker()}):null,this.props.expertMode?y.jsx(w.Grid2,{children:t}):null,this.props.expertMode?y.jsxs(w.Grid2,{children:[y.jsxs(w.FormControl,{variant:"standard",style:ve.quality,children:[y.jsx(w.InputLabel,{children:this.props.t("Quality")}),y.jsxs(w.Select,{variant:"standard",defaultValue:0,onChange:a=>this.q=Number(a.target.value),children:[y.jsx(w.MenuItem,{value:0,children:"0x00 - good"}),y.jsx(w.MenuItem,{value:1,children:"0x01 - general problem"}),y.jsx(w.MenuItem,{value:2,children:"0x02 - no connection problem"}),y.jsx(w.MenuItem,{value:16,children:"0x10 - substitute value from controller"}),y.jsx(w.MenuItem,{value:32,children:"0x20 - substitute initial value"}),y.jsx(w.MenuItem,{value:64,children:"0x40 - substitute value from device or instance"}),y.jsx(w.MenuItem,{value:128,children:"0x80 - substitute value from sensor"}),y.jsx(w.MenuItem,{value:17,children:"0x11 - general problem by instance"}),y.jsx(w.MenuItem,{value:65,children:"0x41 - general problem by device"}),y.jsx(w.MenuItem,{value:129,children:"0x81 - general problem by sensor"}),y.jsx(w.MenuItem,{value:18,children:"0x12 - instance not connected"}),y.jsx(w.MenuItem,{value:66,children:"0x42 - device not connected"}),y.jsx(w.MenuItem,{value:130,children:"0x82 - sensor not connected"}),y.jsx(w.MenuItem,{value:68,children:"0x44 - device reports error"}),y.jsx(w.MenuItem,{value:132,children:"0x84 - sensor reports error"})]})]}),y.jsx(w.TextField,{variant:"standard",title:this.props.t("0 - no expiration"),sx:{"&.MuiTextField-root":ve.expire},label:this.props.t("Expire"),type:"number",slotProps:{htmlInput:{min:0}},helperText:this.props.t("in seconds"),defaultValue:this.expire,onChange:a=>this.expire=Number(a.target.value)})]}):null]})}),this.state.chart&&this.state.chartEnabled&&this.state.type!=="json"?y.jsx(w.Grid2,{size:{xs:6},style:{minHeight:300},sx:{display:{sm:"none",md:"inline-block"}},children:this.renderChart()}):null]})})}),y.jsxs(w.DialogActions,{sx:ve.wrapperButton,children:[this.props.expertMode?null:t,this.props.expertMode?null:y.jsx("div",{style:{flexGrow:1}}),y.jsx(w.Button,{variant:"contained",disabled:!this.state.valid,onClick:a=>this.onUpdate(a),color:"primary",startIcon:this.props.width!=="xs"?y.jsx(H.Check,{}):void 0,style:((n=this.props.object.common)==null?void 0:n.write)===!1?ve.readOnly:void 0,children:this.props.width!=="xs"?this.props.t("Set value"):y.jsx(H.Check,{fontSize:"large"})}),y.jsx(w.Button,{variant:"contained",onClick:()=>this.props.onClose(),color:"grey",startIcon:this.props.width!=="xs"?y.jsx(H.Close,{}):void 0,children:this.props.width!=="xs"?this.props.t("Cancel"):y.jsx(H.Close,{fontSize:"large"})})]})]})}}const O={divWithoutTitle:{width:"100%",height:"100%",border:"2px solid #00000000"},divWithoutTitleAndTab:{height:"calc(100% - 48px)"},error:{border:"2px solid #FF0000"},id:{fontStyle:"italic"},dialog:{height:"calc(100% - 64px)"},aliasIdEdit:{width:368},button:{marginTop:20,marginLeft:8},funcDivEdit:{width:"100%"},funcEditName:{display:"inline-block",width:85},funcEdit:{width:400},funcIcon:{width:16,height:16},marginTop:{marginTop:20},commonTabWrapper:{flexFlow:"wrap",display:"flex",gap:8},commonWrapper:{width:500,minWidth:300},flexDrop:{width:"100%",maxWidth:500,margin:"auto",display:"flex"},marginBlock:{marginTop:20},buttonAdd:{minWidth:150},textField:{width:"100%"},flex:{display:"flex","& > div":{mr:"8px"}},close:{width:"20px",height:"20px",opacity:"0.9",cursor:"pointer",position:"relative",top:20,transition:"all 0.6s ease","&:hover":{transform:"rotate(90deg)"},"&:before":{position:"absolute",left:"9px",content:'""',height:"20px",width:"3px",backgroundColor:"#ff4f4f",transform:"rotate(45deg)"},"&:after":{position:"absolute",left:"9px",content:'""',height:"20px",width:"3px",backgroundColor:"#ff4f4f",transform:"rotate(-45deg)"}},color:{width:70},buttonRemoveWrapper:{position:"absolute",zIndex:222,right:0},tabsPadding:{padding:"0px 24px"},wrapperButton:{"@media screen and (max-width: 465px)":{"& *":{fontSize:10}},"@media screen and (max-width: 380px)":{"& *":{fontSize:9}}},commonDeleteTip:{color:"#fa4a4a"},typeNameEng:{marginLeft:8,opacity:.7,fontStyle:"italic",fontSize:"smaller"},tooltip:{pointerEvents:"none"},stateRow:{width:"100%",display:"flex",justifyContent:"space-between",padding:3},stateTitle:{minWidth:150,fontWeight:"bold"},stateUnit:{opacity:.7,marginLeft:4},stateValue:{animation:"newStateEditorAnimation 2s ease-in-out"},stateTime:{fontStyle:"italic"},stateImage:{maxWidth:200,maxHeight:200}};function PO(r,t){return{"@keyframes newStateEditorAnimation":{"0%":{color:r.palette.mode==="dark"?"#27cf00":"#174e00"},"100%":{color:t||(r.palette.mode==="dark"?"#ffffff":"#000000")}}}}const co=[{role:"button",type:"boolean",r:!1,w:!0},{role:"button.close.blind",type:"boolean",r:!1,w:!0},{role:"button.fastforward",type:"boolean",r:!1,w:!0},{role:"button.forward",type:"boolean",r:!1,w:!0},{role:"button.long",type:"boolean",r:!1,w:!0},{role:"button.mode",type:"boolean",r:!1,w:!0},{role:"button.mode.auto",type:"boolean",r:!1,w:!0},{role:"button.mode.silent",type:"boolean",r:!1,w:!0},{role:"button.next",type:"boolean",r:!1,w:!0},{role:"button.open.blind",type:"boolean",r:!1,w:!0},{role:"button.open.door",type:"boolean",r:!1,w:!0},{role:"button.pause",type:"boolean",r:!1,w:!0},{role:"button.stop",type:"boolean",r:!1,w:!0},{role:"button.stop.tilt",type:"boolean",r:!1,w:!0},{role:"button.volume.up",type:"boolean",r:!1,w:!0},{role:"chart",type:"string"},{role:"date",type:"string"},{role:"date",type:"number"},{role:"date.end",type:"string"},{role:"date.end",type:"number"},{role:"date.forecast.1",type:"string"},{role:"date.start",type:"string"},{role:"date.start",type:"number"},{role:"date.sunrise",type:"string"},{role:"date.sunrise",type:"number"},{role:"date.sunset",type:"string"},{role:"date.sunset",type:"number"},{role:"dayofweek",type:"number"},{role:"html",type:"string"},{role:"indicator",type:"boolean",w:!1},{role:"indicator.alarm",type:"boolean",w:!1},{role:"indicator.alarm.fire",type:"boolean",w:!1},{role:"indicator.alarm.flood",type:"boolean",w:!1},{role:"indicator.alarm.health",type:"boolean",w:!1},{role:"indicator.alarm.secure",type:"boolean",w:!1},{role:"indicator.connected",type:"boolean",w:!1},{role:"indicator.maintenance",type:"boolean",w:!1},{role:"indicator.maintenance.alarm",type:"boolean",w:!1},{role:"indicator.maintenance.lowbat",type:"boolean",w:!1},{role:"indicator.maintenance.waste",type:"boolean",w:!1},{role:"indicator.reachable",type:"boolean",w:!1},{role:"info.address",type:"string",w:!1},{role:"info.display",type:"string",w:!1},{role:"info.firmware",type:"string",w:!1},{role:"info.hardware",type:"string",w:!1},{role:"info.ip",type:"string",w:!1},{role:"info.mac",type:"string",w:!1},{role:"info.name",type:"string",w:!1},{role:"info.port",type:"string",w:!1},{role:"info.port",type:"number",w:!1},{role:"info.serial",type:"string",w:!1},{role:"info.standby",type:"string",w:!1},{role:"info.status",w:!1},{role:"json",type:"string"},{role:"level",type:"number",w:!0},{role:"level.bass",type:"number",w:!0},{role:"level.blind",type:"number",w:!0},{role:"level.color.blue",type:"number",w:!0},{role:"level.color.hue",type:"number",w:!0},{role:"level.color.luminance",type:"number",w:!0},{role:"level.color.red",type:"number",w:!0},{role:"level.color.saturation",type:"number",w:!0},{role:"level.curtain",type:"number",w:!0},{role:"level.mode.airconditioner",type:"number",w:!0},{role:"level.mode.cleanup",type:"number",w:!0},{role:"level.mode.fan",type:"number",w:!0},{role:"level.mode.swing",type:"number",w:!0},{role:"level.mode.thermostat",type:"number",w:!0},{role:"level.mode.work",type:"number",w:!0},{role:"level.temperature",type:"number",w:!0},{role:"level.tilt",type:"number",w:!0},{role:"level.timer",type:"number",w:!0},{role:"level.treble",type:"number",w:!0},{role:"level.valve",type:"number",w:!0},{role:"level.volume",type:"number",w:!0},{role:"level.volume.group",type:"number",w:!0},{role:"list",type:"string"},{role:"list",type:"array"},{role:"location",type:"string"},{role:"media.add",type:"string"},{role:"media.bitrate",type:"string"},{role:"media.bitrate",type:"number"},{role:"media.broadcastDate",type:"string"},{role:"media.browser",type:"string"},{role:"media.clear",type:"boolean"},{role:"media.content",type:"string"},{role:"media.cover",type:"string"},{role:"media.cover.big",type:"string"},{role:"media.cover.small",type:"string"},{role:"media.date",type:"string"},{role:"media.duration",type:"number"},{role:"media.duration",type:"string"},{role:"media.duration.text",type:"string"},{role:"media.elapsed",type:"number"},{role:"media.elapsed",type:"string"},{role:"media.elapsed.text",type:"string"},{role:"media.episode",type:"number"},{role:"media.episode",type:"string"},{role:"media.genre",type:"string"},{role:"media.input",type:"string"},{role:"media.jump",type:"string"},{role:"media.link",type:"string"},{role:"media.mode.repeat",type:"string"},{role:"media.mode.shuffle",type:"string"},{role:"media.mute",type:"string"},{role:"media.mute.group",type:"string"},{role:"media.playid",type:"string"},{role:"media.playlist",type:"string"},{role:"media.season",type:"string"},{role:"media.seek",type:"string"},{role:"media.state",type:"string"},{role:"media.titel",type:"string"},{role:"media.track",type:"string"},{role:"media.tts",type:"string"},{role:"media.url",type:"string"},{role:"media.url.announcement",type:"string"},{role:"medien.artist",type:"string"},{role:"sensor.alarm",type:"boolean",w:!1},{role:"sensor.alarm.fire",type:"boolean",w:!1},{role:"sensor.alarm.flood",type:"boolean",w:!1},{role:"sensor.alarm.power",type:"boolean",w:!1},{role:"sensor.alarm.secure",type:"boolean",w:!1},{role:"sensor.door",type:"boolean",w:!1},{role:"sensor.light",type:"boolean",w:!1},{role:"sensor.lock",type:"boolean",w:!1},{role:"sensor.motion",type:"boolean",w:!1},{role:"sensor.noise",type:"boolean",w:!1},{role:"sensor.rain",type:"boolean",w:!1},{role:"sensor.window",type:"boolean",w:!1},{role:"state",type:"mixed"},{role:"switch",type:"boolean",w:!0},{role:"switch.enable",type:"boolean",w:!0},{role:"switch.gate",type:"boolean",w:!0},{role:"switch.gate",type:"boolean",w:!0},{role:"switch.light",type:"boolean",w:!0},{role:"switch.lock.door",type:"boolean",w:!0},{role:"switch.lock.window",type:"boolean",w:!0},{role:"switch.mode",type:"boolean",w:!0},{role:"switch.mode.auto",type:"boolean",w:!0},{role:"switch.mode.boost",type:"boolean",w:!0},{role:"switch.mode.color",type:"boolean",w:!0},{role:"switch.mode.manual",type:"boolean",w:!0},{role:"switch.mode.moonlight",type:"boolean",w:!0},{role:"switch.mode.party",type:"boolean",w:!0},{role:"switch.mode.silent",type:"boolean",w:!0},{role:"switch.power",type:"boolean",w:!0},{role:"switch.power.zone",type:"boolean",w:!0},{role:"text",type:"string"},{role:"text.phone",type:"string"},{role:"text.url",type:"string"},{role:"url",type:"string"},{role:"url.audio",type:"string"},{role:"url.blank",type:"string"},{role:"url.cam",type:"string"},{role:"url.same",type:"string"},{role:"value",type:"number",w:!1},{role:"value.battery",type:"number",w:!1},{role:"value.blind",type:"number",w:!1},{role:"value.blood.sugar",type:"number",w:!1},{role:"value.brightness",type:"number",w:!1},{role:"value.clouds",type:"number",w:!1},{role:"value.current",type:"number",w:!1},{role:"value.curtain",type:"number",w:!1},{role:"value.default",type:"number",w:!1},{role:"value.direction",type:"number",w:!1},{role:"value.direction.max.wind",type:"number",w:!1},{role:"value.direction.min.wind",type:"number",w:!1},{role:"value.direction.wind",type:"number",w:!1},{role:"value.direction.wind.forecast.0",type:"number",w:!1},{role:"value.direction.wind.forecast.1",type:"number",w:!1},{role:"value.distance",type:"number",w:!1},{role:"value.fill",type:"number",w:!1},{role:"value.gate",type:"number",w:!1},{role:"value.gps",type:"number",w:!1},{role:"value.gps.accuracy",type:"number",w:!1},{role:"value.gps.elevation",type:"number",w:!1},{role:"value.gps.latitude",type:"number",w:!1},{role:"value.gps.longitude",type:"number",w:!1},{role:"value.gps.radius",type:"number",w:!1},{role:"value.health.bmi",type:"number",w:!1},{role:"value.health.bpm",type:"number",w:!1},{role:"value.health.calories",type:"number",w:!1},{role:"value.health.fat",type:"number",w:!1},{role:"value.health.steps",type:"number",w:!1},{role:"value.health.weight",type:"number",w:!1},{role:"value.humidity",type:"number",w:!1},{role:"value.humidity",type:"number",w:!1},{role:"value.humidity.max",type:"number",w:!1},{role:"value.humidity.min",type:"number",w:!1},{role:"value.interval",type:"number",w:!1},{role:"value.lock",type:"number",w:!1},{role:"value.min",type:"number",w:!1},{role:"value.position",type:"number",w:!1},{role:"value.power",type:"number",w:!1},{role:"value.power.consumption",type:"number",w:!1},{role:"value.power.production",type:"number",w:!1},{role:"value.power.reactive",type:"number",w:!1},{role:"value.precipitation",type:"number",w:!1},{role:"value.precipitation.chance",type:"number",w:!1},{role:"value.precipitation.day.forecast.0",type:"number",w:!1},{role:"value.precipitation.forecast.0",type:"number",w:!1},{role:"value.precipitation.hour",type:"number",w:!1},{role:"value.precipitation.night.forecast.0",type:"number",w:!1},{role:"value.precipitation.today",type:"number",w:!1},{role:"value.precipitation.type",type:"number",w:!1},{role:"value.prepitation.forecast.0",type:"number",w:!1},{role:"value.prepitation.forecast.1",type:"number",w:!1},{role:"value.prepitation.forecast.1",type:"number",w:!1},{role:"value.pressure",type:"number",w:!1},{role:"value.pressure.forecast.0",type:"number",w:!1},{role:"value.pressure.forecast.1",type:"number",w:!1},{role:"value.radiation",type:"number",w:!1},{role:"value.rain",type:"number",w:!1},{role:"value.rain.hour",type:"number",w:!1},{role:"value.rain.today",type:"number",w:!1},{role:"value.severity",type:"number",w:!1},{role:"value.snow",type:"number",w:!1},{role:"value.snow.hour",type:"number",w:!1},{role:"value.snow.today",type:"number",w:!1},{role:"value.snowline",type:"number",w:!1},{role:"value.speed",type:"number",w:!1},{role:"value.speed.max.wind",type:"number",w:!1},{role:"value.speed.min.wind",type:"number",w:!1},{role:"value.speed.wind",type:"number",w:!1},{role:"value.speed.wind.forecast.0",type:"number",w:!1},{role:"value.speed.wind.gust",type:"number",w:!1},{role:"value.state",type:"number",w:!1},{role:"value.sun.azimuth",type:"number",w:!1},{role:"value.sun.elevation",type:"number",w:!1},{role:"value.temperature",type:"number",w:!1},{role:"value.temperature",type:"number",w:!1},{role:"value.temperature.dewpoint",type:"number",w:!1},{role:"value.temperature.feelslike",type:"number",w:!1},{role:"value.temperature.max",type:"number",w:!1},{role:"value.temperature.max.forecast.0",type:"number",w:!1},{role:"value.temperature.min",type:"number",w:!1},{role:"value.temperature.min.forecast.0",type:"number",w:!1},{role:"value.temperature.min.forecast.1",type:"number",w:!1},{role:"value.temperature.windchill",type:"number",w:!1},{role:"value.tilt",type:"number",w:!1},{role:"value.time",type:"number",w:!1},{role:"value.uv",type:"number",w:!1},{role:"value.valve",type:"number",w:!1},{role:"value.voltage",type:"number",w:!1},{role:"value.warning",type:"number",w:!1},{role:"value.waste",type:"number",w:!1},{role:"value.water",type:"number",w:!1},{role:"waether.title",type:"string",w:!1},{role:"weather.chart.url",type:"string",w:!1},{role:"weather.chart.url.forecast",type:"string",w:!1},{role:"weather.direction.wind",type:"number",w:!1},{role:"weather.direction.wind.forecast.0",type:"number",w:!1},{role:"weather.html",type:"string",w:!1},{role:"weather.icon",type:"string",w:!1},{role:"weather.icon.forecast.1",type:"string",w:!1},{role:"weather.icon.name",type:"string",w:!1},{role:"weather.icon.wind",type:"string",w:!1},{role:"weather.json",type:"string",w:!1},{role:"weather.state",type:"number",w:!1},{role:"weather.state",type:"string",w:!1},{role:"weather.state.forecast.0",type:"string",w:!1},{role:"weather.state.forecast.1",type:"string",w:!1},{role:"weather.title.forecast.0",type:"string",w:!1},{role:"weather.title.short",type:"string",w:!1},{role:"weather.type",type:"number",w:!1},{role:"weather.type",type:"string",w:!1}];class Ht extends at.Component{originalObj;subscribed=!1;updateTimer=null;constructor(t){super(t);const e=this.props.obj._id.startsWith("alias.0")&&this.props.obj.type==="state";let i=(window._localStorage||window.localStorage).getItem(`${this.props.dialogName||"App"}.editTab`)||"object";i==="alias"&&!e&&(i="common"),this.props.aliasTab&&e&&(i="alias");const n=this.props.obj,a=n.common&&"type"in n.common&&"alias"in n.common?n.common.alias.read:void 0,o=n.common&&"type"in n.common&&"alias"in n.common?n.common.alias.write:void 0;this.state={text:JSON.stringify(this.props.obj,null,2),error:!1,customError:!1,changed:!1,readError:this.checkFunction(a,!1),writeError:this.checkFunction(o,!0),tab:i,showCopyDialog:"",showCommonDeleteMessage:!1,selectId:!1,selectRead:!1,selectWrite:!1,newId:"",lang:$.getLanguage(),value:void 0},Ul.locale(this.state.lang),this.originalObj=JSON.stringify(this.props.obj,null,2)}async componentDidMount(){var i,n,a;const t=((n=(i=this.props.obj)==null?void 0:i.common)==null?void 0:n.editSchemas)||((a=this.props.obj)==null?void 0:a.editSchemas),e=[];if(t)if(typeof t=="object"){const o=Object.keys(t);for(let s=0;s<o.length;s++)try{const l=await Dd(t[o[s]],this.props.socket);if(l.key=o[s],l&&typeof l=="object"&&e.push(l),l.icon)try{const u=Hx(l.icon);if(u.type!=="base64"&&u.type!=="http"){const h=await Dd(u,this.props.socket);h&&(l.icon=h)}}catch(u){console.warn(`Cannot get icon for schema from "${l.icon}": ${u}`),l.icon=void 0}}catch(l){console.warn(`Cannot get edit schema for "${t[o[s]]}": ${l}`)}e.length&&(e.sort((s,l)=>s.order!==void 0&&l.order!==void 0?s.order-l.order:s.order!==void 0?-1:l.order!==void 0||s.key>l.key?1:-1),this.setState({customEditTabs:e}))}else console.warn(`Invalid edit schema for "${t}": expected object, but got ${typeof t}`);this.state.tab==="alias"&&(!this.props.obj._id.startsWith("alias.0")||this.props.obj.type!=="state")?this.setState({tab:"object"}):this.state.tab==="state"&&this.props.obj.type!=="state"?this.setState({tab:"object"}):this.state.tab!=="object"&&this.state.tab!=="common"&&this.state.tab!=="alias"&&this.state.tab!=="state"&&!e.find(o=>o.key===this.state.tab)&&this.setState({tab:"object"}),this.state.tab==="state"&&this.subscribeOnState(!0),this.props.socket.subscribeObject(this.props.obj._id,this.onObjectUpdated)}componentWillUnmount(){this.updateTimer&&(clearInterval(this.updateTimer),this.updateTimer=null),this.subscribeOnState(!1),this.props.socket.unsubscribeObject(this.props.obj._id,this.onObjectUpdated)}onObjectUpdated=(t,e)=>{this.originalObj!==JSON.stringify(e,null,2)&&(this.originalObj=JSON.stringify(e,null,2),this.state.changed?this.forceUpdate():this.setState({text:this.originalObj}))};checkFunction(t,e){var a,o,s,l;if(!t||t.includes("JSON.parse("))return"";let i;try{i=JSON.parse(this.state.text)}catch{}let n;try{n=new Function("val",t.includes("return")?t:`return ${t}`)}catch{return this.props.t("Cannot parse code!")}if((a=i==null?void 0:i.common)!=null&&a.type&&((l=(s=this.props.objects[(o=i.common.alias)==null?void 0:o.id])==null?void 0:s.common)!=null&&l.type)){const u=e?i.common.type:this.props.objects[i.common.alias.id].common.type,h=e?this.props.objects[i.common.alias.id].common.type:i.common.type;if(u&&h){let c=null;if(u==="boolean"?c=!0:u==="number"?c=1:(u==="string"||u==="mixed")&&(c="string"),c!==null)try{const f=n(c);return h==="mixed"?"":f!==null&&typeof f!==h?this.props.t("Type of result is not as expected: %s",h):""}catch(f){return`${this.props.t("Cannot execute function")}: ${f.toString()}`}}}return""}prepareObject(t){var e,i,n,a;t=t||this.state.text;try{const o=JSON.parse(t);return o._id=this.props.obj._id,(e=o.common)!=null&&e.alias&&(o.common.alias.id||delete o.common.alias.id,(!o.common.alias.read&&o.common.alias.read!==void 0||o.common.alias.read==="val")&&delete o.common.alias.read,(!o.common.alias.write&&o.common.alias.write!==void 0||o.common.alias.write==="val")&&delete o.common.alias.write,!o.common.alias.id&&!o.common.alias.read&&!o.common.alias.write&&delete o.common.alias),((i=o.common)==null?void 0:i.min)!==void 0&&typeof o.common.min!="number"&&(o.common.min=parseFloat(o.common.min)),((n=o.common)==null?void 0:n.max)!==void 0&&typeof o.common.max!="number"&&(o.common.max=parseFloat(o.common.max)),((a=o.common)==null?void 0:a.step)!==void 0&&typeof o.common.step!="number"&&(o.common.step=parseFloat(o.common.step)),o}catch{return null}}onChange(t,e){var a,o,s,l;const i=this.prepareObject(t),n={text:t};if(i){n.changed=this.originalObj!==JSON.stringify(i,null,2),n.showCommonDeleteMessage=!1;const u=JSON.parse(this.originalObj);i.common&&Object.keys(u.common||{}).forEach(h=>{i.common[h]===void 0&&(n.showCommonDeleteMessage=!0)}),n.error=!1,n.readError=this.checkFunction((o=(a=i.common)==null?void 0:a.alias)==null?void 0:o.read,!1),n.writeError=this.checkFunction((l=(s=i.common)==null?void 0:s.alias)==null?void 0:l.write,!0)}else n.showCommonDeleteMessage=!1,n.error=!0;this.setState(n,()=>e&&e())}onUpdate(){var t,e,i,n;try{const a=JSON.parse(this.state.text);a._id=this.props.obj._id,(t=a.common)!=null&&t.alias&&(a.common.alias.id||delete a.common.alias.id,(!a.common.alias.read&&a.common.alias.read!==void 0||a.common.alias.read==="val")&&delete a.common.alias.read,(!a.common.alias.write&&a.common.alias.write!==void 0||a.common.alias.write==="val")&&delete a.common.alias.write,!a.common.alias.id&&!a.common.alias.read&&!a.common.alias.write&&delete a.common.alias),((e=a.common)==null?void 0:e.min)!==void 0&&typeof a.common.min!="number"&&(a.common.min=parseFloat(a.common.min)),((i=a.common)==null?void 0:i.max)!==void 0&&typeof a.common.max!="number"&&(a.common.max=parseFloat(a.common.max)),((n=a.common)==null?void 0:n.step)!==void 0&&typeof a.common.step!="number"&&(a.common.step=parseFloat(a.common.step)),this.props.onClose(a)}catch{console.error(`Cannot parse: ${this.state.text}`)}}static getPartOfObject(t,e){return e?Id(JSON.parse(t),e.split(".")):JSON.parse(t)}static setPartOfObject(t,e,i){let n=JSON.parse(t);return n===void 0?t:(n=Wx(n,i.split("."),e),JSON.stringify(n,null,2))}renderCustomPanel(){var i;const t=(i=this.state.customEditTabs)==null?void 0:i.find(n=>n.key===this.state.tab);if(!t)return null;let e;try{e=Ht.getPartOfObject(this.state.text,t.path)}catch(n){return console.error(`Cannot get data for ${t.path}: ${n}`),y.jsx("div",{children:$.t("Cannot get data for %s: %s",t.path,n)})}return e?y.jsx(gh,{theme:this.props.theme,socket:this.props.socket,themeName:this.props.theme.palette.mode,themeType:this.props.theme.palette.mode,dateFormat:this.props.dateFormat,isFloatComma:this.props.isFloatComma,schema:t.json,data:e,onChange:n=>{try{const a=Ht.setPartOfObject(this.state.text,n,t.path);this.onChange(a)}catch(a){console.error(`Cannot set data for ${t.path}: ${a}`)}},adapterName:"",instance:0,onError:n=>{console.warn(`Error in JSON editor: ${n}`),this.state.customError!==n&&this.setState({customError:n})}}):y.jsx("div",{children:$.t("Cannot get data for %s",t.path)})}renderCustomTab(t,e){var a;let i;if(!e||!Id(e,(a=t.path)==null?void 0:a.split(".")))return null;t.color&&(i={backgroundColor:t.color,color:jt.invertColor(t.color,!0)});const n=t.label&&typeof t.label=="object"?t.label[this.state.lang]||t.label.en:t.noTranslation?t.label||t.key:this.props.t(t.label||t.key);return y.jsx(w.Tab,{disabled:this.state.error||this.state.customError,value:t.key,label:n,style:i,iconPosition:"start",icon:t.icon?y.jsx(ya,{src:t.icon,style:O.funcIcon}):void 0})}renderStateTab(){return this.props.obj.type!=="state"||this.props.obj.common.type==="file"?null:y.jsx(w.Tab,{disabled:this.state.customError||this.state.error,value:"state",label:this.props.t("State")})}renderStatePanel(){var a;if(this.state.value===void 0||this.state.value===null)return y.jsx("div",{children:this.props.t("State does not exist")});if(typeof this.state.value!="object")return y.jsxs("div",{style:{maxWidth:700},children:[y.jsx("div",{children:this.props.t("State is invalid")}),y.jsx("div",{children:y.jsx("pre",{children:JSON.stringify(this.state.value,null,4)})})]});let t;const e={},i=this.state.value.val,n=typeof i;if(i===void 0)t="[undef]",e.color="#bc6400",e.fontStyle="italic";else if(i===null)t="(null)",e.color="#0047b1",e.fontStyle="italic";else if(typeof this.props.obj.common.role=="string"&&this.props.obj.common.role.match(/^value\.time|^date/))if(i&&n==="string")if(jt.isStringInteger(i))t=new Date(parseInt(i,10)).toString();else try{const o=new Date(i);jt.isValidDate(o)&&(t=o.toString())}catch{}else i&&n==="number"&&(i>946681200&&i<9466812e5?t=new Date(i*1e3).toString():i>9466812e8&&(t=new Date(i).toString()));return t||(n==="number"?Number.isInteger(i)||(t=(Math.round(i*1e9)/1e9).toString(),this.props.isFloatComma&&(t=t.toString().replace(".",","))):n==="boolean"?(t=i?$.t("true"):$.t("false"),e.color=i?"#139800":"#cd6b55"):n==="object"?t=JSON.stringify(i):n==="string"&&i.startsWith("data:image/")?t=y.jsx("img",{src:i,alt:"img",style:O.stateImage}):t=i.toString()),Object.assign(e,PO(this.props.theme,e.color)),y.jsxs(w.Box,{style:{...O.divWithoutTitle,padding:"24px 24px 0 24px",fontSize:16,maxWidth:400},sx:{"& .value-line:hover":{backgroundColor:"#00000030"}},children:[y.jsxs("div",{className:"value-line",style:{...O.stateRow,marginBottom:24},children:[y.jsxs("div",{style:O.stateTitle,children:[$.t("ra_tooltip_value"),":"]}),y.jsxs(w.Box,{component:"div",sx:e,style:O.stateValue,children:[t,(a=this.props.obj.common)!=null&&a.unit?y.jsx("span",{style:O.stateUnit,children:this.props.obj.common.unit}):null]},typeof t=="string"?t:"image")]}),y.jsxs("div",{style:O.stateRow,className:"value-line",children:[y.jsxs("div",{style:O.stateTitle,children:[$.t("Type"),":"]}),y.jsx("div",{style:O.stateValue,children:n})]}),y.jsxs("div",{style:O.stateRow,className:"value-line",children:[y.jsxs("div",{style:O.stateTitle,children:[$.t("ra_tooltip_ts"),":"]}),y.jsx(w.Tooltip,{title:new Date(this.state.value.ts).toLocaleString(),slotProps:{popper:{sx:O.tooltip}},children:y.jsx("div",{style:O.stateValue,children:y.jsx("span",{style:O.stateTime,children:Ul(this.state.value.ts).fromNow()})})})]}),y.jsxs("div",{style:O.stateRow,className:"value-line",children:[y.jsxs("div",{style:O.stateTitle,children:[$.t("ra_tooltip_ack"),":"]}),y.jsxs("div",{style:{...O.stateValue,color:this.state.value.ack?"green":"red"},children:[this.state.value.ack?$.t("Acknowledged"):$.t("Command"),this.state.value.ack?" (true)":" (false)"]})]}),y.jsxs("div",{style:O.stateRow,className:"value-line",children:[y.jsxs("div",{style:O.stateTitle,children:[$.t("ra_tooltip_lc"),":"]}),y.jsx(w.Tooltip,{title:new Date(this.state.value.lc).toLocaleString(),slotProps:{popper:{sx:O.tooltip}},children:y.jsx("div",{style:O.stateValue,children:y.jsx("span",{style:O.stateTime,children:Ul(this.state.value.lc).fromNow()})})})]}),y.jsxs("div",{style:O.stateRow,className:"value-line",children:[y.jsxs("div",{style:O.stateTitle,children:[$.t("ra_tooltip_quality"),":"]}),y.jsx("div",{style:O.stateValue,children:jt.quality2text(this.state.value.q||0).join(", ")})]}),y.jsxs("div",{style:O.stateRow,className:"value-line",children:[y.jsxs("div",{style:O.stateTitle,children:[$.t("ra_tooltip_from"),":"]}),y.jsx("div",{style:O.stateValue,children:this.state.value.from})]}),y.jsxs("div",{style:O.stateRow,className:"value-line",children:[y.jsxs("div",{style:O.stateTitle,children:[$.t("ra_tooltip_user"),":"]}),y.jsx("div",{style:O.stateValue,children:this.state.value.user||"--"})]}),this.state.value.expire?y.jsxs("div",{style:O.stateRow,className:"value-line",children:[y.jsxs("div",{style:O.stateTitle,children:[$.t("ra_tooltip_expire"),":"]}),y.jsxs("div",{style:O.stateValue,children:[this.state.value.expire," ",$.t("sc_seconds")]})]}):null,this.state.value.c?y.jsxs("div",{style:O.stateRow,className:"value-line",children:[y.jsxs("div",{style:O.stateTitle,children:[$.t("ra_tooltip_comment"),":"]}),y.jsx("div",{style:O.stateValue,children:this.state.value.c})]}):null]})}onStateChange=(t,e)=>{JSON.stringify(e)!==JSON.stringify(this.state.value)&&this.setState({value:e})};subscribeOnState(t){t?this.subscribed||(this.updateTimer||(this.updateTimer=setInterval(()=>{this.forceUpdate()},5e3)),this.subscribed=!0,this.props.socket.subscribeState(this.props.obj._id,this.onStateChange)):this.subscribed&&(this.updateTimer&&(clearInterval(this.updateTimer),this.updateTimer=null),this.subscribed=!1,this.props.socket.unsubscribeState(this.props.obj._id,this.onStateChange))}renderTabs(t){var e;return y.jsxs(w.Tabs,{style:O.tabsPadding,value:this.state.tab,onChange:(i,n)=>{var a,o,s;if((window._localStorage||window.localStorage).setItem(`${this.props.dialogName||"App"}.editTab`,n),n==="object"){try{const l=JSON.parse(this.state.text);let u=!1;((a=l.common)==null?void 0:a.min)!==void 0&&typeof l.common.min!="number"&&(l.common.min=parseFloat(l.common.min),u=!0),((o=l.common)==null?void 0:o.max)!==void 0&&typeof l.common.max!="number"&&(l.common.max=parseFloat(l.common.max),u=!0),((s=l.common)==null?void 0:s.step)!==void 0&&typeof l.common.step!="number"&&(l.common.step=parseFloat(l.common.step),u=!0),u&&this.setState({text:JSON.stringify(l,null,2)})}catch{}this.subscribeOnState(!1)}else n==="state"?this.subscribeOnState(!0):this.subscribeOnState(!1);this.setState({tab:n})},children:[y.jsx(w.Tab,{value:"common",disabled:this.state.customError||this.state.error,label:this.props.t("common")}),y.jsx(w.Tab,{value:"object",disabled:this.state.customError,label:this.props.t("Object data")}),this.renderStateTab(),this.props.obj._id.startsWith("alias.0")&&this.props.obj.type==="state"&&y.jsx(w.Tab,{disabled:this.state.customError||this.state.error,value:"alias",label:this.props.t("Alias")}),(e=this.state.customEditTabs)==null?void 0:e.map(i=>this.renderCustomTab(i,t))]})}renderSelectDialog(){var i,n,a,o;if(!this.state.selectId&&!this.state.selectRead&&!this.state.selectWrite)return null;let t="",e;try{e=JSON.parse(this.state.text);const s=e.common&&"type"in e.common&&"alias"in e.common?(i=e.common.alias)==null?void 0:i.read:"",l=e.common&&"type"in e.common&&"alias"in e.common?(n=e.common.alias)==null?void 0:n.write:"";this.state.selectId?t=((o=(a=e.common)==null?void 0:a.alias)==null?void 0:o.id)||"":this.state.selectRead?t=s??"":this.state.selectWrite&&(t=l??"")}catch{console.error(`Cannot parse ${this.state.text}`)}return y.jsx(Xm,{imagePrefix:".",dateFormat:this.props.dateFormat,theme:this.props.theme,isFloatComma:this.props.isFloatComma,socket:this.props.socket,dialogName:"aliasesEdit",title:`${this.props.t("Select for")} ${this.props.obj._id}`,selected:t,onOk:s=>{const l=this.state.selectRead,u=this.state.selectWrite,h=this.state.selectId,c=Array.isArray(s)?s[0]:s;this.setState({selectId:!1,selectRead:!1,selectWrite:!1},()=>{l?this.setAliasItem(e,"id.read",c):u?this.setAliasItem(e,"id.write",c):h&&this.setAliasItem(e,"id",c)})},onClose:()=>this.setState({selectId:!1,selectRead:!1,selectWrite:!1})},"selectDialog")}setAliasItem(t,e,i,n){t.common=t.common||{};const a=t.common.alias||{};e==="id.read"?a.id&&typeof a.id=="object"?a.id.read=i:a.id={read:i,write:i}:e==="id.write"?a.id&&typeof a.id=="object"?a.id.write=i:a.id={read:i,write:i}:a[e]=i,t.common.alias=a,this.onChange(JSON.stringify(t,null,2),n)}setCommonItem(t,e,i){t.common[e]=i,this.onChange(JSON.stringify(t,null,2))}removeCommonItem(t,e){delete t.common[e],this.onChange(JSON.stringify(t,null,2))}static buttonAddKey(t,e){return y.jsx("div",{style:O.marginBlock,children:y.jsx(w.Button,{style:O.buttonAdd,variant:"contained",color:"secondary",startIcon:y.jsx(H.Add,{}),onClick:e,children:$.t(t)})})}buttonRemoveKey(t,e){const{t:i}=this.props;return y.jsx(w.Tooltip,{title:i("Remove attribute %s",i(t)),slotProps:{popper:{sx:O.tooltip}},children:y.jsx(w.Box,{component:"div",sx:O.close,onClick:e})})}static filterRoles(t,e){const i=[];return t.forEach(n=>(n.type==="mixed"||n.type)===e&&!i.includes(n.role)&&i.push(n.role)),co.forEach(n=>(n.type==="mixed"||n.type)===e&&!i.includes(n.role)&&i.push(n.role)),i.sort(),i}renderCommonEdit(){try{const t=JSON.parse(this.state.text),e=["number","string","boolean","array","object","mixed"],i=!1,{t:n,obj:a}=this.props,o=a.type==="state",s=a.type==="channel"||a.type==="device"||o,l=Ht.filterRoles(this.props.roleArray,t.common.type);let u;if(t.common.icon&&(u=t.type==="instance"||t.type==="adapter"?`./adapter/${t.common.name}/${t.common.icon}`:t.common.icon,!u.startsWith(".")&&!u.startsWith("/")&&!u.startsWith("data:"))){const f=a._id.split(".");f[0]==="system"?u=`adapter/${f[2]}${u.startsWith("/")?"":"/"}${u}`:u=`adapter/${f[0]}${u.startsWith("/")?"":"/"}${u}`}const h=typeof t.common.desc=="object"&&t.common.desc?t.common.desc[$.getLanguage()]||t.common.desc.en||"":t.common.desc||"",c=jt.getObjectNameFromObj(t,$.getLanguage(),{},!1,!0);return y.jsxs(w.Box,{style:O.commonTabWrapper,onKeyDown:f=>{f.key==="Enter"&&(f.preventDefault(),f.stopPropagation(),this.onUpdate())},children:[y.jsxs(w.Box,{style:{...O.commonWrapper,width:this.props.width==="xs"?"100%":void 0,minWidth:this.props.width==="xs"?"100%":void 0,gap:this.props.width==="xs"?10:8,display:this.props.width==="xs"?"flex":void 0,flexDirection:this.props.width==="xs"?"column":void 0},children:[typeof t.common.name<"u"?y.jsx(w.TextField,{variant:"standard",disabled:i,label:n("Name"),style:{...O.textField,marginTop:8},fullWidth:!0,slotProps:{input:{endAdornment:c?y.jsx(w.InputAdornment,{position:"end",children:y.jsx(w.IconButton,{tabIndex:-1,size:"small",onClick:()=>this.setCommonItem(t,"name",""),children:y.jsx(H.Close,{})})}):null}},value:c,onChange:f=>this.setCommonItem(t,"name",f.target.value)}):Ht.buttonAddKey("Name",()=>this.setCommonItem(t,"name","")),typeof t.common.desc<"u"?y.jsxs(w.Box,{component:"div",sx:O.flex,children:[y.jsx(w.TextField,{variant:"standard",disabled:i,label:n("Description"),style:{...O.textField,marginTop:8},fullWidth:!0,slotProps:{input:{endAdornment:h?y.jsx(w.InputAdornment,{position:"end",children:y.jsx(w.IconButton,{tabIndex:-1,size:"small",onClick:()=>this.setCommonItem(t,"desc",""),children:y.jsx(H.Close,{})})}):null}},value:h,onChange:f=>this.setCommonItem(t,"desc",f.target.value)}),this.buttonRemoveKey("Description",()=>this.removeCommonItem(t,"desc"))]}):Ht.buttonAddKey("Description",()=>this.setCommonItem(t,"desc","")),o?typeof t.common.type<"u"?y.jsxs(w.Box,{component:"div",sx:O.flex,children:[y.jsxs(w.FormControl,{style:O.marginBlock,fullWidth:!0,children:[y.jsx(w.InputLabel,{style:{transform:"scale(0.75)"},children:n("State type")}),y.jsx(w.Select,{variant:"standard",disabled:i,value:t.common.type,onChange:f=>this.setCommonItem(t,"type",f.target.value),children:e.map(f=>y.jsxs(w.MenuItem,{value:f,children:[n(f),y.jsxs("span",{style:O.typeNameEng,children:["(",f,")"]})]},f))})]}),this.buttonRemoveKey("State type",()=>this.removeCommonItem(t,"type"))]}):Ht.buttonAddKey("State type",()=>this.setCommonItem(t,"type","string")):null,y.jsxs(w.Box,{component:"div",sx:{...O.flex,flexWrap:this.props.width==="xs"?"wrap":void 0},children:[o?typeof t.common.read<"u"?y.jsxs(w.Box,{component:"div",sx:O.flex,children:[y.jsx(w.FormControlLabel,{style:O.marginBlock,control:y.jsx(w.Checkbox,{disabled:i,checked:t.common.read,onChange:f=>this.setCommonItem(t,"read",f.target.checked)}),label:n("Readable")}),this.buttonRemoveKey("Readable",()=>this.removeCommonItem(t,"read"))]}):Ht.buttonAddKey("Readable",()=>this.setCommonItem(t,"read",!0)):null,o?typeof t.common.write<"u"?y.jsxs(w.Box,{component:"div",sx:O.flex,children:[y.jsx(w.FormControlLabel,{style:O.marginBlock,control:y.jsx(w.Checkbox,{disabled:i,checked:t.common.write,onChange:f=>this.setCommonItem(t,"write",f.target.checked)}),label:n("Writeable")}),this.buttonRemoveKey("Writeable",()=>this.removeCommonItem(t,"write"))]}):Ht.buttonAddKey("Writeable",()=>this.setCommonItem(t,"write",!0)):null]}),s?typeof t.common.role<"u"?y.jsxs(w.Box,{component:"div",sx:O.flex,children:[y.jsx(w.Autocomplete,{style:O.marginBlock,fullWidth:!0,disabled:i,value:t.common.role,onChange:(f,d)=>{const p=co.find(v=>v.role===d);p&&(p.w!==void 0&&p.r!==void 0?(this.setCommonItem(t,"write",p.w),this.setCommonItem(t,"read",p.r)):p.w!==void 0?this.setCommonItem(t,"write",p.w):p.r!==void 0&&this.setCommonItem(t,"read",p.r)),d.startsWith("level")||d.startsWith("indicator")||d.startsWith("sensor")||d.startsWith("weather")?t.common.write&&this.setCommonItem(t,"write",!1):d.startsWith("value")||d.startsWith("indicator")||d.startsWith("sensor")||d.startsWith("weather")?t.common.write&&this.setCommonItem(t,"write",!1):d.startsWith("level")||d.startsWith("switch")?t.common.write&&this.setCommonItem(t,"write",!0):d.startsWith("button")&&t.common.read&&this.setCommonItem(t,"read",!1),this.setCommonItem(t,"role",d)},options:l,renderInput:f=>y.jsx(w.TextField,{variant:"standard",...f,label:n("Role")})}),this.buttonRemoveKey("Role",()=>this.removeCommonItem(t,"role"))]}):Ht.buttonAddKey("Role",()=>this.setCommonItem(t,"role","")):null,typeof t.common.color<"u"?y.jsxs(w.Box,{component:"div",sx:O.flex,children:[y.jsx(w.TextField,{variant:"standard",disabled:i,style:{...O.marginBlock,...O.color},label:n("Color"),type:"color",slotProps:{input:{endAdornment:t.common.color?y.jsx(w.InputAdornment,{position:"end",children:y.jsx(w.IconButton,{tabIndex:-1,size:"small",onClick:()=>this.setCommonItem(t,"color",""),children:y.jsx(H.Close,{})})}):null}},value:t.common.color,onChange:f=>this.setCommonItem(t,"color",f.target.value)}),this.buttonRemoveKey("Color",()=>this.removeCommonItem(t,"color"))]}):Ht.buttonAddKey("Color",()=>this.setCommonItem(t,"color","")),y.jsxs(w.Box,{component:"div",sx:{...O.flex,flexWrap:this.props.width==="xs"?"wrap":void 0,gap:this.props.width==="xs"?"10px":void 0},children:[t.common.type==="number"?typeof t.common.min<"u"?y.jsxs(w.Box,{component:"div",sx:O.flex,children:[y.jsx(w.TextField,{variant:"standard",disabled:i,className:{...O.marginBlock,...O.color},label:n("Min"),value:t.common.min,onChange:f=>this.setCommonItem(t,"min",f.target.value)}),this.buttonRemoveKey("Min",()=>this.removeCommonItem(t,"min"))]}):y.jsx(w.Box,{component:"div",sx:O.flex,children:Ht.buttonAddKey("Min",()=>this.setCommonItem(t,"min",0))}):null,t.common.type==="number"?typeof t.common.max<"u"?y.jsxs(w.Box,{component:"div",sx:O.flex,children:[y.jsx(w.TextField,{variant:"standard",disabled:i,className:{...O.marginBlock,...O.color},label:n("Max"),value:t.common.max,onChange:f=>this.setCommonItem(t,"max",f.target.value)}),this.buttonRemoveKey("Max",()=>this.removeCommonItem(t,"max"))]}):y.jsx(w.Box,{component:"div",sx:O.flex,children:Ht.buttonAddKey("Max",()=>this.setCommonItem(t,"max",100))}):null,t.common.type==="number"?typeof t.common.step<"u"?y.jsxs(w.Box,{component:"div",sx:O.flex,children:[y.jsx(w.TextField,{variant:"standard",disabled:i,className:{...O.marginBlock,...O.color},label:n("Step"),value:t.common.step,onChange:f=>this.setCommonItem(t,"step",f.target.value)}),this.buttonRemoveKey("Step",()=>this.removeCommonItem(t,"step"))]}):y.jsx(w.Box,{component:"div",sx:O.flex,children:Ht.buttonAddKey("Step",()=>this.setCommonItem(t,"step",1))}):null]}),t.common.type==="number"?typeof t.common.unit<"u"?y.jsxs(w.Box,{component:"div",sx:O.flex,children:[y.jsx(w.TextField,{variant:"standard",disabled:i,className:{...O.marginBlock,...O.color},label:n("Unit"),slotProps:{input:{endAdornment:t.common.unit?y.jsx(w.InputAdornment,{position:"end",children:y.jsx(w.IconButton,{tabIndex:-1,size:"small",onClick:()=>this.setCommonItem(t,"unit",""),children:y.jsx(H.Close,{})})}):null}},value:t.common.unit,onChange:f=>this.setCommonItem(t,"unit",f.target.value)}),this.buttonRemoveKey("Unit",()=>this.removeCommonItem(t,"unit"))]}):y.jsx("div",{style:O.flexDrop,children:Ht.buttonAddKey("Unit",()=>this.setCommonItem(t,"unit",""))}):null]}),typeof t.common.icon<"u"?y.jsxs(w.Box,{component:"div",sx:O.flex,style:{flexGrow:1,minWidth:158},children:[y.jsx(Gx,{disabled:i,maxSize:10*1024,icon:u,removeIconFunc:()=>this.setCommonItem(t,"icon",""),onChange:f=>this.setCommonItem(t,"icon",f)}),this.buttonRemoveKey("Icon",()=>this.removeCommonItem(t,"icon"))]}):y.jsx(w.Box,{component:"div",sx:O.flex,children:Ht.buttonAddKey("Icon",()=>this.setCommonItem(t,"icon",""))})]})}catch{return y.jsx("div",{children:this.props.t("Cannot parse JSON!")})}}renderAliasEdit(){var t,e,i,n,a,o,s,l,u,h,c,f,d,p,v,g,m,_,b,x,C,S,T,M,D,I,P,k,R,L,j,E,Z,G,Y,et,ut,ot,ft,gt;try{const B=JSON.parse(this.state.text),Rt=((e=(t=B.common)==null?void 0:t.alias)==null?void 0:e.read)!==void 0||((n=(i=B.common)==null?void 0:i.alias)==null?void 0:n.write)!==void 0;return y.jsxs(w.Grid2,{container:!0,direction:"column",style:O.marginTop,children:[y.jsx(w.Grid2,{children:y.jsx(w.FormControlLabel,{control:y.jsx(w.Checkbox,{checked:typeof((o=(a=B.common)==null?void 0:a.alias)==null?void 0:o.id)=="object",onChange:()=>{var Mt,Lt,xt,z,X,K,Ot;typeof((Lt=(Mt=B.common)==null?void 0:Mt.alias)==null?void 0:Lt.id)=="object"?this.setAliasItem(B,"id",((X=(z=(xt=B.common)==null?void 0:xt.alias)==null?void 0:z.id)==null?void 0:X.read)||""):this.setAliasItem(B,"id.read",((Ot=(K=B.common)==null?void 0:K.alias)==null?void 0:Ot.id)||"")}}),label:this.props.t("Different IDs for read and write")})}),typeof((l=(s=B.common)==null?void 0:s.alias)==null?void 0:l.id)!="object"?y.jsxs(w.Grid2,{children:[y.jsx(w.TextField,{variant:"standard",label:this.props.t("Alias state"),value:((h=(u=B.common)==null?void 0:u.alias)==null?void 0:h.id)||"",style:O.aliasIdEdit,slotProps:{input:{endAdornment:(f=(c=B.common)==null?void 0:c.alias)!=null&&f.id?y.jsx(w.InputAdornment,{position:"end",children:y.jsx(w.IconButton,{tabIndex:-1,size:"large",onClick:()=>this.setAliasItem(B,"id",""),children:y.jsx(H.Close,{})})}):null}},onChange:Mt=>this.setAliasItem(B,"id",Mt.target.value),margin:"normal"}),y.jsx(w.Fab,{style:O.button,size:"small",onClick:()=>this.setState({selectId:!0,selectRead:!1,selectWrite:!1}),children:"..."})]}):null,typeof((p=(d=B.common)==null?void 0:d.alias)==null?void 0:p.id)=="object"?y.jsxs(w.Grid2,{children:[y.jsx(w.TextField,{variant:"standard",label:this.props.t("Alias read state"),value:((m=(g=(v=B.common)==null?void 0:v.alias)==null?void 0:g.id)==null?void 0:m.read)||"",style:O.aliasIdEdit,slotProps:{input:{endAdornment:(x=(b=(_=B.common)==null?void 0:_.alias)==null?void 0:b.id)!=null&&x.read?y.jsx(w.InputAdornment,{position:"end",children:y.jsx(w.IconButton,{size:"large",tabIndex:-1,onClick:()=>this.setAliasItem(B,"id.read",""),children:y.jsx(H.Close,{})})}):null}},onChange:Mt=>this.setAliasItem(B,"id.read",Mt.target.value),margin:"normal"}),y.jsx(w.Fab,{style:O.button,size:"small",onClick:()=>this.setState({selectId:!1,selectRead:!0,selectWrite:!1}),children:"..."})]}):null,typeof((S=(C=B.common)==null?void 0:C.alias)==null?void 0:S.id)=="object"?y.jsxs(w.Grid2,{children:[y.jsx(w.TextField,{variant:"standard",label:this.props.t("Alias write state"),value:((D=(M=(T=B.common)==null?void 0:T.alias)==null?void 0:M.id)==null?void 0:D.write)||"",style:O.aliasIdEdit,slotProps:{input:{endAdornment:(k=(P=(I=B.common)==null?void 0:I.alias)==null?void 0:P.id)!=null&&k.write?y.jsx(w.InputAdornment,{position:"end",children:y.jsx(w.IconButton,{size:"large",tabIndex:-1,onClick:()=>this.setAliasItem(B,"id.write",""),children:y.jsx(H.Close,{})})}):null}},onChange:Mt=>this.setAliasItem(B,"id.write",Mt.target.value),margin:"normal"}),y.jsx(w.Fab,{style:O.button,size:"small",onClick:()=>this.setState({selectId:!1,selectRead:!1,selectWrite:!0}),children:"..."})]}):null,y.jsx(w.Grid2,{style:O.marginTop,children:y.jsx(w.FormControlLabel,{control:y.jsx(w.Checkbox,{checked:((L=(R=B.common)==null?void 0:R.alias)==null?void 0:L.read)!==void 0||((E=(j=B.common)==null?void 0:j.alias)==null?void 0:E.write)!==void 0,onChange:()=>{Rt?(delete B.common.alias.read,delete B.common.alias.write):(B.common=B.common||{},B.common.alias=B.common.alias||{},B.common.alias.read="val",B.common.alias.write="val"),this.onChange(JSON.stringify(B,null,2))}}),label:this.props.t("Use convert functions")})}),Rt?y.jsx(w.Grid2,{children:y.jsx(w.TextField,{variant:"standard",label:this.props.t("Read converter"),value:((G=(Z=B.common)==null?void 0:Z.alias)==null?void 0:G.read)||"val",style:O.funcEdit,error:!!this.state.readError,slotProps:{input:{endAdornment:(et=(Y=B.common)==null?void 0:Y.alias)!=null&&et.read?y.jsx(w.InputAdornment,{position:"end",children:y.jsx(w.IconButton,{size:"large",tabIndex:-1,onClick:()=>this.setAliasItem(B,"read",""),children:y.jsx(H.Close,{})})}):null,startAdornment:y.jsx(w.InputAdornment,{position:"start",children:y.jsx(Ts,{style:O.funcIcon})})}},onChange:Mt=>this.setAliasItem(B,"read",Mt.target.value),helperText:this.state.readError||`${this.props.t("JS function like")} "val / 5 + 21"`,margin:"normal"})}):null,Rt?y.jsx(w.Grid2,{children:y.jsx(w.TextField,{variant:"standard",label:this.props.t("Write converter"),error:!!this.state.writeError,value:((ot=(ut=B.common)==null?void 0:ut.alias)==null?void 0:ot.write)||"val",helperText:this.state.writeError||`${this.props.t("JS function like")} "(val - 21) * 5"`,style:O.funcEdit,slotProps:{input:{endAdornment:(gt=(ft=B.common)==null?void 0:ft.alias)!=null&>.write?y.jsx(w.InputAdornment,{position:"end",children:y.jsx(w.IconButton,{size:"large",tabIndex:-1,onClick:()=>this.setAliasItem(B,"write",""),children:y.jsx(H.Close,{})})}):null,startAdornment:y.jsx(w.InputAdornment,{position:"start",children:y.jsx(Ts,{style:O.funcIcon})})}},onChange:Mt=>this.setAliasItem(B,"write",Mt.target.value),margin:"normal"})}):null]})}catch{return y.jsx("div",{children:this.props.t("Cannot parse JSON!")})}}onCopy(t){jt.copyToClipboard(this.state.text,t),window.alert(this.props.t("ra_Copied"))}onClone(t,e){const i=JSON.parse(JSON.stringify(this.props.objects[t]));delete i.from,delete i.ts,delete i.user,i._id=e,this.props.objects[i._id]=i,this.props.onNewObject(i)}renderCopyDialog(){return this.state.showCopyDialog?y.jsxs(w.Dialog,{open:!0,maxWidth:"md",fullWidth:!0,onClose:()=>this.setState({showCopyDialog:""}),children:[y.jsx(w.DialogTitle,{children:this.props.t("Enter new ID for this object")}),y.jsx(w.DialogContent,{children:y.jsx(w.TextField,{variant:"standard",autoFocus:!0,fullWidth:!0,label:this.props.t("New object ID"),value:this.state.newId,slotProps:{input:{endAdornment:this.state.newId?y.jsx(w.InputAdornment,{position:"end",children:y.jsx(w.IconButton,{size:"small",tabIndex:-1,onClick:()=>this.setState({newId:""}),children:y.jsx(H.Close,{})})}):null}},onKeyDown:t=>{t.key==="Enter"&&!this.props.objects[this.state.newId]&&(this.setState({showCopyDialog:""}),this.onClone(this.state.showCopyDialog,this.state.newId))},onChange:t=>this.setState({newId:t.target.value})})}),y.jsxs(w.DialogActions,{children:[y.jsx(w.Button,{disabled:!!this.props.objects[this.state.newId],onClick:()=>{this.setState({showCopyDialog:""}),this.onClone(this.state.showCopyDialog,this.state.newId)},color:"primary",startIcon:y.jsx(H.FileCopy,{}),children:this.props.t("Clone")}),y.jsx(w.Button,{color:"grey",onClick:()=>this.setState({showCopyDialog:""}),startIcon:y.jsx(H.Close,{}),children:this.props.t("Cancel")})]})]}):null}renderPanelObject(t){return y.jsxs("div",{style:{...O.divWithoutTitle,...t?O.divWithoutTitleAndTab:void 0,...this.state.error?O.error:void 0},onKeyDown:e=>{e.ctrlKey&&e.key==="Enter"&&(e.preventDefault(),e.stopPropagation(),this.onUpdate())},children:[y.jsx(Ym,{value:this.state.text,onChange:e=>this.onChange(e),name:"UNIQUE_ID_OF_DIV",themeType:this.props.themeType}),this.state.showCommonDeleteMessage?y.jsx("div",{style:O.commonDeleteTip,children:$.t("common_delete_tip")}):null]})}render(){const t=this.props.obj,e=t._id.startsWith("alias.0")&&t.type==="state";let i=O.dialog;window.innerWidth>1920&&(i={...i,maxWidth:"calc(100% - 150px)"});let n;try{n=JSON.parse(this.state.text)}catch{}return y.jsxs(w.Dialog,{sx:{"& .MuiPaper-root":i},open:!0,maxWidth:"xl",fullWidth:!0,fullScreen:!1,onClose:()=>this.props.onClose(),"aria-labelledby":"edit-value-dialog-title","aria-describedby":"edit-value-dialog-description",children:[y.jsxs(w.DialogTitle,{id:"edit-value-dialog-title",style:{width:"calc(100% - 32px)",overflow:"hidden",textOverflow:"ellipsis"},children:[this.props.t("Edit object:")," ",y.jsx(w.Box,{component:"span",style:O.id,sx:{fontSize:{xs:10}},children:this.props.obj._id})]}),this.renderTabs(n),this.renderCopyDialog(),y.jsxs(w.DialogContent,{sx:{p:this.props.width==="xs"&&this.state.tab==="object"?"6px":this.state.tab==="object"||this.state.tab==="common"||this.state.tab==="alias"?"0 24px":"0 6px",overflow:this.state.tab==="object"||this.state.tab==="common"||this.state.tab==="alias"?void 0:"hidden"},children:[this.state.tab==="object"?this.renderPanelObject(e):null,this.state.tab==="alias"&&this.props.obj._id.startsWith("alias.0")&&this.props.obj.type==="state"?this.renderAliasEdit():null,this.state.tab==="common"?this.renderCommonEdit():null,this.state.tab==="state"?this.renderStatePanel():null,this.renderCustomPanel(),this.renderSelectDialog()]}),y.jsxs(w.DialogActions,{sx:O.wrapperButton,children:[y.jsx(w.Button,{color:"grey",onClick:()=>this.setState({showCopyDialog:this.props.obj._id,newId:this.props.obj._id}),disabled:this.state.error||this.state.changed,title:this.props.t("Create a copy of this object"),children:y.jsx(H.FileCopy,{fontSize:this.props.width==="xs"?"large":void 0})}),y.jsx("div",{style:{flexGrow:1}}),this.state.tab==="object"&&y.jsx(w.Button,{color:"grey",onClick:a=>this.onCopy(a),disabled:this.state.error,title:this.props.width==="xs"?this.props.t("Copy into clipboard"):"",startIcon:this.props.width==="xs"?void 0:y.jsx(Pd,{}),children:this.props.width==="xs"?y.jsx(Pd,{fontSize:32}):this.props.t("Copy into clipboard")}),y.jsx(w.Button,{variant:"contained",disabled:this.state.error||!this.state.changed||this.state.customError,onClick:()=>this.onUpdate(),startIcon:this.props.width==="xs"?void 0:y.jsx(H.Check,{}),color:"primary",children:this.props.width==="xs"?y.jsx(H.Check,{fontSize:"large"}):this.props.t("Write")}),y.jsx(w.Button,{color:"grey",variant:"contained",onClick:()=>this.props.onClose(),startIcon:this.props.width==="xs"?void 0:y.jsx(H.Close,{}),children:this.props.width==="xs"?y.jsx(H.Close,{fontSize:"large"}):this.props.t("Cancel")})]})]})}}class bd extends at.Component{object=null;constructor(t){super(t),this.state={role:null,initRole:null,roleInput:null}}componentDidMount(){this.props.socket.getObject(this.props.id).then(t=>{var i;this.object=t;const e=((i=t==null?void 0:t.common)==null?void 0:i.role)||null;this.setState({role:e,initRole:e,roleInput:e})}).catch(t=>console.error(t))}onUpdate(){this.object.common=this.object.common||{},this.object.common.role=this.state.roleInput,this.props.socket.setObject(this.object._id,this.object).then(()=>this.props.onClose(this.object))}static filterRoles(t,e){const i=[];return t.forEach(n=>(n.type==="mixed"||n.type)===e&&!i.includes(n.role)&&i.push(n.role)),co.forEach(n=>(n.type==="mixed"||n.type)===e&&!i.includes(n.role)&&i.push(n.role)),i.sort(),i}render(){return y.jsxs(w.Dialog,{open:!0,maxWidth:"sm",fullWidth:!0,onClose:()=>this.props.onClose(),"aria-labelledby":"edit-role-dialog-title","aria-describedby":"edit-role-dialog-description",children:[y.jsx(w.DialogTitle,{id:"edit-role-dialog-title",children:this.object?this.props.t("Update role for %s",this.object._id):null}),y.jsx(w.DialogContent,{children:y.jsx(w.Autocomplete,{freeSolo:!0,options:bd.filterRoles(this.props.roleArray,this.props.commonType),style:{width:"100%"},value:this.state.role,onChange:(t,e)=>this.setState({role:e,roleInput:e}),onInputChange:(t,e)=>this.setState({roleInput:e}),renderInput:t=>y.jsx(w.TextField,{variant:"standard",...t,label:this.props.t("Role")})})}),y.jsxs(w.DialogActions,{children:[y.jsx(w.Button,{disabled:this.state.initRole===this.state.roleInput,variant:"contained",onClick:()=>this.onUpdate(),color:"primary",startIcon:y.jsx(H.Check,{}),children:this.props.t("Apply")}),y.jsx(w.Button,{variant:"contained",onClick:()=>this.props.onClose(),color:"grey",startIcon:y.jsx(H.Close,{}),children:this.props.t("Cancel")})]})]},"objectBrowserEditRole")}}const kO=["array","boolean","file","json","mixed","number","object","string"],RO={boolean:!1,string:"",number:0},Be={state:{name:"State",value:"state"},channel:{name:"Channel",value:"channel"},device:{name:"Device",value:"device"},folder:{name:"Folder",value:"folder"}},LO=({onClose:r,onApply:t,selected:e,setObject:i,objects:n,expertMode:a,initialType:o,initialStateType:s})=>{var T;const l={state:$.t("New state"),channel:$.t("New channel"),device:$.t("New device"),folder:$.t("New folder")},u=[],h=(T=n[e])==null?void 0:T.type;n[e]?h==="channel"?(u.push(Be.state),o=o||"state"):h==="device"?(o=o||"channel",u.push(Be.state),u.push(Be.channel)):h==="state"?o=o||"":(u.push(Be.state),u.push(Be.channel),u.push(Be.device),e.startsWith("0_userdata.")||e.startsWith("alias.0.")||e==="0_userdata"||e==="alias.0"?(u.push(Be.folder),o=o||"folder"):o=o||"state"):(u.push(Be.folder),o=o||"folder",a&&(e.startsWith("mqtt.")||e.startsWith("javascript."))&&(u.push(Be.state),u.push(Be.channel),u.push(Be.device)));const c=(window._localStorage||window.localStorage).getItem("App.lastObjectType");c&&u.find(M=>M.value===c)&&(o=c);function f(M){return`${e}.${M.toString().replace(jt.FORBIDDEN_CHARS,"_").replace(/\s/g,"_").replace(/\./g,"_")}`}const[d,p]=at.useState(o),[v,g]=at.useState(l[o]),[m,_]=at.useState(s||(window._localStorage||window.localStorage).getItem("App.lastStateType")||"string"),[b,x]=at.useState(!n[f(l.state)]),C=()=>{const M={common:{name:v,desc:$.t("Manually created")},type:d};d==="state"?(M.common={...M.common,role:"state",type:m,read:!0,write:!0,def:RO[m]},M.native={}):d!=="folder"?M.common={...M.common,role:"",icon:""}:delete M.common.desc,i(`${e}.${v.split(" ").join("_")}`,M).then(()=>t())},S=$.getLanguage();return y.jsxs(w.Dialog,{open:!0,fullWidth:!0,maxWidth:"md",disableEscapeKeyDown:!1,onClose:r,children:[y.jsx(w.DialogTitle,{children:y.jsxs("div",{style:{margin:10,fontSize:20,display:"flex",alignItems:"center",gap:8},children:[y.jsx(H.AddBox,{}),$.t("Add new object:"),y.jsxs("span",{style:{fontStyle:"italic"},children:[e,".",v]})]})}),y.jsx(w.DialogContent,{children:y.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[y.jsx(w.TextField,{variant:"standard",label:$.t("Parent"),style:{margin:"5px 0"},disabled:!0,value:e}),y.jsxs(w.FormControl,{variant:"standard",style:{marginTop:10,marginBottom:16},children:[y.jsx(w.InputLabel,{children:$.t("Type")}),y.jsx(w.Select,{variant:"standard",value:d,onChange:M=>{(window._localStorage||window.localStorage).setItem("App.lastObjectType",M.target.value),v===l[d]&&(g(l[M.target.value]),x(!!n[f(l[M.target.value])])),p(M.target.value)},children:u.map(M=>y.jsxs(w.MenuItem,{value:M.value,children:[$.t(M.name),S!=="en"&&y.jsxs("span",{style:{fontSize:"smaller",opacity:.6,marginLeft:4},children:["(",M.value,")"]})]},M.value))})]}),d==="state"&&y.jsxs(w.FormControl,{style:{marginTop:10,marginBottom:16},children:[y.jsx(w.InputLabel,{style:{left:-14},children:$.t("State type")}),y.jsx(w.Select,{style:{marginTop:6},variant:"standard",value:m,onChange:M=>{(window._localStorage||window.localStorage).setItem("App.lastStateType",M.target.value),_(M.target.value)},children:kO.map(M=>y.jsxs(w.MenuItem,{value:M,children:[$.t(M),S!=="en"&&$.t(M)!==M&&y.jsxs("span",{style:{fontSize:"smaller",opacity:.6,marginLeft:4},children:["(",M,")"]})]},M))})]}),y.jsx(w.TextField,{variant:"standard",label:$.t("Name"),style:{margin:"5px 0"},autoFocus:!0,value:v,onKeyDown:M=>{M.key==="Enter"&&(M.preventDefault(),v&&C())},slotProps:{input:{endAdornment:v?y.jsx(w.InputAdornment,{position:"end",children:y.jsx(w.IconButton,{tabIndex:-1,size:"small",onClick:()=>g(""),children:y.jsx(H.Close,{})})}):null}},onChange:M=>{x(!n[f(M.target.value)]),g(M.target.value)}})]})}),y.jsxs(w.DialogActions,{children:[y.jsx(w.Button,{id:"add-new-object-dialog-add",startIcon:y.jsx(H.Check,{}),disabled:!v||!d||!b||d==="state"&&!m,onClick:()=>C(),variant:"contained",color:"primary",children:$.t("add")}),y.jsx(w.Button,{id:"add-new-object-dialog-cancel",color:"grey",onClick:r,variant:"contained",startIcon:y.jsx(H.Close,{}),children:$.t("ra_Cancel")})]})]})},OO=[{Owner:[{name:"read",valueNum:1024,title:"read owner"},{name:"write",valueNum:512,title:"write owner"}]},{Group:[{name:"read",valueNum:64,title:"read group"},{name:"write",valueNum:32,title:"write group"}]},{Everyone:[{name:"read",valueNum:4,title:"read everyone"},{name:"write",valueNum:2,title:"write everyone"}]}];function $m(r,t,e){return r|=t&e,r&=t|~e&65535,r}const Um=({value:r,setValue:t,t:e,differentValues:i,applyToChildren:n,mask:a,setMask:o,disabled:s})=>{at.useEffect(()=>{if(n){let u=0;for(let h=0;h<i.length;h++)u|=r^i[h];o(u)}else o(0)},[i,n,o,r]);let l=r;return y.jsx("div",{style:{display:"flex",width:"fit-content",margin:20,border:"1px solid",borderLeft:0},children:OO.map(u=>{const h=Object.keys(u)[0];return y.jsxs("div",{style:{width:150,height:150,display:"flex",flexDirection:"column",alignItems:"center",borderLeft:"1px solid"},children:[y.jsx("div",{style:{height:50,display:"flex",alignItems:"center",fontSize:18,borderBottom:"1px solid silver",width:"100%",justifyContent:"center"},children:e(h)}),y.jsx("div",{style:{display:"flex",width:"100%"},children:u[h].map((c,f)=>{let d=!1;l-c.valueNum>=0&&(l-=c.valueNum,d=!0);const p=a&c.valueNum;return y.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:1,alignItems:"center",borderRight:f===0?"1px solid":0},children:[y.jsx("div",{style:{height:50,borderBottom:"1px solid",width:"100%",justifyContent:"center",display:"flex",alignItems:"center",color:"silver"},children:e(c.name)}),y.jsx("div",{style:{height:50,display:"flex"},children:y.jsx(w.Checkbox,{disabled:s,checked:d,color:p?"primary":"secondary",indeterminate:!!p,style:p?{opacity:.5}:void 0,onChange:v=>{p&&(a&=~c.valueNum&65535,o(a));let g=r;v.target.checked?g|=c.valueNum:g&=~c.valueNum&65535,t(g)}})})]},c.valueNum)})})]},h)})})},EO=({onClose:r,onApply:t,selected:e,extendObject:i,objects:n,t:a,modalEmptyId:o,themeType:s,theme:l})=>{const[u,h]=at.useState(null),[c,f]=at.useState(null),[d,p]=at.useState([]),[v,g]=at.useState([]),[m,_]=at.useState(!1),[b,x]=at.useState(!1),[C,S]=at.useState(0),[T,M]=at.useState(null),[D,I]=at.useState(null),[P,k]=at.useState(!1),[R,L]=at.useState(!1),[j,E]=at.useState([]),[Z,G]=at.useState([]),[Y,et]=at.useState(0),[ut,ot]=at.useState(0),[ft,gt]=at.useState([]),[B,Rt]=at.useState(!1),[Mt,Lt]=at.useState(!0),xt=a("different");return at.useEffect(()=>{var Sd,Cd,Td,Ad;let z=0;const X=[],K=[],Ot=e||o,St=`${Ot}.`,se=Object.keys(n).sort();let je=!1;const ei=[],Cr=[],ri=$.getLanguage();let qn=!1,Kn=!1,Qi=null,tn=null,ii=null,ni=null;const wd=[];for(let ai=0;ai<se.length;ai++){const Tr=se[ai],ht=n[Tr];if(ht&&(Tr===Ot||Tr.startsWith(St))){if(z++,wd.push(Tr),!ht.acl)continue;ii===null&&ht.acl.object!==void 0&&(ii=ht.acl.object),ni===null&&ht.acl.state!==void 0&&(ni=ht.acl.state),Qi===null&&ht.acl.owner!==void 0&&(Qi=ht.acl.owner),tn===null&&ht.acl.ownerGroup!==void 0&&(tn=ht.acl.ownerGroup),!P&&Qi!==ht.acl.owner&&ht.acl.owner!==void 0&&(qn=!0),!R&&tn!==ht.acl.ownerGroup&&ht.acl.ownerGroup!==void 0&&(Kn=!0),ht.acl.state!==void 0&&ni!==ht.acl.state&&!X.includes(ht.acl.state)&&X.push(ht.acl.state),ht.acl.object!==void 0&&ii!==ht.acl.object&&!K.includes(ht.acl.object)&&K.push(ht.acl.object),ht.type==="state"&&(je=!0)}Tr.startsWith("system.group.")&&(ht==null?void 0:ht.type)==="group"?ei.push({name:jt.getObjectNameFromObj(ht,ri).replace("system.group.",""),value:Tr,icon:(Sd=ht.common)==null?void 0:Sd.icon,color:(Cd=ht.common)==null?void 0:Cd.color}):Tr.startsWith("system.user.")&&(ht==null?void 0:ht.type)==="user"&&Cr.push({name:jt.getObjectNameFromObj(ht,ri).replace("system.user.",""),value:Tr,icon:(Td=ht.common)==null?void 0:Td.icon,color:(Ad=ht.common)==null?void 0:Ad.color})}Qi=Qi||n["system.config"].common.defaultNewAcl.owner,tn=tn||n["system.config"].common.defaultNewAcl.ownerGroup,ii=ii||n["system.config"].common.defaultNewAcl.object,M(Number.isNaN(ii)?n["system.config"].common.defaultNewAcl.object:ii),je&&(ni=ni||n["system.config"].common.defaultNewAcl.state,I(Number.isNaN(ni)?n["system.config"].common.defaultNewAcl.state:ni));const Nx=Cr.find(ai=>ai.value===Qi),Fx=ei.find(ai=>ai.value===tn);h(Nx),f(Fx),k(qn),L(Kn),p(Cr),g(ei),je&&x(!0),o&&_(!0),S(z),E(X),G(K),gt(wd)},[n,e,R,P,o]),at.useEffect(()=>{m?(R&&(c.value!=="different"&&f({name:xt,value:"different"}),v.find(z=>z.value==="different")||g(z=>[{name:xt,value:"different"},...z])),P&&((!u||u.value!=="different")&&h({name:xt,value:"different"}),d.find(z=>z.value==="different")||p(z=>[{name:xt,value:"different"},...z]))):(u&&u.value==="different"&&h(n[e].acl.owner),c&&c.value==="different"&&f(n[e].acl.ownerGroup),g(z=>z.filter(({value:X})=>X!=="different")),p(z=>z.filter(({value:X})=>X!=="different")))},[d,m,P,R,n,e,c,u,xt,v]),ft.length?y.jsx(Qx,{theme:l,titleButtonApply:"apply",overflowHidden:!0,disableApply:Mt,progress:B,onClose:r,onApply:()=>{Rt(!0),setTimeout(()=>{if(m){const z=~Y&65535,X=~ut&65535;for(let K=0;K<ft.length;K++){const Ot=ft[K],St=n[Ot],se=jt.clone(St.acl||{});se.object=$m(St.acl.object,T,z),u&&u.value!=="different"&&(se.owner=u.value),c&&c.value!=="different"&&(se.ownerGroup=c.value),St.type==="state"&&(se.state=$m(St.acl.state,D,X)),i(Ot,{acl:se})}}else{const z=jt.clone(n[e].acl||{});z.object=T,z.owner=u?u.value:"system.user.admin",z.ownerGroup=c?c.value:"system.group.administrator",n[e].type==="state"&&(z.state=D),i(e,{acl:z})}Rt(!1),t()},200)},children:y.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[y.jsx("div",{style:{margin:10,fontSize:20},children:a("Access control list: %s",e||o)}),y.jsxs("div",{style:{display:"flex"},children:[y.jsxs(w.FormControl,{variant:"standard",fullWidth:!0,style:{marginRight:10},children:[y.jsx(w.InputLabel,{children:a("Owner user")}),y.jsx(w.Select,{variant:"standard",disabled:B,value:u?u.value:"",renderValue:()=>y.jsxs("span",{children:[u!=null&&u.icon?y.jsx(ya,{src:u.icon,style:{width:16,height:16,marginRight:8}}):null,u?u.name:""]}),style:(u==null?void 0:u.value)==="different"?{opacity:.5}:{color:(u==null?void 0:u.color)||void 0,backgroundColor:jt.getInvertedColor(u==null?void 0:u.color,s)},onChange:z=>{const X=d.find(K=>K.value===z.target.value);h(X),Lt(!1)},children:d.map(z=>y.jsxs(w.MenuItem,{style:z.value==="different"?{opacity:.5}:{color:z.color||void 0,backgroundColor:jt.getInvertedColor(z.color,s)},value:z.value,children:[z.icon?y.jsx(ya,{src:z.icon,style:{width:16,height:16,marginRight:8}}):null,z.name]},z.value))})]}),y.jsxs(w.FormControl,{variant:"standard",fullWidth:!0,children:[y.jsx(w.InputLabel,{children:a("Owner group")}),y.jsx(w.Select,{variant:"standard",disabled:B,value:c?c.value:"",renderValue:()=>y.jsxs("span",{children:[c!=null&&c.icon?y.jsx(ya,{src:c.icon,style:{width:16,height:16,marginRight:8}}):null,c?c.name:""]}),style:(c==null?void 0:c.value)==="different"?{opacity:.5}:{color:(c==null?void 0:c.color)||void 0,backgroundColor:jt.getInvertedColor(c==null?void 0:c.color,s)},onChange:z=>{const X=v.find(K=>K.value===z.target.value);f(X),Lt(!1)},children:v.map(z=>y.jsxs(w.MenuItem,{value:z.value,style:z.value==="different"?{opacity:.5}:{color:z.color||void 0,backgroundColor:jt.getInvertedColor(z.color,s)},children:[z.icon?y.jsx(ya,{src:z.icon,style:{width:16,height:16,marginRight:8}}):null,z.name]},z.value))})]})]}),y.jsxs("div",{style:{display:"flex",margin:10,alignItems:"center",fontSize:10,marginLeft:0,color:"silver"},children:[y.jsx("div",{style:m?null:{color:"green"},children:a("to apply one item")}),y.jsx(w.Switch,{disabled:B||!!o||C===1,checked:!!o||m,onChange:z=>{_(z.target.checked),Lt(!1)},color:"primary"}),y.jsxs("div",{style:m?{color:"green"}:null,children:[a("to apply with children")," ",o||C>1?`(${C} ${a("object(s)")})`:""]})]}),B&&y.jsx(w.LinearProgress,{}),y.jsxs("div",{style:{overflowY:"auto"},children:[y.jsxs("div",{children:[y.jsx("h2",{children:a("Object rights")}),y.jsx(Um,{mask:ut,disabled:B,setMask:ot,applyToChildren:m,differentValues:Z,t:a,setValue:z=>{M(z),Lt(!1)},value:T})]}),b&&y.jsxs("div",{children:[y.jsx("h2",{children:a("States rights")}),y.jsx(Um,{mask:Y,disabled:B,setMask:et,applyToChildren:m,differentValues:m?j:[],t:a,setValue:z=>{I(z),Lt(!1)},value:D})]})]})]})}):y.jsx(w.LinearProgress,{})},_n={dialog:{height:"100%",maxHeight:"100%",maxWidth:"100%"},content:{textAlign:"center"},error:r=>({color:r.palette.mode==="dark"?"#ff7777":"#c20000"}),image:{height:"100%",width:"auto"},text:{fontFamily:"Lucida Console, Courier, monospace",width:"100%"},download:{textDecoration:"none",textTransform:"uppercase",fontSize:14,color:"white",border:"1px solid white",borderRadius:5,padding:"8px 16px",marginRight:8}};class jO extends at.Component{audioRef;constructor(t){super(t);const e=this.props.obj._id.split(".");this.state={error:"",image:null,text:null,binary:null,fileName:`${e[e.length-2]}.${e[e.length-1]}`},this.audioRef=vh.createRef()}componentDidMount(){this.props.socket.getBinaryState(this.props.obj._id).then(t=>{let e=this.props.obj._id.toLowerCase().split(".").pop();const i=jt.detectMimeType(t);if(i&&(e=i),e==="jpg")this.setState({image:!0,binary:t,mime:"image/jpeg"});else if(e==="svg")this.setState({image:!0,binary:t,mime:"image/svg+xml"});else if(e==="png"||e==="bmp")this.setState({image:!0,binary:t,mime:`image/${e}`});else if(e==="mp3")this.setState({audio:!0,binary:t,mime:"audio/mpeg"});else if(e==="ogg")this.setState({audio:!0,binary:t,mime:"audio/ogg"});else if(e==="txt"||e==="log")try{const n=btoa(t);this.setState({text:n,binary:t,mime:"text/plain"})}catch{}}).catch(t=>this.setState({error:t}))}render(){return y.jsxs(w.Dialog,{style:_n.dialog,open:!0,maxWidth:this.state.audio?"sm":"md",onClose:()=>this.props.onClose(),fullWidth:!0,"aria-labelledby":"object-view-dialog-title",children:[y.jsx(w.DialogTitle,{id:"object-view-dialog-title",children:this.props.t("View file in state: %s",this.props.obj._id)}),y.jsxs(w.DialogContent,{style:_n.content,children:[this.state.error?y.jsx(w.Box,{component:"div",sx:_n.error,children:this.state.error==="State is not binary"?this.props.t("No file stored yet"):this.props.t(this.state.error)}):null,this.state.audio?y.jsx("audio",{ref:this.audioRef,src:`data:${this.state.mime};base64,${this.state.binary}`}):null,this.state.audio?y.jsx(w.Fab,{color:"primary",onClick:()=>this.audioRef.current&&this.audioRef.current.play(),children:y.jsx(H.PlayArrow,{})}):null,this.state.image?y.jsx("img",{src:`data:${this.state.mime};base64,${this.state.binary}`,alt:this.props.obj._id,style:_n.image}):null,this.state.text!==null?y.jsx("pre",{style:_n.text,children:this.state.text}):null]}),y.jsxs(w.DialogActions,{children:[y.jsxs("a",{style:_n.download,download:this.state.fileName,href:`data:${this.state.mime};base64,${this.state.binary}`,children:[y.jsx(H.GetApp,{style:{paddingRight:8,height:12}}),y.jsx("span",{children:this.props.t("Download")})]}),y.jsx(w.Button,{variant:"contained",onClick:()=>this.props.onClose(),startIcon:y.jsx(H.Close,{}),color:"grey",children:this.props.t("Close")})]})]})}}const NO=Gn()(jO),zt={funcIcon:{width:16,height:16},formControlLabel:{marginBottom:16},color:{width:70},typeNameEng:{marginLeft:8,opacity:.7,fontStyle:"italic",fontSize:"smaller"},usedInAlias:{},addNewAlias:r=>({backgroundColor:r.palette.primary.main})},FO=["array","boolean","file","json","mixed","number","object","string"];class Va extends at.Component{aliasIDs;constructor(t){var n;super(t);const e=[],i=this.props.obj._id;this.aliasIDs=Object.keys(this.props.objects).filter(a=>a.startsWith("alias.0"));for(let a=0;a<this.aliasIDs.length;a++){const o=(n=this.props.objects[this.aliasIDs[a]].common)==null?void 0:n.alias;((o==null?void 0:o.id)===i||typeof(o==null?void 0:o.id)=="object"&&(o.id.read===i||o.id.write===i))&&e.push(this.aliasIDs[a])}this.state={usedInAliases:e,showAddNewAlias:!e.length,newAliasId:this.props.obj._id,newAliasName:Va.getText(this.props.obj.common.name||this.props.obj._id)||"",newAliasRole:this.props.obj.common.role||"",newAliasRead:this.props.obj.common.read,newAliasWrite:this.props.obj.common.write,newAliasUnit:this.props.obj.common.unit,newAliasDesc:Va.getText(this.props.obj.common.desc)||"",newAliasType:this.props.obj.common.type,newAliasMin:this.props.obj.common.min===void 0?"":this.props.obj.common.min.toString(),newAliasMax:this.props.obj.common.max===void 0?"":this.props.obj.common.max.toString(),newAliasUseFormula:!1,newAliasReadFormula:"val",newAliasWriteFormula:"val",newAliasColor:this.props.obj.common.color,newAliasIcon:this.props.obj.common.icon}}static getText(t){return t?typeof t=="object"?t[$.getLanguage()]||t.en||"":t.toString():""}static filterRoles(t,e){const i=[];return co.forEach(n=>(n.type==="mixed"||n.type===e)&&!i.includes(n.role)&&i.push(n.role)),t.forEach(n=>(n.type==="mixed"||n.type)===e&&!i.includes(n.role)&&i.push(n.role)),i.sort(),i}renderAddNewAlias(){return this.state.showAddNewAlias?y.jsxs(w.Dialog,{open:!0,onClose:()=>this.setState({showAddNewAlias:!1}),children:[y.jsx(w.DialogTitle,{children:$.t("Create new alias: %s",`alias.0.${this.state.newAliasId}`)}),y.jsxs(w.DialogContent,{children:[y.jsx(w.TextField,{style:zt.formControlLabel,variant:"standard",value:this.state.newAliasId,slotProps:{input:{endAdornment:this.state.newAliasId?y.jsx(w.InputAdornment,{position:"end",children:y.jsx(w.IconButton,{tabIndex:-1,size:"small",onClick:()=>this.setState({newAliasId:""}),children:y.jsx(H.Close,{})})}):null}},onChange:t=>this.setState({newAliasId:t.target.value}),label:$.t("Alias ID"),helperText:`alias.0.${this.state.newAliasId}`,fullWidth:!0}),y.jsx(w.TextField,{style:zt.formControlLabel,variant:"standard",value:this.state.newAliasName,slotProps:{input:{endAdornment:this.state.newAliasName?y.jsx(w.InputAdornment,{position:"end",children:y.jsx(w.IconButton,{tabIndex:-1,size:"small",onClick:()=>this.setState({newAliasName:""}),children:y.jsx(H.Close,{})})}):null}},onChange:t=>this.setState({newAliasName:t.target.value}),label:$.t("Alias name"),fullWidth:!0}),y.jsx(w.TextField,{style:zt.formControlLabel,variant:"standard",value:this.state.newAliasDesc,slotProps:{input:{endAdornment:this.state.newAliasDesc?y.jsx(w.InputAdornment,{position:"end",children:y.jsx(w.IconButton,{tabIndex:-1,size:"small",onClick:()=>this.setState({newAliasDesc:""}),children:y.jsx(H.Close,{})})}):null}},onChange:t=>this.setState({newAliasDesc:t.target.value}),label:$.t("Alias description"),fullWidth:!0}),y.jsxs(w.FormControl,{style:zt.formControlLabel,fullWidth:!0,children:[y.jsx(w.InputLabel,{children:$.t("State type")}),y.jsx(w.Select,{variant:"standard",value:this.state.newAliasType,onChange:t=>this.setState({newAliasType:t.target.value}),children:FO.map(t=>y.jsxs(w.MenuItem,{value:t,children:[$.t(t),y.jsxs("span",{style:zt.typeNameEng,children:["(",t,")"]})]},t))})]}),this.state.newAliasType==="number"?y.jsx(w.TextField,{style:zt.formControlLabel,variant:"standard",value:this.state.newAliasUnit||"",slotProps:{input:{endAdornment:this.state.newAliasUnit?y.jsx(w.InputAdornment,{position:"end",children:y.jsx(w.IconButton,{tabIndex:-1,size:"small",onClick:()=>this.setState({newAliasUnit:""}),children:y.jsx(H.Close,{})})}):null}},onChange:t=>this.setState({newAliasUnit:t.target.value}),label:$.t("Alias units"),fullWidth:!0}):null,this.state.newAliasType==="number"?y.jsx(w.TextField,{variant:"standard",value:this.state.newAliasMin,type:"number",error:this.state.newAliasMin?isNaN(parseFloat(this.state.newAliasMin)):!1,onChange:t=>this.setState({newAliasMin:t.target.value}),label:$.t("Min"),style:{width:"calc(50% - 4px)",marginBottom:16,marginRight:8}}):null,this.state.newAliasType==="number"?y.jsx(w.TextField,{variant:"standard",value:this.state.newAliasMax,type:"number",error:this.state.newAliasMax?isNaN(parseFloat(this.state.newAliasMax)):!1,onChange:t=>this.setState({newAliasMax:t.target.value}),label:$.t("Max"),fullWidth:!0,style:{width:"calc(50% - 4px)",marginBottom:16}}):null,y.jsx(w.TextField,{variant:"standard",style:{...zt.formControlLabel,...zt.color},label:$.t("Color"),type:"color",value:this.state.newAliasColor,onChange:t=>this.setState({newAliasColor:t.target.value})}),y.jsx(w.Autocomplete,{style:{...zt.formControlLabel},fullWidth:!0,value:this.state.newAliasRole,onChange:(t,e)=>{const i=co.find(n=>n.role===e);if(i){if(i.w!==void 0&&i.r!==void 0){this.setState({newAliasRole:e,newAliasRead:i.r,newAliasWrite:i.w});return}if(i.w!==void 0){this.setState({newAliasRole:e,newAliasWrite:i.w});return}if(i.r!==void 0){this.setState({newAliasRole:e,newAliasRead:i.r});return}}if(e.startsWith("value")||e.startsWith("indicator")||e.startsWith("sensor")||e.startsWith("weather")){if(this.state.newAliasWrite){this.setState({newAliasRole:e,newAliasWrite:!1});return}}else if(e.startsWith("level")||e.startsWith("switch")){if(!this.state.newAliasWrite){this.setState({newAliasRole:e,newAliasWrite:!0});return}}else if(e.startsWith("button")&&this.state.newAliasRead){this.setState({newAliasRole:e,newAliasRead:!1});return}this.setState({newAliasRole:e})},options:Va.filterRoles(this.props.roleArray,this.state.newAliasType),renderInput:t=>y.jsx(w.TextField,{variant:"standard",...t,label:$.t("Role")})}),y.jsx(w.FormControlLabel,{style:{...zt.formControlLabel,marginLeft:16},control:y.jsx(w.Checkbox,{indeterminate:this.state.newAliasRead===void 0||this.state.newAliasRead===null,checked:this.state.newAliasRead,onChange:t=>{const e={newAliasRead:t.target.checked};e.newAliasRead===!1&&this.state.newAliasWrite===!1&&(e.newAliasWrite=!0),this.setState(e)}}),label:$.t("Alias read")}),y.jsx(w.FormControlLabel,{style:zt.formControlLabel,control:y.jsx(w.Checkbox,{indeterminate:this.state.newAliasWrite===void 0||this.state.newAliasWrite===null,checked:this.state.newAliasWrite,onChange:t=>{const e={newAliasWrite:t.target.checked};e.newAliasRead===!1&&this.state.newAliasWrite===!1&&(e.newAliasRead=!0),this.setState(e)}}),label:$.t("Alias write")}),y.jsx(w.FormControlLabel,{style:zt.formControlLabel,control:y.jsx(w.Checkbox,{checked:this.state.newAliasUseFormula,onChange:t=>this.setState({newAliasUseFormula:t.target.checked})}),label:$.t("Use convert functions")}),this.state.newAliasUseFormula&&this.state.newAliasRead?y.jsx(w.TextField,{style:zt.formControlLabel,variant:"standard",value:this.state.newAliasReadFormula,onChange:t=>this.setState({newAliasReadFormula:t.target.value}),label:$.t("Read formula"),helperText:`${$.t("JS function like")} "val / 5 + 21"`,slotProps:{input:{endAdornment:this.state.newAliasReadFormula&&this.state.newAliasReadFormula!=="val"?y.jsx(w.InputAdornment,{position:"end",children:y.jsx(w.IconButton,{tabIndex:-1,size:"small",onClick:()=>this.setState({newAliasReadFormula:"val"}),children:y.jsx(H.Close,{})})}):null,startAdornment:y.jsx(w.InputAdornment,{position:"start",children:y.jsx(Ts,{style:zt.funcIcon})})}},fullWidth:!0}):null,this.state.newAliasUseFormula&&this.state.newAliasWrite?y.jsx(w.TextField,{style:zt.formControlLabel,variant:"standard",value:this.state.newAliasWriteFormula,onChange:t=>this.setState({newAliasWriteFormula:t.target.value}),label:$.t("Write formula"),slotProps:{input:{endAdornment:this.state.newAliasWriteFormula&&this.state.newAliasWriteFormula!=="val"?y.jsx(w.InputAdornment,{position:"end",children:y.jsx(w.IconButton,{tabIndex:-1,size:"small",onClick:()=>this.setState({newAliasWriteFormula:"val"}),children:y.jsx(H.Close,{})})}):null,startAdornment:y.jsx(w.InputAdornment,{position:"start",children:y.jsx(Ts,{style:zt.funcIcon})})}},helperText:`${$.t("JS function like")} "val / 5 + 21"`,fullWidth:!0}):null]}),y.jsxs(w.DialogActions,{children:[y.jsx(w.Button,{variant:"contained",disabled:!this.state.newAliasId||!!this.props.objects[`alias.0.${this.state.newAliasId}`],onClick:async()=>{const t={_id:`alias.0.${this.state.newAliasId}`,type:"state",common:{name:this.state.newAliasName,type:this.props.obj.common.type,alias:{id:this.props.obj._id}},native:{}};this.state.newAliasDesc&&(t.common.desc=this.state.newAliasDesc),this.state.newAliasType&&(t.common.type=this.state.newAliasType),this.state.newAliasType==="number"&&this.state.newAliasUnit&&(t.common.unit=this.state.newAliasUnit),this.state.newAliasRole&&(t.common.role=this.state.newAliasRole),this.state.newAliasType==="number"&&this.state.newAliasMin&&(t.common.min=parseFloat(this.state.newAliasMin)),this.state.newAliasType==="number"&&this.state.newAliasMax&&(t.common.max=parseFloat(this.state.newAliasMax)),this.state.newAliasRole&&(t.common.role=this.state.newAliasRole),this.state.newAliasRead!==void 0&&this.state.newAliasRead!==null&&(t.common.read=this.state.newAliasRead),this.state.newAliasWrite!==void 0&&this.state.newAliasWrite!==null&&(t.common.write=this.state.newAliasWrite),this.state.newAliasColor&&(t.common.color=this.state.newAliasColor),this.state.newAliasIcon&&(t.common.icon=this.state.newAliasIcon),this.state.newAliasUseFormula&&(t.common.read!==!1&&this.state.newAliasReadFormula&&this.state.newAliasReadFormula!=="val"&&(t.common.alias.read=this.state.newAliasReadFormula),t.common.write!==!1&&this.state.newAliasWriteFormula&&this.state.newAliasWriteFormula!=="val"&&(t.common.alias.write=this.state.newAliasWriteFormula)),await this.props.socket.setObject(t._id,t),this.setState({showAddNewAlias:!1}),this.props.onRedirect(t._id,2e3),this.props.onClose()},startIcon:y.jsx(H.AddLink,{}),color:"primary",children:this.props.t("Create")}),y.jsx(w.Button,{variant:"contained",onClick:()=>this.setState({showAddNewAlias:!1}),startIcon:y.jsx(H.Close,{}),color:"grey",children:this.props.t("Close")})]})]}):null}render(){return y.jsxs(w.Dialog,{open:!0,maxWidth:"sm",onClose:()=>this.props.onClose(),fullWidth:!0,"aria-labelledby":"object-alias-dialog-title",children:[this.renderAddNewAlias(),y.jsx(w.DialogTitle,{id:"object-alias-dialog-title",children:this.state.usedInAliases.length?$.t("This object is used in aliases"):$.t("This object does not used in any aliases yet")}),y.jsx(w.DialogContent,{children:y.jsxs(w.MenuList,{style:{maxWidth:400},children:[this.state.usedInAliases.map(t=>y.jsxs(w.MenuItem,{style:zt.usedInAlias,onClick:()=>this.props.onRedirect(t),children:[y.jsx(w.ListItemIcon,{children:y.jsx(H.Link,{fontSize:"small"})}),y.jsx(w.ListItemText,{children:t})]},t)),y.jsxs(w.MenuItem,{onClick:()=>this.setState({showAddNewAlias:!0}),sx:zt.addNewAlias,children:[y.jsx(w.ListItemIcon,{children:y.jsx(H.AddLink,{fontSize:"small"})}),y.jsx(w.ListItemText,{children:$.t("Create alias from this ID")})]})]})}),y.jsx(w.DialogActions,{children:y.jsx(w.Button,{variant:"contained",onClick:()=>this.props.onClose(),startIcon:y.jsx(H.Close,{}),color:"grey",children:this.props.t("Close")})})]},"editAlias")}}const BO=Gn()(Va);class xd extends at.Component{checkTimer=null;objects={};constructor(t){super(t);const e=this.props.id.split("."),i=e.pop()||"";this.state={name:i,parentId:e.join("."),renameAllChildren:!0,newExists:!0,showParentDialog:!1,showHistoryWarning:!1,withHistory:[]}}componentWillUnmount(){this.checkTimer&&(clearTimeout(this.checkTimer),this.checkTimer=null)}static calculateNewId(t,e,i){const n=t.split("."),a=e.split(".");let o=0;for(;n[o]===a[o];)o++;const s=i.split(".");return s.splice(0,o+1),`${e}.${s.join(".")}`}async getInstancesWithHistory(){const t=await this.props.socket.getAdapterInstances();return t==null?void 0:t.filter(e=>e.common.getHistory).map(e=>e._id.replace("system.adapter.",""))}async checkHistory(){this.objects={};const t=await this.getInstancesWithHistory(),e=[];try{const i=await this.props.socket.getObject(this.props.id);i&&(this.objects[i._id]=i)}catch{}for(const i of this.props.childrenIds)try{const n=await this.props.socket.getObject(i);n&&(this.objects[n._id]=n)}catch{}return Object.values(this.objects).forEach(i=>{var n;(n=i.common)!=null&&n.custom&&Object.keys(i.common.custom).find(a=>t.includes(a)&&!i.common.custom[a].aliasId)&&e.push(i._id)}),e.length?(this.setState({showHistoryWarning:!0,withHistory:e}),!1):!0}showHistoryWarning(){return this.state.showHistoryWarning?y.jsxs(w.Dialog,{open:!0,onClose:()=>this.setState({showHistoryWarning:!1}),children:[y.jsx(w.DialogTitle,{children:this.props.t("Found states with history")}),y.jsxs(w.DialogContent,{children:[this.state.withHistory.length>2?this.props.t("You want to move %s states with enabled history",this.state.withHistory.length):`${this.props.t("Following states have history enabled")}: ${this.state.withHistory.join(", ")}`,y.jsx("div",{children:this.props.t("move_states_with_history_warning")})]}),y.jsxs(w.DialogActions,{children:[y.jsx(w.Button,{variant:"contained",color:"primary",onClick:async()=>{const t=`${this.state.parentId}.${this.state.name}`;await this.renameCopyObject(this.props.id,t,this.props.childrenIds.length&&this.state.renameAllChildren,!1),this.props.onClose()},startIcon:y.jsx(H.Check,{}),children:this.props.t("Confirm")}),y.jsx(w.Button,{color:"grey",variant:"contained",startIcon:y.jsx(H.Close,{}),onClick:()=>this.setState({showHistoryWarning:!1}),children:this.props.t("ra_Cancel")})]})]}):null}async renameCopyObject(t,e,i,n){var s;if(t===e)return;let a;try{a=((s=this.objects)==null?void 0:s[t])||await this.props.socket.getObject(t)}catch{}let o;if((a==null?void 0:a.type)==="state"&&(o=await this.props.socket.getState(t)),i)for(const l of this.props.childrenIds){const u=xd.calculateNewId(t,e,l);await this.renameCopyObject(l,u,!1,n)}a&&(await this.props.socket.setObject(e,a),o&&await this.props.socket.setState(e,o),n||await this.props.socket.delObject(t))}checkIfNewExists(){const t=`${this.state.parentId}.${this.state.name}`;this.checkTimer&&(clearTimeout(this.checkTimer),this.checkTimer=null),this.props.id===t?this.state.newExists||(this.checkTimer=setTimeout(()=>{this.checkTimer=null,this.setState({newExists:!0})},50)):this.checkTimer=setTimeout(async()=>{this.checkTimer=null;try{const e=await this.props.socket.getObject(t);e&&!this.state.newExists?this.setState({newExists:!0}):!e&&this.state.newExists&&this.setState({newExists:!1})}catch{this.state.newExists&&this.setState({newExists:!1})}},300)}renderParentSelectorDialog(){return this.state.showParentDialog?y.jsx(Xm,{foldersFirst:!0,imagePrefix:"../..",expertMode:this.props.expertMode,socket:this.props.socket,columns:["name","type","role","room","func"],types:["folder","channel","device","meta"],notEditable:!0,selected:this.state.parentId,allowNonObjects:!0,filterFunc:t=>this.props.expertMode?!0:t._id.startsWith("0_userdata.0")||t._id.startsWith("javascript."),theme:this.props.theme,onSelectConfirm:(t,e)=>{let i;return Array.isArray(t)?i=t[0]:i=t,i.split(".").length<=1||e[i]&&(e[i].type==="state"||i.startsWith("system."))?Promise.resolve(!1):Promise.resolve(!0)},onClose:()=>this.setState({showParentDialog:!1}),onOk:t=>{let e;Array.isArray(t)?e=t[0]:e=t,e&&e.split(".").length>1&&this.setState({parentId:e})}}):null}render(){const t=`${this.state.parentId}.${this.state.name}`;return y.jsxs(w.Dialog,{open:!0,maxWidth:"md",fullWidth:!0,onClose:()=>this.props.onClose(),children:[this.renderParentSelectorDialog(),this.showHistoryWarning(),y.jsxs(w.DialogTitle,{children:[y.jsxs("span",{style:{opacity:.6,marginRight:8},children:[this.props.t("Rename or copy object")," -"]}),y.jsx("span",{style:{fontWeight:"bold"},children:this.props.id})]}),y.jsxs(w.DialogContent,{children:[y.jsxs("div",{style:{display:"flex",gap:8,alignItems:"end",opacity:.7},children:[y.jsx(w.TextField,{fullWidth:!0,variant:"standard",label:this.props.t("Parent ID"),value:`${this.state.parentId}.`,slotProps:{input:{readOnly:!0}}}),y.jsx(w.Button,{variant:"outlined",style:{maxWidth:40,width:40,height:32},onClick:()=>this.setState({showParentDialog:!0}),children:"..."})]}),y.jsx(w.TextField,{value:this.state.name,onChange:e=>{const i=e.target.value.replace(jt.FORBIDDEN_CHARS,"_").replace(/\./g,"_").replace(/\s/g,"_").replace(/,/g,"_").replace(/__/g,"_").replace(/__/g,"_");this.setState({name:i},()=>this.checkIfNewExists())},style:{marginTop:20},autoFocus:!0,variant:"standard",fullWidth:!0,label:this.props.t("New object ID")}),this.props.childrenIds.length?y.jsx(w.FormControlLabel,{control:y.jsx(w.Checkbox,{checked:this.state.renameAllChildren,onChange:()=>{this.setState({renameAllChildren:!this.state.renameAllChildren})}}),label:this.props.t("Rename all children")}):null,y.jsxs("div",{children:[y.jsxs("span",{style:{opacity:.6,marginRight:8,fontSize:16},children:[this.props.t("New object ID"),":"]}),y.jsx("span",{style:{fontWeight:"bold",fontSize:16},children:t})]})]}),y.jsxs(w.DialogActions,{children:[y.jsx(w.Button,{disabled:!this.state.name||t===this.props.id,color:"primary",variant:"outlined",onClick:async()=>{await this.renameCopyObject(this.props.id,t,this.props.childrenIds.length&&this.state.renameAllChildren,!0),this.props.onClose()},children:this.props.t("Create a copy")}),y.jsx(w.Button,{disabled:!this.state.name||t===this.props.id,color:"primary",variant:"contained",onClick:async()=>{await this.checkHistory()&&(await this.renameCopyObject(this.props.id,t,this.props.childrenIds.length&&this.state.renameAllChildren,!1),this.props.onClose())},children:t!==this.props.id&&this.state.newExists?this.props.t("Replace"):this.props.t("Rename")}),y.jsx(w.Button,{variant:"contained",color:"grey",onClick:()=>this.props.onClose(),startIcon:y.jsx(H.Close,{}),children:this.props.t("ra_Cancel")})]})]})}}const zO=H.Delete,us={buttonAll:{color:"#FF0000"},id:{fontStyle:"italic"},buttonText:{whiteSpace:"nowrap"}};class VO extends at.Component{dialogName;filters;t;wordCache;constructor(t){super(t),this.dialogName="AdminObjects";const e=(window._localStorage||window.localStorage).getItem(`${this.dialogName||"App"}.filters`)||"{}";try{this.filters=JSON.parse(e)}catch{this.filters={}}const i=(window._localStorage||window.localStorage).getItem(`${this.dialogName||"App"}.selected`)||"";this.state={selected:i,name:"",toast:"",deleteObjectShow:null},this.t=this.translate,this.wordCache={}}translate=(t,e,i)=>e!==void 0?this.props.t(t,e,i):(this.wordCache[t]||(this.wordCache[t]=this.props.t(t)),this.wordCache[t]);onDelete(t){const e=this.state.deleteObjectShow.id;t?(this.props.socket.delObjects(e,!0).then(()=>this.setState({toast:this.t("All deleted")})).catch(i=>window.alert(`Cannot delete object: ${i}`)),this.setState({deleteObjectShow:null})):(this.props.socket.delObject(e,!1).catch(i=>window.alert(`Cannot delete object: ${i}`)),this.setState({deleteObjectShow:null}))}renderToast(){return y.jsx(w.Snackbar,{anchorOrigin:{vertical:"bottom",horizontal:"right"},open:!!this.state.toast,autoHideDuration:3e3,onClose:()=>this.setState({toast:""}),message:this.state.toast,action:y.jsx(w.IconButton,{size:"small","aria-label":"close",color:"inherit",onClick:()=>this.setState({toast:""}),children:y.jsx(H.Cancel,{fontSize:"small"})})},"toast")}renderDeleteDialog(){return this.state.deleteObjectShow?y.jsxs(w.Dialog,{maxWidth:"md",open:!0,onClose:()=>this.setState({deleteObjectShow:null}),"aria-labelledby":"delete-object-dialog-title","aria-describedby":"delete-object-dialog-description",children:[y.jsxs(w.DialogTitle,{id:"delete-object-dialog-title",children:[this.state.deleteObjectShow.hasChildren?this.t("Delete object(s)"):this.t("Delete object"),":"," ",y.jsx("span",{style:us.id,children:this.state.deleteObjectShow.id})]}),y.jsx(w.DialogContent,{children:y.jsx(w.DialogContentText,{children:this.t("Are you sure?")})}),y.jsxs(w.DialogActions,{children:[this.state.deleteObjectShow.hasChildren?y.jsx(w.Button,{variant:"contained",color:"grey",sx:{"& .MuiButton-text":us.buttonText},onClick:()=>this.onDelete(!0),startIcon:y.jsx(zO,{style:us.buttonAll}),children:this.t("Delete with children",this.state.deleteObjectShow.childrenCount)}):null,this.state.deleteObjectShow.exists?y.jsx(w.Button,{variant:"contained",sx:{"& .MuiButton-text":us.buttonText},onClick:()=>this.onDelete(!1),color:"primary",startIcon:y.jsx(H.Delete,{}),autoFocus:!0,children:this.t("Delete one item")}):null,y.jsx(w.Button,{variant:"contained",color:"grey",onClick:()=>this.setState({deleteObjectShow:null}),startIcon:y.jsx(H.Cancel,{}),children:this.t("ra_Cancel")})]})]},"delete"):null}render(){return[this.renderToast(),y.jsx($x,{dialogName:"admin",objectsWorker:this.props.objectsWorker,prefix:this.props.prefix,defaultFilters:this.filters,statesOnly:this.props.statesOnly,style:{width:"100%",height:"100%"},socket:this.props.socket,selected:this.state.selected,name:this.state.name,expertMode:this.props.expertMode,isFloatComma:this.props.isFloatComma,dateFormat:this.props.dateFormat,t:this.t,lang:this.props.lang,themeName:this.props.themeName,themeType:this.props.themeType,theme:this.props.theme,objectCustomDialog:IO,objectBrowserValue:Dn,objectBrowserEditObject:Ht,objectBrowserEditRole:bd,objectBrowserViewFile:NO,objectBrowserAliasEditor:BO,objectMoveRenameDialog:xd,router:yh,enableStateValueEdit:!0,onObjectDelete:(t,e,i,n)=>this.setState({deleteObjectShow:{id:t,hasChildren:e,exists:i,childrenCount:n}}),onFilterChanged:t=>{this.filters=t,(window._localStorage||window.localStorage).setItem(`${this.dialogName||"App"}.filters`,JSON.stringify(t))},onSelect:t=>{Array.isArray(t)?(window._localStorage||window.localStorage).setItem(`${this.dialogName||"App"}.selected`,t[0]||""):(window._localStorage||window.localStorage).setItem(`${this.dialogName||"App"}.selected`,t||"")},objectEditBoolean:!0,objectAddBoolean:!0,objectStatesView:!0,objectImportExport:!0,objectEditOfAccessControl:!0,modalNewObject:t=>y.jsx(LO,{objects:t.objects,expertMode:this.props.expertMode,setObject:(e,i)=>this.props.socket.setObject(e,i).catch(n=>window.alert(n)),selected:t.state.modalNewObj.id,initialType:t.state.modalNewObj.initialType,initialStateType:t.state.modalNewObj.initialStateType,onClose:()=>t.setState({modalNewObj:null}),onApply:()=>t.setState({modalNewObj:null})}),modalEditOfAccessControl:(t,e)=>y.jsx(EO,{theme:this.props.theme,themeType:this.props.themeType,extendObject:(i,n)=>{this.props.socket.extendObject(i,n).catch(a=>window.alert(a)),e.aclTooltip=null},selected:t.state.selected[0],modalEmptyId:e.obj?"":e.id,objects:t.objects,t:this.t,onClose:()=>t.setState({modalEditOfAccess:!1,modalEditOfAccessObjData:null}),onApply:()=>t.setState({modalEditOfAccess:!1,modalEditOfAccessObjData:null})})},"browser"),this.renderDeleteDialog()]}}const lE=Gn()(VO);export{lE as default};
|