Files
----/后端源码/yifan.action-ai.cn/index/js/echarts.BBlM_eP9.js

1522 lines
828 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{bC as t,bD as e,bE as n,bF as i,bG as o,bH as r,bI as a,bJ as s,bK as l,bL as u,bM as c,bN as d,bO as h,bP as p,bQ as f,bR as g,bS as y,bT as m,bU as v,bV as x,bW as _,bX as b,bY as S,bZ as w,b_ as M,b$ as I,c0 as D,c1 as T,c2 as C,c3 as A,c4 as L,c5 as k,c6 as P,c7 as N,c8 as O,c9 as R,ca as E,cb as V,cc as z,cd as B,ce as G,cf as F,cg as W,ch as H,ci as Y,cj as U,ck as Z,cl as X,cm as j,cn as q,co as K,cp as J,cq as $,cr as Q,cs as tt,ct as et,cu as nt,cv as it,cw as ot,cx as rt,cy as at,cz as st,cA as lt,cB as ut,cC as ct,cD as dt,cE as ht,cF as pt,cG as ft,cH as gt,cI as yt,cJ as mt,cK as vt,cL as xt,cM as _t,cN as bt,cO as St,cP as wt,cQ as Mt,cR as It,cS as Dt,cT as Tt,cU as Ct,cV as At,cW as Lt,cX as kt,cY as Pt,cZ as Nt,c_ as Ot,c$ as Rt,d0 as Et,d1 as Vt,d2 as zt,d3 as Bt,d4 as Gt,d5 as Ft,d6 as Wt,d7 as Ht,d8 as Yt,d9 as Ut,da as Zt,db as Xt,dc as jt,dd as qt,de as Kt,df as Jt,dg as $t,dh as Qt,di as te,dj as ee,dk as ne,dl as ie,dm as oe,dn as re,dp as ae,dq as se,dr as le,ds as ue,dt as ce,du as de,dv as he,dw as pe,dx as fe,dy as ge,dz as ye,dA as me,dB as ve,dC as xe,dD as _e,dE as be,dF as Se,dG as we,dH as Me,dI as Ie,dJ as De,dK as Te,dL as Ce,dM as Ae,dN as Le,dO as ke,dP as Pe,dQ as Ne,dR as Oe,dS as Re,dT as Ee,dU as Ve}from"./.pnpm.DGfAnZKL.js";var ze=1e-4;function Be(t,e,n,i){var o=e[0],r=e[1],a=n[0],s=n[1],l=r-o,u=s-a;if(0===l)return 0===u?a:(a+s)/2;if(i)if(l>0){if(t<=o)return a;if(t>=r)return s}else{if(t>=o)return a;if(t<=r)return s}else{if(t===o)return a;if(t===r)return s}return(t-o)/l*u+a}function Ge(e,n){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%"}return t(e)?(i=e,i.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(e)/100*n:parseFloat(e):null==e?NaN:+e;var i}function Fe(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function We(t){return t.sort(function(t,e){return t-e}),t}function He(t){if(t=+t,isNaN(t))return 0;if(t>1e-14)for(var e=1,n=0;n<15;n++,e*=10)if(Math.round(t*e)/e===t)return n;return function(t){var e=t.toString().toLowerCase(),n=e.indexOf("e"),i=n>0?+e.slice(n+1):0,o=n>0?n:e.length,r=e.indexOf("."),a=r<0?0:o-1-r;return Math.max(0,a-i)}(t)}function Ye(t,e){var n=Math.log,i=Math.LN10,o=Math.floor(n(t[1]-t[0])/i),r=Math.round(n(Math.abs(e[1]-e[0]))/i),a=Math.min(Math.max(-o+r,0),20);return isFinite(a)?a:20}function Ue(t,e){var n=Math.max(He(t),He(e)),i=t+e;return n>20?i:Fe(i,n)}var Ze=9007199254740991;function Xe(t){var e=2*Math.PI;return(t%e+e)%e}function je(t){return t>-1e-4&&t<ze}var qe=/^(?:(\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 Ke(e){if(e instanceof Date)return e;if(t(e)){var n=qe.exec(e);if(!n)
return new Date(NaN);if(n[8]){var i=+n[4]||0;return"Z"!==n[8].toUpperCase()&&(i-=+n[8].slice(0,3)),new Date(Date.UTC(+n[1],+(n[2]||1)-1,+n[3]||1,i,+(n[5]||0),+n[6]||0,n[7]?+n[7].substring(0,3):0))}return new Date(+n[1],+(n[2]||1)-1,+n[3]||1,+n[4]||0,+(n[5]||0),+n[6]||0,n[7]?+n[7].substring(0,3):0)}return null==e?new Date(NaN):new Date(Math.round(e))}function Je(t){if(0===t)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return t/Math.pow(10,e)>=10&&e++,e}function $e(t,e){var n=Je(t),i=Math.pow(10,n),o=t/i;return t=(o<1.5?1:o<2.5?2:o<4?3:o<7?5:10)*i,n>=-20?+t.toFixed(n<0?-n:0):t}function Qe(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),o=+t[i-1],r=n-i;return r?o+r*(t[i]-o):o}function tn(t){t.sort(function(t,e){return s(t,e,0)?-1:1});for(var e=-Infinity,n=1,i=0;i<t.length;){for(var o=t[i].interval,r=t[i].close,a=0;a<2;a++)o[a]<=e&&(o[a]=e,r[a]=a?1:1-n),e=o[a],n=r[a];o[0]===o[1]&&r[0]*r[1]!==1?t.splice(i,1):i++}return t;function s(t,e,n){return t.interval[n]<e.interval[n]||t.interval[n]===e.interval[n]&&(t.close[n]-e.close[n]===(n?-1:1)||!n&&s(t,e,1))}}function en(e){var n=parseFloat(e);return n==e&&(0!==n||!t(e)||e.indexOf("x")<=0)?n:NaN}function nn(t){return!isNaN(en(t))}function on(){return Math.round(9*Math.random())}function rn(t,e){return 0===e?t:rn(e,t%e)}function an(t,e){return null==t?e:null==e?t:t*e/rn(t,e)}function sn(t){throw new Error(t)}function ln(t,e,n){return(e-t)*n+t}var un="series\0",cn="\0_ec_\0";function dn(t){return t instanceof Array?t:null==t?[]:[t]}function hn(t,e,n){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var i=0,o=n.length;i<o;i++){var r=n[i];!t.emphasis[e].hasOwnProperty(r)&&t[e].hasOwnProperty(r)&&(t.emphasis[e][r]=t[e][r])}}}var pn=["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 fn(t){return!r(t)||o(t)||t instanceof Date?t:t.value}function gn(t){return r(t)&&!(t instanceof Array)}function yn(t,e,n){var o="normalMerge"===n,l="replaceMerge"===n,u="replaceAll"===n;t=t||[],e=(e||[]).slice();var c=a();s(e,function(t,n){r(t)||(e[n]=null)});var d,h,p=function(t,e,n){var i=[];if("replaceAll"===n)return i;for(var o=0;o<t.length;o++){var r=t[o];r&&null!=r.id&&e.set(r.id,o),i.push({existing:"replaceMerge"===n||bn(r)?null:r,newOption:null,keyInfo:null,brandNew:null})}return i}(t,c,n);return(o||l)&&function(t,e,n,o){s(o,function(r,a){if(r&&null!=r.id){var s=vn(r.id),l=n.get(s);if(null!=l){var u=t[l];i(!u.newOption,'Duplicated option on id "'+s+'".'),u.newOption=r,u.existing=e[l],o[a]=null}}})}(p,t,c,e),o&&function(t,e){s(e,function(n,i){if(n&&null!=n.name)for(var o=0;o<t.length;o++){var r=t[o].existing;if(!t[o].newOption&&r&&(null==r.id||null==n.id)&&!bn(n)&&!bn(r)&&mn("name",r,n))return t[o].newOption=n,void(e[i]=null)}})}(p,e),o||l?function(t,e,n){s(e,function(e){if(e){for(var i,o=0;
// Be `!resultItem` only when `nextIdx >= result.length`.
(i=t[o])&&(i.newOption||bn(i.existing)||// In mode "replaceMerge", here no not-mapped-non-internal-existing.
i.existing&&null!=e.id&&!mn("id",e,i.existing));)o++;i?(i.newOption=e,i.brandNew=n):t.push({newOption:e,brandNew:n,existing:null,keyInfo:null}),o++}})}(p,e,l):u&&function(t,e){s(e,function(e){t.push({newOption:e,brandNew:!0,existing:null,keyInfo:null})})}(p,e),d=p,h=a(),s(d,function(t){var e=t.existing;e&&h.set(e.id,t)}),s(d,function(t){var e=t.newOption;i(!e||null==e.id||!h.get(e.id)||h.get(e.id)===t,"id duplicates: "+(e&&e.id)),e&&null!=e.id&&h.set(e.id,t),!t.keyInfo&&(t.keyInfo={})}),s(d,function(t,e){var n=t.existing,i=t.newOption,o=t.keyInfo;if(r(i)){if(o.name=null!=i.name?vn(i.name):n?n.name:un+e,n)o.id=vn(n.id);else if(null!=i.id)o.id=vn(i.id);else{var a=0;do{o.id="\0"+o.name+"\0"+a++}while(h.get(o.id))}h.set(o.id,t)}}),p}function mn(t,e,n){var i=xn(e[t],null),o=xn(n[t],null);return null!=i&&null!=o&&i===o}function vn(t){return xn(t,"")}function xn(e,n){return null==e?n:t(e)?e:u(e)||c(e)?e+"":n}function _n(t){var e=t.name;return!(!e||!e.indexOf(un))}function bn(t){return t&&null!=t.id&&0===vn(t.id).indexOf(cn)}function Sn(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?o(e.dataIndex)?n(e.dataIndex,function(e){return t.indexOfRawIndex(e)}):t.indexOfRawIndex(e.dataIndex):null!=e.name?o(e.name)?n(e.name,function(e){return t.indexOfName(e)}):t.indexOfName(e.name):void 0}function wn(){var t="__ec_inner_"+Mn++;return function(e){return e[t]||(e[t]={})}}var Mn=on();function In(t,e,n){var i=Dn(e,n),o=i.mainTypeSpecified,r=i.queryOptionMap,a=i.others,s=n?n.defaultMainType:null;return!o&&s&&r.set(s,{}),r.each(function(e,i){var o=An(t,i,e,{useDefault:s===i,enableAll:!n||null==n.enableAll||n.enableAll,enableNone:!n||null==n.enableNone||n.enableNone});a[i+"Models"]=o.models,a[i+"Model"]=o.models[0]}),a}function Dn(e,n){var i;if(t(e)){var o={};o[e+"Index"]=0,i=o}else i=e;var r=a(),u={},c=!1;return s(i,function(t,e){if("dataIndex"!==e&&"dataIndexInside"!==e){var i=e.match(/^(\w+)(Index|Id|Name)$/)||[],o=i[1],a=(i[2]||"").toLowerCase();if(o&&a&&!(n&&n.includeMainTypes&&l(n.includeMainTypes,o)<0))c=c||!!o,(r.get(o)||r.set(o,{}))[a]=t}else u[e]=t}),{mainTypeSpecified:c,queryOptionMap:r,others:u}}var Tn={useDefault:!0,enableAll:!1,enableNone:!1},Cn={useDefault:!1,enableAll:!0,enableNone:!0};function An(t,e,n,o){o=o||Tn;var r=n.index,a=n.id,s=n.name,l={models:null,specified:null!=r||null!=a||null!=s};if(!l.specified){var u=void 0;return l.models=o.useDefault&&(u=t.getComponent(e))?[u]:[],l}return"none"===r||!1===r?(i(o.enableNone,'`"none"` or `false` is not a valid value on index option.'),l.models=[],l):("all"===r&&(i(o.enableAll,'`"all"` is not a valid value on index option.'),r=a=s=null),l.models=t.queryComponents({mainType:e,index:r,id:a,name:s}),l)}function Ln(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n}function kn(t,e){var n=a(),i=[];return s(t,function(t){var o=e(t);(n.get(o)||(i.push(o),n.set(o,[]))).push(t)}),{keys:i,buckets:n}}function Pn(e,n,i,o,r){var a=null==n||"auto"===n;if(null==o)return o;if(u(o))return Fe(y=ln(i||0,o,r),a?Math.max(He(i||0),He(o)):n);if(t(o))return r<1?i:o;for(var s=[],l=i,c=o,d=Math.max(l?l.length:0,c.length),h=0;h<d;++h){var p=e.getDimensionInfo(h);if(p&&"ordinal"===p.type)s[h]=(r<1&&l?l:c)[h];else{var f=l&&l[h]?l[h]:0,g=c[h],y=ln(f,g,r);s[h]=Fe(y,a?Math.max(He(f),He(g)):n)}}return s}var Nn="___EC__COMPONENT__CONTAINER___",On="___EC__EXTENDED_CLASS___";function Rn(t){var e={main:"",sub:""};if(t){var n=t.split(".");e.main=n[0]||"",e.sub=n[1]||""}return e}function En(t,e){t.$constructor=t,t.extend=function(t){var e,n,i=this;return g(n=i)&&/^class\s/.test(Function.prototype.toString.call(n))?e=/** @class */
function(t){function e(){return t.apply(this,arguments)||this}return h(e,t),e}(i):(e=function(){(t.$constructor||i).apply(this,arguments)},p(e,this)),f(e.prototype,t),e[On]=!0,e.extend=this.extend,e.superCall=Bn,e.superApply=Gn,e.superClass=i,e}}function Vn(t,e){t.extend=e.extend}var zn=Math.round(10*Math.random());function Bn(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return this.superClass.prototype[e].apply(t,n)}function Gn(t,e,n){return this.superClass.prototype[e].apply(t,n)}function Fn(t){var e={};t.registerClass=function(t){var n,o=t.type||t.prototype.type;if(o){i(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(n=o),'componentType "'+n+'" illegal'),t.prototype.type=o;var r=Rn(o);if(r.sub){if(r.sub!==Nn){var a=function(t){var n=e[t.main];n&&n[Nn]||((n=e[t.main]={})[Nn]=!0);return n}(r);a[r.sub]=t}}else e[r.main]=t}return t},t.getClass=function(t,n,i){var o=e[t];if(o&&o[Nn]&&(o=n?o[n]:null),i&&!o)throw new Error(n?"Component "+t+"."+(n||"")+" is used but not imported.":t+".type should be specified.");return o},t.getClassesByMainType=function(t){var n=Rn(t),i=[],o=e[n.main];return o&&o[Nn]?s(o,function(t,e){e!==Nn&&i.push(t)}):i.push(o),i},t.hasClass=function(t){var n=Rn(t);return!!e[n.main]},t.getAllClassMainTypes=function(){var t=[];return s(e,function(e,n){t.push(n)}),t},t.hasSubTypes=function(t){var n=Rn(t),i=e[n.main];return i&&i[Nn]}}function Wn(t,e){for(var n=0;n<t.length;n++)t[n][1]||(t[n][1]=t[n][0]);return e=e||!1,function(n,i,o){for(var r={},a=0;a<t.length;a++){var s=t[a][1];if(!(i&&l(i,s)>=0||o&&l(o,s)<0)){var u=n.getShallow(s,e);null!=u&&(r[t[a][0]]=u)}}return r}}var Hn=Wn([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Yn=
/** @class */function(){function t(){}return t.prototype.getAreaStyle=function(t,e){return Hn(this,t,e)},t}(),Un=wn(),Zn=function(t,e,n,i){if(i){var o=Un(i);o.dataIndex=n,o.dataType=e,o.seriesIndex=t,o.ssrType="chart","group"===i.type&&i.traverse(function(i){var o=Un(i);o.seriesIndex=t,o.dataIndex=n,o.dataType=e,o.ssrType="chart"})}},Xn=1,jn={},qn=wn(),Kn=wn(),Jn=["emphasis","blur","select"],$n=["normal","emphasis","blur","select"],Qn=10,ti="highlight",ei="downplay",ni="select",ii="unselect",oi="toggleSelect";function ri(t){return null!=t&&"none"!==t}function ai(t,e,n){t.onHoverStateChange&&(t.hoverState||0)!==n&&t.onHoverStateChange(e),t.hoverState=n}function si(t){ai(t,"emphasis",2)}function li(t){2===t.hoverState&&ai(t,"normal",0)}function ui(t){ai(t,"blur",1)}function ci(t){1===t.hoverState&&ai(t,"normal",0)}function di(t){t.selected=!0}function hi(t){t.selected=!1}function pi(t,e,n){e(t,n)}function fi(t,e,n){pi(t,e,n),t.isGroup&&t.traverse(function(t){pi(t,e,n)})}function gi(t,e){switch(e){case"emphasis":t.hoverState=2;break;case"normal":t.hoverState=0;break;case"blur":t.hoverState=1;break;case"select":t.selected=!0}}function yi(t,e){var n=this.states[t];if(this.style){if("emphasis"===t)return function(t,e,n,i){var o=n&&l(n,"select")>=0,r=!1;if(t instanceof y){var a=qn(t),s=o&&a.selectFill||a.normalFill,u=o&&a.selectStroke||a.normalStroke;if(ri(s)||ri(u)){var c=(i=i||{}).style||{};"inherit"===c.fill?(r=!0,i=f({},i),(c=f({},c)).fill=s):!ri(c.fill)&&ri(s)?(r=!0,i=f({},i),(c=f({},c)).fill=m(s)):!ri(c.stroke)&&ri(u)&&(r||(i=f({},i),c=f({},c)),c.stroke=m(u)),i.style=c}}if(i&&null==i.z2){r||(i=f({},i));var d=t.z2EmphasisLift;i.z2=t.z2+(null!=d?d:Qn)}return i}(this,0,e,n);if("blur"===t)return function(t,e,n){var i=l(t.currentStates,e)>=0,o=t.style.opacity,r=i?null:function(t,e,n,i){for(var o=t.style,r={},a=0;a<e.length;a++){var s=e[a],l=o[s];r[s]=null==l?i&&i[s]:l}for(a=0;a<t.animators.length;a++){var u=t.animators[a];u.__fromStateTransition&&u.__fromStateTransition.indexOf(n)<0&&"style"===u.targetName&&u.saveTo(r,e)}return r}(t,["opacity"],e,{opacity:1}),a=(n=n||{}).style||{};return null==a.opacity&&(n=f({},n),a=f({
// Already being applied 'emphasis'. DON'T mul opacity multiple times.
opacity:i?o:.1*r.opacity},a),n.style=a),n}(this,t,n);if("select"===t)return function(t,e,n){if(n&&null==n.z2){n=f({},n);var i=t.z2SelectLift;n.z2=t.z2+(null!=i?i:9)}return n}(this,0,n)}return n}function mi(t){t.stateProxy=yi;var e=t.getTextContent(),n=t.getTextGuideLine();e&&(e.stateProxy=yi),n&&(n.stateProxy=yi)}function vi(t,e){!Di(t,e)&&!t.__highByOuter&&fi(t,si)}function xi(t,e){!Di(t,e)&&!t.__highByOuter&&fi(t,li)}function _i(t,e){t.__highByOuter|=1<<(e||0),fi(t,si)}function bi(t,e){!(t.__highByOuter&=~(1<<(e||0)))&&fi(t,li)}function Si(t){fi(t,ui)}function wi(t){fi(t,ci)}function Mi(t){fi(t,di)}function Ii(t){fi(t,hi)}function Di(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function Ti(t){var e=t.getModel(),n=[],i=[];e.eachComponent(function(e,o){var r=Kn(o),a="series"===e,s=a?t.getViewOfSeriesModel(o):t.getViewOfComponentModel(o);!a&&i.push(s),r.isBlured&&(s.group.traverse(function(t){ci(t)}),a&&n.push(o)),r.isBlured=!1}),s(i,function(t){t&&t.toggleBlurSeries&&t.toggleBlurSeries(n,!1,e)})}function Ci(t,e,n,i){var o=i.getModel();function a(t,e){for(var n=0;n<e.length;n++){var i=t.getItemGraphicEl(e[n]);i&&wi(i)}}if(n=n||"coordinateSystem",null!=t&&e&&"none"!==e){var s=o.getSeriesByIndex(t),l=s.coordinateSystem;l&&l.master&&(l=l.master);var u=[];o.eachSeries(function(t){var o=s===t,c=t.coordinateSystem;if(c&&c.master&&(c=c.master),!(// Not blur other series if blurScope series
"series"===n&&!o||"coordinateSystem"===n&&!(c&&l?c===l:o)||"series"===e&&o)){if(i.getViewOfSeriesModel(t).group.traverse(function(t){t.__highByOuter&&o&&"self"===e||ui(t)}),v(e))a(t.getData(),e);else if(r(e))for(var d=x(e),h=0;h<d.length;h++)a(t.getData(d[h]),e[d[h]]);u.push(t),Kn(t).isBlured=!0}}),o.eachComponent(function(t,e){if("series"!==t){var n=i.getViewOfComponentModel(e);n&&n.toggleBlurSeries&&n.toggleBlurSeries(u,!0,o)}})}}function Ai(t,e,n){if(null!=t&&null!=e){var i=n.getModel().getComponent(t,e);if(i){Kn(i).isBlured=!0;var o=n.getViewOfComponentModel(i);o&&o.focusBlurEnabled&&o.group.traverse(function(t){ui(t)})}}}function Li(t,e,n,i){var o={focusSelf:!1,dispatchers:null};if(null==t||"series"===t||null==e||null==n)return o;var r=i.getModel().getComponent(t,e);if(!r)return o;var a=i.getViewOfComponentModel(r);if(!a||!a.findHighDownDispatchers)return o;for(var s,l=a.findHighDownDispatchers(n),u=0;u<l.length;u++)if("self"===Un(l[u]).focus){s=!0;break}return{focusSelf:s,dispatchers:l}}function ki(t){var e=t.getAllData();s(e,function(e){var n=e.data,i=e.type;n.eachItemGraphicEl(function(e,n){t.isSelected(n,i)?Mi(e):Ii(e)})})}function Pi(t){var e=[];return t.eachSeries(function(t){var n=t.getAllData();s(n,function(n){n.data;var i=n.type,o=t.getSelectedDataIndices();if(o.length>0){var r={dataIndex:o,seriesIndex:t.seriesIndex};null!=i&&(r.dataType=i),e.push(r)}})}),e}function Ni(t,e,n){Bi(t,!0),fi(t,mi),Ri(t,e,n)}function Oi(t,e,n,i){i?function(t){Bi(t,!1)}(t):Ni(t,e,n)}function Ri(t,e,n){var i=Un(t);null!=e?(i.focus=e,i.blurScope=n):i.focus&&(i.focus=null)}var Ei=["emphasis","blur","select"],Vi={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function zi(t,e,n,i){n=n||"itemStyle";for(var o=0;o<Ei.length;o++){var r=Ei[o],a=e.getModel([r,n]);t.ensureState(r).style=i?i(a):a[Vi[n]]()}}function Bi(t,e){var n=!1===e,i=t;t.highDownSilentOnTouch&&(i.__highDownSilentOnTouch=t.highDownSilentOnTouch),n&&!i.__highDownDispatcher||(i.__highByOuter=i.__highByOuter||0,i.__highDownDispatcher=!n)}function Gi(t){return!(!t||!t.__highDownDispatcher)}function Fi(t){var e=t.type;return e===ni||e===ii||e===oi}function Wi(t){var e=t.type;return e===ti||e===ei}var Hi=wn();function Yi(t,e,n,i,o){var r;if(e&&e.ecModel){var a=e.ecModel.getUpdatePayload();r=a&&a.animation}var s="update"===t;if(e&&e.isAnimationEnabled()){var l=void 0,u=void 0,c=void 0;return i?(l=_(i.duration,200),u=_(i.easing,"cubicOut"),c=0):(l=e.getShallow(s?"animationDurationUpdate":"animationDuration"),u=e.getShallow(s?"animationEasingUpdate":"animationEasing"),c=e.getShallow(s?"animationDelayUpdate":"animationDelay")),r&&(null!=r.duration&&(l=r.duration),null!=r.easing&&(u=r.easing),null!=r.delay&&(c=r.delay)),g(c)&&(c=c(n,o)),g(l)&&(l=l(n)),{duration:l||0,delay:c,easing:u}}return null}function Ui(t,e,n,i,o,a,s){var l,u=!1;g(o)?(s=a,a=o,o=null):r(o)&&(a=o.cb,s=o.during,u=o.isFrom,l=o.removeOpt,o=o.dataIndex);var c="leave"===t;c||e.stopAnimation("leave");var d=Yi(t,i,o,c?l||{}:null,i&&i.getAnimationDelayParams?i.getAnimationDelayParams(e,o):null);if(d&&d.duration>0){var h={duration:d.duration,delay:d.delay||0,easing:d.easing,done:a,force:!!a||!!s,
// Set to final state in update/init animation.
// So the post processing based on the path shape can be done correctly.
setToFinal:!c,scope:t,during:s};u?e.animateFrom(n,h):e.animateTo(n,h)}else e.stopAnimation(),!u&&e.attr(n),s&&s(1),a&&a()}function Zi(t,e,n,i,o,r){Ui("update",t,e,n,i,o,r)}function Xi(t,e,n,i,o,r){Ui("enter",t,e,n,i,o,r)}function ji(t){if(!t.__zr)return!0;for(var e=0;e<t.animators.length;e++){if("leave"===t.animators[e].scope)return!0}return!1}function qi(t,e,n,i,o,r){ji(t)||Ui("leave",t,e,n,i,o,r)}function Ki(t,e,n,i){t.removeTextContent(),t.removeTextGuideLine(),qi(t,{style:{opacity:0}},e,n,i)}function Ji(t,e,n){function i(){t.parent&&t.parent.remove(t)}t.isGroup?t.traverse(function(t){t.isGroup||Ki(t,e,n,i)}):Ki(t,e,n,i)}function $i(t){Hi(t).oldStyle=t.style}var Qi=Math.max,to=Math.min,eo={};var no=O;function io(t,e){eo[t]=e}function oo(t){if(eo.hasOwnProperty(t))return eo[t]}function ro(t,e,n,i){var o=S(t,e);return n&&("center"===i&&(n=so(n,o.getBoundingRect())),uo(o,n)),o}function ao(t,e,n){var i=new b({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===n){var o={width:t.width,height:t.height};i.setStyle(so(e,o))}}});return i}function so(t,e){var n,i=e.width/e.height,o=t.height*i;return n=o<=t.width?t.height:(o=t.width)/i,{x:t.x+t.width/2-o/2,y:t.y+t.height/2-n/2,width:o,height:n}}var lo=w;function uo(t,e){if(t.applyTransform){var n=t.getBoundingRect().calculateTransform(e);t.applyTransform(n)}}function co(t,e){return P(t,t,{lineWidth:e}),t}var ho=M;function po(t,e){for(var n=A([]);t&&t!==e;)L(n,t.getLocalTransform(),n),t=t.parent;return n}function fo(t,e,n){return e&&!v(e)&&(e=I.getLocalTransform(e)),n&&(e=D([],e)),T([],t,e)}function go(t,e,n){var i=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),o=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),r=["left"===t?-i:"right"===t?i:0,"top"===t?-o:"bottom"===t?o:0];return r=fo(r,e,n),Math.abs(r[0])>Math.abs(r[1])?r[0]>0?"right":"left":r[1]>0?"bottom":"top"}function yo(t){return!t.isGroup}function mo(t,e,n){if(t&&e){var i,o=(i={},t.traverse(function(t){yo(t)&&t.anid&&(i[t.anid]=t)}),i);e.traverse(function(t){if(yo(t)&&t.anid){var e=o[t.anid];if(e){var i=r(t);t.attr(r(e)),Zi(t,i,n,Un(t).dataIndex)}}})}function r(t){var e={x:t.x,y:t.y,rotation:t.rotation};return function(t){return null!=t.shape}(t)&&(e.shape=f({},t.shape)),e}}function vo(t,e){return n(t,function(t){var n=t[0];n=Qi(n,e.x),n=to(n,e.x+e.width);var i=t[1];return i=Qi(i,e.y),[n,i=to(i,e.y+e.height)]})}function xo(t,e,n){var i=f({rectHover:!0},e),o=i.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(o.image=t.slice(8),C(o,n),new b(i)):ro(t.replace("path://",""),i,n,"center")}function _o(t,e,n,i,o){for(var r=0,a=o[o.length-1];r<o.length;r++){var s=o[r];if(bo(t,e,n,i,s[0],s[1],a[0],a[1]))return!0;a=s}}function bo(t,e,n,i,o,r,a,s){var l,u=n-t,c=i-e,d=a-o,h=s-r,p=So(d,h,u,c);if((l=p)<=1e-6&&l>=-1e-6)return!1;var f=t-o,g=e-r,y=So(f,g,u,c)/p;if(y<0||y>1)return!1;var m=So(f,g,d,h)/p;return!(m<0||m>1)}function So(t,e,n,i){return t*i-n*e}function wo(e){var n=e.itemTooltipOption,i=e.componentModel,o=e.itemName,r=t(n)?{formatter:n}:n,a=i.mainType,l=i.componentIndex,u={componentType:a,name:o,$vars:["name"]};u[a+"Index"]=l;var c=e.formatterParamsExtra;c&&s(x(c),function(t){k(u,t)||(u[t]=c[t],u.$vars.push(t))});var d=Un(e.el);d.componentMainType=a,d.componentIndex=l,d.tooltipConfig={name:o,option:C({content:o,encodeHTMLContent:!0,formatterParams:u},r)}}function Mo(t,e){var n;t.isGroup&&(n=e(t)),n||t.traverse(e)}function Io(t,e){if(t)if(o(t))for(var n=0;n<t.length;n++)Mo(t[n],e);else Mo(t,e)}io("circle",R),io("ellipse",E),io("sector",V),io("ring",z),io("polygon",B),io("polyline",G),io("rect",F),io("line",W),io("bezierCurve",H),io("arc",Y);const Do=Object.freeze(Object.defineProperty({__proto__:null,Arc:Y,BezierCurve:H,BoundingRect:U,Circle:R,CompoundPath:Z,Ellipse:E,Group:X,Image:b,IncrementalDisplayable:j,Line:W,LinearGradient:q,OrientedBoundingRect:K,Path:y,Point:J,Polygon:B,Polyline:G,RadialGradient:$,Rect:F,Ring:z,Sector:V,Text:Q,applyTransform:fo,clipPointsByRect:vo,clipRectByRect:function(t,e){var n=Qi(t.x,e.x),i=to(t.x+t.width,e.x+e.width),o=Qi(t.y,e.y),r=to(t.y+t.height,e.y+e.height);if(i>=n&&r>=o)return{x:n,y:o,width:i-n,height:r-o}},createIcon:xo,extendPath:function(t,e){return no(t,e)},extendShape:function(t){return y.extend(t)},getShapeClass:oo,getTransform:po,groupTransition:mo,initProps:Xi,isElementRemoved:ji,lineLineIntersect:bo,linePolygonIntersect:_o,makeImage:ao,makePath:ro,mergePath:lo,registerShape:io,removeElement:qi,removeElementWithFadeOut:Ji,resizePath:uo,setTooltipConfig:wo,subPixelOptimize:ho,subPixelOptimizeLine:co,subPixelOptimizeRect:function(t){return N(t.shape,t.shape,t.style),t},transformDirection:go,traverseElements:Io,updateProps:Zi},Symbol.toStringTag,{value:"Module"}));var To={};function Co(t,e){for(var n=0;n<Jn.length;n++){var i=Jn[n],o=e[i],r=t.ensureState(i);r.style=r.style||{},r.style.text=o}var a=t.currentStates.slice();t.clearStates(!0),t.setStyle({text:e.normal}),t.useStates(a,!0)}function Ao(t,e,n){var i,o=t.labelFetcher,r=t.labelDataIndex,a=t.labelDimIndex,s=e.normal;o&&(i=o.getFormattedLabel(r,"normal",null,a,s&&s.get("formatter"),null!=n?{interpolatedValue:n}:null)),null==i&&(i=g(t.defaultText)?t.defaultText(r,t,n):t.defaultText);for(var l={normal:i},u=0;u<Jn.length;u++){var c=Jn[u],d=e[c];l[c]=_(o?o.getFormattedLabel(r,c,null,a,d&&d.get("formatter")):null,i)}return l}function Lo(t,e,n,i){n=n||To;for(var o=t instanceof Q,r=!1,a=0;a<$n.length;a++){if((h=e[$n[a]])&&h.getShallow("show")){r=!0;break}}var s=o?t:t.getTextContent();if(r){o||(s||(s=new Q,t.setTextContent(s)),t.stateProxy&&(s.stateProxy=t.stateProxy));var l=Ao(n,e),u=e.normal,c=!!u.getShallow("show"),d=Po(u,i&&i.normal,n,!1,!o);d.text=l.normal,o||t.setTextConfig(No(u,n,!1));for(a=0;a<Jn.length;a++){var h,p=Jn[a];if(h=e[p]){var f=s.ensureState(p),g=!!_(h.getShallow("show"),c);if(g!==c&&(f.ignore=!g),f.style=Po(h,i&&i[p],n,!0,!o),f.style.text=l[p],!o)t.ensureState(p).textConfig=No(h,n,!0)}}s.silent=!!u.getShallow("silent"),null!=s.style.x&&(d.x=s.style.x),null!=s.style.y&&(d.y=s.style.y),s.ignore=!c,s.useStyle(d),s.dirty(),n.enableTextSetter&&(Bo(s).setLabelText=function(t){var i=Ao(n,e,t);Co(s,i)})}else s&&(s.ignore=!0);t.dirty()}function ko(t,e){e=e||"label";for(var n={normal:t.getModel(e)},i=0;i<Jn.length;i++){var o=Jn[i];n[o]=t.getModel([o,e])}return n}function Po(t,e,n,i,o){var r={};return function(t,e,n,i,o){n=n||To;var r,a=e.ecModel,s=a&&a.option.textStyle,l=function(t){var e;for(;t&&t!==t.ecModel;){var n=(t.option||To).rich;if(n){e=e||{};for(var i=x(n),o=0;o<i.length;o++){e[i[o]]=1}}t=t.parentModel}return e}(e);if(l)for(var u in r={},l)if(l.hasOwnProperty(u)){var c=e.getModel(["rich",u]);Vo(r[u]={},c,s,n,i,o,!1,!0)}r&&(t.rich=r);var d=e.get("overflow");d&&(t.overflow=d);var h=e.get("minMargin");null!=h&&(t.margin=h);Vo(t,e,s,n,i,o,!0,!1)}(r,t,n,i,o),e&&f(r,e),r}function No(t,e,n){e=e||{};var i,o={},r=t.getShallow("rotate"),a=_(t.getShallow("distance"),n?null:5),s=t.getShallow("offset");return"outside"===(i=t.getShallow("position")||(n?null:"inside"))&&(i=e.defaultOutsidePosition||"top"),null!=i&&(o.position=i),null!=s&&(o.offset=s),null!=r&&(r*=Math.PI/180,o.rotation=r),null!=a&&(o.distance=a),o.outsideFill="inherit"===t.get("color")?e.inheritColor||null:"auto",o}var Oo=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],Ro=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],Eo=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function Vo(t,e,n,i,o,r,a,s){n=!o&&n||To;var l=i&&i.inheritColor,u=e.getShallow("color"),c=e.getShallow("textBorderColor"),d=_(e.getShallow("opacity"),n.opacity);"inherit"!==u&&"auto"!==u||(u=l||null),"inherit"!==c&&"auto"!==c||(c=l||null),r||(u=u||n.color,c=c||n.textBorderColor),null!=u&&(t.fill=u),null!=c&&(t.stroke=c);var h=_(e.getShallow("textBorderWidth"),n.textBorderWidth);null!=h&&(t.lineWidth=h);var p=_(e.getShallow("textBorderType"),n.textBorderType);null!=p&&(t.lineDash=p);var f=_(e.getShallow("textBorderDashOffset"),n.textBorderDashOffset);null!=f&&(t.lineDashOffset=f),o||null!=d||s||(d=i&&i.defaultOpacity),null!=d&&(t.opacity=d),o||r||null==t.fill&&i.inheritColor&&(t.fill=i.inheritColor);for(var g=0;g<Oo.length;g++){var y=Oo[g];null!=(v=_(e.getShallow(y),n[y]))&&(t[y]=v)}for(g=0;g<Ro.length;g++){y=Ro[g];null!=(v=e.getShallow(y))&&(t[y]=v)}if(null==t.verticalAlign){var m=e.getShallow("baseline");null!=m&&(t.verticalAlign=m)}if(!a||!i.disableBox){for(g=0;g<Eo.length;g++){var v;y=Eo[g];null!=(v=e.getShallow(y))&&(t[y]=v)}var x=e.getShallow("borderType");null!=x&&(t.borderDash=x),"auto"!==t.backgroundColor&&"inherit"!==t.backgroundColor||!l||(t.backgroundColor=l),"auto"!==t.borderColor&&"inherit"!==t.borderColor||!l||(t.borderColor=l)}}function zo(t,e){var n=e&&e.getModel("textStyle");return tt([
// FIXME in node-canvas fontWeight is before fontStyle
t.fontStyle||n&&n.getShallow("fontStyle")||"",t.fontWeight||n&&n.getShallow("fontWeight")||"",(t.fontSize||n&&n.getShallow("fontSize")||12)+"px",t.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "))}var Bo=wn();function Go(t,e,n,i){if(t){var o=Bo(t);o.prevValue=o.value,o.value=n;var r=e.normal;o.valueAnimation=r.get("valueAnimation"),o.valueAnimation&&(o.precision=r.get("precision"),o.defaultInterpolatedText=i,o.statesModels=e)}}function Fo(t,e,n,i,o){var r=Bo(t);if(r.valueAnimation&&r.prevValue!==r.value){var a=r.defaultInterpolatedText,s=_(r.interpolatedValue,r.prevValue),l=r.value;t.percent=0,(null==r.prevValue?Xi:Zi)(t,{
// percent is used to prevent animation from being aborted #15916
percent:1},i,e,null,function(i){var u=Pn(n,r.precision,s,l,i);r.interpolatedValue=1===i?null:u;var c=Ao({labelDataIndex:e,labelFetcher:o,defaultText:a?a(u):u+""},r.statesModels,u);Co(t,c)})}}var Wo,Ho,Yo=["textStyle","color"],Uo=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],Zo=new Q,Xo=
/** @class */function(){function t(){}return t.prototype.getTextColor=function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(Yo):null)},t.prototype.getFont=function(){return zo({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},t.prototype.getTextRect=function(t){for(var e={text:t,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<Uo.length;n++)e[Uo[n]]=this.getShallow(Uo[n]);return Zo.useStyle(e),Zo.update(),Zo.getBoundingRect()},t}(),jo=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],qo=Wn(jo),Ko=
/** @class */function(){function t(){}return t.prototype.getLineStyle=function(t){return qo(this,t)},t}(),Jo=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],$o=Wn(Jo),Qo=
/** @class */function(){function t(){}return t.prototype.getItemStyle=function(t,e){return $o(this,t,e)},t}(),tr=
/** @class */function(){function t(t,e,n){this.parentModel=e,this.ecModel=n,this.option=t}return t.prototype.init=function(t,e,n){},t.prototype.mergeOption=function(t,e){et(this.option,t,!0)},t.prototype.get=function(t,e){return null==t?this.option:this._doGet(this.parsePath(t),!e&&this.parentModel)},t.prototype.getShallow=function(t,e){var n=this.option,i=null==n?n:n[t];if(null==i&&!e){var o=this.parentModel;o&&(i=o.getShallow(t))}return i},t.prototype.getModel=function(e,n){var i=null!=e,o=i?this.parsePath(e):null;return new t(i?this._doGet(o):this.option,n=n||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(o)),this.ecModel)},t.prototype.isEmpty=function(){return null==this.option},t.prototype.restoreData=function(){},t.prototype.clone=function(){return new(0,this.constructor)(nt(this.option))},t.prototype.parsePath=function(t){return"string"==typeof t?t.split("."):t},t.prototype.resolveParentPath=function(t){return t},t.prototype.isAnimationEnabled=function(){if(!d.node&&this.option){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},t.prototype._doGet=function(t,e){var n=this.option;if(!t)return n;for(var i=0;i<t.length&&(!t[i]||null!=(n=n&&"object"==typeof n?n[t[i]]:null));i++);return null==n&&e&&(n=e._doGet(this.resolveParentPath(t),e.parentModel)),n},t}();En(tr),Wo=tr,Ho=["__\0is_clz",zn++].join("_"),Wo.prototype[Ho]=!0,Wo.isInstance=function(t){return!(!t||!t[Ho])},it(tr,Ko),it(tr,Qo),it(tr,Yn),it(tr,Xo);var er=Math.round(10*Math.random());function nr(t){return[t||"",er++].join("_")}function ir(t,e){return et(et({},t,!0),e,!0)}var or="ZH",rr="EN",ar=rr,sr={},lr={},ur=d.domSupported&&
/* eslint-disable-next-line */(document.documentElement.lang||navigator.language||navigator.browserLanguage||ar).toUpperCase().indexOf(or)>-1?or:ar;function cr(t,e){t=t.toUpperCase(),lr[t]=new tr(e),sr[t]=e}function dr(t){return lr[t]}cr(rr,{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:". "}}}}),cr(or,{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 hr=1e3,pr=6e4,fr=36e5,gr=864e5,yr=31536e6,mr={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}"},vr="{yyyy}-{MM}-{dd}",xr={year:"{yyyy}",month:"{yyyy}-{MM}",day:vr,hour:vr+" "+mr.hour,minute:vr+" "+mr.minute,second:vr+" "+mr.second,millisecond:mr.none},_r=["year","month","day","hour","minute","second","millisecond"],br=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Sr(t,e){return"0000".substr(0,e-(t+="").length)+t}function wr(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function Mr(t){return t===wr(t)}function Ir(t,e,n,i){var o=Ke(t),r=o[Cr(n)](),a=o[Ar(n)]()+1,s=Math.floor((a-1)/3)+1,l=o[Lr(n)](),u=o["get"+(n?"UTC":"")+"Day"](),c=o[kr(n)](),d=(c-1)%12+1,h=o[Pr(n)](),p=o[Nr(n)](),f=o[Or(n)](),g=c>=12?"pm":"am",y=g.toUpperCase(),m=(i instanceof tr?i:dr(i||ur)||lr[ar]).getModel("time"),v=m.get("month"),x=m.get("monthAbbr"),_=m.get("dayOfWeek"),b=m.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,g+"").replace(/{A}/g,y+"").replace(/{yyyy}/g,r+"").replace(/{yy}/g,Sr(r%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,v[a-1]).replace(/{MMM}/g,x[a-1]).replace(/{MM}/g,Sr(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,Sr(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,_[u]).replace(/{ee}/g,b[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Sr(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Sr(d+"",2)).replace(/{h}/g,d+"").replace(/{mm}/g,Sr(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,Sr(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,Sr(f,3)).replace(/{S}/g,f+"")}function Dr(t,e){var n=Ke(t),i=n[Ar(e)]()+1,o=n[Lr(e)](),r=n[kr(e)](),a=n[Pr(e)](),s=n[Nr(e)](),l=0===n[Or(e)](),u=l&&0===s,c=u&&0===a,d=c&&0===r,h=d&&1===o;return h&&1===i?"year":h?"month":d?"day":c?"hour":u?"minute":l?"second":"millisecond"}function Tr(t,e,n){var i=u(t)?Ke(t):t;switch(e=e||Dr(t,n)){case"year":return i[Cr(n)]();case"half-year":return i[Ar(n)]()>=6?1:0;case"quarter":return Math.floor((i[Ar(n)]()+1)/4);case"month":return i[Ar(n)]();case"day":return i[Lr(n)]();case"half-day":return i[kr(n)]()/24;case"hour":return i[kr(n)]();case"minute":return i[Pr(n)]();case"second":return i[Nr(n)]();case"millisecond":return i[Or(n)]()}}function Cr(t){return t?"getUTCFullYear":"getFullYear"}function Ar(t){return t?"getUTCMonth":"getMonth"}function Lr(t){return t?"getUTCDate":"getDate"}function kr(t){return t?"getUTCHours":"getHours"}function Pr(t){return t?"getUTCMinutes":"getMinutes"}function Nr(t){return t?"getUTCSeconds":"getSeconds"}function Or(t){return t?"getUTCMilliseconds":"getMilliseconds"}function Rr(t){return t?"setUTCFullYear":"setFullYear"}function Er(t){return t?"setUTCMonth":"setMonth"}function Vr(t){return t?"setUTCDate":"setDate"}function zr(t){return t?"setUTCHours":"setHours"}function Br(t){return t?"setUTCMinutes":"setMinutes"}function Gr(t){return t?"setUTCSeconds":"setSeconds"}function Fr(t){return t?"setUTCMilliseconds":"setMilliseconds"}function Wr(e){if(!nn(e))return t(e)?e:"-";var n=(e+"").split(".");return n[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(n.length>1?"."+n[1]:"")}function Hr(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var Yr=ot;function Ur(t,e,n){function i(t){return t&&tt(t)?t:"-"}function o(t){return!(null==t||isNaN(t)||!isFinite(t))}var r="time"===e,a=t instanceof Date;if(r||a){var s=r?Ke(t):t;if(!isNaN(+s))return Ir(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===e)return c(t)?i(t):u(t)&&o(t)?t+"":"-";var l=en(t);return o(l)?Wr(l):c(t)?i(t):"boolean"==typeof t?t+"":"-"}var Zr=["a","b","c","d","e","f","g"],Xr=function(t,e){return"{"+t+(null==e?"":e)+"}"};function jr(t,e,n){o(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],a=0;a<r.length;a++){var s=Zr[a];t=t.replace(Xr(s),Xr(s,0))}for(var l=0;l<i;l++)for(var u=0;u<r.length;u++){var c=e[l][r[u]];t=t.replace(Xr(Zr[u],l),n?rt(c):c)}return t}function qr(e,n){return n=n||"transparent",t(e)?e:r(e)&&e.colorStops&&(e.colorStops[0]||{}).color||n}function Kr(t,e){if("_blank"===e||"blank"===e){var n=window.open();n.opener=null,n.location.href=t}else window.open(t,e)}var Jr=s,$r=["left","right","top","bottom","width","height"],Qr=[["width","left","right"],["height","top","bottom"]];function ta(t,e,n,i,o){var r=0,a=0;null==i&&(i=Infinity),null==o&&(o=Infinity);var s=0;e.eachChild(function(l,u){var c,d,h=l.getBoundingRect(),p=e.childAt(u+1),f=p&&p.getBoundingRect();if("horizontal"===t){var g=h.width+(f?-f.x+h.x:0);(c=r+g)>i||l.newline?(r=0,c=g,a+=s+n,s=h.height):s=Math.max(s,h.height)}else{var y=h.height+(f?-f.y+h.y:0);(d=a+y)>o||l.newline?(r+=s+n,a=0,d=y,s=h.width):s=Math.max(s,h.width)}l.newline||(l.x=r,l.y=a,l.markRedraw(),"horizontal"===t?r=c+n:a=d+n)})}var ea=ta;function na(t,e,n){n=Yr(n||0);var i=e.width,o=e.height,r=Ge(t.left,i),a=Ge(t.top,o),s=Ge(t.right,i),l=Ge(t.bottom,o),u=Ge(t.width,i),c=Ge(t.height,o),d=n[2]+n[0],h=n[1]+n[3],p=t.aspect;switch(isNaN(u)&&(u=i-s-h-r),isNaN(c)&&(c=o-l-d-a),null!=p&&(isNaN(u)&&isNaN(c)&&(p>i/o?u=.8*i:c=.8*o),isNaN(u)&&(u=p*c),isNaN(c)&&(c=u/p)),isNaN(r)&&(r=i-s-u-h),isNaN(a)&&(a=o-l-c-d),t.left||t.right){case"center":r=i/2-u/2-n[3];break;case"right":r=i-u-h}switch(t.top||t.bottom){case"middle":case"center":a=o/2-c/2-n[0];break;case"bottom":a=o-c-d}r=r||0,a=a||0,isNaN(u)&&(u=i-h-r-(s||0)),isNaN(c)&&(c=o-d-a-(l||0));var f=new U(r+n[3],a+n[0],u,c);return f.margin=n,f}function ia(t,e,n,i,o,r){var a,s=!o||!o.hv||o.hv[0],l=!o||!o.hv||o.hv[1],u=o&&o.boundingMode||"all";if((r=r||t).x=t.x,r.y=t.y,!s&&!l)return!1;if("raw"===u)a="group"===t.type?new U(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(a=t.getBoundingRect(),t.needLocalTransform()){var c=t.getLocalTransform();(a=a.clone()).applyTransform(c)}var d=na(C({width:a.width,height:a.height},e),n,i),h=s?d.x-a.x:0,p=l?d.y-a.y:0;return"raw"===u?(r.x=h,r.y=p):(r.x+=h,r.y+=p),r===t&&t.markRedraw(),!0}function oa(t){var e=t.layoutMode||t.constructor.layoutMode;return r(e)?e:e?{type:e}:null}function ra(t,e,n){var i=n&&n.ignoreSize;!o(i)&&(i=[i,i]);var r=s(Qr[0],0),a=s(Qr[1],1);function s(n,o){var r={},a=0,s={},c=0;if(Jr(n,function(e){s[e]=t[e]}),Jr(n,function(t){l(e,t)&&(r[t]=s[t]=e[t]),u(r,t)&&a++,u(s,t)&&c++}),i[o])return u(e,n[1])?s[n[2]]=null:u(e,n[2])&&(s[n[1]]=null),s;if(2!==c&&a){if(a>=2)return r;for(var d=0;d<n.length;d++){var h=n[d];if(!l(r,h)&&l(t,h)){r[h]=t[h];break}}return r}return s}function l(t,e){return t.hasOwnProperty(e)}function u(t,e){return null!=t[e]&&"auto"!==t[e]}function c(t,e,n){Jr(t,function(t){e[t]=n[t]})}c(Qr[0],t,r),c(Qr[1],t,a)}function aa(t){return sa({},t)}function sa(t,e){return e&&t&&Jr($r,function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}at(ta,"vertical"),at(ta,"horizontal");var la=wn(),ua=
/** @class */function(t){function e(e,n,i){var o=t.call(this,e,n,i)||this;return o.uid=nr("ec_cpt_model"),o}var n;return h(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},e.prototype.mergeDefaultAndTheme=function(t,e){var n=oa(this),i=n?aa(t):{},o=e.getTheme();et(t,o.get(this.mainType)),et(t,this.getDefaultOption()),n&&ra(t,i,n)},e.prototype.mergeOption=function(t,e){et(this.option,t,!0);var n=oa(this);n&&ra(this.option,t,n)},e.prototype.optionUpdated=function(t,e){},e.prototype.getDefaultOption=function(){var t=this.constructor;if(!function(t){return!(!t||!t[On])}(t))return t.defaultOption;var e=la(this);if(!e.defaultOption){for(var n=[],i=t;i;){var o=i.prototype.defaultOption;o&&n.push(o),i=i.superClass}for(var r={},a=n.length-1;a>=0;a--)r=et(r,n[a],!0);e.defaultOption=r}return e.defaultOption},e.prototype.getReferringComponents=function(t,e){var n=t+"Index",i=t+"Id";return An(this.ecModel,t,{index:this.get(n,!0),id:this.get(i,!0)},e)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=((n=e.prototype).type="component",n.id="",n.name="",n.mainType="",n.subType="",void(n.componentIndex=0)),e}(tr);Vn(ua,tr),Fn(ua),function(t){var e={};t.registerSubTypeDefaulter=function(t,n){var i=Rn(t);e[i.main]=n},t.determineSubType=function(n,i){var o=i.type;if(!o){var r=Rn(n).main;t.hasSubTypes(n)&&e[r]&&(o=e[r](i))}return o}}(ua),function(t,e){function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicalTravel=function(t,i,o,r){if(t.length){var a=function(t){var i={},o=[];return s(t,function(r){var a=n(i,r),u=function(t,e){var n=[];return s(t,function(t){l(e,t)>=0&&n.push(t)}),n}(a.originalDeps=e(r),t);a.entryCount=u.length,0===a.entryCount&&o.push(r),s(u,function(t){l(a.predecessor,t)<0&&a.predecessor.push(t);var e=n(i,t);l(e.successor,t)<0&&e.successor.push(r)})}),{graph:i,noEntryList:o}}(i),u=a.graph,c=a.noEntryList,d={};for(s(t,function(t){d[t]=!0});c.length;){var h=c.pop(),p=u[h],f=!!d[h];f&&(o.call(r,h,p.originalDeps.slice()),delete d[h]),s(p.successor,f?y:g)}s(d,function(){throw new Error("")})}function g(t){u[t].entryCount--,0===u[t].entryCount&&c.push(t)}function y(t){d[t]=!0,g(t)}}}(ua,function(t){var e=[];s(ua.getClassesByMainType(t),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=n(e,function(t){return Rn(t).main}),"dataset"!==t&&l(e,"dataset")<=0&&e.unshift("dataset");return e});var ca="";"undefined"!=typeof navigator&&(ca=navigator.platform||"");var da="rgba(0, 0, 0, 0.2)";const ha={darkMode:"auto",
// backgroundColor: 'rgba(0,0,0,0)',
colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:da,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:da,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:da,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:da,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:da,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:da,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},
// If xAxis and yAxis declared, grid is created by default.
// grid: {},
textStyle:{
// color: '#000',
// decoration: 'none',
// PENDING
fontFamily:ca.match(/^Win/)?"Microsoft YaHei":"sans-serif",
// fontFamily: 'Arial, Verdana, sans-serif',
fontSize:12,fontStyle:"normal",fontWeight:"normal"},
// http://blogs.adobe.com/webplatform/2014/02/24/using-blend-modes-in-html-canvas/
// https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation
// Default is source-over
blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,
// Configuration for progressive/incremental rendering
progressiveThreshold:3e3,progressive:400,
// Threshold of if use single hover layer to optimize.
// It is recommended that `hoverLayerThreshold` is equivalent to or less than
// `progressiveThreshold`, otherwise hover will cause restart of progressive,
// which is unexpected.
// see example <echarts/test/heatmap-large.html>.
hoverLayerThreshold:3e3,
// See: module:echarts/scale/Time
useUTC:!1};var pa=a(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),fa="original",ga="arrayRows",ya="objectRows",ma="keyedColumns",va="typedArray",xa="unknown",_a="column",ba="row",Sa=1,wa=2,Ma=3,Ia=wn();function Da(t,e,n){var i={},o=Ca(e);if(!o||!t)return i;var a,l,u=[],c=[],d=e.ecModel,h=Ia(d).datasetMap,p=o.uid+"_"+n.seriesLayoutBy;t=t.slice(),s(t,function(e,n){var o=r(e)?e:t[n]={name:e};"ordinal"===o.type&&null==a&&(a=n,l=y(o)),i[o.name]=[]});var f=h.get(p)||h.set(p,{categoryWayDim:l,valueWayDim:0});function g(t,e,n){for(var i=0;i<n;i++)t.push(e+i)}function y(t){var e=t.dimsDef;return e?e.length:1}return s(t,function(t,e){var n=t.name,o=y(t);if(null==a){var r=f.valueWayDim;g(i[n],r,o),g(c,r,o),f.valueWayDim+=o}else if(a===e)g(i[n],0,o),g(u,0,o);else{r=f.categoryWayDim;g(i[n],r,o),g(c,r,o),f.categoryWayDim+=o}}),u.length&&(i.itemName=u),c.length&&(i.seriesName=c),i}function Ta(t,e,n){var i={};if(!Ca(t))return i;var o,a=e.sourceFormat,l=e.dimensionsDefine;a!==ya&&a!==ma||s(l,function(t,e){"name"===(r(t)?t.name:t)&&(o=e)});var u=function(){for(var t={},i={},r=[],s=0,u=Math.min(5,n);s<u;s++){var c=La(e.data,a,e.seriesLayoutBy,l,e.startIndex,s);r.push(c);var d=c===Ma;if(d&&null==t.v&&s!==o&&(t.v=s),(null==t.n||t.n===t.v||!d&&r[t.n]===Ma)&&(t.n=s),h(t)&&r[t.n]!==Ma)return t;d||(c===wa&&null==i.v&&s!==o&&(i.v=s),null!=i.n&&i.n!==i.v||(i.n=s))}function h(t){return null!=t.v&&null!=t.n}return h(t)?t:h(i)?i:null}();if(u){i.value=[u.v];var c=null!=o?o:u.n;i.itemName=[c],i.seriesName=[c]}return i}function Ca(t){if(!t.get("data",!0))return An(t.ecModel,"dataset",{index:t.get("datasetIndex",!0),id:t.get("datasetId",!0)},Tn).models[0]}function Aa(t,e){return La(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function La(e,n,i,a,s,l){var u,c,d;if(st(e))return Ma;if(a){var h=a[l];r(h)?(c=h.name,d=h.type):t(h)&&(c=h)}if(null!=d)return"ordinal"===d?Sa:Ma;if(n===ga){var p=e;if(i===ba){for(var f=p[l],g=0;g<(f||[]).length&&g<5;g++)if(null!=(u=b(f[s+g])))return u}else for(g=0;g<p.length&&g<5;g++){var y=p[s+g];if(y&&null!=(u=b(y[l])))return u}}else if(n===ya){var m=e;if(!c)return Ma;for(g=0;g<m.length&&g<5;g++){if((x=m[g])&&null!=(u=b(x[c])))return u}}else if(n===ma){if(!c)return Ma;if(!(f=e[c])||st(f))return Ma;for(g=0;g<f.length&&g<5;g++)if(null!=(u=b(f[g])))return u}else if(n===fa){var v=e;for(g=0;g<v.length&&g<5;g++){var x,_=fn(x=v[g]);if(!o(_))return Ma;if(null!=(u=b(_[l])))return u}}function b(e){var n=t(e);return null!=e&&Number.isFinite(Number(e))&&""!==e?n?wa:Ma:n&&"-"!==e?Sa:void 0}return Ma}var ka=a();var Pa,Na,Oa,Ra=wn(),Ea=wn(),Va=
/** @class */function(){function t(){}return t.prototype.getColorFromPalette=function(t,e,n){var i=dn(this.get("color",!0)),o=this.get("colorLayer",!0);return Ba(this,Ra,i,o,t,e,n)},t.prototype.clearColorPalette=function(){var t,e;(e=Ra)(t=this).paletteIdx=0,e(t).paletteNameMap={}},t}();function za(t,e,n,i){var o=dn(t.get(["aria","decal","decals"]));return Ba(t,Ea,o,null,e,n,i)}function Ba(t,e,n,i,o,r,a){var s=e(r=r||t),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(o))return u[o];var c=null!=a&&i?function(t,e){for(var n=t.length,i=0;i<n;i++)if(t[i].length>e)return t[i];return t[n-1]}(i,a):n;if((c=c||n)&&c.length){var d=c[l];return o&&(u[o]=d),s.paletteIdx=(l+1)%c.length,d}}var Ga="\0_ec_inner",Fa=
/** @class */function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return h(n,e),n.prototype.init=function(t,e,n,i,o,r){i=i||{},this.option=null,this._theme=new tr(i),this._locale=new tr(o),this._optionManager=r},n.prototype.setOption=function(t,e,n){var i=Ya(e);this._optionManager.setOption(t,n,i),this._resetOption(null,i)},n.prototype.resetOption=function(t,e){return this._resetOption(t,Ya(e))},n.prototype._resetOption=function(t,e){var n=!1,i=this._optionManager;if(!t||"recreate"===t){var o=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(o,e)):Oa(this,o),n=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var r=i.getTimelineOption(this);r&&(n=!0,this._mergeOption(r,e))}if(!t||"recreate"===t||"media"===t){var a=i.getMediaOption(this);a.length&&s(a,function(t){n=!0,this._mergeOption(t,e)},this)}return n},n.prototype.mergeOption=function(t){this._mergeOption(t,null)},n.prototype._mergeOption=function(t,e){var n=this.option,i=this._componentsMap,o=this._componentsCount,l=[],u=a(),c=e&&e.replaceMergeMainTypeMap;Ia(this).datasetMap=a(),s(t,function(t,e){null!=t&&(ua.hasClass(e)?e&&(l.push(e),u.set(e,!0)):n[e]=null==n[e]?nt(t):et(n[e],t,!0))}),c&&c.each(function(t,e){ua.hasClass(e)&&!u.get(e)&&(l.push(e),u.set(e,!0))}),ua.topologicalTravel(l,ua.getAllClassMainTypes(),function(e){var a=function(t,e,n){var i=ka.get(e);if(!i)return n;var o=i(t);return o?n.concat(o):n}(this,e,dn(t[e])),l=i.get(e),u=
// `!oldCmptList` means init. See the comment in `mappingToExists`
l?c&&c.get(e)?"replaceMerge":"normalMerge":"replaceAll",d=yn(l,a,u);(function(t,e,n){s(t,function(t){var i=t.newOption;r(i)&&(t.keyInfo.mainType=e,t.keyInfo.subType=function(t,e,n,i){return e.type?e.type:n?n.subType:i.determineSubType(t,e)}(e,i,t.existing,n))})})(d,e,ua),n[e]=null,i.set(e,null),o.set(e,0);var h,p=[],g=[],y=0;s(d,function(t,n){var i=t.existing,o=t.newOption;if(o){var r="series"===e,a=ua.getClass(e,t.keyInfo.subType,!r);if(!a)return;if("tooltip"===e){if(h)return;h=!0}if(i&&i.constructor===a)i.name=t.keyInfo.name,i.mergeOption(o,this),i.optionUpdated(o,!1);else{var s=f({componentIndex:n},t.keyInfo);i=new a(o,this,this,s),f(i,s),t.brandNew&&(i.__requireNewView=!0),i.init(o,this,this),i.optionUpdated(null,!0)}}else i&&(i.mergeOption({},this),i.optionUpdated({},!1));i?(p.push(i.option),g.push(i),y++):(p.push(void 0),g.push(void 0))},this),n[e]=p,i.set(e,g),o.set(e,y),"series"===e&&Pa(this)},this),this._seriesIndices||Pa(this)},n.prototype.getOption=function(){var t=nt(this.option);return s(t,function(e,n){if(ua.hasClass(n)){for(var i=dn(e),o=i.length,r=!1,a=o-1;a>=0;a--)i[a]&&!bn(i[a])?r=!0:(i[a]=null,!r&&o--);i.length=o,t[n]=i}}),delete t[Ga],t},n.prototype.getTheme=function(){return this._theme},n.prototype.getLocaleModel=function(){return this._locale},n.prototype.setUpdatePayload=function(t){this._payload=t},n.prototype.getUpdatePayload=function(){return this._payload},n.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){var i=n[e||0];if(i)return i;if(null==e)for(var o=0;o<n.length;o++)if(n[o])return n[o]}},n.prototype.queryComponents=function(t){var e=t.mainType;if(!e)return[];var n,i=t.index,o=t.id,r=t.name,a=this._componentsMap.get(e);return a&&a.length?(null!=i?(n=[],s(dn(i),function(t){a[t]&&n.push(a[t])})):n=null!=o?Wa("id",o,a):null!=r?Wa("name",r,a):lt(a,function(t){return!!t}),Ha(n,t)):[]},n.prototype.findComponents=function(t){var e,n,i,o,r,a=t.query,s=t.mainType,l=(n=s+"Index",i=s+"Id",o=s+"Name",!(e=a)||null==e[n]&&null==e[i]&&null==e[o]?null:{mainType:s,
// subType will be filtered finally.
index:e[n],id:e[i],name:e[o]}),u=l?this.queryComponents(l):lt(this._componentsMap.get(s),function(t){return!!t});return r=Ha(u,t),t.filter?lt(r,t.filter):r},n.prototype.eachComponent=function(e,n,i){var o=this._componentsMap;if(g(e)){var a=n,s=e;o.each(function(t,e){for(var n=0;t&&n<t.length;n++){var i=t[n];i&&s.call(a,e,i,i.componentIndex)}})}else for(var l=t(e)?o.get(e):r(e)?this.findComponents(e):null,u=0;l&&u<l.length;u++){var c=l[u];c&&n.call(i,c,c.componentIndex)}},n.prototype.getSeriesByName=function(t){var e=xn(t,null);return lt(this._componentsMap.get("series"),function(t){return!!t&&null!=e&&t.name===e})},n.prototype.getSeriesByIndex=function(t){return this._componentsMap.get("series")[t]},n.prototype.getSeriesByType=function(t){return lt(this._componentsMap.get("series"),function(e){return!!e&&e.subType===t})},n.prototype.getSeries=function(){return lt(this._componentsMap.get("series"),function(t){return!!t})},n.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},n.prototype.eachSeries=function(t,e){Na(this),s(this._seriesIndices,function(n){var i=this._componentsMap.get("series")[n];t.call(e,i,n)},this)},n.prototype.eachRawSeries=function(t,e){s(this._componentsMap.get("series"),function(n){n&&t.call(e,n,n.componentIndex)})},n.prototype.eachSeriesByType=function(t,e,n){Na(this),s(this._seriesIndices,function(i){var o=this._componentsMap.get("series")[i];o.subType===t&&e.call(n,o,i)},this)},n.prototype.eachRawSeriesByType=function(t,e,n){return s(this.getSeriesByType(t),e,n)},n.prototype.isSeriesFiltered=function(t){return Na(this),null==this._seriesIndicesMap.get(t.componentIndex)},n.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},n.prototype.filterSeries=function(t,e){Na(this);var n=[];s(this._seriesIndices,function(i){var o=this._componentsMap.get("series")[i];t.call(e,o,i)&&n.push(i)},this),this._seriesIndices=n,this._seriesIndicesMap=a(n)},n.prototype.restoreData=function(t){Pa(this);var e=this._componentsMap,n=[];e.each(function(t,e){ua.hasClass(e)&&n.push(e)}),ua.topologicalTravel(n,ua.getAllClassMainTypes(),function(n){s(e.get(n),function(e){!e||"series"===n&&function(t,e){if(e){var n=e.seriesIndex,i=e.seriesId,o=e.seriesName;return null!=n&&t.componentIndex!==n||null!=i&&t.id!==i||null!=o&&t.name!==o}}(e,t)||e.restoreData()})})},n.internalField=(Pa=function(t){var e=t._seriesIndices=[];s(t._componentsMap.get("series"),function(t){t&&e.push(t.componentIndex)}),t._seriesIndicesMap=a(e)},Na=function(t){},void(Oa=function(t,e){t.option={},t.option[Ga]=1,t._componentsMap=a({series:[]}),t._componentsCount=a();var n,i,o,l=e.aria;r(l)&&null==l.enabled&&(l.enabled=!0),n=e,i=t._theme.option,o=n.color&&!n.colorLayer,s(i,function(t,e){"colorLayer"===e&&o||ua.hasClass(e)||("object"==typeof t?n[e]=n[e]?et(n[e],t,!1):nt(t):null==n[e]&&(n[e]=t))}),et(e,ha,!1),t._mergeOption(e,null)})),n}(tr);function Wa(t,e,n){if(o(e)){var i=a();return s(e,function(t){null!=t&&(null!=xn(t,null)&&i.set(t,!0))}),lt(n,function(e){return e&&i.get(e[t])})}var r=xn(e,null);return lt(n,function(e){return e&&null!=r&&e[t]===r})}function Ha(t,e){return e.hasOwnProperty("subType")?lt(t,function(t){return t&&t.subType===e.subType}):t}function Ya(t){var e=a();return t&&s(dn(t.replaceMerge),function(t){e.set(t,!0)}),{replaceMergeMainTypeMap:e}}it(Fa,Va);var Ua=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL",
// 'getModel',
"getOption",
// 'getViewOfComponentModel',
// 'getViewOfSeriesModel',
"getId","updateLabelLayout"],Za=
/** @class */
function(){return function(t){s(Ua,function(e){this[e]=ut(t[e],t)},this)}}(),Xa={},ja=
/** @class */function(){function t(){this._coordinateSystems=[]}return t.prototype.create=function(t,e){var n=[];s(Xa,function(i,o){var r=i.create(t,e);n=n.concat(r||[])}),this._coordinateSystems=n},t.prototype.update=function(t,e){s(this._coordinateSystems,function(n){n.update&&n.update(t,e)})},t.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},t.register=function(t,e){Xa[t]=e},t.get=function(t){return Xa[t]},t}(),qa=/^(min|max)?(.+)$/,Ka=
/** @class */function(){function t(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}return t.prototype.setOption=function(t,e,n){t&&(s(dn(t.series),function(t){t&&t.data&&st(t.data)&&ct(t.data)}),s(dn(t.dataset),function(t){t&&t.source&&st(t.source)&&ct(t.source)})),t=nt(t);var i=this._optionBackup,r=function(t,e,n){var i,r,a=[],l=t.baseOption,u=t.timeline,c=t.options,d=t.media,h=!!t.media,p=!!(c||u||l&&l.timeline);l?(r=l).timeline||(r.timeline=u):((p||h)&&(t.options=t.media=null),r=t);h&&o(d)&&s(d,function(t){t&&t.option&&(t.query?a.push(t):i||(i=t))});function f(t){s(e,function(e){e(t,n)})}return f(r),s(c,function(t){return f(t)}),s(a,function(t){return f(t.option)}),{baseOption:r,timelineOptions:c||[],mediaDefault:i,mediaList:a}}(t,e,!i);this._newBaseOption=r.baseOption,i?(r.timelineOptions.length&&(i.timelineOptions=r.timelineOptions),r.mediaList.length&&(i.mediaList=r.mediaList),r.mediaDefault&&(i.mediaDefault=r.mediaDefault)):this._optionBackup=r},t.prototype.mountOption=function(t){var e=this._optionBackup;return this._timelineOptions=e.timelineOptions,this._mediaList=e.mediaList,this._mediaDefault=e.mediaDefault,this._currentMediaIndices=[],nt(t?e.baseOption:this._newBaseOption)},t.prototype.getTimelineOption=function(t){var e,n=this._timelineOptions;if(n.length){var i=t.getComponent("timeline");i&&(e=nt(
// FIXME:TS as TimelineModel or quivlant interface
n[i.getCurrentIndex()]))}return e},t.prototype.getMediaOption=function(t){var e,i,o=this._api.getWidth(),r=this._api.getHeight(),a=this._mediaList,s=this._mediaDefault,l=[],u=[];if(!a.length&&!s)return u;for(var c=0,d=a.length;c<d;c++)Ja(a[c].query,o,r)&&l.push(c);return!l.length&&s&&(l=[-1]),l.length&&(e=l,i=this._currentMediaIndices,e.join(",")!==i.join(","))&&(u=n(l,function(t){return nt(-1===t?s.option:a[t].option)})),this._currentMediaIndices=l,u},t}();function Ja(t,e,n){var i={width:e,height:n,aspectratio:e/n},o=!0;return s(t,function(t,e){var n=e.match(qa);if(n&&n[1]&&n[2]){var r=n[1],a=n[2].toLowerCase();(function(t,e,n){return"min"===n?t>=e:"max"===n?t<=e:t===e})(i[a],t,r)||(o=!1)}}),o}var $a=s,Qa=r,ts=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function es(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=ts.length;n<i;n++){var o=ts[n],r=e.normal,a=e.emphasis;r&&r[o]&&(t[o]=t[o]||{},t[o].normal?et(t[o].normal,r[o]):t[o].normal=r[o],r[o]=null),a&&a[o]&&(t[o]=t[o]||{},t[o].emphasis?et(t[o].emphasis,a[o]):t[o].emphasis=a[o],a[o]=null)}}function ns(t,e,n){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var i=t[e].normal,o=t[e].emphasis;i&&(n?(t[e].normal=t[e].emphasis=null,C(t[e],i)):t[e]=i),o&&(t.emphasis=t.emphasis||{},t.emphasis[e]=o,o.focus&&(t.emphasis.focus=o.focus),o.blurScope&&(t.emphasis.blurScope=o.blurScope))}}function is(t){ns(t,"itemStyle"),ns(t,"lineStyle"),ns(t,"areaStyle"),ns(t,"label"),ns(t,"labelLine"),ns(t,"upperLabel"),ns(t,"edgeLabel")}function os(t,e){var n=Qa(t)&&t[e],i=Qa(n)&&n.textStyle;if(i)for(var o=0,r=pn.length;o<r;o++){var a=pn[o];i.hasOwnProperty(a)&&(n[a]=i[a])}}function rs(t){t&&(is(t),os(t,"label"),t.emphasis&&os(t.emphasis,"label"))}function as(t){return o(t)?t:t?[t]:[]}function ss(t){return(o(t)?t[0]:t)||{}}function ls(t,e){$a(as(t.series),function(t){Qa(t)&&function(t){if(Qa(t)){es(t),is(t),os(t,"label"),os(t,"upperLabel"),os(t,"edgeLabel"),t.emphasis&&(os(t.emphasis,"label"),os(t.emphasis,"upperLabel"),os(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(es(e),rs(e));var n=t.markLine;n&&(es(n),rs(n));var i=t.markArea;i&&rs(i);var r=t.data;if("graph"===t.type){r=r||t.nodes;var a=t.links||t.edges;if(a&&!st(a))for(var l=0;l<a.length;l++)rs(a[l]);s(t.categories,function(t){is(t)})}if(r&&!st(r))for(l=0;l<r.length;l++)rs(r[l]);if((e=t.markPoint)&&e.data){var u=e.data;for(l=0;l<u.length;l++)rs(u[l])}if((n=t.markLine)&&n.data){var c=n.data;for(l=0;l<c.length;l++)o(c[l])?(rs(c[l][0]),rs(c[l][1])):rs(c[l])}"gauge"===t.type?(os(t,"axisLabel"),os(t,"title"),os(t,"detail")):"treemap"===t.type?(ns(t.breadcrumb,"itemStyle"),s(t.levels,function(t){is(t)})):"tree"===t.type&&is(t.leaves)}}(t)});var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),$a(n,function(e){$a(as(t[e]),function(t){t&&(os(t,"axisLabel"),os(t.axisPointer,"label"))})}),$a(as(t.parallel),function(t){var e=t&&t.parallelAxisDefault;os(e,"axisLabel"),os(e&&e.axisPointer,"label")}),$a(as(t.calendar),function(t){ns(t,"itemStyle"),os(t,"dayLabel"),os(t,"monthLabel"),os(t,"yearLabel")}),$a(as(t.radar),function(t){os(t,"name"),t.name&&null==t.axisName&&(t.axisName=t.name,delete t.name),null!=t.nameGap&&null==t.axisNameGap&&(t.axisNameGap=t.nameGap,delete t.nameGap)}),$a(as(t.geo),function(t){Qa(t)&&(rs(t),$a(as(t.regions),function(t){rs(t)}))}),$a(as(t.timeline),function(t){rs(t),ns(t,"label"),ns(t,"itemStyle"),ns(t,"controlStyle",!0);var e=t.data;o(e)&&s(e,function(t){r(t)&&(ns(t,"label"),ns(t,"itemStyle"))})}),$a(as(t.toolbox),function(t){ns(t,"iconStyle"),$a(t.feature,function(t){ns(t,"iconStyle")})}),os(ss(t.axisPointer),"label"),os(ss(t.tooltip).axisPointer,"label")}function us(t){t&&s(cs,function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])})}var cs=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],ds=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],hs=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function ps(t){var e=t&&t.itemStyle;if(e)for(var n=0;n<hs.length;n++){var i=hs[n][1],o=hs[n][0];null!=e[i]&&(e[o]=e[i])}}function fs(t){t&&"edge"===t.alignTo&&null!=t.margin&&null==t.edgeDistance&&(t.edgeDistance=t.margin)}function gs(t){t&&t.downplay&&!t.blur&&(t.blur=t.downplay)}function ys(t,e){if(t)for(var n=0;n<t.length;n++)e(t[n]),t[n]&&ys(t[n].children,e)}function ms(t,e){ls(t,e),t.series=dn(t.series),s(t.series,function(t){if(r(t)){var e=t.type;if("line"===e)null!=t.clipOverflow&&(t.clip=t.clipOverflow);else if("pie"===e||"gauge"===e){if(null!=t.clockWise&&(t.clockwise=t.clockWise),fs(t.label),(o=t.data)&&!st(o))for(var n=0;n<o.length;n++)fs(o[n]);null!=t.hoverOffset&&(t.emphasis=t.emphasis||{},(t.emphasis.scaleSize=null)&&(t.emphasis.scaleSize=t.hoverOffset))}else if("gauge"===e){var i=function(t,e){for(var n=e.split(","),i=t,o=0;o<n.length&&null!=(i=i&&i[n[o]]);o++);return i}(t,"pointer.color");null!=i&&function(t,e,n){for(var i,o=e.split(","),r=t,a=0;a<o.length-1;a++)null==r[i=o[a]]&&(r[i]={}),r=r[i];null==r[o[a]]&&(r[o[a]]=n)}(t,"itemStyle.color",i)}else if("bar"===e){var o;if(ps(t),ps(t.backgroundStyle),ps(t.emphasis),(o=t.data)&&!st(o))for(n=0;n<o.length;n++)"object"==typeof o[n]&&(ps(o[n]),ps(o[n]&&o[n].emphasis))}else if("sunburst"===e){var a=t.highlightPolicy;a&&(t.emphasis=t.emphasis||{},t.emphasis.focus||(t.emphasis.focus=a)),gs(t),ys(t.data,gs)}else"graph"===e||"sankey"===e?function(t){t&&null!=t.focusNodeAdjacency&&(t.emphasis=t.emphasis||{},null==t.emphasis.focus&&(t.emphasis.focus="adjacency"))}(t):"map"===e&&(t.mapType&&!t.map&&(t.map=t.mapType),t.mapLocation&&C(t,t.mapLocation));null!=t.hoverAnimation&&(t.emphasis=t.emphasis||{},t.emphasis&&null==t.emphasis.scale&&(t.emphasis.scale=t.hoverAnimation)),us(t)}}),t.dataRange&&(t.visualMap=t.dataRange),s(ds,function(e){var n=t[e];n&&(o(n)||(n=[n]),s(n,function(t){us(t)}))})}function vs(t){s(t,function(e,n){var i=[],o=[NaN,NaN],r=[e.stackResultDimension,e.stackedOverDimension],a=e.data,s=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";a.modify(r,function(r,u,c){var d,h,p=a.get(e.stackedDimension,c);if(isNaN(p))return o;s?h=a.getRawIndex(c):d=a.get(e.stackedByDimension,c);for(var f=NaN,g=n-1;g>=0;g--){var y=t[g];if(s||(h=y.data.rawIndexOf(y.stackedByDimension,d)),h>=0){var m=y.data.getByRawIndex(y.stackResultDimension,h);if("all"===l||"positive"===l&&m>0||"negative"===l&&m<0||"samesign"===l&&p>=0&&m>0||"samesign"===l&&p<=0&&m<0){p=Ue(p,m),f=m;break}}}return i[0]=p,i[1]=f,i})})}var xs,_s,bs,Ss,ws,Ms=
/** @class */
function(){return function(t){this.data=t.data||(t.sourceFormat===ma?{}:[]),this.sourceFormat=t.sourceFormat||xa,this.seriesLayoutBy=t.seriesLayoutBy||_a,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var n=0;n<e.length;n++){var i=e[n];null==i.type&&Aa(this,n)===Sa&&(i.type="ordinal")}}}();function Is(t){return t instanceof Ms}function Ds(e,n,i){i=i||Cs(e);var r=n.seriesLayoutBy,a=function(e,n,i,r,a){var l,c;if(!e)return{dimensionsDefine:As(a),startIndex:c,dimensionsDetectedCount:l};if(n===ga){var d=e;"auto"===r||null==r?Ls(function(e){null!=e&&"-"!==e&&(t(e)?null==c&&(c=1):c=0)},i,d,10):c=u(r)?r:r?1:0,a||1!==c||(a=[],Ls(function(t,e){a[e]=null!=t?t+"":""},i,d,Infinity)),l=a?a.length:i===ba?d.length:d[0]?d[0].length:null}else if(n===ya)a||(a=function(t){var e,n=0;for(;n<t.length&&!(e=t[n++]););if(e)return x(e)}(e));else if(n===ma)a||(a=[],s(e,function(t,e){a.push(e)}));else if(n===fa){var h=fn(e[0]);l=o(h)&&h.length||1}return{startIndex:c,dimensionsDefine:As(a),dimensionsDetectedCount:l}}(e,i,r,n.sourceHeader,n.dimensions);return new Ms({data:e,sourceFormat:i,seriesLayoutBy:r,dimensionsDefine:a.dimensionsDefine,startIndex:a.startIndex,dimensionsDetectedCount:a.dimensionsDetectedCount,metaRawOption:nt(n)})}function Ts(t){return new Ms({data:t,sourceFormat:st(t)?va:fa})}function Cs(t){var e=xa;if(st(t))e=va;else if(o(t)){0===t.length&&(e=ga);for(var n=0,i=t.length;n<i;n++){var a=t[n];if(null!=a){if(o(a)||st(a)){e=ga;break}if(r(a)){e=ya;break}}}}else if(r(t))for(var s in t)if(k(t,s)&&v(t[s])){e=ma;break}return e}function As(t){if(t){var e=a();return n(t,function(t,n){var i={name:(t=r(t)?t:{name:t}).name,displayName:t.displayName,type:t.type};if(null==i.name)return i;i.name+="",null==i.displayName&&(i.displayName=i.name);var o=e.get(i.name);return o?i.name+="-"+o.count++:e.set(i.name,{count:1}),i})}}function Ls(t,e,n,i){if(e===ba)for(var o=0;o<n.length&&o<i;o++)t(n[o]?n[o][0]:null,o);else{var r=n[0]||[];for(o=0;o<r.length&&o<i;o++)t(r[o],o)}}function ks(t){var e=t.sourceFormat;return e===ya||e===ma}var Ps=
/** @class */function(){function t(t,e){var n=Is(t)?t:Ts(t);this._source=n;var i=this._data=n.data;n.sourceFormat===va&&(this._offset=0,this._dimSize=e,this._data=i),ws(this,i,n)}var e;return t.prototype.getSource=function(){return this._source},t.prototype.count=function(){return 0},t.prototype.getItem=function(t,e){},t.prototype.appendData=function(t){},t.prototype.clean=function(){},t.protoInitialize=((e=t.prototype).pure=!1,void(e.persistent=!0)),t.internalField=function(){var t;ws=function(t,o,r){var a=r.sourceFormat,s=r.seriesLayoutBy,l=r.startIndex,u=r.dimensionsDefine,c=Ss[Ws(a,s)];if(f(t,c),a===va)t.getItem=e,t.count=i,t.fillStorage=n;else{var d=Rs(a,s);t.getItem=ut(d,null,o,l,u);var h=zs(a,s);t.count=ut(h,null,o,l,u)}};var e=function(t,e){t-=this._offset,e=e||[];for(var n=this._data,i=this._dimSize,o=i*t,r=0;r<i;r++)e[r]=n[o+r];return e},n=function(t,e,n,i){for(var o=this._data,r=this._dimSize,a=0;a<r;a++){for(var s=i[a],l=null==s[0]?Infinity:s[0],u=null==s[1]?-Infinity:s[1],c=e-t,d=n[a],h=0;h<c;h++){var p=o[h*r+a];d[t+h]=p,p<l&&(l=p),p>u&&(u=p)}s[0]=l,s[1]=u}},i=function(){return this._data?this._data.length/this._dimSize:0};function o(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}(t={})[ga+"_"+_a]={pure:!0,appendData:o},t[ga+"_"+ba]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[ya]={pure:!0,appendData:o},t[ma]={pure:!0,appendData:function(t){var e=this._data;s(t,function(t,n){for(var i=e[n]||(e[n]=[]),o=0;o<(t||[]).length;o++)i.push(t[o])})}},t[fa]={appendData:o},t[va]={persistent:!1,pure:!0,appendData:function(t){this._data=t},
// Clean self if data is already used.
clean:function(){this._offset+=this.count(),this._data=null}},Ss=t}(),t}(),Ns=function(t,e,n,i){return t[i]},Os=((xs={})[ga+"_"+_a]=function(t,e,n,i){return t[i+e]},xs[ga+"_"+ba]=function(t,e,n,i,o){i+=e;for(var r=o||[],a=t,s=0;s<a.length;s++){var l=a[s];r[s]=l?l[i]:null}return r},xs[ya]=Ns,xs[ma]=function(t,e,n,i,o){for(var r=o||[],a=0;a<n.length;a++){var s=t[n[a].name];r[a]=s?s[i]:null}return r},xs[fa]=Ns,xs);function Rs(t,e){return Os[Ws(t,e)]}var Es=function(t,e,n){return t.length},Vs=((_s={})[ga+"_"+_a]=function(t,e,n){return Math.max(0,t.length-e)},_s[ga+"_"+ba]=function(t,e,n){var i=t[0];return i?Math.max(0,i.length-e):0},_s[ya]=Es,_s[ma]=function(t,e,n){var i=t[n[0].name];return i?i.length:0},_s[fa]=Es,_s);function zs(t,e){return Vs[Ws(t,e)]}var Bs=function(t,e,n){return t[e]},Gs=((bs={})[ga]=Bs,bs[ya]=function(t,e,n){return t[n]},bs[ma]=Bs,bs[fa]=function(t,e,n){var i=fn(t);return i instanceof Array?i[e]:i},bs[va]=Bs,bs);function Fs(t){return Gs[t]}function Ws(t,e){return t===ga?t+"_"+e:t}function Hs(t,e,n){if(t){var i=t.getRawDataItem(e);if(null!=i){var o=t.getStore(),r=o.getSource().sourceFormat;if(null!=n){var a=t.getDimensionIndex(n),s=o.getDimensionProperty(a);return Fs(r)(i,a,s)}var l=i;return r===fa&&(l=fn(i)),l}}}var Ys=/\{@(.+?)\}/g,Us=
/** @class */function(){function e(){}return e.prototype.getDataParams=function(t,e){var n=this.getData(e),i=this.getRawValue(t,e),o=n.getRawIndex(t),r=n.getName(t),a=n.getRawDataItem(t),s=n.getItemVisual(t,"style"),l=s&&s[n.getItemVisual(t,"drawType")||"fill"],u=s&&s.stroke,c=this.mainType,d="series"===c,h=n.userOutput&&n.userOutput.get();return{componentType:c,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:r,dataIndex:o,data:a,dataType:e,value:i,color:l,borderColor:u,dimensionNames:h?h.fullDimensions:null,encode:h?h.encode:null,
// Param name list for mapping `a`, `b`, `c`, `d`, `e`
$vars:["seriesName","name","value"]}},e.prototype.getFormattedLabel=function(e,n,i,r,a,s){n=n||"normal";var l=this.getData(i),u=this.getDataParams(e,i);(s&&(u.value=s.interpolatedValue),null!=r&&o(u.value)&&(u.value=u.value[r]),a)||(a=l.getItemModel(e).get("normal"===n?["label","formatter"]:[n,"label","formatter"]));return g(a)?(u.status=n,u.dimensionIndex=r,a(u)):t(a)?jr(a,u).replace(Ys,function(t,n){var i=n.length,r=n;"["===r.charAt(0)&&"]"===r.charAt(i-1)&&(r=+r.slice(1,i-1));var a=Hs(l,e,r);if(s&&o(s.interpolatedValue)){var u=l.getDimensionIndex(r);u>=0&&(a=s.interpolatedValue[u])}return null!=a?a+"":""}):void 0},e.prototype.getRawValue=function(t,e){return Hs(this.getData(e),t)},e.prototype.formatTooltip=function(t,e,n){},e}();function Zs(t){var e,n;return r(t)?t.type&&(n=t):e=t,{text:e,
// markers: markers || markersExisting,
frag:n}}function Xs(t){return new js(t)}var js=
/** @class */function(){function t(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return t.prototype.perform=function(t){var e,n=this._upstream,i=t&&t.skip;if(this._dirty&&n){var r=this.context;r.data=r.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!i&&(e=this._plan(this.context));var a,s=d(this._modBy),l=this._modDataCount||0,u=d(t&&t.modBy),c=t&&t.modDataCount||0;function d(t){return!(t>=1)&&(t=1),t}s===u&&l===c||(e="reset"),(this._dirty||"reset"===e)&&(this._dirty=!1,a=this._doReset(i)),this._modBy=u,this._modDataCount=c;var h=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):Infinity,this._progress){var p=this._dueIndex,f=Math.min(null!=h?this._dueIndex+h:Infinity,this._dueEnd);if(!i&&(a||p<f)){var g=this._progress;if(o(g))for(var y=0;y<g.length;y++)this._doProgress(g[y],p,f,u,c);else this._doProgress(g,p,f,u,c)}this._dueIndex=f;var m=null!=this._settedOutputEnd?this._settedOutputEnd:f;this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},t.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},t.prototype._doProgress=function(t,e,n,i,o){qs.reset(e,n,i,o),this._callingProgress=t,this._callingProgress({start:e,end:n,count:n-e,next:qs.next},this.context)},t.prototype._doReset=function(t){var e,n;this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null,!t&&this._reset&&((e=this._reset(this.context))&&e.progress&&(n=e.forceFirstProgress,e=e.progress),o(e)&&!e.length&&(e=null)),this._progress=e,this._modBy=this._modDataCount=null;var i=this._downstream;return i&&i.dirty(),n},t.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},t.prototype.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},t.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},t.prototype.getUpstream=function(){return this._upstream},t.prototype.getDownstream=function(){return this._downstream},t.prototype.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t},t}(),qs=function(){var t,e,n,i,o,r={reset:function(l,u,c,d){e=l,t=u,n=c,i=d,o=Math.ceil(i/n),r.next=n>1&&i>0?s:a}};return r;function a(){return e<t?e++:null}function s(){var r=e%o*n+Math.ceil(e/o),a=e>=t?null:r<i?r:e;return e++,a}}();function Ks(t,e){var n=e&&e.type;return"ordinal"===n?t:("time"!==n||u(t)||null==t||"-"===t||(t=+Ke(t)),null==t||""===t?NaN:Number(t))}var Js=a({number:function(t){return parseFloat(t)},time:function(t){return+Ke(t)},trim:function(e){return t(e)?tt(e):e}});function $s(t){return Js.get(t)}var Qs={lt:function(t,e){return t<e},lte:function(t,e){return t<=e},gt:function(t,e){return t>e},gte:function(t,e){return t>=e}},tl=
/** @class */function(){function t(t,e){if(!u(e)){sn("")}this._opFn=Qs[t],this._rvalFloat=en(e)}return t.prototype.evaluate=function(t){return u(t)?this._opFn(t,this._rvalFloat):this._opFn(en(t),this._rvalFloat)},t}(),el=
/** @class */function(){function e(t,e){var n="desc"===t;this._resultLT=n?1:-1,null==e&&(e=n?"min":"max"),this._incomparable="min"===e?-Infinity:Infinity}return e.prototype.evaluate=function(e,n){var i=u(e)?e:en(e),o=u(n)?n:en(n),r=isNaN(i),a=isNaN(o);if(r&&(i=this._incomparable),a&&(o=this._incomparable),r&&a){var s=t(e),l=t(n);s&&(i=l?e:0),l&&(o=s?n:0)}return i<o?this._resultLT:i>o?-this._resultLT:0},e}(),nl=
/** @class */function(){function t(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=en(e)}return t.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var n=typeof t;n===this._rvalTypeof||"number"!==n&&"number"!==this._rvalTypeof||(e=en(t)===this._rvalFloat)}return this._isEQ?e:!e},t}();function il(t,e){return"eq"===t||"ne"===t?new nl("eq"===t,e):k(Qs,t)?new tl(t,e):null}var ol=
/** @class */function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(t){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(t){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(t,e){},t.prototype.retrieveValueFromItem=function(t,e){},t.prototype.convertValue=function(t,e){return Ks(t,e)},t}();function rl(t){if(!dl(t.sourceFormat)){sn("")}return t.data}function al(t){var e=t.sourceFormat,n=t.data;if(!dl(e)){sn("")}if(e===ga){for(var i=[],o=0,r=n.length;o<r;o++)i.push(n[o].slice());return i}if(e===ya){for(i=[],o=0,r=n.length;o<r;o++)i.push(f({},n[o]));return i}}function sl(t,e,n){if(null!=n)return u(n)||!isNaN(n)&&!k(e,n)?t[n]:k(e,n)?e[n]:void 0}function ll(t){return nt(t)}var ul=a();function cl(t,e,i,o){e.length||sn(""),r(t)||sn("");var a=t.type,l=ul.get(a);l||sn("");var u=n(e,function(t){return function(t,e){var n=new ol,i=t.data,o=n.sourceFormat=t.sourceFormat,r=t.startIndex;t.seriesLayoutBy!==_a&&sn("");var a=[],l={},u=t.dimensionsDefine;if(u)s(u,function(t,e){var n=t.name,i={index:e,name:n,displayName:t.displayName};a.push(i),null!=n&&(k(l,n)&&sn(""),l[n]=i)});else for(var c=0;c<t.dimensionsDetectedCount;c++)a.push({index:c});var d=Rs(o,_a);e.__isBuiltIn&&(n.getRawDataItem=function(t){return d(i,r,a,t)},n.getRawData=ut(rl,null,t)),n.cloneRawData=ut(al,null,t);var h=zs(o,_a);n.count=ut(h,null,i,r,a);var p=Fs(o);n.retrieveValue=function(t,e){var n=d(i,r,a,t);return f(n,e)};var f=n.retrieveValueFromItem=function(t,e){if(null!=t){var n=a[e];return n?p(t,e,n.name):void 0}};return n.getDimensionInfo=ut(sl,null,a,l),n.cloneAllDimensionInfo=ut(ll,null,a),n}(t,l)}),c=dn(l.transform({upstream:u[0],upstreamList:u,config:nt(t.config)}));return n(c,function(t,n){var i;r(t)||sn(""),t.data||sn(""),dl(Cs(t.data))||sn("");var o=e[0];if(o&&0===n&&!t.dimensions){var a=o.startIndex;a&&(t.data=o.data.slice(0,a).concat(t.data)),i={seriesLayoutBy:_a,sourceHeader:a,dimensions:o.metaRawOption.dimensions}}else i={seriesLayoutBy:_a,sourceHeader:0,dimensions:t.dimensions};return Ds(t.data,i,null)})}function dl(t){return t===ga||t===ya}var hl,pl="undefined",fl=typeof Uint32Array===pl?Array:Uint32Array,gl=typeof Uint16Array===pl?Array:Uint16Array,yl=typeof Int32Array===pl?Array:Int32Array,ml=typeof Float64Array===pl?Array:Float64Array,vl={float:ml,int:yl,
// Ordinal data type can be string or int
ordinal:Array,number:Array,time:ml};function xl(t){return t>65535?fl:gl}function _l(){return[Infinity,-Infinity]}function bl(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function Sl(t,e,n,i,o){var r=vl[n||"float"];if(o){var a=t[e],s=a&&a.length;if(s!==i){for(var l=new r(i),u=0;u<s;u++)l[u]=a[u];t[e]=l}}else t[e]=new r(i)}var wl=
/** @class */function(){function t(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=a()}return t.prototype.initData=function(t,e,i){this._provider=t,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var o=t.getSource(),r=this.defaultDimValueGetter=hl[o.sourceFormat];this._dimValueGetter=i||r,this._rawExtent=[],ks(o),this._dimensions=n(e,function(t){return{
// Only pick these two props. Not leak other properties like orderMeta.
type:t.type,property:t.property}}),this._initDataFromProvider(0,t.count())},t.prototype.getProvider=function(){return this._provider},t.prototype.getSource=function(){return this._provider.getSource()},t.prototype.ensureCalculationDimension=function(t,e){var n=this._calcDimNameToIdx,i=this._dimensions,o=n.get(t);if(null!=o){if(i[o].type===e)return o}else o=i.length;return i[o]={type:e},n.set(t,o),this._chunks[o]=new vl[e||"float"](this._rawCount),this._rawExtent[o]=[Infinity,-Infinity],o},t.prototype.collectOrdinalMeta=function(t,e){var n=this._chunks[t],i=this._dimensions[t],o=this._rawExtent,r=i.ordinalOffset||0,a=n.length;0===r&&(o[t]=[Infinity,-Infinity]);for(var s=o[t],l=r;l<a;l++){var u=n[l]=e.parseAndCollect(n[l]);isNaN(u)||(s[0]=Math.min(u,s[0]),s[1]=Math.max(u,s[1]))}i.ordinalMeta=e,i.ordinalOffset=a,i.type="ordinal"},t.prototype.getOrdinalMeta=function(t){return this._dimensions[t].ordinalMeta},t.prototype.getDimensionProperty=function(t){var e=this._dimensions[t];return e&&e.property},t.prototype.appendData=function(t){var e=this._provider,n=this.count();e.appendData(t);var i=e.count();return e.persistent||(i+=n),n<i&&this._initDataFromProvider(n,i,!0),[n,i]},t.prototype.appendValues=function(t,e){for(var n=this._chunks,i=this._dimensions,o=i.length,r=this._rawExtent,a=this.count(),s=a+Math.max(t.length,e||0),l=0;l<o;l++){Sl(n,l,(p=i[l]).type,s,!0)}for(var u=[],c=a;c<s;c++)for(var d=c-a,h=0;h<o;h++){var p=i[h],f=hl.arrayRows.call(this,t[d]||u,p.property,d,h);n[h][c]=f;var g=r[h];f<g[0]&&(g[0]=f),f>g[1]&&(g[1]=f)}return this._rawCount=this._count=s,{start:a,end:s}},t.prototype._initDataFromProvider=function(t,e,i){for(var o=this._provider,r=this._chunks,a=this._dimensions,s=a.length,l=this._rawExtent,u=n(a,function(t){return t.property}),c=0;c<s;c++){var d=a[c];l[c]||(l[c]=_l()),Sl(r,c,d.type,e,i)}if(o.fillStorage)o.fillStorage(t,e,r,l);else for(var h=[],p=t;p<e;p++){h=o.getItem(p,h);for(var f=0;f<s;f++){var g=r[f],y=this._dimValueGetter(h,u[f],p,f);g[p]=y;var m=l[f];y<m[0]&&(m[0]=y),y>m[1]&&(m[1]=y)}}!o.persistent&&o.clean&&o.clean(),this._rawCount=this._count=e,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(t,e){if(!(e>=0&&e<this._count))return NaN;var n=this._chunks[t];return n?n[this.getRawIndex(e)]:NaN},t.prototype.getValues=function(t,e){var n=[],i=[];if(null==e){e=t,t=[];for(var o=0;o<this._dimensions.length;o++)i.push(o)}else i=t;o=0;for(var r=i.length;o<r;o++)n.push(this.get(i[o],e));return n},t.prototype.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return NaN;var n=this._chunks[t];return n?n[e]:NaN},t.prototype.getSum=function(t){var e=0;if(this._chunks[t])for(var n=0,i=this.count();n<i;n++){var o=this.get(t,n);isNaN(o)||(e+=o)}return e},t.prototype.getMedian=function(t){var e=[];this.each([t],function(t){isNaN(t)||e.push(t)});var n=e.sort(function(t,e){return t-e}),i=this.count();return 0===i?0:i%2==1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},t.prototype.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&n<this._count&&n===t)return t;for(var i=0,o=this._count-1;i<=o;){var r=(i+o)/2|0;if(e[r]<t)i=r+1;else{if(!(e[r]>t))return r;o=r-1}}return-1},t.prototype.indicesOfNearest=function(t,e,n){var i=this._chunks[t],o=[];if(!i)return o;null==n&&(n=Infinity);for(var r=Infinity,a=-1,s=0,l=0,u=this.count();l<u;l++){var c=e-i[this.getRawIndex(l)],d=Math.abs(c);d<=n&&((d<r||d===r&&c>=0&&a<0)&&(r=d,a=c,s=0),c===a&&(o[s++]=l))}return o.length=s,o},t.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,i=this._count;if(n===Array){t=new n(i);for(var o=0;o<i;o++)t[o]=e[o]}else t=new n(e.buffer,0,i)}else{t=new(n=xl(this._rawCount))(this.count());for(o=0;o<t.length;o++)t[o]=o}return t},t.prototype.filter=function(t,e){if(!this._count)return this;for(var n=this.clone(),i=n.count(),o=new(xl(n._rawCount))(i),r=[],a=t.length,s=0,l=t[0],u=n._chunks,c=0;c<i;c++){var d=void 0,h=n.getRawIndex(c);if(0===a)d=e(c);else if(1===a){d=e(u[l][h],c)}else{for(var p=0;p<a;p++)r[p]=u[t[p]][h];r[p]=c,d=e.apply(null,r)}d&&(o[s++]=h)}return s<i&&(n._indices=o),n._count=s,n._extent=[],n._updateGetRawIdx(),n},t.prototype.selectRange=function(t){var e=this.clone(),n=e._count;if(!n)return this;var i=x(t),o=i.length;if(!o)return this;var r=e.count(),a=new(xl(e._rawCount))(r),s=0,l=i[0],u=t[l][0],c=t[l][1],d=e._chunks,h=!1;if(!e._indices){var p=0;if(1===o){for(var f=d[i[0]],g=0;g<n;g++){((_=f[g])>=u&&_<=c||isNaN(_))&&(a[s++]=p),p++}h=!0}else if(2===o){f=d[i[0]];var y=d[i[1]],m=t[i[1]][0],v=t[i[1]][1];for(g=0;g<n;g++){var _=f[g],b=y[g];(_>=u&&_<=c||isNaN(_))&&(b>=m&&b<=v||isNaN(b))&&(a[s++]=p),p++}h=!0}}if(!h)if(1===o)for(g=0;g<r;g++){var S=e.getRawIndex(g);((_=d[i[0]][S])>=u&&_<=c||isNaN(_))&&(a[s++]=S)}else for(g=0;g<r;g++){for(var w=!0,M=(S=e.getRawIndex(g),0);M<o;M++){var I=i[M];((_=d[I][S])<t[I][0]||_>t[I][1])&&(w=!1)}w&&(a[s++]=e.getRawIndex(g))}return s<r&&(e._indices=a),e._count=s,e._extent=[],e._updateGetRawIdx(),e},t.prototype.map=function(t,e){var n=this.clone(t);return this._updateDims(n,t,e),n},t.prototype.modify=function(t,e){this._updateDims(this,t,e)},t.prototype._updateDims=function(t,e,n){for(var i=t._chunks,o=[],r=e.length,a=t.count(),s=[],l=t._rawExtent,u=0;u<e.length;u++)l[e[u]]=_l();for(var c=0;c<a;c++){for(var d=t.getRawIndex(c),h=0;h<r;h++)s[h]=i[e[h]][d];s[r]=c;var p=n&&n.apply(null,s);if(null!=p){"object"!=typeof p&&(o[0]=p,p=o);for(u=0;u<p.length;u++){var f=e[u],g=p[u],y=l[f],m=i[f];m&&(m[d]=g),g<y[0]&&(y[0]=g),g>y[1]&&(y[1]=g)}}}},t.prototype.lttbDownSample=function(t,e){var n,i,o,r=this.clone([t],!0),a=r._chunks[t],s=this.count(),l=0,u=Math.floor(1/e),c=this.getRawIndex(0),d=new(xl(this._rawCount))(Math.min(2*(Math.ceil(s/u)+2),s));d[l++]=c;for(var h=1;h<s-1;h+=u){for(var p=Math.min(h+u,s-1),f=Math.min(h+2*u,s),g=(f+p)/2,y=0,m=p;m<f;m++){var v=a[I=this.getRawIndex(m)];isNaN(v)||(y+=v)}y/=f-p;var x=h,_=Math.min(h+u,s),b=h-1,S=a[c];n=-1,o=x;var w=-1,M=0;for(m=x;m<_;m++){var I;v=a[I=this.getRawIndex(m)];isNaN(v)?(M++,w<0&&(w=I)):(i=Math.abs((b-g)*(v-S)-(b-m)*(y-S)))>n&&(n=i,o=I)}M>0&&M<_-x&&(d[l++]=Math.min(w,o),o=Math.max(w,o)),d[l++]=o,c=o}return d[l++]=this.getRawIndex(s-1),r._count=l,r._indices=d,r.getRawIndex=this._getRawIdx,r},t.prototype.minmaxDownSample=function(t,e){for(var n=this.clone([t],!0),i=n._chunks,o=Math.floor(1/e),r=i[t],a=this.count(),s=new(xl(this._rawCount))(2*Math.ceil(a/o)),l=0,u=0;u<a;u+=o){var c=u,d=r[this.getRawIndex(c)],h=u,p=r[this.getRawIndex(h)],f=o;u+o>a&&(f=a-u);for(var g=0;g<f;g++){var y=r[this.getRawIndex(u+g)];y<d&&(d=y,c=u+g),y>p&&(p=y,h=u+g)}var m=this.getRawIndex(c),v=this.getRawIndex(h);c<h?(s[l++]=m,s[l++]=v):(s[l++]=v,s[l++]=m)}return n._count=l,n._indices=s,n._updateGetRawIdx(),n},t.prototype.downSample=function(t,e,n,i){for(var o=this.clone([t],!0),r=o._chunks,a=[],s=Math.floor(1/e),l=r[t],u=this.count(),c=o._rawExtent[t]=[Infinity,-Infinity],d=new(xl(this._rawCount))(Math.ceil(u/s)),h=0,p=0;p<u;p+=s){s>u-p&&(s=u-p,a.length=s);for(var f=0;f<s;f++){var g=this.getRawIndex(p+f);a[f]=l[g]}var y=n(a),m=this.getRawIndex(Math.min(p+i(a,y)||0,u-1));l[m]=y,y<c[0]&&(c[0]=y),y>c[1]&&(c[1]=y),d[h++]=m}return o._count=h,o._indices=d,o._updateGetRawIdx(),o},t.prototype.each=function(t,e){if(this._count)for(var n=t.length,i=this._chunks,o=0,r=this.count();o<r;o++){var a=this.getRawIndex(o);switch(n){case 0:e(o);break;case 1:e(i[t[0]][a],o);break;case 2:e(i[t[0]][a],i[t[1]][a],o);break;default:for(var s=0,l=[];s<n;s++)l[s]=i[t[s]][a];l[s]=o,e.apply(null,l)}}},t.prototype.getDataExtent=function(t){var e=this._chunks[t],n=[Infinity,-Infinity];if(!e)return n;var i,o=this.count();if(!this._indices)return this._rawExtent[t].slice();if(i=this._extent[t])return i.slice();for(var r=(i=n)[0],a=i[1],s=0;s<o;s++){var l=e[this.getRawIndex(s)];l<r&&(r=l),l>a&&(a=l)}return i=[r,a],this._extent[t]=i,i},t.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var n=[],i=this._chunks,o=0;o<i.length;o++)n.push(i[o][e]);return n},t.prototype.clone=function(n,i){var o=new t,r=this._chunks,a=n&&e(n,function(t,e){return t[e]=!0,t},{});if(a)for(var s=0;s<r.length;s++)o._chunks[s]=a[s]?bl(r[s]):r[s];else o._chunks=r;return this._copyCommonProps(o),i||(o._indices=this._cloneIndices()),o._updateGetRawIdx(),o},t.prototype._copyCommonProps=function(t){t._count=this._count,t._rawCount=this._rawCount,t._provider=this._provider,t._dimensions=this._dimensions,t._extent=nt(this._extent),t._rawExtent=nt(this._rawExtent)},t.prototype._cloneIndices=function(){if(this._indices){var t=this._indices.constructor,e=void 0;if(t===Array){var n=this._indices.length;e=new t(n);for(var i=0;i<n;i++)e[i]=this._indices[i]}else e=new t(this._indices);return e}return null},t.prototype._getRawIdxIdentity=function(t){return t},t.prototype._getRawIdx=function(t){return t<this._count&&t>=0?this._indices[t]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function t(t,e,n,i){return Ks(t[i],this._dimensions[i])}hl={arrayRows:t,objectRows:function(t,e,n,i){return Ks(t[e],this._dimensions[i])},keyedColumns:t,original:function(t,e,n,i){var o=t&&(null==t.value?t:t.value);return Ks(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(t,e,n,i){return t[i]}}}(),t}(),Ml=
/** @class */function(){function t(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,n=this._sourceHost,i=this._getUpstreamSourceManagers(),o=!!i.length;if(Dl(n)){var r=n,a=void 0,s=void 0,l=void 0;if(o){var u=i[0];u.prepareSource(),a=(l=u.getSource()).data,s=l.sourceFormat,e=[u._getVersionSign()]}else a=r.get("data",!0),s=st(a)?va:fa,e=[];var c=this._getSourceMetaRawOption()||{},d=l&&l.metaRawOption||{},h=_(c.seriesLayoutBy,d.seriesLayoutBy)||null,p=_(c.sourceHeader,d.sourceHeader),f=_(c.dimensions,d.dimensions);t=h!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||f?[Ds(a,{seriesLayoutBy:h,sourceHeader:p,dimensions:f},s)]:[]}else{var g=n;if(o){var y=this._applyTransform(i);t=y.sourceList,e=y.upstreamSignList}else{t=[Ds(g.get("source",!0),this._getSourceMetaRawOption(),null)],e=[]}}this._setLocalSource(t,e)},t.prototype._applyTransform=function(t){var e,n=this._sourceHost,i=n.get("transform",!0),o=n.get("fromTransformResult",!0);if(null!=o){1!==t.length&&Tl("")}var r,a=[],l=[];return s(t,function(t){t.prepareSource();var e=t.getSource(o||0);null==o||e||Tl(""),a.push(e),l.push(t._getVersionSign())}),i?e=function(t,e){var n=dn(t),i=n.length;i||sn("");for(var o=0,r=i;o<r;o++)e=cl(n[o],e),o!==r-1&&(e.length=Math.max(e.length,1));return e}(i,a,n.componentIndex):null!=o&&(e=[(r=a[0],new Ms({data:r.data,sourceFormat:r.sourceFormat,seriesLayoutBy:r.seriesLayoutBy,dimensionsDefine:nt(r.dimensionsDefine),startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount}))]),{sourceList:e,upstreamSignList:l}},t.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e<t.length;e++){var n=t[e];if(
// Consider the case that there is ancestor diry, call it recursively.
// The performance is probably not an issue because usually the chain is not long.
n._isDirty()||this._upstreamSignList[e]!==n._getVersionSign())return!0}},t.prototype.getSource=function(t){t=t||0;var e=this._sourceList[t];if(!e){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(t)}return e},t.prototype.getSharedDataStore=function(t){var e=t.makeStoreSchema();return this._innerGetDataStore(e.dimensions,t.source,e.hash)},t.prototype._innerGetDataStore=function(t,e,n){var i=this._storeList,o=i[0];o||(o=i[0]={});var r=o[n];if(!r){var a=this._getUpstreamSourceManagers()[0];Dl(this._sourceHost)&&a?r=a._innerGetDataStore(t,e,n):(r=new wl).initData(new Ps(e,t.length),t),o[n]=r}return r},t.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if(Dl(t)){var e=Ca(t);return e?[e.getSourceManager()]:[]}return n(function(t){return t.get("transform",!0)||t.get("fromTransformResult",!0)?An(t.ecModel,"dataset",{index:t.get("fromDatasetIndex",!0),id:t.get("fromDatasetId",!0)},Tn).models:[]}(t),function(t){return t.getSourceManager()})},t.prototype._getSourceMetaRawOption=function(){var t,e,n,i=this._sourceHost;if(Dl(i))t=i.get("seriesLayoutBy",!0),e=i.get("sourceHeader",!0),n=i.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var o=i;t=o.get("seriesLayoutBy",!0),e=o.get("sourceHeader",!0),n=o.get("dimensions",!0)}return{seriesLayoutBy:t,sourceHeader:e,dimensions:n}},t}();function Il(t){t.option.transform&&ct(t.option.transform)}function Dl(t){return"series"===t.mainType}function Tl(t){throw new Error(t)}function Cl(t){var e=t.lineHeight;return null==e?"line-height:1":"line-height:"+rt(e+"")+"px"}function Al(t,e){var n=t.color||"#6e7079",i=t.fontSize||12,o=t.fontWeight||"400",r=t.color||"#464646",a=t.fontSize||14,s=t.fontWeight||"900";return"html"===e?{
// eslint-disable-next-line max-len
nameStyle:"font-size:"+rt(i+"")+"px;color:"+rt(n)+";font-weight:"+rt(o+""),
// eslint-disable-next-line max-len
valueStyle:"font-size:"+rt(a+"")+"px;color:"+rt(r)+";font-weight:"+rt(s+"")}:{nameStyle:{fontSize:i,fill:n,fontWeight:o},valueStyle:{fontSize:a,fill:r,fontWeight:s}}}var Ll=[0,10,20,30],kl=["","\n","\n\n","\n\n\n"];function Pl(t,e){return e.type=t,e}function Nl(t){return"section"===t.type}function Ol(t){return Nl(t)?El:Vl}function Rl(t){if(Nl(t)){var e=0,n=t.blocks.length,i=n>1||n>0&&!t.noHeader;return s(t.blocks,function(t){var n=Rl(t);n>=e&&(e=n+ +(i&&(// 0 always can not be readable gap level.
!n||Nl(t)&&!t.noHeader)))}),e}return 0}function El(t,e,n,r){var a,l=e.noHeader,u=(a=Rl(e),{html:Ll[a],richText:kl[a]}),c=[],d=e.blocks||[];i(!d||o(d)),d=d||[];var h=t.orderMode;if(e.sortBlocks&&h){d=d.slice();var p={valueAsc:"asc",valueDesc:"desc"};if(k(p,h)){var g=new el(p[h],null);d.sort(function(t,e){return g.evaluate(t.sortParam,e.sortParam)})}else"seriesDesc"===h&&d.reverse()}s(d,function(n,i){var o=e.valueFormatter,a=Ol(n)(
// Inherit valueFormatter
o?f(f({},t),{valueFormatter:o}):t,n,i>0?u.html:0,r);null!=a&&c.push(a)});var y="richText"===t.renderMode?c.join(u.richText):Bl(r,c.join(""),l?n:u.html);if(l)return y;var m=Ur(e.header,"ordinal",t.useUTC),v=Al(r,t.renderMode).nameStyle,x=Cl(r);return"richText"===t.renderMode?Gl(t,m,v)+u.richText+y:Bl(r,'<div style="'+v+";"+x+';">'+rt(m)+"</div>"+y,n)}function Vl(t,e,i,r){var a=t.renderMode,s=e.noName,l=e.noValue,u=!e.markerType,c=e.name,d=t.useUTC,h=e.valueFormatter||t.valueFormatter||function(t){return t=o(t)?t:[t],n(t,function(t,e){return Ur(t,o(g)?g[e]:g,d)})};if(!s||!l){var p=u?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",a),f=s?"":Ur(c,"ordinal",d),g=e.valueType,y=l?[]:h(e.value,e.dataIndex),m=!u||!s,v=!u&&s,x=Al(r,a),_=x.nameStyle,b=x.valueStyle;return"richText"===a?(u?"":p)+(s?"":Gl(t,f,_))+(l?"":function(t,e,n,i,r){var a=[r],s=i?10:20;return n&&a.push({padding:[0,0,0,s],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(o(e)?e.join(" "):e,a)}(t,y,m,v,b)):Bl(r,(u?"":p)+(s?"":function(t,e,n){return'<span style="'+n+";"+(e?"margin-left:2px":"")+'">'+rt(t)+"</span>"}(f,!u,_))+(l?"":function(t,e,i,r){var a=i?"10px":"20px",s=e?"float:right;margin-left:"+a:"";return t=o(t)?t:[t],'<span style="'+s+";"+r+'">'+n(t,function(t){return rt(t)}).join("&nbsp;&nbsp;")+"</span>"}(y,m,v,b)),i)}}function zl(t,e,n,i,o,r){if(t)return Ol(t)({useUTC:o,renderMode:n,orderMode:i,markupStyleCreator:e,valueFormatter:t.valueFormatter},t,0,r)}function Bl(t,e,n){return'<div style="'+("margin: "+n+"px 0 0")+";"+Cl(t)+';">'+e+'<div style="clear:both"></div></div>'}function Gl(t,e,n){return t.markupStyleCreator.wrapRichTextStyle(e,n)}function Fl(t,e){return qr(t.getData().getItemVisual(e,"style")[t.visualDrawType])}function Wl(t,e){var n=t.get("padding");return null!=n?n:"richText"===e?[8,10]:10}var Hl=
/** @class */function(){function e(){this.richTextStyles={},this._nextStyleNameId=on()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,n,i){var o="richText"===i?this._generateStyleName():null,r=function(e,n){var i=t(e)?{color:e,extraCssText:n}:e||{},o=i.color,r=i.type;n=i.extraCssText;var a=i.renderMode||"html";return o?"html"===a?"subItem"===r?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+rt(o)+";"+(n||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+rt(o)+";"+(n||"")+'"></span>':{renderMode:a,content:"{"+(i.markerId||"markerX")+"|} ",style:"subItem"===r?{width:4,height:4,borderRadius:2,backgroundColor:o}:{width:10,height:10,borderRadius:5,backgroundColor:o}}:""}({color:n,type:e,renderMode:i,markerId:o});return t(r)?r:(this.richTextStyles[o]=r.style,r.content)},e.prototype.wrapRichTextStyle=function(t,e){var n={};o(e)?s(e,function(t){return f(n,t)}):f(n,e);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},e}();function Yl(t){var n,i,r,a,l=t.series,u=t.dataIndex,c=t.multipleSeries,d=l.getData(),h=d.mapDimensionsAll("defaultedTooltip"),p=h.length,f=l.getRawValue(u),g=o(f),y=Fl(l,u);if(p>1||g&&!p){var m=function(t,n,i,o,r){var a=n.getData(),l=e(t,function(t,e,n){var i=a.getDimensionInfo(n);return t||i&&!1!==i.tooltip&&null!=i.displayName},!1),u=[],c=[],d=[];function h(t,e){var n=a.getDimensionInfo(e);n&&!1!==n.otherDims.tooltip&&(l?d.push(Pl("nameValue",{markerType:"subItem",markerColor:r,name:n.displayName,value:t,valueType:n.type})):(u.push(t),c.push(n.type)))}return o.length?s(o,function(t){h(Hs(a,i,t),t)}):s(t,h),{inlineValues:u,inlineValueTypes:c,blocks:d}}(f,l,u,h,y);n=m.inlineValues,i=m.inlineValueTypes,r=m.blocks,a=m.inlineValues[0]}else if(p){var v=d.getDimensionInfo(h[0]);a=n=Hs(d,u,h[0]),i=v.type}else a=n=g?f[0]:f;var x=_n(l),_=x&&l.name||"",b=d.getName(u),S=c?_:b;return Pl("section",{header:_,
// When series name is not specified, do not show a header line with only '-'.
// This case always happens in tooltip.trigger: 'item'.
noHeader:c||!x,sortParam:a,blocks:[Pl("nameValue",{markerType:"item",markerColor:y,
// Do not mix display seriesName and itemName in one tooltip,
// which might confuses users.
name:S,
// name dimension might be auto assigned, where the name might
// be not readable. So we check trim here.
noName:!tt(S),value:n,valueType:i,dataIndex:u})].concat(r||[])})}var Ul=wn();function Zl(t,e){return t.getName(e)||t.getId(e)}var Xl="__universalTransitionEnabled",jl=
/** @class */function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}var n;return h(e,t),e.prototype.init=function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=Xs({count:Kl,reset:Jl}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),(Ul(this).sourceManager=new Ml(this)).prepareSource();var i=this.getInitialData(t,n);Ql(i,this),this.dataTask.context.data=i,Ul(this).dataBeforeProcessed=i,ql(this),this._initSelectedMapFromData(i)},e.prototype.mergeDefaultAndTheme=function(t,e){var n=oa(this),i=n?aa(t):{},o=this.subType;ua.hasClass(o)&&(o+="Series"),et(t,e.getTheme().get(this.subType)),et(t,this.getDefaultOption()),hn(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&ra(t,i,n)},e.prototype.mergeOption=function(t,e){t=et(this.option,t,!0),this.fillDataTextStyle(t.data);var n=oa(this);n&&ra(this.option,t,n);var i=Ul(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(t,e);Ql(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Ul(this).dataBeforeProcessed=o,ql(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!st(t))for(var e=["show"],n=0;n<t.length;n++)t[n]&&t[n].label&&hn(t[n],"label",e)},e.prototype.getInitialData=function(t,e){},e.prototype.appendData=function(t){this.getRawData().appendData(t.data)},e.prototype.getData=function(t){var e=eu(this);if(e){var n=e.context.data;return null!=t&&n.getLinkedData?n.getLinkedData(t):n}return Ul(this).data},e.prototype.getAllData=function(){var t=this.getData();return t&&t.getLinkedDataAll?t.getLinkedDataAll():[{data:t}]},e.prototype.setData=function(t){var e=eu(this);if(e){var n=e.context;n.outputData=t,e!==this.dataTask&&(n.data=t)}Ul(this).data=t},e.prototype.getEncode=function(){var t=this.get("encode",!0);if(t)return a(t)},e.prototype.getSourceManager=function(){return Ul(this).sourceManager},e.prototype.getSource=function(){return this.getSourceManager().getSource()},e.prototype.getRawData=function(){return Ul(this).dataBeforeProcessed},e.prototype.getColorBy=function(){return this.get("colorBy")||"series"},e.prototype.isColorBySeries=function(){return"series"===this.getColorBy()},e.prototype.getBaseAxis=function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},e.prototype.formatTooltip=function(t,e,n){return Yl({series:this,dataIndex:t,multipleSeries:e})},e.prototype.isAnimationEnabled=function(){var t=this.ecModel;if(d.node&&(!t||!t.ssr))return!1;var e=this.getShallow("animation");return e&&this.getData().count()>this.getShallow("animationThreshold")&&(e=!1),!!e},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel,o=Va.prototype.getColorFromPalette.call(this,t,e,n);return o||(o=i.getColorFromPalette(t,e,n)),o},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},e.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,o=this.getData(e);if("series"===i||"all"===n)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var r=0;r<t.length;r++){var a=Zl(o,t[r]);n[a]=!1,this._selectedDataIndicesMap[a]=-1}}},e.prototype.toggleSelect=function(t,e){for(var n=[],i=0;i<t.length;i++)n[0]=t[i],this.isSelected(t[i],e)?this.unselect(n,e):this.select(n,e)},e.prototype.getSelectedDataIndices=function(){if("all"===this.option.selectedMap)return[].slice.call(this.getData().getIndices());for(var t=this._selectedDataIndicesMap,e=x(t),n=[],i=0;i<e.length;i++){var o=t[e[i]];o>=0&&n.push(o)}return n},e.prototype.isSelected=function(t,e){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(e);return("all"===n||n[Zl(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Xl])return!0;var t=this.option.universalTransition;return!!t&&(!0===t||t&&t.enabled)},e.prototype._innerSelect=function(t,e){var n,i,o=this.option,a=o.selectedMode,s=e.length;if(a&&s)if("series"===a)o.selectedMap="all";else if("multiple"===a){r(o.selectedMap)||(o.selectedMap={});for(var l=o.selectedMap,u=0;u<s;u++){var c=e[u];l[h=Zl(t,c)]=!0,this._selectedDataIndicesMap[h]=t.getRawIndex(c)}}else if("single"===a||!0===a){var d=e[s-1],h=Zl(t,d);o.selectedMap=((n={})[h]=!0,n),this._selectedDataIndicesMap=((i={})[h]=t.getRawIndex(d),i)}},e.prototype._initSelectedMapFromData=function(t){if(!this.option.selectedMap){var e=[];t.hasItemOption&&t.each(function(n){var i=t.getRawDataItem(n);i&&i.selected&&e.push(n)}),e.length>0&&this._innerSelect(t,e)}},e.registerClass=function(t){return ua.registerClass(t)},e.protoInitialize=((n=e.prototype).type="series.__base__",n.seriesIndex=0,n.ignoreStyleOnData=!1,n.hasSymbolVisual=!1,n.defaultSymbol="circle",n.visualStyleAccessPath="itemStyle",void(n.visualDrawType="fill")),e}(ua);function ql(t){var e=t.name;_n(t)||(t.name=function(t){var e=t.getRawData(),n=e.mapDimensionsAll("seriesName"),i=[];return s(n,function(t){var n=e.getDimensionInfo(t);n.displayName&&i.push(n.displayName)}),i.join(" ")}(t)||e)}function Kl(t){return t.model.getRawData().count()}function Jl(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),$l}function $l(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Ql(t,e){s(dt(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),function(n){t.wrapMethod(n,at(tu,e))})}function tu(t,e){var n=eu(t);return n&&n.setOutputEnd((e||this).count()),e}function eu(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var o=i.agentStubMap;o&&(i=o.get(t.uid))}return i}}it(jl,Us),it(jl,Va),Vn(jl,ua);var nu=
/** @class */function(){function t(){this.group=new X,this.uid=nr("viewComponent")}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){},t.prototype.updateLayout=function(t,e,n,i){},t.prototype.updateVisual=function(t,e,n,i){},t.prototype.toggleBlurSeries=function(t,e,n){},t.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},t}();function iu(){var t=wn();return function(e){var n=t(e),i=e.pipelineContext,o=!!n.large,r=!!n.progressiveRender,a=n.large=!(!i||!i.large),s=n.progressiveRender=!(!i||!i.progressiveRender);return!(o===a&&r===s)&&"reset"}}En(nu),Fn(nu);var ou=wn(),ru=iu(),au=
/** @class */function(){function t(){this.group=new X,this.uid=nr("viewChart"),this.renderTask=Xs({plan:uu,reset:cu}),this.renderTask.context={view:this}}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.highlight=function(t,e,n,i){var o=t.getData(i&&i.dataType);o&&lu(o,i,"emphasis")},t.prototype.downplay=function(t,e,n,i){var o=t.getData(i&&i.dataType);o&&lu(o,i,"normal")},t.prototype.remove=function(t,e){this.group.removeAll()},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.eachRendered=function(t){Io(this.group,t)},t.markUpdateMethod=function(t,e){ou(t).updateMethod=e},t.protoInitialize=void(t.prototype.type="chart"),t}();function su(t,e,n){t&&Gi(t)&&("emphasis"===e?_i:bi)(t,n)}function lu(t,e,n){var i=Sn(t,e),o=e&&null!=e.highlightKey?function(t){var e=jn[t];return null==e&&Xn<=32&&(e=jn[t]=Xn++),e}(e.highlightKey):null;null!=i?s(dn(i),function(e){su(t.getItemGraphicEl(e),n,o)}):t.eachItemGraphicEl(function(t){su(t,n,o)})}function uu(t){return ru(t.model)}function cu(t){var e=t.model,n=t.ecModel,i=t.api,o=t.payload,r=e.pipelineContext.progressiveRender,a=t.view,s=o&&ou(o).updateMethod,l=r?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](e,n,i,o),du[l]}En(au),Fn(au);var du={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{
// Put view.render in `progress` to support appendData. But in this case
// view.render should not be called in reset, otherwise it will be called
// twise. Use `forceFirstProgress` to make sure that view.render is called
// in any cases.
forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},hu="\0__throttleOriginMethod",pu="\0__throttleRate",fu="\0__throttleType";function gu(t,e,n){var i,o,r,a,s,l=0,u=0,c=null;function d(){u=(new Date).getTime(),c=null,t.apply(r,a||[])}e=e||0;var h=function(){for(var t=[],h=0;h<arguments.length;h++)t[h]=arguments[h];i=(new Date).getTime(),r=this,a=t;var p=s||e,f=s||n;s=null,o=i-(f?l:u)-p,clearTimeout(c),f?c=setTimeout(d,p):o>=0?d():c=setTimeout(d,-o),l=i};return h.clear=function(){c&&(clearTimeout(c),c=null)},h.debounceNextCall=function(t){s=t},h}function yu(t,e,n,i){var o=t[e];if(o){var r=o[hu]||o,a=o[fu];if(o[pu]!==n||a!==i){if(null==n||!i)return t[e]=r;(o=t[e]=gu(r,n,"debounce"===i))[hu]=r,o[fu]=i,o[pu]=n}return o}}function mu(t,e){var n=t[e];n&&n[hu]&&(n.clear&&n.clear(),t[e]=n[hu])}var vu=wn(),xu={itemStyle:Wn(Jo,!0),lineStyle:Wn(jo,!0)},_u={lineStyle:"stroke",itemStyle:"fill"};function bu(t,e){var n=t.visualStyleMapper||xu[e];return n||xu.itemStyle}function Su(t,e){var n=t.visualDrawType||_u[e];return n||"fill"}var wu={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",o=t.getModel(i),r=bu(t,i)(o),a=o.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=Su(t,i),l=r[s],u=g(l)?l:null,c="auto"===r.fill||"auto"===r.stroke;if(!r[s]||u||c){var d=t.getColorFromPalette(
// TODO series count changed.
t.name,null,e.getSeriesCount());r[s]||(r[s]=d,n.setVisual("colorFromPalette",!0)),r.fill="auto"===r.fill||g(r.fill)?d:r.fill,r.stroke="auto"===r.stroke||g(r.stroke)?d:r.stroke}if(n.setVisual("style",r),n.setVisual("drawType",s),!e.isSeriesFiltered(t)&&u)return n.setVisual("colorFromPalette",!1),{dataEach:function(e,n){var i=t.getDataParams(n),o=f({},r);o[s]=u(i),e.setItemVisual(n,"style",o)}}}},Mu=new tr,Iu={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t)){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",o=bu(t,i),r=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(t,e){var n=t.getRawDataItem(e);if(n&&n[i]){Mu.option=n[i];var a=o(Mu),s=t.ensureUniqueItemVisual(e,"style");f(s,a),Mu.option.decal&&(t.setItemVisual(e,"decal",Mu.option.decal),Mu.option.decal.dirty=!0),r in a&&t.setItemVisual(e,"colorFromPalette",!1)}}:null}}}},Du={performRawSeries:!0,overallReset:function(t){var e=a();t.eachSeries(function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var i=t.type+"-"+n,o=e.get(i);o||(o={},e.set(i,o)),vu(t).scope=o}}),t.eachSeries(function(e){if(!e.isColorBySeries()&&!t.isSeriesFiltered(e)){var n=e.getRawData(),i={},o=e.getData(),r=vu(e).scope,a=e.visualStyleAccessPath||"itemStyle",s=Su(e,a);o.each(function(t){var e=o.getRawIndex(t);i[e]=t}),n.each(function(t){var a=i[t];if(o.getItemVisual(a,"colorFromPalette")){var l=o.ensureUniqueItemVisual(a,"style"),u=n.getName(t)||t+"",c=n.count();l[s]=e.getColorFromPalette(u,r,c)}})}})}},Tu=Math.PI;var Cu=
/** @class */function(){function t(t,e,n,i){this._stageTaskMap=a(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){var e=t.overallTask;e&&e.dirty()})},t.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,o=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,r=i&&i.modDataCount;return{step:o,modBy:null!=r?Math.ceil(r/o):null,modDataCount:r}}},t.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},t.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),o=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,r=t.get("large")&&i>=t.get("largeThreshold"),a="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:a,large:r}},t.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=a();t.eachSeries(function(t){var i=t.getProgressive(),o=t.uid;n.set(o,{id:o,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),e._pipe(t,t.dataTask)})},t.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;s(this._allHandlers,function(o){var r=t.get(o.uid)||t.set(o.uid,{});i(!(o.reset&&o.overallReset),""),o.reset&&this._createSeriesStageTask(o,r,e,n),o.overallReset&&this._createOverallStageTask(o,r,e,n)},this)},t.prototype.prepareView=function(t,e,n,i){var o=t.renderTask,r=o.context;r.model=e,r.ecModel=n,r.api=i,o.__block=!t.incrementalPrepareRender,this._pipe(e,o)},t.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},t.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},t.prototype._performStageTasks=function(t,e,n,i){i=i||{};var o=!1,r=this;function a(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}s(t,function(t,s){if(!i.visualType||i.visualType===t.visualType){var l=r._stageTaskMap.get(t.uid),u=l.seriesTaskMap,c=l.overallTask;if(c){var d,h=c.agentStubMap;h.each(function(t){a(i,t)&&(t.dirty(),d=!0)}),d&&c.dirty(),r.updatePayload(c,n);var p=r.getPerformArgs(c,i.block);h.each(function(t){t.perform(p)}),c.perform(p)&&(o=!0)}else u&&u.each(function(s,l){a(i,s)&&s.dirty();var u=r.getPerformArgs(s,i.block);u.skip=!t.performRawSeries&&e.isSeriesFiltered(s.context.model),r.updatePayload(s,n),s.perform(u)&&(o=!0)})}}),this.unfinished=o||this.unfinished},t.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e=t.dataTask.perform()||e}),this.unfinished=e||this.unfinished},t.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)})},t.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},t.prototype._createSeriesStageTask=function(t,e,n,i){var o=this,r=e.seriesTaskMap,s=e.seriesTaskMap=a(),l=t.seriesType,u=t.getTargetSeries;function c(e){var a=e.uid,l=s.set(a,r&&r.get(a)||Xs({plan:Nu,reset:Ou,count:Vu}));l.context={model:e,ecModel:n,api:i,
// PENDING: `useClearVisual` not used?
useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:o},o._pipe(e,l)}t.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,i).each(c)},t.prototype._createOverallStageTask=function(t,e,n,o){var r=this,l=e.overallTask=e.overallTask||Xs({reset:Au});l.context={ecModel:n,api:o,overallReset:t.overallReset,scheduler:r};var u=l.agentStubMap,c=l.agentStubMap=a(),d=t.seriesType,h=t.getTargetSeries,p=!0,f=!1;function g(t){var e=t.uid,n=c.set(e,u&&u.get(e)||(// When the result of `getTargetSeries` changed, the overallTask
// should be set as dirty and re-performed.
// When the result of `getTargetSeries` changed, the overallTask
// should be set as dirty and re-performed.
f=!0,Xs({reset:Lu,onDirty:Pu})));n.context={model:t,overallProgress:p},n.agent=l,n.__block=p,r._pipe(t,n)}i(!t.createOnAllSeries,""),d?n.eachRawSeriesByType(d,g):h?h(n,o).each(g):(p=!1,s(n.getSeries(),g)),f&&l.dirty()},t.prototype._pipe=function(t,e){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=e),i.tail&&i.tail.pipe(e),i.tail=e,e.__idxInPipeline=i.count++,e.__pipeline=i},t.wrapStageHandler=function(t,e){return g(t)&&(t={overallReset:t,seriesType:zu(t)}),t.uid=nr("stageHandler"),e&&(t.visualType=e),t},t}();function Au(t){t.overallReset(t.ecModel,t.api,t.payload)}function Lu(t){return t.overallProgress&&ku}function ku(){this.agent.dirty(),this.getDownstream().dirty()}function Pu(){this.agent&&this.agent.dirty()}function Nu(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function Ou(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=dn(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?n(e,function(t,e){return Eu(e)}):Ru}var Ru=Eu(0);function Eu(t){return function(e,n){var i=n.data,o=n.resetDefines[t];if(o&&o.dataEach)for(var r=e.start;r<e.end;r++)o.dataEach(i,r);else o&&o.progress&&o.progress(e,i)}}function Vu(t){return t.data.count()}function zu(t){Bu=null;try{t(Gu,Fu)}catch(e){}return Bu}var Bu,Gu={},Fu={};function Wu(t,e){for(var n in e.prototype)t[n]=ht}Wu(Gu,Fa),Wu(Fu,Za),Gu.eachSeriesByType=Gu.eachRawSeriesByType=function(t){Bu=t},Gu.eachComponent=function(t){"series"===t.mainType&&t.subType&&(Bu=t.subType)};var Hu=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const Yu={color:Hu,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],Hu]};var Uu="#B9B8CE",Zu="#100C2A",Xu=function(){return{axisLine:{lineStyle:{color:Uu}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},ju=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],qu={darkMode:!0,color:ju,backgroundColor:Zu,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{
// TODO Contrast of label backgorundColor
color:"#fff"}},legend:{textStyle:{color:Uu},pageTextStyle:{color:Uu}},textStyle:{color:Uu},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:Uu}},dataZoom:{borderColor:"#71708A",textStyle:{color:Uu},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:Uu}},timeline:{lineStyle:{color:Uu},label:{color:Uu},controlStyle:{color:Uu,borderColor:Uu}},calendar:{itemStyle:{color:Zu},dayLabel:{color:Uu},monthLabel:{color:Uu},yearLabel:{color:Uu}},timeAxis:Xu(),logAxis:Xu(),valueAxis:Xu(),categoryAxis:Xu(),line:{symbol:"circle"},graph:{color:ju},gauge:{title:{color:Uu},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:Uu},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};qu.categoryAxis.splitLine.show=!1;var Ku=
/** @class */function(){function e(){}return e.prototype.normalizeQuery=function(e){var n={},i={},o={};if(t(e)){var r=Rn(e);n.mainType=r.main||null,n.subType=r.sub||null}else{var a=["Index","Name","Id"],l={name:1,dataIndex:1,dataType:1};s(e,function(t,e){for(var r=!1,s=0;s<a.length;s++){var u=a[s],c=e.lastIndexOf(u);if(c>0&&c===e.length-u.length){var d=e.slice(0,c);"data"!==d&&(n.mainType=d,n[u.toLowerCase()]=t,r=!0)}}l.hasOwnProperty(e)&&(i[e]=t,r=!0),r||(o[e]=t)})}return{cptQuery:n,dataQuery:i,otherQuery:o}},e.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,o=n.packedEvent,r=n.model,a=n.view;if(!r||!a)return!0;var s=e.cptQuery,l=e.dataQuery;return u(s,r,"mainType")&&u(s,r,"subType")&&u(s,r,"index","componentIndex")&&u(s,r,"name")&&u(s,r,"id")&&u(l,o,"name")&&u(l,o,"dataIndex")&&u(l,o,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(t,e.otherQuery,i,o));function u(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),Ju=["symbol","symbolSize","symbolRotate","symbolOffset"],$u=Ju.concat(["symbolKeepAspect"]),Qu={createOnAllSeries:!0,
// For legend.
performRawSeries:!0,reset:function(t,e){var n=t.getData();if(t.legendIcon&&n.setVisual("legendIcon",t.legendIcon),t.hasSymbolVisual){for(var i={},o={},r=!1,a=0;a<Ju.length;a++){var s=Ju[a],l=t.get(s);g(l)?(r=!0,o[s]=l):i[s]=l}if(i.symbol=i.symbol||t.defaultSymbol,n.setVisual(f({legendIcon:t.legendIcon||i.symbol,symbolKeepAspect:t.get("symbolKeepAspect")},i)),!e.isSeriesFiltered(t)){var u=x(o);return{dataEach:r?function(e,n){for(var i=t.getRawValue(n),r=t.getDataParams(n),a=0;a<u.length;a++){var s=u[a];e.setItemVisual(n,s,o[s](i,r))}}:null}}}}},tc={createOnAllSeries:!0,
// For legend.
performRawSeries:!0,reset:function(t,e){if(t.hasSymbolVisual&&!e.isSeriesFiltered(t))return{dataEach:t.getData().hasItemOption?function(t,e){for(var n=t.getItemModel(e),i=0;i<$u.length;i++){var o=$u[i],r=n.getShallow(o,!0);null!=r&&t.setItemVisual(e,o,r)}}:null}}};function ec(t,e,n){switch(n){case"color":return t.getItemVisual(e,"style")[t.getVisual("drawType")];case"opacity":return t.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(e,n)}}function nc(t,e){switch(e){case"color":return t.getVisual("style")[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(e)}}function ic(t,e,n,i){switch(n){case"color":t.ensureUniqueItemVisual(e,"style")[t.getVisual("drawType")]=i,t.setItemVisual(e,"colorFromPalette",!1);break;case"opacity":t.ensureUniqueItemVisual(e,"style").opacity=i;break;case"symbol":case"symbolSize":case"liftZ":t.setItemVisual(e,n,i)}}function oc(t,e){function n(e,n){var i=[];return e.eachComponent({mainType:"series",subType:t,query:n},function(t){i.push(t.seriesIndex)}),i}s([[t+"ToggleSelect","toggleSelect"],[t+"Select","select"],[t+"UnSelect","unselect"]],function(t){e(t[0],function(e,i,o){e=f({},e),o.dispatchAction(f(e,{type:t[1],seriesIndex:n(i,e)}))})})}function rc(e,n,i,r,a){var s=e+n;i.isSilent(s)||r.eachComponent({mainType:"series",subType:"pie"},function(e){for(var n=e.seriesIndex,r=e.option.selectedMap,l=a.selected,u=0;u<l.length;u++)if(l[u].seriesIndex===n){var c=e.getData(),d=Sn(c,a.fromActionPayload);i.trigger(s,{type:s,seriesId:e.id,name:o(d)?c.getName(d[0]):c.getName(d),selected:t(r)?r:f({},r)})}})}function ac(t,e,n){for(var i;t&&(!e(t)||(i=t,!n));)t=t.__hostTarget||t.parent;return i}var sc=y.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,o=e.width/2,r=e.height/2;t.moveTo(n,i-r),t.lineTo(n+o,i+r),t.lineTo(n-o,i+r),t.closePath()}}),lc=y.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,o=e.width/2,r=e.height/2;t.moveTo(n,i-r),t.lineTo(n+o,i),t.lineTo(n,i+r),t.lineTo(n-o,i),t.closePath()}}),uc=y.extend({type:"pin",shape:{
// x, y on the cusp
x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,i=e.y,o=e.width/5*3,r=Math.max(o,e.height),a=o/2,s=a*a/(r-a),l=i-r+a+s,u=Math.asin(s/a),c=Math.cos(u)*a,d=Math.sin(u),h=Math.cos(u),p=.6*a,f=.7*a;t.moveTo(n-c,l+s),t.arc(n,l,a,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(n+c-d*p,l+s+h*p,n,i-f,n,i),t.bezierCurveTo(n,i-f,n-c+d*p,l+s+h*p,n-c,l+s),t.closePath()}}),cc=y.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.height,i=e.width,o=e.x,r=e.y,a=i/3*2;t.moveTo(o,r),t.lineTo(o+a,r+n),t.lineTo(o,r+n/4*3),t.lineTo(o-a,r+n),t.lineTo(o,r),t.closePath()}}),dc={line:function(t,e,n,i,o){o.x1=t,o.y1=e+i/2,o.x2=t+n,o.y2=e+i/2},rect:function(t,e,n,i,o){o.x=t,o.y=e,o.width=n,o.height=i},roundRect:function(t,e,n,i,o){o.x=t,o.y=e,o.width=n,o.height=i,o.r=Math.min(n,i)/4},square:function(t,e,n,i,o){var r=Math.min(n,i);o.x=t,o.y=e,o.width=r,o.height=r},circle:function(t,e,n,i,o){o.cx=t+n/2,o.cy=e+i/2,o.r=Math.min(n,i)/2},diamond:function(t,e,n,i,o){o.cx=t+n/2,o.cy=e+i/2,o.width=n,o.height=i},pin:function(t,e,n,i,o){o.x=t+n/2,o.y=e+i/2,o.width=n,o.height=i},arrow:function(t,e,n,i,o){o.x=t+n/2,o.y=e+i/2,o.width=n,o.height=i},triangle:function(t,e,n,i,o){o.cx=t+n/2,o.cy=e+i/2,o.width=n,o.height=i}},hc={};s({line:W,rect:F,roundRect:F,square:F,circle:R,diamond:lc,pin:uc,arrow:cc,triangle:sc},function(t,e){hc[e]=new t});var pc=y.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,n){var i=pt(t,e,n),o=this.shape;return o&&"pin"===o.symbolType&&"inside"===e.position&&(i.y=n.y+.4*n.height),i},buildPath:function(t,e,n){var i=e.symbolType;if("none"!==i){var o=hc[i];o||(o=hc[i="rect"]),dc[i](e.x,e.y,e.width,e.height,o.shape),o.buildPath(t,o.shape,n)}}});function fc(t,e){if("image"!==this.type){var n=this.style;this.__isEmptyBrush?(n.stroke=t,n.fill=e||"#fff",n.lineWidth=2):"line"===this.shape.symbolType?n.stroke=t:n.fill=t,this.markRedraw()}}function gc(t,e,n,i,o,r,a){var s,l=0===t.indexOf("empty");return l&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(s=0===t.indexOf("image://")?ao(t.slice(8),new U(e,n,i,o),a?"center":"cover"):0===t.indexOf("path://")?ro(t.slice(7),{},new U(e,n,i,o),a?"center":"cover"):new pc({shape:{symbolType:t,x:e,y:n,width:i,height:o}})).__isEmptyBrush=l,s.setColor=fc,r&&s.setColor(r),s}function yc(t){return o(t)||(t=[+t,+t]),[t[0]||0,t[1]||0]}function mc(t,e){if(null!=t)return o(t)||(t=[t,t]),[Ge(t[0],e[0])||0,Ge(_(t[1],t[0]),e[1])||0]}var vc=new ft,xc=new gt(100),_c=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function bc(e,i){if("none"===e)return null;var r=i.getDevicePixelRatio(),a=i.getZr(),s="svg"===a.painter.type;e.dirty&&vc.delete(e);var l=vc.get(e);if(l)return l;var c=C(e,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});"none"===c.backgroundColor&&(c.backgroundColor=null);var d={repeat:"repeat"};return function(e){for(var i,l=[r],d=!0,h=0;h<_c.length;++h){var p=c[_c[h]];if(null!=p&&!o(p)&&!t(p)&&!u(p)&&"boolean"!=typeof p){d=!1;break}l.push(p)}if(d){i=l.join(",")+(s?"-svg":"");var f=xc.get(i);f&&(s?e.svgElement=f:e.image=f)}var g,y=wc(c.dashArrayX),m=function(t){if(!t||"object"==typeof t&&0===t.length)return[0,0];if(u(t)){var e=Math.ceil(t);return[e,e]}var i=n(t,function(t){return Math.ceil(t)});return t.length%2?i.concat(i):i}(c.dashArrayY),v=Sc(c.symbol),x=(M=y,n(M,function(t){return Mc(t)})),_=Mc(m),b=!s&&yt.createCanvas(),S=s&&{tag:"g",attrs:{},key:"dcl",children:[]},w=function(){for(var t=1,e=0,n=x.length;e<n;++e)t=an(t,x[e]);var i=1;for(e=0,n=v.length;e<n;++e)i=an(i,v[e].length);t*=i;var o=_*x.length*v.length;return{width:Math.max(1,Math.min(t,c.maxTileWidth)),height:Math.max(1,Math.min(o,c.maxTileHeight))}}();var M;b&&(b.width=w.width*r,b.height=w.height*r,g=b.getContext("2d"));(function(){g&&(g.clearRect(0,0,b.width,b.height),c.backgroundColor&&(g.fillStyle=c.backgroundColor,g.fillRect(0,0,b.width,b.height)));for(var t=0,e=0;e<m.length;++e)t+=m[e];if(t<=0)return;var n=-_,i=0,o=0,l=0;for(;n<w.height;){if(i%2==0){for(var u=o/2%v.length,d=0,h=0,p=0;d<2*w.width;){var f=0;for(e=0;e<y[l].length;++e)f+=y[l][e];if(f<=0)break;if(h%2==0){var x=.5*(1-c.symbolSize),M=d+y[l][h]*x,I=n+m[i]*x,D=y[l][h]*c.symbolSize,T=m[i]*c.symbolSize,C=p/2%v[u].length;A(M,I,D,T,v[u][C])}d+=y[l][h],++p,++h===y[l].length&&(h=0)}++l===y.length&&(l=0)}n+=m[i],++o,++i===m.length&&(i=0)}function A(t,e,n,i,o){var l=s?1:r,u=gc(o,t*l,e*l,n*l,i*l,c.color,c.symbolKeepAspect);if(s){var d=a.painter.renderOneToVNode(u);d&&S.children.push(d)}else mt(g,u)}})(),d&&xc.put(i,b||S);e.image=b,e.svgElement=S,e.svgWidth=w.width,e.svgHeight=w.height}(d),d.rotation=c.rotation,d.scaleX=d.scaleY=s?1:1/r,vc.set(e,d),e.dirty=!1,d}function Sc(e){if(!e||0===e.length)return[["rect"]];if(t(e))return[[e]];for(var n=!0,i=0;i<e.length;++i)if(!t(e[i])){n=!1;break}if(n)return Sc([e]);var o=[];for(i=0;i<e.length;++i)t(e[i])?o.push([e[i]]):o.push(e[i]);return o}function wc(t){if(!t||0===t.length)return[[0,0]];if(u(t))return[[r=Math.ceil(t),r]];for(var e=!0,i=0;i<t.length;++i)if(!u(t[i])){e=!1;break}if(e)return wc([t]);var o=[];for(i=0;i<t.length;++i)if(u(t[i])){var r=Math.ceil(t[i]);o.push([r,r])}else{(r=n(t[i],function(t){return Math.ceil(t)})).length%2==1?o.push(r.concat(r)):o.push(r)}return o}function Mc(t){for(var e=0,n=0;n<t.length;++n)e+=t[n];return t.length%2==1?2*e:e}var Ic=new vt,Dc={};var Tc=2e3,Cc=4500,Ac={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:Tc,CHART:3e3,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:Cc,ARIA:6e3,DECAL:7e3}},Lc="__flagInMainProcess",kc="__pendingUpdate",Pc="__needsUpdateStatus",Nc=/^[a-zA-Z0-9_]+$/,Oc="__connectUpdateStatus";function Rc(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(!this.isDisposed())return Vc(this,t,e);this.id}}function Ec(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Vc(this,t,e)}}function Vc(t,e,n){return n[0]=n[0]&&n[0].toLowerCase(),vt.prototype[e].apply(t,n)}var zc,Bc,Gc,Fc,Wc,Hc,Yc,Uc,Zc,Xc,jc,qc,Kc,Jc,$c,Qc,td,ed,nd=
/** @class */function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e}(vt),id=nd.prototype;id.on=Ec("on"),id.off=Ec("off");var od=
/** @class */function(e){function i(n,i,o){var r=e.call(this,new Ku)||this;r._chartsViews=[],r._chartsMap={},r._componentsViews=[],r._componentsMap={},r._pendingActions=[],o=o||{},t(i)&&(i=hd[i]),r._dom=n;o.ssr&&bt(function(t){var e=Un(t),n=e.dataIndex;if(null!=n){var i=a();return i.set("series_index",e.seriesIndex),i.set("data_index",n),e.ssrType&&i.set("ssr_type",e.ssrType),i}});var s=r._zr=xt(n,{renderer:o.renderer||"canvas",devicePixelRatio:o.devicePixelRatio,width:o.width,height:o.height,ssr:o.ssr,useDirtyRect:_(o.useDirtyRect,!1),useCoarsePointer:_(o.useCoarsePointer,"auto"),pointerSize:o.pointerSize});r._ssr=o.ssr,r._throttledZrFlush=gu(ut(s.flush,s),17),(i=nt(i))&&ms(i,!0),r._theme=i,r._locale=function(e){if(t(e)){var n=sr[e.toUpperCase()]||{};return e===or||e===rr?nt(n):et(nt(n),nt(sr[ar]),!1)}return et(nt(e),nt(sr[ar]),!1)}(o.locale||ur),r._coordSysMgr=new ja;var l=r._api=$c(r);function u(t,e){return t.__prio-e.__prio}return _t(dd,u),_t(ud,u),r._scheduler=new Cu(r,l,ud,dd),r._messageCenter=new nd,r._initEvents(),r.resize=ut(r.resize,r),s.animation.on("frame",r._onframe,r),Xc(s,r),jc(s,r),ct(r),r}return h(i,e),i.prototype._onframe=function(){if(!this._disposed){ed(this);var t=this._scheduler;if(this[kc]){var e=this[kc].silent;this[Lc]=!0;try{zc(this),Fc.update.call(this,null,this[kc].updateParams)}catch(a){throw this[Lc]=!1,this[kc]=null,a}this._zr.flush(),this[Lc]=!1,this[kc]=null,Uc.call(this,e),Zc.call(this,e)}else if(t.unfinished){var n=1,i=this._model,o=this._api;t.unfinished=!1;do{var r=+new Date;t.performSeriesTasks(i),t.performDataProcessorTasks(i),Hc(this,i),t.performVisualTasks(i),Jc(this,this._model,o,"remain",{}),n-=+new Date-r}while(n>0&&t.unfinished);t.unfinished||this._zr.flush()}}},i.prototype.getDom=function(){return this._dom},i.prototype.getId=function(){return this.id},i.prototype.getZr=function(){return this._zr},i.prototype.isSSR=function(){return this._ssr},i.prototype.setOption=function(t,e,n){if(!this[Lc])if(this._disposed)this.id;else{var i,o,a;if(r(e)&&(n=e.lazyUpdate,i=e.silent,o=e.replaceMerge,a=e.transition,e=e.notMerge),this[Lc]=!0,!this._model||e){var s=new Ka(this._api),l=this._theme,u=this._model=new Fa;u.scheduler=this._scheduler,u.ssr=this._ssr,u.init(null,null,null,l,this._locale,s)}this._model.setOption(t,{replaceMerge:o},cd);var c={seriesTransition:a,optionChanged:!0};if(n)this[kc]={silent:i,updateParams:c},this[Lc]=!1,this.getZr().wakeUp();else{try{zc(this),Fc.update.call(this,null,c)}catch(d){throw this[kc]=null,this[Lc]=!1,d}this._ssr||this._zr.flush(),this[kc]=null,this[Lc]=!1,Uc.call(this,i),Zc.call(this,i)}}},i.prototype.setTheme=function(){},i.prototype.getModel=function(){return this._model},i.prototype.getOption=function(){return this._model&&this._model.getOption()},i.prototype.getWidth=function(){return this._zr.getWidth()},i.prototype.getHeight=function(){return this._zr.getHeight()},i.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||d.hasGlobalWindow&&window.devicePixelRatio||1},i.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},i.prototype.renderToCanvas=function(t){return t=t||{},this._zr.painter.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},i.prototype.renderToSVGString=function(t){return t=t||{},this._zr.painter.renderToString({useViewBox:t.useViewBox})},i.prototype.getSvgDataURL=function(){if(d.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return s(e,function(t){t.stopAnimation(null,!0)}),t.painter.toDataURL()}},i.prototype.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,n=this._model,i=[],o=this;s(e,function(t){n.eachComponent({mainType:t},function(t){var e=o._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)})});var r="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return s(i,function(t){t.group.ignore=!1}),r}this.id},i.prototype.getConnectedDataURL=function(t){if(!this._disposed){var e="svg"===t.type,n=this.group,i=Math.min,o=Math.max,r=Infinity;if(gd[n]){var a=r,l=r,u=-Infinity,c=-Infinity,d=[],h=t&&t.pixelRatio||this.getDevicePixelRatio();s(fd,function(r,s){if(r.group===n){var h=e?r.getZr().painter.getSvgDom().innerHTML:r.renderToCanvas(nt(t)),p=r.getDom().getBoundingClientRect();a=i(p.left,a),l=i(p.top,l),u=o(p.right,u),c=o(p.bottom,c),d.push({dom:h,left:p.left,top:p.top})}});var p=(u*=h)-(a*=h),f=(c*=h)-(l*=h),g=yt.createCanvas(),y=xt(g,{renderer:e?"svg":"canvas"});if(y.resize({width:p,height:f}),e){var m="";return s(d,function(t){var e=t.left-a,n=t.top-l;m+='<g transform="translate('+e+","+n+')">'+t.dom+"</g>"}),y.painter.getSvgRoot().innerHTML=m,t.connectedBackgroundColor&&y.painter.setBackgroundColor(t.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}return t.connectedBackgroundColor&&y.add(new F({shape:{x:0,y:0,width:p,height:f},style:{fill:t.connectedBackgroundColor}})),s(d,function(t){var e=new b({style:{x:t.left*h-a,y:t.top*h-l,image:t.dom}});y.add(e)}),y.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}this.id},i.prototype.convertToPixel=function(t,e){return Wc(this,"convertToPixel",t,e)},i.prototype.convertFromPixel=function(t,e){return Wc(this,"convertFromPixel",t,e)},i.prototype.containPixel=function(t,e){if(!this._disposed){var n,i=In(this._model,t);return s(i,function(t,i){i.indexOf("Models")>=0&&s(t,function(t){var o=t.coordinateSystem;if(o&&o.containPoint)n=n||!!o.containPoint(e);else if("seriesModels"===i){var r=this._chartsMap[t.__viewId];r&&r.containPoint&&(n=n||r.containPoint(e,t))}},this)},this),!!n}this.id},i.prototype.getVisual=function(t,e){var n=In(this._model,t,{defaultMainType:"series"}),i=n.seriesModel.getData(),o=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?i.indexOfRawIndex(n.dataIndex):null;return null!=o?ec(i,o,e):nc(i,e)},i.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},i.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},i.prototype._initEvents=function(){var t,e,n,i=this;s(ad,function(t){var e=function(e){var n,o=i.getModel(),r=e.target;if("globalout"===t?n={}:r&&ac(r,function(t){var e=Un(t);if(e&&null!=e.dataIndex){var i=e.dataModel||o.getSeriesByIndex(e.seriesIndex);return n=i&&i.getDataParams(e.dataIndex,e.dataType,r)||{},!0}if(e.eventData)return n=f({},e.eventData),!0},!0),n){var a=n.componentType,s=n.componentIndex;"markLine"!==a&&"markPoint"!==a&&"markArea"!==a||(a="series",s=n.seriesIndex);var l=a&&null!=s&&o.getComponent(a,s),u=l&&i["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];n.event=e,n.type=t,i._$eventProcessor.eventInfo={targetEl:r,packedEvent:n,model:l,view:u},i.trigger(t,n)}};e.zrEventfulCallAtLast=!0,i._zr.on(t,e,i)}),s(ld,function(t,e){i._messageCenter.on(e,function(t){this.trigger(e,t)},i)}),s(["selectchanged"],function(t){i._messageCenter.on(t,function(e){this.trigger(t,e)},i)}),t=this._messageCenter,e=this,n=this._api,t.on("selectchanged",function(t){var i=n.getModel();t.isFromClick?(rc("map","selectchanged",e,i,t),rc("pie","selectchanged",e,i,t)):"select"===t.fromAction?(rc("map","selected",e,i,t),rc("pie","selected",e,i,t)):"unselect"===t.fromAction&&(rc("map","unselected",e,i,t),rc("pie","unselected",e,i,t))})},i.prototype.isDisposed=function(){return this._disposed},i.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},i.prototype.dispose=function(){if(this._disposed)this.id;else{this._disposed=!0,this.getDom()&&Ln(this.getDom(),md,"");var t=this,e=t._api,n=t._model;s(t._componentsViews,function(t){t.dispose(n,e)}),s(t._chartsViews,function(t){t.dispose(n,e)}),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete fd[t.id]}},i.prototype.resize=function(t){if(!this[Lc])if(this._disposed)this.id;else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this[kc]&&(null==i&&(i=this[kc].silent),n=!0,this[kc]=null),this[Lc]=!0;try{n&&zc(this),Fc.update.call(this,{type:"resize",animation:f({
// Disable animation
duration:0},t&&t.animation)})}catch(o){throw this[Lc]=!1,o}this[Lc]=!1,Uc.call(this,i),Zc.call(this,i)}}},i.prototype.showLoading=function(t,e){if(this._disposed)this.id;else if(r(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),pd[t]){var n=pd[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},i.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},i.prototype.makeActionFromEvent=function(t){var e=f({},t);return e.type=ld[t.type],e},i.prototype.dispatchAction=function(t,e){if(this._disposed)this.id;else if(r(e)||(e={silent:!!e}),sd[t.type]&&this._model)if(this[Lc])this._pendingActions.push(t);else{var n=e.silent;Yc.call(this,t,n);var i=e.flush;i?this._zr.flush():!1!==i&&d.browser.weChat&&this._throttledZrFlush(),Uc.call(this,n),Zc.call(this,n)}},i.prototype.updateLabelLayout=function(){Ic.trigger("series:layoutlabels",this._model,this._api,{
// Not adding series labels.
// TODO
updatedSeries:[]})},i.prototype.appendData=function(t){if(this._disposed)this.id;else{var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},i.internalField=function(){function t(t){t.clearColorPalette(),t.eachSeries(function(t){t.clearColorPalette()})}function e(t){for(var e=[],n=t.currentStates,i=0;i<n.length;i++){var o=n[i];"emphasis"!==o&&"blur"!==o&&"select"!==o&&e.push(o)}t.selected&&t.states.select&&e.push("select"),2===t.hoverState&&t.states.emphasis?e.push("emphasis"):1===t.hoverState&&t.states.blur&&e.push("blur"),t.useStates(e)}function i(t,e){if(!t.preventAutoZ){var n=t.get("z")||0,i=t.get("zlevel")||0;e.eachRendered(function(t){return r(t,n,i,-Infinity),!0})}}function r(t,e,n,i){var o=t.getTextContent(),a=t.getTextGuideLine();if(t.isGroup)for(var s=t.childrenRef(),l=0;l<s.length;l++)i=Math.max(r(s[l],e,n,i),i);else t.z=e,t.zlevel=n,i=Math.max(t.z2,i);if(o&&(o.z=e,o.zlevel=n,isFinite(i)&&(o.z2=i+2)),a){var u=t.textGuideLineConfig;a.z=e,a.zlevel=n,isFinite(i)&&(a.z2=i+(u&&u.showAbove?1:-1))}return i}function l(t,e){e.eachRendered(function(t){if(!ji(t)){var e=t.getTextContent(),n=t.getTextGuideLine();t.stateTransition&&(t.stateTransition=null),e&&e.stateTransition&&(e.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),t.hasState()?(t.prevStates=t.currentStates,t.clearStates()):t.prevStates&&(t.prevStates=null)}})}function u(t,n){var i=t.getModel("stateAnimation"),o=t.isAnimationEnabled(),r=i.get("duration"),a=r>0?{duration:r,delay:i.get("delay"),easing:i.get("easing")}:null;n.eachRendered(function(t){if(t.states&&t.states.emphasis){if(ji(t))return;if(t instanceof y&&function(t){var e=qn(t);e.normalFill=t.style.fill,e.normalStroke=t.style.stroke;var n=t.states.select||{};e.selectFill=n.style&&n.style.fill||null,e.selectStroke=n.style&&n.style.stroke||null}(t),t.__dirty){var n=t.prevStates;n&&t.useStates(n)}if(o){t.stateTransition=a;var i=t.getTextContent(),r=t.getTextGuideLine();i&&(i.stateTransition=a),r&&(r.stateTransition=a)}t.__dirty&&e(t)}})}zc=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),Bc(t,!0),Bc(t,!1),e.plan()},Bc=function(t,e){for(var n=t._model,i=t._scheduler,o=e?t._componentsViews:t._chartsViews,r=e?t._componentsMap:t._chartsMap,a=t._zr,s=t._api,l=0;l<o.length;l++)o[l].__alive=!1;function u(t){var l=t.__requireNewView;t.__requireNewView=!1;var u="_ec_"+t.id+"_"+t.type,c=!l&&r[u];if(!c){var d=Rn(t.type);(c=new(e?nu.getClass(d.main,d.sub):
// FIXME:TS
// (ChartView as ChartViewConstructor).getClass('series', classType.sub)
// For backward compat, still support a chart type declared as only subType
// like "liquidfill", but recommend "series.liquidfill"
// But need a base class to make a type series.
au.getClass(d.sub))).init(n,s),r[u]=c,o.push(c),a.add(c.group)}t.__viewId=c.__id=u,c.__alive=!0,c.__model=t,c.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},!e&&i.prepareView(c,t,n,s)}e?n.eachComponent(function(t,e){"series"!==t&&u(e)}):n.eachSeries(u);for(l=0;l<o.length;){var c=o[l];c.__alive?l++:(!e&&c.renderTask.dispose(),a.remove(c.group),c.dispose(n,s),o.splice(l,1),r[c.__id]===c&&delete r[c.__id],c.__id=c.group.__ecComponentInfo=null)}},Gc=function(t,e,n,i,r){var l=t._model;if(l.setUpdatePayload(n),i){var u={};u[i+"Id"]=n[i+"Id"],u[i+"Index"]=n[i+"Index"],u[i+"Name"]=n[i+"Name"];var c={mainType:i,query:u};r&&(c.subType=r);var d,h=n.excludeSeriesId;null!=h&&(d=a(),s(dn(h),function(t){var e=xn(t,null);null!=e&&d.set(e,!0)})),l&&l.eachComponent(c,function(e){if(!(d&&null!=d.get(e.id)))if(Wi(n))if(e instanceof jl)n.type!==ti||n.notBlur||e.get(["emphasis","disabled"])||function(t,e,n){var i=t.seriesIndex,r=t.getData(e.dataType);if(r){var a=Sn(r,e);a=(o(a)?a[0]:a)||0;var s=r.getItemGraphicEl(a);if(!s)for(var l=r.count(),u=0;!s&&u<l;)s=r.getItemGraphicEl(u++);if(s){var c=Un(s);Ci(i,c.focus,c.blurScope,n)}else{var d=t.get(["emphasis","focus"]),h=t.get(["emphasis","blurScope"]);null!=d&&Ci(i,d,h,n)}}}(e,n,t._api);else{var i=Li(e.mainType,e.componentIndex,n.name,t._api),r=i.focusSelf,a=i.dispatchers;n.type===ti&&r&&!n.notBlur&&Ai(e.mainType,e.componentIndex,t._api),a&&s(a,function(t){n.type===ti?_i(t):bi(t)})}else Fi(n)&&e instanceof jl&&(!function(t,e){if(Fi(e)){var n=e.dataType,i=Sn(t.getData(n),e);o(i)||(i=[i]),t[e.type===oi?"toggleSelect":e.type===ni?"select":"unselect"](i,n)}}(e,n,t._api),ki(e),td(t))},t),l&&l.eachComponent(c,function(e){d&&null!=d.get(e.id)||p(t["series"===i?"_chartsMap":"_componentsMap"][e.__viewId])},t)}else s([].concat(t._componentsViews).concat(t._chartsViews),p);function p(i){i&&i.__alive&&i[e]&&i[e](i.__model,l,t._api,n)}},Fc={prepareAndUpdate:function(t){zc(this),Fc.update.call(this,t,{
// Needs to mark option changed if newOption is given.
// It's from MagicType.
// TODO If use a separate flag optionChanged in payload?
optionChanged:null!=t.newOption})},update:function(e,n){var i=this._model,o=this._api,r=this._zr,a=this._coordSysMgr,s=this._scheduler;if(i){i.setUpdatePayload(e),s.restoreData(i,e),s.performSeriesTasks(i),a.create(i,o),s.performDataProcessorTasks(i,e),Hc(this,i),a.update(i,o),t(i),s.performVisualTasks(i,e),qc(this,i,o,e,n);var l=i.get("backgroundColor")||"transparent",u=i.get("darkMode");r.setBackgroundColor(l),null!=u&&"auto"!==u&&r.setDarkMode(u),Ic.trigger("afterupdate",i,o)}},updateTransform:function(e){var n=this,i=this._model,o=this._api;if(i){i.setUpdatePayload(e);var r=[];i.eachComponent(function(t,a){if("series"!==t){var s=n.getViewOfComponentModel(a);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(a,i,o,e);l&&l.update&&r.push(s)}else r.push(s)}});var s=a();i.eachSeries(function(t){var r=n._chartsMap[t.__viewId];if(r.updateTransform){var a=r.updateTransform(t,i,o,e);a&&a.update&&s.set(t.uid,1)}else s.set(t.uid,1)}),t(i),this._scheduler.performVisualTasks(i,e,{setDirty:!0,dirtyMap:s}),Jc(this,i,o,e,{},s),Ic.trigger("afterupdate",i,o)}},updateView:function(e){var n=this._model;n&&(n.setUpdatePayload(e),au.markUpdateMethod(e,"updateView"),t(n),this._scheduler.performVisualTasks(n,e,{setDirty:!0}),qc(this,n,this._api,e,{}),Ic.trigger("afterupdate",n,this._api))},updateVisual:function(e){var n=this,i=this._model;i&&(i.setUpdatePayload(e),i.eachSeries(function(t){t.getData().clearAllVisual()}),au.markUpdateMethod(e,"updateVisual"),t(i),this._scheduler.performVisualTasks(i,e,{visualType:"visual",setDirty:!0}),i.eachComponent(function(t,o){if("series"!==t){var r=n.getViewOfComponentModel(o);r&&r.__alive&&r.updateVisual(o,i,n._api,e)}}),i.eachSeries(function(t){n._chartsMap[t.__viewId].updateVisual(t,i,n._api,e)}),Ic.trigger("afterupdate",i,this._api))},updateLayout:function(t){Fc.update.call(this,t)}},Wc=function(t,e,n,i){if(t._disposed)t.id;else for(var o,r=t._model,a=t._coordSysMgr.getCoordinateSystems(),s=In(r,n),l=0;l<a.length;l++){var u=a[l];if(u[e]&&null!=(o=u[e](r,s,i)))return o}},Hc=function(t,e){var n=t._chartsMap,i=t._scheduler;e.eachSeries(function(t){i.updateStreamModes(t,n[t.__viewId])})},Yc=function(t,e){var i=this,o=this.getModel(),r=t.type,a=t.escapeConnect,l=sd[r],u=l.actionInfo,c=(u.update||"update").split(":"),d=c.pop(),h=null!=c[0]&&Rn(c[0]);this[Lc]=!0;var p=[t],g=!1;t.batch&&(g=!0,p=n(t.batch,function(e){return(e=C(f({},e),t)).batch=null,e}));var y,m=[],v=Fi(t),x=Wi(t);if(x&&Ti(this._api),s(p,function(e){if((y=(y=l.action(e,i._model,i._api))||f({},e)).type=u.event||y.type,m.push(y),x){var n=Dn(t),o=n.queryOptionMap,r=n.mainTypeSpecified?o.keys()[0]:"series";Gc(i,d,e,r),td(i)}else v?(Gc(i,d,e,"series"),td(i)):h&&Gc(i,d,e,h.main,h.sub)}),"none"!==d&&!x&&!v&&!h)try{this[kc]?(zc(this),Fc.update.call(this,t),this[kc]=null):Fc[d].call(this,t)}catch(S){throw this[Lc]=!1,S}if(y=g?{type:u.event||r,escapeConnect:a,batch:m}:m[0],this[Lc]=!1,!e){var _=this._messageCenter;if(_.trigger(y.type,y),v){var b={type:"selectchanged",escapeConnect:a,selected:Pi(o),isFromClick:t.isFromClick||!1,fromAction:t.type,fromActionPayload:t};_.trigger(b.type,b)}}},Uc=function(t){for(var e=this._pendingActions;e.length;){var n=e.shift();Yc.call(this,n,t)}},Zc=function(t){!t&&this.trigger("updated")},Xc=function(t,e){t.on("rendered",function(n){e.trigger("rendered",n),
// Although zr is dirty if initial animation is not finished
// and this checking is called on frame, we also check
// animation finished for robustness.
!t.animation.isFinished()||e[kc]||e._scheduler.unfinished||e._pendingActions.length||e.trigger("finished")})},jc=function(t,e){t.on("mouseover",function(t){var n=ac(t.target,Gi);n&&(!function(t,e,n){var i=Un(t),o=Li(i.componentMainType,i.componentIndex,i.componentHighDownName,n),r=o.dispatchers,a=o.focusSelf;r?(a&&Ai(i.componentMainType,i.componentIndex,n),s(r,function(t){return vi(t,e)})):(Ci(i.seriesIndex,i.focus,i.blurScope,n),"self"===i.focus&&Ai(i.componentMainType,i.componentIndex,n),vi(t,e))}(n,t,e._api),td(e))}).on("mouseout",function(t){var n=ac(t.target,Gi);n&&(!function(t,e,n){Ti(n);var i=Un(t),o=Li(i.componentMainType,i.componentIndex,i.componentHighDownName,n).dispatchers;o?s(o,function(t){return xi(t,e)}):xi(t,e)}(n,t,e._api),td(e))}).on("click",function(t){var n=ac(t.target,function(t){return null!=Un(t).dataIndex},!0);if(n){var i=n.selected?"unselect":"select",o=Un(n);e._api.dispatchAction({type:i,dataType:o.dataType,dataIndexInside:o.dataIndex,seriesIndex:o.seriesIndex,isFromClick:!0})}})},qc=function(t,e,n,i,o){!function(t){var e=[],n=[],i=!1;if(t.eachComponent(function(t,o){var r=o.get("zlevel")||0,a=o.get("z")||0,s=o.getZLevelKey();i=i||!!s,("series"===t?n:e).push({zlevel:r,z:a,idx:o.componentIndex,type:t,key:s})}),i){var o,r,a=e.concat(n);_t(a,function(t,e){return t.zlevel===e.zlevel?t.z-e.z:t.zlevel-e.zlevel}),s(a,function(e){var n=t.getComponent(e.type,e.idx),i=e.zlevel,a=e.key;null!=o&&(i=Math.max(o,i)),a?(i===o&&a!==r&&i++,r=a):r&&(i===o&&i++,r=""),o=i,n.setZLevel(i)})}}(e),Kc(t,e,n,i,o),s(t._chartsViews,function(t){t.__alive=!1}),Jc(t,e,n,i,o),s(t._chartsViews,function(t){t.__alive||t.remove(e,n)})},Kc=function(t,e,n,o,r,a){s(a||t._componentsViews,function(t){var r=t.__model;l(r,t),t.render(r,e,n,o),i(r,t),u(r,t)})},Jc=function(t,e,n,o,r,a){var s=t._scheduler;r=f(r||{},{updatedSeries:e.getSeries()}),Ic.trigger("series:beforeupdate",e,n,r);var c=!1;e.eachSeries(function(e){var n=t._chartsMap[e.__viewId];n.__alive=!0;var i=n.renderTask;s.updatePayload(i,o),l(e,n),a&&a.get(e.uid)&&i.dirty(),i.perform(s.getPerformArgs(i))&&(c=!0),n.group.silent=!!e.get("silent"),function(t,e){var n=t.get("blendMode")||null;e.eachRendered(function(t){t.isGroup||(t.style.blend=n)})}(e,n),ki(e)}),s.unfinished=c||s.unfinished,Ic.trigger("series:layoutlabels",e,n,r),Ic.trigger("series:transition",e,n,r),e.eachSeries(function(e){var n=t._chartsMap[e.__viewId];i(e,n),u(e,n)}),function(t,e){var n=t._zr,i=n.storage,o=0;i.traverse(function(t){t.isGroup||o++}),o>e.get("hoverLayerThreshold")&&!d.node&&!d.worker&&e.eachSeries(function(e){if(!e.preventUsingHoverLayer){var n=t._chartsMap[e.__viewId];n.__alive&&n.eachRendered(function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)})}})}(t,e),Ic.trigger("series:afterupdate",e,n,r)},td=function(t){t[Pc]=!0,t.getZr().wakeUp()},ed=function(t){t[Pc]&&(t.getZr().storage.traverse(function(t){ji(t)||e(t)}),t[Pc]=!1)},$c=function(t){return new(/** @class */
function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return h(n,e),n.prototype.getCoordinateSystems=function(){return t._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(e){for(;e;){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}},n.prototype.enterEmphasis=function(e,n){_i(e,n),td(t)},n.prototype.leaveEmphasis=function(e,n){bi(e,n),td(t)},n.prototype.enterBlur=function(e){Si(e),td(t)},n.prototype.leaveBlur=function(e){wi(e),td(t)},n.prototype.enterSelect=function(e){Mi(e),td(t)},n.prototype.leaveSelect=function(e){Ii(e),td(t)},n.prototype.getModel=function(){return t.getModel()},n.prototype.getViewOfComponentModel=function(e){return t.getViewOfComponentModel(e)},n.prototype.getViewOfSeriesModel=function(e){return t.getViewOfSeriesModel(e)},n}(Za))(t)},Qc=function(t){function e(t,e){for(var n=0;n<t.length;n++){t[n][Oc]=e}}s(ld,function(n,i){t._messageCenter.on(i,function(n){if(gd[t.group]&&0!==t[Oc]){if(n&&n.escapeConnect)return;var i=t.makeActionFromEvent(n),o=[];s(fd,function(e){e!==t&&e.group===t.group&&o.push(e)}),e(o,0),s(o,function(t){1!==t[Oc]&&t.dispatchAction(i)}),e(o,2)}})})}}(),i}(vt),rd=od.prototype;rd.on=Rc("on"),rd.off=Rc("off"),rd.one=function(t,e,n){var i=this;this.on.call(this,t,function n(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];e&&e.apply&&e.apply(this,o),i.off(t,n)},n)};var ad=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var sd={},ld={},ud=[],cd=[],dd=[],hd={},pd={},fd={},gd={},yd=+new Date-0,md="_echarts_instance_";function vd(t,e,n){var i=function(t){return fd[function(t,e){return t.getAttribute?t.getAttribute(e):t[e]}(t,md)]}(t);if(i)return i;var o=new od(t,e,n);return o.id="ec_"+yd++,fd[o.id]=o,Ln(t,md,o.id),Qc(o),Ic.trigger("afterinit",o),o}function xd(t,e){hd[t]=e}function _d(t){l(cd,t)<0&&cd.push(t)}function bd(t,e){Dd(ud,t,e,2e3)}function Sd(t,e){Ic.on(t,e)}function wd(t,e,n){g(e)&&(n=e,e="");var o=r(t)?t.type:[t,t={event:e}][0];t.event=(t.event||o).toLowerCase(),e=t.event,ld[e]||(i(Nc.test(o)&&Nc.test(e)),sd[o]||(sd[o]={action:n,actionInfo:t}),ld[e]=o)}function Md(t,e){Dd(dd,t,e,3e3,"visual")}var Id=[];function Dd(t,e,n,i,o){if((g(e)||r(e))&&(n=e,e=i),!(l(Id,n)>=0)){Id.push(n);var a=Cu.wrapStageHandler(n,o);a.__prio=e,a.__raw=n,t.push(a)}}function Td(t,e){pd[t]=e}var Cd=function(t){var e=(t=nt(t)).type;e||sn("");var n=e.split(":");2!==n.length&&sn("");var i=!1;"echarts"===n[0]&&(e=n[1],i=!0),t.__isBuiltIn=i,ul.set(e,t)};function Ad(t){return null==t?0:t.length||1}function Ld(t){return t}Md(Tc,wu),Md(Cc,Iu),Md(Cc,Du),Md(Tc,Qu),Md(Cc,tc),Md(7e3,function(t,e){t.eachRawSeries(function(n){if(!t.isSeriesFiltered(n)){var i=n.getData();i.hasItemVisual()&&i.each(function(t){var n=i.getItemVisual(t,"decal");n&&(i.ensureUniqueItemVisual(t,"style").decal=bc(n,e))});var o=i.getVisual("decal");if(o)i.getVisual("style").decal=bc(o,e)}})}),_d(ms),bd(900,function(t){var e=a();t.eachSeries(function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),o=t.getData(),r={
// Used for calculate axis extent automatically.
// TODO: Type getCalculationInfo return more specific type?
stackResultDimension:o.getCalculationInfo("stackResultDimension"),stackedOverDimension:o.getCalculationInfo("stackedOverDimension"),stackedDimension:o.getCalculationInfo("stackedDimension"),stackedByDimension:o.getCalculationInfo("stackedByDimension"),isStackedByIndex:o.getCalculationInfo("isStackedByIndex"),data:o,seriesModel:t};if(!r.stackedDimension||!r.isStackedByIndex&&!r.stackedByDimension)return;i.length&&o.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(r)}}),e.each(vs)}),Td("default",function(t,e){C(e=e||{},{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 n=new X,i=new F({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});n.add(i);var o,r=new Q({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new F({style:{fill:"none"},textContent:r,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});return n.add(a),e.showSpinner&&((o=new Y({shape:{startAngle:-Tu/2,endAngle:-Tu/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*Tu/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:3*Tu/2}).delay(300).start("circularInOut"),n.add(o)),n.resize=function(){var n=r.getBoundingRect().width,s=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*s-(e.showSpinner&&n?10:0)-n)/2-(e.showSpinner&&n?0:5+n/2)+(e.showSpinner?0:n/2)+(n?0:s),u=t.getHeight()/2;e.showSpinner&&o.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},n.resize(),n}),wd({type:ti,event:ti,update:ti},ht),wd({type:ei,event:ei,update:ei},ht),wd({type:ni,event:ni,update:ni},ht),wd({type:ii,event:ii,update:ii},ht),wd({type:oi,event:oi,update:oi},ht),xd("light",Yu),xd("dark",qu);var kd=
/** @class */function(){function t(t,e,n,i,o,r){this._old=t,this._new=e,this._oldKeyGetter=n||Ld,this._newKeyGetter=i||Ld,this.context=o,this._diffModeMultiple="multiple"===r}return t.prototype.add=function(t){return this._add=t,this},t.prototype.update=function(t){return this._update=t,this},t.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},t.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},t.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},t.prototype.remove=function(t){return this._remove=t,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},i=new Array(t.length),o=new Array(e.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(e,n,o,"_newKeyGetter");for(var r=0;r<t.length;r++){var a=i[r],s=n[a],l=Ad(s);if(l>1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,r)}else 1===l?(n[a]=null,this._update&&this._update(s,r)):this._remove&&this._remove(r)}this._performRestAdd(o,n)},t.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},i={},o=[],r=[];this._initIndexMap(t,n,o,"_oldKeyGetter"),this._initIndexMap(e,i,r,"_newKeyGetter");for(var a=0;a<o.length;a++){var s=o[a],l=n[s],u=i[s],c=Ad(l),d=Ad(u);if(c>1&&1===d)this._updateManyToOne&&this._updateManyToOne(u,l),i[s]=null;else if(1===c&&d>1)this._updateOneToMany&&this._updateOneToMany(u,l),i[s]=null;else if(1===c&&1===d)this._update&&this._update(u,l),i[s]=null;else if(c>1&&d>1)this._updateManyToMany&&this._updateManyToMany(u,l),i[s]=null;else if(c>1)for(var h=0;h<c;h++)this._remove&&this._remove(l[h]);else this._remove&&this._remove(l)}this._performRestAdd(r,i)},t.prototype._performRestAdd=function(t,e){for(var n=0;n<t.length;n++){var i=t[n],o=e[i],r=Ad(o);if(r>1)for(var a=0;a<r;a++)this._add&&this._add(o[a]);else 1===r&&this._add&&this._add(o);e[i]=null}},t.prototype._initIndexMap=function(t,e,n,i){for(var o=this._diffModeMultiple,r=0;r<t.length;r++){var a="_ec_"+this[i](t[r],r);if(o||(n[r]=a),e){var s=e[a],l=Ad(s);0===l?(e[a]=r,o&&n.push(a)):1===l?e[a]=[s,r]:s.push(r)}}},t}(),Pd=
/** @class */function(){function t(t,e){this._encode=t,this._schema=e}return t.prototype.get=function(){return{
// Do not generate full dimension name until fist used.
fullDimensions:this._getFullDimensionNames(),encode:this._encode}},t.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},t}();function Nd(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function Od(t){return"category"===t?"ordinal":"time"===t?"time":"float"}var Rd=
/** @class */
function(){return function(t){this.otherDims={},null!=t&&f(this,t)}}(),Ed=wn(),Vd={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},zd=
/** @class */function(){function t(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return t.prototype.isDimensionOmitted=function(){return this._dimOmitted},t.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=Fd(this.source)))},t.prototype.getSourceDimensionIndex=function(t){return _(this._dimNameMap.get(t),-1)},t.prototype.getSourceDimension=function(t){var e=this.source.dimensionsDefine;if(e)return e[t]},t.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,e=ks(this.source),n=!Wd(t),i="",o=[],r=0,a=0;r<t;r++){var s=void 0,l=void 0,u=void 0,c=this.dimensions[a];if(c&&c.storeDimIndex===r)s=e?c.name:null,l=c.type,u=c.ordinalMeta,a++;else{var d=this.getSourceDimension(r);d&&(s=e?d.name:null,l=d.type)}o.push({property:s,type:l,ordinalMeta:u}),!e||null==s||c&&c.isCalculationCoord||(i+=n?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),i+="$",i+=Vd[l]||"f",u&&(i+=u.uid),i+="$"}var h=this.source;return{dimensions:o,hash:[h.seriesLayoutBy,h.startIndex,i].join("$$")}},t.prototype.makeOutputDimensionNames=function(){for(var t=[],e=0,n=0;e<this._fullDimCount;e++){var i=void 0,o=this.dimensions[n];if(o&&o.storeDimIndex===e)o.isCalculationCoord||(i=o.name),n++;else{var r=this.getSourceDimension(e);r&&(i=r.name)}t.push(i)}return t},t.prototype.appendCalculationDimension=function(t){this.dimensions.push(t),t.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},t}();function Bd(t){return t instanceof zd}function Gd(t){for(var e=a(),n=0;n<(t||[]).length;n++){var i=t[n],o=r(i)?i.name:i;null!=o&&null==e.get(o)&&e.set(o,n)}return e}function Fd(t){var e=Ed(t);return e.dimNameMap||(e.dimNameMap=Gd(t.dimensionsDefine))}function Wd(t){return t>30}var Hd,Yd,Ud,Zd,Xd,jd,qd,Kd=r,Jd=n,$d="undefined"==typeof Int32Array?Array:Int32Array,Qd=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],th=["_approximateExtent"],eh=
/** @class */function(){function e(e,n){var i;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 o=!1;Bd(e)?(i=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(o=!0,i=e),i=i||["x","y"];for(var r={},l=[],u={},c=!1,d={},h=0;h<i.length;h++){var p=i[h],f=t(p)?new Rd({name:p}):p instanceof Rd?p:new Rd(p),g=f.name;f.type=f.type||"float",f.coordDim||(f.coordDim=g,f.coordDimIndex=0);var y=f.otherDims=f.otherDims||{};l.push(g),r[g]=f,null!=d[g]&&(c=!0),f.createInvertedIndices&&(u[g]=[]),0===y.itemName&&(this._nameDimIdx=h),0===y.itemId&&(this._idDimIdx=h),o&&(f.storeDimIndex=h)}if(this.dimensions=l,this._dimInfos=r,this._initGetDimensionInfo(c),this.hostModel=n,this._invertedIndicesMap=u,this._dimOmitted){var m=this._dimIdxToName=a();s(l,function(t){m.set(r[t].storeDimIndex,t)})}}return e.prototype.getDimension=function(t){var e=this._recognizeDimIndex(t);if(null==e)return t;if(e=t,!this._dimOmitted)return this.dimensions[e];var n=this._dimIdxToName.get(e);if(null!=n)return n;var i=this._schema.getSourceDimension(e);return i?i.name:void 0},e.prototype.getDimensionIndex=function(t){var e=this._recognizeDimIndex(t);if(null!=e)return e;if(null==t)return-1;var n=this._getDimInfo(t);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(t):-1},e.prototype._recognizeDimIndex=function(t){if(u(t)||null!=t&&!isNaN(t)&&!this._getDimInfo(t)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(t)<0))return+t},e.prototype._getStoreDimIndex=function(t){return this.getDimensionIndex(t)},e.prototype.getDimensionInfo=function(t){return this._getDimInfo(this.getDimension(t))},e.prototype._initGetDimensionInfo=function(t){var e=this._dimInfos;this._getDimInfo=t?function(t){return e.hasOwnProperty(t)?e[t]:void 0}:function(t){return e[t]}},e.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},e.prototype.mapDimension=function(t,e){var n=this._dimSummary;if(null==e)return n.encodeFirstDimNotExtra[t];var i=n.encode[t];return i?i[e]:null},e.prototype.mapDimensionsAll=function(t){return(this._dimSummary.encode[t]||[]).slice()},e.prototype.getStore=function(){return this._store},e.prototype.initData=function(t,e,i){var o,r=this;if(t instanceof wl&&(o=t),!o){var l=this.dimensions,u=Is(t)||v(t)?new Ps(t,l.length):t;o=new wl;var c=Jd(l,function(t){return{type:r._dimInfos[t].type,property:t}});o.initData(u,c,i)}this._store=o,this._nameList=(e||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,o.count()),this._dimSummary=function(t,e){var i={},o=i.encode={},r=a(),l=[],u=[],c={};s(t.dimensions,function(e){var n,i=t.getDimensionInfo(e),a=i.coordDim;if(a){var s=i.coordDimIndex;Nd(o,a)[s]=e,i.isExtraCoord||(r.set(a,1),"ordinal"!==(n=i.type)&&"time"!==n&&(l[0]=e),Nd(c,a)[s]=t.getDimensionIndex(i.name)),i.defaultTooltip&&u.push(e)}pa.each(function(t,e){var n=Nd(o,e),r=i.otherDims[e];null!=r&&!1!==r&&(n[r]=i.name)})});var d=[],h={};r.each(function(t,e){var n=o[e];h[e]=n[0],d=d.concat(n)}),i.dataDimsOnCoord=d,i.dataDimIndicesOnCoord=n(d,function(e){return t.getDimensionInfo(e).storeDimIndex}),i.encodeFirstDimNotExtra=h;var p=o.label;p&&p.length&&(l=p.slice());var f=o.tooltip;return f&&f.length?u=f.slice():u.length||(u=l.slice()),o.defaultedLabel=l,o.defaultedTooltip=u,i.userOutput=new Pd(c,e),i}(this,this._schema),this.userOutput=this._dimSummary.userOutput},e.prototype.appendData=function(t){var e=this._store.appendData(t);this._doInit(e[0],e[1])},e.prototype.appendValues=function(t,e){var n=this._store.appendValues(t,e&&e.length),i=n.start,o=n.end,r=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),e)for(var a=i;a<o;a++){var s=a-i;this._nameList[a]=e[s],r&&qd(this,a)}},e.prototype._updateOrdinalMeta=function(){for(var t=this._store,e=this.dimensions,n=0;n<e.length;n++){var i=this._dimInfos[e[n]];i.ordinalMeta&&t.collectOrdinalMeta(i.storeDimIndex,i.ordinalMeta)}},e.prototype._shouldMakeIdFromName=function(){var t=this._store.getProvider();return null==this._idDimIdx&&t.getSource().sourceFormat!==va&&!t.fillStorage},e.prototype._doInit=function(t,e){if(!(t>=e)){var n=this._store.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList;if(n.getSource().sourceFormat===fa&&!n.pure)for(var r=[],a=t;a<e;a++){var s=n.getItem(a,r);if(!this.hasItemOption&&gn(s)&&(this.hasItemOption=!0),s){var l=s.name;null==i[a]&&null!=l&&(i[a]=xn(l,null));var u=s.id;null==o[a]&&null!=u&&(o[a]=xn(u,null))}}if(this._shouldMakeIdFromName())for(a=t;a<e;a++)qd(this,a);Hd(this)}},e.prototype.getApproximateExtent=function(t){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t))},e.prototype.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},e.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},e.prototype.setCalculationInfo=function(t,e){Kd(t)?f(this._calculationInfo,t):this._calculationInfo[t]=e},e.prototype.getName=function(t){var e=this.getRawIndex(t),n=this._nameList[e];return null==n&&null!=this._nameDimIdx&&(n=Ud(this,this._nameDimIdx,e)),null==n&&(n=""),n},e.prototype._getCategory=function(t,e){var n=this._store.get(t,e),i=this._store.getOrdinalMeta(t);return i?i.categories[n]:n},e.prototype.getId=function(t){return Yd(this,this.getRawIndex(t))},e.prototype.count=function(){return this._store.count()},e.prototype.get=function(t,e){var n=this._store,i=this._dimInfos[t];if(i)return n.get(i.storeDimIndex,e)},e.prototype.getByRawIndex=function(t,e){var n=this._store,i=this._dimInfos[t];if(i)return n.getByRawIndex(i.storeDimIndex,e)},e.prototype.getIndices=function(){return this._store.getIndices()},e.prototype.getDataExtent=function(t){return this._store.getDataExtent(this._getStoreDimIndex(t))},e.prototype.getSum=function(t){return this._store.getSum(this._getStoreDimIndex(t))},e.prototype.getMedian=function(t){return this._store.getMedian(this._getStoreDimIndex(t))},e.prototype.getValues=function(t,e){var n=this,i=this._store;return o(t)?i.getValues(Jd(t,function(t){return n._getStoreDimIndex(t)}),e):i.getValues(t)},e.prototype.hasValue=function(t){for(var e=this._dimSummary.dataDimIndicesOnCoord,n=0,i=e.length;n<i;n++)if(isNaN(this._store.get(e[n],t)))return!1;return!0},e.prototype.indexOfName=function(t){for(var e=0,n=this._store.count();e<n;e++)if(this.getName(e)===t)return e;return-1},e.prototype.getRawIndex=function(t){return this._store.getRawIndex(t)},e.prototype.indexOfRawIndex=function(t){return this._store.indexOfRawIndex(t)},e.prototype.rawIndexOf=function(t,e){var n=t&&this._invertedIndicesMap[t],i=n&&n[e];return null==i||isNaN(i)?-1:i},e.prototype.indicesOfNearest=function(t,e,n){return this._store.indicesOfNearest(this._getStoreDimIndex(t),e,n)},e.prototype.each=function(t,e,n){g(t)&&(n=e,e=t,t=[]);var i=n||this,o=Jd(Zd(t),this._getStoreDimIndex,this);this._store.each(o,i?ut(e,i):e)},e.prototype.filterSelf=function(t,e,n){g(t)&&(n=e,e=t,t=[]);var i=n||this,o=Jd(Zd(t),this._getStoreDimIndex,this);return this._store=this._store.filter(o,i?ut(e,i):e),this},e.prototype.selectRange=function(t){var e=this,n={},i=x(t);return s(i,function(i){var o=e._getStoreDimIndex(i);n[o]=t[i]}),this._store=this._store.selectRange(n),this},e.prototype.mapArray=function(t,e,n){g(t)&&(n=e,e=t,t=[]),n=n||this;var i=[];return this.each(t,function(){i.push(e&&e.apply(this,arguments))},n),i},e.prototype.map=function(t,e,n,i){var o=n||i||this,r=Jd(Zd(t),this._getStoreDimIndex,this),a=jd(this);return a._store=this._store.map(r,o?ut(e,o):e),a},e.prototype.modify=function(t,e,n,i){var o=n||i||this,r=Jd(Zd(t),this._getStoreDimIndex,this);this._store.modify(r,o?ut(e,o):e)},e.prototype.downSample=function(t,e,n,i){var o=jd(this);return o._store=this._store.downSample(this._getStoreDimIndex(t),e,n,i),o},e.prototype.minmaxDownSample=function(t,e){var n=jd(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(t),e),n},e.prototype.lttbDownSample=function(t,e){var n=jd(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(t),e),n},e.prototype.getRawDataItem=function(t){return this._store.getRawDataItem(t)},e.prototype.getItemModel=function(t){var e=this.hostModel,n=this.getRawDataItem(t);return new tr(n,e,e&&e.ecModel)},e.prototype.diff=function(t){var e=this;return new kd(t?t.getStore().getIndices():[],this.getStore().getIndices(),function(e){return Yd(t,e)},function(t){return Yd(e,t)})},e.prototype.getVisual=function(t){var e=this._visual;return e&&e[t]},e.prototype.setVisual=function(t,e){this._visual=this._visual||{},Kd(t)?f(this._visual,t):this._visual[t]=e},e.prototype.getItemVisual=function(t,e){var n=this._itemVisuals[t],i=n&&n[e];return null==i?this.getVisual(e):i},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var r=i[e];return null==r&&(r=this.getVisual(e),o(r)?r=r.slice():Kd(r)&&(r=f({},r)),i[e]=r),r},e.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,Kd(e)?f(i,e):i[e]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(t,e){Kd(t)?f(this._layout,t):this._layout[t]=e},e.prototype.getLayout=function(t){return this._layout[t]},e.prototype.getItemLayout=function(t){return this._itemLayouts[t]},e.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?f(this._itemLayouts[t]||{},e):e},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel&&this.hostModel.seriesIndex;Zn(n,this.dataType,t,e),this._graphicEls[t]=e},e.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},e.prototype.eachItemGraphicEl=function(t,e){s(this._graphicEls,function(n,i){n&&t&&t.call(e,n,i)})},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:Jd(this.dimensions,this._getDimInfo,this),this.hostModel)),Xd(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(t,e){var n=this[t];g(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(St(arguments)))})},e.internalField=(Hd=function(t){var e=t._invertedIndicesMap;s(e,function(n,i){var o=t._dimInfos[i],r=o.ordinalMeta,a=t._store;if(r){n=e[i]=new $d(r.categories.length);for(var s=0;s<n.length;s++)n[s]=-1;for(s=0;s<a.count();s++)n[a.get(o.storeDimIndex,s)]=s}})},Ud=function(t,e,n){return xn(t._getCategory(e,n),null)},Yd=function(t,e){var n=t._idList[e];return null==n&&null!=t._idDimIdx&&(n=Ud(t,t._idDimIdx,e)),null==n&&(n="e\0\0"+e),n},Zd=function(t){return o(t)||(t=null!=t?[t]:[]),t},jd=function(t){var n=new e(t._schema?t._schema:Jd(t.dimensions,t._getDimInfo,t),t.hostModel);return Xd(n,t),n},Xd=function(t,e){s(Qd.concat(e.__wrappedMethods||[]),function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t.__wrappedMethods=e.__wrappedMethods,s(th,function(n){t[n]=nt(e[n])}),t._calculationInfo=f({},e._calculationInfo)},void(qd=function(t,e){var n=t._nameList,i=t._idList,o=t._nameDimIdx,r=t._idDimIdx,a=n[e],s=i[e];if(null==a&&null!=o&&(n[e]=a=Ud(t,o,e)),null==s&&null!=r&&(i[e]=s=Ud(t,r,e)),null==s&&null!=a){var l=t._nameRepeatCount,u=l[a]=(l[a]||0)+1;s=a,u>1&&(s+="__ec__"+u),i[e]=s}})),e}();function nh(e,n){Is(e)||(e=Ts(e));var i=(n=n||{}).coordDimensions||[],o=n.dimensionsDefine||e.dimensionsDefine||[],l=a(),u=[],c=function(t,e,n,i){var o=Math.max(t.dimensionsDetectedCount||1,e.length,n.length,i||0);return s(e,function(t){var e;r(t)&&(e=t.dimsDef)&&(o=Math.max(o,e.length))}),o}(e,i,o,n.dimensionsCount),d=n.canOmitUnusedDimensions&&Wd(c),h=o===e.dimensionsDefine,p=h?Fd(e):Gd(o),g=n.encodeDefine;!g&&n.encodeDefaulter&&(g=n.encodeDefaulter(e,c));for(var y=a(g),m=new yl(c),v=0;v<m.length;v++)m[v]=-1;function x(t){var e=m[t];if(e<0){var n=o[t],i=r(n)?n:{name:n},a=new Rd,s=i.name;null!=s&&null!=p.get(s)&&(a.name=a.displayName=s),null!=i.type&&(a.type=i.type),null!=i.displayName&&(a.displayName=i.displayName);var l=u.length;return m[t]=l,a.storeDimIndex=t,u.push(a),a}return u[e]}if(!d)for(v=0;v<c;v++)x(v);y.each(function(e,n){var i=dn(e).slice();if(1===i.length&&!t(i[0])&&i[0]<0)y.set(n,!1);else{var o=y.set(n,[]);s(i,function(e,i){var r=t(e)?p.get(e):e;null!=r&&r<c&&(o[i]=r,b(x(r),n,i))})}});var _=0;function b(t,e,n){null!=pa.get(e)?t.otherDims[e]=n:(t.coordDim=e,t.coordDimIndex=n,l.set(e,!0))}s(i,function(e){var n,i,o,a;if(t(e))n=e,a={};else{n=(a=e).name;var l=a.ordinalMeta;a.ordinalMeta=null,(a=f({},a)).ordinalMeta=l,i=a.dimsDef,o=a.otherDims,a.name=a.coordDim=a.coordDimIndex=a.dimsDef=a.otherDims=null}var u=y.get(n);if(!1!==u){if(!(u=dn(u)).length)for(var d=0;d<(i&&i.length||1);d++){for(;_<c&&null!=x(_).coordDim;)_++;_<c&&u.push(_++)}s(u,function(t,e){var s=x(t);if(h&&null!=a.type&&(s.type=a.type),b(C(s,a),n,e),null==s.name&&i){var l=i[e];!r(l)&&(l={name:l}),s.name=s.displayName=l.name,s.defaultTooltip=l.defaultTooltip}o&&C(s.otherDims,o)})}});var S=n.generateCoord,w=n.generateCoordCount,M=null!=w;w=S?w||1:0;var I=S||"value";function D(t){null==t.name&&(t.name=t.coordDim)}if(d)s(u,function(t){D(t)}),u.sort(function(t,e){return t.storeDimIndex-e.storeDimIndex});else for(var T=0;T<c;T++){var A=x(T);null==A.coordDim&&(A.coordDim=ih(I,l,M),A.coordDimIndex=0,(!S||w<=0)&&(A.isExtraCoord=!0),w--),D(A),null!=A.type||Aa(e,T)!==Sa&&(!A.isExtraCoord||null==A.otherDims.itemName&&null==A.otherDims.seriesName)||(A.type="ordinal")}return function(t){for(var e=a(),n=0;n<t.length;n++){var i=t[n],o=i.name,r=e.get(o)||0;r>0&&(i.name=o+(r-1)),r++,e.set(o,r)}}(u),new zd({source:e,dimensions:u,fullDimensionCount:c,dimensionOmitted:d})}function ih(t,e,n){if(n||e.hasKey(t)){for(var i=0;e.hasKey(t+i);)i++;t+=i}return e.set(t,!0),t}var oh=
/** @class */
function(){return function(t){this.coordSysDims=[],this.axisMap=a(),this.categoryAxisMap=a(),this.coordSysName=t}}();var rh={cartesian2d:function(t,e,n,i){var o=t.getReferringComponents("xAxis",Tn).models[0],r=t.getReferringComponents("yAxis",Tn).models[0];e.coordSysDims=["x","y"],n.set("x",o),n.set("y",r),ah(o)&&(i.set("x",o),e.firstCategoryDimIndex=0),ah(r)&&(i.set("y",r),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,n,i){var o=t.getReferringComponents("singleAxis",Tn).models[0];e.coordSysDims=["single"],n.set("single",o),ah(o)&&(i.set("single",o),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var o=t.getReferringComponents("polar",Tn).models[0],r=o.findAxisModel("radiusAxis"),a=o.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",r),n.set("angle",a),ah(r)&&(i.set("radius",r),e.firstCategoryDimIndex=0),ah(a)&&(i.set("angle",a),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e,n,i){e.coordSysDims=["lng","lat"]},parallel:function(t,e,n,i){var o=t.ecModel,r=o.getComponent("parallel",t.get("parallelIndex")),a=e.coordSysDims=r.dimensions.slice();s(r.parallelAxisIndex,function(t,r){var s=o.getComponent("parallelAxis",t),l=a[r];n.set(l,s),ah(s)&&(i.set(l,s),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=r))})}};function ah(t){return"category"===t.get("type")}function sh(e,n,i){var o,r,a,l=(i=i||{}).byIndex,u=i.stackedCoordDimension;!function(t){return!Bd(t.schema)}(n)?(r=n.schema,o=r.dimensions,a=n.store):o=n;var c,d,h,p,f=!(!e||!e.get("stack"));if(s(o,function(e,n){t(e)&&(o[n]=e={name:e}),f&&!e.isExtraCoord&&(l||c||!e.ordinalMeta||(c=e),d||"ordinal"===e.type||"time"===e.type||u&&u!==e.coordDim||(d=e))}),!d||l||c||(l=!0),d){h="__\0ecstackresult_"+e.id,p="__\0ecstackedover_"+e.id,c&&(c.createInvertedIndices=!0);var g=d.coordDim,y=d.type,m=0;s(o,function(t){t.coordDim===g&&m++});var v={name:h,coordDim:g,coordDimIndex:m,type:y,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:o.length},x={name:p,
// This dimension contains stack base (generally, 0), so do not set it as
// `stackedDimCoordDim` to avoid extent calculation, consider log scale.
coordDim:p,coordDimIndex:m+1,type:y,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:o.length+1};r?(a&&(v.storeDimIndex=a.ensureCalculationDimension(p,y),x.storeDimIndex=a.ensureCalculationDimension(h,y)),r.appendCalculationDimension(v),r.appendCalculationDimension(x)):(o.push(v),o.push(x))}return{stackedDimension:d&&d.name,stackedByDimension:c&&c.name,isStackedByIndex:l,stackedOverDimension:p,stackResultDimension:h}}function lh(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function uh(t,e){return lh(t,e)?t.getCalculationInfo("stackResultDimension"):e}function ch(t,e,i){i=i||{};var r,a=e.getSourceManager(),l=!1;t?(l=!0,r=Ts(t)):l=(r=a.getSource()).sourceFormat===fa;var u=function(t){var e=t.get("coordinateSystem"),n=new oh(e),i=rh[e];if(i)return i(t,n,n.axisMap,n.categoryAxisMap),n}(e),c=function(t,e){var i,o=t.get("coordinateSystem"),r=ja.get(o);return e&&e.coordSysDims&&(i=n(e.coordSysDims,function(t){var n={name:t},i=e.axisMap.get(t);if(i){var o=i.get("type");n.type=Od(o)}return n})),i||(i=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||["x","y"]),i}(e,u),d=i.useEncodeDefaulter,h=g(d)?d:d?at(Da,c,e):null,p=nh(r,{coordDimensions:c,generateCoord:i.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:h,canOmitUnusedDimensions:!l}),f=function(t,e,n){var i,o;return n&&s(t,function(t,r){var a=t.coordDim,s=n.categoryAxisMap.get(a);s&&(null==i&&(i=r),t.ordinalMeta=s.getOrdinalMeta(),e&&(t.createInvertedIndices=!0)),null!=t.otherDims.itemName&&(o=!0)}),o||null==i||(t[i].otherDims.itemName=0),i}(p.dimensions,i.createInvertedIndices,u),y=l?null:a.getSharedDataStore(p),m=sh(e,{schema:p,store:y}),v=new eh(p,e);v.setCalculationInfo(m);var x=null!=f&&function(t){if(t.sourceFormat===fa){var e=function(t){var e=0;for(;e<t.length&&null==t[e];)e++;return t[e]}(t.data||[]);return!o(fn(e))}}(r)?function(t,e,n,i){return i===f?n:this.defaultDimValueGetter(t,e,n,i)}:null;return v.hasItemOption=!1,v.initData(
// Try to reuse the data store in sourceManager if using dataset.
l?r:y,null,x),v}var dh=
/** @class */function(){function t(t){this._setting=t||{},this._extent=[Infinity,-Infinity]}return t.prototype.getSetting=function(t){return this._setting[t]},t.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},t.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},t.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(t){this._isBlank=t},t}();Fn(dh);var hh=0,ph=
/** @class */function(){function e(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++hh}return e.createByAxisModel=function(t){var i=t.option,o=i.data,r=o&&n(o,fh);return new e({categories:r,needCollect:!r,
// deduplication is default in axis.
deduplication:!1!==i.dedplication})},e.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},e.prototype.parseAndCollect=function(e){var n,i=this._needCollect;if(!t(e)&&!i)return e;if(i&&!this._deduplication)return n=this.categories.length,this.categories[n]=e,n;var o=this._getOrCreateMap();return null==(n=o.get(e))&&(i?(n=this.categories.length,this.categories[n]=e,o.set(e,n)):n=NaN),n},e.prototype._getOrCreateMap=function(){return this._map||(this._map=a(this.categories))},e}();function fh(t){return r(t)&&null!=t.value?t.value:t+""}function gh(t){return"interval"===t.type||"log"===t.type}function yh(t,e,n,i){var o={},r=t[1]-t[0],a=o.interval=$e(r/e);null!=n&&a<n&&(a=o.interval=n),null!=i&&a>i&&(a=o.interval=i);var s=o.intervalPrecision=vh(a);return function(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),xh(t,0,e),xh(t,1,e),t[0]>t[1]&&(t[0]=t[1])}(o.niceTickExtent=[Fe(Math.ceil(t[0]/a)*a,s),Fe(Math.floor(t[1]/a)*a,s)],t),o}function mh(t){var e=Math.pow(10,Je(t)),n=t/e;return n?2===n?n=3:3===n?n=5:n*=2:n=1,Fe(n*e)}function vh(t){return He(t)+2}function xh(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function _h(t,e){return t>=e[0]&&t<=e[1]}function bh(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function Sh(t,e){return t*(e[1]-e[0])+e[0]}var wh=
/** @class */function(e){function i(t){var i=e.call(this,t)||this;i.type="ordinal";var a=i.getSetting("ordinalMeta");return a||(a=new ph({})),o(a)&&(a=new ph({categories:n(a,function(t){return r(t)?t.value:t})})),i._ordinalMeta=a,i._extent=i.getSetting("extent")||[0,a.categories.length-1],i}return h(i,e),i.prototype.parse=function(e){return null==e?NaN:t(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},i.prototype.contain=function(t){return _h(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},i.prototype.normalize=function(t){return bh(t=this._getTickNumber(this.parse(t)),this._extent)},i.prototype.scale=function(t){return t=Math.round(Sh(t,this._extent)),this.getRawOrdinalNumber(t)},i.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},i.prototype.getMinorTicks=function(t){},i.prototype.setSortInfo=function(t){if(null!=t){for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],o=0,r=this._ordinalMeta.categories.length,a=Math.min(r,e.length);o<a;++o){var s=e[o];n[o]=s,i[s]=o}for(var l=0;o<r;++o){for(;null!=i[l];)l++;n.push(l),i[l]=o}}else this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null},i.prototype._getTickNumber=function(t){var e=this._ticksByOrdinalNumber;return e&&t>=0&&t<e.length?e[t]:t},i.prototype.getRawOrdinalNumber=function(t){var e=this._ordinalNumbersByTick;return e&&t>=0&&t<e.length?e[t]:t},i.prototype.getLabel=function(t){if(!this.isBlank()){var e=this.getRawOrdinalNumber(t.value),n=this._ordinalMeta.categories[e];return null==n?"":n+""}},i.prototype.count=function(){return this._extent[1]-this._extent[0]+1},i.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},i.prototype.isInExtentRange=function(t){return t=this._getTickNumber(t),this._extent[0]<=t&&this._extent[1]>=t},i.prototype.getOrdinalMeta=function(){return this._ordinalMeta},i.prototype.calcNiceTicks=function(){},i.prototype.calcNiceExtent=function(){},i.type="ordinal",i}(dh);dh.registerClass(wh);var Mh=Fe,Ih=
/** @class */function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return h(e,t),e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return _h(t,this._extent)},e.prototype.normalize=function(t){return bh(t,this._extent)},e.prototype.scale=function(t){return Sh(t,this._extent)},e.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},e.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=vh(t)},e.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,o=this._intervalPrecision,r=[];if(!e)return r;n[0]<i[0]&&(t?r.push({value:Mh(i[0]-e,o)}):r.push({value:n[0]}));for(var a=i[0];a<=i[1]&&(r.push({value:a}),(a=Mh(a+e,o))!==r[r.length-1].value);)if(r.length>1e4)return[];var s=r.length?r[r.length-1].value:i[1];return n[1]>s&&(t?r.push({value:Mh(s+e,o)}):r.push({value:n[1]})),r},e.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),o=1;o<e.length;o++){for(var r=e[o],a=e[o-1],s=0,l=[],u=(r.value-a.value)/t;s<t-1;){var c=Mh(a.value+(s+1)*u);c>i[0]&&c<i[1]&&l.push(c),s++}n.push(l)}return n},e.prototype.getLabel=function(t,e){if(null==t)return"";var n=e&&e.precision;return null==n?n=He(t.value)||0:"auto"===n&&(n=this._intervalPrecision),Wr(Mh(t.value,n,!0))},e.prototype.calcNiceTicks=function(t,e,n){t=t||5;var i=this._extent,o=i[1]-i[0];if(isFinite(o)){o<0&&(o=-o,i.reverse());var r=yh(i,t,e,n);this._intervalPrecision=r.intervalPrecision,this._interval=r.interval,this._niceExtent=r.niceTickExtent}},e.prototype.calcNiceExtent=function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var n=Math.abs(e[0]);t.fixMax||(e[1]+=n/2),e[0]-=n/2}else e[1]=1;var i=e[1]-e[0];isFinite(i)||(e[0]=0,e[1]=1),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval);var o=this._interval;t.fixMin||(e[0]=Mh(Math.floor(e[0]/o)*o)),t.fixMax||(e[1]=Mh(Math.ceil(e[1]/o)*o))},e.prototype.setNiceExtent=function(t,e){this._niceExtent=[t,e]},e.type="interval",e}(dh);dh.registerClass(Ih);var Dh="undefined"!=typeof Float32Array,Th=Dh?Float32Array:Array;function Ch(t){return o(t)?Dh?new Float32Array(t):t:new Th(t)}var Ah="__ec_stack_";function Lh(t){return t.get("stack")||Ah+t.seriesIndex}function kh(t){return t.dim+t.index}function Ph(t,e){var n=[];return e.eachSeriesByType(t,function(t){Vh(t)&&n.push(t)}),n}function Nh(t){var e=function(t){var e={};s(t,function(t){var n=t.coordinateSystem.getBaseAxis();if("time"===n.type||"value"===n.type)for(var i=t.getData(),o=n.dim+"_"+n.index,r=i.getDimensionIndex(i.mapDimension(n.dim)),a=i.getStore(),s=0,l=a.count();s<l;++s){var u=a.get(r,s);e[o]?e[o].push(u):e[o]=[u]}});var n={};for(var i in e)if(e.hasOwnProperty(i)){var o=e[i];if(o){o.sort(function(t,e){return t-e});for(var r=null,a=1;a<o.length;++a){var l=o[a]-o[a-1];l>0&&(r=null===r?l:Math.min(r,l))}n[i]=r}}return n}(t),n=[];return s(t,function(t){var i,o=t.coordinateSystem.getBaseAxis(),r=o.getExtent();if("category"===o.type)i=o.getBandWidth();else if("value"===o.type||"time"===o.type){var a=o.dim+"_"+o.index,s=e[a],l=Math.abs(r[1]-r[0]),u=o.scale.getExtent(),c=Math.abs(u[1]-u[0]);i=s?l/c*s:l}else{var d=t.getData();i=Math.abs(r[1]-r[0])/d.count()}var h=Ge(t.get("barWidth"),i),p=Ge(t.get("barMaxWidth"),i),f=Ge(
// barMinWidth by default is 0.5 / 1 in cartesian. Because in value axis,
// the auto-calculated bar width might be less than 0.5 / 1.
t.get("barMinWidth")||(zh(t)?.5:1),i),g=t.get("barGap"),y=t.get("barCategoryGap");n.push({bandWidth:i,barWidth:h,barMaxWidth:p,barMinWidth:f,barGap:g,barCategoryGap:y,axisKey:kh(o),stackId:Lh(t)})}),Oh(n)}function Oh(t){var e={};s(t,function(t,n){var i=t.axisKey,o=t.bandWidth,r=e[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=r.stacks;e[i]=r;var s=t.stackId;a[s]||r.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(r.remainedWidth,l),r.remainedWidth-=l);var u=t.barMaxWidth;u&&(a[s].maxWidth=u);var c=t.barMinWidth;c&&(a[s].minWidth=c);var d=t.barGap;null!=d&&(r.gap=d);var h=t.barCategoryGap;null!=h&&(r.categoryGap=h)});var n={};return s(e,function(t,e){n[e]={};var i=t.stacks,o=t.bandWidth,r=t.categoryGap;if(null==r){var a=x(i).length;r=Math.max(35-4*a,15)+"%"}var l=Ge(r,o),u=Ge(t.gap,1),c=t.remainedWidth,d=t.autoWidthCount,h=(c-l)/(d+(d-1)*u);h=Math.max(h,0),s(i,function(t){var e=t.maxWidth,n=t.minWidth;if(t.width){i=t.width;e&&(i=Math.min(i,e)),n&&(i=Math.max(i,n)),t.width=i,c-=i+u*i,d--}else{var i=h;e&&e<i&&(i=Math.min(e,c)),n&&n>i&&(i=n),i!==h&&(t.width=i,c-=i+u*i,d--)}}),h=(c-l)/(d+(d-1)*u),h=Math.max(h,0);var p,f=0;s(i,function(t,e){t.width||(t.width=h),p=t,f+=t.width*(1+u)}),p&&(f-=p.width*u);var g=-f/2;s(i,function(t,i){n[e][i]=n[e][i]||{bandWidth:o,offset:g,width:t.width},g+=t.width*(1+u)})}),n}function Rh(t,e){var n=Ph(t,e),i=Nh(n);s(n,function(t){var e=t.getData(),n=t.coordinateSystem.getBaseAxis(),o=Lh(t),r=i[kh(n)][o],a=r.offset,s=r.width;e.setLayout({bandWidth:r.bandWidth,offset:a,size:s})})}function Eh(t){return{seriesType:t,plan:iu(),reset:function(t){if(Vh(t)){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),o=n.getOtherAxis(i),r=e.getDimensionIndex(e.mapDimension(o.dim)),a=e.getDimensionIndex(e.mapDimension(i.dim)),s=t.get("showBackground",!0),l=e.mapDimension(o.dim),u=e.getCalculationInfo("stackResultDimension"),c=lh(e,l)&&!!e.getCalculationInfo("stackedOnSeries"),d=o.isHorizontal(),h=function(t,e){var n=e.model.get("startValue");n||(n=0);return e.toGlobalCoord(e.dataToCoord("log"===e.type?n>0?n:1:n))}(0,o),p=zh(t),f=t.get("barMinHeight")||0,g=u&&e.getDimensionIndex(u),y=e.getLayout("size"),m=e.getLayout("offset");return{progress:function(t,e){for(var i,o=t.count,l=p&&Ch(3*o),u=p&&s&&Ch(3*o),v=p&&Ch(o),x=n.master.getRect(),_=d?x.width:x.height,b=e.getStore(),S=0;null!=(i=t.next());){var w=b.get(c?g:r,i),M=b.get(a,i),I=h,D=void 0;c&&(D=+w-b.get(r,i));var T=void 0,C=void 0,A=void 0,L=void 0;if(d){var k=n.dataToPoint([w,M]);if(c)I=n.dataToPoint([D,M])[0];T=I,C=k[1]+m,A=k[0]-I,L=y,Math.abs(A)<f&&(A=(A<0?-1:1)*f)}else{k=n.dataToPoint([M,w]);if(c)I=n.dataToPoint([M,D])[1];T=k[0]+m,C=I,A=y,L=k[1]-I,Math.abs(L)<f&&(L=(L<=0?-1:1)*f)}p?(l[S]=T,l[S+1]=C,l[S+2]=d?A:L,u&&(u[S]=d?x.x:T,u[S+1]=d?C:x.y,u[S+2]=_),v[i]=i):e.setItemLayout(i,{x:T,y:C,width:A,height:L}),S+=3}p&&e.setLayout({largePoints:l,largeDataIndices:v,largeBackgroundPoints:u,valueAxisHorizontal:d})}}}}}}function Vh(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function zh(t){return t.pipelineContext&&t.pipelineContext.large}var Bh=
/** @class */function(e){function i(t){var n=e.call(this,t)||this;return n.type="time",n}return h(i,e),i.prototype.getLabel=function(t){var e=this.getSetting("useUTC");return Ir(t.value,xr[function(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(wr(this._minLevelUnit))]||xr.second,e,this.getSetting("locale"))},i.prototype.getFormattedLabel=function(e,n,i){var r=this.getSetting("useUTC");return function(e,n,i,r,a){var s=null;if(t(i))s=i;else if(g(i))s=i(e.value,n,{level:e.level});else{var l=f({},mr);if(e.level>0)for(var u=0;u<_r.length;++u)l[_r[u]]="{primary|"+l[_r[u]]+"}";var c=i?!1===i.inherit?i:C(i,l):l,d=Dr(e.value,a);if(c[d])s=c[d];else if(c.inherit){for(u=br.indexOf(d)-1;u>=0;--u)if(c[d]){s=c[d];break}s=s||l.none}if(o(s)){var h=null==e.level?0:e.level>=0?e.level:s.length+e.level;s=s[h=Math.min(h,s.length-1)]}}return Ir(new Date(e.value),s,a,r)}(e,n,i,this.getSetting("locale"),r)},i.prototype.getTicks=function(){var t=this._interval,e=this._extent,i=[];if(!t)return i;i.push({value:e[0],level:0});var o=this.getSetting("useUTC"),r=function(t,e,i,o){var r=1e4,a=br,s=0;function l(t,e,n,i,r,a,s){for(var l=new Date(e),u=e,c=l[i]();u<n&&u<=o[1];)s.push({value:u}),c+=t,l[r](c),u=l.getTime();s.push({value:u,notAdd:!0})}function u(t,n,r){var a=[],s=!n.length;if(!function(t,e,n,i){var o=Ke(e),r=Ke(n),a=function(t){return Tr(o,t,i)===Tr(r,t,i)},s=function(){return a("year")},l=function(){return s()&&a("month")},u=function(){return l()&&a("day")},c=function(){return u()&&a("hour")},d=function(){return c()&&a("minute")},h=function(){return d()&&a("second")},p=function(){return h()&&a("millisecond")};switch(t){case"year":return s();case"month":return l();case"day":return u();case"hour":return c();case"minute":return d();case"second":return h();case"millisecond":return p()}}(wr(t),o[0],o[1],i)){s&&(n=[{
// TODO Optimize. Not include so may ticks.
value:Zh(new Date(o[0]),t,i)},{value:o[1]}]);for(var u=0;u<n.length-1;u++){var c=n[u].value,d=n[u+1].value;if(c!==d){var h=void 0,p=void 0,f=void 0,g=!1;switch(t){case"year":h=Math.max(1,Math.round(e/gr/365)),p=Cr(i),f=Rr(i);break;case"half-year":case"quarter":case"month":h=Wh(e),p=Ar(i),f=Er(i);break;case"week":
// PENDING If week is added. Ignore day.
case"half-week":case"day":h=Fh(e),p=Lr(i),f=Vr(i),g=!0;break;case"half-day":case"quarter-day":case"hour":h=Hh(e),p=kr(i),f=zr(i);break;case"minute":h=Yh(e,!0),p=Pr(i),f=Br(i);break;case"second":h=Yh(e,!1),p=Nr(i),f=Gr(i);break;case"millisecond":h=Uh(e),p=Or(i),f=Fr(i)}l(h,c,d,p,f,g,a),"year"===t&&r.length>1&&0===u&&r.unshift({value:r[0].value-h})}}for(u=0;u<a.length;u++)r.push(a[u]);return a}}for(var c=[],d=[],h=0,p=0,f=0;f<a.length&&s++<r;++f){var g=wr(a[f]);if(Mr(a[f]))if(u(a[f],c[c.length-1]||[],d),g!==(a[f+1]?wr(a[f+1]):null)){if(d.length){p=h,d.sort(function(t,e){return t.value-e.value});for(var y=[],m=0;m<d.length;++m){var v=d[m].value;0!==m&&d[m-1].value===v||(y.push(d[m]),v>=o[0]&&v<=o[1]&&h++)}var x=(o[1]-o[0])/e;if(h>1.5*x&&p>x/1.5)break;if(c.push(y),h>x||t===a[f])break}d=[]}}var _=lt(n(c,function(t){return lt(t,function(t){return t.value>=o[0]&&t.value<=o[1]&&!t.notAdd})}),function(t){return t.length>0}),b=[],S=_.length-1;for(f=0;f<_.length;++f)for(var w=_[f],M=0;M<w.length;++M)b.push({value:w[M].value,level:S-f});b.sort(function(t,e){return t.value-e.value});var I=[];for(f=0;f<b.length;++f)0!==f&&b[f].value===b[f-1].value||I.push(b[f]);return I}(this._minLevelUnit,this._approxInterval,o,e);return(i=i.concat(r)).push({value:e[1],level:0}),i},i.prototype.calcNiceExtent=function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=gr,e[1]+=gr),-Infinity===e[1]&&Infinity===e[0]){var n=new Date;e[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),e[0]=e[1]-gr}this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval)},i.prototype.calcNiceTicks=function(t,e,n){t=t||10;var i=this._extent,o=i[1]-i[0];this._approxInterval=o/t,null!=e&&this._approxInterval<e&&(this._approxInterval=e),null!=n&&this._approxInterval>n&&(this._approxInterval=n);var r=Gh.length,a=Math.min(function(t,e,n,i){for(;n<i;){var o=n+i>>>1;t[o][1]<e?n=o+1:i=o}return n}(Gh,this._approxInterval,0,r),r-1);this._interval=Gh[a][1],this._minLevelUnit=Gh[Math.max(a-1,0)][0]},i.prototype.parse=function(t){return u(t)?t:+Ke(t)},i.prototype.contain=function(t){return _h(this.parse(t),this._extent)},i.prototype.normalize=function(t){return bh(this.parse(t),this._extent)},i.prototype.scale=function(t){return Sh(t,this._extent)},i.type="time",i}(Ih),Gh=[
// Format interval
["second",hr],["minute",pr],["hour",fr],["quarter-day",216e5],["half-day",432e5],["day",10368e4],["half-week",3024e5],["week",6048e5],["month",26784e5],["quarter",8208e6],["half-year",yr/2],["year",yr]];function Fh(t,e){return(t/=gr)>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function Wh(t){return(t/=2592e6)>6?6:t>3?3:t>2?2:1}function Hh(t){return(t/=fr)>12?12:t>6?6:t>3.5?4:t>2?2:1}function Yh(t,e){return(t/=e?pr:hr)>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function Uh(t){return $e(t)}function Zh(t,e,n){var i=new Date(t);switch(wr(e)){case"year":case"month":i[Er(n)](0);case"day":i[Vr(n)](1);case"hour":i[zr(n)](0);case"minute":i[Br(n)](0);case"second":i[Gr(n)](0),i[Fr(n)](0)}return i.getTime()}dh.registerClass(Bh);var Xh=dh.prototype,jh=Ih.prototype,qh=Fe,Kh=Math.floor,Jh=Math.ceil,$h=Math.pow,Qh=Math.log,tp=
/** @class */function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new Ih,e._interval=0,e}return h(e,t),e.prototype.getTicks=function(t){var e=this._originalScale,i=this._extent,o=e.getExtent(),r=jh.getTicks.call(this,t);return n(r,function(t){var e=t.value,n=Fe($h(this.base,e));return n=e===i[0]&&this._fixMin?np(n,o[0]):n,{value:n=e===i[1]&&this._fixMax?np(n,o[1]):n}},this)},e.prototype.setExtent=function(t,e){var n=Qh(this.base);t=Qh(Math.max(0,t))/n,e=Qh(Math.max(0,e))/n,jh.setExtent.call(this,t,e)},e.prototype.getExtent=function(){var t=this.base,e=Xh.getExtent.call(this);e[0]=$h(t,e[0]),e[1]=$h(t,e[1]);var n=this._originalScale.getExtent();return this._fixMin&&(e[0]=np(e[0],n[0])),this._fixMax&&(e[1]=np(e[1],n[1])),e},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=Qh(t[0])/Qh(e),t[1]=Qh(t[1])/Qh(e),Xh.unionExtent.call(this,t)},e.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},e.prototype.calcNiceTicks=function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(Infinity===n||n<=0)){var i,o=(i=n,Math.pow(10,Je(i)));for(t/n*o<=.5&&(o*=10);!isNaN(o)&&Math.abs(o)<1&&Math.abs(o)>0;)o*=10;var r=[Fe(Jh(e[0]/o)*o),Fe(Kh(e[1]/o)*o)];this._interval=o,this._niceExtent=r}},e.prototype.calcNiceExtent=function(t){jh.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return _h(t=Qh(t)/Qh(this.base),this._extent)},e.prototype.normalize=function(t){return bh(t=Qh(t)/Qh(this.base),this._extent)},e.prototype.scale=function(t){return t=Sh(t,this._extent),$h(this.base,t)},e.type="log",e}(dh),ep=tp.prototype;function np(t,e){return qh(t,He(e))}ep.getMinorTicks=jh.getMinorTicks,ep.getLabel=jh.getLabel,dh.registerClass(tp);var ip=
/** @class */function(){function t(t,e,n){this._prepareParams(t,e,n)}return t.prototype._prepareParams=function(t,e,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var i=this._isOrdinal="ordinal"===t.type;this._needCrossZero="interval"===t.type&&e.getNeedCrossZero&&e.getNeedCrossZero();var r=e.get("min",!0);null==r&&(r=e.get("startValue",!0));var a=this._modelMinRaw=r;g(a)?this._modelMinNum=sp(t,a({min:n[0],max:n[1]})):"dataMin"!==a&&(this._modelMinNum=sp(t,a));var s=this._modelMaxRaw=e.get("max",!0);if(g(s)?this._modelMaxNum=sp(t,s({min:n[0],max:n[1]})):"dataMax"!==s&&(this._modelMaxNum=sp(t,s)),i)this._axisDataLen=e.getCategories().length;else{var l=e.get("boundaryGap"),u=o(l)?l:[l||0,l||0];"boolean"==typeof u[0]||"boolean"==typeof u[1]?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[wt(u[0],1),wt(u[1],1)]}},t.prototype.calculate=function(){var t=this._isOrdinal,e=this._dataMin,n=this._dataMax,i=this._axisDataLen,o=this._boundaryGapInner,r=t?null:n-e||Math.abs(e),a="dataMin"===this._modelMinRaw?e:this._modelMinNum,s="dataMax"===this._modelMaxRaw?n:this._modelMaxNum,l=null!=a,u=null!=s;null==a&&(a=t?i?0:NaN:e-o[0]*r),null==s&&(s=t?i?i-1:NaN:n+o[1]*r),(null==a||!isFinite(a))&&(a=NaN),(null==s||!isFinite(s))&&(s=NaN);var c=Mt(a)||Mt(s)||t&&!i;this._needCrossZero&&(a>0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var d=this._determinedMin,h=this._determinedMax;return null!=d&&(a=d,l=!0),null!=h&&(s=h,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:c}},t.prototype.modifyDataMinMax=function(t,e){this[rp[t]]=e},t.prototype.setDeterminedMinMax=function(t,e){this[op[t]]=e},t.prototype.freeze=function(){this.frozen=!0},t}(),op={min:"_determinedMin",max:"_determinedMax"},rp={min:"_dataMin",max:"_dataMax"};function ap(t,e,n){var i=t.rawExtentInfo;return i||(i=new ip(t,e,n),t.rawExtentInfo=i,i)}function sp(t,e){return null==e?null:Mt(e)?NaN:t.parse(e)}function lp(t,e){var n=t.type,i=ap(t,e,t.getExtent()).calculate();t.setBlank(i.isBlank);var o=i.min,r=i.max,a=e.ecModel;if(a&&"time"===n){var l=Ph("bar",a),u=!1;if(s(l,function(t){u=u||t.getBaseAxis()===e.axis}),u){var c=Nh(l),d=function(t,e,n,i){var o=n.axis.getExtent(),r=Math.abs(o[1]-o[0]),a=function(t,e){if(t&&e)return t[kh(e)]}(i,n.axis);if(void 0===a)return{min:t,max:e};var l=Infinity;s(a,function(t){l=Math.min(t.offset,l)});var u=-Infinity;s(a,function(t){u=Math.max(t.offset+t.width,u)}),l=Math.abs(l),u=Math.abs(u);var c=l+u,d=e-t,h=d/(1-(l+u)/r)-d;return e+=h*(u/c),t-=h*(l/c),{min:t,max:e}}(o,r,e,c);o=d.min,r=d.max}}return{extent:[o,r],
// "fix" means "fixed", the value should not be
// changed in the subsequent steps.
fixMin:i.minFixed,fixMax:i.maxFixed}}function up(t,e){var n=e,i=lp(t,n),o=i.extent,r=n.get("splitNumber");t instanceof tp&&(t.base=n.get("logBase"));var a=t.type,s=n.get("interval"),l="interval"===a||"time"===a;t.setExtent(o[0],o[1]),t.calcNiceExtent({splitNumber:r,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?n.get("minInterval"):null,maxInterval:l?n.get("maxInterval"):null}),null!=s&&t.setInterval&&t.setInterval(s)}function cp(t,e){if(e=e||t.get("type"))switch(e){
// Buildin scale
case"category":return new wh({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[Infinity,-Infinity]});case"time":return new Bh({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(dh.getClass(e)||Ih)}}function dp(e){var n=e.getLabelModel().get("formatter"),i="category"===e.type?e.scale.getExtent()[0]:null;return"time"===e.scale.type?function(t){return function(n,i){return e.scale.getFormattedLabel(n,i,t)}}(n):t(n)?function(t){return function(n){var i=e.scale.getLabel(n);return t.replace("{value}",null!=i?i:"")}}(n):g(n)?function(t){return function(n,o){return null!=i&&(o=n.value-i),t(hp(e,n),o,null!=n.level?{level:n.level}:null)}}(n):function(t){return e.scale.getLabel(t)}}function hp(t,e){return"category"===t.type?t.scale.getLabel(e):e.value}function pp(t,e){var n=e*Math.PI/180,i=t.width,o=t.height,r=i*Math.abs(Math.cos(n))+Math.abs(o*Math.sin(n)),a=i*Math.abs(Math.sin(n))+Math.abs(o*Math.cos(n));return new U(t.x,t.y,r,a)}function fp(t){var e=t.get("interval");return null==e?"auto":e}function gp(t){return"category"===t.type&&0===fp(t.getLabelModel())}function yp(t,e){var n={};return s(t.mapDimensionsAll(e),function(e){n[uh(t,e)]=!0}),x(n)}var mp=
/** @class */function(){function t(){}return t.prototype.getNeedCrossZero=function(){return!this.option.scale},t.prototype.getCoordSysModel=function(){},t}(),vp=[],xp={registerPreprocessor:_d,registerProcessor:bd,registerPostInit:function(t){Sd("afterinit",t)},registerPostUpdate:function(t){Sd("afterupdate",t)},registerUpdateLifecycle:Sd,registerAction:wd,registerCoordinateSystem:function(t,e){ja.register(t,e)},registerLayout:function(t,e){Dd(dd,t,e,1e3,"layout")},registerVisual:Md,registerTransform:Cd,registerLoading:Td,registerMap:function(t,e,n){var i=Dc["registerMap"];i&&i(t,e,n)},registerImpl:function(t,e){Dc[t]=e},PRIORITY:Ac,ComponentModel:ua,ComponentView:nu,SeriesModel:jl,ChartView:au,
// TODO Use ComponentModel and SeriesModel instead of Constructor
registerComponentModel:function(t){ua.registerClass(t)},registerComponentView:function(t){nu.registerClass(t)},registerSeriesModel:function(t){jl.registerClass(t)},registerChartView:function(t){au.registerClass(t)},registerSubTypeDefaulter:function(t,e){ua.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){It(t,e)}};function _p(t){o(t)?s(t,function(t){_p(t)}):l(vp,t)>=0||(vp.push(t),g(t)&&(t={install:t}),t.install(xp))}var bp=[];function Sp(t,e){for(var n=0;n<t.length;n++)T(t[n],t[n],e)}function wp(t,e,n,i){for(var o=0;o<t.length;o++){var r=t[o];i&&(r=i.project(r)),r&&isFinite(r[0])&&isFinite(r[1])&&(Tt(e,e,r),Ct(n,n,r))}}var Mp=
/** @class */function(){function t(t){this.name=t}return t.prototype.setCenter=function(t){this._center=t},t.prototype.getCenter=function(){var t=this._center;return t||(t=this._center=this.calcCenter()),t},t}(),Ip=
/** @class */
function(){return function(t,e){this.type="polygon",this.exterior=t,this.interiors=e}}(),Dp=
/** @class */
function(){return function(t){this.type="linestring",this.points=t}}(),Tp=
/** @class */function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.type="geoJSON",o.geometries=n,o._center=i&&[i[0],i[1]],o}return h(e,t),e.prototype.calcCenter=function(){for(var t,e=this.geometries,n=0,i=0;i<e.length;i++){var o=e[i],r=o.exterior,a=r&&r.length;a>n&&(t=o,n=a)}if(t)return function(t){for(var e=0,n=0,i=0,o=t.length,r=t[o-1][0],a=t[o-1][1],s=0;s<o;s++){var l=t[s][0],u=t[s][1],c=r*u-l*a;e+=c,n+=(r+l)*c,i+=(a+u)*c,r=l,a=u}return e?[n/e/3,i/e/3,e]:[t[0][0]||0,t[0][1]||0]}(t.exterior);var s=this.getBoundingRect();return[s.x+s.width/2,s.y+s.height/2]},e.prototype.getBoundingRect=function(t){var e=this._rect;if(e&&!t)return e;var n=[Infinity,Infinity],i=[-Infinity,-Infinity],o=this.geometries;return s(o,function(e){"polygon"===e.type?wp(e.exterior,n,i,t):s(e.points,function(e){wp(e,n,i,t)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(i[0])&&isFinite(i[1])||(n[0]=n[1]=i[0]=i[1]=0),e=new U(n[0],n[1],i[0]-n[0],i[1]-n[1]),t||(this._rect=e),e},e.prototype.contain=function(t){var e=this.getBoundingRect(),n=this.geometries;if(!e.contain(t[0],t[1]))return!1;t:for(var i=0,o=n.length;i<o;i++){var r=n[i];if("polygon"===r.type){var a=r.exterior,s=r.interiors;if(Dt(a,t[0],t[1])){for(var l=0;l<(s?s.length:0);l++)if(Dt(s[l],t[0],t[1]))continue t;return!0}}}return!1},e.prototype.transformTo=function(t,e,n,i){var o=this.getBoundingRect(),r=o.width/o.height;n?i||(i=n/r):n=r*i;for(var a=new U(t,e,n,i),l=o.calculateTransform(a),u=this.geometries,c=0;c<u.length;c++){var d=u[c];"polygon"===d.type?(Sp(d.exterior,l),s(d.interiors,function(t){Sp(t,l)})):s(d.points,function(t){Sp(t,l)})}(o=this._rect).copy(a),this._center=[o.x+o.width/2,o.y+o.height/2]},e.prototype.cloneShallow=function(t){null==t&&(t=this.name);var n=new e(t,this.geometries,this._center);return n._rect=this._rect,n.transformTo=null,n},e}(Mp),Cp=
/** @class */function(t){function e(e,n){var i=t.call(this,e)||this;return i.type="geoSVG",i._elOnlyForCalculate=n,i}return h(e,t),e.prototype.calcCenter=function(){for(var t=this._elOnlyForCalculate,e=t.getBoundingRect(),n=[e.x+e.width/2,e.y+e.height/2],i=A(bp),o=t;o&&!o.isGeoSVGGraphicRoot;)L(i,o.getLocalTransform(),i),o=o.parent;return D(i,i),T(n,n,i),n},e}(Mp);function Ap(t,e,n){for(var i=0;i<t.length;i++)t[i]=Lp(t[i],e[i],n)}function Lp(t,e,n){for(var i=[],o=e[0],r=e[1],a=0;a<t.length;a+=2){var s=t.charCodeAt(a)-64,l=t.charCodeAt(a+1)-64;s=s>>1^-(1&s),l=l>>1^-(1&l),o=s+=o,r=l+=r,i.push([s/n,l/n])}return i}function kp(t,e){return t=function(t){if(!t.UTF8Encoding)return t;var e=t,n=e.UTF8Scale;null==n&&(n=1024);var i=e.features;return s(i,function(t){var e=t.geometry,i=e.encodeOffsets,o=e.coordinates;if(i)switch(e.type){case"LineString":e.coordinates=Lp(o,i,n);break;case"Polygon":case"MultiLineString":Ap(o,i,n);break;case"MultiPolygon":s(o,function(t,e){return Ap(t,i[e],n)})}}),e.UTF8Encoding=!1,e}(t),n(lt(t.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var n=t.properties,i=t.geometry,o=[];switch(i.type){case"Polygon":var r=i.coordinates;o.push(new Ip(r[0],r.slice(1)));break;case"MultiPolygon":s(i.coordinates,function(t){t[0]&&o.push(new Ip(t[0],t.slice(1)))});break;case"LineString":o.push(new Dp([i.coordinates]));break;case"MultiLineString":o.push(new Dp(i.coordinates))}var a=new Tp(n[e||"name"],o,n.cp);return a.properties=n,a})}var Pp=wn();function Np(t,e){var i=n(e,function(e){return t.scale.parse(e)});return"time"===t.type&&i.length>0&&(i.sort(),i.unshift(i[0]),i.push(i[i.length-1])),i}function Op(t){var e=t.getLabelModel().get("customValues");if(e){var i=dp(t),o=t.scale.getExtent(),r=Np(t,e),a=lt(r,function(t){return t>=o[0]&&t<=o[1]});return{labels:n(a,function(e){var n={value:e};return{formattedLabel:i(n),rawLabel:t.scale.getLabel(n),tickValue:e}})}}return"category"===t.type?function(t){var e=t.getLabelModel(),n=Ep(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(t):function(t){var e=t.scale.getTicks(),i=dp(t);return{labels:n(e,function(e,n){return{level:e.level,formattedLabel:i(e,n),rawLabel:t.scale.getLabel(e),tickValue:e.value}})}}(t)}function Rp(t,e){var i=t.getTickModel().get("customValues");if(i){var o=t.scale.getExtent(),r=Np(t,i);return{ticks:lt(r,function(t){return t>=o[0]&&t<=o[1]})}}return"category"===t.type?function(t,e){var i,o,r=Vp(t,"ticks"),a=fp(e),s=zp(r,a);if(s)return s;e.get("show")&&!t.scale.isBlank()||(i=[]);if(g(a))i=Fp(t,a,!0);else if("auto"===a){var l=Ep(t,t.getLabelModel());o=l.labelCategoryInterval,i=n(l.labels,function(t){return t.tickValue})}else i=Gp(t,o=a,!0);return Bp(r,a,{ticks:i,tickCategoryInterval:o})}(t,e):{ticks:n(t.scale.getTicks(),function(t){return t.value})}}function Ep(t,e){var n,i,o=Vp(t,"labels"),r=fp(e),a=zp(o,r);return a||(g(r)?n=Fp(t,r):(i="auto"===r?function(t){var e=Pp(t).autoInterval;return null!=e?e:Pp(t).autoInterval=t.calculateCategoryInterval()}(t):r,n=Gp(t,i)),Bp(o,r,{labels:n,labelCategoryInterval:i}))}function Vp(t,e){return Pp(t)[e]||(Pp(t)[e]=[])}function zp(t,e){for(var n=0;n<t.length;n++)if(t[n].key===e)return t[n].value}function Bp(t,e,n){return t.push({key:e,value:n}),n}function Gp(t,e,n){var i=dp(t),o=t.scale,r=o.getExtent(),a=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=r[0],c=o.count();0!==u&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var d=gp(t),h=a.get("showMinLabel")||d,p=a.get("showMaxLabel")||d;h&&u!==r[0]&&g(r[0]);for(var f=u;f<=r[1];f+=l)g(f);function g(t){var e={value:t};s.push(n?t:{formattedLabel:i(e),rawLabel:o.getLabel(e),tickValue:t})}return p&&f-l!==r[1]&&g(r[1]),s}function Fp(t,e,n){var i=t.scale,o=dp(t),r=[];return s(i.getTicks(),function(t){var a=i.getLabel(t),s=t.value;e(t.value,a)&&r.push(n?s:{formattedLabel:o(t),rawLabel:a,tickValue:s})}),r}var Wp=[0,1],Hp=
/** @class */function(){function t(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return t.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&t<=i},t.prototype.containData=function(t){return this.scale.contain(t)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(t){return Ye(t||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},t.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&Yp(n=n.slice(),i.count()),Be(t,Wp,n,e)},t.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&Yp(n=n.slice(),i.count());var o=Be(t,n,Wp,e);return this.scale.scale(o)},t.prototype.pointToData=function(t,e){},t.prototype.getTicksCoords=function(t){var e=(t=t||{}).tickModel||this.getTickModel(),i=Rp(this,e).ticks,o=n(i,function(t){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(t):t),tickValue:t}},this);return function(t,e,n,i){var o=e.length;if(!t.onBand||n||!o)return;var r,a,l=t.getExtent();if(1===o)e[0].coord=l[0],r=e[1]={coord:l[1],tickValue:e[0].tickValue};else{var u=e[o-1].tickValue-e[0].tickValue,c=(e[o-1].coord-e[0].coord)/u;s(e,function(t){t.coord-=c/2});var d=t.scale.getExtent();a=1+d[1]-e[o-1].tickValue,r={coord:e[o-1].coord+c*a,tickValue:d[1]+1},e.push(r)}var h=l[0]>l[1];p(e[0].coord,l[0])&&(i?e[0].coord=l[0]:e.shift());i&&p(l[0],e[0].coord)&&e.unshift({coord:l[0]});p(l[1],r.coord)&&(i?r.coord=l[1]:e.pop());i&&p(r.coord,l[1])&&e.push({coord:l[1]});function p(t,e){return t=Fe(t),e=Fe(e),h?t>e:t<e}}(this,o,e.get("alignWithLabel"),t.clamp),o},t.prototype.getMinorTicksCoords=function(){if("ordinal"===this.scale.type)return[];var t=this.model.getModel("minorTick").get("splitNumber");t>0&&t<100||(t=5);var e=this.scale.getMinorTicks(t);return n(e,function(t){return n(t,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this)},this)},t.prototype.getViewLabels=function(){return Op(this).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(){return function(t){var e=function(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}(t),n=dp(t),i=(e.axisRotate-e.labelRotate)/180*Math.PI,o=t.scale,r=o.getExtent(),a=o.count();if(r[1]-r[0]<1)return 0;var s=1;a>40&&(s=Math.max(1,Math.floor(a/40)));for(var l=r[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),c=Math.abs(u*Math.cos(i)),d=Math.abs(u*Math.sin(i)),h=0,p=0;l<=r[1];l+=s){var f,g,y=At(n({value:l}),e.font,"center","top");f=1.3*y.width,g=1.3*y.height,h=Math.max(h,f,7),p=Math.max(p,g,7)}var m=h/c,v=p/d;isNaN(m)&&(m=Infinity),isNaN(v)&&(v=Infinity);var x=Math.max(0,Math.floor(Math.min(m,v))),_=Pp(t.model),b=t.getExtent(),S=_.lastAutoInterval,w=_.lastTickCount;return null!=S&&null!=w&&Math.abs(S-x)<=1&&Math.abs(w-a)<=1&&S>x&&_.axisExtent0===b[0]&&_.axisExtent1===b[1]?x=S:(_.lastTickCount=a,_.lastAutoInterval=x,_.axisExtent0=b[0],_.axisExtent1=b[1]),x}(this)},t}();function Yp(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}var Up=2*Math.PI,Zp=Pt.CMD,Xp=["top","right","bottom","left"];function jp(t,e,n,i,o){var r=n.width,a=n.height;switch(t){case"top":i.set(n.x+r/2,n.y-e),o.set(0,-1);break;case"bottom":i.set(n.x+r/2,n.y+a+e),o.set(0,1);break;case"left":i.set(n.x-e,n.y+a/2),o.set(-1,0);break;case"right":i.set(n.x+r+e,n.y+a/2),o.set(1,0)}}function qp(t,e,n,i,o,r,a,s,l){a-=t,s-=e;var u=Math.sqrt(a*a+s*s),c=(a/=u)*n+t,d=(s/=u)*n+e;if(Math.abs(i-o)%Up<1e-4)return l[0]=c,l[1]=d,u-n;if(r){var h=i;i=Rt(o),o=Rt(h)}else i=Rt(i),o=Rt(o);i>o&&(o+=Up);var p=Math.atan2(s,a);if(p<0&&(p+=Up),p>=i&&p<=o||p+Up>=i&&p+Up<=o)return l[0]=c,l[1]=d,u-n;var f=n*Math.cos(i)+t,g=n*Math.sin(i)+e,y=n*Math.cos(o)+t,m=n*Math.sin(o)+e,v=(f-a)*(f-a)+(g-s)*(g-s),x=(y-a)*(y-a)+(m-s)*(m-s);return v<x?(l[0]=f,l[1]=g,Math.sqrt(v)):(l[0]=y,l[1]=m,Math.sqrt(x))}function Kp(t,e,n,i,o,r,a,s){var l=o-t,u=r-e,c=n-t,d=i-e,h=Math.sqrt(c*c+d*d),p=(l*(c/=h)+u*(d/=h))/h;s&&(p=Math.min(Math.max(p,0),1)),p*=h;var f=a[0]=t+p*c,g=a[1]=e+p*d;return Math.sqrt((f-o)*(f-o)+(g-r)*(g-r))}function Jp(t,e,n,i,o,r,a){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i);var s=t+n,l=e+i,u=a[0]=Math.min(Math.max(o,t),s),c=a[1]=Math.min(Math.max(r,e),l);return Math.sqrt((u-o)*(u-o)+(c-r)*(c-r))}var $p=[];function Qp(t,e,n){var i=Jp(e.x,e.y,e.width,e.height,t.x,t.y,$p);return n.set($p[0],$p[1]),i}function tf(t,e,n){for(var i,o,r=0,a=0,s=0,l=0,u=Infinity,c=e.data,d=t.x,h=t.y,p=0;p<c.length;){var f=c[p++];1===p&&(s=r=c[p],l=a=c[p+1]);var g=u;switch(f){case Zp.M:r=s=c[p++],a=l=c[p++];break;case Zp.L:g=Kp(r,a,c[p],c[p+1],d,h,$p,!0),r=c[p++],a=c[p++];break;case Zp.C:g=Ot(r,a,c[p++],c[p++],c[p++],c[p++],c[p],c[p+1],d,h,$p),r=c[p++],a=c[p++];break;case Zp.Q:g=Nt(r,a,c[p++],c[p++],c[p],c[p+1],d,h,$p),r=c[p++],a=c[p++];break;case Zp.A:var y=c[p++],m=c[p++],v=c[p++],x=c[p++],_=c[p++],b=c[p++];p+=1;var S=!!(1-c[p++]);i=Math.cos(_)*v+y,o=Math.sin(_)*x+m,p<=1&&(s=i,l=o),g=qp(y,m,x,_,_+b,S,(d-y)*x/v+y,h,$p),r=Math.cos(_+b)*v+y,a=Math.sin(_+b)*x+m;break;case Zp.R:g=Jp(s=r=c[p++],l=a=c[p++],c[p++],c[p++],d,h,$p);break;case Zp.Z:g=Kp(r,a,s,l,d,h,$p,!0),r=s,a=l}g<u&&(u=g,n.set($p[0],$p[1]))}return u}var ef=new J,nf=new J,of=new J,rf=new J,af=new J;function sf(t,e){if(t){var n=t.getTextGuideLine(),i=t.getTextContent();if(i&&n){var o=t.textGuideLineConfig||{},r=[[0,0],[0,0],[0,0]],a=o.candidates||Xp,s=i.getBoundingRect().clone();s.applyTransform(i.getComputedTransform());var l=Infinity,u=o.anchor,c=t.getComputedTransform(),d=c&&D([],c),h=e.get("length2")||0;u&&of.copy(u);for(var p=0;p<a.length;p++){jp(a[p],0,s,ef,rf),J.scaleAndAdd(nf,ef,rf,h),nf.transform(d);var f=t.getBoundingRect(),g=u?u.distance(nf):t instanceof y?tf(nf,t.path,of):Qp(nf,f,of);g<l&&(l=g,nf.transform(c),of.transform(c),of.toArray(r[0]),nf.toArray(r[1]),ef.toArray(r[2]))}cf(r,e.get("minTurnAngle")),n.setShape({points:r})}}}var lf=[],uf=new J;function cf(t,e){if(e<=180&&e>0){e=e/180*Math.PI,ef.fromArray(t[0]),nf.fromArray(t[1]),of.fromArray(t[2]),J.sub(rf,ef,nf),J.sub(af,of,nf);var n=rf.len(),i=af.len();if(!(n<.001||i<.001)){rf.scale(1/n),af.scale(1/i);var o=rf.dot(af);if(Math.cos(e)<o){var r=Kp(nf.x,nf.y,of.x,of.y,ef.x,ef.y,lf,!1);uf.fromArray(lf),uf.scaleAndAdd(af,r/Math.tan(Math.PI-e));var a=of.x!==nf.x?(uf.x-nf.x)/(of.x-nf.x):(uf.y-nf.y)/(of.y-nf.y);if(isNaN(a))return;a<0?J.copy(uf,nf):a>1&&J.copy(uf,of),uf.toArray(t[1])}}}}function df(t,e,n){if(n<=180&&n>0){n=n/180*Math.PI,ef.fromArray(t[0]),nf.fromArray(t[1]),of.fromArray(t[2]),J.sub(rf,nf,ef),J.sub(af,of,nf);var i=rf.len(),o=af.len();if(!(i<.001||o<.001))if(rf.scale(1/i),af.scale(1/o),rf.dot(e)<Math.cos(n)){var r=Kp(nf.x,nf.y,of.x,of.y,ef.x,ef.y,lf,!1);uf.fromArray(lf);var a=Math.PI/2,s=a+Math.acos(af.dot(e))-n;if(s>=a)J.copy(uf,of);else{uf.scaleAndAdd(af,r/Math.tan(Math.PI/2-s));var l=of.x!==nf.x?(uf.x-nf.x)/(of.x-nf.x):(uf.y-nf.y)/(of.y-nf.y);if(isNaN(l))return;l<0?J.copy(uf,nf):l>1&&J.copy(uf,of)}uf.toArray(t[1])}}}function hf(t,e,n,i){var o="normal"===n,r=o?t:t.ensureState(n);r.ignore=e;var a=i.get("smooth");a&&!0===a&&(a=.3),r.shape=r.shape||{},a>0&&(r.shape.smooth=a);var s=i.getModel("lineStyle").getLineStyle();o?t.useStyle(s):r.style=s}function pf(t,e){var n=e.smooth,i=e.points;if(i)if(t.moveTo(i[0][0],i[0][1]),n>0&&i.length>=3){var o=Lt(i[0],i[1]),r=Lt(i[1],i[2]);if(!o||!r)return t.lineTo(i[1][0],i[1][1]),void t.lineTo(i[2][0],i[2][1]);var a=Math.min(o,r)*n,s=kt([],i[1],i[0],a/o),l=kt([],i[1],i[2],a/r),u=kt([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var c=1;c<i.length;c++)t.lineTo(i[c][0],i[c][1])}function ff(t,e,n){var i=t.getTextGuideLine(),o=t.getTextContent();if(o){for(var r=e.normal,a=r.get("show"),s=o.ignore,l=0;l<$n.length;l++){var u=$n[l],c=e[u],d="normal"===u;if(c){var h=c.get("show");if((d?s:_(o.states[u]&&o.states[u].ignore,s))||!_(h,a)){var p=d?i:i&&i.states[u];p&&(p.ignore=!0),i&&hf(i,!0,u,c);continue}i||(i=new G,t.setTextGuideLine(i),d||!s&&a||hf(i,!0,"normal",e.normal),t.stateProxy&&(i.stateProxy=t.stateProxy)),hf(i,!1,u,c)}}if(i){C(i.style,n),i.style.fill=null;var f=r.get("showAbove");(t.textGuideLineConfig=t.textGuideLineConfig||{}).showAbove=f||!1,i.buildPath=pf}}else i&&t.removeTextGuideLine()}function gf(t,e){e=e||"labelLine";for(var n={normal:t.getModel(e)},i=0;i<Jn.length;i++){var o=Jn[i];n[o]=t.getModel([o,e])}return n}function yf(t){for(var e=[],n=0;n<t.length;n++){var i=t[n];if(!i.defaultAttr.ignore){var o=i.label,r=o.getComputedTransform(),a=o.getBoundingRect(),s=!r||r[1]<1e-5&&r[2]<1e-5,l=o.style.margin||0,u=a.clone();u.applyTransform(r),u.x-=l/2,u.y-=l/2,u.width+=l,u.height+=l;var c=s?new K(a,r):null;e.push({label:o,labelLine:i.labelLine,rect:u,localRect:a,obb:c,priority:i.priority,defaultAttr:i.defaultAttr,layoutOption:i.computedLayoutOption,axisAligned:s,transform:r})}}return e}function mf(t,e,n,i,o,r){var a=t.length;if(!(a<2)){t.sort(function(t,n){return t.rect[e]-n.rect[e]});for(var s,l=0,u=!1,c=0;c<a;c++){var d=t[c],h=d.rect;(s=h[e]-l)<0&&(h[e]-=s,d.label[e]-=s,u=!0),l=h[e]+h[n]}var p,f,g=t[0],y=t[a-1];return m(),p<0&&_(-p,.8),f<0&&_(f,.8),m(),v(p,f,1),v(f,p,-1),m(),p<0&&b(-p),f<0&&b(f),u}function m(){p=g.rect[e]-i,f=o-y.rect[e]-y.rect[n]}function v(t,e,n){if(t<0){var i=Math.min(e,-t);if(i>0){x(i*n,0,a);var o=i+t;o<0&&_(-o*n,1)}else _(-t*n,1)}}function x(n,i,o){0!==n&&(u=!0);for(var r=i;r<o;r++){var a=t[r];a.rect[e]+=n,a.label[e]+=n}}function _(i,o){for(var r=[],s=0,l=1;l<a;l++){var u=t[l-1].rect,c=Math.max(t[l].rect[e]-u[e]-u[n],0);r.push(c),s+=c}if(s){var d=Math.min(Math.abs(i)/s,o);if(i>0)for(l=0;l<a-1;l++){x(r[l]*d,0,l+1)}else for(l=a-1;l>0;l--){x(-(r[l-1]*d),l,a)}}}function b(t){var e=t<0?-1:1;t=Math.abs(t);for(var n=Math.ceil(t/(a-1)),i=0;i<a-1;i++)if(e>0?x(n,0,i+1):x(-n,a-i-1,a),(t-=n)<=0)return}}function vf(t,e,n,i){return mf(t,"y","height",e,n)}function xf(t){var e=[];t.sort(function(t,e){return e.priority-t.priority});var n=new U(0,0,0,0);function i(t){if(!t.ignore){var e=t.ensureState("emphasis");null==e.ignore&&(e.ignore=!1)}t.ignore=!0}for(var o=0;o<t.length;o++){var r=t[o],a=r.axisAligned,s=r.localRect,l=r.transform,u=r.label,c=r.labelLine;n.copy(r.rect),n.width-=.1,n.height-=.1,n.x+=.05,n.y+=.05;for(var d=r.obb,h=!1,p=0;p<e.length;p++){var f=e[p];if(n.intersect(f.rect)){if(a&&f.axisAligned){h=!0;break}if(f.obb||(f.obb=new K(f.localRect,f.transform)),d||(d=new K(s,l)),d.intersect(f.obb)){h=!0;break}}}h?(i(u),c&&i(c)):(u.attr("ignore",r.defaultAttr.ignore),c&&c.attr("ignore",r.defaultAttr.labelGuideIgnore),e.push(r))}}function _f(t){if(t){for(var e=[],n=0;n<t.length;n++)e.push(t[n].slice());return e}}function bf(t,e){var n=t.label,i=e&&e.getTextGuideLine();return{dataIndex:t.dataIndex,dataType:t.dataType,seriesIndex:t.seriesModel.seriesIndex,text:t.label.style.text,rect:t.hostRect,labelRect:t.rect,
// x: labelAttr.x,
// y: labelAttr.y,
align:n.style.align,verticalAlign:n.style.verticalAlign,labelLinePoints:_f(i&&i.shape.points)}}var Sf=["align","verticalAlign","width","height","fontSize"],wf=new I,Mf=wn(),If=wn();function Df(t,e,n){for(var i=0;i<n.length;i++){var o=n[i];null!=e[o]&&(t[o]=e[o])}}var Tf=["x","y","rotation"],Cf=
/** @class */function(){function t(){this._labelList=[],this._chartViewList=[]}return t.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},t.prototype._addLabel=function(t,e,n,i,o){var r=i.style,a=i.__hostTarget.textConfig||{},s=i.getComputedTransform(),l=i.getBoundingRect().plain();U.applyTransform(l,l,s),s?wf.setLocalTransform(s):(wf.x=wf.y=wf.rotation=wf.originX=wf.originY=0,wf.scaleX=wf.scaleY=1),wf.rotation=Rt(wf.rotation);var u,c=i.__hostTarget;if(c){u=c.getBoundingRect().plain();var d=c.getComputedTransform();U.applyTransform(u,u,d)}var h=u&&c.getTextGuideLine();this._labelList.push({label:i,labelLine:h,seriesModel:n,dataIndex:t,dataType:e,layoutOption:o,computedLayoutOption:null,rect:l,hostRect:u,
// Label with lower priority will be hidden when overlapped
// Use rect size as default priority
priority:u?u.width*u.height:0,
// Save default label attributes.
// For restore if developers want get back to default value in callback.
defaultAttr:{ignore:i.ignore,labelGuideIgnore:h&&h.ignore,x:wf.x,y:wf.y,scaleX:wf.scaleX,scaleY:wf.scaleY,rotation:wf.rotation,style:{x:r.x,y:r.y,align:r.align,verticalAlign:r.verticalAlign,width:r.width,height:r.height,fontSize:r.fontSize},cursor:i.cursor,attachedPos:a.position,attachedRot:a.rotation}})},t.prototype.addLabelsOfSeries=function(t){var e=this;this._chartViewList.push(t);var n=t.__model,i=n.get("labelLayout");(g(i)||x(i).length)&&t.group.traverse(function(t){if(t.ignore)return!0;var o=t.getTextContent(),r=Un(t);o&&!o.disableLabelLayout&&e._addLabel(r.dataIndex,r.dataType,n,o,i)})},t.prototype.updateLayoutConfig=function(t){var e=t.getWidth(),n=t.getHeight();function i(t,e){return function(){sf(t,e)}}for(var o=0;o<this._labelList.length;o++){var r=this._labelList[o],a=r.label,s=a.__hostTarget,l=r.defaultAttr,u=void 0;u=(u=g(r.layoutOption)?r.layoutOption(bf(r,s)):r.layoutOption)||{},r.computedLayoutOption=u;var c=Math.PI/180;s&&s.setTextConfig({
// Force to set local false.
local:!1,
// Ignore position and rotation config on the host el if x or y is changed.
position:null!=u.x||null!=u.y?null:l.attachedPos,
// Ignore rotation config on the host el if rotation is changed.
rotation:null!=u.rotate?u.rotate*c:l.attachedRot,offset:[u.dx||0,u.dy||0]});var d=!1;if(null!=u.x?(a.x=Ge(u.x,e),a.setStyle("x",0),d=!0):(a.x=l.x,a.setStyle("x",l.style.x)),null!=u.y?(a.y=Ge(u.y,n),a.setStyle("y",0),d=!0):(a.y=l.y,a.setStyle("y",l.style.y)),u.labelLinePoints){var h=s.getTextGuideLine();h&&(h.setShape({points:u.labelLinePoints}),d=!1)}Mf(a).needsUpdateLabelLine=d,a.rotation=null!=u.rotate?u.rotate*c:l.rotation,a.scaleX=l.scaleX,a.scaleY=l.scaleY;for(var p=0;p<Sf.length;p++){var f=Sf[p];a.setStyle(f,null!=u[f]?u[f]:l.style[f])}if(u.draggable){if(a.draggable=!0,a.cursor="move",s){var y=r.seriesModel;if(null!=r.dataIndex)y=r.seriesModel.getData(r.dataType).getItemModel(r.dataIndex);a.on("drag",i(s,y.getModel("labelLine")))}}else a.off("drag"),a.cursor=l.cursor}},t.prototype.layout=function(t){var e=t.getWidth(),n=t.getHeight(),i=yf(this._labelList),o=lt(i,function(t){return"shiftX"===t.layoutOption.moveOverlap}),r=lt(i,function(t){return"shiftY"===t.layoutOption.moveOverlap});mf(o,"x","width",0,e),vf(r,0,n),xf(lt(i,function(t){return t.layoutOption.hideOverlap}))},t.prototype.processLabelsOverall=function(){var t=this;s(this._chartViewList,function(e){var n=e.__model,i=e.ignoreLabelLineUpdate,o=n.isAnimationEnabled();e.group.traverse(function(e){if(e.ignore&&!e.forceLabelAnimation)return!0;var r=!i,a=e.getTextContent();!r&&a&&(r=Mf(a).needsUpdateLabelLine),r&&t._updateLabelLine(e,n),o&&t._animateLabels(e,n)})})},t.prototype._updateLabelLine=function(t,e){var n=t.getTextContent(),i=Un(t),o=i.dataIndex;if(n&&null!=o){var r=e.getData(i.dataType),a=r.getItemModel(o),s={},l=r.getItemVisual(o,"style");if(l){var u=r.getVisual("drawType");s.stroke=l[u]}var c=a.getModel("labelLine");ff(t,gf(a),s),sf(t,c)}},t.prototype._animateLabels=function(t,e){var n=t.getTextContent(),i=t.getTextGuideLine();if(n&&(t.forceLabelAnimation||!n.ignore&&!n.invisible&&!t.disableLabelAnimation&&!ji(t))){var o=(f=Mf(n)).oldLayout,r=Un(t),a=r.dataIndex,s={x:n.x,y:n.y,rotation:n.rotation},u=e.getData(r.dataType);if(o){n.attr(o);var c=t.prevStates;c&&(l(c,"select")>=0&&n.attr(f.oldLayoutSelect),l(c,"emphasis")>=0&&n.attr(f.oldLayoutEmphasis)),Zi(n,s,e,a)}else if(n.attr(s),!Bo(n).valueAnimation){var d=_(n.style.opacity,1);n.style.opacity=0,Xi(n,{style:{opacity:d}},e,a)}if(f.oldLayout=s,n.states.select){var h=f.oldLayoutSelect={};Df(h,s,Tf),Df(h,n.states.select,Tf)}if(n.states.emphasis){var p=f.oldLayoutEmphasis={};Df(p,s,Tf),Df(p,n.states.emphasis,Tf)}Fo(n,a,u,e,e)}if(i&&!i.ignore&&!i.invisible){o=(f=If(i)).oldLayout;var f,g={points:i.shape.points};o?(i.attr({shape:o}),Zi(i,{shape:g},e)):(i.setShape(g),i.style.strokePercent=0,Xi(i,{style:{strokePercent:1}},e)),f.oldLayout=g}},t}(),Af=wn();var Lf=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return h(e,t),e.prototype.getInitialData=function(t){return ch(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(t){var e=new X,n=gc("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);e.add(n),n.setStyle(t.lineStyle);var i=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),r="none"===i?"circle":i,a=.8*t.itemHeight,s=gc(r,(t.itemWidth-a)/2,(t.itemHeight-a)/2,a,a,t.itemStyle.fill);e.add(s),s.setStyle(t.itemStyle);var l="inherit"===t.iconRotate?o:t.iconRotate||0;return s.rotation=l*Math.PI/180,s.setOrigin([t.itemWidth/2,t.itemHeight/2]),r.indexOf("empty")>-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),e},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={
// zlevel: 0,
z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},
// itemStyle: {
// },
endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},
// areaStyle: {
// origin of areaStyle. Valid values:
// `'auto'/null/undefined`: from axisLine to data
// `'start'`: from min to data
// `'end'`: from data to max
// origin: 'auto'
// },
// false, 'start', 'end', 'middle'
step:!1,
// Disabled if step is true
smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,
// `false`: follow the label interval strategy.
// `true`: show all symbols.
// `'auto'`: If possible, show all symbols, otherwise
// follow the label interval strategy.
showAllSymbol:"auto",
// Whether to connect break point.
connectNulls:!1,
// Sampling for large data. Can be: 'average', 'max', 'min', 'sum', 'lttb'.
sampling:"none",animationEasing:"linear",
// Disable progressive
progressive:0,hoverLayerThreshold:Infinity,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(jl);function kf(t,e){var n=t.mapDimensionsAll("defaultedLabel"),i=n.length;if(1===i){var o=Hs(t,e,n[0]);return null!=o?o+"":null}if(i){for(var r=[],a=0;a<n.length;a++)r.push(Hs(t,e,n[a]));return r.join(" ")}}function Pf(t,e){var n=t.mapDimensionsAll("defaultedLabel");if(!o(e))return e+"";for(var i=[],r=0;r<n.length;r++){var a=t.getDimensionIndex(n[r]);a>=0&&i.push(e[a])}return i.join(" ")}var Nf=
/** @class */function(t){function e(e,n,i,o){var r=t.call(this)||this;return r.updateData(e,n,i,o),r}return h(e,t),e.prototype._createSymbol=function(t,e,n,i,o){this.removeAll();var r=gc(t,-1,-1,2,2,null,o);r.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),r.drift=Of,this._symbolType=t,this.add(r)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){_i(this.childAt(0))},e.prototype.downplay=function(){bi(this.childAt(0))},e.prototype.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},e.prototype.setDraggable=function(t,e){var n=this.childAt(0);n.draggable=t,n.cursor=!e&&t?"move":n.cursor},e.prototype.updateData=function(t,n,i,o){this.silent=!1;var r=t.getItemVisual(n,"symbol")||"circle",a=t.hostModel,s=e.getSymbolSize(t,n),l=r!==this._symbolType,u=o&&o.disableAnimation;if(l){var c=t.getItemVisual(n,"symbolKeepAspect");this._createSymbol(r,t,n,s,c)}else{(h=this.childAt(0)).silent=!1;var d={scaleX:s[0]/2,scaleY:s[1]/2};u?h.attr(d):Zi(h,d,a,n),$i(h)}if(this._updateCommon(t,n,s,i,o),l){var h=this.childAt(0);if(!u){d={scaleX:this._sizeX,scaleY:this._sizeY,style:{
// Always fadeIn. Because it has fadeOut animation when symbol is removed..
opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,Xi(h,d,a,n)}}u&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,e,n,i,o){var r,a,s,l,u,c,d,h,p,g=this.childAt(0),y=t.hostModel;if(i&&(r=i.emphasisItemStyle,a=i.blurItemStyle,s=i.selectItemStyle,l=i.focus,u=i.blurScope,d=i.labelStatesModels,h=i.hoverScale,p=i.cursorStyle,c=i.emphasisDisabled),!i||t.hasItemOption){var m=i&&i.itemModel?i.itemModel:t.getItemModel(e),v=m.getModel("emphasis");r=v.getModel("itemStyle").getItemStyle(),s=m.getModel(["select","itemStyle"]).getItemStyle(),a=m.getModel(["blur","itemStyle"]).getItemStyle(),l=v.get("focus"),u=v.get("blurScope"),c=v.get("disabled"),d=ko(m),h=v.getShallow("scale"),p=m.getShallow("cursor")}var x=t.getItemVisual(e,"symbolRotate");g.attr("rotation",(x||0)*Math.PI/180||0);var _=mc(t.getItemVisual(e,"symbolOffset"),n);_&&(g.x=_[0],g.y=_[1]),p&&g.attr("cursor",p);var S=t.getItemVisual(e,"style"),w=S.fill;if(g instanceof b){var M=g.style;g.useStyle(f({
// TODO other properties like x, y ?
image:M.image,x:M.x,y:M.y,width:M.width,height:M.height},S))}else g.__isEmptyBrush?g.useStyle(f({},S)):g.useStyle(S),g.style.decal=null,g.setColor(w,o&&o.symbolInnerColor),g.style.strokeNoScale=!0;var I=t.getItemVisual(e,"liftZ"),D=this._z2;null!=I?null==D&&(this._z2=g.z2,g.z2+=I):null!=D&&(g.z2=D,this._z2=null);var T=o&&o.useNameLabel;Lo(g,d,{labelFetcher:y,labelDataIndex:e,defaultText:function(e){return T?t.getName(e):kf(t,e)},inheritColor:w,defaultOpacity:S.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var C=g.ensureState("emphasis");C.style=r,g.ensureState("select").style=s,g.ensureState("blur").style=a;var A=null==h||!0===h?Math.max(1.1,3/this._sizeY):isFinite(h)&&h>0?+h:1;C.scaleX=this._sizeX*A,C.scaleY=this._sizeY*A,this.setSymbolScale(1),Oi(this,l,u,c)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,e,n){var i=this.childAt(0),o=Un(this).dataIndex,r=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var a=i.getTextContent();a&&qi(a,{style:{opacity:0}},e,{dataIndex:o,removeOpt:r,cb:function(){i.removeTextContent()}})}else i.removeTextContent();qi(i,{style:{opacity:0},scaleX:0,scaleY:0},e,{dataIndex:o,cb:t,removeOpt:r})},e.getSymbolSize=function(t,e){return yc(t.getItemVisual(e,"symbolSize"))},e}(X);function Of(t,e){this.parent.drift(t,e)}function Rf(t,e,n,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(i.isIgnore&&i.isIgnore(n))&&!(i.clipShape&&!i.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(n,"symbol")}function Ef(t){return null==t||r(t)||(t={isIgnore:t}),t||{}}function Vf(t){var e=t.hostModel,n=e.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:ko(e),cursorStyle:e.get("cursor")}}var zf=
/** @class */function(){function t(t){this.group=new X,this._SymbolCtor=t||Nf}return t.prototype.updateData=function(t,e){this._progressiveEls=null,e=Ef(e);var n=this.group,i=t.hostModel,o=this._data,r=this._SymbolCtor,a=e.disableAnimation,s=Vf(t),l={disableAnimation:a},u=e.getSymbolPoint||function(e){return t.getItemLayout(e)};o||n.removeAll(),t.diff(o).add(function(i){var o=u(i);if(Rf(t,o,i,e)){var a=new r(t,i,s,l);a.setPosition(o),t.setItemGraphicEl(i,a),n.add(a)}}).update(function(c,d){var h=o.getItemGraphicEl(d),p=u(c);if(Rf(t,p,c,e)){var f=t.getItemVisual(c,"symbol")||"circle",g=h&&h.getSymbolType&&h.getSymbolType();if(!h||g&&g!==f)n.remove(h),(h=new r(t,c,s,l)).setPosition(p);else{h.updateData(t,c,s,l);var y={x:p[0],y:p[1]};a?h.attr(y):Zi(h,y,i)}n.add(h),t.setItemGraphicEl(c,h)}else n.remove(h)}).remove(function(t){var e=o.getItemGraphicEl(t);e&&e.fadeOut(function(){n.remove(e)},i)}).execute(),this._getSymbolPoint=u,this._data=t},t.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(e,n){var i=t._getSymbolPoint(n);e.setPosition(i),e.markRedraw()})},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=Vf(t),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e,n){function i(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=Ef(n);for(var o=t.start;o<t.end;o++){var r=e.getItemLayout(o);if(Rf(e,r,o,n)){var a=new this._SymbolCtor(e,o,this._seriesScope);a.traverse(i),a.setPosition(r),this.group.add(a),e.setItemGraphicEl(o,a),this._progressiveEls.push(a)}}},t.prototype.eachRendered=function(t){Io(this._progressiveEls||this.group,t)},t.prototype.remove=function(t){var e=this.group,n=this._data;n&&t?n.eachItemGraphicEl(function(t){t.fadeOut(function(){e.remove(t)},n.hostModel)}):e.removeAll()},t}();function Bf(t,e,i){var o=t.getBaseAxis(),r=t.getOtherAxis(o),a=function(t,e){var n=0,i=t.scale.getExtent();"start"===e?n=i[0]:"end"===e?n=i[1]:u(e)&&!isNaN(e)?n=e:i[0]>0?n=i[0]:i[1]<0&&(n=i[1]);return n}(r,i),s=o.dim,l=r.dim,c=e.mapDimension(l),d=e.mapDimension(s),h="x"===l||"radius"===l?1:0,p=n(t.dimensions,function(t){return e.mapDimension(t)}),f=!1,g=e.getCalculationInfo("stackResultDimension");return lh(e,p[0]
/* , dims[1] */)&&(f=!0,p[0]=g),lh(e,p[1]
/* , dims[0] */)&&(f=!0,p[1]=g),{dataDimsForPoint:p,valueStart:a,valueAxisDim:l,baseAxisDim:s,stacked:!!f,valueDim:c,baseDim:d,baseDataOffset:h,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function Gf(t,e,n,i){var o=NaN;t.stacked&&(o=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(o)&&(o=t.valueStart);var r=t.baseDataOffset,a=[];return a[r]=n.get(t.baseDim,i),a[1-r]=o,e.dataToPoint(a)}var Ff=Math.min,Wf=Math.max;function Hf(t,e){return isNaN(t)||isNaN(e)}function Yf(t,e,n,i,o,r,a,s,l){for(var u,c,d,h,p,f,g=n,y=0;y<i;y++){var m=e[2*g],v=e[2*g+1];if(g>=o||g<0)break;if(Hf(m,v)){if(l){g+=r;continue}break}if(g===n)t[r>0?"moveTo":"lineTo"](m,v),d=m,h=v;else{var x=m-u,_=v-c;if(x*x+_*_<.5){g+=r;continue}if(a>0){for(var b=g+r,S=e[2*b],w=e[2*b+1];S===m&&w===v&&y<i;)y++,g+=r,S=e[2*(b+=r)],w=e[2*b+1],x=(m=e[2*g])-u,_=(v=e[2*g+1])-c;var M=y+1;if(l)for(;Hf(S,w)&&M<i;)M++,S=e[2*(b+=r)],w=e[2*b+1];var I=.5,D=0,T=0,C=void 0,A=void 0;if(M>=i||Hf(S,w))p=m,f=v;else{D=S-u,T=w-c;var L=m-u,k=S-m,P=v-c,N=w-v,O=void 0,R=void 0;if("x"===s){var E=D>0?1:-1;p=m-E*(O=Math.abs(L))*a,f=v,C=m+E*(R=Math.abs(k))*a,A=v}else if("y"===s){var V=T>0?1:-1;p=m,f=v-V*(O=Math.abs(P))*a,C=m,A=v+V*(R=Math.abs(N))*a}else O=Math.sqrt(L*L+P*P),p=m-D*a*(1-(I=(R=Math.sqrt(k*k+N*N))/(R+O))),f=v-T*a*(1-I),A=v+T*a*I,C=Ff(C=m+D*a*I,Wf(S,m)),A=Ff(A,Wf(w,v)),C=Wf(C,Ff(S,m)),f=v-(T=(A=Wf(A,Ff(w,v)))-v)*O/R,p=Ff(p=m-(D=C-m)*O/R,Wf(u,m)),f=Ff(f,Wf(c,v)),C=m+(D=m-(p=Wf(p,Ff(u,m))))*R/O,A=v+(T=v-(f=Wf(f,Ff(c,v))))*R/O}t.bezierCurveTo(d,h,p,f,m,v),d=C,h=A}else t.lineTo(m,v)}u=m,c=v,g+=r}return y}var Uf=
/** @class */
function(){return function(){this.smooth=0,this.smoothConstraint=!0}}(),Zf=
/** @class */function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polyline",n}return h(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Uf},e.prototype.buildPath=function(t,e){var n=e.points,i=0,o=n.length/2;if(e.connectNulls){for(;o>0&&Hf(n[2*o-2],n[2*o-1]);o--);for(;i<o&&Hf(n[2*i],n[2*i+1]);i++);}for(;i<o;)i+=Yf(t,n,i,o,o,1,e.smooth,e.smoothMonotone,e.connectNulls)+1},e.prototype.getPointOn=function(t,e){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n,i,o=this.path.data,r=Pt.CMD,a="x"===e,s=[],l=0;l<o.length;){var u=void 0,c=void 0,d=void 0,h=void 0,p=void 0,f=void 0,g=void 0;switch(o[l++]){case r.M:n=o[l++],i=o[l++];break;case r.L:if(u=o[l++],c=o[l++],(g=a?(t-n)/(u-n):(t-i)/(c-i))<=1&&g>=0){var y=a?(c-i)*g+i:(u-n)*g+n;return a?[t,y]:[y,t]}n=u,i=c;break;case r.C:u=o[l++],c=o[l++],d=o[l++],h=o[l++],p=o[l++],f=o[l++];var m=a?Et(n,u,d,p,t,s):Et(i,c,h,f,t,s);if(m>0)for(var v=0;v<m;v++){var x=s[v];if(x<=1&&x>=0){y=a?Vt(i,c,h,f,x):Vt(n,u,d,p,x);return a?[t,y]:[y,t]}}n=p,i=f}}},e}(y),Xf=
/** @class */function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e}(Uf),jf=
/** @class */function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polygon",n}return h(e,t),e.prototype.getDefaultShape=function(){return new Xf},e.prototype.buildPath=function(t,e){var n=e.points,i=e.stackedOnPoints,o=0,r=n.length/2,a=e.smoothMonotone;if(e.connectNulls){for(;r>0&&Hf(n[2*r-2],n[2*r-1]);r--);for(;o<r&&Hf(n[2*o],n[2*o+1]);o++);}for(;o<r;){var s=Yf(t,n,o,r,r,1,e.smooth,a,e.connectNulls);Yf(t,i,o+s-1,s,r,-1,e.stackedOnSmooth,a,e.connectNulls),o+=s+1,t.closePath()}},e}(y);function qf(t,e,n,i,o){var r=t.getArea(),a=r.x,s=r.y,l=r.width,u=r.height,c=n.get(["lineStyle","width"])||0;a-=c/2,s-=c/2,l+=c,u+=c,l=Math.ceil(l),a!==Math.floor(a)&&(a=Math.floor(a),l++);var d=new F({shape:{x:a,y:s,width:l,height:u}});if(e){var h=t.getBaseAxis(),p=h.isHorizontal(),f=h.inverse;p?(f&&(d.shape.x+=l),d.shape.width=0):(f||(d.shape.y+=u),d.shape.height=0);var y=g(o)?function(t){o(t,d)}:null;Xi(d,{shape:{width:l,height:u,x:a,y:s}},n,null,i,y)}return d}function Kf(t,e,n){var i=t.getArea(),o=Fe(i.r0,1),r=Fe(i.r,1),a=new V({shape:{cx:Fe(t.cx,1),cy:Fe(t.cy,1),r0:o,r:r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});e&&("angle"===t.getBaseAxis().dim?a.shape.endAngle=i.startAngle:a.shape.r=o,Xi(a,{shape:{endAngle:i.endAngle,r:r}},n));return a}function Jf(t,e,n,i,o){return t?"polar"===t.type?Kf(t,e,n):"cartesian2d"===t.type?qf(t,e,n,i,o):null:null}function $f(t,e){return t.type===e}function Qf(t,e){if(t.length===e.length){for(var n=0;n<t.length;n++)if(t[n]!==e[n])return;return!0}}function tg(t){for(var e=Infinity,n=Infinity,i=-Infinity,o=-Infinity,r=0;r<t.length;){var a=t[r++],s=t[r++];isNaN(a)||(e=Math.min(a,e),i=Math.max(a,i)),isNaN(s)||(n=Math.min(s,n),o=Math.max(s,o))}return[[e,n],[i,o]]}function eg(t,e){var n=tg(t),i=n[0],o=n[1],r=tg(e),a=r[0],s=r[1];return Math.max(Math.abs(i[0]-a[0]),Math.abs(i[1]-a[1]),Math.abs(o[0]-s[0]),Math.abs(o[1]-s[1]))}function ng(t){return u(t)?t:t?.5:0}function ig(t,e,n,i,o){var r=n.getBaseAxis(),a="x"===r.dim||"radius"===r.dim?0:1,s=[],l=0,u=[],c=[],d=[],h=[];if(o){for(l=0;l<t.length;l+=2){var p=e||t;isNaN(p[l])||isNaN(p[l+1])||h.push(t[l],t[l+1])}t=h}for(l=0;l<t.length-2;l+=2)switch(d[0]=t[l+2],d[1]=t[l+3],c[0]=t[l],c[1]=t[l+1],s.push(c[0],c[1]),i){case"end":u[a]=d[a],u[1-a]=c[1-a],s.push(u[0],u[1]);break;case"middle":var f=(c[a]+d[a])/2,g=[];u[a]=g[a]=f,u[1-a]=c[1-a],g[1-a]=d[1-a],s.push(u[0],u[1]),s.push(g[0],g[1]);break;default:u[a]=c[a],u[1-a]=d[1-a],s.push(u[0],u[1])}return s.push(t[l++],t[l++]),s}function og(t,e,i){var o=t.getVisual("visualMeta");if(o&&o.length&&t.count()&&"cartesian2d"===e.type){for(var r,a,l=o.length-1;l>=0;l--){var u=t.getDimensionInfo(o[l].dimension);if("x"===(r=u&&u.coordDim)||"y"===r){a=o[l];break}}if(a){var c=e.getAxis(r),d=n(a.stops,function(t){return{coord:c.toGlobalCoord(c.dataToCoord(t.value)),color:t.color}}),h=d.length,p=a.outerColors.slice();h&&d[0].coord>d[h-1].coord&&(d.reverse(),p.reverse());var f=function(t,e){var n,i,o=[],r=t.length;function a(t,e,n){var i=t.coord,o=(n-i)/(e.coord-i);return{coord:n,color:zt(o,[t.color,e.color])}}for(var s=0;s<r;s++){var l=t[s],u=l.coord;if(u<0)n=l;else{if(u>e){i?o.push(a(i,l,e)):n&&o.push(a(n,l,0),a(n,l,e));break}n&&(o.push(a(n,l,0)),n=null),o.push(l),i=l}}return o}(d,"x"===r?i.getWidth():i.getHeight()),g=f.length;if(!g&&h)return d[0].coord<0?p[1]?p[1]:d[h-1].color:p[0]?p[0]:d[0].color;var y=f[0].coord-10,m=f[g-1].coord+10,v=m-y;if(v<.001)return"transparent";s(f,function(t){t.offset=(t.coord-y)/v}),f.push({
// NOTE: inRangeStopLen may still be 0 if stoplen is zero.
offset:g?f[g-1].offset:.5,color:p[1]||"transparent"}),f.unshift({offset:g?f[0].offset:.5,color:p[0]||"transparent"});var x=new q(0,0,0,0,f,!0);return x[r]=y,x[r+"2"]=m,x}}}function rg(t,e,n){var i=t.get("showAllSymbol"),o="auto"===i;if(!i||o){var r=n.getAxesByScale("ordinal")[0];if(r&&(!o||!function(t,e){var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count();isNaN(i)&&(i=0);for(var o=e.count(),r=Math.max(1,Math.round(o/5)),a=0;a<o;a+=r)if(1.5*Nf.getSymbolSize(e,a)[t.isHorizontal()?1:0]>i)return!1;return!0}(r,e))){var a=e.mapDimension(r.dim),l={};return s(r.getViewLabels(),function(t){var e=r.scale.getRawOrdinalNumber(t.tickValue);l[e]=1}),function(t){return!l.hasOwnProperty(e.get(a,t))}}}}function ag(t,e){return isNaN(t)||isNaN(e)}function sg(t,e){return[t[2*e],t[2*e+1]]}function lg(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e<Jn.length;e++)if(t.get([Jn[e],"endLabel","show"]))return!0;return!1}function ug(t,e,n,i){if($f(e,"cartesian2d")){var o=i.getModel("endLabel"),r=o.get("valueAnimation"),a=i.getData(),s={lastFrameIndex:0},l=lg(i)?function(n,i){t._endLabelOnDuring(n,i,a,s,r,o,e)}:null,u=e.getBaseAxis().isHorizontal(),c=qf(e,n,i,function(){var e=t._endLabel;e&&n&&null!=s.originalX&&e.attr({x:s.originalX,y:s.originalY})},l);if(!i.get("clip",!0)){var d=c.shape,h=Math.max(d.width,d.height);u?(d.y-=h,d.height+=2*h):(d.x-=h,d.width+=2*h)}return l&&l(1,c),c}return Kf(e,n,i)}var cg=
/** @class */function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.init=function(){var t=new X,e=new zf;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t,this._changePolyState=ut(this._changePolyState,this)},e.prototype.render=function(t,e,n){var i=t.coordinateSystem,o=this.group,r=t.getData(),a=t.getModel("lineStyle"),s=t.getModel("areaStyle"),l=r.getLayout("points")||[],u="polar"===i.type,c=this._coordSys,d=this._symbolDraw,h=this._polyline,p=this._polygon,f=this._lineGroup,g=!e.ssr&&t.get("animation"),y=!s.isEmpty(),m=s.get("origin"),v=Bf(i,r,m),x=y&&function(t,e,n){if(!n.valueDim)return[];for(var i=e.count(),o=Ch(2*i),r=0;r<i;r++){var a=Gf(n,t,e,r);o[2*r]=a[0],o[2*r+1]=a[1]}return o}(i,r,v),_=t.get("showSymbol"),b=t.get("connectNulls"),S=_&&!u&&rg(t,r,i),w=this._data;w&&w.eachItemGraphicEl(function(t,e){t.__temp&&(o.remove(t),w.setItemGraphicEl(e,null))}),_||d.remove(),o.add(f);var M,I=!u&&t.get("step");i&&i.getArea&&t.get("clip",!0)&&(null!=(M=i.getArea()).width?(M.x-=.1,M.y-=.1,M.width+=.2,M.height+=.2):M.r0&&(M.r0-=.5,M.r+=.5)),this._clipShapeForSymbol=M;var D=og(r,i,n)||r.getVisual("style")[r.getVisual("drawType")];if(h&&c.type===i.type&&I===this._step){y&&!p?p=this._newPolygon(l,x):p&&!y&&(f.remove(p),p=this._polygon=null),u||this._initOrUpdateEndLabel(t,i,qr(D));var T=f.getClipPath();if(T)Xi(T,{shape:ug(this,i,!1,t).shape},t);else f.setClipPath(ug(this,i,!0,t));_&&d.updateData(r,{isIgnore:S,clipShape:M,disableAnimation:!0,getSymbolPoint:function(t){return[l[2*t],l[2*t+1]]}}),Qf(this._stackedOnPoints,x)&&Qf(this._points,l)||(g?this._doUpdateAnimation(r,x,i,n,I,m,b):(I&&(x&&(x=ig(x,l,i,I,b)),l=ig(l,null,i,I,b)),h.setShape({points:l}),p&&p.setShape({points:l,stackedOnPoints:x})))}else _&&d.updateData(r,{isIgnore:S,clipShape:M,disableAnimation:!0,getSymbolPoint:function(t){return[l[2*t],l[2*t+1]]}}),g&&this._initSymbolLabelAnimation(r,i,M),I&&(x&&(x=ig(x,l,i,I,b)),l=ig(l,null,i,I,b)),h=this._newPolyline(l),y?p=this._newPolygon(l,x):p&&(f.remove(p),p=this._polygon=null),u||this._initOrUpdateEndLabel(t,i,qr(D)),f.setClipPath(ug(this,i,!0,t));var A=t.getModel("emphasis"),L=A.get("focus"),k=A.get("blurScope"),P=A.get("disabled");(h.useStyle(C(
// Use color in lineStyle first
a.getLineStyle(),{fill:"none",stroke:D,lineJoin:"bevel"})),zi(h,t,"lineStyle"),h.style.lineWidth>0&&"bolder"===t.get(["emphasis","lineStyle","width"]))&&(h.getState("emphasis").style.lineWidth=+h.style.lineWidth+1);Un(h).seriesIndex=t.seriesIndex,Oi(h,L,k,P);var N=ng(t.get("smooth")),O=t.get("smoothMonotone");if(h.setShape({smooth:N,smoothMonotone:O,connectNulls:b}),p){var R=r.getCalculationInfo("stackedOnSeries"),E=0;p.useStyle(C(s.getAreaStyle(),{fill:D,opacity:.7,lineJoin:"bevel",decal:r.getVisual("style").decal})),R&&(E=ng(R.get("smooth"))),p.setShape({smooth:N,stackedOnSmooth:E,smoothMonotone:O,connectNulls:b}),zi(p,t,"areaStyle"),Un(p).seriesIndex=t.seriesIndex,Oi(p,L,k,P)}var V=this._changePolyState;r.eachItemGraphicEl(function(t){t&&(t.onHoverStateChange=V)}),this._polyline.onHoverStateChange=V,this._data=r,this._coordSys=i,this._stackedOnPoints=x,this._points=l,this._step=I,this._valueOrigin=m,t.get("triggerLineEvent")&&(this.packEventData(t,h),p&&this.packEventData(t,p))},e.prototype.packEventData=function(t,e){Un(e).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,e,n,i){var o=t.getData(),r=Sn(o,i);if(this._changePolyState("emphasis"),!(r instanceof Array)&&null!=r&&r>=0){var a=o.getLayout("points"),s=o.getItemGraphicEl(r);if(!s){var l=a[2*r],u=a[2*r+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var c=t.get("zlevel")||0,d=t.get("z")||0;(s=new Nf(o,r)).x=l,s.y=u,s.setZ(c,d);var h=s.getSymbolPath().getTextContent();h&&(h.zlevel=c,h.z=d,h.z2=this._polyline.z2+1),s.__temp=!0,o.setItemGraphicEl(r,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else au.prototype.highlight.call(this,t,e,n,i)},e.prototype.downplay=function(t,e,n,i){var o=t.getData(),r=Sn(o,i);if(this._changePolyState("normal"),null!=r&&r>=0){var a=o.getItemGraphicEl(r);a&&(a.__temp?(o.setItemGraphicEl(r,null),this.group.remove(a)):a.downplay())}else au.prototype.downplay.call(this,t,e,n,i)},e.prototype._changePolyState=function(t){var e=this._polygon;gi(this._polyline,t),e&&gi(e,t)},e.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new Zf({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(e),this._polyline=e,e},e.prototype._newPolygon=function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new jf({shape:{points:t,stackedOnPoints:e},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,e,n){var i,o,r=e.getBaseAxis(),a=r.inverse;"cartesian2d"===e.type?(i=r.isHorizontal(),o=!1):"polar"===e.type&&(i="angle"===r.dim,o=!0);var s=t.hostModel,l=s.get("animationDuration");g(l)&&(l=l(null));var u=s.get("animationDelay")||0,c=g(u)?u(null):u;t.eachItemGraphicEl(function(t,r){var s=t;if(s){var d=[t.x,t.y],h=void 0,p=void 0,f=void 0;if(n)if(o){var y=n,m=e.pointToCoord(d);i?(h=y.startAngle,p=y.endAngle,f=-m[1]/180*Math.PI):(h=y.r0,p=y.r,f=m[0])}else{var v=n;i?(h=v.x,p=v.x+v.width,f=t.x):(h=v.y+v.height,p=v.y,f=t.y)}var x=p===h?0:(f-h)/(p-h);a&&(x=1-x);var _=g(u)?u(r):l*x+c,b=s.getSymbolPath(),S=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:_}),S&&S.animateFrom({style:{opacity:0}},{duration:300,delay:_}),b.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,e,n){var i=t.getModel("endLabel");if(lg(t)){var o=t.getData(),r=this._polyline,a=o.getLayout("points");if(!a)return r.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||((s=this._endLabel=new Q({z2:200})).ignoreClip=!0,r.setTextContent(this._endLabel),r.disableLabelAnimation=!0);var l=function(t){for(var e=t.length/2;e>0&&ag(t[2*e-2],t[2*e-1]);e--);return e-1}(a);l>=0&&(Lo(r,ko(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:l,defaultText:function(t,e,n){return null!=n?Pf(o,n):kf(o,t)},enableTextSetter:!0},function(t,e){var n=e.getBaseAxis(),i=n.isHorizontal(),o=n.inverse,r=i?o?"right":"left":"center",a=i?"middle":o?"top":"bottom";return{normal:{align:t.get("align")||r,verticalAlign:t.get("verticalAlign")||a}}}(i,e)),r.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,e,n,i,o,r,a){var s=this._endLabel,l=this._polyline;if(s){t<1&&null==i.originalX&&(i.originalX=s.x,i.originalY=s.y);var u=n.getLayout("points"),c=n.hostModel,d=c.get("connectNulls"),h=r.get("precision"),p=r.get("distance")||0,f=a.getBaseAxis(),g=f.isHorizontal(),y=f.inverse,m=e.shape,v=y?g?m.x:m.y+m.height:g?m.x+m.width:m.y,x=(g?p:0)*(y?-1:1),_=(g?0:-p)*(y?-1:1),b=g?"x":"y",S=function(t,e,n){for(var i,o,r=t.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u<r;u++)if(o=t[2*u+a],!isNaN(o)&&!isNaN(t[2*u+1-a]))if(0!==u){if(i<=e&&o>=e||i>=e&&o<=e){l=u;break}s=u,i=o}else i=o;return{range:[s,l],t:(e-i)/(o-i)}}(u,v,b),w=S.range,M=w[1]-w[0],I=void 0;if(M>=1){if(M>1&&!d){var D=sg(u,w[0]);s.attr({x:D[0]+x,y:D[1]+_}),o&&(I=c.getRawValue(w[0]))}else{(D=l.getPointOn(v,b))&&s.attr({x:D[0]+x,y:D[1]+_});var T=c.getRawValue(w[0]),C=c.getRawValue(w[1]);o&&(I=Pn(n,h,T,C,S.t))}i.lastFrameIndex=w[0]}else{var A=1===t||i.lastFrameIndex>0?w[0]:0;D=sg(u,A);o&&(I=c.getRawValue(A)),s.attr({x:D[0]+x,y:D[1]+_})}if(o){var L=Bo(s);"function"==typeof L.setLabelText&&L.setLabelText(I)}}},e.prototype._doUpdateAnimation=function(t,e,n,i,o,r,a){var s=this._polyline,l=this._polygon,u=t.hostModel,c=function(t,e,n,i,o,r,a){for(var s=function(t,e){var n=[];return e.diff(t).add(function(t){n.push({cmd:"+",idx:t})}).update(function(t,e){n.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){n.push({cmd:"-",idx:t})}).execute(),n}(t,e),l=[],u=[],c=[],d=[],h=[],p=[],f=[],g=Bf(o,e,a),y=t.getLayout("points")||[],m=e.getLayout("points")||[],v=0;v<s.length;v++){var x=s[v],_=!0,b=void 0,S=void 0;switch(x.cmd){case"=":b=2*x.idx,S=2*x.idx1;var w=y[b],M=y[b+1],I=m[S],D=m[S+1];(isNaN(w)||isNaN(M))&&(w=I,M=D),l.push(w,M),u.push(I,D),c.push(n[b],n[b+1]),d.push(i[S],i[S+1]),f.push(e.getRawIndex(x.idx1));break;case"+":var T=x.idx,C=g.dataDimsForPoint,A=o.dataToPoint([e.get(C[0],T),e.get(C[1],T)]);S=2*T,l.push(A[0],A[1]),u.push(m[S],m[S+1]);var L=Gf(g,o,e,T);c.push(L[0],L[1]),d.push(i[S],i[S+1]),f.push(e.getRawIndex(T));break;case"-":_=!1}_&&(h.push(x),p.push(p.length))}p.sort(function(t,e){return f[t]-f[e]});var k=l.length,P=Ch(k),N=Ch(k),O=Ch(k),R=Ch(k),E=[];for(v=0;v<p.length;v++){var V=p[v],z=2*v,B=2*V;P[z]=l[B],P[z+1]=l[B+1],N[z]=u[B],N[z+1]=u[B+1],O[z]=c[B],O[z+1]=c[B+1],R[z]=d[B],R[z+1]=d[B+1],E[v]=h[V]}return{current:P,next:N,stackedOnCurrent:O,stackedOnNext:R,status:E}}(this._data,t,this._stackedOnPoints,e,this._coordSys,0,this._valueOrigin),d=c.current,h=c.stackedOnCurrent,p=c.next,f=c.stackedOnNext;if(o&&(h=ig(c.stackedOnCurrent,c.current,n,o,a),d=ig(c.current,null,n,o,a),f=ig(c.stackedOnNext,c.next,n,o,a),p=ig(c.next,null,n,o,a)),eg(d,p)>3e3||l&&eg(h,f)>3e3)return s.stopAnimation(),s.setShape({points:p}),void(l&&(l.stopAnimation(),l.setShape({points:p,stackedOnPoints:f})));s.shape.__points=c.current,s.shape.points=d;var g={shape:{points:p}};c.current!==d&&(g.shape.__points=c.next),s.stopAnimation(),Zi(s,g,u),l&&(l.setShape({
// Reuse the points with polyline.
points:d,stackedOnPoints:h}),l.stopAnimation(),Zi(l,{shape:{stackedOnPoints:f}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var y=[],m=c.status,v=0;v<m.length;v++){if("="===m[v].cmd){var x=t.getItemGraphicEl(m[v].idx1);x&&y.push({el:x,ptIdx:v})}}s.animators&&s.animators.length&&s.animators[0].during(function(){l&&l.dirtyShape();for(var t=s.shape.__points,e=0;e<y.length;e++){var n=y[e].el,i=2*y[e].ptIdx;n.x=t[i],n.y=t[i+1],n.markRedraw()}})},e.prototype.remove=function(t){var e=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl(function(t,i){t.__temp&&(e.remove(t),n.setItemGraphicEl(i,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},e.type="line",e}(au);function dg(t,e){return{seriesType:t,plan:iu(),reset:function(t){var i=t.getData(),o=t.coordinateSystem,r=t.pipelineContext,a=e||r.large;if(o){var s=n(o.dimensions,function(t){return i.mapDimension(t)}).slice(0,2),l=s.length,u=i.getCalculationInfo("stackResultDimension");lh(i,s[0])&&(s[0]=u),lh(i,s[1])&&(s[1]=u);var c=i.getStore(),d=i.getDimensionIndex(s[0]),h=i.getDimensionIndex(s[1]);return l&&{progress:function(t,e){for(var n=t.end-t.start,i=a&&Ch(n*l),r=[],s=[],u=t.start,p=0;u<t.end;u++){var f=void 0;if(1===l){var g=c.get(d,u);f=o.dataToPoint(g,null,s)}else r[0]=c.get(d,u),r[1]=c.get(h,u),f=o.dataToPoint(r,null,s);a?(i[p++]=f[0],i[p++]=f[1]):e.setItemLayout(u,f.slice())}a&&e.setLayout("points",i)}}}}}}var hg={average:function(t){for(var e=0,n=0,i=0;i<t.length;i++)isNaN(t[i])||(e+=t[i],n++);return 0===n?NaN:e/n},sum:function(t){for(var e=0,n=0;n<t.length;n++)e+=t[n]||0;return e},max:function(t){for(var e=-Infinity,n=0;n<t.length;n++)t[n]>e&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=Infinity,n=0;n<t.length;n++)t[n]<e&&(e=t[n]);return isFinite(e)?e:NaN},
// TODO
// Median
nearest:function(t){return t[0]}},pg=function(t){return Math.round(t.length/2)};function fg(e){return{seriesType:e,
// FIXME:TS never used, so comment it
// modifyOutputEnd: true,
reset:function(e,n,i){var o=e.getData(),r=e.get("sampling"),a=e.coordinateSystem,s=o.count();if(s>10&&"cartesian2d"===a.type&&r){var l=a.getBaseAxis(),u=a.getOtherAxis(l),c=l.getExtent(),d=i.getDevicePixelRatio(),h=Math.abs(c[1]-c[0])*(d||1),p=Math.round(s/h);if(isFinite(p)&&p>1){"lttb"===r?e.setData(o.lttbDownSample(o.mapDimension(u.dim),1/p)):"minmax"===r&&e.setData(o.minmaxDownSample(o.mapDimension(u.dim),1/p));var f=void 0;t(r)?f=hg[r]:g(r)&&(f=r),f&&e.setData(o.downSample(o.mapDimension(u.dim),1/p,f,pg))}}}}}function gg(t){t.registerChartView(cg),t.registerSeriesModel(Lf),t.registerLayout(dg("line",!0)),t.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),n=t.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",n)}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,fg("line"))}var yg=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.getInitialData=function(t,e){return ch(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,e,n){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.clampData(t),r=i.dataToPoint(o);if(n)s(i.getAxes(),function(t,n){if("category"===t.type&&null!=e){var i=t.getTicksCoords(),a=t.getTickModel().get("alignWithLabel"),s=o[n],l="x1"===e[n]||"y1"===e[n];if(l&&!a&&(s+=1),i.length<2)return;if(2===i.length)return void(r[n]=t.toGlobalCoord(t.getExtent()[l?1:0]));for(var u=void 0,c=void 0,d=1,h=0;h<i.length;h++){var p=i[h].coord,f=h===i.length-1?i[h-1].tickValue+d:i[h].tickValue;if(f===s){c=p;break}if(f<s)u=p;else if(null!=u&&f>s){c=(p+u)/2;break}1===h&&(d=f-i[0].tickValue)}null==c&&(u?u&&(c=i[i.length-1].coord):c=i[0].coord),r[n]=t.toGlobalCoord(c)}});else{var a=this.getData(),l=a.getLayout("offset"),u=a.getLayout("size"),c=i.getBaseAxis().isHorizontal()?0:1;r[c]+=l+u/2}return r}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={
// zlevel: 0,
z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,
// stack: null
// Cartesian coordinate system
// xAxisIndex: 0,
// yAxisIndex: 0,
barMinHeight:0,barMinAngle:0,
// cursor: null,
large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(jl);jl.registerClass(yg);var mg=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.getInitialData=function(){return ch(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},e.prototype.brushSelector=function(t,e,n){return n.rect(e.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=ir(yg.defaultOption,{
// If clipped
// Only available on cartesian2d
clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(yg),vg=
/** @class */
function(){return function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0}}(),xg=
/** @class */function(t){function e(e){var n=t.call(this,e)||this;return n.type="sausage",n}return h(e,t),e.prototype.getDefaultShape=function(){return new vg},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,o=Math.max(e.r0||0,0),r=Math.max(e.r,0),a=.5*(r-o),s=o+a,l=e.startAngle,u=e.endAngle,c=e.clockwise,d=2*Math.PI,h=c?u-l<d:l-u<d;h||(l=u-(c?d:-d));var p=Math.cos(l),f=Math.sin(l),g=Math.cos(u),y=Math.sin(u);h?(t.moveTo(p*o+n,f*o+i),t.arc(p*s+n,f*s+i,a,-Math.PI+l,l,!c)):t.moveTo(p*r+n,f*r+i),t.arc(n,i,r,l,u,!c),t.arc(g*s+n,y*s+i,a,u-2*Math.PI,u-Math.PI,!c),0!==o&&t.arc(n,i,o,u,l,c)},e}(y);function _g(t,e,n){return e*Math.sin(t)*(n?-1:1)}function bg(t,e,n){return e*Math.cos(t)*(n?1:-1)}function Sg(t,e,i){var r=t.get("borderRadius");if(null==r)return i?{cornerRadius:0}:null;o(r)||(r=[r,r,r,r]);var a=Math.abs(e.r||0-e.r0||0);return{cornerRadius:n(r,function(t){return wt(t,a)})}}var wg=Math.max,Mg=Math.min;var Ig=
/** @class */function(t){function e(){var n=t.call(this)||this;return n.type=e.type,n._isFirstFrame=!0,n}return h(e,t),e.prototype.render=function(t,e,n,i){this._model=t,this._removeOnRenderedListener(n),this._updateDrawMode(t);var o=t.get("coordinateSystem");"cartesian2d"!==o&&"polar"!==o||(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(t,e,n):this._renderNormal(t,e,n,i))},e.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},e.prototype.incrementalRender=function(t,e){this._progressiveEls=[],this._incrementalRenderLarge(t,e)},e.prototype.eachRendered=function(t){Io(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t,e,n,i){var o,r=this.group,a=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis();"cartesian2d"===l.type?o=u.isHorizontal():"polar"===l.type&&(o="angle"===u.dim);var c=t.isAnimationEnabled()?t:null,d=function(t,e){var n=t.get("realtimeSort",!0),i=e.getBaseAxis();if(n&&"category"===i.type&&"cartesian2d"===e.type)return{baseAxis:i,otherAxis:e.getOtherAxis(i)}}(t,l);d&&this._enableRealtimeSort(d,a,n);var h=t.get("clip",!0)||d,p=function(t,e){var n=t.getArea&&t.getArea();if($f(t,"cartesian2d")){var i=t.getBaseAxis();if("category"!==i.type||!i.onBand){var o=e.getLayout("bandWidth");i.isHorizontal()?(n.x-=o,n.width+=2*o):(n.y-=o,n.height+=2*o)}}return n}(l,a);r.removeClipPath();var f=t.get("roundCap",!0),g=t.get("showBackground",!0),y=t.getModel("backgroundStyle"),m=y.get("borderRadius")||0,v=[],x=this._backgroundEls,_=i&&i.isInitSort,b=i&&"changeAxisOrder"===i.type;function S(t){var e=Ng[l.type](a,t),n=function(t,e,n){var i="polar"===t.type?V:F;return new i({shape:Gg(e,n,t),silent:!0,z2:0})}(l,o,e);return n.useStyle(y.getItemStyle()),"cartesian2d"===l.type?n.setShape("r",m):n.setShape("cornerRadius",m),v[t]=n,n}a.diff(s).add(function(e){var n=a.getItemModel(e),i=Ng[l.type](a,e,n);if(g&&S(e),a.hasValue(e)&&Pg[l.type](i)){var s=!1;h&&(s=Dg[l.type](p,i));var y=Tg[l.type](t,a,e,i,o,c,u.model,!1,f);d&&(y.forceLabelAnimation=!0),Rg(y,a,e,n,i,t,o,"polar"===l.type),_?y.attr({shape:i}):d?Cg(d,c,y,i,e,o,!1,!1):Xi(y,{shape:i},t,e),a.setItemGraphicEl(e,y),r.add(y),y.ignore=s}}).update(function(e,n){var i=a.getItemModel(e),w=Ng[l.type](a,e,i);if(g){var M=void 0;0===x.length?M=S(n):((M=x[n]).useStyle(y.getItemStyle()),"cartesian2d"===l.type?M.setShape("r",m):M.setShape("cornerRadius",m),v[e]=M);var I=Ng[l.type](a,e);Zi(M,{shape:Gg(o,I,l)},c,e)}var D=s.getItemGraphicEl(n);if(a.hasValue(e)&&Pg[l.type](w)){var T=!1;if(h&&(T=Dg[l.type](p,w))&&r.remove(D),D?$i(D):D=Tg[l.type](t,a,e,w,o,c,u.model,!!D,f),d&&(D.forceLabelAnimation=!0),b){var C=D.getTextContent();if(C){var A=Bo(C);null!=A.prevValue&&(A.prevValue=A.value)}}else Rg(D,a,e,i,w,t,o,"polar"===l.type);_?D.attr({shape:w}):d?Cg(d,c,D,w,e,o,!0,b):Zi(D,{shape:w},t,e,null),a.setItemGraphicEl(e,D),D.ignore=T,r.add(D)}else r.remove(D)}).remove(function(e){var n=s.getItemGraphicEl(e);n&&Ji(n,t,e)}).execute();var w=this._backgroundGroup||(this._backgroundGroup=new X);w.removeAll();for(var M=0;M<v.length;++M)w.add(v[M]);r.add(w),this._backgroundEls=v,this._data=a},e.prototype._renderLarge=function(t,e,n){this._clear(),zg(t,this.group),this._updateLargeClip(t)},e.prototype._incrementalRenderLarge=function(t,e){this._removeBackground(),zg(e,this.group,this._progressiveEls,!0)},e.prototype._updateLargeClip=function(t){var e=t.get("clip",!0)&&Jf(t.coordinateSystem,!1,t),n=this.group;e?n.setClipPath(e):n.removeClipPath()},e.prototype._enableRealtimeSort=function(t,e,n){var i=this;if(e.count()){var o=t.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(e,t,n),this._isFirstFrame=!1;else{var r=function(t){var n=e.getItemGraphicEl(t),i=n&&n.shape;return i&&// The result should be consistent with the initial sort by data value.
// Do not support the case that both positive and negative exist.
Math.abs(o.isHorizontal()?i.height:i.width)||0};this._onRendered=function(){i._updateSortWithinSameData(e,r,o,n)},n.getZr().on("rendered",this._onRendered)}}},e.prototype._dataSort=function(t,e,i){var o=[];return t.each(t.mapDimension(e.dim),function(t,e){var n=i(e);n=null==n?NaN:n,o.push({dataIndex:e,mappedValue:n,ordinalNumber:t})}),o.sort(function(t,e){return e.mappedValue-t.mappedValue}),{ordinalNumbers:n(o,function(t){return t.ordinalNumber})}},e.prototype._isOrderChangedWithinSameData=function(t,e,n){for(var i=n.scale,o=t.mapDimension(n.dim),r=Number.MAX_VALUE,a=0,s=i.getOrdinalMeta().categories.length;a<s;++a){var l=t.rawIndexOf(o,i.getRawOrdinalNumber(a)),u=l<0?Number.MIN_VALUE:e(t.indexOfRawIndex(l));if(u>r)return!0;r=u}return!1},e.prototype._isOrderDifferentInView=function(t,e){for(var n=e.scale,i=n.getExtent(),o=Math.max(0,i[0]),r=Math.min(i[1],n.getOrdinalMeta().categories.length-1);o<=r;++o)if(t.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,e,n,i){if(this._isOrderChangedWithinSameData(t,e,n)){var o=this._dataSort(t,n,e);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,e,n){var i=e.baseAxis,o=this._dataSort(t,i,function(n){return t.get(t.mapDimension(e.otherAxis.dim),n)});n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},e.prototype.remove=function(t,e){this._clear(this._model),this._removeOnRenderedListener(e)},e.prototype.dispose=function(t,e){this._removeOnRenderedListener(e)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var e=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(e){Ji(e,t,Un(e).dataIndex)})):e.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(au),Dg={cartesian2d:function(t,e){var n=e.width<0?-1:1,i=e.height<0?-1:1;n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var o=t.x+t.width,r=t.y+t.height,a=wg(e.x,t.x),s=Mg(e.x+e.width,o),l=wg(e.y,t.y),u=Mg(e.y+e.height,r),c=s<a,d=u<l;return e.x=c&&a>o?s:a,e.y=d&&l>r?u:l,e.width=c?0:s-a,e.height=d?0:u-l,n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),c||d},polar:function(t,e){var n=e.r0<=e.r?1:-1;if(n<0){var i=e.r;e.r=e.r0,e.r0=i}var o=Mg(e.r,t.r),r=wg(e.r0,t.r0);e.r=o,e.r0=r;var a=o-r<0;if(n<0){i=e.r;e.r=e.r0,e.r0=i}return a}},Tg={cartesian2d:function(t,e,n,i,o,r,a,s,l){var u=new F({shape:f({},i),z2:1});(u.__dataIndex=n,u.name="item",r)&&(u.shape[o?"height":"width"]=0);return u},polar:function(t,e,n,i,o,r,a,s,l){var u=!o&&l?xg:V,c=new u({shape:i,z2:1});c.name="item";var d,h,p=Og(o);if(c.calculateTextPosition=(d=p,h=({isRoundCap:u===xg}||{}).isRoundCap,function(t,e,n){var i=e.position;if(!i||i instanceof Array)return pt(t,e,n);var o=d(i),r=null!=e.distance?e.distance:5,a=this.shape,s=a.cx,l=a.cy,u=a.r,c=a.r0,p=(u+c)/2,f=a.startAngle,g=a.endAngle,y=(f+g)/2,m=h?Math.abs(u-c)/2:0,v=Math.cos,x=Math.sin,_=s+u*v(f),b=l+u*x(f),S="left",w="top";switch(o){case"startArc":_=s+(c-r)*v(y),b=l+(c-r)*x(y),S="center",w="top";break;case"insideStartArc":_=s+(c+r)*v(y),b=l+(c+r)*x(y),S="center",w="bottom";break;case"startAngle":_=s+p*v(f)+_g(f,r+m,!1),b=l+p*x(f)+bg(f,r+m,!1),S="right",w="middle";break;case"insideStartAngle":_=s+p*v(f)+_g(f,-r+m,!1),b=l+p*x(f)+bg(f,-r+m,!1),S="left",w="middle";break;case"middle":_=s+p*v(y),b=l+p*x(y),S="center",w="middle";break;case"endArc":_=s+(u+r)*v(y),b=l+(u+r)*x(y),S="center",w="bottom";break;case"insideEndArc":_=s+(u-r)*v(y),b=l+(u-r)*x(y),S="center",w="top";break;case"endAngle":_=s+p*v(g)+_g(g,r+m,!0),b=l+p*x(g)+bg(g,r+m,!0),S="left",w="middle";break;case"insideEndAngle":_=s+p*v(g)+_g(g,-r+m,!0),b=l+p*x(g)+bg(g,-r+m,!0),S="right",w="middle";break;default:return pt(t,e,n)}return(t=t||{}).x=_,t.y=b,t.align=S,t.verticalAlign=w,t}),r){var f=o?"r":"endAngle",g={};c.shape[f]=o?i.r0:i.startAngle,g[f]=i[f],(s?Zi:Xi)(c,{shape:g},r)}return c}};function Cg(t,e,n,i,o,r,a,s){var l,u;r?(u={x:i.x,width:i.width},l={y:i.y,height:i.height}):(u={y:i.y,height:i.height},l={x:i.x,width:i.width}),s||(a?Zi:Xi)(n,{shape:l},e,o,null),(a?Zi:Xi)(n,{shape:u},e?t.baseAxis.model:null,o)}function Ag(t,e){for(var n=0;n<e.length;n++)if(!isFinite(t[e[n]]))return!0;return!1}var Lg=["x","y","width","height"],kg=["cx","cy","r","startAngle","endAngle"],Pg={cartesian2d:function(t){return!Ag(t,Lg)},polar:function(t){return!Ag(t,kg)}},Ng={
// itemModel is only used to get borderWidth, which is not needed
// when calculating bar background layout.
cartesian2d:function(t,e,n){var i=t.getItemLayout(e),o=n?function(t,e){var n=t.get(["itemStyle","borderColor"]);if(!n||"none"===n)return 0;var i=t.get(["itemStyle","borderWidth"])||0,o=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),r=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(i,o,r)}(n,i):0,r=i.width>0?1:-1,a=i.height>0?1:-1;return{x:i.x+r*o/2,y:i.y+a*o/2,width:i.width-r*o,height:i.height-a*o}},polar:function(t,e,n){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function Og(t){
return function(t){var e=t?"Arc":"Angle";return function(t){switch(t){case"start":case"insideStart":case"end":case"insideEnd":return t+e;default:return t}}}(t)}function Rg(t,e,n,i,r,a,l,c){var d=e.getItemVisual(n,"style");if(c){if(!a.get("roundCap")){var h=t.shape,p=Sg(i.getModel("itemStyle"),h,!0);f(h,p),t.setShape(h)}}else{var g=i.get(["itemStyle","borderRadius"])||0;t.setShape("r",g)}t.useStyle(d);var y=i.getShallow("cursor");y&&t.attr("cursor",y);var m=c?l?r.r>=r.r0?"endArc":"startArc":r.endAngle>=r.startAngle?"endAngle":"startAngle":l?r.height>=0?"bottom":"top":r.width>=0?"right":"left",v=ko(i);Lo(t,v,{labelFetcher:a,labelDataIndex:n,defaultText:kf(a.getData(),n),inheritColor:d.fill,defaultOpacity:d.opacity,defaultOutsidePosition:m});var x=t.getTextContent();if(c&&x){var _=i.get(["label","position"]);t.textConfig.inside="middle"===_||null,function(t,e,n,i){if(u(i))t.setTextConfig({rotation:i});else if(o(e))t.setTextConfig({rotation:0});else{var r,a=t.shape,s=a.clockwise?a.startAngle:a.endAngle,l=a.clockwise?a.endAngle:a.startAngle,c=(s+l)/2,d=n(e);switch(d){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":r=c;break;case"startAngle":case"insideStartAngle":r=s;break;case"endAngle":case"insideEndAngle":r=l;break;default:return void t.setTextConfig({rotation:0})}var h=1.5*Math.PI-r;"middle"===d&&h>Math.PI/2&&h<1.5*Math.PI&&(h-=Math.PI),t.setTextConfig({rotation:h})}}(t,"outside"===_?m:_,Og(l),i.get(["label","rotate"]))}Go(x,v,a.getRawValue(n),function(t){return Pf(e,t)});var b=i.getModel(["emphasis"]);Oi(t,b.get("focus"),b.get("blurScope"),b.get("disabled")),zi(t,i),function(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}(r)&&(t.style.fill="none",t.style.stroke="none",s(t.states,function(t){t.style&&(t.style.fill=t.style.stroke="none")}))}var Eg=
/** @class */
function(){return function(){}}(),Vg=
/** @class */function(t){function e(e){var n=t.call(this,e)||this;return n.type="largeBar",n}return h(e,t),e.prototype.getDefaultShape=function(){return new Eg},e.prototype.buildPath=function(t,e){for(var n=e.points,i=this.baseDimIdx,o=1-this.baseDimIdx,r=[],a=[],s=this.barWidth,l=0;l<n.length;l+=3)a[i]=s,a[o]=n[l+2],r[i]=n[l+i],r[o]=n[l+o],t.rect(r[0],r[1],a[0],a[1])},e}(y);function zg(t,e,n,i){var o=t.getData(),r=o.getLayout("valueAxisHorizontal")?1:0,a=o.getLayout("largeDataIndices"),s=o.getLayout("size"),l=t.getModel("backgroundStyle"),u=o.getLayout("largeBackgroundPoints");if(u){var c=new Vg({shape:{points:u},incremental:!!i,silent:!0,z2:0});c.baseDimIdx=r,c.largeDataIndices=a,c.barWidth=s,c.useStyle(l.getItemStyle()),e.add(c),n&&n.push(c)}var d=new Vg({shape:{points:o.getLayout("largePoints")},incremental:!!i,ignoreCoarsePointer:!0,z2:1});d.baseDimIdx=r,d.largeDataIndices=a,d.barWidth=s,e.add(d),d.useStyle(o.getVisual("style")),d.style.stroke=null,Un(d).seriesIndex=t.seriesIndex,t.get("silent")||(d.on("mousedown",Bg),d.on("mousemove",Bg)),n&&n.push(d)}var Bg=gu(function(t){var e=function(t,e,n){for(var i=t.baseDimIdx,o=1-i,r=t.shape.points,a=t.largeDataIndices,s=[],l=[],u=t.barWidth,c=0,d=r.length/3;c<d;c++){var h=3*c;if(l[i]=u,l[o]=r[h+2],s[i]=r[h+i],s[o]=r[h+o],l[o]<0&&(s[o]+=l[o],l[o]=-l[o]),e>=s[0]&&e<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[c]}return-1}(this,t.offsetX,t.offsetY);Un(this).dataIndex=e>=0?e:null},30,!1);function Gg(t,e,n){if($f(n,"cartesian2d")){var i=e,o=n.getArea();return{x:t?i.x:o.x,y:t?o.y:i.y,width:t?i.width:o.width,height:t?o.height:i.height}}var r=e;return{cx:(o=n.getArea()).cx,cy:o.cy,r0:t?o.r0:r.r0,r:t?o.r:r.r,startAngle:t?r.startAngle:0,endAngle:t?r.endAngle:2*Math.PI}}function Fg(t){t.registerChartView(Ig),t.registerSeriesModel(mg),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,at(Rh,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Eh("bar")),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,fg("bar")),t.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var n=t.componentType||"series";e.eachComponent({mainType:n,query:t},function(e){t.sortInfo&&e.axis.setCategorySortInfo(t.sortInfo)})})}var Wg=2*Math.PI,Hg=Math.PI/180;function Yg(t,e){return na(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Ug(t,e){var n=Yg(t,e),i=t.get("center"),r=t.get("radius");o(r)||(r=[0,r]);var a,s,l=Ge(n.width,e.getWidth()),u=Ge(n.height,e.getHeight()),c=Math.min(l,u),d=Ge(r[0],c/2),h=Ge(r[1],c/2),p=t.coordinateSystem;if(p){var f=p.dataToPoint(i);a=f[0]||0,s=f[1]||0}else o(i)||(i=[i,i]),a=Ge(i[0],l)+n.x,s=Ge(i[1],u)+n.y;return{cx:a,cy:s,r0:d,r:h}}function Zg(t,e,n){e.eachSeriesByType(t,function(t){var e=t.getData(),i=e.mapDimension("value"),o=Yg(t,n),r=Ug(t,n),a=r.cx,s=r.cy,l=r.r,u=r.r0,c=-t.get("startAngle")*Hg,d=t.get("endAngle"),h=t.get("padAngle")*Hg;d="auto"===d?c-Wg:-d*Hg;var p=t.get("minAngle")*Hg+h,f=0;e.each(i,function(t){!isNaN(t)&&f++});var g=e.getSum(i),y=Math.PI/(g||f)*2,m=t.get("clockwise"),v=t.get("roseType"),x=t.get("stillShowZeroSum"),_=e.getDataExtent(i);_[0]=0;var b=m?1:-1,S=[c,d],w=b*h/2;Bt(S,!m),c=S[0],d=S[1];var M=Xg(t);M.startAngle=c,M.endAngle=d,M.clockwise=m;var I=Math.abs(d-c),D=I,T=0,C=c;if(e.setLayout({viewRect:o,r:l}),e.each(i,function(t,n){var i;if(isNaN(t))e.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:m,cx:a,cy:s,r0:u,r:v?NaN:l});else{(i="area"!==v?0===g&&x?y:t*y:I/f)<p?(i=p,D-=p):T+=t;var o=C+b*i,r=0,c=0;h>i?c=r=C+b*i/2:(r=C+w,c=o-w),e.setItemLayout(n,{angle:i,startAngle:r,endAngle:c,clockwise:m,cx:a,cy:s,r0:u,r:v?Be(t,_,[u,l]):l}),C=o}}),D<Wg&&f)if(D<=.001){var A=I/f;e.each(i,function(t,n){if(!isNaN(t)){var i=e.getItemLayout(n);i.angle=A;var o=0,r=0;A<h?r=o=c+b*(n+.5)*A:(o=c+b*n*A+w,r=c+b*(n+1)*A-w),i.startAngle=o,i.endAngle=r}})}else y=D/T,C=c,e.each(i,function(t,n){if(!isNaN(t)){var i=e.getItemLayout(n),o=i.angle===p?p:t*y,r=0,a=0;o<h?a=r=C+b*o/2:(r=C+w,a=C+b*o-w),i.startAngle=r,i.endAngle=a,C+=b*o}})})}var Xg=wn();function jg(t){return{seriesType:t,reset:function(t,e){var n=e.findComponents({mainType:"legend"});if(n&&n.length){var i=t.getData();i.filterSelf(function(t){for(var e=i.getName(t),o=0;o<n.length;o++)if(!n[o].isSelected(e))return!1;return!0})}}}}var qg=Math.PI/180;function Kg(t,e,n,i,o,r,a,s,l,u){if(!(t.length<2)){for(var c=t.length,d=0;d<c;d++)if("outer"===t[d].position&&"labelLine"===t[d].labelAlignTo){var h=t[d].label.x-u;t[d].linePoints[1][0]+=h,t[d].label.x=u}vf(t,l,l+a)&&function(t){for(var r={list:[],maxY:0},a={list:[],maxY:0},s=0;s<t.length;s++)if("none"===t[s].labelAlignTo){var l=t[s],u=l.label.y>n?a:r,c=Math.abs(l.label.y-n);if(c>=u.maxY){var d=l.label.x-e-l.len2*o,h=i+l.len,f=Math.abs(d)<h?Math.sqrt(c*c/(1-d*d/h/h)):h;u.rB=f,u.maxY=c}u.list.push(l)}p(r),p(a)}(t)}function p(t){for(var r=t.rB,a=r*r,s=0;s<t.list.length;s++){var l=t.list[s],u=Math.abs(l.label.y-n),c=i+l.len,d=c*c,h=Math.sqrt(Math.abs((1-u*u/a)*d)),p=e+(h+l.len2)*o,f=p-l.label.x;Jg(l,l.targetTextWidth-f*o,!0),l.label.x=p}}}function Jg(t,e,n){if(void 0===n&&(n=!1),null==t.labelStyleWidth){var i=t.label,o=i.style,r=t.rect,a=o.backgroundColor,s=o.padding,l=s?s[1]+s[3]:0,u=o.overflow,c=r.width+(a?0:l);if(e<c||n){var d=r.height;if(u&&u.match("break")){i.setStyle("backgroundColor",null),i.setStyle("width",e-l);var h=i.getBoundingRect();i.setStyle("width",Math.ceil(h.width)),i.setStyle("backgroundColor",a)}else{var p=e-l,f=e<c?p:
// Current available width is enough, but the text may have
// already been wrapped with a smaller available width.
n?p>t.unconstrainedWidth?null:p:null;i.setStyle("width",f)}var g=i.getBoundingRect();r.width=g.width;var y=(i.style.margin||0)+2.1;r.height=g.height+y,r.y-=(r.height-d)/2}}}function $g(t){return"center"===t.position}function Qg(t){var e,n,i=t.getData(),o=[],r=!1,a=(t.get("minShowLabelAngle")||0)*qg,l=i.getLayout("viewRect"),c=i.getLayout("r"),d=l.width,h=l.x,p=l.y,f=l.height;function g(t){t.ignore=!0}i.each(function(t){var l=i.getItemGraphicEl(t),p=l.shape,f=l.getTextContent(),y=l.getTextGuideLine(),m=i.getItemModel(t),v=m.getModel("label"),x=v.get("position")||m.get(["emphasis","label","position"]),_=v.get("distanceToLabelLine"),b=v.get("alignTo"),S=Ge(v.get("edgeDistance"),d),w=v.get("bleedMargin"),M=m.getModel("labelLine"),I=M.get("length");I=Ge(I,d);var D=M.get("length2");if(D=Ge(D,d),Math.abs(p.endAngle-p.startAngle)<a)return s(f.states,g),f.ignore=!0,void(y&&(s(y.states,g),y.ignore=!0));if(function(t){if(!t.ignore)return!0;for(var e in t.states)if(!1===t.states[e].ignore)return!0;return!1}(f)){var T,C,A,L,k=(p.startAngle+p.endAngle)/2,P=Math.cos(k),N=Math.sin(k);e=p.cx,n=p.cy;var O="inside"===x||"inner"===x;if("center"===x)T=p.cx,C=p.cy,L="center";else{var R=(O?(p.r+p.r0)/2*P:p.r*P)+e,E=(O?(p.r+p.r0)/2*N:p.r*N)+n;if(T=R+3*P,C=E+3*N,!O){var V=R+P*(I+c-p.r),z=E+N*(I+c-p.r),B=V+(P<0?-1:1)*D;T="edge"===b?P<0?h+S:h+d-S:B+(P<0?-_:_),C=z,A=[[R,E],[V,z],[B,z]]}L=O?"center":"edge"===b?P>0?"right":"left":P>0?"left":"right"}var G=Math.PI,F=0,W=v.get("rotate");if(u(W))F=W*(G/180);else if("center"===x)F=0;else if("radial"===W||!0===W){F=P<0?-k+G:-k}else if("tangential"===W&&"outside"!==x&&"outer"!==x){var H=Math.atan2(P,N);H<0&&(H=2*G+H),N>0&&(H=G+H),F=H-G}if(r=!!F,f.x=T,f.y=C,f.rotation=F,f.setStyle({verticalAlign:"middle"}),O){f.setStyle({align:L});var Y=f.states.select;Y&&(Y.x+=f.x,Y.y+=f.y)}else{var U=f.getBoundingRect().clone();U.applyTransform(f.getComputedTransform());var Z=(f.style.margin||0)+2.1;U.y-=Z/2,U.height+=Z,o.push({label:f,labelLine:y,position:x,len:I,len2:D,minTurnAngle:M.get("minTurnAngle"),maxSurfaceAngle:M.get("maxSurfaceAngle"),surfaceNormal:new J(P,N),linePoints:A,textAlign:L,labelDistance:_,labelAlignTo:b,edgeDistance:S,bleedMargin:w,rect:U,unconstrainedWidth:U.width,labelStyleWidth:f.style.width})}l.setTextConfig({inside:O})}}),!r&&t.get("avoidLabelOverlap")&&function(t,e,n,i,o,r,a,s){for(var l=[],u=[],c=Number.MAX_VALUE,d=-Number.MAX_VALUE,h=0;h<t.length;h++){var p=t[h].label;$g(t[h])||(p.x<e?(c=Math.min(c,p.x),l.push(t[h])):(d=Math.max(d,p.x),u.push(t[h])))}for(h=0;h<t.length;h++)if(!$g(y=t[h])&&y.linePoints){if(null!=y.labelStyleWidth)continue;p=y.label;var f=y.linePoints,g=void 0;g="edge"===y.labelAlignTo?p.x<e?f[2][0]-y.labelDistance-a-y.edgeDistance:a+o-y.edgeDistance-f[2][0]-y.labelDistance:"labelLine"===y.labelAlignTo?p.x<e?c-a-y.bleedMargin:a+o-d-y.bleedMargin:p.x<e?p.x-a-y.bleedMargin:a+o-p.x-y.bleedMargin,y.targetTextWidth=g,Jg(y,g)}for(Kg(u,e,n,i,1,0,r,0,s,d),Kg(l,e,n,i,-1,0,r,0,s,c),h=0;h<t.length;h++){var y;if(!$g(y=t[h])&&y.linePoints){p=y.label,f=y.linePoints;var m="edge"===y.labelAlignTo,v=p.style.padding,x=v?v[1]+v[3]:0,_=p.style.backgroundColor?0:x,b=y.rect.width+_,S=f[1][0]-f[2][0];m?p.x<e?f[2][0]=a+y.edgeDistance+b+y.labelDistance:f[2][0]=a+o-y.edgeDistance-b-y.labelDistance:(p.x<e?f[2][0]=p.x+y.labelDistance:f[2][0]=p.x-y.labelDistance,f[1][0]=f[2][0]+S),f[1][1]=f[2][1]=p.y}}}(o,e,n,c,d,f,h,p);for(var y=0;y<o.length;y++){var m=o[y],v=m.label,x=m.labelLine,_=isNaN(v.x)||isNaN(v.y);if(v){v.setStyle({align:m.textAlign}),_&&(s(v.states,g),v.ignore=!0);var b=v.states.select;b&&(b.x+=v.x,b.y+=v.y)}if(x){var S=m.linePoints;_||!S?(s(x.states,g),x.ignore=!0):(cf(S,m.minTurnAngle),df(S,m.surfaceNormal,m.maxSurfaceAngle),x.setShape({points:S}),v.__hostTarget.textGuideLineConfig={anchor:new J(S[0][0],S[0][1])})}}}var ty=
/** @class */function(t){function e(e,n,i){var o=t.call(this)||this;o.z2=2;var r=new Q;return o.setTextContent(r),o.updateData(e,n,i,!0),o}return h(e,t),e.prototype.updateData=function(t,e,n,i){var o=this,r=t.hostModel,a=t.getItemModel(e),s=a.getModel("emphasis"),l=t.getItemLayout(e),u=f(Sg(a.getModel("itemStyle"),l,!0),l);if(isNaN(u.startAngle))o.setShape(u);else{if(i){o.setShape(u);var c=r.getShallow("animationType");r.ecModel.ssr?(Xi(o,{scaleX:0,scaleY:0},r,{dataIndex:e,isFrom:!0}),o.originX=u.cx,o.originY=u.cy):"scale"===c?(o.shape.r=l.r0,Xi(o,{shape:{r:l.r}},r,e)):null!=n?(o.setShape({startAngle:n,endAngle:n}),Xi(o,{shape:{startAngle:l.startAngle,endAngle:l.endAngle}},r,e)):(o.shape.endAngle=l.startAngle,Zi(o,{shape:{endAngle:l.endAngle}},r,e))}else $i(o),Zi(o,{shape:u},r,e);o.useStyle(t.getItemVisual(e,"style")),zi(o,a);var d=(l.startAngle+l.endAngle)/2,h=r.get("selectedOffset"),p=Math.cos(d)*h,g=Math.sin(d)*h,y=a.getShallow("cursor");y&&o.attr("cursor",y),this._updateLabel(r,t,e),o.ensureState("emphasis").shape=f({r:l.r+(s.get("scale")&&s.get("scaleSize")||0)},Sg(s.getModel("itemStyle"),l)),f(o.ensureState("select"),{x:p,y:g,shape:Sg(a.getModel(["select","itemStyle"]),l)}),f(o.ensureState("blur"),{shape:Sg(a.getModel(["blur","itemStyle"]),l)});var m=o.getTextGuideLine(),v=o.getTextContent();m&&f(m.ensureState("select"),{x:p,y:g}),f(v.ensureState("select"),{x:p,y:g}),Oi(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))}},e.prototype._updateLabel=function(t,e,n){var i=this,o=e.getItemModel(n),r=o.getModel("labelLine"),a=e.getItemVisual(n,"style"),s=a&&a.fill,l=a&&a.opacity;Lo(i,ko(o),{labelFetcher:e.hostModel,labelDataIndex:n,inheritColor:s,defaultOpacity:l,defaultText:t.getFormattedLabel(n,"normal")||e.getName(n)});var u=i.getTextContent();i.setTextConfig({
// reset position, rotation
position:null,rotation:null}),u.attr({z2:10});var c=t.get(["label","position"]);if("outside"!==c&&"outer"!==c)i.removeTextGuideLine();else{var d=this.getTextGuideLine();d||(d=new G,this.setTextGuideLine(d)),ff(this,gf(o),{stroke:s,opacity:Gt(r.get(["lineStyle","opacity"]),l,1)})}},e}(V),ey=
/** @class */function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ignoreLabelLineUpdate=!0,e}return h(e,t),e.prototype.render=function(t,e,n,i){var o,r=t.getData(),a=this._data,s=this.group;if(!a&&r.count()>0){for(var l=r.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u<r.count();++u)l=r.getItemLayout(u);l&&(o=l.startAngle)}if(this._emptyCircleSector&&s.remove(this._emptyCircleSector),0===r.count()&&t.get("showEmptyCircle")){var c=Xg(t),d=new V({shape:f(Ug(t,n),c)});d.useStyle(t.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=d,s.add(d)}r.diff(a).add(function(t){var e=new ty(r,t,o);r.setItemGraphicEl(t,e),s.add(e)}).update(function(t,e){var n=a.getItemGraphicEl(e);n.updateData(r,t,o),n.off("click"),s.add(n),r.setItemGraphicEl(t,n)}).remove(function(e){Ji(a.getItemGraphicEl(e),t,e)}).execute(),Qg(t),"expansion"!==t.get("animationTypeUpdate")&&(this._data=r)},e.prototype.dispose=function(){},e.prototype.containPoint=function(t,e){var n=e.getData().getItemLayout(0);if(n){var i=t[0]-n.cx,o=t[1]-n.cy,r=Math.sqrt(i*i+o*o);return r<=n.r&&r>=n.r0}},e.type="pie",e}(au);function ny(t,e,n){e=o(e)&&{coordDimensions:e}||f({encodeDefine:t.getEncode()},e);var i=t.getSource(),r=nh(i,e).dimensions,a=new eh(r,t);return a.initData(i,n),a}var iy=
/** @class */function(){function t(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return t.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},t.prototype.containName=function(t){return this._getRawData().indexOfName(t)>=0},t.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},t.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)},t}(),oy=wn(),ry=
/** @class */function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return h(i,t),i.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new iy(ut(this.getData,this),ut(this.getRawData,this)),this._defaultLabelLine(e)},i.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},i.prototype.getInitialData=function(){return ny(this,{coordDimensions:["value"],encodeDefaulter:at(Ta,this)})},i.prototype.getDataParams=function(i){var o=this.getData(),r=oy(o),a=r.seats;if(!a){var s=[];o.each(o.mapDimension("value"),function(t){s.push(t)}),a=r.seats=function(t,i){var o=e(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===o)return[];for(var r=Math.pow(10,i),a=n(t,function(t){return(isNaN(t)?0:t)/o*r*100}),s=100*r,l=n(a,function(t){return Math.floor(t)}),u=e(l,function(t,e){return t+e},0),c=n(a,function(t,e){return t-l[e]});u<s;){for(var d=Number.NEGATIVE_INFINITY,h=null,p=0,f=c.length;p<f;++p)c[p]>d&&(d=c[p],h=p);++l[h],c[h]=0,++u}return n(l,function(t){return t/r})}(s,o.hostModel.get("percentPrecision"))}var l=t.prototype.getDataParams.call(this,i);return l.percent=a[i]||0,l.$vars.push("percent"),l},i.prototype._defaultLabelLine=function(t){hn(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},i.type="series.pie",i.defaultOption={
// zlevel: 0,
z:2,legendHoverLink:!0,colorBy:"data",
// 默认全局居中
center:["50%","50%"],radius:[0,"75%"],
// 默认顺时针
clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,
// 最小角度改为0
minAngle:0,
// If the angle of a sector less than `minShowLabelAngle`,
// the label will not be displayed.
minShowLabelAngle:0,
// 选中时扇区偏移量
selectedOffset:10,
// 选择模式默认关闭可选singlemultiple
// selectedMode: false,
// 南丁格尔玫瑰图模式,'radius'(半径) | 'area'(面积)
// roseType: null,
percentPrecision:2,
// If still show when all data zero.
stillShowZeroSum:!0,
// cursor: null,
left:0,top:0,right:0,bottom:0,width:null,height:null,label:{
// color: 'inherit',
// If rotate around circle
rotate:0,show:!0,overflow:"truncate",
// 'outer', 'inside', 'center'
position:"outer",
// 'none', 'labelLine', 'edge'. Works only when position is 'outer'
alignTo:"none",
// Closest distance between label and chart edge.
// Works only position is 'outer' and alignTo is 'edge'.
edgeDistance:"25%",
// Works only position is 'outer' and alignTo is not 'edge'.
bleedMargin:10,
// Distance between text and label line.
distanceToLabelLine:5},
// Enabled when label.normal.position is 'outer'
labelLine:{show:!0,
// 引导线两段中的第一段长度
length:15,
// 引导线两段中的第二段长度
length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{
// color: 各异,
width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{
// Hide the overlapped label.
hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},
// If use strategy to avoid label overlapping
avoidLabelOverlap:!0,
// Animation type. Valid values: expansion, scale
animationType:"expansion",animationDuration:1e3,
// Animation type when update. Valid values: transition, expansion
animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},i}(jl);function ay(t){t.registerChartView(ey),t.registerSeriesModel(ry),oc("pie",t.registerAction),t.registerLayout(at(Zg,"pie")),t.registerProcessor(jg("pie")),t.registerProcessor({seriesType:"pie",reset:function(t,e){var n=t.getData();n.filterSelf(function(t){var e=n.mapDimension("value"),i=n.get(e,t);return!(u(i)&&!isNaN(i)&&i<0)})}})}var sy=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return h(e,t),e.prototype.getInitialData=function(t,e){return ch(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,e,n){return n.point(e.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",
// zlevel: 0,
z:2,legendHoverLink:!0,symbolSize:10,
// symbolRotate: null, // 图形旋转控制
large:!1,
// Available when large is true
largeThreshold:2e3,
// cursor: null,
itemStyle:{opacity:.8},emphasis:{scale:!0},
// If clip the overflow graphics
// Works on cartesian / polar series
clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(jl),ly=
/** @class */
function(){return function(){}}(),uy=
/** @class */function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return h(e,t),e.prototype.getDefaultShape=function(){return new ly},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,e){var n,i=e.points,o=e.size,r=this.symbolProxy,a=r.shape,s=t.getContext?t.getContext():t,l=s&&o[0]<4,u=this.softClipShape;if(l)this._ctx=s;else{for(this._ctx=null,n=this._off;n<i.length;){var c=i[n++],d=i[n++];isNaN(c)||isNaN(d)||(u&&!u.contain(c,d)||(a.x=c-o[0]/2,a.y=d-o[1]/2,a.width=o[0],a.height=o[1],r.buildPath(t,a,!0)))}this.incremental&&(this._off=n,this.notClear=!0)}},e.prototype.afterBrush=function(){var t,e=this.shape,n=e.points,i=e.size,o=this._ctx,r=this.softClipShape;if(o){for(t=this._off;t<n.length;){var a=n[t++],s=n[t++];isNaN(a)||isNaN(s)||(r&&!r.contain(a,s)||o.fillRect(a-i[0]/2,s-i[1]/2,i[0],i[1]))}this.incremental&&(this._off=t,this.notClear=!0)}},e.prototype.findDataIndex=function(t,e){for(var n=this.shape,i=n.points,o=n.size,r=Math.max(o[0],4),a=Math.max(o[1],4),s=i.length/2-1;s>=0;s--){var l=2*s,u=i[l]-r/2,c=i[l+1]-a/2;if(t>=u&&e>=c&&t<=u+r&&e<=c+a)return s}return-1},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();return t=n[0],e=n[1],i.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape,n=e.points,i=e.size,o=i[0],r=i[1],a=Infinity,s=Infinity,l=-Infinity,u=-Infinity,c=0;c<n.length;){var d=n[c++],h=n[c++];a=Math.min(d,a),l=Math.max(d,l),s=Math.min(h,s),u=Math.max(h,u)}t=this._rect=new U(a-o/2,s-r/2,l-a+o,u-s+r)}return t},e}(y),cy=
/** @class */function(){function t(){this.group=new X}return t.prototype.updateData=function(t,e){this._clear();var n=this._create();n.setShape({points:t.getLayout("points")}),this._setCommon(n,t,e)},t.prototype.updateLayout=function(t){var e=t.getLayout("points");this.group.eachChild(function(t){if(null!=t.startIndex){var n=2*(t.endIndex-t.startIndex),i=4*t.startIndex*2;e=new Float32Array(e.buffer,i,n)}t.setShape("points",e),t.reset()})},t.prototype.incrementalPrepareUpdate=function(t){this._clear()},t.prototype.incrementalUpdate=function(t,e,n){var i=this._newAdded[0],o=e.getLayout("points"),r=i&&i.shape.points;if(r&&r.length<2e4){var a=r.length,s=new Float32Array(a+o.length);s.set(r),s.set(o,a),i.endIndex=t.end,i.setShape({points:s})}else{this._newAdded=[];var l=this._create();l.startIndex=t.start,l.endIndex=t.end,l.incremental=!0,l.setShape({points:o}),this._setCommon(l,e,n)}},t.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},t.prototype._create=function(){var t=new uy({cursor:"default"});return t.ignoreCoarsePointer=!0,this.group.add(t),this._newAdded.push(t),t},t.prototype._setCommon=function(t,e,n){var i=e.hostModel;n=n||{};var o=e.getVisual("symbolSize");t.setShape("size",o instanceof Array?o:[o,o]),t.softClipShape=n.clipShape||null,t.symbolProxy=gc(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var r=t.shape.size[0]<4;t.useStyle(
// Draw shadow when doing fillRect is extremely slow.
i.getModel("itemStyle").getItemStyle(r?["color","shadowBlur","shadowColor"]:["color"]));var a=e.getVisual("style"),s=a&&a.fill;s&&t.setColor(s);var l=Un(t);l.seriesIndex=i.seriesIndex,t.on("mousemove",function(e){l.dataIndex=null;var n=t.hoverDataIdx;n>=0&&(l.dataIndex=n+(t.startIndex||0))})},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),dy=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.render=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).updateData(i,{
// TODO
// If this parameter should be a shape or a bounding volume
// shape will be more general.
// But bounding volume like bounding rect will be much faster in the contain calculation
clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},e.prototype.updateTransform=function(t,e,n){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var o=dg("").reset(t,e,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(t.get("clip",!0)){var e=t.coordinateSystem;return e&&e.getArea&&e.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,e){var n=this._symbolDraw,i=e.pipelineContext.large;return n&&i===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=i?new cy:new zf,this._isLargeDraw=i,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(au),hy=
/** @class */function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,
// zlevel: 0,
z:0,left:"10%",top:60,right:"10%",bottom:70,
// If grid size contain label
containLabel:!1,
// width: {totalWidth} - left - right,
// height: {totalHeight} - top - bottom,
backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(ua),py=
/** @class */function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Tn).models[0]},e.type="cartesian2dAxis",e}(ua);it(py,mp);var fy={show:!0,
// zlevel: 0,
z:0,
// Inverse the axis.
inverse:!1,
// Axis name displayed.
name:"",
// 'start' | 'middle' | 'end'
nameLocation:"end",
// By degree. By default auto rotate by nameLocation.
nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},
// Use global text style by default.
nameTextStyle:{},
// The gap between axisName and axisLine.
nameGap:15,
// Default `false` to support tooltip.
silent:!1,
// Default `false` to avoid legacy user event listener fail.
triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},
// The arrow at both ends the the axis.
symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,
// Whether axisTick is inside the grid or outside the grid.
inside:!1,
// The length of axisTick.
length:5,lineStyle:{width:1}},axisLabel:{show:!0,
// Whether axisLabel is inside the grid or outside the grid.
inside:!1,rotate:0,
// true | false | null/undefined (auto)
showMinLabel:null,
// true | false | null/undefined (auto)
showMaxLabel:null,margin:8,
// formatter: null,
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)"]}}},gy=et({
// The gap at both ends of the axis. For categoryAxis, boolean.
boundaryGap:!0,
// Set false to faster category collection.
deduplication:null,
// splitArea: {
// show: false
// },
splitLine:{show:!1},axisTick:{
// If tick is align with label when boundaryGap is true
alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},fy),yy=et({boundaryGap:[0,0],axisLine:{
// Not shown when other axis is categoryAxis in cartesian
show:"auto"},axisTick:{
// Not shown when other axis is categoryAxis in cartesian
show:"auto"},
// TODO
// min/max: [30, datamin, 60] or [20, datamin] or [datamin, 60]
splitNumber:5,minorTick:{
// Minor tick, not available for cateogry axis.
show:!1,
// Split number of minor ticks. The value should be in range of (0, 100)
splitNumber:5,
// Length of minor tick
length:3,
// Line style
lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},fy);const my={category:gy,value:yy,time:et({splitNumber:6,axisLabel:{
// To eliminate labels that are not nice
showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},yy),log:C({logBase:10},yy)};var vy={value:1,category:1,time:1,log:1};function xy(t,e,n,i){s(vy,function(o,r){var a=et(et({},my[r],!0),i,!0),s=
/** @class */function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e+"Axis."+r,n}return h(n,t),n.prototype.mergeDefaultAndTheme=function(t,e){var n=oa(this),i=n?aa(t):{},o=e.getTheme();et(t,o.get(r+"Axis")),et(t,this.getDefaultOption()),t.type=_y(t),n&&ra(t,i,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=ph.createByAxisModel(this))},n.prototype.getCategories=function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.type=e+"Axis."+r,n.defaultOption=a,n}(n);t.registerComponentModel(s)}),t.registerSubTypeDefaulter(e+"Axis",_y)}function _y(t){return t.type||(t.data?"category":"value")}var by=
/** @class */function(){function t(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return t.prototype.getAxis=function(t){return this._axes[t]},t.prototype.getAxes=function(){return n(this._dimList,function(t){return this._axes[t]},this)},t.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),lt(this.getAxes(),function(e){return e.scale.type===t})},t.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},t}(),Sy=["x","y"];function wy(t){return"interval"===t.type||"time"===t.type}var My=
/** @class */function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=Sy,e}return h(e,t),e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,e=this.getAxis("y").scale;if(wy(t)&&wy(e)){var n=t.getExtent(),i=e.getExtent(),o=this.dataToPoint([n[0],i[0]]),r=this.dataToPoint([n[1],i[1]]),a=n[1]-n[0],s=i[1]-i[0];if(a&&s){var l=(r[0]-o[0])/a,u=(r[1]-o[1])/s,c=o[0]-n[0]*l,d=o[1]-i[0]*u,h=this._transform=[l,0,0,u,c,d];this._invTransform=D([],h)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var e=this.getAxis("x"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,e){var n=this.dataToPoint(t),i=this.dataToPoint(e),o=this.getArea(),r=new U(n[0],n[1],i[0]-n[0],i[1]-n[1]);return o.intersect(r)},e.prototype.dataToPoint=function(t,e,n){n=n||[];var i=t[0],o=t[1];if(this._transform&&null!=i&&isFinite(i)&&null!=o&&isFinite(o))return T(n,t,this._transform);var r=this.getAxis("x"),a=this.getAxis("y");return n[0]=r.toGlobalCoord(r.dataToCoord(i,e)),n[1]=a.toGlobalCoord(a.dataToCoord(o,e)),n},e.prototype.clampData=function(t,e){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,o=n.getExtent(),r=i.getExtent(),a=n.parse(t[0]),s=i.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(o[0],o[1]),a),Math.max(o[0],o[1])),e[1]=Math.min(Math.max(Math.min(r[0],r[1]),s),Math.max(r[0],r[1])),e},e.prototype.pointToData=function(t,e){var n=[];if(this._invTransform)return T(n,t,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(t[0]),e),n[1]=o.coordToData(o.toLocalCoord(t[1]),e),n},e.prototype.getOtherAxis=function(t){return this.getAxis("x"===t.dim?"y":"x")},e.prototype.getArea=function(t){t=t||0;var e=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(e[0],e[1])-t,o=Math.min(n[0],n[1])-t,r=Math.max(e[0],e[1])-i+t,a=Math.max(n[0],n[1])-o+t;return new U(i,o,r,a)},e}(by),Iy=
/** @class */function(t){function e(e,n,i,o,r){var a=t.call(this,e,n,i)||this;return a.index=0,a.type=o||"value",a.position=r||"bottom",a}return h(e,t),e.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},e.prototype.getGlobalExtent=function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},e.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},e.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(Hp);function Dy(t,e,n){n=n||{};var i=t.coordinateSystem,o=e.axis,r={},a=o.getAxesOnZeroOf()[0],s=o.position,l=a?"onZero":s,u=o.dim,c=i.getRect(),d=[c.x,c.x+c.width,c.y,c.y+c.height],h={left:0,right:1,top:0,bottom:1,onZero:2},p=e.get("offset")||0,f="x"===u?[d[2]-p,d[3]+p]:[d[0]-p,d[1]+p];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));f[h.onZero]=Math.max(Math.min(g,f[1]),f[0])}r.position=["y"===u?f[h[l]]:d[0],"x"===u?f[h[l]]:d[3]],r.rotation=Math.PI/2*("x"===u?0:1);r.labelDirection=r.tickDirection=r.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],r.labelOffset=a?f[h[s]]-f[h.onZero]:0,e.get(["axisTick","inside"])&&(r.tickDirection=-r.tickDirection),Ft(n.labelInside,e.get(["axisLabel","inside"]))&&(r.labelDirection=-r.labelDirection);var y=e.get(["axisLabel","rotate"]);return r.labelRotate="top"===l?-y:y,r.z2=1,r}function Ty(t){return"cartesian2d"===t.get("coordinateSystem")}function Cy(t){var e={xAxisModel:null,yAxisModel:null};return s(e,function(n,i){var o=i.replace(/Model$/,""),r=t.getReferringComponents(o,Tn).models[0];e[i]=r}),e}var Ay=Math.log;function Ly(t,e,n){var i=Ih.prototype,o=i.getTicks.call(n),r=i.getTicks.call(n,!0),a=o.length-1,s=i.getInterval.call(n),l=lp(t,e),u=l.extent,c=l.fixMin,d=l.fixMax;if("log"===t.type){var h=Ay(t.base);u=[Ay(u[0])/h,Ay(u[1])/h]}t.setExtent(u[0],u[1]),t.calcNiceExtent({splitNumber:a,fixMin:c,fixMax:d});var p=i.getExtent.call(t);c&&(u[0]=p[0]),d&&(u[1]=p[1]);var f=i.getInterval.call(t),g=u[0],y=u[1];if(c&&d)f=(y-g)/a;else if(c)for(y=u[0]+f*a;y<u[1]&&isFinite(y)&&isFinite(u[1]);)f=mh(f),y=u[0]+f*a;else if(d)for(g=u[1]-f*a;g>u[0]&&isFinite(g)&&isFinite(u[0]);)f=mh(f),g=u[1]-f*a;else{t.getTicks().length-1>a&&(f=mh(f));var m=f*a;(g=Fe((y=Math.ceil(u[1]/f)*f)-m))<0&&u[0]>=0?(g=0,y=Fe(m)):y>0&&u[1]<=0&&(y=0,g=-Fe(m))}var v=(o[0].value-r[0].value)/s,x=(o[a].value-r[a].value)/s;i.setExtent.call(t,g+f*v,y+f*x),i.setInterval.call(t,f),(v||x)&&i.setNiceExtent.call(t,g+f,y-f)}var ky=
/** @class */function(){function t(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Sy,this._initCartesian(t,e,n),this.model=t}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(t,e){var n=this._axesMap;function i(t){var e,n=x(t),i=n.length;if(i){for(var o=[],r=i-1;r>=0;r--){var a=t[+n[r]],l=a.model,u=a.scale;
// Only value and log axis without interval support alignTicks.
gh(u)&&l.get("alignTicks")&&null==l.get("interval")?o.push(a):(up(u,l),gh(u)&&(e=a))}o.length&&(e||up((e=o.pop()).scale,e.model),s(o,function(t){Ly(t.scale,t.model,e.scale)}))}}this._updateScale(t,this.model),i(n.x),i(n.y);var o={};s(n.x,function(t){Ny(n,"y",t,o)}),s(n.y,function(t){Ny(n,"x",t,o)}),this.resize(this.model,e)},t.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),o=!n&&t.get("containLabel"),r=na(i,{width:e.getWidth(),height:e.getHeight()});this._rect=r;var a=this._axesList;function l(){s(a,function(t){var e=t.isHorizontal(),n=e?[0,r.width]:[0,r.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),function(t,e){var n=t.getExtent(),i=n[0]+n[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return i-t+e}}(t,e?r.x:r.y)})}l(),o&&(s(a,function(t){if(!t.model.get(["axisLabel","inside"])){var e=function(t){var e=t.model,n=t.scale;if(e.get(["axisLabel","show"])&&!n.isBlank()){var i,o,r=n.getExtent();o=n instanceof wh?n.count():(i=n.getTicks()).length;var a,s=t.getLabelModel(),l=dp(t),u=1;o>40&&(u=Math.ceil(o/40));for(var c=0;c<o;c+=u){var d=l(i?i[c]:{value:r[0]+c},c),h=pp(s.getTextRect(d),s.get("rotate")||0);a?a.union(h):a=h}return a}}(t);if(e){var n=t.isHorizontal()?"height":"width",i=t.model.get(["axisLabel","margin"]);r[n]-=e[n]+i,"top"===t.position?r.y+=e.height+i:"left"===t.position&&(r.x+=e.width+i)}}}),l()),s(this._coordsList,function(t){t.calcAffineTransform()})},t.prototype.getAxis=function(t,e){var n=this._axesMap[t];if(null!=n)return n[e||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(t,e){if(null!=t&&null!=e){var n="x"+t+"y"+e;return this._coordsMap[n]}r(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,o=this._coordsList;i<o.length;i++)if(o[i].getAxis("x").index===t||o[i].getAxis("y").index===e)return o[i]},t.prototype.getCartesians=function(){return this._coordsList.slice()},t.prototype.convertToPixel=function(t,e,n){var i=this._findConvertTarget(e);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},t.prototype.convertFromPixel=function(t,e,n){var i=this._findConvertTarget(e);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},t.prototype._findConvertTarget=function(t){var e,n,i=t.seriesModel,o=t.xAxisModel||i&&i.getReferringComponents("xAxis",Tn).models[0],r=t.yAxisModel||i&&i.getReferringComponents("yAxis",Tn).models[0],a=t.gridModel,s=this._coordsList;if(i)e=i.coordinateSystem,l(s,e)<0&&(e=null);else if(o&&r)e=this.getCartesian(o.componentIndex,r.componentIndex);else if(o)n=this.getAxis("x",o.componentIndex);else if(r)n=this.getAxis("y",r.componentIndex);else if(a){a.coordinateSystem===this&&(e=this._coordsList[0])}return{cartesian:e,axis:n}},t.prototype.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},t.prototype._initCartesian=function(t,e,n){var i=this,o=this,r={left:!1,right:!1,top:!1,bottom:!1},a={x:{},y:{}},l={x:0,y:0};if(e.eachComponent("xAxis",u("x"),this),e.eachComponent("yAxis",u("y"),this),!l.x||!l.y)return this._axesMap={},void(this._axesList=[]);function u(e){return function(n,i){if(Py(n,t)){var s=n.get("position");"x"===e?"top"!==s&&"bottom"!==s&&(s=r.bottom?"top":"bottom"):"left"!==s&&"right"!==s&&(s=r.left?"right":"left"),r[s]=!0;var u=new Iy(e,cp(n),[0,0],n.get("type"),s),c="category"===u.type;u.onBand=c&&n.get("boundaryGap"),u.inverse=n.get("inverse"),n.axis=u,u.model=n,u.grid=o,u.index=i,o._axesList.push(u),a[e][i]=u,l[e]++}}}this._axesMap=a,s(a.x,function(e,n){s(a.y,function(o,r){var a="x"+n+"y"+r,s=new My(a);s.master=i,s.model=t,i._coordsMap[a]=s,i._coordsList.push(s),s.addAxis(e),s.addAxis(o)})})},t.prototype._updateScale=function(t,e){function n(t,e){s(yp(t,e.dim),function(n){e.scale.unionExtentFromData(t,n)})}s(this._axesList,function(t){if(t.scale.setExtent(Infinity,-Infinity),"category"===t.type){var e=t.model.get("categorySortInfo");t.scale.setSortInfo(e)}}),t.eachSeries(function(t){if(Ty(t)){var i=Cy(t),o=i.xAxisModel,r=i.yAxisModel;if(!Py(o,e)||!Py(r,e))return;var a=this.getCartesian(o.componentIndex,r.componentIndex),s=t.getData(),l=a.getAxis("x"),u=a.getAxis("y");n(s,l),n(s,u)}},this)},t.prototype.getTooltipAxes=function(t){var e=[],n=[];return s(this.getCartesians(),function(i){var o=null!=t&&"auto"!==t?i.getAxis(t):i.getBaseAxis(),r=i.getOtherAxis(o);l(e,o)<0&&e.push(o),l(n,r)<0&&n.push(r)}),{baseAxes:e,otherAxes:n}},t.create=function(e,n){var i=[];return e.eachComponent("grid",function(o,r){var a=new t(o,e,n);a.name="grid_"+r,a.resize(o,n,!0),o.coordinateSystem=a,i.push(a)}),e.eachSeries(function(t){if(Ty(t)){var e=Cy(t),n=e.xAxisModel,i=e.yAxisModel,o=n.getCoordSysModel().coordinateSystem;t.coordinateSystem=o.getCartesian(n.componentIndex,i.componentIndex)}}),i},t.dimensions=Sy,t}();function Py(t,e){return t.getCoordSysModel()===e}function Ny(t,e,n,i){n.getAxesOnZeroOf=function(){return o?[o]:[]};var o,r=t[e],a=n.model,s=a.get(["axisLine","onZero"]),l=a.get(["axisLine","onZeroAxisIndex"]);if(s){if(null!=l)Oy(r[l])&&(o=r[l]);else for(var u in r)if(r.hasOwnProperty(u)&&Oy(r[u])&&!i[c(r[u])]){o=r[u];break}o&&(i[c(o)]=!0)}function c(t){return t.dim+"_"+t.index}}function Oy(t){return t&&"category"!==t.type&&"time"!==t.type&&function(t){var e=t.scale.getExtent(),n=e[0],i=e[1];return!(n>0&&i>0||n<0&&i<0)}(t)}var Ry=Math.PI,Ey=
/** @class */function(){function t(t,e){this.group=new X,this.opt=e,this.axisModel=t,C(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new X({x:e.position[0],y:e.position[1],rotation:e.rotation});n.updateTransform(),this._transformGroup=n}return t.prototype.hasBuilder=function(t){return!!Vy[t]},t.prototype.add=function(t){Vy[t](this.opt,this.axisModel,this.group,this._transformGroup)},t.prototype.getGroup=function(){return this.group},t.innerTextLayout=function(t,e,n){var i,o,r=Xe(e-t);return je(r)?(o=n>0?"top":"bottom",i="center"):je(r-Ry)?(o=n>0?"bottom":"top",i="center"):(o="middle",i=r>0&&r<Ry?n>0?"right":"left":n>0?"left":"right"),{rotation:r,textAlign:i,textVerticalAlign:o}},t.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},t.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},t}(),Vy={axisLine:function(e,n,i,o){var r=n.get(["axisLine","show"]);if("auto"===r&&e.handleAutoShown&&(r=e.handleAutoShown("axisLine")),r){var a=n.axis.getExtent(),l=o.transform,c=[a[0],0],d=[a[1],0],h=c[0]>d[0];l&&(T(c,c,l),T(d,d,l));var p=f({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),g=new W({shape:{x1:c[0],y1:c[1],x2:d[0],y2:d[1]},style:p,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});co(g.shape,g.style.lineWidth),g.anid="line",i.add(g);var y=n.get(["axisLine","symbol"]);if(null!=y){var m=n.get(["axisLine","symbolSize"]);t(y)&&(y=[y,y]),(t(m)||u(m))&&(m=[m,m]);var v=mc(n.get(["axisLine","symbolOffset"])||0,m),x=m[0],_=m[1];s([{rotate:e.rotation+Math.PI/2,offset:v[0],r:0},{rotate:e.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((c[0]-d[0])*(c[0]-d[0])+(c[1]-d[1])*(c[1]-d[1]))}],function(t,n){if("none"!==y[n]&&null!=y[n]){var o=gc(y[n],-x/2,-_/2,x,_,p.stroke,!0),r=t.r+t.offset,a=h?d:c;o.attr({rotation:t.rotate,x:a[0]+r*Math.cos(e.rotation),y:a[1]-r*Math.sin(e.rotation),silent:!0,z2:11}),i.add(o)}})}}},axisTickLabel:function(t,e,i,o){var a=function(t,e,n,i){var o=n.axis,r=n.getModel("axisTick"),a=r.get("show");"auto"===a&&i.handleAutoShown&&(a=i.handleAutoShown("axisTick"));if(!a||o.scale.isBlank())return;for(var s=r.getModel("lineStyle"),l=i.tickDirection*r.get("length"),u=Fy(o.getTicksCoords(),e.transform,l,C(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;c<u.length;c++)t.add(u[c]);return u}(i,o,e,t),l=function(t,e,n,i){var o=n.axis,a=Ft(i.axisLabelShow,n.get(["axisLabel","show"]));if(!a||o.scale.isBlank())return;var l=n.getModel("axisLabel"),u=l.get("margin"),c=o.getViewLabels(),d=(Ft(i.labelRotate,l.get("rotate"))||0)*Ry/180,h=Ey.innerTextLayout(i.rotation,d,i.labelDirection),p=n.getCategories&&n.getCategories(!0),f=[],y=Ey.isLabelSilent(n),m=n.get("triggerEvent");return s(c,function(a,s){var d="ordinal"===o.scale.type?o.scale.getRawOrdinalNumber(a.tickValue):a.tickValue,v=a.formattedLabel,x=a.rawLabel,b=l;if(p&&p[d]){var S=p[d];r(S)&&S.textStyle&&(b=new tr(S.textStyle,l,n.ecModel))}var w=b.getTextColor()||n.get(["axisLine","lineStyle","color"]),M=o.dataToCoord(d),I=b.getShallow("align",!0)||h.textAlign,D=_(b.getShallow("alignMinLabel",!0),I),T=_(b.getShallow("alignMaxLabel",!0),I),C=b.getShallow("verticalAlign",!0)||b.getShallow("baseline",!0)||h.textVerticalAlign,A=_(b.getShallow("verticalAlignMinLabel",!0),C),L=_(b.getShallow("verticalAlignMaxLabel",!0),C),k=new Q({x:M,y:i.labelOffset+i.labelDirection*u,rotation:h.rotation,silent:y,z2:10+(a.level||0),style:Po(b,{text:v,align:0===s?D:s===c.length-1?T:I,verticalAlign:0===s?A:s===c.length-1?L:C,fill:g(w)?w(
// (1) In category axis with data zoom, tick is not the original
// index of axis.data. So tick should not be exposed to user
// in category axis.
// (2) Compatible with previous version, which always use formatted label as
// input. But in interval scale the formatted label is like '223,445', which
// maked user replace ','. So we modify it to return original val but remain
// it as 'string' to avoid error in replacing.
"category"===o.type?x:"value"===o.type?d+"":d,s):w})});if(k.anid="label_"+d,wo({el:k,componentModel:n,itemName:v,formatterParamsExtra:{isTruncated:function(){return k.isTruncated},value:x,tickIndex:s}}),m){var P=Ey.makeAxisEventDataBase(n);P.targetType="axisLabel",P.value=x,P.tickIndex=s,"category"===o.type&&(P.dataIndex=d),Un(k).eventData=P}e.add(k),k.updateTransform(),f.push(k),t.add(k),k.decomposeTransform()}),f}(i,o,e,t);(function(t,e,n){if(gp(t.axis))return;var i=t.get(["axisLabel","showMinLabel"]),o=t.get(["axisLabel","showMaxLabel"]);e=e||[],n=n||[];var r=e[0],a=e[1],s=e[e.length-1],l=e[e.length-2],u=n[0],c=n[1],d=n[n.length-1],h=n[n.length-2];!1===i?(zy(r),zy(u)):By(r,a)&&(i?(zy(a),zy(c)):(zy(r),zy(u)));!1===o?(zy(s),zy(d)):By(l,s)&&(o?(zy(l),zy(h)):(zy(s),zy(d)))}(e,l,a),function(t,e,n,i){var o=n.axis,r=n.getModel("minorTick");if(!r.get("show")||o.scale.isBlank())return;var a=o.getMinorTicksCoords();if(!a.length)return;for(var s=r.getModel("lineStyle"),l=i*r.get("length"),u=C(s.getLineStyle(),C(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),c=0;c<a.length;c++)for(var d=Fy(a[c],e.transform,l,u,"minorticks_"+c),h=0;h<d.length;h++)t.add(d[h])}(i,o,e,t.tickDirection),e.get(["axisLabel","hideOverlap"]))&&xf(yf(n(l,function(t){return{label:t,priority:t.z2,defaultAttr:{ignore:t.ignore}}})))},axisName:function(t,e,n,i){var o=Ft(t.axisName,e.get("name"));if(o){var r,a,s=e.get("nameLocation"),l=t.nameDirection,u=e.getModel("nameTextStyle"),c=e.get("nameGap")||0,d=e.axis.getExtent(),h=d[0]>d[1]?-1:1,p=["start"===s?d[0]-h*c:"end"===s?d[1]+h*c:(d[0]+d[1])/2,
// Reuse labelOffset.
Gy(s)?t.labelOffset+l*c:0],f=e.get("nameRotate");null!=f&&(f=f*Ry/180),Gy(s)?r=Ey.innerTextLayout(t.rotation,null!=f?f:t.rotation,
// Adapt to axis.
l):(r=function(t,e,n,i){var o,r,a=Xe(n-t),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;je(a-Ry/2)?(r=l?"bottom":"top",o="center"):je(a-1.5*Ry)?(r=l?"top":"bottom",o="center"):(r="middle",o=a<1.5*Ry&&a>Ry/2?l?"left":"right":l?"right":"left");return{rotation:a,textAlign:o,textVerticalAlign:r}}(t.rotation,s,f||0,d),null!=(a=t.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(r.rotation)),!isFinite(a)&&(a=null)));var g=u.getFont(),y=e.get("nameTruncate",!0)||{},m=y.ellipsis,v=Ft(t.nameTruncateMaxWidth,y.maxWidth,a),x=new Q({x:p[0],y:p[1],rotation:r.rotation,silent:Ey.isLabelSilent(e),style:Po(u,{text:o,font:g,overflow:"truncate",width:v,ellipsis:m,fill:u.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:u.get("align")||r.textAlign,verticalAlign:u.get("verticalAlign")||r.textVerticalAlign}),z2:1});if(wo({el:x,componentModel:e,itemName:o}),x.__fullText=o,x.anid="name",e.get("triggerEvent")){var _=Ey.makeAxisEventDataBase(e);_.targetType="axisName",_.name=o,Un(x).eventData=_}i.add(x),x.updateTransform(),n.add(x),x.decomposeTransform()}}};function zy(t){t&&(t.ignore=!0)}function By(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var o=A([]);return Wt(o,o,-t.rotation),n.applyTransform(L([],o,t.getLocalTransform())),i.applyTransform(L([],o,e.getLocalTransform())),n.intersect(i)}}function Gy(t){return"middle"===t||"center"===t}function Fy(t,e,n,i,o){for(var r=[],a=[],s=[],l=0;l<t.length;l++){var u=t[l].coord;a[0]=u,a[1]=0,s[0]=u,s[1]=n,e&&(T(a,a,e),T(s,s,e));var c=new W({shape:{x1:a[0],y1:a[1],x2:s[0],y2:s[1]},style:i,z2:2,autoBatch:!0,silent:!0});co(c.shape,c.style.lineWidth),c.anid=o+"_"+t[l].tickValue,r.push(c)}return r}function Wy(t,e){var n={
/**
* key: makeKey(axis.model)
* value: {
* axis,
* coordSys,
* axisPointerModel,
* triggerTooltip,
* triggerEmphasis,
* involveSeries,
* snap,
* seriesModels,
* seriesDataCount
* }
*/
axesInfo:{},seriesInvolved:!1,
/**
* key: makeKey(coordSys.model)
* value: Object: key makeKey(axis.model), value: axisInfo
*/
coordSysAxesInfo:{},coordSysMap:{}};return function(t,e,n){var i=e.getComponent("tooltip"),o=e.getComponent("axisPointer"),r=o.get("link",!0)||[],a=[];s(n.getCoordinateSystems(),function(n){if(n.axisPointerEnabled){var l=Zy(n.model),u=t.coordSysAxesInfo[l]={};t.coordSysMap[l]=n;var c=n.model.getModel("tooltip",i);if(s(n.getAxes(),at(f,!1,null)),n.getTooltipAxes&&i&&c.get("show")){var d="axis"===c.get("trigger"),h="cross"===c.get(["axisPointer","type"]),p=n.getTooltipAxes(c.get(["axisPointer","axis"]));(d||h)&&s(p.baseAxes,at(f,!h||"cross",d)),h&&s(p.otherAxes,at(f,"cross",!1))}}function f(i,l,d){var h=d.model.getModel("axisPointer",o),p=h.get("show");if(p&&("auto"!==p||i||Uy(h))){null==l&&(l=h.get("triggerTooltip")),h=i?function(t,e,n,i,o,r){var a=e.getModel("axisPointer"),l={};s(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){l[t]=nt(a.get(t))}),l.snap="category"!==t.type&&!!r,"cross"===a.get("type")&&(l.type="line");var u=l.label||(l.label={});if(null==u.show&&(u.show=!1),"cross"===o){var c=a.get(["label","show"]);if(u.show=null==c||c,!r){var d=l.lineStyle=a.get("crossStyle");d&&C(u,d.textStyle)}}return t.model.getModel("axisPointer",new tr(l,n,i))}(d,c,o,e,i,l):h;var f=h.get("snap"),g=h.get("triggerEmphasis"),y=Zy(d.model),m=l||f||"category"===d.type,v=t.axesInfo[y]={key:y,axis:d,coordSys:n,axisPointerModel:h,triggerTooltip:l,triggerEmphasis:g,involveSeries:m,snap:f,useHandle:Uy(h),seriesModels:[],linkGroup:null};u[y]=v,t.seriesInvolved=t.seriesInvolved||m;var x=function(t,e){for(var n=e.model,i=e.dim,o=0;o<t.length;o++){var r=t[o]||{};if(Hy(r[i+"AxisId"],n.id)||Hy(r[i+"AxisIndex"],n.componentIndex)||Hy(r[i+"AxisName"],n.name))return o}}(r,d);if(null!=x){var _=a[x]||(a[x]={axesInfo:{}});_.axesInfo[y]=v,_.mapper=r[x].mapper,v.linkGroup=_}}}})}(n,t,e),n.seriesInvolved&&function(t,e){e.eachSeries(function(e){var n=e.coordinateSystem,i=e.get(["tooltip","trigger"],!0),o=e.get(["tooltip","show"],!0);n&&"none"!==i&&!1!==i&&"item"!==i&&!1!==o&&!1!==e.get(["axisPointer","show"],!0)&&s(t.coordSysAxesInfo[Zy(n.model)],function(t){var i=t.axis;n.getAxis(i.dim)===i&&(t.seriesModels.push(e),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=e.getData().count())})})}(n,t),n}function Hy(t,e){return"all"===t||o(t)&&l(t,e)>=0||t===e}function Yy(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[Zy(t)]}function Uy(t){return!!t.get(["handle","show"])}function Zy(t){return t.type+"||"+t.id}var Xy={},jy=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.render=function(e,n,i,o){this.axisPointerClass&&function(t){var e=Yy(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,o=n.option,r=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=Uy(n);null==r&&(o.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(
// Pick a value on axis when initializing.
null==a||a>l[1])&&(a=l[1]),a<l[0]&&(a=l[0]),o.value=a,s&&(o.status=e.axis.scale.isBlank()?"hide":"show")}}(e),t.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(e,i,!0)},e.prototype.updateAxisPointer=function(t,e,n,i){this._doUpdateAxisPointerClass(t,n,!1)},e.prototype.remove=function(t,e){var n=this._axisPointer;n&&n.remove(e)},e.prototype.dispose=function(e,n){this._disposeAxisPointer(n),t.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(t,n,i){var o=e.getAxisPointerClass(this.axisPointerClass);if(o){var r=function(t){var e=Yy(t);return e&&e.axisPointerModel}(t);r?(this._axisPointer||(this._axisPointer=new o)).render(t,r,n,i):this._disposeAxisPointer(n)}},e.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},e.registerAxisPointerClass=function(t,e){Xy[t]=e},e.getAxisPointerClass=function(t){return t&&Xy[t]},e.type="axis",e}(nu),qy=wn();function Ky(t,e,n,i){var r=n.axis;if(!r.scale.isBlank()){var s=n.getModel("splitArea"),l=s.getModel("areaStyle"),u=l.get("color"),c=i.coordinateSystem.getRect(),d=r.getTicksCoords({tickModel:s,clamp:!0});if(d.length){var h=u.length,p=qy(t).splitAreaColors,f=a(),g=0;if(p)for(var y=0;y<d.length;y++){var m=p.get(d[y].tickValue);if(null!=m){g=(m+(h-1)*y)%h;break}}var v=r.toGlobalCoord(d[0].coord),x=l.getAreaStyle();u=o(u)?u:[u];for(y=1;y<d.length;y++){var _=r.toGlobalCoord(d[y].coord),b=void 0,S=void 0,w=void 0,M=void 0;r.isHorizontal()?(b=v,S=c.y,w=_-b,M=c.height,v=b+w):(b=c.x,S=v,w=c.width,v=S+(M=_-S));var I=d[y-1].tickValue;null!=I&&f.set(I,g),e.add(new F({anid:null!=I?"area_"+I:null,shape:{x:b,y:S,width:w,height:M},style:C({fill:u[g]},x),autoBatch:!0,silent:!0})),g=(g+1)%h}qy(t).splitAreaColors=f}}}function Jy(t){qy(t).splitAreaColors=null}var $y=["axisLine","axisTickLabel","axisName"],Qy=["splitArea","splitLine","minorSplitLine"],tm=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="CartesianAxisPointer",n}return h(e,t),e.prototype.render=function(e,n,i,o){this.group.removeAll();var r=this._axisGroup;if(this._axisGroup=new X,this.group.add(this._axisGroup),e.get("show")){var a=e.getCoordSysModel(),l=Dy(a,e),u=new Ey(e,f({handleAutoShown:function(t){for(var n=a.coordinateSystem.getCartesians(),i=0;i<n.length;i++)if(gh(n[i].getOtherAxis(e.axis).scale))return!0;return!1}},l));s($y,u.add,u),this._axisGroup.add(u.getGroup()),s(Qy,function(t){e.get([t,"show"])&&em[t](this,this._axisGroup,e,a)},this),o&&"changeAxisOrder"===o.type&&o.isInitSort||mo(r,this._axisGroup,e),t.prototype.render.call(this,e,n,i,o)}},e.prototype.remove=function(){Jy(this)},e.type="cartesianAxis",e}(jy),em={splitLine:function(t,e,n,i){var r=n.axis;if(!r.scale.isBlank()){var a=n.getModel("splitLine"),s=a.getModel("lineStyle"),l=s.get("color"),u=!1!==a.get("showMinLine"),c=!1!==a.get("showMaxLine");l=o(l)?l:[l];for(var d=i.coordinateSystem.getRect(),h=r.isHorizontal(),p=0,f=r.getTicksCoords({tickModel:a}),g=[],y=[],m=s.getLineStyle(),v=0;v<f.length;v++){var x=r.toGlobalCoord(f[v].coord);if((0!==v||u)&&(v!==f.length-1||c)){var _=f[v].tickValue;h?(g[0]=x,g[1]=d.y,y[0]=x,y[1]=d.y+d.height):(g[0]=d.x,g[1]=x,y[0]=d.x+d.width,y[1]=x);var b=p++%l.length,S=new W({anid:null!=_?"line_"+_:null,autoBatch:!0,shape:{x1:g[0],y1:g[1],x2:y[0],y2:y[1]},style:C({stroke:l[b]},m),silent:!0});co(S.shape,m.lineWidth),e.add(S)}}}},minorSplitLine:function(t,e,n,i){var o=n.axis,r=n.getModel("minorSplitLine").getModel("lineStyle"),a=i.coordinateSystem.getRect(),s=o.isHorizontal(),l=o.getMinorTicksCoords();if(l.length)for(var u=[],c=[],d=r.getLineStyle(),h=0;h<l.length;h++)for(var p=0;p<l[h].length;p++){var f=o.toGlobalCoord(l[h][p].coord);s?(u[0]=f,u[1]=a.y,c[0]=f,c[1]=a.y+a.height):(u[0]=a.x,u[1]=f,c[0]=a.x+a.width,c[1]=f);var g=new W({anid:"minor_line_"+l[h][p].tickValue,autoBatch:!0,shape:{x1:u[0],y1:u[1],x2:c[0],y2:c[1]},style:d,silent:!0});co(g.shape,d.lineWidth),e.add(g)}},splitArea:function(t,e,n,i){Ky(t,e,n,i)}},nm=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.type="xAxis",e}(tm),im=
/** @class */function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=nm.type,e}return h(e,t),e.type="yAxis",e}(tm),om=
/** @class */function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid",e}return h(e,t),e.prototype.render=function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new F({shape:t.coordinateSystem.getRect(),style:C({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))},e.type="grid",e}(nu),rm={
// gridIndex: 0,
// gridId: '',
offset:0};function am(t){t.registerComponentView(om),t.registerComponentModel(hy),t.registerCoordinateSystem("cartesian2d",ky),xy(t,"x",py,rm),xy(t,"y",py,rm),t.registerComponentView(nm),t.registerComponentView(im),t.registerPreprocessor(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})}function sm(t){t.eachSeriesByType("radar",function(t){var e=t.getData(),n=[],i=t.coordinateSystem;if(i){var o=i.getIndicatorAxes();s(o,function(t,r){e.each(e.mapDimension(o[r].dim),function(t,e){n[e]=n[e]||[];var o=i.dataToPoint(t,r);n[e][r]=lm(o)?o:um(i)})}),e.each(function(t){var o=Ht(n[t],function(t){return lm(t)})||um(i);n[t].push(o.slice()),e.setItemLayout(t,n[t])})}})}function lm(t){return!isNaN(t[0])&&!isNaN(t[1])}function um(t){return[t.cx,t.cy]}function cm(t){var e=t.polar;if(e){o(e)||(e=[e]);var n=[];s(e,function(e,i){e.indicator?(e.type&&!e.shape&&(e.shape=e.type),t.radar=t.radar||[],o(t.radar)||(t.radar=[t.radar]),t.radar.push(e)):n.push(e)}),t.polar=n}s(t.series,function(t){t&&"radar"===t.type&&t.polarIndex&&(t.radarIndex=t.polarIndex)})}var dm=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.render=function(t,e,i){var o=t.coordinateSystem,r=this.group,a=t.getData(),l=this._data;function u(t,e){var n=t.getItemVisual(e,"symbol")||"circle";if("none"!==n){var i=yc(t.getItemVisual(e,"symbolSize")),o=gc(n,-1,-1,2,2),r=t.getItemVisual(e,"symbolRotate")||0;return o.attr({style:{strokeNoScale:!0},z2:100,scaleX:i[0]/2,scaleY:i[1]/2,rotation:r*Math.PI/180||0}),o}}function c(e,n,i,o,r,a){i.removeAll();for(var s=0;s<n.length-1;s++){var l=u(o,r);l&&(l.__dimIdx=s,e[s]?(l.setPosition(e[s]),Do[a?"initProps":"updateProps"](l,{x:n[s][0],y:n[s][1]},t,r)):l.setPosition(n[s]),i.add(l))}}function d(t){return n(t,function(t){return[o.cx,o.cy]})}a.diff(l).add(function(e){var n=a.getItemLayout(e);if(n){var i=new B,o=new G,r={shape:{points:n}};i.shape.points=d(n),o.shape.points=d(n),Xi(i,r,t,e),Xi(o,r,t,e);var s=new X,l=new X;s.add(o),s.add(i),s.add(l),c(o.shape.points,n,l,a,e,!0),a.setItemGraphicEl(e,s)}}).update(function(e,n){var i=l.getItemGraphicEl(n),o=i.childAt(0),r=i.childAt(1),s=i.childAt(2),u={shape:{points:a.getItemLayout(e)}};u.shape.points&&(c(o.shape.points,u.shape.points,s,a,e,!1),$i(r),$i(o),Zi(o,u,t),Zi(r,u,t),a.setItemGraphicEl(e,i))}).remove(function(t){r.remove(l.getItemGraphicEl(t))}).execute(),a.eachItemGraphicEl(function(t,e){var n=a.getItemModel(e),i=t.childAt(0),o=t.childAt(1),l=t.childAt(2),u=a.getItemVisual(e,"style"),c=u.fill;r.add(t),i.useStyle(C(n.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:c})),zi(i,n,"lineStyle"),zi(o,n,"areaStyle");var d=n.getModel("areaStyle"),h=d.isEmpty()&&d.parentModel.isEmpty();o.ignore=h,s(["emphasis","select","blur"],function(t){var e=n.getModel([t,"areaStyle"]),i=e.isEmpty()&&e.parentModel.isEmpty();o.ensureState(t).ignore=i&&h}),o.useStyle(C(d.getAreaStyle(),{fill:c,opacity:.7,decal:u.decal}));var p=n.getModel("emphasis"),g=p.getModel("itemStyle").getItemStyle();l.eachChild(function(t){if(t instanceof b){var i=t.style;t.useStyle(f({
// TODO other properties like x, y ?
image:i.image,x:i.x,y:i.y,width:i.width,height:i.height},u))}else t.useStyle(u),t.setColor(c),t.style.strokeNoScale=!0;t.ensureState("emphasis").style=nt(g);var o=a.getStore().get(a.getDimensionIndex(t.__dimIdx),e);(null==o||isNaN(o))&&(o=""),Lo(t,ko(n),{labelFetcher:a.hostModel,labelDataIndex:e,labelDimIndex:t.__dimIdx,defaultText:o,inheritColor:c,defaultOpacity:u.opacity})}),Oi(t,p.get("focus"),p.get("blurScope"),p.get("disabled"))}),this._data=a},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.type="radar",e}(au),hm=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return h(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new iy(ut(this.getData,this),ut(this.getRawData,this))},e.prototype.getInitialData=function(t,e){return ny(this,{generateCoord:"indicator_",generateCoordCount:Infinity})},e.prototype.formatTooltip=function(t,e,i){var o=this.getData(),r=this.coordinateSystem.getIndicatorAxes(),a=this.getData().getName(t),s=""===a?this.name:a,l=Fl(this,t);return Pl("section",{header:s,sortBlocks:!0,blocks:n(r,function(e){var n=o.get(o.mapDimension(e.dim),t);return Pl("nameValue",{markerType:"subItem",markerColor:l,name:e.name,value:n,sortParam:n})})})},e.prototype.getTooltipPosition=function(t){if(null!=t)for(var e=this.getData(),i=this.coordinateSystem,o=e.getValues(n(i.dimensions,function(t){return e.mapDimension(t)}),t),r=0,a=o.length;r<a;r++)if(!isNaN(o[r])){var s=i.getIndicatorAxes();return i.coordToPoint(s[r].dataToCoord(o[r]),r)}},e.type="series.radar",e.dependencies=["radar"],e.defaultOption={
// zlevel: 0,
z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},
// areaStyle: {
// },
// itemStyle: {}
symbolSize:8},e}(jl),pm=my.value;function fm(t,e){return C({show:e},t)}var gm=
/** @class */function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.type,t}return h(i,e),i.prototype.optionUpdated=function(){var e=this.get("boundaryGap"),i=this.get("splitNumber"),o=this.get("scale"),r=this.get("axisLine"),a=this.get("axisTick"),s=this.get("axisLabel"),l=this.get("axisName"),u=this.get(["axisName","show"]),c=this.get(["axisName","formatter"]),d=this.get("axisNameGap"),h=this.get("triggerEvent"),p=n(this.get("indicator")||[],function(n){null!=n.max&&n.max>0&&!n.min?n.min=0:null!=n.min&&n.min<0&&!n.max&&(n.max=0);var p=l;null!=n.color&&(p=C({color:n.color},l));var f=et(nt(n),{boundaryGap:e,splitNumber:i,scale:o,axisLine:r,axisTick:a,
// axisType: axisType,
axisLabel:s,
// Compatible with 2 and use text
name:n.text,showName:u,nameLocation:"end",nameGap:d,
// min: 0,
nameTextStyle:p,triggerEvent:h},!1);if(t(c)){var y=f.name;f.name=c.replace("{value}",null!=y?y:"")}else g(c)&&(f.name=c(f.name,f));var m=new tr(f,null,this.ecModel);return it(m,mp.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m},this);this._indicatorModels=p},i.prototype.getIndicatorModels=function(){return this._indicatorModels},i.type="radar",i.defaultOption={
// zlevel: 0,
z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,
// Polygon or circle
shape:"polygon",axisLine:et({lineStyle:{color:"#bbb"}},pm.axisLine),axisLabel:fm(pm.axisLabel,!1),axisTick:fm(pm.axisTick,!1),
// axisType: 'value',
splitLine:fm(pm.splitLine,!0),splitArea:fm(pm.splitArea,!0),
// {text, min, max}
indicator:[]},i}(ua),ym=["axisLine","axisTickLabel","axisName"],mm=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.render=function(t,e,n){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var e=t.coordinateSystem,i=e.getIndicatorAxes(),o=n(i,function(t){var n=t.model.get("showName")?t.name:"";return new Ey(t.model,{axisName:n,position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})});s(o,function(t){s(ym,t.add,t),this.group.add(t.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(t){var e=t.coordinateSystem,i=e.getIndicatorAxes();if(i.length){var r=t.get("shape"),a=t.getModel("splitLine"),l=t.getModel("splitArea"),u=a.getModel("lineStyle"),c=l.getModel("areaStyle"),d=a.get("show"),h=l.get("show"),p=u.get("color"),f=c.get("color"),g=o(p)?p:[p],y=o(f)?f:[f],m=[],v=[];if("circle"===r)for(var x=i[0].getTicksCoords(),_=e.cx,b=e.cy,S=0;S<x.length;S++){if(d)m[k(m,g,S)].push(new R({shape:{cx:_,cy:b,r:x[S].coord}}));if(h&&S<x.length-1)v[k(v,y,S)].push(new z({shape:{cx:_,cy:b,r0:x[S].coord,r:x[S+1].coord}}))}else{var w,M=n(i,function(t,i){var o=t.getTicksCoords();return w=null==w?o.length-1:Math.min(o.length-1,w),n(o,function(t){return e.coordToPoint(t.coord,i)})}),I=[];for(S=0;S<=w;S++){for(var D=[],T=0;T<i.length;T++)D.push(M[T][S]);if(D[0]&&D.push(D[0].slice()),d)m[k(m,g,S)].push(new G({shape:{points:D}}));if(h&&I)v[k(v,y,S-1)].push(new B({shape:{points:D.concat(I)}}));I=D.slice().reverse()}}var A=u.getLineStyle(),L=c.getAreaStyle();s(v,function(t,e){this.group.add(lo(t,{style:C({stroke:"none",fill:y[e%y.length]},L),silent:!0}))},this),s(m,function(t,e){this.group.add(lo(t,{style:C({fill:"none",stroke:g[e%g.length]},A),silent:!0}))},this)}function k(t,e,n){var i=n%e.length;return t[i]=t[i]||[],i}},e.type="radar",e}(nu),vm=
/** @class */function(t){function e(e,n,i){var o=t.call(this,e,n,i)||this;return o.type="value",o.angle=0,o.name="",o}return h(e,t),e}(Hp),xm=
/** @class */function(){function e(t,e,i){this.dimensions=[],this._model=t,this._indicatorAxes=n(t.getIndicatorModels(),function(t,e){var n="indicator_"+e,i=new vm(n,new Ih);return i.name=t.get("name"),i.model=t,t.axis=i,this.dimensions.push(n),i},this),this.resize(t,i)}return e.prototype.getIndicatorAxes=function(){return this._indicatorAxes},e.prototype.dataToPoint=function(t,e){var n=this._indicatorAxes[e];return this.coordToPoint(n.dataToCoord(t),e)},e.prototype.coordToPoint=function(t,e){var n=this._indicatorAxes[e].angle;return[this.cx+t*Math.cos(n),this.cy-t*Math.sin(n)]},e.prototype.pointToData=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=Math.sqrt(e*e+n*n);e/=i,n/=i;for(var o,r=Math.atan2(-n,e),a=Infinity,s=-1,l=0;l<this._indicatorAxes.length;l++){var u=this._indicatorAxes[l],c=Math.abs(r-u.angle);c<a&&(o=u,s=l,a=c)}return[s,+(o&&o.coordToData(i))]},e.prototype.resize=function(e,n){var i=e.get("center"),o=n.getWidth(),r=n.getHeight(),a=Math.min(o,r)/2;this.cx=Ge(i[0],o),this.cy=Ge(i[1],r),this.startAngle=e.get("startAngle")*Math.PI/180;var l=e.get("radius");(t(l)||u(l))&&(l=[0,l]),this.r0=Ge(l[0],a),this.r=Ge(l[1],a),s(this._indicatorAxes,function(t,e){t.setExtent(this.r0,this.r);var n=this.startAngle+e*Math.PI*2/this._indicatorAxes.length;n=Math.atan2(Math.sin(n),Math.cos(n)),t.angle=n},this)},e.prototype.update=function(t,e){var n=this._indicatorAxes,i=this._model;s(n,function(t){t.scale.setExtent(Infinity,-Infinity)}),t.eachSeriesByType("radar",function(e,o){if("radar"===e.get("coordinateSystem")&&t.getComponent("radar",e.get("radarIndex"))===i){var r=e.getData();s(n,function(t){t.scale.unionExtentFromData(r,r.mapDimension(t.dim))})}},this);var o=i.get("splitNumber"),r=new Ih;r.setExtent(0,o),r.setInterval(1),s(n,function(t,e){Ly(t.scale,t.model,r)})},e.prototype.convertToPixel=function(t,e,n){return null},e.prototype.convertFromPixel=function(t,e,n){return null},e.prototype.containPoint=function(t){return!1},e.create=function(t,n){var i=[];return t.eachComponent("radar",function(o){var r=new e(o,t,n);i.push(r),o.coordinateSystem=r}),t.eachSeriesByType("radar",function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("radarIndex")||0])}),i},e.dimensions=[],e}();function _m(t){t.registerCoordinateSystem("radar",xm),t.registerComponentModel(gm),t.registerComponentView(mm),t.registerVisual({seriesType:"radar",reset:function(t){var e=t.getData();e.each(function(t){e.setItemVisual(t,"legendIcon","roundRect")}),e.setVisual("legendIcon","roundRect")}})}function bm(t){_p(_m),t.registerChartView(dm),t.registerSeriesModel(hm),t.registerLayout(sm),t.registerProcessor(jg("radar")),t.registerPreprocessor(cm)}var Sm="\0_ec_interaction_mutex";function wm(t,e){return!!Mm(t)[e]}function Mm(t){return t[Sm]||(t[Sm]={})}wd({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},ht);var Im=
/** @class */function(t){function e(e){var n=t.call(this)||this;n._zr=e;var i=ut(n._mousedownHandler,n),o=ut(n._mousemoveHandler,n),r=ut(n._mouseupHandler,n),a=ut(n._mousewheelHandler,n),s=ut(n._pinchHandler,n);return n.enable=function(t,n){this.disable(),this._opt=C(nt(n)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,
// By default, wheel do not trigger move.
moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(e.on("mousedown",i),e.on("mousemove",o),e.on("mouseup",r)),!0!==t&&"scale"!==t&&"zoom"!==t||(e.on("mousewheel",a),e.on("pinch",s))},n.disable=function(){e.off("mousedown",i),e.off("mousemove",o),e.off("mouseup",r),e.off("mousewheel",a),e.off("pinch",s)},n}return h(e,t),e.prototype.isDragging=function(){return this._dragging},e.prototype.isPinching=function(){return this._pinching},e.prototype.setPointerChecker=function(t){this.pointerChecker=t},e.prototype.dispose=function(){this.disable()},e.prototype._mousedownHandler=function(t){if(!Yt(t)){for(var e=t.target;e;){if(e.draggable)return;e=e.__hostTarget||e.parent}var n=t.offsetX,i=t.offsetY;this.pointerChecker&&this.pointerChecker(t,n,i)&&(this._x=n,this._y=i,this._dragging=!0)}},e.prototype._mousemoveHandler=function(t){if(this._dragging&&Cm("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!wm(this._zr,"globalPan")){var e=t.offsetX,n=t.offsetY,i=this._x,o=this._y,r=e-i,a=n-o;this._x=e,this._y=n,this._opt.preventDefaultMouseMove&&Ut(t.event),Tm(this,"pan","moveOnMouseMove",t,{dx:r,dy:a,oldX:i,oldY:o,newX:e,newY:n,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(t){Yt(t)||(this._dragging=!1)},e.prototype._mousewheelHandler=function(t){var e=Cm("zoomOnMouseWheel",t,this._opt),n=Cm("moveOnMouseWheel",t,this._opt),i=t.wheelDelta,o=Math.abs(i),r=t.offsetX,a=t.offsetY;if(0!==i&&(e||n)){if(e){var s=o>3?1.4:o>1?1.2:1.1;Dm(this,"zoom","zoomOnMouseWheel",t,{scale:i>0?s:1/s,originX:r,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(i);Dm(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(i>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:r,originY:a,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){wm(this._zr,"globalPan")||Dm(this,"zoom",null,t,{scale:t.pinchScale>1?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})},e}(vt);function Dm(t,e,n,i,o){t.pointerChecker&&t.pointerChecker(i,o.originX,o.originY)&&(Ut(i.event),Tm(t,e,n,i,o))}function Tm(t,e,n,i,o){o.isAvailableBehavior=ut(Cm,null,n,i),t.trigger(e,o)}function Cm(e,n,i){var o=i[e];return!e||o&&(!t(o)||n.event[o+"Key"])}function Am(t,e,n){var i=t.target;i.x+=e,i.y+=n,i.dirty()}function Lm(t,e,n,i){var o=t.target,r=t.zoomLimit,a=t.zoom=t.zoom||1;if(a*=e,r){var s=r.min||0,l=r.max||Infinity;a=Math.max(Math.min(l,a),s)}var u=a/t.zoom;t.zoom=a,o.x-=(n-o.x)*(u-1),o.y-=(i-o.y)*(u-1),o.scaleX*=u,o.scaleY*=u,o.dirty()}var km={axisPointer:1,tooltip:1,brush:1};function Pm(t,e,n){var i=e.getComponentByElement(t.topTarget),o=i&&i.coordinateSystem;return i&&i!==n&&!km.hasOwnProperty(i.mainType)&&o&&o.model!==n}var Nm=a(["rect","circle","line","ellipse","polygon","polyline","path",
// <text> <tspan> are also enabled because some SVG might paint text itself,
// but still need to trigger events or tooltip.
"text","tspan",
// <g> is also enabled because this case: if multiple tags share one name
// and need label displayed, every tags will display the name, which is not
// expected. So we can put them into a <g name="xxx">. Thereby only one label
// displayed and located based on the bounding rect of the <g>.
"g"]),Om=
/** @class */function(){function t(t,e){this.type="geoSVG",this._usedGraphicMap=a(),this._freedGraphics=[],this._mapName=t,this._parsedXML=Zt(e)}return t.prototype.load=function(){var t=this._firstGraphic;if(!t){t=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(t),this._boundingRect=this._firstGraphic.boundingRect.clone();var e=function(t){var e=[],n=a();return s(t,function(t){if(null==t.namedFrom){var i=new Cp(t.name,t.el);e.push(i),n.set(t.name,i)}}),{regions:e,regionsMap:n}}(t.named),n=e.regions,i=e.regionsMap;this._regions=n,this._regionsMap=i}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},t.prototype._buildGraphic=function(t){var e,n;try{n=(e=t&&Xt(t,{ignoreViewBox:!0,ignoreRootClip:!0})||{}).root,i(null!=n)}catch(m){throw new Error("Invalid svg format\n"+m.message)}var o=new X;o.add(n),o.isGeoSVGGraphicRoot=!0;var r=e.width,a=e.height,l=e.viewBoxRect,u=this._boundingRect;if(!u){var c=void 0,d=void 0,h=void 0,p=void 0;if(null!=r?(c=0,h=r):l&&(c=l.x,h=l.width),null!=a?(d=0,p=a):l&&(d=l.y,p=l.height),null==c||null==d){var f=n.getBoundingRect();null==c&&(c=f.x,h=f.width),null==d&&(d=f.y,p=f.height)}u=this._boundingRect=new U(c,d,h,p)}if(l){var g=jt(l,u);n.scaleX=n.scaleY=g.scale,n.x=g.x,n.y=g.y}o.setClipPath(new F({shape:u.plain()}));var y=[];return s(e.named,function(t){var e;null!=Nm.get(t.svgNodeTagLower)&&(y.push(t),(e=t.el).silent=!1,e.isGroup&&e.traverse(function(t){t.silent=!1}))}),{root:o,boundingRect:u,named:y}},t.prototype.useGraphic=function(t){var e=this._usedGraphicMap,n=e.get(t);return n||(n=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),e.set(t,n),n)},t.prototype.freeGraphic=function(t){var e=this._usedGraphicMap,n=e.get(t);n&&(e.removeKey(t),this._freedGraphics.push(n))},t}();for(var Rm=[126,25],Em="南海诸岛",Vm=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],zm=0;zm<Vm.length;zm++)for(var Bm=0;Bm<Vm[zm].length;Bm++)Vm[zm][Bm][0]/=10.5,Vm[zm][Bm][1]/=-14,Vm[zm][Bm][0]+=Rm[0],Vm[zm][Bm][1]+=Rm[1];var Gm={"南海诸岛":[32,80],
// 全国
"广东":[0,-10],"香港":[10,5],"澳门":[-10,10],
// '北京': [-10, 0],
"天津":[5,5]};var Fm=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];var Wm=
/** @class */function(){function e(e,n,i){var o;this.type="geoJSON",this._parsedMap=a(),this._mapName=e,this._specialAreas=i,this._geoJSON=t(o=n)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(o):new Function("return ("+o+");")():o}return e.prototype.load=function(t,e){e=e||"name";var n=this._parsedMap.get(e);if(!n){var i=this._parseToRegions(e);n=this._parsedMap.set(e,{regions:i,boundingRect:Hm(i)})}var o=a(),r=[];return s(n.regions,function(e){var n=e.name;t&&k(t,n)&&(e=e.cloneShallow(n=t[n])),r.push(e),o.set(n,e)}),{regions:r,boundingRect:n.boundingRect||new U(0,0,0,0),regionsMap:o}},e.prototype._parseToRegions=function(t){var e,i=this._mapName,o=this._geoJSON;try{e=o?kp(o,t):[]}catch(r){throw new Error("Invalid geoJson format\n"+r.message)}return function(t,e){if("china"===t){for(var i=0;i<e.length;i++)if(e[i].name===Em)return;e.push(new Tp(Em,n(Vm,function(t){return{type:"polygon",exterior:t}}),Rm))}}(i,e),s(e,function(t){var e=t.name;!function(t,e){if("china"===t){var n=Gm[e.name];if(n){var i=e.getCenter();i[0]+=n[0]/10.5,i[1]+=-n[1]/14,e.setCenter(i)}}}(i,t),function(t,e){"china"===t&&"台湾"===e.name&&e.geometries.push({type:"polygon",exterior:Fm[0]})}(i,t);var n=this._specialAreas&&this._specialAreas[e];n&&t.transformTo(n.left,n.top,n.width,n.height)},this),e},e.prototype.getMapForUser=function(){return{
// For backward compatibility, use geoJson
// PENDING: it has been returning them without clone.
// do we need to avoid outsite modification?
geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},e}();function Hm(t){for(var e,n=0;n<t.length;n++){var i=t[n].getBoundingRect();(e=e||i.clone()).union(i)}return e}var Ym=a();const Um=function(t,e,n){if(e.svg){var i=new Om(t,e.svg);Ym.set(t,i)}else{var o=e.geoJson||e.geoJSON;o&&!e.features?n=e.specialAreas:o=e;i=new Wm(t,o,n);Ym.set(t,i)}},Zm=function(t){return Ym.get(t)},Xm=function(t){var e=Ym.get(t);return e&&"geoJSON"===e.type&&e.getMapForUser()},jm=function(t,e,n){var i=Ym.get(t);if(i)return i.load(e,n)};var qm=["rect","circle","line","ellipse","polygon","polyline","path"],Km=a(qm),Jm=a(qm.concat(["g"])),$m=a(qm.concat(["g"])),Qm=wn();function tv(t){var e=t.getItemStyle(),n=t.get("areaColor");return null!=n&&(e.fill=n),e}function ev(t){var e=t.style;e&&(e.stroke=e.stroke||e.fill,e.fill=null)}var nv=
/** @class */function(){function t(t){var e=new X;this.uid=nr("ec_map_draw"),this._controller=new Im(t.getZr()),this._controllerHost={target:e},this.group=e,e.add(this._regionsGroup=new X),e.add(this._svgGroup=new X)}return t.prototype.draw=function(t,e,n,i,o){var r="geo"===t.mainType,a=t.getData&&t.getData();r&&e.eachComponent({mainType:"series",subType:"map"},function(e){a||e.getHostGeoModel()!==t||(a=e.getData())});var s=t.coordinateSystem,l=this._regionsGroup,u=this.group,c=s.getTransformInfo(),d=c.raw,h=c.roam;!l.childAt(0)||o?(u.x=h.x,u.y=h.y,u.scaleX=h.scaleX,u.scaleY=h.scaleY,u.dirty()):Zi(u,h,t);var p=a&&a.getVisual("visualMeta")&&a.getVisual("visualMeta").length>0,f={api:n,geo:s,mapOrGeoModel:t,data:a,isVisualEncodedByVisualMap:p,isGeo:r,transformInfoRaw:d};"geoJSON"===s.resourceType?this._buildGeoJSON(f):"geoSVG"===s.resourceType&&this._buildSVG(f),this._updateController(t,e,n),this._updateMapSelectHandler(t,l,n,i)},t.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=a(),n=a(),i=this._regionsGroup,o=t.transformInfoRaw,r=t.mapOrGeoModel,l=t.data,u=t.geo.projection,c=u&&u.stream;function d(t,e){return e&&(t=e(t)),t&&[t[0]*o.scaleX+o.x,t[1]*o.scaleY+o.y]}function h(t){for(var e=[],n=!c&&u&&u.project,i=0;i<t.length;++i){var o=d(t[i],n);o&&e.push(o)}return e}function p(t){return{shape:{points:h(t)}}}i.removeAll(),s(t.geo.regions,function(o){var a=o.name,h=e.get(a),f=n.get(a)||{},g=f.dataIdx,y=f.regionModel;if(!h){h=e.set(a,new X),i.add(h),g=l?l.indexOfName(a):null;var m=(y=t.isGeo?r.getRegionModel(a):l?l.getItemModel(g):null).get("silent",!0);null!=m&&(h.silent=m),n.set(a,{dataIdx:g,regionModel:y})}var v=[],x=[];s(o.geometries,function(t){if("polygon"===t.type){var e=[t.exterior].concat(t.interiors||[]);c&&(e=lv(e,c)),s(e,function(t){v.push(new B(p(t)))})}else{var n=t.points;c&&(n=lv(n,c,!0)),s(n,function(t){x.push(new G(p(t)))})}});var _=d(o.getCenter(),u&&u.project);function b(e,n){if(e.length){var i=new Z({culling:!0,segmentIgnoreThreshold:1,shape:{paths:e}});h.add(i),iv(t,i,g,y),ov(t,i,a,y,r,g,_),n&&(ev(i),s(i.states,ev))}}b(v),b(x,!0)}),e.each(function(e,i){var o=n.get(i),a=o.dataIdx,s=o.regionModel;rv(t,e,i,s,r,a),av(t,e,i,s,r),sv(t,e,i,s,r)},this)},t.prototype._buildSVG=function(t){var e=t.geo.map,n=t.transformInfoRaw;this._svgGroup.x=n.x,this._svgGroup.y=n.y,this._svgGroup.scaleX=n.scaleX,this._svgGroup.scaleY=n.scaleY,this._svgResourceChanged(e)&&(this._freeSVG(),this._useSVG(e));var i=this._svgDispatcherMap=a(),o=!1;s(this._svgGraphicRecord.named,function(e){var n=e.name,r=t.mapOrGeoModel,a=t.data,s=e.svgNodeTagLower,l=e.el,u=a?a.indexOfName(n):null,c=r.getRegionModel(n);null!=Km.get(s)&&l instanceof qt&&iv(t,l,u,c),l instanceof qt&&(l.culling=!0);var d=c.get("silent",!0);(null!=d&&(l.silent=d),l.z2EmphasisLift=0,e.namedFrom)||(null!=$m.get(s)&&ov(t,l,n,c,r,u,null),rv(t,l,n,c,r,u),av(t,l,n,c,r),null!=Jm.get(s)&&("self"===sv(t,l,n,c,r)&&(o=!0),(i.get(n)||i.set(n,[])).push(l)))},this),this._enableBlurEntireSVG(o,t)},t.prototype._enableBlurEntireSVG=function(t,e){if(t&&e.isGeo){var n=e.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle().opacity;this._svgGraphicRecord.root.traverse(function(t){if(!t.isGroup){mi(t);var e=t.ensureState("blur").style||{};null==e.opacity&&null!=n&&(e.opacity=n),t.ensureState("emphasis")}})}},t.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},t.prototype.findHighDownDispatchers=function(t,e){if(null==t)return[];var n=e.coordinateSystem;if("geoJSON"===n.resourceType){var i=this._regionsGroupByName;if(i){var o=i.get(t);return o?[o]:[]}}else if("geoSVG"===n.resourceType)return this._svgDispatcherMap&&this._svgDispatcherMap.get(t)||[]},t.prototype._svgResourceChanged=function(t){return this._svgMapName!==t},t.prototype._useSVG=function(t){var e=Zm(t);if(e&&"geoSVG"===e.type){var n=e.useGraphic(this.uid);this._svgGroup.add(n.root),this._svgGraphicRecord=n,this._svgMapName=t}},t.prototype._freeSVG=function(){var t=this._svgMapName;if(null!=t){var e=Zm(t);e&&"geoSVG"===e.type&&e.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},t.prototype._updateController=function(t,e,n){var i=t.coordinateSystem,o=this._controller,r=this._controllerHost;r.zoomLimit=t.get("scaleLimit"),r.zoom=i.getZoom(),o.enable(t.get("roam")||!1);var a=t.mainType;function s(){var e={type:"geoRoam",componentType:a};return e[a+"Id"]=t.id,e}o.off("pan").on("pan",function(t){this._mouseDownFlag=!1,Am(r,t.dx,t.dy),n.dispatchAction(f(s(),{dx:t.dx,dy:t.dy,animation:{duration:0}}))},this),o.off("zoom").on("zoom",function(t){this._mouseDownFlag=!1,Lm(r,t.scale,t.originX,t.originY),n.dispatchAction(f(s(),{totalZoom:r.zoom,zoom:t.scale,originX:t.originX,originY:t.originY,animation:{duration:0}}))},this),o.setPointerChecker(function(e,o,r){return i.containPoint([o,r])&&!Pm(e,n,t)})},t.prototype.resetForLabelLayout=function(){this.group.traverse(function(t){var e=t.getTextContent();e&&(e.ignore=Qm(e).ignore)})},t.prototype._updateMapSelectHandler=function(t,e,n,i){var o=this;e.off("mousedown"),e.off("click"),t.get("selectedMode")&&(e.on("mousedown",function(){o._mouseDownFlag=!0}),e.on("click",function(t){o._mouseDownFlag&&(o._mouseDownFlag=!1)}))},t}();function iv(t,e,n,i){var o=i.getModel("itemStyle"),r=i.getModel(["emphasis","itemStyle"]),a=i.getModel(["blur","itemStyle"]),s=i.getModel(["select","itemStyle"]),l=tv(o),u=tv(r),c=tv(s),d=tv(a),h=t.data;if(h){var p=h.getItemVisual(n,"style"),f=h.getItemVisual(n,"decal");t.isVisualEncodedByVisualMap&&p.fill&&(l.fill=p.fill),f&&(l.decal=bc(f,t.api))}e.setStyle(l),e.style.strokeNoScale=!0,e.ensureState("emphasis").style=u,e.ensureState("select").style=c,e.ensureState("blur").style=d,mi(e)}function ov(t,e,n,i,o,r,a){var s=t.data,l=t.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),r)),c=s&&s.getItemLayout(r);if(l||u||c&&c.showLabel){var d=l?n:r,h=void 0;(!s||r>=0)&&(h=o);var p=a?{normal:{align:"center",verticalAlign:"middle"}}:null;Lo(e,ko(i),{labelFetcher:h,labelDataIndex:d,defaultText:n},p);var f=e.getTextContent();if(f&&(Qm(f).ignore=f.ignore,e.textConfig&&a)){var g=e.getBoundingRect().clone();e.textConfig.layoutRect=g,e.textConfig.position=[(a[0]-g.x)/g.width*100+"%",(a[1]-g.y)/g.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function rv(t,e,n,i,o,r){t.data?t.data.setItemGraphicEl(r,e):Un(e).eventData={componentType:"geo",componentIndex:o.componentIndex,geoIndex:o.componentIndex,name:n,region:i&&i.option||{}}}function av(t,e,n,i,o){t.data||wo({el:e,componentModel:o,itemName:n,
// @ts-ignore FIXME:TS fix the "compatible with each other"?
itemTooltipOption:i.get("tooltip")})}function sv(t,e,n,i,o){e.highDownSilentOnTouch=!!o.get("selectedMode");var r=i.getModel("emphasis"),a=r.get("focus");return Oi(e,a,r.get("blurScope"),r.get("disabled")),t.isGeo&&function(t,e,n){var i=Un(t);i.componentMainType=e.mainType,i.componentIndex=e.componentIndex,i.componentHighDownName=n}(e,o,n),a}function lv(t,e,n){var i,o=[];function r(){i=[]}function a(){i.length&&(o.push(i),i=[])}var l=e({polygonStart:r,polygonEnd:a,lineStart:r,lineEnd:a,point:function(t,e){isFinite(t)&&isFinite(e)&&i.push([t,e])},sphere:function(){}});return!n&&l.polygonStart(),s(t,function(t){l.lineStart();for(var e=0;e<t.length;e++)l.point(t[e][0],t[e][1]);l.lineEnd()}),!n&&l.polygonEnd(),o}var uv=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.render=function(t,e,n,i){if(!i||"mapToggleSelect"!==i.type||i.from!==this.uid){var o=this.group;if(o.removeAll(),!t.getHostGeoModel()){if(this._mapDraw&&i&&"geoRoam"===i.type&&this._mapDraw.resetForLabelLayout(),i&&"geoRoam"===i.type&&"series"===i.componentType&&i.seriesId===t.id)(r=this._mapDraw)&&o.add(r.group);else if(t.needsDrawMap){var r=this._mapDraw||new nv(n);o.add(r.group),r.draw(t,e,n,this,i),this._mapDraw=r}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,n)}}},e.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},e.prototype._renderSymbols=function(t,e,n){var i=t.originalData,o=this.group;i.each(i.mapDimension("value"),function(e,n){if(!isNaN(e)){var r=i.getItemLayout(n);if(r&&r.point){var a=r.point,s=r.offset,l=new R({style:{
// Because the special of map draw.
// Which needs statistic of multiple series and draw on one map.
// And each series also need a symbol with legend color
// Layout and visual are put one the different data
// TODO
fill:t.getData().getVisual("style").fill},shape:{cx:a[0]+9*s,cy:a[1],r:3},silent:!0,
// Do not overlap the first series, on which labels are displayed.
z2:8+(s?0:11)});if(!s){var u=t.mainSeries.getData(),c=i.getName(n),d=u.indexOfName(c),h=i.getItemModel(n),p=h.getModel("label"),f=u.getItemGraphicEl(d);Lo(l,ko(h),{labelFetcher:{getFormattedLabel:function(e,n){return t.getFormattedLabel(d,n)}},defaultText:c}),l.disableLabelAnimation=!0,p.get("position")||l.setTextConfig({position:"bottom"}),f.onHoverStateChange=function(t){gi(l,t)}}o.add(l)}}})},e.type="map",e}(au),cv=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.needsDrawMap=!1,n.seriesGroup=[],n.getTooltipPosition=function(t){if(null!=t){var e=this.getData().getName(t),n=this.coordinateSystem,i=n.getRegion(e);return i&&n.dataToPoint(i.getCenter())}},n}return h(e,t),e.prototype.getInitialData=function(t){for(var e=ny(this,{coordDimensions:["value"],encodeDefaulter:at(Ta,this)}),n=a(),i=[],o=0,r=e.count();o<r;o++){var l=e.getName(o);n.set(l,o)}var u=jm(this.getMapType(),this.option.nameMap,this.option.nameProperty);return s(u.regions,function(t){var o,r=t.name,a=n.get(r),s=t.properties&&t.properties.echartsStyle;null==a?(o={name:r},i.push(o)):o=e.getRawDataItem(a),s&&et(o,s)}),e.appendData(i),e},e.prototype.getHostGeoModel=function(){var t=this.option.geoIndex;return null!=t?this.ecModel.getComponent("geo",t):null},e.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},e.prototype.getRawValue=function(t){var e=this.getData();return e.get(e.mapDimension("value"),t)},e.prototype.getRegionModel=function(t){var e=this.getData();return e.getItemModel(e.indexOfName(t))},e.prototype.formatTooltip=function(t,e,n){for(var i=this.getData(),o=this.getRawValue(t),r=i.getName(t),a=this.seriesGroup,s=[],l=0;l<a.length;l++){var u=a[l].originalData.indexOfName(r),c=i.mapDimension("value");isNaN(a[l].originalData.get(c,u))||s.push(a[l].name)}return Pl("section",{header:s.join(", "),noHeader:!s.length,blocks:[Pl("nameValue",{name:r,value:o})]})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.getLegendIcon=function(t){var e=t.icon||"roundRect",n=gc(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill);return n.setStyle(t.itemStyle),n.style.stroke="none",e.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={
// 一级层叠
// zlevel: 0,
// 二级层叠
z:2,coordinateSystem:"geo",
// map should be explicitly specified since ec3.
map:"",
// If `geoIndex` is not specified, a exclusive geo will be
// created. Otherwise use the specified geo component, and
// `map` and `mapType` are ignored.
// geoIndex: 0,
// 'center' | 'left' | 'right' | 'x%' | {number}
left:"center",
// 'center' | 'top' | 'bottom' | 'x%' | {number}
top:"center",
// right
// bottom
// width:
// height
// Aspect is width / height. Inited to be geoJson bbox aspect
// This parameter is used for scale this aspect
// Default value:
// for geoSVG source: 1,
// for geoJSON source: 0.75.
aspectScale:null,
// Layout with center and size
// If you want to put map in a fixed size box with right aspect ratio
// This two properties may be more convenient.
// layoutCenter: [50%, 50%]
// layoutSize: 100
showLegendSymbol:!0,
// Define left-top, right-bottom coords to control view
// For example, [ [180, 90], [-180, -90] ],
// higher priority than center and zoom
boundingCoords:null,
// Default on center of map
center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},
// scaleLimit: null,
itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(jl);function dv(t){var e={};t.eachSeriesByType("map",function(t){var n=t.getHostGeoModel(),i=n?"o"+n.id:"i"+t.getMapType();(e[i]=e[i]||[]).push(t)}),s(e,function(t,e){for(var i,o,r,a=(i=n(t,function(t){return t.getData()}),o=t[0].get("mapValueCalculation"),r={},s(i,function(t){t.each(t.mapDimension("value"),function(e,n){var i="ec-"+t.getName(n);r[i]=r[i]||[],isNaN(e)||r[i].push(e)})}),i[0].map(i[0].mapDimension("value"),function(t,e){for(var n="ec-"+i[0].getName(e),a=0,s=Infinity,l=-Infinity,u=r[n].length,c=0;c<u;c++)s=Math.min(s,r[n][c]),l=Math.max(l,r[n][c]),a+=r[n][c];return 0===u?NaN:"min"===o?s:"max"===o?l:"average"===o?a/u:a})),l=0;l<t.length;l++)t[l].originalData=t[l].getData();for(l=0;l<t.length;l++)t[l].seriesGroup=t,t[l].needsDrawMap=0===l&&!t[l].getHostGeoModel(),t[l].setData(a.cloneShallow()),t[l].mainSeries=t[0]})}function hv(t){var e={};t.eachSeriesByType("map",function(n){var i=n.getMapType();if(!n.getHostGeoModel()&&!e[i]){var o={};s(n.seriesGroup,function(e){var n=e.coordinateSystem,i=e.originalData;e.get("showLegendSymbol")&&t.getComponent("legend")&&i.each(i.mapDimension("value"),function(t,e){var r=i.getName(e),a=n.getRegion(r);if(a&&!isNaN(t)){var s=o[r]||0,l=n.dataToPoint(a.getCenter());o[r]=s+1,i.setItemLayout(e,{point:l,offset:s})}})});var r=n.getData();r.each(function(t){var e=r.getName(t),n=r.getItemLayout(t)||{};n.showLabel=!o[e],r.setItemLayout(t,n)}),e[i]=!0}})}var pv=T,fv=
/** @class */function(t){function e(e){var n=t.call(this)||this;return n.type="view",n.dimensions=["x","y"],n._roamTransformable=new I,n._rawTransformable=new I,n.name=e,n}return h(e,t),e.prototype.setBoundingRect=function(t,e,n,i){return this._rect=new U(t,e,n,i),this._rect},e.prototype.getBoundingRect=function(){return this._rect},e.prototype.setViewRect=function(t,e,n,i){this._transformTo(t,e,n,i),this._viewRect=new U(t,e,n,i)},e.prototype._transformTo=function(t,e,n,i){var o=this.getBoundingRect(),r=this._rawTransformable;r.transform=o.calculateTransform(new U(t,e,n,i));var a=r.parent;r.parent=null,r.decomposeTransform(),r.parent=a,this._updateTransform()},e.prototype.setCenter=function(t,e){t&&(this._center=[Ge(t[0],e.getWidth()),Ge(t[1],e.getHeight())],this._updateCenterAndZoom())},e.prototype.setZoom=function(t){t=t||1;var e=this.zoomLimit;e&&(null!=e.max&&(t=Math.min(e.max,t)),null!=e.min&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},e.prototype.getDefaultCenter=function(){var t=this.getBoundingRect();return[t.x+t.width/2,t.y+t.height/2]},e.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},e.prototype.getZoom=function(){return this._zoom||1},e.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},e.prototype._updateCenterAndZoom=function(){var t=this._rawTransformable.getLocalTransform(),e=this._roamTransformable,n=this.getDefaultCenter(),i=this.getCenter(),o=this.getZoom();i=T([],i,t),n=T([],n,t),e.originX=i[0],e.originY=i[1],e.x=n[0]-i[0],e.y=n[1]-i[1],e.scaleX=e.scaleY=o,this._updateTransform()},e.prototype._updateTransform=function(){var t=this._roamTransformable,e=this._rawTransformable;e.parent=t,t.updateTransform(),e.updateTransform(),Kt(this.transform||(this.transform=[]),e.transform||Jt()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],D(this.invTransform,this.transform),this.decomposeTransform()},e.prototype.getTransformInfo=function(){var t=this._rawTransformable,e=this._roamTransformable,n=new I;return n.transform=e.transform,n.decomposeTransform(),{roam:{x:n.x,y:n.y,scaleX:n.scaleX,scaleY:n.scaleY},raw:{x:t.x,y:t.y,scaleX:t.scaleX,scaleY:t.scaleY}}},e.prototype.getViewRect=function(){return this._viewRect},e.prototype.getViewRectAfterRoam=function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},e.prototype.dataToPoint=function(t,e,n){var i=e?this._rawTransform:this.transform;return n=n||[],i?pv(n,t,i):$t(n,t)},e.prototype.pointToData=function(t){var e=this.invTransform;return e?pv([],t,e):[t[0],t[1]]},e.prototype.convertToPixel=function(t,e,n){var i=gv(e);return i===this?i.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,e,n){var i=gv(e);return i===this?i.pointToData(n):null},e.prototype.containPoint=function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])},e.dimensions=["x","y"],e}(I);function gv(t){var e=t.seriesModel;return e?e.coordinateSystem:null}var yv={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},mv=["lng","lat"],vv=
/** @class */function(e){function n(t,n,i){var o=e.call(this,t)||this;o.dimensions=mv,o.type="geo",o._nameCoordMap=a(),o.map=n;var r=i.projection,s=jm(n,i.nameMap,i.nameProperty),l=Zm(n);o.resourceType=l?l.type:null;var u,c=o.regions=s.regions,d=yv[l.type];if(o._regionsMap=s.regionsMap,o.regions=s.regions,o.projection=r,r)for(var h=0;h<c.length;h++){var p=c[h].getBoundingRect(r);(u=u||p.clone()).union(p)}else u=s.boundingRect;return o.setBoundingRect(u.x,u.y,u.width,u.height),o.aspectScale=r?1:_(i.aspectScale,d.aspectScale),o._invertLongitute=!r&&d.invertLongitute,o}return h(n,e),n.prototype._transformTo=function(t,e,n,i){var o=this.getBoundingRect(),r=this._invertLongitute;o=o.clone(),r&&(o.y=-o.y-o.height);var a=this._rawTransformable;a.transform=o.calculateTransform(new U(t,e,n,i));var s=a.parent;a.parent=null,a.decomposeTransform(),a.parent=s,r&&(a.scaleY=-a.scaleY),this._updateTransform()},n.prototype.getRegion=function(t){return this._regionsMap.get(t)},n.prototype.getRegionByCoord=function(t){for(var e=this.regions,n=0;n<e.length;n++){var i=e[n];if("geoJSON"===i.type&&i.contain(t))return e[n]}},n.prototype.addGeoCoord=function(t,e){this._nameCoordMap.set(t,e)},n.prototype.getGeoCoord=function(t){var e=this._regionsMap.get(t);return this._nameCoordMap.get(t)||e&&e.getCenter()},n.prototype.dataToPoint=function(e,n,i){if(t(e)&&(e=this.getGeoCoord(e)),e){var o=this.projection;return o&&(e=o.project(e)),e&&this.projectedToPoint(e,n,i)}},n.prototype.pointToData=function(t){var e=this.projection;return e&&(t=e.unproject(t)),t&&this.pointToProjected(t)},n.prototype.pointToProjected=function(t){return e.prototype.pointToData.call(this,t)},n.prototype.projectedToPoint=function(t,n,i){return e.prototype.dataToPoint.call(this,t,n,i)},n.prototype.convertToPixel=function(t,e,n){var i=xv(e);return i===this?i.dataToPoint(n):null},n.prototype.convertFromPixel=function(t,e,n){var i=xv(e);return i===this?i.pointToData(n):null},n}(fv);function xv(t){var e=t.geoModel,n=t.seriesModel;return e?e.coordinateSystem:n?n.coordinateSystem||(n.getReferringComponents("geo",Tn).models[0]||{}).coordinateSystem:null}function _v(t,e){var n=t.get("boundingCoords");if(null!=n){var i=n[0],o=n[1];if(isFinite(i[0])&&isFinite(i[1])&&isFinite(o[0])&&isFinite(o[1])){var r=this.projection;if(r){var a=i[0],s=i[1],l=o[0],u=o[1];i=[Infinity,Infinity],o=[-Infinity,-Infinity];var c=function(t,e,n,a){for(var s=n-t,l=a-e,u=0;u<=100;u++){var c=u/100,d=r.project([t+s*c,e+l*c]);Tt(i,i,d),Ct(o,o,d)}};c(a,s,l,s),c(l,s,l,u),c(l,u,a,u),c(a,u,l,s)}this.setBoundingRect(i[0],i[1],o[0]-i[0],o[1]-i[1])}else;}var d,h,p,f=this.getBoundingRect(),g=t.get("layoutCenter"),y=t.get("layoutSize"),m=e.getWidth(),v=e.getHeight(),x=f.width/f.height*this.aspectScale,_=!1;if(g&&y&&(d=[Ge(g[0],m),Ge(g[1],v)],h=Ge(y,Math.min(m,v)),isNaN(d[0])||isNaN(d[1])||isNaN(h)||(_=!0)),_)p={},x>1?(p.width=h,p.height=h/x):(p.height=h,p.width=h*x),p.y=d[1]-p.height/2,p.x=d[0]-p.width/2;else{var b=t.getBoxLayoutParams();b.aspect=x,p=na(b,{width:m,height:v})}this.setViewRect(p.x,p.y,p.width,p.height),this.setCenter(t.get("center"),e),this.setZoom(t.get("zoom"))}it(vv,fv);var bv=
/** @class */function(){function t(){this.dimensions=mv}return t.prototype.create=function(t,e){var i=[];function o(t){return{nameProperty:t.get("nameProperty"),aspectScale:t.get("aspectScale"),projection:t.get("projection")}}t.eachComponent("geo",function(t,n){var r=t.get("map"),a=new vv(r+n,r,f({nameMap:t.get("nameMap")},o(t)));a.zoomLimit=t.get("scaleLimit"),i.push(a),t.coordinateSystem=a,a.model=t,a.resize=_v,a.resize(t,e)}),t.eachSeries(function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=i[e]}});var r={};return t.eachSeriesByType("map",function(t){if(!t.getHostGeoModel()){var e=t.getMapType();r[e]=r[e]||[],r[e].push(t)}}),s(r,function(t,r){var a=n(t,function(t){return t.get("nameMap")}),l=new vv(r,r,f({nameMap:Qt(a)},o(t[0])));l.zoomLimit=Ft.apply(null,n(t,function(t){return t.get("scaleLimit")})),i.push(l),l.resize=_v,l.resize(t[0],e),s(t,function(t){t.coordinateSystem=l,function(t,e){s(e.get("geoCoord"),function(e,n){t.addGeoCoord(n,e)})}(l,t)})}),i},t.prototype.getFilledRegions=function(t,e,n,i){for(var o=(t||[]).slice(),r=a(),l=0;l<o.length;l++)r.set(o[l].name,o[l]);var u=jm(e,n,i);return s(u.regions,function(t){var e=t.name,n=r.get(e),i=t.properties&&t.properties.echartsStyle;n||(n={name:e},o.push(n)),i&&et(n,i)}),o},t}(),Sv=new bv,wv=
/** @class */function(n){function i(){var t=null!==n&&n.apply(this,arguments)||this;return t.type=i.type,t}return h(i,n),i.prototype.init=function(t,e,n){var i=Zm(t.map);if(i&&"geoJSON"===i.type){var o=t.itemStyle=t.itemStyle||{};"color"in o||(o.color="#eee")}this.mergeDefaultAndTheme(t,n),hn(t,"label",["show"])},i.prototype.optionUpdated=function(){var t=this,n=this.option;n.regions=Sv.getFilledRegions(n.regions,n.map,n.nameMap,n.nameProperty);var i={};this._optionModelMap=e(n.regions||[],function(e,n){var o=n.name;return o&&(e.set(o,new tr(n,t,t.ecModel)),n.selected&&(i[o]=!0)),e},a()),n.selectedMap||(n.selectedMap=i)},i.prototype.getRegionModel=function(t){return this._optionModelMap.get(t)||new tr(null,this,this.ecModel)},i.prototype.getFormattedLabel=function(e,n){var i=this.getRegionModel(e),o="normal"===n?i.get(["label","formatter"]):i.get(["emphasis","label","formatter"]),r={name:e};return g(o)?(r.status=n,o(r)):t(o)?o.replace("{a}",null!=e?e:""):void 0},i.prototype.setZoom=function(t){this.option.zoom=t},i.prototype.setCenter=function(t){this.option.center=t},i.prototype.select=function(t){var e=this.option,n=e.selectedMode;n&&("multiple"!==n&&(e.selectedMap=null),(e.selectedMap||(e.selectedMap={}))[t]=!0)},i.prototype.unSelect=function(t){var e=this.option.selectedMap;e&&(e[t]=!1)},i.prototype.toggleSelected=function(t){this[this.isSelected(t)?"unSelect":"select"](t)},i.prototype.isSelected=function(t){var e=this.option.selectedMap;return!(!e||!e[t])},i.type="geo",i.layoutMode="box",i.defaultOption={
// zlevel: 0,
z:0,show:!0,left:"center",top:"center",
// Default value:
// for geoSVG source: 1,
// for geoJSON source: 0.75.
aspectScale:null,
// /// Layout with center and size
// If you want to put map in a fixed size box with right aspect ratio
// This two properties may be more convenient
// layoutCenter: [50%, 50%]
// layoutSize: 100
silent:!1,
// Map type
map:"",
// Define left-top, right-bottom coords to control view
// For example, [ [180, 90], [-180, -90] ]
boundingCoords:null,
// Default on center of map
center:null,zoom:1,scaleLimit:null,
// selectedMode: false
label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},i}(ua);function Mv(t,e){return t.pointToProjected?t.pointToProjected(e):t.pointToData(e)}function Iv(t,e,n,i){var o=t.getZoom(),r=t.getCenter(),a=e.zoom,s=t.projectedToPoint?t.projectedToPoint(r):t.dataToPoint(r);if(null!=e.dx&&null!=e.dy&&(s[0]-=e.dx,s[1]-=e.dy,t.setCenter(Mv(t,s),i)),null!=a){if(n){var l=n.min||0,u=n.max||Infinity;a=Math.max(Math.min(o*a,u),l)/o}t.scaleX*=a,t.scaleY*=a;var c=(e.originX-t.x)*(a-1),d=(e.originY-t.y)*(a-1);t.x-=c,t.y-=d,t.updateTransform(),t.setCenter(Mv(t,s),i),t.setZoom(a*o)}return{center:t.getCenter(),zoom:t.getZoom()}}var Dv=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.focusBlurEnabled=!0,n}return h(e,t),e.prototype.init=function(t,e){this._api=e},e.prototype.render=function(t,e,n,i){if(this._model=t,!t.get("show"))return this._mapDraw&&this._mapDraw.remove(),void(this._mapDraw=null);this._mapDraw||(this._mapDraw=new nv(n));var o=this._mapDraw;o.draw(t,e,n,this,i),o.group.on("click",this._handleRegionClick,this),o.group.silent=t.get("silent"),this.group.add(o.group),this.updateSelectStatus(t,e,n)},e.prototype._handleRegionClick=function(t){var e;ac(t.target,function(t){return null!=(e=Un(t).eventData)},!0),e&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:e.name})},e.prototype.updateSelectStatus=function(t,e,n){var i=this;this._mapDraw.group.traverse(function(t){var e=Un(t).eventData;if(e)return i._model.isSelected(e.name)?n.enterSelect(t):n.leaveSelect(t),!0})},e.prototype.findHighDownDispatchers=function(t){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(t,this._model)},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},e.type="geo",e}(nu);function Tv(t,e,n){Um(t,e,n)}function Cv(t){function e(e,n){n.update="geo:updateSelectStatus",t.registerAction(n,function(t,n){var i={},o=[];return n.eachComponent({mainType:"geo",query:t},function(n){n[e](t.name);var r=n.coordinateSystem;s(r.regions,function(t){i[t.name]=n.isSelected(t.name)||!1});var a=[];s(i,function(t,e){i[e]&&a.push(e)}),o.push({geoIndex:n.componentIndex,
// Use singular, the same naming convention as the event `selectchanged`.
name:a})}),{selected:i,allSelected:o,name:t.name}})}t.registerCoordinateSystem("geo",Sv),t.registerComponentModel(wv),t.registerComponentView(Dv),t.registerImpl("registerMap",Tv),t.registerImpl("getMap",function(t){return Xm(t)}),e("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),e("select",{type:"geoSelect",event:"geoselected"}),e("unSelect",{type:"geoUnSelect",event:"geounselected"}),t.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,e,n){var i=t.componentType||"series";e.eachComponent({mainType:i,query:t},function(e){var o=e.coordinateSystem;if("geo"===o.type){var r=Iv(o,t,e.get("scaleLimit"),n);e.setCenter&&e.setCenter(r.center),e.setZoom&&e.setZoom(r.zoom),"series"===i&&s(e.seriesGroup,function(t){t.setCenter(r.center),t.setZoom(r.zoom)})}})})}function Av(t,e){var n=t.isExpand?t.children:[],i=t.parentNode.children,o=t.hierNode.i?i[t.hierNode.i-1]:null;if(n.length){!function(t){var e=t.children,n=e.length,i=0,o=0;for(;--n>=0;){var r=e[n];r.hierNode.prelim+=i,r.hierNode.modifier+=i,o+=r.hierNode.change,i+=r.hierNode.shift+o}}(t);var r=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;o?(t.hierNode.prelim=o.hierNode.prelim+e(t,o),t.hierNode.modifier=t.hierNode.prelim-r):t.hierNode.prelim=r}else o&&(t.hierNode.prelim=o.hierNode.prelim+e(t,o));t.parentNode.hierNode.defaultAncestor=function(t,e,n,i){if(e){for(var o=t,r=t,a=r.parentNode.children[0],s=e,l=o.hierNode.modifier,u=r.hierNode.modifier,c=a.hierNode.modifier,d=s.hierNode.modifier;s=Nv(s),r=Ov(r),s&&r;){o=Nv(o),a=Ov(a),o.hierNode.ancestor=t;var h=s.hierNode.prelim+d-r.hierNode.prelim-u+i(s,r);h>0&&(Ev(Rv(s,t,n),t,h),u+=h,l+=h),d+=s.hierNode.modifier,u+=r.hierNode.modifier,l+=o.hierNode.modifier,c+=a.hierNode.modifier}s&&!Nv(o)&&(o.hierNode.thread=s,o.hierNode.modifier+=d-l),r&&!Ov(a)&&(a.hierNode.thread=r,a.hierNode.modifier+=u-c,n=t)}return n}(t,o,t.parentNode.hierNode.defaultAncestor||i[0],e)}function Lv(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function kv(t){return arguments.length?t:Vv}function Pv(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function Nv(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function Ov(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function Rv(t,e,n){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:n}function Ev(t,e,n){var i=n/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=i,e.hierNode.shift+=n,e.hierNode.modifier+=n,e.hierNode.prelim+=n,t.hierNode.change+=i}function Vv(t,e){return t.parentNode===e.parentNode?1:2}var zv=
/** @class */
function(){return function(){this.parentPoint=[],this.childPoints=[]}}(),Bv=
/** @class */function(t){function e(e){return t.call(this,e)||this}return h(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new zv},e.prototype.buildPath=function(t,e){var n=e.childPoints,i=n.length,o=e.parentPoint,r=n[0],a=n[i-1];if(1===i)return t.moveTo(o[0],o[1]),void t.lineTo(r[0],r[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,u=1-l,c=Ge(e.forkPosition,1),d=[];d[l]=o[l],d[u]=o[u]+(a[u]-o[u])*c,t.moveTo(o[0],o[1]),t.lineTo(d[0],d[1]),t.moveTo(r[0],r[1]),d[l]=r[l],t.lineTo(d[0],d[1]),d[l]=a[l],t.lineTo(d[0],d[1]),t.lineTo(a[0],a[1]);for(var h=1;h<i-1;h++){var p=n[h];t.moveTo(p[0],p[1]),d[l]=p[l],t.lineTo(d[0],d[1])}},e}(y),Gv=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._mainGroup=new X,n}return h(e,t),e.prototype.init=function(t,e){this._controller=new Im(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,e,n){var i=t.getData(),o=t.layoutInfo,r=this._mainGroup;"radial"===t.get("layout")?(r.x=o.x+o.width/2,r.y=o.y+o.height/2):(r.x=o.x,r.y=o.y),this._updateViewCoordSys(t,n),this._updateController(t,e,n);var a=this._data;i.diff(a).add(function(e){Fv(i,e)&&Wv(i,e,null,r,t)}).update(function(e,n){var o=a.getItemGraphicEl(n);Fv(i,e)?Wv(i,e,o,r,t):o&&Uv(a,n,o,r,t)}).remove(function(e){var n=a.getItemGraphicEl(e);n&&Uv(a,e,n,r,t)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),!0===t.get("expandAndCollapse")&&i.eachItemGraphicEl(function(e,i){e.off("click").on("click",function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:i})})}),this._data=i},e.prototype._updateViewCoordSys=function(t,e){var n=t.getData(),i=[];n.each(function(t){var e=n.getItemLayout(t);!e||isNaN(e.x)||isNaN(e.y)||i.push([+e.x,+e.y])});var o=[],r=[];te(i,o,r);var a=this._min,s=this._max;r[0]-o[0]===0&&(o[0]=a?a[0]:o[0]-1,r[0]=s?s[0]:r[0]+1),r[1]-o[1]===0&&(o[1]=a?a[1]:o[1]-1,r[1]=s?s[1]:r[1]+1);var l=t.coordinateSystem=new fv;l.zoomLimit=t.get("scaleLimit"),l.setBoundingRect(o[0],o[1],r[0]-o[0],r[1]-o[1]),l.setCenter(t.get("center"),e),l.setZoom(t.get("zoom")),this.group.attr({x:l.x,y:l.y,scaleX:l.scaleX,scaleY:l.scaleY}),this._min=o,this._max=r},e.prototype._updateController=function(t,e,n){var i=this,o=this._controller,r=this._controllerHost,a=this.group;o.setPointerChecker(function(e,i,o){var r=a.getBoundingRect();return r.applyTransform(a.transform),r.contain(i,o)&&!Pm(e,n,t)}),o.enable(t.get("roam")),r.zoomLimit=t.get("scaleLimit"),r.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(e){Am(r,e.dx,e.dy),n.dispatchAction({seriesId:t.id,type:"treeRoam",dx:e.dx,dy:e.dy})}).on("zoom",function(e){Lm(r,e.scale,e.originX,e.originY),n.dispatchAction({seriesId:t.id,type:"treeRoam",zoom:e.scale,originX:e.originX,originY:e.originY}),i._updateNodeAndLinkScale(t),n.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(t){var e=t.getData(),n=this._getNodeGlobalScale(t);e.eachItemGraphicEl(function(t,e){t.setSymbolScale(n)})},e.prototype._getNodeGlobalScale=function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var n=this._nodeScaleRatio,i=e.scaleX||1;return((e.getZoom()-1)*n+1)/i},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},e.type="tree",e}(au);function Fv(t,e){var n=t.getItemLayout(e);return n&&!isNaN(n.x)&&!isNaN(n.y)}function Wv(t,e,n,i,o){var r=!n,a=t.tree.getNodeByDataIndex(e),s=a.getModel(),l=a.getVisual("style").fill,u=!1===a.isExpand&&0!==a.children.length?l:"#fff",c=t.tree.root,d=a.parentNode===c?a:a.parentNode||a,h=t.getItemGraphicEl(d.dataIndex),p=d.getLayout(),f=h?{x:h.__oldX,y:h.__oldY,rawX:h.__radialOldRawX,rawY:h.__radialOldRawY}:p,g=a.getLayout();r?((n=new Nf(t,e,null,{symbolInnerColor:u,useNameLabel:!0})).x=f.x,n.y=f.y):n.updateData(t,e,null,{symbolInnerColor:u,useNameLabel:!0}),n.__radialOldRawX=n.__radialRawX,n.__radialOldRawY=n.__radialRawY,n.__radialRawX=g.rawX,n.__radialRawY=g.rawY,i.add(n),t.setItemGraphicEl(e,n),n.__oldX=n.x,n.__oldY=n.y,Zi(n,{x:g.x,y:g.y},o);var y=n.getSymbolPath();if("radial"===o.get("layout")){var m=c.children[0],v=m.getLayout(),x=m.children.length,_=void 0,b=void 0;if(g.x===v.x&&!0===a.isExpand&&m.children.length){var S={x:(m.children[0].getLayout().x+m.children[x-1].getLayout().x)/2,y:(m.children[0].getLayout().y+m.children[x-1].getLayout().y)/2};(_=Math.atan2(S.y-v.y,S.x-v.x))<0&&(_=2*Math.PI+_),(b=S.x<v.x)&&(_-=Math.PI)}else(_=Math.atan2(g.y-v.y,g.x-v.x))<0&&(_=2*Math.PI+_),0===a.children.length||0!==a.children.length&&!1===a.isExpand?(b=g.x<v.x)&&(_-=Math.PI):(b=g.x>v.x)||(_-=Math.PI);var w=b?"left":"right",M=s.getModel("label"),I=M.get("rotate"),D=I*(Math.PI/180),T=y.getTextContent();T&&(y.setTextConfig({position:M.get("position")||w,rotation:null==I?-_:D,origin:"center"}),T.setStyle("verticalAlign","middle"))}var A=s.get(["emphasis","focus"]),L="relative"===A?dt(a.getAncestorsIndices(),a.getDescendantIndices()):"ancestor"===A?a.getAncestorsIndices():"descendant"===A?a.getDescendantIndices():null;L&&(Un(n).focus=L),function(t,e,n,i,o,r,a,s){var l=e.getModel(),u=t.get("edgeShape"),c=t.get("layout"),d=t.getOrient(),h=t.get(["lineStyle","curveness"]),p=t.get("edgeForkPosition"),f=l.getModel("lineStyle").getLineStyle(),g=i.__edge;if("curve"===u)e.parentNode&&e.parentNode!==n&&(g||(g=i.__edge=new H({shape:Zv(c,d,h,o,o)})),Zi(g,{shape:Zv(c,d,h,r,a)},t));else if("polyline"===u&&"orthogonal"===c&&e!==n&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var y=e.children,m=[],v=0;v<y.length;v++){var x=y[v].getLayout();m.push([x.x,x.y])}g||(g=i.__edge=new Bv({shape:{parentPoint:[a.x,a.y],childPoints:[[a.x,a.y]],orient:d,forkPosition:p}})),Zi(g,{shape:{parentPoint:[a.x,a.y],childPoints:m}},t)}g&&("polyline"!==u||e.isExpand)&&(g.useStyle(C({strokeNoScale:!0,fill:null},f)),zi(g,l,"lineStyle"),mi(g),s.add(g))}(o,a,c,n,f,p,g,i),n.__edge&&(n.onHoverStateChange=function(e){if("blur"!==e){var i=a.parentNode&&t.getItemGraphicEl(a.parentNode.dataIndex);i&&1===i.hoverState||gi(n.__edge,e)}})}function Hv(t,e,n,i,o){var r=Yv(e.tree.root,t),a=r.source,s=r.sourceLayout,l=e.getItemGraphicEl(t.dataIndex);if(l){var u=e.getItemGraphicEl(a.dataIndex).__edge,c=l.__edge||(!1===a.isExpand||1===a.children.length?u:void 0),d=i.get("edgeShape"),h=i.get("layout"),p=i.get("orient"),f=i.get(["lineStyle","curveness"]);c&&("curve"===d?qi(c,{shape:Zv(h,p,f,s,s),style:{opacity:0}},i,{cb:function(){n.remove(c)},removeOpt:o}):"polyline"===d&&"orthogonal"===i.get("layout")&&qi(c,{shape:{parentPoint:[s.x,s.y],childPoints:[[s.x,s.y]]},style:{opacity:0}},i,{cb:function(){n.remove(c)},removeOpt:o}))}}function Yv(t,e){for(var n,i=e.parentNode===t?e:e.parentNode||e;null==(n=i.getLayout());)i=i.parentNode===t?i:i.parentNode||i;return{source:i,sourceLayout:n}}function Uv(t,e,n,i,o){var r=t.tree.getNodeByDataIndex(e),a=Yv(t.tree.root,r).sourceLayout,s={duration:o.get("animationDurationUpdate"),easing:o.get("animationEasingUpdate")};qi(n,{x:a.x+1,y:a.y+1},o,{cb:function(){i.remove(n),t.setItemGraphicEl(e,null)},removeOpt:s}),n.fadeOut(null,t.hostModel,{fadeLabel:!0,animation:s}),r.children.forEach(function(e){Hv(e,t,i,o,s)}),Hv(r,t,i,o,s)}function Zv(t,e,n,i,o){var r,a,s,l,u,c,d,h;if("radial"===t){u=i.rawX,d=i.rawY,c=o.rawX,h=o.rawY;var p=Pv(u,d),f=Pv(u,d+(h-d)*n),g=Pv(c,h+(d-h)*n),y=Pv(c,h);return{x1:p.x||0,y1:p.y||0,x2:y.x||0,y2:y.y||0,cpx1:f.x||0,cpy1:f.y||0,cpx2:g.x||0,cpy2:g.y||0}}return u=i.x,d=i.y,c=o.x,h=o.y,"LR"!==e&&"RL"!==e||(r=u+(c-u)*n,a=d,s=c+(u-c)*n,l=h),"TB"!==e&&"BT"!==e||(r=u,a=d+(h-d)*n,s=c,l=h+(d-h)*n),{x1:u,y1:d,x2:c,y2:h,cpx1:r,cpy1:a,cpx2:s,cpy2:l}}var Xv=wn();function jv(t){var e=t.mainData,n=t.datas;n||(n={main:e},t.datasAttr={main:"data"}),t.datas=t.mainData=null,tx(e,n,t),s(n,function(n){s(e.TRANSFERABLE_METHODS,function(e){n.wrapMethod(e,at(qv,t))})}),e.wrapMethod("cloneShallow",at(Jv,t)),s(e.CHANGABLE_METHODS,function(n){e.wrapMethod(n,at(Kv,t))}),i(n[e.dataType]===e)}function qv(t,e){if(Xv(i=this).mainData===i){var n=f({},Xv(this).datas);n[this.dataType]=e,tx(e,n,t)}else ex(e,this.dataType,Xv(this).mainData,t);var i;return e}function Kv(t,e){return t.struct&&t.struct.update(),e}function Jv(t,e){return s(Xv(e).datas,function(n,i){n!==e&&ex(n.cloneShallow(),i,e,t)}),e}function $v(t){var e=Xv(this).mainData;return null==t||null==e?e:Xv(e).datas[t]}function Qv(){var t=Xv(this).mainData;return null==t?[{data:t}]:n(x(Xv(t).datas),function(e){return{type:e,data:Xv(t).datas[e]}})}function tx(t,e,n){Xv(t).datas={},s(e,function(e,i){ex(e,i,t,n)})}function ex(t,e,n,i){Xv(n).datas[e]=t,Xv(t).mainData=n,t.dataType=e,i.struct&&(t[i.structAttr]=i.struct,i.struct[i.datasAttr[e]]=t),t.getLinkedData=$v,t.getLinkedDataAll=Qv}var nx=
/** @class */function(){function e(t,e){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=t||"",this.hostTree=e}return e.prototype.isRemoved=function(){return this.dataIndex<0},e.prototype.eachNode=function(e,n,i){g(e)&&(i=n,n=e,e=null),t(e=e||{})&&(e={order:e});var o,r=e.order||"preorder",a=this[e.attr||"children"];"preorder"===r&&(o=n.call(i,this));for(var s=0;!o&&s<a.length;s++)a[s].eachNode(e,n,i);"postorder"===r&&n.call(i,this)},e.prototype.updateDepthAndHeight=function(t){var e=0;this.depth=t;for(var n=0;n<this.children.length;n++){var i=this.children[n];i.updateDepthAndHeight(t+1),i.height>e&&(e=i.height)}this.height=e+1},e.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,i=n.length;e<i;e++){var o=n[e].getNodeById(t);if(o)return o}},e.prototype.contains=function(t){if(t===this)return!0;for(var e=0,n=this.children,i=n.length;e<i;e++){var o=n[e].contains(t);if(o)return o}},e.prototype.getAncestors=function(t){for(var e=[],n=t?this:this.parentNode;n;)e.push(n),n=n.parentNode;return e.reverse(),e},e.prototype.getAncestorsIndices=function(){for(var t=[],e=this;e;)t.push(e.dataIndex),e=e.parentNode;return t.reverse(),t},e.prototype.getDescendantIndices=function(){var t=[];return this.eachNode(function(e){t.push(e.dataIndex)}),t},e.prototype.getValue=function(t){var e=this.hostTree.data;return e.getStore().get(e.getDimensionIndex(t||"value"),this.dataIndex)},e.prototype.setLayout=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},e.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},e.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(t)},e.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},e.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},e.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},e.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},e.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},e.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,e=0;e<t.length;++e)if(t[e]===this)return e;return-1}return-1},e.prototype.isAncestorOf=function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},e.prototype.isDescendantOf=function(t){return t!==this&&t.isAncestorOf(this)},e}(),ix=
/** @class */function(){function t(t){this.type="tree",this._nodes=[],this.hostModel=t}return t.prototype.eachNode=function(t,e,n){this.root.eachNode(t,e,n)},t.prototype.getNodeByDataIndex=function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},t.prototype.getNodeById=function(t){return this.root.getNodeById(t)},t.prototype.update=function(){for(var t=this.data,e=this._nodes,n=0,i=e.length;n<i;n++)e[n].dataIndex=-1;for(n=0,i=t.count();n<i;n++)e[t.getRawIndex(n)].dataIndex=n},t.prototype.clearLayouts=function(){this.data.clearItemLayouts()},t.createTree=function(e,n,i){var r=new t(n),a=[],s=1;!function t(e,n){var i=e.value;s=Math.max(s,o(i)?i.length:1),a.push(e);var l=new nx(xn(e.name,""),r);n?function(t,e){var n=e.children;if(t.parentNode===e)return;n.push(t),t.parentNode=e}(l,n):r.root=l,r._nodes.push(l);var u=e.children;if(u)for(var c=0;c<u.length;c++)t(u[c],l)}(e),r.root.updateDepthAndHeight(0);var l=nh(a,{coordDimensions:["value"],dimensionsCount:s}).dimensions,u=new eh(l,n);return u.initData(a),i&&i(u),jv({mainData:u,struct:r,structAttr:"tree"}),r.update(),r},t}();function ox(e,n,i){if(e&&l(n,e.type)>=0){var o=i.getData().tree.root,r=e.targetNode;if(t(r)&&(r=o.getNodeById(r)),r&&o.contains(r))return{node:r};var a=e.targetNodeId;if(null!=a&&(r=o.getNodeById(a)))return{node:r}}}function rx(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function ax(t,e){var n=rx(t);return l(n,e)>=0}function sx(t,e){for(var n=[];t;){var i=t.dataIndex;n.push({name:t.name,dataIndex:i,value:e.getRawValue(i)}),t=t.parentNode}return n.reverse(),n}var lx=
/** @class */function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return h(e,t),e.prototype.getInitialData=function(t){var e={name:t.name,children:t.data},n=t.leaves||{},i=new tr(n,this,this.ecModel),o=ix.createTree(e,this,function(t){t.wrapMethod("getItemModel",function(t,e){var n=o.getNodeByDataIndex(e);return n&&n.children.length&&n.isExpand||(t.parentModel=i),t})});var r=0;o.eachNode("preorder",function(t){t.depth>r&&(r=t.depth)});var a=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:r;return o.root.eachNode("preorder",function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=a}),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,e,n){for(var i=this.getData().tree,o=i.root.children[0],r=i.getNodeByDataIndex(t),a=r.getValue(),s=r.name;r&&r!==o;)s=r.parentNode.name+"."+s,r=r.parentNode;return Pl("nameValue",{name:s,value:a,noValue:isNaN(a)||null==a})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=sx(i,this),n.collapsed=!i.isExpand,n},e.type="series.tree",e.layoutMode="box",e.defaultOption={
// zlevel: 0,
z:2,coordinateSystem:"view",
// the position of the whole view
left:"12%",top:"12%",right:"12%",bottom:"12%",
// the layout of the tree, two value can be selected, 'orthogonal' or 'radial'
layout:"orthogonal",
// value can be 'polyline'
edgeShape:"curve",edgeForkPosition:"50%",
// true | false | 'move' | 'scale', see module:component/helper/RoamController.
roam:!1,
// Symbol size scale ratio in roam
nodeScaleRatio:.4,
// Default on center of graph
center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",
// borderColor: '#c23531',
borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(jl);function ux(t,e){for(var n,i=[t];n=i.pop();)if(e(n),n.isExpand){var o=n.children;if(o.length)for(var r=o.length-1;r>=0;r--)i.push(o[r])}}function cx(t,e){t.eachSeriesByType("tree",function(t){!function(t,e){var n=function(t,e){return na(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=n;var i=t.get("layout"),o=0,r=0,a=null;"radial"===i?(o=2*Math.PI,r=Math.min(n.height,n.width)/2,a=kv(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})):(o=n.width,r=n.height,a=kv());var s=t.getData().tree.root,l=s.children[0];if(l){!function(t){var e=t;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var n,i,o=[e];n=o.pop();)if(i=n.children,n.isExpand&&i.length)for(var r=i.length-1;r>=0;r--){var a=i[r];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:r,thread:null},o.push(a)}}(s),function(t,e,n){for(var i,o=[t],r=[];i=o.pop();)if(r.push(i),i.isExpand){var a=i.children;if(a.length)for(var s=0;s<a.length;s++)o.push(a[s])}for(;i=r.pop();)e(i,n)}(l,Av,a),s.hierNode.modifier=-l.hierNode.prelim,ux(l,Lv);var u=l,c=l,d=l;ux(l,function(t){var e=t.getLayout().x;e<u.getLayout().x&&(u=t),e>c.getLayout().x&&(c=t),t.depth>d.depth&&(d=t)});var h=u===c?1:a(u,c)/2,p=h-u.getLayout().x,f=0,g=0,y=0,m=0;if("radial"===i)f=o/(c.getLayout().x+h+p),g=r/(d.depth-1||1),ux(l,function(t){y=(t.getLayout().x+p)*f,m=(t.depth-1)*g;var e=Pv(y,m);t.setLayout({x:e.x,y:e.y,rawX:y,rawY:m},!0)});else{var v=t.getOrient();"RL"===v||"LR"===v?(g=r/(c.getLayout().x+h+p),f=o/(d.depth-1||1),ux(l,function(t){m=(t.getLayout().x+p)*g,y="LR"===v?(t.depth-1)*f:o-(t.depth-1)*f,t.setLayout({x:y,y:m},!0)})):"TB"!==v&&"BT"!==v||(f=o/(c.getLayout().x+h+p),g=r/(d.depth-1||1),ux(l,function(t){y=(t.getLayout().x+p)*f,m="TB"===v?(t.depth-1)*g:r-(t.depth-1)*g,t.setLayout({x:y,y:m},!0)}))}}}(t,e)})}function dx(t){t.eachSeriesByType("tree",function(t){var e=t.getData();e.tree.eachNode(function(t){var n=t.getModel().getModel("itemStyle").getItemStyle(),i=e.ensureUniqueItemVisual(t.dataIndex,"style");f(i,n)})})}var hx=["treemapZoomToNode","treemapRender","treemapMove"];function px(t){var e=t.getData().tree,n={};e.eachNode(function(e){for(var i=e;i&&i.depth>1;)i=i.parentNode;var o=za(t.ecModel,i.name||i.dataIndex+"",n);e.setVisual("decal",o)})}var fx=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.preventUsingHoverLayer=!0,n}return h(e,t),e.prototype.getInitialData=function(t,e){var i={name:t.name,children:t.data};gx(i);var o=t.levels||[],r=this.designatedVisualItemStyle={},a=new tr({itemStyle:r},this,e);o=t.levels=function(t,e){var n,i,o=dn(e.get("color")),r=dn(e.get(["aria","decal","decals"]));if(!o)return;t=t||[],s(t,function(t){var e=new tr(t),o=e.get("color"),r=e.get("decal");(e.get(["itemStyle","color"])||o&&"none"!==o)&&(n=!0),(e.get(["itemStyle","decal"])||r&&"none"!==r)&&(i=!0)});var a=t[0]||(t[0]={});n||(a.color=o.slice());!i&&r&&(a.decal=r.slice());return t}(o,e);var l=n(o||[],function(t){return new tr(t,a,e)},this),u=ix.createTree(i,this,function(t){t.wrapMethod("getItemModel",function(t,e){var n=u.getNodeByDataIndex(e),i=n?l[n.depth]:null;return t.parentModel=i||a,t})});return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,e,n){var i=this.getData(),o=this.getRawValue(t);return Pl("nameValue",{name:i.getName(t),value:o})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=sx(i,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},f(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=a(),this._idIndexMapCount=0);var n=e.get(t);return null==n&&e.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){px(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={
// Disable progressive rendering
progressive:0,
// size: ['80%', '80%'], // deprecated, compatible with ec2.
left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",
// to align specialized icon. ▷▶❒❐▼✚
zoomToNodeRatio:.1024,scaleLimit:null,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",
// right
// bottom
emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,
// Do not use textDistance, for ellipsis rect just the same as treemap node rect.
distance:0,padding:5,position:"inside",
// formatter: null,
color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,
// formatter: null,
// color: '#fff',
overflow:"truncate",
// align: null,
verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],
// level[n].color (if necessary).
// + Specify color list of each level. level[0].color would be global
// color list if not specified. (see method `setDefault`).
// + But set as a empty array to forbid fetch color from global palette
// when using nodeModel.get('color'), otherwise nodes on deep level
// will always has color palette set and are not able to inherit color
// from parent node.
// + TreemapSeries.color can not be set as 'none', otherwise effect
// legend color fetching (see seriesColor.js).
colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,
// be rendered. Only works when sort is 'asc' or 'desc'.
childrenVisibleMin:null,
// grandchildren will not show.
// Why grandchildren? If not grandchildren but children,
// some siblings show children and some not,
// the appearance may be mess and not consistent,
levels:[]},e}(jl);function gx(t){var e=0;s(t.children,function(t){gx(t);var n=t.value;o(n)&&(n=n[0]),e+=n});var n=t.value;o(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),o(t.value)?t.value[0]=n:t.value=n}var yx=
/** @class */function(){function t(t){this.group=new X,t.add(this.group)}return t.prototype.render=function(t,e,n,i){var o=t.getModel("breadcrumb"),r=this.group;if(r.removeAll(),o.get("show")&&n){var a=o.getModel("itemStyle"),s=o.getModel("emphasis"),l=a.getModel("textStyle"),u=s.getModel(["itemStyle","textStyle"]),c={pos:{left:o.get("left"),right:o.get("right"),top:o.get("top"),bottom:o.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:o.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,c,l),this._renderContent(t,c,a,s,l,u,i),ia(r,c.pos,c.box)}},t.prototype._prepare=function(t,e,n){for(var i=t;i;i=i.parentNode){var o=xn(i.getModel().get("name"),""),r=n.getTextRect(o),a=Math.max(r.width+16,e.emptyItemWidth);e.totalWidth+=a+8,e.renderList.push({node:i,text:o,width:a})}},t.prototype._renderContent=function(t,e,n,i,o,r,a){for(var s,l,u,c,d,h,p,f,g,y=0,m=e.emptyItemWidth,v=t.get(["breadcrumb","height"]),x=(s=e.pos,l=e.box,c=l.width,d=l.height,h=Ge(s.left,c),p=Ge(s.top,d),f=Ge(s.right,c),g=Ge(s.bottom,d),(isNaN(h)||isNaN(parseFloat(s.left)))&&(h=0),(isNaN(f)||isNaN(parseFloat(s.right)))&&(f=c),(isNaN(p)||isNaN(parseFloat(s.top)))&&(p=0),(isNaN(g)||isNaN(parseFloat(s.bottom)))&&(g=d),u=Yr(u||0),{width:Math.max(f-h-u[1]-u[3],0),height:Math.max(g-p-u[0]-u[2],0)}),_=e.totalWidth,b=e.renderList,S=i.getModel("itemStyle").getItemStyle(),w=b.length-1;w>=0;w--){var M=b[w],I=M.node,D=M.width,T=M.text;_>x.width&&(_-=D-m,D=m,T=null);var A=new B({shape:{points:mx(y,0,D,v,w===b.length-1,0===w)},style:C(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new Q({style:Po(o,{text:T})}),textConfig:{position:"inside"},z2:1e5,onclick:at(a,I)});A.disableLabelAnimation=!0,A.getTextContent().ensureState("emphasis").style=Po(r,{text:T}),A.ensureState("emphasis").style=S,Oi(A,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(A),vx(A,t,I),y+=D+8}},t.prototype.remove=function(){this.group.removeAll()},t}();function mx(t,e,n,i,o,r){var a=[[o?t:t-5,e],[t+n,e],[t+n,e+i],[o?t:t-5,e+i]];return!r&&a.splice(2,0,[t+n+5,e+i/2]),!o&&a.push([t,e+i/2]),a}function vx(t,e,n){Un(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&sx(n,e)}}var xx=
/** @class */function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(t,e,n,i,o){return!this._elExistsMap[t.id]&&(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:n,delay:i,easing:o}),!0)},t.prototype.finished=function(t){return this._finishedCallback=t,this},t.prototype.start=function(){for(var t=this,e=this._storage.length,n=function(){--e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},i=0,o=this._storage.length;i<o;i++){var r=this._storage[i];r.el.animateTo(r.target,{duration:r.duration,delay:r.delay,easing:r.easing,setToFinal:!0,done:n,aborted:n})}return this},t}();var _x=X,bx=F,Sx="label",wx="upperLabel",Mx=Wn([["fill","color"],
// `borderColor` and `borderWidth` has been occupied,
// so use `stroke` to indicate the stroke of the rect.
["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Ix=function(t){var e=Mx(t);return e.stroke=e.fill=e.lineWidth=null,e},Dx=wn(),Tx=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._state="ready",n._storage={nodeGroup:[],background:[],content:[]},n}return h(e,t),e.prototype.render=function(t,e,n,i){var o=e.findComponents({mainType:"series",subType:"treemap",query:i});if(!(l(o,t)<0)){this.seriesModel=t,this.api=n,this.ecModel=e;var r=ox(i,["treemapZoomToNode","treemapRootToNode"],t),a=i&&i.type,s=t.layoutInfo,u=!this._oldTree,c=this._storage,d="treemapRootToNode"===a&&r&&c?{rootNodeGroup:c.nodeGroup[r.node.getRawIndex()],direction:i.direction}:null,h=this._giveContainerGroup(s),p=t.get("animation"),f=this._doRender(h,t,d);!p||u||a&&"treemapZoomToNode"!==a&&"treemapRootToNode"!==a?f.renderFinally():this._doAnimation(h,f,t,d),this._resetController(n),this._renderBreadcrumb(t,n,r)}},e.prototype._giveContainerGroup=function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new _x,this._initEvents(e),this.group.add(e)),e.x=t.x,e.y=t.y,e},e.prototype._doRender=function(t,e,n){var i=e.getData().tree,o=this._oldTree,r={nodeGroup:[],background:[],content:[]},a={nodeGroup:[],background:[],content:[]},l=this._storage,u=[];function c(t,i,o,s){return function(t,e,n,i,o,r,a,s,l,u){if(!a)return;var c=a.getLayout(),d=t.getData(),h=a.getModel();if(d.setItemGraphicEl(a.dataIndex,null),!c||!c.isInView)return;var p=c.width,g=c.height,y=c.borderWidth,m=c.invisible,v=a.getRawIndex(),x=s&&s.getRawIndex(),_=a.viewChildren,b=c.upperHeight,S=_&&_.length,w=h.getModel("itemStyle"),M=h.getModel(["emphasis","itemStyle"]),I=h.getModel(["blur","itemStyle"]),D=h.getModel(["select","itemStyle"]),T=w.get("borderRadius")||0,C=W("nodeGroup",_x);if(!C)return;if(l.add(C),C.x=c.x||0,C.y=c.y||0,C.markRedraw(),Dx(C).nodeWidth=p,Dx(C).nodeHeight=g,c.isAboveViewRoot)return C;var A=W("background",bx,u,20);A&&V(C,A,S&&c.upperLabelHeight);var L=h.getModel("emphasis"),k=L.get("focus"),P=L.get("blurScope"),N=L.get("disabled"),O="ancestor"===k?a.getAncestorsIndices():"descendant"===k?a.getDescendantIndices():k;if(S)Gi(C)&&Bi(C,!1),A&&(Bi(A,!N),d.setItemGraphicEl(a.dataIndex,A),Ri(A,O,P));else{var R=W("content",bx,u,30);R&&z(C,R),A.disableMorphing=!0,A&&Gi(A)&&Bi(A,!1),Bi(C,!N),d.setItemGraphicEl(a.dataIndex,C);var E=h.getShallow("cursor");E&&R.attr("cursor",E),Ri(C,O,P)}return C;function V(e,n,i){var o=Un(n);if(o.dataIndex=a.dataIndex,o.seriesIndex=t.seriesIndex,n.setShape({x:0,y:0,width:p,height:g,r:T}),m)B(n);else{n.invisible=!1;var r=a.getVisual("style"),s=r.stroke,l=Ix(w);l.fill=s;var u=Mx(M);u.fill=M.get("borderColor");var c=Mx(I);c.fill=I.get("borderColor");var d=Mx(D);if(d.fill=D.get("borderColor"),i){var h=p-2*y;G(
// PENDING: convert ZRColor to ColorString for text.
n,s,r.opacity,{x:y,y:0,width:h,height:b})}else n.removeTextContent();n.setStyle(l),n.ensureState("emphasis").style=u,n.ensureState("blur").style=c,n.ensureState("select").style=d,mi(n)}e.add(n)}function z(e,n){var i=Un(n);i.dataIndex=a.dataIndex,i.seriesIndex=t.seriesIndex;var o=Math.max(p-2*y,0),r=Math.max(g-2*y,0);if(n.culling=!0,n.setShape({x:y,y:y,width:o,height:r,r:T}),m)B(n);else{n.invisible=!1;var s=a.getVisual("style"),l=s.fill,u=Ix(w);u.fill=l,u.decal=s.decal;var c=Mx(M),d=Mx(I),h=Mx(D);G(n,l,s.opacity,null),n.setStyle(u),n.ensureState("emphasis").style=c,n.ensureState("blur").style=d,n.ensureState("select").style=h,mi(n)}e.add(n)}function B(t){!t.invisible&&r.push(t)}function G(e,n,i,o){var r=h.getModel(o?wx:Sx),s=xn(h.get("name"),null),l=r.getShallow("show");Lo(e,ko(h,o?wx:Sx),{defaultText:l?s:null,inheritColor:n,defaultOpacity:i,labelFetcher:t,labelDataIndex:a.dataIndex});var u=e.getTextContent();if(u){var d=u.style,p=ot(d.padding||0);o&&(e.setTextConfig({layoutRect:o}),u.disableLabelLayout=!0),u.beforeUpdate=function(){var t=Math.max((o?o.width:e.shape.width)-p[1]-p[3],0),n=Math.max((o?o.height:e.shape.height)-p[0]-p[2],0);d.width===t&&d.height===n||u.setStyle({width:t,height:n})},d.truncateMinChar=2,d.lineOverflow="truncate",F(d,o,c);var f=u.getState("emphasis");F(f?f.style:null,o,c)}}function F(e,n,i){var o=e?e.text:null;if(!n&&i.isLeafRoot&&null!=o){var r=t.get("drillDownIcon",!0);e.text=r?r+" "+o:o}}function W(t,i,r,a){var s=null!=x&&n[t][x],l=o[t];return s?(n[t][x]=null,H(l,s)):m||((s=new i)instanceof qt&&(s.z2=function(t,e){return 100*t+e}(r,a)),Y(l,s)),e[t][v]=s}function H(t,e){var n=t[v]={};e instanceof _x?(n.oldX=e.x,n.oldY=e.y):n.oldShape=f({},e.shape)}function Y(t,e){var n=t[v]={},r=a.parentNode,s=e instanceof X;if(r&&(!i||"drillDown"===i.direction)){var l=0,u=0,c=o.background[r.getRawIndex()];!i&&c&&c.oldShape&&(l=c.oldShape.width,u=c.oldShape.height),s?(n.oldX=0,n.oldY=u):n.oldShape={x:l,y:u,width:0,height:0}}n.fadein=!s}}(e,a,l,n,r,u,t,i,o,s)}!function t(e,n,i,o,r){o?(n=e,s(e,function(t,e){!t.isRemoved()&&l(e,e)})):new kd(n,e,a,a).add(l).update(l).remove(at(l,null)).execute();function a(t){return t.getId()}function l(a,s){var l=null!=a?e[a]:null,u=null!=s?n[s]:null,d=c(l,u,i,r);d&&t(l&&l.viewChildren||[],u&&u.viewChildren||[],d,o,r+1)}}(i.root?[i.root]:[],o&&o.root?[o.root]:[],t,i===o||!o,0);var d,h,p=(h={nodeGroup:[],background:[],content:[]},(d=l)&&s(d,function(t,e){var n=h[e];s(t,function(t){t&&(n.push(t),Dx(t).willDelete=!0)})}),h);if(this._oldTree=i,this._storage=a,this._controllerHost){var g=this.seriesModel.layoutInfo,y=i.root.getLayout();y.width===g.width&&y.height===g.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:r,willDeleteEls:p,renderFinally:function(){s(p,function(t){s(t,function(t){t.parent&&t.parent.remove(t)})}),s(u,function(t){t.invisible=!0,t.dirty()})}}},e.prototype._doAnimation=function(t,e,n,i){var o=n.get("animationDurationUpdate"),r=n.get("animationEasing"),a=(g(o)?0:o)||0,l=(g(r)?null:r)||"cubicOut",u=new xx;s(e.willDeleteEls,function(t,e){s(t,function(t,n){if(!t.invisible){var o,r=t.parent,s=Dx(r);if(i&&"drillDown"===i.direction)o=r===i.rootNodeGroup?{shape:{x:0,y:0,width:s.nodeWidth,height:s.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var c=0,d=0;s.willDelete||(c=s.nodeWidth/2,d=s.nodeHeight/2),o="nodeGroup"===e?{x:c,y:d,style:{opacity:0}}:{shape:{x:c,y:d,width:0,height:0},style:{opacity:0}}}o&&u.add(t,o,a,0,l)}})}),s(this._storage,function(t,n){s(t,function(t,i){var o=e.lastsForAnimation[n][i],r={};o&&(t instanceof X?null!=o.oldX&&(r.x=t.x,r.y=t.y,t.x=o.oldX,t.y=o.oldY):(o.oldShape&&(r.shape=f({},t.shape),t.setShape(o.oldShape)),o.fadein?(t.setStyle("opacity",0),r.style={opacity:1}):1!==t.style.opacity&&(r.style={opacity:1})),u.add(t,r,a,0,l))})},this),this._state="animating",u.finished(ut(function(){this._state="ready",e.renderFinally()},this)).start()},e.prototype._resetController=function(t){var e=this._controller,n=this._controllerHost;n||(this._controllerHost={target:this.group},n=this._controllerHost),e||((e=this._controller=new Im(t.getZr())).enable(this.seriesModel.get("roam")),n.zoomLimit=this.seriesModel.get("scaleLimit"),n.zoom=this.seriesModel.get("zoom"),e.on("pan",ut(this._onPan,this)),e.on("zoom",ut(this._onZoom,this)));var i=new U(0,0,t.getWidth(),t.getHeight());e.setPointerChecker(function(t,e,n){return i.contain(e,n)})},e.prototype._clearController=function(){var t=this._controller;this._controllerHost=null,t&&(t.dispose(),t=null)},e.prototype._onPan=function(t){if("animating"!==this._state&&(Math.abs(t.dx)>3||Math.abs(t.dy)>3)){var e=this.seriesModel.getData().tree.root;if(!e)return;var n=e.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(t){var e=t.originX,n=t.originY,i=t.scale;if("animating"!==this._state){var o=this.seriesModel.getData().tree.root;if(!o)return;var r=o.getLayout();if(!r)return;var a,s=new U(r.x,r.y,r.width,r.height),l=this._controllerHost;a=l.zoomLimit;var u=l.zoom=l.zoom||1;if(u*=i,a){var c=a.min||0,d=a.max||Infinity;u=Math.max(Math.min(d,u),c)}var h=u/l.zoom;l.zoom=u;var p=this.seriesModel.layoutInfo;e-=p.x,n-=p.y;var f=Jt();ee(f,f,[-e,-n]),ne(f,f,[h,h]),ee(f,f,[e,n]),s.applyTransform(f),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},e.prototype._initEvents=function(t){var e=this;t.on("click",function(t){if("ready"===e._state){var n=e.seriesModel.get("nodeClick",!0);if(n){var i=e.findTarget(t.offsetX,t.offsetY);if(i){var o=i.node;if(o.getLayout().isLeafRoot)e._rootToNode(i);else if("zoomToNode"===n)e._zoomToNode(i);else if("link"===n){var r=o.hostTree.data.getItemModel(o.dataIndex),a=r.get("link",!0),s=r.get("target",!0)||"blank";a&&Kr(a,s)}}}}},this)},e.prototype._renderBreadcrumb=function(t,e,n){var i=this;n||(n=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(n={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new yx(this.group))).render(t,e,n.node,function(e){"animating"!==i._state&&(ax(t.getViewRoot(),e)?i._rootToNode({node:e}):i._zoomToNode({node:e}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,e){var n;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},function(i){var o=this._storage.background[i.getRawIndex()];if(o){var r=o.transformCoordToLocal(t,e),a=o.shape;if(!(a.x<=r[0]&&r[0]<=a.x+a.width&&a.y<=r[1]&&r[1]<=a.y+a.height))return!1;n={node:i,offsetX:r[0],offsetY:r[1]}}},this),n},e.type="treemap",e}(au);var Cx=s,Ax=r,Lx=-1,kx=
/** @class */function(){function e(t){var n=t.mappingMethod,a=t.type,l=this.option=nt(t);this.type=a,this.mappingMethod=n,this._normalizeData=Fx[n];var u=e.visualHandlers[a];this.applyVisual=u.applyVisual,this.getColorMapper=u.getColorMapper,this._normalizedToVisual=u._normalizedToVisual[n],"piecewise"===n?(Px(l),function(t){var e=t.pieceList;t.hasSpecialVisual=!1,s(e,function(e,n){e.originIndex=n,null!=e.visual&&(t.hasSpecialVisual=!0)})}(l)):"category"===n?l.categories?function(t){var e=t.categories,n=t.categoryMap={},i=t.visual;if(Cx(e,function(t,e){n[t]=e}),!o(i)){var a=[];r(i)?Cx(i,function(t,e){var i=n[e];a[null!=i?i:Lx]=t}):a[-1]=i,i=Gx(t,a)}for(var s=e.length-1;s>=0;s--)null==i[s]&&(delete n[e[s]],e.pop())}(l):Px(l,!0):(i("linear"!==n||l.dataExtent),Px(l))}return e.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},e.prototype.getNormalizer=function(){return ut(this._normalizeData,this)},e.listVisualTypes=function(){return x(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(t,e,n){r(t)?s(t,e,n):e.call(n,t)},e.mapVisual=function(t,n,i){var a,s=o(t)?[]:r(t)?{}:(a=!0,null);return e.eachVisual(t,function(t,e){var o=n.call(i,t,e);a?s=o:s[e]=o}),s},e.retrieveVisuals=function(t){var n,i={};return t&&Cx(e.visualHandlers,function(e,o){t.hasOwnProperty(o)&&(i[o]=t[o],n=!0)}),n?i:null},e.prepareVisualTypes=function(t){if(o(t))t=t.slice();else{if(!Ax(t))return[];var e=[];Cx(t,function(t,n){e.push(n)}),t=e}return t.sort(function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1}),t},e.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},e.findPieceIndex=function(e,n,i){for(var o,r=Infinity,a=0,s=n.length;a<s;a++){var l=n[a].value;if(null!=l){if(l===e||t(l)&&l===e+"")return a;i&&h(l,a)}}for(a=0,s=n.length;a<s;a++){var u=n[a],c=u.interval,d=u.close;if(c){if(-Infinity===c[0]){if(Wx(d[1],e,c[1]))return a}else if(Infinity===c[1]){if(Wx(d[0],c[0],e))return a}else if(Wx(d[0],c[0],e)&&Wx(d[1],e,c[1]))return a;i&&h(c[0],a),i&&h(c[1],a)}}if(i)return Infinity===e?n.length-1:-Infinity===e?0:o;function h(t,n){var i=Math.abs(t-e);i<r&&(r=i,o=n)}},e.visualHandlers={color:{applyVisual:Rx("color"),getColorMapper:function(){var t=this.option;return ut("category"===t.mappingMethod?function(t,e){return!e&&(t=this._normalizeData(t)),Ex.call(this,t)}:function(e,n,i){var o=!!i;return!n&&(e=this._normalizeData(e)),i=re(e,t.parsedVisual,i),o?i:oe(i,"rgba")},this)},_normalizedToVisual:{linear:function(t){return oe(re(t,this.option.parsedVisual),"rgba")},category:Ex,piecewise:function(t,e){var n=Bx.call(this,e);return null==n&&(n=oe(re(t,this.option.parsedVisual),"rgba")),n},fixed:Vx}},colorHue:Nx(function(t,e){return se(t,e)}),colorSaturation:Nx(function(t,e){return se(t,null,e)}),colorLightness:Nx(function(t,e){return se(t,null,null,e)}),colorAlpha:Nx(function(t,e){return ae(t,e)}),decal:{applyVisual:Rx("decal"),_normalizedToVisual:{linear:null,category:Ex,piecewise:null,fixed:null}},opacity:{applyVisual:Rx("opacity"),_normalizedToVisual:zx([0,1])},liftZ:{applyVisual:Rx("liftZ"),_normalizedToVisual:{linear:Vx,category:Vx,piecewise:Vx,fixed:Vx}},symbol:{applyVisual:function(t,e,n){n("symbol",this.mapValueToVisual(t))},_normalizedToVisual:{linear:Ox,category:Ex,piecewise:function(t,e){var n=Bx.call(this,e);return null==n&&(n=Ox.call(this,t)),n},fixed:Vx}},symbolSize:{applyVisual:Rx("symbolSize"),_normalizedToVisual:zx([0,1])}},e}();function Px(t,e){var n=t.visual,i=[];r(n)?Cx(n,function(t){i.push(t)}):null!=n&&i.push(n);e||1!==i.length||{color:1,symbol:1}.hasOwnProperty(t.type)||(i[1]=i[0]),Gx(t,i)}function Nx(t){return{applyVisual:function(e,n,i){var o=this.mapValueToVisual(e);i("color",t(n("color"),o))},_normalizedToVisual:zx([0,1])}}function Ox(t){var e=this.option.visual;return e[Math.round(Be(t,[0,1],[0,e.length-1],!0))]||{}}function Rx(t){return function(e,n,i){i(t,this.mapValueToVisual(e))}}function Ex(t){var e=this.option.visual;return e[this.option.loop&&t!==Lx?t%e.length:t]}function Vx(){return this.option.visual[0]}function zx(t){return{linear:function(e){return Be(e,t,this.option.visual,!0)},category:Ex,piecewise:function(e,n){var i=Bx.call(this,n);return null==i&&(i=Be(e,t,this.option.visual,!0)),i},fixed:Vx}}function Bx(t){var e=this.option,n=e.pieceList;if(e.hasSpecialVisual){var i=n[kx.findPieceIndex(t,n)];if(i&&i.visual)return i.visual[this.type]}}function Gx(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=n(e,function(t){return ie(t)||[0,0,0,1]})),e}var Fx={linear:function(t){return Be(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,n=kx.findPieceIndex(t,e,!0);if(null!=n)return Be(n,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return null==e?Lx:e},fixed:ht};function Wx(t,e,n){return t?e<=n:e<n}var Hx=wn();const Yx={seriesType:"treemap",reset:function(t){var e=t.getData().tree.root;e.isRemoved()||Ux(e,
// Visual should calculate from tree root but not view root.
{},t.getViewRoot().getAncestors(),t)}};function Ux(t,e,n,i){var o=t.getModel(),r=t.getLayout(),a=t.hostTree.data;if(r&&!r.invisible&&r.isInView){var l,u=o.getModel("itemStyle"),c=function(t,e,n){var i=f({},e),o=n.designatedVisualItemStyle;return s(["color","colorAlpha","colorSaturation"],function(n){o[n]=e[n];var r=t.get(n);o[n]=null,null!=r&&(i[n]=r)}),i}(u,e,i),d=a.ensureUniqueItemVisual(t.dataIndex,"style"),h=u.get("borderColor"),p=u.get("borderColorSaturation");null!=p&&(h=function(t,e){return null!=e?se(e,null,null,t):null}(p,l=Zx(c))),d.stroke=h;var g=t.viewChildren;if(g&&g.length){var y=function(t,e,n,i,o,r){if(!r||!r.length)return;var a=jx(e,"color")||null!=o.color&&"none"!==o.color&&(jx(e,"colorAlpha")||jx(e,"colorSaturation"));if(!a)return;var s=e.get("visualMin"),l=e.get("visualMax"),u=n.dataExtent.slice();null!=s&&s<u[0]&&(u[0]=s),null!=l&&l>u[1]&&(u[1]=l);var c=e.get("colorMappingBy"),d={type:a.name,dataExtent:u,visual:a.range};"color"!==d.type||"index"!==c&&"id"!==c?d.mappingMethod="linear":(d.mappingMethod="category",d.loop=!0);var h=new kx(d);return Hx(h).drColorMappingBy=c,h}(0,o,r,0,c,g);s(g,function(t,e){if(t.depth>=n.length||t===n[t.depth]){var r=function(t,e,n,i,o,r){var a=f({},e);if(o){var s=o.type,l="color"===s&&Hx(o).drColorMappingBy,u="index"===l?i:"id"===l?r.mapIdToIndex(n.getId()):n.getValue(t.get("visualDimension"));a[s]=o.mapValueToVisual(u)}return a}(o,c,t,e,y,i);Ux(t,r,n,i)}})}else l=Zx(c),d.fill=l}}function Zx(t){var e=Xx(t,"color");if(e){var n=Xx(t,"colorAlpha"),i=Xx(t,"colorSaturation");return i&&(e=se(e,null,null,i)),n&&(e=ae(e,n)),e}}function Xx(t,e){var n=t[e];if(null!=n&&"none"!==n)return n}function jx(t,e){var n=t.get(e);return o(n)&&n.length?{name:e,range:n}:null}var qx=Math.max,Kx=Math.min,Jx=Ft,$x=s,Qx=["itemStyle","borderWidth"],t_=["itemStyle","gapWidth"],e_=["upperLabel","show"],n_=["upperLabel","height"];const i_={seriesType:"treemap",reset:function(t,e,n,i){var o=n.getWidth(),r=n.getHeight(),a=t.option,s=na(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),l=a.size||[],u=Ge(Jx(s.width,l[0]),o),c=Ge(Jx(s.height,l[1]),r),d=i&&i.type,h=ox(i,["treemapZoomToNode","treemapRootToNode"],t),p="treemapRender"===d||"treemapMove"===d?i.rootRect:null,g=t.getViewRoot(),y=rx(g);if("treemapMove"!==d){var m="treemapZoomToNode"===d?function(t,e,n,i,o){var r,a=(e||{}).node,s=[i,o];if(!a||a===n)return s;var l=i*o,u=l*t.option.zoomToNodeRatio;for(;r=a.parentNode;){for(var c=0,d=r.children,h=0,p=d.length;h<p;h++)c+=d[h].getValue();var f=a.getValue();if(0===f)return s;u*=c/f;var g=r.getModel(),y=g.get(Qx);(u+=4*y*y+(3*y+Math.max(y,l_(g)))*Math.pow(u,.5))>Ze&&(u=Ze),a=r}u<l&&(u=l);var m=Math.pow(u/l,.5);return[i*m,o*m]}(t,h,g,u,c):p?[p.width,p.height]:[u,c],v=a.sort;v&&"asc"!==v&&"desc"!==v&&(v="desc");var x={squareRatio:a.squareRatio,sort:v,leafDepth:a.leafDepth};g.hostTree.clearLayouts();var _={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};g.setLayout(_),o_(g,x,!1,0),_=g.getLayout(),$x(y,function(t,e){var n=(y[e+1]||g).getValue();t.setLayout(f({dataExtent:[n,n],borderWidth:0,upperHeight:0},_))})}var b=t.getData().tree.root;b.setLayout(function(t,e,n){if(e)return{x:e.x,y:e.y};var i={x:0,y:0};if(!n)return i;var o=n.node,r=o.getLayout();if(!r)return i;var a=[r.width/2,r.height/2],s=o;for(;s;){var l=s.getLayout();a[0]+=l.x,a[1]+=l.y,s=s.parentNode}return{x:t.width/2-a[0],y:t.height/2-a[1]}}(s,p,h),!0),t.setLayoutInfo(s),s_(b,
// Transform to base element coordinate system.
new U(-s.x,-s.y,o,r),y,g,0)}};function o_(t,e,n,i){var o,r;if(!t.isRemoved()){var a=t.getLayout();o=a.width,r=a.height;var s=t.getModel(),l=s.get(Qx),u=s.get(t_)/2,c=l_(s),d=Math.max(l,c),h=l-u,p=d-u;t.setLayout({borderWidth:l,upperHeight:d,upperLabelHeight:c},!0);var f=(o=qx(o-2*h,0))*(r=qx(r-h-p,0)),g=function(t,e,n,i,o,r){var a=t.children||[],s=i.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=i.leafDepth&&i.leafDepth<=r;if(o&&!l)return t.viewChildren=[];a=lt(a,function(t){return!t.isRemoved()}),function(t,e){e&&t.sort(function(t,n){var i="asc"===e?t.getValue()-n.getValue():n.getValue()-t.getValue();return 0===i?"asc"===e?t.dataIndex-n.dataIndex:n.dataIndex-t.dataIndex:i})}(a,s);var u=function(t,e,n){for(var i=0,o=0,r=e.length;o<r;o++)i+=e[o].getValue();var a,s=t.get("visualDimension");e&&e.length?"value"===s&&n?(a=[e[e.length-1].getValue(),e[0].getValue()],"asc"===n&&a.reverse()):(a=[Infinity,-Infinity],$x(e,function(t){var e=t.getValue(s);e<a[0]&&(a[0]=e),e>a[1]&&(a[1]=e)})):a=[NaN,NaN];return{sum:i,dataExtent:a}}(e,a,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,n,i,o){if(!i)return n;for(var r=t.get("visibleMin"),a=o.length,s=a,l=a-1;l>=0;l--){var u=o["asc"===i?a-l-1:l].getValue();u/n*e<r&&(s=l,n-=u)}return"asc"===i?o.splice(0,a-s):o.splice(s,a-s),n}(e,n,u.sum,s,a),0===u.sum)return t.viewChildren=[];for(var c=0,d=a.length;c<d;c++){var h=a[c].getValue()/u.sum*n;a[c].setLayout({area:h})}l&&(a.length&&t.setLayout({isLeafRoot:!0},!0),a.length=0);return t.viewChildren=a,t.setLayout({dataExtent:u.dataExtent},!0),a}(t,s,f,e,n,i);if(g.length){var y={x:h,y:p,width:o,height:r},m=Kx(o,r),v=Infinity,x=[];x.area=0;for(var _=0,b=g.length;_<b;){var S=g[_];x.push(S),x.area+=S.getLayout().area;var w=r_(x,m,e.squareRatio);w<=v?(_++,v=w):(x.area-=x.pop().getLayout().area,a_(x,m,y,u,!1),m=Kx(y.width,y.height),x.length=x.area=0,v=Infinity)}if(x.length&&a_(x,m,y,u,!0),!n){var M=s.get("childrenVisibleMin");null!=M&&f<M&&(n=!0)}for(_=0,b=g.length;_<b;_++)o_(g[_],e,n,i+1)}}}function r_(t,e,n){for(var i=0,o=Infinity,r=0,a=void 0,s=t.length;r<s;r++)(a=t[r].getLayout().area)&&(a<o&&(o=a),a>i&&(i=a));var l=t.area*t.area,u=e*e*n;return l?qx(u*i/l,l/(u*o)):Infinity}function a_(t,e,n,i,o){var r=e===n.width?0:1,a=1-r,s=["x","y"],l=["width","height"],u=n[s[r]],c=e?t.area/e:0;(o||c>n[l[a]])&&(c=n[l[a]]);for(var d=0,h=t.length;d<h;d++){var p=t[d],f={},g=c?p.getLayout().area/c:0,y=f[l[a]]=qx(c-2*i,0),m=n[s[r]]+n[l[r]]-u,v=d===h-1||m<g?m:g,x=f[l[r]]=qx(v-2*i,0);f[s[a]]=n[s[a]]+Kx(i,y/2),f[s[r]]=u+Kx(i,x/2),u+=v,p.setLayout(f,!0)}n[s[a]]+=c,n[l[a]]-=c}function s_(t,e,n,i,o){var r=t.getLayout(),a=n[o],s=a&&a===t;if(!(a&&!s||o===n.length&&t!==i)){t.setLayout({
// isInView means: viewRoot sub tree + viewAbovePath
isInView:!0,
// invisible only means: outside view clip so that the node can not
// see but still layout for animation preparation but not render.
invisible:!s&&!e.intersect(r),isAboveViewRoot:s},!0);var l=new U(e.x-r.x,e.y-r.y,e.width,e.height);$x(t.viewChildren||[],function(t){s_(t,l,n,i,o+1)})}}function l_(t){return t.get(e_)?t.get(n_):0}function u_(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.eachSeriesByType("graph",function(t){var n=t.getCategoriesData(),i=t.getGraph().data,o=n.mapArray(n.getName);i.filterSelf(function(t){var n=i.getItemModel(t).getShallow("category");if(null!=n){u(n)&&(n=o[n]);for(var r=0;r<e.length;r++)if(!e[r].isSelected(n))return!1}return!0})})}function c_(e){var n={};e.eachSeriesByType("graph",function(e){var i=e.getCategoriesData(),o=e.getData(),r={};i.each(function(t){var o=i.getName(t);r["ec-"+o]=t;var a=i.getItemModel(t),s=a.getModel("itemStyle").getItemStyle();s.fill||(s.fill=e.getColorFromPalette(o,n)),i.setItemVisual(t,"style",s);for(var l=["symbol","symbolSize","symbolKeepAspect"],u=0;u<l.length;u++){var c=a.getShallow(l[u],!0);null!=c&&i.setItemVisual(t,l[u],c)}}),i.count()&&o.each(function(e){var n=o.getItemModel(e).getShallow("category");if(null!=n){t(n)&&(n=r["ec-"+n]);var a=i.getItemVisual(n,"style"),s=o.ensureUniqueItemVisual(e,"style");f(s,a);for(var l=["symbol","symbolSize","symbolKeepAspect"],u=0;u<l.length;u++)o.setItemVisual(e,l[u],i.getItemVisual(n,l[u]))}})})}function d_(t){return t instanceof Array||(t=[t,t]),t}function h_(t){t.eachSeriesByType("graph",function(t){var e=t.getGraph(),n=t.getEdgeData(),i=d_(t.get("edgeSymbol")),o=d_(t.get("edgeSymbolSize"));n.setVisual("fromSymbol",i&&i[0]),n.setVisual("toSymbol",i&&i[1]),n.setVisual("fromSymbolSize",o&&o[0]),n.setVisual("toSymbolSize",o&&o[1]),n.setVisual("style",t.getModel("lineStyle").getLineStyle()),n.each(function(t){var i=n.getItemModel(t),o=e.getEdgeByIndex(t),r=d_(i.getShallow("symbol",!0)),a=d_(i.getShallow("symbolSize",!0)),s=i.getModel("lineStyle").getLineStyle(),l=n.ensureUniqueItemVisual(t,"style");switch(f(l,s),l.stroke){case"source":var u=o.node1.getVisual("style");l.stroke=u&&u.fill;break;case"target":u=o.node2.getVisual("style");l.stroke=u&&u.fill}r[0]&&o.setVisual("fromSymbol",r[0]),r[1]&&o.setVisual("toSymbol",r[1]),a[0]&&o.setVisual("fromSymbolSize",a[0]),a[1]&&o.setVisual("toSymbolSize",a[1])})})}var p_="--\x3e",f_=function(t){return t.get("autoCurveness")||null},g_=function(t,e){var n=f_(t),i=20,r=[];if(u(n))i=n;else if(o(n))return void(t.__curvenessList=n);e>i&&(i=e);var a=i%2?i+2:i+3;r=[];for(var s=0;s<a;s++)r.push((s%2?s+1:s)/10*(s%2?-1:1));t.__curvenessList=r},y_=function(t,e,n){var i=[t.id,t.dataIndex].join("."),o=[e.id,e.dataIndex].join(".");return[n.uid,i,o].join(p_)},m_=function(t){var e=t.split(p_);return[e[0],e[2],e[1]].join(p_)},v_=function(t,e){var n=e.__edgeMap;return n[t]?n[t].length:0};function x_(t,e,n,i){var r=f_(e),a=o(r);if(!r)return null;var s=function(t,e){var n=y_(t.node1,t.node2,e);return e.__edgeMap[n]}(t,e);if(!s)return null;for(var l=-1,u=0;u<s.length;u++)if(s[u]===n){l=u;break}var c=function(t,e){return v_(y_(t.node1,t.node2,e),e)+v_(y_(t.node2,t.node1,e),e)}(t,e);g_(e,c),t.lineStyle=t.lineStyle||{};var d=y_(t.node1,t.node2,e),h=e.__curvenessList,p=a||c%2?0:1;if(s.isForward)return h[p+l];var f=m_(d),g=v_(f,e),y=h[l+g+p];return i?a?r&&0===r[0]?(g+p)%2?y:-y:((g%2?0:1)+p)%2?y:-y:(g+p)%2?y:-y:h[l+g+p]}function __(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var n=t.getGraph();n.eachNode(function(t){var e=t.getModel();t.setLayout([+e.get("x"),+e.get("y")])}),b_(n,t)}}function b_(t,e){t.eachEdge(function(t,n){var i=Gt(t.getModel().get(["lineStyle","curveness"]),-x_(t,e,n,!0),0),o=le(t.node1.getLayout()),r=le(t.node2.getLayout()),a=[o,r];+i&&a.push([(o[0]+r[0])/2-(o[1]-r[1])*i,(o[1]+r[1])/2-(r[0]-o[0])*i]),t.setLayout(a)})}function S_(t,e){t.eachSeriesByType("graph",function(t){var e=t.get("layout"),n=t.coordinateSystem;if(n&&"view"!==n.type){var i=t.getData(),o=[];s(n.dimensions,function(t){o=o.concat(i.mapDimensionsAll(t))});for(var r=0;r<i.count();r++){for(var a=[],l=!1,u=0;u<o.length;u++){var c=i.get(o[u],r);isNaN(c)||(l=!0),a.push(c)}l?i.setItemLayout(r,n.dataToPoint(a)):i.setItemLayout(r,[NaN,NaN])}b_(i.graph,t)}else e&&"none"!==e||__(t)})}function w_(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var n=t.option.nodeScaleRatio,i=e.scaleX;return((e.getZoom()-1)*n+1)/i}function M_(t){var e=t.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var I_=Math.PI,D_=[];function T_(t,e,n,i){var o=t.coordinateSystem;if(!o||"view"===o.type){var r=o.getBoundingRect(),a=t.getData(),s=a.graph,l=r.width/2+r.x,u=r.height/2+r.y,c=Math.min(r.width,r.height)/2,d=a.count();if(a.setLayout({cx:l,cy:u}),d){if(n){var h=o.pointToData(i),p=h[0],f=h[1],g=[p-l,f-u];ue(g,g),ce(g,g,c),n.setLayout([l+g[0],u+g[1]],!0),A_(n,t.get(["circular","rotateLabel"]),l,u)}C_[e](t,s,a,c,l,u,d),s.eachEdge(function(e,n){var i,o=Gt(e.getModel().get(["lineStyle","curveness"]),x_(e,t,n),0),r=le(e.node1.getLayout()),a=le(e.node2.getLayout()),s=(r[0]+a[0])/2,c=(r[1]+a[1])/2;+o&&(i=[l*(o*=3)+s*(1-o),u*o+c*(1-o)]),e.setLayout([r,a,i])})}}}var C_={value:function(t,e,n,i,o,r,a){var s=0,l=n.getSum("value"),u=2*Math.PI/(l||a);e.eachNode(function(t){var e=t.getValue("value"),n=u*(l?e:1)/2;s+=n,t.setLayout([i*Math.cos(s)+o,i*Math.sin(s)+r]),s+=n})},symbolSize:function(t,e,n,i,o,r,a){var s=0;D_.length=a;var l=w_(t);e.eachNode(function(t){var e=M_(t);isNaN(e)&&(e=2),e<0&&(e=0),e*=l;var n=Math.asin(e/2/i);isNaN(n)&&(n=I_/2),D_[t.dataIndex]=n,s+=2*n});var u=(2*I_-s)/a/2,c=0;e.eachNode(function(t){var e=u+D_[t.dataIndex];c+=e,(!t.getLayout()||!t.getLayout().fixed)&&t.setLayout([i*Math.cos(c)+o,i*Math.sin(c)+r]),c+=e})}};function A_(t,e,n,i){var o=t.getGraphicEl();if(o){var r=t.getModel().get(["label","rotate"])||0,a=o.getSymbolPath();if(e){var s=t.getLayout(),l=Math.atan2(s[1]-i,s[0]-n);l<0&&(l=2*Math.PI+l);var u=s[0]<n;u&&(l-=Math.PI);var c=u?"left":"right";a.setTextConfig({rotation:-l,position:c,origin:"center"});var d=a.ensureState("emphasis");f(d.textConfig||(d.textConfig={}),{position:c})}else a.setTextConfig({rotation:r*=Math.PI/180})}}function L_(t){t.eachSeriesByType("graph",function(t){"circular"===t.get("layout")&&T_(t,"symbolSize")})}var k_=ge;function P_(t){t.eachSeriesByType("graph",function(t){var e=t.coordinateSystem;if(!e||"view"===e.type)if("force"===t.get("layout")){var n=t.preservedPoints||{},i=t.getGraph(),r=i.data,a=i.edgeData,s=t.getModel("force"),l=s.get("initLayout");t.preservedPoints?r.each(function(t){var e=r.getId(t);r.setItemLayout(t,n[e]||[NaN,NaN])}):l&&"none"!==l?"circular"===l&&T_(t,"value"):__(t);var u=r.getDataExtent("value"),c=a.getDataExtent("value"),d=s.get("repulsion"),h=s.get("edgeLength"),p=o(d)?d:[d,d],f=o(h)?h:[h,h];f=[f[1],f[0]];var g=r.mapArray("value",function(t,e){var n=r.getItemLayout(e),i=Be(t,u,p);return isNaN(i)&&(i=(p[0]+p[1])/2),{w:i,rep:i,fixed:r.getItemModel(e).get("fixed"),p:!n||isNaN(n[0])||isNaN(n[1])?null:n}}),y=a.mapArray("value",function(e,n){var o=i.getEdgeByIndex(n),r=Be(e,c,f);isNaN(r)&&(r=(f[0]+f[1])/2);var a=o.getModel(),s=Gt(o.getModel().get(["lineStyle","curveness"]),-x_(o,t,n,!0),0);return{n1:g[o.node1.dataIndex],n2:g[o.node2.dataIndex],d:r,curveness:s,ignoreForceLayout:a.get("ignoreForceLayout")}}),m=e.getBoundingRect(),v=function(t,e,n){for(var i=t,o=e,r=n.rect,a=r.width,s=r.height,l=[r.x+a/2,r.y+s/2],u=null==n.gravity?.1:n.gravity,c=0;c<i.length;c++){var d=i[c];d.p||(d.p=de(a*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),d.pp=le(d.p),d.edges=null}var h,p,f=null==n.friction?.6:n.friction,g=f;return{warmUp:function(){g=.8*f},setFixed:function(t){i[t].fixed=!0},setUnfixed:function(t){i[t].fixed=!1},
/**
* Before step hook
*/
beforeStep:function(t){h=t},
/**
* After step hook
*/
afterStep:function(t){p=t},
/**
* Some formulas were originally copied from "d3.js"
* https://github.com/d3/d3/blob/b516d77fb8566b576088e73410437494717ada26/src/layout/force.js
* with some modifications made for this project.
* See the license statement at the head of this file.
*/
step:function(t){h&&h(i,o);for(var e=[],n=i.length,r=0;r<o.length;r++){var a=o[r];if(!a.ignoreForceLayout){var s=a.n1,c=a.n2;he(e,c.p,s.p);var d=pe(e)-a.d,f=c.w/(s.w+c.w);isNaN(f)&&(f=0),ue(e,e),!s.fixed&&k_(s.p,s.p,e,f*d*g),!c.fixed&&k_(c.p,c.p,e,-(1-f)*d*g)}}for(r=0;r<n;r++)(x=i[r]).fixed||(he(e,l,x.p),k_(x.p,x.p,e,u*g));for(r=0;r<n;r++){s=i[r];for(var y=r+1;y<n;y++){c=i[y],he(e,c.p,s.p),0===(d=pe(e))&&(fe(e,Math.random()-.5,Math.random()-.5),d=1);var m=(s.rep+c.rep)/d/d;!s.fixed&&k_(s.pp,s.pp,e,m),!c.fixed&&k_(c.pp,c.pp,e,-m)}}var v=[];for(r=0;r<n;r++){var x;(x=i[r]).fixed||(he(v,x.p,x.pp),k_(x.p,x.p,v,g),$t(x.pp,x.p))}var _=(g*=.992)<.01;p&&p(i,o,_),t&&t(_)}}}(g,y,{rect:m,gravity:s.get("gravity"),friction:s.get("friction")});v.beforeStep(function(t,e){for(var n=0,o=t.length;n<o;n++)t[n].fixed&&$t(t[n].p,i.getNodeByIndex(n).getLayout())}),v.afterStep(function(t,e,o){for(var a=0,s=t.length;a<s;a++)t[a].fixed||i.getNodeByIndex(a).setLayout(t[a].p),n[r.getId(a)]=t[a].p;for(a=0,s=e.length;a<s;a++){var l=e[a],u=i.getEdgeByIndex(a),c=l.n1.p,d=l.n2.p,h=u.getLayout();(h=h?h.slice():[])[0]=h[0]||[],h[1]=h[1]||[],$t(h[0],c),$t(h[1],d),+l.curveness&&(h[2]=[(c[0]+d[0])/2-(c[1]-d[1])*l.curveness,(c[1]+d[1])/2-(d[0]-c[0])*l.curveness]),u.setLayout(h)}}),t.forceLayout=v,t.preservedPoints=n,v.step()}else t.forceLayout=null})}function N_(t,e){var n=[];return t.eachSeriesByType("graph",function(t){var i=t.get("coordinateSystem");if(!i||"view"===i){var o=t.getData(),r=o.mapArray(function(t){var e=o.getItemModel(t);return[+e.get("x"),+e.get("y")]}),a=[],s=[];te(r,a,s),s[0]-a[0]===0&&(s[0]+=1,a[0]-=1),s[1]-a[1]===0&&(s[1]+=1,a[1]-=1);var l=(s[0]-a[0])/(s[1]-a[1]),u=function(t,e,n){return na(f(t.getBoxLayoutParams(),{aspect:n}),{width:e.getWidth(),height:e.getHeight()})}(t,e,l);isNaN(l)&&(a=[u.x,u.y],s=[u.x+u.width,u.y+u.height]);var c=s[0]-a[0],d=s[1]-a[1],h=u.width,p=u.height,g=t.coordinateSystem=new fv;g.zoomLimit=t.get("scaleLimit"),g.setBoundingRect(a[0],a[1],c,d),g.setViewRect(u.x,u.y,h,p),g.setCenter(t.get("center"),e),g.setZoom(t.get("zoom")),n.push(g)}}),n}var O_=W.prototype,R_=H.prototype,E_=
/** @class */
function(){return function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}}();function V_(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}h(e,t)}(E_);var z_=
/** @class */function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-line",n}return h(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new E_},e.prototype.buildPath=function(t,e){V_(e)?O_.buildPath.call(this,t,e):R_.buildPath.call(this,t,e)},e.prototype.pointAt=function(t){return V_(this.shape)?O_.pointAt.call(this,t):R_.pointAt.call(this,t)},e.prototype.tangentAt=function(t){var e=this.shape,n=V_(e)?[e.x2-e.x1,e.y2-e.y1]:R_.tangentAt.call(this,t);return ue(n,n)},e}(y),B_=["fromSymbol","toSymbol"];function G_(t){return"_"+t+"Type"}function F_(t,e,n){var i=e.getItemVisual(n,t);if(!i||"none"===i)return i;var o=e.getItemVisual(n,t+"Size"),r=e.getItemVisual(n,t+"Rotate"),a=e.getItemVisual(n,t+"Offset"),s=e.getItemVisual(n,t+"KeepAspect"),l=yc(o);return i+l+mc(a||0,l)+(r||"")+(s||"")}function W_(t,e,n){var i=e.getItemVisual(n,t);if(i&&"none"!==i){var o=e.getItemVisual(n,t+"Size"),r=e.getItemVisual(n,t+"Rotate"),a=e.getItemVisual(n,t+"Offset"),s=e.getItemVisual(n,t+"KeepAspect"),l=yc(o),u=mc(a||0,l),c=gc(i,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return c.__specifiedRotation=null==r||isNaN(r)?void 0:+r*Math.PI/180||0,c.name=t,c}}function H_(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var n=e[2];n?(t.cpx1=n[0],t.cpy1=n[1]):(t.cpx1=NaN,t.cpy1=NaN)}var Y_=
/** @class */function(t){function e(e,n,i){var o=t.call(this)||this;return o._createLine(e,n,i),o}return h(e,t),e.prototype._createLine=function(t,e,n){var i=t.hostModel,o=function(t){var e=new z_({name:"line",subPixelOptimize:!0});return H_(e.shape,t),e}(t.getItemLayout(e));o.shape.percent=0,Xi(o,{shape:{percent:1}},i,e),this.add(o),s(B_,function(n){var i=W_(n,t,e);this.add(i),this[G_(n)]=F_(n,t,e)},this),this._updateCommonStl(t,e,n)},e.prototype.updateData=function(t,e,n){var i=t.hostModel,o=this.childOfName("line"),r=t.getItemLayout(e),a={shape:{}};H_(a.shape,r),Zi(o,a,i,e),s(B_,function(n){var i=F_(n,t,e),o=G_(n);if(this[o]!==i){this.remove(this.childOfName(n));var r=W_(n,t,e);this.add(r)}this[o]=i},this),this._updateCommonStl(t,e,n)},e.prototype.getLinePath=function(){return this.childAt(0)},e.prototype._updateCommonStl=function(t,e,n){var i=t.hostModel,r=this.childOfName("line"),a=n&&n.emphasisLineStyle,l=n&&n.blurLineStyle,u=n&&n.selectLineStyle,c=n&&n.labelStatesModels,d=n&&n.emphasisDisabled,h=n&&n.focus,p=n&&n.blurScope;if(!n||t.hasItemOption){var f=t.getItemModel(e),g=f.getModel("emphasis");a=g.getModel("lineStyle").getLineStyle(),l=f.getModel(["blur","lineStyle"]).getLineStyle(),u=f.getModel(["select","lineStyle"]).getLineStyle(),d=g.get("disabled"),h=g.get("focus"),p=g.get("blurScope"),c=ko(f)}var y=t.getItemVisual(e,"style"),m=y.stroke;r.useStyle(y),r.style.fill=null,r.style.strokeNoScale=!0,r.ensureState("emphasis").style=a,r.ensureState("blur").style=l,r.ensureState("select").style=u,s(B_,function(t){var e=this.childOfName(t);if(e){e.setColor(m),e.style.opacity=y.opacity;for(var n=0;n<Jn.length;n++){var i=Jn[n],o=r.getState(i);if(o){var a=o.style||{},s=e.ensureState(i),l=s.style||(s.style={});null!=a.stroke&&(l[e.__isEmptyBrush?"stroke":"fill"]=a.stroke),null!=a.opacity&&(l.opacity=a.opacity)}}e.markRedraw()}},this);var v=i.getRawValue(e);Lo(this,c,{labelDataIndex:e,labelFetcher:{getFormattedLabel:function(e,n){return i.getFormattedLabel(e,n,t.dataType)}},inheritColor:m||"#000",defaultOpacity:y.opacity,defaultText:(null==v?t.getName(e):isFinite(v)?Fe(v):v)+""});var x=this.getTextContent();if(x){var _=c.normal;x.__align=x.style.align,x.__verticalAlign=x.style.verticalAlign,x.__position=_.get("position")||"middle";var b=_.get("distance");o(b)||(b=[b,b]),x.__labelDistance=b}this.setTextConfig({position:null,local:!0,inside:!1}),Oi(this,h,p,d)},e.prototype.highlight=function(){_i(this)},e.prototype.downplay=function(){bi(this)},e.prototype.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},e.prototype.setLinePoints=function(t){var e=this.childOfName("line");H_(e.shape,t),e.dirty()},e.prototype.beforeUpdate=function(){var t=this,e=t.childOfName("fromSymbol"),n=t.childOfName("toSymbol"),i=t.getTextContent();if(e||n||i&&!i.ignore){for(var o=1,r=this.parent;r;)r.scaleX&&(o/=r.scaleX),r=r.parent;var a=t.childOfName("line");if(this.__dirty||a.__dirty){var s=a.shape.percent,l=a.pointAt(0),u=a.pointAt(s),c=he([],u,l);if(ue(c,c),e&&(e.setPosition(l),w(e,0),e.scaleX=e.scaleY=o*s,e.markRedraw()),n&&(n.setPosition(u),w(n,1),n.scaleX=n.scaleY=o*s,n.markRedraw()),i&&!i.ignore){i.x=i.y=0,i.originX=i.originY=0;var d=void 0,h=void 0,p=i.__labelDistance,f=p[0]*o,g=p[1]*o,y=s/2,m=a.tangentAt(y),v=[m[1],-m[0]],x=a.pointAt(y);v[1]>0&&(v[0]=-v[0],v[1]=-v[1]);var _=m[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var b=-Math.atan2(m[1],m[0]);u[0]<l[0]&&(b=Math.PI+b),i.rotation=b}var S=void 0;switch(i.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":S=-g,h="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":S=g,h="top";break;default:S=0,h="middle"}switch(i.__position){case"end":i.x=c[0]*f+u[0],i.y=c[1]*g+u[1],d=c[0]>.8?"left":c[0]<-.8?"right":"center",h=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":i.x=-c[0]*f+l[0],i.y=-c[1]*g+l[1],d=c[0]>.8?"right":c[0]<-.8?"left":"center",h=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=f*_+l[0],i.y=l[1]+S,d=m[0]<0?"right":"left",i.originX=-f*_,i.originY=-S;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=x[0],i.y=x[1]+S,d="center",i.originY=-S;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-f*_+u[0],i.y=u[1]+S,d=m[0]>=0?"right":"left",i.originX=f*_,i.originY=-S}i.scaleX=i.scaleY=o,i.setStyle({
// Use the user specified text align and baseline first
verticalAlign:i.__verticalAlign||h,align:i.__align||d})}}}function w(t,e){var n=t.__specifiedRotation;if(null==n){var i=a.tangentAt(e);t.attr("rotation",(1===e?-1:1)*Math.PI/2-Math.atan2(i[1],i[0]))}else t.attr("rotation",n)}},e}(X),U_=
/** @class */function(){function t(t){this.group=new X,this._LineCtor=t||Y_}return t.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var n=this,i=n.group,o=n._lineData;n._lineData=t,o||i.removeAll();var r=Z_(t);t.diff(o).add(function(n){e._doAdd(t,n,r)}).update(function(n,i){e._doUpdate(o,t,i,n,r)}).remove(function(t){i.remove(o.getItemGraphicEl(t))}).execute()},t.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,n){e.updateLayout(t,n)},this)},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=Z_(t),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e){function n(t){t.isGroup||function(t){return t.animators&&t.animators.length>0}(t)||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var i=t.start;i<t.end;i++){if(j_(e.getItemLayout(i))){var o=new this._LineCtor(e,i,this._seriesScope);o.traverse(n),this.group.add(o),e.setItemGraphicEl(i,o),this._progressiveEls.push(o)}}},t.prototype.remove=function(){this.group.removeAll()},t.prototype.eachRendered=function(t){Io(this._progressiveEls||this.group,t)},t.prototype._doAdd=function(t,e,n){if(j_(t.getItemLayout(e))){var i=new this._LineCtor(t,e,n);t.setItemGraphicEl(e,i),this.group.add(i)}},t.prototype._doUpdate=function(t,e,n,i,o){var r=t.getItemGraphicEl(n);j_(e.getItemLayout(i))?(r?r.updateData(e,i,o):r=new this._LineCtor(e,i,o),e.setItemGraphicEl(i,r),this.group.add(r)):this.group.remove(r)},t}();function Z_(t){var e=t.hostModel,n=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:n.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:n.get("disabled"),blurScope:n.get("blurScope"),focus:n.get("focus"),labelStatesModels:ko(e)}}function X_(t){return isNaN(t[0])||isNaN(t[1])}function j_(t){return t&&!X_(t[0])&&!X_(t[1])}var q_=[],K_=[],J_=[],$_=me,Q_=ve,tb=Math.abs;function eb(t,e,n){for(var i,o=t[0],r=t[1],a=t[2],s=Infinity,l=n*n,u=.1,c=.1;c<=.9;c+=.1){q_[0]=$_(o[0],r[0],a[0],c),q_[1]=$_(o[1],r[1],a[1],c),(p=tb(Q_(q_,e)-l))<s&&(s=p,i=c)}for(var d=0;d<32;d++){var h=i+u;K_[0]=$_(o[0],r[0],a[0],i),K_[1]=$_(o[1],r[1],a[1],i),J_[0]=$_(o[0],r[0],a[0],h),J_[1]=$_(o[1],r[1],a[1],h);var p=Q_(K_,e)-l;if(tb(p)<.01)break;var f=Q_(J_,e)-l;u/=2,p<0?f>=0?i+=u:i-=u:f>=0?i-=u:i+=u}return i}function nb(t,e){var n=[],i=ye,o=[[],[],[]],r=[[],[]],a=[];e/=2,t.eachEdge(function(t,s){var l=t.getLayout(),u=t.getVisual("fromSymbol"),c=t.getVisual("toSymbol");l.__original||(l.__original=[le(l[0]),le(l[1])],l[2]&&l.__original.push(le(l[2])));var d=l.__original;if(null!=l[2]){if($t(o[0],d[0]),$t(o[1],d[2]),$t(o[2],d[1]),u&&"none"!==u){var h=M_(t.node1),p=eb(o,d[0],h*e);i(o[0][0],o[1][0],o[2][0],p,n),o[0][0]=n[3],o[1][0]=n[4],i(o[0][1],o[1][1],o[2][1],p,n),o[0][1]=n[3],o[1][1]=n[4]}if(c&&"none"!==c){h=M_(t.node2),p=eb(o,d[1],h*e);i(o[0][0],o[1][0],o[2][0],p,n),o[1][0]=n[1],o[2][0]=n[2],i(o[0][1],o[1][1],o[2][1],p,n),o[1][1]=n[1],o[2][1]=n[2]}$t(l[0],o[0]),$t(l[1],o[2]),$t(l[2],o[1])}else{if($t(r[0],d[0]),$t(r[1],d[1]),he(a,r[1],r[0]),ue(a,a),u&&"none"!==u){h=M_(t.node1);ge(r[0],r[0],a,h*e)}if(c&&"none"!==c){h=M_(t.node2);ge(r[1],r[1],a,-h*e)}$t(l[0],r[0]),$t(l[1],r[1])}})}function ib(t){return"view"===t.type}var ob=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.init=function(t,e){var n=new zf,i=new U_,o=this.group;this._controller=new Im(e.getZr()),this._controllerHost={target:o},o.add(n.group),o.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},e.prototype.render=function(t,e,n){var i=this,o=t.coordinateSystem;this._model=t;var r=this._symbolDraw,a=this._lineDraw,s=this.group;if(ib(o)){var l={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?s.attr(l):Zi(s,l,t)}nb(t.getGraph(),w_(t));var u=t.getData();r.updateData(u);var c=t.getEdgeData();a.updateData(c),this._updateNodeAndLinkScale(),this._updateController(t,e,n),clearTimeout(this._layoutTimeout);var d=t.forceLayout,h=t.get(["force","layoutAnimation"]);d&&this._startForceLayoutIteration(d,h);var p=t.get("layout");u.graph.eachNode(function(e){var n=e.dataIndex,o=e.getGraphicEl(),r=e.getModel();if(o){o.off("drag").off("dragend");var a=r.get("draggable");a&&o.on("drag",function(r){switch(p){case"force":d.warmUp(),!i._layouting&&i._startForceLayoutIteration(d,h),d.setFixed(n),u.setItemLayout(n,[o.x,o.y]);break;case"circular":u.setItemLayout(n,[o.x,o.y]),e.setLayout({fixed:!0},!0),T_(t,"symbolSize",e,[r.offsetX,r.offsetY]),i.updateLayout(t);break;default:u.setItemLayout(n,[o.x,o.y]),b_(t.getGraph(),t),i.updateLayout(t)}}).on("dragend",function(){d&&d.setUnfixed(n)}),o.setDraggable(a,!!r.get("cursor")),"adjacency"===r.get(["emphasis","focus"])&&(Un(o).focus=e.getAdjacentDataIndices())}}),u.graph.eachEdge(function(t){var e=t.getGraphicEl(),n=t.getModel().get(["emphasis","focus"]);e&&"adjacency"===n&&(Un(e).focus={edge:[t.dataIndex],node:[t.node1.dataIndex,t.node2.dataIndex]})});var f="circular"===t.get("layout")&&t.get(["circular","rotateLabel"]),g=u.getLayout("cx"),y=u.getLayout("cy");u.graph.eachNode(function(t){A_(t,f,g,y)}),this._firstRender=!1},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,e){var n=this;!function i(){t.step(function(t){n.updateLayout(n._model),(n._layouting=!t)&&(e?n._layoutTimeout=setTimeout(i,16):i())})}()},e.prototype._updateController=function(t,e,n){var i=this,o=this._controller,r=this._controllerHost,a=this.group;o.setPointerChecker(function(e,i,o){var r=a.getBoundingRect();return r.applyTransform(a.transform),r.contain(i,o)&&!Pm(e,n,t)}),ib(t.coordinateSystem)?(o.enable(t.get("roam")),r.zoomLimit=t.get("scaleLimit"),r.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(e){Am(r,e.dx,e.dy),n.dispatchAction({seriesId:t.id,type:"graphRoam",dx:e.dx,dy:e.dy})}).on("zoom",function(e){Lm(r,e.scale,e.originX,e.originY),n.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:e.scale,originX:e.originX,originY:e.originY}),i._updateNodeAndLinkScale(),nb(t.getGraph(),w_(t)),i._lineDraw.updateLayout(),n.updateLabelLayout()})):o.disable()},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,e=t.getData(),n=w_(t);e.eachItemGraphicEl(function(t,e){t&&t.setSymbolScale(n)})},e.prototype.updateLayout=function(t){nb(t.getGraph(),w_(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(au);function rb(t){return"_EC_"+t}var ab=
/** @class */function(){function t(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return t.prototype.isDirected=function(){return this._directed},t.prototype.addNode=function(t,e){t=null==t?""+e:""+t;var n=this._nodesMap;if(!n[rb(t)]){var i=new sb(t,e);return i.hostGraph=this,this.nodes.push(i),n[rb(t)]=i,i}},t.prototype.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},t.prototype.getNodeById=function(t){return this._nodesMap[rb(t)]},t.prototype.addEdge=function(t,e,n){var i=this._nodesMap,o=this._edgesMap;if(u(t)&&(t=this.nodes[t]),u(e)&&(e=this.nodes[e]),t instanceof sb||(t=i[rb(t)]),e instanceof sb||(e=i[rb(e)]),t&&e){var r=t.id+"-"+e.id,a=new lb(t,e,n);return a.hostGraph=this,this._directed&&(t.outEdges.push(a),e.inEdges.push(a)),t.edges.push(a),t!==e&&e.edges.push(a),this.edges.push(a),o[r]=a,a}},t.prototype.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},t.prototype.getEdge=function(t,e){t instanceof sb&&(t=t.id),e instanceof sb&&(e=e.id);var n=this._edgesMap;return this._directed?n[t+"-"+e]:n[t+"-"+e]||n[e+"-"+t]},t.prototype.eachNode=function(t,e){for(var n=this.nodes,i=n.length,o=0;o<i;o++)n[o].dataIndex>=0&&t.call(e,n[o],o)},t.prototype.eachEdge=function(t,e){for(var n=this.edges,i=n.length,o=0;o<i;o++)n[o].dataIndex>=0&&n[o].node1.dataIndex>=0&&n[o].node2.dataIndex>=0&&t.call(e,n[o],o)},t.prototype.breadthFirstTraverse=function(t,e,n,i){if(e instanceof sb||(e=this._nodesMap[rb(e)]),e){for(var o="out"===n?"outEdges":"in"===n?"inEdges":"edges",r=0;r<this.nodes.length;r++)this.nodes[r].__visited=!1;if(!t.call(i,e,null))for(var a=[e];a.length;){var s=a.shift(),l=s[o];for(r=0;r<l.length;r++){var u=l[r],c=u.node1===s?u.node2:u.node1;if(!c.__visited){if(t.call(i,c,s))return;a.push(c),c.__visited=!0}}}}},t.prototype.update=function(){for(var t=this.data,e=this.edgeData,n=this.nodes,i=this.edges,o=0,r=n.length;o<r;o++)n[o].dataIndex=-1;for(o=0,r=t.count();o<r;o++)n[t.getRawIndex(o)].dataIndex=o;e.filterSelf(function(t){var n=i[e.getRawIndex(t)];return n.node1.dataIndex>=0&&n.node2.dataIndex>=0});for(o=0,r=i.length;o<r;o++)i[o].dataIndex=-1;for(o=0,r=e.count();o<r;o++)i[e.getRawIndex(o)].dataIndex=o},t.prototype.clone=function(){for(var e=new t(this._directed),n=this.nodes,i=this.edges,o=0;o<n.length;o++)e.addNode(n[o].id,n[o].dataIndex);for(o=0;o<i.length;o++){var r=i[o];e.addEdge(r.node1.id,r.node2.id,r.dataIndex)}return e},t}(),sb=
/** @class */function(){function t(t,e){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=null==t?"":t,this.dataIndex=null==e?-1:e}return t.prototype.degree=function(){return this.edges.length},t.prototype.inDegree=function(){return this.inEdges.length},t.prototype.outDegree=function(){return this.outEdges.length},t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(t)},t.prototype.getAdjacentDataIndices=function(){for(var t={edge:[],node:[]},e=0;e<this.edges.length;e++){var n=this.edges[e];n.dataIndex<0||(t.edge.push(n.dataIndex),t.node.push(n.node1.dataIndex,n.node2.dataIndex))}return t},t.prototype.getTrajectoryDataIndices=function(){for(var t=a(),e=a(),n=0;n<this.edges.length;n++){var i=this.edges[n];if(!(i.dataIndex<0)){t.set(i.dataIndex,!0);for(var o=[i.node1],r=[i.node2],s=0;s<o.length;){var l=o[s];s++,e.set(l.dataIndex,!0);for(var u=0;u<l.inEdges.length;u++)t.set(l.inEdges[u].dataIndex,!0),o.push(l.inEdges[u].node1)}for(s=0;s<r.length;){var c=r[s];s++,e.set(c.dataIndex,!0);for(u=0;u<c.outEdges.length;u++)t.set(c.outEdges[u].dataIndex,!0),r.push(c.outEdges[u].node2)}}}return{edge:t.keys(),node:e.keys()}},t}(),lb=
/** @class */function(){function t(t,e,n){this.dataIndex=-1,this.node1=t,this.node2=e,this.dataIndex=null==n?-1:n}return t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(t)},t.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},t.prototype.getTrajectoryDataIndices=function(){var t=a(),e=a();t.set(this.dataIndex,!0);for(var n=[this.node1],i=[this.node2],o=0;o<n.length;){var r=n[o];o++,e.set(r.dataIndex,!0);for(var s=0;s<r.inEdges.length;s++)t.set(r.inEdges[s].dataIndex,!0),n.push(r.inEdges[s].node1)}for(o=0;o<i.length;){var l=i[o];o++,e.set(l.dataIndex,!0);for(s=0;s<l.outEdges.length;s++)t.set(l.outEdges[s].dataIndex,!0),i.push(l.outEdges[s].node2)}return{edge:t.keys(),node:e.keys()}},t}();function ub(t,e){return{
/**
* @param Default 'value'. can be 'a', 'b', 'c', 'd', 'e'.
*/
getValue:function(n){var i=this[t][e];return i.getStore().get(i.getDimensionIndex(n||"value"),this.dataIndex)},
// TODO: TYPE stricter type.
setVisual:function(n,i){this.dataIndex>=0&&this[t][e].setItemVisual(this.dataIndex,n,i)},getVisual:function(n){return this[t][e].getItemVisual(this.dataIndex,n)},setLayout:function(n,i){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,n,i)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}function cb(t,e,n,i,o){for(var r=new ab(i),a=0;a<t.length;a++)r.addNode(Ft(
// Id, name, dataIndex
t[a].id,t[a].name,a),a);var s=[],u=[],c=0;for(a=0;a<e.length;a++){var d=e[a],h=d.source,p=d.target;r.addEdge(h,p,c)&&(u.push(d),s.push(Ft(xn(d.id,null),h+" > "+p)),c++)}var f,g=n.get("coordinateSystem");if("cartesian2d"===g||"polar"===g)f=ch(t,n);else{var y=ja.get(g),m=y&&y.dimensions||[];l(m,"value")<0&&m.concat(["value"]);var v=nh(t,{coordDimensions:m,encodeDefine:n.getEncode()}).dimensions;(f=new eh(v,n)).initData(t)}var x=new eh(["value"],n);return x.initData(u,s),o&&o(f,x),jv({mainData:f,struct:r,structAttr:"graph",datas:{node:f,edge:x},datasAttr:{node:"data",edge:"edgeData"}}),r.update(),r}it(sb,ub("hostGraph","data")),it(lb,ub("hostGraph","edgeData"));var db=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return h(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new iy(i,i),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(e){t.prototype.mergeDefaultAndTheme.apply(this,arguments),hn(e,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,e){var n,i=t.edges||t.links||[],o=t.data||t.nodes||[],r=this;if(o&&i){f_(n=this)&&(n.__curvenessList=[],n.__edgeMap={},g_(n));var a=cb(o,i,this,!0,function(t,e){t.wrapMethod("getItemModel",function(t){var e=r._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t});var n=tr.prototype.getModel;function i(t,e){var i=n.call(this,t,e);return i.resolveParentPath=o,i}function o(t){if(t&&("label"===t[0]||"label"===t[1])){var e=t.slice();return"label"===t[0]?e[0]="edgeLabel":"label"===t[1]&&(e[1]="edgeLabel"),e}return t}e.wrapMethod("getItemModel",function(t){return t.resolveParentPath=o,t.getModel=i,t})});return s(a.edges,function(t){!function(t,e,n,i){if(f_(n)){var o=y_(t,e,n),r=n.__edgeMap,a=r[m_(o)];r[o]&&!a?r[o].isForward=!0:a&&r[o]&&(a.isForward=!0,r[o].isForward=!1),r[o]=r[o]||[],r[o].push(i)}}(t.node1,t.node2,this,t.dataIndex)},this),a.data}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,e,n){if("edge"===n){var i=this.getData(),o=this.getDataParams(t,n),r=i.graph.getEdgeByIndex(t),a=i.getName(r.node1.dataIndex),s=i.getName(r.node2.dataIndex),l=[];return null!=a&&l.push(a),null!=s&&l.push(s),Pl("nameValue",{name:l.join(" > "),value:o.value,noValue:null==o.value})}return Yl({series:this,dataIndex:t,multipleSeries:e})},e.prototype._updateCategoriesData=function(){var t=n(this.option.categories||[],function(t){return null!=t.value?t:f({value:0},t)}),e=new eh(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(t){return e.getItemModel(t)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={
// zlevel: 0,
z:2,coordinateSystem:"view",
// Default option for all coordinate systems
// xAxisIndex: 0,
// yAxisIndex: 0,
// polarIndex: 0,
// geoIndex: 0,
legendHoverLink:!0,layout:null,
// Configuration of circular layout
circular:{rotateLabel:!1},
// Configuration of force directed layout
force:{initLayout:null,
// Node repulsion. Can be an array to represent range.
repulsion:[0,50],gravity:.1,
// Initial friction
friction:.6,
// Edge length. Can be an array to represent range.
edgeLength:30,layoutAnimation:!0},left:"center",top:"center",
// right: null,
// bottom: null,
// width: '80%',
// height: '80%',
symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,
// Default on center of graph
center:null,zoom:1,
// Symbol size scale ratio in roam
nodeScaleRatio:.6,
// cursor: null,
// categories: [],
// data: []
// Or
// nodes: []
// links: []
// Or
// edges: []
label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(jl),hb={type:"graphRoam",event:"graphRoam",update:"none"};var pb=
/** @class */
function(){return function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}}(),fb=
/** @class */function(t){function e(e){var n=t.call(this,e)||this;return n.type="pointer",n}return h(e,t),e.prototype.getDefaultShape=function(){return new pb},e.prototype.buildPath=function(t,e){var n=Math.cos,i=Math.sin,o=e.r,r=e.width,a=e.angle,s=e.x-n(a)*r*(r>=o/3?1:2),l=e.y-i(a)*r*(r>=o/3?1:2);a=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+n(a)*r,e.y+i(a)*r),t.lineTo(e.x+n(e.angle)*o,e.y+i(e.angle)*o),t.lineTo(e.x-n(a)*r,e.y-i(a)*r),t.lineTo(s,l)},e}(y);function gb(e,n){var i=null==e?"":e+"";return n&&(t(n)?i=n.replace("{value}",i):g(n)&&(i=n(e))),i}var yb=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.render=function(t,e,n){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),o=function(t,e){var n=t.get("center"),i=e.getWidth(),o=e.getHeight(),r=Math.min(i,o);return{cx:Ge(n[0],e.getWidth()),cy:Ge(n[1],e.getHeight()),r:Ge(t.get("radius"),r/2)}}(t,n);this._renderMain(t,e,n,i,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,e,n,i,o){var r=this.group,a=t.get("clockwise"),l=-t.get("startAngle")/180*Math.PI,u=-t.get("endAngle")/180*Math.PI,c=t.getModel("axisLine"),d=c.get("roundCap")?xg:V,h=c.get("show"),p=c.getModel("lineStyle"),f=p.get("width"),g=[l,u];Bt(g,!a);for(var y=(u=g[1])-(l=g[0]),m=l,v=[],x=0;h&&x<i.length;x++){var _=new d({shape:{startAngle:m,endAngle:u=l+y*Math.min(Math.max(i[x][0],0),1),cx:o.cx,cy:o.cy,clockwise:a,r0:o.r-f,r:o.r},silent:!0});_.setStyle({fill:i[x][1]}),_.setStyle(p.getLineStyle(
// Because we use sector to simulate arc
// so the properties for stroking are useless
["color","width"])),v.push(_),m=u}v.reverse(),s(v,function(t){return r.add(t)});var b=function(t){if(t<=0)return i[0][1];var e;for(e=0;e<i.length;e++)if(i[e][0]>=t&&(0===e?0:i[e-1][0])<t)return i[e][1];return i[e-1][1]};this._renderTicks(t,e,n,b,o,l,u,a,f),this._renderTitleAndDetail(t,e,n,b,o),this._renderAnchor(t,o),this._renderPointer(t,e,n,b,o,l,u,a,f)},e.prototype._renderTicks=function(t,e,n,i,o,r,a,s,l){for(var c,d,h=this.group,p=o.cx,f=o.cy,g=o.r,y=+t.get("min"),m=+t.get("max"),v=t.getModel("splitLine"),x=t.getModel("axisTick"),_=t.getModel("axisLabel"),b=t.get("splitNumber"),S=x.get("splitNumber"),w=Ge(v.get("length"),g),M=Ge(x.get("length"),g),I=r,D=(a-r)/b,T=D/S,C=v.getModel("lineStyle").getLineStyle(),A=x.getModel("lineStyle").getLineStyle(),L=v.get("distance"),k=0;k<=b;k++){if(c=Math.cos(I),d=Math.sin(I),v.get("show")){var P=new W({shape:{x1:c*(g-(N=L?L+l:l))+p,y1:d*(g-N)+f,x2:c*(g-w-N)+p,y2:d*(g-w-N)+f},style:C,silent:!0});"auto"===C.stroke&&P.setStyle({stroke:i(k/b)}),h.add(P)}if(_.get("show")){var N=_.get("distance")+L,O=gb(Fe(k/b*(m-y)+y),_.get("formatter")),R=i(k/b),E=c*(g-w-N)+p,V=d*(g-w-N)+f,z=_.get("rotate"),B=0;"radial"===z?(B=-I+2*Math.PI)>Math.PI/2&&(B+=Math.PI):"tangential"===z?B=-I-Math.PI/2:u(z)&&(B=z*Math.PI/180),0===B?h.add(new Q({style:Po(_,{text:O,x:E,y:V,verticalAlign:d<-.8?"top":d>.8?"bottom":"middle",align:c<-.4?"left":c>.4?"right":"center"},{inheritColor:R}),silent:!0})):h.add(new Q({style:Po(_,{text:O,x:E,y:V,verticalAlign:"middle",align:"center"},{inheritColor:R}),silent:!0,originX:E,originY:V,rotation:B}))}if(x.get("show")&&k!==b){N=(N=x.get("distance"))?N+l:l;for(var G=0;G<=S;G++){c=Math.cos(I),d=Math.sin(I);var F=new W({shape:{x1:c*(g-N)+p,y1:d*(g-N)+f,x2:c*(g-M-N)+p,y2:d*(g-M-N)+f},silent:!0,style:A});"auto"===A.stroke&&F.setStyle({stroke:i((k+G/S)/b)}),h.add(F),I+=T}I-=T}else I+=D}},e.prototype._renderPointer=function(t,e,n,i,o,r,a,s,l){var u=this.group,c=this._data,d=this._progressEls,h=[],p=t.get(["pointer","show"]),g=t.getModel("progress"),y=g.get("show"),m=t.getData(),v=m.mapDimension("value"),x=+t.get("min"),_=+t.get("max"),S=[x,_],w=[r,a];function M(e,n){var i,r=m.getItemModel(e).getModel("pointer"),a=Ge(r.get("width"),o.r),s=Ge(r.get("length"),o.r),l=t.get(["pointer","icon"]),u=r.get("offsetCenter"),c=Ge(u[0],o.r),d=Ge(u[1],o.r),h=r.get("keepAspect");return(i=l?gc(l,c-a/2,d-s,a,s,null,h):new fb({shape:{angle:-Math.PI/2,width:a,r:s,x:c,y:d}})).rotation=-(n+Math.PI/2),i.x=o.cx,i.y=o.cy,i}function I(t,e){var n=g.get("roundCap")?xg:V,i=g.get("overlap"),a=i?g.get("width"):l/m.count(),u=i?o.r-a:o.r-(t+1)*a,c=i?o.r:o.r-t*a,d=new n({shape:{startAngle:r,endAngle:e,cx:o.cx,cy:o.cy,clockwise:s,r0:u,r:c}});return i&&(d.z2=Be(m.get(v,t),[x,_],[100,0],!0)),d}(y||p)&&(m.diff(c).add(function(e){var n=m.get(v,e);if(p){var i=M(e,r);Xi(i,{rotation:-((isNaN(+n)?w[0]:Be(n,S,w,!0))+Math.PI/2)},t),u.add(i),m.setItemGraphicEl(e,i)}if(y){var o=I(e,r),a=g.get("clip");Xi(o,{shape:{endAngle:Be(n,S,w,a)}},t),u.add(o),Zn(t.seriesIndex,m.dataType,e,o),h[e]=o}}).update(function(e,n){var i=m.get(v,e);if(p){var o=c.getItemGraphicEl(n),a=o?o.rotation:r,s=M(e,a);s.rotation=a,Zi(s,{rotation:-((isNaN(+i)?w[0]:Be(i,S,w,!0))+Math.PI/2)},t),u.add(s),m.setItemGraphicEl(e,s)}if(y){var l=d[n],f=I(e,l?l.shape.endAngle:r),x=g.get("clip");Zi(f,{shape:{endAngle:Be(i,S,w,x)}},t),u.add(f),Zn(t.seriesIndex,m.dataType,e,f),h[e]=f}}).execute(),m.each(function(t){var e=m.getItemModel(t),n=e.getModel("emphasis"),o=n.get("focus"),r=n.get("blurScope"),a=n.get("disabled");if(p){var s=m.getItemGraphicEl(t),l=m.getItemVisual(t,"style"),u=l.fill;if(s instanceof b){var c=s.style;s.useStyle(f({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},l))}else s.useStyle(l),"pointer"!==s.type&&s.setColor(u);s.setStyle(e.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===s.style.fill&&s.setStyle("fill",i(Be(m.get(v,t),S,[0,1],!0))),s.z2EmphasisLift=0,zi(s,e),Oi(s,o,r,a)}if(y){var d=h[t];d.useStyle(m.getItemVisual(t,"style")),d.setStyle(e.getModel(["progress","itemStyle"]).getItemStyle()),d.z2EmphasisLift=0,zi(d,e),Oi(d,o,r,a)}}),this._progressEls=h)},e.prototype._renderAnchor=function(t,e){var n=t.getModel("anchor");if(n.get("show")){var i=n.get("size"),o=n.get("icon"),r=n.get("offsetCenter"),a=n.get("keepAspect"),s=gc(o,e.cx-i/2+Ge(r[0],e.r),e.cy-i/2+Ge(r[1],e.r),i,i,null,a);s.z2=n.get("showAbove")?1:0,s.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(s)}},e.prototype._renderTitleAndDetail=function(t,e,n,i,o){var r=this,a=t.getData(),s=a.mapDimension("value"),l=+t.get("min"),u=+t.get("max"),c=new X,d=[],h=[],p=t.isAnimationEnabled(),f=t.get(["pointer","showAbove"]);a.diff(this._data).add(function(t){d[t]=new Q({silent:!0}),h[t]=new Q({silent:!0})}).update(function(t,e){d[t]=r._titleEls[e],h[t]=r._detailEls[e]}).execute(),a.each(function(e){var n=a.getItemModel(e),r=a.get(s,e),g=new X,y=i(Be(r,[l,u],[0,1],!0)),m=n.getModel("title");if(m.get("show")){var v=m.get("offsetCenter"),x=o.cx+Ge(v[0],o.r),_=o.cy+Ge(v[1],o.r);(C=d[e]).attr({z2:f?0:2,style:Po(m,{x:x,y:_,text:a.getName(e),align:"center",verticalAlign:"middle"},{inheritColor:y})}),g.add(C)}var b=n.getModel("detail");if(b.get("show")){var S=b.get("offsetCenter"),w=o.cx+Ge(S[0],o.r),M=o.cy+Ge(S[1],o.r),I=Ge(b.get("width"),o.r),D=Ge(b.get("height"),o.r),T=t.get(["progress","show"])?a.getItemVisual(e,"style").fill:y,C=h[e],A=b.get("formatter");C.attr({z2:f?0:2,style:Po(b,{x:w,y:M,text:gb(r,A),width:isNaN(I)?null:I,height:isNaN(D)?null:D,align:"center",verticalAlign:"middle"},{inheritColor:T})}),Go(C,{normal:b},r,function(t){return gb(t,A)}),p&&Fo(C,e,a,t,{getFormattedLabel:function(t,e,n,i,o,a){return gb(a?a.interpolatedValue:r,A)}}),g.add(C)}c.add(g)}),this.group.add(c),this._titleEls=d,this._detailEls=h},e.type="gauge",e}(au),mb=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="itemStyle",n}return h(e,t),e.prototype.getInitialData=function(t,e){return ny(this,["value"])},e.type="series.gauge",e.defaultOption={
// zlevel: 0,
z:2,colorBy:"data",
// 默认全局居中
center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,
// 最小值
min:0,
// 最大值
max:100,
// 分割段数默认为10
splitNumber:10,
// 坐标轴线
axisLine:{
// 默认显示属性show控制显示与否
show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},
// 坐标轴线
progress:{
// 默认显示属性show控制显示与否
show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},
// 分隔线
splitLine:{
// 默认显示属性show控制显示与否
show:!0,
// 属性length控制线长
length:10,distance:10,
// 属性lineStyle详见lineStyle控制线条样式
lineStyle:{color:"#63677A",width:3,type:"solid"}},
// 坐标轴小标记
axisTick:{
// 属性show控制显示与否默认不显示
show:!0,
// 每份split细分多少段
splitNumber:5,
// 属性length控制线长
length:6,distance:10,
// 属性lineStyle控制线条样式
lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,
// formatter: null,
color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,
// x, y单位px
offsetCenter:[0,"20%"],
// 其余属性默认使用全局文本样式详见TEXTSTYLE
color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],
// x, y单位px
offsetCenter:[0,"40%"],
// formatter: null,
// 其余属性默认使用全局文本样式详见TEXTSTYLE
color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(jl);var vb=["itemStyle","opacity"],xb=
/** @class */function(t){function e(e,n){var i=t.call(this)||this,o=i,r=new G,a=new Q;return o.setTextContent(a),i.setTextGuideLine(r),i.updateData(e,n,!0),i}return h(e,t),e.prototype.updateData=function(t,e,n){var i=this,o=t.hostModel,r=t.getItemModel(e),a=t.getItemLayout(e),s=r.getModel("emphasis"),l=r.get(vb);l=null==l?1:l,n||$i(i),i.useStyle(t.getItemVisual(e,"style")),i.style.lineJoin="round",n?(i.setShape({points:a.points}),i.style.opacity=0,Xi(i,{style:{opacity:l}},o,e)):Zi(i,{style:{opacity:l},shape:{points:a.points}},o,e),zi(i,r),this._updateLabel(t,e),Oi(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))},e.prototype._updateLabel=function(t,e){var n=this,i=this.getTextGuideLine(),o=n.getTextContent(),r=t.hostModel,a=t.getItemModel(e),s=t.getItemLayout(e).label,l=t.getItemVisual(e,"style"),u=l.fill;Lo(
// position will not be used in setLabelStyle
o,ko(a),{labelFetcher:t.hostModel,labelDataIndex:e,defaultOpacity:l.opacity,defaultText:t.getName(e)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}}),n.setTextConfig({local:!0,inside:!!s.inside,insideStroke:u,
// insideFill: 'auto',
outsideFill:u});var c=s.linePoints;i.setShape({points:c}),n.textGuideLineConfig={anchor:c?new J(c[0][0],c[0][1]):null},Zi(o,{style:{x:s.x,y:s.y}},r,e),o.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),ff(n,gf(a),{
// Default use item visual color
stroke:u})},e}(B),_b=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreLabelLineUpdate=!0,n}return h(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),o=this._data,r=this.group;i.diff(o).add(function(t){var e=new xb(i,t);i.setItemGraphicEl(t,e),r.add(e)}).update(function(t,e){var n=o.getItemGraphicEl(e);n.updateData(i,t),r.add(n),i.setItemGraphicEl(t,n)}).remove(function(e){Ji(o.getItemGraphicEl(e),t,e)}).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(au),bb=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new iy(ut(this.getData,this),ut(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.getInitialData=function(t,e){return ny(this,{coordDimensions:["value"],encodeDefaulter:at(Ta,this)})},e.prototype._defaultLabelLine=function(t){hn(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(e){var n=this.getData(),i=t.prototype.getDataParams.call(this,e),o=n.mapDimension("value"),r=n.getSum(o);return i.percent=r?+(n.get(o,e)/r*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={
// zlevel: 0, // 一级层叠
z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,
// width: {totalWidth} - left - right,
// height: {totalHeight} - top - bottom,
// 默认取数据最小最大值
// min: 0,
// max: 100,
minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{
// color: 各异,
width:1}},itemStyle:{
// color: 各异,
borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(jl);function Sb(t,e){t.eachSeriesByType("funnel",function(t){var n=t.getData(),i=n.mapDimension("value"),o=t.get("sort"),r=function(t,e){return na(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e),a=t.get("orient"),s=r.width,l=r.height,u=function(t,e){for(var n=t.mapDimension("value"),i=t.mapArray(n,function(t){return t}),o=[],r="ascending"===e,a=0,s=t.count();a<s;a++)o[a]=a;return g(e)?o.sort(e):"none"!==e&&o.sort(function(t,e){return r?i[t]-i[e]:i[e]-i[t]}),o}(n,o),c=r.x,d=r.y,h="horizontal"===a?[Ge(t.get("minSize"),l),Ge(t.get("maxSize"),l)]:[Ge(t.get("minSize"),s),Ge(t.get("maxSize"),s)],p=n.getDataExtent(i),f=t.get("min"),y=t.get("max");null==f&&(f=Math.min(p[0],0)),null==y&&(y=p[1]);var m=t.get("funnelAlign"),v=t.get("gap"),x=(("horizontal"===a?s:l)-v*(n.count()-1))/n.count(),_=function(t,e){if("horizontal"===a){var o=Be(n.get(i,t)||0,[f,y],h,!0),r=void 0;switch(m){case"top":r=d;break;case"center":r=d+(l-o)/2;break;case"bottom":r=d+(l-o)}return[[e,r],[e,r+o]]}var u,p=Be(n.get(i,t)||0,[f,y],h,!0);switch(m){case"left":u=c;break;case"center":u=c+(s-p)/2;break;case"right":u=c+s-p}return[[u,e],[u+p,e]]};"ascending"===o&&(x=-x,v=-v,"horizontal"===a?c+=s:d+=l,u=u.reverse());for(var b=0;b<u.length;b++){var S=u[b],w=u[b+1],M=n.getItemModel(S);if("horizontal"===a){var I=M.get(["itemStyle","width"]);null==I?I=x:(I=Ge(I,s),"ascending"===o&&(I=-I));var D=_(S,c),T=_(w,c+I);c+=I+v,n.setItemLayout(S,{points:D.concat(T.slice().reverse())})}else{var C=M.get(["itemStyle","height"]);null==C?C=x:(C=Ge(C,l),"ascending"===o&&(C=-C));D=_(S,d),T=_(w,d+C);d+=C+v,n.setItemLayout(S,{points:D.concat(T.slice().reverse())})}}!function(t){var e=t.hostModel.get("orient");t.each(function(n){var i,o,r,a,s=t.getItemModel(n),l=s.getModel("label").get("position"),u=s.getModel("labelLine"),c=t.getItemLayout(n),d=c.points,h="inner"===l||"inside"===l||"center"===l||"insideLeft"===l||"insideRight"===l;if(h)"insideLeft"===l?(o=(d[0][0]+d[3][0])/2+5,r=(d[0][1]+d[3][1])/2,i="left"):"insideRight"===l?(o=(d[1][0]+d[2][0])/2-5,r=(d[1][1]+d[2][1])/2,i="right"):(o=(d[0][0]+d[1][0]+d[2][0]+d[3][0])/4,r=(d[0][1]+d[1][1]+d[2][1]+d[3][1])/4,i="center"),a=[[o,r],[o,r]];else{var p=void 0,f=void 0,g=void 0,y=void 0,m=u.get("length");"left"===l?(p=(d[3][0]+d[0][0])/2,f=(d[3][1]+d[0][1])/2,o=(g=p-m)-5,i="right"):"right"===l?(p=(d[1][0]+d[2][0])/2,f=(d[1][1]+d[2][1])/2,o=(g=p+m)+5,i="left"):"top"===l?(p=(d[3][0]+d[0][0])/2,r=(y=(f=(d[3][1]+d[0][1])/2)-m)-5,i="center"):"bottom"===l?(p=(d[1][0]+d[2][0])/2,r=(y=(f=(d[1][1]+d[2][1])/2)+m)+5,i="center"):"rightTop"===l?(p="horizontal"===e?d[3][0]:d[1][0],f="horizontal"===e?d[3][1]:d[1][1],"horizontal"===e?(r=(y=f-m)-5,i="center"):(o=(g=p+m)+5,i="top")):"rightBottom"===l?(p=d[2][0],f=d[2][1],"horizontal"===e?(r=(y=f+m)+5,i="center"):(o=(g=p+m)+5,i="bottom")):"leftTop"===l?(p=d[0][0],f="horizontal"===e?d[0][1]:d[1][1],"horizontal"===e?(r=(y=f-m)-5,i="center"):(o=(g=p-m)-5,i="right")):"leftBottom"===l?(p="horizontal"===e?d[1][0]:d[3][0],f="horizontal"===e?d[1][1]:d[2][1],"horizontal"===e?(r=(y=f+m)+5,i="center"):(o=(g=p-m)-5,i="right")):(p=(d[1][0]+d[2][0])/2,f=(d[1][1]+d[2][1])/2,"horizontal"===e?(r=(y=f+m)+5,i="center"):(o=(g=p+m)+5,i="left")),"horizontal"===e?o=g=p:r=y=f,a=[[p,f],[g,y]]}c.label={linePoints:a,x:o,y:r,verticalAlign:"middle",textAlign:i,inside:h}})}(n)})}var wb=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._dataGroup=new X,n._initialized=!1,n}return h(e,t),e.prototype.init=function(){this.group.add(this._dataGroup)},e.prototype.render=function(t,e,n,i){this._progressiveEls=null;var o=this._dataGroup,r=t.getData(),a=this._data,s=t.coordinateSystem,l=s.dimensions,u=Db(t);if(r.diff(a).add(function(t){Tb(Ib(r,o,t,l,s),r,t,u)}).update(function(e,n){var i=a.getItemGraphicEl(n),o=Mb(r,e,l,s);r.setItemGraphicEl(e,i),Zi(i,{shape:{points:o}},t,e),$i(i),Tb(i,r,e,u)}).remove(function(t){var e=a.getItemGraphicEl(t);o.remove(e)}).execute(),!this._initialized){this._initialized=!0;var c=function(t,e,n){var i=t.model,o=t.getRect(),r=new F({shape:{x:o.x,y:o.y,width:o.width,height:o.height}}),a="horizontal"===i.get("layout")?"width":"height";return r.setShape(a,0),Xi(r,{shape:{width:o.width,height:o.height}},e,n),r}(s,t,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(c)}this._data=r},e.prototype.incrementalPrepareRender=function(t,e,n){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},e.prototype.incrementalRender=function(t,e,n){for(var i=e.getData(),o=e.coordinateSystem,r=o.dimensions,a=Db(e),s=this._progressiveEls=[],l=t.start;l<t.end;l++){var u=Ib(i,this._dataGroup,l,r,o);u.incremental=!0,Tb(u,i,l,a),s.push(u)}},e.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},e.type="parallel",e}(au);function Mb(t,e,n,i){for(var o=[],r=0;r<n.length;r++){var a=n[r],s=t.get(t.mapDimension(a),e);Cb(s,i.getAxis(a).type)||o.push(i.dataToPoint(s,a))}return o}function Ib(t,e,n,i,o){var r=Mb(t,n,i,o),a=new G({shape:{points:r},
// silent: true,
z2:10});return e.add(a),t.setItemGraphicEl(n,a),a}function Db(t){var e=t.get("smooth",!0);return!0===e&&(e=.3),e=en(e),Mt(e)&&(e=0),{smooth:e}}function Tb(t,e,n,i){t.useStyle(e.getItemVisual(n,"style")),t.style.fill=null,t.setShape("smooth",i.smooth);var o=e.getItemModel(n),r=o.getModel("emphasis");zi(t,o,"lineStyle"),Oi(t,r.get("focus"),r.get("blurScope"),r.get("disabled"))}function Cb(t,e){return"category"===e?null==t:null==t||isNaN(t)}var Ab=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="lineStyle",n.visualDrawType="stroke",n}return h(e,t),e.prototype.getInitialData=function(t,e){return ch(null,this,{useEncodeDefaulter:ut(Lb,null,this)})},e.prototype.getRawIndicesByActiveState=function(t){var e=this.coordinateSystem,n=this.getData(),i=[];return e.eachActiveState(n,function(e,o){t===e&&i.push(n.getRawIndex(o))}),i},e.type="series.parallel",e.dependencies=["parallel"],e.defaultOption={
// zlevel: 0,
z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},e}(jl);function Lb(t){var e=t.ecModel.getComponent("parallel",t.get("parallelIndex"));if(e){var n={};return s(e.dimensions,function(t){var e=+t.replace("dim","");n[t]=e}),n}}var kb=["lineStyle","opacity"],Pb={seriesType:"parallel",reset:function(t,e){var n=t.coordinateSystem,i={normal:t.get(["lineStyle","opacity"]),active:t.get("activeOpacity"),inactive:t.get("inactiveOpacity")};return{progress:function(t,e){n.eachActiveState(e,function(t,n){var o=i[t];if("normal"===t&&e.hasItemOption){var r=e.getItemModel(n).get(kb,!0);null!=r&&(o=r)}e.ensureUniqueItemVisual(n,"style").opacity=o},t.start,t.end)}}}};function Nb(t){!function(t){if(t.parallel)return;var e=!1;s(t.series,function(t){t&&"parallel"===t.type&&(e=!0)}),e&&(t.parallel=[{}])}(t),function(t){var e=dn(t.parallelAxis);s(e,function(e){if(r(e)){var n=e.parallelIndex||0,i=dn(t.parallel)[n];i&&i.parallelAxisDefault&&et(e,i.parallelAxisDefault,!1)}})}(t)}var Ob=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.render=function(t,e,n){this._model=t,this._api=n,this._handlers||(this._handlers={},s(Rb,function(t,e){n.getZr().on(e,this._handlers[e]=ut(t,this))},this)),yu(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},e.prototype.dispose=function(t,e){mu(this,"_throttledDispatchExpand"),s(this._handlers,function(t,n){e.getZr().off(n,t)}),this._handlers=null},e.prototype._throttledDispatchExpand=function(t){this._dispatchExpand(t)},e.prototype._dispatchExpand=function(t){t&&this._api.dispatchAction(f({type:"parallelAxisExpand"},t))},e.type="parallel",e}(nu),Rb={mousedown:function(t){Eb(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(Eb(this,"click")&&e){var n=[t.offsetX,t.offsetY];if(Math.pow(e[0]-n[0],2)+Math.pow(e[1]-n[1],2)>5)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==i.behavior&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&Eb(this,"mousemove")){var e=this._model,n=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),i=n.behavior;"jump"===i&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===i?null:{axisExpandWindow:n.axisExpandWindow,
// Jumping uses animation, and sliding suppresses animation.
animation:"jump"===i?null:{duration:0}})}}};function Eb(t,e){var n=t._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===e}var Vb=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var e=this.option;t&&et(e,t,!0),this._initDimensions()},e.prototype.contains=function(t,e){var n=t.get("parallelIndex");return null!=n&&e.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(t){s(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[],n=lt(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(t){return(t.get("parallelIndex")||0)===this.componentIndex},this);s(n,function(n){t.push("dim"+n.get("dim")),e.push(n.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={
// zlevel: 0,
z:0,left:80,top:60,right:80,bottom:60,
// width: {totalWidth} - left - right,
// height: {totalHeight} - top - bottom,
layout:"horizontal",
// FIXME
// naming?
axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,
// [out, in, jumpTarget]. In percentage. If use [null, 0.05], null means full.
// Do not doc to user until necessary.
axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(ua),zb=
/** @class */function(t){function e(e,n,i,o,r){var a=t.call(this,e,n,i)||this;return a.type=o||"value",a.axisIndex=r,a}return h(e,t),e.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},e}(Hp);function Bb(t,e,n,i,o,r){t=t||0;var a=n[1]-n[0];if(null!=o&&(o=Fb(o,[0,a])),null!=r&&(r=Math.max(r,null!=o?o:0)),"all"===i){var s=Math.abs(e[1]-e[0]);s=Fb(s,[0,a]),o=r=Fb(s,[o,r]),i=0}e[0]=Fb(e[0],n),e[1]=Fb(e[1],n);var l=Gb(e,i);e[i]+=t;var u,c=o||0,d=n.slice();return l.sign<0?d[0]+=c:d[1]-=c,e[i]=Fb(e[i],d),u=Gb(e,i),null!=o&&(u.sign!==l.sign||u.span<o)&&(e[1-i]=e[i]+l.sign*o),u=Gb(e,i),null!=r&&u.span>r&&(e[1-i]=e[i]+u.sign*r),e}function Gb(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:n>0?-1:n<0?1:e?-1:1}}function Fb(t,e){return Math.min(null!=e[1]?e[1]:Infinity,Math.max(null!=e[0]?e[0]:-Infinity,t))}var Wb=s,Hb=Math.min,Yb=Math.max,Ub=Math.floor,Zb=Math.ceil,Xb=Fe,jb=Math.PI,qb=
/** @class */function(){function t(t,e,n){this.type="parallel",this._axesMap=a(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,n)}return t.prototype._init=function(t,e,n){var i=t.dimensions,o=t.parallelAxisIndex;Wb(i,function(t,n){var i=o[n],r=e.getComponent("parallelAxis",i),a=this._axesMap.set(t,new zb(t,cp(r),[0,0],r.get("type"),i)),s="category"===a.type;a.onBand=s&&r.get("boundaryGap"),a.inverse=r.get("inverse"),r.axis=a,a.model=r,a.coordinateSystem=r.coordinateSystem=this},this)},t.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},t.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),n=e.axisBase,i=e.layoutBase,o=e.pixelDimIndex,r=t[1-o],a=t[o];return r>=n&&r<=n+e.axisLength&&a>=i&&a<=i+e.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(t,e){e.eachSeries(function(n){if(t.contains(n,e)){var i=n.getData();Wb(this.dimensions,function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(i,i.mapDimension(t)),up(e.scale,e.model)},this)}},this)},t.prototype.resize=function(t,e){this._rect=na(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var t,e=this._model,n=this._rect,i=["x","y"],o=["width","height"],r=e.get("layout"),a="horizontal"===r?0:1,s=n[o[a]],l=[0,s],u=this.dimensions.length,c=Kb(e.get("axisExpandWidth"),l),d=Kb(e.get("axisExpandCount")||0,[0,u]),h=e.get("axisExpandable")&&u>3&&u>d&&d>1&&c>0&&s>0,p=e.get("axisExpandWindow");p?(t=Kb(p[1]-p[0],l),p[1]=p[0]+t):(t=Kb(c*(d-1),l),(p=[c*(e.get("axisExpandCenter")||Ub(u/2))-t/2])[1]=p[0]+t);var f=(s-t)/(u-d);f<3&&(f=0);var g=[Ub(Xb(p[0]/c,1))+1,Zb(Xb(p[1]/c,1))-1],y=f/c*p[0];return{layout:r,pixelDimIndex:a,layoutBase:n[i[a]],layoutLength:s,axisBase:n[i[1-a]],axisLength:n[o[1-a]],axisExpandable:h,axisExpandWidth:c,axisCollapseWidth:f,axisExpandWindow:p,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:y}},t.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),o=i.layout;e.each(function(t){var e=[0,i.axisLength],n=t.inverse?1:0;t.setExtent(e[n],e[1-n])}),Wb(n,function(e,n){var r=(i.axisExpandable?$b:Jb)(n,i),a={horizontal:{x:r.position,y:i.axisLength},vertical:{x:0,y:r.position}},s={horizontal:jb/2,vertical:0},l=[a[o].x+t.x,a[o].y+t.y],u=s[o],c=Jt();Wt(c,c,u),ee(c,c,l),this._axesLayout[e]={position:l,rotation:u,transform:c,axisNameAvailableWidth:r.axisNameAvailableWidth,axisLabelShow:r.axisLabelShow,nameTruncateMaxWidth:r.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},t.prototype.getAxis=function(t){return this._axesMap.get(t)},t.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},t.prototype.eachActiveState=function(t,e,n,i){null==n&&(n=0),null==i&&(i=t.count());var o=this._axesMap,r=this.dimensions,a=[],l=[];s(r,function(e){a.push(t.mapDimension(e)),l.push(o.get(e).model)});for(var u=this.hasAxisBrushed(),c=n;c<i;c++){var d=void 0;if(u){d="active";for(var h=t.getValues(a,c),p=0,f=r.length;p<f;p++){if("inactive"===l[p].getActiveState(h[p])){d="inactive";break}}}else d="normal";e(d,c)}},t.prototype.hasAxisBrushed=function(){for(var t=this.dimensions,e=this._axesMap,n=!1,i=0,o=t.length;i<o;i++)"normal"!==e.get(t[i]).model.getActiveState()&&(n=!0);return n},t.prototype.axisCoordToPoint=function(t,e){return fo([t,0],this._axesLayout[e].transform)},t.prototype.getAxisLayout=function(t){return nt(this._axesLayout[t])},t.prototype.getSlidedAxisExpandWindow=function(t){var e=this._makeLayoutInfo(),n=e.pixelDimIndex,i=e.axisExpandWindow.slice(),o=i[1]-i[0],r=[0,e.axisExpandWidth*(e.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:i};var a,s=t[n]-e.layoutBase-e.axisExpandWindow0Pos,l="slide",u=e.axisCollapseWidth,c=this._model.get("axisExpandSlideTriggerArea"),d=null!=c[0];if(u)d&&u&&s<o*c[0]?(l="jump",a=s-o*c[2]):d&&u&&s>o*(1-c[0])?(l="jump",a=s-o*(1-c[2])):(a=s-o*c[1])>=0&&(a=s-o*(1-c[1]))<=0&&(a=0),(a*=e.axisExpandWidth/u)?Bb(a,i,r,"all"):l="none";else{var h=i[1]-i[0];(i=[Yb(0,r[1]*s/h-h/2)])[1]=Hb(r[1],i[0]+h),i[0]=i[1]-h}return{axisExpandWindow:i,behavior:l}},t}();function Kb(t,e){return Hb(Yb(t,e[0]),e[1])}function Jb(t,e){var n=e.layoutLength/(e.axisCount-1);return{position:n*t,axisNameAvailableWidth:n,axisLabelShow:!0}}function $b(t,e){var n,i,o=e.layoutLength,r=e.axisExpandWidth,a=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,c=!1;return t<l[0]?(n=t*s,i=s):t<=l[1]?(n=e.axisExpandWindow0Pos+t*r-e.axisExpandWindow[0],u=r,c=!0):(n=o-(a-1-t)*s,i=s),{position:n,axisNameAvailableWidth:u,axisLabelShow:c,nameTruncateMaxWidth:i}}var Qb={create:function(t,e){var n=[];return t.eachComponent("parallel",function(i,o){var r=new qb(i,t,e);r.name="parallel_"+o,r.resize(i,e),i.coordinateSystem=r,r.model=i,n.push(r)}),t.eachSeries(function(t){if("parallel"===t.get("coordinateSystem")){var e=t.getReferringComponents("parallel",Tn).models[0];t.coordinateSystem=e.coordinateSystem}}),n}},tS=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.activeIntervals=[],n}return h(e,t),e.prototype.getAreaSelectStyle=function(){return Wn([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},e.prototype.setActiveIntervals=function(t){var e=this.activeIntervals=nt(t);if(e)for(var n=e.length-1;n>=0;n--)We(e[n])},e.prototype.getActiveState=function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(+t))return"inactive";if(1===e.length){var n=e[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,o=e.length;i<o;i++)if(e[i][0]<=t&&t<=e[i][1])return"active";return"inactive"},e}(ua);it(tS,mp);var eS=!0,nS=Math.min,iS=Math.max,oS=Math.pow,rS="globalPan",aS={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},sS={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},lS={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},uS=0,cS=
/** @class */function(t){function e(e){var n=t.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=e,n.group=new X,n._uid="brushController_"+uS++,s(VS,function(t,e){this._handlers[e]=ut(t,this)},n),n}return h(e,t),e.prototype.enableBrush=function(t){return this._brushType&&this._doDisableBrush(),t.brushType&&this._doEnableBrush(t),this},e.prototype._doEnableBrush=function(t){var e=this._zr;this._enableGlobalPan||function(t,e,n){Mm(t)[e]=n}(e,rS,this._uid),s(this._handlers,function(t,n){e.on(n,t)}),this._brushType=t.brushType,this._brushOption=et(nt(lS),t,!0)},e.prototype._doDisableBrush=function(){var t=this._zr;!function(t,e,n){var i=Mm(t);i[e]===n&&(i[e]=null)}(t,rS,this._uid),s(this._handlers,function(e,n){t.off(n,e)}),this._brushType=this._brushOption=null},e.prototype.setPanels=function(t){if(t&&t.length){var e=this._panels={};s(t,function(t){e[t.panelId]=nt(t)})}else this._panels=null;return this},e.prototype.mount=function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({x:t.x||0,y:t.y||0,rotation:t.rotation||0,scaleX:t.scaleX||1,scaleY:t.scaleY||1}),this._transform=e.getLocalTransform(),this},e.prototype.updateCovers=function(t){t=n(t,function(t){return et(nt(lS),t,!0)});var e=this._covers,i=this._covers=[],o=this,r=this._creatingCover;return new kd(e,t,function(t,e){return a(t.__brushOption,e)},a).add(s).update(s).remove(function(t){e[t]!==r&&o.group.remove(e[t])}).execute(),this;function a(t,e){return(null!=t.id?t.id:"\0-brush-index-"+e)+"-"+t.brushType}function s(n,a){var s=t[n];if(null!=a&&e[a]===r)i[n]=e[a];else{var l=i[n]=null!=a?(e[a].__brushOption=s,e[a]):hS(o,dS(o,s));gS(o,l)}}},e.prototype.unmount=function(){return this.enableBrush(!1),xS(this),this._zr.remove(this.group),this},e.prototype.dispose=function(){this.unmount(),this.off()},e}(vt);function dS(t,e){var n=BS[e.brushType].createCover(t,e);return n.__brushOption=e,fS(n,e),t.group.add(n),n}function hS(t,e){var n=yS(e);return n.endCreating&&(n.endCreating(t,e),fS(e,e.__brushOption)),e}function pS(t,e){var n=e.__brushOption;yS(e).updateCoverShape(t,e,n.range,n)}function fS(t,e){var n=e.z;null==n&&(n=1e4),t.traverse(function(t){t.z=n,t.z2=n})}function gS(t,e){yS(e).updateCommon(t,e),pS(t,e)}function yS(t){return BS[t.__brushOption.brushType]}function mS(t,e,n){var i,o=t._panels;if(!o)return eS;var r=t._transform;return s(o,function(t){t.isTargetByCursor(e,n,r)&&(i=t)}),i}function vS(t,e){var n=t._panels;if(!n)return eS;var i=e.__brushOption.panelId;return null!=i?n[i]:eS}function xS(t){var e=t._covers,n=e.length;return s(e,function(e){t.group.remove(e)},t),e.length=0,!!n}function _S(t,e){var i=n(t._covers,function(t){var e=t.__brushOption,n=nt(e.range);return{brushType:e.brushType,panelId:e.panelId,range:n}});t.trigger("brush",{areas:i,isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function bS(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function SS(t,e,n,i){var o=new X;return o.add(new F({name:"main",style:DS(n),silent:!0,draggable:!0,cursor:"move",drift:at(AS,t,e,o,["n","s","w","e"]),ondragend:at(_S,e,{isEnd:!0})})),s(i,function(n){o.add(new F({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:at(AS,t,e,o,n),ondragend:at(_S,e,{isEnd:!0})}))}),o}function wS(t,e,n,i){var o=i.brushStyle.lineWidth||0,r=iS(o,6),a=n[0][0],s=n[1][0],l=a-o/2,u=s-o/2,c=n[0][1],d=n[1][1],h=c-r+o/2,p=d-r+o/2,f=c-a,g=d-s,y=f+o,m=g+o;IS(t,e,"main",a,s,f,g),i.transformable&&(IS(t,e,"w",l,u,r,m),IS(t,e,"e",h,u,r,m),IS(t,e,"n",l,u,y,r),IS(t,e,"s",l,p,y,r),IS(t,e,"nw",l,u,r,r),IS(t,e,"ne",h,u,r,r),IS(t,e,"sw",l,p,r,r),IS(t,e,"se",h,p,r,r))}function MS(t,e){var n=e.__brushOption,i=n.transformable,o=e.childAt(0);o.useStyle(DS(n)),o.attr({silent:!i,cursor:i?"move":"default"}),s([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(n){var o=e.childOfName(n.join("")),r=1===n.length?CS(t,n[0]):function(t,e){var n=[CS(t,e[0]),CS(t,e[1])];return("e"===n[0]||"w"===n[0])&&n.reverse(),n.join("")}(t,n);o&&o.attr({silent:!i,invisible:!i,cursor:i?sS[r]+"-resize":null})})}function IS(t,e,n,i,o,r,a){var s,l,u,c,d,h=e.childOfName(n);h&&h.setShape((s=PS(t,e,[[i,o],[i+r,o+a]]),l=nS(s[0][0],s[1][0]),u=nS(s[0][1],s[1][1]),c=iS(s[0][0],s[1][0]),d=iS(s[0][1],s[1][1]),{x:l,y:u,width:c-l,height:d-u}))}function DS(t){return C({strokeNoScale:!0},t.brushStyle)}function TS(t,e,n,i){var o=[nS(t,n),nS(e,i)],r=[iS(t,n),iS(e,i)];return[[o[0],r[0]],[o[1],r[1]]]}function CS(t,e){var n=go({w:"left",e:"right",n:"top",s:"bottom"}[e],function(t){return po(t.group)}(t));return{left:"w",right:"e",top:"n",bottom:"s"}[n]}function AS(t,e,n,i,o,r){var a=n.__brushOption,l=t.toRectRange(a.range),u=kS(e,o,r);s(i,function(t){var e=aS[t];l[e[0]][e[1]]+=u[e[0]]}),a.range=t.fromRectRange(TS(l[0][0],l[1][0],l[0][1],l[1][1])),gS(e,n),_S(e,{isEnd:!1})}function LS(t,e,n,i){var o=e.__brushOption.range,r=kS(t,n,i);s(o,function(t){t[0]+=r[0],t[1]+=r[1]}),gS(t,e),_S(t,{isEnd:!1})}function kS(t,e,n){var i=t.group,o=i.transformCoordToLocal(e,n),r=i.transformCoordToLocal(0,0);return[o[0]-r[0],o[1]-r[1]]}function PS(t,e,n){var i=vS(t,e);return i&&i!==eS?i.clipPath(n,t._transform):nt(n)}function NS(t){var e=t.event;e.preventDefault&&e.preventDefault()}function OS(t,e,n){return t.childOfName("main").contain(e,n)}function RS(t,e,n,i){var o,r=t._creatingCover,a=t._creatingPanel,s=t._brushOption;if(t._track.push(n.slice()),function(t){var e=t._track;if(!e.length)return!1;var n=e[e.length-1],i=e[0],o=n[0]-i[0],r=n[1]-i[1];return oS(o*o+r*r,.5)>6}(t)||r){if(a&&!r){"single"===s.brushMode&&xS(t);var l=nt(s);l.brushType=ES(l.brushType,a),l.panelId=a===eS?null:a.panelId,r=t._creatingCover=dS(t,l),t._covers.push(r)}if(r){var u=BS[ES(t._brushType,a)];r.__brushOption.range=u.getCreatingRange(PS(t,r,t._track)),i&&(hS(t,r),u.updateCommon(t,r)),pS(t,r),o={isEnd:i}}}else i&&"single"===s.brushMode&&s.removeOnClick&&mS(t,e,n)&&xS(t)&&(o={isEnd:i,removeOnClick:!0});return o}function ES(t,e){return"auto"===t?e.defaultBrushType:t}var VS={mousedown:function(t){if(this._dragging)zS(this,t);else if(!t.target||!t.target.draggable){NS(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=mS(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,n=t.offsetY,i=this.group.transformCoordToLocal(e,n);if(function(t,e,n){if(
// Check active
t._brushType&&!function(t,e,n){var i=t._zr;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}(t,e.offsetX,e.offsetY)){var i=t._zr,o=t._covers,r=mS(t,e,n);if(!t._dragging)for(var a=0;a<o.length;a++){var s=o[a].__brushOption;if(r&&(r===eS||s.panelId===r.panelId)&&BS[s.brushType].contain(o[a],n[0],n[1]))return}r&&i.setCursorStyle("crosshair")}}(this,t,i),this._dragging){NS(t);var o=RS(this,t,i,!1);o&&_S(this,o)}},mouseup:function(t){zS(this,t)}};function zS(t,e){if(t._dragging){NS(e);var n=e.offsetX,i=e.offsetY,o=t.group.transformCoordToLocal(n,i),r=RS(t,e,o,!0);t._dragging=!1,t._track=[],t._creatingCover=null,r&&_S(t,r)}}var BS={lineX:GS(0),lineY:GS(1),rect:{createCover:function(t,e){function n(t){return t}return SS({toRectRange:n,fromRectRange:n},t,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(t){var e=bS(t);return TS(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,n,i){wS(t,e,n,i)},updateCommon:MS,contain:OS},polygon:{createCover:function(t,e){var n=new X;return n.add(new G({name:"main",style:DS(e),silent:!0})),n},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new B({name:"main",draggable:!0,drift:at(LS,t,e),ondragend:at(_S,t,{isEnd:!0})}))},updateCoverShape:function(t,e,n,i){e.childAt(0).setShape({points:PS(t,e,n)})},updateCommon:MS,contain:OS}};function GS(t){return{createCover:function(e,n){return SS({toRectRange:function(e){var n=[e,[0,100]];return t&&n.reverse(),n},fromRectRange:function(e){return e[t]}},e,n,[[["w"],["e"]],[["n"],["s"]]][t])},getCreatingRange:function(e){var n=bS(e);return[nS(n[0][t],n[1][t]),iS(n[0][t],n[1][t])]},updateCoverShape:function(e,n,i,o){var r,a=vS(e,n);if(a!==eS&&a.getLinearBrushOtherExtent)r=a.getLinearBrushOtherExtent(t);else{var s=e._zr;r=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[i,r];t&&l.reverse(),wS(e,n,l,o)},updateCommon:MS,contain:OS}}function FS(t){return t=YS(t),function(e){return vo(e,t)}}function WS(t,e){return t=YS(t),function(n){var i=null!=e?e:n,o=i?t.width:t.height,r=i?t.x:t.y;return[r,r+(o||0)]}}function HS(t,e,n){var i=YS(t);return function(t,o){return i.contain(o[0],o[1])&&!Pm(t,e,n)}}function YS(t){return U.create(t)}var US=["axisLine","axisTickLabel","axisName"],ZS=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.init=function(e,n){t.prototype.init.apply(this,arguments),(this._brushController=new cS(n.getZr())).on("brush",ut(this._onBrush,this))},e.prototype.render=function(t,e,n,i){if(!function(t,e,n){return n&&"axisAreaSelect"===n.type&&e.findComponents({mainType:"parallelAxis",query:n})[0]===t}(t,e,i)){this.axisModel=t,this.api=n,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new X,this.group.add(this._axisGroup),t.get("show")){var r=function(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}(t,e),a=r.coordinateSystem,l=t.getAreaSelectStyle(),u=l.width,c=t.axis.dim,d=a.getAxisLayout(c),h=f({strokeContainThreshold:u},d),p=new Ey(t,h);s(US,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(h,l,t,r,u,n),mo(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,e,i,o,r,a){var s=i.axis.getExtent(),l=s[1]-s[0],u=Math.min(30,.1*Math.abs(l)),c=U.create({x:s[0],y:-r/2,width:l,height:r});c.x-=u,c.width+=2*u,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:FS(c),isTargetByCursor:HS(c,a,o),getLinearBrushOtherExtent:WS(c,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers(function(t){var e=t.axis;return n(t.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}(i))},e.prototype._onBrush=function(t){var e=t.areas,i=this.axisModel,o=i.axis,r=n(e,function(t){return[o.coordToData(t.range[0],!0),o.coordToData(t.range[1],!0)]});(!i.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:r})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(nu);var XS={type:"axisAreaSelect",event:"axisAreaSelected"};var jS={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function qS(t){t.registerComponentView(Ob),t.registerComponentModel(Vb),t.registerCoordinateSystem("parallel",Qb),t.registerPreprocessor(Nb),t.registerComponentModel(tS),t.registerComponentView(ZS),xy(t,"parallel",tS,jS),function(t){t.registerAction(XS,function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},function(e){e.axis.model.setActiveIntervals(t.intervals)})}),t.registerAction("parallelAxisExpand",function(t,e){e.eachComponent({mainType:"parallel",query:t},function(e){e.setAxisExpand(t)})})}(t)}var KS=
/** @class */
function(){return function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}}(),JS=
/** @class */function(t){function e(e){return t.call(this,e)||this}return h(e,t),e.prototype.getDefaultShape=function(){return new KS},e.prototype.buildPath=function(t,e){var n=e.extent;t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),"vertical"===e.orient?(t.lineTo(e.x2+n,e.y2),t.bezierCurveTo(e.cpx2+n,e.cpy2,e.cpx1+n,e.cpy1,e.x1+n,e.y1)):(t.lineTo(e.x2,e.y2+n),t.bezierCurveTo(e.cpx2,e.cpy2+n,e.cpx1,e.cpy1+n,e.x1,e.y1+n)),t.closePath()},e.prototype.highlight=function(){_i(this)},e.prototype.downplay=function(){bi(this)},e}(y),$S=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._focusAdjacencyDisabled=!1,n}return h(e,t),e.prototype.render=function(t,e,n){var i=this,o=t.getGraph(),r=this.group,a=t.layoutInfo,s=a.width,l=a.height,u=t.getData(),c=t.getData("edge"),d=t.get("orient");this._model=t,r.removeAll(),r.x=a.x,r.y=a.y,o.eachEdge(function(e){var n=new JS,i=Un(n);i.dataIndex=e.dataIndex,i.seriesIndex=t.seriesIndex,i.dataType="edge";var o,a,u,h,p,f,g,y,m=e.getModel(),v=m.getModel("lineStyle"),x=v.get("curveness"),_=e.node1.getLayout(),b=e.node1.getModel(),S=b.get("localX"),w=b.get("localY"),M=e.node2.getLayout(),I=e.node2.getModel(),D=I.get("localX"),T=I.get("localY"),C=e.getLayout();n.shape.extent=Math.max(1,C.dy),n.shape.orient=d,"vertical"===d?(o=(null!=S?S*s:_.x)+C.sy,a=(null!=w?w*l:_.y)+_.dy,u=(null!=D?D*s:M.x)+C.ty,p=o,f=a*(1-x)+(h=null!=T?T*l:M.y)*x,g=u,y=a*x+h*(1-x)):(o=(null!=S?S*s:_.x)+_.dx,a=(null!=w?w*l:_.y)+C.sy,p=o*(1-x)+(u=null!=D?D*s:M.x)*x,f=a,g=o*x+u*(1-x),y=h=(null!=T?T*l:M.y)+C.ty),n.setShape({x1:o,y1:a,x2:u,y2:h,cpx1:p,cpy1:f,cpx2:g,cpy2:y}),n.useStyle(v.getItemStyle()),QS(n.style,d,e);var A=""+m.get("value"),L=ko(m,"edgeLabel");Lo(n,L,{labelFetcher:{getFormattedLabel:function(e,n,i,o,r,a){return t.getFormattedLabel(e,n,"edge",o,
// ensure edgeLabel formatter is provided
// to prevent the inheritance from `label.formatter` of the series
Gt(r,L.normal&&L.normal.get("formatter"),A),a)}},labelDataIndex:e.dataIndex,defaultText:A}),n.setTextConfig({position:"inside"});var k=m.getModel("emphasis");zi(n,m,"lineStyle",function(t){var n=t.getItemStyle();return QS(n,d,e),n}),r.add(n),c.setItemGraphicEl(e.dataIndex,n);var P=k.get("focus");Oi(n,"adjacency"===P?e.getAdjacentDataIndices():"trajectory"===P?e.getTrajectoryDataIndices():P,k.get("blurScope"),k.get("disabled"))}),o.eachNode(function(e){var n=e.getLayout(),i=e.getModel(),o=i.get("localX"),a=i.get("localY"),c=i.getModel("emphasis"),d=i.get(["itemStyle","borderRadius"])||0,h=new F({shape:{x:null!=o?o*s:n.x,y:null!=a?a*l:n.y,width:n.dx,height:n.dy,r:d},style:i.getModel("itemStyle").getItemStyle(),z2:10});Lo(h,ko(i),{labelFetcher:{getFormattedLabel:function(e,n){return t.getFormattedLabel(e,n,"node")}},labelDataIndex:e.dataIndex,defaultText:e.id}),h.disableLabelAnimation=!0,h.setStyle("fill",e.getVisual("color")),h.setStyle("decal",e.getVisual("style").decal),zi(h,i),r.add(h),u.setItemGraphicEl(e.dataIndex,h),Un(h).dataType="node";var p=c.get("focus");Oi(h,"adjacency"===p?e.getAdjacentDataIndices():"trajectory"===p?e.getTrajectoryDataIndices():p,c.get("blurScope"),c.get("disabled"))}),u.eachItemGraphicEl(function(e,o){u.getItemModel(o).get("draggable")&&(e.drift=function(e,r){i._focusAdjacencyDisabled=!0,this.shape.x+=e,this.shape.y+=r,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:u.getRawIndex(o),localX:this.shape.x/s,localY:this.shape.y/l})},e.ondragend=function(){i._focusAdjacencyDisabled=!1},e.draggable=!0,e.cursor="move")}),!this._data&&t.isAnimationEnabled()&&r.setClipPath(function(t,e,n){var i=new F({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return Xi(i,{shape:{width:t.width+20}},e,n),i}(r.getBoundingRect(),t,function(){r.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(au);function QS(e,n,i){switch(e.fill){case"source":e.fill=i.node1.getVisual("color"),e.decal=i.node1.getVisual("style").decal;break;case"target":e.fill=i.node2.getVisual("color"),e.decal=i.node2.getVisual("style").decal;break;case"gradient":var o=i.node1.getVisual("color"),r=i.node2.getVisual("color");t(o)&&t(r)&&(e.fill=new q(0,0,+("horizontal"===n),+("vertical"===n),[{color:o,offset:0},{color:r,offset:1}]))}}var tw=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.getInitialData=function(t,e){var n=t.edges||t.links||[],i=t.data||t.nodes||[],o=t.levels||[];this.levelModels=[];for(var r=this.levelModels,a=0;a<o.length;a++)null!=o[a].depth&&o[a].depth>=0&&(r[o[a].depth]=new tr(o[a],this,e));return cb(i,n,this,!0,function(t,e){t.wrapMethod("getItemModel",function(t,e){var n=t.parentModel,i=n.getData().getItemLayout(e);if(i){var o=i.depth,r=n.levelModels[o];r&&(t.parentModel=r)}return t}),e.wrapMethod("getItemModel",function(t,e){var n=t.parentModel,i=n.getGraph().getEdgeByIndex(e).node1.getLayout();if(i){var o=i.depth,r=n.levelModels[o];r&&(t.parentModel=r)}return t})}).data},e.prototype.setNodePosition=function(t,e){var n=(this.option.data||this.option.nodes)[t];n.localX=e[0],n.localY=e[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,e,n){function i(t){return isNaN(t)||null==t}if("edge"===n){var o=this.getDataParams(t,n),r=o.data,a=o.value;return Pl("nameValue",{name:r.source+" -- "+r.target,value:a,noValue:i(a)})}var s=this.getGraph().getNodeByIndex(t).getLayout().value,l=this.getDataParams(t,n).data.name;return Pl("nameValue",{name:null!=l?l+"":null,value:s,noValue:i(s)})},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(e,n){var i=t.prototype.getDataParams.call(this,e,n);if(null==i.value&&"node"===n){var o=this.getGraph().getNodeByIndex(e).getLayout().value;i.value=o}return i},e.type="series.sankey",e.defaultOption={
// zlevel: 0,
z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(jl);function ew(t,e){t.eachSeriesByType("sankey",function(t){var n=t.get("nodeWidth"),i=t.get("nodeGap"),o=function(t,e){return na(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=o;var r=o.width,a=o.height,l=t.getGraph(),u=l.nodes,c=l.edges;!function(t){s(t,function(t){var e=dw(t.outEdges,cw),n=dw(t.inEdges,cw),i=t.getValue()||0,o=Math.max(e,n,i);t.setLayout({value:o},!0)})}(u),function(t,e,n,i,o,r,a,l,u){(function(t,e,n,i,o,r,a){for(var l=[],u=[],c=[],d=[],h=0,p=0;p<e.length;p++)l[p]=1;for(p=0;p<t.length;p++)u[p]=t[p].inEdges.length,0===u[p]&&c.push(t[p]);var f=-1;for(;c.length;){for(var g=0;g<c.length;g++){var y=c[g],m=y.hostGraph.data.getRawDataItem(y.dataIndex),v=null!=m.depth&&m.depth>=0;v&&m.depth>f&&(f=m.depth),y.setLayout({depth:v?m.depth:h},!0),"vertical"===r?y.setLayout({dy:n},!0):y.setLayout({dx:n},!0);for(var x=0;x<y.outEdges.length;x++){var _=y.outEdges[x];l[e.indexOf(_)]=0;var b=_.node2;0===--u[t.indexOf(b)]&&d.indexOf(b)<0&&d.push(b)}}++h,c=d,d=[]}for(p=0;p<l.length;p++)if(1===l[p])throw new Error("Sankey is a DAG, the original data has cycle!");var S=f>h-1?f:h-1;a&&"left"!==a&&function(t,e,n,i){if("right"===e){for(var o=[],r=t,a=0;r.length;){for(var l=0;l<r.length;l++){var u=r[l];u.setLayout({skNodeHeight:a},!0);for(var c=0;c<u.inEdges.length;c++){var d=u.inEdges[c];o.indexOf(d.node1)<0&&o.push(d.node1)}}r=o,o=[],++a}s(t,function(t){nw(t)||t.setLayout({depth:Math.max(0,i-t.getLayout().skNodeHeight)},!0)})}else"justify"===e&&function(t,e){s(t,function(t){nw(t)||t.outEdges.length||t.setLayout({depth:e},!0)})}(t,i)}(t,a,0,S);var w="vertical"===r?(o-n)/S:(i-n)/S;!function(t,e,n){s(t,function(t){var i=t.getLayout().depth*e;"vertical"===n?t.setLayout({y:i},!0):t.setLayout({x:i},!0)})}(t,w,r)})(t,e,n,o,r,l,u),function(t,e,n,i,o,r,a){var l=function(t,e){var n=[],i="vertical"===e?"y":"x",o=kn(t,function(t){return t.getLayout()[i]});return o.keys.sort(function(t,e){return t-e}),s(o.keys,function(t){n.push(o.buckets.get(t))}),n}(t,a);(function(t,e,n,i,o,r){var a=Infinity;s(t,function(t){var e=t.length,l=0;s(t,function(t){l+=t.getLayout().value});var u="vertical"===r?(i-(e-1)*o)/l:(n-(e-1)*o)/l;u<a&&(a=u)}),s(t,function(t){s(t,function(t,e){var n=t.getLayout().value*a;"vertical"===r?(t.setLayout({x:e},!0),t.setLayout({dx:n},!0)):(t.setLayout({y:e},!0),t.setLayout({dy:n},!0))})}),s(e,function(t){var e=+t.getValue()*a;t.setLayout({dy:e},!0)})})(l,e,n,i,o,a),iw(l,o,n,i,a);for(var u=1;r>0;r--)ow(l,u*=.99,a),iw(l,o,n,i,a),hw(l,u,a),iw(l,o,n,i,a)}(t,e,r,o,i,a,l),function(t,e){var n="vertical"===e?"x":"y";s(t,function(t){t.outEdges.sort(function(t,e){return t.node2.getLayout()[n]-e.node2.getLayout()[n]}),t.inEdges.sort(function(t,e){return t.node1.getLayout()[n]-e.node1.getLayout()[n]})}),s(t,function(t){var e=0,n=0;s(t.outEdges,function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy}),s(t.inEdges,function(t){t.setLayout({ty:n},!0),n+=t.getLayout().dy})})}(t,l)}(u,c,n,i,r,a,0!==lt(u,function(t){return 0===t.getLayout().value}).length?0:t.get("layoutIterations"),t.get("orient"),t.get("nodeAlign"))})}function nw(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&e.depth>=0}function iw(t,e,n,i,o){var r="vertical"===o?"x":"y";s(t,function(t){var a,s,l;t.sort(function(t,e){return t.getLayout()[r]-e.getLayout()[r]});for(var u=0,c=t.length,d="vertical"===o?"dx":"dy",h=0;h<c;h++)(l=u-(s=t[h]).getLayout()[r])>0&&(a=s.getLayout()[r]+l,"vertical"===o?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[r]+s.getLayout()[d]+e;if((l=u-e-("vertical"===o?i:n))>0){a=s.getLayout()[r]-l,"vertical"===o?s.setLayout({x:a},!0):s.setLayout({y:a},!0),u=a;for(h=c-2;h>=0;--h)(l=(s=t[h]).getLayout()[r]+s.getLayout()[d]+e-u)>0&&(a=s.getLayout()[r]-l,"vertical"===o?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[r]}})}function ow(t,e,n){s(t.slice().reverse(),function(t){s(t,function(t){if(t.outEdges.length){var i=dw(t.outEdges,rw,n)/dw(t.outEdges,cw);if(isNaN(i)){var o=t.outEdges.length;i=o?dw(t.outEdges,aw,n)/o:0}if("vertical"===n){var r=t.getLayout().x+(i-uw(t,n))*e;t.setLayout({x:r},!0)}else{var a=t.getLayout().y+(i-uw(t,n))*e;t.setLayout({y:a},!0)}}})})}function rw(t,e){return uw(t.node2,e)*t.getValue()}function aw(t,e){return uw(t.node2,e)}function sw(t,e){return uw(t.node1,e)*t.getValue()}function lw(t,e){return uw(t.node1,e)}function uw(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function cw(t){return t.getValue()}function dw(t,e,n){for(var i=0,o=t.length,r=-1;++r<o;){var a=+e(t[r],n);isNaN(a)||(i+=a)}return i}function hw(t,e,n){s(t,function(t){s(t,function(t){if(t.inEdges.length){var i=dw(t.inEdges,sw,n)/dw(t.inEdges,cw);if(isNaN(i)){var o=t.inEdges.length;i=o?dw(t.inEdges,lw,n)/o:0}if("vertical"===n){var r=t.getLayout().x+(i-uw(t,n))*e;t.setLayout({x:r},!0)}else{var a=t.getLayout().y+(i-uw(t,n))*e;t.setLayout({y:a},!0)}}})})}function pw(t){t.eachSeriesByType("sankey",function(t){var e=t.getGraph(),n=e.nodes,i=e.edges;if(n.length){var o=Infinity,r=-Infinity;s(n,function(t){var e=t.getLayout().value;e<o&&(o=e),e>r&&(r=e)}),s(n,function(e){var n=new kx({type:"color",mappingMethod:"linear",dataExtent:[o,r],visual:t.get("color")}).mapValueToVisual(e.getLayout().value),i=e.getModel().get(["itemStyle","color"]);null!=i?(e.setVisual("color",i),e.setVisual("style",{fill:i})):(e.setVisual("color",n),e.setVisual("style",{fill:n}))})}i.length&&s(i,function(t){var e=t.getModel().get("lineStyle");t.setVisual("style",e)})})}var fw=
/** @class */function(){function t(){}return t.prototype._hasEncodeRule=function(t){var e=this.getEncode();return e&&null!=e.get(t)},t.prototype.getInitialData=function(t,e){var n,i,r=e.getComponent("xAxis",this.get("xAxisIndex")),a=e.getComponent("yAxis",this.get("yAxisIndex")),l=r.get("type"),u=a.get("type");"category"===l?(t.layout="horizontal",n=r.getOrdinalMeta(),i=!this._hasEncodeRule("x")):"category"===u?(t.layout="vertical",n=a.getOrdinalMeta(),i=!this._hasEncodeRule("y")):t.layout=t.layout||"horizontal";var c=["x","y"],d="horizontal"===t.layout?0:1,h=this._baseAxisDim=c[d],p=c[1-d],g=[r,a],y=g[d].get("type"),m=g[1-d].get("type"),v=t.data;if(v&&i){var x=[];s(v,function(t,e){var n;o(t)?(n=t.slice(),t.unshift(e)):o(t.value)?((n=f({},t)).value=n.value.slice(),t.value.unshift(e)):n=t,x.push(n)}),t.data=x}var _=this.defaultValueDimensions,b=[{name:h,type:Od(y),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:p,type:Od(m),dimsDef:_.slice()}];return ny(this,{coordDimensions:b,dimensionsCount:_.length+1,encodeDefaulter:at(Da,b,this)})},t.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},t}(),gw=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],n.visualDrawType="stroke",n}return h(e,t),e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={
// zlevel: 0,
z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(jl);it(gw,fw,!0);var yw=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),o=this.group,r=this._data;this._data||o.removeAll();var a="horizontal"===t.get("layout")?1:0;i.diff(r).add(function(t){if(i.hasValue(t)){var e=xw(i.getItemLayout(t),i,t,a,!0);i.setItemGraphicEl(t,e),o.add(e)}}).update(function(t,e){var n=r.getItemGraphicEl(e);if(i.hasValue(t)){var s=i.getItemLayout(t);n?($i(n),_w(s,n,i,t)):n=xw(s,i,t,a),o.add(n),i.setItemGraphicEl(t,n)}else o.remove(n)}).remove(function(t){var e=r.getItemGraphicEl(t);e&&o.remove(e)}).execute(),this._data=i},e.prototype.remove=function(t){var e=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(t){t&&e.remove(t)})},e.type="boxplot",e}(au),mw=
/** @class */
function(){return function(){}}(),vw=
/** @class */function(t){function e(e){var n=t.call(this,e)||this;return n.type="boxplotBoxPath",n}return h(e,t),e.prototype.getDefaultShape=function(){return new mw},e.prototype.buildPath=function(t,e){var n=e.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();i<n.length;i++)t.moveTo(n[i][0],n[i][1]),i++,t.lineTo(n[i][0],n[i][1])},e}(y);function xw(t,e,n,i,o){var r=t.ends,a=new vw({shape:{points:o?bw(r,i,t):r}});return _w(t,a,e,n,o),a}function _w(t,e,n,i,o){var r=n.hostModel;(0,Do[o?"initProps":"updateProps"])(e,{shape:{points:t.ends}},r,i),e.useStyle(n.getItemVisual(i,"style")),e.style.strokeNoScale=!0,e.z2=100;var a=n.getItemModel(i),s=a.getModel("emphasis");zi(e,a),Oi(e,s.get("focus"),s.get("blurScope"),s.get("disabled"))}function bw(t,e,i){return n(t,function(t){return(t=t.slice())[e]=i.initBaseline,t})}var Sw=s;function ww(t){var e=function(t){var e=[],n=[];return t.eachSeriesByType("boxplot",function(t){var i=t.getBaseAxis(),o=l(n,i);o<0&&(o=n.length,n[o]=i,e[o]={axis:i,seriesModels:[]}),e[o].seriesModels.push(t)}),e}(t);Sw(e,function(t){var e=t.seriesModels;e.length&&(!function(t){var e,n=t.axis,i=t.seriesModels,r=i.length,a=t.boxWidthList=[],s=t.boxOffsetList=[],l=[];if("category"===n.type)e=n.getBandWidth();else{var u=0;Sw(i,function(t){u=Math.max(u,t.getData().count())});var c=n.getExtent();e=Math.abs(c[1]-c[0])/u}Sw(i,function(t){var n=t.get("boxWidth");o(n)||(n=[n,n]),l.push([Ge(n[0],e)||0,Ge(n[1],e)||0])});var d=.8*e-2,h=d/r*.3,p=(d-h*(r-1))/r,f=p/2-d/2;Sw(i,function(t,e){s.push(f),f+=h+p,a.push(Math.min(Math.max(p,l[e][0]),l[e][1]))})}(t),Sw(e,function(e,n){!function(t,e,n){var i=t.coordinateSystem,o=t.getData(),r=n/2,a="horizontal"===t.get("layout")?0:1,s=1-a,l=["x","y"],u=o.mapDimension(l[a]),c=o.mapDimensionsAll(l[s]);if(null==u||c.length<5)return;for(var d=0;d<o.count();d++){var h=o.get(u,d),p=x(h,c[2],d),f=x(h,c[0],d),g=x(h,c[1],d),y=x(h,c[3],d),m=x(h,c[4],d),v=[];_(v,g,!1),_(v,y,!0),v.push(f,g,m,y),b(v,f),b(v,m),b(v,p),o.setItemLayout(d,{initBaseline:p[s],ends:v})}function x(t,n,r){var l,u=o.get(n,r),c=[];return c[a]=t,c[s]=u,isNaN(t)||isNaN(u)?l=[NaN,NaN]:(l=i.dataToPoint(c))[a]+=e,l}function _(t,e,n){var i=e.slice(),o=e.slice();i[a]+=r,o[a]-=r,n?t.push(i,o):t.push(o,i)}function b(t,e){var n=e.slice(),i=e.slice();n[a]-=r,i[a]+=r,t.push(n,i)}}(e,t.boxOffsetList[n],t.boxWidthList[n])}))})}var Mw={type:"echarts:boxplot",transform:function(e){var n=e.upstream;if(n.sourceFormat!==ga){sn("")}var i=function(e,n){for(var i=[],o=[],r=(n=n||{}).boundIQR,a="none"===r||0===r,s=0;s<e.length;s++){var l=We(e[s].slice()),u=Qe(l,.25),c=Qe(l,.5),d=Qe(l,.75),h=l[0],p=l[l.length-1],f=(null==r?1.5:r)*(d-u),y=a?h:Math.max(h,u-f),m=a?p:Math.min(p,d+f),v=n.itemNameFormatter,x=g(v)?v({value:s}):t(v)?v.replace("{value}",s+""):s+"";i.push([x,y,u,c,d,m]);for(var _=0;_<l.length;_++){var b=l[_];if(b<y||b>m){var S=[x,b];o.push(S)}}}return{boxData:i,outliers:o}}(n.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};var Iw=["itemStyle","borderColor"],Dw=["itemStyle","borderColor0"],Tw=["itemStyle","borderColorDoji"],Cw=["itemStyle","color"],Aw=["itemStyle","color0"];function Lw(t,e){return e.get(t>0?Cw:Aw)}function kw(t,e){return e.get(0===t?Tw:t>0?Iw:Dw)}var Pw={seriesType:"candlestick",plan:iu(),
// For legend.
performRawSeries:!0,reset:function(t,e){if(!e.isSeriesFiltered(t))return!t.pipelineContext.large&&{progress:function(t,e){for(var n;null!=(n=t.next());){var i=e.getItemModel(n),o=e.getItemLayout(n).sign,r=i.getItemStyle();r.fill=Lw(o,i),r.stroke=kw(o,i)||r.fill;var a=e.ensureUniqueItemVisual(n,"style");f(a,r)}}}}},Nw=["color","borderColor"],Ow=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.render=function(t,e,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,e,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,e,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},e.prototype.eachRendered=function(t){Io(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t){var e=t.getData(),n=this._data,i=this.group,o=e.getLayout("isSimpleBox"),r=t.get("clip",!0),a=t.coordinateSystem,s=a.getArea&&a.getArea();this._data||i.removeAll(),e.diff(n).add(function(n){if(e.hasValue(n)){var a=e.getItemLayout(n);if(r&&zw(s,a))return;var l=Vw(a,n,!0);Xi(l,{shape:{points:a.ends}},t,n),Bw(l,e,n,o),i.add(l),e.setItemGraphicEl(n,l)}}).update(function(a,l){var u=n.getItemGraphicEl(l);if(e.hasValue(a)){var c=e.getItemLayout(a);r&&zw(s,c)?i.remove(u):(u?(Zi(u,{shape:{points:c.ends}},t,a),$i(u)):u=Vw(c),Bw(u,e,a,o),i.add(u),e.setItemGraphicEl(a,u))}else i.remove(u)}).remove(function(t){var e=n.getItemGraphicEl(t);e&&i.remove(e)}).execute(),this._data=e},e.prototype._renderLarge=function(t){this._clear(),Hw(t,this.group);var e=t.get("clip",!0)?Jf(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,e){for(var n,i=e.getData(),o=i.getLayout("isSimpleBox");null!=(n=t.next());){var r=Vw(i.getItemLayout(n));Bw(r,i,n,o),r.incremental=!0,this.group.add(r),this._progressiveEls.push(r)}},e.prototype._incrementalRenderLarge=function(t,e){Hw(e,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(au),Rw=
/** @class */
function(){return function(){}}(),Ew=
/** @class */function(t){function e(e){var n=t.call(this,e)||this;return n.type="normalCandlestickBox",n}return h(e,t),e.prototype.getDefaultShape=function(){return new Rw},e.prototype.buildPath=function(t,e){var n=e.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},e}(y);function Vw(t,e,n){var i=t.ends;return new Ew({shape:{points:n?Gw(i,t):i},z2:100})}function zw(t,e){for(var n=!0,i=0;i<e.ends.length;i++)if(t.contain(e.ends[i][0],e.ends[i][1])){n=!1;break}return n}function Bw(t,e,n,i){var o=e.getItemModel(n);t.useStyle(e.getItemVisual(n,"style")),t.style.strokeNoScale=!0,t.__simpleBox=i,zi(t,o);var r=e.getItemLayout(n).sign;s(t.states,function(t,e){var n=o.getModel(e),i=Lw(r,n),a=kw(r,n)||i,s=t.style||(t.style={});i&&(s.fill=i),a&&(s.stroke=a)});var a=o.getModel("emphasis");Oi(t,a.get("focus"),a.get("blurScope"),a.get("disabled"))}function Gw(t,e){return n(t,function(t){return(t=t.slice())[1]=e.initBaseline,t})}var Fw=
/** @class */
function(){return function(){}}(),Ww=
/** @class */function(t){function e(e){var n=t.call(this,e)||this;return n.type="largeCandlestickBox",n}return h(e,t),e.prototype.getDefaultShape=function(){return new Fw},e.prototype.buildPath=function(t,e){for(var n=e.points,i=0;i<n.length;)if(this.__sign===n[i++]){var o=n[i++];t.moveTo(o,n[i++]),t.lineTo(o,n[i++])}else i+=3},e}(y);function Hw(t,e,n,i){var o=t.getData().getLayout("largePoints"),r=new Ww({shape:{points:o},__sign:1,ignoreCoarsePointer:!0});e.add(r);var a=new Ww({shape:{points:o},__sign:-1,ignoreCoarsePointer:!0});e.add(a);var s=new Ww({shape:{points:o},__sign:0,ignoreCoarsePointer:!0});e.add(s),Yw(1,r,t),Yw(-1,a,t),Yw(0,s,t),i&&(r.incremental=!0,a.incremental=!0),n&&n.push(r,a)}function Yw(t,e,n,i){var o=kw(t,n)||Lw(t,n),r=n.getModel("itemStyle").getItemStyle(Nw);e.useStyle(r),e.style.fill=null,e.style.stroke=o}var Uw=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],n}return h(e,t),e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,e,n){var i=e.getItemLayout(t);return i&&n.rect(i.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={
// zlevel: 0,
z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,
// xAxisIndex: 0,
// yAxisIndex: 0,
layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,
// borderColor: '#d24040',
// borderColor0: '#398f4f',
borderWidth:1},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(jl);function Zw(t){t&&o(t.series)&&s(t.series,function(t){r(t)&&"k"===t.type&&(t.type="candlestick")})}it(Uw,fw,!0);var Xw={seriesType:"candlestick",plan:iu(),reset:function(t){var e=t.coordinateSystem,i=t.getData(),o=function(t,e){var n,i=t.getBaseAxis(),o="category"===i.type?i.getBandWidth():(n=i.getExtent(),Math.abs(n[1]-n[0])/e.count()),r=Ge(_(t.get("barMaxWidth"),o),o),a=Ge(_(t.get("barMinWidth"),1),o),s=t.get("barWidth");return null!=s?Ge(s,o):Math.max(Math.min(o/2,r),a)}(t,i),r=["x","y"],a=i.getDimensionIndex(i.mapDimension(r[0])),s=n(i.mapDimensionsAll(r[1]),i.getDimensionIndex,i),l=s[0],u=s[1],c=s[2],d=s[3];if(i.setLayout({candleWidth:o,
// The value is experimented visually.
isSimpleBox:o<=1.3}),!(a<0||s.length<4))return{progress:t.pipelineContext.large?function(n,i){var o,r,s=Ch(4*n.count),h=0,p=[],f=[],g=i.getStore(),y=!!t.get(["itemStyle","borderColorDoji"]);for(;null!=(r=n.next());){var m=g.get(a,r),v=g.get(l,r),x=g.get(u,r),_=g.get(c,r),b=g.get(d,r);isNaN(m)||isNaN(_)||isNaN(b)?(s[h++]=NaN,h+=3):(s[h++]=jw(g,r,v,x,u,y),p[0]=m,p[1]=_,o=e.dataToPoint(p,null,f),s[h++]=o?o[0]:NaN,s[h++]=o?o[1]:NaN,p[1]=b,o=e.dataToPoint(p,null,f),s[h++]=o?o[1]:NaN)}i.setLayout("largePoints",s)}:function(t,n){var i,r=n.getStore();for(;null!=(i=t.next());){var s=r.get(a,i),h=r.get(l,i),p=r.get(u,i),f=r.get(c,i),g=r.get(d,i),y=Math.min(h,p),m=Math.max(h,p),v=M(y,s),x=M(m,s),_=M(f,s),b=M(g,s),S=[];I(S,x,0),I(S,v,1),S.push(T(b),T(x),T(_),T(v));var w=!!n.getItemModel(i).get(["itemStyle","borderColorDoji"]);n.setItemLayout(i,{sign:jw(r,i,h,p,u,w),initBaseline:h>p?x[1]:v[1],ends:S,brushRect:D(f,g,s)})}function M(t,n){var i=[];return i[0]=n,i[1]=t,isNaN(n)||isNaN(t)?[NaN,NaN]:e.dataToPoint(i)}function I(t,e,n){var i=e.slice(),r=e.slice();i[0]=ho(i[0]+o/2,1,!1),r[0]=ho(r[0]-o/2,1,!0),n?t.push(i,r):t.push(r,i)}function D(t,e,n){var i=M(t,n),r=M(e,n);return i[0]-=o/2,r[0]-=o/2,{x:i[0],y:i[1],width:o,height:r[1]-i[1]}}function T(t){return t[0]=ho(t[0],1),t}}}}};function jw(t,e,n,i,o,r){return n>i?-1:n<i?1:r?0:e>0?t.get(o,e-1)<=i?1:-1:1}function qw(t,e){var n=e.rippleEffectColor||e.color;t.eachChild(function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?n:null,fill:"fill"===e.brushType?n:null}})})}var Kw=
/** @class */function(t){function e(e,n){var i=t.call(this)||this,o=new Nf(e,n),r=new X;return i.add(o),i.add(r),i.updateData(e,n),i}return h(e,t),e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var e=t.symbolType,n=t.color,i=t.rippleNumber,o=this.childAt(1),r=0;r<i;r++){var a=gc(e,-1,-1,2,2,n);a.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var s=-r/i*t.period+t.effectOffset;a.animate("",!0).when(t.period,{scaleX:t.rippleScale/2,scaleY:t.rippleScale/2}).delay(s).start(),a.animateStyle(!0).when(t.period,{opacity:0}).delay(s).start(),o.add(a)}qw(o,t)},e.prototype.updateEffectAnimation=function(t){for(var e=this._effectCfg,n=this.childAt(1),i=["symbolType","period","rippleScale","rippleNumber"],o=0;o<i.length;o++){var r=i[o];if(e[r]!==t[r])return this.stopEffectAnimation(),void this.startEffectAnimation(t)}qw(n,t)},e.prototype.highlight=function(){_i(this)},e.prototype.downplay=function(){bi(this)},e.prototype.getSymbolType=function(){var t=this.childAt(0);return t&&t.getSymbolType()},e.prototype.updateData=function(t,e){var n=this,i=t.hostModel;this.childAt(0).updateData(t,e);var o=this.childAt(1),r=t.getItemModel(e),a=t.getItemVisual(e,"symbol"),s=yc(t.getItemVisual(e,"symbolSize")),l=t.getItemVisual(e,"style"),u=l&&l.fill,c=r.getModel("emphasis");o.setScale(s),o.traverse(function(t){t.setStyle("fill",u)});var d=mc(t.getItemVisual(e,"symbolOffset"),s);d&&(o.x=d[0],o.y=d[1]);var h=t.getItemVisual(e,"symbolRotate");o.rotation=(h||0)*Math.PI/180||0;var p={};p.showEffectOn=i.get("showEffectOn"),p.rippleScale=r.get(["rippleEffect","scale"]),p.brushType=r.get(["rippleEffect","brushType"]),p.period=1e3*r.get(["rippleEffect","period"]),p.effectOffset=e/t.count(),p.z=i.getShallow("z")||0,p.zlevel=i.getShallow("zlevel")||0,p.symbolType=a,p.color=u,p.rippleEffectColor=r.get(["rippleEffect","color"]),p.rippleNumber=r.get(["rippleEffect","number"]),"render"===p.showEffectOn?(this._effectCfg?this.updateEffectAnimation(p):this.startEffectAnimation(p),this._effectCfg=p):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(t){"emphasis"===t?"render"!==p.showEffectOn&&n.startEffectAnimation(p):"normal"===t&&"render"!==p.showEffectOn&&n.stopEffectAnimation()}),this._effectCfg=p,Oi(this,c.get("focus"),c.get("blurScope"),c.get("disabled"))},e.prototype.fadeOut=function(t){t&&t()},e}(X),Jw=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.init=function(){this._symbolDraw=new zf(Kw)},e.prototype.render=function(t,e,n){var i=t.getData(),o=this._symbolDraw;o.updateData(i,{clipShape:this._getClipShape(t)}),this.group.add(o.group)},e.prototype._getClipShape=function(t){var e=t.coordinateSystem,n=e&&e.getArea&&e.getArea();return t.get("clip",!0)?n:null},e.prototype.updateTransform=function(t,e,n){var i=t.getData();this.group.dirty();var o=dg("").reset(t,e,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout()},e.prototype._updateGroupTransform=function(t){var e=t.coordinateSystem;e&&e.getRoamTransform&&(this.group.transform=xe(e.getRoamTransform()),this.group.decomposeTransform())},e.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0)},e.type="effectScatter",e}(au),$w=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return h(e,t),e.prototype.getInitialData=function(t,e){return ch(null,this,{useEncodeDefaulter:!0})},e.prototype.brushSelector=function(t,e,n){return n.point(e.getItemLayout(t))},e.type="series.effectScatter",e.dependencies=["grid","polar"],e.defaultOption={coordinateSystem:"cartesian2d",
// zlevel: 0,
z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,
// When to show the effect, option: 'render'|'emphasis'
showEffectOn:"render",clip:!0,
// Ripple effect config
rippleEffect:{period:4,
// Scale of ripple
scale:2.5,
// Brush type can be fill or stroke
brushType:"fill",
// Ripple number
number:3},universalTransition:{divideShape:"clone"},
// Cartesian coordinate system
// xAxisIndex: 0,
// yAxisIndex: 0,
// Polar coordinate system
// polarIndex: 0,
// Geo coordinate system
// geoIndex: 0,
// symbol: null, // 图形类型
symbolSize:10},e}(jl);var Qw=
/** @class */function(t){function e(e,n,i){var o=t.call(this)||this;return o.add(o.createLine(e,n,i)),o._updateEffectSymbol(e,n),o}return h(e,t),e.prototype.createLine=function(t,e,n){return new Y_(t,e,n)},e.prototype._updateEffectSymbol=function(t,e){var n=t.getItemModel(e).getModel("effect"),i=n.get("symbolSize"),r=n.get("symbol");o(i)||(i=[i,i]);var a=t.getItemVisual(e,"style"),s=n.get("color")||a&&a.stroke,l=this.childAt(1);this._symbolType!==r&&(this.remove(l),(l=gc(r,-.5,-.5,1,1,s)).z2=100,l.culling=!0,this.add(l)),l&&(l.setStyle("shadowColor",s),l.setStyle(n.getItemStyle(["color"])),l.scaleX=i[0],l.scaleY=i[1],l.setColor(s),this._symbolType=r,this._symbolScale=i,this._updateEffectAnimation(t,n,e))},e.prototype._updateEffectAnimation=function(t,e,n){var i=this.childAt(1);if(i){var o=t.getItemLayout(n),r=1e3*e.get("period"),a=e.get("loop"),s=e.get("roundTrip"),l=e.get("constantSpeed"),u=Ft(e.get("delay"),function(e){return e/t.count()*r/3});if(i.ignore=!0,this._updateAnimationPoints(i,o),l>0&&(r=this._getLineLength(i)/l*1e3),r!==this._period||a!==this._loop||s!==this._roundTrip){i.stopAnimation();var c=void 0;c=g(u)?u(n):u,i.__t>0&&(c=-r*i.__t),this._animateSymbol(i,r,c,a,s)}this._period=r,this._loop=a,this._roundTrip=s}},e.prototype._animateSymbol=function(t,e,n,i,o){if(e>0){t.__t=0;var r=this,a=t.animate("",i).when(o?2*e:e,{__t:o?2:1}).delay(n).during(function(){r._updateSymbolPosition(t)});i||a.done(function(){r.remove(t)}),a.start()}},e.prototype._getLineLength=function(t){return Lt(t.__p1,t.__cp1)+Lt(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},e.prototype.updateData=function(t,e,n){this.childAt(0).updateData(t,e,n),this._updateEffectSymbol(t,e)},e.prototype._updateSymbolPosition=function(t){var e=t.__p1,n=t.__p2,i=t.__cp1,o=t.__t<1?t.__t:2-t.__t,r=[t.x,t.y],a=r.slice(),s=me,l=_e;r[0]=s(e[0],i[0],n[0],o),r[1]=s(e[1],i[1],n[1],o);var u=t.__t<1?l(e[0],i[0],n[0],o):l(n[0],i[0],e[0],1-o),c=t.__t<1?l(e[1],i[1],n[1],o):l(n[1],i[1],e[1],1-o);t.rotation=-Math.atan2(c,u)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==t.__lastT&&t.__lastT<t.__t?(t.scaleY=1.05*Lt(a,r),1===o&&(r[0]=a[0]+(r[0]-a[0])/2,r[1]=a[1]+(r[1]-a[1])/2)):1===t.__lastT?t.scaleY=2*Lt(e,r):t.scaleY=this._symbolScale[1]),t.__lastT=t.__t,t.ignore=!1,t.x=r[0],t.y=r[1]},e.prototype.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var n=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,n,e)},e}(X),tM=
/** @class */function(t){function e(e,n,i){var o=t.call(this)||this;return o._createPolyline(e,n,i),o}return h(e,t),e.prototype._createPolyline=function(t,e,n){var i=t.getItemLayout(e),o=new G({shape:{points:i}});this.add(o),this._updateCommonStl(t,e,n)},e.prototype.updateData=function(t,e,n){var i=t.hostModel;Zi(this.childAt(0),{shape:{points:t.getItemLayout(e)}},i,e),this._updateCommonStl(t,e,n)},e.prototype._updateCommonStl=function(t,e,n){var i=this.childAt(0),o=t.getItemModel(e),r=n&&n.emphasisLineStyle,a=n&&n.focus,s=n&&n.blurScope,l=n&&n.emphasisDisabled;if(!n||t.hasItemOption){var u=o.getModel("emphasis");r=u.getModel("lineStyle").getLineStyle(),l=u.get("disabled"),a=u.get("focus"),s=u.get("blurScope")}i.useStyle(t.getItemVisual(e,"style")),i.style.fill=null,i.style.strokeNoScale=!0,i.ensureState("emphasis").style=r,Oi(this,a,s,l)},e.prototype.updateLayout=function(t,e){this.childAt(0).setShape("points",t.getItemLayout(e))},e}(X),eM=
/** @class */function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._lastFrame=0,e._lastFramePercent=0,e}return h(e,t),e.prototype.createLine=function(t,e,n){return new tM(t,e,n)},e.prototype._updateAnimationPoints=function(t,e){this._points=e;for(var n=[0],i=0,o=1;o<e.length;o++){var r=e[o-1],a=e[o];i+=Lt(r,a),n.push(i)}if(0!==i){for(o=0;o<n.length;o++)n[o]/=i;this._offsets=n,this._length=i}else this._length=0},e.prototype._getLineLength=function(){return this._length},e.prototype._updateSymbolPosition=function(t){var e=t.__t<1?t.__t:2-t.__t,n=this._points,i=this._offsets,o=n.length;if(i){var r,a=this._lastFrame;if(e<this._lastFramePercent){for(r=Math.min(a+1,o-1);r>=0&&!(i[r]<=e);r--);r=Math.min(r,o-2)}else{for(r=a;r<o&&!(i[r]>e);r++);r=Math.min(r-1,o-2)}var s=(e-i[r])/(i[r+1]-i[r]),l=n[r],u=n[r+1];t.x=l[0]*(1-s)+s*u[0],t.y=l[1]*(1-s)+s*u[1];var c=t.__t<1?u[0]-l[0]:l[0]-u[0],d=t.__t<1?u[1]-l[1]:l[1]-u[1];t.rotation=-Math.atan2(d,c)-Math.PI/2,this._lastFrame=r,this._lastFramePercent=e,t.ignore=!1}},e}(Qw),nM=
/** @class */
function(){return function(){this.polyline=!1,this.curveness=0,this.segs=[]}}(),iM=
/** @class */function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return h(e,t),e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new nM},e.prototype.buildPath=function(t,e){var n,i=e.segs,o=e.curveness;if(e.polyline)for(n=this._off;n<i.length;){var r=i[n++];if(r>0){t.moveTo(i[n++],i[n++]);for(var a=1;a<r;a++)t.lineTo(i[n++],i[n++])}}else for(n=this._off;n<i.length;){var s=i[n++],l=i[n++],u=i[n++],c=i[n++];if(t.moveTo(s,l),o>0){var d=(s+u)/2-(l-c)*o,h=(l+c)/2-(u-s)*o;t.quadraticCurveTo(d,h,u,c)}else t.lineTo(u,c)}this.incremental&&(this._off=n,this.notClear=!0)},e.prototype.findDataIndex=function(t,e){var n=this.shape,i=n.segs,o=n.curveness,r=this.style.lineWidth;if(n.polyline)for(var a=0,s=0;s<i.length;){var l=i[s++];if(l>0)for(var u=i[s++],c=i[s++],d=1;d<l;d++){var h=i[s++],p=i[s++];if(be(u,c,h,p,r,t,e))return a}a++}else for(a=0,s=0;s<i.length;){u=i[s++],c=i[s++],h=i[s++],p=i[s++];if(o>0){if(Se(u,c,(u+h)/2-(c-p)*o,(c+p)/2-(h-u)*o,h,p,r,t,e))return a}else if(be(u,c,h,p,r,t,e))return a;a++}return-1},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();return t=n[0],e=n[1],i.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape.segs,n=Infinity,i=Infinity,o=-Infinity,r=-Infinity,a=0;a<e.length;){var s=e[a++],l=e[a++];n=Math.min(s,n),o=Math.max(s,o),i=Math.min(l,i),r=Math.max(l,r)}t=this._rect=new U(n,i,o,r)}return t},e}(y),oM=
/** @class */function(){function t(){this.group=new X}return t.prototype.updateData=function(t){this._clear();var e=this._create();e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t)},t.prototype.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clear()},t.prototype.incrementalUpdate=function(t,e){var n=this._newAdded[0],i=e.getLayout("linesPoints"),o=n&&n.shape.segs;if(o&&o.length<2e4){var r=o.length,a=new Float32Array(r+i.length);a.set(o),a.set(i,r),n.setShape({segs:a})}else{this._newAdded=[];var s=this._create();s.incremental=!0,s.setShape({segs:i}),this._setCommon(s,e),s.__startIndex=t.start}},t.prototype.remove=function(){this._clear()},t.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},t.prototype._create=function(){var t=new iM({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(t),this.group.add(t),t},t.prototype._setCommon=function(t,e,n){var i=e.hostModel;t.setShape({polyline:i.get("polyline"),curveness:i.get(["lineStyle","curveness"])}),t.useStyle(i.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var o=e.getVisual("style");o&&o.stroke&&t.setStyle("stroke",o.stroke),t.setStyle("fill",null);var r=Un(t);r.seriesIndex=i.seriesIndex,t.on("mousemove",function(e){r.dataIndex=null;var n=t.hoverDataIdx;n>0&&(r.dataIndex=n+t.__startIndex)})},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),rM={seriesType:"lines",plan:iu(),reset:function(t){var e=t.coordinateSystem;if(e){var n=t.get("polyline"),i=t.pipelineContext.large;return{progress:function(o,r){var a=[];if(i){var s=void 0,l=o.end-o.start;if(n){for(var u=0,c=o.start;c<o.end;c++)u+=t.getLineCoordsCount(c);s=new Float32Array(l+2*u)}else s=new Float32Array(4*l);var d=0,h=[];for(c=o.start;c<o.end;c++){var p=t.getLineCoords(c,a);n&&(s[d++]=p);for(var f=0;f<p;f++)h=e.dataToPoint(a[f],!1,h),s[d++]=h[0],s[d++]=h[1]}r.setLayout("linesPoints",s)}else for(c=o.start;c<o.end;c++){var g=r.getItemModel(c),y=(p=t.getLineCoords(c,a),[]);if(n)for(var m=0;m<p;m++)y.push(e.dataToPoint(a[m]));else{y[0]=e.dataToPoint(a[0]),y[1]=e.dataToPoint(a[1]);var v=g.get(["lineStyle","curveness"]);+v&&(y[2]=[(y[0][0]+y[1][0])/2-(y[0][1]-y[1][1])*v,(y[0][1]+y[1][1])/2-(y[1][0]-y[0][0])*v])}r.setItemLayout(c,y)}}}}}},aM=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),o=this._updateLineDraw(i,t),r=t.get("zlevel"),a=t.get(["effect","trailLength"]),s=n.getZr(),l="svg"===s.painter.getType();l||s.painter.getLayer(r).clear(!0),null==this._lastZlevel||l||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&a>0&&(l||s.configLayer(r,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(a/10+.9,1),0)})),o.updateData(i);var u=t.get("clip",!0)&&Jf(t.coordinateSystem,!1,t);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=r,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateLineDraw(i,t).incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,e,n){var i=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var r=rM.reset(t,e,n);r.progress&&r.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},e.prototype._updateLineDraw=function(t,e){var n=this._lineDraw,i=this._showEffect(e),o=!!e.get("polyline"),r=e.pipelineContext.large;return n&&i===this._hasEffet&&o===this._isPolyline&&r===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=r?new oM:new U_(o?i?eM:tM:i?Qw:Y_),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=r),this.group.add(n.group),n},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var e=t.getZr();"svg"===e.painter.getType()||null==this._lastZlevel||e.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},e.prototype.dispose=function(t,e){this.remove(t,e)},e.type="lines",e}(au),sM="undefined"==typeof Uint32Array?Array:Uint32Array,lM="undefined"==typeof Float64Array?Array:Float64Array;function uM(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=n(e,function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromName=t[0].name),t[1].name&&(e.toName=t[1].name),Qt([e,t[0],t[1]])}))}var cM=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="lineStyle",n.visualDrawType="stroke",n}return h(e,t),e.prototype.init=function(e){e.data=e.data||[],uM(e);var n=this._processFlatCoordsArray(e.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(e.data=new Float32Array(n.count)),t.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(e){if(uM(e),e.data){var n=this._processFlatCoordsArray(e.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(e.data=new Float32Array(n.count))}t.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=dt(this._flatCoords,e.flatCoords),this._flatCoordsOffset=dt(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var e=this.getData().getItemModel(t);return e.option instanceof Array?e.option:e.getShallow("coords")},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,e){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*t],i=this._flatCoordsOffset[2*t+1],o=0;o<i;o++)e[o]=e[o]||[],e[o][0]=this._flatCoords[n+2*o],e[o][1]=this._flatCoords[n+2*o+1];return i}var r=this._getCoordsFromItemModel(t);for(o=0;o<r.length;o++)e[o]=e[o]||[],e[o][0]=r[o][0],e[o][1]=r[o][1];return r.length},e.prototype._processFlatCoordsArray=function(t){var e=0;if(this._flatCoords&&(e=this._flatCoords.length),u(t[0])){for(var n=t.length,i=new sM(n),o=new lM(n),r=0,a=0,s=0,l=0;l<n;){s++;var c=t[l++];i[a++]=r+e,i[a++]=c;for(var d=0;d<c;d++){var h=t[l++],p=t[l++];o[r++]=h,o[r++]=p}}return{flatCoordsOffset:new Uint32Array(i.buffer,0,a),flatCoords:o,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},e.prototype.getInitialData=function(t,e){var n=new eh(["value"],this);return n.hasItemOption=!1,n.initData(t.data,[],function(t,e,i,o){if(t instanceof Array)return NaN;n.hasItemOption=!0;var r=t.value;return null!=r?r instanceof Array?r[o]:r:void 0}),n},e.prototype.formatTooltip=function(t,e,n){var i=this.getData().getItemModel(t),o=i.get("name");if(o)return o;var r=i.get("fromName"),a=i.get("toName"),s=[];return null!=r&&s.push(r),null!=a&&s.push(a),Pl("nameValue",{name:s.join(" > ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),e=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&e>0?e+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",
// zlevel: 0,
z:2,legendHoverLink:!0,
// Cartesian coordinate system
xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],
// Geo coordinate system
geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,
// Available when large is true
largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(jl);function dM(t){return t instanceof Array||(t=[t,t]),t}var hM={seriesType:"lines",reset:function(t){var e=dM(t.get("symbol")),n=dM(t.get("symbolSize")),i=t.getData();return i.setVisual("fromSymbol",e&&e[0]),i.setVisual("toSymbol",e&&e[1]),i.setVisual("fromSymbolSize",n&&n[0]),i.setVisual("toSymbolSize",n&&n[1]),{dataEach:i.hasItemOption?function(t,e){var n=t.getItemModel(e),i=dM(n.getShallow("symbol",!0)),o=dM(n.getShallow("symbolSize",!0));i[0]&&t.setItemVisual(e,"fromSymbol",i[0]),i[1]&&t.setItemVisual(e,"toSymbol",i[1]),o[0]&&t.setItemVisual(e,"fromSymbolSize",o[0]),o[1]&&t.setItemVisual(e,"toSymbolSize",o[1])}:null}}};var pM=
/** @class */function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=yt.createCanvas();this.canvas=t}return t.prototype.update=function(t,e,n,i,o,r){var a=this._getBrush(),s=this._getGradient(o,"inRange"),l=this._getGradient(o,"outOfRange"),u=this.pointSize+this.blurSize,c=this.canvas,d=c.getContext("2d"),h=t.length;c.width=e,c.height=n;for(var p=0;p<h;++p){var f=t[p],g=f[0],y=f[1],m=i(f[2]);d.globalAlpha=m,d.drawImage(a,g-u,y-u)}if(!c.width||!c.height)return c;for(var v=d.getImageData(0,0,c.width,c.height),x=v.data,_=0,b=x.length,S=this.minOpacity,w=this.maxOpacity-S;_<b;){m=x[_+3]/256;var M=4*Math.floor(255*m);if(m>0){var I=r(m)?s:l;m>0&&(m=m*w+S),x[_++]=I[M],x[_++]=I[M+1],x[_++]=I[M+2],x[_++]=I[M+3]*m*256}else _+=4}return d.putImageData(v,0,0),c},t.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=yt.createCanvas()),e=this.pointSize+this.blurSize,n=2*e;t.width=n,t.height=n;var i=t.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-e,e,this.pointSize,0,2*Math.PI,!0),i.closePath(),i.fill(),t},t.prototype._getGradient=function(t,e){for(var n=this._gradientPixels,i=n[e]||(n[e]=new Uint8ClampedArray(1024)),o=[0,0,0,0],r=0,a=0;a<256;a++)t[e](a/255,!0,o),i[r++]=o[0],i[r++]=o[1],i[r++]=o[2],i[r++]=o[3];return i},t}();function fM(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}var gM=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.render=function(t,e,n){var i;e.eachComponent("visualMap",function(e){e.eachTargetSeries(function(n){n===t&&(i=e)})}),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;"cartesian2d"===o.type||"calendar"===o.type?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):fM(o)&&this._renderOnGeo(o,t,i,n)},e.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,e,n,i){var o=e.coordinateSystem;o&&(fM(o)?this.render(e,n,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(e,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){Io(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,e,n,i,o){var r,a,s,l,u=t.coordinateSystem,c=$f(u,"cartesian2d");if(c){var d=u.getAxis("x"),h=u.getAxis("y");r=d.getBandWidth()+.5,a=h.getBandWidth()+.5,s=d.scale.getExtent(),l=h.scale.getExtent()}for(var p=this.group,f=t.getData(),g=t.getModel(["emphasis","itemStyle"]).getItemStyle(),y=t.getModel(["blur","itemStyle"]).getItemStyle(),m=t.getModel(["select","itemStyle"]).getItemStyle(),v=t.get(["itemStyle","borderRadius"]),x=ko(t),_=t.getModel("emphasis"),b=_.get("focus"),S=_.get("blurScope"),w=_.get("disabled"),M=c?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],I=n;I<i;I++){var D=void 0,T=f.getItemVisual(I,"style");if(c){var C=f.get(M[0],I),A=f.get(M[1],I);if(isNaN(f.get(M[2],I))||isNaN(C)||isNaN(A)||C<s[0]||C>s[1]||A<l[0]||A>l[1])continue;var L=u.dataToPoint([C,A]);D=new F({shape:{x:L[0]-r/2,y:L[1]-a/2,width:r,height:a},style:T})}else{if(isNaN(f.get(M[1],I)))continue;D=new F({z2:1,shape:u.dataToRect([f.get(M[0],I)]).contentShape,style:T})}if(f.hasItemOption){var k=f.getItemModel(I),P=k.getModel("emphasis");g=P.getModel("itemStyle").getItemStyle(),y=k.getModel(["blur","itemStyle"]).getItemStyle(),m=k.getModel(["select","itemStyle"]).getItemStyle(),v=k.get(["itemStyle","borderRadius"]),b=P.get("focus"),S=P.get("blurScope"),w=P.get("disabled"),x=ko(k)}D.shape.r=v;var N=t.getRawValue(I),O="-";N&&null!=N[2]&&(O=N[2]+""),Lo(D,x,{labelFetcher:t,labelDataIndex:I,defaultOpacity:T.opacity,defaultText:O}),D.ensureState("emphasis").style=g,D.ensureState("blur").style=y,D.ensureState("select").style=m,Oi(D,b,S,w),D.incremental=o,o&&(D.states.emphasis.hoverLayer=!0),p.add(D),f.setItemGraphicEl(I,D),this._progressiveEls&&this._progressiveEls.push(D)}},e.prototype._renderOnGeo=function(t,e,i,o){var r=i.targetVisuals.inRange,a=i.targetVisuals.outOfRange,s=e.getData(),l=this._hmLayer||this._hmLayer||new pM;l.blurSize=e.get("blurSize"),l.pointSize=e.get("pointSize"),l.minOpacity=e.get("minOpacity"),l.maxOpacity=e.get("maxOpacity");var u=t.getViewRect().clone(),c=t.getRoamTransform();u.applyTransform(c);var d=Math.max(u.x,0),h=Math.max(u.y,0),p=Math.min(u.width+u.x,o.getWidth()),f=Math.min(u.height+u.y,o.getHeight()),g=p-d,y=f-h,m=[s.mapDimension("lng"),s.mapDimension("lat"),s.mapDimension("value")],v=s.mapArray(m,function(e,n,i){var o=t.dataToPoint([e,n]);return o[0]-=d,o[1]-=h,o.push(i),o}),x=i.getExtent(),_="visualMap.continuous"===i.type?function(t,e){var n=t[1]-t[0];return e=[(e[0]-t[0])/n,(e[1]-t[0])/n],function(t){return t>=e[0]&&t<=e[1]}}(x,i.option.range):function(t,e,i){var o=t[1]-t[0],r=(e=n(e,function(e){return{interval:[(e.interval[0]-t[0])/o,(e.interval[1]-t[0])/o]}})).length,a=0;return function(t){var n;for(n=a;n<r;n++)if((o=e[n].interval)[0]<=t&&t<=o[1]){a=n;break}if(n===r)for(n=a-1;n>=0;n--){var o;if((o=e[n].interval)[0]<=t&&t<=o[1]){a=n;break}}return n>=0&&n<r&&i[n]}}(x,i.getPieceList(),i.option.selected);l.update(v,g,y,r.color.getNormalizer(),{inRange:r.color.getColorMapper(),outOfRange:a.color.getColorMapper()},_);var S=new b({style:{width:g,height:y,x:d,y:h,image:l.canvas},silent:!0});this.group.add(S)},e.type="heatmap",e}(au),yM=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.getInitialData=function(t,e){return ch(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=ja.get(this.get("coordinateSystem"));if(t&&t.dimensions)return"lng"===t.dimensions[0]&&"lat"===t.dimensions[1]},e.type="series.heatmap",e.dependencies=["grid","geo","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",
// zlevel: 0,
z:2,
// Cartesian coordinate system
// xAxisIndex: 0,
// yAxisIndex: 0,
// Geo coordinate system
geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(jl);var mM=["itemStyle","borderWidth"],vM=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],xM=new R,_M=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.render=function(t,e,n){var i=this.group,o=t.getData(),r=this._data,a=t.coordinateSystem,s=a.getBaseAxis().isHorizontal(),l=a.master.getRect(),u={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:t,coordSys:a,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:s,valueDim:vM[+s],categoryDim:vM[1-+s]};o.diff(r).add(function(t){if(o.hasValue(t)){var e=CM(o,t),n=bM(o,t,e,u),r=kM(o,u,n);o.setItemGraphicEl(t,r),i.add(r),EM(r,u,n)}}).update(function(t,e){var n=r.getItemGraphicEl(e);if(o.hasValue(t)){var a=CM(o,t),s=bM(o,t,a,u),l=NM(o,s);n&&l!==n.__pictorialShapeStr&&(i.remove(n),o.setItemGraphicEl(t,null),n=null),n?function(t,e,n){var i=n.animationModel,o=n.dataIndex,r=t.__pictorialBundle;Zi(r,{x:n.bundlePosition[0],y:n.bundlePosition[1]},i,o),n.symbolRepeat?MM(t,e,n,!0):IM(t,e,n,!0);DM(t,n,!0),TM(t,e,n,!0)}(n,u,s):n=kM(o,u,s,!0),o.setItemGraphicEl(t,n),n.__pictorialSymbolMeta=s,i.add(n),EM(n,u,s)}else i.remove(n)}).remove(function(t){var e=r.getItemGraphicEl(t);e&&PM(r,t,e.__pictorialSymbolMeta.animationModel,e)}).execute();var c=t.get("clip",!0)?Jf(t.coordinateSystem,!1,t):null;return c?i.setClipPath(c):i.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(t,e){var n=this.group,i=this._data;t.get("animation")?i&&i.eachItemGraphicEl(function(e){PM(i,Un(e).dataIndex,t,e)}):n.removeAll()},e.type="pictorialBar",e}(au);function bM(t,e,n,i){var r=t.getItemLayout(e),a=n.get("symbolRepeat"),s=n.get("symbolClip"),l=n.get("symbolPosition")||"start",u=(n.get("symbolRotate")||0)*Math.PI/180||0,c=n.get("symbolPatternSize")||2,d=n.isAnimationEnabled(),h={dataIndex:e,layout:r,itemModel:n,symbolType:t.getItemVisual(e,"symbol")||"circle",style:t.getItemVisual(e,"style"),symbolClip:s,symbolRepeat:a,symbolRepeatDirection:n.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:d?n:null,hoverScale:d&&n.get(["emphasis","scale"]),z2:n.getShallow("z",!0)||0};!function(t,e,n,i,r){var a,s=i.valueDim,l=t.get("symbolBoundingData"),u=i.coordSys.getOtherAxis(i.coordSys.getBaseAxis()),c=u.toGlobalCoord(u.dataToCoord(0)),d=1-+(n[s.wh]<=0);if(o(l)){var h=[SM(u,l[0])-c,SM(u,l[1])-c];h[1]<h[0]&&h.reverse(),a=h[d]}else a=null!=l?SM(u,l)-c:e?i.coordSysExtent[s.index][d]-c:n[s.wh];r.boundingLength=a,e&&(r.repeatCutLength=n[s.wh]);var p="x"===s.xy,f=u.inverse;r.pxSign=p&&!f||!p&&f?a>=0?1:-1:a>0?1:-1}(n,a,r,i,h),function(t,e,n,i,r,a,s,l,u,c){var d,h=u.valueDim,p=u.categoryDim,f=Math.abs(n[p.wh]),g=t.getItemVisual(e,"symbolSize");d=o(g)?g.slice():null==g?["100%","100%"]:[g,g];d[p.index]=Ge(d[p.index],f),d[h.index]=Ge(d[h.index],i?f:Math.abs(a)),c.symbolSize=d;var y=c.symbolScale=[d[0]/l,d[1]/l];y[h.index]*=(u.isHorizontal?-1:1)*s}(t,e,r,a,0,h.boundingLength,h.pxSign,c,i,h),function(t,e,n,i,o){var r=t.get(mM)||0;r&&(xM.attr({scaleX:e[0],scaleY:e[1],rotation:n}),xM.updateTransform(),r/=xM.getLineScale(),r*=e[i.valueDim.index]);o.valueLineWidth=r||0}(n,h.symbolScale,u,i,h);var p=h.symbolSize,g=mc(n.get("symbolOffset"),p);return function(t,e,n,i,o,r,a,s,l,u,c,d){var h=c.categoryDim,p=c.valueDim,g=d.pxSign,y=Math.max(e[p.index]+s,0),m=y;if(i){var v=Math.abs(l),x=Ft(t.get("symbolMargin"),"15%")+"",_=!1;x.lastIndexOf("!")===x.length-1&&(_=!0,x=x.slice(0,x.length-1));var b=Ge(x,e[p.index]),S=Math.max(y+2*b,0),w=_?0:2*b,M=nn(i),I=M?i:VM((v+w)/S);S=y+2*(b=(v-I*y)/2/(_?I:Math.max(I-1,1))),w=_?0:2*b,M||"fixed"===i||(I=u?VM((Math.abs(u)+w)/S):0),m=I*S-w,d.repeatTimes=I,d.symbolMargin=b}var D=g*(m/2),T=d.pathPosition=[];T[h.index]=n[h.wh]/2,T[p.index]="start"===a?D:"end"===a?l-D:l/2,r&&(T[0]+=r[0],T[1]+=r[1]);var C=d.bundlePosition=[];C[h.index]=n[h.xy],C[p.index]=n[p.xy];var A=d.barRectShape=f({},n);A[p.wh]=g*Math.max(Math.abs(n[p.wh]),Math.abs(T[p.index]+D)),A[h.wh]=n[h.wh];var L=d.clipShape={};L[h.xy]=-n[h.xy],L[h.wh]=c.ecSize[h.wh],L[p.xy]=0,L[p.wh]=n[p.wh]}(n,p,r,a,0,g,l,h.valueLineWidth,h.boundingLength,h.repeatCutLength,i,h),h}function SM(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function wM(t){var e=t.symbolPatternSize,n=gc(
// Consider texture img, make a big size.
t.symbolType,-e/2,-e/2,e,e);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function MM(t,e,n,i){var o=t.__pictorialBundle,r=n.symbolSize,a=n.valueLineWidth,s=n.pathPosition,l=e.valueDim,u=n.repeatTimes||0,c=0,d=r[e.valueDim.index]+a+2*n.symbolMargin;for(OM(t,function(t){t.__pictorialAnimationIndex=c,t.__pictorialRepeatTimes=u,c<u?RM(t,null,f(c),n,i):RM(t,null,{scaleX:0,scaleY:0},n,i,function(){o.remove(t)}),c++});c<u;c++){var h=wM(n);h.__pictorialAnimationIndex=c,h.__pictorialRepeatTimes=u,o.add(h);var p=f(c);RM(h,{x:p.x,y:p.y,scaleX:0,scaleY:0},{scaleX:p.scaleX,scaleY:p.scaleY,rotation:p.rotation},n,i)}function f(t){var e=s.slice(),i=n.pxSign,o=t;return("start"===n.symbolRepeatDirection?i>0:i<0)&&(o=u-1-t),e[l.index]=d*(o-u/2+.5)+s[l.index],{x:e[0],y:e[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function IM(t,e,n,i){var o=t.__pictorialBundle,r=t.__pictorialMainPath;r?RM(r,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,i):(r=t.__pictorialMainPath=wM(n),o.add(r),RM(r,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,i))}function DM(t,e,n){var i=f({},e.barRectShape),o=t.__pictorialBarRect;o?RM(o,null,{shape:i},e,n):((o=t.__pictorialBarRect=new F({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}})).disableMorphing=!0,t.add(o))}function TM(t,e,n,i){if(n.symbolClip){var o=t.__pictorialClipPath,r=f({},n.clipShape),a=e.valueDim,s=n.animationModel,l=n.dataIndex;if(o)Zi(o,{shape:r},s,l);else{r[a.wh]=0,o=new F({shape:r}),t.__pictorialBundle.setClipPath(o),t.__pictorialClipPath=o;var u={};u[a.wh]=n.clipShape[a.wh],Do[i?"updateProps":"initProps"](o,{shape:u},s,l)}}}function CM(t,e){var n=t.getItemModel(e);return n.getAnimationDelayParams=AM,n.isAnimationEnabled=LM,n}function AM(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function LM(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function kM(t,e,n,i){var o=new X,r=new X;return o.add(r),o.__pictorialBundle=r,r.x=n.bundlePosition[0],r.y=n.bundlePosition[1],n.symbolRepeat?MM(o,e,n):IM(o,0,n),DM(o,n,i),TM(o,e,n,i),o.__pictorialShapeStr=NM(t,n),o.__pictorialSymbolMeta=n,o}function PM(t,e,n,i){var o=i.__pictorialBarRect;o&&o.removeTextContent();var r=[];OM(i,function(t){r.push(t)}),i.__pictorialMainPath&&r.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),s(r,function(t){qi(t,{scaleX:0,scaleY:0},n,e,function(){i.parent&&i.parent.remove(i)})}),t.setItemGraphicEl(e,null)}function NM(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function OM(t,e,n){s(t.__pictorialBundle.children(),function(i){i!==t.__pictorialBarRect&&e.call(n,i)})}function RM(t,e,n,i,o,r){e&&t.attr(e),i.symbolClip&&!o?n&&t.attr(n):n&&Do[o?"updateProps":"initProps"](t,n,i.animationModel,i.dataIndex,r)}function EM(t,e,n){var i=n.dataIndex,o=n.itemModel,r=o.getModel("emphasis"),a=r.getModel("itemStyle").getItemStyle(),s=o.getModel(["blur","itemStyle"]).getItemStyle(),l=o.getModel(["select","itemStyle"]).getItemStyle(),u=o.getShallow("cursor"),c=r.get("focus"),d=r.get("blurScope"),h=r.get("scale");OM(t,function(t){if(t instanceof b){var e=t.style;t.useStyle(f({
// TODO other properties like dx, dy ?
image:e.image,x:e.x,y:e.y,width:e.width,height:e.height},n.style))}else t.useStyle(n.style);var i=t.ensureState("emphasis");i.style=a,h&&(i.scaleX=1.1*t.scaleX,i.scaleY=1.1*t.scaleY),t.ensureState("blur").style=s,t.ensureState("select").style=l,u&&(t.cursor=u),t.z2=n.z2});var p=e.valueDim.posDesc[+(n.boundingLength>0)],g=t.__pictorialBarRect;g.ignoreClip=!0,Lo(g,ko(o),{labelFetcher:e.seriesModel,labelDataIndex:i,defaultText:kf(e.seriesModel.getData(),i),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:p}),Oi(t,c,d,r.get("disabled"))}function VM(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}var zM=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n.defaultSymbol="roundRect",n}return h(e,t),e.prototype.getInitialData=function(e){return e.stack=null,t.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=ir(yg.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",
// Pictorial bar do not clip by default because in many cases
// xAxis and yAxis are not displayed and it's expected not to clip
clip:!1,
// z can be set in data item, which is z2 actually.
// Disable progressive
progressive:0,emphasis:{
// By default pictorialBar do not hover scale. Hover scale is not suitable
// for the case that both has foreground and background.
scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(yg);var BM=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._layers=[],n}return h(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),o=this,r=this.group,a=t.getLayerSeries(),s=i.getLayout("layoutInfo"),l=s.rect,u=s.boundaryGap;function c(t){return t.name}r.x=0,r.y=l.y+u[0];var d=new kd(this._layersSeries||[],a,c,c),h=[];function p(e,n,s){var l=o._layers;if("remove"!==e){for(var u,c,d=[],p=[],f=a[n].indices,g=0;g<f.length;g++){var y=i.getItemLayout(f[g]),m=y.x,v=y.y0,x=y.y;d.push(m,v),p.push(m,v+x),u=i.getItemVisual(f[g],"style")}var _=i.getItemLayout(f[0]),b=t.getModel("label").get("margin"),S=t.getModel("emphasis");if("add"===e){var w=h[n]=new X;c=new jf({shape:{points:d,stackedOnPoints:p,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),w.add(c),r.add(w),t.isAnimationEnabled()&&c.setClipPath(function(t,e,n){var i=new F({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return Xi(i,{shape:{x:t.x-50,width:t.width+100,height:t.height+20}},e,n),i}(c.getBoundingRect(),t,function(){c.removeClipPath()}))}else{w=l[s];c=w.childAt(0),r.add(w),h[n]=w,Zi(c,{shape:{points:d,stackedOnPoints:p}},t),$i(c)}Lo(c,ko(t),{labelDataIndex:f[g-1],defaultText:i.getName(f[g-1]),inheritColor:u.fill},{normal:{verticalAlign:"middle"}}),c.setTextConfig({position:null,local:!0});var M=c.getTextContent();M&&(M.x=_.x-b,M.y=_.y0+_.y/2),c.useStyle(u),i.setItemGraphicEl(n,c),zi(c,t),Oi(c,S.get("focus"),S.get("blurScope"),S.get("disabled"))}else r.remove(l[n])}d.add(ut(p,this,"add")).update(ut(p,this,"update")).remove(ut(p,this,"remove")).execute(),this._layersSeries=a,this._layers=h},e.type="themeRiver",e}(au);var GM=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new iy(ut(this.getData,this),ut(this.getRawData,this))},e.prototype.fixData=function(t){var e=t.length,n={},i=kn(t,function(t){return n.hasOwnProperty(t[0]+"")||(n[t[0]+""]=-1),t[2]}),o=[];i.buckets.each(function(t,e){o.push({name:e,dataList:t})});for(var r=o.length,a=0;a<r;++a){for(var s=o[a].name,l=0;l<o[a].dataList.length;++l){var u=o[a].dataList[l][0]+"";n[u]=a}for(var u in n)n.hasOwnProperty(u)&&n[u]!==a&&(n[u]=a,t[e]=[u,0,s],e++)}return t},e.prototype.getInitialData=function(t,e){for(var n=this.getReferringComponents("singleAxis",Tn).models[0].get("type"),i=lt(t.data,function(t){return void 0!==t[2]}),o=this.fixData(i||[]),r=[],s=this.nameMap=a(),l=0,u=0;u<o.length;++u)r.push(o[u][2]),s.get(o[u][2])||(s.set(o[u][2],l),l++);var c=nh(o,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:Od(n)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,d=new eh(c,this);return d.initData(o),d},e.prototype.getLayerSeries=function(){for(var t=this.getData(),e=t.count(),n=[],i=0;i<e;++i)n[i]=i;var o=t.mapDimension("single"),r=kn(n,function(e){return t.get("name",e)}),a=[];return r.buckets.each(function(e,n){e.sort(function(e,n){return t.get(o,e)-t.get(o,n)}),a.push({name:n,indices:e})}),a},e.prototype.getAxisTooltipData=function(t,e,n){o(t)||(t=t?[t]:[]);for(var i,r=this.getData(),a=this.getLayerSeries(),s=[],l=a.length,u=0;u<l;++u){for(var c=Number.MAX_VALUE,d=-1,h=a[u].indices.length,p=0;p<h;++p){var f=r.get(t[0],a[u].indices[p]),g=Math.abs(f-e);g<=c&&(i=f,c=g,d=a[u].indices[p])}s.push(d)}return{dataIndices:s,nestestValue:i}},e.prototype.formatTooltip=function(t,e,n){var i=this.getData();return Pl("nameValue",{name:i.getName(t),value:i.get(i.mapDimension("value"),t)})},e.type="series.themeRiver",e.dependencies=["singleAxis"],e.defaultOption={
// zlevel: 0,
z:2,colorBy:"data",coordinateSystem:"singleAxis",
// gap in axis's orthogonal orientation
boundaryGap:["10%","10%"],
// legendHoverLink: true,
singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},e}(jl);function FM(t,e){t.eachSeriesByType("themeRiver",function(t){var e=t.getData(),n=t.coordinateSystem,i={},o=n.getRect();i.rect=o;var r=t.get("boundaryGap"),a=n.getAxis();(i.boundaryGap=r,"horizontal"===a.orient)?(r[0]=Ge(r[0],o.height),r[1]=Ge(r[1],o.height),WM(e,t,o.height-r[0]-r[1])):(r[0]=Ge(r[0],o.width),r[1]=Ge(r[1],o.width),WM(e,t,o.width-r[0]-r[1]));e.setLayout("layoutInfo",i)})}function WM(t,e,i){if(t.count())for(var o,r=e.coordinateSystem,a=e.getLayerSeries(),s=t.mapDimension("single"),l=t.mapDimension("value"),u=n(a,function(e){return n(e.indices,function(e){var n=r.dataToPoint(t.get(s,e));return n[1]=t.get(l,e),n})}),c=function(t){for(var e=t.length,n=t[0].length,i=[],o=[],r=0,a=0;a<n;++a){for(var s=0,l=0;l<e;++l)s+=t[l][a][1];s>r&&(r=s),i.push(s)}for(var u=0;u<n;++u)o[u]=(r-i[u])/2;r=0;for(var c=0;c<n;++c){var d=i[c]+o[c];d>r&&(r=d)}return{y0:o,max:r}}(u),d=c.y0,h=i/c.max,p=a.length,f=a[0].indices.length,g=0;g<f;++g){o=d[g]*h,t.setItemLayout(a[0].indices[g],{layerIndex:0,x:u[0][g][0],y0:o,y:u[0][g][1]*h});for(var y=1;y<p;++y)o+=u[y-1][g][1]*h,t.setItemLayout(a[y].indices[g],{layerIndex:y,x:u[y][g][0],y0:o,y:u[y][g][1]*h})}}var HM=
/** @class */function(t){function e(e,n,i,o){var r=t.call(this)||this;r.z2=2,r.textConfig={inside:!0},Un(r).seriesIndex=n.seriesIndex;var a=new Q({z2:4,silent:e.getModel().get(["label","silent"])});return r.setTextContent(a),r.updateData(!0,e,n,i,o),r}return h(e,t),e.prototype.updateData=function(t,e,n,i,o){this.node=e,e.piece=this,n=n||this._seriesModel,i=i||this._ecModel;var r=this;Un(r).dataIndex=e.dataIndex;var a=e.getModel(),l=a.getModel("emphasis"),u=e.getLayout(),c=f({},u);c.label=null;var d=e.getVisual("style");d.lineJoin="bevel";var h=e.getVisual("decal");h&&(d.decal=bc(h,o));var p=Sg(a.getModel("itemStyle"),c,!0);f(c,p),s(Jn,function(t){var e=r.ensureState(t),n=a.getModel([t,"itemStyle"]);e.style=n.getItemStyle();var i=Sg(n,c);i&&(e.shape=i)}),t?(r.setShape(c),r.shape.r=u.r0,Xi(r,{shape:{r:u.r}},n,e.dataIndex)):(Zi(r,{shape:c},n),$i(r)),r.useStyle(d),this._updateLabel(n);var g=a.getShallow("cursor");g&&r.attr("cursor",g),this._seriesModel=n||this._seriesModel,this._ecModel=i||this._ecModel;var y=l.get("focus");Oi(this,"relative"===y?dt(e.getAncestorsIndices(),e.getDescendantIndices()):"ancestor"===y?e.getAncestorsIndices():"descendant"===y?e.getDescendantIndices():y,l.get("blurScope"),l.get("disabled"))},e.prototype._updateLabel=function(t){var e=this,n=this.node.getModel(),i=n.getModel("label"),o=this.node.getLayout(),r=o.endAngle-o.startAngle,a=(o.startAngle+o.endAngle)/2,l=Math.cos(a),c=Math.sin(a),d=this,h=d.getTextContent(),p=this.node.dataIndex,f=i.get("minAngle")/180*Math.PI,g=i.get("show")&&!(null!=f&&Math.abs(r)<f);function y(t,e){var n=t.get(e);return null==n?i.get(e):n}h.ignore=!g,s($n,function(i){var s="normal"===i?n.getModel("label"):n.getModel([i,"label"]),f="normal"===i,g=f?h:h.ensureState(i),m=t.getFormattedLabel(p,i);f&&(m=m||e.node.name),g.style=Po(s,{},null,"normal"!==i,!0),m&&(g.style.text=m);var v=s.get("show");null==v||f||(g.ignore=!v);var x,_=y(s,"position"),b=f?d:d.states[i],S=b.style.fill;b.textConfig={outsideFill:"inherit"===s.get("color")?S:null,inside:"outside"!==_};var w=y(s,"distance")||0,M=y(s,"align"),I=y(s,"rotate"),D=.5*Math.PI,T=1.5*Math.PI,C=Rt("tangential"===I?Math.PI/2-a:a),A=C>D&&!je(C-D)&&C<T;"outside"===_?(x=o.r+w,M=A?"right":"left"):M&&"center"!==M?"left"===M?(x=o.r0+w,M=A?"right":"left"):"right"===M&&(x=o.r-w,M=A?"left":"right"):(x=r===2*Math.PI&&0===o.r0?0:(o.r+o.r0)/2,M="center"),g.style.align=M,g.style.verticalAlign=y(s,"verticalAlign")||"middle",g.x=x*l+o.cx,g.y=x*c+o.cy;var L=0;"radial"===I?L=Rt(-a)+(A?Math.PI:0):"tangential"===I?L=Rt(Math.PI/2-a)+(A?Math.PI:0):u(I)&&(L=I*Math.PI/180),g.rotation=Rt(L)}),h.dirtyStyle()},e}(V),YM="sunburstRootToNode",UM="sunburstHighlight";var ZM=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.render=function(t,e,n,i){var o=this;this.seriesModel=t,this.api=n,this.ecModel=e;var r=t.getData(),a=r.tree.root,s=t.getViewRoot(),l=this.group,u=t.get("renderLabelForZeroData"),c=[];s.eachNode(function(t){c.push(t)});var d,h,p=this._oldChildren||[];!function(i,o){if(0===i.length&&0===o.length)return;function s(t){return t.getId()}function c(s,c){!function(i,o){u||!i||i.getValue()||(i=null);if(i!==a&&o!==a)if(o&&o.piece)i?(o.piece.updateData(!1,i,t,e,n),r.setItemGraphicEl(i.dataIndex,o.piece)):function(t){if(!t)return;t.piece&&(l.remove(t.piece),t.piece=null)}(o);else if(i){var s=new HM(i,t,e,n);l.add(s),r.setItemGraphicEl(i.dataIndex,s)}}(null==s?null:i[s],null==c?null:o[c])}new kd(o,i,s,s).add(c).update(c).remove(at(c,null)).execute()}(c,p),d=a,(h=s).depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,d,t,e,n):(o.virtualPiece=new HM(d,t,e,n),l.add(o.virtualPiece)),h.piece.off("click"),o.virtualPiece.on("click",function(t){o._rootToNode(h.parentNode)})):o.virtualPiece&&(l.remove(o.virtualPiece),o.virtualPiece=null),this._initEvents(),this._oldChildren=c},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(e){var n=!1;t.seriesModel.getViewRoot().eachNode(function(i){if(!n&&i.piece&&i.piece===e.target){var o=i.getModel().get("nodeClick");if("rootToNode"===o)t._rootToNode(i);else if("link"===o){var r=i.getModel(),a=r.get("link");if(a)Kr(a,r.get("target",!0)||"_blank")}n=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:YM,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,e){var n=e.getData().getItemLayout(0);if(n){var i=t[0]-n.cx,o=t[1]-n.cy,r=Math.sqrt(i*i+o*o);return r<=n.r&&r>=n.r0}},e.type="sunburst",e}(au),XM=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreStyleOnData=!0,n}return h(e,t),e.prototype.getInitialData=function(t,e){var i={name:t.name,children:t.data};jM(i);var o=this._levelModels=n(t.levels||[],function(t){return new tr(t,this,e)},this),r=ix.createTree(i,this,function(t){t.wrapMethod("getItemModel",function(t,e){var n=r.getNodeByDataIndex(e),i=o[n.depth];return i&&(t.parentModel=i),t})});return r.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treePathInfo=sx(i,this),n},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){px(this)},e.type="series.sunburst",e.defaultOption={
// zlevel: 0,
z:2,
// 默认全局居中
center:["50%","50%"],radius:[0,"75%"],
// 默认顺时针
clockwise:!0,startAngle:90,
// 最小角度改为0
minAngle:0,
// If still show when all data zero.
stillShowZeroSum:!0,
// 'rootToNode', 'link', or false
nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{
// could be: 'radial', 'tangential', or 'none'
rotate:"radial",show:!0,opacity:1,
// 'left' is for inner side of inside, and 'right' is for outer
// side for inside
align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},
// Animation type can be expansion, scale.
animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],
/**
* Sort order.
*
* Valid values: 'desc', 'asc', null, or callback function.
* 'desc' and 'asc' for descend and ascendant order;
* null for not sorting;
* example of callback function:
* function(nodeA, nodeB) {
* return nodeA.getValue() - nodeB.getValue();
* }
*/
sort:"desc"},e}(jl);function jM(t){var e=0;s(t.children,function(t){jM(t);var n=t.value;o(n)&&(n=n[0]),e+=n});var n=t.value;o(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),o(t.value)?t.value[0]=n:t.value=n}var qM=Math.PI/180;function KM(t,e,n){e.eachSeriesByType(t,function(t){var e=t.get("center"),i=t.get("radius");o(i)||(i=[0,i]),o(e)||(e=[e,e]);var r=n.getWidth(),a=n.getHeight(),l=Math.min(r,a),u=Ge(e[0],r),c=Ge(e[1],a),d=Ge(i[0],l/2),h=Ge(i[1],l/2),p=-t.get("startAngle")*qM,f=t.get("minAngle")*qM,g=t.getData().tree.root,y=t.getViewRoot(),m=y.depth,v=t.get("sort");null!=v&&JM(y,v);var x=0;s(y.children,function(t){!isNaN(t.getValue())&&x++});var _=y.getValue(),b=Math.PI/(_||x)*2,S=y.depth>0,w=y.height-(S?-1:1),M=(h-d)/(w||1),I=t.get("clockwise"),D=t.get("stillShowZeroSum"),T=I?1:-1,C=function(e,n){if(e){var i=n;if(e!==g){var o=e.getValue(),r=0===_&&D?b:o*b;r<f&&(r=f),i=n+T*r;var a=e.depth-m-(S?-1:1),h=d+M*a,p=d+M*(a+1),y=t.getLevelModel(e);if(y){var v=y.get("r0",!0),x=y.get("r",!0),w=y.get("radius",!0);null!=w&&(v=w[0],x=w[1]),null!=v&&(h=Ge(v,l/2)),null!=x&&(p=Ge(x,l/2))}e.setLayout({angle:r,startAngle:n,endAngle:i,clockwise:I,cx:u,cy:c,r0:h,r:p})}if(e.children&&e.children.length){var A=0;s(e.children,function(t){A+=C(t,n+A)})}return i-n}};if(S){var A=d,L=d+M,k=2*Math.PI;g.setLayout({angle:k,startAngle:p,endAngle:p+k,clockwise:I,cx:u,cy:c,r0:A,r:L})}C(y,p)})}function JM(t,e){var i=t.children||[];t.children=function(t,e){if(g(e)){var i=n(t,function(t,e){var n=t.getValue();return{params:{depth:t.depth,height:t.height,dataIndex:t.dataIndex,getValue:function(){return n}},index:e}});return i.sort(function(t,n){return e(t.params,n.params)}),n(i,function(e){return t[e.index]})}var o="asc"===e;return t.sort(function(t,e){var n=(t.getValue()-e.getValue())*(o?1:-1);return 0===n?(t.dataIndex-e.dataIndex)*(o?-1:1):n})}(i,e),i.length&&s(t.children,function(t){JM(t,e)})}function $M(e){var n={};e.eachSeriesByType("sunburst",function(e){var i=e.getData(),o=i.tree;o.eachNode(function(r){var a=r.getModel().getModel("itemStyle").getItemStyle();a.fill||(a.fill=function(e,i,o){for(var r=e;r&&r.depth>1;)r=r.parentNode;var a=i.getColorFromPalette(r.name||r.dataIndex+"",n);return e.depth>1&&t(a)&&(a=we(a,(e.depth-1)/(o-1)*.5)),a}(r,e,o.root.height));var s=i.ensureUniqueItemVisual(r.dataIndex,"style");f(s,a)})})}var QM={color:"fill",borderColor:"stroke"},tI={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},eI=wn(),nI=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,e){return ch(null,this)},e.prototype.getDataParams=function(e,n,i){var o=t.prototype.getDataParams.call(this,e,n);return i&&(o.info=eI(i).info),o},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",
// zlevel: 0,
z:2,legendHoverLink:!0,
// Custom series will not clip by default.
// Some case will use custom series to draw label
// For example https://echarts.apache.org/examples/en/editor.html?c=custom-gantt-flight
clip:!1},e}(jl);function iI(t,e){return e=e||[0,0],n(["x","y"],function(n,i){var o=this.getAxis(n),r=e[i],a=t[i]/2;return"category"===o.type?o.getBandWidth():Math.abs(o.dataToCoord(r-a)-o.dataToCoord(r+a))},this)}function oI(t,e){return e=e||[0,0],n([0,1],function(n){var i=e[n],o=t[n]/2,r=[],a=[];return r[n]=i-o,a[n]=i+o,r[1-n]=a[1-n]=e[1-n],Math.abs(this.dataToPoint(r)[n]-this.dataToPoint(a)[n])},this)}function rI(t,e){var n=this.getAxis(),i=e instanceof Array?e[0]:e,o=(t instanceof Array?t[0]:t)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-o)-n.dataToCoord(i+o))}function aI(t,e){return e=e||[0,0],n(["Radius","Angle"],function(n,i){var o=this["get"+n+"Axis"](),r=e[i],a=t[i]/2,s="category"===o.type?o.getBandWidth():Math.abs(o.dataToCoord(r-a)-o.dataToCoord(r+a));return"Angle"===n&&(s=s*Math.PI/180),s},this)}function sI(t,e,n,i){return t&&(t.legacy||!1!==t.legacy&&!n&&!i&&"tspan"!==e&&("text"===e||k(t,"text")))}function lI(t,e,n){var i,o,r,a=t;if("text"===e)r=a;else{r={},k(a,"text")&&(r.text=a.text),k(a,"rich")&&(r.rich=a.rich),k(a,"textFill")&&(r.fill=a.textFill),k(a,"textStroke")&&(r.stroke=a.textStroke),k(a,"fontFamily")&&(r.fontFamily=a.fontFamily),k(a,"fontSize")&&(r.fontSize=a.fontSize),k(a,"fontStyle")&&(r.fontStyle=a.fontStyle),k(a,"fontWeight")&&(r.fontWeight=a.fontWeight),o={type:"text",style:r,
// ec4 does not support rectText trigger.
// And when text position is different in normal and emphasis
// => hover text trigger emphasis;
// => text position changed, leave mouse pointer immediately;
// That might cause incorrect state.
silent:!0},i={};var l=k(a,"textPosition");n?i.position=l?a.textPosition:"inside":l&&(i.position=a.textPosition),k(a,"textPosition")&&(i.position=a.textPosition),k(a,"textOffset")&&(i.offset=a.textOffset),k(a,"textRotation")&&(i.rotation=a.textRotation),k(a,"textDistance")&&(i.distance=a.textDistance)}return uI(r,t),s(r.rich,function(t){uI(t,t)}),{textConfig:i,textContent:o}}function uI(t,e){e&&(e.font=e.textFont||e.font,k(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),k(e,"textAlign")&&(t.align=e.textAlign),k(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),k(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),k(e,"textWidth")&&(t.width=e.textWidth),k(e,"textHeight")&&(t.height=e.textHeight),k(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),k(e,"textPadding")&&(t.padding=e.textPadding),k(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),k(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),k(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),k(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),k(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),k(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),k(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function cI(t,e,n){var i=t;i.textPosition=i.textPosition||n.position||"inside",null!=n.offset&&(i.textOffset=n.offset),null!=n.rotation&&(i.textRotation=n.rotation),null!=n.distance&&(i.textDistance=n.distance);var o=i.textPosition.indexOf("inside")>=0,r=t.fill||"#000";dI(i,e);var a=null==i.textFill;return o?a&&(i.textFill=n.insideFill||"#fff",!i.textStroke&&n.insideStroke&&(i.textStroke=n.insideStroke),!i.textStroke&&(i.textStroke=r),null==i.textStrokeWidth&&(i.textStrokeWidth=2)):(a&&(i.textFill=t.fill||n.outsideFill||"#000"),!i.textStroke&&n.outsideStroke&&(i.textStroke=n.outsideStroke)),i.text=e.text,i.rich=e.rich,s(e.rich,function(t){dI(t,t)}),i}function dI(t,e){e&&(k(e,"fill")&&(t.textFill=e.fill),k(e,"stroke")&&(t.textStroke=e.fill),k(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),k(e,"font")&&(t.font=e.font),k(e,"fontStyle")&&(t.fontStyle=e.fontStyle),k(e,"fontWeight")&&(t.fontWeight=e.fontWeight),k(e,"fontSize")&&(t.fontSize=e.fontSize),k(e,"fontFamily")&&(t.fontFamily=e.fontFamily),k(e,"align")&&(t.textAlign=e.align),k(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),k(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),k(e,"width")&&(t.textWidth=e.width),k(e,"height")&&(t.textHeight=e.height),k(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),k(e,"padding")&&(t.textPadding=e.padding),k(e,"borderColor")&&(t.textBorderColor=e.borderColor),k(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),k(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),k(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),k(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),k(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),k(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),k(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),k(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),k(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),k(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var hI={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},pI=x(hI);e(Me,function(t,e){return t[e]=1,t},{}),Me.join(", ");var fI=["","style","shape","extra"],gI=wn();function yI(t,e,n,i,o){var r=t+"Animation",a=Yi(t,i,o)||{},s=gI(e).userDuring;return a.duration>0&&(a.during=s?ut(wI,{el:e,userDuring:s}):null,a.setToFinal=!0,a.scope=t),f(a,n[r]),a}function mI(t,e,n,i){var o=(i=i||{}).dataIndex,r=i.isInit,a=i.clearStyle,u=n.isAnimationEnabled(),c=gI(t),d=e.style;c.userDuring=e.during;var h={},p={};if(function(t,e,n){for(var i=0;i<pI.length;i++){var o=pI[i],r=hI[o],a=e[o];a&&(n[r[0]]=a[0],n[r[1]]=a[1])}for(i=0;i<Me.length;i++){var s=Me[i];null!=e[s]&&(n[s]=e[s])}}(0,e,p),II("shape",e,p),II("extra",e,p),!r&&u&&(function(t,e,n){for(var i=e.transition,o=_I(i)?Me:dn(i||[]),r=0;r<o.length;r++){var a=o[r];if("style"!==a&&"shape"!==a&&"extra"!==a){var s=t[a];n[a]=s}}}(t,e,h),MI("shape",t,e,h),MI("extra",t,e,h),function(t,e,n,i){if(!n)return;var o,r=t.style;if(r){var a=n.transition,s=e.transition;if(a&&!_I(a)){var u=dn(a);!o&&(o=i.style={});for(var c=0;c<u.length;c++){var d=r[g=u[c]];o[g]=d}}else if(t.getAnimationStyleProps&&(_I(s)||_I(a)||l(s,"style")>=0)){var h=t.getAnimationStyleProps(),p=h?h.style:null;if(p){!o&&(o=i.style={});var f=x(n);for(c=0;c<f.length;c++){var g;if(p[g=f[c]]){d=r[g];o[g]=d}}}}}}(t,e,d,h)),p.style=d,function(t,e,n){var i=e.style;if(!t.isGroup&&i){if(n){t.useStyle({});for(var o=t.animators,r=0;r<o.length;r++){var a=o[r];"style"===a.targetName&&a.changeTarget(t.style)}}t.setStyle(i)}e&&(e.style=null,e&&t.attr(e),e.style=i)}(t,p,a),function(t,e){k(e,"silent")&&(t.silent=e.silent),k(e,"ignore")&&(t.ignore=e.ignore),t instanceof qt&&k(e,"invisible")&&(t.invisible=e.invisible);t instanceof y&&k(e,"autoBatch")&&(t.autoBatch=e.autoBatch)}(t,e),u)if(r){var g={};s(fI,function(t){var n=t?e[t]:e;n&&n.enterFrom&&(t&&(g[t]=g[t]||{}),f(t?g[t]:g,n.enterFrom))});var m=yI("enter",t,e,n,o);m.duration>0&&t.animateFrom(g,m)}else!function(t,e,n,i,o){if(o){var r=yI("update",t,e,i,n);r.duration>0&&t.animateFrom(o,r)}}(t,e,o||0,n,h);vI(t,e),d?t.dirty():t.markRedraw()}function vI(t,e){for(var n=gI(t).leaveToProps,i=0;i<fI.length;i++){var o=fI[i],r=o?e[o]:e;r&&r.leaveTo&&(n||(n=gI(t).leaveToProps={}),o&&(n[o]=n[o]||{}),f(o?n[o]:n,r.leaveTo))}}function xI(t,e,n,i){if(t){var o=t.parent,r=gI(t).leaveToProps;if(r){var a=yI("update",t,e,n,0);a.done=function(){o.remove(t)},t.animateTo(r,a)}else o.remove(t)}}function _I(t){return"all"===t}var bI={},SI={
// Usually other props do not need to be changed in animation during.
setTransform:function(t,e){return bI.el[t]=e,this},getTransform:function(t){return bI.el[t]},setShape:function(t,e){var n=bI.el;return(n.shape||(n.shape={}))[t]=e,n.dirtyShape&&n.dirtyShape(),this},getShape:function(t){var e=bI.el.shape;if(e)return e[t]},setStyle:function(t,e){var n=bI.el,i=n.style;return i&&(i[t]=e,n.dirtyStyle&&n.dirtyStyle()),this},getStyle:function(t){var e=bI.el.style;if(e)return e[t]},setExtra:function(t,e){return(bI.el.extra||(bI.el.extra={}))[t]=e,this},getExtra:function(t){var e=bI.el.extra;if(e)return e[t]}};function wI(){var t=this,e=t.el;if(e){var n=gI(e).userDuring,i=t.userDuring;n===i?(bI.el=e,i(SI)):t.el=t.userDuring=null}}function MI(t,e,n,i){var o=n[t];if(o){var r,a=e[t];if(a){var s=n.transition,u=o.transition;if(u)if(!r&&(r=i[t]={}),_I(u))f(r,a);else for(var c=dn(u),d=0;d<c.length;d++){var h=a[g=c[d]];r[g]=h}else if(_I(s)||l(s,t)>=0){!r&&(r=i[t]={});var p=x(a);for(d=0;d<p.length;d++){var g;h=a[g=p[d]];DI(o[g],h)&&(r[g]=h)}}}}}function II(t,e,n){var i=e[t];if(i)for(var o=n[t]={},r=x(i),a=0;a<r.length;a++){var s=r[a];o[s]=Ie(i[s])}}function DI(t,e){return v(t)?t!==e:null!=t&&isFinite(t)}var TI=wn(),CI=["percent","easing","shape","style","extra"];function AI(t){t.stopAnimation("keyframe"),t.attr(TI(t))}function LI(t,e,n){if(n.isAnimationEnabled()&&e)if(o(e))s(e,function(e){LI(t,e,n)});else{var i=e.keyframes,r=e.duration;if(n&&null==r){var a=Yi("enter",n,0);r=a&&a.duration}if(i&&r){var u=TI(t);s(fI,function(n){var o;n&&!t[n]||(i.sort(function(t,e){return t.percent-e.percent}),s(i,function(i){var a=t.animators,c=n?i[n]:i;if(c){var d=x(c);if(n||(d=lt(d,function(t){return l(CI,t)<0})),d.length){o||((o=t.animate(n,e.loop,!0)).scope="keyframe");for(var h=0;h<a.length;h++)a[h]!==o&&a[h].targetName===o.targetName&&a[h].stopTracks(d);n&&(u[n]=u[n]||{});var p=n?u[n]:u;s(d,function(e){p[e]=((n?t[n]:t)||{})[e]}),o.whenWithKeys(r*i.percent,c,d,i.easing)}}}),o&&o.delay(e.delay||0).duration(r).start(e.easing))})}}}var kI="emphasis",PI="normal",NI="blur",OI="select",RI=[PI,kI,NI,OI],EI={normal:["itemStyle"],emphasis:[kI,"itemStyle"],blur:[NI,"itemStyle"],select:[OI,"itemStyle"]},VI={normal:["label"],emphasis:[kI,"label"],blur:[NI,"label"],select:[OI,"label"]},zI=["x","y"],BI={normal:{},emphasis:{},blur:{},select:{}},GI={cartesian2d:function(t){var e=t.master.getRect();return{coordSys:{
// The name exposed to user is always 'cartesian2d' but not 'grid'.
type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(e){return t.dataToPoint(e)},size:ut(iI,t)}}},geo:function(t){var e=t.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:t.getZoom()},api:{coord:function(e){return t.dataToPoint(e)},size:ut(oI,t)}}},single:function(t){var e=t.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(e){return t.dataToPoint(e)},size:ut(rI,t)}}},polar:function(t){var e=t.getRadiusAxis(),n=t.getAngleAxis(),i=e.getExtent();return i[0]>i[1]&&i.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:i[1],r0:i[0]},api:{coord:function(i){var o=e.dataToRadius(i[0]),r=n.dataToAngle(i[1]),a=t.coordToPoint([o,r]);return a.push(o,r*Math.PI/180),a},size:ut(aI,t)}}},calendar:function(t){var e=t.getRect(),n=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(e,n){return t.dataToPoint(e,n)}}}}};function FI(t){return t instanceof y}function WI(t){return t instanceof qt}var HI=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.render=function(t,e,n,i){this._progressiveEls=null;var o=this._data,r=t.getData(),a=this.group,s=jI(t,r,e,n);o||a.removeAll(),r.diff(o).add(function(e){KI(n,null,e,s(e,i),t,a,r)}).remove(function(e){var n=o.getItemGraphicEl(e);n&&xI(n,eI(n).option,t)}).update(function(e,l){var u=o.getItemGraphicEl(l);KI(n,u,e,s(e,i),t,a,r)}).execute();var l=t.get("clip",!0)?Jf(t.coordinateSystem,!1,t):null;l?a.setClipPath(l):a.removeClipPath(),this._data=r},e.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,e,n,i,o){var r=e.getData(),a=jI(e,r,n,i),s=this._progressiveEls=[];function l(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}for(var u=t.start;u<t.end;u++){var c=KI(null,null,u,a(u,o),e,this.group,r);c&&(c.traverse(l),s.push(c))}},e.prototype.eachRendered=function(t){Io(this._progressiveEls||this.group,t)},e.prototype.filterForExposedEvent=function(t,e,n,i){var o=e.element;if(null==o||n.name===o)return!0;for(;(n=n.__hostTarget||n.parent)&&n!==this.group;)if(n.name===o)return!0;return!1},e.type="custom",e}(au);function YI(t){var e,n=t.type;if("path"===n){var i=t.shape,o=null!=i.width&&null!=i.height?{x:i.x||0,y:i.y||0,width:i.width,height:i.height}:null,r=aD(i);e=ro(r,null,o,i.layout||"center"),eI(e).customPathData=r}else if("image"===n)e=new b({}),eI(e).customImagePath=t.style.image;else if("text"===n)e=new Q({});else if("group"===n)e=new X;else{if("compoundPath"===n)throw new Error('"compoundPath" is not supported yet.');var a=oo(n);if(!a){sn("")}e=new a}return eI(e).customGraphicType=n,e.name=t.name,e.z2EmphasisLift=1,e.z2SelectLift=1,e}function UI(t,e,n,i,o,r,a){AI(e);var s=o&&o.normal.cfg;s&&e.setTextConfig(s),i&&null==i.transition&&(i.transition=zI);var l=i&&i.style;if(l){if("text"===e.type){var u=l;k(u,"textFill")&&(u.fill=u.textFill),k(u,"textStroke")&&(u.stroke=u.textStroke)}var c=void 0,d=FI(e)?l.decal:null;t&&d&&(d.dirty=!0,c=bc(d,t)),l.__decalPattern=c}WI(e)&&(l&&(c=l.__decalPattern)&&(l.decal=c));mI(e,i,r,{dataIndex:n,isInit:a,clearStyle:!0}),LI(e,i.keyframeAnimation,r)}function ZI(t,e,n,i,o){var r=e.isGroup?null:e,a=o&&o[t].cfg;if(r){var s=r.ensureState(t);if(!1===i){var l=r.getState(t);l&&(l.style=null)}else s.style=i||null;a&&(s.textConfig=a),mi(r)}}function XI(t,e,n){var i=n===PI,o=i?e:tD(e,n),r=o?o.z2:null;null!=r&&((i?t:t.ensureState(n)).z2=r||0)}function jI(e,n,i,o){var r=e.get("renderItem"),a=e.coordinateSystem,s={};a&&(s=a.prepareCustoms?a.prepareCustoms(a):GI[a.type](a));for(var l,u,c=C({getWidth:o.getWidth,getHeight:o.getHeight,getZr:o.getZr,getDevicePixelRatio:o.getDevicePixelRatio,value:function(t,e){return null==e&&(e=l),n.getStore().get(n.getDimensionIndex(t||0),e)},style:function(i,o){null==o&&(o=l);var r=n.getItemVisual(o,"style"),a=r&&r.fill,s=r&&r.opacity,u=x(o,PI).getItemStyle();null!=a&&(u.fill=a),null!=s&&(u.opacity=s);var c={inheritColor:t(a)?a:"#000"},d=b(o,PI),h=Po(d,null,c,!1,!0);h.text=d.getShallow("show")?_(e.getFormattedLabel(o,PI),kf(n,o)):null;var p=No(d,c,!1);return w(i,u),u=cI(u,h,p),i&&S(u,i),u.legacy=!0,u},ordinalRawValue:function(t,e){null==e&&(e=l),t=t||0;var i=n.getDimensionInfo(t);if(!i){var o=n.getDimensionIndex(t);return o>=0?n.getStore().get(o,e):void 0}var r=n.get(i.name,e),a=i&&i.ordinalMeta;return a?a.categories[r]:r},styleEmphasis:function(t,i){null==i&&(i=l);var o=x(i,kI).getItemStyle(),r=b(i,kI),a=Po(r,null,null,!0,!0);a.text=r.getShallow("show")?Gt(e.getFormattedLabel(i,kI),e.getFormattedLabel(i,PI),kf(n,i)):null;var s=No(r,null,!0);return w(t,o),o=cI(o,a,s),t&&S(o,t),o.legacy=!0,o},visual:function(t,e){if(null==e&&(e=l),k(QM,t)){var i=n.getItemVisual(e,"style");return i?i[QM[t]]:null}if(k(tI,t))return n.getItemVisual(e,t)},barLayout:function(t){if("cartesian2d"===a.type){var e=a.getBaseAxis();return function(t){var e=[],n=t.axis,i="axis0";if("category"===n.type){for(var o=n.getBandWidth(),r=0;r<t.count;r++)e.push(C({bandWidth:o,axisKey:i,stackId:Ah+r},t));var a=Oh(e),s=[];for(r=0;r<t.count;r++){var l=a[i][Ah+r];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}(C({axis:e},t))}},currentSeriesIndices:function(){return i.getCurrentSeriesIndices()},font:function(t){return zo(t,i)}},s.api||{}),d={
// The life cycle of context: current round of rendering.
// The global life cycle is probably not necessary, because
// user can store global status by themselves.
context:{},seriesId:e.id,seriesName:e.name,seriesIndex:e.seriesIndex,coordSys:s.coordSys,dataInsideLength:n.count(),encode:qI(e.getData())},h={},p={},f={},g={},y=0;y<RI.length;y++){var m=RI[y];f[m]=e.getModel(EI[m]),g[m]=e.getModel(VI[m])}function v(t){return t===l?u||(u=n.getItemModel(t)):n.getItemModel(t)}function x(t,e){return n.hasItemOption?t===l?h[e]||(h[e]=v(t).getModel(EI[e])):v(t).getModel(EI[e]):f[e]}function b(t,e){return n.hasItemOption?t===l?p[e]||(p[e]=v(t).getModel(VI[e])):v(t).getModel(VI[e]):g[e]}return function(t,e){return l=t,u=null,h={},p={},r&&r(C({dataIndexInside:t,dataIndex:n.getRawIndex(t),
// Can be used for optimization when zoom or roam.
actionType:e?e.type:null},d),c)};function S(t,e){for(var n in e)k(e,n)&&(t[n]=e[n])}function w(t,e){t&&(t.textFill&&(e.textFill=t.textFill),t.textPosition&&(e.textPosition=t.textPosition))}}function qI(t){var e={};return s(t.dimensions,function(n){var i=t.getDimensionInfo(n);if(!i.isExtraCoord){var o=i.coordDim;(e[o]=e[o]||[])[i.coordDimIndex]=t.getDimensionIndex(n)}}),e}function KI(t,e,n,i,o,r,a){if(i){var s=JI(t,e,n,i,o,r);return s&&a.setItemGraphicEl(n,s),s&&Oi(s,i.focus,i.blurScope,i.emphasisDisabled),s}r.remove(e)}function JI(t,e,n,i,o,r){var a=-1,s=e;e&&$I(e,i,o)&&(a=l(r.childrenRef(),e),e=null);var u,c,d=!e,h=e;h?h.clearStates():(h=YI(i),s&&(u=s,(c=h).copyTransform(u),WI(c)&&WI(u)&&(c.setStyle(u.style),c.z=u.z,c.z2=u.z2,c.zlevel=u.zlevel,c.invisible=u.invisible,c.ignore=u.ignore,FI(c)&&FI(u)&&c.setShape(u.shape)))),!1===i.morph?h.disableMorphing=!0:h.disableMorphing&&(h.disableMorphing=!1),BI.normal.cfg=BI.normal.conOpt=BI.emphasis.cfg=BI.emphasis.conOpt=BI.blur.cfg=BI.blur.conOpt=BI.select.cfg=BI.select.conOpt=null,BI.isLegacy=!1,function(t,e,n,i,o,r){if(t.isGroup)return;QI(n,null,r),QI(n,kI,r);var a=r.normal.conOpt,s=r.emphasis.conOpt,l=r.blur.conOpt,u=r.select.conOpt;if(null!=a||null!=s||null!=u||null!=l){var c=t.getTextContent();if(!1===a)c&&t.removeTextContent();else{a=r.normal.conOpt=a||{type:"text"},c?c.clearStates():(c=YI(a),t.setTextContent(c)),UI(null,c,e,a,null,i,o);for(var d=a&&a.style,h=0;h<RI.length;h++){var p=RI[h];if(p!==PI){var f=r[p].conOpt;ZI(p,c,0,eD(a,f,p),null)}}d?c.dirty():c.markRedraw()}}}(h,n,i,o,d,BI),function(t,e,n,i,o){var r=n.clipPath;if(!1===r)t&&t.getClipPath()&&t.removeClipPath();else if(r){var a=t.getClipPath();a&&$I(a,r,i)&&(a=null),a||(a=YI(r),t.setClipPath(a)),UI(null,a,e,r,null,i,o)}}(h,n,i,o,d),UI(t,h,n,i,BI,o,d),k(i,"info")&&(eI(h).info=i.info);for(var p=0;p<RI.length;p++){var f=RI[p];if(f!==PI){var g=tD(i,f);ZI(f,h,0,eD(i,g,f),BI)}}return function(t,e,n){if(!t.isGroup){var i=t,o=n.currentZ,r=n.currentZLevel;i.z=o,i.zlevel=r;var a=e.z2;null!=a&&(i.z2=a||0);for(var s=0;s<RI.length;s++)XI(i,e,RI[s])}}(h,i,o),"group"===i.type&&function(t,e,n,i,o){var r=i.children,a=r?r.length:0,s=i.$mergeChildren,l="byName"===s||i.diffChildrenByName,u=!1===s;if(!a&&!l&&!u)return;if(l)return c={api:t,oldChildren:e.children()||[],newChildren:r||[],dataIndex:n,seriesModel:o,group:e},void new kd(c.oldChildren,c.newChildren,iD,iD,c).add(oD).update(oD).remove(rD).execute();var c;u&&e.removeAll();for(var d=0;d<a;d++){var h=r[d],p=e.childAt(d);h?(null==h.ignore&&(h.ignore=!1),JI(t,p,n,h,o,e)):p.ignore=!0}for(var f=e.childCount()-1;f>=d;f--){var g=e.childAt(f);nD(e,g,o)}}(t,h,n,i,o),a>=0?r.replaceAt(h,a):r.add(h),h}function $I(t,e,n){var i,o=eI(t),r=e.type,a=e.shape,s=e.style;
// Always create new if universal transition is enabled.
// Because we do transition after render. It needs to know what old element is. Replacement will loose it.
return n.isUniversalTransitionEnabled()||null!=r&&r!==o.customGraphicType||"path"===r&&((i=a)&&(k(i,"pathData")||k(i,"d")))&&aD(a)!==o.customPathData||"image"===r&&k(s,"image")&&s.image!==o.customImagePath}function QI(t,e,n){var i=e?tD(t,e):t,o=e?eD(t,i,kI):t.style,r=t.type,a=i?i.textConfig:null,s=t.textContent,l=s?e?tD(s,e):s:null;if(o&&(// Because emphasis style has little info to detect legacy,
// if normal is legacy, emphasis is trade as legacy.
n.isLegacy||sI(o,r,!!a,!!l))){n.isLegacy=!0;var u=lI(o,r,!e);!a&&u.textConfig&&(a=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var c=l;!c.type&&(c.type="text")}var d=e?n[e]:n.normal;d.cfg=a,d.conOpt=l}function tD(t,e){return e?t?t[e]:null:t}function eD(t,e,n){var i=e&&e.style;return null==i&&n===kI&&t&&(i=t.styleEmphasis),i}function nD(t,e,n){e&&xI(e,eI(t).option,n)}function iD(t,e){var n=t&&t.name;return null!=n?n:"e\0\0"+e}function oD(t,e){var n=this.context,i=null!=t?n.newChildren[t]:null,o=null!=e?n.oldChildren[e]:null;JI(n.api,o,n.dataIndex,i,n.seriesModel,n.group)}function rD(t){var e=this.context,n=e.oldChildren[t];n&&xI(n,eI(n).option,e.seriesModel)}function aD(t){return t&&(t.pathData||t.d)}var sD=wn(),lD=nt,uD=ut,cD=
/** @class */function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(t,e,n,i){var o=e.get("value"),r=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,i||this._lastValue!==o||this._lastStatus!==r){this._lastValue=o,this._lastStatus=r;var a=this._group,s=this._handle;if(!r||"hide"===r)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeElOption(l,o,t,e,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var c=this._moveAnimation=this.determineAnimation(t,e);if(a){var d=at(dD,e,c);this.updatePointerEl(a,l,d),this.updateLabelEl(a,l,d,e)}else a=this._group=new X,this.createPointerEl(a,l,t,e),this.createLabelEl(a,l,t,e),n.getZr().add(a);gD(a,e,!0),this._renderHandle(o)}},t.prototype.remove=function(t){this.clear(t)},t.prototype.dispose=function(t){this.clear(t)},t.prototype.determineAnimation=function(t,e){var n=e.get("animation"),i=t.axis,o="category"===i.type,r=e.get("snap");if(!r&&!o)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(o&&i.getBandWidth()>a)return!0;if(r){var s=Yy(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},t.prototype.makeElOption=function(t,e,n,i,o){},t.prototype.createPointerEl=function(t,e,n,i){var o=e.pointer;if(o){var r=sD(t).pointerEl=new Do[o.type](lD(e.pointer));t.add(r)}},t.prototype.createLabelEl=function(t,e,n,i){if(e.label){var o=sD(t).labelEl=new Q(lD(e.label));t.add(o),pD(o,i)}},t.prototype.updatePointerEl=function(t,e,n){var i=sD(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},t.prototype.updateLabelEl=function(t,e,n,i){var o=sD(t).labelEl;o&&(o.setStyle(e.label.style),n(o,{
// Consider text length change in vertical axis, animation should
// be used on shape, otherwise the effect will be weird.
// TODOTODO
// shape: elOption.label.shape,
x:e.label.x,y:e.label.y}),pD(o,i))},t.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,i=this._api.getZr(),r=this._handle,a=n.getModel("handle"),s=n.get("status");if(!a.get("show")||!s||"hide"===s)return r&&i.remove(r),void(this._handle=null);this._handle||(e=!0,r=this._handle=xo(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Ut(t.event)},onmousedown:uD(this._onHandleDragMove,this,0,0),drift:uD(this._onHandleDragMove,this),ondragend:uD(this._onHandleDragEnd,this)}),i.add(r)),gD(r,n,!1),r.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");o(l)||(l=[l,l]),r.scaleX=l[0]/2,r.scaleY=l[1]/2,yu(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},t.prototype._moveHandleToValue=function(t,e){dD(this._axisPointerModel,!e&&this._moveAnimation,this._handle,fD(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(fD(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(fD(i)),sD(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),mu(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},t}();function dD(t,e,n,i){hD(sD(n).lastProp,i)||(sD(n).lastProp=i,e?Zi(n,i,t):(n.stopAnimation(),n.attr(i)))}function hD(t,e){if(r(t)&&r(e)){var n=!0;return s(e,function(e,i){n=n&&hD(t[i],e)}),!!n}return t===e}function pD(t,e){t[e.get(["label","show"])?"show":"hide"]()}function fD(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function gD(t,e,n){var i=e.get("z"),o=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=o&&(t.zlevel=o),t.silent=n)})}function yD(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle()).fill=null:"shadow"===n&&((e=i.getAreaStyle()).stroke=null),e}function mD(t,e,n,i,o){var r=vD(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=Yr(a.get("padding")||0),l=a.getFont(),u=At(r,l),c=o.position,d=u.width+s[1]+s[3],h=u.height+s[0]+s[2],p=o.align;"right"===p&&(c[0]-=d),"center"===p&&(c[0]-=d/2);var f=o.verticalAlign;"bottom"===f&&(c[1]-=h),"middle"===f&&(c[1]-=h/2),function(t,e,n,i){var o=i.getWidth(),r=i.getHeight();t[0]=Math.min(t[0]+e,o)-e,t[1]=Math.min(t[1]+n,r)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(c,d,h,i);var g=a.get("backgroundColor");g&&"auto"!==g||(g=e.get(["axisLine","lineStyle","color"])),t.label={
// shape: {x: 0, y: 0, width: width, height: height, r: labelModel.get('borderRadius')},
x:c[0],y:c[1],style:Po(a,{text:r,font:l,fill:a.getTextColor(),padding:s,backgroundColor:g}),
// Label should be over axisPointer.
z2:10}}function vD(e,n,i,o,r){e=n.scale.parse(e);var a=n.scale.getLabel({value:e},{
// If `precision` is set, width can be fixed (like '12.00500'), which
// helps to debounce when when moving label.
precision:r.precision}),l=r.formatter;if(l){var u={value:hp(n,{value:e}),axisDimension:n.dim,axisIndex:n.index,seriesData:[]};s(o,function(t){var e=i.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,o=e&&e.getDataParams(n);o&&u.seriesData.push(o)}),t(l)?a=l.replace("{value}",a):g(l)&&(a=l(u))}return a}function xD(t,e,n){var i=Jt();return Wt(i,i,n.rotation),ee(i,i,n.position),fo([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function _D(t,e,n,i,o,r){var a=Ey.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=o.get(["label","margin"]),mD(e,i,o,r,{position:xD(i.axis,t,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function bD(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}function SD(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}function wD(t,e,n,i,o,r){return{cx:t,cy:e,r0:n,r:i,startAngle:o,endAngle:r,clockwise:!0}}var MD=
/** @class */function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.makeElOption=function(t,e,n,i,o){var r=n.axis,a=r.grid,s=i.get("type"),l=ID(a,r).getOtherAxis(r).getGlobalExtent(),u=r.toGlobalCoord(r.dataToCoord(e,!0));if(s&&"none"!==s){var c=yD(i),d=DD[s](r,u,l);d.style=c,t.graphicKey=d.type,t.pointer=d}_D(
// @ts-ignore
e,t,Dy(a.model,n),n,i,o)},e.prototype.getHandleTransform=function(t,e,n){var i=Dy(e.axis.grid.model,e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=xD(e.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var o=n.axis,r=o.grid,a=o.getGlobalExtent(!0),s=ID(r,o).getOtherAxis(o).getGlobalExtent(),l="x"===o.dim?0:1,u=[t.x,t.y];u[l]+=e[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var c=(s[1]+s[0])/2,d=[c,c];d[l]=u[l];return{x:u[0],y:u[1],rotation:t.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},e}(cD);function ID(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var DD={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:bD([e,n[0]],[e,n[1]],TD(t))}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),o=n[1]-n[0];return{type:"Rect",shape:SD([e-i/2,n[0]],[i,o],TD(t))}}};function TD(t){return"x"===t.dim?0:1}var CD=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.type="axisPointer",e.defaultOption={
// 'auto' means that show when triggered by tooltip or handle.
show:"auto",
// zlevel: 0,
z:50,type:"line",
// axispointer triggered by tootip determine snap automatically,
// see `modelHelper`.
snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],
// Do not set 'auto' here, otherwise global animation: false
// will not effect at this axispointer.
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,
// eslint-disable-next-line
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,
// handle margin is from symbol center to axis, which is stable when circular move.
margin:50,
// color: '#1b8bbd'
// color: '#2f4554'
color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,
// For mobile performance
throttle:40}},e}(ua),AD=wn(),LD=s;function kD(t,e,n){if(!d.node){var i=e.getZr();AD(i).records||(AD(i).records={}),function(t,e){if(AD(t).initialized)return;function n(n,i){t.on(n,function(n){var o=function(t){var e={showTip:[],hideTip:[]},n=function(i){var o=e[i.type];o?o.push(i):(i.dispatchAction=n,t.dispatchAction(i))};return{dispatchAction:n,pendings:e}}(e);LD(AD(t).records,function(t){t&&i(t,n,o.dispatchAction)}),function(t,e){var n,i=t.showTip.length,o=t.hideTip.length;i?n=t.showTip[i-1]:o&&(n=t.hideTip[o-1]);n&&(n.dispatchAction=null,e.dispatchAction(n))}(o.pendings,e)})}AD(t).initialized=!0,n("click",at(ND,"click")),n("mousemove",at(ND,"mousemove")),n("globalout",PD)}(i,e),(AD(i).records[t]||(AD(i).records[t]={})).handler=n}}function PD(t,e,n){t.handler("leave",null,n)}function ND(t,e,n,i){e.handler(t,n,i)}function OD(t,e){if(!d.node){var n=e.getZr();(AD(n).records||{})[t]&&(AD(n).records[t]=null)}}var RD=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.render=function(t,e,n){var i=e.getComponent("tooltip"),o=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";kD("axisPointer",n,function(t,e,n){"none"!==o&&("leave"===t||o.indexOf(t)>=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},e.prototype.remove=function(t,e){OD("axisPointer",e)},e.prototype.dispose=function(t,e){OD("axisPointer",e)},e.type="axisPointer",e}(nu);function ED(t,e){var i,r=[],a=t.seriesIndex;if(null==a||!(i=e.getSeriesByIndex(a)))return{point:[]};var s=i.getData(),l=Sn(s,t);if(null==l||l<0||o(l))return{point:[]};var u=s.getItemGraphicEl(l),c=i.coordinateSystem;if(i.getTooltipPosition)r=i.getTooltipPosition(l)||[];else if(c&&c.dataToPoint)if(t.isStacked){var d=c.getBaseAxis(),h=c.getOtherAxis(d).dim,p=d.dim,f="x"===h||"radius"===h?1:0,g=s.mapDimension(p),y=[];y[f]=s.get(g,l),y[1-f]=s.get(s.getCalculationInfo("stackResultDimension"),l),r=c.dataToPoint(y)||[]}else r=c.dataToPoint(s.getValues(n(c.dimensions,function(t){return s.mapDimension(t)}),l))||[];else if(u){var m=u.getBoundingRect().clone();m.applyTransform(u.transform),r=[m.x+m.width/2,m.y+m.height/2]}return{point:r,el:u}}var VD=wn();function zD(t,e,n){var i=t.currTrigger,o=[t.x,t.y],r=t,a=t.dispatchAction||ut(n.dispatchAction,n),l=e.getComponent("axisPointer").coordSysAxesInfo;if(l){HD(o)&&(o=ED({seriesIndex:r.seriesIndex,
// Do not use dataIndexInside from other ec instance.
// FIXME: auto detect it?
dataIndex:r.dataIndex},e).point);var u=HD(o),c=r.axesInfo,d=l.axesInfo,h="leave"===i||HD(o),p={},f={},g={list:[],map:{}},y={showPointer:at(GD,f),showTooltip:at(FD,g)};s(l.coordSysMap,function(t,e){var n=u||t.containPoint(o);s(l.coordSysAxesInfo[e],function(t,e){var i=t.axis,r=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(c,t);if(!h&&n&&(!c||r)){var a=r&&r.value;null!=a||u||(a=i.pointToData(o)),null!=a&&BD(t,a,y,!1,p)}})});var m={};return s(d,function(t,e){var n=t.linkGroup;n&&!f[e]&&s(n.axesInfo,function(e,i){var o=f[i];if(e!==t&&o){var r=o.value;n.mapper&&(r=t.axis.scale.parse(n.mapper(r,WD(e),WD(t)))),m[t.key]=r}})}),s(m,function(t,e){BD(d[e],t,y,!0,p)}),function(t,e,n){var i=n.axesInfo=[];s(e,function(e,n){var o=e.axisPointerModel.option,r=t[n];r?(!e.useHandle&&(o.status="show"),o.value=r.value,o.seriesDataIndices=(r.payloadBatch||[]).slice()):!e.useHandle&&(o.status="hide"),"show"===o.status&&i.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:o.value})})}(f,d,p),function(t,e,n,i){if(HD(e)||!t.list.length)return void i({type:"hideTip"});var o=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:o.dataIndexInside,dataIndex:o.dataIndex,seriesIndex:o.seriesIndex,dataByCoordSys:t.list})}(g,o,t,a),function(t,e,n){var i=n.getZr(),o="axisPointerLastHighlights",r=VD(i)[o]||{},a=VD(i)[o]={};s(t,function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&t.triggerEmphasis&&s(n.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t})});var l=[],u=[];s(r,function(t,e){!a[e]&&u.push(t)}),s(a,function(t,e){!r[e]&&l.push(t)}),u.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,
// Not blur others when highlight in axisPointer.
notBlur:!0,batch:u}),l.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,
// Not blur others when highlight in axisPointer.
notBlur:!0,batch:l})}(d,0,n),p}}function BD(t,e,n,i,o){var r=t.axis;if(!r.scale.isBlank()&&r.containData(e))if(t.involveSeries){var a=function(t,e){var n=e.axis,i=n.dim,o=t,r=[],a=Number.MAX_VALUE,l=-1;return s(e.seriesModels,function(e,u){var c,d,h=e.getData().mapDimensionsAll(i);if(e.getAxisTooltipData){var p=e.getAxisTooltipData(h,t,n);d=p.dataIndices,c=p.nestestValue}else{if(!(d=e.getData().indicesOfNearest(h[0],t,
// Add a threshold to avoid find the wrong dataIndex
// when data length is not same.
// false,
"category"===n.type?.5:null)).length)return;c=e.getData().get(h[0],d[0])}if(null!=c&&isFinite(c)){var f=t-c,g=Math.abs(f);g<=a&&((g<a||f>=0&&l<0)&&(a=g,l=f,o=c,r.length=0),s(d,function(t){r.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:r,snapToValue:o}}(e,t),l=a.payloadBatch,u=a.snapToValue;l[0]&&null==o.seriesIndex&&f(o,l[0]),!i&&t.snap&&r.containData(u)&&null!=u&&(e=u),n.showPointer(t,e,l),n.showTooltip(t,a,u)}else n.showPointer(t,e)}function GD(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function FD(t,e,n,i){var o=n.payloadBatch,r=e.axis,a=r.model,s=e.axisPointerModel;if(e.triggerTooltip&&o.length){var l=e.coordSys.model,u=Zy(l),c=t.map[u];c||(c=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(c)),c.dataByAxis.push({axisDim:r.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:i,
// Caustion: viewHelper.getValueLabel is actually on "view stage", which
// depends that all models have been updated. So it should not be performed
// here. Considering axisPointerModel used here is volatile, which is hard
// to be retrieve in TooltipView, we prepare parameters here.
valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:o.slice()})}}function WD(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function HD(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function YD(t){jy.registerAxisPointerClass("CartesianAxisPointer",MD),t.registerComponentModel(CD),t.registerComponentView(RD),t.registerPreprocessor(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!o(e)&&(t.axisPointer.link=[e])}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=Wy(t,e)}),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},zD)}function UD(t){_p(am),_p(YD)}var ZD=
/** @class */function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.makeElOption=function(t,e,n,i,o){var r=n.axis;"angle"===r.dim&&(this.animationThreshold=Math.PI/18);var a=r.polar,s=a.getOtherAxis(r).getExtent(),l=r.dataToCoord(e),u=i.get("type");if(u&&"none"!==u){var c=yD(i),d=XD[u](r,a,l,s);d.style=c,t.graphicKey=d.type,t.pointer=d}var h=function(t,e,n,i,o){var r=e.axis,a=r.dataToCoord(t),s=i.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,c,d=i.getRadiusAxis().getExtent();if("radius"===r.dim){var h=Jt();Wt(h,h,s),ee(h,h,[i.cx,i.cy]),l=fo([a,-o],h);var p=e.getModel("axisLabel").get("rotate")||0,f=Ey.innerTextLayout(s,p*Math.PI/180,-1);u=f.textAlign,c=f.textVerticalAlign}else{var g=d[1];l=i.coordToPoint([g+o,a]);var y=i.cx,m=i.cy;u=Math.abs(l[0]-y)/g<.3?"center":l[0]>y?"left":"right",c=Math.abs(l[1]-m)/g<.3?"middle":l[1]>m?"top":"bottom"}return{position:l,align:u,verticalAlign:c}}(e,n,0,a,i.get(["label","margin"]));mD(t,n,i,o,h)},e}(cD);var XD={line:function(t,e,n,i){return"angle"===t.dim?{type:"Line",shape:bD(e.coordToPoint([i[0],n]),e.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,i){var o=Math.max(1,t.getBandWidth()),r=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:wD(e.cx,e.cy,i[0],i[1],
// In ECharts y is negative if angle is positive
(-n-o/2)*r,(o/2-n)*r)}:{type:"Sector",shape:wD(e.cx,e.cy,n-o/2,n+o/2,0,2*Math.PI)}}},jD=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.findAxisModel=function(t){var e;return this.ecModel.eachComponent(t,function(t){t.getCoordSysModel()===this&&(e=t)},this),e},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={
// zlevel: 0,
z:0,center:["50%","50%"],radius:"80%"},e}(ua),qD=
/** @class */function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Tn).models[0]},e.type="polarAxis",e}(ua);it(qD,mp);var KD=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.type="angleAxis",e}(qD),JD=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.type="radiusAxis",e}(qD),$D=
/** @class */function(t){function e(e,n){return t.call(this,"radius",e,n)||this}return h(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e}(Hp);$D.prototype.dataToRadius=Hp.prototype.dataToCoord,$D.prototype.radiusToData=Hp.prototype.coordToData;var QD=wn(),tT=
/** @class */function(t){function e(e,n){return t.call(this,"angle",e,n||[0,360])||this}return h(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,e=t.getLabelModel(),n=t.scale,i=n.getExtent(),o=n.count();if(i[1]-i[0]<1)return 0;var r=i[0],a=t.dataToCoord(r+1)-t.dataToCoord(r),s=Math.abs(a),l=At(null==r?"":r+"",e.getFont(),"center","top"),u=Math.max(l.height,7)/s;isNaN(u)&&(u=Infinity);var c=Math.max(0,Math.floor(u)),d=QD(t.model),h=d.lastAutoInterval,p=d.lastTickCount;return null!=h&&null!=p&&Math.abs(h-c)<=1&&Math.abs(p-o)<=1&&h>c?c=h:(d.lastTickCount=o,d.lastAutoInterval=c),c},e}(Hp);tT.prototype.dataToAngle=Hp.prototype.dataToCoord,tT.prototype.angleToData=Hp.prototype.coordToData;var eT=["radius","angle"],nT=
/** @class */function(){function t(t){this.dimensions=eT,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new $D,this._angleAxis=new tT,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},t.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},t.prototype.getAxis=function(t){return this["_"+t+"Axis"]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(t){var e=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===t&&e.push(n),i.scale.type===t&&e.push(i),e},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},t.prototype.dataToPoint=function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},t.prototype.pointToData=function(t,e){var n=this.pointToCoord(t);return[this._radiusAxis.radiusToData(n[0],e),this._angleAxis.angleToData(n[1],e)]},t.prototype.pointToCoord=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=this.getAngleAxis(),o=i.getExtent(),r=Math.min(o[0],o[1]),a=Math.max(o[0],o[1]);i.inverse?r=a-360:a=r+360;var s=Math.sqrt(e*e+n*n);e/=s,n/=s;for(var l=Math.atan2(-n,e)/Math.PI*180,u=l<r?1:-1;l<r||l>a;)l+=360*u;return[s,l]},t.prototype.coordToPoint=function(t){var e=t[0],n=t[1]/180*Math.PI;return[Math.cos(n)*e+this.cx,-Math.sin(n)*e+this.cy]},t.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var n=t.getExtent(),i=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:t.inverse,contain:function(t,e){var n=t-this.cx,i=e-this.cy,r=n*n+i*i,a=this.r,s=this.r0;return a!==s&&r-o<=a*a&&r+o>=s*s}}},t.prototype.convertToPixel=function(t,e,n){return iT(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return iT(e)===this?this.pointToData(n):null},t}();function iT(t){var e=t.seriesModel,n=t.polarModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}function oT(t,e){var n=this,i=n.getAngleAxis(),o=n.getRadiusAxis();if(i.scale.setExtent(Infinity,-Infinity),o.scale.setExtent(Infinity,-Infinity),t.eachSeries(function(t){if(t.coordinateSystem===n){var e=t.getData();s(yp(e,"radius"),function(t){o.scale.unionExtentFromData(e,t)}),s(yp(e,"angle"),function(t){i.scale.unionExtentFromData(e,t)})}}),up(i.scale,i.model),up(o.scale,o.model),"category"===i.type&&!i.onBand){var r=i.getExtent(),a=360/i.scale.count();i.inverse?r[1]+=a:r[1]-=a,i.setExtent(r[0],r[1])}}function rT(t,e){var n;if(t.type=e.get("type"),t.scale=cp(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),function(t){return"angleAxis"===t.mainType}(e)){t.inverse=t.inverse!==e.get("clockwise");var i=e.get("startAngle"),o=null!==(n=e.get("endAngle"))&&void 0!==n?n:i+(t.inverse?-360:360);t.setExtent(i,o)}e.axis=t,t.model=e}var aT={dimensions:eT,create:function(t,e){var n=[];return t.eachComponent("polar",function(t,i){var r=new nT(i+"");r.update=oT;var a=r.getRadiusAxis(),s=r.getAngleAxis(),l=t.findAxisModel("radiusAxis"),u=t.findAxisModel("angleAxis");rT(a,l),rT(s,u),function(t,e,n){var i=e.get("center"),r=n.getWidth(),a=n.getHeight();t.cx=Ge(i[0],r),t.cy=Ge(i[1],a);var s=t.getRadiusAxis(),l=Math.min(r,a)/2,u=e.get("radius");null==u?u=[0,"100%"]:o(u)||(u=[0,u]);var c=[Ge(u[0],l),Ge(u[1],l)];s.inverse?s.setExtent(c[1],c[0]):s.setExtent(c[0],c[1])}(r,t,e),n.push(r),t.coordinateSystem=r,r.model=t}),t.eachSeries(function(t){if("polar"===t.get("coordinateSystem")){var e=t.getReferringComponents("polar",Tn).models[0];t.coordinateSystem=e.coordinateSystem}}),n}},sT=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function lT(t,e,n){e[1]>e[0]&&(e=e.slice().reverse());var i=t.coordToPoint([e[0],n]),o=t.coordToPoint([e[1],n]);return{x1:i[0],y1:i[1],x2:o[0],y2:o[1]}}function uT(t){return t.getRadiusAxis().inverse?0:1}function cT(t){var e=t[0],n=t[t.length-1];e&&n&&Math.abs(Math.abs(e.coord-n.coord)-360)<1e-4&&t.pop()}var dT=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="PolarAxisPointer",n}return h(e,t),e.prototype.render=function(t,e){if(this.group.removeAll(),t.get("show")){var i=t.axis,o=i.polar,r=o.getRadiusAxis().getExtent(),a=i.getTicksCoords(),l=i.getMinorTicksCoords(),u=n(i.getViewLabels(),function(t){t=nt(t);var e=i.scale,n="ordinal"===e.type?e.getRawOrdinalNumber(t.tickValue):t.tickValue;return t.coord=i.dataToCoord(n),t});cT(u),cT(a),s(sT,function(e){!t.get([e,"show"])||i.scale.isBlank()&&"axisLine"!==e||hT[e](this.group,t,o,a,l,r,u)},this)}},e.type="angleAxis",e}(jy),hT={axisLine:function(t,e,n,i,o,r){var a,s=e.getModel(["axisLine","lineStyle"]),l=n.getAngleAxis(),u=Math.PI/180,c=l.getExtent(),d=uT(n),h=d?0:1,p=360===Math.abs(c[1]-c[0])?"Circle":"Arc";(a=0===r[h]?new Do[p]({shape:{cx:n.cx,cy:n.cy,r:r[d],startAngle:-c[0]*u,endAngle:-c[1]*u,clockwise:l.inverse},style:s.getLineStyle(),z2:1,silent:!0}):new z({shape:{cx:n.cx,cy:n.cy,r:r[d],r0:r[h]},style:s.getLineStyle(),z2:1,silent:!0})).style.fill=null,t.add(a)},axisTick:function(t,e,i,o,r,a){var s=e.getModel("axisTick"),l=(s.get("inside")?-1:1)*s.get("length"),u=a[uT(i)],c=n(o,function(t){return new W({shape:lT(i,[u,u+l],t.coord)})});t.add(lo(c,{style:C(s.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,n,i,o,r){if(o.length){for(var a=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),u=r[uT(n)],c=[],d=0;d<o.length;d++)for(var h=0;h<o[d].length;h++)c.push(new W({shape:lT(n,[u,u+l],o[d][h].coord)}));t.add(lo(c,{style:C(s.getModel("lineStyle").getLineStyle(),C(a.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(t,e,n,i,o,a,l){var u=e.getCategories(!0),c=e.getModel("axisLabel"),d=c.get("margin"),h=e.get("triggerEvent");s(l,function(i,o){var s=c,l=i.tickValue,p=a[uT(n)],f=n.coordToPoint([p+d,i.coord]),g=n.cx,y=n.cy,m=Math.abs(f[0]-g)/p<.3?"center":f[0]>g?"left":"right",v=Math.abs(f[1]-y)/p<.3?"middle":f[1]>y?"top":"bottom";if(u&&u[l]){var x=u[l];r(x)&&x.textStyle&&(s=new tr(x.textStyle,c,c.ecModel))}var _=new Q({silent:Ey.isLabelSilent(e),style:Po(s,{x:f[0],y:f[1],fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:i.formattedLabel,align:m,verticalAlign:v})});if(t.add(_),h){var b=Ey.makeAxisEventDataBase(e);b.targetType="axisLabel",b.value=i.rawLabel,Un(_).eventData=b}},this)},splitLine:function(t,e,n,i,o,r){var a=e.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],c=0;c<i.length;c++){var d=l++%s.length;u[d]=u[d]||[],u[d].push(new W({shape:lT(n,r,i[c].coord)}))}for(c=0;c<u.length;c++)t.add(lo(u[c],{style:C({stroke:s[c%s.length]},a.getLineStyle()),silent:!0,z:e.get("z")}))},minorSplitLine:function(t,e,n,i,o,r){if(o.length){for(var a=e.getModel("minorSplitLine").getModel("lineStyle"),s=[],l=0;l<o.length;l++)for(var u=0;u<o[l].length;u++)s.push(new W({shape:lT(n,r,o[l][u].coord)}));t.add(lo(s,{style:a.getLineStyle(),silent:!0,z:e.get("z")}))}},splitArea:function(t,e,n,i,o,r){if(i.length){var a=e.getModel("splitArea").getModel("areaStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],c=Math.PI/180,d=-i[0].coord*c,h=Math.min(r[0],r[1]),p=Math.max(r[0],r[1]),f=e.get("clockwise"),g=1,y=i.length;g<=y;g++){var m=g===y?i[0].coord:i[g].coord,v=l++%s.length;u[v]=u[v]||[],u[v].push(new V({shape:{cx:n.cx,cy:n.cy,r0:h,r:p,startAngle:d,endAngle:-m*c,clockwise:f},silent:!0})),d=-m*c}for(g=0;g<u.length;g++)t.add(lo(u[g],{style:C({fill:s[g%s.length]},a.getAreaStyle()),silent:!0}))}}},pT=["axisLine","axisTickLabel","axisName"],fT=["splitLine","splitArea","minorSplitLine"],gT=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="PolarAxisPointer",n}return h(e,t),e.prototype.render=function(t,e){if(this.group.removeAll(),t.get("show")){var n=this._axisGroup,i=this._axisGroup=new X;this.group.add(i);var o=t.axis,r=o.polar,a=r.getAngleAxis(),l=o.getTicksCoords(),u=o.getMinorTicksCoords(),c=a.getExtent()[0],d=o.getExtent(),h=function(t,e,n){return{position:[t.cx,t.cy],rotation:n/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),
// Over splitLine and splitArea
z2:1}}(r,t,c),p=new Ey(t,h);s(pT,p.add,p),i.add(p.getGroup()),mo(n,i,t),s(fT,function(e){t.get([e,"show"])&&!o.scale.isBlank()&&yT[e](this.group,t,r,c,d,l,u)},this)}},e.type="radiusAxis",e}(jy),yT={splitLine:function(t,e,n,i,o,r){var a=e.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0,u=n.getAngleAxis(),c=Math.PI/180,d=u.getExtent(),h=360===Math.abs(d[1]-d[0])?"Circle":"Arc";s=s instanceof Array?s:[s];for(var p=[],f=0;f<r.length;f++){var g=l++%s.length;p[g]=p[g]||[],p[g].push(new Do[h]({shape:{cx:n.cx,cy:n.cy,
// ensure circle radius >= 0
r:Math.max(r[f].coord,0),startAngle:-d[0]*c,endAngle:-d[1]*c,clockwise:u.inverse}}))}for(f=0;f<p.length;f++)t.add(lo(p[f],{style:C({stroke:s[f%s.length],fill:null},a.getLineStyle()),silent:!0}))},minorSplitLine:function(t,e,n,i,o,r,a){if(a.length){for(var s=e.getModel("minorSplitLine").getModel("lineStyle"),l=[],u=0;u<a.length;u++)for(var c=0;c<a[u].length;c++)l.push(new R({shape:{cx:n.cx,cy:n.cy,r:a[u][c].coord}}));t.add(lo(l,{style:C({fill:null},s.getLineStyle()),silent:!0}))}},splitArea:function(t,e,n,i,o,r){if(r.length){var a=e.getModel("splitArea").getModel("areaStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],c=r[0].coord,d=1;d<r.length;d++){var h=l++%s.length;u[h]=u[h]||[],u[h].push(new V({shape:{cx:n.cx,cy:n.cy,r0:c,r:r[d].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),c=r[d].coord}for(d=0;d<u.length;d++)t.add(lo(u[d],{style:C({fill:s[d%s.length]},a.getAreaStyle()),silent:!0}))}}};function mT(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function vT(t,e){return e.dim+t.model.componentIndex}function xT(t,e,n){var i={},o=function(t){var e={};s(t,function(t,n){var i=t.getData(),o=t.coordinateSystem,r=o.getBaseAxis(),a=vT(o,r),s=r.getExtent(),l="category"===r.type?r.getBandWidth():Math.abs(s[1]-s[0])/i.count(),u=e[a]||{bandWidth:l,remainedWidth:l,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},c=u.stacks;e[a]=u;var d=mT(t);c[d]||u.autoWidthCount++,c[d]=c[d]||{width:0,maxWidth:0};var h=Ge(t.get("barWidth"),l),p=Ge(t.get("barMaxWidth"),l),f=t.get("barGap"),g=t.get("barCategoryGap");h&&!c[d].width&&(h=Math.min(u.remainedWidth,h),c[d].width=h,u.remainedWidth-=h),p&&(c[d].maxWidth=p),null!=f&&(u.gap=f),null!=g&&(u.categoryGap=g)});var n={};return s(e,function(t,e){n[e]={};var i=t.stacks,o=t.bandWidth,r=Ge(t.categoryGap,o),a=Ge(t.gap,1),l=t.remainedWidth,u=t.autoWidthCount,c=(l-r)/(u+(u-1)*a);c=Math.max(c,0),s(i,function(t,e){var n=t.maxWidth;n&&n<c&&(n=Math.min(n,l),t.width&&(n=Math.min(n,t.width)),l-=n,t.width=n,u--)}),c=(l-r)/(u+(u-1)*a),c=Math.max(c,0);var d,h=0;s(i,function(t,e){t.width||(t.width=c),d=t,h+=t.width*(1+a)}),d&&(h-=d.width*a);var p=-h/2;s(i,function(t,i){n[e][i]=n[e][i]||{offset:p,width:t.width},p+=t.width*(1+a)})}),n}(lt(e.getSeriesByType(t),function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"polar"===t.coordinateSystem.type}));e.eachSeriesByType(t,function(t){if("polar"===t.coordinateSystem.type){var e=t.getData(),n=t.coordinateSystem,r=n.getBaseAxis(),a=vT(n,r),s=mT(t),l=o[a][s],u=l.offset,c=l.width,d=n.getOtherAxis(r),h=t.coordinateSystem.cx,p=t.coordinateSystem.cy,f=t.get("barMinHeight")||0,g=t.get("barMinAngle")||0;i[s]=i[s]||[];for(var y=e.mapDimension(d.dim),m=e.mapDimension(r.dim),v=lh(e,y
/* , baseDim */),x="radius"!==r.dim||!t.get("roundCap",!0),_=d.model.get("startValue"),b=d.dataToCoord(_||0),S=0,w=e.count();S<w;S++){var M=e.get(y,S),I=e.get(m,S),D=M>=0?"p":"n",T=b;v&&(i[s][I]||(i[s][I]={p:b,n:b}),T=i[s][I][D]);var C=void 0,A=void 0,L=void 0,k=void 0;if("radius"===d.dim){var P=d.dataToCoord(M)-b,N=r.dataToCoord(I);Math.abs(P)<f&&(P=(P<0?-1:1)*f),C=T,A=T+P,k=(L=N-u)-c,v&&(i[s][I][D]=A)}else{var O=d.dataToCoord(M,x)-b,R=r.dataToCoord(I);Math.abs(O)<g&&(O=(O<0?-1:1)*g),A=(C=R+u)+c,L=T,k=T+O,v&&(i[s][I][D]=k)}e.setItemLayout(S,{cx:h,cy:p,r0:C,r:A,
// Consider that positive angle is anti-clockwise,
// while positive radian of sector is clockwise
startAngle:-L*Math.PI/180,endAngle:-k*Math.PI/180,
/**
* Keep the same logic with bar in catesion: use end value to
* control direction. Notice that if clockwise is true (by
* default), the sector will always draw clockwisely, no matter
* whether endAngle is greater or less than startAngle.
*/
clockwise:L>=k})}}})}var _T={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},bT={splitNumber:5},ST=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.type="polar",e}(nu);function wT(t,e){e=e||{};var n=t.coordinateSystem,i=t.axis,o={},r=i.position,a=i.orient,s=n.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};o.position=["vertical"===a?u.vertical[r]:l[0],"horizontal"===a?u.horizontal[r]:l[3]];o.rotation=Math.PI/2*{horizontal:0,vertical:1}[a];o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,right:1,left:-1}[r],t.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),Ft(e.labelInside,t.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var c=e.rotate;return null==c&&(c=t.get(["axisLabel","rotate"])),o.labelRotation="top"===r?-c:c,o.z2=1,o}var MT=["axisLine","axisTickLabel","axisName"],IT=["splitArea","splitLine"],DT=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="SingleAxisPointer",n}return h(e,t),e.prototype.render=function(e,n,i,o){var r=this.group;r.removeAll();var a=this._axisGroup;this._axisGroup=new X;var l=wT(e),u=new Ey(e,l);s(MT,u.add,u),r.add(this._axisGroup),r.add(u.getGroup()),s(IT,function(t){e.get([t,"show"])&&TT[t](this,this.group,this._axisGroup,e)},this),mo(a,this._axisGroup,e),t.prototype.render.call(this,e,n,i,o)},e.prototype.remove=function(){Jy(this)},e.type="singleAxis",e}(jy),TT={splitLine:function(t,e,n,i){var o=i.axis;if(!o.scale.isBlank()){var r=i.getModel("splitLine"),a=r.getModel("lineStyle"),s=a.get("color");s=s instanceof Array?s:[s];for(var l=a.get("width"),u=i.coordinateSystem.getRect(),c=o.isHorizontal(),d=[],h=0,p=o.getTicksCoords({tickModel:r}),f=[],g=[],y=0;y<p.length;++y){var m=o.toGlobalCoord(p[y].coord);c?(f[0]=m,f[1]=u.y,g[0]=m,g[1]=u.y+u.height):(f[0]=u.x,f[1]=m,g[0]=u.x+u.width,g[1]=m);var v=new W({shape:{x1:f[0],y1:f[1],x2:g[0],y2:g[1]},silent:!0});co(v.shape,l);var x=h++%s.length;d[x]=d[x]||[],d[x].push(v)}var _=a.getLineStyle(["color"]);for(y=0;y<d.length;++y)e.add(lo(d[y],{style:C({stroke:s[y%s.length]},_),silent:!0}))}},splitArea:function(t,e,n,i){Ky(t,n,i,i)}},CT=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.getCoordSysModel=function(){return this},e.type="singleAxis",e.layoutMode="box",e.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},
// Single coordinate system and single axis is the,
// which is used as the parent tooltip model.
// same model, so we set default tooltip show as true.
tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}},e}(ua);it(CT,mp.prototype);var AT=
/** @class */function(t){function e(e,n,i,o,r){var a=t.call(this,e,n,i)||this;return a.type=o||"value",a.position=r||"bottom",a}return h(e,t),e.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},e.prototype.pointToData=function(t,e){return this.coordinateSystem.pointToData(t)[0]},e}(Hp),LT=["single"],kT=
/** @class */function(){function t(t,e,n){this.type="single",this.dimension="single",this.dimensions=LT,this.axisPointerEnabled=!0,this.model=t,this._init(t,e,n)}return t.prototype._init=function(t,e,n){var i=this.dimension,o=new AT(i,cp(t),[0,0],t.get("type"),t.get("position")),r="category"===o.type;o.onBand=r&&t.get("boundaryGap"),o.inverse=t.get("inverse"),o.orient=t.get("orient"),t.axis=o,o.model=t,o.coordinateSystem=this,this._axis=o},t.prototype.update=function(t,e){t.eachSeries(function(t){if(t.coordinateSystem===this){var e=t.getData();s(e.mapDimensionsAll(this.dimension),function(t){this._axis.scale.unionExtentFromData(e,t)},this),up(this._axis.scale,this._axis.model)}},this)},t.prototype.resize=function(t,e){this._rect=na({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getWidth(),height:e.getHeight()}),this._adjustAxis()},t.prototype.getRect=function(){return this._rect},t.prototype._adjustAxis=function(){var t=this._rect,e=this._axis,n=e.isHorizontal(),i=n?[0,t.width]:[0,t.height],o=e.inverse?1:0;e.setExtent(i[o],i[1-o]),this._updateAxisTransform(e,n?t.x:t.y)},t.prototype._updateAxisTransform=function(t,e){var n=t.getExtent(),i=n[0]+n[1],o=t.isHorizontal();t.toGlobalCoord=o?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord=o?function(t){return t-e}:function(t){return i-t+e}},t.prototype.getAxis=function(){return this._axis},t.prototype.getBaseAxis=function(){return this._axis},t.prototype.getAxes=function(){return[this._axis]},t.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],
// Empty otherAxes
otherAxes:[]}},t.prototype.containPoint=function(t){var e=this.getRect(),n=this.getAxis();return"horizontal"===n.orient?n.contain(n.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},t.prototype.pointToData=function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},t.prototype.dataToPoint=function(t){var e=this.getAxis(),n=this.getRect(),i=[],o="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),i[o]=e.toGlobalCoord(e.dataToCoord(+t)),i[1-o]=0===o?n.y+n.height/2:n.x+n.width/2,i},t.prototype.convertToPixel=function(t,e,n){return PT(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return PT(e)===this?this.pointToData(n):null},t}();function PT(t){var e=t.seriesModel,n=t.singleAxisModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}var NT={create:function(t,e){var n=[];return t.eachComponent("singleAxis",function(i,o){var r=new kT(i,t,e);r.name="single_"+o,r.resize(i,e),i.coordinateSystem=r,n.push(r)}),t.eachSeries(function(t){if("singleAxis"===t.get("coordinateSystem")){var e=t.getReferringComponents("singleAxis",Tn).models[0];t.coordinateSystem=e&&e.coordinateSystem}}),n},dimensions:LT},OT=["x","y"],RT=["width","height"],ET=
/** @class */function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.makeElOption=function(t,e,n,i,o){var r=n.axis,a=r.coordinateSystem,s=BT(a,1-zT(r)),l=a.dataToPoint(e)[0],u=i.get("type");if(u&&"none"!==u){var c=yD(i),d=VT[u](r,l,s);d.style=c,t.graphicKey=d.type,t.pointer=d}_D(
// @ts-ignore
e,t,wT(n),n,i,o)},e.prototype.getHandleTransform=function(t,e,n){var i=wT(e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=xD(e.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var o=n.axis,r=o.coordinateSystem,a=zT(o),s=BT(r,a),l=[t.x,t.y];l[a]+=e[a],l[a]=Math.min(s[1],l[a]),l[a]=Math.max(s[0],l[a]);var u=BT(r,1-a),c=(u[1]+u[0])/2,d=[c,c];return d[a]=l[a],{x:l[0],y:l[1],rotation:t.rotation,cursorPoint:d,tooltipOption:{verticalAlign:"middle"}}},e}(cD),VT={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:bD([e,n[0]],[e,n[1]],zT(t))}},shadow:function(t,e,n){var i=t.getBandWidth(),o=n[1]-n[0];return{type:"Rect",shape:SD([e-i/2,n[0]],[i,o],zT(t))}}};function zT(t){return t.isHorizontal()?0:1}function BT(t,e){var n=t.getRect();return[n[OT[e]],n[OT[e]]+n[RT[e]]]}var GT=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.type="single",e}(nu);var FT=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.init=function(e,n,i){var o=aa(e);t.prototype.init.apply(this,arguments),WT(e,o)},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),WT(this.option,e)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={
// zlevel: 0,
z:2,left:80,top:60,cellSize:20,
// horizontal vertical
orient:"horizontal",
// month separate line style
splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},
// rect style temporarily unused emphasis
itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},
// week text style
dayLabel:{show:!0,firstDay:0,
// start end
position:"start",margin:"50%",color:"#000"},
// month text style
monthLabel:{show:!0,
// start end
position:"start",margin:5,
// center or left
align:"center",formatter:null,color:"#000"},
// year text style
yearLabel:{show:!0,
// top bottom left right
position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(ua);function WT(t,e){var i,r=t.cellSize;1===(i=o(r)?r:t.cellSize=[r,r]).length&&(i[1]=i[0]);var a=n([0,1],function(t){return function(t,e){return null!=t[Qr[e][0]]||null!=t[Qr[e][1]]&&null!=t[Qr[e][2]]}(e,t)&&(i[t]="auto"),null!=i[t]&&"auto"!==i[t]});ra(t,e,{type:"box",ignoreSize:a})}var HT=
/** @class */function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.type,t}return h(i,e),i.prototype.render=function(t,e,n){var i=this.group;i.removeAll();var o=t.coordinateSystem,r=o.getRangeInfo(),a=o.getOrient(),s=e.getLocaleModel();this._renderDayRect(t,r,i),this._renderLines(t,r,a,i),this._renderYearText(t,r,a,i),this._renderMonthText(t,s,a,i),this._renderWeekText(t,s,r,a,i)},i.prototype._renderDayRect=function(t,e,n){for(var i=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),r=i.getCellWidth(),a=i.getCellHeight(),s=e.start.time;s<=e.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToRect([s],!1).tl,u=new F({shape:{x:l[0],y:l[1],width:r,height:a},cursor:"default",style:o});n.add(u)}},i.prototype._renderLines=function(t,e,n,i){var o=this,r=t.coordinateSystem,a=t.getModel(["splitLine","lineStyle"]).getLineStyle(),s=t.get(["splitLine","show"]),l=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=e.start,c=0;u.time<=e.end.time;c++){h(u.formatedDate),0===c&&(u=r.getDateInfo(e.start.y+"-"+e.start.m));var d=u.date;d.setMonth(d.getMonth()+1),u=r.getDateInfo(d)}function h(e){o._firstDayOfMonth.push(r.getDateInfo(e)),o._firstDayPoints.push(r.dataToRect([e],!1).tl);var l=o._getLinePointsOfOneWeek(t,e,n);o._tlpoints.push(l[0]),o._blpoints.push(l[l.length-1]),s&&o._drawSplitline(l,a,i)}h(r.getNextNDay(e.end.time,1).formatedDate),s&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,l,n),a,i),s&&this._drawSplitline(o._getEdgesPoints(o._blpoints,l,n),a,i)},i.prototype._getEdgesPoints=function(t,e,n){var i=[t[0].slice(),t[t.length-1].slice()],o="horizontal"===n?0:1;return i[0][o]=i[0][o]-e/2,i[1][o]=i[1][o]+e/2,i},i.prototype._drawSplitline=function(t,e,n){var i=new G({z2:20,shape:{points:t},style:e});n.add(i)},i.prototype._getLinePointsOfOneWeek=function(t,e,n){for(var i=t.coordinateSystem,o=i.getDateInfo(e),r=[],a=0;a<7;a++){var s=i.getNextNDay(o.time,a),l=i.dataToRect([s.time],!1);r[2*s.day]=l.tl,r[2*s.day+1]=l["horizontal"===n?"bl":"tr"]}return r},i.prototype._formatterLabel=function(e,n){return t(e)&&e?(i=e,s(n,function(t,e){i=i.replace("{"+e+"}",t)}),i):g(e)?e(n):n.nameMap;var i},i.prototype._yearTextPositionControl=function(t,e,n,i,o){var r=e[0],a=e[1],s=["center","bottom"];"bottom"===i?(a+=o,s=["center","top"]):"left"===i?r-=o:"right"===i?(r+=o,s=["center","top"]):a-=o;var l=0;return"left"!==i&&"right"!==i||(l=Math.PI/2),{rotation:l,x:r,y:a,style:{align:s[0],verticalAlign:s[1]}}},i.prototype._renderYearText=function(t,e,n,i){var o=t.getModel("yearLabel");if(o.get("show")){var r=o.get("margin"),a=o.get("position");a||(a="horizontal"!==n?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,c="horizontal"===n?0:1,d={top:[l,s[c][1]],bottom:[l,s[1-c][1]],left:[s[1-c][0],u],right:[s[c][0],u]},h=e.start.y;+e.end.y>+e.start.y&&(h=h+"-"+e.end.y);var p=o.get("formatter"),f={start:e.start.y,end:e.end.y,nameMap:h},g=this._formatterLabel(p,f),y=new Q({z2:30,style:Po(o,{text:g}),silent:o.get("silent")});y.attr(this._yearTextPositionControl(y,d[a],n,a,r)),i.add(y)}},i.prototype._monthTextPositionControl=function(t,e,n,i,o){var r="left",a="top",s=t[0],l=t[1];return"horizontal"===n?(l+=o,e&&(r="center"),"start"===i&&(a="bottom")):(s+=o,e&&(a="middle"),"start"===i&&(r="right")),{x:s,y:l,align:r,verticalAlign:a}},i.prototype._renderMonthText=function(e,n,i,o){var r=e.getModel("monthLabel");if(r.get("show")){var a=r.get("nameMap"),s=r.get("margin"),l=r.get("position"),u=r.get("align"),c=[this._tlpoints,this._blpoints];a&&!t(a)||(a&&(n=dr(a)||n),a=n.get(["time","monthAbbr"])||[]);var d="start"===l?0:1,h="horizontal"===i?0:1;s="start"===l?-s:s;for(var p="center"===u,g=r.get("silent"),y=0;y<c[d].length-1;y++){var m=c[d][y].slice(),v=this._firstDayOfMonth[y];if(p){var x=this._firstDayPoints[y];m[h]=(x[h]+c[0][y+1][h])/2}var _=r.get("formatter"),b=a[+v.m-1],S={yyyy:v.y,yy:(v.y+"").slice(2),MM:v.m,M:+v.m,nameMap:b},w=this._formatterLabel(_,S),M=new Q({z2:30,style:f(Po(r,{text:w}),this._monthTextPositionControl(m,p,i,l,s)),silent:g});o.add(M)}}},i.prototype._weekTextPositionControl=function(t,e,n,i,o){var r="center",a="middle",s=t[0],l=t[1],u="start"===n;return"horizontal"===e?(s=s+i+(u?1:-1)*o[0]/2,r=u?"right":"left"):(l=l+i+(u?1:-1)*o[1]/2,a=u?"bottom":"top"),{x:s,y:l,align:r,verticalAlign:a}},i.prototype._renderWeekText=function(e,i,o,r,a){var s=e.getModel("dayLabel");if(s.get("show")){var l=e.coordinateSystem,u=s.get("position"),c=s.get("nameMap"),d=s.get("margin"),h=l.getFirstDayOfWeek();if(!c||t(c))c&&(i=dr(c)||i),c=i.get(["time","dayOfWeekShort"])||n(i.get(["time","dayOfWeekAbbr"]),function(t){return t[0]});var p=l.getNextNDay(o.end.time,7-o.lweek).time,g=[l.getCellWidth(),l.getCellHeight()];d=Ge(d,Math.min(g[1],g[0])),"start"===u&&(p=l.getNextNDay(o.start.time,-(7+o.fweek)).time,d=-d);for(var y=s.get("silent"),m=0;m<7;m++){var v,x=l.getNextNDay(p,m),_=l.dataToRect([x.time],!1).center;v=Math.abs((m+h)%7);var b=new Q({z2:30,style:f(Po(s,{text:c[v]}),this._weekTextPositionControl(_,r,u,d,g)),silent:y});a.add(b)}}},i.type="calendar",i}(nu),YT=864e5,UT=
/** @class */function(){function t(e,n,i){this.type="calendar",this.dimensions=t.dimensions,this.getDimensionsInfo=t.getDimensionsInfo,this._model=e}return t.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},t.prototype.getRangeInfo=function(){return this._rangeInfo},t.prototype.getModel=function(){return this._model},t.prototype.getRect=function(){return this._rect},t.prototype.getCellWidth=function(){return this._sw},t.prototype.getCellHeight=function(){return this._sh},t.prototype.getOrient=function(){return this._orient},t.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},t.prototype.getDateInfo=function(t){var e=(t=Ke(t)).getFullYear(),n=t.getMonth()+1,i=n<10?"0"+n:""+n,o=t.getDate(),r=o<10?"0"+o:""+o,a=t.getDay();return{y:e+"",m:i,d:r,day:a=Math.abs((a+7-this.getFirstDayOfWeek())%7),time:t.getTime(),formatedDate:e+"-"+i+"-"+r,date:t}},t.prototype.getNextNDay=function(t,e){return 0===(e=e||0)||(t=new Date(this.getDateInfo(t).time)).setDate(t.getDate()+e),this.getDateInfo(t)},t.prototype.update=function(t,e){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,i=["width","height"],o=this._model.getCellSize().slice(),r=this._model.getBoxLayoutParams(),a="horizontal"===this._orient?[n,7]:[7,n];s([0,1],function(t){c(o,t)&&(r[i[t]]=o[t]*a[t])});var l={width:e.getWidth(),height:e.getHeight()},u=this._rect=na(r,l);function c(t,e){return null!=t[e]&&"auto"!==t[e]}s([0,1],function(t){c(o,t)||(o[t]=u[i[t]]/a[t])}),this._sw=o[0],this._sh=o[1]},t.prototype.dataToPoint=function(t,e){o(t)&&(t=t[0]),null==e&&(e=!0);var n=this.getDateInfo(t),i=this._rangeInfo,r=n.formatedDate;if(e&&!(n.time>=i.start.time&&n.time<i.end.time+YT))return[NaN,NaN];var a=n.day,s=this._getRangeInfo([i.start.time,r]).nthWeek;return"vertical"===this._orient?[this._rect.x+a*this._sw+this._sw/2,this._rect.y+s*this._sh+this._sh/2]:[this._rect.x+s*this._sw+this._sw/2,this._rect.y+a*this._sh+this._sh/2]},t.prototype.pointToData=function(t){var e=this.pointToDate(t);return e&&e.time},t.prototype.dataToRect=function(t,e){var n=this.dataToPoint(t,e);return{contentShape:{x:n[0]-(this._sw-this._lineWidth)/2,y:n[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:n,tl:[n[0]-this._sw/2,n[1]-this._sh/2],tr:[n[0]+this._sw/2,n[1]-this._sh/2],br:[n[0]+this._sw/2,n[1]+this._sh/2],bl:[n[0]-this._sw/2,n[1]+this._sh/2]}},t.prototype.pointToDate=function(t){var e=Math.floor((t[0]-this._rect.x)/this._sw)+1,n=Math.floor((t[1]-this._rect.y)/this._sh)+1,i=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(n,e-1,i):this._getDateByWeeksAndDay(e,n-1,i)},t.prototype.convertToPixel=function(t,e,n){var i=ZT(e);return i===this?i.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){var i=ZT(e);return i===this?i.pointToData(n):null},t.prototype.containPoint=function(t){return!1},t.prototype._initRangeOption=function(){var t,e=this._model.get("range");if(o(e)&&1===e.length&&(e=e[0]),o(e))t=e;else{var n=e.toString();if(/^\d{4}$/.test(n)&&(t=[n+"-01-01",n+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(n)){var i=this.getDateInfo(n),r=i.date;r.setMonth(r.getMonth()+1);var a=this.getNextNDay(r,-1);t=[i.formatedDate,a.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n)&&(t=[n,n])}if(!t)return e;var s=this._getRangeInfo(t);return s.start.time>s.end.time&&t.reverse(),t},t.prototype._getRangeInfo=function(t){var e,n=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];n[0].time>n[1].time&&(e=!0,n.reverse());var i=Math.floor(n[1].time/YT)-Math.floor(n[0].time/YT)+1,o=new Date(n[0].time),r=o.getDate(),a=n[1].date.getDate();o.setDate(r+i-1);var s=o.getDate();if(s!==a)for(var l=o.getTime()-n[1].time>0?1:-1;(s=o.getDate())!==a&&(o.getTime()-n[1].time)*l>0;)i-=l,o.setDate(s-l);var u=Math.floor((i+n[0].day+6)/7),c=e?1-u:u-1;return e&&n.reverse(),{range:[n[0].formatedDate,n[1].formatedDate],start:n[0],end:n[1],allDay:i,weeks:u,
// From 0.
nthWeek:c,fweek:n[0].day,lweek:n[1].day}},t.prototype._getDateByWeeksAndDay=function(t,e,n){var i=this._getRangeInfo(n);if(t>i.weeks||0===t&&e<i.fweek||t===i.weeks&&e>i.lweek)return null;var o=7*(t-1)-i.fweek+e,r=new Date(i.start.time);return r.setDate(+i.start.d+o),this.getDateInfo(r)},t.create=function(e,n){var i=[];return e.eachComponent("calendar",function(e){var n=new t(e);i.push(n),e.coordinateSystem=n}),e.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])}),i},t.dimensions=["time","value"],t}();function ZT(t){var e=t.calendarModel,n=t.seriesModel;return e?e.coordinateSystem:n?n.coordinateSystem:null}function XT(t,e){var n;return s(e,function(e){null!=t[e]&&"auto"!==t[e]&&(n=!0)}),n}var jT=["transition","enterFrom","leaveTo"],qT=jT.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function KT(t,e,n){if(n&&(!t[n]&&e[n]&&(t[n]={}),t=t[n],e=e[n]),t&&e)for(var i=n?jT:qT,o=0;o<i.length;o++){var r=i[o];null==t[r]&&null!=e[r]&&(t[r]=e[r])}}var JT=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.preventAutoZ=!0,n}return h(e,t),e.prototype.mergeOption=function(e,n){var i=this.option.elements;this.option.elements=null,t.prototype.mergeOption.call(this,e,n),this.option.elements=i},e.prototype.optionUpdated=function(t,e){var n=this.option,i=(e?n:t).elements,o=n.elements=e?[]:n.elements,r=[];this._flatten(i,r,null);var a=yn(o,r,"normalMerge"),l=this._elOptionsToUpdate=[];s(a,function(t,e){var n=t.newOption;n&&(l.push(n),function(t,e){var n=t.existing;if(e.id=t.keyInfo.id,!e.type&&n&&(e.type=n.type),null==e.parentId){var i=e.parentOption;i?e.parentId=i.id:n&&(e.parentId=n.parentId)}e.parentOption=null}(t,n),function(t,e,n){var i=f({},n),o=t[e],r=n.$action||"merge";"merge"===r?o?(et(o,i,!0),ra(o,i,{ignoreSize:!0}),sa(n,o),KT(n,o),KT(n,o,"shape"),KT(n,o,"style"),KT(n,o,"extra"),n.clipPath=o.clipPath):t[e]=i:"replace"===r?t[e]=i:"remove"===r&&o&&(t[e]=null)}(o,e,n),function(t,e){if(t&&(t.hv=e.hv=[
// Rigid body, don't care about `width`.
XT(e,["left","right"]),
// Rigid body, don't care about `height`.
XT(e,["top","bottom"])],"group"===t.type)){var n=t,i=e;null==n.width&&(n.width=i.width=0),null==n.height&&(n.height=i.height=0)}}(o[e],n))},this),n.elements=lt(o,function(t){return t&&delete t.$action,null!=t})},e.prototype._flatten=function(t,e,n){s(t,function(t){if(t){n&&(t.parentOption=n),e.push(t);var i=t.children;i&&i.length&&this._flatten(i,e,t),delete t.children}},this)},e.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},e.type="graphic",e.defaultOption={elements:[]},e}(ua),$T={
// Reserved but not supported in graphic component.
path:null,compoundPath:null,
// Supported in graphic component.
group:X,image:b,text:Q},QT=wn(),tC=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.init=function(){this._elMap=a()},e.prototype.render=function(t,e,n){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,n)},e.prototype._updateElements=function(t){var e=t.useElOptionsToUpdate();if(e){var n=this._elMap,i=this.group,o=t.get("z"),r=t.get("zlevel");s(e,function(e){var a=xn(e.id,null),l=null!=a?n.get(a):null,u=xn(e.parentId,null),c=null!=u?n.get(u):i,d=e.type,h=e.style;"text"===d&&h&&e.hv&&e.hv[1]&&(h.textVerticalAlign=h.textBaseline=h.verticalAlign=h.align=null);var p=e.textContent,g=e.textConfig;if(h&&sI(h,d,!!g,!!p)){var y=lI(h,d,!0);!g&&y.textConfig&&(g=e.textConfig=y.textConfig),!p&&y.textContent&&(p=y.textContent)}var m=function(t){return t=f({},t),s(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat($r),function(e){delete t[e]}),t}(e),v=e.$action||"merge",x="merge"===v,_="replace"===v;if(x){var b=l;(C=!l)?b=nC(a,c,e.type,n):(b&&(QT(b).isNew=!1),AI(b)),b&&(mI(b,m,t,{isInit:C}),oC(b,e,o,r))}else if(_){iC(l,e,n,t);var S=nC(a,c,e.type,n);S&&(mI(S,m,t,{isInit:!0}),oC(S,e,o,r))}else"remove"===v&&(vI(l,e),iC(l,e,n,t));var w=n.get(a);if(w&&p)if(x){var M=w.getTextContent();M?M.attr(p):w.setTextContent(new Q(p))}else _&&w.setTextContent(new Q(p));if(w){var I=e.clipPath;if(I){var D=I.type,T=void 0,C=!1;if(x){var A=w.getClipPath();T=(C=!A||QT(A).type!==D)?eC(D):A}else _&&(C=!0,T=eC(D));w.setClipPath(T),mI(T,I,t,{isInit:C}),LI(T,I.keyframeAnimation,t)}var L=QT(w);w.setTextConfig(g),L.option=e,function(t,e,n){var i=Un(t).eventData;t.silent||t.ignore||i||(i=Un(t).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name});i&&(i.info=n.info)}(w,t,e),wo({el:w,componentModel:t,itemName:w.name,itemTooltipOption:e.tooltip}),LI(w,e.keyframeAnimation,t)}})}},e.prototype._relocate=function(t,e){for(var n=t.option.elements,i=this.group,o=this._elMap,r=e.getWidth(),a=e.getHeight(),s=["x","y"],u=0;u<n.length;u++){if((g=null!=(f=xn((p=n[u]).id,null))?o.get(f):null)&&g.isGroup){var c=(y=g.parent)===i,d=QT(g),h=QT(y);d.width=Ge(d.option.width,c?r:h.width)||0,d.height=Ge(d.option.height,c?a:h.height)||0}}for(u=n.length-1;u>=0;u--){var p,f,g;if(g=null!=(f=xn((p=n[u]).id,null))?o.get(f):null){var y=g.parent,m=(h=QT(y),{}),v=ia(g,p,y===i?{width:r,height:a}:{width:h.width,height:h.height},null,{hv:p.hv,boundingMode:p.bounding},m);if(!QT(g).isNew&&v){for(var x=p.transition,_={},b=0;b<s.length;b++){var S=s[b],w=m[S];x&&(_I(x)||l(x,S)>=0)?_[S]=w:g[S]=w}Zi(g,_,t,0)}else g.attr(m)}}},e.prototype._clear=function(){var t=this,e=this._elMap;e.each(function(n){iC(n,QT(n).option,e,t._lastGraphicModel)}),this._elMap=a()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(nu);function eC(t){var e=new(k($T,t)?$T[t]:oo(t))({});return QT(e).type=t,e}function nC(t,e,n,i){var o=eC(n);return e.add(o),i.set(t,o),QT(o).id=t,QT(o).isNew=!0,o}function iC(t,e,n,i){t&&t.parent&&("group"===t.type&&t.traverse(function(t){iC(t,e,n,i)}),xI(t,e,i),n.removeKey(QT(t).id))}function oC(t,e,n,i){t.isGroup||s([["cursor",qt.prototype.cursor],
// We should not support configure z and zlevel in the element level.
// But seems we didn't limit it previously. So here still use it to avoid breaking.
["zlevel",i||0],["z",n||0],
// z2 must not be null/undefined, otherwise sort error may occur.
["z2",0]],function(n){var i=n[0];k(e,i)?t[i]=_(e[i],n[1]):null==t[i]&&(t[i]=n[1])}),s(x(e),function(n){if(0===n.indexOf("on")){var i=e[n];t[n]=g(i)?i:null}}),k(e,"draggable")&&(t.draggable=e.draggable),null!=e.name&&(t.name=e.name),null!=e.id&&(t.id=e.id)}var rC=["x","y","radius","angle","single"],aC=["cartesian2d","polar","singleAxis"];function sC(t){return t+"Axis"}function lC(t,e){var n,i=a(),o=[],r=a();t.eachComponent({mainType:"dataZoom",query:e},function(t){r.get(t.uid)||l(t)});do{n=!1,t.eachComponent("dataZoom",s)}while(n);function s(t){!r.get(t.uid)&&function(t){var e=!1;return t.eachTargetAxis(function(t,n){var o=i.get(t);o&&o[n]&&(e=!0)}),e}(t)&&(l(t),n=!0)}function l(t){r.set(t.uid,!0),o.push(t),t.eachTargetAxis(function(t,e){(i.get(t)||i.set(t,[]))[e]=!0})}return o}function uC(t){var e=t.ecModel,n={infoList:[],infoMap:a()};return t.eachTargetAxis(function(t,i){var o=e.getComponent(sC(t),i);if(o){var r=o.getCoordSysModel();if(r){var a=r.uid,s=n.infoMap.get(a);s||(s={model:r,axisModels:[]},n.infoList.push(s),n.infoMap.set(a,s)),s.axisModels.push(o)}}}),n}var cC=
/** @class */function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},t}(),dC=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return h(e,t),e.prototype.init=function(t,e,n){var i=hC(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},e.prototype.mergeOption=function(t){var e=hC(t);et(this.option,t,!0),et(this.settledOption,e,!0),this._doInit(e)},e.prototype._doInit=function(t){var e=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;s([["start","startValue"],["end","endValue"]],function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=n[t[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),e=this._targetAxisInfoMap=a();this._fillSpecifiedTargetAxis(e)?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(e,this._orient)),this._noTarget=!0,e.each(function(t){t.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var e=!1;return s(rC,function(n){var i=this.getReferringComponents(sC(n),Cn);if(i.specified){e=!0;var o=new cC;s(i.models,function(t){o.add(t.componentIndex)}),t.set(n,o)}},this),e},e.prototype._fillAutoTargetAxisByOrient=function(t,e){var n=this.ecModel,i=!0;if(i){var o="vertical"===e?"y":"x";r(n.findComponents({mainType:o+"Axis"}),o)}i&&r(n.findComponents({mainType:"singleAxis",filter:function(t){return t.get("orient",!0)===e}}),"single");function r(e,n){var o=e[0];if(o){var r=new cC;if(r.add(o.componentIndex),t.set(n,r),i=!1,"x"===n||"y"===n){var a=o.getReferringComponents("grid",Tn).models[0];a&&s(e,function(t){o.componentIndex!==t.componentIndex&&a===t.getReferringComponents("grid",Tn).models[0]&&r.add(t.componentIndex)})}}}i&&s(rC,function(e){if(i){var o=n.findComponents({mainType:sC(e),filter:function(t){return"category"===t.get("type",!0)}});if(o[0]){var r=new cC;r.add(o[0].componentIndex),t.set(e,r),i=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(e){!t&&(t=e)},this),"y"===t?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var e=this._rangePropMode,n=this.get("rangeMode");s([["start","startValue"],["end","endValue"]],function(i,o){var r=null!=t[i[0]],a=null!=t[i[1]];r&&!a?e[o]="percent":!r&&a?e[o]="value":n?e[o]=n[o]:r&&(e[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(e,n){null==t&&(t=this.ecModel.getComponent(sC(e),n))},this),t},e.prototype.eachTargetAxis=function(t,e){this._targetAxisInfoMap.each(function(n,i){s(n.indexList,function(n){t.call(e,i,n)})})},e.prototype.getAxisProxy=function(t,e){var n=this.getAxisModel(t,e);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,e){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[e])return this.ecModel.getComponent(sC(t),e)},e.prototype.setRawRange=function(t){var e=this.option,n=this.settledOption;s([["start","startValue"],["end","endValue"]],function(i){null==t[i[0]]&&null==t[i[1]]||(e[i[0]]=n[i[0]]=t[i[0]],e[i[1]]=n[i[1]]=t[i[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var e=this.option;s(["start","startValue","end","endValue"],function(n){e[n]=t[n]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var e,n=this._targetAxisInfoMap.keys(),i=0;i<n.length;i++)for(var o=n[i],r=this._targetAxisInfoMap.get(o),a=0;a<r.indexList.length;a++){var s=this.getAxisProxy(o,r.indexList[a]);if(s.hostedBy(this))return s;e||(e=s)}return e},e.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},e.prototype.getOrient=function(){return this._orient},e.type="dataZoom",e.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],e.defaultOption={
// zlevel: 0,
z:4,filterMode:"filter",start:0,end:100},e}(ua);function hC(t){var e={};return s(["start","end","startValue","endValue","throttle"],function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e}var pC=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.type="dataZoom.select",e}(dC),fC=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.render=function(t,e,n,i){this.dataZoomModel=t,this.ecModel=e,this.api=n},e.type="dataZoom",e}(nu),gC=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.type="dataZoom.select",e}(fC),yC=s,mC=We,vC=
/** @class */function(){function t(t,e,n,i){this._dimName=t,this._axisIndex=e,this.ecModel=i,this._dataZoomModel=n}return t.prototype.hostedBy=function(t){return this._dataZoomModel===t},t.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},t.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},t.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries(function(e){if(function(t){var e=t.get("coordinateSystem");return l(aC,e)>=0}(e)){var n=sC(this._dimName),i=e.getReferringComponents(n,Tn).models[0];i&&this._axisIndex===i.componentIndex&&t.push(e)}},this),t},t.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},t.prototype.getMinMaxSpan=function(){return nt(this._minMaxSpan)},t.prototype.calculateDataWindow=function(t){var e,n=this._dataExtent,i=this.getAxisModel().axis.scale,o=this._dataZoomModel.getRangePropMode(),r=[0,100],a=[],s=[];yC(["start","end"],function(l,u){var c=t[l],d=t[l+"Value"];"percent"===o[u]?(null==c&&(c=r[u]),d=i.parse(Be(c,r,n))):(e=!0,c=Be(d=null==d?n[u]:i.parse(d),n,r)),s[u]=null==d||isNaN(d)?n[u]:d,a[u]=null==c||isNaN(c)?r[u]:c}),mC(s),mC(a);var l=this._minMaxSpan;function u(t,e,n,o,r){var a=r?"Span":"ValueSpan";Bb(0,t,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)e[s]=Be(t[s],n,o,!0),r&&(e[s]=i.parse(e[s]))}return e?u(s,a,n,r,!1):u(a,s,r,n,!0),{valueWindow:s,percentWindow:a}},t.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=function(t,e,n){var i=[Infinity,-Infinity];yC(n,function(t){!function(t,e,n){e&&s(yp(e,n),function(n){var i=e.getApproximateExtent(n);i[0]<t[0]&&(t[0]=i[0]),i[1]>t[1]&&(t[1]=i[1])})}(i,t.getData(),e)});var o=t.getAxisModel(),r=ap(o.axis.scale,o,i).calculate();return[r.min,r.max]}(this,this._dimName,e),this._updateMinMaxSpan();var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},t.prototype.filterData=function(t,e){if(t===this._dataZoomModel){var i=this._dimName,o=this.getTargetSeriesModels(),r=t.get("filterMode"),a=this._valueWindow;"none"!==r&&yC(o,function(t){var e=t.getData(),o=e.mapDimensionsAll(i);if(o.length){if("weakFilter"===r){var s=e.getStore(),l=n(o,function(t){return e.getDimensionIndex(t)},e);e.filterSelf(function(t){for(var e,n,i,r=0;r<o.length;r++){var u=s.get(l[r],t),c=!isNaN(u),d=u<a[0],h=u>a[1];if(c&&!d&&!h)return!0;c&&(i=!0),d&&(e=!0),h&&(n=!0)}return i&&e&&n})}else yC(o,function(n){if("empty"===r)t.setData(e=e.map(n,function(t){return function(t){return t>=a[0]&&t<=a[1]}(t)?t:NaN}));else{var i={};i[n]=a,e.selectRange(i)}});yC(o,function(t){e.setApproximateExtent(a,t)})}})}},t.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;yC(["min","max"],function(i){var o=e.get(i+"Span"),r=e.get(i+"ValueSpan");null!=r&&(r=this.getAxisModel().axis.scale.parse(r)),null!=r?o=Be(n[0]+r,n,[0,100],!0):null!=o&&(r=Be(o,[0,100],n,!0)-n[0]),t[i+"Span"]=o,t[i+"ValueSpan"]=r},this)},t.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(e){var i=Ye(n,[0,500]);i=Math.min(i,20);var o=t.axis.scale.rawExtentInfo;0!==e[0]&&o.setDeterminedMinMax("min",+n[0].toFixed(i)),100!==e[1]&&o.setDeterminedMinMax("max",+n[1].toFixed(i)),o.freeze()}},t}();var xC={
// `dataZoomProcessor` will only be performed in needed series. Consider if
// there is a line series and a pie series, it is better not to update the
// line series if only pie series is needed to be updated.
getTargetSeries:function(t){function e(e){t.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(i,o){var r=t.getComponent(sC(i),o);e(i,o,r,n)})})}e(function(t,e,n,i){n.__dzAxisProxy=null});var n=[];e(function(e,i,o,r){o.__dzAxisProxy||(o.__dzAxisProxy=new vC(e,i,r,t),n.push(o.__dzAxisProxy))});var i=a();return s(n,function(t){s(t.getTargetSeriesModels(),function(t){i.set(t.uid,t)})}),i},
// Consider appendData, where filter should be performed. Because data process is
// in block mode currently, it is not need to worry about that the overallProgress
// execute every frame.
overallReset:function(t,e){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(e,n){t.getAxisProxy(e,n).reset(t)}),t.eachTargetAxis(function(n,i){t.getAxisProxy(n,i).filterData(t,e)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy();if(e){var n=e.getDataPercentWindow(),i=e.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}})}};var _C=!1;function bC(t){_C||(_C=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,xC),function(t){t.registerAction("dataZoom",function(t,e){var n=lC(e,t);s(n,function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}(t),t.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function SC(t){t.registerComponentModel(pC),t.registerComponentView(gC),bC(t)}var wC=
/** @class */
function(){return function(){}}(),MC={};function IC(t,e){MC[t]=e}function DC(t){return MC[t]}var TC=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;s(this.option.feature,function(t,n){var i=DC(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(e)),et(t,i.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,
// zlevel: 0,
orient:"horizontal",left:"right",top:"top",
// right
// bottom
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"}},
// textStyle: {},
// feature
tooltip:{show:!1,position:"bottom"}},e}(ua);function CC(t,e){var n=Yr(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),t=new F({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1})}var AC=
/** @class */function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return h(n,e),n.prototype.render=function(e,n,i,o){var r=this.group;if(r.removeAll(),e.get("show")){var a=+e.get("itemSize"),l="vertical"===e.get("orient"),u=e.get("feature")||{},c=this._features||(this._features={}),d=[];s(u,function(t,e){d.push(e)}),new kd(this._featureNames||[],d).add(h).update(h).remove(at(h,null)).execute(),this._featureNames=d,function(t,e,n){var i=e.getBoxLayoutParams(),o=e.get("padding"),r={width:n.getWidth(),height:n.getHeight()},a=na(i,r,o);ea(e.get("orient"),t,e.get("itemGap"),a.width,a.height),ia(t,i,r,o)}(r,e,i),r.add(CC(r.getBoundingRect(),e)),l||r.eachChild(function(t){var e=t.__title,n=t.ensureState("emphasis"),o=n.textConfig||(n.textConfig={}),s=t.getTextContent(),l=s&&s.ensureState("emphasis");if(l&&!g(l)&&e){var u=l.style||(l.style={}),c=At(e,Q.makeFont(u)),d=t.x+r.x,h=!1;t.y+r.y+a+c.height>i.getHeight()&&(o.position="top",h=!0);var p=h?-5-c.height:a+10;d+c.width/2>i.getWidth()?(o.position=["100%",p],u.align="right"):d-c.width/2<0&&(o.position=[0,p],u.align="left")}})}function h(h,p){var f,g=d[h],y=d[p],m=u[g],v=new tr(m,e,e.ecModel);if(o&&null!=o.newTitle&&o.featureName===g&&(m.title=o.newTitle),g&&!y){if(function(t){return 0===t.indexOf("my")}(g))f={onclick:v.option.onclick,featureName:g};else{var x=DC(g);if(!x)return;f=new x}c[g]=f}else if(!(f=c[y]))return;f.uid=nr("toolbox-feature"),f.model=v,f.ecModel=n,f.api=i;var _=f instanceof wC;g||!y?!v.get("show")||_&&f.unusable?_&&f.remove&&f.remove(n,i):(!function(o,u,c){var d,h,p=o.getModel("iconStyle"),f=o.getModel(["emphasis","iconStyle"]),g=u instanceof wC&&u.getIcons?u.getIcons():o.get("icon"),y=o.get("title")||{};t(g)?(d={})[c]=g:d=g;t(y)?(h={})[c]=y:h=y;var m=o.iconPaths={};s(d,function(t,s){var c=xo(t,{},{x:-a/2,y:-a/2,width:a,height:a});c.setStyle(p.getItemStyle()),c.ensureState("emphasis").style=f.getItemStyle();var d=new Q({style:{text:h[s],align:f.get("textAlign"),borderRadius:f.get("textBorderRadius"),padding:f.get("textPadding"),fill:null,font:zo({fontStyle:f.get("textFontStyle"),fontFamily:f.get("textFontFamily"),fontSize:f.get("textFontSize"),fontWeight:f.get("textFontWeight")},n)},ignore:!0});c.setTextContent(d),wo({el:c,componentModel:e,itemName:s,formatterParamsExtra:{title:h[s]}}),c.__title=h[s],c.on("mouseover",function(){var t=f.getItemStyle(),n=l?null==e.get("right")&&"right"!==e.get("left")?"right":"left":null==e.get("bottom")&&"bottom"!==e.get("top")?"bottom":"top";d.setStyle({fill:f.get("textFill")||t.fill||t.stroke||"#000",backgroundColor:f.get("textBackgroundColor")}),c.setTextConfig({position:f.get("textPosition")||n}),d.ignore=!e.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){"emphasis"!==o.get(["iconStatus",s])&&i.leaveEmphasis(this),d.hide()}),("emphasis"===o.get(["iconStatus",s])?_i:bi)(c),r.add(c),c.on("click",ut(u.onclick,u,n,i,s)),m[s]=c})}(v,f,g),v.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&("emphasis"===e?_i:bi)(i[t])},f instanceof wC&&f.render&&f.render(v,n,i,o)):_&&f.dispose&&f.dispose(n,i)}},n.prototype.updateView=function(t,e,n,i){s(this._features,function(t){t instanceof wC&&t.updateView&&t.updateView(t.model,e,n,i)})},n.prototype.remove=function(t,e){s(this._features,function(n){n instanceof wC&&n.remove&&n.remove(t,e)}),this.group.removeAll()},n.prototype.dispose=function(t,e){s(this._features,function(n){n instanceof wC&&n.dispose&&n.dispose(t,e)})},n.type="toolbox",n}(nu);var LC=
/** @class */function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",o="svg"===e.getZr().painter.getType(),r=o?"svg":n.get("type",!0)||"png",a=e.getConnectedDataURL({type:r,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),s=d.browser;if("function"!=typeof MouseEvent||!s.newEdge&&(s.ie||s.edge))if(window.navigator.msSaveOrOpenBlob||o){var l=a.split(","),u=l[0].indexOf("base64")>-1,c=o?decodeURIComponent(l[1]):l[1];u&&(c=window.atob(c));var h=i+"."+r;if(window.navigator.msSaveOrOpenBlob){for(var p=c.length,f=new Uint8Array(p);p--;)f[p]=c.charCodeAt(p);var g=new Blob([f]);window.navigator.msSaveOrOpenBlob(g,h)}else{var y=document.createElement("iframe");document.body.appendChild(y);var m=y.contentWindow,v=m.document;v.open("image/svg+xml","replace"),v.write(c),v.close(),m.focus(),v.execCommand("SaveAs",!0,h),document.body.removeChild(y)}}else{var x=n.get("lang"),_='<body style="margin:0;"><img src="'+a+'" style="max-width:100%;" title="'+(x&&x[0]||"")+'" /></body>',b=window.open();b.document.write(_),b.document.title=i}else{var S=document.createElement("a");S.download=i+"."+r,S.target="_blank",S.href=a;var w=new MouseEvent("click",{
// some micro front-end framework window maybe is a Proxy
view:document.defaultView,bubbles:!0,cancelable:!1});S.dispatchEvent(w)}},e.getDefaultOption=function(t){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",
// Default use option.backgroundColor
// backgroundColor: '#fff',
connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],
// use current pixel ratio of device by default
// pixelRatio: 1,
lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])}},e}(wC),kC="__ec_magicType_stack__",PC=[["line","bar"],["stack"]],NC=
/** @class */function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return s(t.get("type"),function(t){e[t]&&(n[t]=e[t])}),n},e.getDefaultOption=function(t){return{show:!0,type:[],
// Icon group
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",
// eslint-disable-next-line
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"},
// `line`, `bar`, `stack`, `tiled`
title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},e.prototype.onclick=function(t,e,n){var i=this.model,o=i.get(["seriesIndex",n]);if(OC[n]){var r,a={series:[]};s(PC,function(t){l(t,n)>=0&&s(t,function(t){i.setIconStatus(t,"normal")})}),i.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:null==o?null:{seriesIndex:o}},function(t){var e=t.subType,o=t.id,r=OC[n](e,o,t,i);r&&(C(r,t.option),a.series.push(r));var s=t.coordinateSystem;if(s&&"cartesian2d"===s.type&&("line"===n||"bar"===n)){var l=s.getAxesByScale("ordinal")[0];if(l){var u=l.dim+"Axis",c=t.getReferringComponents(u,Tn).models[0].componentIndex;a[u]=a[u]||[];for(var d=0;d<=c;d++)a[u][c]=a[u][c]||{};a[u][c].boundaryGap="bar"===n}}});var u=n;"stack"===n&&(r=et({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),"emphasis"!==i.get(["iconStatus",n])&&(u="tiled")),e.dispatchAction({type:"changeMagicType",currentType:u,newOption:a,newTitle:r,featureName:"magicType"})}},e}(wC),OC={line:function(t,e,n,i){if("bar"===t)return et({id:e,type:"line",
// Preserve data related option
data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(t,e,n,i){if("line"===t)return et({id:e,type:"bar",
// Preserve data related option
data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(t,e,n,i){var o=n.get("stack")===kC;if("line"===t||"bar"===t)return i.setIconStatus("stack",o?"normal":"emphasis"),et({id:e,stack:o?"":kC},i.get(["option","stack"])||{},!0)}};wd({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)});var RC=new Array(60).join("-"),EC="\t";function VC(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var zC=new RegExp("[\t]+","g");function BC(t,e){var i=t.split(new RegExp("\n*"+RC+"\n*","g")),o={series:[]};return s(i,function(t,i){if(function(t){if(t.slice(0,t.indexOf("\n")).indexOf(EC)>=0)return!0}(t)){var r=function(t){for(var e=t.split(/\n+/g),i=VC(e.shift()).split(zC),o=[],r=n(i,function(t){return{name:t,data:[]}}),a=0;a<e.length;a++){var s=VC(e[a]).split(zC);o.push(s.shift());for(var l=0;l<s.length;l++)r[l]&&(r[l].data[a]=s[l])}return{series:r,categories:o}}(t),a=e[i],s=a.axisDim+"Axis";a&&(o[s]=o[s]||[],o[s][a.axisIndex]={data:r.categories},o.series=o.series.concat(r.series))}else{r=function(t){for(var e=t.split(/\n+/g),n=VC(e.shift()),i=[],o=0;o<e.length;o++){var r=VC(e[o]);if(r){var a=r.split(zC),s="",l=void 0,u=!1;isNaN(a[0])?(u=!0,s=a[0],a=a.slice(1),i[o]={name:s,value:[]},l=i[o].value):l=i[o]=[];for(var c=0;c<a.length;c++)l.push(+a[c]);1===l.length&&(u?i[o].value=l[0]:i[o]=l[0])}}return{name:n,data:i}}(t);o.series.push(r)}}),o}var GC=
/** @class */function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return h(i,e),i.prototype.onclick=function(e,i){setTimeout(function(){i.dispatchAction({type:"hideTip"})});var o=i.getDom(),r=this.model;this._dom&&o.removeChild(this._dom);var a=document.createElement("div");a.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",a.style.backgroundColor=r.get("backgroundColor")||"#fff";var l=document.createElement("h4"),u=r.get("lang")||[];l.innerHTML=u[0]||r.get("title"),l.style.cssText="margin:10px 20px",l.style.color=r.get("textColor");var c=document.createElement("div"),d=document.createElement("textarea");c.style.cssText="overflow:auto";var h=r.get("optionToContent"),p=r.get("contentToOption"),f=function(t){var e,i,o,r=function(t){var e={},n=[],i=[];return t.eachRawSeries(function(t){var o=t.coordinateSystem;if(!o||"cartesian2d"!==o.type&&"polar"!==o.type)n.push(t);else{var r=o.getBaseAxis();if("category"===r.type){var a=r.dim+"_"+r.index;e[a]||(e[a]={categoryAxis:r,valueAxis:o.getOtherAxis(r),series:[]},i.push({axisDim:r.dim,axisIndex:r.index})),e[a].series.push(t)}else n.push(t)}}),{seriesGroupByCategoryAxis:e,other:n,meta:i}}(t);return{value:lt([(i=r.seriesGroupByCategoryAxis,o=[],s(i,function(t,e){var i=t.categoryAxis,r=t.valueAxis.dim,a=[" "].concat(n(t.series,function(t){return t.name})),l=[i.model.getCategories()];s(t.series,function(t){var e=t.getRawData();l.push(t.getRawData().mapArray(e.mapDimension(r),function(t){return t}))});for(var u=[a.join(EC)],c=0;c<l[0].length;c++){for(var d=[],h=0;h<l.length;h++)d.push(l[h][c]);u.push(d.join(EC))}o.push(u.join("\n"))}),o.join("\n\n"+RC+"\n\n")),(e=r.other,n(e,function(t){var e=t.getRawData(),n=[t.name],i=[];return e.each(e.dimensions,function(){for(var t=arguments.length,o=arguments[t-1],r=e.getName(o),a=0;a<t-1;a++)i[a]=arguments[a];n.push((r?r+EC:"")+i.join(EC))}),n.join("\n")}).join("\n\n"+RC+"\n\n"))],function(t){return!!t.replace(/[\n\t\s]/g,"")}).join("\n\n"+RC+"\n\n"),meta:r.meta}}(e);if(g(h)){var y=h(i.getOption());t(y)?c.innerHTML=y:De(y)&&c.appendChild(y)}else{d.readOnly=r.get("readOnly");var m=d.style;m.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",m.color=r.get("textColor"),m.borderColor=r.get("textareaBorderColor"),m.backgroundColor=r.get("textareaColor"),d.value=f.value,c.appendChild(d)}var v=f.meta,x=document.createElement("div");x.style.cssText="position:absolute;bottom:5px;left:0;right:0";var _="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",b=document.createElement("div"),S=document.createElement("div");_+=";background-color:"+r.get("buttonColor"),_+=";color:"+r.get("buttonTextColor");var w=this;function M(){o.removeChild(a),w._dom=null}Te(b,"click",M),Te(S,"click",function(){if(null==p&&null!=h||null!=p&&null==h)M();else{var t;try{t=g(p)?p(c,i.getOption()):BC(d.value,v)}catch(e){throw M(),new Error("Data view format error "+e)}t&&i.dispatchAction({type:"changeDataView",newOption:t}),M()}}),b.innerHTML=u[1],S.innerHTML=u[2],S.style.cssText=b.style.cssText=_,!r.get("readOnly")&&x.appendChild(S),x.appendChild(b),a.appendChild(l),a.appendChild(c),a.appendChild(x),c.style.height=o.clientHeight-80+"px",o.appendChild(a),this._dom=a},i.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},i.prototype.dispose=function(t,e){this.remove(t,e)},i.getDefaultOption=function(t){return{show:!0,readOnly:!1,optionToContent:null,contentToOption:null,
// eslint-disable-next-line
icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:t.getLocaleModel().get(["toolbox","dataView","title"]),lang:t.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"}},i}(wC);function FC(t,e){return n(t,function(t,n){var i=e&&e[n];if(r(i)&&!o(i)){r(t)&&!o(t)||(t={value:t});var a=null!=i.name&&null==t.name;return t=C(t,i),a&&delete t.name,t}return t})}wd({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,e){var n=[];s(t.newOption.series,function(t){var i=e.getSeriesByName(t.name)[0];if(i){var o=i.get("data");n.push({name:t.name,data:FC(t.data,o)})}else n.push(f({
// Default is scatter
type:"scatter"},t))}),e.mergeOption(C({series:n},t.newOption))});var WC=s,HC=wn();function YC(t){var e=HC(t);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var UC=
/** @class */function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.onclick=function(t,e){!function(t){HC(t).snapshots=null}(t),e.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){return{show:!0,
// eslint-disable-next-line
icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:t.getLocaleModel().get(["toolbox","restore","title"])}},e}(wC);wd({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var ZC=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],XC=
/** @class */function(){function t(t,e,n){var i=this;this._targetInfoList=[];var o=qC(e,t);s(KC,function(t,e){(!n||!n.include||l(n.include,e)>=0)&&t(o,i._targetInfoList)})}return t.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,function(t,e,n){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var i=QC[t.brushType](0,n,e);t.__rangeOffset={offset:eA[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax}}}),t},t.prototype.matchOutputRanges=function(t,e,n){s(t,function(t){var i=this.findTargetInfo(t,e);i&&!0!==i&&s(i.coordSyses,function(i){var o=QC[t.brushType](1,i,t.range,!0);n(t,o.values,i,e)})},this)},t.prototype.setInputRanges=function(t,e){s(t,function(t){var n,i,o,r,a,s=this.findTargetInfo(t,e);if(t.range=t.range||[],s&&!0!==s){t.panelId=s.panelId;var l=QC[t.brushType](0,s.coordSys,t.coordRange),u=t.__rangeOffset;t.range=u?eA[t.brushType](l.values,u.offset,(n=l.xyMinMax,i=u.xyMinMax,o=iA(n),r=iA(i),a=[o[0]/r[0],o[1]/r[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}},this)},t.prototype.makePanelOpts=function(t,e){return n(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e?e(n):null,clipPath:FS(i),isTargetByCursor:HS(i,t,n.coordSysModel),getLinearBrushOtherExtent:WS(i)}})},t.prototype.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return!0===i||i&&l(i.coordSyses,e.coordinateSystem)>=0},t.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=qC(e,t),o=0;o<n.length;o++){var r=n[o],a=t.panelId;if(a){if(r.panelId===a)return r}else for(var s=0;s<JC.length;s++)if(JC[s](i,r))return r}return!0},t}();function jC(t){return t[0]>t[1]&&t.reverse(),t}function qC(t,e){return In(t,e,{includeMainTypes:ZC})}var KC={grid:function(t,e){var n=t.xAxisModels,i=t.yAxisModels,o=t.gridModels,r=a(),u={},c={};(n||i||o)&&(s(n,function(t){var e=t.axis.grid.model;r.set(e.id,e),u[e.id]=!0}),s(i,function(t){var e=t.axis.grid.model;r.set(e.id,e),c[e.id]=!0}),s(o,function(t){r.set(t.id,t),u[t.id]=!0,c[t.id]=!0}),r.each(function(t){var o=t.coordinateSystem,r=[];s(o.getCartesians(),function(t,e){(l(n,t.getAxis("x").model)>=0||l(i,t.getAxis("y").model)>=0)&&r.push(t)}),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,
// Use the first one as the representitive coordSys.
coordSys:r[0],coordSyses:r,getPanelRect:$C.grid,xAxisDeclared:u[t.id],yAxisDeclared:c[t.id]})}))},geo:function(t,e){s(t.geoModels,function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:$C.geo})})}},JC=[
// grid
function(t,e){var n=t.xAxisModel,i=t.yAxisModel,o=t.gridModel;return!o&&n&&(o=n.axis.grid.model),!o&&i&&(o=i.axis.grid.model),o&&o===e.gridModel},
// geo
function(t,e){var n=t.geoModel;return n&&n===e.geoModel}],$C={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(po(t)),e}},QC={lineX:at(tA,0),lineY:at(tA,1),rect:function(t,e,n,i){var o=t?e.pointToData([n[0][0],n[1][0]],i):e.dataToPoint([n[0][0],n[1][0]],i),r=t?e.pointToData([n[0][1],n[1][1]],i):e.dataToPoint([n[0][1],n[1][1]],i),a=[jC([o[0],r[0]]),jC([o[1],r[1]])];return{values:a,xyMinMax:a}},polygon:function(t,e,i,o){var r=[[Infinity,-Infinity],[Infinity,-Infinity]];return{values:n(i,function(n){var i=t?e.pointToData(n,o):e.dataToPoint(n,o);return r[0][0]=Math.min(r[0][0],i[0]),r[1][0]=Math.min(r[1][0],i[1]),r[0][1]=Math.max(r[0][1],i[0]),r[1][1]=Math.max(r[1][1],i[1]),i}),xyMinMax:r}}};function tA(t,e,i,o){var r=i.getAxis(["x","y"][t]),a=jC(n([0,1],function(t){return e?r.coordToData(r.toLocalCoord(o[t]),!0):r.toGlobalCoord(r.dataToCoord(o[t]))})),s=[];return s[t]=a,s[1-t]=[NaN,NaN],{values:a,xyMinMax:s}}var eA={lineX:at(nA,0),lineY:at(nA,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,e,i){return n(t,function(t,n){return[t[0]-i[0]*e[n][0],t[1]-i[1]*e[n][1]]})}};function nA(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function iA(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var oA,rA,aA=s,sA=cn+"toolbox-dataZoom_",lA=
/** @class */function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.render=function(t,e,n,i){this._brushController||(this._brushController=new cS(n.getZr()),this._brushController.on("brush",ut(this._onBrush,this)).mount()),function(t,e,n,i,o){var r=n._isZoomActive;i&&"takeGlobalCursor"===i.type&&(r="dataZoomSelect"===i.key&&i.dataZoomSelectActive);n._isZoomActive=r,t.setIconStatus("zoom",r?"emphasis":"normal");var a=new XC(cA(t),e,{include:["grid"]}),s=a.makePanelOpts(o,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"});n._brushController.setPanels(s).enableBrush(!(!r||!s.length)&&{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()})}(t,e,this,i,n),function(t,e){t.setIconStatus("back",function(t){return YC(t).length}(e)>1?"emphasis":"normal")}(t,e)},e.prototype.onclick=function(t,e,n){uA[n].call(this)},e.prototype.remove=function(t,e){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,e){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var e=t.areas;if(t.isEnd&&e.length){var n={},i=this.ecModel;this._brushController.updateCovers([]),new XC(cA(this.model),i,{include:["grid"]}).matchOutputRanges(e,i,function(t,e,n){if("cartesian2d"===n.type){var i=t.brushType;"rect"===i?(o("x",n,e[0]),o("y",n,e[1])):o({lineX:"x",lineY:"y"}[i],n,e)}}),function(t,e){var n=YC(t);WC(e,function(e,i){for(var o=n.length-1;o>=0&&!n[o][i];o--);if(o<0){var r=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(r){var a=r.getPercentRange();n[0][i]={dataZoomId:i,start:a[0],end:a[1]}}}}),n.push(e)}(i,n),this._dispatchZoomAction(n)}function o(t,e,o){var r=e.getAxis(t),a=r.model,s=function(t,e,n){var i;return n.eachComponent({mainType:"dataZoom",subType:"select"},function(n){n.getAxisModel(t,e.componentIndex)&&(i=n)}),i}(t,a,i),l=s.findRepresentativeAxisProxy(a).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(o=Bb(0,o.slice(),r.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:o[0],endValue:o[1]})}},e.prototype._dispatchZoomAction=function(t){var e=[];aA(t,function(t,n){e.push(nt(t))}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},e.getDefaultOption=function(t){return{show:!0,filterMode:"filter",
// Icon group
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"},
// `zoom`, `back`
title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},e}(wC),uA={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var e=YC(t),n=e[e.length-1];e.length>1&&e.pop();var i={};return WC(n,function(t,n){for(var o=e.length-1;o>=0;o--)if(t=e[o][n]){i[n]=t;break}}),i}(this.ecModel))}};function cA(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return null==e.xAxisIndex&&null==e.xAxisId&&(e.xAxisIndex="all"),null==e.yAxisIndex&&null==e.yAxisId&&(e.yAxisIndex="all"),e}oA="dataZoom",rA=function(t){var e=t.getComponent("toolbox",0),n=["feature","dataZoom"];if(e&&null!=e.get(n)){var i=e.getModel(n),o=[],r=In(t,cA(i));return aA(r.xAxisModels,function(t){return a(t,"xAxis","xAxisIndex")}),aA(r.yAxisModels,function(t){return a(t,"yAxis","yAxisIndex")}),o}function a(t,e,n){var r=t.componentIndex,a={type:"select",$fromToolbox:!0,
// Default to be filter
filterMode:i.get("filterMode",!0)||"filter",
// Id for merge mapping.
id:sA+e+r};a[n]=r,o.push(a)}},i(null==ka.get(oA)&&rA),ka.set(oA,rA);var dA=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={
// zlevel: 0,
z:60,show:!0,
// tooltip main content
showContent:!0,
// 'trigger' only works on coordinate system.
// 'item' | 'axis' | 'none'
trigger:"item",
// 'click' | 'mousemove' | 'none'
triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",
// whether restraint content inside viewRect.
// If renderMode: 'richText', default true.
// If renderMode: 'html', defaut false (for backward compat).
confine:null,showDelay:0,hideDelay:100,
// Animation transition time, unit is second
transitionDuration:.4,enterable:!1,backgroundColor:"#fff",
// box shadow
shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,
// tooltip border radius, unit is px, default is 4
borderRadius:4,
// tooltip border width, unit is px, default is 0 (no border)
borderWidth:1,
// Tooltip inside padding, default is 5 for all direction
// Array is allowed to set up, right, bottom, left, same with css
// The default value: See `tooltip/tooltipMarkup.ts#getPaddingFromTooltipModel`.
padding:null,
// Extra css text
extraCssText:"",
// axis indicator, trigger by axis
axisPointer:{
// default is line
// legal values: 'line' | 'shadow' | 'cross'
type:"line",
// Valid when type is line, appoint tooltip line locate on which line. Optional
// legal values: 'x' | 'y' | 'angle' | 'radius' | 'auto'
// default is 'auto', chose the axis which type is category.
// for multiply y axis, cartesian coord chose x axis, polar chose angle axis
axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",
// TODO formatter
textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(ua);function hA(t){var e=t.get("confine");return null!=e?!!e:"richText"===t.get("renderMode")}function pA(t){if(d.domSupported)for(var e=document.documentElement.style,n=0,i=t.length;n<i;n++)if(t[n]in e)return t[n]}var fA=pA(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);function gA(t,e){if(!t)return e;e=Hr(e,!0);var n=t.indexOf(e);return(t=-1===n?e:"-"+t.slice(0,n)+"-"+e).toLowerCase()}var yA=gA(pA(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),"transition"),mA=gA(fA,"transform"),vA="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(d.transform3dSupported?"will-change:transform;":"");function xA(t,e,n){var i=t.toFixed(0)+"px",o=e.toFixed(0)+"px";if(!d.transformSupported)return n?"top:"+o+";left:"+i+";":[["top",o],["left",i]];var r=d.transform3dSupported,a="translate"+(r?"3d":"")+"("+i+","+o+(r?",0":"")+")";return n?"top:0;left:0;"+mA+":"+a+";":[["top",0],["left",0],[fA,a]]}function _A(t,e,n){var i=[],o=t.get("transitionDuration"),r=t.get("backgroundColor"),a=t.get("shadowBlur"),l=t.get("shadowColor"),u=t.get("shadowOffsetX"),c=t.get("shadowOffsetY"),h=t.getModel("textStyle"),p=Wl(t,"html"),f=u+"px "+c+"px "+a+"px "+l;return i.push("box-shadow:"+f),e&&o&&i.push(function(t,e){var n="cubic-bezier(0.23,1,0.32,1)",i=" "+t/2+"s "+n,o="opacity"+i+",visibility"+i;return e||(i=" "+t+"s "+n,o+=d.transformSupported?","+mA+i:",left"+i+",top"+i),yA+":"+o}(o,n)),r&&i.push("background-color:"+r),s(["width","color","radius"],function(e){var n="border-"+e,o=Hr(n),r=t.get(o);null!=r&&i.push(n+":"+r+("color"===e?"":"px"))}),i.push(function(t){var e=[],n=t.get("fontSize"),i=t.getTextColor();i&&e.push("color:"+i),e.push("font:"+t.getFont());var o=_(t.get("lineHeight"),Math.round(3*n/2));n&&e.push("line-height:"+o+"px");var r=t.get("textShadowColor"),a=t.get("textShadowBlur")||0,l=t.get("textShadowOffsetX")||0,u=t.get("textShadowOffsetY")||0;return r&&a&&e.push("text-shadow:"+l+"px "+u+"px "+a+"px "+r),s(["decoration","align"],function(n){var i=t.get(n);i&&e.push("text-"+n+":"+i)}),e.join(";")}(h)),null!=p&&i.push("padding:"+Yr(p).join("px ")+"px"),i.join(";")+";"}function bA(t,e,n,i,o){var r=e&&e.painter;if(n){var a=r&&r.getViewportRoot();a&&Ae(t,a,n,i,o)}else{t[0]=i,t[1]=o;var s=r&&r.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var SA=
/** @class */function(){function e(e,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,d.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var o=this._zr=e.getZr(),r=n.appendTo,a=r&&(t(r)?document.querySelector(r):De(r)?r:g(r)&&r(e.getDom()));bA(this._styleCoord,o,a,e.getWidth()/2,e.getHeight()/2),(a||e.getDom()).appendChild(i),this._api=e,this._container=a;var s=this;i.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},i.onmousemove=function(t){if(t=t||window.event,!s._enterable){var e=o.handler,n=o.painter.getViewportRoot();Ce(n,t,!0),e.dispatch("mousemove",t)}},i.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return e.prototype.update=function(t){if(!this._container){var e=this._api.getDom(),n=(r="position",(a=(o=e).currentStyle||document.defaultView&&document.defaultView.getComputedStyle(o))?a[r]:null),i=e.style;"absolute"!==i.position&&"absolute"!==n&&(i.position="relative")}var o,r,a,s=t.get("alwaysShowContent");s&&this._moveIfResized(),this._alwaysShowContent=s,this.el.className=t.get("className")||""},e.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,o=this._styleCoord;n.innerHTML?i.cssText=vA+_A(t,!this._firstShow,this._longHide)+xA(o[0],o[1],!0)+"border-color:"+qr(e)+";"+(t.get("extraCssText")||"")+";pointer-events:"+(this._enterable?"auto":"none"):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,n,i,r,a){var s=this.el;if(null!=e){var u="";if(t(a)&&"item"===i.get("trigger")&&!hA(i)&&(u=function(e,n,i){if(!t(i)||"inside"===i)return"";var o=e.get("backgroundColor"),r=e.get("borderWidth");n=qr(n);var a,s,u="left"===(a=i)?"right":"right"===a?"left":"top"===a?"bottom":"top",c=Math.max(1.5*Math.round(r),6),d="",h=mA+":";l(["left","right"],u)>-1?(d+="top:50%",h+="translateY(-50%) rotate("+(s="left"===u?-225:-45)+"deg)"):(d+="left:50%",h+="translateX(-50%) rotate("+(s="top"===u?225:45)+"deg)");var p=s*Math.PI/180,f=c+r,g=f*Math.abs(Math.cos(p))+f*Math.abs(Math.sin(p)),y=n+" solid "+r+"px;";return'<div style="'+["position:absolute;width:"+c+"px;height:"+c+"px;z-index:-1;",(d+=";"+u+":-"+Math.round(100*((g-Math.SQRT2*r)/2+Math.SQRT2*r-(g-f)/2))/100+"px")+";"+h+";","border-bottom:"+y,"border-right:"+y,"background-color:"+o+";"].join("")+'"></div>'}(i,r,a)),t(e))s.innerHTML=e+u;else if(e){s.innerHTML="",o(e)||(e=[e]);for(var c=0;c<e.length;c++)De(e[c])&&e[c].parentNode!==s&&s.appendChild(e[c]);if(u&&s.childNodes.length){var d=document.createElement("div");d.innerHTML=u,s.appendChild(d)}}}else s.innerHTML=""},e.prototype.setEnterable=function(t){this._enterable=t},e.prototype.getSize=function(){var t=this.el;return t?[t.offsetWidth,t.offsetHeight]:[0,0]},e.prototype.moveTo=function(t,e){if(this.el){var n=this._styleCoord;if(bA(n,this._zr,this._container,t,e),null!=n[0]&&null!=n[1]){var i=this.el.style,o=xA(n[0],n[1]);s(o,function(t){i[t[0]]=t[1]})}}},e.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},e.prototype.hide=function(){var t=this,e=this.el.style;e.visibility="hidden",e.opacity="0",d.transform3dSupported&&(e.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return t._longHide=!0},500)},e.prototype.hideLater=function(t){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(ut(this.hide,this),t)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var t=this.el.parentNode;t&&t.removeChild(this.el),this.el=this._container=null},e}(),wA=
/** @class */function(){function t(t){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=t.getZr(),DA(this._styleCoord,this._zr,t.getWidth()/2,t.getHeight()/2)}return t.prototype.update=function(t){var e=t.get("alwaysShowContent");e&&this._moveIfResized(),this._alwaysShowContent=e},t.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},t.prototype.setContent=function(t,e,n,i,o){var a=this;r(t)&&sn(""),this.el&&this._zr.remove(this.el);var l=n.getModel("textStyle");this.el=new Q({style:{rich:e.richTextStyles,text:t,lineHeight:22,borderWidth:1,borderColor:i,textShadowColor:l.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:Wl(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),s(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(t){a.el.style[t]=n.get(t)}),s(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(t){a.el.style[t]=l.get(t)||0}),this._zr.add(this.el);var u=this;this.el.on("mouseover",function(){u._enterable&&(clearTimeout(u._hideTimeout),u._show=!0),u._inContent=!0}),this.el.on("mouseout",function(){u._enterable&&u._show&&u.hideLater(u._hideDelay),u._inContent=!1})},t.prototype.setEnterable=function(t){this._enterable=t},t.prototype.getSize=function(){var t=this.el,e=this.el.getBoundingRect(),n=IA(t.style);return[e.width+n.left+n.right,e.height+n.top+n.bottom]},t.prototype.moveTo=function(t,e){var n=this.el;if(n){var i=this._styleCoord;DA(i,this._zr,t,e),t=i[0],e=i[1];var o=n.style,r=MA(o.borderWidth||0),a=IA(o);n.x=t+r+a.left,n.y=e+r+a.top,n.markRedraw()}},t.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},t.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},t.prototype.hideLater=function(t){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(ut(this.hide,this),t)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){this._zr.remove(this.el)},t}();function MA(t){return Math.max(0,t)}function IA(t){var e=MA(t.shadowBlur||0),n=MA(t.shadowOffsetX||0),i=MA(t.shadowOffsetY||0);return{left:MA(e-n),right:MA(e+n),top:MA(e-i),bottom:MA(e+i)}}function DA(t,e,n,i){t[0]=n,t[1]=i,t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var TA=new F({shape:{x:-1,y:-1,width:2,height:2}}),CA=
/** @class */function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return h(n,e),n.prototype.init=function(t,e){if(!d.node&&e.getDom()){var n,i=t.getComponent("tooltip"),o=this._renderMode="auto"===(n=i.get("renderMode"))?d.domSupported?"html":"richText":n||"html";this._tooltipContent="richText"===o?new wA(e):new SA(e,{appendTo:i.get("appendToBody",!0)?"body":i.get("appendTo",!0)})}},n.prototype.render=function(t,e,n){if(!d.node&&n.getDom()){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=n;var i=this._tooltipContent;i.update(t),i.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow(),"richText"!==this._renderMode&&t.get("transitionDuration")?yu(this,"_updatePosition",50,"fixRate"):mu(this,"_updatePosition")}},n.prototype._initGlobalListener=function(){var t=this._tooltipModel.get("triggerOn");kD("itemTooltip",this._api,ut(function(e,n,i){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(n,i):"leave"===e&&this._hide(i))},this))},n.prototype._keepShow=function(){var t=this._tooltipModel,e=this._ecModel,n=this._api,i=t.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==i&&"click"!==i){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&o.manuallyShowTip(t,e,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},n.prototype.manuallyShowTip=function(t,e,n,i){if(i.from!==this.uid&&!d.node&&n.getDom()){var o=LA(i,n);this._ticket="";var r=i.dataByCoordSys,a=function(t,e,n){var i=Dn(t).queryOptionMap,o=i.keys()[0];if(!o||"series"===o)return;var r=An(e,o,i.get(o),{useDefault:!1,enableAll:!1,enableNone:!1}),a=r.models[0];if(!a)return;var s,l=n.getViewOfComponentModel(a);if(l.group.traverse(function(e){var n=Un(e).tooltipConfig;if(n&&n.name===t.name)return s=e,!0}),s)return{componentMainType:o,componentIndex:a.componentIndex,el:s}}(i,e,n);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:i.position,
// When manully trigger, the mouse is not on the el, so we'd better to
// position tooltip on the bottom of the el and display arrow is possible.
positionDefault:"bottom"},o)}else if(i.tooltip&&null!=i.x&&null!=i.y){var l=TA;l.x=i.x,l.y=i.y,l.update(),Un(l).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:l},o)}else if(r)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:r,tooltipOption:i.tooltipOption},o);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var u=ED(i,e),c=u.point[0],h=u.point[1];null!=c&&null!=h&&this._tryShow({offsetX:c,offsetY:h,target:u.el,position:i.position,
// When manully trigger, the mouse is not on the el, so we'd better to
// position tooltip on the bottom of the el and display arrow is possible.
positionDefault:"bottom"},o)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},o))}},n.prototype.manuallyHideTip=function(t,e,n,i){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(LA(i,n))},n.prototype._manuallyAxisShowTip=function(t,e,n,i){var o=i.seriesIndex,r=i.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=o&&null!=r&&null!=a){var s=e.getSeriesByIndex(o);if(s)if("axis"===AA([s.getData().getItemModel(r),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:r,position:i.position}),!0}},n.prototype._tryShow=function(t,e){var n=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var i=t.dataByCoordSys;if(i&&i.length)this._showAxisTooltip(i,t);else if(n){var o,r;if("legend"===Un(n).ssrType)return;this._lastDataByCoordSys=null,ac(n,function(t){return null!=Un(t).dataIndex?(o=t,!0):null!=Un(t).tooltipConfig?(r=t,!0):void 0},!0),o?this._showSeriesItemTooltip(t,o,e):r?this._showComponentItemTooltip(t,r,e):this._hide(e)}else this._lastDataByCoordSys=null,this._hide(e)}},n.prototype._showOrMove=function(t,e){var n=t.get("showDelay");e=ut(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},n.prototype._showAxisTooltip=function(t,e){var n=this._ecModel,i=this._tooltipModel,o=[e.offsetX,e.offsetY],r=AA([e.tooltipOption],i),a=this._renderMode,l=[],u=Pl("section",{blocks:[],noHeader:!0}),c=[],d=new Hl;s(t,function(t){s(t.dataByAxis,function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),o=t.value;if(e&&null!=o){var r=vD(o,e.axis,n,t.seriesDataIndices,t.valueLabelOpt),h=Pl("section",{header:r,noHeader:!tt(r),sortBlocks:!0,blocks:[]});u.blocks.push(h),s(t.seriesDataIndices,function(s){var u=n.getSeriesByIndex(s.seriesIndex),p=s.dataIndexInside,g=u.getDataParams(p);if(!(g.dataIndex<0)){g.axisDim=t.axisDim,g.axisIndex=t.axisIndex,g.axisType=t.axisType,g.axisId=t.axisId,g.axisValue=hp(e.axis,{value:o}),g.axisValueLabel=r,g.marker=d.makeTooltipMarker("item",qr(g.color),a);var y=Zs(u.formatTooltip(p,!0,null)),m=y.frag;if(m){var v=AA([u],i).get("valueFormatter");h.blocks.push(v?f({valueFormatter:v},m):m)}y.text&&c.push(y.text),l.push(g)}})}})}),u.blocks.reverse(),c.reverse();var h=e.position,p=r.get("order"),g=zl(u,d,a,p,n.get("useUTC"),r.get("textStyle"));g&&c.unshift(g);var y="richText"===a?"\n\n":"<br/>",m=c.join(y);this._showOrMove(r,function(){this._updateContentNotChangedOnAxis(t,l)?this._updatePosition(r,h,o[0],o[1],this._tooltipContent,l):this._showTooltipContent(r,m,l,Math.random()+"",o[0],o[1],h,null,d)})},n.prototype._showSeriesItemTooltip=function(t,e,n){var i=this._ecModel,o=Un(e),r=o.seriesIndex,a=i.getSeriesByIndex(r),s=o.dataModel||a,l=o.dataIndex,u=o.dataType,c=s.getData(u),d=this._renderMode,h=t.positionDefault,p=AA([c.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,h?{position:h}:null),g=p.get("trigger");if(null==g||"item"===g){var y=s.getDataParams(l,u),m=new Hl;y.marker=m.makeTooltipMarker("item",qr(y.color),d);var v=Zs(s.formatTooltip(l,!1,u)),x=p.get("order"),_=p.get("valueFormatter"),b=v.frag,S=b?zl(_?f({valueFormatter:_},b):b,m,d,x,i.get("useUTC"),p.get("textStyle")):v.text,w="item_"+s.name+"_"+l;this._showOrMove(p,function(){this._showTooltipContent(p,S,y,w,t.offsetX,t.offsetY,t.position,t.target,m)}),n({type:"showTip",dataIndexInside:l,dataIndex:c.getRawIndex(l),seriesIndex:r,from:this.uid})}},n.prototype._showComponentItemTooltip=function(e,n,i){var o="html"===this._renderMode,r=Un(n),a=r.tooltipConfig.option||{},s=a.encodeHTMLContent;if(t(a)){a={content:a,
// Fixed formatter
formatter:a},s=!0}s&&o&&a.content&&((a=nt(a)).content=rt(a.content));var l=[a],u=this._ecModel.getComponent(r.componentMainType,r.componentIndex);u&&l.push(u),l.push({formatter:a.content});var c=e.positionDefault,d=AA(l,this._tooltipModel,c?{position:c}:null),h=d.get("content"),p=Math.random()+"",f=new Hl;this._showOrMove(d,function(){var t=nt(d.get("formatterParams")||{});this._showTooltipContent(d,h,t,p,e.offsetX,e.offsetY,e.position,n,f)}),i({type:"showTip",from:this.uid})},n.prototype._showTooltipContent=function(e,n,i,r,a,s,l,u,c){if(this._ticket="",e.get("showContent")&&e.get("show")){var d=this._tooltipContent;d.setEnterable(e.get("enterable"));var h=e.get("formatter");l=l||e.get("position");var p=n,f=this._getNearestPoint([a,s],i,e.get("trigger"),e.get("borderColor")).color;if(h)if(t(h)){var y=e.ecModel.get("useUTC"),m=o(i)?i[0]:i;p=h,m&&m.axisType&&m.axisType.indexOf("time")>=0&&(p=Ir(m.axisValue,p,y)),p=jr(p,i,!0)}else if(g(h)){var v=ut(function(t,n){t===this._ticket&&(d.setContent(n,c,e,f,l),this._updatePosition(e,l,a,s,d,i,u))},this);this._ticket=r,p=h(i,r,v)}else p=h;d.setContent(p,c,e,f,l),d.show(e,f),this._updatePosition(e,l,a,s,d,i,u)}},n.prototype._getNearestPoint=function(t,e,n,i){return"axis"===n||o(e)?{color:i||("html"===this._renderMode?"#fff":"none")}:o(e)?void 0:{color:i||e.color||e.borderColor}},n.prototype._updatePosition=function(e,n,i,a,s,l,u){var c=this._api.getWidth(),d=this._api.getHeight();n=n||e.get("position");var h=s.getSize(),p=e.get("align"),f=e.get("verticalAlign"),y=u&&u.getBoundingRect().clone();if(u&&y.applyTransform(u.transform),g(n)&&(n=n([i,a],l,s.el,y,{viewSize:[c,d],contentSize:h.slice()})),o(n))i=Ge(n[0],c),a=Ge(n[1],d);else if(r(n)){var m=n;m.width=h[0],m.height=h[1];var v=na(m,{width:c,height:d});i=v.x,a=v.y,p=null,f=null}else if(t(n)&&u){var x=function(t,e,n,i){var o=n[0],r=n[1],a=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=e.width,c=e.height;switch(t){case"inside":s=e.x+u/2-o/2,l=e.y+c/2-r/2;break;case"top":s=e.x+u/2-o/2,l=e.y-r-a;break;case"bottom":s=e.x+u/2-o/2,l=e.y+c+a;break;case"left":s=e.x-o-a,l=e.y+c/2-r/2;break;case"right":s=e.x+u+a,l=e.y+c/2-r/2}return[s,l]}(n,y,h,e.get("borderWidth"));i=x[0],a=x[1]}else{x=function(t,e,n,i,o,r,a){var s=n.getSize(),l=s[0],u=s[1];null!=r&&(t+l+r+2>i?t-=l+r:t+=r);null!=a&&(e+u+a>o?e-=u+a:e+=a);return[t,e]}(i,a,s,c,d,p?null:20,f?null:20);i=x[0],a=x[1]}if(p&&(i-=kA(p)?h[0]/2:"right"===p?h[0]:0),f&&(a-=kA(f)?h[1]/2:"bottom"===f?h[1]:0),hA(e)){x=function(t,e,n,i,o){var r=n.getSize(),a=r[0],s=r[1];return t=Math.min(t+a,i)-a,e=Math.min(e+s,o)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}(i,a,s,c,d);i=x[0],a=x[1]}s.moveTo(i,a)},n.prototype._updateContentNotChangedOnAxis=function(t,e){var n=this._lastDataByCoordSys,i=this._cbParamsList,o=!!n&&n.length===t.length;return o&&s(n,function(n,r){var a=n.dataByAxis||[],l=(t[r]||{}).dataByAxis||[];(o=o&&a.length===l.length)&&s(a,function(t,n){var r=l[n]||{},a=t.seriesDataIndices||[],u=r.seriesDataIndices||[];(o=o&&t.value===r.value&&t.axisType===r.axisType&&t.axisId===r.axisId&&a.length===u.length)&&s(a,function(t,e){var n=u[e];o=o&&t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex}),i&&s(t.seriesDataIndices,function(t){var n=t.seriesIndex,r=e[n],a=i[n];r&&a&&a.data!==r.data&&(o=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=e,!!o},n.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},n.prototype.dispose=function(t,e){!d.node&&e.getDom()&&(mu(this,"_updatePosition"),this._tooltipContent.dispose(),OD("itemTooltip",e))},n.type="tooltip",n}(nu);function AA(e,n,i){var o,r=n.ecModel;i?(o=new tr(i,r,r),o=new tr(n.option,o,r)):o=n;for(var a=e.length-1;a>=0;a--){var s=e[a];s&&(s instanceof tr&&(s=s.get("tooltip",!0)),t(s)&&(s={formatter:s}),s&&(o=new tr(s,o,r)))}return o}function LA(t,e){return t.dispatchAction||ut(e.dispatchAction,e)}function kA(t){return"center"===t||"middle"===t}function PA(t){_p(YD),t.registerComponentModel(dA),t.registerComponentView(CA),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},ht),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},ht)}var NA=["rect","polygon","keep","clear"];function OA(t,e){var n=dn(t?t.brush:[]);if(n.length){var i=[];s(n,function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(i=i.concat(e))});var r=t&&t.toolbox;o(r)&&(r=r[0]),r||(r={feature:{}},t.toolbox=[r]);var a,l,u=r.feature||(r.feature={}),c=u.brush||(u.brush={}),d=c.type||(c.type=[]);d.push.apply(d,i),l={},s(a=d,function(t){l[t]=1}),a.length=0,s(l,function(t,e){a.push(e)}),e&&!d.length&&d.push.apply(d,NA)}}var RA=s;function EA(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function VA(t,e,n){var i={};return RA(e,function(e){var o,r=i[e]=((o=function(){}).prototype.__hidden=o.prototype,new o);RA(t[e],function(t,i){if(kx.isValidType(i)){var o={type:i,visual:t};n&&n(o,e),r[i]=new kx(o),"opacity"===i&&((o=nt(o)).type="colorAlpha",r.__hidden.__alphaForOpacity=new kx(o))}})}),i}function zA(t,e,n){var i;s(n,function(t){e.hasOwnProperty(t)&&EA(e[t])&&(i=!0)}),i&&s(n,function(n){e.hasOwnProperty(n)&&EA(e[n])?t[n]=nt(e[n]):delete t[n]})}var BA={lineX:GA(0),lineY:GA(1),rect:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])},rect:function(t,e,n){return t&&n.boundingRect.intersect(t)}},polygon:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])&&Dt(n.range,t[0],t[1])},rect:function(t,e,n){var i=n.range;if(!t||i.length<=1)return!1;var o=t.x,r=t.y,a=t.width,s=t.height,l=i[0];return!!(Dt(i,o,r)||Dt(i,o+a,r)||Dt(i,o,r+s)||Dt(i,o+a,r+s)||U.create(t).contain(l[0],l[1])||_o(o,r,o+a,r,i)||_o(o,r,o,r+s,i)||_o(o+a,r,o+a,r+s,i)||_o(o,r+s,o+a,r+s,i))||void 0}}};function GA(t){var e=["x","y"],n=["width","height"];return{point:function(e,n,i){if(e){var o=i.range;return FA(e[t],o)}},rect:function(i,o,r){if(i){var a=r.range,s=[i[e[t]],i[e[t]]+i[n[t]]];return s[1]<s[0]&&s.reverse(),FA(s[0],a)||FA(s[1],a)||FA(a[0],s)||FA(a[1],s)}}}}function FA(t,e){return e[0]<=t&&t<=e[1]}var WA=["inBrush","outOfBrush"],HA="__ecBrushSelect",YA="__ecInBrushSelectEvent";function UA(t){t.eachComponent({mainType:"brush"},function(e){(e.brushTargetManager=new XC(e.option,t)).setInputRanges(e.areas,t)})}function ZA(t,e,i){var r,a,u=[];t.eachComponent({mainType:"brush"},function(t){i&&"takeGlobalCursor"===i.type&&t.setBrushOption("brush"===i.key?i.brushOption:{brushType:!1})}),UA(t),t.eachComponent({mainType:"brush"},function(e,i){var c={brushId:e.id,brushIndex:i,brushName:e.name,areas:nt(e.areas),selected:[]};u.push(c);var d=e.option,h=d.brushLink,p=[],f=[],g=[],y=!1;i||(r=d.throttleType,a=d.throttleDelay);var m=n(e.areas,function(t){var e=qA[t.brushType],n=C({boundingRect:e?e(t):void 0},t);return n.selectors=function(t){var e=t.brushType,n={point:function(i){return BA[e].point(i,n,t)},rect:function(i){return BA[e].rect(i,n,t)}};return n}(n),n}),v=VA(e.option,WA,function(t){t.mappingMethod="fixed"});function x(t){return"all"===h||!!p[t]}function _(t){return!!t.length}o(h)&&s(h,function(t){p[t]=1}),t.eachSeries(function(n,i){var r=g[i]=[];"parallel"===n.subType?function(t,e){var n=t.coordinateSystem;y=y||n.hasAxisBrushed(),x(e)&&n.eachActiveState(t.getData(),function(t,e){"active"===t&&(f[e]=1)})}(n,i):function(n,i,r){if(!n.brushSelector||function(t,e){var n=t.option.seriesIndex;return null!=n&&"all"!==n&&(o(n)?l(n,e)<0:e!==n)}(e,i))return;if(s(m,function(i){e.brushTargetManager.controlSeries(i,n,t)&&r.push(i),y=y||_(r)}),x(i)&&_(r)){var a=n.getData();a.each(function(t){jA(n,r,a,t)&&(f[t]=1)})}}(n,i,r)}),t.eachSeries(function(t,e){var n={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]};c.selected.push(n);var i=g[e],o=t.getData(),r=x(e)?function(t){return f[t]?(n.dataIndex.push(o.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(e){return jA(t,i,o,e)?(n.dataIndex.push(o.getRawIndex(e)),"inBrush"):"outOfBrush"};(x(e)?y:_(i))&&function(t,e,n,i,o){var r,a={};function l(t){return ec(n,r,t)}function u(t,e){ic(n,r,t,e)}s(t,function(t){var n=kx.prepareVisualTypes(e[t]);a[t]=n}),n.each(function(t,s){r=t;var c=n.getRawDataItem(r);if(!c||!1!==c.visualMap)for(var d=i.call(o,t),h=e[d],p=a[d],f=0,g=p.length;f<g;f++){var y=p[f];h[y]&&h[y].applyVisual(t,l,u)}})}(WA,v,o,r)})}),function(t,e,n,i,o){if(!o)return;var r=t.getZr();if(r[YA])return;r[HA]||(r[HA]=XA);var a=yu(r,HA,n,e);a(t,i)}(e,r,a,u,i)}function XA(t,e){if(!t.isDisposed()){var n=t.getZr();n[YA]=!0,t.dispatchAction({type:"brushSelect",batch:e}),n[YA]=!1}}function jA(t,e,n,i){for(var o=0,r=e.length;o<r;o++){var a=e[o];if(t.brushSelector(i,n,a.selectors,a))return!0}}var qA={rect:function(t){return KA(t.range)},polygon:function(t){for(var e,n=t.range,i=0,o=n.length;i<o;i++){e=e||[[Infinity,-Infinity],[Infinity,-Infinity]];var r=n[i];r[0]<e[0][0]&&(e[0][0]=r[0]),r[0]>e[0][1]&&(e[0][1]=r[0]),r[1]<e[1][0]&&(e[1][0]=r[1]),r[1]>e[1][1]&&(e[1][1]=r[1])}return e&&KA(e)}};function KA(t){return new U(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var JA=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.init=function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new cS(e.getZr())).on("brush",ut(this._onBrush,this)).mount()},e.prototype.render=function(t,e,n,i){this.model=t,this._updateController(t,e,n,i)},e.prototype.updateTransform=function(t,e,n,i){UA(e),this._updateController(t,e,n,i)},e.prototype.updateVisual=function(t,e,n,i){this.updateTransform(t,e,n,i)},e.prototype.updateView=function(t,e,n,i){this._updateController(t,e,n,i)},e.prototype._updateController=function(t,e,n,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var e=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:e,areas:nt(n),$from:e}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:e,areas:nt(n),$from:e})},e.type="brush",e}(nu),$A=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.areas=[],n.brushOption={},n}return h(e,t),e.prototype.optionUpdated=function(t,e){var n=this.option;!e&&zA(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:"#ddd"},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=n(t,function(t){return QA(this.option,t)},this))},e.prototype.setBrushOption=function(t){this.brushOption=QA(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(ua);function QA(t,e){return et({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new tr(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}var tL=["rect","polygon","lineX","lineY","keep","clear"],eL=
/** @class */function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.render=function(t,e,n){var i,o,r;e.eachComponent({mainType:"brush"},function(t){i=t.brushType,o=t.brushOption.brushMode||"single",r=r||!!t.areas.length}),this._brushType=i,this._brushMode=o,s(t.get("type",!0),function(e){t.setIconStatus(e,("keep"===e?"multiple"===o:"clear"===e?r:e===i)?"emphasis":"normal")})},e.prototype.updateView=function(t,e,n){this.render(t,e,n)},e.prototype.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return s(t.get("type",!0),function(t){e[t]&&(n[t]=e[t])}),n},e.prototype.onclick=function(t,e,n){var i=this._brushType,o=this._brushMode;"clear"===n?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",
// Clear all areas of all brush components.
areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===o?"single":"multiple":o}})},e.getDefaultOption=function(t){return{show:!0,type:tL.slice(),icon:{
/* eslint-disable */
rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},
// `rect`, `polygon`, `lineX`, `lineY`, `keep`, `clear`
title:t.getLocaleModel().get(["toolbox","brush","title"])}},e}(wC);var nL=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode={type:"box",ignoreSize:!0},n}return h(e,t),e.type="title",e.defaultOption={
// zlevel: 0,
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"}},e}(ua),iL=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.render=function(t,e,n){if(this.group.removeAll(),t.get("show")){var i=this.group,o=t.getModel("textStyle"),r=t.getModel("subtextStyle"),a=t.get("textAlign"),s=_(t.get("textBaseline"),t.get("textVerticalAlign")),l=new Q({style:Po(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),c=t.get("subtext"),d=new Q({style:Po(r,{text:c,fill:r.getTextColor(),y:u.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),h=t.get("link"),p=t.get("sublink"),f=t.get("triggerEvent",!0);l.silent=!h&&!f,d.silent=!p&&!f,h&&l.on("click",function(){Kr(h,"_"+t.get("target"))}),p&&d.on("click",function(){Kr(p,"_"+t.get("subtarget"))}),Un(l).eventData=Un(d).eventData=f?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(l),c&&i.add(d);var g=i.getBoundingRect(),y=t.getBoxLayoutParams();y.width=g.width,y.height=g.height;var m=na(y,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));a||("middle"===(a=t.get("left")||t.get("right"))&&(a="center"),"right"===a?m.x+=m.width:"center"===a&&(m.x+=m.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?m.y+=m.height:"middle"===s&&(m.y+=m.height/2),s=s||"top"),i.x=m.x,i.y=m.y,i.markRedraw();var v={align:a,verticalAlign:s};l.setStyle(v),d.setStyle(v),g=i.getBoundingRect();var x=m.margin,b=t.getItemStyle(["color","opacity"]);b.fill=t.get("backgroundColor");var S=new F({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:t.get("borderRadius")},style:b,subPixelOptimize:!0,silent:!0});i.add(S)}},e.type="title",e}(nu);var oL=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode="box",n}return h(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),this._initData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t,e=this.option,n=e.data||[],i=e.axisType,o=this._names=[];"category"===i?(t=[],s(n,function(e,n){var i,a=xn(fn(e),"");r(e)?(i=nt(e)).value=n:i=n,t.push(i),o.push(a)})):t=n;var a={category:"ordinal",time:"time",value:"number"}[i]||"number";(this._data=new eh([{name:"value",type:a}],this)).initData(t,o)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},e.type="timeline",e.defaultOption={
// zlevel: 0, // 一级层叠
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:[]},e}(ua),rL=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.type="timeline.slider",e.defaultOption=ir(oL.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",
// When using number, label position is not
// restricted by viewRect.
// positive: right/bottom, negative: left/top
show:!0,interval:"auto",rotate:0,
// formatter: null,
// 其余属性默认使用全局文本样式详见TEXTSTYLE
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)",
// borderColor: 'rgba(194,53,49, 0.5)',
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",
// eslint-disable-next-line max-len
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",
// eslint-disable-next-line max-len
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,
// 其余属性默认使用全局文本样式详见TEXTSTYLE
color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(oL);it(rL,Us.prototype);var aL=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.type="timeline",e}(nu),sL=
/** @class */function(t){function e(e,n,i,o){var r=t.call(this,e,n,i)||this;return r.type=o||"value",r}return h(e,t),e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},e}(Hp),lL=Math.PI,uL=wn(),cL=
/** @class */function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t}return h(n,e),n.prototype.init=function(t,e){this.api=e},n.prototype.render=function(t,e,n){if(this.model=t,this.api=n,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,n),o=this._createGroup("_mainGroup"),r=this._createGroup("_labelGroup"),a=this._axis=this._createAxis(i,t);t.formatTooltip=function(t){return Pl("nameValue",{noName:!0,value:a.scale.getLabel({value:t})})},s(["AxisLine","AxisTick","Control","CurrentPointer"],function(e){this["_render"+e](i,o,a,t)},this),this._renderAxisLabel(i,r,a,t),this._position(i,t)}this._doPlayStop(),this._updateTicksStatus()},n.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},n.prototype.dispose=function(){this._clearTimer()},n.prototype._layout=function(e,n){var i,o,r,a,s=e.get(["label","position"]),l=e.get("orient"),u=function(t,e){return na(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(e,n),c={horizontal:"center",vertical:(i=null==s||"auto"===s?"horizontal"===l?u.y+u.height/2<n.getHeight()/2?"-":"+":u.x+u.width/2<n.getWidth()/2?"+":"-":t(s)?{horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[l][s]:s)>=0||"+"===i?"left":"right"},d={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},h={horizontal:0,vertical:lL/2},p="vertical"===l?u.height:u.width,f=e.getModel("controlStyle"),g=f.get("show",!0),y=g?f.get("itemSize"):0,m=g?f.get("itemGap"):0,v=y+m,x=e.get(["label","rotate"])||0;x=x*lL/180;var _=f.get("position",!0),b=g&&f.get("showPlayBtn",!0),S=g&&f.get("showPrevBtn",!0),w=g&&f.get("showNextBtn",!0),M=0,I=p;"left"===_||"bottom"===_?(b&&(o=[0,0],M+=v),S&&(r=[M,0],M+=v),w&&(a=[I-y,0],I-=v)):(b&&(o=[I-y,0],I-=v),S&&(r=[0,0],M+=v),w&&(a=[I-y,0],I-=v));var D=[M,I];return e.get("inverse")&&D.reverse(),{viewRect:u,mainLength:p,orient:l,rotation:h[l],labelRotation:x,labelPosOpt:i,labelAlign:e.get(["label","align"])||c[l],labelBaseline:e.get(["label","verticalAlign"])||e.get(["label","baseline"])||d[l],
// Based on mainGroup.
playPosition:o,prevBtnPosition:r,nextBtnPosition:a,axisExtent:D,controlSize:y,controlGap:m}},n.prototype._position=function(e,n){var i=this._mainGroup,o=this._labelGroup,r=e.viewRect;if("vertical"===e.orient){var a=Jt(),s=r.x,l=r.y+r.height;ee(a,a,[-s,-l]),Wt(a,a,-lL/2),ee(a,a,[s,l]),(r=r.clone()).applyTransform(a)}var u=m(r),c=m(i.getBoundingRect()),d=m(o.getBoundingRect()),h=[i.x,i.y],p=[o.x,o.y];p[0]=h[0]=u[0][0];var f,g=e.labelPosOpt;null==g||t(g)?(v(h,c,u,1,f="+"===g?0:1),v(p,d,u,1,1-f)):(v(h,c,u,1,f=g>=0?0:1),p[1]=h[1]+g);function y(t){t.originX=u[0][0]-t.x,t.originY=u[1][0]-t.y}function m(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function v(t,e,n,i,o){t[i]+=n[i][o]-e[i][o]}i.setPosition(h),o.setPosition(p),i.rotation=o.rotation=e.rotation,y(i),y(o)},n.prototype._createAxis=function(t,e){var n=e.getData(),i=e.get("axisType"),o=function(t,e){if(e=e||t.get("type"),e)switch(e){
// Buildin scale
case"category":return new wh({ordinalMeta:t.getCategories(),extent:[Infinity,-Infinity]});case"time":return new Bh({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new Ih}}(e,i);o.getTicks=function(){return n.mapArray(["value"],function(t){return{value:t}})};var r=n.getDataExtent("value");o.setExtent(r[0],r[1]),o.calcNiceTicks();var a=new sL("value",o,t.axisExtent,i);return a.model=e,a},n.prototype._createGroup=function(t){var e=this[t]=new X;return this.group.add(e),e},n.prototype._renderAxisLine=function(t,e,n,i){var o=n.getExtent();if(i.get(["lineStyle","show"])){var r=new W({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:f({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});e.add(r);var a=this._progressLine=new W({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:C({lineCap:"round",lineWidth:r.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});e.add(a)}},n.prototype._renderAxisTick=function(t,e,n,i){var o=this,r=i.getData(),a=n.scale.getTicks();this._tickSymbols=[],s(a,function(t){var a=n.dataToCoord(t.value),s=r.getItemModel(t.value),l=s.getModel("itemStyle"),u=s.getModel(["emphasis","itemStyle"]),c=s.getModel(["progress","itemStyle"]),d={x:a,y:0,onclick:ut(o._changeTimeline,o,t.value)},h=dL(s,l,e,d);h.ensureState("emphasis").style=u.getItemStyle(),h.ensureState("progress").style=c.getItemStyle(),Ni(h);var p=Un(h);s.get("tooltip")?(p.dataIndex=t.value,p.dataModel=i):p.dataIndex=p.dataModel=null,o._tickSymbols.push(h)})},n.prototype._renderAxisLabel=function(t,e,n,i){var o=this;if(n.getLabelModel().get("show")){var r=i.getData(),a=n.getViewLabels();this._tickLabels=[],s(a,function(i){var a=i.tickValue,s=r.getItemModel(a),l=s.getModel("label"),u=s.getModel(["emphasis","label"]),c=s.getModel(["progress","label"]),d=n.dataToCoord(i.tickValue),h=new Q({x:d,y:0,rotation:t.labelRotation-t.rotation,onclick:ut(o._changeTimeline,o,a),silent:!1,style:Po(l,{text:i.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});h.ensureState("emphasis").style=Po(u),h.ensureState("progress").style=Po(c),e.add(h),Ni(h),uL(h).dataIndex=a,o._tickLabels.push(h)})}},n.prototype._renderControl=function(t,e,n,i){var o=t.controlSize,r=t.rotation,a=i.getModel("controlStyle").getItemStyle(),s=i.getModel(["emphasis","controlStyle"]).getItemStyle(),l=i.getPlayState(),u=i.get("inverse",!0);function c(t,n,l,u){if(t){var c=wt(_(i.get(["controlStyle",n+"BtnSize"]),o),o),d=function(t,e,n,i){var o=i.style,r=xo(t.get(["controlStyle",e]),i||{},new U(n[0],n[1],n[2],n[3]));o&&r.setStyle(o);return r}(i,n+"Icon",[0,-c/2,c,c],{x:t[0],y:t[1],originX:o/2,originY:0,rotation:u?-r:0,rectHover:!0,style:a,onclick:l});d.ensureState("emphasis").style=s,e.add(d),Ni(d)}}c(t.nextBtnPosition,"next",ut(this._changeTimeline,this,u?"-":"+")),c(t.prevBtnPosition,"prev",ut(this._changeTimeline,this,u?"+":"-")),c(t.playPosition,l?"stop":"play",ut(this._handlePlayClick,this,!l),!0)},n.prototype._renderCurrentPointer=function(t,e,n,i){var o=i.getData(),r=i.getCurrentIndex(),a=o.getItemModel(r).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=ut(s._handlePointerDrag,s),t.ondragend=ut(s._handlePointerDragend,s),hL(t,s._progressLine,r,n,i,!0)},onUpdate:function(t){hL(t,s._progressLine,r,n,i)}};this._currentPointer=dL(a,a,this._mainGroup,{},this._currentPointer,l)},n.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},n.prototype._handlePointerDrag=function(t,e,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},n.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},n.prototype._pointerChangeTimeline=function(t,e){var n=this._toAxisCoord(t)[0],i=We(this._axis.getExtent().slice());n>i[1]&&(n=i[1]),n<i[0]&&(n=i[0]),this._currentPointer.x=n,this._currentPointer.markRedraw();var o=this._progressLine;o&&(o.shape.x2=n,o.dirty());var r=this._findNearestTick(n),a=this.model;(e||r!==a.getCurrentIndex()&&a.get("realtime"))&&this._changeTimeline(r)},n.prototype._doPlayStop=function(){var t=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var e=t.model;t._changeTimeline(e.getCurrentIndex()+(e.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},n.prototype._toAxisCoord=function(t){return fo(t,this._mainGroup.getLocalTransform(),!0)},n.prototype._findNearestTick=function(t){var e,n=this.model.getData(),i=Infinity,o=this._axis;return n.each(["value"],function(n,r){var a=o.dataToCoord(n),s=Math.abs(a-t);s<i&&(i=s,e=r)}),e},n.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},n.prototype._changeTimeline=function(t){var e=this.model.getCurrentIndex();"+"===t?t=e+1:"-"===t&&(t=e-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})},n.prototype._updateTicksStatus=function(){var t=this.model.getCurrentIndex(),e=this._tickSymbols,n=this._tickLabels;if(e)for(var i=0;i<e.length;i++)e&&e[i]&&e[i].toggleState("progress",i<t);if(n)for(i=0;i<n.length;i++)n&&n[i]&&n[i].toggleState("progress",uL(n[i]).dataIndex<=t)},n.type="timeline.slider",n}(aL);function dL(t,e,n,i,o,r){var a=e.get("color");o?(o.setColor(a),n.add(o),r&&r.onUpdate(o)):((o=gc(t.get("symbol"),-1,-1,2,2,a)).setStyle("strokeNoScale",!0),n.add(o),r&&r.onCreate(o));var s=e.getItemStyle(["color"]);o.setStyle(s),i=et({rectHover:!0,z2:100},i,!0);var l=yc(t.get("symbolSize"));i.scaleX=l[0]/2,i.scaleY=l[1]/2;var u=mc(t.get("symbolOffset"),l);u&&(i.x=(i.x||0)+u[0],i.y=(i.y||0)+u[1]);var c=t.get("symbolRotate");return i.rotation=(c||0)*Math.PI/180||0,o.attr(i),o.updateTransform(),o}function hL(t,e,n,i,o,r){if(!t.dragging){var a=o.getModel("checkpointStyle"),s=i.dataToCoord(o.getData().get("value",n));if(r||!a.get("animation",!0))t.attr({x:s,y:0}),e&&e.attr({shape:{x2:s}});else{var l={duration:a.get("animationDuration",!0),easing:a.get("animationEasing",!0)};t.stopAnimation(null,!0),t.animateTo({x:s,y:0},l),e&&e.animateTo({shape:{x2:s}},l)}}}function pL(t){var e=t&&t.timeline;o(e)||(e=e?[e]:[]),s(e,function(t){t&&function(t){var e=t.type,n={number:"value",time:"time"};n[e]&&(t.axisType=n[e],delete t.type);if(fL(t),gL(t,"controlPosition")){var i=t.controlStyle||(t.controlStyle={});gL(i,"position")||(i.position=t.controlPosition),"none"!==i.position||gL(i,"show")||(i.show=!1,delete i.position),delete t.controlPosition}s(t.data||[],function(t){r(t)&&!o(t)&&(!gL(t,"value")&&gL(t,"name")&&(t.value=t.name),fL(t))})}(t)})}function fL(t){var e=t.itemStyle||(t.itemStyle={}),n=e.emphasis||(e.emphasis={}),i=t.label||t.label||{},o=i.normal||(i.normal={}),r={normal:1,emphasis:1};s(i,function(t,e){r[e]||gL(o,e)||(o[e]=t)}),n.label&&!gL(i,"emphasis")&&(i.emphasis=n.label,delete n.label)}function gL(t,e){return t.hasOwnProperty(e)}function yL(t,e){if(!t)return!1;for(var n=o(t)?t:[t],i=0;i<n.length;i++)if(n[i]&&n[i][e])return!0;return!1}function mL(t){hn(t,"label",["show"])}var vL=wn(),xL=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.createdBySelf=!1,n}return h(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),this._mergeOption(t,n,!1,!0)},e.prototype.isAnimationEnabled=function(){if(d.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},e.prototype.mergeOption=function(t,e){this._mergeOption(t,e,!1,!1)},e.prototype._mergeOption=function(t,e,n,i){var o=this.mainType;n||e.eachSeries(function(t){var n=t.get(this.mainType,!0),r=vL(t)[o];n&&n.data?(r?r._mergeOption(n,e,!0):(i&&mL(n),s(n.data,function(t){t instanceof Array?(mL(t[0]),mL(t[1])):mL(t)}),r=this.createMarkerModelFromSeries(n,this,e),f(r,{mainType:this.mainType,
// Use the same series index and name
seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),r.__hostSeries=t),vL(t)[o]=r):vL(t)[o]=null},this)},e.prototype.formatTooltip=function(t,e,n){var i=this.getData(),o=this.getRawValue(t),r=i.getName(t);return Pl("section",{header:this.name,blocks:[Pl("nameValue",{name:r,value:o,noName:!r,noValue:null==o})]})},e.prototype.getData=function(){return this._data},e.prototype.setData=function(t){this._data=t},e.prototype.getDataParams=function(t,e){var n=Us.prototype.getDataParams.call(this,t,e),i=this.__hostSeries;return i&&(n.seriesId=i.id,n.seriesName=i.name,n.seriesType=i.subType),n},e.getMarkerModelFromSeries=function(t,e){return vL(t)[e]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e}(ua);it(xL,Us.prototype);var _L=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markPoint",e.defaultOption={
// zlevel: 0,
z:5,symbol:"pin",symbolSize:50,
// symbolRotate: 0,
// symbolOffset: [0, 0]
tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},e}(xL);function bL(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function SL(t,e,n,i,o,r){var a=[],s=lh(e,i
/* , otherDataDim */)?e.getCalculationInfo("stackResultDimension"):i,l=CL(e,s,t),u=e.indicesOfNearest(s,l)[0];a[o]=e.get(n,u),a[r]=e.get(s,u);var c=e.get(i,u),d=He(e.get(i,u));return(d=Math.min(d,20))>=0&&(a[r]=+a[r].toFixed(d)),[a,c]}var wL={min:at(SL,"min"),max:at(SL,"max"),average:at(SL,"average"),median:at(SL,"median")};function ML(t,e){if(e){var n=t.getData(),i=t.coordinateSystem,r=i&&i.dimensions;if(!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!o(e.coord)&&o(r)){var a=IL(e,n,i,t);if((e=nt(e)).type&&wL[e.type]&&a.baseAxis&&a.valueAxis){var s=l(r,a.baseAxis.dim),u=l(r,a.valueAxis.dim),c=wL[e.type](n,a.baseDataDim,a.valueDataDim,s,u);e.coord=c[0],e.value=c[1]}else e.coord=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis]}if(null!=e.coord&&o(r))for(var d=e.coord,h=0;h<2;h++)wL[d[h]]&&(d[h]=CL(n,n.mapDimension(r[h]),d[h]));else e.coord=[];return e}}function IL(t,e,n,i){var o={};return null!=t.valueIndex||null!=t.valueDim?(o.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,o.valueAxis=n.getAxis(function(t,e){var n=t.getData().getDimensionInfo(e);return n&&n.coordDim}(i,o.valueDataDim)),o.baseAxis=n.getOtherAxis(o.valueAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim)):(o.baseAxis=i.getBaseAxis(),o.valueAxis=n.getOtherAxis(o.baseAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim),o.valueDataDim=e.mapDimension(o.valueAxis.dim)),o}function DL(t,e){return!(t&&t.containData&&e.coord&&!bL(e))||t.containData(e.coord)}function TL(t,e){return t?function(t,n,i,o){return Ks(o<2?t.coord&&t.coord[o]:t.value,e[o])}:function(t,n,i,o){return Ks(t.value,e[o])}}function CL(t,e,n){if("average"===n){var i=0,o=0;return t.each(e,function(t,e){isNaN(t)||(i+=t,o++)}),i/o}return"median"===n?t.getMedian(e):t.getDataExtent(e)["max"===n?1:0]}var AL=wn(),LL=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.init=function(){this.markerGroupMap=a()},e.prototype.render=function(t,e,n){var i=this,o=this.markerGroupMap;o.each(function(t){AL(t).keep=!1}),e.eachSeries(function(t){var o=xL.getMarkerModelFromSeries(t,i.type);o&&i.renderSeries(t,o,e,n)}),o.each(function(t){!AL(t).keep&&i.group.remove(t.group)})},e.prototype.markKeep=function(t){AL(t).keep=!0},e.prototype.toggleBlurSeries=function(t,e){var n=this;s(t,function(t){var i=xL.getMarkerModelFromSeries(t,n.type);i&&i.getData().eachItemGraphicEl(function(t){t&&(e?Si(t):wi(t))})})},e.type="marker",e}(nu);function kL(t,e,n){var i=e.coordinateSystem;t.each(function(o){var r,a=t.getItemModel(o),s=Ge(a.get("x"),n.getWidth()),l=Ge(a.get("y"),n.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)r=e.getMarkerPosition(t.getValues(t.dimensions,o));else if(i){var u=t.get(i.dimensions[0],o),c=t.get(i.dimensions[1],o);r=i.dataToPoint([u,c])}}else r=[s,l];isNaN(s)||(r[0]=s),isNaN(l)||(r[1]=l),t.setItemLayout(o,r)})}var PL=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries(function(t){var e=xL.getMarkerModelFromSeries(t,"markPoint");e&&(kL(e.getData(),t,n),this.markerGroupMap.get(t.id).updateLayout())},this)},e.prototype.renderSeries=function(t,e,i,o){var r=t.coordinateSystem,a=t.id,s=t.getData(),l=this.markerGroupMap,u=l.get(a)||l.set(a,new zf),c=function(t,e,i){var o;o=t?n(t&&t.dimensions,function(t){var n=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return f(f({},n),{name:t,
// DON'T use ordinalMeta to parse and collect ordinal.
ordinalMeta:null})}):[{name:"value",type:"float"}];var r=new eh(o,i),a=n(i.get("data"),at(ML,e));t&&(a=lt(a,at(DL,t)));var s=TL(!!t,o);return r.initData(a,null,s),r}(r,t,e);e.setData(c),kL(e.getData(),t,o),c.each(function(t){var n=c.getItemModel(t),i=n.getShallow("symbol"),o=n.getShallow("symbolSize"),r=n.getShallow("symbolRotate"),a=n.getShallow("symbolOffset"),l=n.getShallow("symbolKeepAspect");if(g(i)||g(o)||g(r)||g(a)){var u=e.getRawValue(t),d=e.getDataParams(t);g(i)&&(i=i(u,d)),g(o)&&(o=o(u,d)),g(r)&&(r=r(u,d)),g(a)&&(a=a(u,d))}var h=n.getModel("itemStyle").getItemStyle(),p=nc(s,"color");h.fill||(h.fill=p),c.setItemVisual(t,{symbol:i,symbolSize:o,symbolRotate:r,symbolOffset:a,symbolKeepAspect:l,style:h})}),u.updateData(c),this.group.add(u.group),c.eachItemGraphicEl(function(t){t.traverse(function(t){Un(t).dataModel=e})}),this.markKeep(u),u.group.silent=e.get("silent")||t.get("silent")},e.type="markPoint",e}(LL);var NL=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markLine",e.defaultOption={
// zlevel: 0,
z:5,symbol:["circle","arrow"],symbolSize:[8,16],
// symbolRotate: 0,
symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(xL),OL=wn(),RL=function(t,e,n,i){var r,a=t.getData();if(o(i))r=i;else{var s=i.type;if("min"===s||"max"===s||"average"===s||"median"===s||null!=i.xAxis||null!=i.yAxis){var l=void 0,c=void 0;if(null!=i.yAxis||null!=i.xAxis)l=e.getAxis(null!=i.yAxis?"y":"x"),c=Ft(i.yAxis,i.xAxis);else{var d=IL(i,a,e,t);l=d.valueAxis,c=CL(a,uh(a,d.valueDataDim),s)}var h="x"===l.dim?0:1,p=1-h,g=nt(i),y={coord:[]};g.type=null,g.coord=[],g.coord[p]=-Infinity,y.coord[p]=Infinity;var m=n.get("precision");m>=0&&u(c)&&(c=+c.toFixed(Math.min(m,20))),g.coord[h]=y.coord[h]=c,r=[g,y,{type:s,valueIndex:i.valueIndex,
// Force to use the value of calculated value.
value:c}]}else r=[]}var v=[ML(t,r[0]),ML(t,r[1]),f({},r[2])];return v[2].type=v[2].type||null,et(v[2],v[0]),et(v[2],v[1]),v};function EL(t){return!isNaN(t)&&!isFinite(t)}function VL(t,e,n,i){var o=1-t,r=i.dimensions[t];return EL(e[o])&&EL(n[o])&&e[t]===n[t]&&i.getAxis(r).containData(e[t])}function zL(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&(VL(1,n,i,t)||VL(0,n,i,t)))return!0}return DL(t,e[0])&&DL(t,e[1])}function BL(t,e,n,i,o){var r,a=i.coordinateSystem,s=t.getItemModel(e),l=Ge(s.get("x"),o.getWidth()),u=Ge(s.get("y"),o.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)r=i.getMarkerPosition(t.getValues(t.dimensions,e));else{var c=a.dimensions,d=t.get(c[0],e),h=t.get(c[1],e);r=a.dataToPoint([d,h])}if($f(a,"cartesian2d")){var p=a.getAxis("x"),f=a.getAxis("y");c=a.dimensions;EL(t.get(c[0],e))?r[0]=p.toGlobalCoord(p.getExtent()[n?0:1]):EL(t.get(c[1],e))&&(r[1]=f.toGlobalCoord(f.getExtent()[n?0:1]))}isNaN(l)||(r[0]=l),isNaN(u)||(r[1]=u)}else r=[l,u];t.setItemLayout(e,r)}var GL=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries(function(t){var e=xL.getMarkerModelFromSeries(t,"markLine");if(e){var i=e.getData(),o=OL(e).from,r=OL(e).to;o.each(function(e){BL(o,e,!0,t,n),BL(r,e,!1,t,n)}),i.each(function(t){i.setItemLayout(t,[o.getItemLayout(t),r.getItemLayout(t)])}),this.markerGroupMap.get(t.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,e,i,r){var a=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new U_);this.group.add(c.group);var d=function(t,e,i){var o;o=t?n(t&&t.dimensions,function(t){var n=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return f(f({},n),{name:t,
// DON'T use ordinalMeta to parse and collect ordinal.
ordinalMeta:null})}):[{name:"value",type:"float"}];var r=new eh(o,i),a=new eh(o,i),s=new eh([],i),l=n(i.get("data"),at(RL,e,t,i));t&&(l=lt(l,at(zL,t)));var u=TL(!!t,o);return r.initData(n(l,function(t){return t[0]}),null,u),a.initData(n(l,function(t){return t[1]}),null,u),s.initData(n(l,function(t){return t[2]})),s.hasItemOption=!0,{from:r,to:a,line:s}}(a,t,e),h=d.from,p=d.to,g=d.line;OL(e).from=h,OL(e).to=p,e.setData(g);var y=e.get("symbol"),m=e.get("symbolSize"),v=e.get("symbolRotate"),x=e.get("symbolOffset");function b(e,n,i){var o=e.getItemModel(n);BL(e,n,i,t,r);var a=o.getModel("itemStyle").getItemStyle();null==a.fill&&(a.fill=nc(l,"color")),e.setItemVisual(n,{symbolKeepAspect:o.get("symbolKeepAspect"),
// `0` should be considered as a valid value, so use `retrieve2` instead of `||`
symbolOffset:_(o.get("symbolOffset",!0),x[i?0:1]),symbolRotate:_(o.get("symbolRotate",!0),v[i?0:1]),
// TODO: when 2d array is supported, it should ignore parent
symbolSize:_(o.get("symbolSize"),m[i?0:1]),symbol:_(o.get("symbol",!0),y[i?0:1]),style:a})}o(y)||(y=[y,y]),o(m)||(m=[m,m]),o(v)||(v=[v,v]),o(x)||(x=[x,x]),d.from.each(function(t){b(h,t,!0),b(p,t,!1)}),g.each(function(t){var e=g.getItemModel(t).getModel("lineStyle").getLineStyle();g.setItemLayout(t,[h.getItemLayout(t),p.getItemLayout(t)]),null==e.stroke&&(e.stroke=h.getItemVisual(t,"style").fill),g.setItemVisual(t,{fromSymbolKeepAspect:h.getItemVisual(t,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(t,"symbolOffset"),fromSymbolRotate:h.getItemVisual(t,"symbolRotate"),fromSymbolSize:h.getItemVisual(t,"symbolSize"),fromSymbol:h.getItemVisual(t,"symbol"),toSymbolKeepAspect:p.getItemVisual(t,"symbolKeepAspect"),toSymbolOffset:p.getItemVisual(t,"symbolOffset"),toSymbolRotate:p.getItemVisual(t,"symbolRotate"),toSymbolSize:p.getItemVisual(t,"symbolSize"),toSymbol:p.getItemVisual(t,"symbol"),style:e})}),c.updateData(g),d.line.eachItemGraphicEl(function(t){Un(t).dataModel=e,t.traverse(function(t){Un(t).dataModel=e})}),this.markKeep(c),c.group.silent=e.get("silent")||t.get("silent")},e.type="markLine",e}(LL);var FL=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markArea",e.defaultOption={
// zlevel: 0,
// PENDING
z:1,tooltip:{trigger:"item"},
// markArea should fixed on the coordinate system
animation:!1,label:{show:!0,position:"top"},itemStyle:{
// color and borderColor default to use color from series
// color: 'auto'
// borderColor: 'auto'
borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(xL),WL=wn(),HL=function(t,e,n,i){var o=i[0],r=i[1];if(o&&r){var a=ML(t,o),s=ML(t,r),l=a.coord,u=s.coord;l[0]=Ft(l[0],-Infinity),l[1]=Ft(l[1],-Infinity),u[0]=Ft(u[0],Infinity),u[1]=Ft(u[1],Infinity);var c=Qt([{},a,s]);return c.coord=[a.coord,s.coord],c.x0=a.x,c.y0=a.y,c.x1=s.x,c.y1=s.y,c}};function YL(t){return!isNaN(t)&&!isFinite(t)}function UL(t,e,n,i){var o=1-t;return YL(e[o])&&YL(n[o])}function ZL(t,e){var n=e.coord[0],i=e.coord[1],o={coord:n,x:e.x0,y:e.y0},r={coord:i,x:e.x1,y:e.y1};return $f(t,"cartesian2d")?!(!n||!i||!UL(1,n,i)&&!UL(0,n,i))||function(t,e,n){return!(t&&t.containZone&&e.coord&&n.coord&&!bL(e)&&!bL(n))||t.containZone(e.coord,n.coord)}(t,o,r):DL(t,o)||DL(t,r)}function XL(t,e,n,i,o){var r,a=i.coordinateSystem,s=t.getItemModel(e),l=Ge(s.get(n[0]),o.getWidth()),u=Ge(s.get(n[1]),o.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition){var c=t.getValues(["x0","y0"],e),d=t.getValues(["x1","y1"],e),h=a.clampData(c),p=a.clampData(d),f=[];"x0"===n[0]?f[0]=h[0]>p[0]?d[0]:c[0]:f[0]=h[0]>p[0]?c[0]:d[0],"y0"===n[1]?f[1]=h[1]>p[1]?d[1]:c[1]:f[1]=h[1]>p[1]?c[1]:d[1],r=i.getMarkerPosition(f,n,!0)}else{var g=[v=t.get(n[0],e),x=t.get(n[1],e)];a.clampData&&a.clampData(g,g),r=a.dataToPoint(g,!0)}if($f(a,"cartesian2d")){var y=a.getAxis("x"),m=a.getAxis("y"),v=t.get(n[0],e),x=t.get(n[1],e);YL(v)?r[0]=y.toGlobalCoord(y.getExtent()["x0"===n[0]?0:1]):YL(x)&&(r[1]=m.toGlobalCoord(m.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(r[0]=l),isNaN(u)||(r[1]=u)}else r=[l,u];return r}var jL=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],qL=
/** @class */function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.type,t}return h(i,e),i.prototype.updateTransform=function(t,e,i){e.eachSeries(function(t){var e=xL.getMarkerModelFromSeries(t,"markArea");if(e){var o=e.getData();o.each(function(e){var r=n(jL,function(n){return XL(o,e,n,t,i)});o.setItemLayout(e,r),o.getItemGraphicEl(e).setShape("points",r)})}},this)},i.prototype.renderSeries=function(e,i,o,r){var a=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new X});this.group.add(c.group),this.markKeep(c);var d=function(t,e,i){var o,r,a=["x0","y0","x1","y1"];if(t){var s=n(t&&t.dimensions,function(t){var n=e.getData(),i=n.getDimensionInfo(n.mapDimension(t))||{};return f(f({},i),{name:t,
// DON'T use ordinalMeta to parse and collect ordinal.
ordinalMeta:null})});r=n(a,function(t,e){return{name:t,type:s[e%2].type}}),o=new eh(r,i)}else o=new eh(r=[{name:"value",type:"float"}],i);var l=n(i.get("data"),at(HL,e,t,i));t&&(l=lt(l,at(ZL,t)));var u=t?function(t,e,n,i){return Ks(t.coord[Math.floor(i/2)][i%2],r[i])}:function(t,e,n,i){return Ks(t.value,r[i])};return o.initData(l,null,u),o.hasItemOption=!0,o}(a,e,i);i.setData(d),d.each(function(i){var o=n(jL,function(t){return XL(d,i,t,e,r)}),s=a.getAxis("x").scale,u=a.getAxis("y").scale,c=s.getExtent(),h=u.getExtent(),p=[s.parse(d.get("x0",i)),s.parse(d.get("x1",i))],f=[u.parse(d.get("y0",i)),u.parse(d.get("y1",i))];We(p),We(f);var g=!!(c[0]>p[1]||c[1]<p[0]||h[0]>f[1]||h[1]<f[0]);d.setItemLayout(i,{points:o,allClipped:g});var y=d.getItemModel(i).getModel("itemStyle").getItemStyle(),m=nc(l,"color");y.fill||(y.fill=m,t(y.fill)&&(y.fill=ae(y.fill,.4))),y.stroke||(y.stroke=m),d.setItemVisual(i,"style",y)}),d.diff(WL(c).data).add(function(t){var e=d.getItemLayout(t);if(!e.allClipped){var n=new B({shape:{points:e.points}});d.setItemGraphicEl(t,n),c.group.add(n)}}).update(function(t,e){var n=WL(c).data.getItemGraphicEl(e),o=d.getItemLayout(t);o.allClipped?n&&c.group.remove(n):(n?Zi(n,{shape:{points:o.points}},i,t):n=new B({shape:{points:o.points}}),d.setItemGraphicEl(t,n),c.group.add(n))}).remove(function(t){var e=WL(c).data.getItemGraphicEl(t);c.group.remove(e)}).execute(),d.eachItemGraphicEl(function(e,n){var o=d.getItemModel(n),r=d.getItemVisual(n,"style");e.useStyle(d.getItemVisual(n,"style")),Lo(e,ko(o),{labelFetcher:i,labelDataIndex:n,defaultText:d.getName(n)||"",inheritColor:t(r.fill)?ae(r.fill,1):"#000"}),zi(e,o),Oi(e,null,null,o.get(["emphasis","disabled"])),Un(e).dataModel=i}),WL(c).data=d,c.group.silent=i.get("silent")||e.get("silent")},i.type="markArea",i}(LL);var KL=
/** @class */function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.type,t.layoutMode={type:"box",
// legend.width/height are maxWidth/maxHeight actually,
// whereas real width/height is calculated by its content.
// (Setting {left: 10, right: 10} does not make sense).
// So consider the case:
// `setOption({legend: {left: 10});`
// then `setOption({legend: {right: 10});`
// The previous `left` should be cleared by setting `ignoreSize`.
ignoreSize:!0},t}return h(i,e),i.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{},this._updateSelector(t)},i.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},i.prototype._updateSelector=function(e){var n=e.selector,i=this.ecModel;!0===n&&(n=e.selector=["all","inverse"]),o(n)&&s(n,function(e,o){t(e)&&(e={type:e}),n[o]=et(e,function(t,e){return"all"===e?{type:"all",title:t.getLocaleModel().get(["legend","selector","all"])}:"inverse"===e?{type:"inverse",title:t.getLocaleModel().get(["legend","selector","inverse"])}:void 0}(i,e.type))})},i.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,n=0;n<t.length;n++){var i=t[n].get("name");if(this.isSelected(i)){this.select(i),e=!0;break}}!e&&this.select(t[0].get("name"))}},i.prototype._updateData=function(e){var i=[],o=[];e.eachRawSeries(function(t){var n,r=t.name;if(o.push(r),t.legendVisualProvider){var a=t.legendVisualProvider.getAllNames();e.isSeriesFiltered(t)||(o=o.concat(a)),a.length?i=i.concat(a):n=!0}else n=!0;n&&_n(t)&&i.push(t.name)}),this._availableNames=o;var r=this.get("data")||i,s=a(),l=n(r,function(e){return(t(e)||u(e))&&(e={name:e}),s.get(e.name)?null:(s.set(e.name,!0),new tr(e,this,this.ecModel))},this);this._data=lt(l,function(t){return!!t})},i.prototype.getData=function(){return this._data},i.prototype.select=function(t){var e=this.option.selected;if("single"===this.get("selectedMode")){var n=this._data;s(n,function(t){e[t.get("name")]=!1})}e[t]=!0},i.prototype.unSelect=function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},i.prototype.toggleSelected=function(t){var e=this.option.selected;e.hasOwnProperty(t)||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},i.prototype.allSelect=function(){var t=this._data,e=this.option.selected;s(t,function(t){e[t.get("name",!0)]=!0})},i.prototype.inverseSelect=function(){var t=this._data,e=this.option.selected;s(t,function(t){var n=t.get("name",!0);e.hasOwnProperty(n)||(e[n]=!0),e[n]=!e[n]})},i.prototype.isSelected=function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&l(this._availableNames,t)>=0},i.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},i.type="legend.plain",i.dependencies=["series"],i.defaultOption={
// zlevel: 0,
z:4,show:!0,orient:"horizontal",left:"center",
// right: 'center',
top:0,
// bottom: null,
align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},i}(ua),JL=at,$L=s,QL=X,tk=
/** @class */function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t.newlineDisabled=!1,t}return h(n,e),n.prototype.init=function(){this.group.add(this._contentGroup=new QL),this.group.add(this._selectorGroup=new QL),this._isFirstRender=!0},n.prototype.getContentGroup=function(){return this._contentGroup},n.prototype.getSelectorGroup=function(){return this._selectorGroup},n.prototype.render=function(t,e,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var o=t.get("align"),r=t.get("orient");o&&"auto"!==o||(o="right"===t.get("left")&&"vertical"===r?"right":"left");var a=t.get("selector",!0),s=t.get("selectorPosition",!0);!a||s&&"auto"!==s||(s="horizontal"===r?"end":"start"),this.renderInner(o,t,e,n,a,r,s);var l=t.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},c=t.get("padding"),d=na(l,u,c),h=this.layoutInner(t,o,d,i,a,s),p=na(C({width:h.width,height:h.height},l),u,c);this.group.x=p.x-h.x,this.group.y=p.y-h.y,this.group.markRedraw(),this.group.add(this._backgroundEl=CC(h,t))}},n.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},n.prototype.renderInner=function(t,e,n,i,o,r,s){var l=this.getContentGroup(),u=a(),c=e.get("selectedMode"),d=[];n.eachRawSeries(function(t){!t.get("legendHoverLink")&&d.push(t.id)}),$L(e.getData(),function(o,r){var a=o.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var s=new QL;return s.newline=!0,void l.add(s)}var h=n.getSeriesByName(a)[0];if(!u.get(a))if(h){var p=h.getData(),g=p.getVisual("legendLineStyle")||{},y=p.getVisual("legendIcon"),m=p.getVisual("style"),v=this._createItem(h,a,r,o,e,t,g,m,y,c,i);v.on("click",JL(ek,a,null,i,d)).on("mouseover",JL(ik,h.name,null,i,d)).on("mouseout",JL(ok,h.name,null,i,d)),n.ssr&&v.eachChild(function(t){var e=Un(t);e.seriesIndex=h.seriesIndex,e.dataIndex=r,e.ssrType="legend"}),u.set(a,!0)}else n.eachRawSeries(function(s){if(!u.get(a)&&s.legendVisualProvider){var l=s.legendVisualProvider;if(!l.containName(a))return;var h=l.indexOfName(a),p=l.getItemVisual(h,"style"),g=l.getItemVisual(h,"legendIcon"),y=ie(p.fill);y&&0===y[3]&&(y[3]=.2,p=f(f({},p),{fill:oe(y,"rgba")}));var m=this._createItem(s,a,r,o,e,t,{},p,g,c,i);m.on("click",JL(ek,null,a,i,d)).on("mouseover",JL(ik,null,a,i,d)).on("mouseout",JL(ok,null,a,i,d)),n.ssr&&m.eachChild(function(t){var e=Un(t);e.seriesIndex=s.seriesIndex,e.dataIndex=r,e.ssrType="legend"}),u.set(a,!0)}},this)},this),o&&this._createSelector(o,e,i,r,s)},n.prototype._createSelector=function(t,e,n,i,o){var r=this.getSelectorGroup();$L(t,function(t){var i=t.type,o=new Q({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===i?"legendAllSelect":"legendInverseSelect",legendId:e.id})}});r.add(o),Lo(o,{normal:e.getModel("selectorLabel"),emphasis:e.getModel(["emphasis","selectorLabel"])},{defaultText:t.title}),Ni(o)})},n.prototype._createItem=function(e,n,i,o,r,a,s,l,u,c,d){var h=e.visualDrawType,p=r.get("itemWidth"),f=r.get("itemHeight"),y=r.isSelected(n),m=o.get("symbolRotate"),v=o.get("symbolKeepAspect"),x=o.get("icon"),_=function(t,e,n,i,o,r,a){function s(t,e){"auto"===t.lineWidth&&(t.lineWidth=e.lineWidth>0?2:0),$L(t,function(n,i){"inherit"===t[i]&&(t[i]=e[i])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),c=0===t.lastIndexOf("empty",0)?"fill":"stroke",d=l.getShallow("decal");u.decal=d&&"inherit"!==d?bc(d,a):i.decal,"inherit"===u.fill&&(u.fill=i[o]);"inherit"===u.stroke&&(u.stroke=i[c]);"inherit"===u.opacity&&(u.opacity=("fill"===o?i:n).opacity);s(u,i);var h=e.getModel("lineStyle"),p=h.getLineStyle();if(s(p,n),"auto"===u.fill&&(u.fill=i.fill),"auto"===u.stroke&&(u.stroke=i.fill),"auto"===p.stroke&&(p.stroke=i.fill),!r){var f=e.get("inactiveBorderWidth"),g=u[c];u.lineWidth="auto"===f?i.lineWidth>0&&g?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),p.stroke=h.get("inactiveColor"),p.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:p}}(u=x||u||"roundRect",o,s,l,h,y,d),b=new QL,S=o.getModel("textStyle");if(!g(e.getLegendIcon)||x&&"inherit"!==x){var w="inherit"===x&&e.getData().getVisual("symbol")?"inherit"===m?e.getData().getVisual("symbolRotate"):m:0;b.add(function(t){var e=t.icon||"roundRect",n=gc(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);n.setStyle(t.itemStyle),n.rotation=(t.iconRotate||0)*Math.PI/180,n.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2);return n}({itemWidth:p,itemHeight:f,icon:u,iconRotate:w,itemStyle:_.itemStyle,symbolKeepAspect:v}))}else b.add(e.getLegendIcon({itemWidth:p,itemHeight:f,icon:u,iconRotate:m,itemStyle:_.itemStyle,lineStyle:_.lineStyle,symbolKeepAspect:v}));var M="left"===a?p+5:-5,I=a,D=r.get("formatter"),T=n;t(D)&&D?T=D.replace("{name}",null!=n?n:""):g(D)&&(T=D(n));var C=y?S.getTextColor():o.get("inactiveColor");b.add(new Q({style:Po(S,{text:T,x:M,y:f/2,fill:C,align:I,verticalAlign:"middle"},{inheritColor:C})}));var A=new F({shape:b.getBoundingRect(),style:{
// Cannot use 'invisible' because SVG SSR will miss the node
fill:"transparent"}}),L=o.getModel("tooltip");return L.get("show")&&wo({el:A,componentModel:r,itemName:n,itemTooltipOption:L.option}),b.add(A),b.eachChild(function(t){t.silent=!0}),A.silent=!c,this.getContentGroup().add(b),Ni(b),b.__legendDataIndex=i,b},n.prototype.layoutInner=function(t,e,n,i,o,r){var a=this.getContentGroup(),s=this.getSelectorGroup();ea(t.get("orient"),a,t.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),o){ea(
// Buttons in selectorGroup always layout horizontally
"horizontal",s,t.get("selectorItemGap",!0));var c=s.getBoundingRect(),d=[-c.x,-c.y],h=t.get("selectorButtonGap",!0),p=t.getOrient().index,f=0===p?"width":"height",g=0===p?"height":"width",y=0===p?"y":"x";"end"===r?d[p]+=l[f]+h:u[p]+=c[f]+h,d[1-p]+=l[g]/2-c[g]/2,s.x=d[0],s.y=d[1],a.x=u[0],a.y=u[1];var m={x:0,y:0};return m[f]=l[f]+h+c[f],m[g]=Math.max(l[g],c[g]),m[y]=Math.min(0,c[y]+d[1-p]),m}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},n.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},n.type="legend.plain",n}(nu);function ek(t,e,n,i){ok(t,e,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),ik(t,e,n,i)}function nk(t){for(var e,n=t.getZr().storage.getDisplayList(),i=0,o=n.length;i<o&&!(e=n[i].states.emphasis);)i++;return e&&e.hoverLayer}function ik(t,e,n,i){nk(n)||n.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:i})}function ok(t,e,n,i){nk(n)||n.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:i})}function rk(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(t){for(var n=0;n<e.length;n++)if(!e[n].isSelected(t.name))return!1;return!0})}function ak(t,e,n){var i="allSelect"===t||"inverseSelect"===t,o={},r=[];n.eachComponent({mainType:"legend",query:e},function(n){i?n[t]():n[t](e.name),sk(n,o),r.push(n.componentIndex)});var a={};return n.eachComponent("legend",function(t){s(o,function(e,n){t[e?"select":"unSelect"](n)}),sk(t,a)}),i?{selected:a,
// return legendIndex array to tell the developers which legends are allSelect / inverseSelect
legendIndex:r}:{name:e.name,selected:a}}function sk(t,e){var n=e||{};return s(t.getData(),function(e){var i=e.get("name");if("\n"!==i&&""!==i){var o=t.isSelected(i);k(n,i)?n[i]=n[i]&&o:n[i]=o}}),n}function lk(t){t.registerComponentModel(KL),t.registerComponentView(tk),t.registerProcessor(t.PRIORITY.PROCESSOR.SERIES_FILTER,rk),t.registerSubTypeDefaulter("legend",function(){return"plain"}),function(t){t.registerAction("legendToggleSelect","legendselectchanged",at(ak,"toggleSelected")),t.registerAction("legendAllSelect","legendselectall",at(ak,"allSelect")),t.registerAction("legendInverseSelect","legendinverseselect",at(ak,"inverseSelect")),t.registerAction("legendSelect","legendselected",at(ak,"select")),t.registerAction("legendUnSelect","legendunselected",at(ak,"unSelect"))}(t)}var uk=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.setScrollDataIndex=function(t){this.option.scrollDataIndex=t},e.prototype.init=function(e,n,i){var o=aa(e);t.prototype.init.call(this,e,n,i),ck(this,e,o)},e.prototype.mergeOption=function(e,n){t.prototype.mergeOption.call(this,e,n),ck(this,this.option,e)},e.type="legend.scroll",e.defaultOption=ir(KL.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),e}(KL);function ck(t,e,n){var i=[1,1];i[t.getOrient().index]=0,ra(e,n,{type:"box",ignoreSize:!!i})}var dk=X,hk=["width","height"],pk=["x","y"],fk=
/** @class */function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t.newlineDisabled=!0,t._currentIndex=0,t}return h(n,e),n.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new dk),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new dk)},n.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},n.prototype.renderInner=function(t,n,i,r,a,s,l){var u=this;e.prototype.renderInner.call(this,t,n,i,r,a,s,l);var c=this._controllerGroup,d=n.get("pageIconSize",!0),h=o(d)?d:[d,d];f("pagePrev",0);var p=n.getModel("pageTextStyle");function f(t,e){var i=t+"DataIndex",o=xo(n.get("pageIcons",!0)[n.getOrient().name][e],{
// Buttons will be created in each render, so we do not need
// to worry about avoiding using legendModel kept in scope.
onclick:ut(u._pageGo,u,i,n,r)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});o.name=t,c.add(o)}c.add(new Q({name:"pageText",style:{
// Placeholder to calculate a proper layout.
text:"xx/xx",fill:p.getTextColor(),font:p.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),f("pageNext",1)},n.prototype.layoutInner=function(t,e,n,i,o,r){var a=this.getSelectorGroup(),s=t.getOrient().index,l=hk[s],u=pk[s],c=hk[1-s],d=pk[1-s];o&&ea(
// Buttons in selectorGroup always layout horizontally
"horizontal",a,t.get("selectorItemGap",!0));var h=t.get("selectorButtonGap",!0),p=a.getBoundingRect(),f=[-p.x,-p.y],g=nt(n);o&&(g[l]=n[l]-p[l]-h);var y=this._layoutContentAndController(t,i,g,s,l,c,d,u);if(o){if("end"===r)f[s]+=y[l]+h;else{var m=p[l]+h;f[s]-=m,y[u]-=m}y[l]+=p[l]+h,f[1-s]+=y[d]+y[c]/2-p[c]/2,y[c]=Math.max(y[c],p[c]),y[d]=Math.min(y[d],p[d]+f[1-s]),a.x=f[0],a.y=f[1],a.markRedraw()}return y},n.prototype._layoutContentAndController=function(t,e,n,i,o,r,a,s){var l=this.getContentGroup(),u=this._containerGroup,c=this._controllerGroup;ea(t.get("orient"),l,t.get("itemGap"),i?n.width:null,i?null:n.height),ea(
// Buttons in controller are layout always horizontally.
"horizontal",c,t.get("pageButtonItemGap",!0));var d=l.getBoundingRect(),h=c.getBoundingRect(),p=this._showController=d[o]>n[o],f=[-d.x,-d.y];e||(f[i]=l[s]);var g=[0,0],y=[-h.x,-h.y],m=_(t.get("pageButtonGap",!0),t.get("itemGap",!0));p&&("end"===t.get("pageButtonPosition",!0)?y[i]+=n[o]-h[o]:g[i]+=h[o]+m);y[1-i]+=d[r]/2-h[r]/2,l.setPosition(f),u.setPosition(g),c.setPosition(y);var v={x:0,y:0};if(v[o]=p?n[o]:d[o],v[r]=Math.max(d[r],h[r]),v[a]=Math.min(0,h[a]+y[1-i]),u.__rectSize=n[o],p){var x={x:0,y:0};x[o]=Math.max(n[o]-h[o]-m,0),x[r]=v[r],u.setClipPath(new F({shape:x})),u.__rectSize=x[o]}else c.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(t);return null!=b.pageIndex&&Zi(l,{x:b.contentPosition[0],y:b.contentPosition[1]},
// When switch from "show controller" to "not show controller", view should be
// updated immediately without animation, otherwise causes weird effect.
p?t:null),this._updatePageInfoView(t,b),v},n.prototype._pageGo=function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},n.prototype._updatePageInfoView=function(e,n){var i=this._controllerGroup;s(["pagePrev","pageNext"],function(t){var o=null!=n[t+"DataIndex"],r=i.childOfName(t);r&&(r.setStyle("fill",o?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),r.cursor=o?"pointer":"default")});var o=i.childOfName("pageText"),r=e.get("pageFormatter"),a=n.pageIndex,l=null!=a?a+1:0,u=n.pageCount;o&&r&&o.setStyle("text",t(r)?r.replace("{current}",null==l?"":l+"").replace("{total}",null==u?"":u+""):r({current:l,total:u}))},n.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,o=t.getOrient().index,r=hk[o],a=pk[o],s=this._findTargetItemIndex(e),l=n.children(),u=l[s],c=l.length,d=c?1:0,h={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return h;var p=v(u);h.contentPosition[o]=-p.s;for(var f=s+1,g=p,y=p,m=null;f<=c;++f)
// Half of the last item is out of the window.
(!(m=v(l[f]))&&y.e>g.s+i||m&&!x(m,g.s))&&(g=y.i>g.i?y:m)&&(null==h.pageNextDataIndex&&(h.pageNextDataIndex=g.i),++h.pageCount),y=m;for(f=s-1,g=p,y=p,m=null;f>=-1;--f)
// If the the end item does not intersect with the window started
// from the current item, a page can be settled.
(m=v(l[f]))&&x(y,m.s)||!(g.i<y.i)||(y=g,null==h.pagePrevDataIndex&&(h.pagePrevDataIndex=g.i),++h.pageCount,++h.pageIndex),g=m;return h;function v(t){if(t){var e=t.getBoundingRect(),n=e[a]+t[a];return{s:n,e:n+e[r],i:t.__legendDataIndex}}}function x(t,e){return t.e>=e&&t.s<=e+i}},n.prototype._findTargetItemIndex=function(t){return this._showController?(this.getContentGroup().eachChild(function(i,o){var r=i.__legendDataIndex;null==n&&null!=r&&(n=o),r===t&&(e=o)}),null!=e?e:n):0;var e,n},n.type="legend.scroll",n}(tk);function gk(t){_p(lk),t.registerComponentModel(uk),t.registerComponentView(fk),function(t){t.registerAction("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(n)})})}(t)}function yk(t){_p(lk),_p(gk)}var mk=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.type="dataZoom.inside",e.defaultOption=ir(dC.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(dC),vk=wn();function xk(t,e){if(e){t.removeKey(e.model.uid);var n=e.controller;n&&n.dispose()}}function _k(t,e){t.isDisposed()||t.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function bk(t,e,n,i){return t.coordinateSystem.containPoint([n,i])}function Sk(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,function(t,e){var n=vk(e),i=n.coordSysRecordMap||(n.coordSysRecordMap=a());i.each(function(t){t.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(t){var n=uC(t);s(n.infoList,function(n){var o=n.model.uid,r=i.get(o)||i.set(o,function(t,e){var n={model:e,containsPoint:at(bk,e),dispatchAction:at(_k,t),dataZoomInfoMap:null,controller:null},i=n.controller=new Im(t.getZr());return s(["pan","zoom","scrollMove"],function(t){i.on(t,function(e){var i=[];n.dataZoomInfoMap.each(function(o){if(e.isAvailableBehavior(o.model.option)){var r=(o.getRange||{})[t],a=r&&r(o.dzReferCoordSysInfo,n.model.mainType,n.controller,e);!o.model.get("disabled",!0)&&a&&i.push({dataZoomId:o.model.id,start:a[0],end:a[1]})}}),i.length&&n.dispatchAction(i)})}),n}(e,n.model));(r.dataZoomInfoMap||(r.dataZoomInfoMap=a())).set(t.uid,{dzReferCoordSysInfo:n,model:t,getRange:null})})}),i.each(function(t){var e,n=t.controller,o=t.dataZoomInfoMap;if(o){var r=o.keys()[0];null!=r&&(e=o.get(r))}if(e){var a=function(t){var e,n="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;return t.each(function(t){var r=t.model,a=!r.get("disabled",!0)&&(!r.get("zoomLock",!0)||"move");i[n+a]>i[n+e]&&(e=a),o=o&&r.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{
// RoamController will enable all of these functionalities,
// and the final behavior is determined by its event listener
// provided by each inside zoom.
zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o}}}(o);n.enable(a.controlType,a.opt),n.setPointerChecker(t.containsPoint),yu(t,"dispatchAction",e.model.get("throttle",!0),"fixRate")}else xk(i,t)})})}var wk=
/** @class */function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return h(e,t),e.prototype.render=function(e,n,i){t.prototype.render.apply(this,arguments),e.noTarget()?this._clear():(this.range=e.getPercentRange(),function(t,e,n){vk(t).coordSysRecordMap.each(function(t){var i=t.dataZoomInfoMap.get(e.uid);i&&(i.getRange=n)})}(i,e,{pan:ut(Mk.pan,this),zoom:ut(Mk.zoom,this),scrollMove:ut(Mk.scrollMove,this)}))},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){!function(t,e){for(var n=vk(t).coordSysRecordMap,i=n.keys(),o=0;o<i.length;o++){var r=i[o],a=n.get(r),s=a.dataZoomInfoMap;if(s){var l=e.uid;s.get(l)&&(s.removeKey(l),s.keys().length||xk(n,a))}}}(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(fC),Mk={zoom:function(t,e,n,i){var o=this.range,r=o.slice(),a=t.axisModels[0];if(a){var s=Dk[e](null,[i.originX,i.originY],a,n,t),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(r[1]-r[0])+r[0],u=Math.max(1/i.scale,0);r[0]=(r[0]-l)*u+l,r[1]=(r[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return Bb(0,r,[0,100],0,c.minSpan,c.maxSpan),this.range=r,o[0]!==r[0]||o[1]!==r[1]?r:void 0}},pan:Ik(function(t,e,n,i,o,r){var a=Dk[i]([r.oldX,r.oldY],[r.newX,r.newY],e,o,n);return a.signal*(t[1]-t[0])*a.pixel/a.pixelLength}),scrollMove:Ik(function(t,e,n,i,o,r){return Dk[i]([0,0],[r.scrollDelta,r.scrollDelta],e,o,n).signal*(t[1]-t[0])*r.scrollDelta})};function Ik(t){return function(e,n,i,o){var r=this.range,a=r.slice(),s=e.axisModels[0];if(s)return Bb(t(a,s,e,n,i,o),a,[0,100],"all"),this.range=a,r[0]!==a[0]||r[1]!==a[1]?a:void 0}}var Dk={grid:function(t,e,n,i,o){var r=n.axis,a={},s=o.model.coordinateSystem.getRect();return t=t||[0,0],"x"===r.dim?(a.pixel=e[0]-t[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=r.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=r.inverse?-1:1),a},polar:function(t,e,n,i,o){var r=n.axis,a={},s=o.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===n.mainType?(a.pixel=e[0]-t[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=r.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=r.inverse?-1:1),a},singleAxis:function(t,e,n,i,o){var r=n.axis,a=o.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===r.orient?(s.pixel=e[0]-t[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=r.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=r.inverse?-1:1),s}};function Tk(t){bC(t),t.registerComponentModel(mk),t.registerComponentView(wk),Sk(t)}var Ck=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=ir(dC.defaultOption,{show:!0,
// deault value can only be drived in view stage.
right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",
// dataBackgroundColor: '#ddd',
dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},
// Color of selected window.
fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",
// Percent of the slider height
handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(dC),Ak=F,Lk="horizontal",kk="vertical",Pk=["line","bar","candlestick","scatter"],Nk={easing:"cubicOut",duration:100,delay:0},Ok=
/** @class */function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t._displayables={},t}return h(n,e),n.prototype.init=function(t,e){this.api=e,this._onBrush=ut(this._onBrush,this),this._onBrushEnd=ut(this._onBrushEnd,this)},n.prototype.render=function(t,n,i,o){if(e.prototype.render.apply(this,arguments),yu(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),!1!==t.get("show")){if(t.noTarget())return this._clear(),void this.group.removeAll();o&&"dataZoom"===o.type&&o.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},n.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},n.prototype._clear=function(){mu(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},n.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var e=this._displayables.sliderGroup=new X;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},n.prototype._resetLocation=function(){var t=this.dataZoomModel,e=this.api,n=t.get("brushSelect")?7:0,i=this._findCoordRect(),o={width:e.getWidth(),height:e.getHeight()},r=this._orient===Lk?{
// Why using 'right', because right should be used in vertical,
// and it is better to be consistent for dealing with position param merge.
right:o.width-i.x-i.width,top:o.height-30-7-n,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},a=aa(t.option);s(["right","top","width","height"],function(t){"ph"===a[t]&&(a[t]=r[t])});var l=na(a,o);this._location={x:l.x,y:l.y},this._size=[l.width,l.height],this._orient===kk&&this._size.reverse()},n.prototype._positionGroup=function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),r=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;r.attr(n!==Lk||o?n===Lk&&o?{scaleY:a?1:-1,scaleX:-1}:n!==kk||o?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=t.getBoundingRect([r]);t.x=e.x-s.x,t.y=e.y-s.y,t.markRedraw()},n.prototype._getViewExtent=function(){return[0,this._size[0]]},n.prototype._renderBackground=function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect");n.add(new Ak({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new Ak({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:ut(this._onClickPanel,this)}),r=this.api.getZr();i?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",r.on("mousemove",this._onBrush),r.on("mouseup",this._onBrushEnd)):(r.off("mousemove",this._onBrush),r.off("mouseup",this._onBrushEnd)),n.add(o)},n.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],t){var e=this._size,n=this._shadowSize||[],i=t.series,o=i.getRawData(),r=i.getShadowDim&&i.getShadowDim(),a=r&&o.getDimensionInfo(r)?i.getShadowDim():t.otherDim;if(null!=a){var s=this._shadowPolygonPts,l=this._shadowPolylinePts;if(o!==this._shadowData||a!==this._shadowDim||e[0]!==n[0]||e[1]!==n[1]){var u=o.getDataExtent(a),c=.3*(u[1]-u[0]);u=[u[0]-c,u[1]+c];var d,h=[0,e[1]],p=[0,e[0]],f=[[e[0],0],[0,0]],g=[],y=p[1]/(o.count()-1),m=0,v=Math.round(o.count()/e[0]);o.each([a],function(t,e){if(v>0&&e%v)m+=y;else{var n=null==t||isNaN(t)||""===t,i=n?0:Be(t,u,h,!0);n&&!d&&e?(f.push([f[f.length-1][0],0]),g.push([g[g.length-1][0],0])):!n&&d&&(f.push([m,0]),g.push([m,0])),f.push([m,i]),g.push([m,i]),m+=y,d=n}}),s=this._shadowPolygonPts=f,l=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=a,this._shadowSize=[e[0],e[1]];for(var x=this.dataZoomModel,_=0;_<3;_++){var b=S(1===_);this._displayables.sliderGroup.add(b),this._displayables.dataShadowSegs.push(b)}}}function S(t){var e=x.getModel(t?"selectedDataBackground":"dataBackground"),n=new X,i=new B({shape:{points:s},segmentIgnoreThreshold:1,style:e.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),o=new G({shape:{points:l},segmentIgnoreThreshold:1,style:e.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(i),n.add(o),n}},n.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var n,i=this.ecModel;return t.eachTargetAxis(function(o,r){var a=t.getAxisProxy(o,r).getTargetSeriesModels();s(a,function(t){if(!(n||!0!==e&&l(Pk,t.get("type"))<0)){var a,s=i.getComponent(sC(o),r).axis,u={x:"y",y:"x",radius:"angle",angle:"radius"}[o],c=t.coordinateSystem;null!=u&&c.getOtherAxis&&(a=c.getOtherAxis(s).inverse),u=t.getData().mapDimension(u),n={thisAxis:s,series:t,thisDim:o,otherDim:u,otherAxisInverse:a}}},this)},this),n}},n.prototype._renderHandle=function(){var t=this.group,e=this._displayables,n=e.handles=[null,null],i=e.handleLabels=[null,null],o=this._displayables.sliderGroup,r=this._size,a=this.dataZoomModel,l=this.api,u=a.get("borderRadius")||0,c=a.get("brushSelect"),d=e.filler=new Ak({silent:c,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});o.add(d),o.add(new Ak({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:r[0],height:r[1],r:u},style:{
// deprecated option
stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),s([0,1],function(e){var r=a.get("handleIcon");!hc[r]&&r.indexOf("path://")<0&&r.indexOf("image://")<0&&(r="path://"+r);var s=gc(r,-1,0,2,2,null,!0);s.attr({cursor:Rk(this._orient),draggable:!0,drift:ut(this._onDragMove,this,e),ondragend:ut(this._onDragEnd,this),onmouseover:ut(this._showDataInfo,this,!0),onmouseout:ut(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=Ge(u,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),Ni(s);var c=a.get("handleColor");null!=c&&(s.style.fill=c),o.add(n[e]=s);var d=a.getModel("textStyle"),h=(a.get("handleLabel")||{}).show||!1;t.add(i[e]=new Q({silent:!0,invisible:!h,style:Po(d,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:d.getTextColor(),font:d.getFont()}),z2:10}))},this);var h=d;if(c){var p=Ge(a.get("moveHandleSize"),r[1]),f=e.moveHandle=new F({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:r[1]-.5,height:p}}),g=.8*p,y=e.moveHandleIcon=gc(a.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!0);y.silent=!0,y.y=r[1]+p/2-.5,f.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(r[1]/2,Math.max(p,10));(h=e.moveZone=new F({invisible:!0,shape:{y:r[1]-m,height:p+m}})).on("mouseover",function(){l.enterEmphasis(f)}).on("mouseout",function(){l.leaveEmphasis(f)}),o.add(f),o.add(y),o.add(h)}h.attr({draggable:!0,cursor:Rk(this._orient),drift:ut(this._onDragMove,this,"all"),ondragstart:ut(this._showDataInfo,this,!0),ondragend:ut(this._onDragEnd,this),onmouseover:ut(this._showDataInfo,this,!0),onmouseout:ut(this._showDataInfo,this,!1)})},n.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[Be(t[0],[0,100],e,!0),Be(t[1],[0,100],e,!0)]},n.prototype._updateInterval=function(t,e){var n=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),r=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];Bb(e,i,o,n.get("zoomLock")?"all":t,null!=r.minSpan?Be(r.minSpan,a,o,!0):null,null!=r.maxSpan?Be(r.maxSpan,a,o,!0):null);var s=this._range,l=this._range=We([Be(i[0],o,a,!0),Be(i[1],o,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},n.prototype._updateView=function(t){var e=this._displayables,n=this._handleEnds,i=We(n.slice()),o=this._size;s([0,1],function(t){var i=e.handles[t],r=this._handleHeight;i.attr({scaleX:r/2,scaleY:r/2,
// This is a trick, by adding an extra tiny offset to let the default handle's end point align to the drag window.
// NOTE: It may affect some custom shapes a bit. But we prefer to have better result by default.
x:n[t]+(t?-1:1),y:o[1]/2-r/2})},this),e.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var r={x:i[0],width:i[1]-i[0]};e.moveHandle&&(e.moveHandle.setShape(r),e.moveZone.setShape(r),e.moveZone.getBoundingRect(),e.moveHandleIcon&&e.moveHandleIcon.attr("x",r.x+r.width/2));for(var a=e.dataShadowSegs,l=[0,i[0],i[1],o[0]],u=0;u<a.length;u++){var c=a[u],d=c.getClipPath();d||(d=new F,c.setClipPath(d)),d.setShape({x:l[u],y:0,width:l[u+1]-l[u],height:o[1]})}this._updateDataInfo(t)},n.prototype._updateDataInfo=function(t){var e=this.dataZoomModel,n=this._displayables,i=n.handleLabels,o=this._orient,r=["",""];if(e.get("showDetail")){var a=e.findRepresentativeAxisProxy();if(a){var s=a.getAxisModel().axis,l=this._range,u=t?a.calculateDataWindow({start:l[0],end:l[1]}).valueWindow:a.getDataValueWindow();r=[this._formatLabel(u[0],s),this._formatLabel(u[1],s)]}}var c=We(this._handleEnds.slice());function d(t){var e=po(n.handles[t].parent,this.group),a=go(0===t?"right":"left",e),s=this._handleWidth/2+5,l=fo([c[t]+(0===t?-s:s),this._size[1]/2],e);i[t].setStyle({x:l[0],y:l[1],verticalAlign:o===Lk?"middle":a,align:o===Lk?a:"center",text:r[t]})}d.call(this,0),d.call(this,1)},n.prototype._formatLabel=function(e,n){var i=this.dataZoomModel,o=i.get("labelFormatter"),r=i.get("labelPrecision");null!=r&&"auto"!==r||(r=n.getPixelPrecision());var a=null==e||isNaN(e)?"":"category"===n.type||"time"===n.type?n.scale.getLabel({value:Math.round(e)}):e.toFixed(Math.min(r,20));return g(o)?o(e,a):t(o)?o.replace("{value}",a):a},n.prototype._showDataInfo=function(t){var e=(this.dataZoomModel.get("handleLabel")||{}).show||!1,n=this.dataZoomModel.getModel(["emphasis","handleLabel"]).get("show")||!1,i=t||this._dragging?n:e,o=this._displayables,r=o.handleLabels;r[0].attr("invisible",!i),r[1].attr("invisible",!i),o.moveHandle&&this.api[i?"enterEmphasis":"leaveEmphasis"](o.moveHandle,1)},n.prototype._onDragMove=function(t,e,n,i){this._dragging=!0,Ut(i.event);var o=fo([e,n],this._displayables.sliderGroup.getLocalTransform(),!0),r=this._updateInterval(t,o[0]),a=this.dataZoomModel.get("realtime");this._updateView(!a),r&&a&&this._dispatchZoomAction(!0)},n.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction(!1)},n.prototype._onClickPanel=function(t){var e=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(n[0]<0||n[0]>e[0]||n[1]<0||n[1]>e[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,r=this._updateInterval("all",n[0]-o);this._updateView(),r&&this._dispatchZoomAction(!1)}},n.prototype._onBrushStart=function(t){var e=t.offsetX,n=t.offsetY;this._brushStart=new J(e,n),this._brushing=!0,this._brushStartTime=+new Date},n.prototype._onBrushEnd=function(t){if(this._brushing){var e=this._displayables.brushRect;if(this._brushing=!1,e){e.attr("ignore",!0);var n=e.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var i=this._getViewExtent(),o=[0,100];this._range=We([Be(n.x,i,o,!0),Be(n.x+n.width,i,o,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},n.prototype._onBrush=function(t){this._brushing&&(Ut(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},n.prototype._updateBrushRect=function(t,e){var n=this._displayables,i=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new Ak({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var r=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(t,e),l=a.transformCoordToLocal(r.x,r.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),o.setShape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},n.prototype._dispatchZoomAction=function(t){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?Nk:null,start:e[0],end:e[1]})},n.prototype._findCoordRect=function(){var t,e=uC(this.dataZoomModel).infoList;if(!t&&e.length){var n=e[0].model.coordinateSystem;t=n.getRect&&n.getRect()}if(!t){var i=this.api.getWidth(),o=this.api.getHeight();t={x:.2*i,y:.2*o,width:.6*i,height:.6*o}}return t},n.type="dataZoom.slider",n}(fC);function Rk(t){return"vertical"===t?"ns-resize":"ew-resize"}function Ek(t){t.registerComponentModel(Ck),t.registerComponentView(Ok),bC(t)}var Vk=function(t,e,n){var i=nt((zk[t]||{})[e]);return n&&o(i)?i[i.length-1]:i},zk={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},Bk=kx.mapVisual,Gk=kx.eachVisual,Fk=o,Wk=s,Hk=We,Yk=Be,Uk=
/** @class */function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=n.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-Infinity,Infinity],t.targetVisuals={},t.controllerVisuals={},t}return h(n,e),n.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},n.prototype.optionUpdated=function(t,e){var n=this.option;!e&&zA(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},n.prototype.resetVisual=function(t){var e=this.stateList;t=ut(t,this),this.controllerVisuals=VA(this.option.controller,e,t),this.targetVisuals=VA(this.option.target,e,t)},n.prototype.getItemSymbol=function(){return null},n.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries(function(t,n){e.push(n)}):e=dn(t),e},n.prototype.eachTargetSeries=function(t,e){s(this.getTargetSeriesIndices(),function(n){var i=this.ecModel.getSeriesByIndex(n);i&&t.call(e,i)},this)},n.prototype.isTargetSeries=function(t){var e=!1;return this.eachTargetSeries(function(n){n===t&&(e=!0)}),e},n.prototype.formatValueText=function(e,n,i){var r,a=this.option,s=a.precision,l=this.dataBound,u=a.formatter;i=i||["<",">"],o(e)&&(e=e.slice(),r=!0);var c=n?e:r?[d(e[0]),d(e[1])]:d(e);return t(u)?u.replace("{value}",r?c[0]:c).replace("{value2}",r?c[1]:c):g(u)?r?u(e[0],e[1]):u(e):r?e[0]===l[0]?i[0]+" "+c[1]:e[1]===l[1]?i[1]+" "+c[0]:c[0]+" - "+c[1]:c;function d(t){return t===l[0]?"min":t===l[1]?"max":(+t).toFixed(Math.min(s,20))}},n.prototype.resetExtent=function(){var t=this.option,e=Hk([t.min,t.max]);this._dataExtent=e},n.prototype.getDataDimensionIndex=function(t){var e=this.option.dimension;if(null!=e)return t.getDimensionIndex(e);for(var n=t.dimensions,i=n.length-1;i>=0;i--){var o=n[i],r=t.getDimensionInfo(o);if(!r.isCalculationCoord)return r.storeDimIndex}},n.prototype.getExtent=function(){return this._dataExtent.slice()},n.prototype.completeVisualOption=function(){var t=this.ecModel,e=this.option,n={inRange:e.inRange,outOfRange:e.outOfRange},i=e.target||(e.target={}),o=e.controller||(e.controller={});et(i,n),et(o,n);var r=this.isCategory();function a(n){Fk(e.color)&&!n.inRange&&(n.inRange={color:e.color.slice().reverse()}),n.inRange=n.inRange||{color:t.get("gradientColor")}}a.call(this,i),a.call(this,o),function(t,e,n){var i=t[e],o=t[n];i&&!o&&(o=t[n]={},Wk(i,function(t,e){if(kx.isValidType(e)){var n=Vk(e,"inactive",r);null!=n&&(o[e]=n,"color"!==e||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}}))}.call(this,i,"inRange","outOfRange"),function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,n=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,i=this.get("inactiveColor"),o=this.getItemSymbol()||"roundRect";Wk(this.stateList,function(a){var s=this.itemSize,l=t[a];l||(l=t[a]={color:r?i:[i]}),null==l.symbol&&(l.symbol=e&&nt(e)||(r?o:[o])),null==l.symbolSize&&(l.symbolSize=n&&nt(n)||(r?s[0]:[s[0],s[0]])),l.symbol=Bk(l.symbol,function(t){return"none"===t?o:t});var u=l.symbolSize;if(null!=u){var c=-Infinity;Gk(u,function(t){t>c&&(c=t)}),l.symbolSize=Bk(u,function(t){return Yk(t,[0,c],[0,s[0]],!0)})}},this)}.call(this,o)},n.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},n.prototype.isCategory=function(){return!!this.option.categories},n.prototype.setSelected=function(t){},n.prototype.getSelected=function(){return null},n.prototype.getValueState=function(t){return null},n.prototype.getVisualMeta=function(t){return null},n.type="visualMap",n.dependencies=["series"],n.defaultOption={show:!0,
// zlevel: 0,
z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,
// 接受数组分别设定上右下左边距同css
textGap:10,precision:0,textStyle:{color:"#333"}},n}(ua),Zk=[20,140],Xk=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){t.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(null==e[0]||isNaN(e[0]))&&(e[0]=Zk[0]),(null==e[1]||isNaN(e[1]))&&(e[1]=Zk[1])},e.prototype._resetRange=function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):o(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},e.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),s(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=e[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),e=We((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]<t[0]&&(e[0]=t[0]),e[1]<t[0]&&(e[1]=t[0]),e},e.prototype.getValueState=function(t){var e=this.option.range,n=this.getExtent();return(e[0]<=n[0]||e[0]<=t)&&(e[1]>=n[1]||t<=e[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[];return this.eachTargetSeries(function(n){var i=[],o=n.getData();o.each(this.getDataDimensionIndex(o),function(e,n){t[0]<=e&&e<=t[1]&&i.push(n)},this),e.push({seriesId:n.id,dataIndex:i})},this),e},e.prototype.getVisualMeta=function(t){var e=jk(this,"outOfRange",this.getExtent()),n=jk(this,"inRange",this.option.range.slice()),i=[];function o(e,n){i.push({value:e,color:t(e,n)})}for(var r=0,a=0,s=n.length,l=e.length;a<l&&(!n.length||e[a]<=n[0]);a++)e[a]<n[r]&&o(e[a],"outOfRange");for(var u=1;r<s;r++,u=0)u&&i.length&&o(n[r],"outOfRange"),o(n[r],"inRange");for(u=1;a<l;a++)(!n.length||n[n.length-1]<e[a])&&(u&&(i.length&&o(i[i.length-1].value,"outOfRange"),u=0),o(e[a],"outOfRange"));var c=i.length;return{stops:i,outerColors:[c?i[0].color:"transparent",c?i[c-1].color:"transparent"]}},e.type="visualMap.continuous",e.defaultOption=ir(Uk.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),e}(Uk);function jk(t,e,n){if(n[0]===n[1])return n.slice();for(var i=(n[1]-n[0])/200,o=n[0],r=[],a=0;a<=200&&o<n[1];a++)r.push(o),o+=i;return r.push(n[1]),r}var qk=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.autoPositionValues={left:1,right:1,top:1,bottom:1},n}return h(e,t),e.prototype.init=function(t,e){this.ecModel=t,this.api=e},e.prototype.render=function(t,e,n,i){this.visualMapModel=t,!1!==t.get("show")?this.doRender(t,e,n,i):this.group.removeAll()},e.prototype.renderBackground=function(t){var e=this.visualMapModel,n=Yr(e.get("padding")||0),i=t.getBoundingRect();t.add(new F({z2:-1,silent:!0,shape:{x:i.x-n[3],y:i.y-n[0],width:i.width+n[3]+n[1],height:i.height+n[0]+n[2]},style:{fill:e.get("backgroundColor"),stroke:e.get("borderColor"),lineWidth:e.get("borderWidth")}}))},e.prototype.getControllerVisual=function(t,e,n){var i=(n=n||{}).forceState,o=this.visualMapModel,r={};if("color"===e){var a=o.get("contentColor");r.color=a}function l(t){return r[t]}function u(t,e){r[t]=e}var c=o.controllerVisuals[i||o.getValueState(t)],d=kx.prepareVisualTypes(c);return s(d,function(i){var o=c[i];n.convertOpacityToAlpha&&"opacity"===i&&(i="colorAlpha",o=c.__alphaForOpacity),kx.dependsOn(i,e)&&o&&o.applyVisual(t,l,u)}),r[e]},e.prototype.positionGroup=function(t){var e=this.visualMapModel,n=this.api;ia(t,e.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},e.prototype.doRender=function(t,e,n,i){},e.type="visualMap",e}(nu),Kk=[["left","right","width"],["top","bottom","height"]];function Jk(t,e,n){var i=t.option,o=i.align;if(null!=o&&"auto"!==o)return o;for(var r={width:e.getWidth(),height:e.getHeight()},a="horizontal"===i.orient?1:0,s=Kk[a],l=[0,null,10],u={},c=0;c<3;c++)u[Kk[1-a][c]]=l[c],u[s[c]]=2===c?n[0]:i[s[c]];var d=[["x","width",3],["y","height",0]][a],h=na(u,r,i.padding);return s[(h.margin[d[2]]||0)+h[d[0]]+.5*h[d[1]]<.5*r[d[1]]?0:1]}function $k(t,e){return s(t||[],function(t){null!=t.dataIndex&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),t}var Qk=Be,tP=s,eP=Math.min,nP=Math.max,iP=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._shapes={},n._dataInterval=[],n._handleEnds=[],n._hoverLinkDataIndices=[],n}return h(e,t),e.prototype.init=function(e,n){t.prototype.init.call(this,e,n),this._hoverLinkFromSeriesMouseOver=ut(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=ut(this._hideIndicator,this)},e.prototype.doRender=function(t,e,n,i){i&&"selectDataRange"===i.type&&i.from===this.uid||this._buildView()},e.prototype._buildView=function(){this.group.removeAll();var t=this.visualMapModel,e=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(e);var n=t.get("text");this._renderEndsText(e,n,0),this._renderEndsText(e,n,1),this._updateView(!0),this.renderBackground(e),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(e)},e.prototype._renderEndsText=function(t,e,n){if(e){var i=e[1-n];i=null!=i?i+"":"";var o=this.visualMapModel,r=o.get("textGap"),a=o.itemSize,s=this._shapes.mainGroup,l=this._applyTransform([a[0]/2,0===n?-r:a[1]+r],s),u=this._applyTransform(0===n?"bottom":"top",s),c=this._orient,d=this.visualMapModel.textStyleModel;this.group.add(new Q({style:Po(d,{x:l[0],y:l[1],verticalAlign:"horizontal"===c?"middle":u,align:"horizontal"===c?u:"center",text:i})}))}},e.prototype._renderBar=function(t){var e=this.visualMapModel,n=this._shapes,i=e.itemSize,o=this._orient,r=this._useHandle,a=Jk(e,this.api,i),s=n.mainGroup=this._createBarGroup(a),l=new X;s.add(l),l.add(n.outOfRange=oP()),l.add(n.inRange=oP(null,r?aP(this._orient):null,ut(this._dragHandle,this,"all",!1),ut(this._dragHandle,this,"all",!0))),l.setClipPath(new F({shape:{x:0,y:0,width:i[0],height:i[1],r:3}}));var u=e.textStyleModel.getTextRect("国"),c=nP(u.width,u.height);r&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(e,s,0,i,c,o),this._createHandle(e,s,1,i,c,o)),this._createIndicator(e,s,i,c,o),t.add(s)},e.prototype._createHandle=function(t,e,n,i,o,r){var a=ut(this._dragHandle,this,n,!1),s=ut(this._dragHandle,this,n,!0),l=wt(t.get("handleSize"),i[0]),u=gc(t.get("handleIcon"),-l/2,-l/2,l,l,null,!0),c=aP(this._orient);u.attr({cursor:c,draggable:!0,drift:a,ondragend:s,onmousemove:function(t){Ut(t.event)}}),u.x=i[0]/2,u.useStyle(t.getModel("handleStyle").getItemStyle()),u.setStyle({strokeNoScale:!0,strokeFirst:!0}),u.style.lineWidth*=2,u.ensureState("emphasis").style=t.getModel(["emphasis","handleStyle"]).getItemStyle(),Bi(u,!0),e.add(u);var d=this.visualMapModel.textStyleModel,h=new Q({cursor:c,draggable:!0,drift:a,onmousemove:function(t){Ut(t.event)},ondragend:s,style:Po(d,{x:0,y:0,text:""})});h.ensureState("blur").style={opacity:.1},h.stateTransition={duration:200},this.group.add(h);var p=[l,0],f=this._shapes;f.handleThumbs[n]=u,f.handleLabelPoints[n]=p,f.handleLabels[n]=h},e.prototype._createIndicator=function(t,e,n,i,o){var r=wt(t.get("indicatorSize"),n[0]),a=gc(t.get("indicatorIcon"),-r/2,-r/2,r,r,null,!0);a.attr({cursor:"move",invisible:!0,silent:!0,x:n[0]/2});var s=t.getModel("indicatorStyle").getItemStyle();if(a instanceof b){var l=a.style;a.useStyle(f({
// TODO other properties like x, y ?
image:l.image,x:l.x,y:l.y,width:l.width,height:l.height},s))}else a.useStyle(s);e.add(a);var u=this.visualMapModel.textStyleModel,c=new Q({silent:!0,invisible:!0,style:Po(u,{x:0,y:0,text:""})});this.group.add(c);var d=[("horizontal"===o?i/2:6)+n[0]/2,0],h=this._shapes;h.indicator=a,h.indicatorLabel=c,h.indicatorLabelPoint=d,this._firstShowIndicator=!0},e.prototype._dragHandle=function(t,e,n,i){if(this._useHandle){if(this._dragging=!e,!e){var o=this._applyTransform([n,i],this._shapes.mainGroup,!0);this._updateInterval(t,o[1]),this._hideIndicator(),this._updateView()}e===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),e?!this._hovering&&this._clearHoverLinkToSeries():rP(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},e.prototype._resetInterval=function(){var t=this.visualMapModel,e=this._dataInterval=t.getSelected(),n=t.getExtent(),i=[0,t.itemSize[1]];this._handleEnds=[Qk(e[0],n,i,!0),Qk(e[1],n,i,!0)]},e.prototype._updateInterval=function(t,e){e=e||0;var n=this.visualMapModel,i=this._handleEnds,o=[0,n.itemSize[1]];Bb(e,i,o,t,
// cross is forbidden
0);var r=n.getExtent();this._dataInterval=[Qk(i[0],o,r,!0),Qk(i[1],o,r,!0)]},e.prototype._updateView=function(t){var e=this.visualMapModel,n=e.getExtent(),i=this._shapes,o=[0,e.itemSize[1]],r=t?o:this._handleEnds,a=this._createBarVisual(this._dataInterval,n,r,"inRange"),s=this._createBarVisual(n,n,o,"outOfRange");i.inRange.setStyle({fill:a.barColor}).setShape("points",a.barPoints),i.outOfRange.setStyle({fill:s.barColor}).setShape("points",s.barPoints),this._updateHandle(r,a)},e.prototype._createBarVisual=function(t,e,n,i){var o={forceState:i,convertOpacityToAlpha:!0},r=this._makeColorGradient(t,o),a=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],s=this._createBarPoints(n,a);return{barColor:new q(0,0,0,1,r),barPoints:s,handlesColor:[r[0].color,r[r.length-1].color]}},e.prototype._makeColorGradient=function(t,e){var n=[],i=(t[1]-t[0])/100;n.push({color:this.getControllerVisual(t[0],"color",e),offset:0});for(var o=1;o<100;o++){var r=t[0]+i*o;if(r>t[1])break;n.push({color:this.getControllerVisual(r,"color",e),offset:o/100})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},e.prototype._createBarPoints=function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},e.prototype._createBarGroup=function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new X("horizontal"!==e||n?"horizontal"===e&&n?{scaleX:"bottom"===t?-1:1,rotation:-Math.PI/2}:"vertical"!==e||n?{scaleX:"left"===t?1:-1}:{scaleX:"left"===t?1:-1,scaleY:-1}:{scaleX:"bottom"===t?1:-1,rotation:Math.PI/2})},e.prototype._updateHandle=function(t,e){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,o=n.handleThumbs,r=n.handleLabels,a=i.itemSize,s=i.getExtent(),l=this._applyTransform("left",n.mainGroup);tP([0,1],function(u){var c=o[u];c.setStyle("fill",e.handlesColor[u]),c.y=t[u];var d=Qk(t[u],[0,a[1]],s,!0),h=this.getControllerVisual(d,"symbolSize");c.scaleX=c.scaleY=h/a[0],c.x=a[0]-h/2;var p=fo(n.handleLabelPoints[u],po(c,this.group));if("horizontal"===this._orient){var f="left"===l||"top"===l?(a[0]-h)/2:(a[0]-h)/-2;p[1]+=f}r[u].setStyle({x:p[0],y:p[1],text:i.formatValueText(this._dataInterval[u]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",n.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,e,n,i){var o=this.visualMapModel,r=o.getExtent(),a=o.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var c=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),d=this.getControllerVisual(t,"symbolSize"),h=Qk(t,r,s,!0),p=a[0]-d/2,f={x:u.x,y:u.y};u.y=h,u.x=p;var g=fo(l.indicatorLabelPoint,po(u,this.group)),y=l.indicatorLabel;y.attr("invisible",!1);var m=this._applyTransform("left",l.mainGroup),v="horizontal"===this._orient;y.setStyle({text:(n||"")+o.formatValueText(e),verticalAlign:v?m:"middle",align:v?"center":m});var x={x:p,y:h,style:{fill:c}},_={style:{x:g[0],y:g[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var b={duration:100,easing:"cubicInOut",additive:!0};u.x=f.x,u.y=f.y,u.animateTo(x,b),y.animateTo(_,b)}else u.attr(x),y.attr(_);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var w=0;w<S.length;w++)this.api.enterBlur(S[w])}},e.prototype._enableHoverLinkToSeries=function(){var t=this;this._shapes.mainGroup.on("mousemove",function(e){if(t._hovering=!0,!t._dragging){var n=t.visualMapModel.itemSize,i=t._applyTransform([e.offsetX,e.offsetY],t._shapes.mainGroup,!0,!0);i[1]=eP(nP(0,i[1]),n[1]),t._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=n[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},e.prototype._enableHoverLinkFromSeries=function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},e.prototype._doHoverLinkToSeries=function(t,e){var n=this.visualMapModel,i=n.itemSize;if(n.option.hoverLink){var o=[0,i[1]],r=n.getExtent();t=eP(nP(o[0],t),o[1]);var a=function(t,e,n){var i=6,o=t.get("hoverLinkDataSize");o&&(i=Qk(o,e,n,!0)/2);return i}(n,r,o),s=[t-a,t+a],l=Qk(t,o,r,!0),u=[Qk(s[0],o,r,!0),Qk(s[1],o,r,!0)];s[0]<o[0]&&(u[0]=-Infinity),s[1]>o[1]&&(u[1]=Infinity),e&&(-Infinity===u[0]?this._showIndicator(l,u[1],"< ",a):Infinity===u[1]?this._showIndicator(l,u[0],"> ",a):this._showIndicator(l,l,"≈ ",a));var c=this._hoverLinkDataIndices,d=[];(e||rP(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(u));var h=function(t,e){var n={},i={};return o(t||[],n),o(e||[],i,n),[r(n),r(i)];function o(t,e,n){for(var i=0,o=t.length;i<o;i++){var r=xn(t[i].seriesId,null);if(null==r)return;for(var a=dn(t[i].dataIndex),s=n&&n[r],l=0,u=a.length;l<u;l++){var c=a[l];s&&s[c]?s[c]=null:(e[r]||(e[r]={}))[c]=1}}}function r(t,e){var n=[];for(var i in t)if(t.hasOwnProperty(i)&&null!=t[i])if(e)n.push(+i);else{var o=r(t[i],!0);o.length&&n.push({seriesId:i,dataIndex:o})}return n}}(c,d);this._dispatchHighDown("downplay",$k(h[0],n)),this._dispatchHighDown("highlight",$k(h[1],n))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var e;if(ac(t.target,function(t){var n=Un(t);if(null!=n.dataIndex)return e=n,!0},!0),e){var n=this.ecModel.getSeriesByIndex(e.seriesIndex),i=this.visualMapModel;if(i.isTargetSeries(n)){var o=n.getData(e.dataType),r=o.getStore().get(i.getDataDimensionIndex(o),e.dataIndex);isNaN(r)||this._showIndicator(r,r)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var e=this._shapes.handleLabels;if(e)for(var n=0;n<e.length;n++)this.api.leaveBlur(e[n])},e.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",$k(t,this.visualMapModel)),t.length=0},e.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},e.prototype._applyTransform=function(t,e,n,i){var r=po(e,i?null:this.group);return o(t)?fo(t,r,n):go(t,r,n)},e.prototype._dispatchHighDown=function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},e.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.type="visualMap.continuous",e}(qk);function oP(t,e,n,i){return new B({shape:{points:t},draggable:!!n,cursor:e,drift:n,onmousemove:function(t){Ut(t.event)},ondragend:i})}function rP(t){var e=t.get("hoverLinkOnHandle");return!!(null==e?t.get("realtime"):e)}function aP(t){return"vertical"===t?"ns-resize":"ew-resize"}var sP={type:"selectDataRange",event:"dataRangeSelected",
// FIXME use updateView appears wrong
update:"update"},lP=function(t,e){e.eachComponent({mainType:"visualMap",query:t},function(e){e.setSelected(t.selected)})},uP=[{createOnAllSeries:!0,reset:function(t,e){var n=[];return e.eachComponent("visualMap",function(e){var i,o,r,a,l,u=t.pipelineContext;!e.isTargetSeries(t)||u&&u.large||n.push((i=e.stateList,o=e.targetVisuals,r=ut(e.getValueState,e),a=e.getDataDimensionIndex(t.getData()),l={},s(i,function(t){var e=kx.prepareVisualTypes(o[t]);l[t]=e}),{progress:function(t,e){var n,i;function s(t){return ec(e,i,t)}function u(t,n){ic(e,i,t,n)}null!=a&&(n=e.getDimensionIndex(a));for(var c=e.getStore();null!=(i=t.next());){var d=e.getRawDataItem(i);if(!d||!1!==d.visualMap)for(var h=null!=a?c.get(n,i):i,p=r(h),f=o[p],g=l[p],y=0,m=g.length;y<m;y++){var v=g[y];f[v]&&f[v].applyVisual(h,s,u)}}}}))}),n}},
// Only support color.
{createOnAllSeries:!0,reset:function(t,e){var n=t.getData(),i=[];e.eachComponent("visualMap",function(e){if(e.isTargetSeries(t)){var o=e.getVisualMeta(ut(cP,null,t,e))||{stops:[],outerColors:[]},r=e.getDataDimensionIndex(n);r>=0&&(o.dimension=r,i.push(o))}}),t.getData().setVisual("visualMeta",i)}}];function cP(t,e,n,i){for(var o=e.targetVisuals[i],r=kx.prepareVisualTypes(o),a={color:nc(t.getData(),"color")},s=0,l=r.length;s<l;s++){var u=r[s],c=o["opacity"===u?"__alphaForOpacity":u];c&&c.applyVisual(n,d,h)}return a.color;function d(t){return a[t]}function h(t,e){a[t]=e}}var dP=s;function hP(t){var e=t&&t.visualMap;o(e)||(e=e?[e]:[]),dP(e,function(t){if(t){pP(t,"splitList")&&!pP(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&o(e)&&dP(e,function(t){r(t)&&(pP(t,"start")&&!pP(t,"min")&&(t.min=t.start),pP(t,"end")&&!pP(t,"max")&&(t.max=t.end))})}})}function pP(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}var fP=!1;function gP(t){fP||(fP=!0,t.registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"}),t.registerAction(sP,lP),s(uP,function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)}),t.registerPreprocessor(hP))}function yP(t){t.registerComponentModel(Xk),t.registerComponentView(iP),gP(t)}var mP=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._pieceList=[],n}return h(e,t),e.prototype.optionUpdated=function(e,i){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var o=this._mode=this._determineMode();this._pieceList=[],vP[this._mode].call(this,this._pieceList),this._resetSelected(e,i);var r=this.option.categories;this.resetVisual(function(t,e){"categories"===o?(t.mappingMethod="category",t.categories=nt(r)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=n(this._pieceList,function(t){return t=nt(t),"inRange"!==e&&(t.visual=null),t}))})},e.prototype.completeVisualOption=function(){var e=this.option,n={},i=kx.listVisualTypes(),o=this.isCategory();function r(t,e,n){return t&&t[e]&&t[e].hasOwnProperty(n)}s(e.pieces,function(t){s(i,function(e){t.hasOwnProperty(e)&&(n[e]=1)})}),s(n,function(t,n){var i=!1;s(this.stateList,function(t){i=i||r(e,t,n)||r(e.target,t,n)},this),!i&&s(this.stateList,function(t){(e[t]||(e[t]={}))[n]=Vk(n,"inRange"===t?"active":"inactive",o)})},this),t.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,e){var n=this.option,i=this._pieceList,o=(e?n:t).selected||{};if(n.selected=o,s(i,function(t,e){var n=this.getSelectedMapKey(t);o.hasOwnProperty(n)||(o[n]=!0)},this),"single"===n.selectedMode){var r=!1;s(i,function(t,e){var n=this.getSelectedMapKey(t);o[n]&&(r?o[n]=!1:r=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return"categories"===this._mode?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=nt(t)},e.prototype.getValueState=function(t){var e=kx.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[],n=this._pieceList;return this.eachTargetSeries(function(i){var o=[],r=i.getData();r.each(this.getDataDimensionIndex(r),function(e,i){kx.findPieceIndex(e,n)===t&&o.push(i)},this),e.push({seriesId:i.id,dataIndex:o})},this),e},e.prototype.getRepresentValue=function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var n=t.interval||[];e=-Infinity===n[0]&&Infinity===n[1]?0:(n[0]+n[1])/2}return e},e.prototype.getVisualMeta=function(t){if(!this.isCategory()){var e=[],n=["",""],i=this,o=this._pieceList.slice();if(o.length){var r=o[0].interval[0];-Infinity!==r&&o.unshift({interval:[-Infinity,r]}),Infinity!==(r=o[o.length-1].interval[1])&&o.push({interval:[r,Infinity]})}else o.push({interval:[-Infinity,Infinity]});var a=-Infinity;return s(o,function(t){var e=t.interval;e&&(e[0]>a&&l([a,e[0]],"outOfRange"),l(e.slice()),a=e[1])},this),{stops:e,outerColors:n}}function l(o,r){var a=i.getRepresentValue({interval:o});r||(r=i.getValueState(a));var s=t(a,r);-Infinity===o[0]?n[0]=s:Infinity===o[1]?n[1]=s:e.push({value:o[0],color:s},{value:o[1],color:s})}},e.type="visualMap.piecewise",e.defaultOption=ir(Uk.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(Uk),vP={splitNumber:function(t){var e=this.option,n=Math.min(e.precision,20),i=this.getExtent(),o=e.splitNumber;o=Math.max(parseInt(o,10),1),e.splitNumber=o;for(var r=(i[1]-i[0])/o;+r.toFixed(n)!==r&&n<5;)n++;e.precision=n,r=+r.toFixed(n),e.minOpen&&t.push({interval:[-Infinity,i[0]],close:[0,0]});for(var a=0,l=i[0];a<o;l+=r,a++){var u=a===o-1?i[1]:l+r;t.push({interval:[l,u],close:[1,1]})}e.maxOpen&&t.push({interval:[i[1],Infinity],close:[0,0]}),tn(t),s(t,function(t,e){t.index=e,t.text=this.formatValueText(t.interval)},this)},categories:function(t){var e=this.option;s(e.categories,function(e){t.push({text:this.formatValueText(e,!0),value:e})},this),xP(e,t)},pieces:function(t){var e=this.option;s(e.pieces,function(e,n){r(e)||(e={value:e});var i={text:"",index:n};if(null!=e.label&&(i.text=e.label),e.hasOwnProperty("value")){var o=i.value=e.value;i.interval=[o,o],i.close=[1,1]}else{for(var a=i.interval=[],s=i.close=[0,0],l=[1,0,1],u=[-Infinity,Infinity],c=[],d=0;d<2;d++){for(var h=[["gte","gt","min"],["lte","lt","max"]][d],p=0;p<3&&null==a[d];p++)a[d]=e[h[p]],s[d]=l[p],c[d]=2===p;null==a[d]&&(a[d]=u[d])}c[0]&&Infinity===a[1]&&(s[0]=0),c[1]&&-Infinity===a[0]&&(s[1]=0),a[0]===a[1]&&s[0]&&s[1]&&(i.value=a[0])}i.visual=kx.retrieveVisuals(e),t.push(i)},this),xP(e,t),tn(t),s(t,function(t){var e=t.close,n=[["<","≤"][e[1]],[">","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,n)},this)}};function xP(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}var _P=
/** @class */function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return h(e,t),e.prototype.doRender=function(){var t=this.group;t.removeAll();var e=this.visualMapModel,n=e.get("textGap"),i=e.textStyleModel,o=i.getFont(),r=i.getTextColor(),a=this._getItemAlign(),l=e.itemSize,u=this._getViewData(),c=u.endsText,d=Ft(e.get("showLabel",!0),!c),h=!e.get("selectedMode");c&&this._renderEndsText(t,c[0],l,d,a),s(u.viewPieceList,function(i){var s=i.piece,u=new X;u.onclick=ut(this._onItemClick,this,s),this._enableHoverLink(u,i.indexInModelPieceList);var c=e.getRepresentValue(s);if(this._createItemSymbol(u,c,[0,0,l[0],l[1]],h),d){var p=this.visualMapModel.getValueState(c);u.add(new Q({style:{x:"right"===a?-n:l[0]+n,y:l[1]/2,text:s.text,verticalAlign:"middle",align:a,font:o,fill:r,opacity:"outOfRange"===p?.5:1},silent:h}))}t.add(u)},this),c&&this._renderEndsText(t,c[1],l,d,a),ea(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,e){var n=this;t.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(t){var i=n.visualMapModel;i.option.hoverLink&&n.api.dispatchAction({type:t,batch:$k(i.findTargetDataIndices(e),i)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return Jk(t,this.api,t.itemSize);var n=e.align;return n&&"auto"!==n||(n="left"),n},e.prototype._renderEndsText=function(t,e,n,i,o){if(e){var r=new X,a=this.visualMapModel.textStyleModel;r.add(new Q({style:Po(a,{x:i?"right"===o?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?o:"center",text:e})})),t.add(r)}},e.prototype._getViewData=function(){var t=this.visualMapModel,e=n(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),i=t.get("text"),o=t.get("orient"),r=t.get("inverse");return("horizontal"===o?r:!r)?e.reverse():i&&(i=i.slice().reverse()),{viewPieceList:e,endsText:i}},e.prototype._createItemSymbol=function(t,e,n,i){var o=gc(
// symbol will be string
this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],
// color will be string
this.getControllerVisual(e,"color"));o.silent=i,t.add(o)},e.prototype._onItemClick=function(t){var e=this.visualMapModel,n=e.option,i=n.selectedMode;if(i){var o=nt(n.selected),r=e.getSelectedMapKey(t);"single"===i||!0===i?(o[r]=!0,s(o,function(t,e){o[e]=e===r})):o[r]=!o[r],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(qk);function bP(t){t.registerComponentModel(mP),t.registerComponentView(_P),gP(t)}var SP={label:{enabled:!0},decal:{show:!1}},wP=wn(),MP={};function IP(e,n){var i=e.getModel("aria");if(i.get("enabled")){var o=nt(SP);et(o.label,e.getLocaleModel().get("aria"),!1),et(i.option,o,!1),function(){if(i.getModel("decal").get("show")){var t=a();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=t.get(e.type);n||(n={},t.set(e.type,n)),wP(e).scope=n}}),e.eachRawSeries(function(t){if(!e.isSeriesFiltered(t))if(g(t.enableAriaDecal))t.enableAriaDecal();else{var n=t.getData();if(t.isColorBySeries()){var i=za(t.ecModel,t.name,MP,e.getSeriesCount()),o=n.getVisual("decal");n.setVisual("decal",u(o,i))}else{var r=t.getRawData(),a={},s=wP(t).scope;n.each(function(t){var e=n.getRawIndex(t);a[e]=t});var l=r.count();r.each(function(e){var i=a[e],o=r.getName(e)||e+"",c=za(t.ecModel,o,s,l),d=n.getItemVisual(i,"decal");n.setItemVisual(i,"decal",u(d,c))})}}function u(t,e){var n=t?f(f({},e),t):e;return n.dirty=!0,n}})}}(),function(){var t=n.getZr().dom;if(!t)return;var o=e.getLocaleModel().get("aria"),a=i.getModel("label");if(a.option=C(a.option,o),!a.get("enabled"))return;if(t.setAttribute("role","img"),a.get("description"))return void t.setAttribute("aria-label",a.get("description"));var s,u=e.getSeriesCount(),c=a.get(["data","maxCount"])||10,d=a.get(["series","maxCount"])||10,h=Math.min(u,d);if(u<1)return;var p=function(){var t=e.get("title");t&&t.length&&(t=t[0]);return t&&t.text}();s=p?r(a.get(["general","withTitle"]),{title:p}):a.get(["general","withoutTitle"]);var f=[];s+=r(u>1?a.get(["series","multiple","prefix"]):a.get(["series","single","prefix"]),{seriesCount:u}),e.eachSeries(function(t,n){if(n<h){var i=void 0,o=t.get("name")?"withName":"withoutName";i=r(i=u>1?a.get(["series","multiple",o]):a.get(["series","single",o]),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:(b=t.subType,S=e.getLocaleModel().get(["series","typeNames"]),S[b]||S.chart)});var s=t.getData();if(s.count()>c)i+=r(a.get(["data","partialData"]),{displayCnt:c});else i+=a.get(["data","allData"]);for(var d=a.get(["data","separator","middle"]),p=a.get(["data","separator","end"]),g=a.get(["data","excludeDimensionId"]),y=[],m=0;m<s.count();m++)if(m<c){var v=s.getName(m),x=g?lt(s.getValues(m),function(t,e){return-1===l(g,e)}):s.getValues(m),_=a.get(["data",v?"withName":"withoutName"]);y.push(r(_,{name:v,value:x.join(d)}))}i+=y.join(d)+p,f.push(i)}var b,S});var g=a.getModel(["series","multiple","separator"]),y=g.get("middle"),m=g.get("end");s+=f.join(y)+m,t.setAttribute("aria-label",s)}()}function r(e,n){if(!t(e))return e;var i=e;return s(n,function(t,e){i=i.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),i}}function DP(t){if(t&&t.aria){var e=t.aria;null!=e.show&&(e.enabled=e.show),e.label=e.label||{},s(["description","general","series","data"],function(t){null!=e[t]&&(e.label[t]=e[t])})}}var TP={value:"eq",
// PENDING: not good for literal semantic?
"<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},CP=
/** @class */function(){function e(e){if(null==(this._condVal=t(e)?new RegExp(e):Le(e)?e:null)){sn("")}}return e.prototype.evaluate=function(e){var n=typeof e;return t(n)?this._condVal.test(e):!!u(n)&&this._condVal.test(e+"")},e}(),AP=
/** @class */function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),LP=
/** @class */function(){function t(){}return t.prototype.evaluate=function(){for(var t=this.children,e=0;e<t.length;e++)if(!t[e].evaluate())return!1;return!0},t}(),kP=
/** @class */function(){function t(){}return t.prototype.evaluate=function(){for(var t=this.children,e=0;e<t.length;e++)if(t[e].evaluate())return!0;return!1},t}(),PP=
/** @class */function(){function t(){}return t.prototype.evaluate=function(){return!this.child.evaluate()},t}(),NP=
/** @class */function(){function t(){}return t.prototype.evaluate=function(){for(var t=!!this.valueParser,e=(0,this.getValue)(this.valueGetterParam),n=t?this.valueParser(e):null,i=0;i<this.subCondList.length;i++)if(!this.subCondList[i].evaluate(t?n:e))return!1;return!0},t}();function OP(t,e){if(!0===t||!1===t){var n=new AP;return n.value=t,n}return EP(t)||sn(""),t.and?RP("and",t,e):t.or?RP("or",t,e):t.not?function(t,e){var n=t.not,i="";EP(n)||sn(i);var o=new PP;o.child=OP(n,e),o.child||sn(i);return o}(t,e):function(t,e){for(var n="",i=e.prepareGetValue(t),o=[],r=x(t),a=t.parser,s=a?$s(a):null,l=0;l<r.length;l++){var u=r[l];if("parser"!==u&&!e.valueGetterAttrMap.get(u)){var c=k(TP,u)?TP[u]:u,d=t[u],h=s?s(d):d,p=il(c,h)||"reg"===c&&new CP(h);p||sn(n),o.push(p)}}o.length||sn(n);var f=new NP;return f.valueGetterParam=i,f.valueParser=s,f.getValue=e.getValue,f.subCondList=o,f}(t,e)}function RP(t,e,i){var r=e[t];o(r)||sn(""),r.length||sn("");var a="and"===t?new LP:new kP;return a.children=n(r,function(t){return OP(t,i)}),a.children.length||sn(""),a}function EP(t){return r(t)&&!v(t)}var VP=
/** @class */function(){function t(t,e){this._cond=OP(t,e)}return t.prototype.evaluate=function(){return this._cond.evaluate()},t}();var zP={type:"echarts:filter",
// PENDING: enhance to filter by index rather than create new data
transform:function(t){for(var e,n,i,o=t.upstream,r=(n=t.config,i={valueGetterAttrMap:a({dimension:!0}),prepareGetValue:function(t){var e=t.dimension;k(t,"dimension")||sn("");var n=o.getDimensionInfo(e);return n||sn(""),{dimIdx:n.index}},getValue:function(t){return o.retrieveValueFromItem(e,t.dimIdx)}},new VP(n,i)),s=[],l=0,u=o.count();l<u;l++)e=o.getRawDataItem(l),r.evaluate()&&s.push(e);return{data:s}}},BP={type:"echarts:sort",transform:function(t){var e=t.upstream,n=t.config,i="",o=dn(n);o.length||sn(i);var r=[];s(o,function(t){var n=t.dimension,o=t.order,a=t.parser,s=t.incomparable;if(null==n&&sn(i),"asc"!==o&&"desc"!==o&&sn(i),s&&"min"!==s&&"max"!==s){sn("")}if("asc"!==o&&"desc"!==o){sn("")}var l=e.getDimensionInfo(n);l||sn(i);var u=a?$s(a):null;a&&!u&&sn(i),r.push({dimIdx:l.index,parser:u,comparator:new el(o,s)})});var a=e.sourceFormat;a!==ga&&a!==ya&&sn(i);for(var l=[],u=0,c=e.count();u<c;u++)l.push(e.getRawDataItem(u));return l.sort(function(t,n){for(var i=0;i<r.length;i++){var o=r[i],a=e.retrieveValueFromItem(t,o.dimIdx),s=e.retrieveValueFromItem(n,o.dimIdx);o.parser&&(a=o.parser(a),s=o.parser(s));var l=o.comparator.evaluate(a,s);if(0!==l)return l}return 0}),{data:l}}};var GP=
/** @class */function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataset",e}return h(e,t),e.prototype.init=function(e,n,i){t.prototype.init.call(this,e,n,i),this._sourceManager=new Ml(this),Il(this)},e.prototype.mergeOption=function(e,n){t.prototype.mergeOption.call(this,e,n),Il(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:_a},e}(ua),FP=
/** @class */function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataset",e}return h(e,t),e.type="dataset",e}(nu);function WP(t){t.registerPainter("canvas",Pe)}function HP(t){return o(t[0])}function YP(t,e){for(var n=[],i=t.length,o=0;o<i;o++)n.push({one:t[o],many:[]});for(o=0;o<e.length;o++){var r=e[o].length,a=void 0;for(a=0;a<r;a++)n[a%i].many.push(e[o][a])}var s=0;for(o=i-1;o>=0;o--)if(!n[o].many.length){var l=n[s].many;if(l.length<=1){if(!s)return n;s=0}r=l.length;var u=Math.ceil(r/2);n[o].many=l.slice(u,r),n[s].many=l.slice(0,u),s++}return n}var UP={clone:function(t){for(var e=[],n=1-Math.pow(1-t.path.style.opacity,1/t.count),i=0;i<t.count;i++){var o=Ve(t.path);o.setStyle("opacity",n),e.push(o)}return e},
// Use the default divider
split:null};function ZP(t,e,n,i,o,r){if(t.length&&e.length){var a=Yi("update",i,o);if(a&&a.duration>0){var s,l,u=i.getModel("universalTransition").get("delay"),c=Object.assign({
// Need to setToFinal so the further calculation based on the style can be correct.
// Like emphasis color.
setToFinal:!0},a);HP(t)&&(s=t,l=e),HP(e)&&(s=e,l=t);for(var d=s?s===t:t.length>e.length,h=s?YP(l,s):YP(d?e:t,[d?t:e]),p=0,f=0;f<h.length;f++)p+=h[f].many.length;var g=0;for(f=0;f<h.length;f++)y(h[f],d,g,p),g+=h[f].many.length}}function y(t,e,i,o,a){var s=t.many,l=t.one;if(1!==s.length||a)for(var d=C({dividePath:UP[n],individualDelay:u&&function(t,e,n,r){return u(t+i,o)}},c),h=e?Re(s,l,d):Ee(l,s,d),p=h.fromIndividuals,f=h.toIndividuals,g=p.length,m=0;m<g;m++){_=u?C({delay:u(m,g)},c):c;r(p[m],f[m],e?s[m]:t.one,e?t.one:s[m],_)}else{var v=e?s[0]:l,x=e?l:s[0];if(Ne(v))y({many:[v],one:x},!0,i,o,!0);else{var _=u?C({delay:u(i,o)},c):c;Oe(v,x,_),r(v,x,v,x,_)}}}}function XP(t){if(!t)return[];if(o(t)){for(var e=[],n=0;n<t.length;n++)e.push(XP(t[n]));return e}var i=[];return t.traverse(function(t){t instanceof y&&!t.disableMorphing&&!t.invisible&&!t.ignore&&i.push(t)}),i}var jP=wn();function qP(t,e,n,i){var o=function(t,e){for(var n=t.dimensions,i=0;i<n.length;i++){var o=t.getDimensionInfo(n[i]);if(o&&0===o.otherDims[e])return n[i]}}(t,i?"itemChildGroupId":"itemGroupId");if(o){var r=function(t,e,n){var i=t.getDimensionInfo(n),o=i&&i.ordinalMeta;if(i){var r=t.get(i.name,e);return o&&o.categories[r]||r+""}}(t,e,o);return r}var a=t.getRawDataItem(e),s=i?"childGroupId":"groupId";return a&&a[s]?a[s]+"":i?void 0:n||t.getId(e)}function KP(t){var e=[];return s(t,function(t){var n=t.data,i=t.dataGroupId;if(!(n.count()>1e4))for(var o=n.getIndices(),r=0;r<o.length;r++)e.push({data:n,groupId:qP(n,r,i,!1),childGroupId:qP(n,r,i,!0),divide:t.divide,dataIndex:r})}),e}function JP(t,e,n){t.traverse(function(t){t instanceof y&&Xi(t,{style:{opacity:0}},e,{dataIndex:n,isFrom:!0})})}function $P(t){if(t.parent){var e=t.getComputedTransform();t.setLocalTransform(e),t.parent.remove(t)}}function QP(t){t.stopAnimation(),t.isGroup&&t.traverse(function(t){t.stopAnimation()})}function tN(t,e,n){var i=Yi("update",n,e);i&&t.traverse(function(t){if(t instanceof qt){var e=function(t){return Hi(t).oldStyle}(t);e&&t.animateFrom({style:e},i)}})}function eN(t,e,i){var o=KP(t),r=KP(e);function l(t,e,n,i,o){(n||t)&&e.animateFrom({style:n&&n!==t?f(f({},n.style),t.style):t.style},o)}var u=!1,c=0,d=a(),h=a();o.forEach(function(t){t.groupId&&d.set(t.groupId,!0),t.childGroupId&&h.set(t.childGroupId,!0)});for(var p=0;p<r.length;p++){var g=r[p].groupId;if(h.get(g)){c=1;break}var m=r[p].childGroupId;if(m&&d.get(m)){c=2;break}}function v(t,e){return function(n){var i=n.data,o=n.dataIndex;return e?i.getId(o):t?1===c?n.childGroupId:n.groupId:2===c?n.childGroupId:n.groupId}}var x=function(t,e){var n=t.length;if(n!==e.length)return!1;for(var i=0;i<n;i++){var o=t[i],r=e[i];if(o.data.getId(o.dataIndex)!==r.data.getId(r.dataIndex))return!1}return!0}(o,r),_={};if(!x)for(p=0;p<r.length;p++){var b=r[p],S=b.data.getItemGraphicEl(b.dataIndex);S&&(_[S.id]=!0)}function w(t,e){var n=o[e],i=r[t],a=i.data.hostModel,s=n.data.getItemGraphicEl(n.dataIndex),c=i.data.getItemGraphicEl(i.dataIndex);s!==c?
// We can't use the elements that already being morphed
s&&_[s.id]||c&&(QP(c),s?(QP(s),$P(s),u=!0,ZP(XP(s),XP(c),i.divide,a,t,l)):JP(c,a,t)):c&&tN(c,i.dataIndex,a)}new kd(o,r,v(!0,x),v(!1,x),null,"multiple").update(w).updateManyToOne(function(t,e){var i=r[t],a=i.data,c=a.hostModel,d=a.getItemGraphicEl(i.dataIndex),h=lt(n(e,function(t){return o[t].data.getItemGraphicEl(o[t].dataIndex)}),function(t){return t&&t!==d&&!_[t.id]});d&&(QP(d),h.length?(s(h,function(t){QP(t),$P(t)}),u=!0,ZP(XP(h),XP(d),i.divide,c,t,l)):JP(d,c,i.dataIndex))}).updateOneToMany(function(t,e){var i=o[e],a=i.data.getItemGraphicEl(i.dataIndex);if(!a||!_[a.id]){var c=lt(n(t,function(t){return r[t].data.getItemGraphicEl(r[t].dataIndex)}),function(t){return t&&t!==a}),d=r[t[0]].data.hostModel;c.length&&(s(c,function(t){return QP(t)}),a?(QP(a),$P(a),u=!0,ZP(XP(a),XP(c),i.divide,
// Use divide on old.
d,t[0],l)):s(c,function(e){return JP(e,d,t[0])}))}}).updateManyToMany(function(t,e){new kd(e,t,function(t){return o[t].data.getId(o[t].dataIndex)},function(t){return r[t].data.getId(r[t].dataIndex)}).update(function(n,i){w(t[n],e[i])}).execute()}).execute(),u&&s(e,function(t){var e=t.data.hostModel,n=e&&i.getViewOfSeriesModel(e),o=Yi("update",e,0);n&&e.isAnimationEnabled()&&o&&o.duration>0&&n.group.traverse(function(t){t instanceof y&&!t.animators.length&&t.animateFrom({style:{opacity:0}},o)})})}function nN(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function iN(t){return o(t)?t.sort().join(","):t}function oN(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function rN(t,e){for(var n=0;n<t.length;n++){if(null!=e.seriesIndex&&e.seriesIndex===t[n].seriesIndex||null!=e.seriesId&&e.seriesId===t[n].id)return n}}_p([WP]),_p([function(t){t.registerPainter("svg",ke)}]),_p([gg,Fg,ay,function(t){_p(am),t.registerSeriesModel(sy),t.registerChartView(dy),t.registerLayout(dg("scatter"))},bm,function(t){_p(Cv),t.registerChartView(uv),t.registerSeriesModel(cv),t.registerLayout(hv),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,dv),oc("map",t.registerAction)},function(t){t.registerChartView(Gv),t.registerSeriesModel(lx),t.registerLayout(cx),t.registerVisual(dx),function(t){t.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(e){var n=t.dataIndex,i=e.getData().tree.getNodeByDataIndex(n);i.isExpand=!i.isExpand})}),t.registerAction({type:"treeRoam",event:"treeRoam",
// Here we set 'none' instead of 'update', because roam action
// just need to update the transform matrix without having to recalculate
// the layout. So don't need to go through the whole update process, such
// as 'dataPrcocess', 'coordSystemUpdate', 'layout' and so on.
update:"none"},function(t,e,n){e.eachComponent({mainType:"series",subType:"tree",query:t},function(e){var i=Iv(e.coordinateSystem,t,void 0,n);e.setCenter&&e.setCenter(i.center),e.setZoom&&e.setZoom(i.zoom)})})}(t)},function(t){t.registerSeriesModel(fx),t.registerChartView(Tx),t.registerVisual(Yx),t.registerLayout(i_),function(t){for(var e=0;e<hx.length;e++)t.registerAction({type:hx[e],update:"updateView"},ht);t.registerAction({type:"treemapRootToNode",update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"treemap",query:t},function(e,n){var i=ox(t,["treemapZoomToNode","treemapRootToNode"],e);if(i){var o=e.getViewRoot();o&&(t.direction=ax(o,i.node)?"rollUp":"drillDown"),e.resetViewRoot(i.node)}})})}(t)},function(t){t.registerChartView(ob),t.registerSeriesModel(db),t.registerProcessor(u_),t.registerVisual(c_),t.registerVisual(h_),t.registerLayout(S_),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,L_),t.registerLayout(P_),t.registerCoordinateSystem("graphView",{dimensions:fv.dimensions,create:N_}),t.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},ht),t.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},ht),t.registerAction(hb,function(t,e,n){e.eachComponent({mainType:"series",query:t},function(e){var i=Iv(e.coordinateSystem,t,void 0,n);e.setCenter&&e.setCenter(i.center),e.setZoom&&e.setZoom(i.zoom)})})},function(t){t.registerChartView(yb),t.registerSeriesModel(mb)},function(t){t.registerChartView(_b),t.registerSeriesModel(bb),t.registerLayout(Sb),t.registerProcessor(jg("funnel"))},function(t){_p(qS),t.registerChartView(wb),t.registerSeriesModel(Ab),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,Pb)},function(t){t.registerChartView($S),t.registerSeriesModel(tw),t.registerLayout(ew),t.registerVisual(pw),t.registerAction({type:"dragNode",event:"dragnode",
// here can only use 'update' now, other value is not support in echarts.
update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(e){e.setNodePosition(t.dataIndex,[t.localX,t.localY])})})},function(t){t.registerSeriesModel(gw),t.registerChartView(yw),t.registerLayout(ww),t.registerTransform(Mw)},function(t){t.registerChartView(Ow),t.registerSeriesModel(Uw),t.registerPreprocessor(Zw),t.registerVisual(Pw),t.registerLayout(Xw)},function(t){t.registerChartView(Jw),t.registerSeriesModel($w),t.registerLayout(dg("effectScatter"))},function(t){t.registerChartView(aM),t.registerSeriesModel(cM),t.registerLayout(rM),t.registerVisual(hM)},function(t){t.registerChartView(gM),t.registerSeriesModel(yM)},function(t){t.registerChartView(_M),t.registerSeriesModel(zM),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,at(Rh,"pictorialBar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Eh("pictorialBar"))},function(t){t.registerChartView(BM),t.registerSeriesModel(GM),t.registerLayout(FM),t.registerProcessor(jg("themeRiver"))},function(t){t.registerChartView(ZM),t.registerSeriesModel(XM),t.registerLayout(at(KM,"sunburst")),t.registerProcessor(at(jg,"sunburst")),t.registerVisual($M),function(t){t.registerAction({type:YM,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},function(e,n){var i=ox(t,[YM],e);if(i){var o=e.getViewRoot();o&&(t.direction=ax(o,i.node)?"rollUp":"drillDown"),e.resetViewRoot(i.node)}})}),t.registerAction({type:UM,update:"none"},function(t,e,n){t=f({},t),e.eachComponent({mainType:"series",subType:"sunburst",query:t},function(e){var n=ox(t,[UM],e);n&&(t.dataIndex=n.node.dataIndex)}),n.dispatchAction(f(t,{type:"highlight"}))}),t.registerAction({type:"sunburstUnhighlight",update:"updateView"},function(t,e,n){t=f({},t),n.dispatchAction(f(t,{type:"downplay"}))})}(t)},function(t){t.registerChartView(HI),t.registerSeriesModel(nI)}]),_p(UD),_p(function(t){_p(YD),jy.registerAxisPointerClass("PolarAxisPointer",ZD),t.registerCoordinateSystem("polar",aT),t.registerComponentModel(jD),t.registerComponentView(ST),xy(t,"angle",KD,_T),xy(t,"radius",JD,bT),t.registerComponentView(dT),t.registerComponentView(gT),t.registerLayout(at(xT,"bar"))}),_p(Cv),_p(function(t){_p(YD),jy.registerAxisPointerClass("SingleAxisPointer",ET),t.registerComponentView(GT),t.registerComponentView(DT),t.registerComponentModel(CT),xy(t,"single",CT,CT.defaultOption),t.registerCoordinateSystem("single",NT)}),_p(qS),_p(function(t){t.registerComponentModel(FT),t.registerComponentView(HT),t.registerCoordinateSystem("calendar",UT)}),_p(function(t){t.registerComponentModel(JT),t.registerComponentView(tC),t.registerPreprocessor(function(t){var e=t.graphic;o(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])})}),_p(function(t){t.registerComponentModel(TC),t.registerComponentView(AC),IC("saveAsImage",LC),IC("magicType",NC),IC("dataView",GC),IC("dataZoom",lA),IC("restore",UC),_p(SC)}),_p(PA),_p(YD),_p(function(t){t.registerComponentView(JA),t.registerComponentModel($A),t.registerPreprocessor(OA),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,ZA),t.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(e){e.setAreas(t.areas)})}),t.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},ht),t.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},ht),IC("brush",eL)}),_p(function(t){t.registerComponentModel(nL),t.registerComponentView(iL)}),_p(function(t){t.registerComponentModel(rL),t.registerComponentView(cL),t.registerSubTypeDefaulter("timeline",function(){return"slider"}),function(t){t.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e,n){var i=e.getComponent("timeline");return i&&null!=t.currentIndex&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.getPlayState()&&(i.setPlayState(!1),n.dispatchAction({type:"timelinePlayChange",playState:!1,from:t.from}))),e.resetOption("timeline",{replaceMerge:i.get("replaceMerge",!0)}),C({currentIndex:i.option.currentIndex},t)}),t.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var n=e.getComponent("timeline");n&&null!=t.playState&&n.setPlayState(t.playState)})}(t),t.registerPreprocessor(pL)}),_p(function(t){t.registerComponentModel(_L),t.registerComponentView(PL),t.registerPreprocessor(function(t){yL(t.series,"markPoint")&&(t.markPoint=t.markPoint||{})})}),_p(function(t){t.registerComponentModel(NL),t.registerComponentView(GL),t.registerPreprocessor(function(t){yL(t.series,"markLine")&&(t.markLine=t.markLine||{})})}),_p(function(t){t.registerComponentModel(FL),t.registerComponentView(qL),t.registerPreprocessor(function(t){yL(t.series,"markArea")&&(t.markArea=t.markArea||{})})}),_p(yk),_p(function(t){_p(Tk),_p(Ek)}),_p(Tk),_p(Ek),_p(function(t){_p(yP),_p(bP)}),_p(yP),_p(bP),_p(function(t){t.registerPreprocessor(DP),t.registerVisual(t.PRIORITY.VISUAL.ARIA,IP)}),_p(function(t){t.registerTransform(zP),t.registerTransform(BP)}),_p(function(t){t.registerComponentModel(GP),t.registerComponentView(FP)}),_p(function(t){t.registerUpdateLifecycle("series:beforeupdate",function(t,e,n){s(dn(n.seriesTransition),function(t){s(dn(t.to),function(t){for(var e=n.updatedSeries,i=0;i<e.length;i++)(null!=t.seriesIndex&&t.seriesIndex===e[i].seriesIndex||null!=t.seriesId&&t.seriesId===e[i].id)&&(e[i][Xl]=!0)})})}),t.registerUpdateLifecycle("series:transition",function(t,e,n){var i=jP(e);if(i.oldSeries&&n.updatedSeries&&n.optionChanged){var r=n.seriesTransition;if(r)s(dn(r),function(t){!function(t,e,n,i){var o=[],r=[];s(dn(t.from),function(t){var n=rN(e.oldSeries,t);n>=0&&o.push({dataGroupId:e.oldDataGroupIds[n],data:e.oldData[n],
// TODO can specify divideShape in transition.
divide:oN(e.oldData[n]),groupIdDim:t.dimension})}),s(dn(t.to),function(t){var i=rN(n.updatedSeries,t);if(i>=0){var o=n.updatedSeries[i].getData();r.push({dataGroupId:e.oldDataGroupIds[i],data:o,divide:oN(o),groupIdDim:t.dimension})}}),o.length>0&&r.length>0&&eN(o,r,i)}(t,i,n,e)});else{var l=function(t,e){var n=a(),i=a(),r=a();return s(t.oldSeries,function(e,n){var a=t.oldDataGroupIds[n],l=t.oldData[n],u=nN(e),c=iN(u);i.set(c,{dataGroupId:a,data:l}),o(u)&&s(u,function(t){r.set(t,{key:c,dataGroupId:a,data:l})})}),s(e.updatedSeries,function(t){if(t.isUniversalTransitionEnabled()&&t.isAnimationEnabled()){var e=t.get("dataGroupId"),a=t.getData(),l=nN(t),u=iN(l),c=i.get(u);if(c)n.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:oN(c.data),data:c.data}],newSeries:[{dataGroupId:e,divide:oN(a),data:a}]});else if(o(l)){var d=[];s(l,function(t){var e=i.get(t);e.data&&d.push({dataGroupId:e.dataGroupId,divide:oN(e.data),data:e.data})}),d.length&&n.set(u,{oldSeries:d,newSeries:[{dataGroupId:e,data:a,divide:oN(a)}]})}else{var h=r.get(l);if(h){var p=n.get(h.key);p||(p={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:oN(h.data)}],newSeries:[]},n.set(h.key,p)),p.newSeries.push({dataGroupId:e,data:a,divide:oN(a)})}}}}),n}(i,n);s(l.keys(),function(t){var n=l.get(t);eN(n.oldSeries,n.newSeries,e)})}s(n.updatedSeries,function(t){t[Xl]&&(t[Xl]=!1)})}for(var u=t.getSeries(),c=i.oldSeries=[],d=i.oldDataGroupIds=[],h=i.oldData=[],p=0;p<u.length;p++){var f=u[p].getData();f.count()<1e4&&(c.push(u[p]),d.push(u[p].get("dataGroupId")),h.push(f))}})}),_p(function(t){t.registerUpdateLifecycle("series:beforeupdate",function(t,e,n){var i=Af(e).labelManager;i||(i=Af(e).labelManager=new Cf),i.clearLabels()}),t.registerUpdateLifecycle("series:layoutlabels",function(t,e,n){var i=Af(e).labelManager;n.updatedSeries.forEach(function(t){i.addLabelsOfSeries(e.getViewOfSeriesModel(t))}),i.updateLayoutConfig(e),i.layout(e),i.processLabelsOverall()})});export{bm as a,WP as b,Fg as c,gg as d,ay as e,UD as f,PA as g,yk as h,vd as i,_p as u};