Agriculture-front-end/dist/assets/index.6098b0aa.js
2023-07-09 20:38:38 +08:00

35 lines
614 KiB
JavaScript

import{a as Ze,Z as ye,n as Ur,g as Ty,D as su,m as z,k as Ct,C as Zf,e as C,b as K,c as Cy,d as Dy,f as H,h as Uf,P as tl,j as te,l as Yf,o as re,p as Dt,T as Xf,q as gn,r as Iy,s as Ly,t as My,u as Py,v as Ry,w as ky,x as Ey,y as rt,z as Vy,A as Ny,B as Oy,E as zy,F as By,G as Gy,H as Fy,I as Ft,J as yn,K as Hy,M as Wy,N as dt,O as $y,Q as B,R as St,S as lu,U as Zy,_ as k,V as ze,W as U,X as kt,Y as At,$ as uu,a0 as dr,a1 as gr,a2 as ot,a3 as pe,a4 as wt,a5 as Ht,a6 as ia,a7 as Yt,a8 as bt,a9 as tt,aa as Yr,ab as Ua,ac as na,ad as Xr,ae as pr,af as vu,ag as cu,ah as ct,ai as Ae,aj as ve,ak as Kr,al as j,am as $t,an as ss,ao as xt,ap as Ni,aq as lt,ar as Uy,as as Kf,L as mn,at as Ra,au as Yy,av as xn,aw as ar,ax as hu,ay as de,az as Oi,aA as qf,aB as Xy,aC as q,aD as jf,aE as Jf,aF as vt,aG as Bt,aH as G,aI as fe,aJ as Ky,aK as qy,aL as jy,aM as zi,aN as me,aO as Qf,aP as Ar,aQ as tp,aR as Sn,aS as Qt,aT as $,aU as el,aV as Jy,aW as Ya,aX as ep,aY as zt,aZ as It,a_ as ee,a$ as Te,b0 as Xa,b1 as ft,b2 as Qy,b3 as bn,b4 as _n,b5 as tm,b6 as rp,b7 as Ee,b8 as em,b9 as xe,ba as Ot,bb as Bi,bc as rm,bd as Hn,be as am,bf as fu,bg as im,bh as yt,bi as wn,bj as ls,bk as nm,bl as us,bm as qr,bn as Kt,bo as om,bp as sm,bq as Rt,br as Ka,bs as lm,bt as um,bu as oa,bv as Gi,bw as Pt,bx as ap,by as Fi,bz as nt,bA as Et,bB as it,bC as Lt,bD as An,bE as J,bF as vm,bG as ce,bH as qa,bI as cm,bJ as Ut,bK as br,bL as ip,bM as he,bN as Tn,bO as Ve,bP as pu,bQ as je,bR as np,bS as F,bT as hm,bU as fm,bV as pm,bW as op,bX as sp,bY as Je,bZ as Tr,b_ as dm,b$ as gm,c0 as ym,c1 as mm,c2 as lp,c3 as jr,c4 as Jr,c5 as rl,c6 as xm,c7 as ja,c8 as Sa,c9 as Sm,ca as Xt,cb as al,cc as bm,cd as _m,ce as up,cf as vp,cg as Cn,ch as wm,ci as cp,cj as Ie,ck as hp,cl as vs,cm as jt,cn as Dn,co as Am,cp as fp,cq as Qe,cr as Hi,cs as du,ct as ba,cu as gu,cv as Tm,cw as Wn,cx as Mi,cy as pp,cz as Ia,cA as Wi,cB as yu,cC as Ke,cD as Cm,cE as Gr,cF as mu,cG as In,cH as Dm,cI as cs,cJ as Im,cK as dp,cL as Lm,cM as Mm,cN as il,cO as Pm,cP as xu,cQ as Rm,cR as km,cS as gp,cT as sa,cU as ka,cV as Me,cW as ue,cX as nl,cY as Wr,cZ as Em,c_ as hs,c$ as fs,d0 as Vm,d1 as $n,d2 as yp,d3 as ge,d4 as _t,d5 as Zn,d6 as Nm,d7 as _a,d8 as Om,d9 as Su,da as zm,db as Bm,dc as bu,dd as _u,de as Gm,df as Fm,dg as wu,dh as Hm,di as Ea,dj as Wm,dk as mp,dl as Ja,dm as Au,dn as $m,dp as Zm,dq as Um,dr as xp,ds as Ln,dt as Mn,du as ol,dv as Sp,dw as qt,dx as Ym,dy as Xm,dz as Tu,dA as Km,dB as qm,dC as jm,dD as Jm,dE as Qm,dF as t0,dG as e0,dH as r0,dI as yr,dJ as bp,dK as Cu,dL as _p,dM as a0,dN as i0,dO as wp,dP as n0,dQ as Ap,dR as o0,dS as s0,dT as Un,dU as Du,dV as Iu,dW as l0,dX as u0,dY as v0,dZ as c0,d_ as Tp,d$ as Cp,e0 as ua,e1 as li,e2 as h0,e3 as Dp,e4 as $r,e5 as f0,e6 as p0,e7 as d0,e8 as $i,e9 as g0,ea as Pn,eb as y0,ec as m0,ed as x0,ee as S0,ef as b0,eg as Lu,eh as Ip,ei as _0,ej as w0,ek as A0,el as T0,em as Zi,en as sl,eo as C0,ep as Yn,eq as D0,er as I0,es as L0,et as M0}from"./install.6cb28b74.js";var Xn=Math.sin,Kn=Math.cos,Lp=Math.PI,ir=Math.PI*2,P0=180/Lp,R0=function(){function a(){}return a.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},a.prototype.moveTo=function(e,t){this._add("M",e,t)},a.prototype.lineTo=function(e,t){this._add("L",e,t)},a.prototype.bezierCurveTo=function(e,t,r,i,n,o){this._add("C",e,t,r,i,n,o)},a.prototype.quadraticCurveTo=function(e,t,r,i){this._add("Q",e,t,r,i)},a.prototype.arc=function(e,t,r,i,n,o){this.ellipse(e,t,r,r,0,i,n,o)},a.prototype.ellipse=function(e,t,r,i,n,o,s,l){var u=s-o,v=!l,c=Math.abs(u),h=Ze(c-ir)||(v?u>=ir:-u>=ir),f=u>0?u%ir:u%ir+ir,p=!1;h?p=!0:Ze(c)?p=!1:p=f>=Lp==!!v;var d=e+r*Kn(o),g=t+i*Xn(o);this._start&&this._add("M",d,g);var y=Math.round(n*P0);if(h){var m=1/this._p,x=(v?1:-1)*(ir-m);this._add("A",r,i,y,1,+v,e+r*Kn(o+x),t+i*Xn(o+x)),m>.01&&this._add("A",r,i,y,0,+v,d,g)}else{var S=e+r*Kn(s),_=t+i*Xn(s);this._add("A",r,i,y,+p,+v,S,_)}},a.prototype.rect=function(e,t,r,i){this._add("M",e,t),this._add("l",r,0),this._add("l",0,i),this._add("l",-r,0),this._add("Z")},a.prototype.closePath=function(){this._d.length>0&&this._add("Z")},a.prototype._add=function(e,t,r,i,n,o,s,l,u){for(var v=[],c=this._p,h=1;h<arguments.length;h++){var f=arguments[h];if(isNaN(f)){this._invalid=!0;return}v.push(Math.round(f*c)/c)}this._d.push(e+v.join(" ")),this._start=e==="Z"},a.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},a.prototype.getStr=function(){return this._str},a}();const Mp=R0;var La="none",k0=Math.round;function E0(a){var e=a.fill;return e!=null&&e!==La}function V0(a){var e=a.stroke;return e!=null&&e!==La}var ps=["lineCap","miterLimit","lineJoin"],N0=z(ps,function(a){return"stroke-"+a.toLowerCase()});function O0(a,e,t,r){var i=e.opacity==null?1:e.opacity;if(t instanceof ye){a("opacity",i);return}if(E0(e)){var n=Ur(e.fill);a("fill",n.color);var o=e.fillOpacity!=null?e.fillOpacity*n.opacity*i:n.opacity*i;(r||o<1)&&a("fill-opacity",o)}else a("fill",La);if(V0(e)){var s=Ur(e.stroke);a("stroke",s.color);var l=e.strokeNoScale?t.getLineScale():1,u=l?(e.lineWidth||0)/l:0,v=e.strokeOpacity!=null?e.strokeOpacity*s.opacity*i:s.opacity*i,c=e.strokeFirst;if((r||u!==1)&&a("stroke-width",u),(r||c)&&a("paint-order",c?"stroke":"fill"),(r||v<1)&&a("stroke-opacity",v),e.lineDash){var h=Ty(t),f=h[0],p=h[1];f&&(p=k0(p||0),a("stroke-dasharray",f.join(",")),(p||r)&&a("stroke-dashoffset",p))}else r&&a("stroke-dasharray",La);for(var d=0;d<ps.length;d++){var g=ps[d];if(r||e[g]!==su[g]){var y=e[g]||su[g];y&&a(N0[d],y)}}}else r&&a("stroke",La)}var Pp="http://www.w3.org/2000/svg",Rp="http://www.w3.org/1999/xlink",z0="http://www.w3.org/2000/xmlns/",B0="http://www.w3.org/XML/1998/namespace";function kp(a){return document.createElementNS(Pp,a)}function Nt(a,e,t,r,i){return{tag:a,attrs:t||{},children:r,text:i,key:e}}function G0(a,e){var t=[];if(e)for(var r in e){var i=e[r],n=r;i!==!1&&(i!==!0&&i!=null&&(n+='="'+i+'"'),t.push(n))}return"<"+a+" "+t.join(" ")+">"}function F0(a){return"</"+a+">"}function ll(a,e){e=e||{};var t=e.newline?`
`:"";function r(i){var n=i.children,o=i.tag,s=i.attrs;return G0(o,s)+(i.text||"")+(n?""+t+z(n,function(l){return r(l)}).join(t)+t:"")+F0(o)}return r(a)}function H0(a,e,t){t=t||{};var r=t.newline?`
`:"",i=" {"+r,n=r+"}",o=z(Ct(a),function(l){return l+i+z(Ct(a[l]),function(u){return u+":"+a[l][u]+";"}).join(r)+n}).join(r),s=z(Ct(e),function(l){return"@keyframes "+l+i+z(Ct(e[l]),function(u){return u+i+z(Ct(e[l][u]),function(v){var c=e[l][u][v];return v==="d"&&(c='path("'+c+'")'),v+":"+c+";"}).join(r)+n}).join(r)+n}).join(r);return!o&&!s?"":["<![CDATA[",o,s,"]]>"].join(r)}function ds(a){return{zrId:a,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function Mu(a,e,t,r){return Nt("svg","root",{width:a,height:e,xmlns:Pp,"xmlns:xlink":Rp,version:"1.1",baseProfile:"full",viewBox:r?"0 0 "+a+" "+e:!1},t)}var Pu={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},or="transform-origin";function W0(a,e,t){var r=H({},a.shape);H(r,e),a.buildPath(t,r);var i=new Mp;return i.reset(Yf(a)),t.rebuildPath(i,1),i.generateStr(),i.getStr()}function $0(a,e){var t=e.originX,r=e.originY;(t||r)&&(a[or]=t+"px "+r+"px")}var Z0={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function Ep(a,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=a,t}function U0(a,e,t){var r=a.shape.paths,i={},n,o;if(C(r,function(l){var u=ds(t.zrId);u.animation=!0,Rn(l,{},u,!0);var v=u.cssAnims,c=u.cssNodes,h=Ct(v),f=h.length;if(!!f){o=h[f-1];var p=v[o];for(var d in p){var g=p[d];i[d]=i[d]||{d:""},i[d].d+=g.d||""}for(var y in c){var m=c[y].animation;m.indexOf(o)>=0&&(n=m)}}}),!!n){e.d=!1;var s=Ep(i,t);return n.replace(o,s)}}function Ru(a){return K(a)?Pu[a]?"cubic-bezier("+Pu[a]+")":Cy(a)?a:"":""}function Rn(a,e,t,r){var i=a.animators,n=i.length,o=[];if(a instanceof Zf){var s=U0(a,e,t);if(s)o.push(s);else if(!n)return}else if(!n)return;for(var l={},u=0;u<n;u++){var v=i[u],c=[v.getMaxTime()/1e3+"s"],h=Ru(v.getClip().easing),f=v.getDelay();h?c.push(h):c.push("linear"),f&&c.push(f/1e3+"s"),v.getLoop()&&c.push("infinite");var p=c.join(" ");l[p]=l[p]||[p,[]],l[p][1].push(v)}function d(m){var x=m[1],S=x.length,_={},b={},w={},A="animation-timing-function";function T(Y,ut,st){for(var ht=Y.getTracks(),Vt=Y.getMaxTime(),Gt=0;Gt<ht.length;Gt++){var mt=ht[Gt];if(mt.needsAnimate()){var Mt=mt.keyframes,Tt=mt.propName;if(st&&(Tt=st(Tt)),Tt)for(var Zt=0;Zt<Mt.length;Zt++){var Ce=Mt[Zt],Jt=Math.round(Ce.time/Vt*100)+"%",si=Ru(Ce.easing),Be=Ce.rawValue;(K(Be)||re(Be))&&(ut[Jt]=ut[Jt]||{},ut[Jt][Tt]=Ce.rawValue,si&&(ut[Jt][A]=si))}}}}for(var D=0;D<S;D++){var I=x[D],L=I.targetName;L?L==="shape"&&T(I,b):!r&&T(I,_)}for(var M in _){var P={};Dy(P,a),H(P,_[M]);var R=Uf(P),E=_[M][A];w[M]=R?{transform:R}:{},$0(w[M],P),E&&(w[M][A]=E)}var N,V=!0;for(var M in b){w[M]=w[M]||{};var O=!N,E=b[M][A];O&&(N=new tl);var W=N.len();N.reset(),w[M].d=W0(a,b[M],N);var Z=N.len();if(!O&&W!==Z){V=!1;break}E&&(w[M][A]=E)}if(!V)for(var M in w)delete w[M].d;if(!r)for(var D=0;D<S;D++){var I=x[D],L=I.targetName;L==="style"&&T(I,w,function(ht){return Z0[ht]})}for(var X=Ct(w),Q=!0,at,D=1;D<X.length;D++){var gt=X[D-1],pt=X[D];if(w[gt][or]!==w[pt][or]){Q=!1;break}at=w[gt][or]}if(Q&&at){for(var M in w)w[M][or]&&delete w[M][or];e[or]=at}if(te(X,function(Y){return Ct(w[Y]).length>0}).length){var et=Ep(w,t);return et+" "+m[0]+" both"}}for(var g in l){var s=d(l[g]);s&&o.push(s)}if(o.length){var y=t.zrId+"-cls-"+t.cssClassIdx++;t.cssNodes["."+y]={animation:o.join(",")},e.class=y}}var Va=Math.round;function Vp(a){return a&&K(a.src)}function Np(a){return a&&rt(a.toDataURL)}function ul(a,e,t,r){O0(function(i,n){var o=i==="fill"||i==="stroke";o&&Vy(n)?tx(e,a,i,r):o&&Ny(n)?ex(t,a,i,r):a[i]=n},e,t,!1),Q0(t,a,r)}function ku(a){return Ze(a[0]-1)&&Ze(a[1])&&Ze(a[2])&&Ze(a[3]-1)}function Y0(a){return Ze(a[4])&&Ze(a[5])}function vl(a,e,t){if(e&&!(Y0(e)&&ku(e))){var r=t?10:1e4;a.transform=ku(e)?"translate("+Va(e[4]*r)/r+" "+Va(e[5]*r)/r+")":Oy(e)}}function Eu(a,e,t){for(var r=a.points,i=[],n=0;n<r.length;n++)i.push(Va(r[n][0]*t)/t),i.push(Va(r[n][1]*t)/t);e.points=i.join(" ")}function Vu(a){return!a.smooth}function X0(a){var e=z(a,function(t){return typeof t=="string"?[t,t]:t});return function(t,r,i){for(var n=0;n<e.length;n++){var o=e[n],s=t[o[0]];s!=null&&(r[o[1]]=Va(s*i)/i)}}}var K0={circle:[X0(["cx","cy","r"])],polyline:[Eu,Vu],polygon:[Eu,Vu]};function q0(a){for(var e=a.animators,t=0;t<e.length;t++)if(e[t].targetName==="shape")return!0;return!1}function Op(a,e){var t=a.style,r=a.shape,i=K0[a.type],n={},o=e.animation,s="path",l=a.style.strokePercent,u=e.compress&&Yf(a)||4;if(i&&!e.willUpdate&&!(i[1]&&!i[1](r))&&!(o&&q0(a))&&!(l<1)){s=a.type;var v=Math.pow(10,u);i[0](r,n,v)}else{a.path||a.createPathProxy();var c=a.path;a.shapeChanged()&&(c.beginPath(),a.buildPath(c,a.shape),a.pathUpdated());var h=c.getVersion(),f=a,p=f.__svgPathBuilder;(f.__svgPathVersion!==h||!p||l!==f.__svgPathStrokePercent)&&(p||(p=f.__svgPathBuilder=new Mp),p.reset(u),c.rebuildPath(p,l),p.generateStr(),f.__svgPathVersion=h,f.__svgPathStrokePercent=l),n.d=p.getStr()}return vl(n,a.transform),ul(n,t,a,e),e.animation&&Rn(a,n,e),Nt(s,a.id+"",n)}function j0(a,e){var t=a.style,r=t.image;if(r&&!K(r)&&(Vp(r)?r=r.src:Np(r)&&(r=r.toDataURL())),!!r){var i=t.x||0,n=t.y||0,o=t.width,s=t.height,l={href:r,width:o,height:s};return i&&(l.x=i),n&&(l.y=n),vl(l,a.transform),ul(l,t,a,e),e.animation&&Rn(a,l,e),Nt("image",a.id+"",l)}}function J0(a,e){var t=a.style,r=t.text;if(r!=null&&(r+=""),!(!r||isNaN(t.x)||isNaN(t.y))){var i=t.font||Iy,n=t.x||0,o=Ly(t.y||0,My(i),t.textBaseline),s=Py[t.textAlign]||t.textAlign,l={"dominant-baseline":"central","text-anchor":s};if(Ry(t)){var u="",v=t.fontStyle,c=ky(t.fontSize);if(!parseFloat(c))return;var h=t.fontFamily||Ey,f=t.fontWeight;u+="font-size:"+c+";font-family:"+h+";",v&&v!=="normal"&&(u+="font-style:"+v+";"),f&&f!=="normal"&&(u+="font-weight:"+f+";"),l.style=u}else l.style="font: "+i;return r.match(/\s/)&&(l["xml:space"]="preserve"),n&&(l.x=n),o&&(l.y=o),vl(l,a.transform),ul(l,t,a,e),e.animation&&Rn(a,l,e),Nt("text",a.id+"",l,void 0,r)}}function Nu(a,e){if(a instanceof Dt)return Op(a,e);if(a instanceof ye)return j0(a,e);if(a instanceof Xf)return J0(a,e)}function Q0(a,e,t){var r=a.style;if(zy(r)){var i=By(a),n=t.shadowCache,o=n[i];if(!o){var s=a.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var v=r.shadowOffsetX||0,c=r.shadowOffsetY||0,h=r.shadowBlur,f=Ur(r.shadowColor),p=f.opacity,d=f.color,g=h/2/l,y=h/2/u,m=g+" "+y;o=t.zrId+"-s"+t.shadowIdx++,t.defs[o]=Nt("filter",o,{id:o,x:"-100%",y:"-100%",width:"300%",height:"300%"},[Nt("feDropShadow","",{dx:v/l,dy:c/u,stdDeviation:m,"flood-color":d,"flood-opacity":p})]),n[i]=o}e.filter=gn(o)}}function tx(a,e,t,r){var i=a[t],n,o={gradientUnits:i.global?"userSpaceOnUse":"objectBoundingBox"};if(Gy(i))n="linearGradient",o.x1=i.x,o.y1=i.y,o.x2=i.x2,o.y2=i.y2;else if(Fy(i))n="radialGradient",o.cx=Ft(i.x,.5),o.cy=Ft(i.y,.5),o.r=Ft(i.r,.5);else{yn("Illegal gradient type.");return}for(var s=i.colorStops,l=[],u=0,v=s.length;u<v;++u){var c=Hy(s[u].offset)*100+"%",h=s[u].color,f=Ur(h),p=f.color,d=f.opacity,g={offset:c};g["stop-color"]=p,d<1&&(g["stop-opacity"]=d),l.push(Nt("stop",u+"",g))}var y=Nt(n,"",o,l),m=ll(y),x=r.gradientCache,S=x[m];S||(S=r.zrId+"-g"+r.gradientIdx++,x[m]=S,o.id=S,r.defs[S]=Nt(n,S,o,l)),e[t]=gn(S)}function ex(a,e,t,r){var i=a.style[t],n={patternUnits:"userSpaceOnUse"},o;if(Wy(i)){var s=i.imageWidth,l=i.imageHeight,u=void 0,v=i.image;if(K(v)?u=v:Vp(v)?u=v.src:Np(v)&&(u=v.toDataURL()),typeof Image>"u"){var c="Image width/height must been given explictly in svg-ssr renderer.";dt(s,c),dt(l,c)}else if(s==null||l==null){var h=function(m,x){if(m){var S=m.elm,_=m.attrs.width=s||x.width,b=m.attrs.height=l||x.height;S&&(S.setAttribute("width",_),S.setAttribute("height",b))}},f=$y(u,null,a,function(m){h(p,m),h(o,m)});f&&f.width&&f.height&&(s=s||f.width,l=l||f.height)}o=Nt("image","img",{href:u,width:s,height:l}),n.width=s,n.height=l}else i.svgElement&&(o=i.svgElement,n.width=i.svgWidth,n.height=i.svgHeight);if(!!o){n.patternTransform=Uf(i);var p=Nt("pattern","",n,[o]),d=ll(p),g=r.patternCache,y=g[d];y||(y=r.zrId+"-p"+r.patternIdx++,g[d]=y,n.id=y,p=r.defs[y]=Nt("pattern",y,n,[o])),e[t]=gn(y)}}function rx(a,e,t){var r=t.clipPathCache,i=t.defs,n=r[a.id];if(!n){n=t.zrId+"-c"+t.clipPathIdx++;var o={id:n};r[a.id]=n,i[n]=Nt("clipPath",n,o,[Op(a,t)])}e["clip-path"]=gn(n)}function Ou(a){return document.createTextNode(a)}function cr(a,e,t){a.insertBefore(e,t)}function zu(a,e){a.removeChild(e)}function Bu(a,e){a.appendChild(e)}function zp(a){return a.parentNode}function Bp(a){return a.nextSibling}function qn(a,e){a.textContent=e}var Gu=58,ax=120,ix=Nt("","");function gs(a){return a===void 0}function we(a){return a!==void 0}function nx(a,e,t){for(var r={},i=e;i<=t;++i){var n=a[i].key;n!==void 0&&(r[n]!=null&&console.error("Duplicate key "+n),r[n]=i)}return r}function wa(a,e){var t=a.key===e.key,r=a.tag===e.tag;return r&&t}function Na(a){var e,t=a.children,r=a.tag;if(we(r)){var i=a.elm=kp(r);if(cl(ix,a),B(t))for(e=0;e<t.length;++e){var n=t[e];n!=null&&Bu(i,Na(n))}else we(a.text)&&!St(a.text)&&Bu(i,Ou(a.text))}else a.elm=Ou(a.text);return a.elm}function Gp(a,e,t,r,i){for(;r<=i;++r){var n=t[r];n!=null&&cr(a,Na(n),e)}}function Ui(a,e,t,r){for(;t<=r;++t){var i=e[t];if(i!=null)if(we(i.tag)){var n=zp(i.elm);zu(n,i.elm)}else zu(a,i.elm)}}function cl(a,e){var t,r=e.elm,i=a&&a.attrs||{},n=e.attrs||{};if(i!==n){for(t in n){var o=n[t],s=i[t];s!==o&&(o===!0?r.setAttribute(t,""):o===!1?r.removeAttribute(t):t.charCodeAt(0)!==ax?r.setAttribute(t,o):t==="xmlns:xlink"||t==="xmlns"?r.setAttributeNS(z0,t,o):t.charCodeAt(3)===Gu?r.setAttributeNS(B0,t,o):t.charCodeAt(5)===Gu?r.setAttributeNS(Rp,t,o):r.setAttribute(t,o))}for(t in i)t in n||r.removeAttribute(t)}}function ox(a,e,t){for(var r=0,i=0,n=e.length-1,o=e[0],s=e[n],l=t.length-1,u=t[0],v=t[l],c,h,f,p;r<=n&&i<=l;)o==null?o=e[++r]:s==null?s=e[--n]:u==null?u=t[++i]:v==null?v=t[--l]:wa(o,u)?(Or(o,u),o=e[++r],u=t[++i]):wa(s,v)?(Or(s,v),s=e[--n],v=t[--l]):wa(o,v)?(Or(o,v),cr(a,o.elm,Bp(s.elm)),o=e[++r],v=t[--l]):wa(s,u)?(Or(s,u),cr(a,s.elm,o.elm),s=e[--n],u=t[++i]):(gs(c)&&(c=nx(e,r,n)),h=c[u.key],gs(h)?cr(a,Na(u),o.elm):(f=e[h],f.tag!==u.tag?cr(a,Na(u),o.elm):(Or(f,u),e[h]=void 0,cr(a,f.elm,o.elm))),u=t[++i]);(r<=n||i<=l)&&(r>n?(p=t[l+1]==null?null:t[l+1].elm,Gp(a,p,t,i,l)):Ui(a,e,r,n))}function Or(a,e){var t=e.elm=a.elm,r=a.children,i=e.children;a!==e&&(cl(a,e),gs(e.text)?we(r)&&we(i)?r!==i&&ox(t,r,i):we(i)?(we(a.text)&&qn(t,""),Gp(t,null,i,0,i.length-1)):we(r)?Ui(t,r,0,r.length-1):we(a.text)&&qn(t,""):a.text!==e.text&&(we(r)&&Ui(t,r,0,r.length-1),qn(t,e.text)))}function sx(a,e){if(wa(a,e))Or(a,e);else{var t=a.elm,r=zp(t);Na(e),r!==null&&(cr(r,e.elm,Bp(t)),Ui(r,[a],0,0))}return e}var lx=0,ux=function(){function a(e,t,r){if(this.type="svg",this.refreshHover=Fu("refreshHover"),this.configLayer=Fu("configLayer"),this.storage=t,this._opts=r=H({},r),this.root=e,this._id="zr"+lx++,this._oldVNode=Mu(r.width,r.height),e&&!r.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var n=this._svgDom=this._oldVNode.elm=kp("svg");cl(null,this._oldVNode),i.appendChild(n),e.appendChild(i)}this.resize(r.width,r.height)}return a.prototype.getType=function(){return this.type},a.prototype.getViewportRoot=function(){return this._viewport},a.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},a.prototype.getSvgDom=function(){return this._svgDom},a.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",sx(this._oldVNode,e),this._oldVNode=e}},a.prototype.renderOneToVNode=function(e){return Nu(e,ds(this._id))},a.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),r=this._backgroundColor,i=this._width,n=this._height,o=ds(this._id);o.animation=e.animation,o.willUpdate=e.willUpdate,o.compress=e.compress;var s=[];if(r&&r!=="none"){var l=Ur(r),u=l.color,v=l.opacity;this._bgVNode=Nt("rect","bg",{width:i,height:n,x:"0",y:"0",id:"0",fill:u,"fill-opacity":v}),s.push(this._bgVNode)}else this._bgVNode=null;var c=e.compress?null:this._mainVNode=Nt("g","main",{},[]);this._paintList(t,o,c?c.children:s),c&&s.push(c);var h=z(Ct(o.defs),function(d){return o.defs[d]});if(h.length&&s.push(Nt("defs","defs",{},h)),e.animation){var f=H0(o.cssNodes,o.cssAnims,{newline:!0});if(f){var p=Nt("style","stl",{},[],f);s.push(p)}}return Mu(i,n,s,e.useViewBox)},a.prototype.renderToString=function(e){return e=e||{},ll(this.renderToVNode({animation:Ft(e.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:Ft(e.useViewBox,!0)}),{newline:!0})},a.prototype.setBackgroundColor=function(e){this._backgroundColor=e;var t=this._bgVNode;if(t&&t.elm){var r=Ur(e),i=r.color,n=r.opacity;t.elm.setAttribute("fill",i),n<1&&t.elm.setAttribute("fill-opacity",n)}},a.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},a.prototype._paintList=function(e,t,r){for(var i=e.length,n=[],o=0,s,l,u=0,v=0;v<i;v++){var c=e[v];if(!c.invisible){var h=c.__clipPaths,f=h&&h.length||0,p=l&&l.length||0,d=void 0;for(d=Math.max(f-1,p-1);d>=0&&!(h&&l&&h[d]===l[d]);d--);for(var g=p-1;g>d;g--)o--,s=n[o-1];for(var y=d+1;y<f;y++){var m={};rx(h[y],m,t);var x=Nt("g","clip-g-"+u++,m,[]);(s?s.children:r).push(x),n[o++]=x,s=x}l=h;var S=Nu(c,t);S&&(s?s.children:r).push(S)}}},a.prototype.resize=function(e,t){var r=this._opts,i=this.root,n=this._viewport;if(e!=null&&(r.width=e),t!=null&&(r.height=t),i&&n&&(n.style.display="none",e=lu(i,0,r),t=lu(i,1,r),n.style.display=""),this._width!==e||this._height!==t){if(this._width=e,this._height=t,n){var o=n.style;o.width=e+"px",o.height=t+"px"}var s=this._svgDom;s&&(s.setAttribute("width",e),s.setAttribute("height",t))}},a.prototype.getWidth=function(){return this._width},a.prototype.getHeight=function(){return this._height},a.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},a.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},a.prototype.toDataURL=function(e){var t=encodeURIComponent(this.renderToString()),r="data:image/svg+xml;";return e?(t=Zy(t),t&&r+"base64,"+t):r+"charset=UTF-8,"+t},a}();function Fu(a){return function(){yn('In SVG mode painter not support method "'+a+'"')}}const vx=ux;function cx(a){a.registerPainter("svg",vx)}var hx=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t){{var r=t.coordinateSystem;if(r!=="polar"&&r!=="cartesian2d")throw new Error("Line not support coordinateSystem besides cartesian and polar")}return ze(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(t){var r=new U,i=kt("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);r.add(i),i.setStyle(t.lineStyle);var n=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=n==="none"?"circle":n,l=t.itemHeight*.8,u=kt(s,(t.itemWidth-l)/2,(t.itemHeight-l)/2,l,l,t.itemStyle.fill);r.add(u),u.setStyle(t.itemStyle);var v=t.iconRotate==="inherit"?o:t.iconRotate||0;return u.rotation=v*Math.PI/180,u.setOrigin([t.itemWidth/2,t.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),r},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(At);const fx=hx;function Qr(a,e){var t=a.mapDimensionsAll("defaultedLabel"),r=t.length;if(r===1){var i=uu(a,e,t[0]);return i!=null?i+"":null}else if(r){for(var n=[],o=0;o<t.length;o++)n.push(uu(a,e,t[o]));return n.join(" ")}}function Fp(a,e){var t=a.mapDimensionsAll("defaultedLabel");if(!B(e))return e+"";for(var r=[],i=0;i<t.length;i++){var n=a.getDimensionIndex(t[i]);n>=0&&r.push(e[n])}return r.join(" ")}var px=function(a){k(e,a);function e(t,r,i,n){var o=a.call(this)||this;return o.updateData(t,r,i,n),o}return e.prototype._createSymbol=function(t,r,i,n,o){this.removeAll();var s=kt(t,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:n[0]/2,scaleY:n[1]/2}),s.drift=dx,this._symbolType=t,this.add(s)},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(){dr(this.childAt(0))},e.prototype.downplay=function(){gr(this.childAt(0))},e.prototype.setZ=function(t,r){var i=this.childAt(0);i.zlevel=t,i.z=r},e.prototype.setDraggable=function(t){var r=this.childAt(0);r.draggable=t,r.cursor=t?"move":r.cursor},e.prototype.updateData=function(t,r,i,n){this.silent=!1;var o=t.getItemVisual(r,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,r),u=o!==this._symbolType,v=n&&n.disableAnimation;if(u){var c=t.getItemVisual(r,"symbolKeepAspect");this._createSymbol(o,t,r,l,c)}else{var h=this.childAt(0);h.silent=!1;var f={scaleX:l[0]/2,scaleY:l[1]/2};v?h.attr(f):ot(h,f,s,r),pe(h)}if(this._updateCommon(t,r,l,i,n),u){var h=this.childAt(0);if(!v){var f={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,wt(h,f,s,r)}}v&&this.childAt(0).stopAnimation("leave"),this._seriesModel=s},e.prototype._updateCommon=function(t,r,i,n,o){var s=this.childAt(0),l=t.hostModel,u,v,c,h,f,p,d,g,y;if(n&&(u=n.emphasisItemStyle,v=n.blurItemStyle,c=n.selectItemStyle,h=n.focus,f=n.blurScope,d=n.labelStatesModels,g=n.hoverScale,y=n.cursorStyle,p=n.emphasisDisabled),!n||t.hasItemOption){var m=n&&n.itemModel?n.itemModel:t.getItemModel(r),x=m.getModel("emphasis");u=x.getModel("itemStyle").getItemStyle(),c=m.getModel(["select","itemStyle"]).getItemStyle(),v=m.getModel(["blur","itemStyle"]).getItemStyle(),h=x.get("focus"),f=x.get("blurScope"),p=x.get("disabled"),d=Ht(m),g=x.getShallow("scale"),y=m.getShallow("cursor")}var S=t.getItemVisual(r,"symbolRotate");s.attr("rotation",(S||0)*Math.PI/180||0);var _=ia(t.getItemVisual(r,"symbolOffset"),i);_&&(s.x=_[0],s.y=_[1]),y&&s.attr("cursor",y);var b=t.getItemVisual(r,"style"),w=b.fill;if(s instanceof ye){var A=s.style;s.useStyle(H({image:A.image,x:A.x,y:A.y,width:A.width,height:A.height},b))}else s.__isEmptyBrush?s.useStyle(H({},b)):s.useStyle(b),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var T=t.getItemVisual(r,"liftZ"),D=this._z2;T!=null?D==null&&(this._z2=s.z2,s.z2+=T):D!=null&&(s.z2=D,this._z2=null);var I=o&&o.useNameLabel;Yt(s,d,{labelFetcher:l,labelDataIndex:r,defaultText:L,inheritColor:w,defaultOpacity:b.opacity});function L(R){return I?t.getName(R):Qr(t,R)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var M=s.ensureState("emphasis");if(M.style=u,s.ensureState("select").style=c,s.ensureState("blur").style=v,g){var P=Math.max(1.1,3/this._sizeY);M.scaleX=this._sizeX*P,M.scaleY=this._sizeY*P}this.setSymbolScale(1),bt(this,h,f,p)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,r){var i=this.childAt(0),n=this._seriesModel,o=tt(this).dataIndex,s=r&&r.animation;if(this.silent=i.silent=!0,r&&r.fadeLabel){var l=i.getTextContent();l&&Yr(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();Yr(i,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,r){return Ua(t.getItemVisual(r,"symbolSize"))},e}(U);function dx(a,e){this.parent.drift(a,e)}const Qa=px;function jn(a,e,t,r){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(r.isIgnore&&r.isIgnore(t))&&!(r.clipShape&&!r.clipShape.contain(e[0],e[1]))&&a.getItemVisual(t,"symbol")!=="none"}function Hu(a){return a!=null&&!St(a)&&(a={isIgnore:a}),a||{}}function Wu(a){var e=a.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:Ht(e),cursorStyle:e.get("cursor")}}var gx=function(){function a(e){this.group=new U,this._SymbolCtor=e||Qa}return a.prototype.updateData=function(e,t){this._progressiveEls=null,t=Hu(t);var r=this.group,i=e.hostModel,n=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=Wu(e),u={disableAnimation:s},v=t.getSymbolPoint||function(c){return e.getItemLayout(c)};n||r.removeAll(),e.diff(n).add(function(c){var h=v(c);if(jn(e,h,c,t)){var f=new o(e,c,l,u);f.setPosition(h),e.setItemGraphicEl(c,f),r.add(f)}}).update(function(c,h){var f=n.getItemGraphicEl(h),p=v(c);if(!jn(e,p,c,t)){r.remove(f);return}var d=e.getItemVisual(c,"symbol")||"circle",g=f&&f.getSymbolType&&f.getSymbolType();if(!f||g&&g!==d)r.remove(f),f=new o(e,c,l,u),f.setPosition(p);else{f.updateData(e,c,l,u);var y={x:p[0],y:p[1]};s?f.attr(y):ot(f,y,i)}r.add(f),e.setItemGraphicEl(c,f)}).remove(function(c){var h=n.getItemGraphicEl(c);h&&h.fadeOut(function(){r.remove(h)})}).execute(),this._getSymbolPoint=v,this._data=e},a.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(r,i){var n=e._getSymbolPoint(i);r.setPosition(n),r.markRedraw()})},a.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=Wu(e),this._data=null,this.group.removeAll()},a.prototype.incrementalUpdate=function(e,t,r){this._progressiveEls=[],r=Hu(r);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var n=e.start;n<e.end;n++){var o=t.getItemLayout(n);if(jn(t,o,n,r)){var s=new this._SymbolCtor(t,n,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),t.setItemGraphicEl(n,s),this._progressiveEls.push(s)}}},a.prototype.eachRendered=function(e){na(this._progressiveEls||this.group,e)},a.prototype.remove=function(e){var t=this.group,r=this._data;r&&e?r.eachItemGraphicEl(function(i){i.fadeOut(function(){t.remove(i)})}):t.removeAll()},a}();const ti=gx;function Hp(a,e,t){var r=a.getBaseAxis(),i=a.getOtherAxis(r),n=yx(i,t),o=r.dim,s=i.dim,l=e.mapDimension(s),u=e.mapDimension(o),v=s==="x"||s==="radius"?1:0,c=z(a.dimensions,function(p){return e.mapDimension(p)}),h=!1,f=e.getCalculationInfo("stackResultDimension");return Xr(e,c[0])&&(h=!0,c[0]=f),Xr(e,c[1])&&(h=!0,c[1]=f),{dataDimsForPoint:c,valueStart:n,valueAxisDim:s,baseAxisDim:o,stacked:!!h,valueDim:l,baseDim:u,baseDataOffset:v,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function yx(a,e){var t=0,r=a.scale.getExtent();return e==="start"?t=r[0]:e==="end"?t=r[1]:r[0]>0?t=r[0]:r[1]<0&&(t=r[1]),t}function Wp(a,e,t,r){var i=NaN;a.stacked&&(i=t.get(t.getCalculationInfo("stackedOverDimension"),r)),isNaN(i)&&(i=a.valueStart);var n=a.baseDataOffset,o=[];return o[n]=t.get(a.baseDim,r),o[1-n]=i,e.dataToPoint(o)}function mx(a,e){var t=[];return e.diff(a).add(function(r){t.push({cmd:"+",idx:r})}).update(function(r,i){t.push({cmd:"=",idx:i,idx1:r})}).remove(function(r){t.push({cmd:"-",idx:r})}).execute(),t}function xx(a,e,t,r,i,n,o,s){for(var l=mx(a,e),u=[],v=[],c=[],h=[],f=[],p=[],d=[],g=Hp(i,e,o),y=a.getLayout("points")||[],m=e.getLayout("points")||[],x=0;x<l.length;x++){var S=l[x],_=!0,b=void 0,w=void 0;switch(S.cmd){case"=":b=S.idx*2,w=S.idx1*2;var A=y[b],T=y[b+1],D=m[w],I=m[w+1];(isNaN(A)||isNaN(T))&&(A=D,T=I),u.push(A,T),v.push(D,I),c.push(t[b],t[b+1]),h.push(r[w],r[w+1]),d.push(e.getRawIndex(S.idx1));break;case"+":var L=S.idx,M=g.dataDimsForPoint,P=i.dataToPoint([e.get(M[0],L),e.get(M[1],L)]);w=L*2,u.push(P[0],P[1]),v.push(m[w],m[w+1]);var R=Wp(g,i,e,L);c.push(R[0],R[1]),h.push(r[w],r[w+1]),d.push(e.getRawIndex(L));break;case"-":_=!1}_&&(f.push(S),p.push(p.length))}p.sort(function(gt,pt){return d[gt]-d[pt]});for(var E=u.length,N=pr(E),V=pr(E),O=pr(E),W=pr(E),Z=[],x=0;x<p.length;x++){var X=p[x],Q=x*2,at=X*2;N[Q]=u[at],N[Q+1]=u[at+1],V[Q]=v[at],V[Q+1]=v[at+1],O[Q]=c[at],O[Q+1]=c[at+1],W[Q]=h[at],W[Q+1]=h[at+1],Z[x]=f[X]}return{current:N,next:V,stackedOnCurrent:O,stackedOnNext:W,status:Z}}var Ge=Math.min,Fe=Math.max;function mr(a,e){return isNaN(a)||isNaN(e)}function ys(a,e,t,r,i,n,o,s,l){for(var u,v,c,h,f,p,d=t,g=0;g<r;g++){var y=e[d*2],m=e[d*2+1];if(d>=i||d<0)break;if(mr(y,m)){if(l){d+=n;continue}break}if(d===t)a[n>0?"moveTo":"lineTo"](y,m),c=y,h=m;else{var x=y-u,S=m-v;if(x*x+S*S<.5){d+=n;continue}if(o>0){for(var _=d+n,b=e[_*2],w=e[_*2+1];b===y&&w===m&&g<r;)g++,_+=n,d+=n,b=e[_*2],w=e[_*2+1],y=e[d*2],m=e[d*2+1],x=y-u,S=m-v;var A=g+1;if(l)for(;mr(b,w)&&A<r;)A++,_+=n,b=e[_*2],w=e[_*2+1];var T=.5,D=0,I=0,L=void 0,M=void 0;if(A>=r||mr(b,w))f=y,p=m;else{D=b-u,I=w-v;var P=y-u,R=b-y,E=m-v,N=w-m,V=void 0,O=void 0;if(s==="x"){V=Math.abs(P),O=Math.abs(R);var W=D>0?1:-1;f=y-W*V*o,p=m,L=y+W*O*o,M=m}else if(s==="y"){V=Math.abs(E),O=Math.abs(N);var Z=I>0?1:-1;f=y,p=m-Z*V*o,L=y,M=m+Z*O*o}else V=Math.sqrt(P*P+E*E),O=Math.sqrt(R*R+N*N),T=O/(O+V),f=y-D*o*(1-T),p=m-I*o*(1-T),L=y+D*o*T,M=m+I*o*T,L=Ge(L,Fe(b,y)),M=Ge(M,Fe(w,m)),L=Fe(L,Ge(b,y)),M=Fe(M,Ge(w,m)),D=L-y,I=M-m,f=y-D*V/O,p=m-I*V/O,f=Ge(f,Fe(u,y)),p=Ge(p,Fe(v,m)),f=Fe(f,Ge(u,y)),p=Fe(p,Ge(v,m)),D=y-f,I=m-p,L=y+D*O/V,M=m+I*O/V}a.bezierCurveTo(c,h,f,p,y,m),c=L,h=M}else a.lineTo(y,m)}u=y,v=m,d+=n}return g}var $p=function(){function a(){this.smooth=0,this.smoothConstraint=!0}return a}(),Sx=function(a){k(e,a);function e(t){var r=a.call(this,t)||this;return r.type="ec-polyline",r}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new $p},e.prototype.buildPath=function(t,r){var i=r.points,n=0,o=i.length/2;if(r.connectNulls){for(;o>0&&mr(i[o*2-2],i[o*2-1]);o--);for(;n<o&&mr(i[n*2],i[n*2+1]);n++);}for(;n<o;)n+=ys(t,i,n,o,o,1,r.smooth,r.smoothMonotone,r.connectNulls)+1},e.prototype.getPointOn=function(t,r){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var i=this.path,n=i.data,o=tl.CMD,s,l,u=r==="x",v=[],c=0;c<n.length;){var h=n[c++],f=void 0,p=void 0,d=void 0,g=void 0,y=void 0,m=void 0,x=void 0;switch(h){case o.M:s=n[c++],l=n[c++];break;case o.L:if(f=n[c++],p=n[c++],x=u?(t-s)/(f-s):(t-l)/(p-l),x<=1&&x>=0){var S=u?(p-l)*x+l:(f-s)*x+s;return u?[t,S]:[S,t]}s=f,l=p;break;case o.C:f=n[c++],p=n[c++],d=n[c++],g=n[c++],y=n[c++],m=n[c++];var _=u?vu(s,f,d,y,t,v):vu(l,p,g,m,t,v);if(_>0)for(var b=0;b<_;b++){var w=v[b];if(w<=1&&w>=0){var S=u?cu(l,p,g,m,w):cu(s,f,d,y,w);return u?[t,S]:[S,t]}}s=y,l=m;break}}},e}(Dt),bx=function(a){k(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e}($p),Zp=function(a){k(e,a);function e(t){var r=a.call(this,t)||this;return r.type="ec-polygon",r}return e.prototype.getDefaultShape=function(){return new bx},e.prototype.buildPath=function(t,r){var i=r.points,n=r.stackedOnPoints,o=0,s=i.length/2,l=r.smoothMonotone;if(r.connectNulls){for(;s>0&&mr(i[s*2-2],i[s*2-1]);s--);for(;o<s&&mr(i[o*2],i[o*2+1]);o++);}for(;o<s;){var u=ys(t,i,o,s,s,1,r.smooth,l,r.connectNulls);ys(t,n,o+u-1,u,s,-1,r.stackedOnSmooth,l,r.connectNulls),o+=u+1,t.closePath()}},e}(Dt);function Up(a,e,t,r,i){var n=a.getArea(),o=n.x,s=n.y,l=n.width,u=n.height,v=t.get(["lineStyle","width"])||2;o-=v/2,s-=v/2,l+=v,u+=v,o=Math.floor(o),l=Math.round(l);var c=new ct({shape:{x:o,y:s,width:l,height:u}});if(e){var h=a.getBaseAxis(),f=h.isHorizontal(),p=h.inverse;f?(p&&(c.shape.x+=l),c.shape.width=0):(p||(c.shape.y+=u),c.shape.height=0);var d=rt(i)?function(g){i(g,c)}:null;wt(c,{shape:{width:l,height:u,x:o,y:s}},t,null,r,d)}return c}function Yp(a,e,t){var r=a.getArea(),i=Ae(r.r0,1),n=Ae(r.r,1),o=new ve({shape:{cx:Ae(a.cx,1),cy:Ae(a.cy,1),r0:i,r:n,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});if(e){var s=a.getBaseAxis().dim==="angle";s?o.shape.endAngle=r.startAngle:o.shape.r=i,wt(o,{shape:{endAngle:r.endAngle,r:n}},t)}return o}function kn(a,e,t,r,i){if(a){if(a.type==="polar")return Yp(a,e,t);if(a.type==="cartesian2d")return Up(a,e,t,r,i)}else return null;return null}function Pe(a,e){return a.type===e}function $u(a,e){if(a.length===e.length){for(var t=0;t<a.length;t++)if(a[t]!==e[t])return;return!0}}function Zu(a){for(var e=1/0,t=1/0,r=-1/0,i=-1/0,n=0;n<a.length;){var o=a[n++],s=a[n++];isNaN(o)||(e=Math.min(o,e),r=Math.max(o,r)),isNaN(s)||(t=Math.min(s,t),i=Math.max(s,i))}return[[e,t],[r,i]]}function Uu(a,e){var t=Zu(a),r=t[0],i=t[1],n=Zu(e),o=n[0],s=n[1];return Math.max(Math.abs(r[0]-o[0]),Math.abs(r[1]-o[1]),Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]))}function Yu(a){return re(a)?a:a?.5:0}function _x(a,e,t){if(!t.valueDim)return[];for(var r=e.count(),i=pr(r*2),n=0;n<r;n++){var o=Wp(t,a,e,n);i[n*2]=o[0],i[n*2+1]=o[1]}return i}function He(a,e,t){for(var r=e.getBaseAxis(),i=r.dim==="x"||r.dim==="radius"?0:1,n=[],o=0,s=[],l=[],u=[];o<a.length-2;o+=2)switch(u[0]=a[o+2],u[1]=a[o+3],l[0]=a[o],l[1]=a[o+1],n.push(l[0],l[1]),t){case"end":s[i]=u[i],s[1-i]=l[1-i],n.push(s[0],s[1]);break;case"middle":var v=(l[i]+u[i])/2,c=[];s[i]=c[i]=v,s[1-i]=l[1-i],c[1-i]=u[1-i],n.push(s[0],s[1]),n.push(c[0],c[1]);break;default:s[i]=l[i],s[1-i]=u[1-i],n.push(s[0],s[1])}return n.push(a[o++],a[o++]),n}function wx(a,e){var t=[],r=a.length,i,n;function o(v,c,h){var f=v.coord,p=(h-f)/(c.coord-f),d=Yy(p,[v.color,c.color]);return{coord:h,color:d}}for(var s=0;s<r;s++){var l=a[s],u=l.coord;if(u<0)i=l;else if(u>e){n?t.push(o(n,l,e)):i&&t.push(o(i,l,0),o(i,l,e));break}else i&&(t.push(o(i,l,0)),i=null),t.push(l),n=l}return t}function Ax(a,e,t){var r=a.getVisual("visualMeta");if(!(!r||!r.length||!a.count())){if(e.type!=="cartesian2d"){console.warn("Visual map on line style is only supported on cartesian2d.");return}for(var i,n,o=r.length-1;o>=0;o--){var s=a.getDimensionInfo(r[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){n=r[o];break}}if(!n){console.warn("Visual map on line style only support x or y dimension.");return}var l=e.getAxis(i),u=z(n.stops,function(x){return{coord:l.toGlobalCoord(l.dataToCoord(x.value)),color:x.color}}),v=u.length,c=n.outerColors.slice();v&&u[0].coord>u[v-1].coord&&(u.reverse(),c.reverse());var h=wx(u,i==="x"?t.getWidth():t.getHeight()),f=h.length;if(!f&&v)return u[0].coord<0?c[1]?c[1]:u[v-1].color:c[0]?c[0]:u[0].color;var p=10,d=h[0].coord-p,g=h[f-1].coord+p,y=g-d;if(y<.001)return"transparent";C(h,function(x){x.offset=(x.coord-d)/y}),h.push({offset:f?h[f-1].offset:.5,color:c[1]||"transparent"}),h.unshift({offset:f?h[0].offset:.5,color:c[0]||"transparent"});var m=new mn(0,0,0,0,h,!0);return m[i]=d,m[i+"2"]=g,m}}function Tx(a,e,t){var r=a.get("showAllSymbol"),i=r==="auto";if(!(r&&!i)){var n=t.getAxesByScale("ordinal")[0];if(!!n&&!(i&&Cx(n,e))){var o=e.mapDimension(n.dim),s={};return C(n.getViewLabels(),function(l){var u=n.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function Cx(a,e){var t=a.getExtent(),r=Math.abs(t[1]-t[0])/a.scale.count();isNaN(r)&&(r=0);for(var i=e.count(),n=Math.max(1,Math.round(i/5)),o=0;o<i;o+=n)if(Qa.getSymbolSize(e,o)[a.isHorizontal()?1:0]*1.5>r)return!1;return!0}function Dx(a,e){return isNaN(a)||isNaN(e)}function Ix(a){for(var e=a.length/2;e>0&&Dx(a[e*2-2],a[e*2-1]);e--);return e-1}function Xu(a,e){return[a[e*2],a[e*2+1]]}function Lx(a,e,t){for(var r=a.length/2,i=t==="x"?0:1,n,o,s=0,l=-1,u=0;u<r;u++)if(o=a[u*2+i],!(isNaN(o)||isNaN(a[u*2+1-i]))){if(u===0){n=o;continue}if(n<=e&&o>=e||n>=e&&o<=e){l=u;break}s=u,n=o}return{range:[s,l],t:(e-n)/(o-n)}}function Xp(a){if(a.get(["endLabel","show"]))return!0;for(var e=0;e<Ra.length;e++)if(a.get([Ra[e],"endLabel","show"]))return!0;return!1}function Jn(a,e,t,r){if(Pe(e,"cartesian2d")){var i=r.getModel("endLabel"),n=i.get("valueAnimation"),o=r.getData(),s={lastFrameIndex:0},l=Xp(r)?function(f,p){a._endLabelOnDuring(f,p,o,s,n,i,e)}:null,u=e.getBaseAxis().isHorizontal(),v=Up(e,t,r,function(){var f=a._endLabel;f&&t&&s.originalX!=null&&f.attr({x:s.originalX,y:s.originalY})},l);if(!r.get("clip",!0)){var c=v.shape,h=Math.max(c.width,c.height);u?(c.y-=h,c.height+=h*2):(c.x-=h,c.width+=h*2)}return l&&l(1,v),v}else return r.get(["endLabel","show"])&&console.warn("endLabel is not supported for lines in polar systems."),Yp(e,t,r)}function Mx(a,e){var t=e.getBaseAxis(),r=t.isHorizontal(),i=t.inverse,n=r?i?"right":"left":"center",o=r?"middle":i?"top":"bottom";return{normal:{align:a.get("align")||n,verticalAlign:a.get("verticalAlign")||o}}}var Px=function(a){k(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.init=function(){var t=new U,r=new ti;this.group.add(r.group),this._symbolDraw=r,this._lineGroup=t},e.prototype.render=function(t,r,i){var n=this,o=t.coordinateSystem,s=this.group,l=t.getData(),u=t.getModel("lineStyle"),v=t.getModel("areaStyle"),c=l.getLayout("points")||[],h=o.type==="polar",f=this._coordSys,p=this._symbolDraw,d=this._polyline,g=this._polygon,y=this._lineGroup,m=t.get("animation"),x=!v.isEmpty(),S=v.get("origin"),_=Hp(o,l,S),b=x&&_x(o,l,_),w=t.get("showSymbol"),A=w&&!h&&Tx(t,l,o),T=this._data;T&&T.eachItemGraphicEl(function(pt,et){pt.__temp&&(s.remove(pt),T.setItemGraphicEl(et,null))}),w||p.remove(),s.add(y);var D=h?!1:t.get("step"),I;o&&o.getArea&&t.get("clip",!0)&&(I=o.getArea(),I.width!=null?(I.x-=.1,I.y-=.1,I.width+=.2,I.height+=.2):I.r0&&(I.r0-=.5,I.r+=.5)),this._clipShapeForSymbol=I;var L=Ax(l,o,i)||l.getVisual("style")[l.getVisual("drawType")];if(!(d&&f.type===o.type&&D===this._step))w&&p.updateData(l,{isIgnore:A,clipShape:I,disableAnimation:!0,getSymbolPoint:function(pt){return[c[pt*2],c[pt*2+1]]}}),m&&this._initSymbolLabelAnimation(l,o,I),D&&(c=He(c,o,D),b&&(b=He(b,o,D))),d=this._newPolyline(c),x&&(g=this._newPolygon(c,b)),h||this._initOrUpdateEndLabel(t,o,Kr(L)),y.setClipPath(Jn(this,o,!0,t));else{x&&!g?g=this._newPolygon(c,b):g&&!x&&(y.remove(g),g=this._polygon=null),h||this._initOrUpdateEndLabel(t,o,Kr(L));var M=y.getClipPath();if(M){var P=Jn(this,o,!1,t);wt(M,{shape:P.shape},t)}else y.setClipPath(Jn(this,o,!0,t));w&&p.updateData(l,{isIgnore:A,clipShape:I,disableAnimation:!0,getSymbolPoint:function(pt){return[c[pt*2],c[pt*2+1]]}}),(!$u(this._stackedOnPoints,b)||!$u(this._points,c))&&(m?this._doUpdateAnimation(l,b,o,i,D,S):(D&&(c=He(c,o,D),b&&(b=He(b,o,D))),d.setShape({points:c}),g&&g.setShape({points:c,stackedOnPoints:b})))}var R=t.getModel("emphasis"),E=R.get("focus"),N=R.get("blurScope"),V=R.get("disabled");if(d.useStyle(j(u.getLineStyle(),{fill:"none",stroke:L,lineJoin:"bevel"})),$t(d,t,"lineStyle"),d.style.lineWidth>0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var O=d.getState("emphasis").style;O.lineWidth=+d.style.lineWidth+1}tt(d).seriesIndex=t.seriesIndex,bt(d,E,N,V);var W=Yu(t.get("smooth")),Z=t.get("smoothMonotone"),X=t.get("connectNulls");if(d.setShape({smooth:W,smoothMonotone:Z,connectNulls:X}),g){var Q=l.getCalculationInfo("stackedOnSeries"),at=0;g.useStyle(j(v.getAreaStyle(),{fill:L,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),Q&&(at=Yu(Q.get("smooth"))),g.setShape({smooth:W,stackedOnSmooth:at,smoothMonotone:Z,connectNulls:X}),$t(g,t,"areaStyle"),tt(g).seriesIndex=t.seriesIndex,bt(g,E,N,V)}var gt=function(pt){n._changePolyState(pt)};l.eachItemGraphicEl(function(pt){pt&&(pt.onHoverStateChange=gt)}),this._polyline.onHoverStateChange=gt,this._data=l,this._coordSys=o,this._stackedOnPoints=b,this._points=c,this._step=D,this._valueOrigin=S,t.get("triggerLineEvent")&&(this.packEventData(t,d),g&&this.packEventData(t,g))},e.prototype.packEventData=function(t,r){tt(r).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,r,i,n){var o=t.getData(),s=ss(o,n);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var v=l[s*2],c=l[s*2+1];if(isNaN(v)||isNaN(c)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(v,c))return;var h=t.get("zlevel"),f=t.get("z");u=new Qa(o,s),u.x=v,u.y=c,u.setZ(h,f);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=h,p.z=f,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else xt.prototype.highlight.call(this,t,r,i,n)},e.prototype.downplay=function(t,r,i,n){var o=t.getData(),s=ss(o,n);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else xt.prototype.downplay.call(this,t,r,i,n)},e.prototype._changePolyState=function(t){var r=this._polygon;Ni(this._polyline,t),r&&Ni(r,t)},e.prototype._newPolyline=function(t){var r=this._polyline;return r&&this._lineGroup.remove(r),r=new Sx({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(r),this._polyline=r,r},e.prototype._newPolygon=function(t,r){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new Zp({shape:{points:t,stackedOnPoints:r},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},e.prototype._initSymbolLabelAnimation=function(t,r,i){var n,o,s=r.getBaseAxis(),l=s.inverse;r.type==="cartesian2d"?(n=s.isHorizontal(),o=!1):r.type==="polar"&&(n=s.dim==="angle",o=!0);var u=t.hostModel,v=u.get("animationDuration");rt(v)&&(v=v(null));var c=u.get("animationDelay")||0,h=rt(c)?c(null):c;t.eachItemGraphicEl(function(f,p){var d=f;if(d){var g=[f.x,f.y],y=void 0,m=void 0,x=void 0;if(i)if(o){var S=i,_=r.pointToCoord(g);n?(y=S.startAngle,m=S.endAngle,x=-_[1]/180*Math.PI):(y=S.r0,m=S.r,x=_[0])}else{var b=i;n?(y=b.x,m=b.x+b.width,x=f.x):(y=b.y+b.height,m=b.y,x=f.y)}var w=m===y?0:(x-y)/(m-y);l&&(w=1-w);var A=rt(c)?c(p):v*w+h,T=d.getSymbolPath(),D=T.getTextContent();d.attr({scaleX:0,scaleY:0}),d.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:A}),D&&D.animateFrom({style:{opacity:0}},{duration:300,delay:A}),T.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,r,i){var n=t.getModel("endLabel");if(Xp(t)){var o=t.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new lt({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var v=Ix(l);v>=0&&(Yt(s,Ht(t,"endLabel"),{inheritColor:i,labelFetcher:t,labelDataIndex:v,defaultText:function(c,h,f){return f!=null?Fp(o,f):Qr(o,c)},enableTextSetter:!0},Mx(n,r)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,r,i,n,o,s,l){var u=this._endLabel,v=this._polyline;if(u){t<1&&n.originalX==null&&(n.originalX=u.x,n.originalY=u.y);var c=i.getLayout("points"),h=i.hostModel,f=h.get("connectNulls"),p=s.get("precision"),d=s.get("distance")||0,g=l.getBaseAxis(),y=g.isHorizontal(),m=g.inverse,x=r.shape,S=m?y?x.x:x.y+x.height:y?x.x+x.width:x.y,_=(y?d:0)*(m?-1:1),b=(y?0:-d)*(m?-1:1),w=y?"x":"y",A=Lx(c,S,w),T=A.range,D=T[1]-T[0],I=void 0;if(D>=1){if(D>1&&!f){var L=Xu(c,T[0]);u.attr({x:L[0]+_,y:L[1]+b}),o&&(I=h.getRawValue(T[0]))}else{var L=v.getPointOn(S,w);L&&u.attr({x:L[0]+_,y:L[1]+b});var M=h.getRawValue(T[0]),P=h.getRawValue(T[1]);o&&(I=Uy(i,p,M,P,A.t))}n.lastFrameIndex=T[0]}else{var R=t===1||n.lastFrameIndex>0?T[0]:0,L=Xu(c,R);o&&(I=h.getRawValue(R)),u.attr({x:L[0]+_,y:L[1]+b})}o&&Kf(u).setLabelText(I)}},e.prototype._doUpdateAnimation=function(t,r,i,n,o,s){var l=this._polyline,u=this._polygon,v=t.hostModel,c=xx(this._data,t,this._stackedOnPoints,r,this._coordSys,i,this._valueOrigin),h=c.current,f=c.stackedOnCurrent,p=c.next,d=c.stackedOnNext;if(o&&(h=He(c.current,i,o),f=He(c.stackedOnCurrent,i,o),p=He(c.next,i,o),d=He(c.stackedOnNext,i,o)),Uu(h,p)>3e3||u&&Uu(f,d)>3e3){l.stopAnimation(),l.setShape({points:p}),u&&(u.stopAnimation(),u.setShape({points:p,stackedOnPoints:d}));return}l.shape.__points=c.current,l.shape.points=h;var g={shape:{points:p}};c.current!==h&&(g.shape.__points=c.next),l.stopAnimation(),ot(l,g,v),u&&(u.setShape({points:h,stackedOnPoints:f}),u.stopAnimation(),ot(u,{shape:{stackedOnPoints:d}},v),l.shape.points!==u.shape.points&&(u.shape.points=l.shape.points));for(var y=[],m=c.status,x=0;x<m.length;x++){var S=m[x].cmd;if(S==="="){var _=t.getItemGraphicEl(m[x].idx1);_&&y.push({el:_,ptIdx:x})}}l.animators&&l.animators.length&&l.animators[0].during(function(){u&&u.dirtyShape();for(var b=l.shape.__points,w=0;w<y.length;w++){var A=y[w].el,T=y[w].ptIdx*2;A.x=b[T],A.y=b[T+1],A.markRedraw()}})},e.prototype.remove=function(t){var r=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(n,o){n.__temp&&(r.remove(n),i.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},e.type="line",e}(xt);const Rx=Px;function ei(a,e){return{seriesType:a,plan:xn(),reset:function(t){var r=t.getData(),i=t.coordinateSystem,n=t.pipelineContext,o=e||n.large;if(!!i){var s=z(i.dimensions,function(f){return r.mapDimension(f)}).slice(0,2),l=s.length,u=r.getCalculationInfo("stackResultDimension");Xr(r,s[0])&&(s[0]=u),Xr(r,s[1])&&(s[1]=u);var v=r.getStore(),c=r.getDimensionIndex(s[0]),h=r.getDimensionIndex(s[1]);return l&&{progress:function(f,p){for(var d=f.end-f.start,g=o&&pr(d*l),y=[],m=[],x=f.start,S=0;x<f.end;x++){var _=void 0;if(l===1){var b=v.get(c,x);_=i.dataToPoint(b,null,m)}else y[0]=v.get(c,x),y[1]=v.get(h,x),_=i.dataToPoint(y,null,m);o?(g[S++]=_[0],g[S++]=_[1]):p.setItemLayout(x,_.slice())}o&&p.setLayout("points",g)}}}}}}var kx={average:function(a){for(var e=0,t=0,r=0;r<a.length;r++)isNaN(a[r])||(e+=a[r],t++);return t===0?NaN:e/t},sum:function(a){for(var e=0,t=0;t<a.length;t++)e+=a[t]||0;return e},max:function(a){for(var e=-1/0,t=0;t<a.length;t++)a[t]>e&&(e=a[t]);return isFinite(e)?e:NaN},min:function(a){for(var e=1/0,t=0;t<a.length;t++)a[t]<e&&(e=a[t]);return isFinite(e)?e:NaN},nearest:function(a){return a[0]}},Ex=function(a){return Math.round(a.length/2)};function Kp(a){return{seriesType:a,reset:function(e,t,r){var i=e.getData(),n=e.get("sampling"),o=e.coordinateSystem,s=i.count();if(s>10&&o.type==="cartesian2d"&&n){var l=o.getBaseAxis(),u=o.getOtherAxis(l),v=l.getExtent(),c=r.getDevicePixelRatio(),h=Math.abs(v[1]-v[0])*(c||1),f=Math.round(s/h);if(f>1){n==="lttb"&&e.setData(i.lttbDownSample(i.mapDimension(u.dim),1/f));var p=void 0;K(n)?p=kx[n]:rt(n)&&(p=n),p&&e.setData(i.downSample(i.mapDimension(u.dim),1/f,p,Ex))}}}}}function Vx(a){a.registerChartView(Rx),a.registerSeriesModel(fx),a.registerLayout(ei("line",!0)),a.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),r=e.getModel("lineStyle").getLineStyle();r&&!r.stroke&&(r.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",r)}}),a.registerProcessor(a.PRIORITY.PROCESSOR.STATISTIC,Kp("line"))}var qp=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,r){return ze(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t){var r=this.coordinateSystem;if(r&&r.clampData){var i=r.dataToPoint(r.clampData(t)),n=this.getData(),o=n.getLayout("offset"),s=n.getLayout("size"),l=r.getBaseAxis().isHorizontal()?0:1;return i[l]+=o+s/2,i}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(At);At.registerClass(qp);const Yi=qp;var Nx=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return ze(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),r=this.get("largeThreshold");return r>t&&(t=r),t},e.prototype.brushSelector=function(t,r,i){return i.rect(r.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=ar(Yi.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(Yi);const Ox=Nx;var zx=function(){function a(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return a}(),Bx=function(a){k(e,a);function e(t){var r=a.call(this,t)||this;return r.type="sausage",r}return e.prototype.getDefaultShape=function(){return new zx},e.prototype.buildPath=function(t,r){var i=r.cx,n=r.cy,o=Math.max(r.r0||0,0),s=Math.max(r.r,0),l=(s-o)*.5,u=o+l,v=r.startAngle,c=r.endAngle,h=r.clockwise,f=Math.PI*2,p=h?c-v<f:v-c<f;p||(v=c-(h?f:-f));var d=Math.cos(v),g=Math.sin(v),y=Math.cos(c),m=Math.sin(c);p?(t.moveTo(d*o+i,g*o+n),t.arc(d*u+i,g*u+n,l,-Math.PI+v,v,!h)):t.moveTo(d*s+i,g*s+n),t.arc(i,n,s,v,c,!h),t.arc(y*u+i,m*u+n,l,c-Math.PI*2,c-Math.PI,!h),o!==0&&t.arc(i,n,o,c,v,h)},e}(Dt);const Xi=Bx;function Gx(a,e){e=e||{};var t=e.isRoundCap;return function(r,i,n){var o=i.position;if(!o||o instanceof Array)return hu(r,i,n);var s=a(o),l=i.distance!=null?i.distance:5,u=this.shape,v=u.cx,c=u.cy,h=u.r,f=u.r0,p=(h+f)/2,d=u.startAngle,g=u.endAngle,y=(d+g)/2,m=t?Math.abs(h-f)/2:0,x=Math.cos,S=Math.sin,_=v+h*x(d),b=c+h*S(d),w="left",A="top";switch(s){case"startArc":_=v+(f-l)*x(y),b=c+(f-l)*S(y),w="center",A="top";break;case"insideStartArc":_=v+(f+l)*x(y),b=c+(f+l)*S(y),w="center",A="bottom";break;case"startAngle":_=v+p*x(d)+ui(d,l+m,!1),b=c+p*S(d)+vi(d,l+m,!1),w="right",A="middle";break;case"insideStartAngle":_=v+p*x(d)+ui(d,-l+m,!1),b=c+p*S(d)+vi(d,-l+m,!1),w="left",A="middle";break;case"middle":_=v+p*x(y),b=c+p*S(y),w="center",A="middle";break;case"endArc":_=v+(h+l)*x(y),b=c+(h+l)*S(y),w="center",A="bottom";break;case"insideEndArc":_=v+(h-l)*x(y),b=c+(h-l)*S(y),w="center",A="top";break;case"endAngle":_=v+p*x(g)+ui(g,l+m,!0),b=c+p*S(g)+vi(g,l+m,!0),w="left",A="middle";break;case"insideEndAngle":_=v+p*x(g)+ui(g,-l+m,!0),b=c+p*S(g)+vi(g,-l+m,!0),w="right",A="middle";break;default:return hu(r,i,n)}return r=r||{},r.x=_,r.y=b,r.align=w,r.verticalAlign=A,r}}function Fx(a,e,t,r){if(re(r)){a.setTextConfig({rotation:r});return}else if(B(e)){a.setTextConfig({rotation:0});return}var i=a.shape,n=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(n+o)/2,l,u=t(e);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":l=s;break;case"startAngle":case"insideStartAngle":l=n;break;case"endAngle":case"insideEndAngle":l=o;break;default:a.setTextConfig({rotation:0});return}var v=Math.PI*1.5-l;u==="middle"&&v>Math.PI/2&&v<Math.PI*1.5&&(v-=Math.PI),a.setTextConfig({rotation:v})}function ui(a,e,t){return e*Math.sin(a)*(t?-1:1)}function vi(a,e,t){return e*Math.cos(a)*(t?1:-1)}var Qn=Math.max,to=Math.min;function Hx(a,e){var t=a.getArea&&a.getArea();if(Pe(a,"cartesian2d")){var r=a.getBaseAxis();if(r.type!=="category"||!r.onBand){var i=e.getLayout("bandWidth");r.isHorizontal()?(t.x-=i,t.width+=i*2):(t.y-=i,t.height+=i*2)}}return t}var Wx=function(a){k(e,a);function e(){var t=a.call(this)||this;return t.type=e.type,t._isFirstFrame=!0,t}return e.prototype.render=function(t,r,i,n){this._model=t,this._removeOnRenderedListener(i),this._updateDrawMode(t);var o=t.get("coordinateSystem");o==="cartesian2d"||o==="polar"?(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(t,r,i):this._renderNormal(t,r,i,n)):de("Only cartesian2d and polar supported for bar.")},e.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},e.prototype.incrementalRender=function(t,r){this._progressiveEls=[],this._incrementalRenderLarge(t,r)},e.prototype.eachRendered=function(t){na(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var r=t.pipelineContext.large;(this._isLargeDraw==null||r!==this._isLargeDraw)&&(this._isLargeDraw=r,this._clear())},e.prototype._renderNormal=function(t,r,i,n){var o=this.group,s=t.getData(),l=this._data,u=t.coordinateSystem,v=u.getBaseAxis(),c;u.type==="cartesian2d"?c=v.isHorizontal():u.type==="polar"&&(c=v.dim==="angle");var h=t.isAnimationEnabled()?t:null,f=$x(t,u);f&&this._enableRealtimeSort(f,s,i);var p=t.get("clip",!0)||f,d=Hx(u,s);o.removeClipPath();var g=t.get("roundCap",!0),y=t.get("showBackground",!0),m=t.getModel("backgroundStyle"),x=m.get("borderRadius")||0,S=[],_=this._backgroundEls,b=n&&n.isInitSort,w=n&&n.type==="changeAxisOrder";function A(I){var L=ci[u.type](s,I),M=jx(u,c,L);return M.useStyle(m.getItemStyle()),u.type==="cartesian2d"&&M.setShape("r",x),S[I]=M,M}s.diff(l).add(function(I){var L=s.getItemModel(I),M=ci[u.type](s,I,L);if(y&&A(I),!(!s.hasValue(I)||!Qu[u.type](M))){var P=!1;p&&(P=Ku[u.type](d,M));var R=qu[u.type](t,s,I,M,c,h,v.model,!1,g);f&&(R.forceLabelAnimation=!0),tv(R,s,I,L,M,t,c,u.type==="polar"),b?R.attr({shape:M}):f?ju(f,h,R,M,I,c,!1,!1):wt(R,{shape:M},t,I),s.setItemGraphicEl(I,R),o.add(R),R.ignore=P}}).update(function(I,L){var M=s.getItemModel(I),P=ci[u.type](s,I,M);if(y){var R=void 0;_.length===0?R=A(L):(R=_[L],R.useStyle(m.getItemStyle()),u.type==="cartesian2d"&&R.setShape("r",x),S[I]=R);var E=ci[u.type](s,I),N=Jp(c,E,u);ot(R,{shape:N},h,I)}var V=l.getItemGraphicEl(L);if(!s.hasValue(I)||!Qu[u.type](P)){o.remove(V);return}var O=!1;if(p&&(O=Ku[u.type](d,P),O&&o.remove(V)),V?pe(V):V=qu[u.type](t,s,I,P,c,h,v.model,!!V,g),f&&(V.forceLabelAnimation=!0),w){var W=V.getTextContent();if(W){var Z=Kf(W);Z.prevValue!=null&&(Z.prevValue=Z.value)}}else tv(V,s,I,M,P,t,c,u.type==="polar");b?V.attr({shape:P}):f?ju(f,h,V,P,I,c,!0,w):ot(V,{shape:P},t,I,null),s.setItemGraphicEl(I,V),V.ignore=O,o.add(V)}).remove(function(I){var L=l.getItemGraphicEl(I);L&&Oi(L,t,I)}).execute();var T=this._backgroundGroup||(this._backgroundGroup=new U);T.removeAll();for(var D=0;D<S.length;++D)T.add(S[D]);o.add(T),this._backgroundEls=S,this._data=s},e.prototype._renderLarge=function(t,r,i){this._clear(),rv(t,this.group),this._updateLargeClip(t)},e.prototype._incrementalRenderLarge=function(t,r){this._removeBackground(),rv(r,this.group,this._progressiveEls,!0)},e.prototype._updateLargeClip=function(t){var r=t.get("clip",!0)&&kn(t.coordinateSystem,!1,t),i=this.group;r?i.setClipPath(r):i.removeClipPath()},e.prototype._enableRealtimeSort=function(t,r,i){var n=this;if(!!r.count()){var o=t.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(r,t,i),this._isFirstFrame=!1;else{var s=function(l){var u=r.getItemGraphicEl(l),v=u&&u.shape;return v&&Math.abs(o.isHorizontal()?v.height:v.width)||0};this._onRendered=function(){n._updateSortWithinSameData(r,s,o,i)},i.getZr().on("rendered",this._onRendered)}}},e.prototype._dataSort=function(t,r,i){var n=[];return t.each(t.mapDimension(r.dim),function(o,s){var l=i(s);l=l==null?NaN:l,n.push({dataIndex:s,mappedValue:l,ordinalNumber:o})}),n.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:z(n,function(o){return o.ordinalNumber})}},e.prototype._isOrderChangedWithinSameData=function(t,r,i){for(var n=i.scale,o=t.mapDimension(i.dim),s=Number.MAX_VALUE,l=0,u=n.getOrdinalMeta().categories.length;l<u;++l){var v=t.rawIndexOf(o,n.getRawOrdinalNumber(l)),c=v<0?Number.MIN_VALUE:r(t.indexOfRawIndex(v));if(c>s)return!0;s=c}return!1},e.prototype._isOrderDifferentInView=function(t,r){for(var i=r.scale,n=i.getExtent(),o=Math.max(0,n[0]),s=Math.min(n[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(t.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,r,i,n){if(!!this._isOrderChangedWithinSameData(t,r,i)){var o=this._dataSort(t,i,r);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(n),n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,r,i){var n=r.baseAxis,o=this._dataSort(t,n,function(s){return t.get(t.mapDimension(r.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",isInitSort:!0,axisId:n.index,sortInfo:o})},e.prototype.remove=function(t,r){this._clear(this._model),this._removeOnRenderedListener(r)},e.prototype.dispose=function(t,r){this._removeOnRenderedListener(r)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var r=this.group,i=this._data;t&&t.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(n){Oi(n,t,tt(n).dataIndex)})):r.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(xt),Ku={cartesian2d:function(a,e){var t=e.width<0?-1:1,r=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),r<0&&(e.y+=e.height,e.height=-e.height);var i=a.x+a.width,n=a.y+a.height,o=Qn(e.x,a.x),s=to(e.x+e.width,i),l=Qn(e.y,a.y),u=to(e.y+e.height,n),v=s<o,c=u<l;return e.x=v&&o>i?s:o,e.y=c&&l>n?u:l,e.width=v?0:s-o,e.height=c?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),r<0&&(e.y+=e.height,e.height=-e.height),v||c},polar:function(a,e){var t=e.r0<=e.r?1:-1;if(t<0){var r=e.r;e.r=e.r0,e.r0=r}var i=to(e.r,a.r),n=Qn(e.r0,a.r0);e.r=i,e.r0=n;var o=i-n<0;if(t<0){var r=e.r;e.r=e.r0,e.r0=r}return o}},qu={cartesian2d:function(a,e,t,r,i,n,o,s,l){var u=new ct({shape:H({},r),z2:1});if(u.__dataIndex=t,u.name="item",n){var v=u.shape,c=i?"height":"width";v[c]=0}return u},polar:function(a,e,t,r,i,n,o,s,l){var u=!i&&l?Xi:ve,v=new u({shape:r,z2:1});v.name="item";var c=jp(i);if(v.calculateTextPosition=Gx(c,{isRoundCap:u===Xi}),n){var h=v.shape,f=i?"r":"endAngle",p={};h[f]=i?0:r.startAngle,p[f]=r[f],(s?ot:wt)(v,{shape:p},n)}return v}};function $x(a,e){var t=a.get("realtimeSort",!0),r=e.getBaseAxis();if(t&&(r.type!=="category"&&de("`realtimeSort` will not work because this bar series is not based on a category axis."),e.type!=="cartesian2d"&&de("`realtimeSort` will not work because this bar series is not on cartesian2d.")),t&&r.type==="category"&&e.type==="cartesian2d")return{baseAxis:r,otherAxis:e.getOtherAxis(r)}}function ju(a,e,t,r,i,n,o,s){var l,u;n?(u={x:r.x,width:r.width},l={y:r.y,height:r.height}):(u={y:r.y,height:r.height},l={x:r.x,width:r.width}),s||(o?ot:wt)(t,{shape:l},e,i,null);var v=e?a.baseAxis.model:null;(o?ot:wt)(t,{shape:u},v,i)}function Ju(a,e){for(var t=0;t<e.length;t++)if(!isFinite(a[e[t]]))return!0;return!1}var Zx=["x","y","width","height"],Ux=["cx","cy","r","startAngle","endAngle"],Qu={cartesian2d:function(a){return!Ju(a,Zx)},polar:function(a){return!Ju(a,Ux)}},ci={cartesian2d:function(a,e,t){var r=a.getItemLayout(e),i=t?Xx(t,r):0,n=r.width>0?1:-1,o=r.height>0?1:-1;return{x:r.x+n*i/2,y:r.y+o*i/2,width:r.width-n*i,height:r.height-o*i}},polar:function(a,e,t){var r=a.getItemLayout(e);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function Yx(a){return a.startAngle!=null&&a.endAngle!=null&&a.startAngle===a.endAngle}function jp(a){return function(e){var t=e?"Arc":"Angle";return function(r){switch(r){case"start":case"insideStart":case"end":case"insideEnd":return r+t;default:return r}}}(a)}function tv(a,e,t,r,i,n,o,s){var l=e.getItemVisual(t,"style");s||a.setShape("r",r.get(["itemStyle","borderRadius"])||0),a.useStyle(l);var u=r.getShallow("cursor");u&&a.attr("cursor",u);var v=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",c=Ht(r);Yt(a,c,{labelFetcher:n,labelDataIndex:t,defaultText:Qr(n.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:v});var h=a.getTextContent();if(s&&h){var f=r.get(["label","position"]);a.textConfig.inside=f==="middle"?!0:null,Fx(a,f==="outside"?v:f,jp(o),r.get(["label","rotate"]))}qf(h,c,n.getRawValue(t),function(d){return Fp(e,d)});var p=r.getModel(["emphasis"]);bt(a,p.get("focus"),p.get("blurScope"),p.get("disabled")),$t(a,r),Yx(i)&&(a.style.fill="none",a.style.stroke="none",C(a.states,function(d){d.style&&(d.style.fill=d.style.stroke="none")}))}function Xx(a,e){var t=a.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var r=a.get(["itemStyle","borderWidth"])||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),n=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(r,i,n)}var Kx=function(){function a(){}return a}(),ev=function(a){k(e,a);function e(t){var r=a.call(this,t)||this;return r.type="largeBar",r}return e.prototype.getDefaultShape=function(){return new Kx},e.prototype.buildPath=function(t,r){for(var i=r.points,n=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,v=0;v<i.length;v+=3)l[n]=u,l[o]=i[v+2],s[n]=i[v+n],s[o]=i[v+o],t.rect(s[0],s[1],l[0],l[1])},e}(Dt);function rv(a,e,t,r){var i=a.getData(),n=i.getLayout("valueAxisHorizontal")?1:0,o=i.getLayout("largeDataIndices"),s=i.getLayout("size"),l=a.getModel("backgroundStyle"),u=i.getLayout("largeBackgroundPoints");if(u){var v=new ev({shape:{points:u},incremental:!!r,silent:!0,z2:0});v.baseDimIdx=n,v.largeDataIndices=o,v.barWidth=s,v.useStyle(l.getItemStyle()),e.add(v),t&&t.push(v)}var c=new ev({shape:{points:i.getLayout("largePoints")},incremental:!!r,z2:1});c.baseDimIdx=n,c.largeDataIndices=o,c.barWidth=s,e.add(c),c.useStyle(i.getVisual("style")),tt(c).seriesIndex=a.seriesIndex,a.get("silent")||(c.on("mousedown",av),c.on("mousemove",av)),t&&t.push(c)}var av=Xy(function(a){var e=this,t=qx(e,a.offsetX,a.offsetY);tt(e).dataIndex=t>=0?t:null},30,!1);function qx(a,e,t){for(var r=a.baseDimIdx,i=1-r,n=a.shape.points,o=a.largeDataIndices,s=[],l=[],u=a.barWidth,v=0,c=n.length/3;v<c;v++){var h=v*3;if(l[r]=u,l[i]=n[h+2],s[r]=n[h+r],s[i]=n[h+i],l[i]<0&&(s[i]+=l[i],l[i]=-l[i]),e>=s[0]&&e<=s[0]+l[0]&&t>=s[1]&&t<=s[1]+l[1])return o[v]}return-1}function Jp(a,e,t){if(Pe(t,"cartesian2d")){var r=e,i=t.getArea();return{x:a?r.x:i.x,y:a?i.y:r.y,width:a?r.width:i.width,height:a?i.height:r.height}}else{var i=t.getArea(),n=e;return{cx:i.cx,cy:i.cy,r0:a?i.r0:n.r0,r:a?i.r:n.r,startAngle:a?n.startAngle:0,endAngle:a?n.endAngle:Math.PI*2}}}function jx(a,e,t){var r=a.type==="polar"?ve:ct;return new r({shape:Jp(e,t,a),silent:!0,z2:0})}const Jx=Wx;function Qx(a){a.registerChartView(Jx),a.registerSeriesModel(Ox),a.registerLayout(a.PRIORITY.VISUAL.LAYOUT,q(Jf,"bar")),a.registerLayout(a.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,jf("bar")),a.registerProcessor(a.PRIORITY.PROCESSOR.STATISTIC,Kp("bar")),a.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var r=e.componentType||"series";t.eachComponent({mainType:r,query:e},function(i){e.sortInfo&&i.axis.setCategorySortInfo(e.sortInfo)})})}var hi=Math.PI*2,iv=Math.PI/180;function Qp(a,e){return Bt(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function td(a,e){var t=Qp(a,e),r=a.get("center"),i=a.get("radius");B(i)||(i=[0,i]),B(r)||(r=[r,r]);var n=G(t.width,e.getWidth()),o=G(t.height,e.getHeight()),s=Math.min(n,o),l=G(r[0],n)+t.x,u=G(r[1],o)+t.y,v=G(i[0],s/2),c=G(i[1],s/2);return{cx:l,cy:u,r0:v,r:c}}function tS(a,e,t){e.eachSeriesByType(a,function(r){var i=r.getData(),n=i.mapDimension("value"),o=Qp(r,t),s=td(r,t),l=s.cx,u=s.cy,v=s.r,c=s.r0,h=-r.get("startAngle")*iv,f=r.get("minAngle")*iv,p=0;i.each(n,function(D){!isNaN(D)&&p++});var d=i.getSum(n),g=Math.PI/(d||p)*2,y=r.get("clockwise"),m=r.get("roseType"),x=r.get("stillShowZeroSum"),S=i.getDataExtent(n);S[0]=0;var _=hi,b=0,w=h,A=y?1:-1;if(i.setLayout({viewRect:o,r:v}),i.each(n,function(D,I){var L;if(isNaN(D)){i.setItemLayout(I,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:y,cx:l,cy:u,r0:c,r:m?NaN:v});return}m!=="area"?L=d===0&&x?g:D*g:L=hi/p,L<f?(L=f,_-=f):b+=D;var M=w+A*L;i.setItemLayout(I,{angle:L,startAngle:w,endAngle:M,clockwise:y,cx:l,cy:u,r0:c,r:m?vt(D,S,[c,v]):v}),w=M}),_<hi&&p)if(_<=.001){var T=hi/p;i.each(n,function(D,I){if(!isNaN(D)){var L=i.getItemLayout(I);L.angle=T,L.startAngle=h+A*I*T,L.endAngle=h+A*(I+1)*T}})}else g=_/b,w=h,i.each(n,function(D,I){if(!isNaN(D)){var L=i.getItemLayout(I),M=L.angle===f?f:D*g;L.startAngle=w,L.endAngle=w+A*M,w+=A*M}})})}function ri(a){return{seriesType:a,reset:function(e,t){var r=t.findComponents({mainType:"legend"});if(!(!r||!r.length)){var i=e.getData();i.filterSelf(function(n){for(var o=i.getName(n),s=0;s<r.length;s++)if(!r[s].isSelected(o))return!1;return!0})}}}}var eS=Math.PI/180;function nv(a,e,t,r,i,n,o,s,l,u){if(a.length<2)return;function v(d){for(var g=d.rB,y=g*g,m=0;m<d.list.length;m++){var x=d.list[m],S=Math.abs(x.label.y-t),_=r+x.len,b=_*_,w=Math.sqrt((1-Math.abs(S*S/y))*b),A=e+(w+x.len2)*i,T=A-x.label.x,D=x.targetTextWidth-T*i;ed(x,D,!0),x.label.x=A}}function c(d){for(var g={list:[],maxY:0},y={list:[],maxY:0},m=0;m<d.length;m++)if(d[m].labelAlignTo==="none"){var x=d[m],S=x.label.y>t?y:g,_=Math.abs(x.label.y-t);if(_>=S.maxY){var b=x.label.x-e-x.len2*i,w=r+x.len,A=Math.abs(b)<w?Math.sqrt(_*_/(1-b*b/w/w)):w;S.rB=A,S.maxY=_}S.list.push(x)}v(g),v(y)}for(var h=a.length,f=0;f<h;f++)if(a[f].position==="outer"&&a[f].labelAlignTo==="labelLine"){var p=a[f].label.x-u;a[f].linePoints[1][0]+=p,a[f].label.x=u}jy(a,l,l+o)&&c(a)}function rS(a,e,t,r,i,n,o,s){for(var l=[],u=[],v=Number.MAX_VALUE,c=-Number.MAX_VALUE,h=0;h<a.length;h++){var f=a[h].label;eo(a[h])||(f.x<e?(v=Math.min(v,f.x),l.push(a[h])):(c=Math.max(c,f.x),u.push(a[h])))}for(var h=0;h<a.length;h++){var p=a[h];if(!eo(p)&&p.linePoints){if(p.labelStyleWidth!=null)continue;var f=p.label,d=p.linePoints,g=void 0;p.labelAlignTo==="edge"?f.x<e?g=d[2][0]-p.labelDistance-o-p.edgeDistance:g=o+i-p.edgeDistance-d[2][0]-p.labelDistance:p.labelAlignTo==="labelLine"?f.x<e?g=v-o-p.bleedMargin:g=o+i-c-p.bleedMargin:f.x<e?g=f.x-o-p.bleedMargin:g=o+i-f.x-p.bleedMargin,p.targetTextWidth=g,ed(p,g)}}nv(u,e,t,r,1,i,n,o,s,c),nv(l,e,t,r,-1,i,n,o,s,v);for(var h=0;h<a.length;h++){var p=a[h];if(!eo(p)&&p.linePoints){var f=p.label,d=p.linePoints,y=p.labelAlignTo==="edge",m=f.style.padding,x=m?m[1]+m[3]:0,S=f.style.backgroundColor?0:x,_=p.rect.width+S,b=d[1][0]-d[2][0];y?f.x<e?d[2][0]=o+p.edgeDistance+_+p.labelDistance:d[2][0]=o+i-p.edgeDistance-_-p.labelDistance:(f.x<e?d[2][0]=f.x+p.labelDistance:d[2][0]=f.x-p.labelDistance,d[1][0]=d[2][0]+b),d[1][1]=d[2][1]=f.y}}}function ed(a,e,t){if(t===void 0&&(t=!1),a.labelStyleWidth==null){var r=a.label,i=r.style,n=a.rect,o=i.backgroundColor,s=i.padding,l=s?s[1]+s[3]:0,u=i.overflow,v=n.width+(o?0:l);if(e<v||t){var c=n.height;if(u&&u.match("break")){r.setStyle("backgroundColor",null),r.setStyle("width",e-l);var h=r.getBoundingRect();r.setStyle("width",Math.ceil(h.width)),r.setStyle("backgroundColor",o)}else{var f=e-l,p=e<v?f:t?f>a.unconstrainedWidth?null:f:null;r.setStyle("width",p)}var d=r.getBoundingRect();n.width=d.width;var g=(r.style.margin||0)+2.1;n.height=d.height+g,n.y-=(n.height-c)/2}}}function eo(a){return a.position==="center"}function aS(a){var e=a.getData(),t=[],r,i,n=!1,o=(a.get("minShowLabelAngle")||0)*eS,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,v=s.x,c=s.y,h=s.height;function f(b){b.ignore=!0}function p(b){if(!b.ignore)return!0;for(var w in b.states)if(b.states[w].ignore===!1)return!0;return!1}e.each(function(b){var w=e.getItemGraphicEl(b),A=w.shape,T=w.getTextContent(),D=w.getTextGuideLine(),I=e.getItemModel(b),L=I.getModel("label"),M=L.get("position")||I.get(["emphasis","label","position"]),P=L.get("distanceToLabelLine"),R=L.get("alignTo"),E=G(L.get("edgeDistance"),u),N=L.get("bleedMargin"),V=I.getModel("labelLine"),O=V.get("length");O=G(O,u);var W=V.get("length2");if(W=G(W,u),Math.abs(A.endAngle-A.startAngle)<o){C(T.states,f),T.ignore=!0;return}if(!!p(T)){var Z=(A.startAngle+A.endAngle)/2,X=Math.cos(Z),Q=Math.sin(Z),at,gt,pt,et;r=A.cx,i=A.cy;var Y=M==="inside"||M==="inner";if(M==="center")at=A.cx,gt=A.cy,et="center";else{var ut=(Y?(A.r+A.r0)/2*X:A.r*X)+r,st=(Y?(A.r+A.r0)/2*Q:A.r*Q)+i;if(at=ut+X*3,gt=st+Q*3,!Y){var ht=ut+X*(O+l-A.r),Vt=st+Q*(O+l-A.r),Gt=ht+(X<0?-1:1)*W,mt=Vt;R==="edge"?at=X<0?v+E:v+u-E:at=Gt+(X<0?-P:P),gt=mt,pt=[[ut,st],[ht,Vt],[Gt,mt]]}et=Y?"center":R==="edge"?X>0?"right":"left":X>0?"left":"right"}var Mt=Math.PI,Tt=0,Zt=L.get("rotate");if(re(Zt))Tt=Zt*(Mt/180);else if(M==="center")Tt=0;else if(Zt==="radial"||Zt===!0){var Ce=X<0?-Z+Mt:-Z;Tt=Ce}else if(Zt==="tangential"&&M!=="outside"&&M!=="outer"){var Jt=Math.atan2(X,Q);Jt<0&&(Jt=Mt*2+Jt);var si=Q>0;si&&(Jt=Mt+Jt),Tt=Jt-Mt}if(n=!!Tt,T.x=at,T.y=gt,T.rotation=Tt,T.setStyle({verticalAlign:"middle"}),Y){T.setStyle({align:et});var Fn=T.states.select;Fn&&(Fn.x+=T.x,Fn.y+=T.y)}else{var Be=T.getBoundingRect().clone();Be.applyTransform(T.getComputedTransform());var ou=(T.style.margin||0)+2.1;Be.y-=ou/2,Be.height+=ou,t.push({label:T,labelLine:D,position:M,len:O,len2:W,minTurnAngle:V.get("minTurnAngle"),maxSurfaceAngle:V.get("maxSurfaceAngle"),surfaceNormal:new fe(X,Q),linePoints:pt,textAlign:et,labelDistance:P,labelAlignTo:R,edgeDistance:E,bleedMargin:N,rect:Be,unconstrainedWidth:Be.width,labelStyleWidth:T.style.width})}w.setTextConfig({inside:Y})}}),!n&&a.get("avoidLabelOverlap")&&rS(t,r,i,l,u,h,v,c);for(var d=0;d<t.length;d++){var g=t[d],y=g.label,m=g.labelLine,x=isNaN(y.x)||isNaN(y.y);if(y){y.setStyle({align:g.textAlign}),x&&(C(y.states,f),y.ignore=!0);var S=y.states.select;S&&(S.x+=y.x,S.y+=y.y)}if(m){var _=g.linePoints;x||!_?(C(m.states,f),m.ignore=!0):(Ky(_,g.minTurnAngle),qy(_,g.surfaceNormal,g.maxSurfaceAngle),m.setShape({points:_}),y.__hostTarget.textGuideLineConfig={anchor:new fe(_[0][0],_[0][1])})}}}function Fr(a,e,t){var r=a.get("borderRadius");if(r==null)return t?{cornerRadius:0}:null;B(r)||(r=[r,r,r,r]);var i=Math.abs(e.r||0-e.r0||0);return{cornerRadius:z(r,function(n){return zi(n,i)})}}var iS=function(a){k(e,a);function e(t,r,i){var n=a.call(this)||this;n.z2=2;var o=new lt;return n.setTextContent(o),n.updateData(t,r,i,!0),n}return e.prototype.updateData=function(t,r,i,n){var o=this,s=t.hostModel,l=t.getItemModel(r),u=l.getModel("emphasis"),v=t.getItemLayout(r),c=H(Fr(l.getModel("itemStyle"),v,!0),v);if(isNaN(c.startAngle)){o.setShape(c);return}if(n){o.setShape(c);var h=s.getShallow("animationType");s.ecModel.ssr?(wt(o,{scaleX:0,scaleY:0},s,{dataIndex:r,isFrom:!0}),o.originX=c.cx,o.originY=c.cy):h==="scale"?(o.shape.r=v.r0,wt(o,{shape:{r:v.r}},s,r)):i!=null?(o.setShape({startAngle:i,endAngle:i}),wt(o,{shape:{startAngle:v.startAngle,endAngle:v.endAngle}},s,r)):(o.shape.endAngle=v.startAngle,ot(o,{shape:{endAngle:v.endAngle}},s,r))}else pe(o),ot(o,{shape:c},s,r);o.useStyle(t.getItemVisual(r,"style")),$t(o,l);var f=(v.startAngle+v.endAngle)/2,p=s.get("selectedOffset"),d=Math.cos(f)*p,g=Math.sin(f)*p,y=l.getShallow("cursor");y&&o.attr("cursor",y),this._updateLabel(s,t,r),o.ensureState("emphasis").shape=H({r:v.r+(u.get("scale")&&u.get("scaleSize")||0)},Fr(u.getModel("itemStyle"),v)),H(o.ensureState("select"),{x:d,y:g,shape:Fr(l.getModel(["select","itemStyle"]),v)}),H(o.ensureState("blur"),{shape:Fr(l.getModel(["blur","itemStyle"]),v)});var m=o.getTextGuideLine(),x=o.getTextContent();m&&H(m.ensureState("select"),{x:d,y:g}),H(x.ensureState("select"),{x:d,y:g}),bt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,r,i){var n=this,o=r.getItemModel(i),s=o.getModel("labelLine"),l=r.getItemVisual(i,"style"),u=l&&l.fill,v=l&&l.opacity;Yt(n,Ht(o),{labelFetcher:r.hostModel,labelDataIndex:i,inheritColor:u,defaultOpacity:v,defaultText:t.getFormattedLabel(i,"normal")||r.getName(i)});var c=n.getTextContent();n.setTextConfig({position:null,rotation:null}),c.attr({z2:10});var h=t.get(["label","position"]);if(h!=="outside"&&h!=="outer")n.removeTextGuideLine();else{var f=this.getTextGuideLine();f||(f=new me,this.setTextGuideLine(f)),Qf(this,tp(o),{stroke:u,opacity:Ar(s.get(["lineStyle","opacity"]),v,1)})}},e}(ve),nS=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}return e.prototype.init=function(){var t=new U;this._sectorGroup=t},e.prototype.render=function(t,r,i,n){var o=t.getData(),s=this._data,l=this.group,u;if(!s&&o.count()>0){for(var v=o.getItemLayout(0),c=1;isNaN(v&&v.startAngle)&&c<o.count();++c)v=o.getItemLayout(c);v&&(u=v.startAngle)}if(this._emptyCircleSector&&l.remove(this._emptyCircleSector),o.count()===0&&t.get("showEmptyCircle")){var h=new ve({shape:td(t,i)});h.useStyle(t.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=h,l.add(h)}o.diff(s).add(function(f){var p=new iS(o,f,u);o.setItemGraphicEl(f,p),l.add(p)}).update(function(f,p){var d=s.getItemGraphicEl(p);d.updateData(o,f,u),d.off("click"),l.add(d),o.setItemGraphicEl(f,d)}).remove(function(f){var p=s.getItemGraphicEl(f);Oi(p,t,f)}).execute(),aS(t),t.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},e.prototype.dispose=function(){},e.prototype.containPoint=function(t,r){var i=r.getData(),n=i.getItemLayout(0);if(n){var o=t[0]-n.cx,s=t[1]-n.cy,l=Math.sqrt(o*o+s*s);return l<=n.r&&l>=n.r0}},e.type="pie",e}(xt);const oS=nS;function la(a,e,t){e=B(e)&&{coordDimensions:e}||H({encodeDefine:a.getEncode()},e);var r=a.getSource(),i=Sn(r,e).dimensions,n=new Qt(i,a);return n.initData(r,t),n}var sS=function(){function a(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return a.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},a.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},a.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},a.prototype.getItemVisual=function(e,t){var r=this._getDataWithEncodedVisual();return r.getItemVisual(e,t)},a}();const ai=sS;var lS=function(a){k(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.init=function(t){a.prototype.init.apply(this,arguments),this.legendVisualProvider=new ai($(this.getData,this),$(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){a.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return la(this,{coordDimensions:["value"],encodeDefaulter:q(el,this)})},e.prototype.getDataParams=function(t){var r=this.getData(),i=a.prototype.getDataParams.call(this,t),n=[];return r.each(r.mapDimension("value"),function(o){n.push(o)}),i.percent=Jy(n,t,r.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},e.prototype._defaultLabelLine=function(t){Ya(t,"labelLine",["show"]);var r=t.labelLine,i=t.emphasis.labelLine;r.show=r.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(At);const uS=lS;function vS(a){return{seriesType:a,reset:function(e,t){var r=e.getData();r.filterSelf(function(i){var n=r.mapDimension("value"),o=r.get(n,i);return!(re(o)&&!isNaN(o)&&o<0)})}}}function cS(a){a.registerChartView(oS),a.registerSeriesModel(uS),ep("pie",a.registerAction),a.registerLayout(q(tS,"pie")),a.registerProcessor(ri("pie")),a.registerProcessor(vS("pie"))}var hS=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,r){return ze(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t==null?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t==null?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,r,i){return i.point(r.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",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(At);const fS=hS;var rd=4,pS=function(){function a(){}return a}(),dS=function(a){k(e,a);function e(t){var r=a.call(this,t)||this;return r._off=0,r.hoverDataIdx=-1,r}return e.prototype.getDefaultShape=function(){return new pS},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,r){var i=r.points,n=r.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&n[0]<rd,v=this.softClipShape,c;if(u){this._ctx=l;return}for(this._ctx=null,c=this._off;c<i.length;){var h=i[c++],f=i[c++];isNaN(h)||isNaN(f)||v&&!v.contain(h,f)||(s.x=h-n[0]/2,s.y=f-n[1]/2,s.width=n[0],s.height=n[1],o.buildPath(t,s,!0))}this.incremental&&(this._off=c,this.notClear=!0)},e.prototype.afterBrush=function(){var t=this.shape,r=t.points,i=t.size,n=this._ctx,o=this.softClipShape,s;if(!!n){for(s=this._off;s<r.length;){var l=r[s++],u=r[s++];isNaN(l)||isNaN(u)||o&&!o.contain(l,u)||n.fillRect(l-i[0]/2,u-i[1]/2,i[0],i[1])}this.incremental&&(this._off=s,this.notClear=!0)}},e.prototype.findDataIndex=function(t,r){for(var i=this.shape,n=i.points,o=i.size,s=Math.max(o[0],4),l=Math.max(o[1],4),u=n.length/2-1;u>=0;u--){var v=u*2,c=n[v]-s/2,h=n[v+1]-l/2;if(t>=c&&r>=h&&t<=c+s&&r<=h+l)return u}return-1},e.prototype.contain=function(t,r){var i=this.transformCoordToLocal(t,r),n=this.getBoundingRect();if(t=i[0],r=i[1],n.contain(t,r)){var o=this.hoverDataIdx=this.findDataIndex(t,r);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var r=this.shape,i=r.points,n=r.size,o=n[0],s=n[1],l=1/0,u=1/0,v=-1/0,c=-1/0,h=0;h<i.length;){var f=i[h++],p=i[h++];l=Math.min(f,l),v=Math.max(f,v),u=Math.min(p,u),c=Math.max(p,c)}t=this._rect=new zt(l-o/2,u-s/2,v-l+o,c-u+s)}return t},e}(Dt),gS=function(){function a(){this.group=new U}return a.prototype.updateData=function(e,t){this._clear();var r=this._create();r.setShape({points:e.getLayout("points")}),this._setCommon(r,e,t)},a.prototype.updateLayout=function(e){var t=e.getLayout("points");this.group.eachChild(function(r){if(r.startIndex!=null){var i=(r.endIndex-r.startIndex)*2,n=r.startIndex*4*2;t=new Float32Array(t.buffer,n,i)}r.setShape("points",t),r.reset()})},a.prototype.incrementalPrepareUpdate=function(e){this._clear()},a.prototype.incrementalUpdate=function(e,t,r){var i=this._newAdded[0],n=t.getLayout("points"),o=i&&i.shape.points;if(o&&o.length<2e4){var s=o.length,l=new Float32Array(s+n.length);l.set(o),l.set(n,s),i.endIndex=e.end,i.setShape({points:l})}else{this._newAdded=[];var u=this._create();u.startIndex=e.start,u.endIndex=e.end,u.incremental=!0,u.setShape({points:n}),this._setCommon(u,t,r)}},a.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},a.prototype._create=function(){var e=new dS({cursor:"default"});return this.group.add(e),this._newAdded.push(e),e},a.prototype._setCommon=function(e,t,r){var i=t.hostModel;r=r||{};var n=t.getVisual("symbolSize");e.setShape("size",n instanceof Array?n:[n,n]),e.softClipShape=r.clipShape||null,e.symbolProxy=kt(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var o=e.shape.size[0]<rd;e.useStyle(i.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=t.getVisual("style"),l=s&&s.fill;l&&e.setColor(l);var u=tt(e);u.seriesIndex=i.seriesIndex,e.on("mousemove",function(v){u.dataIndex=null;var c=e.hoverDataIdx;c>=0&&(u.dataIndex=c+(e.startIndex||0))})},a.prototype.remove=function(){this._clear()},a.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},a}();const yS=gS;var mS=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){var n=t.getData(),o=this._updateSymbolDraw(n,t);o.updateData(n,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,r,i){var n=t.getData(),o=this._updateSymbolDraw(n,t);o.incrementalPrepareUpdate(n),this._finished=!1},e.prototype.incrementalRender=function(t,r,i){this._symbolDraw.incrementalUpdate(t,r.getData(),{clipShape:this._getClipShape(r)}),this._finished=t.end===r.getData().count()},e.prototype.updateTransform=function(t,r,i){var n=t.getData();if(this.group.dirty(),!this._finished||n.count()>1e4)return{update:!0};var o=ei("").reset(t,r,i);o.progress&&o.progress({start:0,end:n.count(),count:n.count()},n),this._symbolDraw.updateLayout(n)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){var r=t.coordinateSystem,i=r&&r.getArea&&r.getArea();return t.get("clip",!0)?i:null},e.prototype._updateSymbolDraw=function(t,r){var i=this._symbolDraw,n=r.pipelineContext,o=n.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new yS:new ti,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},e.prototype.remove=function(t,r){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(xt);const xS=mS;var SS=function(a){k(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(It);const bS=SS;var ms=function(a){k(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",ee).models[0]},e.type="cartesian2dAxis",e}(It);Te(ms,Xa);var ad={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},_S=ft({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},ad),hl=ft({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},ad),wS=ft({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},hl),AS=j({logBase:10},hl);const id={category:_S,value:hl,time:wS,log:AS};var TS={value:1,category:1,time:1,log:1};function ta(a,e,t,r){C(TS,function(i,n){var o=ft(ft({},id[n],!0),r,!0),s=function(l){k(u,l);function u(){var v=l!==null&&l.apply(this,arguments)||this;return v.type=e+"Axis."+n,v}return u.prototype.mergeDefaultAndTheme=function(v,c){var h=Qy(this),f=h?bn(v):{},p=c.getTheme();ft(v,p.get(n+"Axis")),ft(v,this.getDefaultOption()),v.type=ov(v),h&&_n(v,f,h)},u.prototype.optionUpdated=function(){var v=this.option;v.type==="category"&&(this.__ordinalMeta=tm.createByAxisModel(this))},u.prototype.getCategories=function(v){var c=this.option;if(c.type==="category")return v?c.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=e+"Axis."+n,u.defaultOption=o,u}(t);a.registerComponentModel(s)}),a.registerSubTypeDefaulter(e+"Axis",ov)}function ov(a){return a.type||(a.data?"category":"value")}var xs=["x","y"];function sv(a){return a.type==="interval"||a.type==="time"}var CS=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=xs,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,r=this.getAxis("y").scale;if(!(!sv(t)||!sv(r))){var i=t.getExtent(),n=r.getExtent(),o=this.dataToPoint([i[0],n[0]]),s=this.dataToPoint([i[1],n[1]]),l=i[1]-i[0],u=n[1]-n[0];if(!(!l||!u)){var v=(s[0]-o[0])/l,c=(s[1]-o[1])/u,h=o[0]-i[0]*v,f=o[1]-n[0]*c,p=this._transform=[v,0,0,c,h,f];this._invTransform=rp([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var r=this.getAxis("x"),i=this.getAxis("y");return r.contain(r.toLocalCoord(t[0]))&&i.contain(i.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.dataToPoint=function(t,r,i){i=i||[];var n=t[0],o=t[1];if(this._transform&&n!=null&&isFinite(n)&&o!=null&&isFinite(o))return Ee(i,t,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(n,r)),i[1]=l.toGlobalCoord(l.dataToCoord(o,r)),i},e.prototype.clampData=function(t,r){var i=this.getAxis("x").scale,n=this.getAxis("y").scale,o=i.getExtent(),s=n.getExtent(),l=i.parse(t[0]),u=n.parse(t[1]);return r=r||[],r[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),r[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),r},e.prototype.pointToData=function(t,r){var i=[];if(this._invTransform)return Ee(i,t,this._invTransform);var n=this.getAxis("x"),o=this.getAxis("y");return i[0]=n.coordToData(n.toLocalCoord(t[0]),r),i[1]=o.coordToData(o.toLocalCoord(t[1]),r),i},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(){var t=this.getAxis("x").getGlobalExtent(),r=this.getAxis("y").getGlobalExtent(),i=Math.min(t[0],t[1]),n=Math.min(r[0],r[1]),o=Math.max(t[0],t[1])-i,s=Math.max(r[0],r[1])-n;return new zt(i,n,o,s)},e}(em),DS=function(a){k(e,a);function e(t,r,i,n,o){var s=a.call(this,t,r,i)||this;return s.index=0,s.type=n||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.getGlobalExtent=function(t){var r=this.getExtent();return r[0]=this.toGlobalCoord(r[0]),r[1]=this.toGlobalCoord(r[1]),t&&r[0]>r[1]&&r.reverse(),r},e.prototype.pointToData=function(t,r){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),r)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(xe);const IS=DS;function Ss(a,e,t){t=t||{};var r=a.coordinateSystem,i=e.axis,n={},o=i.getAxesOnZeroOf()[0],s=i.position,l=o?"onZero":s,u=i.dim,v=r.getRect(),c=[v.x,v.x+v.width,v.y,v.y+v.height],h={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,p=u==="x"?[c[2]-f,c[3]+f]:[c[0]-f,c[1]+f];if(o){var d=o.toGlobalCoord(o.dataToCoord(0));p[h.onZero]=Math.max(Math.min(d,p[1]),p[0])}n.position=[u==="y"?p[h[l]]:c[0],u==="x"?p[h[l]]:c[3]],n.rotation=Math.PI/2*(u==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};n.labelDirection=n.tickDirection=n.nameDirection=g[s],n.labelOffset=o?p[h[s]]-p[h.onZero]:0,e.get(["axisTick","inside"])&&(n.tickDirection=-n.tickDirection),Ot(t.labelInside,e.get(["axisLabel","inside"]))&&(n.labelDirection=-n.labelDirection);var y=e.get(["axisLabel","rotate"]);return n.labelRotate=l==="top"?-y:y,n.z2=1,n}function lv(a){return a.get("coordinateSystem")==="cartesian2d"}function uv(a){var e={xAxisModel:null,yAxisModel:null};return C(e,function(t,r){var i=r.replace(/Model$/,""),n=a.getReferringComponents(i,ee).models[0];if(!n)throw new Error(i+' "'+Ar(a.get(i+"Index"),a.get(i+"Id"),0)+'" not found');e[r]=n}),e}var ro=Math.log;function nd(a,e,t){var r=Bi.prototype,i=r.getTicks.call(t),n=r.getTicks.call(t,!0),o=i.length-1,s=r.getInterval.call(t),l=rm(a,e),u=l.extent,v=l.fixMin,c=l.fixMax;if(a.type==="log"){var h=ro(a.base);u=[ro(u[0])/h,ro(u[1])/h]}a.setExtent(u[0],u[1]),a.calcNiceExtent({splitNumber:o,fixMin:v,fixMax:c});var f=r.getExtent.call(a);v&&(u[0]=f[0]),c&&(u[1]=f[1]);var p=r.getInterval.call(a),d=u[0],g=u[1];if(v&&c)p=(g-d)/o;else if(v)for(g=u[0]+p*o;g<u[1]&&isFinite(g)&&isFinite(u[1]);)p=Hn(p),g=u[0]+p*o;else if(c)for(d=u[1]-p*o;d>u[0]&&isFinite(d)&&isFinite(u[0]);)p=Hn(p),d=u[1]-p*o;else{var y=a.getTicks().length-1;y>o&&(p=Hn(p));var m=p*o;g=Math.ceil(u[1]/p)*p,d=Ae(g-m),d<0&&u[0]>=0?(d=0,g=Ae(m)):g>0&&u[1]<=0&&(g=0,d=-Ae(m))}var x=(i[0].value-n[0].value)/s,S=(i[o].value-n[o].value)/s;r.setExtent.call(a,d+p*x,g+p*S),r.setInterval.call(a,p),(x||S)&&r.setNiceExtent.call(a,d+p,g-p);{var _=r.getTicks.call(a);_[1]&&(!am(p)||fu(_[1].value)>fu(p))&&de("The ticks may be not readable when set min: "+e.get("min")+", max: "+e.get("max")+" and alignTicks: true")}}var LS=function(){function a(e,t,r){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=xs,this._initCartesian(e,t,r),this.model=e}return a.prototype.getRect=function(){return this._rect},a.prototype.update=function(e,t){var r=this._axesMap;this._updateScale(e,this.model);function i(o){var s,l=Ct(o),u=l.length;if(!!u){for(var v=[],c=u-1;c>=0;c--){var h=+l[c],f=o[h],p=f.model,d=f.scale;us(d)&&p.get("alignTicks")&&p.get("interval")==null?v.push(f):(qr(d,p),us(d)&&(s=f))}v.length&&(s||(s=v.pop(),qr(s.scale,s.model)),C(v,function(g){nd(g.scale,g.model,s.scale)}))}}i(r.x),i(r.y);var n={};C(r.x,function(o){vv(r,"y",o,n)}),C(r.y,function(o){vv(r,"x",o,n)}),this.resize(this.model,t)},a.prototype.resize=function(e,t,r){var i=e.getBoxLayoutParams(),n=!r&&e.get("containLabel"),o=Bt(i,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var s=this._axesList;l(),n&&(C(s,function(u){if(!u.model.get(["axisLabel","inside"])){var v=im(u);if(v){var c=u.isHorizontal()?"height":"width",h=u.model.get(["axisLabel","margin"]);o[c]-=v[c]+h,u.position==="top"?o.y+=v.height+h:u.position==="left"&&(o.x+=v.width+h)}}}),l()),C(this._coordsList,function(u){u.calcAffineTransform()});function l(){C(s,function(u){var v=u.isHorizontal(),c=v?[0,o.width]:[0,o.height],h=u.inverse?1:0;u.setExtent(c[h],c[1-h]),MS(u,v?o.x:o.y)})}},a.prototype.getAxis=function(e,t){var r=this._axesMap[e];if(r!=null)return r[t||0]},a.prototype.getAxes=function(){return this._axesList.slice()},a.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var r="x"+e+"y"+t;return this._coordsMap[r]}St(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,n=this._coordsList;i<n.length;i++)if(n[i].getAxis("x").index===e||n[i].getAxis("y").index===t)return n[i]},a.prototype.getCartesians=function(){return this._coordsList.slice()},a.prototype.convertToPixel=function(e,t,r){var i=this._findConvertTarget(t);return i.cartesian?i.cartesian.dataToPoint(r):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(r)):null},a.prototype.convertFromPixel=function(e,t,r){var i=this._findConvertTarget(t);return i.cartesian?i.cartesian.pointToData(r):i.axis?i.axis.coordToData(i.axis.toLocalCoord(r)):null},a.prototype._findConvertTarget=function(e){var t=e.seriesModel,r=e.xAxisModel||t&&t.getReferringComponents("xAxis",ee).models[0],i=e.yAxisModel||t&&t.getReferringComponents("yAxis",ee).models[0],n=e.gridModel,o=this._coordsList,s,l;if(t)s=t.coordinateSystem,yt(o,s)<0&&(s=null);else if(r&&i)s=this.getCartesian(r.componentIndex,i.componentIndex);else if(r)l=this.getAxis("x",r.componentIndex);else if(i)l=this.getAxis("y",i.componentIndex);else if(n){var u=n.coordinateSystem;u===this&&(s=this._coordsList[0])}return{cartesian:s,axis:l}},a.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},a.prototype._initCartesian=function(e,t,r){var i=this,n=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},l={x:0,y:0};if(t.eachComponent("xAxis",u("x"),this),t.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,C(s.x,function(v,c){C(s.y,function(h,f){var p="x"+c+"y"+f,d=new CS(p);d.master=i,d.model=e,i._coordsMap[p]=d,i._coordsList.push(d),d.addAxis(v),d.addAxis(h)})});function u(v){return function(c,h){if(!!ao(c,e)){var f=c.get("position");v==="x"?f!=="top"&&f!=="bottom"&&(f=o.bottom?"top":"bottom"):f!=="left"&&f!=="right"&&(f=o.left?"right":"left"),o[f]=!0;var p=new IS(v,wn(c),[0,0],c.get("type"),f),d=p.type==="category";p.onBand=d&&c.get("boundaryGap"),p.inverse=c.get("inverse"),c.axis=p,p.model=c,p.grid=n,p.index=h,n._axesList.push(p),s[v][h]=p,l[v]++}}}},a.prototype._updateScale=function(e,t){C(this._axesList,function(i){if(i.scale.setExtent(1/0,-1/0),i.type==="category"){var n=i.model.get("categorySortInfo");i.scale.setSortInfo(n)}}),e.eachSeries(function(i){if(lv(i)){var n=uv(i),o=n.xAxisModel,s=n.yAxisModel;if(!ao(o,t)||!ao(s,t))return;var l=this.getCartesian(o.componentIndex,s.componentIndex),u=i.getData(),v=l.getAxis("x"),c=l.getAxis("y");r(u,v),r(u,c)}},this);function r(i,n){C(ls(i,n.dim),function(o){n.scale.unionExtentFromData(i,o)})}},a.prototype.getTooltipAxes=function(e){var t=[],r=[];return C(this.getCartesians(),function(i){var n=e!=null&&e!=="auto"?i.getAxis(e):i.getBaseAxis(),o=i.getOtherAxis(n);yt(t,n)<0&&t.push(n),yt(r,o)<0&&r.push(o)}),{baseAxes:t,otherAxes:r}},a.create=function(e,t){var r=[];return e.eachComponent("grid",function(i,n){var o=new a(i,e,t);o.name="grid_"+n,o.resize(i,t,!0),i.coordinateSystem=o,r.push(o)}),e.eachSeries(function(i){if(!!lv(i)){var n=uv(i),o=n.xAxisModel,s=n.yAxisModel,l=o.getCoordSysModel();{if(!l)throw new Error('Grid "'+Ar(o.get("gridIndex"),o.get("gridId"),0)+'" not found');if(o.getCoordSysModel()!==s.getCoordSysModel())throw new Error("xAxis and yAxis must use the same grid")}var u=l.coordinateSystem;i.coordinateSystem=u.getCartesian(o.componentIndex,s.componentIndex)}}),r},a.dimensions=xs,a}();function ao(a,e){return a.getCoordSysModel()===e}function vv(a,e,t,r){t.getAxesOnZeroOf=function(){return n?[n]:[]};var i=a[e],n,o=t.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)cv(i[l])&&(n=i[l]);else for(var u in i)if(i.hasOwnProperty(u)&&cv(i[u])&&!r[v(i[u])]){n=i[u];break}n&&(r[v(n)]=!0);function v(c){return c.dim+"_"+c.index}}function cv(a){return a&&a.type!=="category"&&a.type!=="time"&&nm(a)}function MS(a,e){var t=a.getExtent(),r=t[0]+t[1];a.toGlobalCoord=a.dim==="x"?function(i){return i+e}:function(i){return r-i+e},a.toLocalCoord=a.dim==="x"?function(i){return i-e}:function(i){return r-i+e}}const PS=LS;var Ue=Math.PI,xr=function(){function a(e,t){this.group=new U,this.opt=t,this.axisModel=e,j(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var r=new U({x:t.position[0],y:t.position[1],rotation:t.rotation});r.updateTransform(),this._transformGroup=r}return a.prototype.hasBuilder=function(e){return!!hv[e]},a.prototype.add=function(e){hv[e](this.opt,this.axisModel,this.group,this._transformGroup)},a.prototype.getGroup=function(){return this.group},a.innerTextLayout=function(e,t,r){var i=ap(t-e),n,o;return Fi(i)?(o=r>0?"top":"bottom",n="center"):Fi(i-Ue)?(o=r>0?"bottom":"top",n="center"):(o="middle",i>0&&i<Ue?n=r>0?"right":"left":n=r>0?"left":"right"),{rotation:i,textAlign:n,textVerticalAlign:o}},a.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},a.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},a}(),hv={axisLine:function(a,e,t,r){var i=e.get(["axisLine","show"]);if(i==="auto"&&a.handleAutoShown&&(i=a.handleAutoShown("axisLine")),!!i){var n=e.axis.getExtent(),o=r.transform,s=[n[0],0],l=[n[1],0];o&&(Ee(s,s,o),Ee(l,l,o));var u=H({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),v=new Kt({subPixelOptimize:!0,shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:u,strokeContainThreshold:a.strokeContainThreshold||5,silent:!0,z2:1});v.anid="line",t.add(v);var c=e.get(["axisLine","symbol"]);if(c!=null){var h=e.get(["axisLine","symbolSize"]);K(c)&&(c=[c,c]),(K(h)||re(h))&&(h=[h,h]);var f=ia(e.get(["axisLine","symbolOffset"])||0,h),p=h[0],d=h[1];C([{rotate:a.rotation+Math.PI/2,offset:f[0],r:0},{rotate:a.rotation-Math.PI/2,offset:f[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(g,y){if(c[y]!=="none"&&c[y]!=null){var m=kt(c[y],-p/2,-d/2,p,d,u.stroke,!0),x=g.r+g.offset;m.attr({rotation:g.rotate,x:s[0]+x*Math.cos(a.rotation),y:s[1]-x*Math.sin(a.rotation),silent:!0,z2:11}),t.add(m)}})}}},axisTickLabel:function(a,e,t,r){var i=ES(t,r,e,a),n=NS(t,r,e,a);if(kS(e,n,i),VS(t,r,e,a.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=om(z(n,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));sm(o)}},axisName:function(a,e,t,r){var i=Ot(a.axisName,e.get("name"));if(!!i){var n=e.get("nameLocation"),o=a.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=e.axis.getExtent(),v=u[0]>u[1]?-1:1,c=[n==="start"?u[0]-v*l:n==="end"?u[1]+v*l:(u[0]+u[1])/2,pv(n)?a.labelOffset+o*l:0],h,f=e.get("nameRotate");f!=null&&(f=f*Ue/180);var p;pv(n)?h=xr.innerTextLayout(a.rotation,f!=null?f:a.rotation,o):(h=RS(a.rotation,n,f||0,u),p=a.axisNameAvailableWidth,p!=null&&(p=Math.abs(p/Math.sin(h.rotation)),!isFinite(p)&&(p=null)));var d=s.getFont(),g=e.get("nameTruncate",!0)||{},y=g.ellipsis,m=Ot(a.nameTruncateMaxWidth,g.maxWidth,p),x=new lt({x:c[0],y:c[1],rotation:h.rotation,silent:xr.isLabelSilent(e),style:Rt(s,{text:i,font:d,overflow:"truncate",width:m,ellipsis:y,fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:s.get("align")||h.textAlign,verticalAlign:s.get("verticalAlign")||h.textVerticalAlign}),z2:1});if(Ka({el:x,componentModel:e,itemName:i}),x.__fullText=i,x.anid="name",e.get("triggerEvent")){var S=xr.makeAxisEventDataBase(e);S.targetType="axisName",S.name=i,tt(x).eventData=S}r.add(x),x.updateTransform(),t.add(x),x.decomposeTransform()}}};function RS(a,e,t,r){var i=ap(t-a),n,o,s=r[0]>r[1],l=e==="start"&&!s||e!=="start"&&s;return Fi(i-Ue/2)?(o=l?"bottom":"top",n="center"):Fi(i-Ue*1.5)?(o=l?"top":"bottom",n="center"):(o="middle",i<Ue*1.5&&i>Ue/2?n=l?"left":"right":n=l?"right":"left"),{rotation:i,textAlign:n,textVerticalAlign:o}}function kS(a,e,t){if(!lm(a.axis)){var r=a.get(["axisLabel","showMinLabel"]),i=a.get(["axisLabel","showMaxLabel"]);e=e||[],t=t||[];var n=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=t[0],v=t[1],c=t[t.length-1],h=t[t.length-2];r===!1?(ie(n),ie(u)):fv(n,o)&&(r?(ie(o),ie(v)):(ie(n),ie(u))),i===!1?(ie(s),ie(c)):fv(l,s)&&(i?(ie(l),ie(h)):(ie(s),ie(c)))}}function ie(a){a&&(a.ignore=!0)}function fv(a,e){var t=a&&a.getBoundingRect().clone(),r=e&&e.getBoundingRect().clone();if(!(!t||!r)){var i=um([]);return oa(i,i,-a.rotation),t.applyTransform(Gi([],i,a.getLocalTransform())),r.applyTransform(Gi([],i,e.getLocalTransform())),t.intersect(r)}}function pv(a){return a==="middle"||a==="center"}function od(a,e,t,r,i){for(var n=[],o=[],s=[],l=0;l<a.length;l++){var u=a[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=t,e&&(Ee(o,o,e),Ee(s,s,e));var v=new Kt({subPixelOptimize:!0,shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0});v.anid=i+"_"+a[l].tickValue,n.push(v)}return n}function ES(a,e,t,r){var i=t.axis,n=t.getModel("axisTick"),o=n.get("show");if(o==="auto"&&r.handleAutoShown&&(o=r.handleAutoShown("axisTick")),!(!o||i.scale.isBlank())){for(var s=n.getModel("lineStyle"),l=r.tickDirection*n.get("length"),u=i.getTicksCoords(),v=od(u,e.transform,l,j(s.getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;c<v.length;c++)a.add(v[c]);return v}}function VS(a,e,t,r){var i=t.axis,n=t.getModel("minorTick");if(!(!n.get("show")||i.scale.isBlank())){var o=i.getMinorTicksCoords();if(!!o.length)for(var s=n.getModel("lineStyle"),l=r*n.get("length"),u=j(s.getLineStyle(),j(t.getModel("axisTick").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})),v=0;v<o.length;v++)for(var c=od(o[v],e.transform,l,u,"minorticks_"+v),h=0;h<c.length;h++)a.add(c[h])}}function NS(a,e,t,r){var i=t.axis,n=Ot(r.axisLabelShow,t.get(["axisLabel","show"]));if(!(!n||i.scale.isBlank())){var o=t.getModel("axisLabel"),s=o.get("margin"),l=i.getViewLabels(),u=(Ot(r.labelRotate,o.get("rotate"))||0)*Ue/180,v=xr.innerTextLayout(r.rotation,u,r.labelDirection),c=t.getCategories&&t.getCategories(!0),h=[],f=xr.isLabelSilent(t),p=t.get("triggerEvent");return C(l,function(d,g){var y=i.scale.type==="ordinal"?i.scale.getRawOrdinalNumber(d.tickValue):d.tickValue,m=d.formattedLabel,x=d.rawLabel,S=o;if(c&&c[y]){var _=c[y];St(_)&&_.textStyle&&(S=new Pt(_.textStyle,o,t.ecModel))}var b=S.getTextColor()||t.get(["axisLine","lineStyle","color"]),w=i.dataToCoord(y),A=new lt({x:w,y:r.labelOffset+r.labelDirection*s,rotation:v.rotation,silent:f,z2:10+(d.level||0),style:Rt(S,{text:m,align:S.getShallow("align",!0)||v.textAlign,verticalAlign:S.getShallow("verticalAlign",!0)||S.getShallow("baseline",!0)||v.textVerticalAlign,fill:rt(b)?b(i.type==="category"?x:i.type==="value"?y+"":y,g):b})});if(A.anid="label_"+y,p){var T=xr.makeAxisEventDataBase(t);T.targetType="axisLabel",T.value=x,tt(A).eventData=T}e.add(A),A.updateTransform(),h.push(A),a.add(A),A.decomposeTransform()}),h}}const Ne=xr;function OS(a,e){var t={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return zS(t,a,e),t.seriesInvolved&&GS(t,a),t}function zS(a,e,t){var r=e.getComponent("tooltip"),i=e.getComponent("axisPointer"),n=i.get("link",!0)||[],o=[];C(t.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=Oa(s.model),u=a.coordSysAxesInfo[l]={};a.coordSysMap[l]=s;var v=s.model,c=v.getModel("tooltip",r);if(C(s.getAxes(),q(d,!1,null)),s.getTooltipAxes&&r&&c.get("show")){var h=c.get("trigger")==="axis",f=c.get(["axisPointer","type"])==="cross",p=s.getTooltipAxes(c.get(["axisPointer","axis"]));(h||f)&&C(p.baseAxes,q(d,f?"cross":!0,h)),f&&C(p.otherAxes,q(d,"cross",!1))}function d(g,y,m){var x=m.model.getModel("axisPointer",i),S=x.get("show");if(!(!S||S==="auto"&&!g&&!bs(x))){y==null&&(y=x.get("triggerTooltip")),x=g?BS(m,c,i,e,g,y):x;var _=x.get("snap"),b=Oa(m.model),w=y||_||m.type==="category",A=a.axesInfo[b]={key:b,axis:m,coordSys:s,axisPointerModel:x,triggerTooltip:y,involveSeries:w,snap:_,useHandle:bs(x),seriesModels:[],linkGroup:null};u[b]=A,a.seriesInvolved=a.seriesInvolved||w;var T=FS(n,m);if(T!=null){var D=o[T]||(o[T]={axesInfo:{}});D.axesInfo[b]=A,D.mapper=n[T].mapper,A.linkGroup=D}}}})}function BS(a,e,t,r,i,n){var o=e.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};C(s,function(h){l[h]=nt(o.get(h))}),l.snap=a.type!=="category"&&!!n,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),i==="cross"){var v=o.get(["label","show"]);if(u.show=v!=null?v:!0,!n){var c=l.lineStyle=o.get("crossStyle");c&&j(u,c.textStyle)}}return a.model.getModel("axisPointer",new Pt(l,t,r))}function GS(a,e){e.eachSeries(function(t){var r=t.coordinateSystem,i=t.get(["tooltip","trigger"],!0),n=t.get(["tooltip","show"],!0);!r||i==="none"||i===!1||i==="item"||n===!1||t.get(["axisPointer","show"],!0)===!1||C(a.coordSysAxesInfo[Oa(r.model)],function(o){var s=o.axis;r.getAxis(s.dim)===s&&(o.seriesModels.push(t),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=t.getData().count())})})}function FS(a,e){for(var t=e.model,r=e.dim,i=0;i<a.length;i++){var n=a[i]||{};if(io(n[r+"AxisId"],t.id)||io(n[r+"AxisIndex"],t.componentIndex)||io(n[r+"AxisName"],t.name))return i}}function io(a,e){return a==="all"||B(a)&&yt(a,e)>=0||a===e}function HS(a){var e=fl(a);if(!!e){var t=e.axisPointerModel,r=e.axis.scale,i=t.option,n=t.get("status"),o=t.get("value");o!=null&&(o=r.parse(o));var s=bs(t);n==null&&(i.status=s?"show":"hide");var l=r.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),i.value=o,s&&(i.status=e.axis.scale.isBlank()?"hide":"show")}}function fl(a){var e=(a.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[Oa(a)]}function WS(a){var e=fl(a);return e&&e.axisPointerModel}function bs(a){return!!a.get(["handle","show"])}function Oa(a){return a.type+"||"+a.id}var no={},$S=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i,n){this.axisPointerClass&&HS(t),a.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,i,!0)},e.prototype.updateAxisPointer=function(t,r,i,n){this._doUpdateAxisPointerClass(t,i,!1)},e.prototype.remove=function(t,r){var i=this._axisPointer;i&&i.remove(r)},e.prototype.dispose=function(t,r){this._disposeAxisPointer(r),a.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(t,r,i){var n=e.getAxisPointerClass(this.axisPointerClass);if(!!n){var o=WS(t);o?(this._axisPointer||(this._axisPointer=new n)).render(t,o,r,i):this._disposeAxisPointer(r)}},e.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},e.registerAxisPointerClass=function(t,r){if(no[t])throw new Error("axisPointer "+t+" exists");no[t]=r},e.getAxisPointerClass=function(t){return t&&no[t]},e.type="axis",e}(Et);const Cr=$S;var _s=Lt();function sd(a,e,t,r){var i=t.axis;if(!i.scale.isBlank()){var n=t.getModel("splitArea"),o=n.getModel("areaStyle"),s=o.get("color"),l=r.coordinateSystem.getRect(),u=i.getTicksCoords({tickModel:n,clamp:!0});if(!!u.length){var v=s.length,c=_s(a).splitAreaColors,h=it(),f=0;if(c)for(var p=0;p<u.length;p++){var d=c.get(u[p].tickValue);if(d!=null){f=(d+(v-1)*p)%v;break}}var g=i.toGlobalCoord(u[0].coord),y=o.getAreaStyle();s=B(s)?s:[s];for(var p=1;p<u.length;p++){var m=i.toGlobalCoord(u[p].coord),x=void 0,S=void 0,_=void 0,b=void 0;i.isHorizontal()?(x=g,S=l.y,_=m-x,b=l.height,g=x+_):(x=l.x,S=g,_=l.width,b=m-S,g=S+b);var w=u[p-1].tickValue;w!=null&&h.set(w,f),e.add(new ct({anid:w!=null?"area_"+w:null,shape:{x,y:S,width:_,height:b},style:j({fill:s[f]},y),autoBatch:!0,silent:!0})),f=(f+1)%v}_s(a).splitAreaColors=h}}}function ld(a){_s(a).splitAreaColors=null}var ZS=["axisLine","axisTickLabel","axisName"],US=["splitArea","splitLine","minorSplitLine"],ud=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="CartesianAxisPointer",t}return e.prototype.render=function(t,r,i,n){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new U,this.group.add(this._axisGroup),!!t.get("show")){var s=t.getCoordSysModel(),l=Ss(s,t),u=new Ne(t,H({handleAutoShown:function(c){for(var h=s.coordinateSystem.getCartesians(),f=0;f<h.length;f++)if(us(h[f].getOtherAxis(t.axis).scale))return!0;return!1}},l));C(ZS,u.add,u),this._axisGroup.add(u.getGroup()),C(US,function(c){t.get([c,"show"])&&YS[c](this,this._axisGroup,t,s)},this);var v=n&&n.type==="changeAxisOrder"&&n.isInitSort;v||An(o,this._axisGroup,t),a.prototype.render.call(this,t,r,i,n)}},e.prototype.remove=function(){ld(this)},e.type="cartesianAxis",e}(Cr),YS={splitLine:function(a,e,t,r){var i=t.axis;if(!i.scale.isBlank()){var n=t.getModel("splitLine"),o=n.getModel("lineStyle"),s=o.get("color");s=B(s)?s:[s];for(var l=r.coordinateSystem.getRect(),u=i.isHorizontal(),v=0,c=i.getTicksCoords({tickModel:n}),h=[],f=[],p=o.getLineStyle(),d=0;d<c.length;d++){var g=i.toGlobalCoord(c[d].coord);u?(h[0]=g,h[1]=l.y,f[0]=g,f[1]=l.y+l.height):(h[0]=l.x,h[1]=g,f[0]=l.x+l.width,f[1]=g);var y=v++%s.length,m=c[d].tickValue;e.add(new Kt({anid:m!=null?"line_"+c[d].tickValue:null,subPixelOptimize:!0,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:f[0],y2:f[1]},style:j({stroke:s[y]},p),silent:!0}))}}},minorSplitLine:function(a,e,t,r){var i=t.axis,n=t.getModel("minorSplitLine"),o=n.getModel("lineStyle"),s=r.coordinateSystem.getRect(),l=i.isHorizontal(),u=i.getMinorTicksCoords();if(!!u.length)for(var v=[],c=[],h=o.getLineStyle(),f=0;f<u.length;f++)for(var p=0;p<u[f].length;p++){var d=i.toGlobalCoord(u[f][p].coord);l?(v[0]=d,v[1]=s.y,c[0]=d,c[1]=s.y+s.height):(v[0]=s.x,v[1]=d,c[0]=s.x+s.width,c[1]=d),e.add(new Kt({anid:"minor_line_"+u[f][p].tickValue,subPixelOptimize:!0,autoBatch:!0,shape:{x1:v[0],y1:v[1],x2:c[0],y2:c[1]},style:h,silent:!0}))}},splitArea:function(a,e,t,r){sd(a,e,t,r)}},vd=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="xAxis",e}(ud),XS=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=vd.type,t}return e.type="yAxis",e}(ud),KS=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="grid",t}return e.prototype.render=function(t,r){this.group.removeAll(),t.get("show")&&this.group.add(new ct({shape:t.coordinateSystem.getRect(),style:j({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))},e.type="grid",e}(Et),dv={offset:0};function cd(a){a.registerComponentView(KS),a.registerComponentModel(bS),a.registerCoordinateSystem("cartesian2d",PS),ta(a,"x",ms,dv),ta(a,"y",ms,dv),a.registerComponentView(vd),a.registerComponentView(XS),a.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function qS(a){J(cd),a.registerSeriesModel(fS),a.registerChartView(xS),a.registerLayout(ei("scatter"))}function jS(a){a.eachSeriesByType("radar",function(e){var t=e.getData(),r=[],i=e.coordinateSystem;if(!!i){var n=i.getIndicatorAxes();C(n,function(o,s){t.each(t.mapDimension(n[s].dim),function(l,u){r[u]=r[u]||[];var v=i.dataToPoint(l,s);r[u][s]=gv(v)?v:yv(i)})}),t.each(function(o){var s=vm(r[o],function(l){return gv(l)})||yv(i);r[o].push(s.slice()),t.setItemLayout(o,r[o])})}})}function gv(a){return!isNaN(a[0])&&!isNaN(a[1])}function yv(a){return[a.cx,a.cy]}function JS(a){var e=a.polar;if(e){B(e)||(e=[e]);var t=[];C(e,function(r,i){r.indicator?(r.type&&!r.shape&&(r.shape=r.type),a.radar=a.radar||[],B(a.radar)||(a.radar=[a.radar]),a.radar.push(r)):t.push(r)}),a.polar=t}C(a.series,function(r){r&&r.type==="radar"&&r.polarIndex&&(r.radarIndex=r.polarIndex)})}var QS=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){var n=t.coordinateSystem,o=this.group,s=t.getData(),l=this._data;function u(h,f){var p=h.getItemVisual(f,"symbol")||"circle";if(p!=="none"){var d=Ua(h.getItemVisual(f,"symbolSize")),g=kt(p,-1,-1,2,2),y=h.getItemVisual(f,"symbolRotate")||0;return g.attr({style:{strokeNoScale:!0},z2:100,scaleX:d[0]/2,scaleY:d[1]/2,rotation:y*Math.PI/180||0}),g}}function v(h,f,p,d,g,y){p.removeAll();for(var m=0;m<f.length-1;m++){var x=u(d,g);x&&(x.__dimIdx=m,h[m]?(x.setPosition(h[m]),qa[y?"initProps":"updateProps"](x,{x:f[m][0],y:f[m][1]},t,g)):x.setPosition(f[m]),p.add(x))}}function c(h){return z(h,function(f){return[n.cx,n.cy]})}s.diff(l).add(function(h){var f=s.getItemLayout(h);if(!!f){var p=new ce,d=new me,g={shape:{points:f}};p.shape.points=c(f),d.shape.points=c(f),wt(p,g,t,h),wt(d,g,t,h);var y=new U,m=new U;y.add(d),y.add(p),y.add(m),v(d.shape.points,f,m,s,h,!0),s.setItemGraphicEl(h,y)}}).update(function(h,f){var p=l.getItemGraphicEl(f),d=p.childAt(0),g=p.childAt(1),y=p.childAt(2),m={shape:{points:s.getItemLayout(h)}};!m.shape.points||(v(d.shape.points,m.shape.points,y,s,h,!1),pe(g),pe(d),ot(d,m,t),ot(g,m,t),s.setItemGraphicEl(h,p))}).remove(function(h){o.remove(l.getItemGraphicEl(h))}).execute(),s.eachItemGraphicEl(function(h,f){var p=s.getItemModel(f),d=h.childAt(0),g=h.childAt(1),y=h.childAt(2),m=s.getItemVisual(f,"style"),x=m.fill;o.add(h),d.useStyle(j(p.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:x})),$t(d,p,"lineStyle"),$t(g,p,"areaStyle");var S=p.getModel("areaStyle"),_=S.isEmpty()&&S.parentModel.isEmpty();g.ignore=_,C(["emphasis","select","blur"],function(A){var T=p.getModel([A,"areaStyle"]),D=T.isEmpty()&&T.parentModel.isEmpty();g.ensureState(A).ignore=D&&_}),g.useStyle(j(S.getAreaStyle(),{fill:x,opacity:.7,decal:m.decal}));var b=p.getModel("emphasis"),w=b.getModel("itemStyle").getItemStyle();y.eachChild(function(A){if(A instanceof ye){var T=A.style;A.useStyle(H({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},m))}else A.useStyle(m),A.setColor(x),A.style.strokeNoScale=!0;var D=A.ensureState("emphasis");D.style=nt(w);var I=s.getStore().get(s.getDimensionIndex(A.__dimIdx),f);(I==null||isNaN(I))&&(I=""),Yt(A,Ht(p),{labelFetcher:s.hostModel,labelDataIndex:f,labelDimIndex:A.__dimIdx,defaultText:I,inheritColor:x,defaultOpacity:m.opacity})}),bt(h,b.get("focus"),b.get("blurScope"),b.get("disabled"))}),this._data=s},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.type="radar",e}(xt);const t1=QS;var e1=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){a.prototype.init.apply(this,arguments),this.legendVisualProvider=new ai($(this.getData,this),$(this.getRawData,this))},e.prototype.getInitialData=function(t,r){return la(this,{generateCoord:"indicator_",generateCoordCount:1/0})},e.prototype.formatTooltip=function(t,r,i){var n=this.getData(),o=this.coordinateSystem,s=o.getIndicatorAxes(),l=this.getData().getName(t),u=l===""?this.name:l,v=cm(this,t);return Ut("section",{header:u,sortBlocks:!0,blocks:z(s,function(c){var h=n.get(n.mapDimension(c.dim),t);return Ut("nameValue",{markerType:"subItem",markerColor:v,name:c.name,value:h,sortParam:h})})})},e.prototype.getTooltipPosition=function(t){if(t!=null){for(var r=this.getData(),i=this.coordinateSystem,n=r.getValues(z(i.dimensions,function(u){return r.mapDimension(u)}),t),o=0,s=n.length;o<s;o++)if(!isNaN(n[o])){var l=i.getIndicatorAxes();return i.coordToPoint(l[o].dataToCoord(n[o]),o)}}},e.type="series.radar",e.dependencies=["radar"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},e}(At);const r1=e1;var va=id.value;function fi(a,e){return j({show:e},a)}var a1=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){var t=this.get("boundaryGap"),r=this.get("splitNumber"),i=this.get("scale"),n=this.get("axisLine"),o=this.get("axisTick"),s=this.get("axisLabel"),l=this.get("axisName"),u=this.get(["axisName","show"]),v=this.get(["axisName","formatter"]),c=this.get("axisNameGap"),h=this.get("triggerEvent"),f=z(this.get("indicator")||[],function(p){p.max!=null&&p.max>0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var d=l;p.color!=null&&(d=j({color:p.color},l));var g=ft(nt(p),{boundaryGap:t,splitNumber:r,scale:i,axisLine:n,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:c,nameTextStyle:d,triggerEvent:h},!1);if(u||(g.name=""),K(v)){var y=g.name;g.name=v.replace("{value}",y!=null?y:"")}else rt(v)&&(g.name=v(g.name,g));var m=new Pt(g,null,this.ecModel);return Te(m,Xa.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m},this);this._indicatorModels=f},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:ft({lineStyle:{color:"#bbb"}},va.axisLine),axisLabel:fi(va.axisLabel,!1),axisTick:fi(va.axisTick,!1),splitLine:fi(va.splitLine,!0),splitArea:fi(va.splitArea,!0),indicator:[]},e}(It);const i1=a1;var n1=["axisLine","axisTickLabel","axisName"],o1=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){var n=this.group;n.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var r=t.coordinateSystem,i=r.getIndicatorAxes(),n=z(i,function(o){var s=o.model.get("showName")?o.name:"",l=new Ne(o.model,{axisName:s,position:[r.cx,r.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});C(n,function(o){C(n1,o.add,o),this.group.add(o.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(t){var r=t.coordinateSystem,i=r.getIndicatorAxes();if(!i.length)return;var n=t.get("shape"),o=t.getModel("splitLine"),s=t.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),v=o.get("show"),c=s.get("show"),h=l.get("color"),f=u.get("color"),p=B(h)?h:[h],d=B(f)?f:[f],g=[],y=[];function m(R,E,N){var V=N%E.length;return R[V]=R[V]||[],V}if(n==="circle")for(var x=i[0].getTicksCoords(),S=r.cx,_=r.cy,b=0;b<x.length;b++){if(v){var w=m(g,p,b);g[w].push(new br({shape:{cx:S,cy:_,r:x[b].coord}}))}if(c&&b<x.length-1){var w=m(y,d,b);y[w].push(new ip({shape:{cx:S,cy:_,r0:x[b].coord,r:x[b+1].coord}}))}}else for(var A,T=z(i,function(R,E){var N=R.getTicksCoords();return A=A==null?N.length-1:Math.min(N.length-1,A),z(N,function(V){return r.coordToPoint(V.coord,E)})}),D=[],b=0;b<=A;b++){for(var I=[],L=0;L<i.length;L++)I.push(T[L][b]);if(I[0]?I.push(I[0].slice()):console.error("Can't draw value axis "+b),v){var w=m(g,p,b);g[w].push(new me({shape:{points:I}}))}if(c&&D){var w=m(y,d,b-1);y[w].push(new ce({shape:{points:I.concat(D)}}))}D=I.slice().reverse()}var M=l.getLineStyle(),P=u.getAreaStyle();C(y,function(R,E){this.group.add(he(R,{style:j({stroke:"none",fill:d[E%d.length]},P),silent:!0}))},this),C(g,function(R,E){this.group.add(he(R,{style:j({fill:"none",stroke:p[E%p.length]},M),silent:!0}))},this)},e.type="radar",e}(Et);const s1=o1;var l1=function(a){k(e,a);function e(t,r,i){var n=a.call(this,t,r,i)||this;return n.type="value",n.angle=0,n.name="",n}return e}(xe);const u1=l1;var v1=function(){function a(e,t,r){this.dimensions=[],this._model=e,this._indicatorAxes=z(e.getIndicatorModels(),function(i,n){var o="indicator_"+n,s=new u1(o,new Bi);return s.name=i.get("name"),s.model=i,i.axis=s,this.dimensions.push(o),s},this),this.resize(e,r)}return a.prototype.getIndicatorAxes=function(){return this._indicatorAxes},a.prototype.dataToPoint=function(e,t){var r=this._indicatorAxes[t];return this.coordToPoint(r.dataToCoord(e),t)},a.prototype.coordToPoint=function(e,t){var r=this._indicatorAxes[t],i=r.angle,n=this.cx+e*Math.cos(i),o=this.cy-e*Math.sin(i);return[n,o]},a.prototype.pointToData=function(e){var t=e[0]-this.cx,r=e[1]-this.cy,i=Math.sqrt(t*t+r*r);t/=i,r/=i;for(var n=Math.atan2(-r,t),o=1/0,s,l=-1,u=0;u<this._indicatorAxes.length;u++){var v=this._indicatorAxes[u],c=Math.abs(n-v.angle);c<o&&(s=v,l=u,o=c)}return[l,+(s&&s.coordToData(i))]},a.prototype.resize=function(e,t){var r=e.get("center"),i=t.getWidth(),n=t.getHeight(),o=Math.min(i,n)/2;this.cx=G(r[0],i),this.cy=G(r[1],n),this.startAngle=e.get("startAngle")*Math.PI/180;var s=e.get("radius");(K(s)||re(s))&&(s=[0,s]),this.r0=G(s[0],o),this.r=G(s[1],o),C(this._indicatorAxes,function(l,u){l.setExtent(this.r0,this.r);var v=this.startAngle+u*Math.PI*2/this._indicatorAxes.length;v=Math.atan2(Math.sin(v),Math.cos(v)),l.angle=v},this)},a.prototype.update=function(e,t){var r=this._indicatorAxes,i=this._model;C(r,function(s){s.scale.setExtent(1/0,-1/0)}),e.eachSeriesByType("radar",function(s,l){if(!(s.get("coordinateSystem")!=="radar"||e.getComponent("radar",s.get("radarIndex"))!==i)){var u=s.getData();C(r,function(v){v.scale.unionExtentFromData(u,u.mapDimension(v.dim))})}},this);var n=i.get("splitNumber"),o=new Bi;o.setExtent(0,n),o.setInterval(1),C(r,function(s,l){nd(s.scale,s.model,o)})},a.prototype.convertToPixel=function(e,t,r){return console.warn("Not implemented."),null},a.prototype.convertFromPixel=function(e,t,r){return console.warn("Not implemented."),null},a.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},a.create=function(e,t){var r=[];return e.eachComponent("radar",function(i){var n=new a(i,e,t);r.push(n),i.coordinateSystem=n}),e.eachSeriesByType("radar",function(i){i.get("coordinateSystem")==="radar"&&(i.coordinateSystem=r[i.get("radarIndex")||0])}),r},a.dimensions=[],a}();const c1=v1;function h1(a){a.registerCoordinateSystem("radar",c1),a.registerComponentModel(i1),a.registerComponentView(s1),a.registerVisual({seriesType:"radar",reset:function(e){var t=e.getData();t.each(function(r){t.setItemVisual(r,"legendIcon","roundRect")}),t.setVisual("legendIcon","roundRect")}})}function f1(a){J(h1),a.registerChartView(t1),a.registerSeriesModel(r1),a.registerLayout(jS),a.registerProcessor(ri("radar")),a.registerPreprocessor(JS)}var mv="\0_ec_interaction_mutex";function p1(a,e,t){var r=pl(a);r[e]=t}function d1(a,e,t){var r=pl(a),i=r[e];i===t&&(r[e]=null)}function xv(a,e){return!!pl(a)[e]}function pl(a){return a[mv]||(a[mv]={})}Tn({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},Ve);var g1=function(a){k(e,a);function e(t){var r=a.call(this)||this;r._zr=t;var i=$(r._mousedownHandler,r),n=$(r._mousemoveHandler,r),o=$(r._mouseupHandler,r),s=$(r._mousewheelHandler,r),l=$(r._pinchHandler,r);return r.enable=function(u,v){this.disable(),this._opt=j(nt(v)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),u==null&&(u=!0),(u===!0||u==="move"||u==="pan")&&(t.on("mousedown",i),t.on("mousemove",n),t.on("mouseup",o)),(u===!0||u==="scale"||u==="zoom")&&(t.on("mousewheel",s),t.on("pinch",l))},r.disable=function(){t.off("mousedown",i),t.off("mousemove",n),t.off("mouseup",o),t.off("mousewheel",s),t.off("pinch",l)},r}return 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(!(pu(t)||t.target&&t.target.draggable)){var r=t.offsetX,i=t.offsetY;this.pointerChecker&&this.pointerChecker(t,r,i)&&(this._x=r,this._y=i,this._dragging=!0)}},e.prototype._mousemoveHandler=function(t){if(!(!this._dragging||!Pi("moveOnMouseMove",t,this._opt)||t.gestureEvent==="pinch"||xv(this._zr,"globalPan"))){var r=t.offsetX,i=t.offsetY,n=this._x,o=this._y,s=r-n,l=i-o;this._x=r,this._y=i,this._opt.preventDefaultMouseMove&&je(t.event),hd(this,"pan","moveOnMouseMove",t,{dx:s,dy:l,oldX:n,oldY:o,newX:r,newY:i,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(t){pu(t)||(this._dragging=!1)},e.prototype._mousewheelHandler=function(t){var r=Pi("zoomOnMouseWheel",t,this._opt),i=Pi("moveOnMouseWheel",t,this._opt),n=t.wheelDelta,o=Math.abs(n),s=t.offsetX,l=t.offsetY;if(!(n===0||!r&&!i)){if(r){var u=o>3?1.4:o>1?1.2:1.1,v=n>0?u:1/u;oo(this,"zoom","zoomOnMouseWheel",t,{scale:v,originX:s,originY:l,isAvailableBehavior:null})}if(i){var c=Math.abs(n),h=(n>0?1:-1)*(c>3?.4:c>1?.15:.05);oo(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:h,originX:s,originY:l,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){if(!xv(this._zr,"globalPan")){var r=t.pinchScale>1?1.1:1/1.1;oo(this,"zoom",null,t,{scale:r,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e}(np);function oo(a,e,t,r,i){a.pointerChecker&&a.pointerChecker(r,i.originX,i.originY)&&(je(r.event),hd(a,e,t,r,i))}function hd(a,e,t,r,i){i.isAvailableBehavior=$(Pi,null,t,r),a.trigger(e,i)}function Pi(a,e,t){var r=t[a];return!a||r&&(!K(r)||e.event[r+"Key"])}const ii=g1;function dl(a,e,t){var r=a.target;r.x+=e,r.y+=t,r.dirty()}function gl(a,e,t,r){var i=a.target,n=a.zoomLimit,o=a.zoom=a.zoom||1;if(o*=e,n){var s=n.min||0,l=n.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/a.zoom;a.zoom=o,i.x-=(t-i.x)*(u-1),i.y-=(r-i.y)*(u-1),i.scaleX*=u,i.scaleY*=u,i.dirty()}var y1={axisPointer:1,tooltip:1,brush:1};function En(a,e,t){var r=e.getComponentByElement(a.topTarget),i=r&&r.coordinateSystem;return r&&r!==t&&!y1.hasOwnProperty(r.mainType)&&i&&i.model!==t}function fd(a){if(K(a)){var e=new DOMParser;a=e.parseFromString(a,"text/xml")}var t=a;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}var so,Ki={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},Sv=Ct(Ki),qi={"alignment-baseline":"textBaseline","stop-color":"stopColor"},bv=Ct(qi),m1=function(){function a(){this._defs={},this._root=null}return a.prototype.parse=function(e,t){t=t||{};var r=fd(e);if(!r)throw new Error("Illegal svg");this._defsUsePending=[];var i=new U;this._root=i;var n=[],o=r.getAttribute("viewBox")||"",s=parseFloat(r.getAttribute("width")||t.width),l=parseFloat(r.getAttribute("height")||t.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),ae(r,i,null,!0,!1);for(var u=r.firstChild;u;)this._parseNode(u,i,n,null,!1,!1),u=u.nextSibling;b1(this._defs,this._defsUsePending),this._defsUsePending=[];var v,c;if(o){var h=Vn(o);h.length>=4&&(v={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(v&&s!=null&&l!=null&&(c=dd(v,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var f=i;i=new U,i.add(f),f.scaleX=f.scaleY=c.scale,f.x=c.x,f.y=c.y}return!t.ignoreRootClip&&s!=null&&l!=null&&i.setClipPath(new ct({shape:{x:0,y:0,width:s,height:l}})),{root:i,width:s,height:l,viewBoxRect:v,viewBoxTransform:c,named:n}},a.prototype._parseNode=function(e,t,r,i,n,o){var s=e.nodeName.toLowerCase(),l,u=i;if(s==="defs"&&(n=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=t;else{if(!n){var v=so[s];if(v&&F(so,s)){l=v.call(this,e,t);var c=e.getAttribute("name");if(c){var h={name:c,namedFrom:null,svgNodeTagLower:s,el:l};r.push(h),s==="g"&&(u=h)}else i&&r.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:l});t.add(l)}}var f=_v[s];if(f&&F(_v,s)){var p=f.call(this,e),d=e.getAttribute("id");d&&(this._defs[d]=p)}}if(l&&l.isGroup)for(var g=e.firstChild;g;)g.nodeType===1?this._parseNode(g,l,r,u,n,o):g.nodeType===3&&o&&this._parseText(g,l),g=g.nextSibling},a.prototype._parseText=function(e,t){var r=new Xf({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});ne(t,r),ae(e,r,this._defsUsePending,!1,!1),x1(r,t);var i=r.style,n=i.fontSize;n&&n<9&&(i.fontSize=9,r.scaleX*=n/9,r.scaleY*=n/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var s=r.getBoundingRect();return this._textX+=s.width,t.add(r),r},a.internalField=function(){so={g:function(e,t){var r=new U;return ne(t,r),ae(e,r,this._defsUsePending,!1,!1),r},rect:function(e,t){var r=new ct;return ne(t,r),ae(e,r,this._defsUsePending,!1,!1),r.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),r.silent=!0,r},circle:function(e,t){var r=new br;return ne(t,r),ae(e,r,this._defsUsePending,!1,!1),r.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),r.silent=!0,r},line:function(e,t){var r=new Kt;return ne(t,r),ae(e,r,this._defsUsePending,!1,!1),r.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),r.silent=!0,r},ellipse:function(e,t){var r=new hm;return ne(t,r),ae(e,r,this._defsUsePending,!1,!1),r.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),r.silent=!0,r},polygon:function(e,t){var r=e.getAttribute("points"),i;r&&(i=Tv(r));var n=new ce({shape:{points:i||[]},silent:!0});return ne(t,n),ae(e,n,this._defsUsePending,!1,!1),n},polyline:function(e,t){var r=e.getAttribute("points"),i;r&&(i=Tv(r));var n=new me({shape:{points:i||[]},silent:!0});return ne(t,n),ae(e,n,this._defsUsePending,!1,!1),n},image:function(e,t){var r=new ye;return ne(t,r),ae(e,r,this._defsUsePending,!1,!1),r.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),r.silent=!0,r},text:function(e,t){var r=e.getAttribute("x")||"0",i=e.getAttribute("y")||"0",n=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(r)+parseFloat(n),this._textY=parseFloat(i)+parseFloat(o);var s=new U;return ne(t,s),ae(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,t){var r=e.getAttribute("x"),i=e.getAttribute("y");r!=null&&(this._textX=parseFloat(r)),i!=null&&(this._textY=parseFloat(i));var n=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new U;return ne(t,s),ae(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(n),this._textY+=parseFloat(o),s},path:function(e,t){var r=e.getAttribute("d")||"",i=fm(r);return ne(t,i),ae(e,i,this._defsUsePending,!1,!1),i.silent=!0,i}}}(),a}(),_v={lineargradient:function(a){var e=parseInt(a.getAttribute("x1")||"0",10),t=parseInt(a.getAttribute("y1")||"0",10),r=parseInt(a.getAttribute("x2")||"10",10),i=parseInt(a.getAttribute("y2")||"0",10),n=new mn(e,t,r,i);return wv(a,n),Av(a,n),n},radialgradient:function(a){var e=parseInt(a.getAttribute("cx")||"0",10),t=parseInt(a.getAttribute("cy")||"0",10),r=parseInt(a.getAttribute("r")||"0",10),i=new pm(e,t,r);return wv(a,i),Av(a,i),i}};function wv(a,e){var t=a.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function Av(a,e){for(var t=a.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var r=t.getAttribute("offset"),i=void 0;r&&r.indexOf("%")>0?i=parseInt(r,10)/100:r?i=parseFloat(r):i=0;var n={};pd(t,n,n);var o=n.stopColor||t.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:i,color:o})}t=t.nextSibling}}function ne(a,e){a&&a.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),j(e.__inheritedStyle,a.__inheritedStyle))}function Tv(a){for(var e=Vn(a),t=[],r=0;r<e.length;r+=2){var i=parseFloat(e[r]),n=parseFloat(e[r+1]);t.push([i,n])}return t}function ae(a,e,t,r,i){var n=e,o=n.__inheritedStyle=n.__inheritedStyle||{},s={};a.nodeType===1&&(A1(a,e),pd(a,o,s),r||T1(a,o,s)),n.style=n.style||{},o.fill!=null&&(n.style.fill=Cv(n,"fill",o.fill,t)),o.stroke!=null&&(n.style.stroke=Cv(n,"stroke",o.stroke,t)),C(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(l){o[l]!=null&&(n.style[l]=parseFloat(o[l]))}),C(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(l){o[l]!=null&&(n.style[l]=o[l])}),i&&(n.__selfStyle=s),o.lineDash&&(n.style.lineDash=z(Vn(o.lineDash),function(l){return parseFloat(l)})),(o.visibility==="hidden"||o.visibility==="collapse")&&(n.invisible=!0),o.display==="none"&&(n.ignore=!0)}function x1(a,e){var t=e.__selfStyle;if(t){var r=t.textBaseline,i=r;!r||r==="auto"||r==="baseline"?i="alphabetic":r==="before-edge"||r==="text-before-edge"?i="top":r==="after-edge"||r==="text-after-edge"?i="bottom":(r==="central"||r==="mathematical")&&(i="middle"),a.style.textBaseline=i}var n=e.__inheritedStyle;if(n){var o=n.textAlign,s=o;o&&(o==="middle"&&(s="center"),a.style.textAlign=s)}}var S1=/^url\(\s*#(.*?)\)/;function Cv(a,e,t,r){var i=t&&t.match(S1);if(i){var n=op(i[1]);r.push([a,e,n]);return}return t==="none"&&(t=null),t}function b1(a,e){for(var t=0;t<e.length;t++){var r=e[t];r[0].style[r[1]]=a[r[2]]}}var _1=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Vn(a){return a.match(_1)||[]}var w1=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,lo=Math.PI/180;function A1(a,e){var t=a.getAttribute("transform");if(t){t=t.replace(/,/g," ");var r=[],i=null;t.replace(w1,function(c,h,f){return r.push(h,f),""});for(var n=r.length-1;n>0;n-=2){var o=r[n],s=r[n-1],l=Vn(o);switch(i=i||Tr(),s){case"translate":Je(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":sp(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":oa(i,i,-parseFloat(l[0])*lo);break;case"skewX":var u=Math.tan(parseFloat(l[0])*lo);Gi(i,[1,0,u,1,0,0],i);break;case"skewY":var v=Math.tan(parseFloat(l[0])*lo);Gi(i,[1,v,0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5]);break}}e.setLocalTransform(i)}}var Dv=/([^\s:;]+)\s*:\s*([^:;]+)/g;function pd(a,e,t){var r=a.getAttribute("style");if(!!r){Dv.lastIndex=0;for(var i;(i=Dv.exec(r))!=null;){var n=i[1],o=F(Ki,n)?Ki[n]:null;o&&(e[o]=i[2]);var s=F(qi,n)?qi[n]:null;s&&(t[s]=i[2])}}}function T1(a,e,t){for(var r=0;r<Sv.length;r++){var i=Sv[r],n=a.getAttribute(i);n!=null&&(e[Ki[i]]=n)}for(var r=0;r<bv.length;r++){var i=bv[r],n=a.getAttribute(i);n!=null&&(t[qi[i]]=n)}}function dd(a,e){var t=e.width/a.width,r=e.height/a.height,i=Math.min(t,r);return{scale:i,x:-(a.x+a.width/2)*i+(e.x+e.width/2),y:-(a.y+a.height/2)*i+(e.y+e.height/2)}}function C1(a,e){var t=new m1;return t.parse(a,e)}var D1=it(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),I1=function(){function a(e,t){this.type="geoSVG",this._usedGraphicMap=it(),this._freedGraphics=[],this._mapName=e,this._parsedXML=fd(t)}return a.prototype.load=function(){var e=this._firstGraphic;if(!e){e=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(e),this._boundingRect=this._firstGraphic.boundingRect.clone();var t=M1(e.named),r=t.regions,i=t.regionsMap;this._regions=r,this._regionsMap=i}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},a.prototype._buildGraphic=function(e){var t,r;try{t=e&&C1(e,{ignoreViewBox:!0,ignoreRootClip:!0})||{},r=t.root,dt(r!=null)}catch(g){throw new Error(`Invalid svg format
`+g.message)}var i=new U;i.add(r),i.isGeoSVGGraphicRoot=!0;var n=t.width,o=t.height,s=t.viewBoxRect,l=this._boundingRect;if(!l){var u=void 0,v=void 0,c=void 0,h=void 0;if(n!=null?(u=0,c=n):s&&(u=s.x,c=s.width),o!=null?(v=0,h=o):s&&(v=s.y,h=s.height),u==null||v==null){var f=r.getBoundingRect();u==null&&(u=f.x,c=f.width),v==null&&(v=f.y,h=f.height)}l=this._boundingRect=new zt(u,v,c,h)}if(s){var p=dd(s,l);r.scaleX=r.scaleY=p.scale,r.x=p.x,r.y=p.y}i.setClipPath(new ct({shape:l.plain()}));var d=[];return C(t.named,function(g){D1.get(g.svgNodeTagLower)!=null&&(d.push(g),L1(g.el))}),{root:i,boundingRect:l,named:d}},a.prototype.useGraphic=function(e){var t=this._usedGraphicMap,r=t.get(e);return r||(r=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),t.set(e,r),r)},a.prototype.freeGraphic=function(e){var t=this._usedGraphicMap,r=t.get(e);r&&(t.removeKey(e),this._freedGraphics.push(r))},a}();function L1(a){a.silent=!1,a.isGroup&&a.traverse(function(e){e.silent=!1})}function M1(a){var e=[],t=it();return C(a,function(r){if(r.namedFrom==null){var i=new dm(r.name,r.el);e.push(i),t.set(r.name,i)}}),{regions:e,regionsMap:t}}var ws=[126,25],Iv="\u5357\u6D77\u8BF8\u5C9B",sr=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]];for(var nr=0;nr<sr.length;nr++)for(var Ir=0;Ir<sr[nr].length;Ir++)sr[nr][Ir][0]/=10.5,sr[nr][Ir][1]/=-10.5/.75,sr[nr][Ir][0]+=ws[0],sr[nr][Ir][1]+=ws[1];function P1(a,e){if(a==="china"){for(var t=0;t<e.length;t++)if(e[t].name===Iv)return;e.push(new gm(Iv,z(sr,function(r){return{type:"polygon",exterior:r}}),ws))}}var R1=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function k1(a,e){a==="china"&&e.name==="\u53F0\u6E7E"&&e.geometries.push({type:"polygon",exterior:R1[0]})}var E1="name",V1=function(){function a(e,t,r){this.type="geoJSON",this._parsedMap=it(),this._mapName=e,this._specialAreas=r,this._geoJSON=O1(t)}return a.prototype.load=function(e,t){t=t||E1;var r=this._parsedMap.get(t);if(!r){var i=this._parseToRegions(t);r=this._parsedMap.set(t,{regions:i,boundingRect:N1(i)})}var n=it(),o=[];return C(r.regions,function(s){var l=s.name;e&&F(e,l)&&(s=s.cloneShallow(l=e[l])),o.push(s),n.set(l,s)}),{regions:o,boundingRect:r.boundingRect||new zt(0,0,0,0),regionsMap:n}},a.prototype._parseToRegions=function(e){var t=this._mapName,r=this._geoJSON,i;try{i=r?ym(r,e):[]}catch(n){throw new Error(`Invalid geoJson format
`+n.message)}return P1(t,i),C(i,function(n){var o=n.name;mm(t,n),k1(t,n);var s=this._specialAreas&&this._specialAreas[o];s&&n.transformTo(s.left,s.top,s.width,s.height)},this),i},a.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},a}();function N1(a){for(var e,t=0;t<a.length;t++){var r=a[t].getBoundingRect();e=e||r.clone(),e.union(r)}return e}function O1(a){return K(a)?typeof JSON<"u"&&JSON.parse?JSON.parse(a):new Function("return ("+a+");")():a}var ca=it();const Oe={registerMap:function(a,e,t){if(e.svg){var r=new I1(a,e.svg);ca.set(a,r)}else{var i=e.geoJson||e.geoJSON;i&&!e.features?t=e.specialAreas:i=e;var r=new V1(a,i,t);ca.set(a,r)}},getGeoResource:function(a){return ca.get(a)},getMapForUser:function(a){var e=ca.get(a);return e&&e.type==="geoJSON"&&e.getMapForUser()},load:function(a,e,t){var r=ca.get(a);if(!r){console.error("Map "+a+" not exists. The GeoJSON of the map must be provided.");return}return r.load(e,t)}};var yl=["rect","circle","line","ellipse","polygon","polyline","path"],z1=it(yl),B1=it(yl.concat(["g"])),G1=it(yl.concat(["g"])),gd=Lt();function pi(a){var e=a.getItemStyle(),t=a.get("areaColor");return t!=null&&(e.fill=t),e}function Lv(a){var e=a.style;e&&(e.stroke=e.stroke||e.fill,e.fill=null)}var F1=function(){function a(e){var t=new U;this.uid=lp("ec_map_draw"),this._controller=new ii(e.getZr()),this._controllerHost={target:t},this.group=t,t.add(this._regionsGroup=new U),t.add(this._svgGroup=new U)}return a.prototype.draw=function(e,t,r,i,n){var o=e.mainType==="geo",s=e.getData&&e.getData();o&&t.eachComponent({mainType:"series",subType:"map"},function(y){!s&&y.getHostGeoModel()===e&&(s=y.getData())});var l=e.coordinateSystem,u=this._regionsGroup,v=this.group,c=l.getTransformInfo(),h=c.raw,f=c.roam,p=!u.childAt(0)||n;p?(v.x=f.x,v.y=f.y,v.scaleX=f.scaleX,v.scaleY=f.scaleY,v.dirty()):ot(v,f,e);var d=s&&s.getVisual("visualMeta")&&s.getVisual("visualMeta").length>0,g={api:r,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:d,isGeo:o,transformInfoRaw:h};l.resourceType==="geoJSON"?this._buildGeoJSON(g):l.resourceType==="geoSVG"&&this._buildSVG(g),this._updateController(e,t,r),this._updateMapSelectHandler(e,u,r,i)},a.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=it(),r=it(),i=this._regionsGroup,n=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function v(f,p){return p&&(f=p(f)),f&&[f[0]*n.scaleX+n.x,f[1]*n.scaleY+n.y]}function c(f){for(var p=[],d=!u&&l&&l.project,g=0;g<f.length;++g){var y=v(f[g],d);y&&p.push(y)}return p}function h(f){return{shape:{points:c(f)}}}i.removeAll(),C(e.geo.regions,function(f){var p=f.name,d=t.get(p),g=r.get(p)||{},y=g.dataIdx,m=g.regionModel;d||(d=t.set(p,new U),i.add(d),y=s?s.indexOfName(p):null,m=e.isGeo?o.getRegionModel(p):s?s.getItemModel(y):null,r.set(p,{dataIdx:y,regionModel:m}));var x=[],S=[];C(f.geometries,function(w){if(w.type==="polygon"){var A=[w.exterior].concat(w.interiors||[]);u&&(A=Vv(A,u)),C(A,function(D){x.push(new ce(h(D)))})}else{var T=w.points;u&&(T=Vv(T,u,!0)),C(T,function(D){S.push(new me(h(D)))})}});var _=v(f.getCenter(),l&&l.project);function b(w,A){if(!!w.length){var T=new Zf({culling:!0,segmentIgnoreThreshold:1,shape:{paths:w}});d.add(T),Mv(e,T,y,m),Pv(e,T,p,m,o,y,_),A&&(Lv(T),C(T.states,Lv))}}b(x),b(S,!0)}),t.each(function(f,p){var d=r.get(p),g=d.dataIdx,y=d.regionModel;Rv(e,f,p,y,o,g),kv(e,f,p,y,o),Ev(e,f,p,y,o)},this)},a.prototype._buildSVG=function(e){var t=e.geo.map,r=e.transformInfoRaw;this._svgGroup.x=r.x,this._svgGroup.y=r.y,this._svgGroup.scaleX=r.scaleX,this._svgGroup.scaleY=r.scaleY,this._svgResourceChanged(t)&&(this._freeSVG(),this._useSVG(t));var i=this._svgDispatcherMap=it(),n=!1;C(this._svgGraphicRecord.named,function(o){var s=o.name,l=e.mapOrGeoModel,u=e.data,v=o.svgNodeTagLower,c=o.el,h=u?u.indexOfName(s):null,f=l.getRegionModel(s);if(z1.get(v)!=null&&c instanceof jr&&Mv(e,c,h,f),c instanceof jr&&(c.culling=!0),c.z2EmphasisLift=0,!o.namedFrom&&(G1.get(v)!=null&&Pv(e,c,s,f,l,h,null),Rv(e,c,s,f,l,h),kv(e,c,s,f,l),B1.get(v)!=null)){var p=Ev(e,c,s,f,l);p==="self"&&(n=!0);var d=i.get(s)||i.set(s,[]);d.push(c)}},this),this._enableBlurEntireSVG(n,e)},a.prototype._enableBlurEntireSVG=function(e,t){if(e&&t.isGeo){var r=t.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle(),i=r.opacity;this._svgGraphicRecord.root.traverse(function(n){if(!n.isGroup){Jr(n);var o=n.ensureState("blur").style||{};o.opacity==null&&i!=null&&(o.opacity=i),n.ensureState("emphasis")}})}},a.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},a.prototype.findHighDownDispatchers=function(e,t){if(e==null)return[];var r=t.coordinateSystem;if(r.resourceType==="geoJSON"){var i=this._regionsGroupByName;if(i){var n=i.get(e);return n?[n]:[]}}else if(r.resourceType==="geoSVG")return this._svgDispatcherMap&&this._svgDispatcherMap.get(e)||[]},a.prototype._svgResourceChanged=function(e){return this._svgMapName!==e},a.prototype._useSVG=function(e){var t=Oe.getGeoResource(e);if(t&&t.type==="geoSVG"){var r=t.useGraphic(this.uid);this._svgGroup.add(r.root),this._svgGraphicRecord=r,this._svgMapName=e}},a.prototype._freeSVG=function(){var e=this._svgMapName;if(e!=null){var t=Oe.getGeoResource(e);t&&t.type==="geoSVG"&&t.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},a.prototype._updateController=function(e,t,r){var i=e.coordinateSystem,n=this._controller,o=this._controllerHost;o.zoomLimit=e.get("scaleLimit"),o.zoom=i.getZoom(),n.enable(e.get("roam")||!1);var s=e.mainType;function l(){var u={type:"geoRoam",componentType:s};return u[s+"Id"]=e.id,u}n.off("pan").on("pan",function(u){this._mouseDownFlag=!1,dl(o,u.dx,u.dy),r.dispatchAction(H(l(),{dx:u.dx,dy:u.dy,animation:{duration:0}}))},this),n.off("zoom").on("zoom",function(u){this._mouseDownFlag=!1,gl(o,u.scale,u.originX,u.originY),r.dispatchAction(H(l(),{zoom:u.scale,originX:u.originX,originY:u.originY,animation:{duration:0}}))},this),n.setPointerChecker(function(u,v,c){return i.containPoint([v,c])&&!En(u,r,e)})},a.prototype.resetForLabelLayout=function(){this.group.traverse(function(e){var t=e.getTextContent();t&&(t.ignore=gd(t).ignore)})},a.prototype._updateMapSelectHandler=function(e,t,r,i){var n=this;t.off("mousedown"),t.off("click"),e.get("selectedMode")&&(t.on("mousedown",function(){n._mouseDownFlag=!0}),t.on("click",function(o){!n._mouseDownFlag||(n._mouseDownFlag=!1)}))},a}();function Mv(a,e,t,r){var i=r.getModel("itemStyle"),n=r.getModel(["emphasis","itemStyle"]),o=r.getModel(["blur","itemStyle"]),s=r.getModel(["select","itemStyle"]),l=pi(i),u=pi(n),v=pi(s),c=pi(o),h=a.data;if(h){var f=h.getItemVisual(t,"style"),p=h.getItemVisual(t,"decal");a.isVisualEncodedByVisualMap&&f.fill&&(l.fill=f.fill),p&&(l.decal=rl(p,a.api))}e.setStyle(l),e.style.strokeNoScale=!0,e.ensureState("emphasis").style=u,e.ensureState("select").style=v,e.ensureState("blur").style=c,Jr(e)}function Pv(a,e,t,r,i,n,o){var s=a.data,l=a.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),n)),v=s&&s.getItemLayout(n);if(l||u||v&&v.showLabel){var c=l?t:n,h=void 0;(!s||n>=0)&&(h=i);var f=o?{normal:{align:"center",verticalAlign:"middle"}}:null;Yt(e,Ht(r),{labelFetcher:h,labelDataIndex:c,defaultText:t},f);var p=e.getTextContent();if(p&&(gd(p).ignore=p.ignore,e.textConfig&&o)){var d=e.getBoundingRect().clone();e.textConfig.layoutRect=d,e.textConfig.position=[(o[0]-d.x)/d.width*100+"%",(o[1]-d.y)/d.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function Rv(a,e,t,r,i,n){a.data?a.data.setItemGraphicEl(n,e):tt(e).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:t,region:r&&r.option||{}}}function kv(a,e,t,r,i){a.data||Ka({el:e,componentModel:i,itemName:t,itemTooltipOption:r.get("tooltip")})}function Ev(a,e,t,r,i){e.highDownSilentOnTouch=!!i.get("selectedMode");var n=r.getModel("emphasis"),o=n.get("focus");return bt(e,o,n.get("blurScope"),n.get("disabled")),a.isGeo&&xm(e,i,t),o}function Vv(a,e,t){var r=[],i;function n(){i=[]}function o(){i.length&&(r.push(i),i=[])}var s=e({polygonStart:n,polygonEnd:o,lineStart:n,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&i.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),C(a,function(l){s.lineStart();for(var u=0;u<l.length;u++)s.point(l[u][0],l[u][1]);s.lineEnd()}),!t&&s.polygonEnd(),r}const yd=F1;var H1=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i,n){if(!(n&&n.type==="mapToggleSelect"&&n.from===this.uid)){var o=this.group;if(o.removeAll(),!t.getHostGeoModel()){if(this._mapDraw&&n&&n.type==="geoRoam"&&this._mapDraw.resetForLabelLayout(),n&&n.type==="geoRoam"&&n.componentType==="series"&&n.seriesId===t.id){var s=this._mapDraw;s&&o.add(s.group)}else if(t.needsDrawMap){var s=this._mapDraw||new yd(i);o.add(s.group),s.draw(t,r,i,this,n),this._mapDraw=s}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&r.getComponent("legend")&&this._renderSymbols(t,r,i)}}},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,r,i){var n=t.originalData,o=this.group;n.each(n.mapDimension("value"),function(s,l){if(!isNaN(s)){var u=n.getItemLayout(l);if(!(!u||!u.point)){var v=u.point,c=u.offset,h=new br({style:{fill:t.getData().getVisual("style").fill},shape:{cx:v[0]+c*9,cy:v[1],r:3},silent:!0,z2:8+(c?0:ja+1)});if(!c){var f=t.mainSeries.getData(),p=n.getName(l),d=f.indexOfName(p),g=n.getItemModel(l),y=g.getModel("label"),m=f.getItemGraphicEl(d);Yt(h,Ht(g),{labelFetcher:{getFormattedLabel:function(x,S){return t.getFormattedLabel(d,S)}},defaultText:p}),h.disableLabelAnimation=!0,y.get("position")||h.setTextConfig({position:"bottom"}),m.onHoverStateChange=function(x){Ni(h,x)}}o.add(h)}}})},e.type="map",e}(xt);const W1=H1;var $1=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.needsDrawMap=!1,t.seriesGroup=[],t.getTooltipPosition=function(r){if(r!=null){var i=this.getData().getName(r),n=this.coordinateSystem,o=n.getRegion(i);return o&&n.dataToPoint(o.getCenter())}},t}return e.prototype.getInitialData=function(t){for(var r=la(this,{coordDimensions:["value"],encodeDefaulter:q(el,this)}),i=it(),n=[],o=0,s=r.count();o<s;o++){var l=r.getName(o);i.set(l,!0)}var u=Oe.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return C(u.regions,function(v){var c=v.name;i.get(c)||n.push(c)}),r.appendValues([],n),r},e.prototype.getHostGeoModel=function(){var t=this.option.geoIndex;return t!=null?this.ecModel.getComponent("geo",t):null},e.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},e.prototype.getRawValue=function(t){var r=this.getData();return r.get(r.mapDimension("value"),t)},e.prototype.getRegionModel=function(t){var r=this.getData();return r.getItemModel(r.indexOfName(t))},e.prototype.formatTooltip=function(t,r,i){for(var n=this.getData(),o=this.getRawValue(t),s=n.getName(t),l=this.seriesGroup,u=[],v=0;v<l.length;v++){var c=l[v].originalData.indexOfName(s),h=n.mapDimension("value");isNaN(l[v].originalData.get(h,c))||u.push(l[v].name)}return Ut("section",{header:u.join(", "),noHeader:!u.length,blocks:[Ut("nameValue",{name:s,value:o})]})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.getLegendIcon=function(t){var r=t.icon||"roundRect",i=kt(r,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill);return i.setStyle(t.itemStyle),i.style.stroke="none",r.indexOf("empty")>-1&&(i.style.stroke=i.style.fill,i.style.fill="#fff",i.style.lineWidth=2),i},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},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}(At);const Z1=$1;function U1(a,e){var t={};return C(a,function(r){r.each(r.mapDimension("value"),function(i,n){var o="ec-"+r.getName(n);t[o]=t[o]||[],isNaN(i)||t[o].push(i)})}),a[0].map(a[0].mapDimension("value"),function(r,i){for(var n="ec-"+a[0].getName(i),o=0,s=1/0,l=-1/0,u=t[n].length,v=0;v<u;v++)s=Math.min(s,t[n][v]),l=Math.max(l,t[n][v]),o+=t[n][v];var c;return e==="min"?c=s:e==="max"?c=l:e==="average"?c=o/u:c=o,u===0?NaN:c})}function Y1(a){var e={};a.eachSeriesByType("map",function(t){var r=t.getHostGeoModel(),i=r?"o"+r.id:"i"+t.getMapType();(e[i]=e[i]||[]).push(t)}),C(e,function(t,r){for(var i=U1(z(t,function(o){return o.getData()}),t[0].get("mapValueCalculation")),n=0;n<t.length;n++)t[n].originalData=t[n].getData();for(var n=0;n<t.length;n++)t[n].seriesGroup=t,t[n].needsDrawMap=n===0&&!t[n].getHostGeoModel(),t[n].setData(i.cloneShallow()),t[n].mainSeries=t[0]})}function X1(a){var e={};a.eachSeriesByType("map",function(t){var r=t.getMapType();if(!(t.getHostGeoModel()||e[r])){var i={};C(t.seriesGroup,function(o){var s=o.coordinateSystem,l=o.originalData;o.get("showLegendSymbol")&&a.getComponent("legend")&&l.each(l.mapDimension("value"),function(u,v){var c=l.getName(v),h=s.getRegion(c);if(!(!h||isNaN(u))){var f=i[c]||0,p=s.dataToPoint(h.getCenter());i[c]=f+1,l.setItemLayout(v,{point:p,offset:f})}})});var n=t.getData();n.each(function(o){var s=n.getName(o),l=n.getItemLayout(o)||{};l.showLabel=!i[s],n.setItemLayout(o,l)}),e[r]=!0}})}var Nv=Ee,K1=function(a){k(e,a);function e(t){var r=a.call(this)||this;return r.type="view",r.dimensions=["x","y"],r._roamTransformable=new Sa,r._rawTransformable=new Sa,r.name=t,r}return e.prototype.setBoundingRect=function(t,r,i,n){return this._rect=new zt(t,r,i,n),this._rect},e.prototype.getBoundingRect=function(){return this._rect},e.prototype.setViewRect=function(t,r,i,n){this._transformTo(t,r,i,n),this._viewRect=new zt(t,r,i,n)},e.prototype._transformTo=function(t,r,i,n){var o=this.getBoundingRect(),s=this._rawTransformable;s.transform=o.calculateTransform(new zt(t,r,i,n));var l=s.parent;s.parent=null,s.decomposeTransform(),s.parent=l,this._updateTransform()},e.prototype.setCenter=function(t){!t||(this._center=t,this._updateCenterAndZoom())},e.prototype.setZoom=function(t){t=t||1;var r=this.zoomLimit;r&&(r.max!=null&&(t=Math.min(r.max,t)),r.min!=null&&(t=Math.max(r.min,t))),this._zoom=t,this._updateCenterAndZoom()},e.prototype.getDefaultCenter=function(){var t=this.getBoundingRect(),r=t.x+t.width/2,i=t.y+t.height/2;return[r,i]},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(),r=this._roamTransformable,i=this.getDefaultCenter(),n=this.getCenter(),o=this.getZoom();n=Ee([],n,t),i=Ee([],i,t),r.originX=n[0],r.originY=n[1],r.x=i[0]-n[0],r.y=i[1]-n[1],r.scaleX=r.scaleY=o,this._updateTransform()},e.prototype._updateTransform=function(){var t=this._roamTransformable,r=this._rawTransformable;r.parent=t,t.updateTransform(),r.updateTransform(),Sm(this.transform||(this.transform=[]),r.transform||Tr()),this._rawTransform=r.getLocalTransform(),this.invTransform=this.invTransform||[],rp(this.invTransform,this.transform),this.decomposeTransform()},e.prototype.getTransformInfo=function(){var t=this._rawTransformable,r=this._roamTransformable,i=new Sa;return i.transform=r.transform,i.decomposeTransform(),{roam:{x:i.x,y:i.y,scaleX:i.scaleX,scaleY:i.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,r,i){var n=r?this._rawTransform:this.transform;return i=i||[],n?Nv(i,t,n):Xt(i,t)},e.prototype.pointToData=function(t){var r=this.invTransform;return r?Nv([],t,r):[t[0],t[1]]},e.prototype.convertToPixel=function(t,r,i){var n=Ov(r);return n===this?n.dataToPoint(i):null},e.prototype.convertFromPixel=function(t,r,i){var n=Ov(r);return n===this?n.pointToData(i):null},e.prototype.containPoint=function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])},e.dimensions=["x","y"],e}(Sa);function Ov(a){var e=a.seriesModel;return e?e.coordinateSystem:null}const ni=K1;var q1={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},md=["lng","lat"],xd=function(a){k(e,a);function e(t,r,i){var n=a.call(this,t)||this;n.dimensions=md,n.type="geo",n._nameCoordMap=it(),n.map=r;var o=i.projection,s=Oe.load(r,i.nameMap,i.nameProperty),l=Oe.getGeoResource(r),u=n.resourceType=l?l.type:null,v=n.regions=s.regions,c=q1[l.type];n._regionsMap=s.regionsMap,n.regions=s.regions,o&&(u==="geoSVG"&&(de("Map "+r+" with SVG source can't use projection. Only GeoJSON source supports projection."),o=null),o.project&&o.unproject||(de("project and unproject must be both provided in the projeciton."),o=null)),n.projection=o;var h;if(o)for(var f=0;f<v.length;f++){var p=v[f].getBoundingRect(o);h=h||p.clone(),h.union(p)}else h=s.boundingRect;return n.setBoundingRect(h.x,h.y,h.width,h.height),n.aspectScale=o?1:Ft(i.aspectScale,c.aspectScale),n._invertLongitute=o?!1:c.invertLongitute,n}return e.prototype._transformTo=function(t,r,i,n){var o=this.getBoundingRect(),s=this._invertLongitute;o=o.clone(),s&&(o.y=-o.y-o.height);var l=this._rawTransformable;l.transform=o.calculateTransform(new zt(t,r,i,n));var u=l.parent;l.parent=null,l.decomposeTransform(),l.parent=u,s&&(l.scaleY=-l.scaleY),this._updateTransform()},e.prototype.getRegion=function(t){return this._regionsMap.get(t)},e.prototype.getRegionByCoord=function(t){for(var r=this.regions,i=0;i<r.length;i++){var n=r[i];if(n.type==="geoJSON"&&n.contain(t))return r[i]}},e.prototype.addGeoCoord=function(t,r){this._nameCoordMap.set(t,r)},e.prototype.getGeoCoord=function(t){var r=this._regionsMap.get(t);return this._nameCoordMap.get(t)||r&&r.getCenter()},e.prototype.dataToPoint=function(t,r,i){if(K(t)&&(t=this.getGeoCoord(t)),t){var n=this.projection;return n&&(t=n.project(t)),t&&this.projectedToPoint(t)}},e.prototype.pointToData=function(t){var r=this.projection;return r&&(t=r.unproject(t)),t&&this.pointToProjected(t)},e.prototype.pointToProjected=function(t){return a.prototype.pointToData.call(this,t)},e.prototype.projectedToPoint=function(t,r,i){return a.prototype.dataToPoint.call(this,t,r,i)},e.prototype.convertToPixel=function(t,r,i){var n=zv(r);return n===this?n.dataToPoint(i):null},e.prototype.convertFromPixel=function(t,r,i){var n=zv(r);return n===this?n.pointToData(i):null},e}(ni);Te(xd,ni);function zv(a){var e=a.geoModel,t=a.seriesModel;return e?e.coordinateSystem:t?t.coordinateSystem||(t.getReferringComponents("geo",ee).models[0]||{}).coordinateSystem:null}const Bv=xd;function Gv(a,e){var t=a.get("boundingCoords");if(t!=null){var r=t[0],i=t[1];if(!(isFinite(r[0])&&isFinite(r[1])&&isFinite(i[0])&&isFinite(i[1])))console.error("Invalid boundingCoords");else{var n=this.projection;if(n){var o=r[0],s=r[1],l=i[0],u=i[1];r=[1/0,1/0],i=[-1/0,-1/0];var v=function(b,w,A,T){for(var D=A-b,I=T-w,L=0;L<=100;L++){var M=L/100,P=n.project([b+D*M,w+I*M]);bm(r,r,P),_m(i,i,P)}};v(o,s,l,s),v(l,s,l,u),v(l,u,o,u),v(o,u,l,s)}this.setBoundingRect(r[0],r[1],i[0]-r[0],i[1]-r[1])}}var c=this.getBoundingRect(),h=a.get("layoutCenter"),f=a.get("layoutSize"),p=e.getWidth(),d=e.getHeight(),g=c.width/c.height*this.aspectScale,y=!1,m,x;h&&f&&(m=[G(h[0],p),G(h[1],d)],x=G(f,Math.min(p,d)),!isNaN(m[0])&&!isNaN(m[1])&&!isNaN(x)?y=!0:console.warn("Given layoutCenter or layoutSize data are invalid. Use left/top/width/height instead."));var S;if(y)S={},g>1?(S.width=x,S.height=x/g):(S.height=x,S.width=x*g),S.y=m[1]-S.height/2,S.x=m[0]-S.width/2;else{var _=a.getBoxLayoutParams();_.aspect=g,S=Bt(_,{width:p,height:d})}this.setViewRect(S.x,S.y,S.width,S.height),this.setCenter(a.get("center")),this.setZoom(a.get("zoom"))}function j1(a,e){C(e.get("geoCoord"),function(t,r){a.addGeoCoord(r,t)})}var J1=function(){function a(){this.dimensions=md}return a.prototype.create=function(e,t){var r=[];function i(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new Bv(l+s,l,H({nameMap:o.get("nameMap")},i(o)));u.zoomLimit=o.get("scaleLimit"),r.push(u),o.coordinateSystem=u,u.model=o,u.resize=Gv,u.resize(o,t)}),e.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=r[l]}});var n={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();n[s]=n[s]||[],n[s].push(o)}}),C(n,function(o,s){var l=z(o,function(v){return v.get("nameMap")}),u=new Bv(s,s,H({nameMap:al(l)},i(o[0])));u.zoomLimit=Ot.apply(null,z(o,function(v){return v.get("scaleLimit")})),r.push(u),u.resize=Gv,u.resize(o[0],t),C(o,function(v){v.coordinateSystem=u,j1(u,v)})}),r},a.prototype.getFilledRegions=function(e,t,r,i){for(var n=(e||[]).slice(),o=it(),s=0;s<n.length;s++)o.set(n[s].name,n[s]);var l=Oe.load(t,r,i);return C(l.regions,function(u){var v=u.name;!o.get(v)&&n.push({name:v})}),n},a}(),Q1=new J1;const Sd=Q1;var tb=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r,i){var n=Oe.getGeoResource(t.map);if(n&&n.type==="geoJSON"){var o=t.itemStyle=t.itemStyle||{};"color"in o||(o.color="#eee")}this.mergeDefaultAndTheme(t,i),Ya(t,"label",["show"])},e.prototype.optionUpdated=function(){var t=this,r=this.option;r.regions=Sd.getFilledRegions(r.regions,r.map,r.nameMap,r.nameProperty);var i={};this._optionModelMap=up(r.regions||[],function(n,o){var s=o.name;return s&&(n.set(s,new Pt(o,t,t.ecModel)),o.selected&&(i[s]=!0)),n},it()),r.selectedMap||(r.selectedMap=i)},e.prototype.getRegionModel=function(t){return this._optionModelMap.get(t)||new Pt(null,this,this.ecModel)},e.prototype.getFormattedLabel=function(t,r){var i=this.getRegionModel(t),n=r==="normal"?i.get(["label","formatter"]):i.get(["emphasis","label","formatter"]),o={name:t};if(rt(n))return o.status=r,n(o);if(K(n))return n.replace("{a}",t!=null?t:"")},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.select=function(t){var r=this.option,i=r.selectedMode;if(!!i){i!=="multiple"&&(r.selectedMap=null);var n=r.selectedMap||(r.selectedMap={});n[t]=!0}},e.prototype.unSelect=function(t){var r=this.option.selectedMap;r&&(r[t]=!1)},e.prototype.toggleSelected=function(t){this[this.isSelected(t)?"unSelect":"select"](t)},e.prototype.isSelected=function(t){var r=this.option.selectedMap;return!!(r&&r[t])},e.type="geo",e.layoutMode="box",e.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#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:[]},e}(It);const eb=tb;function Fv(a,e){return a.pointToProjected?a.pointToProjected(e):a.pointToData(e)}function ml(a,e,t){var r=a.getZoom(),i=a.getCenter(),n=e.zoom,o=a.projectedToPoint?a.projectedToPoint(i):a.dataToPoint(i);if(e.dx!=null&&e.dy!=null&&(o[0]-=e.dx,o[1]-=e.dy,a.setCenter(Fv(a,o))),n!=null){if(t){var s=t.min||0,l=t.max||1/0;n=Math.max(Math.min(r*n,l),s)/r}a.scaleX*=n,a.scaleY*=n;var u=(e.originX-a.x)*(n-1),v=(e.originY-a.y)*(n-1);a.x-=u,a.y-=v,a.updateTransform(),a.setCenter(Fv(a,o)),a.setZoom(n*r)}return{center:a.getCenter(),zoom:a.getZoom()}}var rb=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.focusBlurEnabled=!0,t}return e.prototype.init=function(t,r){this._api=r},e.prototype.render=function(t,r,i,n){if(this._model=t,!t.get("show")){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||(this._mapDraw=new yd(i));var o=this._mapDraw;o.draw(t,r,i,this,n),o.group.on("click",this._handleRegionClick,this),o.group.silent=t.get("silent"),this.group.add(o.group),this.updateSelectStatus(t,r,i)},e.prototype._handleRegionClick=function(t){var r;vp(t.target,function(i){return(r=tt(i).eventData)!=null},!0),r&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:r.name})},e.prototype.updateSelectStatus=function(t,r,i){var n=this;this._mapDraw.group.traverse(function(o){var s=tt(o).eventData;if(s)return n._model.isSelected(s.name)?i.enterSelect(o):i.leaveSelect(o),!0})},e.prototype.findHighDownDispatchers=function(t){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(t,this._model)},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},e.type="geo",e}(Et);const ab=rb;function ib(a,e,t){Oe.registerMap(a,e,t)}function bd(a){a.registerCoordinateSystem("geo",Sd),a.registerComponentModel(eb),a.registerComponentView(ab),a.registerImpl("registerMap",ib),a.registerImpl("getMap",function(t){return Oe.getMapForUser(t)});function e(t,r){r.update="geo:updateSelectStatus",a.registerAction(r,function(i,n){var o={},s=[];return n.eachComponent({mainType:"geo",query:i},function(l){l[t](i.name);var u=l.coordinateSystem;C(u.regions,function(c){o[c.name]=l.isSelected(c.name)||!1});var v=[];C(o,function(c,h){o[h]&&v.push(h)}),s.push({geoIndex:l.componentIndex,name:v})}),{selected:o,allSelected:s,name:i.name}})}e("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),e("select",{type:"geoSelect",event:"geoselected"}),e("unSelect",{type:"geoUnSelect",event:"geounselected"}),a.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,r){var i=t.componentType||"series";r.eachComponent({mainType:i,query:t},function(n){var o=n.coordinateSystem;if(o.type==="geo"){var s=ml(o,t,n.get("scaleLimit"));n.setCenter&&n.setCenter(s.center),n.setZoom&&n.setZoom(s.zoom),i==="series"&&C(n.seriesGroup,function(l){l.setCenter(s.center),l.setZoom(s.zoom)})}})})}function nb(a){J(bd),a.registerChartView(W1),a.registerSeriesModel(Z1),a.registerLayout(X1),a.registerProcessor(a.PRIORITY.PROCESSOR.STATISTIC,Y1),ep("map",a.registerAction)}function ob(a){var e=a;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var t=[e],r,i;r=t.pop();)if(i=r.children,r.isExpand&&i.length)for(var n=i.length,o=n-1;o>=0;o--){var s=i[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function sb(a,e){var t=a.isExpand?a.children:[],r=a.parentNode.children,i=a.hierNode.i?r[a.hierNode.i-1]:null;if(t.length){vb(a);var n=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;i?(a.hierNode.prelim=i.hierNode.prelim+e(a,i),a.hierNode.modifier=a.hierNode.prelim-n):a.hierNode.prelim=n}else i&&(a.hierNode.prelim=i.hierNode.prelim+e(a,i));a.parentNode.hierNode.defaultAncestor=cb(a,i,a.parentNode.hierNode.defaultAncestor||r[0],e)}function lb(a){var e=a.hierNode.prelim+a.parentNode.hierNode.modifier;a.setLayout({x:e},!0),a.hierNode.modifier+=a.parentNode.hierNode.modifier}function Hv(a){return arguments.length?a:pb}function Aa(a,e){return a-=Math.PI/2,{x:e*Math.cos(a),y:e*Math.sin(a)}}function ub(a,e){return Bt(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function vb(a){for(var e=a.children,t=e.length,r=0,i=0;--t>=0;){var n=e[t];n.hierNode.prelim+=r,n.hierNode.modifier+=r,i+=n.hierNode.change,r+=n.hierNode.shift+i}}function cb(a,e,t,r){if(e){for(var i=a,n=a,o=n.parentNode.children[0],s=e,l=i.hierNode.modifier,u=n.hierNode.modifier,v=o.hierNode.modifier,c=s.hierNode.modifier;s=uo(s),n=vo(n),s&&n;){i=uo(i),o=vo(o),i.hierNode.ancestor=a;var h=s.hierNode.prelim+c-n.hierNode.prelim-u+r(s,n);h>0&&(fb(hb(s,a,t),a,h),u+=h,l+=h),c+=s.hierNode.modifier,u+=n.hierNode.modifier,l+=i.hierNode.modifier,v+=o.hierNode.modifier}s&&!uo(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=c-l),n&&!vo(o)&&(o.hierNode.thread=n,o.hierNode.modifier+=u-v,t=a)}return t}function uo(a){var e=a.children;return e.length&&a.isExpand?e[e.length-1]:a.hierNode.thread}function vo(a){var e=a.children;return e.length&&a.isExpand?e[0]:a.hierNode.thread}function hb(a,e,t){return a.hierNode.ancestor.parentNode===e.parentNode?a.hierNode.ancestor:t}function fb(a,e,t){var r=t/(e.hierNode.i-a.hierNode.i);e.hierNode.change-=r,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,a.hierNode.change+=r}function pb(a,e){return a.parentNode===e.parentNode?1:2}var db=function(){function a(){this.parentPoint=[],this.childPoints=[]}return a}(),gb=function(a){k(e,a);function e(t){return a.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new db},e.prototype.buildPath=function(t,r){var i=r.childPoints,n=i.length,o=r.parentPoint,s=i[0],l=i[n-1];if(n===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=r.orient,v=u==="TB"||u==="BT"?0:1,c=1-v,h=G(r.forkPosition,1),f=[];f[v]=o[v],f[c]=o[c]+(l[c]-o[c])*h,t.moveTo(o[0],o[1]),t.lineTo(f[0],f[1]),t.moveTo(s[0],s[1]),f[v]=s[v],t.lineTo(f[0],f[1]),f[v]=l[v],t.lineTo(f[0],f[1]),t.lineTo(l[0],l[1]);for(var p=1;p<n-1;p++){var d=i[p];t.moveTo(d[0],d[1]),f[v]=d[v],t.lineTo(f[0],f[1])}},e}(Dt),yb=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._mainGroup=new U,t}return e.prototype.init=function(t,r){this._controller=new ii(r.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,r,i){var n=t.getData(),o=t.layoutInfo,s=this._mainGroup,l=t.get("layout");l==="radial"?(s.x=o.x+o.width/2,s.y=o.y+o.height/2):(s.x=o.x,s.y=o.y),this._updateViewCoordSys(t),this._updateController(t,r,i);var u=this._data;n.diff(u).add(function(v){Wv(n,v)&&$v(n,v,null,s,t)}).update(function(v,c){var h=u.getItemGraphicEl(c);if(!Wv(n,v)){h&&Uv(u,c,h,s,t);return}$v(n,v,h,s,t)}).remove(function(v){var c=u.getItemGraphicEl(v);c&&Uv(u,v,c,s,t)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),t.get("expandAndCollapse")===!0&&n.eachItemGraphicEl(function(v,c){v.off("click").on("click",function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:c})})}),this._data=n},e.prototype._updateViewCoordSys=function(t){var r=t.getData(),i=[];r.each(function(v){var c=r.getItemLayout(v);c&&!isNaN(c.x)&&!isNaN(c.y)&&i.push([+c.x,+c.y])});var n=[],o=[];Cn(i,n,o);var s=this._min,l=this._max;o[0]-n[0]===0&&(n[0]=s?s[0]:n[0]-1,o[0]=l?l[0]:o[0]+1),o[1]-n[1]===0&&(n[1]=s?s[1]:n[1]-1,o[1]=l?l[1]:o[1]+1);var u=t.coordinateSystem=new ni;u.zoomLimit=t.get("scaleLimit"),u.setBoundingRect(n[0],n[1],o[0]-n[0],o[1]-n[1]),u.setCenter(t.get("center")),u.setZoom(t.get("zoom")),this.group.attr({x:u.x,y:u.y,scaleX:u.scaleX,scaleY:u.scaleY}),this._min=n,this._max=o},e.prototype._updateController=function(t,r,i){var n=this,o=this._controller,s=this._controllerHost,l=this.group;o.setPointerChecker(function(u,v,c){var h=l.getBoundingRect();return h.applyTransform(l.transform),h.contain(v,c)&&!En(u,i,t)}),o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){dl(s,u.dx,u.dy),i.dispatchAction({seriesId:t.id,type:"treeRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){gl(s,u.scale,u.originX,u.originY),i.dispatchAction({seriesId:t.id,type:"treeRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),n._updateNodeAndLinkScale(t),i.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(t){var r=t.getData(),i=this._getNodeGlobalScale(t);r.eachItemGraphicEl(function(n,o){n.setSymbolScale(i)})},e.prototype._getNodeGlobalScale=function(t){var r=t.coordinateSystem;if(r.type!=="view")return 1;var i=this._nodeScaleRatio,n=r.scaleX||1,o=r.getZoom(),s=(o-1)*i+1;return s/n},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}(xt);function Wv(a,e){var t=a.getItemLayout(e);return t&&!isNaN(t.x)&&!isNaN(t.y)}function $v(a,e,t,r,i){var n=!t,o=a.tree.getNodeByDataIndex(e),s=o.getModel(),l=o.getVisual("style").fill,u=o.isExpand===!1&&o.children.length!==0?l:"#fff",v=a.tree.root,c=o.parentNode===v?o:o.parentNode||o,h=a.getItemGraphicEl(c.dataIndex),f=c.getLayout(),p=h?{x:h.__oldX,y:h.__oldY,rawX:h.__radialOldRawX,rawY:h.__radialOldRawY}:f,d=o.getLayout();n?(t=new Qa(a,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.x=p.x,t.y=p.y):t.updateData(a,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.__radialOldRawX=t.__radialRawX,t.__radialOldRawY=t.__radialRawY,t.__radialRawX=d.rawX,t.__radialRawY=d.rawY,r.add(t),a.setItemGraphicEl(e,t),t.__oldX=t.x,t.__oldY=t.y,ot(t,{x:d.x,y:d.y},i);var g=t.getSymbolPath();if(i.get("layout")==="radial"){var y=v.children[0],m=y.getLayout(),x=y.children.length,S=void 0,_=void 0;if(d.x===m.x&&o.isExpand===!0){var b={x:(y.children[0].getLayout().x+y.children[x-1].getLayout().x)/2,y:(y.children[0].getLayout().y+y.children[x-1].getLayout().y)/2};S=Math.atan2(b.y-m.y,b.x-m.x),S<0&&(S=Math.PI*2+S),_=b.x<m.x,_&&(S=S-Math.PI)}else S=Math.atan2(d.y-m.y,d.x-m.x),S<0&&(S=Math.PI*2+S),o.children.length===0||o.children.length!==0&&o.isExpand===!1?(_=d.x<m.x,_&&(S=S-Math.PI)):(_=d.x>m.x,_||(S=S-Math.PI));var w=_?"left":"right",A=s.getModel("label"),T=A.get("rotate"),D=T*(Math.PI/180),I=g.getTextContent();I&&(g.setTextConfig({position:A.get("position")||w,rotation:T==null?-S:D,origin:"center"}),I.setStyle("verticalAlign","middle"))}var L=s.get(["emphasis","focus"]),M=L==="ancestor"?o.getAncestorsIndices():L==="descendant"?o.getDescendantIndices():null;M&&(tt(t).focus=M),mb(i,o,v,t,p,f,d,r),t.__edge&&(t.onHoverStateChange=function(P){if(P!=="blur"){var R=o.parentNode&&a.getItemGraphicEl(o.parentNode.dataIndex);R&&R.hoverState===wm||Ni(t.__edge,P)}})}function mb(a,e,t,r,i,n,o,s){var l=e.getModel(),u=a.get("edgeShape"),v=a.get("layout"),c=a.getOrient(),h=a.get(["lineStyle","curveness"]),f=a.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),d=r.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(d||(d=r.__edge=new cp({shape:As(v,c,h,i,i)})),ot(d,{shape:As(v,c,h,n,o)},a));else if(u==="polyline")if(v==="orthogonal"){if(e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var g=e.children,y=[],m=0;m<g.length;m++){var x=g[m].getLayout();y.push([x.x,x.y])}d||(d=r.__edge=new gb({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:c,forkPosition:f}})),ot(d,{shape:{parentPoint:[o.x,o.y],childPoints:y}},a)}}else throw new Error("The polyline edgeShape can only be used in orthogonal layout");d&&(d.useStyle(j({strokeNoScale:!0,fill:null},p)),$t(d,l,"lineStyle"),Jr(d),s.add(d))}function Zv(a,e,t,r,i){var n=e.tree.root,o=_d(n,a),s=o.source,l=o.sourceLayout,u=e.getItemGraphicEl(a.dataIndex);if(!!u){var v=e.getItemGraphicEl(s.dataIndex),c=v.__edge,h=u.__edge||(s.isExpand===!1||s.children.length===1?c:void 0),f=r.get("edgeShape"),p=r.get("layout"),d=r.get("orient"),g=r.get(["lineStyle","curveness"]);h&&(f==="curve"?Yr(h,{shape:As(p,d,g,l,l),style:{opacity:0}},r,{cb:function(){t.remove(h)},removeOpt:i}):f==="polyline"&&r.get("layout")==="orthogonal"&&Yr(h,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},r,{cb:function(){t.remove(h)},removeOpt:i}))}}function _d(a,e){for(var t=e.parentNode===a?e:e.parentNode||e,r;r=t.getLayout(),r==null;)t=t.parentNode===a?t:t.parentNode||t;return{source:t,sourceLayout:r}}function Uv(a,e,t,r,i){var n=a.tree.getNodeByDataIndex(e),o=a.tree.root,s=_d(o,n).sourceLayout,l={duration:i.get("animationDurationUpdate"),easing:i.get("animationEasingUpdate")};Yr(t,{x:s.x+1,y:s.y+1},i,{cb:function(){r.remove(t),a.setItemGraphicEl(e,null)},removeOpt:l}),t.fadeOut(null,{fadeLabel:!0,animation:l}),n.children.forEach(function(u){Zv(u,a,r,i,l)}),Zv(n,a,r,i,l)}function As(a,e,t,r,i){var n,o,s,l,u,v,c,h;if(a==="radial"){u=r.rawX,c=r.rawY,v=i.rawX,h=i.rawY;var f=Aa(u,c),p=Aa(u,c+(h-c)*t),d=Aa(v,h+(c-h)*t),g=Aa(v,h);return{x1:f.x||0,y1:f.y||0,x2:g.x||0,y2:g.y||0,cpx1:p.x||0,cpy1:p.y||0,cpx2:d.x||0,cpy2:d.y||0}}else u=r.x,c=r.y,v=i.x,h=i.y,(e==="LR"||e==="RL")&&(n=u+(v-u)*t,o=c,s=v+(u-v)*t,l=h),(e==="TB"||e==="BT")&&(n=u,o=c+(h-c)*t,s=v,l=h+(c-h)*t);return{x1:u,y1:c,x2:v,y2:h,cpx1:n,cpy1:o,cpx2:s,cpy2:l}}const xb=yb;var Sb=function(){function a(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||"",this.hostTree=t}return a.prototype.isRemoved=function(){return this.dataIndex<0},a.prototype.eachNode=function(e,t,r){rt(e)&&(r=t,t=e,e=null),e=e||{},K(e)&&(e={order:e});var i=e.order||"preorder",n=this[e.attr||"children"],o;i==="preorder"&&(o=t.call(r,this));for(var s=0;!o&&s<n.length;s++)n[s].eachNode(e,t,r);i==="postorder"&&t.call(r,this)},a.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var r=0;r<this.children.length;r++){var i=this.children[r];i.updateDepthAndHeight(e+1),i.height>t&&(t=i.height)}this.height=t+1},a.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,r=this.children,i=r.length;t<i;t++){var n=r[t].getNodeById(e);if(n)return n}},a.prototype.contains=function(e){if(e===this)return!0;for(var t=0,r=this.children,i=r.length;t<i;t++){var n=r[t].contains(e);if(n)return n}},a.prototype.getAncestors=function(e){for(var t=[],r=e?this:this.parentNode;r;)t.push(r),r=r.parentNode;return t.reverse(),t},a.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},a.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},a.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||"value"),this.dataIndex)},a.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},a.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},a.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,r=t.data.getItemModel(this.dataIndex);return r.getModel(e)}},a.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},a.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},a.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},a.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},a.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},a.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t<e.length;++t)if(e[t]===this)return t;return-1}return-1},a.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},a.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},a}(),bb=function(){function a(e){this.type="tree",this._nodes=[],this.hostModel=e}return a.prototype.eachNode=function(e,t,r){this.root.eachNode(e,t,r)},a.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},a.prototype.getNodeById=function(e){return this.root.getNodeById(e)},a.prototype.update=function(){for(var e=this.data,t=this._nodes,r=0,i=t.length;r<i;r++)t[r].dataIndex=-1;for(var r=0,i=e.count();r<i;r++)t[e.getRawIndex(r)].dataIndex=r},a.prototype.clearLayouts=function(){this.data.clearItemLayouts()},a.createTree=function(e,t,r){var i=new a(t),n=[],o=1;s(e);function s(v,c){var h=v.value;o=Math.max(o,B(h)?h.length:1),n.push(v);var f=new Sb(Ie(v.name,""),i);c?_b(f,c):i.root=f,i._nodes.push(f);var p=v.children;if(p)for(var d=0;d<p.length;d++)s(p[d],f)}i.root.updateDepthAndHeight(0);var l=Sn(n,{coordDimensions:["value"],dimensionsCount:o}).dimensions,u=new Qt(l,t);return u.initData(n),r&&r(u),hp({mainData:u,struct:i,structAttr:"tree"}),i.update(),i},a}();function _b(a,e){var t=e.children;a.parentNode!==e&&(t.push(a),a.parentNode=e)}const xl=bb;function za(a,e,t){if(a&&yt(e,a.type)>=0){var r=t.getData().tree.root,i=a.targetNode;if(K(i)&&(i=r.getNodeById(i)),i&&r.contains(i))return{node:i};var n=a.targetNodeId;if(n!=null&&(i=r.getNodeById(n)))return{node:i}}}function wd(a){for(var e=[];a;)a=a.parentNode,a&&e.push(a);return e.reverse()}function Sl(a,e){var t=wd(a);return yt(t,e)>=0}function Nn(a,e){for(var t=[];a;){var r=a.dataIndex;t.push({name:a.name,dataIndex:r,value:e.getRawValue(r)}),a=a.parentNode}return t.reverse(),t}var wb=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var r={name:t.name,children:t.data},i=t.leaves||{},n=new Pt(i,this,this.ecModel),o=xl.createTree(r,this,s);function s(c){c.wrapMethod("getItemModel",function(h,f){var p=o.getNodeByDataIndex(f);return p&&p.children.length&&p.isExpand||(h.parentModel=n),h})}var l=0;o.eachNode("preorder",function(c){c.depth>l&&(l=c.depth)});var u=t.expandAndCollapse,v=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(c){var h=c.hostTree.data.getRawDataItem(c.dataIndex);c.isExpand=h&&h.collapsed!=null?!h.collapsed:c.depth<=v}),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,r,i){for(var n=this.getData().tree,o=n.root.children[0],s=n.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return Ut("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var r=a.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return r.treeAncestors=Nn(i,this),r},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,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",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(At);const Ab=wb;function Tb(a,e,t){for(var r=[a],i=[],n;n=r.pop();)if(i.push(n),n.isExpand){var o=n.children;if(o.length)for(var s=0;s<o.length;s++)r.push(o[s])}for(;n=i.pop();)e(n,t)}function ha(a,e){for(var t=[a],r;r=t.pop();)if(e(r),r.isExpand){var i=r.children;if(i.length)for(var n=i.length-1;n>=0;n--)t.push(i[n])}}function Cb(a,e){a.eachSeriesByType("tree",function(t){Db(t,e)})}function Db(a,e){var t=ub(a,e);a.layoutInfo=t;var r=a.get("layout"),i=0,n=0,o=null;r==="radial"?(i=2*Math.PI,n=Math.min(t.height,t.width)/2,o=Hv(function(x,S){return(x.parentNode===S.parentNode?1:2)/x.depth})):(i=t.width,n=t.height,o=Hv());var s=a.getData().tree.root,l=s.children[0];if(l){ob(s),Tb(l,sb,o),s.hierNode.modifier=-l.hierNode.prelim,ha(l,lb);var u=l,v=l,c=l;ha(l,function(x){var S=x.getLayout().x;S<u.getLayout().x&&(u=x),S>v.getLayout().x&&(v=x),x.depth>c.depth&&(c=x)});var h=u===v?1:o(u,v)/2,f=h-u.getLayout().x,p=0,d=0,g=0,y=0;if(r==="radial")p=i/(v.getLayout().x+h+f),d=n/(c.depth-1||1),ha(l,function(x){g=(x.getLayout().x+f)*p,y=(x.depth-1)*d;var S=Aa(g,y);x.setLayout({x:S.x,y:S.y,rawX:g,rawY:y},!0)});else{var m=a.getOrient();m==="RL"||m==="LR"?(d=n/(v.getLayout().x+h+f),p=i/(c.depth-1||1),ha(l,function(x){y=(x.getLayout().x+f)*d,g=m==="LR"?(x.depth-1)*p:i-(x.depth-1)*p,x.setLayout({x:g,y},!0)})):(m==="TB"||m==="BT")&&(p=i/(v.getLayout().x+h+f),d=n/(c.depth-1||1),ha(l,function(x){g=(x.getLayout().x+f)*p,y=m==="TB"?(x.depth-1)*d:n-(x.depth-1)*d,x.setLayout({x:g,y},!0)}))}}}function Ib(a){a.eachSeriesByType("tree",function(e){var t=e.getData(),r=t.tree;r.eachNode(function(i){var n=i.getModel(),o=n.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(i.dataIndex,"style");H(s,o)})})}function Lb(a){a.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(r){var i=e.dataIndex,n=r.getData().tree,o=n.getNodeByDataIndex(i);o.isExpand=!o.isExpand})}),a.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(r){var i=r.coordinateSystem,n=ml(i,e);r.setCenter&&r.setCenter(n.center),r.setZoom&&r.setZoom(n.zoom)})})}function Mb(a){a.registerChartView(xb),a.registerSeriesModel(Ab),a.registerLayout(Cb),a.registerVisual(Ib),Lb(a)}var Yv=["treemapZoomToNode","treemapRender","treemapMove"];function Pb(a){for(var e=0;e<Yv.length;e++)a.registerAction({type:Yv[e],update:"updateView"},Ve);a.registerAction({type:"treemapRootToNode",update:"updateView"},function(t,r){r.eachComponent({mainType:"series",subType:"treemap",query:t},i);function i(n,o){var s=["treemapZoomToNode","treemapRootToNode"],l=za(t,s,n);if(l){var u=n.getViewRoot();u&&(t.direction=Sl(u,l.node)?"rollUp":"drillDown"),n.resetViewRoot(l.node)}}})}function Ad(a){var e=a.getData(),t=e.tree,r={};t.eachNode(function(i){for(var n=i;n&&n.depth>1;)n=n.parentNode;var o=vs(a.ecModel,n.name||n.dataIndex+"",r);i.setVisual("decal",o)})}var Rb=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,r){var i={name:t.name,children:t.data};Td(i);var n=t.levels||[],o=this.designatedVisualItemStyle={},s=new Pt({itemStyle:o},this,r);n=t.levels=kb(n,r);var l=z(n||[],function(c){return new Pt(c,s,r)},this),u=xl.createTree(i,this,v);function v(c){c.wrapMethod("getItemModel",function(h,f){var p=u.getNodeByDataIndex(f),d=p?l[p.depth]:null;return h.parentModel=d||s,h})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,r,i){var n=this.getData(),o=this.getRawValue(t),s=n.getName(t);return Ut("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var r=a.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return r.treeAncestors=Nn(i,this),r.treePathInfo=r.treeAncestors,r},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},H(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var r=this._idIndexMap;r||(r=this._idIndexMap=it(),this._idIndexMapCount=0);var i=r.get(t);return i==null&&r.set(t,i=this._idIndexMapCount++),i},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var r=this.getRawData().tree.root;(!t||t!==r&&!r.contains(t))&&(this._viewRoot=r)},e.prototype.enableAriaDecal=function(){Ad(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25B6",zoomToNodeRatio:.32*.32,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(At);function Td(a){var e=0;C(a.children,function(r){Td(r);var i=r.value;B(i)&&(i=i[0]),e+=i});var t=a.value;B(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),B(a.value)?a.value[0]=t:a.value=t}function kb(a,e){var t=jt(e.get("color")),r=jt(e.get(["aria","decal","decals"]));if(!!t){a=a||[];var i,n;C(a,function(s){var l=new Pt(s),u=l.get("color"),v=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||v&&v!=="none")&&(n=!0)});var o=a[0]||(a[0]={});return i||(o.color=t.slice()),!n&&r&&(o.decal=r.slice()),a}}const Eb=Rb;var Vb=8,Xv=8,co=5,Nb=function(){function a(e){this.group=new U,e.add(this.group)}return a.prototype.render=function(e,t,r,i){var n=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!n.get("show")||!r)){var s=n.getModel("itemStyle"),l=s.getModel("textStyle"),u={pos:{left:n.get("left"),right:n.get("right"),top:n.get("top"),bottom:n.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:n.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(r,u,l),this._renderContent(e,u,s,l,i),Dn(o,u.pos,u.box)}},a.prototype._prepare=function(e,t,r){for(var i=e;i;i=i.parentNode){var n=Ie(i.getModel().get("name"),""),o=r.getTextRect(n),s=Math.max(o.width+Vb*2,t.emptyItemWidth);t.totalWidth+=s+Xv,t.renderList.push({node:i,text:n,width:s})}},a.prototype._renderContent=function(e,t,r,i,n){for(var o=0,s=t.emptyItemWidth,l=e.get(["breadcrumb","height"]),u=Am(t.pos,t.box),v=t.totalWidth,c=t.renderList,h=c.length-1;h>=0;h--){var f=c[h],p=f.node,d=f.width,g=f.text;v>u.width&&(v-=d-s,d=s,g=null);var y=new ce({shape:{points:Ob(o,0,d,l,h===c.length-1,h===0)},style:j(r.getItemStyle(),{lineJoin:"bevel"}),textContent:new lt({style:{text:g,fill:i.getTextColor(),font:i.getFont()}}),textConfig:{position:"inside"},z2:ja*1e4,onclick:q(n,p)});y.disableLabelAnimation=!0,this.group.add(y),zb(y,e,p),o+=d+Xv}},a.prototype.remove=function(){this.group.removeAll()},a}();function Ob(a,e,t,r,i,n){var o=[[i?a:a-co,e],[a+t,e],[a+t,e+r],[i?a:a-co,e+r]];return!n&&o.splice(2,0,[a+t+co,e+r/2]),!i&&o.push([a,e+r/2]),o}function zb(a,e,t){tt(a).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&Nn(t,e)}}const Bb=Nb;var Gb=function(){function a(){this._storage=[],this._elExistsMap={}}return a.prototype.add=function(e,t,r,i,n){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:r,delay:i,easing:n}),!0)},a.prototype.finished=function(e){return this._finishedCallback=e,this},a.prototype.start=function(){for(var e=this,t=this._storage.length,r=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},i=0,n=this._storage.length;i<n;i++){var o=this._storage[i];o.el.animateTo(o.target,{duration:o.duration,delay:o.delay,easing:o.easing,setToFinal:!0,done:r,aborted:r})}return this},a}();function Fb(){return new Gb}var Ts=U,Kv=ct,qv=3,jv="label",Jv="upperLabel",Hb=ja*10,Wb=ja*2,$b=ja*3,lr=fp([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Qv=function(a){var e=lr(a);return e.stroke=e.fill=e.lineWidth=null,e},ji=Lt(),Zb=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._state="ready",t._storage=fa(),t}return e.prototype.render=function(t,r,i,n){var o=r.findComponents({mainType:"series",subType:"treemap",query:n});if(!(yt(o,t)<0)){this.seriesModel=t,this.api=i,this.ecModel=r;var s=["treemapZoomToNode","treemapRootToNode"],l=za(n,s,t),u=n&&n.type,v=t.layoutInfo,c=!this._oldTree,h=this._storage,f=u==="treemapRootToNode"&&l&&h?{rootNodeGroup:h.nodeGroup[l.node.getRawIndex()],direction:n.direction}:null,p=this._giveContainerGroup(v),d=t.get("animation"),g=this._doRender(p,t,f);d&&!c&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(p,g,t,f):g.renderFinally(),this._resetController(i),this._renderBreadcrumb(t,i,l)}},e.prototype._giveContainerGroup=function(t){var r=this._containerGroup;return r||(r=this._containerGroup=new Ts,this._initEvents(r),this.group.add(r)),r.x=t.x,r.y=t.y,r},e.prototype._doRender=function(t,r,i){var n=r.getData().tree,o=this._oldTree,s=fa(),l=fa(),u=this._storage,v=[];function c(g,y,m,x){return Ub(r,l,u,i,s,v,g,y,m,x)}f(n.root?[n.root]:[],o&&o.root?[o.root]:[],t,n===o||!o,0);var h=p(u);return this._oldTree=n,this._storage=l,{lastsForAnimation:s,willDeleteEls:h,renderFinally:d};function f(g,y,m,x,S){x?(y=g,C(g,function(w,A){!w.isRemoved()&&b(A,A)})):new Qe(y,g,_,_).add(b).update(b).remove(q(b,null)).execute();function _(w){return w.getId()}function b(w,A){var T=w!=null?g[w]:null,D=A!=null?y[A]:null,I=c(T,D,m,S);I&&f(T&&T.viewChildren||[],D&&D.viewChildren||[],I,x,S+1)}}function p(g){var y=fa();return g&&C(g,function(m,x){var S=y[x];C(m,function(_){_&&(S.push(_),ji(_).willDelete=!0)})}),y}function d(){C(h,function(g){C(g,function(y){y.parent&&y.parent.remove(y)})}),C(v,function(g){g.invisible=!0,g.dirty()})}},e.prototype._doAnimation=function(t,r,i,n){var o=i.get("animationDurationUpdate"),s=i.get("animationEasing"),l=(rt(o)?0:o)||0,u=(rt(s)?null:s)||"cubicOut",v=Fb();C(r.willDeleteEls,function(c,h){C(c,function(f,p){if(!f.invisible){var d=f.parent,g,y=ji(d);if(n&&n.direction==="drillDown")g=d===n.rootNodeGroup?{shape:{x:0,y:0,width:y.nodeWidth,height:y.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var m=0,x=0;y.willDelete||(m=y.nodeWidth/2,x=y.nodeHeight/2),g=h==="nodeGroup"?{x:m,y:x,style:{opacity:0}}:{shape:{x:m,y:x,width:0,height:0},style:{opacity:0}}}g&&v.add(f,g,l,0,u)}})}),C(this._storage,function(c,h){C(c,function(f,p){var d=r.lastsForAnimation[h][p],g={};!d||(f instanceof U?d.oldX!=null&&(g.x=f.x,g.y=f.y,f.x=d.oldX,f.y=d.oldY):(d.oldShape&&(g.shape=H({},f.shape),f.setShape(d.oldShape)),d.fadein?(f.setStyle("opacity",0),g.style={opacity:1}):f.style.opacity!==1&&(g.style={opacity:1})),v.add(f,g,l,0,u))})},this),this._state="animating",v.finished($(function(){this._state="ready",r.renderFinally()},this)).start()},e.prototype._resetController=function(t){var r=this._controller;r||(r=this._controller=new ii(t.getZr()),r.enable(this.seriesModel.get("roam")),r.on("pan",$(this._onPan,this)),r.on("zoom",$(this._onZoom,this)));var i=new zt(0,0,t.getWidth(),t.getHeight());r.setPointerChecker(function(n,o,s){return i.contain(o,s)})},e.prototype._clearController=function(){var t=this._controller;t&&(t.dispose(),t=null)},e.prototype._onPan=function(t){if(this._state!=="animating"&&(Math.abs(t.dx)>qv||Math.abs(t.dy)>qv)){var r=this.seriesModel.getData().tree.root;if(!r)return;var i=r.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t.dx,y:i.y+t.dy,width:i.width,height:i.height}})}},e.prototype._onZoom=function(t){var r=t.originX,i=t.originY;if(this._state!=="animating"){var n=this.seriesModel.getData().tree.root;if(!n)return;var o=n.getLayout();if(!o)return;var s=new zt(o.x,o.y,o.width,o.height),l=this.seriesModel.layoutInfo;r-=l.x,i-=l.y;var u=Tr();Je(u,u,[-r,-i]),sp(u,u,[t.scale,t.scale]),Je(u,u,[r,i]),s.applyTransform(u),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 r=this;t.on("click",function(i){if(r._state==="ready"){var n=r.seriesModel.get("nodeClick",!0);if(!!n){var o=r.findTarget(i.offsetX,i.offsetY);if(!!o){var s=o.node;if(s.getLayout().isLeafRoot)r._rootToNode(o);else if(n==="zoomToNode")r._zoomToNode(o);else if(n==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),v=l.get("target",!0)||"blank";u&&Hi(u,v)}}}}},this)},e.prototype._renderBreadcrumb=function(t,r,i){var n=this;i||(i=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(r.getWidth()/2,r.getHeight()/2),i||(i={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new Bb(this.group))).render(t,r,i.node,function(o){n._state!=="animating"&&(Sl(t.getViewRoot(),o)?n._rootToNode({node:o}):n._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=fa(),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,r){var i,n=this.seriesModel.getViewRoot();return n.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(t,r),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)i={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),i},e.type="treemap",e}(xt);function fa(){return{nodeGroup:[],background:[],content:[]}}function Ub(a,e,t,r,i,n,o,s,l,u){if(!o)return;var v=o.getLayout(),c=a.getData(),h=o.getModel();if(c.setItemGraphicEl(o.dataIndex,null),!v||!v.isInView)return;var f=v.width,p=v.height,d=v.borderWidth,g=v.invisible,y=o.getRawIndex(),m=s&&s.getRawIndex(),x=o.viewChildren,S=v.upperHeight,_=x&&x.length,b=h.getModel("itemStyle"),w=h.getModel(["emphasis","itemStyle"]),A=h.getModel(["blur","itemStyle"]),T=h.getModel(["select","itemStyle"]),D=b.get("borderRadius")||0,I=at("nodeGroup",Ts);if(!I)return;if(l.add(I),I.x=v.x||0,I.y=v.y||0,I.markRedraw(),ji(I).nodeWidth=f,ji(I).nodeHeight=p,v.isAboveViewRoot)return I;var L=at("background",Kv,u,Wb);L&&O(I,L,_&&v.upperLabelHeight);var M=h.getModel("emphasis"),P=M.get("focus"),R=M.get("blurScope"),E=M.get("disabled"),N=P==="ancestor"?o.getAncestorsIndices():P==="descendant"?o.getDescendantIndices():P;if(_)du(I)&&ba(I,!1),L&&(ba(L,!E),c.setItemGraphicEl(o.dataIndex,L),gu(L,N,R));else{var V=at("content",Kv,u,$b);V&&W(I,V),L.disableMorphing=!0,L&&du(L)&&ba(L,!1),ba(I,!E),c.setItemGraphicEl(o.dataIndex,I),gu(I,N,R)}return I;function O(et,Y,ut){var st=tt(Y);if(st.dataIndex=o.dataIndex,st.seriesIndex=a.seriesIndex,Y.setShape({x:0,y:0,width:f,height:p,r:D}),g)Z(Y);else{Y.invisible=!1;var ht=o.getVisual("style"),Vt=ht.stroke,Gt=Qv(b);Gt.fill=Vt;var mt=lr(w);mt.fill=w.get("borderColor");var Mt=lr(A);Mt.fill=A.get("borderColor");var Tt=lr(T);if(Tt.fill=T.get("borderColor"),ut){var Zt=f-2*d;X(Y,Vt,ht.opacity,{x:d,y:0,width:Zt,height:S})}else Y.removeTextContent();Y.setStyle(Gt),Y.ensureState("emphasis").style=mt,Y.ensureState("blur").style=Mt,Y.ensureState("select").style=Tt,Jr(Y)}et.add(Y)}function W(et,Y){var ut=tt(Y);ut.dataIndex=o.dataIndex,ut.seriesIndex=a.seriesIndex;var st=Math.max(f-2*d,0),ht=Math.max(p-2*d,0);if(Y.culling=!0,Y.setShape({x:d,y:d,width:st,height:ht,r:D}),g)Z(Y);else{Y.invisible=!1;var Vt=o.getVisual("style"),Gt=Vt.fill,mt=Qv(b);mt.fill=Gt,mt.decal=Vt.decal;var Mt=lr(w),Tt=lr(A),Zt=lr(T);X(Y,Gt,Vt.opacity,null),Y.setStyle(mt),Y.ensureState("emphasis").style=Mt,Y.ensureState("blur").style=Tt,Y.ensureState("select").style=Zt,Jr(Y)}et.add(Y)}function Z(et){!et.invisible&&n.push(et)}function X(et,Y,ut,st){var ht=h.getModel(st?Jv:jv),Vt=Ie(h.get("name"),null),Gt=ht.getShallow("show");Yt(et,Ht(h,st?Jv:jv),{defaultText:Gt?Vt:null,inheritColor:Y,defaultOpacity:ut,labelFetcher:a,labelDataIndex:o.dataIndex});var mt=et.getTextContent();if(!!mt){var Mt=mt.style,Tt=Tm(Mt.padding||0);st&&(et.setTextConfig({layoutRect:st}),mt.disableLabelLayout=!0),mt.beforeUpdate=function(){var Ce=Math.max((st?st.width:et.shape.width)-Tt[1]-Tt[3],0),Jt=Math.max((st?st.height:et.shape.height)-Tt[0]-Tt[2],0);(Mt.width!==Ce||Mt.height!==Jt)&&mt.setStyle({width:Ce,height:Jt})},Mt.truncateMinChar=2,Mt.lineOverflow="truncate",Q(Mt,st,v);var Zt=mt.getState("emphasis");Q(Zt?Zt.style:null,st,v)}}function Q(et,Y,ut){var st=et?et.text:null;if(!Y&&ut.isLeafRoot&&st!=null){var ht=a.get("drillDownIcon",!0);et.text=ht?ht+" "+st:st}}function at(et,Y,ut,st){var ht=m!=null&&t[et][m],Vt=i[et];return ht?(t[et][m]=null,gt(Vt,ht)):g||(ht=new Y,ht instanceof jr&&(ht.z2=Yb(ut,st)),pt(Vt,ht)),e[et][y]=ht}function gt(et,Y){var ut=et[y]={};Y instanceof Ts?(ut.oldX=Y.x,ut.oldY=Y.y):ut.oldShape=H({},Y.shape)}function pt(et,Y){var ut=et[y]={},st=o.parentNode,ht=Y instanceof U;if(st&&(!r||r.direction==="drillDown")){var Vt=0,Gt=0,mt=i.background[st.getRawIndex()];!r&&mt&&mt.oldShape&&(Vt=mt.oldShape.width,Gt=mt.oldShape.height),ht?(ut.oldX=0,ut.oldY=Gt):ut.oldShape={x:Vt,y:Gt,width:0,height:0}}ut.fadein=!ht}}function Yb(a,e){return a*Hb+e}const Xb=Zb;var Ba=C,Kb=St,Ji=-1,bl=function(){function a(e){var t=e.mappingMethod,r=e.type,i=this.option=nt(e);this.type=r,this.mappingMethod=t,this._normalizeData=Jb[t];var n=a.visualHandlers[r];this.applyVisual=n.applyVisual,this.getColorMapper=n.getColorMapper,this._normalizedToVisual=n._normalizedToVisual[t],t==="piecewise"?(ho(i),qb(i)):t==="category"?i.categories?jb(i):ho(i,!0):(dt(t!=="linear"||i.dataExtent),ho(i))}return a.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},a.prototype.getNormalizer=function(){return $(this._normalizeData,this)},a.listVisualTypes=function(){return Ct(a.visualHandlers)},a.isValidType=function(e){return a.visualHandlers.hasOwnProperty(e)},a.eachVisual=function(e,t,r){St(e)?C(e,t,r):t.call(r,e)},a.mapVisual=function(e,t,r){var i,n=B(e)?[]:St(e)?{}:(i=!0,null);return a.eachVisual(e,function(o,s){var l=t.call(r,o,s);i?n=l:n[s]=l}),n},a.retrieveVisuals=function(e){var t={},r;return e&&Ba(a.visualHandlers,function(i,n){e.hasOwnProperty(n)&&(t[n]=e[n],r=!0)}),r?t:null},a.prepareVisualTypes=function(e){if(B(e))e=e.slice();else if(Kb(e)){var t=[];Ba(e,function(r,i){t.push(i)}),e=t}else return[];return e.sort(function(r,i){return i==="color"&&r!=="color"&&r.indexOf("color")===0?1:-1}),e},a.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},a.findPieceIndex=function(e,t,r){for(var i,n=1/0,o=0,s=t.length;o<s;o++){var l=t[o].value;if(l!=null){if(l===e||K(l)&&l===e+"")return o;r&&h(l,o)}}for(var o=0,s=t.length;o<s;o++){var u=t[o],v=u.interval,c=u.close;if(v){if(v[0]===-1/0){if(gi(c[1],e,v[1]))return o}else if(v[1]===1/0){if(gi(c[0],v[0],e))return o}else if(gi(c[0],v[0],e)&&gi(c[1],e,v[1]))return o;r&&h(v[0],o),r&&h(v[1],o)}}if(r)return e===1/0?t.length-1:e===-1/0?0:i;function h(f,p){var d=Math.abs(f-e);d<n&&(n=d,i=p)}},a.visualHandlers={color:{applyVisual:pa("color"),getColorMapper:function(){var e=this.option;return $(e.mappingMethod==="category"?function(t,r){return!r&&(t=this._normalizeData(t)),Ta.call(this,t)}:function(t,r,i){var n=!!i;return!r&&(t=this._normalizeData(t)),i=Wn(t,e.parsedVisual,i),n?i:Mi(i,"rgba")},this)},_normalizedToVisual:{linear:function(e){return Mi(Wn(e,this.option.parsedVisual),"rgba")},category:Ta,piecewise:function(e,t){var r=Ds.call(this,t);return r==null&&(r=Mi(Wn(e,this.option.parsedVisual),"rgba")),r},fixed:ur}},colorHue:di(function(e,t){return Ia(e,t)}),colorSaturation:di(function(e,t){return Ia(e,null,t)}),colorLightness:di(function(e,t){return Ia(e,null,null,t)}),colorAlpha:di(function(e,t){return Wi(e,t)}),decal:{applyVisual:pa("decal"),_normalizedToVisual:{linear:null,category:Ta,piecewise:null,fixed:null}},opacity:{applyVisual:pa("opacity"),_normalizedToVisual:Cs([0,1])},liftZ:{applyVisual:pa("liftZ"),_normalizedToVisual:{linear:ur,category:ur,piecewise:ur,fixed:ur}},symbol:{applyVisual:function(e,t,r){var i=this.mapValueToVisual(e);r("symbol",i)},_normalizedToVisual:{linear:tc,category:Ta,piecewise:function(e,t){var r=Ds.call(this,t);return r==null&&(r=tc.call(this,e)),r},fixed:ur}},symbolSize:{applyVisual:pa("symbolSize"),_normalizedToVisual:Cs([0,1])}},a}();function qb(a){var e=a.pieceList;a.hasSpecialVisual=!1,C(e,function(t,r){t.originIndex=r,t.visual!=null&&(a.hasSpecialVisual=!0)})}function jb(a){var e=a.categories,t=a.categoryMap={},r=a.visual;if(Ba(e,function(o,s){t[o]=s}),!B(r)){var i=[];St(r)?Ba(r,function(o,s){var l=t[s];i[l!=null?l:Ji]=o}):i[Ji]=r,r=Cd(a,i)}for(var n=e.length-1;n>=0;n--)r[n]==null&&(delete t[e[n]],e.pop())}function ho(a,e){var t=a.visual,r=[];St(t)?Ba(t,function(n){r.push(n)}):t!=null&&r.push(t);var i={color:1,symbol:1};!e&&r.length===1&&!i.hasOwnProperty(a.type)&&(r[1]=r[0]),Cd(a,r)}function di(a){return{applyVisual:function(e,t,r){var i=this.mapValueToVisual(e);r("color",a(t("color"),i))},_normalizedToVisual:Cs([0,1])}}function tc(a){var e=this.option.visual;return e[Math.round(vt(a,[0,1],[0,e.length-1],!0))]||{}}function pa(a){return function(e,t,r){r(a,this.mapValueToVisual(e))}}function Ta(a){var e=this.option.visual;return e[this.option.loop&&a!==Ji?a%e.length:a]}function ur(){return this.option.visual[0]}function Cs(a){return{linear:function(e){return vt(e,a,this.option.visual,!0)},category:Ta,piecewise:function(e,t){var r=Ds.call(this,t);return r==null&&(r=vt(e,a,this.option.visual,!0)),r},fixed:ur}}function Ds(a){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var r=bl.findPieceIndex(a,t),i=t[r];if(i&&i.visual)return i.visual[this.type]}}function Cd(a,e){return a.visual=e,a.type==="color"&&(a.parsedVisual=z(e,function(t){return pp(t)})),e}var Jb={linear:function(a){return vt(a,this.option.dataExtent,[0,1],!0)},piecewise:function(a){var e=this.option.pieceList,t=bl.findPieceIndex(a,e,!0);if(t!=null)return vt(t,[0,e.length-1],[0,1],!0)},category:function(a){var e=this.option.categories?this.option.categoryMap[a]:a;return e==null?Ji:e},fixed:Ve};function gi(a,e,t){return a?e<=t:e<t}const Wt=bl;var Qb="itemStyle",Dd=Lt();const t_={seriesType:"treemap",reset:function(a){var e=a.getData().tree,t=e.root;t.isRemoved()||Id(t,{},a.getViewRoot().getAncestors(),a)}};function Id(a,e,t,r){var i=a.getModel(),n=a.getLayout(),o=a.hostTree.data;if(!(!n||n.invisible||!n.isInView)){var s=i.getModel(Qb),l=e_(s,e,r),u=o.ensureUniqueItemVisual(a.dataIndex,"style"),v=s.get("borderColor"),c=s.get("borderColorSaturation"),h;c!=null&&(h=ec(l),v=r_(c,h)),u.stroke=v;var f=a.viewChildren;if(!f||!f.length)h=ec(l),u.fill=h;else{var p=a_(a,i,n,s,l,f);C(f,function(d,g){if(d.depth>=t.length||d===t[d.depth]){var y=i_(i,l,d,g,p,r);Id(d,y,t,r)}})}}}function e_(a,e,t){var r=H({},e),i=t.designatedVisualItemStyle;return C(["color","colorAlpha","colorSaturation"],function(n){i[n]=e[n];var o=a.get(n);i[n]=null,o!=null&&(r[n]=o)}),r}function ec(a){var e=fo(a,"color");if(e){var t=fo(a,"colorAlpha"),r=fo(a,"colorSaturation");return r&&(e=Ia(e,null,null,r)),t&&(e=Wi(e,t)),e}}function r_(a,e){return e!=null?Ia(e,null,null,a):null}function fo(a,e){var t=a[e];if(t!=null&&t!=="none")return t}function a_(a,e,t,r,i,n){if(!(!n||!n.length)){var o=po(e,"color")||i.color!=null&&i.color!=="none"&&(po(e,"colorAlpha")||po(e,"colorSaturation"));if(!!o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&s<u[0]&&(u[0]=s),l!=null&&l>u[1]&&(u[1]=l);var v=e.get("colorMappingBy"),c={type:o.name,dataExtent:u,visual:o.range};c.type==="color"&&(v==="index"||v==="id")?(c.mappingMethod="category",c.loop=!0):c.mappingMethod="linear";var h=new Wt(c);return Dd(h).drColorMappingBy=v,h}}}function po(a,e){var t=a.get(e);return B(t)&&t.length?{name:e,range:t}:null}function i_(a,e,t,r,i,n){var o=H({},e);if(i){var s=i.type,l=s==="color"&&Dd(i).drColorMappingBy,u=l==="index"?r:l==="id"?n.mapIdToIndex(t.getId()):t.getValue(a.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var Ga=Math.max,Qi=Math.min,rc=Ot,_l=C,Ld=["itemStyle","borderWidth"],n_=["itemStyle","gapWidth"],o_=["upperLabel","show"],s_=["upperLabel","height"];const l_={seriesType:"treemap",reset:function(a,e,t,r){var i=t.getWidth(),n=t.getHeight(),o=a.option,s=Bt(a.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=o.size||[],u=G(rc(s.width,l[0]),i),v=G(rc(s.height,l[1]),n),c=r&&r.type,h=["treemapZoomToNode","treemapRootToNode"],f=za(r,h,a),p=c==="treemapRender"||c==="treemapMove"?r.rootRect:null,d=a.getViewRoot(),g=wd(d);if(c!=="treemapMove"){var y=c==="treemapZoomToNode"?p_(a,f,d,u,v):p?[p.width,p.height]:[u,v],m=o.sort;m&&m!=="asc"&&m!=="desc"&&(m="desc");var x={squareRatio:o.squareRatio,sort:m,leafDepth:o.leafDepth};d.hostTree.clearLayouts();var S={x:0,y:0,width:y[0],height:y[1],area:y[0]*y[1]};d.setLayout(S),Md(d,x,!1,0),S=d.getLayout(),_l(g,function(b,w){var A=(g[w+1]||d).getValue();b.setLayout(H({dataExtent:[A,A],borderWidth:0,upperHeight:0},S))})}var _=a.getData().tree.root;_.setLayout(d_(s,p,f),!0),a.setLayoutInfo(s),Pd(_,new zt(-s.x,-s.y,i,n),g,d,0)}};function Md(a,e,t,r){var i,n;if(!a.isRemoved()){var o=a.getLayout();i=o.width,n=o.height;var s=a.getModel(),l=s.get(Ld),u=s.get(n_)/2,v=Rd(s),c=Math.max(l,v),h=l-u,f=c-u;a.setLayout({borderWidth:l,upperHeight:c,upperLabelHeight:v},!0),i=Ga(i-2*h,0),n=Ga(n-h-f,0);var p=i*n,d=u_(a,s,p,e,t,r);if(!!d.length){var g={x:h,y:f,width:i,height:n},y=Qi(i,n),m=1/0,x=[];x.area=0;for(var S=0,_=d.length;S<_;){var b=d[S];x.push(b),x.area+=b.getLayout().area;var w=f_(x,y,e.squareRatio);w<=m?(S++,m=w):(x.area-=x.pop().getLayout().area,ac(x,y,g,u,!1),y=Qi(g.width,g.height),x.length=x.area=0,m=1/0)}if(x.length&&ac(x,y,g,u,!0),!t){var A=s.get("childrenVisibleMin");A!=null&&p<A&&(t=!0)}for(var S=0,_=d.length;S<_;S++)Md(d[S],e,t,r+1)}}}function u_(a,e,t,r,i,n){var o=a.children||[],s=r.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=r.leafDepth!=null&&r.leafDepth<=n;if(i&&!l)return a.viewChildren=[];o=te(o,function(f){return!f.isRemoved()}),c_(o,s);var u=h_(e,o,s);if(u.sum===0)return a.viewChildren=[];if(u.sum=v_(e,t,u.sum,s,o),u.sum===0)return a.viewChildren=[];for(var v=0,c=o.length;v<c;v++){var h=o[v].getValue()/u.sum*t;o[v].setLayout({area:h})}return l&&(o.length&&a.setLayout({isLeafRoot:!0},!0),o.length=0),a.viewChildren=o,a.setLayout({dataExtent:u.dataExtent},!0),o}function v_(a,e,t,r,i){if(!r)return t;for(var n=a.get("visibleMin"),o=i.length,s=o,l=o-1;l>=0;l--){var u=i[r==="asc"?o-l-1:l].getValue();u/t*e<n&&(s=l,t-=u)}return r==="asc"?i.splice(0,o-s):i.splice(s,o-s),t}function c_(a,e){return e&&a.sort(function(t,r){var i=e==="asc"?t.getValue()-r.getValue():r.getValue()-t.getValue();return i===0?e==="asc"?t.dataIndex-r.dataIndex:r.dataIndex-t.dataIndex:i}),a}function h_(a,e,t){for(var r=0,i=0,n=e.length;i<n;i++)r+=e[i].getValue();var o=a.get("visualDimension"),s;return!e||!e.length?s=[NaN,NaN]:o==="value"&&t?(s=[e[e.length-1].getValue(),e[0].getValue()],t==="asc"&&s.reverse()):(s=[1/0,-1/0],_l(e,function(l){var u=l.getValue(o);u<s[0]&&(s[0]=u),u>s[1]&&(s[1]=u)})),{sum:r,dataExtent:s}}function f_(a,e,t){for(var r=0,i=1/0,n=0,o=void 0,s=a.length;n<s;n++)o=a[n].getLayout().area,o&&(o<i&&(i=o),o>r&&(r=o));var l=a.area*a.area,u=e*e*t;return l?Ga(u*r/l,l/(u*i)):1/0}function ac(a,e,t,r,i){var n=e===t.width?0:1,o=1-n,s=["x","y"],l=["width","height"],u=t[s[n]],v=e?a.area/e:0;(i||v>t[l[o]])&&(v=t[l[o]]);for(var c=0,h=a.length;c<h;c++){var f=a[c],p={},d=v?f.getLayout().area/v:0,g=p[l[o]]=Ga(v-2*r,0),y=t[s[n]]+t[l[n]]-u,m=c===h-1||y<d?y:d,x=p[l[n]]=Ga(m-2*r,0);p[s[o]]=t[s[o]]+Qi(r,g/2),p[s[n]]=u+Qi(r,x/2),u+=m,f.setLayout(p,!0)}t[s[o]]+=v,t[l[o]]-=v}function p_(a,e,t,r,i){var n=(e||{}).node,o=[r,i];if(!n||n===t)return o;for(var s,l=r*i,u=l*a.option.zoomToNodeRatio;s=n.parentNode;){for(var v=0,c=s.children,h=0,f=c.length;h<f;h++)v+=c[h].getValue();var p=n.getValue();if(p===0)return o;u*=v/p;var d=s.getModel(),g=d.get(Ld),y=Math.max(g,Rd(d));u+=4*g*g+(3*g+y)*Math.pow(u,.5),u>yu&&(u=yu),n=s}u<l&&(u=l);var m=Math.pow(u/l,.5);return[r*m,i*m]}function d_(a,e,t){if(e)return{x:e.x,y:e.y};var r={x:0,y:0};if(!t)return r;var i=t.node,n=i.getLayout();if(!n)return r;for(var o=[n.width/2,n.height/2],s=i;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:a.width/2-o[0],y:a.height/2-o[1]}}function Pd(a,e,t,r,i){var n=a.getLayout(),o=t[i],s=o&&o===a;if(!(o&&!s||i===t.length&&a!==r)){a.setLayout({isInView:!0,invisible:!s&&!e.intersect(n),isAboveViewRoot:s},!0);var l=new zt(e.x-n.x,e.y-n.y,e.width,e.height);_l(a.viewChildren||[],function(u){Pd(u,l,t,r,i+1)})}}function Rd(a){return a.get(o_)?a.get(s_):0}function g_(a){a.registerSeriesModel(Eb),a.registerChartView(Xb),a.registerVisual(t_),a.registerLayout(l_),Pb(a)}function y_(a){var e=a.findComponents({mainType:"legend"});!e||!e.length||a.eachSeriesByType("graph",function(t){var r=t.getCategoriesData(),i=t.getGraph(),n=i.data,o=r.mapArray(r.getName);n.filterSelf(function(s){var l=n.getItemModel(s),u=l.getShallow("category");if(u!=null){re(u)&&(u=o[u]);for(var v=0;v<e.length;v++)if(!e[v].isSelected(u))return!1}return!0})})}function m_(a){var e={};a.eachSeriesByType("graph",function(t){var r=t.getCategoriesData(),i=t.getData(),n={};r.each(function(o){var s=r.getName(o);n["ec-"+s]=o;var l=r.getItemModel(o),u=l.getModel("itemStyle").getItemStyle();u.fill||(u.fill=t.getColorFromPalette(s,e)),r.setItemVisual(o,"style",u);for(var v=["symbol","symbolSize","symbolKeepAspect"],c=0;c<v.length;c++){var h=l.getShallow(v[c],!0);h!=null&&r.setItemVisual(o,v[c],h)}}),r.count()&&i.each(function(o){var s=i.getItemModel(o),l=s.getShallow("category");if(l!=null){K(l)&&(l=n["ec-"+l]);var u=r.getItemVisual(l,"style"),v=i.ensureUniqueItemVisual(o,"style");H(v,u);for(var c=["symbol","symbolSize","symbolKeepAspect"],h=0;h<c.length;h++)i.setItemVisual(o,c[h],r.getItemVisual(l,c[h]))}})})}function yi(a){return a instanceof Array||(a=[a,a]),a}function x_(a){a.eachSeriesByType("graph",function(e){var t=e.getGraph(),r=e.getEdgeData(),i=yi(e.get("edgeSymbol")),n=yi(e.get("edgeSymbolSize"));r.setVisual("fromSymbol",i&&i[0]),r.setVisual("toSymbol",i&&i[1]),r.setVisual("fromSymbolSize",n&&n[0]),r.setVisual("toSymbolSize",n&&n[1]),r.setVisual("style",e.getModel("lineStyle").getLineStyle()),r.each(function(o){var s=r.getItemModel(o),l=t.getEdgeByIndex(o),u=yi(s.getShallow("symbol",!0)),v=yi(s.getShallow("symbolSize",!0)),c=s.getModel("lineStyle").getLineStyle(),h=r.ensureUniqueItemVisual(o,"style");switch(H(h,c),h.stroke){case"source":{var f=l.node1.getVisual("style");h.stroke=f&&f.fill;break}case"target":{var f=l.node2.getVisual("style");h.stroke=f&&f.fill;break}}u[0]&&l.setVisual("fromSymbol",u[0]),u[1]&&l.setVisual("toSymbol",u[1]),v[0]&&l.setVisual("fromSymbolSize",v[0]),v[1]&&l.setVisual("toSymbolSize",v[1])})})}var Is="-->",On=function(a){return a.get("autoCurveness")||null},kd=function(a,e){var t=On(a),r=20,i=[];if(re(t))r=t;else if(B(t)){a.__curvenessList=t;return}e>r&&(r=e);var n=r%2?r+2:r+3;i=[];for(var o=0;o<n;o++)i.push((o%2?o+1:o)/10*(o%2?-1:1));a.__curvenessList=i},Fa=function(a,e,t){var r=[a.id,a.dataIndex].join("."),i=[e.id,e.dataIndex].join(".");return[t.uid,r,i].join(Is)},Ed=function(a){var e=a.split(Is);return[e[0],e[2],e[1]].join(Is)},S_=function(a,e){var t=Fa(a.node1,a.node2,e);return e.__edgeMap[t]},b_=function(a,e){var t=Ls(Fa(a.node1,a.node2,e),e),r=Ls(Fa(a.node2,a.node1,e),e);return t+r},Ls=function(a,e){var t=e.__edgeMap;return t[a]?t[a].length:0};function __(a){!On(a)||(a.__curvenessList=[],a.__edgeMap={},kd(a))}function w_(a,e,t,r){if(!!On(t)){var i=Fa(a,e,t),n=t.__edgeMap,o=n[Ed(i)];n[i]&&!o?n[i].isForward=!0:o&&n[i]&&(o.isForward=!0,n[i].isForward=!1),n[i]=n[i]||[],n[i].push(r)}}function wl(a,e,t,r){var i=On(e),n=B(i);if(!i)return null;var o=S_(a,e);if(!o)return null;for(var s=-1,l=0;l<o.length;l++)if(o[l]===t){s=l;break}var u=b_(a,e);kd(e,u),a.lineStyle=a.lineStyle||{};var v=Fa(a.node1,a.node2,e),c=e.__curvenessList,h=n||u%2?0:1;if(o.isForward)return c[h+s];var f=Ed(v),p=Ls(f,e),d=c[s+p+h];return r?n?i&&i[0]===0?(p+h)%2?d:-d:((p%2?0:1)+h)%2?d:-d:(p+h)%2?d:-d:c[s+p+h]}function Vd(a){var e=a.coordinateSystem;if(!(e&&e.type!=="view")){var t=a.getGraph();t.eachNode(function(r){var i=r.getModel();r.setLayout([+i.get("x"),+i.get("y")])}),Nd(t,a)}}function Nd(a,e){a.eachEdge(function(t,r){var i=Ar(t.getModel().get(["lineStyle","curveness"]),-wl(t,e,r,!0),0),n=Ke(t.node1.getLayout()),o=Ke(t.node2.getLayout()),s=[n,o];+i&&s.push([(n[0]+o[0])/2-(n[1]-o[1])*i,(n[1]+o[1])/2-(o[0]-n[0])*i]),t.setLayout(s)})}function A_(a,e){a.eachSeriesByType("graph",function(t){var r=t.get("layout"),i=t.coordinateSystem;if(i&&i.type!=="view"){var n=t.getData(),o=[];C(i.dimensions,function(h){o=o.concat(n.mapDimensionsAll(h))});for(var s=0;s<n.count();s++){for(var l=[],u=!1,v=0;v<o.length;v++){var c=n.get(o[v],s);isNaN(c)||(u=!0),l.push(c)}u?n.setItemLayout(s,i.dataToPoint(l)):n.setItemLayout(s,[NaN,NaN])}Nd(n.graph,t)}else(!r||r==="none")&&Vd(t)})}function Ca(a){var e=a.coordinateSystem;if(e.type!=="view")return 1;var t=a.option.nodeScaleRatio,r=e.scaleX,i=e.getZoom(),n=(i-1)*t+1;return n/r}function Da(a){var e=a.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var ic=Math.PI,go=[];function Od(a,e){var t=a.coordinateSystem;if(!(t&&t.type!=="view")){var r=t.getBoundingRect(),i=a.getData(),n=i.graph,o=r.width/2+r.x,s=r.height/2+r.y,l=Math.min(r.width,r.height)/2,u=i.count();i.setLayout({cx:o,cy:s}),u&&(T_[e](a,n,i,l,o,s,u),n.eachEdge(function(v,c){var h=Ar(v.getModel().get(["lineStyle","curveness"]),wl(v,a,c),0),f=Ke(v.node1.getLayout()),p=Ke(v.node2.getLayout()),d,g=(f[0]+p[0])/2,y=(f[1]+p[1])/2;+h&&(h*=3,d=[o*h+g*(1-h),s*h+y*(1-h)]),v.setLayout([f,p,d])}))}}var T_={value:function(a,e,t,r,i,n,o){var s=0,l=t.getSum("value"),u=Math.PI*2/(l||o);e.eachNode(function(v){var c=v.getValue("value"),h=u*(l?c:1)/2;s+=h,v.setLayout([r*Math.cos(s)+i,r*Math.sin(s)+n]),s+=h})},symbolSize:function(a,e,t,r,i,n,o){var s=0;go.length=o;var l=Ca(a);e.eachNode(function(c){var h=Da(c);isNaN(h)&&(h=2),h<0&&(h=0),h*=l;var f=Math.asin(h/2/r);isNaN(f)&&(f=ic/2),go[c.dataIndex]=f,s+=f*2});var u=(2*ic-s)/o/2,v=0;e.eachNode(function(c){var h=u+go[c.dataIndex];v+=h,c.setLayout([r*Math.cos(v)+i,r*Math.sin(v)+n]),v+=h})}};function C_(a){a.eachSeriesByType("graph",function(e){e.get("layout")==="circular"&&Od(e,"symbolSize")})}var Lr=cs;function D_(a,e,t){for(var r=a,i=e,n=t.rect,o=n.width,s=n.height,l=[n.x+o/2,n.y+s/2],u=t.gravity==null?.1:t.gravity,v=0;v<r.length;v++){var c=r[v];c.p||(c.p=Cm(o*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),c.pp=Ke(c.p),c.edges=null}var h=t.friction==null?.6:t.friction,f=h,p,d;return{warmUp:function(){f=h*.8},setFixed:function(g){r[g].fixed=!0},setUnfixed:function(g){r[g].fixed=!1},beforeStep:function(g){p=g},afterStep:function(g){d=g},step:function(g){p&&p(r,i);for(var y=[],m=r.length,x=0;x<i.length;x++){var S=i[x];if(!S.ignoreForceLayout){var _=S.n1,b=S.n2;Gr(y,b.p,_.p);var w=mu(y)-S.d,A=b.w/(_.w+b.w);isNaN(A)&&(A=0),In(y,y),!_.fixed&&Lr(_.p,_.p,y,A*w*f),!b.fixed&&Lr(b.p,b.p,y,-(1-A)*w*f)}}for(var x=0;x<m;x++){var T=r[x];T.fixed||(Gr(y,l,T.p),Lr(T.p,T.p,y,u*f))}for(var x=0;x<m;x++)for(var _=r[x],D=x+1;D<m;D++){var b=r[D];Gr(y,b.p,_.p);var w=mu(y);w===0&&(Dm(y,Math.random()-.5,Math.random()-.5),w=1);var I=(_.rep+b.rep)/w/w;!_.fixed&&Lr(_.pp,_.pp,y,I),!b.fixed&&Lr(b.pp,b.pp,y,-I)}for(var L=[],x=0;x<m;x++){var T=r[x];T.fixed||(Gr(L,T.p,T.pp),Lr(T.p,T.p,L,f),Xt(T.pp,T.p))}f=f*.992;var M=f<.01;d&&d(r,i,M),g&&g(M)}}}function I_(a){a.eachSeriesByType("graph",function(e){var t=e.coordinateSystem;if(!(t&&t.type!=="view"))if(e.get("layout")==="force"){var r=e.preservedPoints||{},i=e.getGraph(),n=i.data,o=i.edgeData,s=e.getModel("force"),l=s.get("initLayout");e.preservedPoints?n.each(function(x){var S=n.getId(x);n.setItemLayout(x,r[S]||[NaN,NaN])}):!l||l==="none"?Vd(e):l==="circular"&&Od(e,"value");var u=n.getDataExtent("value"),v=o.getDataExtent("value"),c=s.get("repulsion"),h=s.get("edgeLength"),f=B(c)?c:[c,c],p=B(h)?h:[h,h];p=[p[1],p[0]];var d=n.mapArray("value",function(x,S){var _=n.getItemLayout(S),b=vt(x,u,f);return isNaN(b)&&(b=(f[0]+f[1])/2),{w:b,rep:b,fixed:n.getItemModel(S).get("fixed"),p:!_||isNaN(_[0])||isNaN(_[1])?null:_}}),g=o.mapArray("value",function(x,S){var _=i.getEdgeByIndex(S),b=vt(x,v,p);isNaN(b)&&(b=(p[0]+p[1])/2);var w=_.getModel(),A=Ar(_.getModel().get(["lineStyle","curveness"]),-wl(_,e,S,!0),0);return{n1:d[_.node1.dataIndex],n2:d[_.node2.dataIndex],d:b,curveness:A,ignoreForceLayout:w.get("ignoreForceLayout")}}),y=t.getBoundingRect(),m=D_(d,g,{rect:y,gravity:s.get("gravity"),friction:s.get("friction")});m.beforeStep(function(x,S){for(var _=0,b=x.length;_<b;_++)x[_].fixed&&Xt(x[_].p,i.getNodeByIndex(_).getLayout())}),m.afterStep(function(x,S,_){for(var b=0,w=x.length;b<w;b++)x[b].fixed||i.getNodeByIndex(b).setLayout(x[b].p),r[n.getId(b)]=x[b].p;for(var b=0,w=S.length;b<w;b++){var A=S[b],T=i.getEdgeByIndex(b),D=A.n1.p,I=A.n2.p,L=T.getLayout();L=L?L.slice():[],L[0]=L[0]||[],L[1]=L[1]||[],Xt(L[0],D),Xt(L[1],I),+A.curveness&&(L[2]=[(D[0]+I[0])/2-(D[1]-I[1])*A.curveness,(D[1]+I[1])/2-(I[0]-D[0])*A.curveness]),T.setLayout(L)}}),e.forceLayout=m,e.preservedPoints=r,m.step()}else e.forceLayout=null})}function L_(a,e,t){var r=H(a.getBoxLayoutParams(),{aspect:t});return Bt(r,{width:e.getWidth(),height:e.getHeight()})}function M_(a,e){var t=[];return a.eachSeriesByType("graph",function(r){var i=r.get("coordinateSystem");if(!i||i==="view"){var n=r.getData(),o=n.mapArray(function(g){var y=n.getItemModel(g);return[+y.get("x"),+y.get("y")]}),s=[],l=[];Cn(o,s,l),l[0]-s[0]===0&&(l[0]+=1,s[0]-=1),l[1]-s[1]===0&&(l[1]+=1,s[1]-=1);var u=(l[0]-s[0])/(l[1]-s[1]),v=L_(r,e,u);isNaN(u)&&(s=[v.x,v.y],l=[v.x+v.width,v.y+v.height]);var c=l[0]-s[0],h=l[1]-s[1],f=v.width,p=v.height,d=r.coordinateSystem=new ni;d.zoomLimit=r.get("scaleLimit"),d.setBoundingRect(s[0],s[1],c,h),d.setViewRect(v.x,v.y,f,p),d.setCenter(r.get("center")),d.setZoom(r.get("zoom")),t.push(d)}}),t}var nc=Kt.prototype,yo=cp.prototype,zd=function(){function a(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return a}();(function(a){k(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e})(zd);function mo(a){return isNaN(+a.cpx1)||isNaN(+a.cpy1)}var P_=function(a){k(e,a);function e(t){var r=a.call(this,t)||this;return r.type="ec-line",r}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new zd},e.prototype.buildPath=function(t,r){mo(r)?nc.buildPath.call(this,t,r):yo.buildPath.call(this,t,r)},e.prototype.pointAt=function(t){return mo(this.shape)?nc.pointAt.call(this,t):yo.pointAt.call(this,t)},e.prototype.tangentAt=function(t){var r=this.shape,i=mo(r)?[r.x2-r.x1,r.y2-r.y1]:yo.tangentAt.call(this,t);return In(i,i)},e}(Dt);const R_=P_;var xo=["fromSymbol","toSymbol"];function oc(a){return"_"+a+"Type"}function sc(a,e,t){var r=e.getItemVisual(t,a);if(!(!r||r==="none")){var i=e.getItemVisual(t,a+"Size"),n=e.getItemVisual(t,a+"Rotate"),o=e.getItemVisual(t,a+"Offset"),s=e.getItemVisual(t,a+"KeepAspect"),l=Ua(i),u=ia(o||0,l),v=kt(r,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return v.__specifiedRotation=n==null||isNaN(n)?void 0:+n*Math.PI/180||0,v.name=a,v}}function k_(a){var e=new R_({name:"line",subPixelOptimize:!0});return Ms(e.shape,a),e}function Ms(a,e){a.x1=e[0][0],a.y1=e[0][1],a.x2=e[1][0],a.y2=e[1][1],a.percent=1;var t=e[2];t?(a.cpx1=t[0],a.cpy1=t[1]):(a.cpx1=NaN,a.cpy1=NaN)}var E_=function(a){k(e,a);function e(t,r,i){var n=a.call(this)||this;return n._createLine(t,r,i),n}return e.prototype._createLine=function(t,r,i){var n=t.hostModel,o=t.getItemLayout(r),s=k_(o);s.shape.percent=0,wt(s,{shape:{percent:1}},n,r),this.add(s),C(xo,function(l){var u=sc(l,t,r);this.add(u),this[oc(l)]=t.getItemVisual(r,l)},this),this._updateCommonStl(t,r,i)},e.prototype.updateData=function(t,r,i){var n=t.hostModel,o=this.childOfName("line"),s=t.getItemLayout(r),l={shape:{}};Ms(l.shape,s),ot(o,l,n,r),C(xo,function(u){var v=t.getItemVisual(r,u),c=oc(u);if(this[c]!==v){this.remove(this.childOfName(u));var h=sc(u,t,r);this.add(h)}this[c]=v},this),this._updateCommonStl(t,r,i)},e.prototype.getLinePath=function(){return this.childAt(0)},e.prototype._updateCommonStl=function(t,r,i){var n=t.hostModel,o=this.childOfName("line"),s=i&&i.emphasisLineStyle,l=i&&i.blurLineStyle,u=i&&i.selectLineStyle,v=i&&i.labelStatesModels,c=i&&i.emphasisDisabled,h=i&&i.focus,f=i&&i.blurScope;if(!i||t.hasItemOption){var p=t.getItemModel(r),d=p.getModel("emphasis");s=d.getModel("lineStyle").getLineStyle(),l=p.getModel(["blur","lineStyle"]).getLineStyle(),u=p.getModel(["select","lineStyle"]).getLineStyle(),c=d.get("disabled"),h=d.get("focus"),f=d.get("blurScope"),v=Ht(p)}var g=t.getItemVisual(r,"style"),y=g.stroke;o.useStyle(g),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=s,o.ensureState("blur").style=l,o.ensureState("select").style=u,C(xo,function(b){var w=this.childOfName(b);if(w){w.setColor(y),w.style.opacity=g.opacity;for(var A=0;A<Ra.length;A++){var T=Ra[A],D=o.getState(T);if(D){var I=D.style||{},L=w.ensureState(T),M=L.style||(L.style={});I.stroke!=null&&(M[w.__isEmptyBrush?"stroke":"fill"]=I.stroke),I.opacity!=null&&(M.opacity=I.opacity)}}w.markRedraw()}},this);var m=n.getRawValue(r);Yt(this,v,{labelDataIndex:r,labelFetcher:{getFormattedLabel:function(b,w){return n.getFormattedLabel(b,w,t.dataType)}},inheritColor:y||"#000",defaultOpacity:g.opacity,defaultText:(m==null?t.getName(r):isFinite(m)?Ae(m):m)+""});var x=this.getTextContent();if(x){var S=v.normal;x.__align=x.style.align,x.__verticalAlign=x.style.verticalAlign,x.__position=S.get("position")||"middle";var _=S.get("distance");B(_)||(_=[_,_]),x.__labelDistance=_}this.setTextConfig({position:null,local:!0,inside:!1}),bt(this,h,f,c)},e.prototype.highlight=function(){dr(this)},e.prototype.downplay=function(){gr(this)},e.prototype.updateLayout=function(t,r){this.setLinePoints(t.getItemLayout(r))},e.prototype.setLinePoints=function(t){var r=this.childOfName("line");Ms(r.shape,t),r.dirty()},e.prototype.beforeUpdate=function(){var t=this,r=t.childOfName("fromSymbol"),i=t.childOfName("toSymbol"),n=t.getTextContent();if(!r&&!i&&(!n||n.ignore))return;for(var o=1,s=this.parent;s;)s.scaleX&&(o/=s.scaleX),s=s.parent;var l=t.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,v=l.pointAt(0),c=l.pointAt(u),h=Gr([],c,v);In(h,h);function f(D,I){var L=D.__specifiedRotation;if(L==null){var M=l.tangentAt(I);D.attr("rotation",(I===1?-1:1)*Math.PI/2-Math.atan2(M[1],M[0]))}else D.attr("rotation",L)}if(r&&(r.setPosition(v),f(r,0),r.scaleX=r.scaleY=o*u,r.markRedraw()),i&&(i.setPosition(c),f(i,1),i.scaleX=i.scaleY=o*u,i.markRedraw()),n&&!n.ignore){n.x=n.y=0,n.originX=n.originY=0;var p=void 0,d=void 0,g=n.__labelDistance,y=g[0]*o,m=g[1]*o,x=u/2,S=l.tangentAt(x),_=[S[1],-S[0]],b=l.pointAt(x);_[1]>0&&(_[0]=-_[0],_[1]=-_[1]);var w=S[0]<0?-1:1;if(n.__position!=="start"&&n.__position!=="end"){var A=-Math.atan2(S[1],S[0]);c[0]<v[0]&&(A=Math.PI+A),n.rotation=A}var T=void 0;switch(n.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":T=-m,d="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":T=m,d="top";break;default:T=0,d="middle"}switch(n.__position){case"end":n.x=h[0]*y+c[0],n.y=h[1]*m+c[1],p=h[0]>.8?"left":h[0]<-.8?"right":"center",d=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":n.x=-h[0]*y+v[0],n.y=-h[1]*m+v[1],p=h[0]>.8?"right":h[0]<-.8?"left":"center",d=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":n.x=y*w+v[0],n.y=v[1]+T,p=S[0]<0?"right":"left",n.originX=-y*w,n.originY=-T;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":n.x=b[0],n.y=b[1]+T,p="center",n.originY=-T;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":n.x=-y*w+c[0],n.y=c[1]+T,p=S[0]>=0?"right":"left",n.originX=y*w,n.originY=-T;break}n.scaleX=n.scaleY=o,n.setStyle({verticalAlign:n.__verticalAlign||d,align:n.__align||p})}},e}(U);const Al=E_;var V_=function(){function a(e){this.group=new U,this._LineCtor=e||Al}return a.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var r=this,i=r.group,n=r._lineData;r._lineData=e,n||i.removeAll();var o=lc(e);e.diff(n).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(n,e,l,s,o)}).remove(function(s){i.remove(n.getItemGraphicEl(s))}).execute()},a.prototype.updateLayout=function(){var e=this._lineData;!e||e.eachItemGraphicEl(function(t,r){t.updateLayout(e,r)},this)},a.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=lc(e),this._lineData=null,this.group.removeAll()},a.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function r(s){!s.isGroup&&!N_(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i<e.end;i++){var n=t.getItemLayout(i);if(So(n)){var o=new this._LineCtor(t,i,this._seriesScope);o.traverse(r),this.group.add(o),t.setItemGraphicEl(i,o),this._progressiveEls.push(o)}}},a.prototype.remove=function(){this.group.removeAll()},a.prototype.eachRendered=function(e){na(this._progressiveEls||this.group,e)},a.prototype._doAdd=function(e,t,r){var i=e.getItemLayout(t);if(!!So(i)){var n=new this._LineCtor(e,t,r);e.setItemGraphicEl(t,n),this.group.add(n)}},a.prototype._doUpdate=function(e,t,r,i,n){var o=e.getItemGraphicEl(r);if(!So(t.getItemLayout(i))){this.group.remove(o);return}o?o.updateData(t,i,n):o=new this._LineCtor(t,i,n),t.setItemGraphicEl(i,o),this.group.add(o)},a}();function N_(a){return a.animators&&a.animators.length>0}function lc(a){var e=a.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:Ht(e)}}function uc(a){return isNaN(a[0])||isNaN(a[1])}function So(a){return a&&!uc(a[0])&&!uc(a[1])}const Tl=V_;var bo=[],_o=[],wo=[],Mr=dp,Ao=Lm,vc=Math.abs;function cc(a,e,t){for(var r=a[0],i=a[1],n=a[2],o=1/0,s,l=t*t,u=.1,v=.1;v<=.9;v+=.1){bo[0]=Mr(r[0],i[0],n[0],v),bo[1]=Mr(r[1],i[1],n[1],v);var c=vc(Ao(bo,e)-l);c<o&&(o=c,s=v)}for(var h=0;h<32;h++){var f=s+u;_o[0]=Mr(r[0],i[0],n[0],s),_o[1]=Mr(r[1],i[1],n[1],s),wo[0]=Mr(r[0],i[0],n[0],f),wo[1]=Mr(r[1],i[1],n[1],f);var c=Ao(_o,e)-l;if(vc(c)<.01)break;var p=Ao(wo,e)-l;u/=2,c<0?p>=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function To(a,e){var t=[],r=Im,i=[[],[],[]],n=[[],[]],o=[];e/=2,a.eachEdge(function(s,l){var u=s.getLayout(),v=s.getVisual("fromSymbol"),c=s.getVisual("toSymbol");u.__original||(u.__original=[Ke(u[0]),Ke(u[1])],u[2]&&u.__original.push(Ke(u[2])));var h=u.__original;if(u[2]!=null){if(Xt(i[0],h[0]),Xt(i[1],h[2]),Xt(i[2],h[1]),v&&v!=="none"){var f=Da(s.node1),p=cc(i,h[0],f*e);r(i[0][0],i[1][0],i[2][0],p,t),i[0][0]=t[3],i[1][0]=t[4],r(i[0][1],i[1][1],i[2][1],p,t),i[0][1]=t[3],i[1][1]=t[4]}if(c&&c!=="none"){var f=Da(s.node2),p=cc(i,h[1],f*e);r(i[0][0],i[1][0],i[2][0],p,t),i[1][0]=t[1],i[2][0]=t[2],r(i[0][1],i[1][1],i[2][1],p,t),i[1][1]=t[1],i[2][1]=t[2]}Xt(u[0],i[0]),Xt(u[1],i[2]),Xt(u[2],i[1])}else{if(Xt(n[0],h[0]),Xt(n[1],h[1]),Gr(o,n[1],n[0]),In(o,o),v&&v!=="none"){var f=Da(s.node1);cs(n[0],n[0],o,f*e)}if(c&&c!=="none"){var f=Da(s.node2);cs(n[1],n[1],o,-f*e)}Xt(u[0],n[0]),Xt(u[1],n[1])}})}function hc(a){return a.type==="view"}var O_=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r){var i=new ti,n=new Tl,o=this.group;this._controller=new ii(r.getZr()),this._controllerHost={target:o},o.add(i.group),o.add(n.group),this._symbolDraw=i,this._lineDraw=n,this._firstRender=!0},e.prototype.render=function(t,r,i){var n=this,o=t.coordinateSystem;this._model=t;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(hc(o)){var v={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(v):ot(u,v,t)}To(t.getGraph(),Ca(t));var c=t.getData();s.updateData(c);var h=t.getEdgeData();l.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,r,i),clearTimeout(this._layoutTimeout);var f=t.forceLayout,p=t.get(["force","layoutAnimation"]);f&&this._startForceLayoutIteration(f,p),c.graph.eachNode(function(m){var x=m.dataIndex,S=m.getGraphicEl(),_=m.getModel();if(!!S){S.off("drag").off("dragend");var b=_.get("draggable");b&&S.on("drag",function(){f&&(f.warmUp(),!n._layouting&&n._startForceLayoutIteration(f,p),f.setFixed(x),c.setItemLayout(x,[S.x,S.y]))}).on("dragend",function(){f&&f.setUnfixed(x)}),S.setDraggable(b&&!!f);var w=_.get(["emphasis","focus"]);w==="adjacency"&&(tt(S).focus=m.getAdjacentDataIndices())}}),c.graph.eachEdge(function(m){var x=m.getGraphicEl(),S=m.getModel().get(["emphasis","focus"]);!x||S==="adjacency"&&(tt(x).focus={edge:[m.dataIndex],node:[m.node1.dataIndex,m.node2.dataIndex]})});var d=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),g=c.getLayout("cx"),y=c.getLayout("cy");c.eachItemGraphicEl(function(m,x){var S=c.getItemModel(x),_=S.get(["label","rotate"])||0,b=m.getSymbolPath();if(d){var w=c.getItemLayout(x),A=Math.atan2(w[1]-y,w[0]-g);A<0&&(A=Math.PI*2+A);var T=w[0]<g;T&&(A=A-Math.PI);var D=T?"left":"right";b.setTextConfig({rotation:-A,position:D,origin:"center"});var I=b.ensureState("emphasis");H(I.textConfig||(I.textConfig={}),{position:D})}else b.setTextConfig({rotation:_*=Math.PI/180})}),this._firstRender=!1},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,r){var i=this;(function n(){t.step(function(o){i.updateLayout(i._model),(i._layouting=!o)&&(r?i._layoutTimeout=setTimeout(n,16):n())})})()},e.prototype._updateController=function(t,r,i){var n=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,v,c){var h=l.getBoundingRect();return h.applyTransform(l.transform),h.contain(v,c)&&!En(u,i,t)}),!hc(t.coordinateSystem)){o.disable();return}o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){dl(s,u.dx,u.dy),i.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){gl(s,u.scale,u.originX,u.originY),i.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),n._updateNodeAndLinkScale(),To(t.getGraph(),Ca(t)),n._lineDraw.updateLayout(),i.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,r=t.getData(),i=Ca(t);r.eachItemGraphicEl(function(n,o){n&&n.setSymbolScale(i)})},e.prototype.updateLayout=function(t){To(t.getGraph(),Ca(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(t,r){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(xt);const z_=O_;function Bd(a,e,t,r,i){for(var n=new Mm(r),o=0;o<a.length;o++)n.addNode(Ot(a[o].id,a[o].name,o),o);for(var s=[],l=[],u=0,o=0;o<e.length;o++){var v=e[o],c=v.source,h=v.target;n.addEdge(c,h,u)&&(l.push(v),s.push(Ot(Ie(v.id,null),c+" > "+h)),u++)}var f=t.get("coordinateSystem"),p;if(f==="cartesian2d"||f==="polar")p=ze(a,t);else{var d=il.get(f),g=d?d.dimensions||[]:[];yt(g,"value")<0&&g.concat(["value"]);var y=Sn(a,{coordDimensions:g,encodeDefine:t.getEncode()}).dimensions;p=new Qt(y,t),p.initData(a)}var m=new Qt(["value"],t);return m.initData(l,s),i&&i(p,m),hp({mainData:p,struct:n,structAttr:"graph",datas:{node:p,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),n.update(),n}var B_=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){a.prototype.init.apply(this,arguments);var r=this;function i(){return r._categoriesData}this.legendVisualProvider=new ai(i,i),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){a.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){a.prototype.mergeDefaultAndTheme.apply(this,arguments),Ya(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,r){var i=t.edges||t.links||[],n=t.data||t.nodes||[],o=this;if(n&&i){__(this);var s=Bd(n,i,this,!0,l);return C(s.edges,function(u){w_(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,v){u.wrapMethod("getItemModel",function(p){var d=o._categoriesModels,g=p.getShallow("category"),y=d[g];return y&&(y.parentModel=p.parentModel,p.parentModel=y),p});var c=Pt.prototype.getModel;function h(p,d){var g=c.call(this,p,d);return g.resolveParentPath=f,g}v.wrapMethod("getItemModel",function(p){return p.resolveParentPath=f,p.getModel=h,p});function f(p){if(p&&(p[0]==="label"||p[1]==="label")){var d=p.slice();return p[0]==="label"?d[0]="edgeLabel":p[1]==="label"&&(d[1]="edgeLabel"),d}return p}}},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,r,i){if(i==="edge"){var n=this.getData(),o=this.getDataParams(t,i),s=n.graph.getEdgeByIndex(t),l=n.getName(s.node1.dataIndex),u=n.getName(s.node2.dataIndex),v=[];return l!=null&&v.push(l),u!=null&&v.push(u),Ut("nameValue",{name:v.join(" > "),value:o.value,noValue:o.value==null})}var c=Pm({series:this,dataIndex:t,multipleSeries:r});return c},e.prototype._updateCategoriesData=function(){var t=z(this.option.categories||[],function(i){return i.value!=null?i:H({value:0},i)}),r=new Qt(["value"],this);r.initData(t),this._categoriesData=r,this._categoriesModels=r.mapArray(function(i){return r.getItemModel(i)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return a.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(At);const G_=B_;var F_={type:"graphRoam",event:"graphRoam",update:"none"};function H_(a){a.registerChartView(z_),a.registerSeriesModel(G_),a.registerProcessor(y_),a.registerVisual(m_),a.registerVisual(x_),a.registerLayout(A_),a.registerLayout(a.PRIORITY.VISUAL.POST_CHART_LAYOUT,C_),a.registerLayout(I_),a.registerCoordinateSystem("graphView",{dimensions:ni.dimensions,create:M_}),a.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Ve),a.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Ve),a.registerAction(F_,function(e,t){t.eachComponent({mainType:"series",query:e},function(r){var i=r.coordinateSystem,n=ml(i,e);r.setCenter&&r.setCenter(n.center),r.setZoom&&r.setZoom(n.zoom)})})}var W_=function(){function a(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return a}(),$_=function(a){k(e,a);function e(t){var r=a.call(this,t)||this;return r.type="pointer",r}return e.prototype.getDefaultShape=function(){return new W_},e.prototype.buildPath=function(t,r){var i=Math.cos,n=Math.sin,o=r.r,s=r.width,l=r.angle,u=r.x-i(l)*s*(s>=o/3?1:2),v=r.y-n(l)*s*(s>=o/3?1:2);l=r.angle-Math.PI/2,t.moveTo(u,v),t.lineTo(r.x+i(l)*s,r.y+n(l)*s),t.lineTo(r.x+i(r.angle)*o,r.y+n(r.angle)*o),t.lineTo(r.x-i(l)*s,r.y-n(l)*s),t.lineTo(u,v)},e}(Dt);const Z_=$_;function U_(a,e){var t=a.get("center"),r=e.getWidth(),i=e.getHeight(),n=Math.min(r,i),o=G(t[0],e.getWidth()),s=G(t[1],e.getHeight()),l=G(a.get("radius"),n/2);return{cx:o,cy:s,r:l}}function mi(a,e){var t=a==null?"":a+"";return e&&(K(e)?t=e.replace("{value}",t):rt(e)&&(t=e(a))),t}var Co=Math.PI*2,Y_=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){this.group.removeAll();var n=t.get(["axisLine","lineStyle","color"]),o=U_(t,i);this._renderMain(t,r,i,n,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,r,i,n,o){for(var s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,v=-t.get("endAngle")/180*Math.PI,c=t.getModel("axisLine"),h=c.get("roundCap"),f=h?Xi:ve,p=c.get("show"),d=c.getModel("lineStyle"),g=d.get("width"),y=!((v-u)%Co)&&v!==u?Co:(v-u)%Co,m=u,x=0;p&&x<n.length;x++){var S=Math.min(Math.max(n[x][0],0),1);v=u+y*S;var _=new f({shape:{startAngle:m,endAngle:v,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-g,r:o.r},silent:!0});_.setStyle({fill:n[x][1]}),_.setStyle(d.getLineStyle(["color","width"])),s.add(_),m=v}var b=function(A){if(A<=0)return n[0][1];var T;for(T=0;T<n.length;T++)if(n[T][0]>=A&&(T===0?0:n[T-1][0])<A)return n[T][1];return n[T-1][1]};if(!l){var w=u;u=v,v=w}this._renderTicks(t,r,i,b,o,u,v,l,g),this._renderTitleAndDetail(t,r,i,b,o),this._renderAnchor(t,o),this._renderPointer(t,r,i,b,o,u,v,l,g)},e.prototype._renderTicks=function(t,r,i,n,o,s,l,u,v){for(var c=this.group,h=o.cx,f=o.cy,p=o.r,d=+t.get("min"),g=+t.get("max"),y=t.getModel("splitLine"),m=t.getModel("axisTick"),x=t.getModel("axisLabel"),S=t.get("splitNumber"),_=m.get("splitNumber"),b=G(y.get("length"),p),w=G(m.get("length"),p),A=s,T=(l-s)/S,D=T/_,I=y.getModel("lineStyle").getLineStyle(),L=m.getModel("lineStyle").getLineStyle(),M=y.get("distance"),P,R,E=0;E<=S;E++){if(P=Math.cos(A),R=Math.sin(A),y.get("show")){var N=M?M+v:v,V=new Kt({shape:{x1:P*(p-N)+h,y1:R*(p-N)+f,x2:P*(p-b-N)+h,y2:R*(p-b-N)+f},style:I,silent:!0});I.stroke==="auto"&&V.setStyle({stroke:n(E/S)}),c.add(V)}if(x.get("show")){var N=x.get("distance")+M,O=mi(Ae(E/S*(g-d)+d),x.get("formatter")),W=n(E/S);c.add(new lt({style:Rt(x,{text:O,x:P*(p-b-N)+h,y:R*(p-b-N)+f,verticalAlign:R<-.8?"top":R>.8?"bottom":"middle",align:P<-.4?"left":P>.4?"right":"center"},{inheritColor:W}),silent:!0}))}if(m.get("show")&&E!==S){var N=m.get("distance");N=N?N+v:v;for(var Z=0;Z<=_;Z++){P=Math.cos(A),R=Math.sin(A);var X=new Kt({shape:{x1:P*(p-N)+h,y1:R*(p-N)+f,x2:P*(p-w-N)+h,y2:R*(p-w-N)+f},silent:!0,style:L});L.stroke==="auto"&&X.setStyle({stroke:n((E+Z/_)/S)}),c.add(X),A+=D}A-=D}else A+=T}},e.prototype._renderPointer=function(t,r,i,n,o,s,l,u,v){var c=this.group,h=this._data,f=this._progressEls,p=[],d=t.get(["pointer","show"]),g=t.getModel("progress"),y=g.get("show"),m=t.getData(),x=m.mapDimension("value"),S=+t.get("min"),_=+t.get("max"),b=[S,_],w=[s,l];function A(D,I){var L=m.getItemModel(D),M=L.getModel("pointer"),P=G(M.get("width"),o.r),R=G(M.get("length"),o.r),E=t.get(["pointer","icon"]),N=M.get("offsetCenter"),V=G(N[0],o.r),O=G(N[1],o.r),W=M.get("keepAspect"),Z;return E?Z=kt(E,V-P/2,O-R,P,R,null,W):Z=new Z_({shape:{angle:-Math.PI/2,width:P,r:R,x:V,y:O}}),Z.rotation=-(I+Math.PI/2),Z.x=o.cx,Z.y=o.cy,Z}function T(D,I){var L=g.get("roundCap"),M=L?Xi:ve,P=g.get("overlap"),R=P?g.get("width"):v/m.count(),E=P?o.r-R:o.r-(D+1)*R,N=P?o.r:o.r-D*R,V=new M({shape:{startAngle:s,endAngle:I,cx:o.cx,cy:o.cy,clockwise:u,r0:E,r:N}});return P&&(V.z2=_-m.get(x,D)%_),V}(y||d)&&(m.diff(h).add(function(D){var I=m.get(x,D);if(d){var L=A(D,s);wt(L,{rotation:-((isNaN(+I)?w[0]:vt(I,b,w,!0))+Math.PI/2)},t),c.add(L),m.setItemGraphicEl(D,L)}if(y){var M=T(D,s),P=g.get("clip");wt(M,{shape:{endAngle:vt(I,b,w,P)}},t),c.add(M),xu(t.seriesIndex,m.dataType,D,M),p[D]=M}}).update(function(D,I){var L=m.get(x,D);if(d){var M=h.getItemGraphicEl(I),P=M?M.rotation:s,R=A(D,P);R.rotation=P,ot(R,{rotation:-((isNaN(+L)?w[0]:vt(L,b,w,!0))+Math.PI/2)},t),c.add(R),m.setItemGraphicEl(D,R)}if(y){var E=f[I],N=E?E.shape.endAngle:s,V=T(D,N),O=g.get("clip");ot(V,{shape:{endAngle:vt(L,b,w,O)}},t),c.add(V),xu(t.seriesIndex,m.dataType,D,V),p[D]=V}}).execute(),m.each(function(D){var I=m.getItemModel(D),L=I.getModel("emphasis"),M=L.get("focus"),P=L.get("blurScope"),R=L.get("disabled");if(d){var E=m.getItemGraphicEl(D),N=m.getItemVisual(D,"style"),V=N.fill;if(E instanceof ye){var O=E.style;E.useStyle(H({image:O.image,x:O.x,y:O.y,width:O.width,height:O.height},N))}else E.useStyle(N),E.type!=="pointer"&&E.setColor(V);E.setStyle(I.getModel(["pointer","itemStyle"]).getItemStyle()),E.style.fill==="auto"&&E.setStyle("fill",n(vt(m.get(x,D),b,[0,1],!0))),E.z2EmphasisLift=0,$t(E,I),bt(E,M,P,R)}if(y){var W=p[D];W.useStyle(m.getItemVisual(D,"style")),W.setStyle(I.getModel(["progress","itemStyle"]).getItemStyle()),W.z2EmphasisLift=0,$t(W,I),bt(W,M,P,R)}}),this._progressEls=p)},e.prototype._renderAnchor=function(t,r){var i=t.getModel("anchor"),n=i.get("show");if(n){var o=i.get("size"),s=i.get("icon"),l=i.get("offsetCenter"),u=i.get("keepAspect"),v=kt(s,r.cx-o/2+G(l[0],r.r),r.cy-o/2+G(l[1],r.r),o,o,null,u);v.z2=i.get("showAbove")?1:0,v.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(v)}},e.prototype._renderTitleAndDetail=function(t,r,i,n,o){var s=this,l=t.getData(),u=l.mapDimension("value"),v=+t.get("min"),c=+t.get("max"),h=new U,f=[],p=[],d=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){f[y]=new lt({silent:!0}),p[y]=new lt({silent:!0})}).update(function(y,m){f[y]=s._titleEls[m],p[y]=s._detailEls[m]}).execute(),l.each(function(y){var m=l.getItemModel(y),x=l.get(u,y),S=new U,_=n(vt(x,[v,c],[0,1],!0)),b=m.getModel("title");if(b.get("show")){var w=b.get("offsetCenter"),A=o.cx+G(w[0],o.r),T=o.cy+G(w[1],o.r),D=f[y];D.attr({z2:g?0:2,style:Rt(b,{x:A,y:T,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:_})}),S.add(D)}var I=m.getModel("detail");if(I.get("show")){var L=I.get("offsetCenter"),M=o.cx+G(L[0],o.r),P=o.cy+G(L[1],o.r),R=G(I.get("width"),o.r),E=G(I.get("height"),o.r),N=t.get(["progress","show"])?l.getItemVisual(y,"style").fill:_,D=p[y],V=I.get("formatter");D.attr({z2:g?0:2,style:Rt(I,{x:M,y:P,text:mi(x,V),width:isNaN(R)?null:R,height:isNaN(E)?null:E,align:"center",verticalAlign:"middle"},{inheritColor:N})}),qf(D,{normal:I},x,function(W){return mi(W,V)}),d&&Rm(D,y,l,t,{getFormattedLabel:function(W,Z,X,Q,at,gt){return mi(gt?gt.interpolatedValue:x,V)}}),S.add(D)}h.add(S)}),this.group.add(h),this._titleEls=f,this._detailEls=p},e.type="gauge",e}(xt);const X_=Y_;var K_=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,r){return la(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12},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,offsetCenter:[0,"20%"],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],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(At);const q_=K_;function j_(a){a.registerChartView(X_),a.registerSeriesModel(q_)}var J_=["itemStyle","opacity"],Q_=function(a){k(e,a);function e(t,r){var i=a.call(this)||this,n=i,o=new me,s=new lt;return n.setTextContent(s),i.setTextGuideLine(o),i.updateData(t,r,!0),i}return e.prototype.updateData=function(t,r,i){var n=this,o=t.hostModel,s=t.getItemModel(r),l=t.getItemLayout(r),u=s.getModel("emphasis"),v=s.get(J_);v=v==null?1:v,i||pe(n),n.useStyle(t.getItemVisual(r,"style")),n.style.lineJoin="round",i?(n.setShape({points:l.points}),n.style.opacity=0,wt(n,{style:{opacity:v}},o,r)):ot(n,{style:{opacity:v},shape:{points:l.points}},o,r),$t(n,s),this._updateLabel(t,r),bt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,r){var i=this,n=this.getTextGuideLine(),o=i.getTextContent(),s=t.hostModel,l=t.getItemModel(r),u=t.getItemLayout(r),v=u.label,c=t.getItemVisual(r,"style"),h=c.fill;Yt(o,Ht(l),{labelFetcher:t.hostModel,labelDataIndex:r,defaultOpacity:c.opacity,defaultText:t.getName(r)},{normal:{align:v.textAlign,verticalAlign:v.verticalAlign}}),i.setTextConfig({local:!0,inside:!!v.inside,insideStroke:h,outsideFill:h});var f=v.linePoints;n.setShape({points:f}),i.textGuideLineConfig={anchor:f?new fe(f[0][0],f[0][1]):null},ot(o,{style:{x:v.x,y:v.y}},s,r),o.attr({rotation:v.rotation,originX:v.x,originY:v.y,z2:10}),Qf(i,tp(l),{stroke:h})},e}(ce),tw=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,r,i){var n=t.getData(),o=this._data,s=this.group;n.diff(o).add(function(l){var u=new Q_(n,l);n.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var v=o.getItemGraphicEl(u);v.updateData(n,l),s.add(v),n.setItemGraphicEl(l,v)}).remove(function(l){var u=o.getItemGraphicEl(l);Oi(u,t,l)}).execute(),this._data=n},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(xt);const ew=tw;var rw=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){a.prototype.init.apply(this,arguments),this.legendVisualProvider=new ai($(this.getData,this),$(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,r){return la(this,{coordDimensions:["value"],encodeDefaulter:q(el,this)})},e.prototype._defaultLabelLine=function(t){Ya(t,"labelLine",["show"]);var r=t.labelLine,i=t.emphasis.labelLine;r.show=r.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var r=this.getData(),i=a.prototype.getDataParams.call(this,t),n=r.mapDimension("value"),o=r.getSum(n);return i.percent=o?+(r.get(n,t)/o*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(At);const aw=rw;function iw(a,e){return Bt(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function nw(a,e){for(var t=a.mapDimension("value"),r=a.mapArray(t,function(l){return l}),i=[],n=e==="ascending",o=0,s=a.count();o<s;o++)i[o]=o;return rt(e)?i.sort(e):e!=="none"&&i.sort(function(l,u){return n?r[l]-r[u]:r[u]-r[l]}),i}function ow(a){var e=a.hostModel,t=e.get("orient");a.each(function(r){var i=a.getItemModel(r),n=i.getModel("label"),o=n.get("position"),s=i.getModel("labelLine"),l=a.getItemLayout(r),u=l.points,v=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",c,h,f,p;if(v)o==="insideLeft"?(h=(u[0][0]+u[3][0])/2+5,f=(u[0][1]+u[3][1])/2,c="left"):o==="insideRight"?(h=(u[1][0]+u[2][0])/2-5,f=(u[1][1]+u[2][1])/2,c="right"):(h=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,f=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,c="center"),p=[[h,f],[h,f]];else{var d=void 0,g=void 0,y=void 0,m=void 0,x=s.get("length");t==="vertical"&&["top","bottom"].indexOf(o)>-1&&(o="left",console.warn("Position error: Funnel chart on vertical orient dose not support top and bottom.")),t==="horizontal"&&["left","right"].indexOf(o)>-1&&(o="bottom",console.warn("Position error: Funnel chart on horizontal orient dose not support left and right.")),o==="left"?(d=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,y=d-x,h=y-5,c="right"):o==="right"?(d=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,y=d+x,h=y+5,c="left"):o==="top"?(d=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,m=g-x,f=m-5,c="center"):o==="bottom"?(d=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,m=g+x,f=m+5,c="center"):o==="rightTop"?(d=t==="horizontal"?u[3][0]:u[1][0],g=t==="horizontal"?u[3][1]:u[1][1],t==="horizontal"?(m=g-x,f=m-5,c="center"):(y=d+x,h=y+5,c="top")):o==="rightBottom"?(d=u[2][0],g=u[2][1],t==="horizontal"?(m=g+x,f=m+5,c="center"):(y=d+x,h=y+5,c="bottom")):o==="leftTop"?(d=u[0][0],g=t==="horizontal"?u[0][1]:u[1][1],t==="horizontal"?(m=g-x,f=m-5,c="center"):(y=d-x,h=y-5,c="right")):o==="leftBottom"?(d=t==="horizontal"?u[1][0]:u[3][0],g=t==="horizontal"?u[1][1]:u[2][1],t==="horizontal"?(m=g+x,f=m+5,c="center"):(y=d-x,h=y-5,c="right")):(d=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,t==="horizontal"?(m=g+x,f=m+5,c="center"):(y=d+x,h=y+5,c="left")),t==="horizontal"?(y=d,h=y):(m=g,f=m),p=[[d,g],[y,m]]}l.label={linePoints:p,x:h,y:f,verticalAlign:"middle",textAlign:c,inside:v}})}function sw(a,e){a.eachSeriesByType("funnel",function(t){var r=t.getData(),i=r.mapDimension("value"),n=t.get("sort"),o=iw(t,e),s=t.get("orient"),l=o.width,u=o.height,v=nw(r,n),c=o.x,h=o.y,f=s==="horizontal"?[G(t.get("minSize"),u),G(t.get("maxSize"),u)]:[G(t.get("minSize"),l),G(t.get("maxSize"),l)],p=r.getDataExtent(i),d=t.get("min"),g=t.get("max");d==null&&(d=Math.min(p[0],0)),g==null&&(g=p[1]);var y=t.get("funnelAlign"),m=t.get("gap"),x=s==="horizontal"?l:u,S=(x-m*(r.count()-1))/r.count(),_=function(P,R){if(s==="horizontal"){var E=r.get(i,P)||0,N=vt(E,[d,g],f,!0),V=void 0;switch(y){case"top":V=h;break;case"center":V=h+(u-N)/2;break;case"bottom":V=h+(u-N);break}return[[R,V],[R,V+N]]}var O=r.get(i,P)||0,W=vt(O,[d,g],f,!0),Z;switch(y){case"left":Z=c;break;case"center":Z=c+(l-W)/2;break;case"right":Z=c+l-W;break}return[[Z,R],[Z+W,R]]};n==="ascending"&&(S=-S,m=-m,s==="horizontal"?c+=l:h+=u,v=v.reverse());for(var b=0;b<v.length;b++){var w=v[b],A=v[b+1],T=r.getItemModel(w);if(s==="horizontal"){var D=T.get(["itemStyle","width"]);D==null?D=S:(D=G(D,l),n==="ascending"&&(D=-D));var I=_(w,c),L=_(A,c+D);c+=D+m,r.setItemLayout(w,{points:I.concat(L.slice().reverse())})}else{var M=T.get(["itemStyle","height"]);M==null?M=S:(M=G(M,u),n==="ascending"&&(M=-M));var I=_(w,h),L=_(A,h+M);h+=M+m,r.setItemLayout(w,{points:I.concat(L.slice().reverse())})}}ow(r)})}function lw(a){a.registerChartView(ew),a.registerSeriesModel(aw),a.registerLayout(sw),a.registerProcessor(ri("funnel"))}var uw=.3,vw=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._dataGroup=new U,t._initialized=!1,t}return e.prototype.init=function(){this.group.add(this._dataGroup)},e.prototype.render=function(t,r,i,n){this._progressiveEls=null;var o=this._dataGroup,s=t.getData(),l=this._data,u=t.coordinateSystem,v=u.dimensions,c=pc(t);s.diff(l).add(h).update(f).remove(p).execute();function h(g){var y=fc(s,o,g,v,u);Do(y,s,g,c)}function f(g,y){var m=l.getItemGraphicEl(y),x=Gd(s,g,v,u);s.setItemGraphicEl(g,m),ot(m,{shape:{points:x}},t,g),pe(m),Do(m,s,g,c)}function p(g){var y=l.getItemGraphicEl(g);o.remove(y)}if(!this._initialized){this._initialized=!0;var d=cw(u,t,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(d)}this._data=s},e.prototype.incrementalPrepareRender=function(t,r,i){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},e.prototype.incrementalRender=function(t,r,i){for(var n=r.getData(),o=r.coordinateSystem,s=o.dimensions,l=pc(r),u=this._progressiveEls=[],v=t.start;v<t.end;v++){var c=fc(n,this._dataGroup,v,s,o);c.incremental=!0,Do(c,n,v,l),u.push(c)}},e.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},e.type="parallel",e}(xt);function cw(a,e,t){var r=a.model,i=a.getRect(),n=new ct({shape:{x:i.x,y:i.y,width:i.width,height:i.height}}),o=r.get("layout")==="horizontal"?"width":"height";return n.setShape(o,0),wt(n,{shape:{width:i.width,height:i.height}},e,t),n}function Gd(a,e,t,r){for(var i=[],n=0;n<t.length;n++){var o=t[n],s=a.get(a.mapDimension(o),e);hw(s,r.getAxis(o).type)||i.push(r.dataToPoint(s,o))}return i}function fc(a,e,t,r,i){var n=Gd(a,t,r,i),o=new me({shape:{points:n},z2:10});return e.add(o),a.setItemGraphicEl(t,o),o}function pc(a){var e=a.get("smooth",!0);return e===!0&&(e=uw),e=km(e),gp(e)&&(e=0),{smooth:e}}function Do(a,e,t,r){a.useStyle(e.getItemVisual(t,"style")),a.style.fill=null,a.setShape("smooth",r.smooth);var i=e.getItemModel(t),n=i.getModel("emphasis");$t(a,i,"lineStyle"),bt(a,n.get("focus"),n.get("blurScope"),n.get("disabled"))}function hw(a,e){return e==="category"?a==null:a==null||isNaN(a)}const fw=vw;var pw=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.getInitialData=function(t,r){return ze(null,this,{useEncodeDefaulter:$(dw,null,this)})},e.prototype.getRawIndicesByActiveState=function(t){var r=this.coordinateSystem,i=this.getData(),n=[];return r.eachActiveState(i,function(o,s){t===o&&n.push(i.getRawIndex(s))}),n},e.type="series.parallel",e.dependencies=["parallel"],e.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},e}(At);function dw(a){var e=a.ecModel.getComponent("parallel",a.get("parallelIndex"));if(!!e){var t={};return C(e.dimensions,function(r){var i=gw(r);t[r]=i}),t}}function gw(a){return+a.replace("dim","")}const yw=pw;var mw=["lineStyle","opacity"],xw={seriesType:"parallel",reset:function(a,e){var t=a.coordinateSystem,r={normal:a.get(["lineStyle","opacity"]),active:a.get("activeOpacity"),inactive:a.get("inactiveOpacity")};return{progress:function(i,n){t.eachActiveState(n,function(o,s){var l=r[o];if(o==="normal"&&n.hasItemOption){var u=n.getItemModel(s).get(mw,!0);u!=null&&(l=u)}var v=n.ensureUniqueItemVisual(s,"style");v.opacity=l},i.start,i.end)}}}};const Sw=xw;function bw(a){_w(a),ww(a)}function _w(a){if(!a.parallel){var e=!1;C(a.series,function(t){t&&t.type==="parallel"&&(e=!0)}),e&&(a.parallel=[{}])}}function ww(a){var e=jt(a.parallelAxis);C(e,function(t){if(!!St(t)){var r=t.parallelIndex||0,i=jt(a.parallel)[r];i&&i.parallelAxisDefault&&ft(t,i.parallelAxisDefault,!1)}})}var Aw=5,Tw=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){this._model=t,this._api=i,this._handlers||(this._handlers={},C(Cw,function(n,o){i.getZr().on(o,this._handlers[o]=$(n,this))},this)),sa(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},e.prototype.dispose=function(t,r){ka(this,"_throttledDispatchExpand"),C(this._handlers,function(i,n){r.getZr().off(n,i)}),this._handlers=null},e.prototype._throttledDispatchExpand=function(t){this._dispatchExpand(t)},e.prototype._dispatchExpand=function(t){t&&this._api.dispatchAction(H({type:"parallelAxisExpand"},t))},e.type="parallel",e}(Et),Cw={mousedown:function(a){Io(this,"click")&&(this._mouseDownPoint=[a.offsetX,a.offsetY])},mouseup:function(a){var e=this._mouseDownPoint;if(Io(this,"click")&&e){var t=[a.offsetX,a.offsetY],r=Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2);if(r>Aw)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([a.offsetX,a.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(a){if(!(this._mouseDownPoint||!Io(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([a.offsetX,a.offsetY]),r=t.behavior;r==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(r==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:r==="jump"?null:{duration:0}})}}};function Io(a,e){var t=a._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}const Dw=Tw;var Iw=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){a.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var r=this.option;t&&ft(r,t,!0),this._initDimensions()},e.prototype.contains=function(t,r){var i=t.get("parallelIndex");return i!=null&&r.getComponent("parallel",i)===this},e.prototype.setAxisExpand=function(t){C(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(r){t.hasOwnProperty(r)&&(this.option[r]=t[r])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],r=this.parallelAxisIndex=[],i=te(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(n){return(n.get("parallelIndex")||0)===this.componentIndex},this);C(i,function(n){t.push("dim"+n.get("dim")),r.push(n.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(It);const Lw=Iw;var Mw=function(a){k(e,a);function e(t,r,i,n,o){var s=a.call(this,t,r,i)||this;return s.type=n||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(xe);const Pw=Mw;function Dr(a,e,t,r,i,n){a=a||0;var o=t[1]-t[0];if(i!=null&&(i=Pr(i,[0,o])),n!=null&&(n=Math.max(n,i!=null?i:0)),r==="all"){var s=Math.abs(e[1]-e[0]);s=Pr(s,[0,o]),i=n=Pr(s,[i,n]),r=0}e[0]=Pr(e[0],t),e[1]=Pr(e[1],t);var l=Lo(e,r);e[r]+=a;var u=i||0,v=t.slice();l.sign<0?v[0]+=u:v[1]-=u,e[r]=Pr(e[r],v);var c;return c=Lo(e,r),i!=null&&(c.sign!==l.sign||c.span<i)&&(e[1-r]=e[r]+l.sign*i),c=Lo(e,r),n!=null&&c.span>n&&(e[1-r]=e[r]+c.sign*n),e}function Lo(a,e){var t=a[e]-a[1-e];return{span:Math.abs(t),sign:t>0?-1:t<0?1:e?-1:1}}function Pr(a,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,a))}var Mo=C,Fd=Math.min,Hd=Math.max,dc=Math.floor,Rw=Math.ceil,gc=Ae,kw=Math.PI,Ew=function(){function a(e,t,r){this.type="parallel",this._axesMap=it(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,r)}return a.prototype._init=function(e,t,r){var i=e.dimensions,n=e.parallelAxisIndex;Mo(i,function(o,s){var l=n[s],u=t.getComponent("parallelAxis",l),v=this._axesMap.set(o,new Pw(o,wn(u),[0,0],u.get("type"),l)),c=v.type==="category";v.onBand=c&&u.get("boundaryGap"),v.inverse=u.get("inverse"),u.axis=v,v.model=u,v.coordinateSystem=u.coordinateSystem=this},this)},a.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},a.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),r=t.axisBase,i=t.layoutBase,n=t.pixelDimIndex,o=e[1-n],s=e[n];return o>=r&&o<=r+t.axisLength&&s>=i&&s<=i+t.layoutLength},a.prototype.getModel=function(){return this._model},a.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(r){if(!!e.contains(r,t)){var i=r.getData();Mo(this.dimensions,function(n){var o=this._axesMap.get(n);o.scale.unionExtentFromData(i,i.mapDimension(n)),qr(o.scale,o.model)},this)}},this)},a.prototype.resize=function(e,t){this._rect=Bt(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},a.prototype.getRect=function(){return this._rect},a.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,r=["x","y"],i=["width","height"],n=e.get("layout"),o=n==="horizontal"?0:1,s=t[i[o]],l=[0,s],u=this.dimensions.length,v=xi(e.get("axisExpandWidth"),l),c=xi(e.get("axisExpandCount")||0,[0,u]),h=e.get("axisExpandable")&&u>3&&u>c&&c>1&&v>0&&s>0,f=e.get("axisExpandWindow"),p;if(f)p=xi(f[1]-f[0],l),f[1]=f[0]+p;else{p=xi(v*(c-1),l);var d=e.get("axisExpandCenter")||dc(u/2);f=[v*d-p/2],f[1]=f[0]+p}var g=(s-p)/(u-c);g<3&&(g=0);var y=[dc(gc(f[0]/v,1))+1,Rw(gc(f[1]/v,1))-1],m=g/v*f[0];return{layout:n,pixelDimIndex:o,layoutBase:t[r[o]],layoutLength:s,axisBase:t[r[1-o]],axisLength:t[i[1-o]],axisExpandable:h,axisExpandWidth:v,axisCollapseWidth:g,axisExpandWindow:f,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:m}},a.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,r=this.dimensions,i=this._makeLayoutInfo(),n=i.layout;t.each(function(o){var s=[0,i.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),Mo(r,function(o,s){var l=(i.axisExpandable?Nw:Vw)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},v={horizontal:kw/2,vertical:0},c=[u[n].x+e.x,u[n].y+e.y],h=v[n],f=Tr();oa(f,f,h),Je(f,f,c),this._axesLayout[o]={position:c,rotation:h,transform:f,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},a.prototype.getAxis=function(e){return this._axesMap.get(e)},a.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},a.prototype.eachActiveState=function(e,t,r,i){r==null&&(r=0),i==null&&(i=e.count());var n=this._axesMap,o=this.dimensions,s=[],l=[];C(o,function(g){s.push(e.mapDimension(g)),l.push(n.get(g).model)});for(var u=this.hasAxisBrushed(),v=r;v<i;v++){var c=void 0;if(!u)c="normal";else{c="active";for(var h=e.getValues(s,v),f=0,p=o.length;f<p;f++){var d=l[f].getActiveState(h[f]);if(d==="inactive"){c="inactive";break}}}t(c,v)}},a.prototype.hasAxisBrushed=function(){for(var e=this.dimensions,t=this._axesMap,r=!1,i=0,n=e.length;i<n;i++)t.get(e[i]).model.getActiveState()!=="normal"&&(r=!0);return r},a.prototype.axisCoordToPoint=function(e,t){var r=this._axesLayout[t];return Me([e,0],r.transform)},a.prototype.getAxisLayout=function(e){return nt(this._axesLayout[e])},a.prototype.getSlidedAxisExpandWindow=function(e){var t=this._makeLayoutInfo(),r=t.pixelDimIndex,i=t.axisExpandWindow.slice(),n=i[1]-i[0],o=[0,t.axisExpandWidth*(t.axisCount-1)];if(!this.containPoint(e))return{behavior:"none",axisExpandWindow:i};var s=e[r]-t.layoutBase-t.axisExpandWindow0Pos,l,u="slide",v=t.axisCollapseWidth,c=this._model.get("axisExpandSlideTriggerArea"),h=c[0]!=null;if(v)h&&v&&s<n*c[0]?(u="jump",l=s-n*c[2]):h&&v&&s>n*(1-c[0])?(u="jump",l=s-n*(1-c[2])):(l=s-n*c[1])>=0&&(l=s-n*(1-c[1]))<=0&&(l=0),l*=t.axisExpandWidth/v,l?Dr(l,i,o,"all"):u="none";else{var f=i[1]-i[0],p=o[1]*s/f;i=[Hd(0,p-f/2)],i[1]=Fd(o[1],i[0]+f),i[0]=i[1]-f}return{axisExpandWindow:i,behavior:u}},a}();function xi(a,e){return Fd(Hd(a,e[0]),e[1])}function Vw(a,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*a,axisNameAvailableWidth:t,axisLabelShow:!0}}function Nw(a,e){var t=e.layoutLength,r=e.axisExpandWidth,i=e.axisCount,n=e.axisCollapseWidth,o=e.winInnerIndices,s,l=n,u=!1,v;return a<o[0]?(s=a*n,v=n):a<=o[1]?(s=e.axisExpandWindow0Pos+a*r-e.axisExpandWindow[0],l=r,u=!0):(s=t-(i-1-a)*n,v=n),{position:s,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:v}}const Ow=Ew;function zw(a,e){var t=[];return a.eachComponent("parallel",function(r,i){var n=new Ow(r,a,e);n.name="parallel_"+i,n.resize(r,e),r.coordinateSystem=n,n.model=r,t.push(n)}),a.eachSeries(function(r){if(r.get("coordinateSystem")==="parallel"){var i=r.getReferringComponents("parallel",ee).models[0];r.coordinateSystem=i.coordinateSystem}}),t}var Bw={create:zw};const Gw=Bw;var Wd=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.activeIntervals=[],t}return e.prototype.getAreaSelectStyle=function(){return fp([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},e.prototype.setActiveIntervals=function(t){var r=this.activeIntervals=nt(t);if(r)for(var i=r.length-1;i>=0;i--)ue(r[i])},e.prototype.getActiveState=function(t){var r=this.activeIntervals;if(!r.length)return"normal";if(t==null||isNaN(+t))return"inactive";if(r.length===1){var i=r[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,o=r.length;n<o;n++)if(r[n][0]<=t&&t<=r[n][1])return"active";return"inactive"},e}(It);Te(Wd,Xa);const yc=Wd;var _r=!0,Ha=Math.min,ea=Math.max,Fw=Math.pow,Hw=1e4,Ww=6,$w=6,mc="globalPan",Zw={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},Uw={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},xc={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},Yw=0,Xw=function(a){k(e,a);function e(t){var r=a.call(this)||this;return r._track=[],r._covers=[],r._handlers={},dt(t),r._zr=t,r.group=new U,r._uid="brushController_"+Yw++,C(eA,function(i,n){this._handlers[n]=$(i,this)},r),r}return e.prototype.enableBrush=function(t){return dt(this._mounted),this._brushType&&this._doDisableBrush(),t.brushType&&this._doEnableBrush(t),this},e.prototype._doEnableBrush=function(t){var r=this._zr;this._enableGlobalPan||p1(r,mc,this._uid),C(this._handlers,function(i,n){r.on(n,i)}),this._brushType=t.brushType,this._brushOption=ft(nt(xc),t,!0)},e.prototype._doDisableBrush=function(){var t=this._zr;d1(t,mc,this._uid),C(this._handlers,function(r,i){t.off(i,r)}),this._brushType=this._brushOption=null},e.prototype.setPanels=function(t){if(t&&t.length){var r=this._panels={};C(t,function(i){r[i.panelId]=nt(i)})}else this._panels=null;return this},e.prototype.mount=function(t){t=t||{},this._mounted=!0,this._enableGlobalPan=t.enableGlobalPan;var r=this.group;return this._zr.add(r),r.attr({x:t.x||0,y:t.y||0,rotation:t.rotation||0,scaleX:t.scaleX||1,scaleY:t.scaleY||1}),this._transform=r.getLocalTransform(),this},e.prototype.updateCovers=function(t){dt(this._mounted),t=z(t,function(h){return ft(nt(xc),h,!0)});var r="\0-brush-index-",i=this._covers,n=this._covers=[],o=this,s=this._creatingCover;return new Qe(i,t,u,l).add(v).update(v).remove(c).execute(),this;function l(h,f){return(h.id!=null?h.id:r+f)+"-"+h.brushType}function u(h,f){return l(h.__brushOption,f)}function v(h,f){var p=t[h];if(f!=null&&i[f]===s)n[h]=i[f];else{var d=n[h]=f!=null?(i[f].__brushOption=p,i[f]):Zd(o,$d(o,p));Cl(o,d)}}function c(h){i[h]!==s&&o.group.remove(i[h])}},e.prototype.unmount=function(){if(!!this._mounted)return this.enableBrush(!1),Ps(this),this._zr.remove(this.group),this._mounted=!1,this},e.prototype.dispose=function(){this.unmount(),this.off()},e}(np);function $d(a,e){var t=zn[e.brushType].createCover(a,e);return t.__brushOption=e,Yd(t,e),a.group.add(t),t}function Zd(a,e){var t=Dl(e);return t.endCreating&&(t.endCreating(a,e),Yd(e,e.__brushOption)),e}function Ud(a,e){var t=e.__brushOption;Dl(e).updateCoverShape(a,e,t.range,t)}function Yd(a,e){var t=e.z;t==null&&(t=Hw),a.traverse(function(r){r.z=t,r.z2=t})}function Cl(a,e){Dl(e).updateCommon(a,e),Ud(a,e)}function Dl(a){return zn[a.__brushOption.brushType]}function Il(a,e,t){var r=a._panels;if(!r)return _r;var i,n=a._transform;return C(r,function(o){o.isTargetByCursor(e,t,n)&&(i=o)}),i}function Xd(a,e){var t=a._panels;if(!t)return _r;var r=e.__brushOption.panelId;return r!=null?t[r]:_r}function Ps(a){var e=a._covers,t=e.length;return C(e,function(r){a.group.remove(r)},a),e.length=0,!!t}function wr(a,e){var t=z(a._covers,function(r){var i=r.__brushOption,n=nt(i.range);return{brushType:i.brushType,panelId:i.panelId,range:n}});a.trigger("brush",{areas:t,isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function Kw(a){var e=a._track;if(!e.length)return!1;var t=e[e.length-1],r=e[0],i=t[0]-r[0],n=t[1]-r[1],o=Fw(i*i+n*n,.5);return o>Ww}function Kd(a){var e=a.length-1;return e<0&&(e=0),[a[0],a[e]]}function qd(a,e,t,r){var i=new U;return i.add(new ct({name:"main",style:Ll(t),silent:!0,draggable:!0,cursor:"move",drift:q(Sc,a,e,i,["n","s","w","e"]),ondragend:q(wr,e,{isEnd:!0})})),C(r,function(n){i.add(new ct({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:q(Sc,a,e,i,n),ondragend:q(wr,e,{isEnd:!0})}))}),i}function jd(a,e,t,r){var i=r.brushStyle.lineWidth||0,n=ea(i,$w),o=t[0][0],s=t[1][0],l=o-i/2,u=s-i/2,v=t[0][1],c=t[1][1],h=v-n+i/2,f=c-n+i/2,p=v-o,d=c-s,g=p+i,y=d+i;De(a,e,"main",o,s,p,d),r.transformable&&(De(a,e,"w",l,u,n,y),De(a,e,"e",h,u,n,y),De(a,e,"n",l,u,g,n),De(a,e,"s",l,f,g,n),De(a,e,"nw",l,u,n,n),De(a,e,"ne",h,u,n,n),De(a,e,"sw",l,f,n,n),De(a,e,"se",h,f,n,n))}function Rs(a,e){var t=e.__brushOption,r=t.transformable,i=e.childAt(0);i.useStyle(Ll(t)),i.attr({silent:!r,cursor:r?"move":"default"}),C([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(n){var o=e.childOfName(n.join("")),s=n.length===1?ks(a,n[0]):jw(a,n);o&&o.attr({silent:!r,invisible:!r,cursor:r?Uw[s]+"-resize":null})})}function De(a,e,t,r,i,n,o){var s=e.childOfName(t);s&&s.setShape(Qw(Ml(a,e,[[r,i],[r+n,i+o]])))}function Ll(a){return j({strokeNoScale:!0},a.brushStyle)}function Jd(a,e,t,r){var i=[Ha(a,t),Ha(e,r)],n=[ea(a,t),ea(e,r)];return[[i[0],n[0]],[i[1],n[1]]]}function qw(a){return Wr(a.group)}function ks(a,e){var t={w:"left",e:"right",n:"top",s:"bottom"},r={left:"w",right:"e",top:"n",bottom:"s"},i=nl(t[e],qw(a));return r[i]}function jw(a,e){var t=[ks(a,e[0]),ks(a,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function Sc(a,e,t,r,i,n){var o=t.__brushOption,s=a.toRectRange(o.range),l=Qd(e,i,n);C(r,function(u){var v=Zw[u];s[v[0]][v[1]]+=l[v[0]]}),o.range=a.fromRectRange(Jd(s[0][0],s[1][0],s[0][1],s[1][1])),Cl(e,t),wr(e,{isEnd:!1})}function Jw(a,e,t,r){var i=e.__brushOption.range,n=Qd(a,t,r);C(i,function(o){o[0]+=n[0],o[1]+=n[1]}),Cl(a,e),wr(a,{isEnd:!1})}function Qd(a,e,t){var r=a.group,i=r.transformCoordToLocal(e,t),n=r.transformCoordToLocal(0,0);return[i[0]-n[0],i[1]-n[1]]}function Ml(a,e,t){var r=Xd(a,e);return r&&r!==_r?r.clipPath(t,a._transform):nt(t)}function Qw(a){var e=Ha(a[0][0],a[1][0]),t=Ha(a[0][1],a[1][1]),r=ea(a[0][0],a[1][0]),i=ea(a[0][1],a[1][1]);return{x:e,y:t,width:r-e,height:i-t}}function tA(a,e,t){if(!(!a._brushType||rA(a,e.offsetX,e.offsetY))){var r=a._zr,i=a._covers,n=Il(a,e,t);if(!a._dragging)for(var o=0;o<i.length;o++){var s=i[o].__brushOption;if(n&&(n===_r||s.panelId===n.panelId)&&zn[s.brushType].contain(i[o],t[0],t[1]))return}n&&r.setCursorStyle("crosshair")}}function Es(a){var e=a.event;e.preventDefault&&e.preventDefault()}function Vs(a,e,t){return a.childOfName("main").contain(e,t)}function tg(a,e,t,r){var i=a._creatingCover,n=a._creatingPanel,o=a._brushOption,s;if(a._track.push(t.slice()),Kw(a)||i){if(n&&!i){o.brushMode==="single"&&Ps(a);var l=nt(o);l.brushType=bc(l.brushType,n),l.panelId=n===_r?null:n.panelId,i=a._creatingCover=$d(a,l),a._covers.push(i)}if(i){var u=zn[bc(a._brushType,n)],v=i.__brushOption;v.range=u.getCreatingRange(Ml(a,i,a._track)),r&&(Zd(a,i),u.updateCommon(a,i)),Ud(a,i),s={isEnd:r}}}else r&&o.brushMode==="single"&&o.removeOnClick&&Il(a,e,t)&&Ps(a)&&(s={isEnd:r,removeOnClick:!0});return s}function bc(a,e){return a==="auto"?(dt(e&&e.defaultBrushType,'MUST have defaultBrushType when brushType is "atuo"'),e.defaultBrushType):a}var eA={mousedown:function(a){if(this._dragging)_c(this,a);else if(!a.target||!a.target.draggable){Es(a);var e=this.group.transformCoordToLocal(a.offsetX,a.offsetY);this._creatingCover=null;var t=this._creatingPanel=Il(this,a,e);t&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(a){var e=a.offsetX,t=a.offsetY,r=this.group.transformCoordToLocal(e,t);if(tA(this,a,r),this._dragging){Es(a);var i=tg(this,a,r,!1);i&&wr(this,i)}},mouseup:function(a){_c(this,a)}};function _c(a,e){if(a._dragging){Es(e);var t=e.offsetX,r=e.offsetY,i=a.group.transformCoordToLocal(t,r),n=tg(a,e,i,!0);a._dragging=!1,a._track=[],a._creatingCover=null,n&&wr(a,n)}}function rA(a,e,t){var r=a._zr;return e<0||e>r.getWidth()||t<0||t>r.getHeight()}var zn={lineX:wc(0),lineY:wc(1),rect:{createCover:function(a,e){function t(r){return r}return qd({toRectRange:t,fromRectRange:t},a,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(a){var e=Kd(a);return Jd(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(a,e,t,r){jd(a,e,t,r)},updateCommon:Rs,contain:Vs},polygon:{createCover:function(a,e){var t=new U;return t.add(new me({name:"main",style:Ll(e),silent:!0})),t},getCreatingRange:function(a){return a},endCreating:function(a,e){e.remove(e.childAt(0)),e.add(new ce({name:"main",draggable:!0,drift:q(Jw,a,e),ondragend:q(wr,a,{isEnd:!0})}))},updateCoverShape:function(a,e,t,r){e.childAt(0).setShape({points:Ml(a,e,t)})},updateCommon:Rs,contain:Vs}};function wc(a){return{createCover:function(e,t){return qd({toRectRange:function(r){var i=[r,[0,100]];return a&&i.reverse(),i},fromRectRange:function(r){return r[a]}},e,t,[[["w"],["e"]],[["n"],["s"]]][a])},getCreatingRange:function(e){var t=Kd(e),r=Ha(t[0][a],t[1][a]),i=ea(t[0][a],t[1][a]);return[r,i]},updateCoverShape:function(e,t,r,i){var n,o=Xd(e,t);if(o!==_r&&o.getLinearBrushOtherExtent)n=o.getLinearBrushOtherExtent(a);else{var s=e._zr;n=[0,[s.getWidth(),s.getHeight()][1-a]]}var l=[r,n];a&&l.reverse(),jd(e,t,l,i)},updateCommon:Rs,contain:Vs}}const Pl=Xw;function eg(a){return a=Rl(a),function(e){return Em(e,a)}}function rg(a,e){return a=Rl(a),function(t){var r=e!=null?e:t,i=r?a.width:a.height,n=r?a.x:a.y;return[n,n+(i||0)]}}function ag(a,e,t){var r=Rl(a);return function(i,n){return r.contain(n[0],n[1])&&!En(i,e,t)}}function Rl(a){return zt.create(a)}var aA=["axisLine","axisTickLabel","axisName"],iA=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r){a.prototype.init.apply(this,arguments),(this._brushController=new Pl(r.getZr())).on("brush",$(this._onBrush,this))},e.prototype.render=function(t,r,i,n){if(!nA(t,r,n)){this.axisModel=t,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new U,this.group.add(this._axisGroup),!!t.get("show")){var s=sA(t,r),l=s.coordinateSystem,u=t.getAreaSelectStyle(),v=u.width,c=t.axis.dim,h=l.getAxisLayout(c),f=H({strokeContainThreshold:v},h),p=new Ne(t,f);C(aA,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(f,u,t,s,v,i),An(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,r,i,n,o,s){var l=i.axis.getExtent(),u=l[1]-l[0],v=Math.min(30,Math.abs(u)*.1),c=zt.create({x:l[0],y:-o/2,width:u,height:o});c.x-=v,c.width+=2*v,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:eg(c),isTargetByCursor:ag(c,s,n),getLinearBrushOtherExtent:rg(c,0)}]).enableBrush({brushType:"lineX",brushStyle:r,removeOnClick:!0}).updateCovers(oA(i))},e.prototype._onBrush=function(t){var r=t.areas,i=this.axisModel,n=i.axis,o=z(r,function(s){return[n.coordToData(s.range[0],!0),n.coordToData(s.range[1],!0)]});(!i.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(Et);function nA(a,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===a}function oA(a){var e=a.axis;return z(a.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function sA(a,e){return e.getComponent("parallel",a.get("parallelIndex"))}const lA=iA;var uA={type:"axisAreaSelect",event:"axisAreaSelected"};function vA(a){a.registerAction(uA,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(r){r.axis.model.setActiveIntervals(e.intervals)})}),a.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(r){r.setAxisExpand(e)})})}var cA={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function ig(a){a.registerComponentView(Dw),a.registerComponentModel(Lw),a.registerCoordinateSystem("parallel",Gw),a.registerPreprocessor(bw),a.registerComponentModel(yc),a.registerComponentView(lA),ta(a,"parallel",yc,cA),vA(a)}function hA(a){J(ig),a.registerChartView(fw),a.registerSeriesModel(yw),a.registerVisual(a.PRIORITY.VISUAL.BRUSH,Sw)}var fA=function(){function a(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return a}(),pA=function(a){k(e,a);function e(t){return a.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new fA},e.prototype.buildPath=function(t,r){var i=r.extent;t.moveTo(r.x1,r.y1),t.bezierCurveTo(r.cpx1,r.cpy1,r.cpx2,r.cpy2,r.x2,r.y2),r.orient==="vertical"?(t.lineTo(r.x2+i,r.y2),t.bezierCurveTo(r.cpx2+i,r.cpy2,r.cpx1+i,r.cpy1,r.x1+i,r.y1)):(t.lineTo(r.x2,r.y2+i),t.bezierCurveTo(r.cpx2,r.cpy2+i,r.cpx1,r.cpy1+i,r.x1,r.y1+i)),t.closePath()},e.prototype.highlight=function(){dr(this)},e.prototype.downplay=function(){gr(this)},e}(Dt),dA=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._focusAdjacencyDisabled=!1,t}return e.prototype.render=function(t,r,i){var n=this,o=t.getGraph(),s=this.group,l=t.layoutInfo,u=l.width,v=l.height,c=t.getData(),h=t.getData("edge"),f=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(p){var d=new pA,g=tt(d);g.dataIndex=p.dataIndex,g.seriesIndex=t.seriesIndex,g.dataType="edge";var y=p.getModel(),m=y.getModel("lineStyle"),x=m.get("curveness"),S=p.node1.getLayout(),_=p.node1.getModel(),b=_.get("localX"),w=_.get("localY"),A=p.node2.getLayout(),T=p.node2.getModel(),D=T.get("localX"),I=T.get("localY"),L=p.getLayout(),M,P,R,E,N,V,O,W;switch(d.shape.extent=Math.max(1,L.dy),d.shape.orient=f,f==="vertical"?(M=(b!=null?b*u:S.x)+L.sy,P=(w!=null?w*v:S.y)+S.dy,R=(D!=null?D*u:A.x)+L.ty,E=I!=null?I*v:A.y,N=M,V=P*(1-x)+E*x,O=R,W=P*x+E*(1-x)):(M=(b!=null?b*u:S.x)+S.dx,P=(w!=null?w*v:S.y)+L.sy,R=D!=null?D*u:A.x,E=(I!=null?I*v:A.y)+L.ty,N=M*(1-x)+R*x,V=P,O=M*x+R*(1-x),W=E),d.setShape({x1:M,y1:P,x2:R,y2:E,cpx1:N,cpy1:V,cpx2:O,cpy2:W}),d.useStyle(m.getItemStyle()),d.style.fill){case"source":d.style.fill=p.node1.getVisual("color"),d.style.decal=p.node1.getVisual("style").decal;break;case"target":d.style.fill=p.node2.getVisual("color"),d.style.decal=p.node2.getVisual("style").decal;break;case"gradient":var Z=p.node1.getVisual("color"),X=p.node2.getVisual("color");K(Z)&&K(X)&&(d.style.fill=new mn(0,0,+(f==="horizontal"),+(f==="vertical"),[{color:Z,offset:0},{color:X,offset:1}]))}var Q=y.getModel("emphasis");$t(d,y,"lineStyle",function(gt){return gt.getItemStyle()}),s.add(d),h.setItemGraphicEl(p.dataIndex,d);var at=Q.get("focus");bt(d,at==="adjacency"?p.getAdjacentDataIndices():at,Q.get("blurScope"),Q.get("disabled")),tt(d).dataType="edge"}),o.eachNode(function(p){var d=p.getLayout(),g=p.getModel(),y=g.get("localX"),m=g.get("localY"),x=g.getModel("emphasis"),S=new ct({shape:{x:y!=null?y*u:d.x,y:m!=null?m*v:d.y,width:d.dx,height:d.dy},style:g.getModel("itemStyle").getItemStyle(),z2:10});Yt(S,Ht(g),{labelFetcher:t,labelDataIndex:p.dataIndex,defaultText:p.id}),S.disableLabelAnimation=!0,S.setStyle("fill",p.getVisual("color")),S.setStyle("decal",p.getVisual("style").decal),$t(S,g),s.add(S),c.setItemGraphicEl(p.dataIndex,S),tt(S).dataType="node";var _=x.get("focus");bt(S,_==="adjacency"?p.getAdjacentDataIndices():_,x.get("blurScope"),x.get("disabled"))}),c.eachItemGraphicEl(function(p,d){var g=c.getItemModel(d);g.get("draggable")&&(p.drift=function(y,m){n._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=m,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:c.getRawIndex(d),localX:this.shape.x/u,localY:this.shape.y/v})},p.ondragend=function(){n._focusAdjacencyDisabled=!1},p.draggable=!0,p.cursor="move")}),!this._data&&t.isAnimationEnabled()&&s.setClipPath(gA(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(xt);function gA(a,e,t){var r=new ct({shape:{x:a.x-10,y:a.y-10,width:0,height:a.height+20}});return wt(r,{shape:{width:a.width+20}},e,t),r}const yA=dA;var mA=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,r){var i=t.edges||t.links,n=t.data||t.nodes,o=t.levels;this.levelModels=[];for(var s=this.levelModels,l=0;l<o.length;l++)if(o[l].depth!=null&&o[l].depth>=0)s[o[l].depth]=new Pt(o[l],this,r);else throw new Error("levels[i].depth is mandatory and should be natural number");if(n&&i){var u=Bd(n,i,this,!0,v);return u.data}function v(c,h){c.wrapMethod("getItemModel",function(f,p){var d=f.parentModel,g=d.getData().getItemLayout(p);if(g){var y=g.depth,m=d.levelModels[y];m&&(f.parentModel=m)}return f}),h.wrapMethod("getItemModel",function(f,p){var d=f.parentModel,g=d.getGraph().getEdgeByIndex(p),y=g.node1.getLayout();if(y){var m=y.depth,x=d.levelModels[m];x&&(f.parentModel=x)}return f})}},e.prototype.setNodePosition=function(t,r){var i=this.option.data||this.option.nodes,n=i[t];n.localX=r[0],n.localY=r[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,r,i){function n(f){return isNaN(f)||f==null}if(i==="edge"){var o=this.getDataParams(t,i),s=o.data,l=o.value,u=s.source+" -- "+s.target;return Ut("nameValue",{name:u,value:l,noValue:n(l)})}else{var v=this.getGraph().getNodeByIndex(t),c=v.getLayout().value,h=this.getDataParams(t,i).data.name;return Ut("nameValue",{name:h!=null?h+"":null,value:c,noValue:n(c)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,r){var i=a.prototype.getDataParams.call(this,t,r);if(i.value==null&&r==="node"){var n=this.getGraph().getNodeByIndex(t),o=n.getLayout().value;i.value=o}return i},e.type="series.sankey",e.defaultOption={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},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}(At);const xA=mA;function SA(a,e){a.eachSeriesByType("sankey",function(t){var r=t.get("nodeWidth"),i=t.get("nodeGap"),n=bA(t,e);t.layoutInfo=n;var o=n.width,s=n.height,l=t.getGraph(),u=l.nodes,v=l.edges;wA(u);var c=te(u,function(d){return d.getLayout().value===0}),h=c.length!==0?0:t.get("layoutIterations"),f=t.get("orient"),p=t.get("nodeAlign");_A(u,v,r,i,o,s,h,f,p)})}function bA(a,e){return Bt(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function _A(a,e,t,r,i,n,o,s,l){AA(a,e,t,i,n,s,l),IA(a,e,n,i,r,o,s),OA(a,s)}function wA(a){C(a,function(e){var t=qe(e.outEdges,tn),r=qe(e.inEdges,tn),i=e.getValue()||0,n=Math.max(t,r,i);e.setLayout({value:n},!0)})}function AA(a,e,t,r,i,n,o){for(var s=[],l=[],u=[],v=[],c=0,h=0;h<e.length;h++)s[h]=1;for(var h=0;h<a.length;h++)l[h]=a[h].inEdges.length,l[h]===0&&u.push(a[h]);for(var f=-1;u.length;){for(var p=0;p<u.length;p++){var d=u[p],g=d.hostGraph.data.getRawDataItem(d.dataIndex),y=g.depth!=null&&g.depth>=0;y&&g.depth>f&&(f=g.depth),d.setLayout({depth:y?g.depth:c},!0),n==="vertical"?d.setLayout({dy:t},!0):d.setLayout({dx:t},!0);for(var m=0;m<d.outEdges.length;m++){var x=d.outEdges[m],S=e.indexOf(x);s[S]=0;var _=x.node2,b=a.indexOf(_);--l[b]===0&&v.indexOf(_)<0&&v.push(_)}}++c,u=v,v=[]}for(var h=0;h<s.length;h++)if(s[h]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var w=f>c-1?f:c-1;o&&o!=="left"&&TA(a,o,n,w);var A=n==="vertical"?(i-t)/w:(r-t)/w;DA(a,A,n)}function ng(a){var e=a.hostGraph.data.getRawDataItem(a.dataIndex);return e.depth!=null&&e.depth>=0}function TA(a,e,t,r){if(e==="right"){for(var i=[],n=a,o=0;n.length;){for(var s=0;s<n.length;s++){var l=n[s];l.setLayout({skNodeHeight:o},!0);for(var u=0;u<l.inEdges.length;u++){var v=l.inEdges[u];i.indexOf(v.node1)<0&&i.push(v.node1)}}n=i,i=[],++o}C(a,function(c){ng(c)||c.setLayout({depth:Math.max(0,r-c.getLayout().skNodeHeight)},!0)})}else e==="justify"&&CA(a,r)}function CA(a,e){C(a,function(t){!ng(t)&&!t.outEdges.length&&t.setLayout({depth:e},!0)})}function DA(a,e,t){C(a,function(r){var i=r.getLayout().depth*e;t==="vertical"?r.setLayout({y:i},!0):r.setLayout({x:i},!0)})}function IA(a,e,t,r,i,n,o){var s=LA(a,o);MA(s,e,t,r,i,o),Po(s,i,t,r,o);for(var l=1;n>0;n--)l*=.99,PA(s,l,o),Po(s,i,t,r,o),NA(s,l,o),Po(s,i,t,r,o)}function LA(a,e){var t=[],r=e==="vertical"?"y":"x",i=hs(a,function(n){return n.getLayout()[r]});return i.keys.sort(function(n,o){return n-o}),C(i.keys,function(n){t.push(i.buckets.get(n))}),t}function MA(a,e,t,r,i,n){var o=1/0;C(a,function(s){var l=s.length,u=0;C(s,function(c){u+=c.getLayout().value});var v=n==="vertical"?(r-(l-1)*i)/u:(t-(l-1)*i)/u;v<o&&(o=v)}),C(a,function(s){C(s,function(l,u){var v=l.getLayout().value*o;n==="vertical"?(l.setLayout({x:u},!0),l.setLayout({dx:v},!0)):(l.setLayout({y:u},!0),l.setLayout({dy:v},!0))})}),C(e,function(s){var l=+s.getValue()*o;s.setLayout({dy:l},!0)})}function Po(a,e,t,r,i){var n=i==="vertical"?"x":"y";C(a,function(o){o.sort(function(d,g){return d.getLayout()[n]-g.getLayout()[n]});for(var s,l,u,v=0,c=o.length,h=i==="vertical"?"dx":"dy",f=0;f<c;f++)l=o[f],u=v-l.getLayout()[n],u>0&&(s=l.getLayout()[n]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),v=l.getLayout()[n]+l.getLayout()[h]+e;var p=i==="vertical"?r:t;if(u=v-e-p,u>0){s=l.getLayout()[n]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),v=s;for(var f=c-2;f>=0;--f)l=o[f],u=l.getLayout()[n]+l.getLayout()[h]+e-v,u>0&&(s=l.getLayout()[n]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),v=l.getLayout()[n]}})}function PA(a,e,t){C(a.slice().reverse(),function(r){C(r,function(i){if(i.outEdges.length){var n=qe(i.outEdges,RA,t)/qe(i.outEdges,tn);if(isNaN(n)){var o=i.outEdges.length;n=o?qe(i.outEdges,kA,t)/o:0}if(t==="vertical"){var s=i.getLayout().x+(n-tr(i,t))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(n-tr(i,t))*e;i.setLayout({y:l},!0)}}})})}function RA(a,e){return tr(a.node2,e)*a.getValue()}function kA(a,e){return tr(a.node2,e)}function EA(a,e){return tr(a.node1,e)*a.getValue()}function VA(a,e){return tr(a.node1,e)}function tr(a,e){return e==="vertical"?a.getLayout().x+a.getLayout().dx/2:a.getLayout().y+a.getLayout().dy/2}function tn(a){return a.getValue()}function qe(a,e,t){for(var r=0,i=a.length,n=-1;++n<i;){var o=+e(a[n],t);isNaN(o)||(r+=o)}return r}function NA(a,e,t){C(a,function(r){C(r,function(i){if(i.inEdges.length){var n=qe(i.inEdges,EA,t)/qe(i.inEdges,tn);if(isNaN(n)){var o=i.inEdges.length;n=o?qe(i.inEdges,VA,t)/o:0}if(t==="vertical"){var s=i.getLayout().x+(n-tr(i,t))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(n-tr(i,t))*e;i.setLayout({y:l},!0)}}})})}function OA(a,e){var t=e==="vertical"?"x":"y";C(a,function(r){r.outEdges.sort(function(i,n){return i.node2.getLayout()[t]-n.node2.getLayout()[t]}),r.inEdges.sort(function(i,n){return i.node1.getLayout()[t]-n.node1.getLayout()[t]})}),C(a,function(r){var i=0,n=0;C(r.outEdges,function(o){o.setLayout({sy:i},!0),i+=o.getLayout().dy}),C(r.inEdges,function(o){o.setLayout({ty:n},!0),n+=o.getLayout().dy})})}function zA(a){a.eachSeriesByType("sankey",function(e){var t=e.getGraph(),r=t.nodes;if(r.length){var i=1/0,n=-1/0;C(r,function(o){var s=o.getLayout().value;s<i&&(i=s),s>n&&(n=s)}),C(r,function(o){var s=new Wt({type:"color",mappingMethod:"linear",dataExtent:[i,n],visual:e.get("color")}),l=s.mapValueToVisual(o.getLayout().value),u=o.getModel().get(["itemStyle","color"]);u!=null?(o.setVisual("color",u),o.setVisual("style",{fill:u})):(o.setVisual("color",l),o.setVisual("style",{fill:l}))})}})}function BA(a){a.registerChartView(yA),a.registerSeriesModel(xA),a.registerLayout(SA),a.registerVisual(zA),a.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(r){r.setNodePosition(e.dataIndex,[e.localX,e.localY])})})}var og=function(){function a(){}return a.prototype.getInitialData=function(e,t){var r,i=t.getComponent("xAxis",this.get("xAxisIndex")),n=t.getComponent("yAxis",this.get("yAxisIndex")),o=i.get("type"),s=n.get("type"),l;o==="category"?(e.layout="horizontal",r=i.getOrdinalMeta(),l=!0):s==="category"?(e.layout="vertical",r=n.getOrdinalMeta(),l=!0):e.layout=e.layout||"horizontal";var u=["x","y"],v=e.layout==="horizontal"?0:1,c=this._baseAxisDim=u[v],h=u[1-v],f=[i,n],p=f[v].get("type"),d=f[1-v].get("type"),g=e.data;if(g&&l){var y=[];C(g,function(S,_){var b;B(S)?(b=S.slice(),S.unshift(_)):B(S.value)?(b=H({},S),b.value=b.value.slice(),S.value.unshift(_)):b=S,y.push(b)}),e.data=y}var m=this.defaultValueDimensions,x=[{name:c,type:fs(p),ordinalMeta:r,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:fs(d),dimsDef:m.slice()}];return la(this,{coordDimensions:x,dimensionsCount:m.length+1,encodeDefaulter:q(Vm,x,this)})},a.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},a}(),sg=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#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}(At);Te(sg,og,!0);const GA=sg;var FA=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){var n=t.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=t.get("layout")==="horizontal"?1:0;n.diff(s).add(function(u){if(n.hasValue(u)){var v=n.getItemLayout(u),c=Ac(v,n,u,l,!0);n.setItemGraphicEl(u,c),o.add(c)}}).update(function(u,v){var c=s.getItemGraphicEl(v);if(!n.hasValue(u)){o.remove(c);return}var h=n.getItemLayout(u);c?(pe(c),lg(h,c,n,u)):c=Ac(h,n,u,l),o.add(c),n.setItemGraphicEl(u,c)}).remove(function(u){var v=s.getItemGraphicEl(u);v&&o.remove(v)}).execute(),this._data=n},e.prototype.remove=function(t){var r=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(n){n&&r.remove(n)})},e.type="boxplot",e}(xt),HA=function(){function a(){}return a}(),WA=function(a){k(e,a);function e(t){var r=a.call(this,t)||this;return r.type="boxplotBoxPath",r}return e.prototype.getDefaultShape=function(){return new HA},e.prototype.buildPath=function(t,r){var i=r.points,n=0;for(t.moveTo(i[n][0],i[n][1]),n++;n<4;n++)t.lineTo(i[n][0],i[n][1]);for(t.closePath();n<i.length;n++)t.moveTo(i[n][0],i[n][1]),n++,t.lineTo(i[n][0],i[n][1])},e}(Dt);function Ac(a,e,t,r,i){var n=a.ends,o=new WA({shape:{points:i?$A(n,r,a):n}});return lg(a,o,e,t,i),o}function lg(a,e,t,r,i){var n=t.hostModel,o=qa[i?"initProps":"updateProps"];o(e,{shape:{points:a.ends}},n,r),e.useStyle(t.getItemVisual(r,"style")),e.style.strokeNoScale=!0,e.z2=100;var s=t.getItemModel(r),l=s.getModel("emphasis");$t(e,s),bt(e,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function $A(a,e,t){return z(a,function(r){return r=r.slice(),r[e]=t.initBaseline,r})}const ZA=FA;function UA(a,e){}var Ma=C;function YA(a){var e=XA(a);Ma(e,function(t){var r=t.seriesModels;!r.length||(KA(t),Ma(r,function(i,n){qA(i,t.boxOffsetList[n],t.boxWidthList[n])}))})}function XA(a){var e=[],t=[];return a.eachSeriesByType("boxplot",function(r){var i=r.getBaseAxis(),n=yt(t,i);n<0&&(n=t.length,t[n]=i,e[n]={axis:i,seriesModels:[]}),e[n].seriesModels.push(r)}),e}function KA(a){var e=a.axis,t=a.seriesModels,r=t.length,i=a.boxWidthList=[],n=a.boxOffsetList=[],o=[],s;if(e.type==="category")s=e.getBandWidth();else{var l=0;Ma(t,function(p){l=Math.max(l,p.getData().count())});var u=e.getExtent();s=Math.abs(u[1]-u[0])/l}Ma(t,function(p){var d=p.get("boxWidth");B(d)||(d=[d,d]),o.push([G(d[0],s)||0,G(d[1],s)||0])});var v=s*.8-2,c=v/r*.3,h=(v-c*(r-1))/r,f=h/2-v/2;Ma(t,function(p,d){n.push(f),f+=c+h,i.push(Math.min(Math.max(h,o[d][0]),o[d][1]))})}function qA(a,e,t){var r=a.coordinateSystem,i=a.getData(),n=t/2,o=a.get("layout")==="horizontal"?0:1,s=1-o,l=["x","y"],u=i.mapDimension(l[o]),v=i.mapDimensionsAll(l[s]);if(u==null||v.length<5)return;for(var c=0;c<i.count();c++){var h=i.get(u,c),f=x(h,v[2],c),p=x(h,v[0],c),d=x(h,v[1],c),g=x(h,v[3],c),y=x(h,v[4],c),m=[];S(m,d,!1),S(m,g,!0),m.push(p,d,y,g),_(m,p),_(m,y),_(m,f),i.setItemLayout(c,{initBaseline:f[s],ends:m})}function x(b,w,A){var T=i.get(w,A),D=[];D[o]=b,D[s]=T;var I;return isNaN(b)||isNaN(T)?I=[NaN,NaN]:(I=r.dataToPoint(D),I[o]+=e),I}function S(b,w,A){var T=w.slice(),D=w.slice();T[o]+=n,D[o]-=n,A?b.push(T,D):b.push(D,T)}function _(b,w){var A=w.slice(),T=w.slice();A[o]-=n,T[o]+=n,b.push(A,T)}}function jA(a,e){e=e||{};for(var t=[],r=[],i=e.boundIQR,n=i==="none"||i===0,o=0;o<a.length;o++){var s=ue(a[o].slice()),l=$n(s,.25),u=$n(s,.5),v=$n(s,.75),c=s[0],h=s[s.length-1],f=(i==null?1.5:i)*(v-l),p=n?c:Math.max(c,l-f),d=n?h:Math.min(h,v+f),g=e.itemNameFormatter,y=rt(g)?g({value:o}):K(g)?g.replace("{value}",o+""):o+"";t.push([y,p,l,u,v,d]);for(var m=0;m<s.length;m++){var x=s[m];if(x<p||x>d){var S=[y,x];r.push(S)}}}return{boxData:t,outliers:r}}var JA={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==yp){var r="";r=ge("source data is not applicable for this boxplot transform. Expect number[][]."),_t(r)}var i=jA(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function QA(a){a.registerSeriesModel(GA),a.registerChartView(ZA),a.registerVisual(UA),a.registerLayout(YA),a.registerTransform(JA)}var tT=["color","borderColor"],eT=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,r,i){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,r,i,n){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,r):this._incrementalRenderNormal(t,r)},e.prototype.eachRendered=function(t){na(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var r=t.pipelineContext.large;(this._isLargeDraw==null||r!==this._isLargeDraw)&&(this._isLargeDraw=r,this._clear())},e.prototype._renderNormal=function(t){var r=t.getData(),i=this._data,n=this.group,o=r.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||n.removeAll(),r.diff(i).add(function(v){if(r.hasValue(v)){var c=r.getItemLayout(v);if(s&&Tc(u,c))return;var h=Ro(c,v,!0);wt(h,{shape:{points:c.ends}},t,v),ko(h,r,v,o),n.add(h),r.setItemGraphicEl(v,h)}}).update(function(v,c){var h=i.getItemGraphicEl(c);if(!r.hasValue(v)){n.remove(h);return}var f=r.getItemLayout(v);if(s&&Tc(u,f)){n.remove(h);return}h?(ot(h,{shape:{points:f.ends}},t,v),pe(h)):h=Ro(f),ko(h,r,v,o),n.add(h),r.setItemGraphicEl(v,h)}).remove(function(v){var c=i.getItemGraphicEl(v);c&&n.remove(c)}).execute(),this._data=r},e.prototype._renderLarge=function(t){this._clear(),Dc(t,this.group);var r=t.get("clip",!0)?kn(t.coordinateSystem,!1,t):null;r?this.group.setClipPath(r):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,r){for(var i=r.getData(),n=i.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=i.getItemLayout(o),l=Ro(s);ko(l,i,o,n),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,r){Dc(r,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}(xt),rT=function(){function a(){}return a}(),aT=function(a){k(e,a);function e(t){var r=a.call(this,t)||this;return r.type="normalCandlestickBox",r}return e.prototype.getDefaultShape=function(){return new rT},e.prototype.buildPath=function(t,r){var i=r.points;this.__simpleBox?(t.moveTo(i[4][0],i[4][1]),t.lineTo(i[6][0],i[6][1])):(t.moveTo(i[0][0],i[0][1]),t.lineTo(i[1][0],i[1][1]),t.lineTo(i[2][0],i[2][1]),t.lineTo(i[3][0],i[3][1]),t.closePath(),t.moveTo(i[4][0],i[4][1]),t.lineTo(i[5][0],i[5][1]),t.moveTo(i[6][0],i[6][1]),t.lineTo(i[7][0],i[7][1]))},e}(Dt);function Ro(a,e,t){var r=a.ends;return new aT({shape:{points:t?iT(r,a):r},z2:100})}function Tc(a,e){for(var t=!0,r=0;r<e.ends.length;r++)if(a.contain(e.ends[r][0],e.ends[r][1])){t=!1;break}return t}function ko(a,e,t,r){var i=e.getItemModel(t);a.useStyle(e.getItemVisual(t,"style")),a.style.strokeNoScale=!0,a.__simpleBox=r,$t(a,i)}function iT(a,e){return z(a,function(t){return t=t.slice(),t[1]=e.initBaseline,t})}var nT=function(){function a(){}return a}(),Cc=function(a){k(e,a);function e(t){var r=a.call(this,t)||this;return r.type="largeCandlestickBox",r}return e.prototype.getDefaultShape=function(){return new nT},e.prototype.buildPath=function(t,r){for(var i=r.points,n=0;n<i.length;)if(this.__sign===i[n++]){var o=i[n++];t.moveTo(o,i[n++]),t.lineTo(o,i[n++])}else n+=3},e}(Dt);function Dc(a,e,t,r){var i=a.getData(),n=i.getLayout("largePoints"),o=new Cc({shape:{points:n},__sign:1});e.add(o);var s=new Cc({shape:{points:n},__sign:-1});e.add(s),Ic(1,o,a),Ic(-1,s,a),r&&(o.incremental=!0,s.incremental=!0),t&&t.push(o,s)}function Ic(a,e,t,r){var i=t.get(["itemStyle",a>0?"borderColor":"borderColor0"])||t.get(["itemStyle",a>0?"color":"color0"]),n=t.getModel("itemStyle").getItemStyle(tT);e.useStyle(n),e.style.fill=null,e.style.stroke=i}const oT=eT;var ug=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],t}return e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,r,i){var n=r.getItemLayout(t);return n&&i.rect(n.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(At);Te(ug,og,!0);const sT=ug;function lT(a){!a||!B(a.series)||C(a.series,function(e){St(e)&&e.type==="k"&&(e.type="candlestick")})}var uT=["itemStyle","borderColor"],vT=["itemStyle","borderColor0"],cT=["itemStyle","color"],hT=["itemStyle","color0"],fT={seriesType:"candlestick",plan:xn(),performRawSeries:!0,reset:function(a,e){function t(n,o){return o.get(n>0?cT:hT)}function r(n,o){return o.get(n>0?uT:vT)}if(!e.isSeriesFiltered(a)){var i=a.pipelineContext.large;return!i&&{progress:function(n,o){for(var s;(s=n.next())!=null;){var l=o.getItemModel(s),u=o.getItemLayout(s).sign,v=l.getItemStyle();v.fill=t(u,l),v.stroke=r(u,l)||v.fill;var c=o.ensureUniqueItemVisual(s,"style");H(c,v)}}}}}};const pT=fT;var dT={seriesType:"candlestick",plan:xn(),reset:function(a){var e=a.coordinateSystem,t=a.getData(),r=gT(a,t),i=0,n=1,o=["x","y"],s=t.getDimensionIndex(t.mapDimension(o[i])),l=z(t.mapDimensionsAll(o[n]),t.getDimensionIndex,t),u=l[0],v=l[1],c=l[2],h=l[3];if(t.setLayout({candleWidth:r,isSimpleBox:r<=1.3}),s<0||l.length<4)return;return{progress:a.pipelineContext.large?p:f};function f(d,g){for(var y,m=g.getStore();(y=d.next())!=null;){var x=m.get(s,y),S=m.get(u,y),_=m.get(v,y),b=m.get(c,y),w=m.get(h,y),A=Math.min(S,_),T=Math.max(S,_),D=R(A,x),I=R(T,x),L=R(b,x),M=R(w,x),P=[];E(P,I,0),E(P,D,1),P.push(V(M),V(I),V(L),V(D)),g.setItemLayout(y,{sign:Lc(m,y,S,_,v),initBaseline:S>_?I[n]:D[n],ends:P,brushRect:N(b,w,x)})}function R(O,W){var Z=[];return Z[i]=W,Z[n]=O,isNaN(W)||isNaN(O)?[NaN,NaN]:e.dataToPoint(Z)}function E(O,W,Z){var X=W.slice(),Q=W.slice();X[i]=Zn(X[i]+r/2,1,!1),Q[i]=Zn(Q[i]-r/2,1,!0),Z?O.push(X,Q):O.push(Q,X)}function N(O,W,Z){var X=R(O,Z),Q=R(W,Z);return X[i]-=r/2,Q[i]-=r/2,{x:X[0],y:X[1],width:r,height:Q[1]-X[1]}}function V(O){return O[i]=Zn(O[i],1),O}}function p(d,g){for(var y=pr(d.count*4),m=0,x,S=[],_=[],b,w=g.getStore();(b=d.next())!=null;){var A=w.get(s,b),T=w.get(u,b),D=w.get(v,b),I=w.get(c,b),L=w.get(h,b);if(isNaN(A)||isNaN(I)||isNaN(L)){y[m++]=NaN,m+=3;continue}y[m++]=Lc(w,b,T,D,v),S[i]=A,S[n]=I,x=e.dataToPoint(S,null,_),y[m++]=x?x[0]:NaN,y[m++]=x?x[1]:NaN,S[n]=L,x=e.dataToPoint(S,null,_),y[m++]=x?x[1]:NaN}g.setLayout("largePoints",y)}}};function Lc(a,e,t,r,i){var n;return t>r?n=-1:t<r?n=1:n=e>0?a.get(i,e-1)<=r?1:-1:1,n}function gT(a,e){var t=a.getBaseAxis(),r,i=t.type==="category"?t.getBandWidth():(r=t.getExtent(),Math.abs(r[1]-r[0])/e.count()),n=G(Ft(a.get("barMaxWidth"),i),i),o=G(Ft(a.get("barMinWidth"),1),i),s=a.get("barWidth");return s!=null?G(s,i):Math.max(Math.min(i/2,n),o)}const yT=dT;function mT(a){a.registerChartView(oT),a.registerSeriesModel(sT),a.registerPreprocessor(lT),a.registerVisual(pT),a.registerLayout(yT)}function Mc(a,e){var t=e.rippleEffectColor||e.color;a.eachChild(function(r){r.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var xT=function(a){k(e,a);function e(t,r){var i=a.call(this)||this,n=new Qa(t,r),o=new U;return i.add(n),i.add(o),i.updateData(t,r),i}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var r=t.symbolType,i=t.color,n=t.rippleNumber,o=this.childAt(1),s=0;s<n;s++){var l=kt(r,-1,-1,2,2,i);l.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var u=-s/n*t.period+t.effectOffset;l.animate("",!0).when(t.period,{scaleX:t.rippleScale/2,scaleY:t.rippleScale/2}).delay(u).start(),l.animateStyle(!0).when(t.period,{opacity:0}).delay(u).start(),o.add(l)}Mc(o,t)},e.prototype.updateEffectAnimation=function(t){for(var r=this._effectCfg,i=this.childAt(1),n=["symbolType","period","rippleScale","rippleNumber"],o=0;o<n.length;o++){var s=n[o];if(r[s]!==t[s]){this.stopEffectAnimation(),this.startEffectAnimation(t);return}}Mc(i,t)},e.prototype.highlight=function(){dr(this)},e.prototype.downplay=function(){gr(this)},e.prototype.getSymbolType=function(){var t=this.childAt(0);return t&&t.getSymbolType()},e.prototype.updateData=function(t,r){var i=this,n=t.hostModel;this.childAt(0).updateData(t,r);var o=this.childAt(1),s=t.getItemModel(r),l=t.getItemVisual(r,"symbol"),u=Ua(t.getItemVisual(r,"symbolSize")),v=t.getItemVisual(r,"style"),c=v&&v.fill,h=s.getModel("emphasis");o.setScale(u),o.traverse(function(g){g.setStyle("fill",c)});var f=ia(t.getItemVisual(r,"symbolOffset"),u);f&&(o.x=f[0],o.y=f[1]);var p=t.getItemVisual(r,"symbolRotate");o.rotation=(p||0)*Math.PI/180||0;var d={};d.showEffectOn=n.get("showEffectOn"),d.rippleScale=s.get(["rippleEffect","scale"]),d.brushType=s.get(["rippleEffect","brushType"]),d.period=s.get(["rippleEffect","period"])*1e3,d.effectOffset=r/t.count(),d.z=n.getShallow("z")||0,d.zlevel=n.getShallow("zlevel")||0,d.symbolType=l,d.color=c,d.rippleEffectColor=s.get(["rippleEffect","color"]),d.rippleNumber=s.get(["rippleEffect","number"]),d.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(d):this.startEffectAnimation(d),this._effectCfg=d):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(g){g==="emphasis"?d.showEffectOn!=="render"&&i.startEffectAnimation(d):g==="normal"&&d.showEffectOn!=="render"&&i.stopEffectAnimation()}),this._effectCfg=d,bt(this,h.get("focus"),h.get("blurScope"),h.get("disabled"))},e.prototype.fadeOut=function(t){t&&t()},e}(U);const ST=xT;var bT=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._symbolDraw=new ti(ST)},e.prototype.render=function(t,r,i){var n=t.getData(),o=this._symbolDraw;o.updateData(n,{clipShape:this._getClipShape(t)}),this.group.add(o.group)},e.prototype._getClipShape=function(t){var r=t.coordinateSystem,i=r&&r.getArea&&r.getArea();return t.get("clip",!0)?i:null},e.prototype.updateTransform=function(t,r,i){var n=t.getData();this.group.dirty();var o=ei("").reset(t,r,i);o.progress&&o.progress({start:0,end:n.count(),count:n.count()},n),this._symbolDraw.updateLayout()},e.prototype._updateGroupTransform=function(t){var r=t.coordinateSystem;r&&r.getRoamTransform&&(this.group.transform=Nm(r.getRoamTransform()),this.group.decomposeTransform())},e.prototype.remove=function(t,r){this._symbolDraw&&this._symbolDraw.remove(!0)},e.type="effectScatter",e}(xt);const _T=bT;var wT=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,r){return ze(null,this,{useEncodeDefaulter:!0})},e.prototype.brushSelector=function(t,r,i){return i.point(r.getItemLayout(t))},e.type="series.effectScatter",e.dependencies=["grid","polar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},e}(At);const AT=wT;function TT(a){a.registerChartView(_T),a.registerSeriesModel(AT),a.registerLayout(ei("effectScatter"))}var CT=function(a){k(e,a);function e(t,r,i){var n=a.call(this)||this;return n.add(n.createLine(t,r,i)),n._updateEffectSymbol(t,r),n}return e.prototype.createLine=function(t,r,i){return new Al(t,r,i)},e.prototype._updateEffectSymbol=function(t,r){var i=t.getItemModel(r),n=i.getModel("effect"),o=n.get("symbolSize"),s=n.get("symbol");B(o)||(o=[o,o]);var l=t.getItemVisual(r,"style"),u=n.get("color")||l&&l.stroke,v=this.childAt(1);this._symbolType!==s&&(this.remove(v),v=kt(s,-.5,-.5,1,1,u),v.z2=100,v.culling=!0,this.add(v)),v&&(v.setStyle("shadowColor",u),v.setStyle(n.getItemStyle(["color"])),v.scaleX=o[0],v.scaleY=o[1],v.setColor(u),this._symbolType=s,this._symbolScale=o,this._updateEffectAnimation(t,n,r))},e.prototype._updateEffectAnimation=function(t,r,i){var n=this.childAt(1);if(!!n){var o=this,s=t.getItemLayout(i),l=r.get("period")*1e3,u=r.get("loop"),v=r.get("constantSpeed"),c=Ot(r.get("delay"),function(p){return p/t.count()*l/3});if(n.ignore=!0,this._updateAnimationPoints(n,s),v>0&&(l=this._getLineLength(n)/v*1e3),(l!==this._period||u!==this._loop)&&(n.stopAnimation(),l>0)){var h=void 0;rt(c)?h=c(i):h=c,n.__t>0&&(h=-l*n.__t),n.__t=0;var f=n.animate("",u).when(l,{__t:1}).delay(h).during(function(){o._updateSymbolPosition(n)});u||f.done(function(){o.remove(n)}),f.start()}this._period=l,this._loop=u}},e.prototype._getLineLength=function(t){return _a(t.__p1,t.__cp1)+_a(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,r){t.__p1=r[0],t.__p2=r[1],t.__cp1=r[2]||[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2]},e.prototype.updateData=function(t,r,i){this.childAt(0).updateData(t,r,i),this._updateEffectSymbol(t,r)},e.prototype._updateSymbolPosition=function(t){var r=t.__p1,i=t.__p2,n=t.__cp1,o=t.__t,s=[t.x,t.y],l=s.slice(),u=dp,v=Om;s[0]=u(r[0],n[0],i[0],o),s[1]=u(r[1],n[1],i[1],o);var c=v(r[0],n[0],i[0],o),h=v(r[1],n[1],i[1],o);t.rotation=-Math.atan2(h,c)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT<t.__t?(t.scaleY=_a(l,s)*1.05,o===1&&(s[0]=l[0]+(s[0]-l[0])/2,s[1]=l[1]+(s[1]-l[1])/2)):t.__lastT===1?t.scaleY=2*_a(r,s):t.scaleY=this._symbolScale[1]),t.__lastT=t.__t,t.ignore=!1,t.x=s[0],t.y=s[1]},e.prototype.updateLayout=function(t,r){this.childAt(0).updateLayout(t,r);var i=t.getItemModel(r).getModel("effect");this._updateEffectAnimation(t,i,r)},e}(U);const vg=CT;var DT=function(a){k(e,a);function e(t,r,i){var n=a.call(this)||this;return n._createPolyline(t,r,i),n}return e.prototype._createPolyline=function(t,r,i){var n=t.getItemLayout(r),o=new me({shape:{points:n}});this.add(o),this._updateCommonStl(t,r,i)},e.prototype.updateData=function(t,r,i){var n=t.hostModel,o=this.childAt(0),s={shape:{points:t.getItemLayout(r)}};ot(o,s,n,r),this._updateCommonStl(t,r,i)},e.prototype._updateCommonStl=function(t,r,i){var n=this.childAt(0),o=t.getItemModel(r),s=i&&i.emphasisLineStyle,l=i&&i.focus,u=i&&i.blurScope,v=i&&i.emphasisDisabled;if(!i||t.hasItemOption){var c=o.getModel("emphasis");s=c.getModel("lineStyle").getLineStyle(),v=c.get("disabled"),l=c.get("focus"),u=c.get("blurScope")}n.useStyle(t.getItemVisual(r,"style")),n.style.fill=null,n.style.strokeNoScale=!0;var h=n.ensureState("emphasis");h.style=s,bt(this,l,u,v)},e.prototype.updateLayout=function(t,r){var i=this.childAt(0);i.setShape("points",t.getItemLayout(r))},e}(U);const cg=DT;var IT=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t._lastFrame=0,t._lastFramePercent=0,t}return e.prototype.createLine=function(t,r,i){return new cg(t,r,i)},e.prototype._updateAnimationPoints=function(t,r){this._points=r;for(var i=[0],n=0,o=1;o<r.length;o++){var s=r[o-1],l=r[o];n+=_a(s,l),i.push(n)}if(n===0){this._length=0;return}for(var o=0;o<i.length;o++)i[o]/=n;this._offsets=i,this._length=n},e.prototype._getLineLength=function(){return this._length},e.prototype._updateSymbolPosition=function(t){var r=t.__t,i=this._points,n=this._offsets,o=i.length;if(!!n){var s=this._lastFrame,l;if(r<this._lastFramePercent){var u=Math.min(s+1,o-1);for(l=u;l>=0&&!(n[l]<=r);l--);l=Math.min(l,o-2)}else{for(l=s;l<o&&!(n[l]>r);l++);l=Math.min(l-1,o-2)}var v=(r-n[l])/(n[l+1]-n[l]),c=i[l],h=i[l+1];t.x=c[0]*(1-v)+v*h[0],t.y=c[1]*(1-v)+v*h[1];var f=h[0]-c[0],p=h[1]-c[1];t.rotation=-Math.atan2(p,f)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=r,t.ignore=!1}},e}(vg);const LT=IT;var MT=function(){function a(){this.polyline=!1,this.curveness=0,this.segs=[]}return a}(),PT=function(a){k(e,a);function e(t){var r=a.call(this,t)||this;return r._off=0,r.hoverDataIdx=-1,r}return 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 MT},e.prototype.buildPath=function(t,r){var i=r.segs,n=r.curveness,o;if(r.polyline)for(o=this._off;o<i.length;){var s=i[o++];if(s>0){t.moveTo(i[o++],i[o++]);for(var l=1;l<s;l++)t.lineTo(i[o++],i[o++])}}else for(o=this._off;o<i.length;){var u=i[o++],v=i[o++],c=i[o++],h=i[o++];if(t.moveTo(u,v),n>0){var f=(u+c)/2-(v-h)*n,p=(v+h)/2-(c-u)*n;t.quadraticCurveTo(f,p,c,h)}else t.lineTo(c,h)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,r){var i=this.shape,n=i.segs,o=i.curveness,s=this.style.lineWidth;if(i.polyline)for(var l=0,u=0;u<n.length;){var v=n[u++];if(v>0)for(var c=n[u++],h=n[u++],f=1;f<v;f++){var p=n[u++],d=n[u++];if(Su(c,h,p,d,s,t,r))return l}l++}else for(var l=0,u=0;u<n.length;){var c=n[u++],h=n[u++],p=n[u++],d=n[u++];if(o>0){var g=(c+p)/2-(h-d)*o,y=(h+d)/2-(p-c)*o;if(zm(c,h,g,y,p,d,s,t,r))return l}else if(Su(c,h,p,d,s,t,r))return l;l++}return-1},e.prototype.contain=function(t,r){var i=this.transformCoordToLocal(t,r),n=this.getBoundingRect();if(t=i[0],r=i[1],n.contain(t,r)){var o=this.hoverDataIdx=this.findDataIndex(t,r);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var r=this.shape,i=r.segs,n=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u<i.length;){var v=i[u++],c=i[u++];n=Math.min(v,n),s=Math.max(v,s),o=Math.min(c,o),l=Math.max(c,l)}t=this._rect=new zt(n,o,s,l)}return t},e}(Dt),RT=function(){function a(){this.group=new U}return a.prototype.updateData=function(e){this._clear();var t=this._create();t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e)},a.prototype.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clear()},a.prototype.incrementalUpdate=function(e,t){var r=this._newAdded[0],i=t.getLayout("linesPoints"),n=r&&r.shape.segs;if(n&&n.length<2e4){var o=n.length,s=new Float32Array(o+i.length);s.set(n),s.set(i,o),r.setShape({segs:s})}else{this._newAdded=[];var l=this._create();l.incremental=!0,l.setShape({segs:i}),this._setCommon(l,t),l.__startIndex=e.start}},a.prototype.remove=function(){this._clear()},a.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},a.prototype._create=function(){var e=new PT({cursor:"default"});return this._newAdded.push(e),this.group.add(e),e},a.prototype._setCommon=function(e,t,r){var i=t.hostModel;e.setShape({polyline:i.get("polyline"),curveness:i.get(["lineStyle","curveness"])}),e.useStyle(i.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var n=t.getVisual("style");n&&n.stroke&&e.setStyle("stroke",n.stroke),e.setStyle("fill",null);var o=tt(e);o.seriesIndex=i.seriesIndex,e.on("mousemove",function(s){o.dataIndex=null;var l=e.hoverDataIdx;l>0&&(o.dataIndex=l+e.__startIndex)})},a.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},a}();const kT=RT;var ET={seriesType:"lines",plan:xn(),reset:function(a){var e=a.coordinateSystem;if(!e){Bm("The lines series must have a coordinate system.");return}var t=a.get("polyline"),r=a.pipelineContext.large;return{progress:function(i,n){var o=[];if(r){var s=void 0,l=i.end-i.start;if(t){for(var u=0,v=i.start;v<i.end;v++)u+=a.getLineCoordsCount(v);s=new Float32Array(l+u*2)}else s=new Float32Array(l*4);for(var c=0,h=[],v=i.start;v<i.end;v++){var f=a.getLineCoords(v,o);t&&(s[c++]=f);for(var p=0;p<f;p++)h=e.dataToPoint(o[p],!1,h),s[c++]=h[0],s[c++]=h[1]}n.setLayout("linesPoints",s)}else for(var v=i.start;v<i.end;v++){var d=n.getItemModel(v),f=a.getLineCoords(v,o),g=[];if(t)for(var y=0;y<f;y++)g.push(e.dataToPoint(o[y]));else{g[0]=e.dataToPoint(o[0]),g[1]=e.dataToPoint(o[1]);var m=d.get(["lineStyle","curveness"]);+m&&(g[2]=[(g[0][0]+g[1][0])/2-(g[0][1]-g[1][1])*m,(g[0][1]+g[1][1])/2-(g[1][0]-g[0][0])*m])}n.setItemLayout(v,g)}}}}};const hg=ET;var VT=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){var n=t.getData(),o=this._updateLineDraw(n,t),s=t.get("zlevel"),l=t.get(["effect","trailLength"]),u=i.getZr(),v=u.painter.getType()==="svg";v||u.painter.getLayer(s).clear(!0),this._lastZlevel!=null&&!v&&u.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&l>0&&(v?console.warn("SVG render mode doesn't support lines with trail effect"):u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(n);var c=t.get("clip",!0)&&kn(t.coordinateSystem,!1,t);c?this.group.setClipPath(c):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,r,i){var n=t.getData(),o=this._updateLineDraw(n,t);o.incrementalPrepareUpdate(n),this._clearLayer(i),this._finished=!1},e.prototype.incrementalRender=function(t,r,i){this._lineDraw.incrementalUpdate(t,r.getData()),this._finished=t.end===r.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,r,i){var n=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=hg.reset(t,r,i);s.progress&&s.progress({start:0,end:n.count(),count:n.count()},n),this._lineDraw.updateLayout(),this._clearLayer(i)},e.prototype._updateLineDraw=function(t,r){var i=this._lineDraw,n=this._showEffect(r),o=!!r.get("polyline"),s=r.pipelineContext,l=s.large;return n&&l&&console.warn("Large lines not support effect"),(!i||n!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=l?new kT:new Tl(o?n?LT:cg:n?vg:Al),this._hasEffet=n,this._isPolyline=o,this._isLargeDraw=l),this.group.add(i.group),i},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var r=t.getZr(),i=r.painter.getType()==="svg";!i&&this._lastZlevel!=null&&r.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,r){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(r)},e.prototype.dispose=function(t,r){this.remove(t,r)},e.type="lines",e}(xt);const NT=VT;var OT=typeof Uint32Array>"u"?Array:Uint32Array,zT=typeof Float64Array>"u"?Array:Float64Array;function Pc(a){var e=a.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(console.warn("Lines data configuration has been changed to { coords:[[1,2],[2,3]] }"),a.data=z(e,function(t){var r=[t[0].coord,t[1].coord],i={coords:r};return t[0].name&&(i.fromName=t[0].name),t[1].name&&(i.toName=t[1].name),al([i,t[0],t[1]])}))}var BT=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.init=function(t){t.data=t.data||[],Pc(t);var r=this._processFlatCoordsArray(t.data);this._flatCoords=r.flatCoords,this._flatCoordsOffset=r.flatCoordsOffset,r.flatCoords&&(t.data=new Float32Array(r.count)),a.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(Pc(t),t.data){var r=this._processFlatCoordsArray(t.data);this._flatCoords=r.flatCoords,this._flatCoordsOffset=r.flatCoordsOffset,r.flatCoords&&(t.data=new Float32Array(r.count))}a.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var r=this._processFlatCoordsArray(t.data);r.flatCoords&&(this._flatCoords?(this._flatCoords=bu(this._flatCoords,r.flatCoords),this._flatCoordsOffset=bu(this._flatCoordsOffset,r.flatCoordsOffset)):(this._flatCoords=r.flatCoords,this._flatCoordsOffset=r.flatCoordsOffset),t.data=new Float32Array(r.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var r=this.getData().getItemModel(t),i=r.option instanceof Array?r.option:r.getShallow("coords");if(!(i instanceof Array&&i.length>0&&i[0]instanceof Array))throw new Error("Invalid coords "+JSON.stringify(i)+". Lines must have 2d coords array in data item.");return i},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,r){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[t*2],n=this._flatCoordsOffset[t*2+1],o=0;o<n;o++)r[o]=r[o]||[],r[o][0]=this._flatCoords[i+o*2],r[o][1]=this._flatCoords[i+o*2+1];return n}else{for(var s=this._getCoordsFromItemModel(t),o=0;o<s.length;o++)r[o]=r[o]||[],r[o][0]=s[o][0],r[o][1]=s[o][1];return s.length}},e.prototype._processFlatCoordsArray=function(t){var r=0;if(this._flatCoords&&(r=this._flatCoords.length),re(t[0])){for(var i=t.length,n=new OT(i),o=new zT(i),s=0,l=0,u=0,v=0;v<i;){u++;var c=t[v++];n[l++]=s+r,n[l++]=c;for(var h=0;h<c;h++){var f=t[v++],p=t[v++];if(o[s++]=f,o[s++]=p,v>i)throw new Error("Invalid data format.")}}return{flatCoordsOffset:new Uint32Array(n.buffer,0,l),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},e.prototype.getInitialData=function(t,r){{var i=il.get(t.coordinateSystem);if(!i)throw new Error("Unkown coordinate system "+t.coordinateSystem)}var n=new Qt(["value"],this);return n.hasItemOption=!1,n.initData(t.data,[],function(o,s,l,u){if(o instanceof Array)return NaN;n.hasItemOption=!0;var v=o.value;if(v!=null)return v instanceof Array?v[u]:v}),n},e.prototype.formatTooltip=function(t,r,i){var n=this.getData(),o=n.getItemModel(t),s=o.get("name");if(s)return s;var l=o.get("fromName"),u=o.get("toName"),v=[];return l!=null&&v.push(l),u!=null&&v.push(u),Ut("nameValue",{name:v.join(" > ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t==null?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t==null?this.option.large?2e4:this.get("progressiveThreshold"):t},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),r=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&r>0?r+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(At);const GT=BT;function Si(a){return a instanceof Array||(a=[a,a]),a}var FT={seriesType:"lines",reset:function(a){var e=Si(a.get("symbol")),t=Si(a.get("symbolSize")),r=a.getData();r.setVisual("fromSymbol",e&&e[0]),r.setVisual("toSymbol",e&&e[1]),r.setVisual("fromSymbolSize",t&&t[0]),r.setVisual("toSymbolSize",t&&t[1]);function i(n,o){var s=n.getItemModel(o),l=Si(s.getShallow("symbol",!0)),u=Si(s.getShallow("symbolSize",!0));l[0]&&n.setItemVisual(o,"fromSymbol",l[0]),l[1]&&n.setItemVisual(o,"toSymbol",l[1]),u[0]&&n.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&n.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:r.hasItemOption?i:null}}};const HT=FT;function WT(a){a.registerChartView(NT),a.registerSeriesModel(GT),a.registerLayout(hg),a.registerVisual(HT)}var $T=256,ZT=function(){function a(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=_u.createCanvas();this.canvas=e}return a.prototype.update=function(e,t,r,i,n,o){var s=this._getBrush(),l=this._getGradient(n,"inRange"),u=this._getGradient(n,"outOfRange"),v=this.pointSize+this.blurSize,c=this.canvas,h=c.getContext("2d"),f=e.length;c.width=t,c.height=r;for(var p=0;p<f;++p){var d=e[p],g=d[0],y=d[1],m=d[2],x=i(m);h.globalAlpha=x,h.drawImage(s,g-v,y-v)}if(!c.width||!c.height)return c;for(var S=h.getImageData(0,0,c.width,c.height),_=S.data,b=0,w=_.length,A=this.minOpacity,T=this.maxOpacity,D=T-A;b<w;){var x=_[b+3]/256,I=Math.floor(x*($T-1))*4;if(x>0){var L=o(x)?l:u;x>0&&(x=x*D+A),_[b++]=L[I],_[b++]=L[I+1],_[b++]=L[I+2],_[b++]=L[I+3]*x*256}else b+=4}return h.putImageData(S,0,0),c},a.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=_u.createCanvas()),t=this.pointSize+this.blurSize,r=t*2;e.width=r,e.height=r;var i=e.getContext("2d");return i.clearRect(0,0,r,r),i.shadowOffsetX=r,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-t,t,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),e},a.prototype._getGradient=function(e,t){for(var r=this._gradientPixels,i=r[t]||(r[t]=new Uint8ClampedArray(256*4)),n=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,n),i[o++]=n[0],i[o++]=n[1],i[o++]=n[2],i[o++]=n[3];return i},a}();const UT=ZT;function YT(a,e,t){var r=a[1]-a[0];e=z(e,function(o){return{interval:[(o.interval[0]-a[0])/r,(o.interval[1]-a[0])/r]}});var i=e.length,n=0;return function(o){var s;for(s=n;s<i;s++){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){n=s;break}}if(s===i)for(s=n-1;s>=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){n=s;break}}return s>=0&&s<i&&t[s]}}function XT(a,e){var t=a[1]-a[0];return e=[(e[0]-a[0])/t,(e[1]-a[0])/t],function(r){return r>=e[0]&&r<=e[1]}}function Rc(a){var e=a.dimensions;return e[0]==="lng"&&e[1]==="lat"}var KT=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){var n;if(r.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===t&&(n=s)})}),!n)throw new Error("Heatmap must use with visualMap");this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(t,i,0,t.getData().count()):Rc(o)&&this._renderOnGeo(o,t,n,i)},e.prototype.incrementalPrepareRender=function(t,r,i){this.group.removeAll()},e.prototype.incrementalRender=function(t,r,i,n){var o=r.coordinateSystem;o&&(Rc(o)?this.render(r,i,n):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(r,n,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){na(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,r,i,n,o){var s=t.coordinateSystem,l,u,v,c;if(Pe(s,"cartesian2d")){var h=s.getAxis("x"),f=s.getAxis("y");{if(!(h.type==="category"&&f.type==="category"))throw new Error("Heatmap on cartesian must have two category axes");if(!(h.onBand&&f.onBand))throw new Error("Heatmap on cartesian must have two axes with boundaryGap true")}l=h.getBandWidth(),u=f.getBandWidth(),v=h.scale.getExtent(),c=f.scale.getExtent()}for(var p=this.group,d=t.getData(),g=t.getModel(["emphasis","itemStyle"]).getItemStyle(),y=t.getModel(["blur","itemStyle"]).getItemStyle(),m=t.getModel(["select","itemStyle"]).getItemStyle(),x=Ht(t),S=t.getModel("emphasis"),_=S.get("focus"),b=S.get("blurScope"),w=S.get("disabled"),A=Pe(s,"cartesian2d")?[d.mapDimension("x"),d.mapDimension("y"),d.mapDimension("value")]:[d.mapDimension("time"),d.mapDimension("value")],T=i;T<n;T++){var D=void 0,I=d.getItemVisual(T,"style");if(Pe(s,"cartesian2d")){var L=d.get(A[0],T),M=d.get(A[1],T);if(isNaN(d.get(A[2],T))||L<v[0]||L>v[1]||M<c[0]||M>c[1])continue;var P=s.dataToPoint([L,M]);D=new ct({shape:{x:Math.floor(Math.round(P[0])-l/2),y:Math.floor(Math.round(P[1])-u/2),width:Math.ceil(l),height:Math.ceil(u)},style:I})}else{if(isNaN(d.get(A[1],T)))continue;D=new ct({z2:1,shape:s.dataToRect([d.get(A[0],T)]).contentShape,style:I})}var R=d.getItemModel(T);if(d.hasItemOption){var E=R.getModel("emphasis");g=E.getModel("itemStyle").getItemStyle(),y=R.getModel(["blur","itemStyle"]).getItemStyle(),m=R.getModel(["select","itemStyle"]).getItemStyle(),_=E.get("focus"),b=E.get("blurScope"),w=E.get("disabled"),x=Ht(R)}var N=t.getRawValue(T),V="-";N&&N[2]!=null&&(V=N[2]+""),Yt(D,x,{labelFetcher:t,labelDataIndex:T,defaultOpacity:I.opacity,defaultText:V}),D.ensureState("emphasis").style=g,D.ensureState("blur").style=y,D.ensureState("select").style=m,bt(D,_,b,w),D.incremental=o,o&&(D.states.emphasis.hoverLayer=!0),p.add(D),d.setItemGraphicEl(T,D),this._progressiveEls&&this._progressiveEls.push(D)}},e.prototype._renderOnGeo=function(t,r,i,n){var o=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=r.getData(),u=this._hmLayer||this._hmLayer||new UT;u.blurSize=r.get("blurSize"),u.pointSize=r.get("pointSize"),u.minOpacity=r.get("minOpacity"),u.maxOpacity=r.get("maxOpacity");var v=t.getViewRect().clone(),c=t.getRoamTransform();v.applyTransform(c);var h=Math.max(v.x,0),f=Math.max(v.y,0),p=Math.min(v.width+v.x,n.getWidth()),d=Math.min(v.height+v.y,n.getHeight()),g=p-h,y=d-f,m=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],x=l.mapArray(m,function(w,A,T){var D=t.dataToPoint([w,A]);return D[0]-=h,D[1]-=f,D.push(T),D}),S=i.getExtent(),_=i.type==="visualMap.continuous"?XT(S,i.option.range):YT(S,i.getPieceList(),i.option.selected);u.update(x,g,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},_);var b=new ye({style:{width:g,height:y,x:h,y:f,image:u.canvas},silent:!0});this.group.add(b)},e.type="heatmap",e}(xt);const qT=KT;var jT=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,r){return ze(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=il.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(At);const JT=jT;function QT(a){a.registerChartView(qT),a.registerSeriesModel(JT)}var tC=["itemStyle","borderWidth"],kc=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Eo=new br,eC=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){var n=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),v=u.isHorizontal(),c=l.master.getRect(),h={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[c.x,c.x+c.width],[c.y,c.y+c.height]],isHorizontal:v,valueDim:kc[+v],categoryDim:kc[1-+v]};return o.diff(s).add(function(f){if(!!o.hasValue(f)){var p=Vc(o,f),d=Ec(o,f,p,h),g=Nc(o,h,d);o.setItemGraphicEl(f,g),n.add(g),zc(g,h,d)}}).update(function(f,p){var d=s.getItemGraphicEl(p);if(!o.hasValue(f)){n.remove(d);return}var g=Vc(o,f),y=Ec(o,f,g,h),m=mg(o,y);d&&m!==d.__pictorialShapeStr&&(n.remove(d),o.setItemGraphicEl(f,null),d=null),d?lC(d,h,y):d=Nc(o,h,y,!0),o.setItemGraphicEl(f,d),d.__pictorialSymbolMeta=y,n.add(d),zc(d,h,y)}).remove(function(f){var p=s.getItemGraphicEl(f);p&&Oc(s,f,p.__pictorialSymbolMeta.animationModel,p)}).execute(),this._data=o,this.group},e.prototype.remove=function(t,r){var i=this.group,n=this._data;t.get("animation")?n&&n.eachItemGraphicEl(function(o){Oc(n,tt(o).dataIndex,t,o)}):i.removeAll()},e.type="pictorialBar",e}(xt);function Ec(a,e,t,r){var i=a.getItemLayout(e),n=t.get("symbolRepeat"),o=t.get("symbolClip"),s=t.get("symbolPosition")||"start",l=t.get("symbolRotate"),u=(l||0)*Math.PI/180||0,v=t.get("symbolPatternSize")||2,c=t.isAnimationEnabled(),h={dataIndex:e,layout:i,itemModel:t,symbolType:a.getItemVisual(e,"symbol")||"circle",style:a.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:n,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:v,rotation:u,animationModel:c?t:null,hoverScale:c&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};rC(t,n,i,r,h),aC(a,e,i,n,o,h.boundingLength,h.pxSign,v,r,h),iC(t,h.symbolScale,u,r,h);var f=h.symbolSize,p=ia(t.get("symbolOffset"),f);return nC(t,f,i,n,o,p,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,r,h),h}function rC(a,e,t,r,i){var n=r.valueDim,o=a.get("symbolBoundingData"),s=r.coordSys.getOtherAxis(r.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(t[n.wh]<=0),v;if(B(o)){var c=[Vo(s,o[0])-l,Vo(s,o[1])-l];c[1]<c[0]&&c.reverse(),v=c[u]}else o!=null?v=Vo(s,o)-l:e?v=r.coordSysExtent[n.index][u]-l:v=t[n.wh];i.boundingLength=v,e&&(i.repeatCutLength=t[n.wh]),i.pxSign=v>0?1:-1}function Vo(a,e){return a.toGlobalCoord(a.dataToCoord(a.scale.parse(e)))}function aC(a,e,t,r,i,n,o,s,l,u){var v=l.valueDim,c=l.categoryDim,h=Math.abs(t[c.wh]),f=a.getItemVisual(e,"symbolSize"),p;B(f)?p=f.slice():f==null?p=["100%","100%"]:p=[f,f],p[c.index]=G(p[c.index],h),p[v.index]=G(p[v.index],r?h:Math.abs(n)),u.symbolSize=p;var d=u.symbolScale=[p[0]/s,p[1]/s];d[v.index]*=(l.isHorizontal?-1:1)*o}function iC(a,e,t,r,i){var n=a.get(tC)||0;n&&(Eo.attr({scaleX:e[0],scaleY:e[1],rotation:t}),Eo.updateTransform(),n/=Eo.getLineScale(),n*=e[r.valueDim.index]),i.valueLineWidth=n}function nC(a,e,t,r,i,n,o,s,l,u,v,c){var h=v.categoryDim,f=v.valueDim,p=c.pxSign,d=Math.max(e[f.index]+s,0),g=d;if(r){var y=Math.abs(l),m=Ot(a.get("symbolMargin"),"15%")+"",x=!1;m.lastIndexOf("!")===m.length-1&&(x=!0,m=m.slice(0,m.length-1));var S=G(m,e[f.index]),_=Math.max(d+S*2,0),b=x?0:S*2,w=Gm(r),A=w?r:Bc((y+b)/_),T=y-A*d;S=T/2/(x?A:Math.max(A-1,1)),_=d+S*2,b=x?0:S*2,!w&&r!=="fixed"&&(A=u?Bc((Math.abs(u)+b)/_):0),g=A*_-b,c.repeatTimes=A,c.symbolMargin=S}var D=p*(g/2),I=c.pathPosition=[];I[h.index]=t[h.wh]/2,I[f.index]=o==="start"?D:o==="end"?l-D:l/2,n&&(I[0]+=n[0],I[1]+=n[1]);var L=c.bundlePosition=[];L[h.index]=t[h.xy],L[f.index]=t[f.xy];var M=c.barRectShape=H({},t);M[f.wh]=p*Math.max(Math.abs(t[f.wh]),Math.abs(I[f.index]+D)),M[h.wh]=t[h.wh];var P=c.clipShape={};P[h.xy]=-t[h.xy],P[h.wh]=v.ecSize[h.wh],P[f.xy]=0,P[f.wh]=t[f.wh]}function fg(a){var e=a.symbolPatternSize,t=kt(a.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function pg(a,e,t,r){var i=a.__pictorialBundle,n=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,v=0,c=n[e.valueDim.index]+o+t.symbolMargin*2;for(kl(a,function(d){d.__pictorialAnimationIndex=v,d.__pictorialRepeatTimes=u,v<u?Zr(d,null,p(v),t,r):Zr(d,null,{scaleX:0,scaleY:0},t,r,function(){i.remove(d)}),v++});v<u;v++){var h=fg(t);h.__pictorialAnimationIndex=v,h.__pictorialRepeatTimes=u,i.add(h);var f=p(v);Zr(h,{x:f.x,y:f.y,scaleX:0,scaleY:0},{scaleX:f.scaleX,scaleY:f.scaleY,rotation:f.rotation},t,r)}function p(d){var g=s.slice(),y=t.pxSign,m=d;return(t.symbolRepeatDirection==="start"?y>0:y<0)&&(m=u-1-d),g[l.index]=c*(m-u/2+.5)+s[l.index],{x:g[0],y:g[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function dg(a,e,t,r){var i=a.__pictorialBundle,n=a.__pictorialMainPath;n?Zr(n,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,r):(n=a.__pictorialMainPath=fg(t),i.add(n),Zr(n,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:0,scaleY:0,rotation:t.rotation},{scaleX:t.symbolScale[0],scaleY:t.symbolScale[1]},t,r))}function gg(a,e,t){var r=H({},e.barRectShape),i=a.__pictorialBarRect;i?Zr(i,null,{shape:r},e,t):(i=a.__pictorialBarRect=new ct({z2:2,shape:r,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),i.disableMorphing=!0,a.add(i))}function yg(a,e,t,r){if(t.symbolClip){var i=a.__pictorialClipPath,n=H({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(i)ot(i,{shape:n},s,l);else{n[o.wh]=0,i=new ct({shape:n}),a.__pictorialBundle.setClipPath(i),a.__pictorialClipPath=i;var u={};u[o.wh]=t.clipShape[o.wh],qa[r?"updateProps":"initProps"](i,{shape:u},s,l)}}}function Vc(a,e){var t=a.getItemModel(e);return t.getAnimationDelayParams=oC,t.isAnimationEnabled=sC,t}function oC(a){return{index:a.__pictorialAnimationIndex,count:a.__pictorialRepeatTimes}}function sC(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function Nc(a,e,t,r){var i=new U,n=new U;return i.add(n),i.__pictorialBundle=n,n.x=t.bundlePosition[0],n.y=t.bundlePosition[1],t.symbolRepeat?pg(i,e,t):dg(i,e,t),gg(i,t,r),yg(i,e,t,r),i.__pictorialShapeStr=mg(a,t),i.__pictorialSymbolMeta=t,i}function lC(a,e,t){var r=t.animationModel,i=t.dataIndex,n=a.__pictorialBundle;ot(n,{x:t.bundlePosition[0],y:t.bundlePosition[1]},r,i),t.symbolRepeat?pg(a,e,t,!0):dg(a,e,t,!0),gg(a,t,!0),yg(a,e,t,!0)}function Oc(a,e,t,r){var i=r.__pictorialBarRect;i&&i.removeTextContent();var n=[];kl(r,function(o){n.push(o)}),r.__pictorialMainPath&&n.push(r.__pictorialMainPath),r.__pictorialClipPath&&(t=null),C(n,function(o){Yr(o,{scaleX:0,scaleY:0},t,e,function(){r.parent&&r.parent.remove(r)})}),a.setItemGraphicEl(e,null)}function mg(a,e){return[a.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function kl(a,e,t){C(a.__pictorialBundle.children(),function(r){r!==a.__pictorialBarRect&&e.call(t,r)})}function Zr(a,e,t,r,i,n){e&&a.attr(e),r.symbolClip&&!i?t&&a.attr(t):t&&qa[i?"updateProps":"initProps"](a,t,r.animationModel,r.dataIndex,n)}function zc(a,e,t){var r=t.dataIndex,i=t.itemModel,n=i.getModel("emphasis"),o=n.getModel("itemStyle").getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),l=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),v=n.get("focus"),c=n.get("blurScope"),h=n.get("scale");kl(a,function(d){if(d instanceof ye){var g=d.style;d.useStyle(H({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},t.style))}else d.useStyle(t.style);var y=d.ensureState("emphasis");y.style=o,h&&(y.scaleX=d.scaleX*1.1,y.scaleY=d.scaleY*1.1),d.ensureState("blur").style=s,d.ensureState("select").style=l,u&&(d.cursor=u),d.z2=t.z2});var f=e.valueDim.posDesc[+(t.boundingLength>0)],p=a.__pictorialBarRect;Yt(p,Ht(i),{labelFetcher:e.seriesModel,labelDataIndex:r,defaultText:Qr(e.seriesModel.getData(),r),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:f}),bt(a,v,c,n.get("disabled"))}function Bc(a){var e=Math.round(a);return Math.abs(a-e)<1e-4?e:Math.ceil(a)}const uC=eC;var vC=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t.defaultSymbol="roundRect",t}return e.prototype.getInitialData=function(t){return t.stack=null,a.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=ar(Yi.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%",progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(Yi);const cC=vC;function hC(a){a.registerChartView(uC),a.registerSeriesModel(cC),a.registerLayout(a.PRIORITY.VISUAL.LAYOUT,q(Jf,"pictorialBar")),a.registerLayout(a.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,jf("pictorialBar"))}var fC=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,r,i){var n=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=n.getLayout("layoutInfo"),v=u.rect,c=u.boundaryGap;s.x=0,s.y=v.y+c[0];function h(g){return g.name}var f=new Qe(this._layersSeries||[],l,h,h),p=[];f.add($(d,this,"add")).update($(d,this,"update")).remove($(d,this,"remove")).execute();function d(g,y,m){var x=o._layers;if(g==="remove"){s.remove(x[y]);return}for(var S=[],_=[],b,w=l[y].indices,A=0;A<w.length;A++){var T=n.getItemLayout(w[A]),D=T.x,I=T.y0,L=T.y;S.push(D,I),_.push(D,I+L),b=n.getItemVisual(w[A],"style")}var M,P=n.getItemLayout(w[0]),R=t.getModel("label"),E=R.get("margin"),N=t.getModel("emphasis");if(g==="add"){var V=p[y]=new U;M=new Zp({shape:{points:S,stackedOnPoints:_,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),V.add(M),s.add(V),t.isAnimationEnabled()&&M.setClipPath(pC(M.getBoundingRect(),t,function(){M.removeClipPath()}))}else{var V=x[m];M=V.childAt(0),s.add(V),p[y]=V,ot(M,{shape:{points:S,stackedOnPoints:_}},t),pe(M)}Yt(M,Ht(t),{labelDataIndex:w[A-1],defaultText:n.getName(w[A-1]),inheritColor:b.fill},{normal:{verticalAlign:"middle"}}),M.setTextConfig({position:null,local:!0});var O=M.getTextContent();O&&(O.x=P.x-E,O.y=P.y0+P.y/2),M.useStyle(b),n.setItemGraphicEl(y,M),$t(M,t),bt(M,N.get("focus"),N.get("blurScope"),N.get("disabled"))}this._layersSeries=l,this._layers=p},e.type="themeRiver",e}(xt);function pC(a,e,t){var r=new ct({shape:{x:a.x-10,y:a.y-10,width:0,height:a.height+20}});return wt(r,{shape:{x:a.x-50,width:a.width+100,height:a.height+20}},e,t),r}const dC=fC;var No=2,gC=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){a.prototype.init.apply(this,arguments),this.legendVisualProvider=new ai($(this.getData,this),$(this.getRawData,this))},e.prototype.fixData=function(t){var r=t.length,i={},n=hs(t,function(h){return i.hasOwnProperty(h[0]+"")||(i[h[0]+""]=-1),h[2]}),o=[];n.buckets.each(function(h,f){o.push({name:f,dataList:h})});for(var s=o.length,l=0;l<s;++l){for(var u=o[l].name,v=0;v<o[l].dataList.length;++v){var c=o[l].dataList[v][0]+"";i[c]=l}for(var c in i)i.hasOwnProperty(c)&&i[c]!==l&&(i[c]=l,t[r]=[c,0,u],r++)}return t},e.prototype.getInitialData=function(t,r){for(var i=this.getReferringComponents("singleAxis",ee).models[0],n=i.get("type"),o=te(t.data,function(p){return p[2]!==void 0}),s=this.fixData(o||[]),l=[],u=this.nameMap=it(),v=0,c=0;c<s.length;++c)l.push(s[c][No]),u.get(s[c][No])||(u.set(s[c][No],v),v++);var h=Sn(s,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:fs(n)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,f=new Qt(h,this);return f.initData(s),f},e.prototype.getLayerSeries=function(){for(var t=this.getData(),r=t.count(),i=[],n=0;n<r;++n)i[n]=n;var o=t.mapDimension("single"),s=hs(i,function(u){return t.get("name",u)}),l=[];return s.buckets.each(function(u,v){u.sort(function(c,h){return t.get(o,c)-t.get(o,h)}),l.push({name:v,indices:u})}),l},e.prototype.getAxisTooltipData=function(t,r,i){B(t)||(t=t?[t]:[]);for(var n=this.getData(),o=this.getLayerSeries(),s=[],l=o.length,u,v=0;v<l;++v){for(var c=Number.MAX_VALUE,h=-1,f=o[v].indices.length,p=0;p<f;++p){var d=n.get(t[0],o[v].indices[p]),g=Math.abs(d-r);g<=c&&(u=d,c=g,h=o[v].indices[p])}s.push(h)}return{dataIndices:s,nestestValue:u}},e.prototype.formatTooltip=function(t,r,i){var n=this.getData(),o=n.getName(t),s=n.get(n.mapDimension("value"),t);return Ut("nameValue",{name:o,value:s})},e.type="series.themeRiver",e.dependencies=["singleAxis"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},e}(At);const yC=gC;function mC(a,e){a.eachSeriesByType("themeRiver",function(t){var r=t.getData(),i=t.coordinateSystem,n={},o=i.getRect();n.rect=o;var s=t.get("boundaryGap"),l=i.getAxis();if(n.boundaryGap=s,l.orient==="horizontal"){s[0]=G(s[0],o.height),s[1]=G(s[1],o.height);var u=o.height-s[0]-s[1];Gc(r,t,u)}else{s[0]=G(s[0],o.width),s[1]=G(s[1],o.width);var v=o.width-s[0]-s[1];Gc(r,t,v)}r.setLayout("layoutInfo",n)})}function Gc(a,e,t){if(!!a.count())for(var r=e.coordinateSystem,i=e.getLayerSeries(),n=a.mapDimension("single"),o=a.mapDimension("value"),s=z(i,function(g){return z(g.indices,function(y){var m=r.dataToPoint(a.get(n,y));return m[1]=a.get(o,y),m})}),l=xC(s),u=l.y0,v=t/l.max,c=i.length,h=i[0].indices.length,f,p=0;p<h;++p){f=u[p]*v,a.setItemLayout(i[0].indices[p],{layerIndex:0,x:s[0][p][0],y0:f,y:s[0][p][1]*v});for(var d=1;d<c;++d)f+=s[d-1][p][1]*v,a.setItemLayout(i[d].indices[p],{layerIndex:d,x:s[d][p][0],y0:f,y:s[d][p][1]*v})}}function xC(a){for(var e=a.length,t=a[0].length,r=[],i=[],n=0,o=0;o<t;++o){for(var s=0,l=0;l<e;++l)s+=a[l][o][1];s>n&&(n=s),r.push(s)}for(var u=0;u<t;++u)i[u]=(n-r[u])/2;n=0;for(var v=0;v<t;++v){var c=r[v]+i[v];c>n&&(n=c)}return{y0:i,max:n}}function SC(a){a.registerChartView(dC),a.registerSeriesModel(yC),a.registerLayout(mC),a.registerProcessor(ri("themeRiver"))}var bC=2,_C=4,wC=function(a){k(e,a);function e(t,r,i,n){var o=a.call(this)||this;o.z2=bC,o.textConfig={inside:!0},tt(o).seriesIndex=r.seriesIndex;var s=new lt({z2:_C,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,r,i,n),o}return e.prototype.updateData=function(t,r,i,n,o){this.node=r,r.piece=this,i=i||this._seriesModel,n=n||this._ecModel;var s=this;tt(s).dataIndex=r.dataIndex;var l=r.getModel(),u=l.getModel("emphasis"),v=r.getLayout(),c=H({},v);c.label=null;var h=r.getVisual("style");h.lineJoin="bevel";var f=r.getVisual("decal");f&&(h.decal=rl(f,o));var p=Fr(l.getModel("itemStyle"),c,!0);H(c,p),C(Ra,function(m){var x=s.ensureState(m),S=l.getModel([m,"itemStyle"]);x.style=S.getItemStyle();var _=Fr(S,c);_&&(x.shape=_)}),t?(s.setShape(c),s.shape.r=v.r0,ot(s,{shape:{r:v.r}},i,r.dataIndex)):(ot(s,{shape:c},i),pe(s)),s.useStyle(h),this._updateLabel(i);var d=l.getShallow("cursor");d&&s.attr("cursor",d),this._seriesModel=i||this._seriesModel,this._ecModel=n||this._ecModel;var g=u.get("focus"),y=g==="ancestor"?r.getAncestorsIndices():g==="descendant"?r.getDescendantIndices():g;bt(this,y,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var r=this,i=this.node.getModel(),n=i.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),v=Math.sin(l),c=this,h=c.getTextContent(),f=this.node.dataIndex,p=n.get("minAngle")/180*Math.PI,d=n.get("show")&&!(p!=null&&Math.abs(s)<p);h.ignore=!d,C(Fm,function(y){var m=y==="normal"?i.getModel("label"):i.getModel([y,"label"]),x=y==="normal",S=x?h:h.ensureState(y),_=t.getFormattedLabel(f,y);x&&(_=_||r.node.name),S.style=Rt(m,{},null,y!=="normal",!0),_&&(S.style.text=_);var b=m.get("show");b!=null&&!x&&(S.ignore=!b);var w=g(m,"position"),A=x?c:c.states[y],T=A.style.fill;A.textConfig={outsideFill:m.get("color")==="inherit"?T:null,inside:w!=="outside"};var D,I=g(m,"distance")||0,L=g(m,"align");w==="outside"?(D=o.r+I,L=l>Math.PI/2?"right":"left"):!L||L==="center"?(D=(o.r+o.r0)/2,L="center"):L==="left"?(D=o.r0+I,l>Math.PI/2&&(L="right")):L==="right"&&(D=o.r-I,l>Math.PI/2&&(L="left")),S.style.align=L,S.style.verticalAlign=g(m,"verticalAlign")||"middle",S.x=D*u+o.cx,S.y=D*v+o.cy;var M=g(m,"rotate"),P=0;M==="radial"?(P=-l,P<-Math.PI/2&&(P+=Math.PI)):M==="tangential"?(P=Math.PI/2-l,P>Math.PI/2?P-=Math.PI:P<-Math.PI/2&&(P+=Math.PI)):re(M)&&(P=M*Math.PI/180),S.rotation=P});function g(y,m){var x=y.get(m);return x==null?n.get(m):x}h.dirtyStyle()},e}(ve);const Fc=wC;var Ns="sunburstRootToNode",Hc="sunburstHighlight",AC="sunburstUnhighlight";function TC(a){a.registerAction({type:Ns,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},r);function r(i,n){var o=za(e,[Ns],i);if(o){var s=i.getViewRoot();s&&(e.direction=Sl(s,o.node)?"rollUp":"drillDown"),i.resetViewRoot(o.node)}}}),a.registerAction({type:Hc,update:"none"},function(e,t,r){e=H({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},i);function i(n){var o=za(e,[Hc],n);o&&(e.dataIndex=o.node.dataIndex)}wu("highlight","sunburstHighlight"),r.dispatchAction(H(e,{type:"highlight"}))}),a.registerAction({type:AC,update:"updateView"},function(e,t,r){e=H({},e),wu("downplay","sunburstUnhighlight"),r.dispatchAction(H(e,{type:"downplay"}))})}var CC=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i,n){var o=this;this.seriesModel=t,this.api=i,this.ecModel=r;var s=t.getData(),l=s.tree.root,u=t.getViewRoot(),v=this.group,c=t.get("renderLabelForZeroData"),h=[];u.eachNode(function(m){h.push(m)});var f=this._oldChildren||[];p(h,f),y(l,u),this._initEvents(),this._oldChildren=h;function p(m,x){if(m.length===0&&x.length===0)return;new Qe(x,m,S,S).add(_).update(_).remove(q(_,null)).execute();function S(b){return b.getId()}function _(b,w){var A=b==null?null:m[b],T=w==null?null:x[w];d(A,T)}}function d(m,x){if(!c&&m&&!m.getValue()&&(m=null),m!==l&&x!==l){if(x&&x.piece)m?(x.piece.updateData(!1,m,t,r,i),s.setItemGraphicEl(m.dataIndex,x.piece)):g(x);else if(m){var S=new Fc(m,t,r,i);v.add(S),s.setItemGraphicEl(m.dataIndex,S)}}}function g(m){!m||m.piece&&(v.remove(m.piece),m.piece=null)}function y(m,x){x.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,m,t,r,i):(o.virtualPiece=new Fc(m,t,r,i),v.add(o.virtualPiece)),x.piece.off("click"),o.virtualPiece.on("click",function(S){o._rootToNode(x.parentNode)})):o.virtualPiece&&(v.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(r){var i=!1,n=t.seriesModel.getViewRoot();n.eachNode(function(o){if(!i&&o.piece&&o.piece===r.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")t._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var v=l.get("target",!0)||"_blank";Hi(u,v)}}i=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Ns,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,r){var i=r.getData(),n=i.getItemLayout(0);if(n){var o=t[0]-n.cx,s=t[1]-n.cy,l=Math.sqrt(o*o+s*s);return l<=n.r&&l>=n.r0}},e.type="sunburst",e}(xt);const DC=CC;var IC=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,r){var i={name:t.name,children:t.data};xg(i);var n=this._levelModels=z(t.levels||[],function(l){return new Pt(l,this,r)},this),o=xl.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,v){var c=o.getNodeByDataIndex(v),h=n[c.depth];return h&&(u.parentModel=h),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var r=a.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return r.treePathInfo=Nn(i,this),r},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 r=this.getRawData().tree.root;(!t||t!==r&&!r.contains(t))&&(this._viewRoot=r)},e.prototype.enableAriaDecal=function(){Ad(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(At);function xg(a){var e=0;C(a.children,function(r){xg(r);var i=r.value;B(i)&&(i=i[0]),e+=i});var t=a.value;B(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),B(a.value)?a.value[0]=t:a.value=t}const LC=IC;var Wc=Math.PI/180;function MC(a,e,t){e.eachSeriesByType(a,function(r){var i=r.get("center"),n=r.get("radius");B(n)||(n=[0,n]),B(i)||(i=[i,i]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=G(i[0],o),v=G(i[1],s),c=G(n[0],l/2),h=G(n[1],l/2),f=-r.get("startAngle")*Wc,p=r.get("minAngle")*Wc,d=r.getData().tree.root,g=r.getViewRoot(),y=g.depth,m=r.get("sort");m!=null&&Sg(g,m);var x=0;C(g.children,function(E){!isNaN(E.getValue())&&x++});var S=g.getValue(),_=Math.PI/(S||x)*2,b=g.depth>0,w=g.height-(b?-1:1),A=(h-c)/(w||1),T=r.get("clockwise"),D=r.get("stillShowZeroSum"),I=T?1:-1,L=function(E,N){if(!!E){var V=N;if(E!==d){var O=E.getValue(),W=S===0&&D?_:O*_;W<p&&(W=p),V=N+I*W;var Z=E.depth-y-(b?-1:1),X=c+A*Z,Q=c+A*(Z+1),at=r.getLevelModel(E);if(at){var gt=at.get("r0",!0),pt=at.get("r",!0),et=at.get("radius",!0);et!=null&&(gt=et[0],pt=et[1]),gt!=null&&(X=G(gt,l/2)),pt!=null&&(Q=G(pt,l/2))}E.setLayout({angle:W,startAngle:N,endAngle:V,clockwise:T,cx:u,cy:v,r0:X,r:Q})}if(E.children&&E.children.length){var Y=0;C(E.children,function(ut){Y+=L(ut,N+Y)})}return V-N}};if(b){var M=c,P=c+A,R=Math.PI*2;d.setLayout({angle:R,startAngle:f,endAngle:f+R,clockwise:T,cx:u,cy:v,r0:M,r:P})}L(g,f)})}function Sg(a,e){var t=a.children||[];a.children=PC(t,e),t.length&&C(a.children,function(r){Sg(r,e)})}function PC(a,e){if(rt(e)){var t=z(a,function(i,n){var o=i.getValue();return{params:{depth:i.depth,height:i.height,dataIndex:i.dataIndex,getValue:function(){return o}},index:n}});return t.sort(function(i,n){return e(i.params,n.params)}),z(t,function(i){return a[i.index]})}else{var r=e==="asc";return a.sort(function(i,n){var o=(i.getValue()-n.getValue())*(r?1:-1);return o===0?(i.dataIndex-n.dataIndex)*(r?-1:1):o})}}function RC(a){var e={};function t(r,i,n){for(var o=r;o&&o.depth>1;)o=o.parentNode;var s=i.getColorFromPalette(o.name||o.dataIndex+"",e);return r.depth>1&&K(s)&&(s=Hm(s,(r.depth-1)/(n-1)*.5)),s}a.eachSeriesByType("sunburst",function(r){var i=r.getData(),n=i.tree;n.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,r,n.root.height));var u=i.ensureUniqueItemVisual(o.dataIndex,"style");H(u,l)})})}function kC(a){a.registerChartView(DC),a.registerSeriesModel(LC),a.registerLayout(q(MC,"sunburst")),a.registerProcessor(q(ri,"sunburst")),a.registerVisual(RC),TC(a)}var $c={color:"fill",borderColor:"stroke"},EC={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Re=Lt(),VC=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,r){return ze(null,this)},e.prototype.getDataParams=function(t,r,i){var n=a.prototype.getDataParams.call(this,t,r);return i&&(n.info=Re(i).info),n},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(At);const NC=VC;function OC(a,e){return e=e||[0,0],z(["x","y"],function(t,r){var i=this.getAxis(t),n=e[r],o=a[r]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(n-o)-i.dataToCoord(n+o))},this)}function zC(a){var e=a.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return a.dataToPoint(t)},size:$(OC,a)}}}function BC(a,e){return e=e||[0,0],z([0,1],function(t){var r=e[t],i=a[t]/2,n=[],o=[];return n[t]=r-i,o[t]=r+i,n[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(n)[t]-this.dataToPoint(o)[t])},this)}function GC(a){var e=a.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:a.getZoom()},api:{coord:function(t){return a.dataToPoint(t)},size:$(BC,a)}}}function FC(a,e){var t=this.getAxis(),r=e instanceof Array?e[0]:e,i=(a instanceof Array?a[0]:a)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(r-i)-t.dataToCoord(r+i))}function HC(a){var e=a.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return a.dataToPoint(t)},size:$(FC,a)}}}function WC(a,e){return e=e||[0,0],z(["Radius","Angle"],function(t,r){var i="get"+t+"Axis",n=this[i](),o=e[r],s=a[r]/2,l=n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(o-s)-n.dataToCoord(o+s));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function $C(a){var e=a.getRadiusAxis(),t=a.getAngleAxis(),r=e.getExtent();return r[0]>r[1]&&r.reverse(),{coordSys:{type:"polar",cx:a.cx,cy:a.cy,r:r[1],r0:r[0]},api:{coord:function(i){var n=e.dataToRadius(i[0]),o=t.dataToAngle(i[1]),s=a.coordToPoint([n,o]);return s.push(n,o*Math.PI/180),s},size:$(WC,a)}}}function ZC(a){var e=a.getRect(),t=a.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:a.getCellWidth(),cellHeight:a.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(r,i){return a.dataToPoint(r,i)}}}}var Zc={};function bg(a,e,t,r){return a&&(a.legacy||a.legacy!==!1&&!t&&!r&&e!=="tspan"&&(e==="text"||F(a,"text")))}function _g(a,e,t){var r=a,i,n,o;if(e==="text")o=r;else{o={},F(r,"text")&&(o.text=r.text),F(r,"rich")&&(o.rich=r.rich),F(r,"textFill")&&(o.fill=r.textFill),F(r,"textStroke")&&(o.stroke=r.textStroke),F(r,"fontFamily")&&(o.fontFamily=r.fontFamily),F(r,"fontSize")&&(o.fontSize=r.fontSize),F(r,"fontStyle")&&(o.fontStyle=r.fontStyle),F(r,"fontWeight")&&(o.fontWeight=r.fontWeight),n={type:"text",style:o,silent:!0},i={};var s=F(r,"textPosition");t?i.position=s?r.textPosition:"inside":s&&(i.position=r.textPosition),F(r,"textPosition")&&(i.position=r.textPosition),F(r,"textOffset")&&(i.offset=r.textOffset),F(r,"textRotation")&&(i.rotation=r.textRotation),F(r,"textDistance")&&(i.distance=r.textDistance)}return Uc(o,a),C(o.rich,function(l){Uc(l,l)}),{textConfig:i,textContent:n}}function Uc(a,e){!e||(e.font=e.textFont||e.font,F(e,"textStrokeWidth")&&(a.lineWidth=e.textStrokeWidth),F(e,"textAlign")&&(a.align=e.textAlign),F(e,"textVerticalAlign")&&(a.verticalAlign=e.textVerticalAlign),F(e,"textLineHeight")&&(a.lineHeight=e.textLineHeight),F(e,"textWidth")&&(a.width=e.textWidth),F(e,"textHeight")&&(a.height=e.textHeight),F(e,"textBackgroundColor")&&(a.backgroundColor=e.textBackgroundColor),F(e,"textPadding")&&(a.padding=e.textPadding),F(e,"textBorderColor")&&(a.borderColor=e.textBorderColor),F(e,"textBorderWidth")&&(a.borderWidth=e.textBorderWidth),F(e,"textBorderRadius")&&(a.borderRadius=e.textBorderRadius),F(e,"textBoxShadowColor")&&(a.shadowColor=e.textBoxShadowColor),F(e,"textBoxShadowBlur")&&(a.shadowBlur=e.textBoxShadowBlur),F(e,"textBoxShadowOffsetX")&&(a.shadowOffsetX=e.textBoxShadowOffsetX),F(e,"textBoxShadowOffsetY")&&(a.shadowOffsetY=e.textBoxShadowOffsetY))}function Yc(a,e,t){var r=a;r.textPosition=r.textPosition||t.position||"inside",t.offset!=null&&(r.textOffset=t.offset),t.rotation!=null&&(r.textRotation=t.rotation),t.distance!=null&&(r.textDistance=t.distance);var i=r.textPosition.indexOf("inside")>=0,n=a.fill||"#000";Xc(r,e);var o=r.textFill==null;return i?o&&(r.textFill=t.insideFill||"#fff",!r.textStroke&&t.insideStroke&&(r.textStroke=t.insideStroke),!r.textStroke&&(r.textStroke=n),r.textStrokeWidth==null&&(r.textStrokeWidth=2)):(o&&(r.textFill=a.fill||t.outsideFill||"#000"),!r.textStroke&&t.outsideStroke&&(r.textStroke=t.outsideStroke)),r.text=e.text,r.rich=e.rich,C(e.rich,function(s){Xc(s,s)}),r}function Xc(a,e){!e||(F(e,"fill")&&(a.textFill=e.fill),F(e,"stroke")&&(a.textStroke=e.fill),F(e,"lineWidth")&&(a.textStrokeWidth=e.lineWidth),F(e,"font")&&(a.font=e.font),F(e,"fontStyle")&&(a.fontStyle=e.fontStyle),F(e,"fontWeight")&&(a.fontWeight=e.fontWeight),F(e,"fontSize")&&(a.fontSize=e.fontSize),F(e,"fontFamily")&&(a.fontFamily=e.fontFamily),F(e,"align")&&(a.textAlign=e.align),F(e,"verticalAlign")&&(a.textVerticalAlign=e.verticalAlign),F(e,"lineHeight")&&(a.textLineHeight=e.lineHeight),F(e,"width")&&(a.textWidth=e.width),F(e,"height")&&(a.textHeight=e.height),F(e,"backgroundColor")&&(a.textBackgroundColor=e.backgroundColor),F(e,"padding")&&(a.textPadding=e.padding),F(e,"borderColor")&&(a.textBorderColor=e.borderColor),F(e,"borderWidth")&&(a.textBorderWidth=e.borderWidth),F(e,"borderRadius")&&(a.textBorderRadius=e.borderRadius),F(e,"shadowColor")&&(a.textBoxShadowColor=e.shadowColor),F(e,"shadowBlur")&&(a.textBoxShadowBlur=e.shadowBlur),F(e,"shadowOffsetX")&&(a.textBoxShadowOffsetX=e.shadowOffsetX),F(e,"shadowOffsetY")&&(a.textBoxShadowOffsetY=e.shadowOffsetY),F(e,"textShadowColor")&&(a.textShadowColor=e.textShadowColor),F(e,"textShadowBlur")&&(a.textShadowBlur=e.textShadowBlur),F(e,"textShadowOffsetX")&&(a.textShadowOffsetX=e.textShadowOffsetX),F(e,"textShadowOffsetY")&&(a.textShadowOffsetY=e.textShadowOffsetY))}function Kc(a,e){{var t=a+"^_^"+e;Zc[t]||(console.warn('[ECharts] DEPRECATED: "'+a+'" has been deprecated. '+e),Zc[t]=!0)}}var wg={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},qc=Ct(wg),en=up(Ea,function(a,e){return a[e]=1,a},{}),jc=Ea.join(", "),rn=["","style","shape","extra"],ra=Lt();function El(a,e,t,r,i){var n=a+"Animation",o=Ja(a,r,i)||{},s=ra(e).userDuring;return o.duration>0&&(o.during=s?$(qC,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=a),H(o,t[n]),o}function Ri(a,e,t,r){r=r||{};var i=r.dataIndex,n=r.isInit,o=r.clearStyle,s=t.isAnimationEnabled(),l=ra(a),u=e.style;l.userDuring=e.during;var v={},c={};if(JC(a,e,c),Qc("shape",e,c),Qc("extra",e,c),!n&&s&&(jC(a,e,v),Jc("shape",a,e,v),Jc("extra",a,e,v),QC(a,e,u,v)),c.style=u,UC(a,c,o),XC(a,e),s)if(n){var h={};C(rn,function(p){var d=p?e[p]:e;d&&d.enterFrom&&(p&&(h[p]=h[p]||{}),H(p?h[p]:h,d.enterFrom))});var f=El("enter",a,e,t,i);f.duration>0&&a.animateFrom(h,f)}else YC(a,e,i||0,t,v);Ag(a,e),u?a.dirty():a.markRedraw()}function Ag(a,e){for(var t=ra(a).leaveToProps,r=0;r<rn.length;r++){var i=rn[r],n=i?e[i]:e;n&&n.leaveTo&&(t||(t=ra(a).leaveToProps={}),i&&(t[i]=t[i]||{}),H(i?t[i]:t,n.leaveTo))}}function Bn(a,e,t,r){if(a){var i=a.parent,n=ra(a).leaveToProps;if(n){var o=El("update",a,e,t,0);o.done=function(){i.remove(a),r&&r()},a.animateTo(n,o)}else i.remove(a),r&&r()}}function Sr(a){return a==="all"}function UC(a,e,t){var r=e.style;if(!a.isGroup&&r){if(t){a.useStyle({});for(var i=a.animators,n=0;n<i.length;n++){var o=i[n];o.targetName==="style"&&o.changeTarget(a.style)}}a.setStyle(r)}e&&(e.style=null,e&&a.attr(e),e.style=r)}function YC(a,e,t,r,i){if(i){var n=El("update",a,e,r,t);n.duration>0&&a.animateFrom(i,n)}}function XC(a,e){F(e,"silent")&&(a.silent=e.silent),F(e,"ignore")&&(a.ignore=e.ignore),a instanceof jr&&F(e,"invisible")&&(a.invisible=e.invisible),a instanceof Dt&&F(e,"autoBatch")&&(a.autoBatch=e.autoBatch)}var be={},KC={setTransform:function(a,e){return dt(F(en,a),"Only "+jc+" available in `setTransform`."),be.el[a]=e,this},getTransform:function(a){return dt(F(en,a),"Only "+jc+" available in `getTransform`."),be.el[a]},setShape:function(a,e){Rr(a);var t=be.el,r=t.shape||(t.shape={});return r[a]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(a){Rr(a);var e=be.el.shape;if(e)return e[a]},setStyle:function(a,e){Rr(a);var t=be.el,r=t.style;return r&&(gp(e)&&de("style."+a+" must not be assigned with NaN."),r[a]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(a){Rr(a);var e=be.el.style;if(e)return e[a]},setExtra:function(a,e){Rr(a);var t=be.el.extra||(be.el.extra={});return t[a]=e,this},getExtra:function(a){Rr(a);var e=be.el.extra;if(e)return e[a]}};function Rr(a){if(a==="transition"||a==="enterFrom"||a==="leaveTo")throw new Error('key must not be "'+a+'"')}function qC(){var a=this,e=a.el;if(!!e){var t=ra(e).userDuring,r=a.userDuring;if(t!==r){a.el=a.userDuring=null;return}be.el=e,r(KC)}}function Jc(a,e,t,r){var i=t[a];if(!!i){var n=e[a],o;if(n){var s=t.transition,l=i.transition;if(l)if(!o&&(o=r[a]={}),Sr(l))H(o,n);else for(var u=jt(l),v=0;v<u.length;v++){var c=u[v],h=n[c];o[c]=h}else if(Sr(s)||yt(s,a)>=0){!o&&(o=r[a]={});for(var f=Ct(n),v=0;v<f.length;v++){var c=f[v],h=n[c];tD(i[c],h)&&(o[c]=h)}}}}}function Qc(a,e,t){var r=e[a];if(!!r)for(var i=t[a]={},n=Ct(r),o=0;o<n.length;o++){var s=n[o];i[s]=Wm(r[s])}}function jC(a,e,t){for(var r=e.transition,i=Sr(r)?Ea:jt(r||[]),n=0;n<i.length;n++){var o=i[n];if(!(o==="style"||o==="shape"||o==="extra")){var s=a[o];Tg(o,"el.transition"),t[o]=s}}}function JC(a,e,t){for(var r=0;r<qc.length;r++){var i=qc[r],n=wg[i],o=e[i];o&&(t[n[0]]=o[0],t[n[1]]=o[1])}for(var r=0;r<Ea.length;r++){var s=Ea[r];e[s]!=null&&(t[s]=e[s])}}function QC(a,e,t,r){if(!!t){var i=a.style,n;if(i){var o=t.transition,s=e.transition;if(o&&!Sr(o)){var l=jt(o);!n&&(n=r.style={});for(var u=0;u<l.length;u++){var v=l[u],c=i[v];n[v]=c}}else if(a.getAnimationStyleProps&&(Sr(s)||Sr(o)||yt(s,"style")>=0)){var h=a.getAnimationStyleProps(),f=h?h.style:null;if(f){!n&&(n=r.style={});for(var p=Ct(t),u=0;u<p.length;u++){var v=p[u];if(f[v]){var c=i[v];n[v]=c}}}}}}}function tD(a,e){return mp(a)?a!==e:a!=null&&isFinite(a)}var Tg;Tg=function(a,e){F(en,a)||de("Prop `"+a+"` is not a permitted in `"+e+"`. Only `"+Ct(en).join("`, `")+"` are permitted.")};var Cg=Lt(),eD=["percent","easing","shape","style","extra"];function Dg(a){a.stopAnimation("keyframe"),a.attr(Cg(a))}function an(a,e,t){if(!(!t.isAnimationEnabled()||!e)){if(B(e)){C(e,function(s){an(a,s,t)});return}var r=e.keyframes,i=e.duration;if(t&&i==null){var n=Ja("enter",t,0);i=n&&n.duration}if(!(!r||!i)){var o=Cg(a);C(rn,function(s){if(!(s&&!a[s])){var l,u=!1;r.sort(function(v,c){return v.percent-c.percent}),C(r,function(v){var c=a.animators,h=s?v[s]:v;if(v.percent>=1&&(u=!0),!!h){var f=Ct(h);if(s||(f=te(f,function(g){return yt(eD,g)<0})),!!f.length){l||(l=a.animate(s,e.loop,!0),l.scope="keyframe");for(var p=0;p<c.length;p++)c[p]!==l&&c[p].targetName===l.targetName&&c[p].stopTracks(f);s&&(o[s]=o[s]||{});var d=s?o[s]:o;C(f,function(g){d[g]=((s?a[s]:a)||{})[g]}),l.whenWithKeys(i*v.percent,h,f,v.easing)}}}),l&&(u||de("End frame with percent: 1 is missing in the keyframeAnimation.",!0),l.delay(e.delay||0).duration(i).start(e.easing))}})}}}var ke="emphasis",Ye="normal",Vl="blur",Nl="select",er=[Ye,ke,Vl,Nl],Oo={normal:["itemStyle"],emphasis:[ke,"itemStyle"],blur:[Vl,"itemStyle"],select:[Nl,"itemStyle"]},zo={normal:["label"],emphasis:[ke,"label"],blur:[Vl,"label"],select:[Nl,"label"]},rD=["x","y"],aD="e\0\0",oe={normal:{},emphasis:{},blur:{},select:{}},th={cartesian2d:zC,geo:GC,singleAxis:HC,polar:$C,calendar:ZC};function nn(a){return a instanceof Dt}function Os(a){return a instanceof jr}function iD(a,e){e.copyTransform(a),Os(e)&&Os(a)&&(e.setStyle(a.style),e.z=a.z,e.z2=a.z2,e.zlevel=a.zlevel,e.invisible=a.invisible,e.ignore=a.ignore,nn(e)&&nn(a)&&e.setShape(a.shape))}var nD=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i,n){this._progressiveEls=null;var o=this._data,s=t.getData(),l=this.group,u=eh(t,s,r,i);o||l.removeAll(),s.diff(o).add(function(c){Bo(i,null,c,u(c,n),t,l,s)}).remove(function(c){var h=o.getItemGraphicEl(c);Bn(h,Re(h).option,t)}).update(function(c,h){var f=o.getItemGraphicEl(h);Bo(i,f,c,u(c,n),t,l,s)}).execute();var v=t.get("clip",!0)?kn(t.coordinateSystem,!1,t):null;v?l.setClipPath(v):l.removeClipPath(),this._data=s},e.prototype.incrementalPrepareRender=function(t,r,i){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,r,i,n,o){var s=r.getData(),l=eh(r,s,i,n),u=this._progressiveEls=[];function v(f){f.isGroup||(f.incremental=!0,f.ensureState("emphasis").hoverLayer=!0)}for(var c=t.start;c<t.end;c++){var h=Bo(null,null,c,l(c,o),r,this.group,s);h&&(h.traverse(v),u.push(h))}},e.prototype.eachRendered=function(t){na(this._progressiveEls||this.group,t)},e.prototype.filterForExposedEvent=function(t,r,i,n){var o=r.element;if(o==null||i.name===o)return!0;for(;(i=i.__hostTarget||i.parent)&&i!==this.group;)if(i.name===o)return!0;return!1},e.type="custom",e}(xt);const oD=nD;function Ol(a){var e=a.type,t;if(e==="path"){var r=a.shape,i=r.width!=null&&r.height!=null?{x:r.x||0,y:r.y||0,width:r.width,height:r.height}:null,n=Mg(r);t=Um(n,null,i,r.layout||"center"),Re(t).customPathData=n}else if(e==="image")t=new ye({}),Re(t).customImagePath=a.style.image;else if(e==="text")t=new lt({});else if(e==="group")t=new U;else{if(e==="compoundPath")throw new Error('"compoundPath" is not supported yet.');var o=xp(e);if(!o){var s="";s='graphic type "'+e+'" can not be found.',_t(s)}t=new o}return Re(t).customGraphicType=e,t.name=a.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function zl(a,e,t,r,i,n,o){Dg(e);var s=i&&i.normal.cfg;s&&e.setTextConfig(s),r&&r.transition==null&&(r.transition=rD);var l=r&&r.style;if(l){if(e.type==="text"){var u=l;F(u,"textFill")&&(u.fill=u.textFill),F(u,"textStroke")&&(u.stroke=u.textStroke)}var v=void 0,c=nn(e)?l.decal:null;a&&c&&(c.dirty=!0,v=rl(c,a)),l.__decalPattern=v}if(Os(e)&&l){var v=l.__decalPattern;v&&(l.decal=v)}Ri(e,r,n,{dataIndex:t,isInit:o,clearStyle:!0}),an(e,r.keyframeAnimation,n)}function Ig(a,e,t,r,i){var n=e.isGroup?null:e,o=i&&i[a].cfg;if(n){var s=n.ensureState(a);if(r===!1){var l=n.getState(a);l&&(l.style=null)}else s.style=r||null;o&&(s.textConfig=o),Jr(n)}}function sD(a,e,t){if(!a.isGroup){var r=a,i=t.currentZ,n=t.currentZLevel;r.z=i,r.zlevel=n;var o=e.z2;o!=null&&(r.z2=o||0);for(var s=0;s<er.length;s++)lD(r,e,er[s])}}function lD(a,e,t){var r=t===Ye,i=r?e:on(e,t),n=i?i.z2:null,o;n!=null&&(o=r?a:a.ensureState(t),o.z2=n||0)}function eh(a,e,t,r){var i=a.get("renderItem"),n=a.coordinateSystem,o={};n&&(dt(i,"series.render is required."),dt(n.prepareCustoms||th[n.type],"This coordSys does not support custom series."),o=n.prepareCustoms?n.prepareCustoms(n):th[n.type](n));for(var s=j({getWidth:r.getWidth,getHeight:r.getHeight,getZr:r.getZr,getDevicePixelRatio:r.getDevicePixelRatio,value:S,style:b,ordinalRawValue:_,styleEmphasis:w,visual:D,barLayout:I,currentSeriesIndices:L,font:M},o.api||{}),l={context:{},seriesId:a.id,seriesName:a.name,seriesIndex:a.seriesIndex,coordSys:o.coordSys,dataInsideLength:e.count(),encode:uD(a.getData())},u,v,c={},h={},f={},p={},d=0;d<er.length;d++){var g=er[d];f[g]=a.getModel(Oo[g]),p[g]=a.getModel(zo[g])}function y(P){return P===u?v||(v=e.getItemModel(P)):e.getItemModel(P)}function m(P,R){return e.hasItemOption?P===u?c[R]||(c[R]=y(P).getModel(Oo[R])):y(P).getModel(Oo[R]):f[R]}function x(P,R){return e.hasItemOption?P===u?h[R]||(h[R]=y(P).getModel(zo[R])):y(P).getModel(zo[R]):p[R]}return function(P,R){return u=P,v=null,c={},h={},i&&i(j({dataIndexInside:P,dataIndex:e.getRawIndex(P),actionType:R?R.type:null},l),s)};function S(P,R){return R==null&&(R=u),e.getStore().get(e.getDimensionIndex(P||0),R)}function _(P,R){R==null&&(R=u),P=P||0;var E=e.getDimensionInfo(P);if(!E){var N=e.getDimensionIndex(P);return N>=0?e.getStore().get(N,R):void 0}var V=e.get(E.name,R),O=E&&E.ordinalMeta;return O?O.categories[V]:V}function b(P,R){Kc("api.style","Please write literal style directly instead."),R==null&&(R=u);var E=e.getItemVisual(R,"style"),N=E&&E.fill,V=E&&E.opacity,O=m(R,Ye).getItemStyle();N!=null&&(O.fill=N),V!=null&&(O.opacity=V);var W={inheritColor:K(N)?N:"#000"},Z=x(R,Ye),X=Rt(Z,null,W,!1,!0);X.text=Z.getShallow("show")?Ft(a.getFormattedLabel(R,Ye),Qr(e,R)):null;var Q=Au(Z,W,!1);return T(P,O),O=Yc(O,X,Q),P&&A(O,P),O.legacy=!0,O}function w(P,R){Kc("api.styleEmphasis","Please write literal style directly instead."),R==null&&(R=u);var E=m(R,ke).getItemStyle(),N=x(R,ke),V=Rt(N,null,null,!0,!0);V.text=N.getShallow("show")?Ar(a.getFormattedLabel(R,ke),a.getFormattedLabel(R,Ye),Qr(e,R)):null;var O=Au(N,null,!0);return T(P,E),E=Yc(E,V,O),P&&A(E,P),E.legacy=!0,E}function A(P,R){for(var E in R)F(R,E)&&(P[E]=R[E])}function T(P,R){P&&(P.textFill&&(R.textFill=P.textFill),P.textPosition&&(R.textPosition=P.textPosition))}function D(P,R){if(R==null&&(R=u),F($c,P)){var E=e.getItemVisual(R,"style");return E?E[$c[P]]:null}if(F(EC,P))return e.getItemVisual(R,P)}function I(P){if(n.type==="cartesian2d"){var R=n.getBaseAxis();return $m(j({axis:R},P))}}function L(){return t.getCurrentSeriesIndices()}function M(P){return Zm(P,t)}}function uD(a){var e={};return C(a.dimensions,function(t){var r=a.getDimensionInfo(t);if(!r.isExtraCoord){var i=r.coordDim,n=e[i]=e[i]||[];n[r.coordDimIndex]=a.getDimensionIndex(t)}}),e}function Bo(a,e,t,r,i,n,o){if(!r){n.remove(e);return}var s=Bl(a,e,t,r,i,n);return s&&o.setItemGraphicEl(t,s),s&&bt(s,r.focus,r.blurScope,r.emphasisDisabled),s}function Bl(a,e,t,r,i,n){dt(r,"should not have an null/undefined element setting");var o=-1,s=e;e&&Lg(e,r,i)&&(o=yt(n.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=Ol(r),s&&iD(s,u)),r.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),oe.normal.cfg=oe.normal.conOpt=oe.emphasis.cfg=oe.emphasis.conOpt=oe.blur.cfg=oe.blur.conOpt=oe.select.cfg=oe.select.conOpt=null,oe.isLegacy=!1,cD(u,t,r,i,l,oe),vD(u,t,r,i,l),zl(a,u,t,r,oe,i,l),F(r,"info")&&(Re(u).info=r.info);for(var v=0;v<er.length;v++){var c=er[v];if(c!==Ye){var h=on(r,c),f=Gl(r,h,c);Ig(c,u,h,f,oe)}}return sD(u,r,i),r.type==="group"&&hD(a,u,t,r,i),o>=0?n.replaceAt(u,o):n.add(u),u}function Lg(a,e,t){var r=Re(a),i=e.type,n=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||i!=null&&i!==r.customGraphicType||i==="path"&&dD(n)&&Mg(n)!==r.customPathData||i==="image"&&F(o,"image")&&o.image!==r.customImagePath}function vD(a,e,t,r,i){var n=t.clipPath;if(n===!1)a&&a.getClipPath()&&a.removeClipPath();else if(n){var o=a.getClipPath();o&&Lg(o,n,r)&&(o=null),o||(o=Ol(n),dt(nn(o),"Only any type of `path` can be used in `clipPath`, rather than "+o.type+"."),a.setClipPath(o)),zl(null,o,e,n,null,r,i)}}function cD(a,e,t,r,i,n){if(!a.isGroup){rh(t,null,n),rh(t,ke,n);var o=n.normal.conOpt,s=n.emphasis.conOpt,l=n.blur.conOpt,u=n.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var v=a.getTextContent();if(o===!1)v&&a.removeTextContent();else{o=n.normal.conOpt=o||{type:"text"},v?v.clearStates():(v=Ol(o),a.setTextContent(v)),zl(null,v,e,o,null,r,i);for(var c=o&&o.style,h=0;h<er.length;h++){var f=er[h];if(f!==Ye){var p=n[f].conOpt;Ig(f,v,p,Gl(o,p,f),null)}}c?v.dirty():v.markRedraw()}}}}function rh(a,e,t){var r=e?on(a,e):a,i=e?Gl(a,r,ke):a.style,n=a.type,o=r?r.textConfig:null,s=a.textContent,l=s?e?on(s,e):s:null;if(i&&(t.isLegacy||bg(i,n,!!o,!!l))){t.isLegacy=!0;var u=_g(i,n,!e);!o&&u.textConfig&&(o=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var v=l;!v.type&&(v.type="text"),dt(v.type==="text",'textContent.type must be "text"')}var c=e?t[e]:t.normal;c.cfg=o,c.conOpt=l}function on(a,e){return e?a?a[e]:null:a}function Gl(a,e,t){var r=e&&e.style;return r==null&&t===ke&&a&&(r=a.styleEmphasis),r}function hD(a,e,t,r,i){var n=r.children,o=n?n.length:0,s=r.$mergeChildren,l=s==="byName"||r.diffChildrenByName,u=s===!1;if(!(!o&&!l&&!u)){if(l){fD({api:a,oldChildren:e.children()||[],newChildren:n||[],dataIndex:t,seriesModel:i,group:e});return}u&&e.removeAll();for(var v=0;v<o;v++)n[v]&&Bl(a,e.childAt(v),t,n[v],i,e);for(var c=e.childCount()-1;c>=v;c--){var h=e.childAt(c);Bn(h,Re(e).option,i)}}}function fD(a){new Qe(a.oldChildren,a.newChildren,ah,ah,a).add(ih).update(ih).remove(pD).execute()}function ah(a,e){var t=a&&a.name;return t!=null?t:aD+e}function ih(a,e){var t=this.context,r=a!=null?t.newChildren[a]:null,i=e!=null?t.oldChildren[e]:null;Bl(t.api,i,t.dataIndex,r,t.seriesModel,t.group)}function pD(a){var e=this.context,t=e.oldChildren[a];Bn(t,Re(t).option,e.seriesModel)}function Mg(a){return a&&(a.pathData||a.d)}function dD(a){return a&&(F(a,"pathData")||F(a,"d"))}function gD(a){a.registerChartView(oD),a.registerSeriesModel(NC)}var hr=Lt(),nh=nt,Go=$,yD=function(){function a(){this._dragging=!1,this.animationThreshold=15}return a.prototype.render=function(e,t,r,i){var n=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=r,!(!i&&this._lastValue===n&&this._lastStatus===o)){this._lastValue=n,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,n,e,t,r);var v=u.graphicKey;v!==this._lastGraphicKey&&this.clear(r),this._lastGraphicKey=v;var c=this._moveAnimation=this.determineAnimation(e,t);if(!s)s=this._group=new U,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),r.getZr().add(s);else{var h=q(oh,t,c);this.updatePointerEl(s,u,h),this.updateLabelEl(s,u,h,t)}lh(s,t,!0),this._renderHandle(n)}},a.prototype.remove=function(e){this.clear(e)},a.prototype.dispose=function(e){this.clear(e)},a.prototype.determineAnimation=function(e,t){var r=t.get("animation"),i=e.axis,n=i.type==="category",o=t.get("snap");if(!o&&!n)return!1;if(r==="auto"||r==null){var s=this.animationThreshold;if(n&&i.getBandWidth()>s)return!0;if(o){var l=fl(e).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return r===!0},a.prototype.makeElOption=function(e,t,r,i,n){},a.prototype.createPointerEl=function(e,t,r,i){var n=t.pointer;if(n){var o=hr(e).pointerEl=new qa[n.type](nh(t.pointer));e.add(o)}},a.prototype.createLabelEl=function(e,t,r,i){if(t.label){var n=hr(e).labelEl=new lt(nh(t.label));e.add(n),sh(n,i)}},a.prototype.updatePointerEl=function(e,t,r){var i=hr(e).pointerEl;i&&t.pointer&&(i.setStyle(t.pointer.style),r(i,{shape:t.pointer.shape}))},a.prototype.updateLabelEl=function(e,t,r,i){var n=hr(e).labelEl;n&&(n.setStyle(t.label.style),r(n,{x:t.label.x,y:t.label.y}),sh(n,i))},a.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,r=this._api.getZr(),i=this._handle,n=t.getModel("handle"),o=t.get("status");if(!n.get("show")||!o||o==="hide"){i&&r.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=Ln(n.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){je(u.event)},onmousedown:Go(this._onHandleDragMove,this,0,0),drift:Go(this._onHandleDragMove,this),ondragend:Go(this._onHandleDragEnd,this)}),r.add(i)),lh(i,t,!1),i.setStyle(n.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=n.get("size");B(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,sa(this,"_doDispatchAxisPointer",n.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},a.prototype._moveHandleToValue=function(e,t){oh(this._axisPointerModel,!t&&this._moveAnimation,this._handle,Fo(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},a.prototype._onHandleDragMove=function(e,t){var r=this._handle;if(!!r){this._dragging=!0;var i=this.updateHandleTransform(Fo(r),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=i,r.stopAnimation(),r.attr(Fo(i)),hr(r).lastProp=null,this._doDispatchAxisPointer()}},a.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(!!e){var t=this._payloadInfo,r=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:r.axis.dim,axisIndex:r.componentIndex}]})}},a.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(!!e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},a.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),r=this._group,i=this._handle;t&&r&&(this._lastGraphicKey=null,r&&t.remove(r),i&&t.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),ka(this,"_doDispatchAxisPointer")},a.prototype.doClear=function(){},a.prototype.buildLabel=function(e,t,r){return r=r||0,{x:e[r],y:e[1-r],width:t[r],height:t[1-r]}},a}();function oh(a,e,t,r){Pg(hr(t).lastProp,r)||(hr(t).lastProp=r,e?ot(t,r,a):(t.stopAnimation(),t.attr(r)))}function Pg(a,e){if(St(a)&&St(e)){var t=!0;return C(e,function(r,i){t=t&&Pg(a[i],r)}),!!t}else return a===e}function sh(a,e){a[e.get(["label","show"])?"show":"hide"]()}function Fo(a){return{x:a.x||0,y:a.y||0,rotation:a.rotation||0}}function lh(a,e,t){var r=e.get("z"),i=e.get("zlevel");a&&a.traverse(function(n){n.type!=="group"&&(r!=null&&(n.z=r),i!=null&&(n.zlevel=i),n.silent=t)})}const Fl=yD;function Hl(a){var e=a.get("type"),t=a.getModel(e+"Style"),r;return e==="line"?(r=t.getLineStyle(),r.fill=null):e==="shadow"&&(r=t.getAreaStyle(),r.stroke=null),r}function Rg(a,e,t,r,i){var n=t.get("value"),o=kg(n,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=Mn(s.get("padding")||0),u=s.getFont(),v=ol(o,u),c=i.position,h=v.width+l[1]+l[3],f=v.height+l[0]+l[2],p=i.align;p==="right"&&(c[0]-=h),p==="center"&&(c[0]-=h/2);var d=i.verticalAlign;d==="bottom"&&(c[1]-=f),d==="middle"&&(c[1]-=f/2),mD(c,h,f,r);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=e.get(["axisLine","lineStyle","color"])),a.label={x:c[0],y:c[1],style:Rt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function mD(a,e,t,r){var i=r.getWidth(),n=r.getHeight();a[0]=Math.min(a[0]+e,i)-e,a[1]=Math.min(a[1]+t,n)-t,a[0]=Math.max(a[0],0),a[1]=Math.max(a[1],0)}function kg(a,e,t,r,i){a=e.scale.parse(a);var n=e.scale.getLabel({value:a},{precision:i.precision}),o=i.formatter;if(o){var s={value:Sp(e,{value:a}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};C(r,function(l){var u=t.getSeriesByIndex(l.seriesIndex),v=l.dataIndexInside,c=u&&u.getDataParams(v);c&&s.seriesData.push(c)}),K(o)?n=o.replace("{value}",n):rt(o)&&(n=o(s))}return n}function Wl(a,e,t){var r=Tr();return oa(r,r,t.rotation),Je(r,r,t.position),Me([a.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],r)}function Eg(a,e,t,r,i,n){var o=Ne.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=i.get(["label","margin"]),Rg(e,r,i,n,{position:Wl(r.axis,a,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function $l(a,e,t){return t=t||0,{x1:a[t],y1:a[1-t],x2:e[t],y2:e[1-t]}}function Vg(a,e,t){return t=t||0,{x:a[t],y:a[1-t],width:e[t],height:e[1-t]}}function uh(a,e,t,r,i,n){return{cx:a,cy:e,r0:t,r,startAngle:i,endAngle:n,clockwise:!0}}var xD=function(a){k(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,r,i,n,o){var s=i.axis,l=s.grid,u=n.get("type"),v=vh(l,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(r,!0));if(u&&u!=="none"){var h=Hl(n),f=SD[u](s,c,v);f.style=h,t.graphicKey=f.type,t.pointer=f}var p=Ss(l.model,i);Eg(r,t,p,i,n,o)},e.prototype.getHandleTransform=function(t,r,i){var n=Ss(r.axis.grid.model,r,{labelInside:!1});n.labelMargin=i.get(["handle","margin"]);var o=Wl(r.axis,t,n);return{x:o[0],y:o[1],rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,r,i,n){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=vh(s,o).getOtherAxis(o).getGlobalExtent(),v=o.dim==="x"?0:1,c=[t.x,t.y];c[v]+=r[v],c[v]=Math.min(l[1],c[v]),c[v]=Math.max(l[0],c[v]);var h=(u[1]+u[0])/2,f=[h,h];f[v]=c[v];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:c[0],y:c[1],rotation:t.rotation,cursorPoint:f,tooltipOption:p[v]}},e}(Fl);function vh(a,e){var t={};return t[e.dim+"AxisIndex"]=e.index,a.getCartesian(t)}var SD={line:function(a,e,t){var r=$l([e,t[0]],[e,t[1]],ch(a));return{type:"Line",subPixelOptimize:!0,shape:r}},shadow:function(a,e,t){var r=Math.max(1,a.getBandWidth()),i=t[1]-t[0];return{type:"Rect",shape:Vg([e-r/2,t[0]],[r,i],ch(a))}}};function ch(a){return a.dim==="x"?0:1}const bD=xD;var _D=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(It);const wD=_D;var Le=Lt(),AD=C;function Ng(a,e,t){if(!qt.node){var r=e.getZr();Le(r).records||(Le(r).records={}),TD(r,e);var i=Le(r).records[a]||(Le(r).records[a]={});i.handler=t}}function TD(a,e){if(Le(a).initialized)return;Le(a).initialized=!0,t("click",q(hh,"click")),t("mousemove",q(hh,"mousemove")),t("globalout",DD);function t(r,i){a.on(r,function(n){var o=ID(e);AD(Le(a).records,function(s){s&&i(s,n,o.dispatchAction)}),CD(o.pendings,e)})}}function CD(a,e){var t=a.showTip.length,r=a.hideTip.length,i;t?i=a.showTip[t-1]:r&&(i=a.hideTip[r-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function DD(a,e,t){a.handler("leave",null,t)}function hh(a,e,t,r){e.handler(a,t,r)}function ID(a){var e={showTip:[],hideTip:[]},t=function(r){var i=e[r.type];i?i.push(r):(r.dispatchAction=t,a.dispatchAction(r))};return{dispatchAction:t,pendings:e}}function zs(a,e){if(!qt.node){var t=e.getZr(),r=(Le(t).records||{})[a];r&&(Le(t).records[a]=null)}}var LD=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){var n=r.getComponent("tooltip"),o=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";Ng("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(t,r){zs("axisPointer",r)},e.prototype.dispose=function(t,r){zs("axisPointer",r)},e.type="axisPointer",e}(Et);const MD=LD;function Og(a,e){var t=[],r=a.seriesIndex,i;if(r==null||!(i=e.getSeriesByIndex(r)))return{point:[]};var n=i.getData(),o=ss(n,a);if(o==null||o<0||B(o))return{point:[]};var s=n.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)t=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(a.isStacked){var u=l.getBaseAxis(),v=l.getOtherAxis(u),c=v.dim,h=u.dim,f=c==="x"||c==="radius"?1:0,p=n.mapDimension(h),d=[];d[f]=n.get(p,o),d[1-f]=n.get(n.getCalculationInfo("stackResultDimension"),o),t=l.dataToPoint(d)||[]}else t=l.dataToPoint(n.getValues(z(l.dimensions,function(y){return n.mapDimension(y)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),t=[g.x+g.width/2,g.y+g.height/2]}return{point:t,el:s}}var fh=Lt();function PD(a,e,t){var r=a.currTrigger,i=[a.x,a.y],n=a,o=a.dispatchAction||$(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(!!s){ki(i)&&(i=Og({seriesIndex:n.seriesIndex,dataIndex:n.dataIndex},e).point);var l=ki(i),u=n.axesInfo,v=s.axesInfo,c=r==="leave"||ki(i),h={},f={},p={list:[],map:{}},d={showPointer:q(kD,f),showTooltip:q(ED,p)};C(s.coordSysMap,function(y,m){var x=l||y.containPoint(i);C(s.coordSysAxesInfo[m],function(S,_){var b=S.axis,w=zD(u,S);if(!c&&x&&(!u||w)){var A=w&&w.value;A==null&&!l&&(A=b.pointToData(i)),A!=null&&ph(S,A,d,!1,h)}})});var g={};return C(v,function(y,m){var x=y.linkGroup;x&&!f[m]&&C(x.axesInfo,function(S,_){var b=f[_];if(S!==y&&b){var w=b.value;x.mapper&&(w=y.axis.scale.parse(x.mapper(w,dh(S),dh(y)))),g[y.key]=w}})}),C(g,function(y,m){ph(v[m],y,d,!0,h)}),VD(f,v,h),ND(p,i,a,o),OD(v,o,t),h}}function ph(a,e,t,r,i){var n=a.axis;if(!(n.scale.isBlank()||!n.containData(e))){if(!a.involveSeries){t.showPointer(a,e);return}var o=RD(e,a),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&H(i,s[0]),!r&&a.snap&&n.containData(l)&&l!=null&&(e=l),t.showPointer(a,e,s),t.showTooltip(a,o,l)}}function RD(a,e){var t=e.axis,r=t.dim,i=a,n=[],o=Number.MAX_VALUE,s=-1;return C(e.seriesModels,function(l,u){var v=l.getData().mapDimensionsAll(r),c,h;if(l.getAxisTooltipData){var f=l.getAxisTooltipData(v,a,t);h=f.dataIndices,c=f.nestestValue}else{if(h=l.getData().indicesOfNearest(v[0],a,t.type==="category"?.5:null),!h.length)return;c=l.getData().get(v[0],h[0])}if(!(c==null||!isFinite(c))){var p=a-c,d=Math.abs(p);d<=o&&((d<o||p>=0&&s<0)&&(o=d,s=p,i=c,n.length=0),C(h,function(g){n.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:n,snapToValue:i}}function kD(a,e,t,r){a[e.key]={value:t,payloadBatch:r}}function ED(a,e,t,r){var i=t.payloadBatch,n=e.axis,o=n.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!i.length)){var l=e.coordSys.model,u=Oa(l),v=a.map[u];v||(v=a.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},a.list.push(v)),v.dataByAxis.push({axisDim:n.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function VD(a,e,t){var r=t.axesInfo=[];C(e,function(i,n){var o=i.axisPointerModel.option,s=a[n];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&r.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function ND(a,e,t,r){if(ki(e)||!a.list.length){r({type:"hideTip"});return}var i=((a.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:a.list})}function OD(a,e,t){var r=t.getZr(),i="axisPointerLastHighlights",n=fh(r)[i]||{},o=fh(r)[i]={};C(a,function(u,v){var c=u.axisPointerModel.option;c.status==="show"&&C(c.seriesDataIndices,function(h){var f=h.seriesIndex+" | "+h.dataIndex;o[f]=h})});var s=[],l=[];C(n,function(u,v){!o[v]&&l.push(u)}),C(o,function(u,v){!n[v]&&s.push(u)}),l.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function zD(a,e){for(var t=0;t<(a||[]).length;t++){var r=a[t];if(e.axis.dim===r.axisDim&&e.axis.model.componentIndex===r.axisIndex)return r}}function dh(a){var e=a.axis.model,t={},r=t.axisDim=a.axis.dim;return t.axisIndex=t[r+"AxisIndex"]=e.componentIndex,t.axisName=t[r+"AxisName"]=e.name,t.axisId=t[r+"AxisId"]=e.id,t}function ki(a){return!a||a[0]==null||isNaN(a[0])||a[1]==null||isNaN(a[1])}function oi(a){Cr.registerAxisPointerClass("CartesianAxisPointer",bD),a.registerComponentModel(wD),a.registerComponentView(MD),a.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!B(t)&&(e.axisPointer.link=[t])}}),a.registerProcessor(a.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=OS(e,t)}),a.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},PD)}function BD(a){J(cd),J(oi)}var GD=function(a){k(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,r,i,n,o){var s=i.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),v=u.getExtent(),c=s.dataToCoord(r),h=n.get("type");if(h&&h!=="none"){var f=Hl(n),p=HD[h](s,l,c,v);p.style=f,t.graphicKey=p.type,t.pointer=p}var d=n.get(["label","margin"]),g=FD(r,i,n,l,d);Rg(t,i,n,o,g)},e}(Fl);function FD(a,e,t,r,i){var n=e.axis,o=n.dataToCoord(a),s=r.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=r.getRadiusAxis().getExtent(),u,v,c;if(n.dim==="radius"){var h=Tr();oa(h,h,s),Je(h,h,[r.cx,r.cy]),u=Me([o,-i],h);var f=e.getModel("axisLabel").get("rotate")||0,p=Ne.innerTextLayout(s,f*Math.PI/180,-1);v=p.textAlign,c=p.textVerticalAlign}else{var d=l[1];u=r.coordToPoint([d+i,o]);var g=r.cx,y=r.cy;v=Math.abs(u[0]-g)/d<.3?"center":u[0]>g?"left":"right",c=Math.abs(u[1]-y)/d<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:v,verticalAlign:c}}var HD={line:function(a,e,t,r){return a.dim==="angle"?{type:"Line",shape:$l(e.coordToPoint([r[0],t]),e.coordToPoint([r[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(a,e,t,r){var i=Math.max(1,a.getBandWidth()),n=Math.PI/180;return a.dim==="angle"?{type:"Sector",shape:uh(e.cx,e.cy,r[0],r[1],(-t-i/2)*n,(-t+i/2)*n)}:{type:"Sector",shape:uh(e.cx,e.cy,t-i/2,t+i/2,0,Math.PI*2)}}};const WD=GD;var $D=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var r,i=this.ecModel;return i.eachComponent(t,function(n){n.getCoordSysModel()===this&&(r=n)},this),r},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(It);const ZD=$D;var Zl=function(a){k(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",ee).models[0]},e.type="polarAxis",e}(It);Te(Zl,Xa);var UD=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e}(Zl),YD=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e}(Zl),Ul=function(a){k(e,a);function e(t,r){return a.call(this,"radius",t,r)||this}return e.prototype.pointToData=function(t,r){return this.polar.pointToData(t,r)[this.dim==="radius"?0:1]},e}(xe);Ul.prototype.dataToRadius=xe.prototype.dataToCoord;Ul.prototype.radiusToData=xe.prototype.coordToData;const XD=Ul;var KD=Lt(),Yl=function(a){k(e,a);function e(t,r){return a.call(this,"angle",t,r||[0,360])||this}return e.prototype.pointToData=function(t,r){return this.polar.pointToData(t,r)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,r=t.getLabelModel(),i=t.scale,n=i.getExtent(),o=i.count();if(n[1]-n[0]<1)return 0;var s=n[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l),v=ol(s==null?"":s+"",r.getFont(),"center","top"),c=Math.max(v.height,7),h=c/u;isNaN(h)&&(h=1/0);var f=Math.max(0,Math.floor(h)),p=KD(t.model),d=p.lastAutoInterval,g=p.lastTickCount;return d!=null&&g!=null&&Math.abs(d-f)<=1&&Math.abs(g-o)<=1&&d>f?f=d:(p.lastTickCount=o,p.lastAutoInterval=f),f},e}(xe);Yl.prototype.dataToAngle=xe.prototype.dataToCoord;Yl.prototype.angleToData=xe.prototype.coordToData;const qD=Yl;var zg=["radius","angle"],jD=function(){function a(e){this.dimensions=zg,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new XD,this._angleAxis=new qD,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return a.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},a.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},a.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},a.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},a.prototype.getAxesByScale=function(e){var t=[],r=this._angleAxis,i=this._radiusAxis;return r.scale.type===e&&t.push(r),i.scale.type===e&&t.push(i),t},a.prototype.getAngleAxis=function(){return this._angleAxis},a.prototype.getRadiusAxis=function(){return this._radiusAxis},a.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},a.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},a.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},a.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},a.prototype.pointToData=function(e,t){var r=this.pointToCoord(e);return[this._radiusAxis.radiusToData(r[0],t),this._angleAxis.angleToData(r[1],t)]},a.prototype.pointToCoord=function(e){var t=e[0]-this.cx,r=e[1]-this.cy,i=this.getAngleAxis(),n=i.getExtent(),o=Math.min(n[0],n[1]),s=Math.max(n[0],n[1]);i.inverse?o=s-360:s=o+360;var l=Math.sqrt(t*t+r*r);t/=l,r/=l;for(var u=Math.atan2(-r,t)/Math.PI*180,v=u<o?1:-1;u<o||u>s;)u+=v*360;return[l,u]},a.prototype.coordToPoint=function(e){var t=e[0],r=e[1]/180*Math.PI,i=Math.cos(r)*t+this.cx,n=-Math.sin(r)*t+this.cy;return[i,n]},a.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),r=t.getExtent().slice();r[0]>r[1]&&r.reverse();var i=e.getExtent(),n=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:r[0],r:r[1],startAngle:-i[0]*n,endAngle:-i[1]*n,clockwise:e.inverse,contain:function(o,s){var l=o-this.cx,u=s-this.cy,v=l*l+u*u-1e-4,c=this.r,h=this.r0;return v<=c*c&&v>=h*h}}},a.prototype.convertToPixel=function(e,t,r){var i=gh(t);return i===this?this.dataToPoint(r):null},a.prototype.convertFromPixel=function(e,t,r){var i=gh(t);return i===this?this.pointToData(r):null},a}();function gh(a){var e=a.seriesModel,t=a.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}const JD=jD;function QD(a,e,t){var r=e.get("center"),i=t.getWidth(),n=t.getHeight();a.cx=G(r[0],i),a.cy=G(r[1],n);var o=a.getRadiusAxis(),s=Math.min(i,n)/2,l=e.get("radius");l==null?l=[0,"100%"]:B(l)||(l=[0,l]);var u=[G(l[0],s),G(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function tI(a,e){var t=this,r=t.getAngleAxis(),i=t.getRadiusAxis();if(r.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),a.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();C(ls(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),C(ls(l,"angle"),function(u){r.scale.unionExtentFromData(l,u)})}}),qr(r.scale,r.model),qr(i.scale,i.model),r.type==="category"&&!r.onBand){var n=r.getExtent(),o=360/r.scale.count();r.inverse?n[1]+=o:n[1]-=o,r.setExtent(n[0],n[1])}}function eI(a){return a.mainType==="angleAxis"}function yh(a,e){if(a.type=e.get("type"),a.scale=wn(e),a.onBand=e.get("boundaryGap")&&a.type==="category",a.inverse=e.get("inverse"),eI(e)){a.inverse=a.inverse!==e.get("clockwise");var t=e.get("startAngle");a.setExtent(t,t+(a.inverse?-360:360))}e.axis=a,a.model=e}var rI={dimensions:zg,create:function(a,e){var t=[];return a.eachComponent("polar",function(r,i){var n=new JD(i+"");n.update=tI;var o=n.getRadiusAxis(),s=n.getAngleAxis(),l=r.findAxisModel("radiusAxis"),u=r.findAxisModel("angleAxis");yh(o,l),yh(s,u),QD(n,r,e),t.push(n),r.coordinateSystem=n,n.model=r}),a.eachSeries(function(r){if(r.get("coordinateSystem")==="polar"){var i=r.getReferringComponents("polar",ee).models[0];if(!i)throw new Error('Polar "'+Ot(r.get("polarIndex"),r.get("polarId"),0)+'" not found');r.coordinateSystem=i.coordinateSystem}}),t}};const aI=rI;var iI=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function bi(a,e,t){e[1]>e[0]&&(e=e.slice().reverse());var r=a.coordToPoint([e[0],t]),i=a.coordToPoint([e[1],t]);return{x1:r[0],y1:r[1],x2:i[0],y2:i[1]}}function _i(a){var e=a.getRadiusAxis();return e.inverse?0:1}function mh(a){var e=a[0],t=a[a.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&a.pop()}var nI=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,r){if(this.group.removeAll(),!!t.get("show")){var i=t.axis,n=i.polar,o=n.getRadiusAxis().getExtent(),s=i.getTicksCoords(),l=i.getMinorTicksCoords(),u=z(i.getViewLabels(),function(v){v=nt(v);var c=i.scale,h=c.type==="ordinal"?c.getRawOrdinalNumber(v.tickValue):v.tickValue;return v.coord=i.dataToCoord(h),v});mh(u),mh(s),C(iI,function(v){t.get([v,"show"])&&(!i.scale.isBlank()||v==="axisLine")&&oI[v](this.group,t,n,s,l,o,u)},this)}},e.type="angleAxis",e}(Cr),oI={axisLine:function(a,e,t,r,i,n){var o=e.getModel(["axisLine","lineStyle"]),s=_i(t),l=s?0:1,u;n[l]===0?u=new br({shape:{cx:t.cx,cy:t.cy,r:n[s]},style:o.getLineStyle(),z2:1,silent:!0}):u=new ip({shape:{cx:t.cx,cy:t.cy,r:n[s],r0:n[l]},style:o.getLineStyle(),z2:1,silent:!0}),u.style.fill=null,a.add(u)},axisTick:function(a,e,t,r,i,n){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=n[_i(t)],u=z(r,function(v){return new Kt({shape:bi(t,[l,l+s],v.coord)})});a.add(he(u,{style:j(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(a,e,t,r,i,n){if(!!i.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=n[_i(t)],v=[],c=0;c<i.length;c++)for(var h=0;h<i[c].length;h++)v.push(new Kt({shape:bi(t,[u,u+l],i[c][h].coord)}));a.add(he(v,{style:j(s.getModel("lineStyle").getLineStyle(),j(o.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(a,e,t,r,i,n,o){var s=e.getCategories(!0),l=e.getModel("axisLabel"),u=l.get("margin"),v=e.get("triggerEvent");C(o,function(c,h){var f=l,p=c.tickValue,d=n[_i(t)],g=t.coordToPoint([d+u,c.coord]),y=t.cx,m=t.cy,x=Math.abs(g[0]-y)/d<.3?"center":g[0]>y?"left":"right",S=Math.abs(g[1]-m)/d<.3?"middle":g[1]>m?"top":"bottom";if(s&&s[p]){var _=s[p];St(_)&&_.textStyle&&(f=new Pt(_.textStyle,l,l.ecModel))}var b=new lt({silent:Ne.isLabelSilent(e),style:Rt(f,{x:g[0],y:g[1],fill:f.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:c.formattedLabel,align:x,verticalAlign:S})});if(a.add(b),v){var w=Ne.makeAxisEventDataBase(e);w.targetType="axisLabel",w.value=c.rawLabel,tt(b).eventData=w}},this)},splitLine:function(a,e,t,r,i,n){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var v=[],c=0;c<r.length;c++){var h=u++%l.length;v[h]=v[h]||[],v[h].push(new Kt({shape:bi(t,n,r[c].coord)}))}for(var c=0;c<v.length;c++)a.add(he(v[c],{style:j({stroke:l[c%l.length]},s.getLineStyle()),silent:!0,z:e.get("z")}))},minorSplitLine:function(a,e,t,r,i,n){if(!!i.length){for(var o=e.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=[],u=0;u<i.length;u++)for(var v=0;v<i[u].length;v++)l.push(new Kt({shape:bi(t,n,i[u][v].coord)}));a.add(he(l,{style:s.getLineStyle(),silent:!0,z:e.get("z")}))}},splitArea:function(a,e,t,r,i,n){if(!!r.length){var o=e.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var v=[],c=Math.PI/180,h=-r[0].coord*c,f=Math.min(n[0],n[1]),p=Math.max(n[0],n[1]),d=e.get("clockwise"),g=1,y=r.length;g<=y;g++){var m=g===y?r[0].coord:r[g].coord,x=u++%l.length;v[x]=v[x]||[],v[x].push(new ve({shape:{cx:t.cx,cy:t.cy,r0:f,r:p,startAngle:h,endAngle:-m*c,clockwise:d},silent:!0})),h=-m*c}for(var g=0;g<v.length;g++)a.add(he(v[g],{style:j({fill:l[g%l.length]},s.getAreaStyle()),silent:!0}))}}};const sI=nI;var lI=["axisLine","axisTickLabel","axisName"],uI=["splitLine","splitArea","minorSplitLine"],vI=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,r){if(this.group.removeAll(),!!t.get("show")){var i=this._axisGroup,n=this._axisGroup=new U;this.group.add(n);var o=t.axis,s=o.polar,l=s.getAngleAxis(),u=o.getTicksCoords(),v=o.getMinorTicksCoords(),c=l.getExtent()[0],h=o.getExtent(),f=hI(s,t,c),p=new Ne(t,f);C(lI,p.add,p),n.add(p.getGroup()),An(i,n,t),C(uI,function(d){t.get([d,"show"])&&!o.scale.isBlank()&&cI[d](this.group,t,s,c,h,u,v)},this)}},e.type="radiusAxis",e}(Cr),cI={splitLine:function(a,e,t,r,i,n){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var v=[],c=0;c<n.length;c++){var h=u++%l.length;v[h]=v[h]||[],v[h].push(new br({shape:{cx:t.cx,cy:t.cy,r:n[c].coord}}))}for(var c=0;c<v.length;c++)a.add(he(v[c],{style:j({stroke:l[c%l.length],fill:null},s.getLineStyle()),silent:!0}))},minorSplitLine:function(a,e,t,r,i,n,o){if(!!o.length){for(var s=e.getModel("minorSplitLine"),l=s.getModel("lineStyle"),u=[],v=0;v<o.length;v++)for(var c=0;c<o[v].length;c++)u.push(new br({shape:{cx:t.cx,cy:t.cy,r:o[v][c].coord}}));a.add(he(u,{style:j({fill:null},l.getLineStyle()),silent:!0}))}},splitArea:function(a,e,t,r,i,n){if(!!n.length){var o=e.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var v=[],c=n[0].coord,h=1;h<n.length;h++){var f=u++%l.length;v[f]=v[f]||[],v[f].push(new ve({shape:{cx:t.cx,cy:t.cy,r0:c,r:n[h].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),c=n[h].coord}for(var h=0;h<v.length;h++)a.add(he(v[h],{style:j({fill:l[h%l.length]},s.getAreaStyle()),silent:!0}))}}};function hI(a,e,t){return{position:[a.cx,a.cy],rotation:t/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}const fI=vI;function Bg(a){return a.get("stack")||"__ec_stack_"+a.seriesIndex}function Gg(a,e){return e.dim+a.model.componentIndex}function pI(a,e,t){var r={},i=dI(te(e.getSeriesByType(a),function(n){return!e.isSeriesFiltered(n)&&n.coordinateSystem&&n.coordinateSystem.type==="polar"}));e.eachSeriesByType(a,function(n){if(n.coordinateSystem.type==="polar"){var o=n.getData(),s=n.coordinateSystem,l=s.getBaseAxis(),u=Gg(s,l),v=Bg(n),c=i[u][v],h=c.offset,f=c.width,p=s.getOtherAxis(l),d=n.coordinateSystem.cx,g=n.coordinateSystem.cy,y=n.get("barMinHeight")||0,m=n.get("barMinAngle")||0;r[v]=r[v]||[];for(var x=o.mapDimension(p.dim),S=o.mapDimension(l.dim),_=Xr(o,x),b=l.dim!=="radius"||!n.get("roundCap",!0),w=p.dataToCoord(0),A=0,T=o.count();A<T;A++){var D=o.get(x,A),I=o.get(S,A),L=D>=0?"p":"n",M=w;_&&(r[v][I]||(r[v][I]={p:w,n:w}),M=r[v][I][L]);var P=void 0,R=void 0,E=void 0,N=void 0;if(p.dim==="radius"){var V=p.dataToCoord(D)-w,O=l.dataToCoord(I);Math.abs(V)<y&&(V=(V<0?-1:1)*y),P=M,R=M+V,E=O-h,N=E-f,_&&(r[v][I][L]=R)}else{var W=p.dataToCoord(D,b)-w,Z=l.dataToCoord(I);Math.abs(W)<m&&(W=(W<0?-1:1)*m),P=Z+h,R=P+f,E=M,N=M+W,_&&(r[v][I][L]=N)}o.setItemLayout(A,{cx:d,cy:g,r0:P,r:R,startAngle:-E*Math.PI/180,endAngle:-N*Math.PI/180,clockwise:E>=N})}}})}function dI(a){var e={};C(a,function(r,i){var n=r.getData(),o=r.coordinateSystem,s=o.getBaseAxis(),l=Gg(o,s),u=s.getExtent(),v=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/n.count(),c=e[l]||{bandWidth:v,remainedWidth:v,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},h=c.stacks;e[l]=c;var f=Bg(r);h[f]||c.autoWidthCount++,h[f]=h[f]||{width:0,maxWidth:0};var p=G(r.get("barWidth"),v),d=G(r.get("barMaxWidth"),v),g=r.get("barGap"),y=r.get("barCategoryGap");p&&!h[f].width&&(p=Math.min(c.remainedWidth,p),h[f].width=p,c.remainedWidth-=p),d&&(h[f].maxWidth=d),g!=null&&(c.gap=g),y!=null&&(c.categoryGap=y)});var t={};return C(e,function(r,i){t[i]={};var n=r.stacks,o=r.bandWidth,s=G(r.categoryGap,o),l=G(r.gap,1),u=r.remainedWidth,v=r.autoWidthCount,c=(u-s)/(v+(v-1)*l);c=Math.max(c,0),C(n,function(d,g){var y=d.maxWidth;y&&y<c&&(y=Math.min(y,u),d.width&&(y=Math.min(y,d.width)),u-=y,d.width=y,v--)}),c=(u-s)/(v+(v-1)*l),c=Math.max(c,0);var h=0,f;C(n,function(d,g){d.width||(d.width=c),f=d,h+=d.width*(1+l)}),f&&(h-=f.width*l);var p=-h/2;C(n,function(d,g){t[i][g]=t[i][g]||{offset:p,width:d.width},p+=d.width*(1+l)})}),t}var gI={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},yI={splitNumber:5},mI=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="polar",e}(Et);function xI(a){J(oi),Cr.registerAxisPointerClass("PolarAxisPointer",WD),a.registerCoordinateSystem("polar",aI),a.registerComponentModel(ZD),a.registerComponentView(mI),ta(a,"angle",UD,gI),ta(a,"radius",YD,yI),a.registerComponentView(sI),a.registerComponentView(fI),a.registerLayout(q(pI,"bar"))}function Bs(a,e){e=e||{};var t=a.coordinateSystem,r=a.axis,i={},n=r.position,o=r.orient,s=t.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};i.position=[o==="vertical"?u.vertical[n]:l[0],o==="horizontal"?u.horizontal[n]:l[3]];var v={horizontal:0,vertical:1};i.rotation=Math.PI/2*v[o];var c={top:-1,bottom:1,right:1,left:-1};i.labelDirection=i.tickDirection=i.nameDirection=c[n],a.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),Ot(e.labelInside,a.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var h=e.rotate;return h==null&&(h=a.get(["axisLabel","rotate"])),i.labelRotation=n==="top"?-h:h,i.z2=1,i}var SI=["axisLine","axisTickLabel","axisName"],bI=["splitArea","splitLine"],_I=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="SingleAxisPointer",t}return e.prototype.render=function(t,r,i,n){var o=this.group;o.removeAll();var s=this._axisGroup;this._axisGroup=new U;var l=Bs(t),u=new Ne(t,l);C(SI,u.add,u),o.add(this._axisGroup),o.add(u.getGroup()),C(bI,function(v){t.get([v,"show"])&&wI[v](this,this.group,this._axisGroup,t)},this),An(s,this._axisGroup,t),a.prototype.render.call(this,t,r,i,n)},e.prototype.remove=function(){ld(this)},e.type="singleAxis",e}(Cr),wI={splitLine:function(a,e,t,r){var i=r.axis;if(!i.scale.isBlank()){var n=r.getModel("splitLine"),o=n.getModel("lineStyle"),s=o.get("color");s=s instanceof Array?s:[s];for(var l=r.coordinateSystem.getRect(),u=i.isHorizontal(),v=[],c=0,h=i.getTicksCoords({tickModel:n}),f=[],p=[],d=0;d<h.length;++d){var g=i.toGlobalCoord(h[d].coord);u?(f[0]=g,f[1]=l.y,p[0]=g,p[1]=l.y+l.height):(f[0]=l.x,f[1]=g,p[0]=l.x+l.width,p[1]=g);var y=c++%s.length;v[y]=v[y]||[],v[y].push(new Kt({subPixelOptimize:!0,shape:{x1:f[0],y1:f[1],x2:p[0],y2:p[1]},silent:!0}))}for(var m=o.getLineStyle(["color"]),d=0;d<v.length;++d)e.add(he(v[d],{style:j({stroke:s[d%s.length]},m),silent:!0}))}},splitArea:function(a,e,t,r){sd(a,t,r,r)}};const AI=_I;var Fg=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getCoordSysModel=function(){return this},e.type="singleAxis",e.layoutMode="box",e.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}},e}(It);Te(Fg,Xa.prototype);const Ho=Fg;var TI=function(a){k(e,a);function e(t,r,i,n,o){var s=a.call(this,t,r,i)||this;return s.type=n||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.pointToData=function(t,r){return this.coordinateSystem.pointToData(t)[0]},e}(xe);const CI=TI;var Hg=["single"],DI=function(){function a(e,t,r){this.type="single",this.dimension="single",this.dimensions=Hg,this.axisPointerEnabled=!0,this.model=e,this._init(e,t,r)}return a.prototype._init=function(e,t,r){var i=this.dimension,n=new CI(i,wn(e),[0,0],e.get("type"),e.get("position")),o=n.type==="category";n.onBand=o&&e.get("boundaryGap"),n.inverse=e.get("inverse"),n.orient=e.get("orient"),e.axis=n,n.model=e,n.coordinateSystem=this,this._axis=n},a.prototype.update=function(e,t){e.eachSeries(function(r){if(r.coordinateSystem===this){var i=r.getData();C(i.mapDimensionsAll(this.dimension),function(n){this._axis.scale.unionExtentFromData(i,n)},this),qr(this._axis.scale,this._axis.model)}},this)},a.prototype.resize=function(e,t){this._rect=Bt({left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")},{width:t.getWidth(),height:t.getHeight()}),this._adjustAxis()},a.prototype.getRect=function(){return this._rect},a.prototype._adjustAxis=function(){var e=this._rect,t=this._axis,r=t.isHorizontal(),i=r?[0,e.width]:[0,e.height],n=t.reverse?1:0;t.setExtent(i[n],i[1-n]),this._updateAxisTransform(t,r?e.x:e.y)},a.prototype._updateAxisTransform=function(e,t){var r=e.getExtent(),i=r[0]+r[1],n=e.isHorizontal();e.toGlobalCoord=n?function(o){return o+t}:function(o){return i-o+t},e.toLocalCoord=n?function(o){return o-t}:function(o){return i-o+t}},a.prototype.getAxis=function(){return this._axis},a.prototype.getBaseAxis=function(){return this._axis},a.prototype.getAxes=function(){return[this._axis]},a.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},a.prototype.containPoint=function(e){var t=this.getRect(),r=this.getAxis(),i=r.orient;return i==="horizontal"?r.contain(r.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:r.contain(r.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},a.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},a.prototype.dataToPoint=function(e){var t=this.getAxis(),r=this.getRect(),i=[],n=t.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),i[n]=t.toGlobalCoord(t.dataToCoord(+e)),i[1-n]=n===0?r.y+r.height/2:r.x+r.width/2,i},a.prototype.convertToPixel=function(e,t,r){var i=xh(t);return i===this?this.dataToPoint(r):null},a.prototype.convertFromPixel=function(e,t,r){var i=xh(t);return i===this?this.pointToData(r):null},a}();function xh(a){var e=a.seriesModel,t=a.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function II(a,e){var t=[];return a.eachComponent("singleAxis",function(r,i){var n=new DI(r,a,e);n.name="single_"+i,n.resize(r,e),r.coordinateSystem=n,t.push(n)}),a.eachSeries(function(r){if(r.get("coordinateSystem")==="singleAxis"){var i=r.getReferringComponents("singleAxis",ee).models[0];r.coordinateSystem=i&&i.coordinateSystem}}),t}var LI={create:II,dimensions:Hg};const MI=LI;var Sh=["x","y"],PI=["width","height"],RI=function(a){k(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,r,i,n,o){var s=i.axis,l=s.coordinateSystem,u=Wo(l,1-sn(s)),v=l.dataToPoint(r)[0],c=n.get("type");if(c&&c!=="none"){var h=Hl(n),f=kI[c](s,v,u);f.style=h,t.graphicKey=f.type,t.pointer=f}var p=Bs(i);Eg(r,t,p,i,n,o)},e.prototype.getHandleTransform=function(t,r,i){var n=Bs(r,{labelInside:!1});n.labelMargin=i.get(["handle","margin"]);var o=Wl(r.axis,t,n);return{x:o[0],y:o[1],rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,r,i,n){var o=i.axis,s=o.coordinateSystem,l=sn(o),u=Wo(s,l),v=[t.x,t.y];v[l]+=r[l],v[l]=Math.min(u[1],v[l]),v[l]=Math.max(u[0],v[l]);var c=Wo(s,1-l),h=(c[1]+c[0])/2,f=[h,h];return f[l]=v[l],{x:v[0],y:v[1],rotation:t.rotation,cursorPoint:f,tooltipOption:{verticalAlign:"middle"}}},e}(Fl),kI={line:function(a,e,t){var r=$l([e,t[0]],[e,t[1]],sn(a));return{type:"Line",subPixelOptimize:!0,shape:r}},shadow:function(a,e,t){var r=a.getBandWidth(),i=t[1]-t[0];return{type:"Rect",shape:Vg([e-r/2,t[0]],[r,i],sn(a))}}};function sn(a){return a.isHorizontal()?0:1}function Wo(a,e){var t=a.getRect();return[t[Sh[e]],t[Sh[e]]+t[PI[e]]]}const EI=RI;var VI=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(Et);function NI(a){J(oi),Cr.registerAxisPointerClass("SingleAxisPointer",EI),a.registerComponentView(VI),a.registerComponentView(AI),a.registerComponentModel(Ho),ta(a,"single",Ho,Ho.defaultOption),a.registerCoordinateSystem("single",MI)}var OI=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r,i){var n=bn(t);a.prototype.init.apply(this,arguments),bh(t,n)},e.prototype.mergeOption=function(t){a.prototype.mergeOption.apply(this,arguments),bh(this.option,t)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(It);function bh(a,e){var t=a.cellSize,r;B(t)?r=t:r=a.cellSize=[t,t],r.length===1&&(r[1]=r[0]);var i=z([0,1],function(n){return Ym(e,n)&&(r[n]="auto"),r[n]!=null&&r[n]!=="auto"});_n(a,e,{type:"box",ignoreSize:i})}const zI=OI;var BI=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){var n=this.group;n.removeAll();var o=t.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=r.getLocaleModel();this._renderDayRect(t,s,n),this._renderLines(t,s,l,n),this._renderYearText(t,s,l,n),this._renderMonthText(t,u,l,n),this._renderWeekText(t,u,s,l,n)},e.prototype._renderDayRect=function(t,r,i){for(var n=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),s=n.getCellWidth(),l=n.getCellHeight(),u=r.start.time;u<=r.end.time;u=n.getNextNDay(u,1).time){var v=n.dataToRect([u],!1).tl,c=new ct({shape:{x:v[0],y:v[1],width:s,height:l},cursor:"default",style:o});i.add(c)}},e.prototype._renderLines=function(t,r,i,n){var o=this,s=t.coordinateSystem,l=t.getModel(["splitLine","lineStyle"]).getLineStyle(),u=t.get(["splitLine","show"]),v=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var c=r.start,h=0;c.time<=r.end.time;h++){p(c.formatedDate),h===0&&(c=s.getDateInfo(r.start.y+"-"+r.start.m));var f=c.date;f.setMonth(f.getMonth()+1),c=s.getDateInfo(f)}p(s.getNextNDay(r.end.time,1).formatedDate);function p(d){o._firstDayOfMonth.push(s.getDateInfo(d)),o._firstDayPoints.push(s.dataToRect([d],!1).tl);var g=o._getLinePointsOfOneWeek(t,d,i);o._tlpoints.push(g[0]),o._blpoints.push(g[g.length-1]),u&&o._drawSplitline(g,l,n)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,v,i),l,n),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,v,i),l,n)},e.prototype._getEdgesPoints=function(t,r,i){var n=[t[0].slice(),t[t.length-1].slice()],o=i==="horizontal"?0:1;return n[0][o]=n[0][o]-r/2,n[1][o]=n[1][o]+r/2,n},e.prototype._drawSplitline=function(t,r,i){var n=new me({z2:20,shape:{points:t},style:r});i.add(n)},e.prototype._getLinePointsOfOneWeek=function(t,r,i){for(var n=t.coordinateSystem,o=n.getDateInfo(r),s=[],l=0;l<7;l++){var u=n.getNextNDay(o.time,l),v=n.dataToRect([u.time],!1);s[2*u.day]=v.tl,s[2*u.day+1]=v[i==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,r){return K(t)&&t?Xm(t,r):rt(t)?t(r):r.nameMap},e.prototype._yearTextPositionControl=function(t,r,i,n,o){var s=r[0],l=r[1],u=["center","bottom"];n==="bottom"?(l+=o,u=["center","top"]):n==="left"?s-=o:n==="right"?(s+=o,u=["center","top"]):l-=o;var v=0;return(n==="left"||n==="right")&&(v=Math.PI/2),{rotation:v,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(t,r,i,n){var o=t.getModel("yearLabel");if(!!o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=i!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],v=(u[0][0]+u[1][0])/2,c=(u[0][1]+u[1][1])/2,h=i==="horizontal"?0:1,f={top:[v,u[h][1]],bottom:[v,u[1-h][1]],left:[u[1-h][0],c],right:[u[h][0],c]},p=r.start.y;+r.end.y>+r.start.y&&(p=p+"-"+r.end.y);var d=o.get("formatter"),g={start:r.start.y,end:r.end.y,nameMap:p},y=this._formatterLabel(d,g),m=new lt({z2:30,style:Rt(o,{text:y})});m.attr(this._yearTextPositionControl(m,f[l],i,l,s)),n.add(m)}},e.prototype._monthTextPositionControl=function(t,r,i,n,o){var s="left",l="top",u=t[0],v=t[1];return i==="horizontal"?(v=v+o,r&&(s="center"),n==="start"&&(l="bottom")):(u=u+o,r&&(l="middle"),n==="start"&&(s="right")),{x:u,y:v,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(t,r,i,n){var o=t.getModel("monthLabel");if(!!o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),v=o.get("align"),c=[this._tlpoints,this._blpoints];(!s||K(s))&&(s&&(r=Tu(s)||r),s=r.get(["time","monthAbbr"])||[]);var h=u==="start"?0:1,f=i==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=v==="center",d=0;d<c[h].length-1;d++){var g=c[h][d].slice(),y=this._firstDayOfMonth[d];if(p){var m=this._firstDayPoints[d];g[f]=(m[f]+c[0][d+1][f])/2}var x=o.get("formatter"),S=s[+y.m-1],_={yyyy:y.y,yy:(y.y+"").slice(2),MM:y.m,M:+y.m,nameMap:S},b=this._formatterLabel(x,_),w=new lt({z2:30,style:H(Rt(o,{text:b}),this._monthTextPositionControl(g,p,i,u,l))});n.add(w)}}},e.prototype._weekTextPositionControl=function(t,r,i,n,o){var s="center",l="middle",u=t[0],v=t[1],c=i==="start";return r==="horizontal"?(u=u+n+(c?1:-1)*o[0]/2,s=c?"right":"left"):(v=v+n+(c?1:-1)*o[1]/2,l=c?"bottom":"top"),{x:u,y:v,align:s,verticalAlign:l}},e.prototype._renderWeekText=function(t,r,i,n,o){var s=t.getModel("dayLabel");if(!!s.get("show")){var l=t.coordinateSystem,u=s.get("position"),v=s.get("nameMap"),c=s.get("margin"),h=l.getFirstDayOfWeek();if(!v||K(v)){v&&(r=Tu(v)||r);var f=r.get(["time","dayOfWeekShort"]);v=f||z(r.get(["time","dayOfWeekAbbr"]),function(_){return _[0]})}var p=l.getNextNDay(i.end.time,7-i.lweek).time,d=[l.getCellWidth(),l.getCellHeight()];c=G(c,Math.min(d[1],d[0])),u==="start"&&(p=l.getNextNDay(i.start.time,-(7+i.fweek)).time,c=-c);for(var g=0;g<7;g++){var y=l.getNextNDay(p,g),m=l.dataToRect([y.time],!1).center,x=g;x=Math.abs((g+h)%7);var S=new lt({z2:30,style:H(Rt(s,{text:v[x]}),this._weekTextPositionControl(m,n,u,c,d))});o.add(S)}}},e.type="calendar",e}(Et);const GI=BI;var $o=864e5,FI=function(){function a(e,t,r){this.type="calendar",this.dimensions=a.dimensions,this.getDimensionsInfo=a.getDimensionsInfo,this._model=e}return a.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},a.prototype.getRangeInfo=function(){return this._rangeInfo},a.prototype.getModel=function(){return this._model},a.prototype.getRect=function(){return this._rect},a.prototype.getCellWidth=function(){return this._sw},a.prototype.getCellHeight=function(){return this._sh},a.prototype.getOrient=function(){return this._orient},a.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},a.prototype.getDateInfo=function(e){e=Km(e);var t=e.getFullYear(),r=e.getMonth()+1,i=r<10?"0"+r:""+r,n=e.getDate(),o=n<10?"0"+n:""+n,s=e.getDay();return s=Math.abs((s+7-this.getFirstDayOfWeek())%7),{y:t+"",m:i,d:o,day:s,time:e.getTime(),formatedDate:t+"-"+i+"-"+o,date:e}},a.prototype.getNextNDay=function(e,t){return t=t||0,t===0?this.getDateInfo(e):(e=new Date(this.getDateInfo(e).time),e.setDate(e.getDate()+t),this.getDateInfo(e))},a.prototype.update=function(e,t){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var r=this._rangeInfo.weeks||1,i=["width","height"],n=this._model.getCellSize().slice(),o=this._model.getBoxLayoutParams(),s=this._orient==="horizontal"?[r,7]:[7,r];C([0,1],function(c){v(n,c)&&(o[i[c]]=n[c]*s[c])});var l={width:t.getWidth(),height:t.getHeight()},u=this._rect=Bt(o,l);C([0,1],function(c){v(n,c)||(n[c]=u[i[c]]/s[c])});function v(c,h){return c[h]!=null&&c[h]!=="auto"}this._sw=n[0],this._sh=n[1]},a.prototype.dataToPoint=function(e,t){B(e)&&(e=e[0]),t==null&&(t=!0);var r=this.getDateInfo(e),i=this._rangeInfo,n=r.formatedDate;if(t&&!(r.time>=i.start.time&&r.time<i.end.time+$o))return[NaN,NaN];var o=r.day,s=this._getRangeInfo([i.start.time,n]).nthWeek;return this._orient==="vertical"?[this._rect.x+o*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+o*this._sh+this._sh/2]},a.prototype.pointToData=function(e){var t=this.pointToDate(e);return t&&t.time},a.prototype.dataToRect=function(e,t){var r=this.dataToPoint(e,t);return{contentShape:{x:r[0]-(this._sw-this._lineWidth)/2,y:r[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:r,tl:[r[0]-this._sw/2,r[1]-this._sh/2],tr:[r[0]+this._sw/2,r[1]-this._sh/2],br:[r[0]+this._sw/2,r[1]+this._sh/2],bl:[r[0]-this._sw/2,r[1]+this._sh/2]}},a.prototype.pointToDate=function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,r=Math.floor((e[1]-this._rect.y)/this._sh)+1,i=this._rangeInfo.range;return this._orient==="vertical"?this._getDateByWeeksAndDay(r,t-1,i):this._getDateByWeeksAndDay(t,r-1,i)},a.prototype.convertToPixel=function(e,t,r){var i=_h(t);return i===this?i.dataToPoint(r):null},a.prototype.convertFromPixel=function(e,t,r){var i=_h(t);return i===this?i.pointToData(r):null},a.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},a.prototype._initRangeOption=function(){var e=this._model.get("range"),t;if(B(e)&&e.length===1&&(e=e[0]),B(e))t=e;else{var r=e.toString();if(/^\d{4}$/.test(r)&&(t=[r+"-01-01",r+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(r)){var i=this.getDateInfo(r),n=i.date;n.setMonth(n.getMonth()+1);var o=this.getNextNDay(n,-1);t=[i.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(r)&&(t=[r,r])}if(!t)return yn("Invalid date range."),e;var s=this._getRangeInfo(t);return s.start.time>s.end.time&&t.reverse(),t},a.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],r;t[0].time>t[1].time&&(r=!0,t.reverse());var i=Math.floor(t[1].time/$o)-Math.floor(t[0].time/$o)+1,n=new Date(t[0].time),o=n.getDate(),s=t[1].date.getDate();n.setDate(o+i-1);var l=n.getDate();if(l!==s)for(var u=n.getTime()-t[1].time>0?1:-1;(l=n.getDate())!==s&&(n.getTime()-t[1].time)*u>0;)i-=u,n.setDate(l-u);var v=Math.floor((i+t[0].day+6)/7),c=r?-v+1:v-1;return r&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:i,weeks:v,nthWeek:c,fweek:t[0].day,lweek:t[1].day}},a.prototype._getDateByWeeksAndDay=function(e,t,r){var i=this._getRangeInfo(r);if(e>i.weeks||e===0&&t<i.fweek||e===i.weeks&&t>i.lweek)return null;var n=(e-1)*7-i.fweek+t,o=new Date(i.start.time);return o.setDate(+i.start.d+n),this.getDateInfo(o)},a.create=function(e,t){var r=[];return e.eachComponent("calendar",function(i){var n=new a(i);r.push(n),i.coordinateSystem=n}),e.eachSeries(function(i){i.get("coordinateSystem")==="calendar"&&(i.coordinateSystem=r[i.get("calendarIndex")||0])}),r},a.dimensions=["time","value"],a}();function _h(a){var e=a.calendarModel,t=a.seriesModel,r=e?e.coordinateSystem:t?t.coordinateSystem:null;return r}const HI=FI;function WI(a){a.registerComponentModel(zI),a.registerComponentView(GI),a.registerCoordinateSystem("calendar",HI)}function $I(a,e){var t=a.existing;if(e.id=a.keyInfo.id,!e.type&&t&&(e.type=t.type),e.parentId==null){var r=e.parentOption;r?e.parentId=r.id:t&&(e.parentId=t.parentId)}e.parentOption=null}function wh(a,e){var t;return C(e,function(r){a[r]!=null&&a[r]!=="auto"&&(t=!0)}),t}function ZI(a,e,t){var r=H({},t),i=a[e],n=t.$action||"merge";if(n==="merge")if(i){{var o=t.type;dt(!o||i.type===o,'Please set $action: "replace" to change `type`')}ft(i,r,!0),_n(i,r,{ignoreSize:!0}),jm(t,i),wi(t,i),wi(t,i,"shape"),wi(t,i,"style"),wi(t,i,"extra"),t.clipPath=i.clipPath}else a[e]=r;else n==="replace"?a[e]=r:n==="remove"&&i&&(a[e]=null)}var Wg=["transition","enterFrom","leaveTo"],UI=Wg.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function wi(a,e,t){if(t&&(!a[t]&&e[t]&&(a[t]={}),a=a[t],e=e[t]),!(!a||!e))for(var r=t?Wg:UI,i=0;i<r.length;i++){var n=r[i];a[n]==null&&e[n]!=null&&(a[n]=e[n])}}function YI(a,e){if(!!a&&(a.hv=e.hv=[wh(e,["left","right"]),wh(e,["top","bottom"])],a.type==="group")){var t=a,r=e;t.width==null&&(t.width=r.width=0),t.height==null&&(t.height=r.height=0)}}var XI=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.preventAutoZ=!0,t}return e.prototype.mergeOption=function(t,r){var i=this.option.elements;this.option.elements=null,a.prototype.mergeOption.call(this,t,r),this.option.elements=i},e.prototype.optionUpdated=function(t,r){var i=this.option,n=(r?i:t).elements,o=i.elements=r?[]:i.elements,s=[];this._flatten(n,s,null);var l=qm(o,s,"normalMerge"),u=this._elOptionsToUpdate=[];C(l,function(v,c){var h=v.newOption;dt(St(h)||v.existing,"Empty graphic option definition"),h&&(u.push(h),$I(v,h),ZI(o,c,h),YI(o[c],h))},this),i.elements=te(o,function(v){return v&&delete v.$action,v!=null})},e.prototype._flatten=function(t,r,i){C(t,function(n){if(!!n){i&&(n.parentOption=i),r.push(n);var o=n.children;n.type==="group"&&o&&this._flatten(o,r,n),delete n.children}},this)},e.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},e.type="graphic",e.defaultOption={elements:[]},e}(It),Ah={path:null,compoundPath:null,group:U,image:ye,text:lt},se=Lt(),KI=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._elMap=it()},e.prototype.render=function(t,r,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,i)},e.prototype._updateElements=function(t){var r=t.useElOptionsToUpdate();if(!!r){var i=this._elMap,n=this.group,o=t.get("z"),s=t.get("zlevel");C(r,function(l){var u=Ie(l.id,null),v=u!=null?i.get(u):null,c=Ie(l.parentId,null),h=c!=null?i.get(c):n,f=l.type,p=l.style;f==="text"&&p&&l.hv&&l.hv[1]&&(p.textVerticalAlign=p.textBaseline=p.verticalAlign=p.align=null);var d=l.textContent,g=l.textConfig;if(p&&bg(p,f,!!g,!!d)){var y=_g(p,f,!0);!g&&y.textConfig&&(g=l.textConfig=y.textConfig),!d&&y.textContent&&(d=y.textContent)}var m=qI(l);v&&dt(h===v.parent,"Changing parent is not supported.");var x=l.$action||"merge",S=x==="merge",_=x==="replace";if(S){var b=!v,w=v;b?w=Th(u,h,l.type,i):(w&&(se(w).isNew=!1),Dg(w)),w&&(Ri(w,m,t,{isInit:b}),Ch(w,l,o,s))}else if(_){Ei(v,l,i,t);var A=Th(u,h,l.type,i);A&&(Ri(A,m,t,{isInit:!0}),Ch(A,l,o,s))}else x==="remove"&&(Ag(v,l),Ei(v,l,i,t));var T=i.get(u);if(T&&d)if(S){var D=T.getTextContent();D?D.attr(d):T.setTextContent(new lt(d))}else _&&T.setTextContent(new lt(d));if(T){var I=l.clipPath;if(I){var L=I.type,M=void 0,b=!1;if(S){var P=T.getClipPath();b=!P||se(P).type!==L,M=b?Gs(L):P}else _&&(b=!0,M=Gs(L));T.setClipPath(M),Ri(M,I,t,{isInit:b}),an(M,I.keyframeAnimation,t)}var R=se(T);T.setTextConfig(g),R.option=l,jI(T,t,l),Ka({el:T,componentModel:t,itemName:T.name,itemTooltipOption:l.tooltip}),an(T,l.keyframeAnimation,t)}})}},e.prototype._relocate=function(t,r){for(var i=t.option.elements,n=this.group,o=this._elMap,s=r.getWidth(),l=r.getHeight(),u=["x","y"],v=0;v<i.length;v++){var c=i[v],h=Ie(c.id,null),f=h!=null?o.get(h):null;if(!(!f||!f.isGroup)){var p=f.parent,d=p===n,g=se(f),y=se(p);g.width=G(g.option.width,d?s:y.width)||0,g.height=G(g.option.height,d?l:y.height)||0}}for(var v=i.length-1;v>=0;v--){var c=i[v],h=Ie(c.id,null),f=h!=null?o.get(h):null;if(!!f){var p=f.parent,y=se(p),m=p===n?{width:s,height:l}:{width:y.width,height:y.height},x={},S=Dn(f,c,m,null,{hv:c.hv,boundingMode:c.bounding},x);if(!se(f).isNew&&S){for(var _=c.transition,b={},w=0;w<u.length;w++){var A=u[w],T=x[A];_&&(Sr(_)||yt(_,A)>=0)?b[A]=T:f[A]=T}ot(f,b,t,0)}else f.attr(x)}}},e.prototype._clear=function(){var t=this,r=this._elMap;r.each(function(i){Ei(i,se(i).option,r,t._lastGraphicModel)}),this._elMap=it()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Et);function Gs(a){dt(a,"graphic type MUST be set");var e=F(Ah,a)?Ah[a]:xp(a);dt(e,"graphic type "+a+" can not be found");var t=new e({});return se(t).type=a,t}function Th(a,e,t,r){var i=Gs(t);return e.add(i),r.set(a,i),se(i).id=a,se(i).isNew=!0,i}function Ei(a,e,t,r){var i=a&&a.parent;i&&(a.type==="group"&&a.traverse(function(n){Ei(n,e,t,r)}),Bn(a,e,r),t.removeKey(se(a).id))}function Ch(a,e,t,r){if(!a.isGroup){var i=a;i.z=Ft(e.z,t||0),i.zlevel=Ft(e.zlevel,r||0);var n=e.z2;n!=null&&(i.z2=n||0)}C(Ct(e),function(o){var s=e[o];o.indexOf("on")===0&&rt(s)&&(a[o]=s)}),a.draggable=e.draggable,e.name!=null&&(a.name=e.name),e.id!=null&&(a.id=e.id)}function qI(a){return a=H({},a),C(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(Jm),function(e){delete a[e]}),a}function jI(a,e,t){var r=tt(a).eventData;!a.silent&&!a.ignore&&!r&&(r=tt(a).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:a.name}),r&&(r.info=t.info)}function JI(a){a.registerComponentModel(XI),a.registerComponentView(KI),a.registerPreprocessor(function(e){var t=e.graphic;B(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var Dh=["x","y","radius","angle","single"],QI=["cartesian2d","polar","singleAxis"];function tL(a){var e=a.get("coordinateSystem");return yt(QI,e)>=0}function Xe(a){return dt(a),a+"Axis"}function eL(a,e){var t=it(),r=[],i=it();a.eachComponent({mainType:"dataZoom",query:e},function(v){i.get(v.uid)||s(v)});var n;do n=!1,a.eachComponent("dataZoom",o);while(n);function o(v){!i.get(v.uid)&&l(v)&&(s(v),n=!0)}function s(v){i.set(v.uid,!0),r.push(v),u(v)}function l(v){var c=!1;return v.eachTargetAxis(function(h,f){var p=t.get(h);p&&p[f]&&(c=!0)}),c}function u(v){v.eachTargetAxis(function(c,h){(t.get(c)||t.set(c,[]))[h]=!0})}return r}function $g(a){var e=a.ecModel,t={infoList:[],infoMap:it()};return a.eachTargetAxis(function(r,i){var n=e.getComponent(Xe(r),i);if(!!n){var o=n.getCoordSysModel();if(!!o){var s=o.uid,l=t.infoMap.get(s);l||(l={model:o,axisModels:[]},t.infoList.push(l),t.infoMap.set(s,l)),l.axisModels.push(n)}}}),t}var Zo=function(){function a(){this.indexList=[],this.indexMap=[]}return a.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},a}(),rL=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return e.prototype.init=function(t,r,i){var n=Ih(t);this.settledOption=n,this.mergeDefaultAndTheme(t,i),this._doInit(n)},e.prototype.mergeOption=function(t){var r=Ih(t);ft(this.option,t,!0),ft(this.settledOption,r,!0),this._doInit(r)},e.prototype._doInit=function(t){var r=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var i=this.settledOption;C([["start","startValue"],["end","endValue"]],function(n,o){this._rangePropMode[o]==="value"&&(r[n[0]]=i[n[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),r=this._targetAxisInfoMap=it(),i=this._fillSpecifiedTargetAxis(r);i?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(r,this._orient)),this._noTarget=!0,r.each(function(n){n.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var r=!1;return C(Dh,function(i){var n=this.getReferringComponents(Xe(i),Qm);if(!!n.specified){r=!0;var o=new Zo;C(n.models,function(s){o.add(s.componentIndex)}),t.set(i,o)}},this),r},e.prototype._fillAutoTargetAxisByOrient=function(t,r){var i=this.ecModel,n=!0;if(n){var o=r==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});l(s,o)}if(n){var s=i.findComponents({mainType:"singleAxis",filter:function(v){return v.get("orient",!0)===r}});l(s,"single")}function l(u,v){var c=u[0];if(!!c){var h=new Zo;if(h.add(c.componentIndex),t.set(v,h),n=!1,v==="x"||v==="y"){var f=c.getReferringComponents("grid",ee).models[0];f&&C(u,function(p){c.componentIndex!==p.componentIndex&&f===p.getReferringComponents("grid",ee).models[0]&&h.add(p.componentIndex)})}}}n&&C(Dh,function(u){if(!!n){var v=i.findComponents({mainType:Xe(u),filter:function(h){return h.get("type",!0)==="category"}});if(v[0]){var c=new Zo;c.add(v[0].componentIndex),t.set(u,c),n=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(r){!t&&(t=r)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var r=this.ecModel.option;this.option.throttle=r.animation&&r.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var r=this._rangePropMode,i=this.get("rangeMode");C([["start","startValue"],["end","endValue"]],function(n,o){var s=t[n[0]]!=null,l=t[n[1]]!=null;s&&!l?r[o]="percent":!s&&l?r[o]="value":i?r[o]=i[o]:s&&(r[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(r,i){t==null&&(t=this.ecModel.getComponent(Xe(r),i))},this),t},e.prototype.eachTargetAxis=function(t,r){this._targetAxisInfoMap.each(function(i,n){C(i.indexList,function(o){t.call(r,n,o)})})},e.prototype.getAxisProxy=function(t,r){var i=this.getAxisModel(t,r);if(i)return i.__dzAxisProxy},e.prototype.getAxisModel=function(t,r){dt(t&&r!=null);var i=this._targetAxisInfoMap.get(t);if(i&&i.indexMap[r])return this.ecModel.getComponent(Xe(t),r)},e.prototype.setRawRange=function(t){var r=this.option,i=this.settledOption;C([["start","startValue"],["end","endValue"]],function(n){(t[n[0]]!=null||t[n[1]]!=null)&&(r[n[0]]=i[n[0]]=t[n[0]],r[n[1]]=i[n[1]]=t[n[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var r=this.option;C(["start","startValue","end","endValue"],function(i){r[i]=t[i]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,r){if(t==null&&r==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(t,r).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var r,i=this._targetAxisInfoMap.keys(),n=0;n<i.length;n++)for(var o=i[n],s=this._targetAxisInfoMap.get(o),l=0;l<s.indexList.length;l++){var u=this.getAxisProxy(o,s.indexList[l]);if(u.hostedBy(this))return u;r||(r=u)}return r},e.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},e.prototype.getOrient=function(){return dt(this._orient),this._orient},e.type="dataZoom",e.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],e.defaultOption={z:4,filterMode:"filter",start:0,end:100},e}(It);function Ih(a){var e={};return C(["start","end","startValue","endValue","throttle"],function(t){a.hasOwnProperty(t)&&(e[t]=a[t])}),e}const Wa=rL;var aL=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.select",e}(Wa);const iL=aL;var nL=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i,n){this.dataZoomModel=t,this.ecModel=r,this.api=i},e.type="dataZoom",e}(Et);const Xl=nL;var oL=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.select",e}(Xl);const sL=oL;var zr=C,Lh=ue,lL=function(){function a(e,t,r,i){this._dimName=e,this._axisIndex=t,this.ecModel=i,this._dataZoomModel=r}return a.prototype.hostedBy=function(e){return this._dataZoomModel===e},a.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},a.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},a.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(tL(t)){var r=Xe(this._dimName),i=t.getReferringComponents(r,ee).models[0];i&&this._axisIndex===i.componentIndex&&e.push(t)}},this),e},a.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},a.prototype.getMinMaxSpan=function(){return nt(this._minMaxSpan)},a.prototype.calculateDataWindow=function(e){var t=this._dataExtent,r=this.getAxisModel(),i=r.axis.scale,n=this._dataZoomModel.getRangePropMode(),o=[0,100],s=[],l=[],u;zr(["start","end"],function(h,f){var p=e[h],d=e[h+"Value"];n[f]==="percent"?(p==null&&(p=o[f]),d=i.parse(vt(p,o,t))):(u=!0,d=d==null?t[f]:i.parse(d),p=vt(d,t,o)),l[f]=d,s[f]=p}),Lh(l),Lh(s);var v=this._minMaxSpan;u?c(l,s,t,o,!1):c(s,l,o,t,!0);function c(h,f,p,d,g){var y=g?"Span":"ValueSpan";Dr(0,h,p,"all",v["min"+y],v["max"+y]);for(var m=0;m<2;m++)f[m]=vt(h[m],p,d,!0),g&&(f[m]=i.parse(f[m]))}return{valueWindow:l,percentWindow:s}},a.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=uL(this,this._dimName,t),this._updateMinMaxSpan();var r=this.calculateDataWindow(e.settledOption);this._valueWindow=r.valueWindow,this._percentWindow=r.percentWindow,this._setAxisModel()}},a.prototype.filterData=function(e,t){if(e!==this._dataZoomModel)return;var r=this._dimName,i=this.getTargetSeriesModels(),n=e.get("filterMode"),o=this._valueWindow;if(n==="none")return;zr(i,function(l){var u=l.getData(),v=u.mapDimensionsAll(r);if(!!v.length){if(n==="weakFilter"){var c=u.getStore(),h=z(v,function(f){return u.getDimensionIndex(f)},u);u.filterSelf(function(f){for(var p,d,g,y=0;y<v.length;y++){var m=c.get(h[y],f),x=!isNaN(m),S=m<o[0],_=m>o[1];if(x&&!S&&!_)return!0;x&&(g=!0),S&&(p=!0),_&&(d=!0)}return g&&p&&d})}else zr(v,function(f){if(n==="empty")l.setData(u=u.map(f,function(d){return s(d)?d:NaN}));else{var p={};p[f]=o,u.selectRange(p)}});zr(v,function(f){u.setApproximateExtent(o,f)})}});function s(l){return l>=o[0]&&l<=o[1]}},a.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,r=this._dataExtent;zr(["min","max"],function(i){var n=t.get(i+"Span"),o=t.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?n=vt(r[0]+o,r,[0,100],!0):n!=null&&(o=vt(n,[0,100],r,!0)-r[0]),e[i+"Span"]=n,e[i+"ValueSpan"]=o},this)},a.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,r=this._valueWindow;if(!!t){var i=t0(r,[0,500]);i=Math.min(i,20);var n=e.axis.scale.rawExtentInfo;t[0]!==0&&n.setDeterminedMinMax("min",+r[0].toFixed(i)),t[1]!==100&&n.setDeterminedMinMax("max",+r[1].toFixed(i)),n.freeze()}},a}();function uL(a,e,t){var r=[1/0,-1/0];zr(t,function(o){e0(r,o.getData(),e)});var i=a.getAxisModel(),n=r0(i.axis.scale,i,r).calculate();return[n.min,n.max]}const vL=lL;var cL={getTargetSeries:function(a){function e(i){a.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(o,s){var l=a.getComponent(Xe(o),s);i(o,s,l,n)})})}e(function(i,n,o,s){o.__dzAxisProxy=null});var t=[];e(function(i,n,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new vL(i,n,s,a),t.push(o.__dzAxisProxy))});var r=it();return C(t,function(i){C(i.getTargetSeriesModels(),function(n){r.set(n.uid,n)})}),r},overallReset:function(a,e){a.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(r,i){t.getAxisProxy(r,i).reset(t)}),t.eachTargetAxis(function(r,i){t.getAxisProxy(r,i).filterData(t,e)})}),a.eachComponent("dataZoom",function(t){var r=t.findRepresentativeAxisProxy();if(r){var i=r.getDataPercentWindow(),n=r.getDataValueWindow();t.setCalculatedRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]})}})}};const hL=cL;function fL(a){a.registerAction("dataZoom",function(e,t){var r=eL(t,e);C(r,function(i){i.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var Mh=!1;function Kl(a){Mh||(Mh=!0,a.registerProcessor(a.PRIORITY.PROCESSOR.FILTER,hL),fL(a),a.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function pL(a){a.registerComponentModel(iL),a.registerComponentView(sL),Kl(a)}var le=function(){function a(){}return a}(),Zg={};function Br(a,e){Zg[a]=e}function Ug(a){return Zg[a]}var dL=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){a.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;C(this.option.feature,function(r,i){var n=Ug(i);n&&(n.getDefaultOption&&(n.defaultOption=n.getDefaultOption(t)),ft(r,n.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(It);const gL=dL;function yL(a,e,t){var r=e.getBoxLayoutParams(),i=e.get("padding"),n={width:t.getWidth(),height:t.getHeight()},o=Bt(r,n,i);yr(e.get("orient"),a,e.get("itemGap"),o.width,o.height),Dn(a,r,n,i)}function Yg(a,e){var t=Mn(e.get("padding")),r=e.getItemStyle(["color","opacity"]);return r.fill=e.get("backgroundColor"),a=new ct({shape:{x:a.x-t[3],y:a.y-t[0],width:a.width+t[1]+t[3],height:a.height+t[0]+t[2],r:e.get("borderRadius")},style:r,silent:!0,z2:-1}),a}var mL=function(a){k(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.render=function(t,r,i,n){var o=this.group;if(o.removeAll(),!t.get("show"))return;var s=+t.get("itemSize"),l=t.get("feature")||{},u=this._features||(this._features={}),v=[];C(l,function(f,p){v.push(p)}),new Qe(this._featureNames||[],v).add(c).update(c).remove(q(c,null)).execute(),this._featureNames=v;function c(f,p){var d=v[f],g=v[p],y=l[d],m=new Pt(y,t,t.ecModel),x;if(n&&n.newTitle!=null&&n.featureName===d&&(y.title=n.newTitle),d&&!g){if(xL(d))x={onclick:m.option.onclick,featureName:d};else{var S=Ug(d);if(!S)return;x=new S}u[d]=x}else if(x=u[g],!x)return;x.uid=lp("toolbox-feature"),x.model=m,x.ecModel=r,x.api=i;var _=x instanceof le;if(!d&&g){_&&x.dispose&&x.dispose(r,i);return}if(!m.get("show")||_&&x.unusable){_&&x.remove&&x.remove(r,i);return}h(m,x,d),m.setIconStatus=function(b,w){var A=this.option,T=this.iconPaths;A.iconStatus=A.iconStatus||{},A.iconStatus[b]=w,T[b]&&(w==="emphasis"?dr:gr)(T[b])},x instanceof le&&x.render&&x.render(m,r,i,n)}function h(f,p,d){var g=f.getModel("iconStyle"),y=f.getModel(["emphasis","iconStyle"]),m=p instanceof le&&p.getIcons?p.getIcons():f.get("icon"),x=f.get("title")||{},S,_;K(m)?(S={},S[d]=m):S=m,K(x)?(_={},_[d]=x):_=x;var b=f.iconPaths={};C(S,function(w,A){var T=Ln(w,{},{x:-s/2,y:-s/2,width:s,height:s});T.setStyle(g.getItemStyle());var D=T.ensureState("emphasis");D.style=y.getItemStyle();var I=new lt({style:{text:_[A],align:y.get("textAlign"),borderRadius:y.get("textBorderRadius"),padding:y.get("textPadding"),fill:null},ignore:!0});T.setTextContent(I),Ka({el:T,componentModel:t,itemName:A,formatterParamsExtra:{title:_[A]}}),T.__title=_[A],T.on("mouseover",function(){var L=y.getItemStyle(),M=t.get("orient")==="vertical"?t.get("right")==null?"right":"left":t.get("bottom")==null?"bottom":"top";I.setStyle({fill:y.get("textFill")||L.fill||L.stroke||"#000",backgroundColor:y.get("textBackgroundColor")}),T.setTextConfig({position:y.get("textPosition")||M}),I.ignore=!t.get("showTitle"),dr(this)}).on("mouseout",function(){f.get(["iconStatus",A])!=="emphasis"&&gr(this),I.hide()}),(f.get(["iconStatus",A])==="emphasis"?dr:gr)(T),o.add(T),T.on("click",$(p.onclick,p,r,i,A)),b[A]=T})}yL(o,t,i),o.add(Yg(o.getBoundingRect(),t)),o.eachChild(function(f){var p=f.__title,d=f.ensureState("emphasis"),g=d.textConfig||(d.textConfig={}),y=f.getTextContent(),m=y&&y.states.emphasis;if(m&&!rt(m)&&p){var x=m.style||(m.style={}),S=ol(p,lt.makeFont(x)),_=f.x+o.x,b=f.y+o.y+s,w=!1;b+S.height>i.getHeight()&&(g.position="top",w=!0);var A=w?-5-S.height:s+8;_+S.width/2>i.getWidth()?(g.position=["100%",A],x.align="right"):_-S.width/2<0&&(g.position=[0,A],x.align="left")}})},e.prototype.updateView=function(t,r,i,n){C(this._features,function(o){o instanceof le&&o.updateView&&o.updateView(o.model,r,i,n)})},e.prototype.remove=function(t,r){C(this._features,function(i){i instanceof le&&i.remove&&i.remove(t,r)}),this.group.removeAll()},e.prototype.dispose=function(t,r){C(this._features,function(i){i instanceof le&&i.dispose&&i.dispose(t,r)})},e.type="toolbox",e}(Et);function xL(a){return a.indexOf("my")===0}const SL=mL;var bL=function(a){k(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.onclick=function(t,r){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",o=r.getZr().painter.getType()==="svg",s=o?"svg":i.get("type",!0)||"png",l=r.getConnectedDataURL({type:s,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),u=qt.browser;if(rt(MouseEvent)&&(u.newEdge||!u.ie&&!u.edge)){var v=document.createElement("a");v.download=n+"."+s,v.target="_blank",v.href=l;var c=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});v.dispatchEvent(c)}else if(window.navigator.msSaveOrOpenBlob||o){var h=l.split(","),f=h[0].indexOf("base64")>-1,p=o?decodeURIComponent(h[1]):h[1];f&&(p=window.atob(p));var d=n+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=p.length,y=new Uint8Array(g);g--;)y[g]=p.charCodeAt(g);var m=new Blob([y]);window.navigator.msSaveOrOpenBlob(m,d)}else{var x=document.createElement("iframe");document.body.appendChild(x);var S=x.contentWindow,_=S.document;_.open("image/svg+xml","replace"),_.write(p),_.close(),S.focus(),_.execCommand("SaveAs",!0,d),document.body.removeChild(x)}}else{var b=i.get("lang"),w='<body style="margin:0;"><img src="'+l+'" style="max-width:100%;" title="'+(b&&b[0]||"")+'" /></body>',A=window.open();A.document.write(w),A.document.title=n}},e.getDefaultOption=function(t){var r={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return r},e}(le);const _L=bL;var Ph="__ec_magicType_stack__",wL=[["line","bar"],["stack"]],AL=function(a){k(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.getIcons=function(){var t=this.model,r=t.get("icon"),i={};return C(t.get("type"),function(n){r[n]&&(i[n]=r[n])}),i},e.getDefaultOption=function(t){var r={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return r},e.prototype.onclick=function(t,r,i){var n=this.model,o=n.get(["seriesIndex",i]);if(!!Rh[i]){var s={series:[]},l=function(c){var h=c.subType,f=c.id,p=Rh[i](h,f,c,n);p&&(j(p,c.option),s.series.push(p));var d=c.coordinateSystem;if(d&&d.type==="cartesian2d"&&(i==="line"||i==="bar")){var g=d.getAxesByScale("ordinal")[0];if(g){var y=g.dim,m=y+"Axis",x=c.getReferringComponents(m,ee).models[0],S=x.componentIndex;s[m]=s[m]||[];for(var _=0;_<=S;_++)s[m][S]=s[m][S]||{};s[m][S].boundaryGap=i==="bar"}}};C(wL,function(c){yt(c,i)>=0&&C(c,function(h){n.setIconStatus(h,"normal")})}),n.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,v=i;i==="stack"&&(u=ft({stack:n.option.title.tiled,tiled:n.option.title.stack},n.option.title),n.get(["iconStatus",i])!=="emphasis"&&(v="tiled")),r.dispatchAction({type:"changeMagicType",currentType:v,newOption:s,newTitle:u,featureName:"magicType"})}},e}(le),Rh={line:function(a,e,t,r){if(a==="bar")return ft({id:e,type:"line",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},r.get(["option","line"])||{},!0)},bar:function(a,e,t,r){if(a==="line")return ft({id:e,type:"bar",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},r.get(["option","bar"])||{},!0)},stack:function(a,e,t,r){var i=t.get("stack")===Ph;if(a==="line"||a==="bar")return r.setIconStatus("stack",i?"normal":"emphasis"),ft({id:e,stack:i?"":Ph},r.get(["option","stack"])||{},!0)}};Tn({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(a,e){e.mergeOption(a.newOption)});const TL=AL;var Gn=new Array(60).join("-"),aa=" ";function CL(a){var e={},t=[],r=[];return a.eachRawSeries(function(i){var n=i.coordinateSystem;if(n&&(n.type==="cartesian2d"||n.type==="polar")){var o=n.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:n.getOtherAxis(o),series:[]},r.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(i)}else t.push(i)}else t.push(i)}),{seriesGroupByCategoryAxis:e,other:t,meta:r}}function DL(a){var e=[];return C(a,function(t,r){var i=t.categoryAxis,n=t.valueAxis,o=n.dim,s=[" "].concat(z(t.series,function(f){return f.name})),l=[i.model.getCategories()];C(t.series,function(f){var p=f.getRawData();l.push(f.getRawData().mapArray(p.mapDimension(o),function(d){return d}))});for(var u=[s.join(aa)],v=0;v<l[0].length;v++){for(var c=[],h=0;h<l.length;h++)c.push(l[h][v]);u.push(c.join(aa))}e.push(u.join(`
`))}),e.join(`
`+Gn+`
`)}function IL(a){return z(a,function(e){var t=e.getRawData(),r=[e.name],i=[];return t.each(t.dimensions,function(){for(var n=arguments.length,o=arguments[n-1],s=t.getName(o),l=0;l<n-1;l++)i[l]=arguments[l];r.push((s?s+aa:"")+i.join(aa))}),r.join(`
`)}).join(`
`+Gn+`
`)}function LL(a){var e=CL(a);return{value:te([DL(e.seriesGroupByCategoryAxis),IL(e.other)],function(t){return!!t.replace(/[\n\t\s]/g,"")}).join(`
`+Gn+`
`),meta:e.meta}}function ln(a){return a.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function ML(a){var e=a.slice(0,a.indexOf(`
`));if(e.indexOf(aa)>=0)return!0}var Fs=new RegExp("["+aa+"]+","g");function PL(a){for(var e=a.split(/\n+/g),t=ln(e.shift()).split(Fs),r=[],i=z(t,function(l){return{name:l,data:[]}}),n=0;n<e.length;n++){var o=ln(e[n]).split(Fs);r.push(o.shift());for(var s=0;s<o.length;s++)i[s]&&(i[s].data[n]=o[s])}return{series:i,categories:r}}function RL(a){for(var e=a.split(/\n+/g),t=ln(e.shift()),r=[],i=0;i<e.length;i++){var n=ln(e[i]);if(!!n){var o=n.split(Fs),s="",l=void 0,u=!1;isNaN(o[0])?(u=!0,s=o[0],o=o.slice(1),r[i]={name:s,value:[]},l=r[i].value):l=r[i]=[];for(var v=0;v<o.length;v++)l.push(+o[v]);l.length===1&&(u?r[i].value=l[0]:r[i]=l[0])}}return{name:t,data:r}}function kL(a,e){var t=a.split(new RegExp(`
*`+Gn+`
*`,"g")),r={series:[]};return C(t,function(i,n){if(ML(i)){var o=PL(i),s=e[n],l=s.axisDim+"Axis";s&&(r[l]=r[l]||[],r[l][s.axisIndex]={data:o.categories},r.series=r.series.concat(o.series))}else{var o=RL(i);r.series.push(o)}}),r}var EL=function(a){k(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.onclick=function(t,r){var i=r.getDom(),n=this.model;this._dom&&i.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",o.style.backgroundColor=n.get("backgroundColor")||"#fff";var s=document.createElement("h4"),l=n.get("lang")||[];s.innerHTML=l[0]||n.get("title"),s.style.cssText="margin: 10px 20px;",s.style.color=n.get("textColor");var u=document.createElement("div"),v=document.createElement("textarea");u.style.cssText="display:block;width:100%;overflow:auto;";var c=n.get("optionToContent"),h=n.get("contentToOption"),f=LL(t);if(rt(c)){var p=c(r.getOption());K(p)?u.innerHTML=p:bp(p)&&u.appendChild(p)}else u.appendChild(v),v.readOnly=n.get("readOnly"),v.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",v.style.color=n.get("textColor"),v.style.borderColor=n.get("textareaBorderColor"),v.style.backgroundColor=n.get("textareaColor"),v.value=f.value;var d=f.meta,g=document.createElement("div");g.style.cssText="position:absolute;bottom:0;left:0;right:0;";var y="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",m=document.createElement("div"),x=document.createElement("div");y+=";background-color:"+n.get("buttonColor"),y+=";color:"+n.get("buttonTextColor");var S=this;function _(){i.removeChild(o),S._dom=null}Cu(m,"click",_),Cu(x,"click",function(){if(h==null&&c!=null||h!=null&&c==null){console.warn("It seems you have just provided one of `contentToOption` and `optionToContent` functions but missed the other one. Data change is ignored."),_();return}var b;try{rt(h)?b=h(u,r.getOption()):b=kL(v.value,d)}catch(w){throw _(),new Error("Data view format error "+w)}b&&r.dispatchAction({type:"changeDataView",newOption:b}),_()}),m.innerHTML=l[1],x.innerHTML=l[2],x.style.cssText=y,m.style.cssText=y,!n.get("readOnly")&&g.appendChild(x),g.appendChild(m),o.appendChild(s),o.appendChild(u),o.appendChild(g),u.style.height=i.clientHeight-80+"px",i.appendChild(o),this._dom=o},e.prototype.remove=function(t,r){this._dom&&r.getDom().removeChild(this._dom)},e.prototype.dispose=function(t,r){this.remove(t,r)},e.getDefaultOption=function(t){var r={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:t.getLocaleModel().get(["toolbox","dataView","title"]),lang:t.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"};return r},e}(le);function VL(a,e){return z(a,function(t,r){var i=e&&e[r];if(St(i)&&!B(i)){var n=St(t)&&!B(t);n||(t={value:t});var o=i.name!=null&&t.name==null;return t=j(t,i),o&&delete t.name,t}else return t})}Tn({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(a,e){var t=[];C(a.newOption.series,function(r){var i=e.getSeriesByName(r.name)[0];if(!i)t.push(H({type:"scatter"},r));else{var n=i.get("data");t.push({name:r.name,data:VL(r.data,n)})}}),e.mergeOption(j({series:t},a.newOption))});const NL=EL;var Xg=C,Kg=Lt();function OL(a,e){var t=ql(a);Xg(e,function(r,i){for(var n=t.length-1;n>=0;n--){var o=t[n];if(o[i])break}if(n<0){var s=a.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();t[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),t.push(e)}function zL(a){var e=ql(a),t=e[e.length-1];e.length>1&&e.pop();var r={};return Xg(t,function(i,n){for(var o=e.length-1;o>=0;o--)if(i=e[o][n],i){r[n]=i;break}}),r}function BL(a){Kg(a).snapshots=null}function GL(a){return ql(a).length}function ql(a){var e=Kg(a);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var FL=function(a){k(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.onclick=function(t,r){BL(t),r.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){var r={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:t.getLocaleModel().get(["toolbox","restore","title"])};return r},e}(le);Tn({type:"restore",event:"restore",update:"prepareAndUpdate"},function(a,e){e.resetOption("recreate")});const HL=FL;var WL=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],$L=function(){function a(e,t,r){var i=this;this._targetInfoList=[];var n=kh(t,e);C(ZL,function(o,s){(!r||!r.include||yt(r.include,s)>=0)&&o(n,i._targetInfoList)})}return a.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(r,i,n){if((r.coordRanges||(r.coordRanges=[])).push(i),!r.coordRange){r.coordRange=i;var o=Uo[r.brushType](0,n,i);r.__rangeOffset={offset:Oh[r.brushType](o.values,r.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},a.prototype.matchOutputRanges=function(e,t,r){C(e,function(i){var n=this.findTargetInfo(i,t);n&&n!==!0&&C(n.coordSyses,function(o){var s=Uo[i.brushType](1,o,i.range,!0);r(i,s.values,o,t)})},this)},a.prototype.setInputRanges=function(e,t){C(e,function(r){var i=this.findTargetInfo(r,t);if(dt(!i||i===!0||r.coordRange,"coordRange must be specified when coord index specified."),dt(!i||i!==!0||r.range,"range must be specified in global brush."),r.range=r.range||[],i&&i!==!0){r.panelId=i.panelId;var n=Uo[r.brushType](0,i.coordSys,r.coordRange),o=r.__rangeOffset;r.range=o?Oh[r.brushType](n.values,o.offset,UL(n.xyMinMax,o.xyMinMax)):n.values}},this)},a.prototype.makePanelOpts=function(e,t){return z(this._targetInfoList,function(r){var i=r.getPanelRect();return{panelId:r.panelId,defaultBrushType:t?t(r):null,clipPath:eg(i),isTargetByCursor:ag(i,e,r.coordSysModel),getLinearBrushOtherExtent:rg(i)}})},a.prototype.controlSeries=function(e,t,r){var i=this.findTargetInfo(e,r);return i===!0||i&&yt(i.coordSyses,t.coordinateSystem)>=0},a.prototype.findTargetInfo=function(e,t){for(var r=this._targetInfoList,i=kh(t,e),n=0;n<r.length;n++){var o=r[n],s=e.panelId;if(s){if(o.panelId===s)return o}else for(var l=0;l<Eh.length;l++)if(Eh[l](i,o))return o}return!0},a}();function Hs(a){return a[0]>a[1]&&a.reverse(),a}function kh(a,e){return _p(a,e,{includeMainTypes:WL})}var ZL={grid:function(a,e){var t=a.xAxisModels,r=a.yAxisModels,i=a.gridModels,n=it(),o={},s={};!t&&!r&&!i||(C(t,function(l){var u=l.axis.grid.model;n.set(u.id,u),o[u.id]=!0}),C(r,function(l){var u=l.axis.grid.model;n.set(u.id,u),s[u.id]=!0}),C(i,function(l){n.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),n.each(function(l){var u=l.coordinateSystem,v=[];C(u.getCartesians(),function(c,h){(yt(t,c.getAxis("x").model)>=0||yt(r,c.getAxis("y").model)>=0)&&v.push(c)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:v[0],coordSyses:v,getPanelRect:Vh.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(a,e){C(a.geoModels,function(t){var r=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:r,coordSyses:[r],getPanelRect:Vh.geo})})}},Eh=[function(a,e){var t=a.xAxisModel,r=a.yAxisModel,i=a.gridModel;return!i&&t&&(i=t.axis.grid.model),!i&&r&&(i=r.axis.grid.model),i&&i===e.gridModel},function(a,e){var t=a.geoModel;return t&&t===e.geoModel}],Vh={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var a=this.coordSys,e=a.getBoundingRect().clone();return e.applyTransform(Wr(a)),e}},Uo={lineX:q(Nh,0),lineY:q(Nh,1),rect:function(a,e,t,r){var i=a?e.pointToData([t[0][0],t[1][0]],r):e.dataToPoint([t[0][0],t[1][0]],r),n=a?e.pointToData([t[0][1],t[1][1]],r):e.dataToPoint([t[0][1],t[1][1]],r),o=[Hs([i[0],n[0]]),Hs([i[1],n[1]])];return{values:o,xyMinMax:o}},polygon:function(a,e,t,r){var i=[[1/0,-1/0],[1/0,-1/0]],n=z(t,function(o){var s=a?e.pointToData(o,r):e.dataToPoint(o,r);return i[0][0]=Math.min(i[0][0],s[0]),i[1][0]=Math.min(i[1][0],s[1]),i[0][1]=Math.max(i[0][1],s[0]),i[1][1]=Math.max(i[1][1],s[1]),s});return{values:n,xyMinMax:i}}};function Nh(a,e,t,r){dt(t.type==="cartesian2d","lineX/lineY brush is available only in cartesian2d.");var i=t.getAxis(["x","y"][a]),n=Hs(z([0,1],function(s){return e?i.coordToData(i.toLocalCoord(r[s]),!0):i.toGlobalCoord(i.dataToCoord(r[s]))})),o=[];return o[a]=n,o[1-a]=[NaN,NaN],{values:n,xyMinMax:o}}var Oh={lineX:q(zh,0),lineY:q(zh,1),rect:function(a,e,t){return[[a[0][0]-t[0]*e[0][0],a[0][1]-t[0]*e[0][1]],[a[1][0]-t[1]*e[1][0],a[1][1]-t[1]*e[1][1]]]},polygon:function(a,e,t){return z(a,function(r,i){return[r[0]-t[0]*e[i][0],r[1]-t[1]*e[i][1]]})}};function zh(a,e,t,r){return[e[0]-r[a]*t[0],e[1]-r[a]*t[1]]}function UL(a,e){var t=Bh(a),r=Bh(e),i=[t[0]/r[0],t[1]/r[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function Bh(a){return a?[a[0][1]-a[0][0],a[1][1]-a[1][0]]:[NaN,NaN]}const jl=$L;var Ws=C,YL=i0("toolbox-dataZoom_"),XL=function(a){k(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.render=function(t,r,i,n){this._brushController||(this._brushController=new Pl(i.getZr()),this._brushController.on("brush",$(this._onBrush,this)).mount()),jL(t,r,this,n,i),qL(t,r)},e.prototype.onclick=function(t,r,i){KL[i].call(this)},e.prototype.remove=function(t,r){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,r){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var r=t.areas;if(!t.isEnd||!r.length)return;var i={},n=this.ecModel;this._brushController.updateCovers([]);var o=new jl(Jl(this.model),n,{include:["grid"]});o.matchOutputRanges(r,n,function(u,v,c){if(c.type==="cartesian2d"){var h=u.brushType;h==="rect"?(s("x",c,v[0]),s("y",c,v[1])):s({lineX:"x",lineY:"y"}[h],c,v)}}),OL(n,i),this._dispatchZoomAction(i);function s(u,v,c){var h=v.getAxis(u),f=h.model,p=l(u,f,n),d=p.findRepresentativeAxisProxy(f).getMinMaxSpan();(d.minValueSpan!=null||d.maxValueSpan!=null)&&(c=Dr(0,c.slice(),h.scale.getExtent(),0,d.minValueSpan,d.maxValueSpan)),p&&(i[p.id]={dataZoomId:p.id,startValue:c[0],endValue:c[1]})}function l(u,v,c){var h;return c.eachComponent({mainType:"dataZoom",subType:"select"},function(f){var p=f.getAxisModel(u,v.componentIndex);p&&(h=f)}),h}},e.prototype._dispatchZoomAction=function(t){var r=[];Ws(t,function(i,n){r.push(nt(i))}),r.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:r})},e.getDefaultOption=function(t){var r={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return r},e}(le),KL={zoom:function(){var a=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:a})},back:function(){this._dispatchZoomAction(zL(this.ecModel))}};function Jl(a){var e={xAxisIndex:a.get("xAxisIndex",!0),yAxisIndex:a.get("yAxisIndex",!0),xAxisId:a.get("xAxisId",!0),yAxisId:a.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function qL(a,e){a.setIconStatus("back",GL(e)>1?"emphasis":"normal")}function jL(a,e,t,r,i){var n=t._isZoomActive;r&&r.type==="takeGlobalCursor"&&(n=r.key==="dataZoomSelect"?r.dataZoomSelectActive:!1),t._isZoomActive=n,a.setIconStatus("zoom",n?"emphasis":"normal");var o=new jl(Jl(a),e,{include:["grid"]}),s=o.makePanelOpts(i,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});t._brushController.setPanels(s).enableBrush(n&&s.length?{brushType:"auto",brushStyle:a.getModel("brushStyle").getItemStyle()}:!1)}a0("dataZoom",function(a){var e=a.getComponent("toolbox",0),t=["feature","dataZoom"];if(!e||e.get(t)==null)return;var r=e.getModel(t),i=[],n=Jl(r),o=_p(a,n);Ws(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),Ws(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,v){var c=l.componentIndex,h={type:"select",$fromToolbox:!0,filterMode:r.get("filterMode",!0)||"filter",id:YL+u+c};h[v]=c,i.push(h)}return i});const JL=XL;function QL(a){a.registerComponentModel(gL),a.registerComponentView(SL),Br("saveAsImage",_L),Br("magicType",TL),Br("dataView",NL),Br("dataZoom",JL),Br("restore",HL),J(pL)}var tM=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(It);const eM=tM;function qg(a){var e=a.get("confine");return e!=null?!!e:a.get("renderMode")==="richText"}function jg(a){if(!!qt.domSupported){for(var e=document.documentElement.style,t=0,r=a.length;t<r;t++)if(a[t]in e)return a[t]}}var Jg=jg(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),rM=jg(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function Qg(a,e){if(!a)return e;e=wp(e,!0);var t=a.indexOf(e);return a=t===-1?e:"-"+a.slice(0,t)+"-"+e,a.toLowerCase()}function aM(a,e){var t=a.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(a);return t?e?t[e]:t:null}var iM=Qg(rM,"transition"),Ql=Qg(Jg,"transform"),nM="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(qt.transform3dSupported?"will-change:transform;":"");function oM(a){return a=a==="left"?"right":a==="right"?"left":a==="top"?"bottom":"top",a}function sM(a,e,t){if(!K(t)||t==="inside")return"";var r=a.get("backgroundColor"),i=a.get("borderWidth");e=Kr(e);var n=oM(t),o=Math.max(Math.round(i)*1.5,6),s="",l=Ql+":",u;yt(["left","right"],n)>-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=n==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=n==="top"?225:45)+"deg)");var v=u*Math.PI/180,c=o+i,h=c*Math.abs(Math.cos(v))+c*Math.abs(Math.sin(v)),f=Math.round(((h-Math.SQRT2*i)/2+Math.SQRT2*i-(h-c)/2)*100)/100;s+=";"+n+":-"+f+"px";var p=e+" solid "+i+"px;",d=["position:absolute;width:"+o+"px;height:"+o+"px;",s+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+r+";"];return'<div style="'+d.join("")+'"></div>'}function lM(a,e){var t="cubic-bezier(0.23,1,0.32,1)",r=" "+a/2+"s "+t,i="opacity"+r+",visibility"+r;return e||(r=" "+a+"s "+t,i+=qt.transformSupported?","+Ql+r:",left"+r+",top"+r),iM+":"+i}function Gh(a,e,t){var r=a.toFixed(0)+"px",i=e.toFixed(0)+"px";if(!qt.transformSupported)return t?"top:"+i+";left:"+r+";":[["top",i],["left",r]];var n=qt.transform3dSupported,o="translate"+(n?"3d":"")+"("+r+","+i+(n?",0":"")+")";return t?"top:0;left:0;"+Ql+":"+o+";":[["top",0],["left",0],[Jg,o]]}function uM(a){var e=[],t=a.get("fontSize"),r=a.getTextColor();r&&e.push("color:"+r),e.push("font:"+a.getFont()),t&&e.push("line-height:"+Math.round(t*3/2)+"px");var i=a.get("textShadowColor"),n=a.get("textShadowBlur")||0,o=a.get("textShadowOffsetX")||0,s=a.get("textShadowOffsetY")||0;return i&&n&&e.push("text-shadow:"+o+"px "+s+"px "+n+"px "+i),C(["decoration","align"],function(l){var u=a.get(l);u&&e.push("text-"+l+":"+u)}),e.join(";")}function vM(a,e,t){var r=[],i=a.get("transitionDuration"),n=a.get("backgroundColor"),o=a.get("shadowBlur"),s=a.get("shadowColor"),l=a.get("shadowOffsetX"),u=a.get("shadowOffsetY"),v=a.getModel("textStyle"),c=Ap(a,"html"),h=l+"px "+u+"px "+o+"px "+s;return r.push("box-shadow:"+h),e&&i&&r.push(lM(i,t)),n&&r.push("background-color:"+n),C(["width","color","radius"],function(f){var p="border-"+f,d=wp(p),g=a.get(d);g!=null&&r.push(p+":"+g+(f==="color"?"":"px"))}),r.push(uM(v)),c!=null&&r.push("padding:"+Mn(c).join("px ")+"px"),r.join(";")+";"}function Fh(a,e,t,r,i){var n=e&&e.painter;if(t){var o=n&&n.getViewportRoot();o&&o0(a,o,document.body,r,i)}else{a[0]=r,a[1]=i;var s=n&&n.getViewportRootOffset();s&&(a[0]+=s.offsetLeft,a[1]+=s.offsetTop)}a[2]=a[0]/e.getWidth(),a[3]=a[1]/e.getHeight()}var cM=function(){function a(e,t,r){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._firstShow=!0,this._longHide=!0,qt.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var n=this._zr=t.getZr(),o=this._appendToBody=r&&r.appendToBody;Fh(this._styleCoord,n,o,t.getWidth()/2,t.getHeight()/2),o?document.body.appendChild(i):e.appendChild(i),this._container=e;var s=this;i.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},i.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=n.handler,v=n.painter.getViewportRoot();n0(v,l,!0),u.dispatch("mousemove",l)}},i.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return a.prototype.update=function(e){var t=this._container,r=aM(t,"position"),i=t.style;i.position!=="absolute"&&r!=="absolute"&&(i.position="relative");var n=e.get("alwaysShowContent");n&&this._moveIfResized(),this.el.className=e.get("className")||""},a.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var r=this.el,i=r.style,n=this._styleCoord;r.innerHTML?i.cssText=nM+vM(e,!this._firstShow,this._longHide)+Gh(n[0],n[1],!0)+("border-color:"+Kr(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},a.prototype.setContent=function(e,t,r,i,n){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(K(n)&&r.get("trigger")==="item"&&!qg(r)&&(s=sM(r,i,n)),K(e))o.innerHTML=e+s;else if(e){o.innerHTML="",B(e)||(e=[e]);for(var l=0;l<e.length;l++)bp(e[l])&&e[l].parentNode!==o&&o.appendChild(e[l]);if(s&&o.childNodes.length){var u=document.createElement("div");u.innerHTML=s,o.appendChild(u)}}},a.prototype.setEnterable=function(e){this._enterable=e},a.prototype.getSize=function(){var e=this.el;return[e.offsetWidth,e.offsetHeight]},a.prototype.moveTo=function(e,t){var r=this._styleCoord;if(Fh(r,this._zr,this._appendToBody,e,t),r[0]!=null&&r[1]!=null){var i=this.el.style,n=Gh(r[0],r[1]);C(n,function(o){i[o[0]]=o[1]})}},a.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},a.prototype.hide=function(){var e=this,t=this.el.style;t.visibility="hidden",t.opacity="0",qt.transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},a.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout($(this.hide,this),e)):this.hide())},a.prototype.isShow=function(){return this._show},a.prototype.dispose=function(){this.el.parentNode.removeChild(this.el)},a}();const hM=cM;var fM=function(){function a(e){this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._zr=e.getZr(),Wh(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return a.prototype.update=function(e){var t=e.get("alwaysShowContent");t&&this._moveIfResized()},a.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},a.prototype.setContent=function(e,t,r,i,n){var o=this;St(e)&&_t("Passing DOM nodes as content is not supported in richText tooltip!"),this.el&&this._zr.remove(this.el);var s=r.getModel("textStyle");this.el=new lt({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:i,textShadowColor:s.get("textShadowColor"),fill:r.get(["textStyle","color"]),padding:Ap(r,"richText"),verticalAlign:"top",align:"left"},z:r.get("z")}),C(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){o.el.style[u]=r.get(u)}),C(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(u){o.el.style[u]=s.get(u)||0}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},a.prototype.setEnterable=function(e){this._enterable=e},a.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),r=Hh(e.style);return[t.width+r.left+r.right,t.height+r.top+r.bottom]},a.prototype.moveTo=function(e,t){var r=this.el;if(r){var i=this._styleCoord;Wh(i,this._zr,e,t),e=i[0],t=i[1];var n=r.style,o=We(n.borderWidth||0),s=Hh(n);r.x=e+o+s.left,r.y=t+o+s.top,r.markRedraw()}},a.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},a.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},a.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout($(this.hide,this),e)):this.hide())},a.prototype.isShow=function(){return this._show},a.prototype.dispose=function(){this._zr.remove(this.el)},a}();function We(a){return Math.max(0,a)}function Hh(a){var e=We(a.shadowBlur||0),t=We(a.shadowOffsetX||0),r=We(a.shadowOffsetY||0);return{left:We(e-t),right:We(e+t),top:We(e-r),bottom:We(e+r)}}function Wh(a,e,t,r){a[0]=t,a[1]=r,a[2]=a[0]/e.getWidth(),a[3]=a[1]/e.getHeight()}const pM=fM;var dM=new ct({shape:{x:-1,y:-1,width:2,height:2}}),gM=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r){if(!(qt.node||!r.getDom())){var i=t.getComponent("tooltip"),n=this._renderMode=s0(i.get("renderMode"));this._tooltipContent=n==="richText"?new pM(r):new hM(r.getDom(),r,{appendToBody:i.get("appendToBody",!0)})}},e.prototype.render=function(t,r,i){if(!(qt.node||!i.getDom())){this.group.removeAll(),this._tooltipModel=t,this._ecModel=r,this._api=i,this._alwaysShowContent=t.get("alwaysShowContent");var n=this._tooltipContent;n.update(t),n.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&t.get("transitionDuration")?sa(this,"_updatePosition",50,"fixRate"):ka(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var t=this._tooltipModel,r=t.get("triggerOn");Ng("itemTooltip",this._api,$(function(i,n,o){r!=="none"&&(r.indexOf(i)>=0?this._tryShow(n,o):i==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,r=this._ecModel,i=this._api;if(this._lastX!=null&&this._lastY!=null&&t.get("triggerOn")!=="none"){var n=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&n.manuallyShowTip(t,r,i,{x:n._lastX,y:n._lastY,dataByCoordSys:n._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,r,i,n){if(!(n.from===this.uid||qt.node||!i.getDom())){var o=$h(n,i);this._ticket="";var s=n.dataByCoordSys,l=SM(n,r,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:n.position,positionDefault:"bottom"},o)}else if(n.tooltip&&n.x!=null&&n.y!=null){var v=dM;v.x=n.x,v.y=n.y,v.update(),tt(v).tooltipConfig={name:null,option:n.tooltip},this._tryShow({offsetX:n.x,offsetY:n.y,target:v},o)}else if(s)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,dataByCoordSys:s,tooltipOption:n.tooltipOption},o);else if(n.seriesIndex!=null){if(this._manuallyAxisShowTip(t,r,i,n))return;var c=Og(n,r),h=c.point[0],f=c.point[1];h!=null&&f!=null&&this._tryShow({offsetX:h,offsetY:f,target:c.el,position:n.position,positionDefault:"bottom"},o)}else n.x!=null&&n.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:i.getZr().findHover(n.x,n.y).target},o))}},e.prototype.manuallyHideTip=function(t,r,i,n){var o=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,n.from!==this.uid&&this._hide($h(n,i))},e.prototype._manuallyAxisShowTip=function(t,r,i,n){var o=n.seriesIndex,s=n.dataIndex,l=r.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=r.getSeriesByIndex(o);if(!!u){var v=u.getData(),c=da([v.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(c.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:n.position}),!0}}},e.prototype._tryShow=function(t,r){var i=t.target,n=this._tooltipModel;if(!!n){this._lastX=t.offsetX,this._lastY=t.offsetY;var o=t.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,t);else if(i){this._lastDataByCoordSys=null;var s,l;vp(i,function(u){if(tt(u).dataIndex!=null)return s=u,!0;if(tt(u).tooltipConfig!=null)return l=u,!0},!0),s?this._showSeriesItemTooltip(t,s,r):l?this._showComponentItemTooltip(t,l,r):this._hide(r)}else this._lastDataByCoordSys=null,this._hide(r)}},e.prototype._showOrMove=function(t,r){var i=t.get("showDelay");r=$(r,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(r,i):r()},e.prototype._showAxisTooltip=function(t,r){var i=this._ecModel,n=this._tooltipModel,o=[r.offsetX,r.offsetY],s=da([r.tooltipOption],n),l=this._renderMode,u=[],v=Ut("section",{blocks:[],noHeader:!0}),c=[],h=new Un;C(t,function(m){C(m.dataByAxis,function(x){var S=i.getComponent(x.axisDim+"Axis",x.axisIndex),_=x.value;if(!(!S||_==null)){var b=kg(_,S.axis,i,x.seriesDataIndices,x.valueLabelOpt),w=Ut("section",{header:b,noHeader:!op(b),sortBlocks:!0,blocks:[]});v.blocks.push(w),C(x.seriesDataIndices,function(A){var T=i.getSeriesByIndex(A.seriesIndex),D=A.dataIndexInside,I=T.getDataParams(D);if(!(I.dataIndex<0)){I.axisDim=x.axisDim,I.axisIndex=x.axisIndex,I.axisType=x.axisType,I.axisId=x.axisId,I.axisValue=Sp(S.axis,{value:_}),I.axisValueLabel=b,I.marker=h.makeTooltipMarker("item",Kr(I.color),l);var L=Du(T.formatTooltip(D,!0,null)),M=L.frag;if(M){var P=da([T],n).get("valueFormatter");w.blocks.push(P?H({valueFormatter:P},M):M)}L.text&&c.push(L.text),u.push(I)}})}})}),v.blocks.reverse(),c.reverse();var f=r.position,p=s.get("order"),d=Iu(v,h,l,p,i.get("useUTC"),s.get("textStyle"));d&&c.unshift(d);var g=l==="richText"?`
`:"<br/>",y=c.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(s,f,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],f,null,h)})},e.prototype._showSeriesItemTooltip=function(t,r,i){var n=this._ecModel,o=tt(r),s=o.seriesIndex,l=n.getSeriesByIndex(s),u=o.dataModel||l,v=o.dataIndex,c=o.dataType,h=u.getData(c),f=this._renderMode,p=t.positionDefault,d=da([h.getItemModel(v),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),g=d.get("trigger");if(!(g!=null&&g!=="item")){var y=u.getDataParams(v,c),m=new Un;y.marker=m.makeTooltipMarker("item",Kr(y.color),f);var x=Du(u.formatTooltip(v,!1,c)),S=d.get("order"),_=d.get("valueFormatter"),b=x.frag,w=b?Iu(_?H({valueFormatter:_},b):b,m,f,S,n.get("useUTC"),d.get("textStyle")):x.text,A="item_"+u.name+"_"+v;this._showOrMove(d,function(){this._showTooltipContent(d,w,y,A,t.offsetX,t.offsetY,t.position,t.target,m)}),i({type:"showTip",dataIndexInside:v,dataIndex:h.getRawIndex(v),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,r,i){var n=tt(r),o=n.tooltipConfig,s=o.option||{};if(K(s)){var l=s;s={content:l,formatter:l}}var u=[s],v=this._ecModel.getComponent(n.componentMainType,n.componentIndex);v&&u.push(v),u.push({formatter:s.content});var c=t.positionDefault,h=da(u,this._tooltipModel,c?{position:c}:null),f=h.get("content"),p=Math.random()+"",d=new Un;this._showOrMove(h,function(){var g=nt(h.get("formatterParams")||{});this._showTooltipContent(h,f,g,p,t.offsetX,t.offsetY,t.position,r,d)}),i({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,r,i,n,o,s,l,u,v){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var c=this._tooltipContent,h=t.get("formatter");l=l||t.get("position");var f=r,p=this._getNearestPoint([o,s],i,t.get("trigger"),t.get("borderColor")),d=p.color;if(h)if(K(h)){var g=t.ecModel.get("useUTC"),y=B(i)?i[0]:i,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;f=h,m&&(f=l0(y.axisValue,f,g)),f=u0(f,i,!0)}else if(rt(h)){var x=$(function(S,_){S===this._ticket&&(c.setContent(_,v,t,d,l),this._updatePosition(t,l,o,s,c,i,u))},this);this._ticket=n,f=h(i,n,x)}else f=h;c.setContent(f,v,t,d,l),c.show(t,d),this._updatePosition(t,l,o,s,c,i,u)}},e.prototype._getNearestPoint=function(t,r,i,n){if(i==="axis"||B(r))return{color:n||(this._renderMode==="html"?"#fff":"none")};if(!B(r))return{color:n||r.color||r.borderColor}},e.prototype._updatePosition=function(t,r,i,n,o,s,l){var u=this._api.getWidth(),v=this._api.getHeight();r=r||t.get("position");var c=o.getSize(),h=t.get("align"),f=t.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),rt(r)&&(r=r([i,n],s,o.el,p,{viewSize:[u,v],contentSize:c.slice()})),B(r))i=G(r[0],u),n=G(r[1],v);else if(St(r)){var d=r;d.width=c[0],d.height=c[1];var g=Bt(d,{width:u,height:v});i=g.x,n=g.y,h=null,f=null}else if(K(r)&&l){var y=xM(r,p,c,t.get("borderWidth"));i=y[0],n=y[1]}else{var y=yM(i,n,o,u,v,h?null:20,f?null:20);i=y[0],n=y[1]}if(h&&(i-=Zh(h)?c[0]/2:h==="right"?c[0]:0),f&&(n-=Zh(f)?c[1]/2:f==="bottom"?c[1]:0),qg(t)){var y=mM(i,n,o,u,v);i=y[0],n=y[1]}o.moveTo(i,n)},e.prototype._updateContentNotChangedOnAxis=function(t,r){var i=this._lastDataByCoordSys,n=this._cbParamsList,o=!!i&&i.length===t.length;return o&&C(i,function(s,l){var u=s.dataByAxis||[],v=t[l]||{},c=v.dataByAxis||[];o=o&&u.length===c.length,o&&C(u,function(h,f){var p=c[f]||{},d=h.seriesDataIndices||[],g=p.seriesDataIndices||[];o=o&&h.value===p.value&&h.axisType===p.axisType&&h.axisId===p.axisId&&d.length===g.length,o&&C(d,function(y,m){var x=g[m];o=o&&y.seriesIndex===x.seriesIndex&&y.dataIndex===x.dataIndex}),n&&C(h.seriesDataIndices,function(y){var m=y.seriesIndex,x=r[m],S=n[m];x&&S&&S.data!==x.data&&(o=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=r,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,r){qt.node||!r.getDom()||(ka(this,"_updatePosition"),this._tooltipContent.dispose(),zs("itemTooltip",r))},e.type="tooltip",e}(Et);function da(a,e,t){var r=e.ecModel,i;t?(i=new Pt(t,r,r),i=new Pt(e.option,i,r)):i=e;for(var n=a.length-1;n>=0;n--){var o=a[n];o&&(o instanceof Pt&&(o=o.get("tooltip",!0)),K(o)&&(o={formatter:o}),o&&(i=new Pt(o,i,r)))}return i}function $h(a,e){return a.dispatchAction||$(e.dispatchAction,e)}function yM(a,e,t,r,i,n,o){var s=t.getSize(),l=s[0],u=s[1];return n!=null&&(a+l+n+2>r?a-=l+n:a+=n),o!=null&&(e+u+o>i?e-=u+o:e+=o),[a,e]}function mM(a,e,t,r,i){var n=t.getSize(),o=n[0],s=n[1];return a=Math.min(a+o,r)-o,e=Math.min(e+s,i)-s,a=Math.max(a,0),e=Math.max(e,0),[a,e]}function xM(a,e,t,r){var i=t[0],n=t[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,l=0,u=e.width,v=e.height;switch(a){case"inside":s=e.x+u/2-i/2,l=e.y+v/2-n/2;break;case"top":s=e.x+u/2-i/2,l=e.y-n-o;break;case"bottom":s=e.x+u/2-i/2,l=e.y+v+o;break;case"left":s=e.x-i-o,l=e.y+v/2-n/2;break;case"right":s=e.x+u+o,l=e.y+v/2-n/2}return[s,l]}function Zh(a){return a==="center"||a==="middle"}function SM(a,e,t){var r=v0(a).queryOptionMap,i=r.keys()[0];if(!(!i||i==="series")){var n=c0(e,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=n.models[0];if(!!o){var s=t.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var v=tt(u).tooltipConfig;if(v&&v.name===a.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}const bM=gM;function _M(a){J(oi),a.registerComponentModel(eM),a.registerComponentView(bM),a.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Ve),a.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Ve)}var wM=["rect","polygon","keep","clear"];function AM(a,e){var t=jt(a?a.brush:[]);if(!!t.length){var r=[];C(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(r=r.concat(u))});var i=a&&a.toolbox;B(i)&&(i=i[0]),i||(i={feature:{}},a.toolbox=[i]);var n=i.feature||(i.feature={}),o=n.brush||(n.brush={}),s=o.type||(o.type=[]);s.push.apply(s,r),TM(s),e&&!s.length&&s.push.apply(s,wM)}}function TM(a){var e={};C(a,function(t){e[t]=1}),a.length=0,C(e,function(t,r){a.push(r)})}var Uh=C;function Yh(a){if(a){for(var e in a)if(a.hasOwnProperty(e))return!0}}function $s(a,e,t){var r={};return Uh(e,function(n){var o=r[n]=i();Uh(a[n],function(s,l){if(!!Wt.isValidType(l)){var u={type:l,visual:s};t&&t(u,n),o[l]=new Wt(u),l==="opacity"&&(u=nt(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new Wt(u))}})}),r;function i(){var n=function(){};n.prototype.__hidden=n.prototype;var o=new n;return o}}function ty(a,e,t){var r;C(t,function(i){e.hasOwnProperty(i)&&Yh(e[i])&&(r=!0)}),r&&C(t,function(i){e.hasOwnProperty(i)&&Yh(e[i])?a[i]=nt(e[i]):delete a[i]})}function CM(a,e,t,r,i,n){var o={};C(a,function(c){var h=Wt.prepareVisualTypes(e[c]);o[c]=h});var s;function l(c){return Tp(t,s,c)}function u(c,h){Cp(t,s,c,h)}n==null?t.each(v):t.each([n],v);function v(c,h){s=n==null?c:h;var f=t.getRawDataItem(s);if(!(f&&f.visualMap===!1))for(var p=r.call(i,c),d=e[p],g=o[p],y=0,m=g.length;y<m;y++){var x=g[y];d[x]&&d[x].applyVisual(c,l,u)}}}function DM(a,e,t,r){var i={};return C(a,function(n){var o=Wt.prepareVisualTypes(e[n]);i[n]=o}),{progress:function(o,s){var l;r!=null&&(l=s.getDimensionIndex(r));function u(_){return Tp(s,c,_)}function v(_,b){Cp(s,c,_,b)}for(var c,h=s.getStore();(c=o.next())!=null;){var f=s.getRawDataItem(c);if(!(f&&f.visualMap===!1))for(var p=r!=null?h.get(l,c):c,d=t(p),g=e[d],y=i[d],m=0,x=y.length;m<x;m++){var S=y[m];g[S]&&g[S].applyVisual(p,u,v)}}}}}function IM(a){var e=a.brushType,t={point:function(r){return Xh[e].point(r,t,a)},rect:function(r){return Xh[e].rect(r,t,a)}};return t}var Xh={lineX:Kh(0),lineY:Kh(1),rect:{point:function(a,e,t){return a&&t.boundingRect.contain(a[0],a[1])},rect:function(a,e,t){return a&&t.boundingRect.intersect(a)}},polygon:{point:function(a,e,t){return a&&t.boundingRect.contain(a[0],a[1])&&ua(t.range,a[0],a[1])},rect:function(a,e,t){var r=t.range;if(!a||r.length<=1)return!1;var i=a.x,n=a.y,o=a.width,s=a.height,l=r[0];if(ua(r,i,n)||ua(r,i+o,n)||ua(r,i,n+s)||ua(r,i+o,n+s)||zt.create(a).contain(l[0],l[1])||li(i,n,i+o,n,r)||li(i,n,i,n+s,r)||li(i+o,n,i+o,n+s,r)||li(i,n+s,i+o,n+s,r))return!0}}};function Kh(a){var e=["x","y"],t=["width","height"];return{point:function(r,i,n){if(r){var o=n.range,s=r[a];return ga(s,o)}},rect:function(r,i,n){if(r){var o=n.range,s=[r[e[a]],r[e[a]]+r[t[a]]];return s[1]<s[0]&&s.reverse(),ga(s[0],o)||ga(s[1],o)||ga(o[0],s)||ga(o[1],s)}}}}function ga(a,e){return e[0]<=a&&a<=e[1]}var qh=["inBrush","outOfBrush"],Yo="__ecBrushSelect",Zs="__ecInBrushSelectEvent";function ey(a){a.eachComponent({mainType:"brush"},function(e){var t=e.brushTargetManager=new jl(e.option,a);t.setInputRanges(e.areas,a)})}function LM(a,e,t){var r=[],i,n;a.eachComponent({mainType:"brush"},function(o){t&&t.type==="takeGlobalCursor"&&o.setBrushOption(t.key==="brush"?t.brushOption:{brushType:!1})}),ey(a),a.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:nt(o.areas),selected:[]};r.push(l);var u=o.option,v=u.brushLink,c=[],h=[],f=[],p=!1;s||(i=u.throttleType,n=u.throttleDelay);var d=z(o.areas,function(_){var b=kM[_.brushType],w=j({boundingRect:b?b(_):void 0},_);return w.selectors=IM(w),w}),g=$s(o.option,qh,function(_){_.mappingMethod="fixed"});B(v)&&C(v,function(_){c[_]=1});function y(_){return v==="all"||!!c[_]}function m(_){return!!_.length}a.eachSeries(function(_,b){var w=f[b]=[];_.subType==="parallel"?x(_,b):S(_,b,w)});function x(_,b){var w=_.coordinateSystem;p=p||w.hasAxisBrushed(),y(b)&&w.eachActiveState(_.getData(),function(A,T){A==="active"&&(h[T]=1)})}function S(_,b,w){if(!(!_.brushSelector||RM(o,b))&&(C(d,function(T){o.brushTargetManager.controlSeries(T,_,a)&&w.push(T),p=p||m(w)}),y(b)&&m(w))){var A=_.getData();A.each(function(T){jh(_,w,A,T)&&(h[T]=1)})}}a.eachSeries(function(_,b){var w={seriesId:_.id,seriesIndex:b,seriesName:_.name,dataIndex:[]};l.selected.push(w);var A=f[b],T=_.getData(),D=y(b)?function(I){return h[I]?(w.dataIndex.push(T.getRawIndex(I)),"inBrush"):"outOfBrush"}:function(I){return jh(_,A,T,I)?(w.dataIndex.push(T.getRawIndex(I)),"inBrush"):"outOfBrush"};(y(b)?p:m(A))&&CM(qh,g,T,D)})}),MM(e,i,n,r,t)}function MM(a,e,t,r,i){if(!!i){var n=a.getZr();if(!n[Zs]){n[Yo]||(n[Yo]=PM);var o=sa(n,Yo,t,e);o(a,r)}}}function PM(a,e){if(!a.isDisposed()){var t=a.getZr();t[Zs]=!0,a.dispatchAction({type:"brushSelect",batch:e}),t[Zs]=!1}}function jh(a,e,t,r){for(var i=0,n=e.length;i<n;i++){var o=e[i];if(a.brushSelector(r,t,o.selectors,o))return!0}}function RM(a,e){var t=a.option.seriesIndex;return t!=null&&t!=="all"&&(B(t)?yt(t,e)<0:e!==t)}var kM={rect:function(a){return Jh(a.range)},polygon:function(a){for(var e,t=a.range,r=0,i=t.length;r<i;r++){e=e||[[1/0,-1/0],[1/0,-1/0]];var n=t[r];n[0]<e[0][0]&&(e[0][0]=n[0]),n[0]>e[0][1]&&(e[0][1]=n[0]),n[1]<e[1][0]&&(e[1][0]=n[1]),n[1]>e[1][1]&&(e[1][1]=n[1])}return e&&Jh(e)}};function Jh(a){return new zt(a[0][0],a[1][0],a[0][1]-a[0][0],a[1][1]-a[1][0])}var EM=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r){this.ecModel=t,this.api=r,this.model,(this._brushController=new Pl(r.getZr())).on("brush",$(this._onBrush,this)).mount()},e.prototype.render=function(t,r,i,n){this.model=t,this._updateController(t,r,i,n)},e.prototype.updateTransform=function(t,r,i,n){ey(r),this._updateController(t,r,i,n)},e.prototype.updateVisual=function(t,r,i,n){this.updateTransform(t,r,i,n)},e.prototype.updateView=function(t,r,i,n){this._updateController(t,r,i,n)},e.prototype._updateController=function(t,r,i,n){(!n||n.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var r=this.model.id,i=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:r,areas:nt(i),$from:r}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:r,areas:nt(i),$from:r})},e.type="brush",e}(Et);const VM=EM;var NM="#ddd",OM=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,r){var i=this.option;!r&&ty(i,t,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:NM},n.hasOwnProperty("liftZ")||(n.liftZ=5)},e.prototype.setAreas=function(t){dt(B(t)),C(t,function(r){dt(r.brushType,"Illegal areas")}),t&&(this.areas=z(t,function(r){return Qh(this.option,r)},this))},e.prototype.setBrushOption=function(t){this.brushOption=Qh(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}(It);function Qh(a,e){return ft({brushType:a.brushType,brushMode:a.brushMode,transformable:a.transformable,brushStyle:new Pt(a.brushStyle).getItemStyle(),removeOnClick:a.removeOnClick,z:a.z},e,!0)}const zM=OM;var BM=["rect","polygon","lineX","lineY","keep","clear"],GM=function(a){k(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.render=function(t,r,i){var n,o,s;r.eachComponent({mainType:"brush"},function(l){n=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=n,this._brushMode=o,C(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===n)?"emphasis":"normal")})},e.prototype.updateView=function(t,r,i){this.render(t,r,i)},e.prototype.getIcons=function(){var t=this.model,r=t.get("icon",!0),i={};return C(t.get("type",!0),function(n){r[n]&&(i[n]=r[n])}),i},e.prototype.onclick=function(t,r,i){var n=this._brushType,o=this._brushMode;i==="clear"?(r.dispatchAction({type:"axisAreaSelect",intervals:[]}),r.dispatchAction({type:"brush",command:"clear",areas:[]})):r.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?n:n===i?!1:i,brushMode:i==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var r={show:!0,type:BM.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])};return r},e}(le);const FM=GM;function HM(a){a.registerComponentView(VM),a.registerComponentModel(zM),a.registerPreprocessor(AM),a.registerVisual(a.PRIORITY.VISUAL.BRUSH,LM),a.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(r){r.setAreas(e.areas)})}),a.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Ve),a.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Ve),Br("brush",FM)}var WM=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left: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}(It),$M=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,r,i){if(this.group.removeAll(),!!t.get("show")){var n=this.group,o=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),u=Ft(t.get("textBaseline"),t.get("textVerticalAlign")),v=new lt({style:Rt(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),c=v.getBoundingRect(),h=t.get("subtext"),f=new lt({style:Rt(s,{text:h,fill:s.getTextColor(),y:c.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=t.get("link"),d=t.get("sublink"),g=t.get("triggerEvent",!0);v.silent=!p&&!g,f.silent=!d&&!g,p&&v.on("click",function(){Hi(p,"_"+t.get("target"))}),d&&f.on("click",function(){Hi(d,"_"+t.get("subtarget"))}),tt(v).eventData=tt(f).eventData=g?{componentType:"title",componentIndex:t.componentIndex}:null,n.add(v),h&&n.add(f);var y=n.getBoundingRect(),m=t.getBoxLayoutParams();m.width=y.width,m.height=y.height;var x=Bt(m,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));l||(l=t.get("left")||t.get("right"),l==="middle"&&(l="center"),l==="right"?x.x+=x.width:l==="center"&&(x.x+=x.width/2)),u||(u=t.get("top")||t.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?x.y+=x.height:u==="middle"&&(x.y+=x.height/2),u=u||"top"),n.x=x.x,n.y=x.y,n.markRedraw();var S={align:l,verticalAlign:u};v.setStyle(S),f.setStyle(S),y=n.getBoundingRect();var _=x.margin,b=t.getItemStyle(["color","opacity"]);b.fill=t.get("backgroundColor");var w=new ct({shape:{x:y.x-_[3],y:y.y-_[0],width:y.width+_[1]+_[3],height:y.height+_[0]+_[2],r:t.get("borderRadius")},style:b,subPixelOptimize:!0,silent:!0});n.add(w)}},e.type="title",e}(Et);function ZM(a){a.registerComponentModel(WM),a.registerComponentView($M)}var UM=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,r,i){this.mergeDefaultAndTheme(t,i),this._initData()},e.prototype.mergeOption=function(t){a.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){t==null&&(t=this.option.currentIndex);var r=this._data.count();this.option.loop?t=(t%r+r)%r:(t>=r&&(t=r-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t=this.option,r=t.data||[],i=t.axisType,n=this._names=[],o;i==="category"?(o=[],C(r,function(u,v){var c=Ie(h0(u),""),h;St(u)?(h=nt(u),h.value=v):h=v,o.push(h),n.push(c)})):o=r;var s={category:"ordinal",time:"time",value:"number"}[i]||"number",l=this._data=new Qt([{name:"value",type:s}],this);l.initData(o,n)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(It);const tf=UM;var ry=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=ar(tf.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(tf);Te(ry,Dp.prototype);const YM=ry;var XM=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e}(Et);const KM=XM;var qM=function(a){k(e,a);function e(t,r,i,n){var o=a.call(this,t,r,i)||this;return o.type=n||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(xe);const jM=qM;var Xo=Math.PI,ef=Lt(),JM=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,r){this.api=r},e.prototype.render=function(t,r,i){if(this.model=t,this.api=i,this.ecModel=r,this.group.removeAll(),t.get("show",!0)){var n=this._layout(t,i),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(n,t);t.formatTooltip=function(u){var v=l.scale.getLabel({value:u});return Ut("nameValue",{noName:!0,value:v})},C(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](n,o,l,t)},this),this._renderAxisLabel(n,s,l,t),this._position(n,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,r){var i=t.get(["label","position"]),n=t.get("orient"),o=t2(t,r),s;i==null||i==="auto"?s=n==="horizontal"?o.y+o.height/2<r.getHeight()/2?"-":"+":o.x+o.width/2<r.getWidth()/2?"+":"-":K(i)?s={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[n][i]:s=i;var l={horizontal:"center",vertical:s>=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},v={horizontal:0,vertical:Xo/2},c=n==="vertical"?o.height:o.width,h=t.getModel("controlStyle"),f=h.get("show",!0),p=f?h.get("itemSize"):0,d=f?h.get("itemGap"):0,g=p+d,y=t.get(["label","rotate"])||0;y=y*Xo/180;var m,x,S,_=h.get("position",!0),b=f&&h.get("showPlayBtn",!0),w=f&&h.get("showPrevBtn",!0),A=f&&h.get("showNextBtn",!0),T=0,D=c;_==="left"||_==="bottom"?(b&&(m=[0,0],T+=g),w&&(x=[T,0],T+=g),A&&(S=[D-p,0],D-=g)):(b&&(m=[D-p,0],D-=g),w&&(x=[0,0],T+=g),A&&(S=[D-p,0],D-=g));var I=[T,D];return t.get("inverse")&&I.reverse(),{viewRect:o,mainLength:c,orient:n,rotation:v[n],labelRotation:y,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[n],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[n],playPosition:m,prevBtnPosition:x,nextBtnPosition:S,axisExtent:I,controlSize:p,controlGap:d}},e.prototype._position=function(t,r){var i=this._mainGroup,n=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=Tr(),l=o.x,u=o.y+o.height;Je(s,s,[-l,-u]),oa(s,s,-Xo/2),Je(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var v=m(o),c=m(i.getBoundingRect()),h=m(n.getBoundingRect()),f=[i.x,i.y],p=[n.x,n.y];p[0]=f[0]=v[0][0];var d=t.labelPosOpt;if(d==null||K(d)){var g=d==="+"?0:1;x(f,c,v,1,g),x(p,h,v,1,1-g)}else{var g=d>=0?0:1;x(f,c,v,1,g),p[1]=f[1]+d}i.setPosition(f),n.setPosition(p),i.rotation=n.rotation=t.rotation,y(i),y(n);function y(S){S.originX=v[0][0]-S.x,S.originY=v[1][0]-S.y}function m(S){return[[S.x,S.x+S.width],[S.y,S.y+S.height]]}function x(S,_,b,w,A){S[w]+=b[w][A]-_[w][A]}},e.prototype._createAxis=function(t,r){var i=r.getData(),n=r.get("axisType"),o=QM(r,n);o.getTicks=function(){return i.mapArray(["value"],function(u){return{value:u}})};var s=i.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new jM("value",o,t.axisExtent,n);return l.model=r,l},e.prototype._createGroup=function(t){var r=this[t]=new U;return this.group.add(r),r},e.prototype._renderAxisLine=function(t,r,i,n){var o=i.getExtent();if(!!n.get(["lineStyle","show"])){var s=new Kt({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:H({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});r.add(s);var l=this._progressLine=new Kt({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:j({lineCap:"round",lineWidth:s.style.lineWidth},n.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});r.add(l)}},e.prototype._renderAxisTick=function(t,r,i,n){var o=this,s=n.getData(),l=i.scale.getTicks();this._tickSymbols=[],C(l,function(u){var v=i.dataToCoord(u.value),c=s.getItemModel(u.value),h=c.getModel("itemStyle"),f=c.getModel(["emphasis","itemStyle"]),p=c.getModel(["progress","itemStyle"]),d={x:v,y:0,onclick:$(o._changeTimeline,o,u.value)},g=rf(c,h,r,d);g.ensureState("emphasis").style=f.getItemStyle(),g.ensureState("progress").style=p.getItemStyle(),$r(g);var y=tt(g);c.get("tooltip")?(y.dataIndex=u.value,y.dataModel=n):y.dataIndex=y.dataModel=null,o._tickSymbols.push(g)})},e.prototype._renderAxisLabel=function(t,r,i,n){var o=this,s=i.getLabelModel();if(!!s.get("show")){var l=n.getData(),u=i.getViewLabels();this._tickLabels=[],C(u,function(v){var c=v.tickValue,h=l.getItemModel(c),f=h.getModel("label"),p=h.getModel(["emphasis","label"]),d=h.getModel(["progress","label"]),g=i.dataToCoord(v.tickValue),y=new lt({x:g,y:0,rotation:t.labelRotation-t.rotation,onclick:$(o._changeTimeline,o,c),silent:!1,style:Rt(f,{text:v.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});y.ensureState("emphasis").style=Rt(p),y.ensureState("progress").style=Rt(d),r.add(y),$r(y),ef(y).dataIndex=c,o._tickLabels.push(y)})}},e.prototype._renderControl=function(t,r,i,n){var o=t.controlSize,s=t.rotation,l=n.getModel("controlStyle").getItemStyle(),u=n.getModel(["emphasis","controlStyle"]).getItemStyle(),v=n.getPlayState(),c=n.get("inverse",!0);h(t.nextBtnPosition,"next",$(this._changeTimeline,this,c?"-":"+")),h(t.prevBtnPosition,"prev",$(this._changeTimeline,this,c?"+":"-")),h(t.playPosition,v?"stop":"play",$(this._handlePlayClick,this,!v),!0);function h(f,p,d,g){if(!!f){var y=zi(Ft(n.get(["controlStyle",p+"BtnSize"]),o),o),m=[0,-y/2,y,y],x=e2(n,p+"Icon",m,{x:f[0],y:f[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:d});x.ensureState("emphasis").style=u,r.add(x),$r(x)}}},e.prototype._renderCurrentPointer=function(t,r,i,n){var o=n.getData(),s=n.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,v={onCreate:function(c){c.draggable=!0,c.drift=$(u._handlePointerDrag,u),c.ondragend=$(u._handlePointerDragend,u),af(c,u._progressLine,s,i,n,!0)},onUpdate:function(c){af(c,u._progressLine,s,i,n)}};this._currentPointer=rf(l,l,this._mainGroup,{},this._currentPointer,v)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,r,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,r){var i=this._toAxisCoord(t)[0],n=this._axis,o=ue(n.getExtent().slice());i>o[1]&&(i=o[1]),i<o[0]&&(i=o[0]),this._currentPointer.x=i,this._currentPointer.markRedraw(),this._progressLine.shape.x2=i,this._progressLine.dirty();var s=this._findNearestTick(i),l=this.model;(r||s!==l.getCurrentIndex()&&l.get("realtime"))&&this._changeTimeline(s)},e.prototype._doPlayStop=function(){var t=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var r=t.model;t._changeTimeline(r.getCurrentIndex()+(r.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},e.prototype._toAxisCoord=function(t){var r=this._mainGroup.getLocalTransform();return Me(t,r,!0)},e.prototype._findNearestTick=function(t){var r=this.model.getData(),i=1/0,n,o=this._axis;return r.each(["value"],function(s,l){var u=o.dataToCoord(s),v=Math.abs(u-t);v<i&&(i=v,n=l)}),n},e.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},e.prototype._changeTimeline=function(t){var r=this.model.getCurrentIndex();t==="+"?t=r+1:t==="-"&&(t=r-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})},e.prototype._updateTicksStatus=function(){var t=this.model.getCurrentIndex(),r=this._tickSymbols,i=this._tickLabels;if(r)for(var n=0;n<r.length;n++)r&&r[n]&&r[n].toggleState("progress",n<t);if(i)for(var n=0;n<i.length;n++)i&&i[n]&&i[n].toggleState("progress",ef(i[n]).dataIndex<=t)},e.type="timeline.slider",e}(KM);function QM(a,e){if(e=e||a.get("type"),e)switch(e){case"category":return new p0({ordinalMeta:a.getCategories(),extent:[1/0,-1/0]});case"time":return new f0({locale:a.ecModel.getLocaleModel(),useUTC:a.ecModel.get("useUTC")});default:return new Bi}}function t2(a,e){return Bt(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},a.get("padding"))}function e2(a,e,t,r){var i=r.style,n=Ln(a.get(["controlStyle",e]),r||{},new zt(t[0],t[1],t[2],t[3]));return i&&n.setStyle(i),n}function rf(a,e,t,r,i,n){var o=e.get("color");if(i)i.setColor(o),t.add(i),n&&n.onUpdate(i);else{var s=a.get("symbol");i=kt(s,-1,-1,2,2,o),i.setStyle("strokeNoScale",!0),t.add(i),n&&n.onCreate(i)}var l=e.getItemStyle(["color"]);i.setStyle(l),r=ft({rectHover:!0,z2:100},r,!0);var u=Ua(a.get("symbolSize"));r.scaleX=u[0]/2,r.scaleY=u[1]/2;var v=ia(a.get("symbolOffset"),u);v&&(r.x=(r.x||0)+v[0],r.y=(r.y||0)+v[1]);var c=a.get("symbolRotate");return r.rotation=(c||0)*Math.PI/180||0,i.attr(r),i.updateTransform(),i}function af(a,e,t,r,i,n){if(!a.dragging){var o=i.getModel("checkpointStyle"),s=r.dataToCoord(i.getData().get("value",t));if(n||!o.get("animation",!0))a.attr({x:s,y:0}),e&&e.attr({shape:{x2:s}});else{var l={duration:o.get("animationDuration",!0),easing:o.get("animationEasing",!0)};a.stopAnimation(null,!0),a.animateTo({x:s,y:0},l),e&&e.animateTo({shape:{x2:s}},l)}}}const r2=JM;function a2(a){a.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(e,t,r){var i=t.getComponent("timeline");return i&&e.currentIndex!=null&&(i.setCurrentIndex(e.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.getPlayState()&&(i.setPlayState(!1),r.dispatchAction({type:"timelinePlayChange",playState:!1,from:e.from}))),t.resetOption("timeline",{replaceMerge:i.get("replaceMerge",!0)}),j({currentIndex:i.option.currentIndex},e)}),a.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(e,t){var r=t.getComponent("timeline");r&&e.playState!=null&&r.setPlayState(e.playState)})}function i2(a){var e=a&&a.timeline;B(e)||(e=e?[e]:[]),C(e,function(t){!t||n2(t)})}function n2(a){var e=a.type,t={number:"value",time:"time"};if(t[e]&&(a.axisType=t[e],delete a.type),nf(a),fr(a,"controlPosition")){var r=a.controlStyle||(a.controlStyle={});fr(r,"position")||(r.position=a.controlPosition),r.position==="none"&&!fr(r,"show")&&(r.show=!1,delete r.position),delete a.controlPosition}C(a.data||[],function(i){St(i)&&!B(i)&&(!fr(i,"value")&&fr(i,"name")&&(i.value=i.name),nf(i))})}function nf(a){var e=a.itemStyle||(a.itemStyle={}),t=e.emphasis||(e.emphasis={}),r=a.label||a.label||{},i=r.normal||(r.normal={}),n={normal:1,emphasis:1};C(r,function(o,s){!n[s]&&!fr(i,s)&&(i[s]=o)}),t.label&&!fr(r,"emphasis")&&(r.emphasis=t.label,delete t.label)}function fr(a,e){return a.hasOwnProperty(e)}function o2(a){a.registerComponentModel(YM),a.registerComponentView(r2),a.registerSubTypeDefaulter("timeline",function(){return"slider"}),a2(a),a.registerPreprocessor(i2)}function tu(a,e){if(!a)return!1;for(var t=B(a)?a:[a],r=0;r<t.length;r++)if(t[r]&&t[r][e])return!0;return!1}function Ai(a){Ya(a,"label",["show"])}var Ti=Lt(),ay=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.createdBySelf=!1,t}return e.prototype.init=function(t,r,i){if(this.type==="marker")throw new Error("Marker component is abstract component. Use markLine, markPoint, markArea instead.");this.mergeDefaultAndTheme(t,i),this._mergeOption(t,i,!1,!0)},e.prototype.isAnimationEnabled=function(){if(qt.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},e.prototype.mergeOption=function(t,r){this._mergeOption(t,r,!1,!1)},e.prototype._mergeOption=function(t,r,i,n){var o=this.mainType;i||r.eachSeries(function(s){var l=s.get(this.mainType,!0),u=Ti(s)[o];if(!l||!l.data){Ti(s)[o]=null;return}u?u._mergeOption(l,r,!0):(n&&Ai(l),C(l.data,function(v){v instanceof Array?(Ai(v[0]),Ai(v[1])):Ai(v)}),u=this.createMarkerModelFromSeries(l,this,r),H(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),Ti(s)[o]=u},this)},e.prototype.formatTooltip=function(t,r,i){var n=this.getData(),o=this.getRawValue(t),s=n.getName(t);return Ut("section",{header:this.name,blocks:[Ut("nameValue",{name:s,value:o,noName:!s,noValue:o==null})]})},e.prototype.getData=function(){return this._data},e.prototype.setData=function(t){this._data=t},e.getMarkerModelFromSeries=function(t,r){return Ti(t)[r]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e}(It);Te(ay,Dp.prototype);const rr=ay;var s2=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,r,i){return new e(t,r,i)},e.type="markPoint",e.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},e}(rr);const l2=s2;function u2(a){return!(isNaN(parseFloat(a.x))&&isNaN(parseFloat(a.y)))}function v2(a){return!isNaN(parseFloat(a.x))&&!isNaN(parseFloat(a.y))}function Ci(a,e,t,r,i,n){var o=[],s=Xr(e,r),l=s?e.getCalculationInfo("stackResultDimension"):r,u=eu(e,l,a),v=e.indicesOfNearest(l,u)[0];o[i]=e.get(t,v),o[n]=e.get(l,v);var c=e.get(r,v),h=d0(e.get(r,v));return h=Math.min(h,20),h>=0&&(o[n]=+o[n].toFixed(h)),[o,c]}var Ko={min:q(Ci,"min"),max:q(Ci,"max"),average:q(Ci,"average"),median:q(Ci,"median")};function $a(a,e){var t=a.getData(),r=a.coordinateSystem;if(e&&!v2(e)&&!B(e.coord)&&r){var i=r.dimensions,n=iy(e,t,r,a);if(e=nt(e),e.type&&Ko[e.type]&&n.baseAxis&&n.valueAxis){var o=yt(i,n.baseAxis.dim),s=yt(i,n.valueAxis.dim),l=Ko[e.type](t,n.baseDataDim,n.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else{for(var u=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis],v=0;v<2;v++)Ko[u[v]]&&(u[v]=eu(t,t.mapDimension(i[v]),u[v]));e.coord=u}}return e}function iy(a,e,t,r){var i={};return a.valueIndex!=null||a.valueDim!=null?(i.valueDataDim=a.valueIndex!=null?e.getDimension(a.valueIndex):a.valueDim,i.valueAxis=t.getAxis(c2(r,i.valueDataDim)),i.baseAxis=t.getOtherAxis(i.valueAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim)):(i.baseAxis=r.getBaseAxis(),i.valueAxis=t.getOtherAxis(i.baseAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim),i.valueDataDim=e.mapDimension(i.valueAxis.dim)),i}function c2(a,e){var t=a.getData().getDimensionInfo(e);return t&&t.coordDim}function Za(a,e){return a&&a.containData&&e.coord&&!u2(e)?a.containData(e.coord):!0}function ny(a,e){return a?function(t,r,i,n){var o=n<2?t.coord&&t.coord[n]:t.value;return $i(o,e[n])}:function(t,r,i,n){return $i(t.value,e[n])}}function eu(a,e,t){if(t==="average"){var r=0,i=0;return a.each(e,function(n,o){isNaN(n)||(r+=n,i++)}),r/i}else return t==="median"?a.getMedian(e):a.getDataExtent(e)[t==="max"?1:0]}var qo=Lt(),h2=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=it()},e.prototype.render=function(t,r,i){var n=this,o=this.markerGroupMap;o.each(function(s){qo(s).keep=!1}),r.eachSeries(function(s){var l=rr.getMarkerModelFromSeries(s,n.type);l&&n.renderSeries(s,l,r,i)}),o.each(function(s){!qo(s).keep&&n.group.remove(s.group)})},e.prototype.markKeep=function(t){qo(t).keep=!0},e.prototype.blurSeries=function(t){var r=this;C(t,function(i){var n=rr.getMarkerModelFromSeries(i,r.type);if(n){var o=n.getData();o.eachItemGraphicEl(function(s){s&&g0(s)})}})},e.type="marker",e}(Et);const ru=h2;function of(a,e,t){var r=e.coordinateSystem;a.each(function(i){var n=a.getItemModel(i),o,s=G(n.get("x"),t.getWidth()),l=G(n.get("y"),t.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(a.getValues(a.dimensions,i));else if(r){var u=a.get(r.dimensions[0],i),v=a.get(r.dimensions[1],i);o=r.dataToPoint([u,v])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),a.setItemLayout(i,o)})}var f2=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,r,i){r.eachSeries(function(n){var o=rr.getMarkerModelFromSeries(n,"markPoint");o&&(of(o.getData(),n,i),this.markerGroupMap.get(n.id).updateLayout())},this)},e.prototype.renderSeries=function(t,r,i,n){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,v=u.get(s)||u.set(s,new ti),c=p2(o,t,r);r.setData(c),of(r.getData(),t,n),c.each(function(h){var f=c.getItemModel(h),p=f.getShallow("symbol"),d=f.getShallow("symbolSize"),g=f.getShallow("symbolRotate"),y=f.getShallow("symbolOffset"),m=f.getShallow("symbolKeepAspect");if(rt(p)||rt(d)||rt(g)||rt(y)){var x=r.getRawValue(h),S=r.getDataParams(h);rt(p)&&(p=p(x,S)),rt(d)&&(d=d(x,S)),rt(g)&&(g=g(x,S)),rt(y)&&(y=y(x,S))}var _=f.getModel("itemStyle").getItemStyle(),b=Pn(l,"color");_.fill||(_.fill=b),c.setItemVisual(h,{symbol:p,symbolSize:d,symbolRotate:g,symbolOffset:y,symbolKeepAspect:m,style:_})}),v.updateData(c),this.group.add(v.group),c.eachItemGraphicEl(function(h){h.traverse(function(f){tt(f).dataModel=r})}),this.markKeep(v),v.group.silent=r.get("silent")||t.get("silent")},e.type="markPoint",e}(ru);function p2(a,e,t){var r;a?r=z(a&&a.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return H(H({},l),{name:s,ordinalMeta:null})}):r=[{name:"value",type:"float"}];var i=new Qt(r,t),n=z(t.get("data"),q($a,e));a&&(n=te(n,q(Za,a)));var o=ny(!!a,r);return i.initData(n,null,o),i}const d2=f2;function g2(a){a.registerComponentModel(l2),a.registerComponentView(d2),a.registerPreprocessor(function(e){tu(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var y2=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,r,i){return new e(t,r,i)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(rr);const m2=y2;var Di=Lt(),x2=function(a,e,t,r){var i=a.getData(),n;if(B(r))n=r;else{var o=r.type;if(o==="min"||o==="max"||o==="average"||o==="median"||r.xAxis!=null||r.yAxis!=null){var s=void 0,l=void 0;if(r.yAxis!=null||r.xAxis!=null)s=e.getAxis(r.yAxis!=null?"y":"x"),l=Ot(r.yAxis,r.xAxis);else{var u=iy(r,i,e,a);s=u.valueAxis;var v=y0(i,u.valueDataDim);l=eu(i,v,o)}var c=s.dim==="x"?0:1,h=1-c,f=nt(r),p={coord:[]};f.type=null,f.coord=[],f.coord[h]=-1/0,p.coord[h]=1/0;var d=t.get("precision");d>=0&&re(l)&&(l=+l.toFixed(Math.min(d,20))),f.coord[c]=p.coord[c]=l,n=[f,p,{type:o,valueIndex:r.valueIndex,value:l}]}else yn("Invalid markLine data."),n=[]}var g=[$a(a,n[0]),$a(a,n[1]),H({},n[2])];return g[2].type=g[2].type||null,ft(g[2],g[0]),ft(g[2],g[1]),g};function un(a){return!isNaN(a)&&!isFinite(a)}function sf(a,e,t,r){var i=1-a,n=r.dimensions[a];return un(e[i])&&un(t[i])&&e[a]===t[a]&&r.getAxis(n).containData(e[a])}function S2(a,e){if(a.type==="cartesian2d"){var t=e[0].coord,r=e[1].coord;if(t&&r&&(sf(1,t,r,a)||sf(0,t,r,a)))return!0}return Za(a,e[0])&&Za(a,e[1])}function jo(a,e,t,r,i){var n=r.coordinateSystem,o=a.getItemModel(e),s,l=G(o.get("x"),i.getWidth()),u=G(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(r.getMarkerPosition)s=r.getMarkerPosition(a.getValues(a.dimensions,e));else{var v=n.dimensions,c=a.get(v[0],e),h=a.get(v[1],e);s=n.dataToPoint([c,h])}if(Pe(n,"cartesian2d")){var f=n.getAxis("x"),p=n.getAxis("y"),v=n.dimensions;un(a.get(v[0],e))?s[0]=f.toGlobalCoord(f.getExtent()[t?0:1]):un(a.get(v[1],e))&&(s[1]=p.toGlobalCoord(p.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}a.setItemLayout(e,s)}var b2=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,r,i){r.eachSeries(function(n){var o=rr.getMarkerModelFromSeries(n,"markLine");if(o){var s=o.getData(),l=Di(o).from,u=Di(o).to;l.each(function(v){jo(l,v,!0,n,i),jo(u,v,!1,n,i)}),s.each(function(v){s.setItemLayout(v,[l.getItemLayout(v),u.getItemLayout(v)])}),this.markerGroupMap.get(n.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,r,i,n){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,v=u.get(s)||u.set(s,new Tl);this.group.add(v.group);var c=_2(o,t,r),h=c.from,f=c.to,p=c.line;Di(r).from=h,Di(r).to=f,r.setData(p);var d=r.get("symbol"),g=r.get("symbolSize"),y=r.get("symbolRotate"),m=r.get("symbolOffset");B(d)||(d=[d,d]),B(g)||(g=[g,g]),B(y)||(y=[y,y]),B(m)||(m=[m,m]),c.from.each(function(S){x(h,S,!0),x(f,S,!1)}),p.each(function(S){var _=p.getItemModel(S).getModel("lineStyle").getLineStyle();p.setItemLayout(S,[h.getItemLayout(S),f.getItemLayout(S)]),_.stroke==null&&(_.stroke=h.getItemVisual(S,"style").fill),p.setItemVisual(S,{fromSymbolKeepAspect:h.getItemVisual(S,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(S,"symbolOffset"),fromSymbolRotate:h.getItemVisual(S,"symbolRotate"),fromSymbolSize:h.getItemVisual(S,"symbolSize"),fromSymbol:h.getItemVisual(S,"symbol"),toSymbolKeepAspect:f.getItemVisual(S,"symbolKeepAspect"),toSymbolOffset:f.getItemVisual(S,"symbolOffset"),toSymbolRotate:f.getItemVisual(S,"symbolRotate"),toSymbolSize:f.getItemVisual(S,"symbolSize"),toSymbol:f.getItemVisual(S,"symbol"),style:_})}),v.updateData(p),c.line.eachItemGraphicEl(function(S,_){S.traverse(function(b){tt(b).dataModel=r})});function x(S,_,b){var w=S.getItemModel(_);jo(S,_,b,t,n);var A=w.getModel("itemStyle").getItemStyle();A.fill==null&&(A.fill=Pn(l,"color")),S.setItemVisual(_,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:Ft(w.get("symbolOffset",!0),m[b?0:1]),symbolRotate:Ft(w.get("symbolRotate",!0),y[b?0:1]),symbolSize:Ft(w.get("symbolSize"),g[b?0:1]),symbol:Ft(w.get("symbol",!0),d[b?0:1]),style:A})}this.markKeep(v),v.group.silent=r.get("silent")||t.get("silent")},e.type="markLine",e}(ru);function _2(a,e,t){var r;a?r=z(a&&a.dimensions,function(u){var v=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return H(H({},v),{name:u,ordinalMeta:null})}):r=[{name:"value",type:"float"}];var i=new Qt(r,t),n=new Qt(r,t),o=new Qt([],t),s=z(t.get("data"),q(x2,e,a,t));a&&(s=te(s,q(S2,a)));var l=ny(!!a,r);return i.initData(z(s,function(u){return u[0]}),null,l),n.initData(z(s,function(u){return u[1]}),null,l),o.initData(z(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:n,line:o}}const w2=b2;function A2(a){a.registerComponentModel(m2),a.registerComponentView(w2),a.registerPreprocessor(function(e){tu(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var T2=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,r,i){return new e(t,r,i)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(rr);const C2=T2;var Ii=Lt(),D2=function(a,e,t,r){var i=$a(a,r[0]),n=$a(a,r[1]),o=i.coord,s=n.coord;o[0]=Ot(o[0],-1/0),o[1]=Ot(o[1],-1/0),s[0]=Ot(s[0],1/0),s[1]=Ot(s[1],1/0);var l=al([{},i,n]);return l.coord=[i.coord,n.coord],l.x0=i.x,l.y0=i.y,l.x1=n.x,l.y1=n.y,l};function vn(a){return!isNaN(a)&&!isFinite(a)}function lf(a,e,t,r){var i=1-a;return vn(e[i])&&vn(t[i])}function I2(a,e){var t=e.coord[0],r=e.coord[1];return Pe(a,"cartesian2d")&&t&&r&&(lf(1,t,r)||lf(0,t,r))?!0:Za(a,{coord:t,x:e.x0,y:e.y0})||Za(a,{coord:r,x:e.x1,y:e.y1})}function uf(a,e,t,r,i){var n=r.coordinateSystem,o=a.getItemModel(e),s,l=G(o.get(t[0]),i.getWidth()),u=G(o.get(t[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(r.getMarkerPosition)s=r.getMarkerPosition(a.getValues(t,e));else{var v=a.get(t[0],e),c=a.get(t[1],e),h=[v,c];n.clampData&&n.clampData(h,h),s=n.dataToPoint(h,!0)}if(Pe(n,"cartesian2d")){var f=n.getAxis("x"),p=n.getAxis("y"),v=a.get(t[0],e),c=a.get(t[1],e);vn(v)?s[0]=f.toGlobalCoord(f.getExtent()[t[0]==="x0"?0:1]):vn(c)&&(s[1]=p.toGlobalCoord(p.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var vf=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],L2=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,r,i){r.eachSeries(function(n){var o=rr.getMarkerModelFromSeries(n,"markArea");if(o){var s=o.getData();s.each(function(l){var u=z(vf,function(c){return uf(s,l,c,n,i)});s.setItemLayout(l,u);var v=s.getItemGraphicEl(l);v.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,r,i,n){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,v=u.get(s)||u.set(s,{group:new U});this.group.add(v.group),this.markKeep(v);var c=M2(o,t,r);r.setData(c),c.each(function(h){var f=z(vf,function(A){return uf(c,h,A,t,n)}),p=o.getAxis("x").scale,d=o.getAxis("y").scale,g=p.getExtent(),y=d.getExtent(),m=[p.parse(c.get("x0",h)),p.parse(c.get("x1",h))],x=[d.parse(c.get("y0",h)),d.parse(c.get("y1",h))];ue(m),ue(x);var S=!(g[0]>m[1]||g[1]<m[0]||y[0]>x[1]||y[1]<x[0]),_=!S;c.setItemLayout(h,{points:f,allClipped:_});var b=c.getItemModel(h).getModel("itemStyle").getItemStyle(),w=Pn(l,"color");b.fill||(b.fill=w,K(b.fill)&&(b.fill=Wi(b.fill,.4))),b.stroke||(b.stroke=w),c.setItemVisual(h,"style",b)}),c.diff(Ii(v).data).add(function(h){var f=c.getItemLayout(h);if(!f.allClipped){var p=new ce({shape:{points:f.points}});c.setItemGraphicEl(h,p),v.group.add(p)}}).update(function(h,f){var p=Ii(v).data.getItemGraphicEl(f),d=c.getItemLayout(h);d.allClipped?p&&v.group.remove(p):(p?ot(p,{shape:{points:d.points}},r,h):p=new ce({shape:{points:d.points}}),c.setItemGraphicEl(h,p),v.group.add(p))}).remove(function(h){var f=Ii(v).data.getItemGraphicEl(h);v.group.remove(f)}).execute(),c.eachItemGraphicEl(function(h,f){var p=c.getItemModel(f),d=c.getItemVisual(f,"style");h.useStyle(c.getItemVisual(f,"style")),Yt(h,Ht(p),{labelFetcher:r,labelDataIndex:f,defaultText:c.getName(f)||"",inheritColor:K(d.fill)?Wi(d.fill,1):"#000"}),$t(h,p),bt(h,null,null,p.get(["emphasis","disabled"])),tt(h).dataModel=r}),Ii(v).data=c,v.group.silent=r.get("silent")||t.get("silent")},e.type="markArea",e}(ru);function M2(a,e,t){var r,i,n=["x0","y0","x1","y1"];if(a){var o=z(a&&a.dimensions,function(u){var v=e.getData(),c=v.getDimensionInfo(v.mapDimension(u))||{};return H(H({},c),{name:u,ordinalMeta:null})});i=z(n,function(u,v){return{name:u,type:o[v%2].type}}),r=new Qt(i,t)}else i=[{name:"value",type:"float"}],r=new Qt(i,t);var s=z(t.get("data"),q(D2,e,a,t));a&&(s=te(s,q(I2,a)));var l=a?function(u,v,c,h){var f=u.coord[Math.floor(h/2)][h%2];return $i(f,i[h])}:function(u,v,c,h){return $i(u.value,i[h])};return r.initData(s,null,l),r.hasItemOption=!0,r}const P2=L2;function R2(a){a.registerComponentModel(C2),a.registerComponentView(P2),a.registerPreprocessor(function(e){tu(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var k2=function(a,e){if(e==="all")return{type:"all",title:a.getLocaleModel().get(["legend","selector","all"])};if(e==="inverse")return{type:"inverse",title:a.getLocaleModel().get(["legend","selector","inverse"])}},E2=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.prototype.init=function(t,r,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(t,r){a.prototype.mergeOption.call(this,t,r),this._updateSelector(t)},e.prototype._updateSelector=function(t){var r=t.selector,i=this.ecModel;r===!0&&(r=t.selector=["all","inverse"]),B(r)&&C(r,function(n,o){K(n)&&(n={type:n}),r[o]=ft(n,k2(i,n.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&this.get("selectedMode")==="single"){for(var r=!1,i=0;i<t.length;i++){var n=t[i].get("name");if(this.isSelected(n)){this.select(n),r=!0;break}}!r&&this.select(t[0].get("name"))}},e.prototype._updateData=function(t){var r=[],i=[];t.eachRawSeries(function(s){var l=s.name;i.push(l);var u;if(s.legendVisualProvider){var v=s.legendVisualProvider,c=v.getAllNames();t.isSeriesFiltered(s)||(i=i.concat(c)),c.length?r=r.concat(c):u=!0}else u=!0;u&&m0(s)&&r.push(s.name)}),this._availableNames=i;var n=this.get("data")||r,o=z(n,function(s){return(K(s)||re(s))&&(s={name:s}),new Pt(s,this,this.ecModel)},this);this._data=o},e.prototype.getData=function(){return this._data},e.prototype.select=function(t){var r=this.option.selected,i=this.get("selectedMode");if(i==="single"){var n=this._data;C(n,function(o){r[o.get("name")]=!1})}r[t]=!0},e.prototype.unSelect=function(t){this.get("selectedMode")!=="single"&&(this.option.selected[t]=!1)},e.prototype.toggleSelected=function(t){var r=this.option.selected;r.hasOwnProperty(t)||(r[t]=!0),this[r[t]?"unSelect":"select"](t)},e.prototype.allSelect=function(){var t=this._data,r=this.option.selected;C(t,function(i){r[i.get("name",!0)]=!0})},e.prototype.inverseSelect=function(){var t=this._data,r=this.option.selected;C(t,function(i){var n=i.get("name",!0);r.hasOwnProperty(n)||(r[n]=!0),r[n]=!r[n]})},e.prototype.isSelected=function(t){var r=this.option.selected;return!(r.hasOwnProperty(t)&&!r[t])&&yt(this._availableNames,t)>=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,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}},e}(It);const Us=E2;var kr=q,Ys=C,Li=U,V2=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!1,t}return e.prototype.init=function(){this.group.add(this._contentGroup=new Li),this.group.add(this._selectorGroup=new Li),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,r,i){var n=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var o=t.get("align"),s=t.get("orient");(!o||o==="auto")&&(o=t.get("left")==="right"&&s==="vertical"?"right":"left");var l=t.get("selector",!0),u=t.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,t,r,i,l,s,u);var v=t.getBoxLayoutParams(),c={width:i.getWidth(),height:i.getHeight()},h=t.get("padding"),f=Bt(v,c,h),p=this.layoutInner(t,o,f,n,l,u),d=Bt(j({width:p.width,height:p.height},v),c,h);this.group.x=d.x-p.x,this.group.y=d.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=Yg(p,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,r,i,n,o,s,l){var u=this.getContentGroup(),v=it(),c=r.get("selectedMode"),h=[];i.eachRawSeries(function(f){!f.get("legendHoverLink")&&h.push(f.id)}),Ys(r.getData(),function(f,p){var d=f.get("name");if(!this.newlineDisabled&&(d===""||d===`
`)){var g=new Li;g.newline=!0,u.add(g);return}var y=i.getSeriesByName(d)[0];if(!v.get(d)){if(y){var m=y.getData(),x=m.getVisual("legendLineStyle")||{},S=m.getVisual("legendIcon"),_=m.getVisual("style"),b=this._createItem(y,d,p,f,r,t,x,_,S,c);b.on("click",kr(cf,d,null,n,h)).on("mouseover",kr(Xs,y.name,null,n,h)).on("mouseout",kr(Ks,y.name,null,n,h)),v.set(d,!0)}else i.eachRawSeries(function(w){if(!v.get(d)&&w.legendVisualProvider){var A=w.legendVisualProvider;if(!A.containName(d))return;var T=A.indexOfName(d),D=A.getItemVisual(T,"style"),I=A.getItemVisual(T,"legendIcon"),L=pp(D.fill);L&&L[3]===0&&(L[3]=.2,D=H(H({},D),{fill:Mi(L,"rgba")}));var M=this._createItem(w,d,p,f,r,t,{},D,I,c);M.on("click",kr(cf,null,d,n,h)).on("mouseover",kr(Xs,null,d,n,h)).on("mouseout",kr(Ks,null,d,n,h)),v.set(d,!0)}},this);v.get(d)||console.warn(d+" series not exists. Legend data should be same with series name or data name.")}},this),o&&this._createSelector(o,r,n,s,l)},e.prototype._createSelector=function(t,r,i,n,o){var s=this.getSelectorGroup();Ys(t,function(u){var v=u.type,c=new lt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:v==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(c);var h=r.getModel("selectorLabel"),f=r.getModel(["emphasis","selectorLabel"]);Yt(c,{normal:h,emphasis:f},{defaultText:u.title}),$r(c)})},e.prototype._createItem=function(t,r,i,n,o,s,l,u,v,c){var h=t.visualDrawType,f=o.get("itemWidth"),p=o.get("itemHeight"),d=o.isSelected(r),g=n.get("symbolRotate"),y=n.get("symbolKeepAspect"),m=n.get("icon");v=m||v||"roundRect";var x=N2(v,n,l,u,h,d),S=new Li,_=n.getModel("textStyle");if(rt(t.getLegendIcon)&&(!m||m==="inherit"))S.add(t.getLegendIcon({itemWidth:f,itemHeight:p,icon:v,iconRotate:g,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:y}));else{var b=m==="inherit"&&t.getData().getVisual("symbol")?g==="inherit"?t.getData().getVisual("symbolRotate"):g:0;S.add(O2({itemWidth:f,itemHeight:p,icon:v,iconRotate:b,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:y}))}var w=s==="left"?f+5:-5,A=s,T=o.get("formatter"),D=r;K(T)&&T?D=T.replace("{name}",r!=null?r:""):rt(T)&&(D=T(r));var I=n.get("inactiveColor");S.add(new lt({style:Rt(_,{text:D,x:w,y:p/2,fill:d?_.getTextColor():I,align:A,verticalAlign:"middle"})}));var L=new ct({shape:S.getBoundingRect(),invisible:!0}),M=n.getModel("tooltip");return M.get("show")&&Ka({el:L,componentModel:o,itemName:r,itemTooltipOption:M.option}),S.add(L),S.eachChild(function(P){P.silent=!0}),L.silent=!c,this.getContentGroup().add(S),$r(S),S.__legendDataIndex=i,S},e.prototype.layoutInner=function(t,r,i,n,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();yr(t.get("orient"),l,t.get("itemGap"),i.width,i.height);var v=l.getBoundingRect(),c=[-v.x,-v.y];if(u.markRedraw(),l.markRedraw(),o){yr("horizontal",u,t.get("selectorItemGap",!0));var h=u.getBoundingRect(),f=[-h.x,-h.y],p=t.get("selectorButtonGap",!0),d=t.getOrient().index,g=d===0?"width":"height",y=d===0?"height":"width",m=d===0?"y":"x";s==="end"?f[d]+=v[g]+p:c[d]+=h[g]+p,f[1-d]+=v[y]/2-h[y]/2,u.x=f[0],u.y=f[1],l.x=c[0],l.y=c[1];var x={x:0,y:0};return x[g]=v[g]+p+h[g],x[y]=Math.max(v[y],h[y]),x[m]=Math.min(0,h[m]+f[1-d]),x}else return l.x=c[0],l.y=c[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(Et);function N2(a,e,t,r,i,n){function o(p,d){p.lineWidth==="auto"&&(p.lineWidth=d.lineWidth>0?2:0),Ys(p,function(g,y){p[y]==="inherit"&&(p[y]=d[y])})}var s=e.getModel("itemStyle"),l=s.getItemStyle(),u=a.lastIndexOf("empty",0)===0?"fill":"stroke";l.decal=r.decal,l.fill==="inherit"&&(l.fill=r[i]),l.stroke==="inherit"&&(l.stroke=r[u]),l.opacity==="inherit"&&(l.opacity=(i==="fill"?r:t).opacity),o(l,r);var v=e.getModel("lineStyle"),c=v.getLineStyle();if(o(c,t),l.fill==="auto"&&(l.fill=r.fill),l.stroke==="auto"&&(l.stroke=r.fill),c.stroke==="auto"&&(c.stroke=r.fill),!n){var h=e.get("inactiveBorderWidth"),f=l[u];l.lineWidth=h==="auto"?r.lineWidth>0&&f?2:0:l.lineWidth,l.fill=e.get("inactiveColor"),l.stroke=e.get("inactiveBorderColor"),c.stroke=v.get("inactiveColor"),c.lineWidth=v.get("inactiveWidth")}return{itemStyle:l,lineStyle:c}}function O2(a){var e=a.icon||"roundRect",t=kt(e,0,0,a.itemWidth,a.itemHeight,a.itemStyle.fill,a.symbolKeepAspect);return t.setStyle(a.itemStyle),t.rotation=(a.iconRotate||0)*Math.PI/180,t.setOrigin([a.itemWidth/2,a.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill="#fff",t.style.lineWidth=2),t}function cf(a,e,t,r){Ks(a,e,t,r),t.dispatchAction({type:"legendToggleSelect",name:a!=null?a:e}),Xs(a,e,t,r)}function oy(a){for(var e=a.getZr().storage.getDisplayList(),t,r=0,i=e.length;r<i&&!(t=e[r].states.emphasis);)r++;return t&&t.hoverLayer}function Xs(a,e,t,r){oy(t)||t.dispatchAction({type:"highlight",seriesName:a,name:e,excludeSeriesId:r})}function Ks(a,e,t,r){oy(t)||t.dispatchAction({type:"downplay",seriesName:a,name:e,excludeSeriesId:r})}const sy=V2;function z2(a){var e=a.findComponents({mainType:"legend"});e&&e.length&&a.filterSeries(function(t){for(var r=0;r<e.length;r++)if(!e[r].isSelected(t.name))return!1;return!0})}function ya(a,e,t){var r={},i=a==="toggleSelected",n;return t.eachComponent("legend",function(o){i&&n!=null?o[n?"select":"unSelect"](e.name):a==="allSelect"||a==="inverseSelect"?o[a]():(o[a](e.name),n=o.isSelected(e.name));var s=o.getData();C(s,function(l){var u=l.get("name");if(!(u===`
`||u==="")){var v=o.isSelected(u);r.hasOwnProperty(u)?r[u]=r[u]&&v:r[u]=v}})}),a==="allSelect"||a==="inverseSelect"?{selected:r}:{name:e.name,selected:r}}function B2(a){a.registerAction("legendToggleSelect","legendselectchanged",q(ya,"toggleSelected")),a.registerAction("legendAllSelect","legendselectall",q(ya,"allSelect")),a.registerAction("legendInverseSelect","legendinverseselect",q(ya,"inverseSelect")),a.registerAction("legendSelect","legendselected",q(ya,"select")),a.registerAction("legendUnSelect","legendunselected",q(ya,"unSelect"))}function ly(a){a.registerComponentModel(Us),a.registerComponentView(sy),a.registerProcessor(a.PRIORITY.PROCESSOR.SERIES_FILTER,z2),a.registerSubTypeDefaulter("legend",function(){return"plain"}),B2(a)}var G2=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.setScrollDataIndex=function(t){this.option.scrollDataIndex=t},e.prototype.init=function(t,r,i){var n=bn(t);a.prototype.init.call(this,t,r,i),hf(this,t,n)},e.prototype.mergeOption=function(t,r){a.prototype.mergeOption.call(this,t,r),hf(this,this.option,t)},e.type="legend.scroll",e.defaultOption=ar(Us.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}(Us);function hf(a,e,t){var r=a.getOrient(),i=[1,1];i[r.index]=0,_n(e,t,{type:"box",ignoreSize:!!i})}const F2=G2;var ff=U,Jo=["width","height"],Qo=["x","y"],H2=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!0,t._currentIndex=0,t}return e.prototype.init=function(){a.prototype.init.call(this),this.group.add(this._containerGroup=new ff),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new ff)},e.prototype.resetInner=function(){a.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},e.prototype.renderInner=function(t,r,i,n,o,s,l){var u=this;a.prototype.renderInner.call(this,t,r,i,n,o,s,l);var v=this._controllerGroup,c=r.get("pageIconSize",!0),h=B(c)?c:[c,c];p("pagePrev",0);var f=r.getModel("pageTextStyle");v.add(new lt({name:"pageText",style:{text:"xx/xx",fill:f.getTextColor(),font:f.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),p("pageNext",1);function p(d,g){var y=d+"DataIndex",m=Ln(r.get("pageIcons",!0)[r.getOrient().name][g],{onclick:$(u._pageGo,u,y,r,n)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});m.name=d,v.add(m)}},e.prototype.layoutInner=function(t,r,i,n,o,s){var l=this.getSelectorGroup(),u=t.getOrient().index,v=Jo[u],c=Qo[u],h=Jo[1-u],f=Qo[1-u];o&&yr("horizontal",l,t.get("selectorItemGap",!0));var p=t.get("selectorButtonGap",!0),d=l.getBoundingRect(),g=[-d.x,-d.y],y=nt(i);o&&(y[v]=i[v]-d[v]-p);var m=this._layoutContentAndController(t,n,y,u,v,h,f,c);if(o){if(s==="end")g[u]+=m[v]+p;else{var x=d[v]+p;g[u]-=x,m[c]-=x}m[v]+=d[v]+p,g[1-u]+=m[f]+m[h]/2-d[h]/2,m[h]=Math.max(m[h],d[h]),m[f]=Math.min(m[f],d[f]+g[1-u]),l.x=g[0],l.y=g[1],l.markRedraw()}return m},e.prototype._layoutContentAndController=function(t,r,i,n,o,s,l,u){var v=this.getContentGroup(),c=this._containerGroup,h=this._controllerGroup;yr(t.get("orient"),v,t.get("itemGap"),n?i.width:null,n?null:i.height),yr("horizontal",h,t.get("pageButtonItemGap",!0));var f=v.getBoundingRect(),p=h.getBoundingRect(),d=this._showController=f[o]>i[o],g=[-f.x,-f.y];r||(g[n]=v[u]);var y=[0,0],m=[-p.x,-p.y],x=Ft(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(d){var S=t.get("pageButtonPosition",!0);S==="end"?m[n]+=i[o]-p[o]:y[n]+=p[o]+x}m[1-n]+=f[s]/2-p[s]/2,v.setPosition(g),c.setPosition(y),h.setPosition(m);var _={x:0,y:0};if(_[o]=d?i[o]:f[o],_[s]=Math.max(f[s],p[s]),_[l]=Math.min(0,p[l]+m[1-n]),c.__rectSize=i[o],d){var b={x:0,y:0};b[o]=Math.max(i[o]-p[o]-x,0),b[s]=_[s],c.setClipPath(new ct({shape:b})),c.__rectSize=b[o]}else h.eachChild(function(A){A.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(t);return w.pageIndex!=null&&ot(v,{x:w.contentPosition[0],y:w.contentPosition[1]},d?t:null),this._updatePageInfoView(t,w),_},e.prototype._pageGo=function(t,r,i){var n=this._getPageInfo(r)[t];n!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:r.id})},e.prototype._updatePageInfoView=function(t,r){var i=this._controllerGroup;C(["pagePrev","pageNext"],function(v){var c=v+"DataIndex",h=r[c]!=null,f=i.childOfName(v);f&&(f.setStyle("fill",h?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),f.cursor=h?"pointer":"default")});var n=i.childOfName("pageText"),o=t.get("pageFormatter"),s=r.pageIndex,l=s!=null?s+1:0,u=r.pageCount;n&&o&&n.setStyle("text",K(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(t){var r=t.get("scrollDataIndex",!0),i=this.getContentGroup(),n=this._containerGroup.__rectSize,o=t.getOrient().index,s=Jo[o],l=Qo[o],u=this._findTargetItemIndex(r),v=i.children(),c=v[u],h=v.length,f=h?1:0,p={contentPosition:[i.x,i.y],pageCount:f,pageIndex:f-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return p;var d=S(c);p.contentPosition[o]=-d.s;for(var g=u+1,y=d,m=d,x=null;g<=h;++g)x=S(v[g]),(!x&&m.e>y.s+n||x&&!_(x,y.s))&&(m.i>y.i?y=m:y=x,y&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=y.i),++p.pageCount)),m=x;for(var g=u-1,y=d,m=d,x=null;g>=-1;--g)x=S(v[g]),(!x||!_(m,x.s))&&y.i<m.i&&(m=y,p.pagePrevDataIndex==null&&(p.pagePrevDataIndex=y.i),++p.pageCount,++p.pageIndex),y=x;return p;function S(b){if(b){var w=b.getBoundingRect(),A=w[l]+b[l];return{s:A,e:A+w[s],i:b.__legendDataIndex}}}function _(b,w){return b.e>=w&&b.s<=w+n}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var r,i=this.getContentGroup(),n;return i.eachChild(function(o,s){var l=o.__legendDataIndex;n==null&&l!=null&&(n=s),l===t&&(r=s)}),r!=null?r:n},e.type="legend.scroll",e}(sy);const W2=H2;function $2(a){a.registerAction("legendScroll","legendscroll",function(e,t){var r=e.scrollDataIndex;r!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(i){i.setScrollDataIndex(r)})})}function Z2(a){J(ly),a.registerComponentModel(F2),a.registerComponentView(W2),$2(a)}function U2(a){J(ly),J(Z2)}var Y2=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=ar(Wa.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(Wa);const X2=Y2;var au=Lt();function K2(a,e,t){au(a).coordSysRecordMap.each(function(r){var i=r.dataZoomInfoMap.get(e.uid);i&&(i.getRange=t)})}function q2(a,e){for(var t=au(a).coordSysRecordMap,r=t.keys(),i=0;i<r.length;i++){var n=r[i],o=t.get(n),s=o.dataZoomInfoMap;if(s){var l=e.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||uy(t,o))}}}function uy(a,e){if(e){a.removeKey(e.model.uid);var t=e.controller;t&&t.dispose()}}function j2(a,e){var t={model:e,containsPoint:q(Q2,e),dispatchAction:q(J2,a),dataZoomInfoMap:null,controller:null},r=t.controller=new ii(a.getZr());return C(["pan","zoom","scrollMove"],function(i){r.on(i,function(n){var o=[];t.dataZoomInfoMap.each(function(s){if(!!n.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[i],u=l&&l(s.dzReferCoordSysInfo,t.model.mainType,t.controller,n);!s.model.get("disabled",!0)&&u&&o.push({dataZoomId:s.model.id,start:u[0],end:u[1]})}}),o.length&&t.dispatchAction(o)})}),t}function J2(a,e){a.isDisposed()||a.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function Q2(a,e,t,r){return a.coordinateSystem.containPoint([t,r])}function tP(a){var e,t="type_",r={type_true:2,type_move:1,type_false:0,type_undefined:-1},i=!0;return a.each(function(n){var o=n.model,s=o.get("disabled",!0)?!1:o.get("zoomLock",!0)?"move":!0;r[t+s]>r[t+e]&&(e=s),i=i&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}function eP(a){a.registerProcessor(a.PRIORITY.PROCESSOR.FILTER,function(e,t){var r=au(t),i=r.coordSysRecordMap||(r.coordSysRecordMap=it());i.each(function(n){n.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(n){var o=$g(n);C(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,j2(t,s.model)),v=u.dataZoomInfoMap||(u.dataZoomInfoMap=it());v.set(n.uid,{dzReferCoordSysInfo:s,model:n,getRange:null})})}),i.each(function(n){var o=n.controller,s,l=n.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){uy(i,n);return}var v=tP(l);o.enable(v.controlType,v.opt),o.setPointerChecker(n.containsPoint),sa(n,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var rP=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,r,i){if(a.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),K2(i,t,{pan:$(ts.pan,this),zoom:$(ts.zoom,this),scrollMove:$(ts.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),a.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){q2(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(Xl),ts={zoom:function(a,e,t,r){var i=this.range,n=i.slice(),o=a.axisModels[0];if(!!o){var s=es[e](null,[r.originX,r.originY],o,t,a),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(n[1]-n[0])+n[0],u=Math.max(1/r.scale,0);n[0]=(n[0]-l)*u+l,n[1]=(n[1]-l)*u+l;var v=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Dr(0,n,[0,100],0,v.minSpan,v.maxSpan),this.range=n,i[0]!==n[0]||i[1]!==n[1])return n}},pan:pf(function(a,e,t,r,i,n){var o=es[r]([n.oldX,n.oldY],[n.newX,n.newY],e,i,t);return o.signal*(a[1]-a[0])*o.pixel/o.pixelLength}),scrollMove:pf(function(a,e,t,r,i,n){var o=es[r]([0,0],[n.scrollDelta,n.scrollDelta],e,i,t);return o.signal*(a[1]-a[0])*n.scrollDelta})};function pf(a){return function(e,t,r,i){var n=this.range,o=n.slice(),s=e.axisModels[0];if(!!s){var l=a(o,s,e,t,r,i);if(Dr(l,o,[0,100],"all"),this.range=o,n[0]!==o[0]||n[1]!==o[1])return o}}}var es={grid:function(a,e,t,r,i){var n=t.axis,o={},s=i.model.coordinateSystem.getRect();return a=a||[0,0],n.dim==="x"?(o.pixel=e[0]-a[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=n.inverse?1:-1):(o.pixel=e[1]-a[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=n.inverse?-1:1),o},polar:function(a,e,t,r,i){var n=t.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return a=a?s.pointToCoord(a):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-a[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=n.inverse?1:-1):(o.pixel=e[1]-a[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=n.inverse?-1:1),o},singleAxis:function(a,e,t,r,i){var n=t.axis,o=i.model.coordinateSystem.getRect(),s={};return a=a||[0,0],n.orient==="horizontal"?(s.pixel=e[0]-a[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=n.inverse?1:-1):(s.pixel=e[1]-a[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=n.inverse?-1:1),s}};const aP=rP;function vy(a){Kl(a),a.registerComponentModel(X2),a.registerComponentView(aP),eP(a)}var iP=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=ar(Wa.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#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:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(Wa);const nP=iP;var ma=ct,df=7,oP=1,rs=30,sP=7,xa="horizontal",gf="vertical",lP=5,uP=["line","bar","candlestick","scatter"],vP={easing:"cubicOut",duration:100,delay:0},cP=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,r){this.api=r,this._onBrush=$(this._onBrush,this),this._onBrushEnd=$(this._onBrushEnd,this)},e.prototype.render=function(t,r,i,n){if(a.prototype.render.apply(this,arguments),sa(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),t.get("show")===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!n||n.type!=="dataZoom"||n.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),a.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){ka(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var r=this._displayables.sliderGroup=new U;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(r),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,r=this.api,i=t.get("brushSelect"),n=i?sP:0,o=this._findCoordRect(),s={width:r.getWidth(),height:r.getHeight()},l=this._orient===xa?{right:s.width-o.x-o.width,top:s.height-rs-df-n,width:o.width,height:rs}:{right:df,top:o.y,width:rs,height:o.height},u=bn(t.option);C(["right","top","width","height"],function(c){u[c]==="ph"&&(u[c]=l[c])});var v=Bt(u,s);this._location={x:v.x,y:v.y},this._size=[v.width,v.height],this._orient===gf&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,r=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),o=n&&n.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===xa&&!o?{scaleY:l?1:-1,scaleX:1}:i===xa&&o?{scaleY:l?1:-1,scaleX:-1}:i===gf&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=t.getBoundingRect([s]);t.x=r.x-u.x,t.y=r.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,r=this._size,i=this._displayables.sliderGroup,n=t.get("brushSelect");i.add(new ma({silent:!0,shape:{x:0,y:0,width:r[0],height:r[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new ma({shape:{x:0,y:0,width:r[0],height:r[1]},style:{fill:"transparent"},z2:0,onclick:$(this._onClickPanel,this)}),s=this.api.getZr();n?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),i.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var r=this._size,i=this._shadowSize||[],n=t.series,o=n.getRawData(),s=n.getShadowDim?n.getShadowDim():t.otherDim;if(s==null)return;var l=this._shadowPolygonPts,u=this._shadowPolylinePts;if(o!==this._shadowData||s!==this._shadowDim||r[0]!==i[0]||r[1]!==i[1]){var v=o.getDataExtent(s),c=(v[1]-v[0])*.3;v=[v[0]-c,v[1]+c];var h=[0,r[1]],f=[0,r[0]],p=[[r[0],0],[0,0]],d=[],g=f[1]/(o.count()-1),y=0,m=Math.round(o.count()/r[0]),x;o.each([s],function(A,T){if(m>0&&T%m){y+=g;return}var D=A==null||isNaN(A)||A==="",I=D?0:vt(A,v,h,!0);D&&!x&&T?(p.push([p[p.length-1][0],0]),d.push([d[d.length-1][0],0])):!D&&x&&(p.push([y,0]),d.push([y,0])),p.push([y,I]),d.push([y,I]),y+=g,x=D}),l=this._shadowPolygonPts=p,u=this._shadowPolylinePts=d}this._shadowData=o,this._shadowDim=s,this._shadowSize=[r[0],r[1]];var S=this.dataZoomModel;function _(A){var T=S.getModel(A?"selectedDataBackground":"dataBackground"),D=new U,I=new ce({shape:{points:l},segmentIgnoreThreshold:1,style:T.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),L=new me({shape:{points:u},segmentIgnoreThreshold:1,style:T.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return D.add(I),D.add(L),D}for(var b=0;b<3;b++){var w=_(b===1);this._displayables.sliderGroup.add(w),this._displayables.dataShadowSegs.push(w)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,r=t.get("showDataShadow");if(r!==!1){var i,n=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();C(l,function(u){if(!i&&!(r!==!0&&yt(uP,u.get("type"))<0)){var v=n.getComponent(Xe(o),s).axis,c=hP(o),h,f=u.coordinateSystem;c!=null&&f.getOtherAxis&&(h=f.getOtherAxis(v).inverse),c=u.getData().mapDimension(c),i={thisAxis:v,series:u,thisDim:o,otherDim:c,otherAxisInverse:h}}},this)},this),i}},e.prototype._renderHandle=function(){var t=this.group,r=this._displayables,i=r.handles=[null,null],n=r.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,v=l.get("borderRadius")||0,c=l.get("brushSelect"),h=r.filler=new ma({silent:c,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new ma({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:v},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:oP,fill:"rgba(0,0,0,0)"}})),C([0,1],function(x){var S=l.get("handleIcon");!x0[S]&&S.indexOf("path://")<0&&S.indexOf("image://")<0&&(S="path://"+S,S0("handleIcon now needs 'path://' prefix when using a path string"));var _=kt(S,-1,0,2,2,null,!0);_.attr({cursor:yf(this._orient),draggable:!0,drift:$(this._onDragMove,this,x),ondragend:$(this._onDragEnd,this),onmouseover:$(this._showDataInfo,this,!0),onmouseout:$(this._showDataInfo,this,!1),z2:5});var b=_.getBoundingRect(),w=l.get("handleSize");this._handleHeight=G(w,this._size[1]),this._handleWidth=b.width/b.height*this._handleHeight,_.setStyle(l.getModel("handleStyle").getItemStyle()),_.style.strokeNoScale=!0,_.rectHover=!0,_.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),$r(_);var A=l.get("handleColor");A!=null&&(_.style.fill=A),o.add(i[x]=_);var T=l.getModel("textStyle");t.add(n[x]=new lt({silent:!0,invisible:!0,style:Rt(T,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:T.getTextColor(),font:T.getFont()}),z2:10}))},this);var f=h;if(c){var p=G(l.get("moveHandleSize"),s[1]),d=r.moveHandle=new ct({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),g=p*.8,y=r.moveHandleIcon=kt(l.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!0);y.silent=!0,y.y=s[1]+p/2-.5,d.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(s[1]/2,Math.max(p,10));f=r.moveZone=new ct({invisible:!0,shape:{y:s[1]-m,height:p+m}}),f.on("mouseover",function(){u.enterEmphasis(d)}).on("mouseout",function(){u.leaveEmphasis(d)}),o.add(d),o.add(y),o.add(f)}f.attr({draggable:!0,cursor:yf(this._orient),drift:$(this._onDragMove,this,"all"),ondragstart:$(this._showDataInfo,this,!0),ondragend:$(this._onDragEnd,this),onmouseover:$(this._showDataInfo,this,!0),onmouseout:$(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),r=this._getViewExtent();this._handleEnds=[vt(t[0],[0,100],r,!0),vt(t[1],[0,100],r,!0)]},e.prototype._updateInterval=function(t,r){var i=this.dataZoomModel,n=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Dr(r,n,o,i.get("zoomLock")?"all":t,s.minSpan!=null?vt(s.minSpan,l,o,!0):null,s.maxSpan!=null?vt(s.maxSpan,l,o,!0):null);var u=this._range,v=this._range=ue([vt(n[0],o,l,!0),vt(n[1],o,l,!0)]);return!u||u[0]!==v[0]||u[1]!==v[1]},e.prototype._updateView=function(t){var r=this._displayables,i=this._handleEnds,n=ue(i.slice()),o=this._size;C([0,1],function(f){var p=r.handles[f],d=this._handleHeight;p.attr({scaleX:d/2,scaleY:d/2,x:i[f]+(f?-1:1),y:o[1]/2-d/2})},this),r.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:o[1]});var s={x:n[0],width:n[1]-n[0]};r.moveHandle&&(r.moveHandle.setShape(s),r.moveZone.setShape(s),r.moveZone.getBoundingRect(),r.moveHandleIcon&&r.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=r.dataShadowSegs,u=[0,n[0],n[1],o[0]],v=0;v<l.length;v++){var c=l[v],h=c.getClipPath();h||(h=new ct,c.setClipPath(h)),h.setShape({x:u[v],y:0,width:u[v+1]-u[v],height:o[1]})}this._updateDataInfo(t)},e.prototype._updateDataInfo=function(t){var r=this.dataZoomModel,i=this._displayables,n=i.handleLabels,o=this._orient,s=["",""];if(r.get("showDetail")){var l=r.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,v=this._range,c=t?l.calculateDataWindow({start:v[0],end:v[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(c[0],u),this._formatLabel(c[1],u)]}}var h=ue(this._handleEnds.slice());f.call(this,0),f.call(this,1);function f(p){var d=Wr(i.handles[p].parent,this.group),g=nl(p===0?"right":"left",d),y=this._handleWidth/2+lP,m=Me([h[p]+(p===0?-y:y),this._size[1]/2],d);n[p].setStyle({x:m[0],y:m[1],verticalAlign:o===xa?"middle":g,align:o===xa?g:"center",text:s[p]})}},e.prototype._formatLabel=function(t,r){var i=this.dataZoomModel,n=i.get("labelFormatter"),o=i.get("labelPrecision");(o==null||o==="auto")&&(o=r.getPixelPrecision());var s=t==null||isNaN(t)?"":r.type==="category"||r.type==="time"?r.scale.getLabel({value:Math.round(t)}):t.toFixed(Math.min(o,20));return rt(n)?n(t,s):K(n)?n.replace("{value}",s):s},e.prototype._showDataInfo=function(t){t=this._dragging||t;var r=this._displayables,i=r.handleLabels;i[0].attr("invisible",!t),i[1].attr("invisible",!t),r.moveHandle&&this.api[t?"enterEmphasis":"leaveEmphasis"](r.moveHandle,1)},e.prototype._onDragMove=function(t,r,i,n){this._dragging=!0,je(n.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=Me([r,i],o,!0),l=this._updateInterval(t,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},e.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var t=this.dataZoomModel.get("realtime");!t&&this._dispatchZoomAction(!1)},e.prototype._onClickPanel=function(t){var r=this._size,i=this._displayables.sliderGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(i[0]<0||i[0]>r[0]||i[1]<0||i[1]>r[1])){var n=this._handleEnds,o=(n[0]+n[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var r=t.offsetX,i=t.offsetY;this._brushStart=new fe(r,i),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(!!this._brushing){var r=this._displayables.brushRect;if(this._brushing=!1,!!r){r.attr("ignore",!0);var i=r.shape,n=+new Date;if(!(n-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=ue([vt(i.x,o,s,!0),vt(i.x+i.width,o,s,!0)]),this._handleEnds=[i.x,i.x+i.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(je(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,r){var i=this._displayables,n=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new ma({silent:!0,style:n.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,r),v=l.transformCoordToLocal(s.x,s.y),c=this._size;u[0]=Math.max(Math.min(c[0],u[0]),0),o.setShape({x:v[0],y:0,width:u[0]-v[0],height:c[1]})},e.prototype._dispatchZoomAction=function(t){var r=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?vP:null,start:r[0],end:r[1]})},e.prototype._findCoordRect=function(){var t,r=$g(this.dataZoomModel).infoList;if(!t&&r.length){var i=r[0].model.coordinateSystem;t=i.getRect&&i.getRect()}if(!t){var n=this.api.getWidth(),o=this.api.getHeight();t={x:n*.2,y:o*.2,width:n*.6,height:o*.6}}return t},e.type="dataZoom.slider",e}(Xl);function hP(a){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[a]}function yf(a){return a==="vertical"?"ns-resize":"ew-resize"}const fP=cP;function cy(a){a.registerComponentModel(nP),a.registerComponentView(fP),Kl(a)}function pP(a){J(vy),J(cy)}var dP={get:function(a,e,t){var r=nt((gP[a]||{})[e]);return t&&B(r)?r[r.length-1]:r}},gP={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]}};const hy=dP;var mf=Wt.mapVisual,yP=Wt.eachVisual,mP=B,xf=C,xP=ue,SP=vt,bP=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,r,i){this.mergeDefaultAndTheme(t,i)},e.prototype.optionUpdated=function(t,r){var i=this.option;!r&&ty(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var r=this.stateList;t=$(t,this),this.controllerVisuals=$s(this.option.controller,r,t),this.targetVisuals=$s(this.option.target,r,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,r=[];return t==null||t==="all"?this.ecModel.eachSeries(function(i,n){r.push(n)}):r=jt(t),r},e.prototype.eachTargetSeries=function(t,r){C(this.getTargetSeriesIndices(),function(i){var n=this.ecModel.getSeriesByIndex(i);n&&t.call(r,n)},this)},e.prototype.isTargetSeries=function(t){var r=!1;return this.eachTargetSeries(function(i){i===t&&(r=!0)}),r},e.prototype.formatValueText=function(t,r,i){var n=this.option,o=n.precision,s=this.dataBound,l=n.formatter,u;i=i||["<",">"],B(t)&&(t=t.slice(),u=!0);var v=r?t:u?[c(t[0]),c(t[1])]:c(t);if(K(l))return l.replace("{value}",u?v[0]:v).replace("{value2}",u?v[1]:v);if(rt(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?i[0]+" "+v[1]:t[1]===s[1]?i[1]+" "+v[0]:v[0]+" - "+v[1];return v;function c(h){return h===s[0]?"min":h===s[1]?"max":(+h).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,r=xP([t.min,t.max]);this._dataExtent=r},e.prototype.getDataDimensionIndex=function(t){var r=this.option.dimension;if(r!=null)return t.getDimensionIndex(r);for(var i=t.dimensions,n=i.length-1;n>=0;n--){var o=i[n],s=t.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,r=this.option,i={inRange:r.inRange,outOfRange:r.outOfRange},n=r.target||(r.target={}),o=r.controller||(r.controller={});ft(n,i),ft(o,i);var s=this.isCategory();l.call(this,n),l.call(this,o),u.call(this,n,"inRange","outOfRange"),v.call(this,o);function l(c){mP(r.color)&&!c.inRange&&(c.inRange={color:r.color.slice().reverse()}),c.inRange=c.inRange||{color:t.get("gradientColor")}}function u(c,h,f){var p=c[h],d=c[f];p&&!d&&(d=c[f]={},xf(p,function(g,y){if(!!Wt.isValidType(y)){var m=hy.get(y,"inactive",s);m!=null&&(d[y]=m,y==="color"&&!d.hasOwnProperty("opacity")&&!d.hasOwnProperty("colorAlpha")&&(d.opacity=[0,0]))}}))}function v(c){var h=(c.inRange||{}).symbol||(c.outOfRange||{}).symbol,f=(c.inRange||{}).symbolSize||(c.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),d=this.getItemSymbol(),g=d||"roundRect";xf(this.stateList,function(y){var m=this.itemSize,x=c[y];x||(x=c[y]={color:s?p:[p]}),x.symbol==null&&(x.symbol=h&&nt(h)||(s?g:[g])),x.symbolSize==null&&(x.symbolSize=f&&nt(f)||(s?m[0]:[m[0],m[0]])),x.symbol=mf(x.symbol,function(b){return b==="none"?g:b});var S=x.symbolSize;if(S!=null){var _=-1/0;yP(S,function(b){b>_&&(_=b)}),x.symbolSize=mf(S,function(b){return SP(b,[0,_],[0,m[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,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,textGap:10,precision:0,textStyle:{color:"#333"}},e}(It);const cn=bP;var Sf=[20,140],_P=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,r){a.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){a.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=Sf[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=Sf[1])},e.prototype._resetRange=function(){var t=this.getExtent(),r=this.option.range;!r||r.auto?(t.auto=1,this.option.range=t):B(r)&&(r[0]>r[1]&&r.reverse(),r[0]=Math.max(r[0],t[0]),r[1]=Math.min(r[1],t[1]))},e.prototype.completeVisualOption=function(){a.prototype.completeVisualOption.apply(this,arguments),C(this.stateList,function(t){var r=this.option.controller[t].symbolSize;r&&r[0]!==r[1]&&(r[0]=r[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),r=ue((this.get("range")||[]).slice());return r[0]>t[1]&&(r[0]=t[1]),r[1]>t[1]&&(r[1]=t[1]),r[0]<t[0]&&(r[0]=t[0]),r[1]<t[0]&&(r[1]=t[0]),r},e.prototype.getValueState=function(t){var r=this.option.range,i=this.getExtent();return(r[0]<=i[0]||r[0]<=t)&&(r[1]>=i[1]||t<=r[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var r=[];return this.eachTargetSeries(function(i){var n=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&n.push(l)},this),r.push({seriesId:i.id,dataIndex:n})},this),r},e.prototype.getVisualMeta=function(t){var r=bf(this,"outOfRange",this.getExtent()),i=bf(this,"inRange",this.option.range.slice()),n=[];function o(f,p){n.push({value:f,color:t(f,p)})}for(var s=0,l=0,u=i.length,v=r.length;l<v&&(!i.length||r[l]<=i[0]);l++)r[l]<i[s]&&o(r[l],"outOfRange");for(var c=1;s<u;s++,c=0)c&&n.length&&o(i[s],"outOfRange"),o(i[s],"inRange");for(var c=1;l<v;l++)(!i.length||i[i.length-1]<r[l])&&(c&&(n.length&&o(n[n.length-1].value,"outOfRange"),c=0),o(r[l],"outOfRange"));var h=n.length;return{stops:n,outerColors:[h?n[0].color:"transparent",h?n[h-1].color:"transparent"]}},e.type="visualMap.continuous",e.defaultOption=ar(cn.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}(cn);function bf(a,e,t){if(t[0]===t[1])return t.slice();for(var r=200,i=(t[1]-t[0])/r,n=t[0],o=[],s=0;s<=r&&n<t[1];s++)o.push(n),n+=i;return o.push(t[1]),o}const wP=_P;var AP=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.autoPositionValues={left:1,right:1,top:1,bottom:1},t}return e.prototype.init=function(t,r){this.ecModel=t,this.api=r},e.prototype.render=function(t,r,i,n){if(this.visualMapModel=t,t.get("show")===!1){this.group.removeAll();return}this.doRender(t,r,i,n)},e.prototype.renderBackground=function(t){var r=this.visualMapModel,i=Mn(r.get("padding")||0),n=t.getBoundingRect();t.add(new ct({z2:-1,silent:!0,shape:{x:n.x-i[3],y:n.y-i[0],width:n.width+i[3]+i[1],height:n.height+i[0]+i[2]},style:{fill:r.get("backgroundColor"),stroke:r.get("borderColor"),lineWidth:r.get("borderWidth")}}))},e.prototype.getControllerVisual=function(t,r,i){i=i||{};var n=i.forceState,o=this.visualMapModel,s={};if(r==="color"){var l=o.get("contentColor");s.color=l}function u(f){return s[f]}function v(f,p){s[f]=p}var c=o.controllerVisuals[n||o.getValueState(t)],h=Wt.prepareVisualTypes(c);return C(h,function(f){var p=c[f];i.convertOpacityToAlpha&&f==="opacity"&&(f="colorAlpha",p=c.__alphaForOpacity),Wt.dependsOn(f,r)&&p&&p.applyVisual(t,u,v)}),s[r]},e.prototype.positionGroup=function(t){var r=this.visualMapModel,i=this.api;Dn(t,r.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()})},e.prototype.doRender=function(t,r,i,n){},e.type="visualMap",e}(Et);const fy=AP;var _f=[["left","right","width"],["top","bottom","height"]];function py(a,e,t){var r=a.option,i=r.align;if(i!=null&&i!=="auto")return i;for(var n={width:e.getWidth(),height:e.getHeight()},o=r.orient==="horizontal"?1:0,s=_f[o],l=[0,null,10],u={},v=0;v<3;v++)u[_f[1-o][v]]=l[v],u[s[v]]=v===2?t[0]:r[s[v]];var c=[["x","width",3],["y","height",0]][o],h=Bt(u,n,r.padding);return s[(h.margin[c[2]]||0)+h[c[0]]+h[c[1]]*.5<n[c[1]]*.5?0:1]}function Vi(a,e){return C(a||[],function(t){t.dataIndex!=null&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),a}var _e=vt,TP=C,wf=Math.min,as=Math.max,CP=12,DP=6,IP=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._shapes={},t._dataInterval=[],t._handleEnds=[],t._hoverLinkDataIndices=[],t}return e.prototype.doRender=function(t,r,i,n){this._api=i,(!n||n.type!=="selectDataRange"||n.from!==this.uid)&&this._buildView()},e.prototype._buildView=function(){this.group.removeAll();var t=this.visualMapModel,r=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(r);var i=t.get("text");this._renderEndsText(r,i,0),this._renderEndsText(r,i,1),this._updateView(!0),this.renderBackground(r),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(r)},e.prototype._renderEndsText=function(t,r,i){if(!!r){var n=r[1-i];n=n!=null?n+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,v=this._applyTransform([l[0]/2,i===0?-s:l[1]+s],u),c=this._applyTransform(i===0?"bottom":"top",u),h=this._orient,f=this.visualMapModel.textStyleModel;this.group.add(new lt({style:{x:v[0],y:v[1],verticalAlign:h==="horizontal"?"middle":c,align:h==="horizontal"?c:"center",text:n,font:f.getFont(),fill:f.getTextColor()}}))}},e.prototype._renderBar=function(t){var r=this.visualMapModel,i=this._shapes,n=r.itemSize,o=this._orient,s=this._useHandle,l=py(r,this.api,n),u=i.mainGroup=this._createBarGroup(l),v=new U;u.add(v),v.add(i.outOfRange=Af()),v.add(i.inRange=Af(null,s?Cf(this._orient):null,$(this._dragHandle,this,"all",!1),$(this._dragHandle,this,"all",!0))),v.setClipPath(new ct({shape:{x:0,y:0,width:n[0],height:n[1],r:3}}));var c=r.textStyleModel.getTextRect("\u56FD"),h=as(c.width,c.height);s&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(r,u,0,n,h,o),this._createHandle(r,u,1,n,h,o)),this._createIndicator(r,u,n,h,o),t.add(u)},e.prototype._createHandle=function(t,r,i,n,o,s){var l=$(this._dragHandle,this,i,!1),u=$(this._dragHandle,this,i,!0),v=zi(t.get("handleSize"),n[0]),c=kt(t.get("handleIcon"),-v/2,-v/2,v,v,null,!0),h=Cf(this._orient);c.attr({cursor:h,draggable:!0,drift:l,ondragend:u,onmousemove:function(y){je(y.event)}}),c.x=n[0]/2,c.useStyle(t.getModel("handleStyle").getItemStyle()),c.setStyle({strokeNoScale:!0,strokeFirst:!0}),c.style.lineWidth*=2,c.ensureState("emphasis").style=t.getModel(["emphasis","handleStyle"]).getItemStyle(),ba(c,!0),r.add(c);var f=this.visualMapModel.textStyleModel,p=new lt({cursor:h,draggable:!0,drift:l,onmousemove:function(y){je(y.event)},ondragend:u,style:{x:0,y:0,text:"",font:f.getFont(),fill:f.getTextColor()}});p.ensureState("blur").style={opacity:.1},p.stateTransition={duration:200},this.group.add(p);var d=[v,0],g=this._shapes;g.handleThumbs[i]=c,g.handleLabelPoints[i]=d,g.handleLabels[i]=p},e.prototype._createIndicator=function(t,r,i,n,o){var s=zi(t.get("indicatorSize"),i[0]),l=kt(t.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:i[0]/2});var u=t.getModel("indicatorStyle").getItemStyle();if(l instanceof ye){var v=l.style;l.useStyle(H({image:v.image,x:v.x,y:v.y,width:v.width,height:v.height},u))}else l.useStyle(u);r.add(l);var c=this.visualMapModel.textStyleModel,h=new lt({silent:!0,invisible:!0,style:{x:0,y:0,text:"",font:c.getFont(),fill:c.getTextColor()}});this.group.add(h);var f=[(o==="horizontal"?n/2:DP)+i[0]/2,0],p=this._shapes;p.indicator=l,p.indicatorLabel=h,p.indicatorLabelPoint=f,this._firstShowIndicator=!0},e.prototype._dragHandle=function(t,r,i,n){if(!!this._useHandle){if(this._dragging=!r,!r){var o=this._applyTransform([i,n],this._shapes.mainGroup,!0);this._updateInterval(t,o[1]),this._hideIndicator(),this._updateView()}r===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),r?!this._hovering&&this._clearHoverLinkToSeries():Tf(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},e.prototype._resetInterval=function(){var t=this.visualMapModel,r=this._dataInterval=t.getSelected(),i=t.getExtent(),n=[0,t.itemSize[1]];this._handleEnds=[_e(r[0],i,n,!0),_e(r[1],i,n,!0)]},e.prototype._updateInterval=function(t,r){r=r||0;var i=this.visualMapModel,n=this._handleEnds,o=[0,i.itemSize[1]];Dr(r,n,o,t,0);var s=i.getExtent();this._dataInterval=[_e(n[0],o,s,!0),_e(n[1],o,s,!0)]},e.prototype._updateView=function(t){var r=this.visualMapModel,i=r.getExtent(),n=this._shapes,o=[0,r.itemSize[1]],s=t?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,i,s,"inRange"),u=this._createBarVisual(i,i,o,"outOfRange");n.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),n.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},e.prototype._createBarVisual=function(t,r,i,n){var o={forceState:n,convertOpacityToAlpha:!0},s=this._makeColorGradient(t,o),l=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],u=this._createBarPoints(i,l);return{barColor:new mn(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},e.prototype._makeColorGradient=function(t,r){var i=100,n=[],o=(t[1]-t[0])/i;n.push({color:this.getControllerVisual(t[0],"color",r),offset:0});for(var s=1;s<i;s++){var l=t[0]+o*s;if(l>t[1])break;n.push({color:this.getControllerVisual(l,"color",r),offset:s/i})}return n.push({color:this.getControllerVisual(t[1],"color",r),offset:1}),n},e.prototype._createBarPoints=function(t,r){var i=this.visualMapModel.itemSize;return[[i[0]-r[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-r[1],t[1]]]},e.prototype._createBarGroup=function(t){var r=this._orient,i=this.visualMapModel.get("inverse");return new U(r==="horizontal"&&!i?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:r==="horizontal"&&i?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:r==="vertical"&&!i?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,r){if(!!this._useHandle){var i=this._shapes,n=this.visualMapModel,o=i.handleThumbs,s=i.handleLabels,l=n.itemSize,u=n.getExtent();TP([0,1],function(v){var c=o[v];c.setStyle("fill",r.handlesColor[v]),c.y=t[v];var h=_e(t[v],[0,l[1]],u,!0),f=this.getControllerVisual(h,"symbolSize");c.scaleX=c.scaleY=f/l[0],c.x=l[0]-f/2;var p=Me(i.handleLabelPoints[v],Wr(c,this.group));s[v].setStyle({x:p[0],y:p[1],text:n.formatValueText(this._dataInterval[v]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,r,i,n){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],v=this._shapes,c=v.indicator;if(!!c){c.attr("invisible",!1);var h={convertOpacityToAlpha:!0},f=this.getControllerVisual(t,"color",h),p=this.getControllerVisual(t,"symbolSize"),d=_e(t,s,u,!0),g=l[0]-p/2,y={x:c.x,y:c.y};c.y=d,c.x=g;var m=Me(v.indicatorLabelPoint,Wr(c,this.group)),x=v.indicatorLabel;x.attr("invisible",!1);var S=this._applyTransform("left",v.mainGroup),_=this._orient,b=_==="horizontal";x.setStyle({text:(i||"")+o.formatValueText(r),verticalAlign:b?S:"middle",align:b?"center":S});var w={x:g,y:d,style:{fill:f}},A={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var T={duration:100,easing:"cubicInOut",additive:!0};c.x=y.x,c.y=y.y,c.animateTo(w,T),x.animateTo(A,T)}else c.attr(w),x.attr(A);this._firstShowIndicator=!1;var D=this._shapes.handleLabels;if(D)for(var I=0;I<D.length;I++)this._api.enterBlur(D[I])}},e.prototype._enableHoverLinkToSeries=function(){var t=this;this._shapes.mainGroup.on("mousemove",function(r){if(t._hovering=!0,!t._dragging){var i=t.visualMapModel.itemSize,n=t._applyTransform([r.offsetX,r.offsetY],t._shapes.mainGroup,!0,!0);n[1]=wf(as(0,n[1]),i[1]),t._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=i[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,r){var i=this.visualMapModel,n=i.itemSize;if(!!i.option.hoverLink){var o=[0,n[1]],s=i.getExtent();t=wf(as(o[0],t),o[1]);var l=LP(i,s,o),u=[t-l,t+l],v=_e(t,o,s,!0),c=[_e(u[0],o,s,!0),_e(u[1],o,s,!0)];u[0]<o[0]&&(c[0]=-1/0),u[1]>o[1]&&(c[1]=1/0),r&&(c[0]===-1/0?this._showIndicator(v,c[1],"< ",l):c[1]===1/0?this._showIndicator(v,c[0],"> ",l):this._showIndicator(v,v,"\u2248 ",l));var h=this._hoverLinkDataIndices,f=[];(r||Tf(i))&&(f=this._hoverLinkDataIndices=i.findTargetDataIndices(c));var p=b0(h,f);this._dispatchHighDown("downplay",Vi(p[0],i)),this._dispatchHighDown("highlight",Vi(p[1],i))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var r=t.target,i=this.visualMapModel;if(!(!r||tt(r).dataIndex==null)){var n=tt(r),o=this.ecModel.getSeriesByIndex(n.seriesIndex);if(!!i.isTargetSeries(o)){var s=o.getData(n.dataType),l=s.getStore().get(i.getDataDimensionIndex(s),n.dataIndex);isNaN(l)||this._showIndicator(l,l)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var r=this._shapes.handleLabels;if(r)for(var i=0;i<r.length;i++)this._api.leaveBlur(r[i])},e.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Vi(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,r,i,n){var o=Wr(r,n?null:this.group);return B(t)?Me(t,o,i):nl(t,o,i)},e.prototype._dispatchHighDown=function(t,r){r&&r.length&&this.api.dispatchAction({type:t,batch:r})},e.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.prototype.remove=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.type="visualMap.continuous",e}(fy);function Af(a,e,t,r){return new ce({shape:{points:a},draggable:!!t,cursor:e,drift:t,onmousemove:function(i){je(i.event)},ondragend:r})}function LP(a,e,t){var r=CP/2,i=a.get("hoverLinkDataSize");return i&&(r=_e(i,e,t,!0)/2),r}function Tf(a){var e=a.get("hoverLinkOnHandle");return!!(e==null?a.get("realtime"):e)}function Cf(a){return a==="vertical"?"ns-resize":"ew-resize"}const MP=IP;var PP={type:"selectDataRange",event:"dataRangeSelected",update:"update"},RP=function(a,e){e.eachComponent({mainType:"visualMap",query:a},function(t){t.setSelected(a.selected)})},kP=[{createOnAllSeries:!0,reset:function(a,e){var t=[];return e.eachComponent("visualMap",function(r){var i=a.pipelineContext;!r.isTargetSeries(a)||i&&i.large||t.push(DM(r.stateList,r.targetVisuals,$(r.getValueState,r),r.getDataDimensionIndex(a.getData())))}),t}},{createOnAllSeries:!0,reset:function(a,e){var t=a.getData(),r=[];e.eachComponent("visualMap",function(i){if(i.isTargetSeries(a)){var n=i.getVisualMeta($(EP,null,a,i))||{stops:[],outerColors:[]},o=i.getDataDimensionIndex(t);o>=0&&(n.dimension=o,r.push(n))}}),a.getData().setVisual("visualMeta",r)}}];function EP(a,e,t,r){for(var i=e.targetVisuals[r],n=Wt.prepareVisualTypes(i),o={color:Pn(a.getData(),"color")},s=0,l=n.length;s<l;s++){var u=n[s],v=i[u==="opacity"?"__alphaForOpacity":u];v&&v.applyVisual(t,c,h)}return o.color;function c(f){return o[f]}function h(f,p){o[f]=p}}var Df=C;function VP(a){var e=a&&a.visualMap;B(e)||(e=e?[e]:[]),Df(e,function(t){if(!!t){Er(t,"splitList")&&!Er(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var r=t.pieces;r&&B(r)&&Df(r,function(i){St(i)&&(Er(i,"start")&&!Er(i,"min")&&(i.min=i.start),Er(i,"end")&&!Er(i,"max")&&(i.max=i.end))})}})}function Er(a,e){return a&&a.hasOwnProperty&&a.hasOwnProperty(e)}var If=!1;function dy(a){If||(If=!0,a.registerSubTypeDefaulter("visualMap",function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),a.registerAction(PP,RP),C(kP,function(e){a.registerVisual(a.PRIORITY.VISUAL.COMPONENT,e)}),a.registerPreprocessor(VP))}function gy(a){a.registerComponentModel(wP),a.registerComponentView(MP),dy(a)}var NP=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,r){a.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],OP[this._mode].call(this,this._pieceList),this._resetSelected(t,r);var n=this.option.categories;this.resetVisual(function(o,s){i==="categories"?(o.mappingMethod="category",o.categories=nt(n)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=z(this._pieceList,function(l){return l=nt(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,r={},i=Wt.listVisualTypes(),n=this.isCategory();C(t.pieces,function(s){C(i,function(l){s.hasOwnProperty(l)&&(r[l]=1)})}),C(r,function(s,l){var u=!1;C(this.stateList,function(v){u=u||o(t,v,l)||o(t.target,v,l)},this),!u&&C(this.stateList,function(v){(t[v]||(t[v]={}))[l]=hy.get(l,v==="inRange"?"active":"inactive",n)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}a.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,r){var i=this.option,n=this._pieceList,o=(r?i:t).selected||{};if(i.selected=o,C(n,function(l,u){var v=this.getSelectedMapKey(l);o.hasOwnProperty(v)||(o[v]=!0)},this),i.selectedMode==="single"){var s=!1;C(n,function(l,u){var v=this.getSelectedMapKey(l);o[v]&&(s?o[v]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return this._mode==="categories"?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=nt(t)},e.prototype.getValueState=function(t){var r=Wt.findPieceIndex(t,this._pieceList);return r!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[r])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var r=[],i=this._pieceList;return this.eachTargetSeries(function(n){var o=[],s=n.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var v=Wt.findPieceIndex(l,i);v===t&&o.push(u)},this),r.push({seriesId:n.id,dataIndex:o})},this),r},e.prototype.getRepresentValue=function(t){var r;if(this.isCategory())r=t.value;else if(t.value!=null)r=t.value;else{var i=t.interval||[];r=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return r},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var r=[],i=["",""],n=this;function o(v,c){var h=n.getRepresentValue({interval:v});c||(c=n.getValueState(h));var f=t(h,c);v[0]===-1/0?i[0]=f:v[1]===1/0?i[1]=f:r.push({value:v[0],color:f},{value:v[1],color:f})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return C(s,function(v){var c=v.interval;c&&(c[0]>u&&o([u,c[0]],"outOfRange"),o(c.slice()),u=c[1])},this),{stops:r,outerColors:i}},e.type="visualMap.piecewise",e.defaultOption=ar(cn.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}(cn),OP={splitNumber:function(a){var e=this.option,t=Math.min(e.precision,20),r=this.getExtent(),i=e.splitNumber;i=Math.max(parseInt(i,10),1),e.splitNumber=i;for(var n=(r[1]-r[0])/i;+n.toFixed(t)!==n&&t<5;)t++;e.precision=t,n=+n.toFixed(t),e.minOpen&&a.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o<i;s+=n,o++){var l=o===i-1?r[1]:s+n;a.push({interval:[s,l],close:[1,1]})}e.maxOpen&&a.push({interval:[r[1],1/0],close:[0,0]}),Lu(a),C(a,function(u,v){u.index=v,u.text=this.formatValueText(u.interval)},this)},categories:function(a){var e=this.option;C(e.categories,function(t){a.push({text:this.formatValueText(t,!0),value:t})},this),Lf(e,a)},pieces:function(a){var e=this.option;C(e.pieces,function(t,r){St(t)||(t={value:t});var i={text:"",index:r};if(t.label!=null&&(i.text=t.label),t.hasOwnProperty("value")){var n=i.value=t.value;i.interval=[n,n],i.close=[1,1]}else{for(var o=i.interval=[],s=i.close=[0,0],l=[1,0,1],u=[-1/0,1/0],v=[],c=0;c<2;c++){for(var h=[["gte","gt","min"],["lte","lt","max"]][c],f=0;f<3&&o[c]==null;f++)o[c]=t[h[f]],s[c]=l[f],v[c]=f===2;o[c]==null&&(o[c]=u[c])}v[0]&&o[1]===1/0&&(s[0]=0),v[1]&&o[0]===-1/0&&(s[1]=0),o[0]>o[1]&&console.warn("Piece "+r+"is illegal: "+o+" lower bound should not greater then uppper bound."),o[0]===o[1]&&s[0]&&s[1]&&(i.value=o[0])}i.visual=Wt.retrieveVisuals(t),a.push(i)},this),Lf(e,a),Lu(a),C(a,function(t){var r=t.close,i=[["<","\u2264"][r[1]],[">","\u2265"][r[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,i)},this)}};function Lf(a,e){var t=a.inverse;(a.orient==="vertical"?!t:t)&&e.reverse()}const zP=NP;var BP=function(a){k(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var r=this.visualMapModel,i=r.get("textGap"),n=r.textStyleModel,o=n.getFont(),s=n.getTextColor(),l=this._getItemAlign(),u=r.itemSize,v=this._getViewData(),c=v.endsText,h=Ot(r.get("showLabel",!0),!c);c&&this._renderEndsText(t,c[0],u,h,l),C(v.viewPieceList,function(f){var p=f.piece,d=new U;d.onclick=$(this._onItemClick,this,p),this._enableHoverLink(d,f.indexInModelPieceList);var g=r.getRepresentValue(p);if(this._createItemSymbol(d,g,[0,0,u[0],u[1]]),h){var y=this.visualMapModel.getValueState(g);d.add(new lt({style:{x:l==="right"?-i:u[0]+i,y:u[1]/2,text:p.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:y==="outOfRange"?.5:1}}))}t.add(d)},this),c&&this._renderEndsText(t,c[1],u,h,l),yr(r.get("orient"),t,r.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,r){var i=this;t.on("mouseover",function(){return n("highlight")}).on("mouseout",function(){return n("downplay")});var n=function(o){var s=i.visualMapModel;s.option.hoverLink&&i.api.dispatchAction({type:o,batch:Vi(s.findTargetDataIndices(r),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,r=t.option;if(r.orient==="vertical")return py(t,this.api,t.itemSize);var i=r.align;return(!i||i==="auto")&&(i="left"),i},e.prototype._renderEndsText=function(t,r,i,n,o){if(!!r){var s=new U,l=this.visualMapModel.textStyleModel;s.add(new lt({style:{x:n?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:n?o:"center",text:r,font:l.getFont(),fill:l.getTextColor()}})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,r=z(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),i=t.get("text"),n=t.get("orient"),o=t.get("inverse");return(n==="horizontal"?o:!o)?r.reverse():i&&(i=i.slice().reverse()),{viewPieceList:r,endsText:i}},e.prototype._createItemSymbol=function(t,r,i){t.add(kt(this.getControllerVisual(r,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(r,"color")))},e.prototype._onItemClick=function(t){var r=this.visualMapModel,i=r.option,n=nt(i.selected),o=r.getSelectedMapKey(t);i.selectedMode==="single"?(n[o]=!0,C(n,function(s,l){n[l]=l===o})):n[o]=!n[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:n})},e.type="visualMap.piecewise",e}(fy);const GP=BP;function yy(a){a.registerComponentModel(zP),a.registerComponentView(GP),dy(a)}function FP(a){J(gy),J(yy)}var HP={label:{enabled:!0},decal:{show:!1}},Mf=Lt(),WP={};function $P(a,e){var t=a.getModel("aria");if(!t.get("enabled"))return;var r=nt(HP);ft(r.label,a.getLocaleModel().get("aria"),!1),ft(t.option,r,!1),i(),n();function i(){var u=t.getModel("decal"),v=u.get("show");if(v){var c=it();a.eachSeries(function(h){if(!h.isColorBySeries()){var f=c.get(h.type);f||(f={},c.set(h.type,f)),Mf(h).scope=f}}),a.eachRawSeries(function(h){if(a.isSeriesFiltered(h))return;if(rt(h.enableAriaDecal)){h.enableAriaDecal();return}var f=h.getData();if(h.isColorBySeries()){var m=vs(h.ecModel,h.name,WP,a.getSeriesCount()),x=f.getVisual("decal");f.setVisual("decal",S(x,m))}else{var p=h.getRawData(),d={},g=Mf(h).scope;f.each(function(_){var b=f.getRawIndex(_);d[b]=_});var y=p.count();p.each(function(_){var b=d[_],w=p.getName(_)||_+"",A=vs(h.ecModel,w,g,y),T=f.getItemVisual(b,"decal");f.setItemVisual(b,"decal",S(T,A))})}function S(_,b){var w=_?H(H({},b),_):b;return w.dirty=!0,w}})}}function n(){var u=a.getLocaleModel().get("aria"),v=t.getModel("label");if(v.option=j(v.option,u),!!v.get("enabled")){var c=e.getZr().dom;if(v.get("description")){c.setAttribute("aria-label",v.get("description"));return}var h=a.getSeriesCount(),f=v.get(["data","maxCount"])||10,p=v.get(["series","maxCount"])||10,d=Math.min(h,p),g;if(!(h<1)){var y=s();if(y){var m=v.get(["general","withTitle"]);g=o(m,{title:y})}else g=v.get(["general","withoutTitle"]);var x=[],S=h>1?v.get(["series","multiple","prefix"]):v.get(["series","single","prefix"]);g+=o(S,{seriesCount:h}),a.eachSeries(function(A,T){if(T<d){var D=void 0,I=A.get("name"),L=I?"withName":"withoutName";D=h>1?v.get(["series","multiple",L]):v.get(["series","single",L]),D=o(D,{seriesId:A.seriesIndex,seriesName:A.get("name"),seriesType:l(A.subType)});var M=A.getData();if(M.count()>f){var P=v.get(["data","partialData"]);D+=o(P,{displayCnt:f})}else D+=v.get(["data","allData"]);for(var R=v.get(["data","separator","middle"]),E=v.get(["data","separator","end"]),N=[],V=0;V<M.count();V++)if(V<f){var O=M.getName(V),W=M.getValues(V),Z=v.get(["data",O?"withName":"withoutName"]);N.push(o(Z,{name:O,value:W.join(R)}))}D+=N.join(R)+E,x.push(D)}});var _=v.getModel(["series","multiple","separator"]),b=_.get("middle"),w=_.get("end");g+=x.join(b)+w,c.setAttribute("aria-label",g)}}}function o(u,v){if(!K(u))return u;var c=u;return C(v,function(h,f){c=c.replace(new RegExp("\\{\\s*"+f+"\\s*\\}","g"),h)}),c}function s(){var u=a.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){return a.getLocaleModel().get(["series","typeNames"])[u]||"\u81EA\u5B9A\u4E49\u56FE"}}function ZP(a){if(!(!a||!a.aria)){var e=a.aria;e.show!=null&&(e.enabled=e.show),e.label=e.label||{},C(["description","general","series","data"],function(t){e[t]!=null&&(e.label[t]=e[t])})}}function UP(a){a.registerPreprocessor(ZP),a.registerVisual(a.PRIORITY.VISUAL.ARIA,$P)}var Pf={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},YP=function(){function a(e){var t=this._condVal=K(e)?new RegExp(e):w0(e)?e:null;if(t==null){var r="";r=ge("Illegal regexp",e,"in"),_t(r)}}return a.prototype.evaluate=function(e){var t=typeof e;return K(t)?this._condVal.test(e):re(t)?this._condVal.test(e+""):!1},a}(),XP=function(){function a(){}return a.prototype.evaluate=function(){return this.value},a}(),KP=function(){function a(){}return a.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0},a}(),qP=function(){function a(){}return a.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1},a}(),jP=function(){function a(){}return a.prototype.evaluate=function(){return!this.child.evaluate()},a}(),JP=function(){function a(){}return a.prototype.evaluate=function(){for(var e=!!this.valueParser,t=this.getValue,r=t(this.valueGetterParam),i=e?this.valueParser(r):null,n=0;n<this.subCondList.length;n++)if(!this.subCondList[n].evaluate(e?i:r))return!1;return!0},a}();function iu(a,e){if(a===!0||a===!1){var t=new XP;return t.value=a,t}var r="";return my(a)||(r=ge("Illegal config. Expect a plain object but actually",a),_t(r)),a.and?Rf("and",a,e):a.or?Rf("or",a,e):a.not?QP(a,e):tR(a,e)}function Rf(a,e,t){var r=e[a],i="";i=ge('"and"/"or" condition should only be `'+a+": [...]` and must not be empty array.","Illegal condition:",e),B(r)||_t(i),r.length||_t(i);var n=a==="and"?new KP:new qP;return n.children=z(r,function(o){return iu(o,t)}),n.children.length||_t(i),n}function QP(a,e){var t=a.not,r="";r=ge('"not" condition should only be `not: {}`.',"Illegal condition:",a),my(t)||_t(r);var i=new jP;return i.child=iu(t,e),i.child||_t(r),i}function tR(a,e){for(var t="",r=e.prepareGetValue(a),i=[],n=Ct(a),o=a.parser,s=o?Ip(o):null,l=0;l<n.length;l++){var u=n[l];if(!(u==="parser"||e.valueGetterAttrMap.get(u))){var v=F(Pf,u)?Pf[u]:u,c=a[u],h=s?s(c):c,f=_0(v,h)||v==="reg"&&new YP(h);f||(t=ge('Illegal relational operation: "'+u+'" in condition:',a),_t(t)),i.push(f)}}i.length||(t=ge("Relational condition must have at least one operator.","Illegal condition:",a),_t(t));var p=new JP;return p.valueGetterParam=r,p.valueParser=s,p.getValue=e.getValue,p.subCondList=i,p}function my(a){return St(a)&&!mp(a)}var eR=function(){function a(e,t){this._cond=iu(e,t)}return a.prototype.evaluate=function(){return this._cond.evaluate()},a}();function rR(a,e){return new eR(a,e)}var aR={type:"echarts:filter",transform:function(a){for(var e=a.upstream,t,r=rR(a.config,{valueGetterAttrMap:it({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;F(s,"dimension")||(l=ge('Relation condition must has prop "dimension" specified.',"Illegal condition:",s),_t(l));var v=e.getDimensionInfo(u);return v||(l=ge("Can not find dimension info via: "+u+`.
`,"Existing dimensions: ",e.cloneAllDimensionInfo(),`.
`,"Illegal condition:",s,`.
`),_t(l)),{dimIdx:v.index}},getValue:function(s){return e.retrieveValueFromItem(t,s.dimIdx)}}),i=[],n=0,o=e.count();n<o;n++)t=e.getRawDataItem(n),r.evaluate()&&i.push(t);return{data:i}}},qs="";qs=["Valid config is like:",'{ dimension: "age", order: "asc" }','or [{ dimension: "age", order: "asc"], { dimension: "date", order: "desc" }]'].join(" ");var iR={type:"echarts:sort",transform:function(a){var e=a.upstream,t=a.config,r="",i=jt(t);i.length||(r="Empty `config` in sort transform.",_t(r));var n=[];C(i,function(v){var c=v.dimension,h=v.order,f=v.parser,p=v.incomparable;if(c==null&&(r='Sort transform config must has "dimension" specified.'+qs,_t(r)),h!=="asc"&&h!=="desc"&&(r='Sort transform config must has "order" specified.'+qs,_t(r)),p&&p!=="min"&&p!=="max"){var d="";d='incomparable must be "min" or "max" rather than "'+p+'".',_t(d)}if(h!=="asc"&&h!=="desc"){var g="";g='order must be "asc" or "desc" rather than "'+h+'".',_t(g)}var y=e.getDimensionInfo(c);y||(r=ge("Can not find dimension info via: "+c+`.
`,"Existing dimensions: ",e.cloneAllDimensionInfo(),`.
`,"Illegal config:",v,`.
`),_t(r));var m=f?Ip(f):null;f&&!m&&(r=ge("Invalid parser name "+f+`.
`,"Illegal config:",v,`.
`),_t(r)),n.push({dimIdx:y.index,parser:m,comparator:new A0(h,p)})});var o=e.sourceFormat;o!==yp&&o!==T0&&(r='sourceFormat "'+o+'" is not supported yet',_t(r));for(var s=[],l=0,u=e.count();l<u;l++)s.push(e.getRawDataItem(l));return s.sort(function(v,c){for(var h=0;h<n.length;h++){var f=n[h],p=e.retrieveValueFromItem(v,f.dimIdx),d=e.retrieveValueFromItem(c,f.dimIdx);f.parser&&(p=f.parser(p),d=f.parser(d));var g=f.comparator.evaluate(p,d);if(g!==0)return g}return 0}),{data:s}}};function nR(a){a.registerTransform(aR),a.registerTransform(iR)}var Se=tl.CMD;function Hr(a,e){return Math.abs(a-e)<1e-5}function js(a){var e=a.data,t=a.len(),r=[],i,n=0,o=0,s=0,l=0;function u(M,P){i&&i.length>2&&r.push(i),i=[M,P]}function v(M,P,R,E){Hr(M,R)&&Hr(P,E)||i.push(M,P,R,E,R,E)}function c(M,P,R,E,N,V){var O=Math.abs(P-M),W=Math.tan(O/4)*4/3,Z=P<M?-1:1,X=Math.cos(M),Q=Math.sin(M),at=Math.cos(P),gt=Math.sin(P),pt=X*N+R,et=Q*V+E,Y=at*N+R,ut=gt*V+E,st=N*W*Z,ht=V*W*Z;i.push(pt-st*Q,et+ht*X,Y+st*gt,ut-ht*at,Y,ut)}for(var h,f,p,d,g=0;g<t;){var y=e[g++],m=g===1;switch(m&&(n=e[g],o=e[g+1],s=n,l=o,(y===Se.L||y===Se.C||y===Se.Q)&&(i=[s,l])),y){case Se.M:n=s=e[g++],o=l=e[g++],u(s,l);break;case Se.L:h=e[g++],f=e[g++],v(n,o,h,f),n=h,o=f;break;case Se.C:i.push(e[g++],e[g++],e[g++],e[g++],n=e[g++],o=e[g++]);break;case Se.Q:h=e[g++],f=e[g++],p=e[g++],d=e[g++],i.push(n+2/3*(h-n),o+2/3*(f-o),p+2/3*(h-p),d+2/3*(f-d),p,d),n=p,o=d;break;case Se.A:var x=e[g++],S=e[g++],_=e[g++],b=e[g++],w=e[g++],A=e[g++]+w;g+=1;var T=!e[g++];h=Math.cos(w)*_+x,f=Math.sin(w)*b+S,m?(s=h,l=f,u(s,l)):v(n,o,h,f),n=Math.cos(A)*_+x,o=Math.sin(A)*b+S;for(var D=(T?-1:1)*Math.PI/2,I=w;T?I>A:I<A;I+=D){var L=T?Math.max(I+D,A):Math.min(I+D,A);c(I,L,x,S,_,b)}break;case Se.R:s=n=e[g++],l=o=e[g++],h=s+e[g++],f=l+e[g++],u(h,l),v(h,l,h,f),v(h,f,s,f),v(s,f,s,l),v(s,l,h,l);break;case Se.Z:i&&v(n,o,s,l),n=s,o=l;break}}return i&&i.length>2&&r.push(i),r}function Js(a,e,t,r,i,n,o,s,l,u){if(Hr(a,t)&&Hr(e,r)&&Hr(i,o)&&Hr(n,s)){l.push(o,s);return}var v=2/u,c=v*v,h=o-a,f=s-e,p=Math.sqrt(h*h+f*f);h/=p,f/=p;var d=t-a,g=r-e,y=i-o,m=n-s,x=d*d+g*g,S=y*y+m*m;if(x<c&&S<c){l.push(o,s);return}var _=h*d+f*g,b=-h*y-f*m,w=x-_*_,A=S-b*b;if(w<c&&_>=0&&A<c&&b>=0){l.push(o,s);return}var T=[],D=[];Zi(a,t,i,o,.5,T),Zi(e,r,n,s,.5,D),Js(T[0],D[0],T[1],D[1],T[2],D[2],T[3],D[3],l,u),Js(T[4],D[4],T[5],D[5],T[6],D[6],T[7],D[7],l,u)}function oR(a,e){var t=js(a),r=[];e=e||1;for(var i=0;i<t.length;i++){var n=t[i],o=[],s=n[0],l=n[1];o.push(s,l);for(var u=2;u<n.length;){var v=n[u++],c=n[u++],h=n[u++],f=n[u++],p=n[u++],d=n[u++];Js(s,l,v,c,h,f,p,d,o,e),s=p,l=d}r.push(o)}return r}function xy(a,e,t){var r=a[e],i=a[1-e],n=Math.abs(r/i),o=Math.ceil(Math.sqrt(n*t)),s=Math.floor(t/o);s===0&&(s=1,o=t);for(var l=[],u=0;u<o;u++)l.push(s);var v=o*s,c=t-v;if(c>0)for(var u=0;u<c;u++)l[u%o]+=1;return l}function kf(a,e,t){for(var r=a.r0,i=a.r,n=a.startAngle,o=a.endAngle,s=Math.abs(o-n),l=s*i,u=i-r,v=l>Math.abs(u),c=xy([l,u],v?0:1,e),h=(v?s:u)/c.length,f=0;f<c.length;f++)for(var p=(v?u:s)/c[f],d=0;d<c[f];d++){var g={};v?(g.startAngle=n+h*f,g.endAngle=n+h*(f+1),g.r0=r+p*d,g.r=r+p*(d+1)):(g.startAngle=n+p*d,g.endAngle=n+p*(d+1),g.r0=r+h*f,g.r=r+h*(f+1)),g.clockwise=a.clockwise,g.cx=a.cx,g.cy=a.cy,t.push(g)}}function sR(a,e,t){for(var r=a.width,i=a.height,n=r>i,o=xy([r,i],n?0:1,e),s=n?"width":"height",l=n?"height":"width",u=n?"x":"y",v=n?"y":"x",c=a[s]/o.length,h=0;h<o.length;h++)for(var f=a[l]/o[h],p=0;p<o[h];p++){var d={};d[u]=h*c,d[v]=p*f,d[s]=c,d[l]=f,d.x+=a.x,d.y+=a.y,t.push(d)}}function Ef(a,e,t,r){return a*r-t*e}function lR(a,e,t,r,i,n,o,s){var l=t-a,u=r-e,v=o-i,c=s-n,h=Ef(v,c,l,u);if(Math.abs(h)<1e-6)return null;var f=a-i,p=e-n,d=Ef(f,p,v,c)/h;return d<0||d>1?null:new fe(d*l+a,d*u+e)}function uR(a,e,t){var r=new fe;fe.sub(r,t,e),r.normalize();var i=new fe;fe.sub(i,a,e);var n=i.dot(r);return n}function Vr(a,e){var t=a[a.length-1];t&&t[0]===e[0]&&t[1]===e[1]||a.push(e)}function vR(a,e,t){for(var r=a.length,i=[],n=0;n<r;n++){var o=a[n],s=a[(n+1)%r],l=lR(o[0],o[1],s[0],s[1],e.x,e.y,t.x,t.y);l&&i.push({projPt:uR(l,e,t),pt:l,idx:n})}if(i.length<2)return[{points:a},{points:a}];i.sort(function(g,y){return g.projPt-y.projPt});var u=i[0],v=i[i.length-1];if(v.idx<u.idx){var c=u;u=v,v=c}for(var h=[u.pt.x,u.pt.y],f=[v.pt.x,v.pt.y],p=[h],d=[f],n=u.idx+1;n<=v.idx;n++)Vr(p,a[n].slice());Vr(p,f),Vr(p,h);for(var n=v.idx+1;n<=u.idx+r;n++)Vr(d,a[n%r].slice());return Vr(d,h),Vr(d,f),[{points:p},{points:d}]}function Vf(a){var e=a.points,t=[],r=[];Cn(e,t,r);var i=new zt(t[0],t[1],r[0]-t[0],r[1]-t[1]),n=i.width,o=i.height,s=i.x,l=i.y,u=new fe,v=new fe;return n>o?(u.x=v.x=s+n/2,u.y=l,v.y=l+o):(u.y=v.y=l+o/2,u.x=s,v.x=s+n),vR(e,u,v)}function hn(a,e,t,r){if(t===1)r.push(e);else{var i=Math.floor(t/2),n=a(e);hn(a,n[0],i,r),hn(a,n[1],t-i,r)}return r}function cR(a,e){for(var t=[],r=0;r<e;r++)t.push(sl(a));return t}function hR(a,e){e.setStyle(a.style),e.z=a.z,e.z2=a.z2,e.zlevel=a.zlevel}function fR(a){for(var e=[],t=0;t<a.length;)e.push([a[t++],a[t++]]);return e}function pR(a,e){var t=[],r=a.shape,i;switch(a.type){case"rect":sR(r,e,t),i=ct;break;case"sector":kf(r,e,t),i=ve;break;case"circle":kf({r0:0,r:r.r,startAngle:0,endAngle:Math.PI*2,cx:r.cx,cy:r.cy},e,t),i=ve;break;default:var n=a.getComputedTransform(),o=n?Math.sqrt(Math.max(n[0]*n[0]+n[1]*n[1],n[2]*n[2]+n[3]*n[3])):1,s=z(oR(a.getUpdatedPathProxy(),o),function(y){return fR(y)}),l=s.length;if(l===0)hn(Vf,{points:s[0]},e,t);else if(l===e)for(var u=0;u<l;u++)t.push({points:s[u]});else{var v=0,c=z(s,function(y){var m=[],x=[];Cn(y,m,x);var S=(x[1]-m[1])*(x[0]-m[0]);return v+=S,{poly:y,area:S}});c.sort(function(y,m){return m.area-y.area});for(var h=e,u=0;u<l;u++){var f=c[u];if(h<=0)break;var p=u===l-1?h:Math.ceil(f.area/v*e);p<0||(hn(Vf,{points:f.poly},p,t),h-=p)}}i=ce;break}if(!i)return cR(a,e);for(var d=[],u=0;u<t.length;u++){var g=new i;g.setShape(t[u]),hR(a,g),d.push(g)}return d}function dR(a,e){var t=a.length,r=e.length;if(t===r)return[a,e];for(var i=[],n=[],o=t<r?a:e,s=Math.min(t,r),l=Math.abs(r-t)/6,u=(s-2)/6,v=Math.ceil(l/u)+1,c=[o[0],o[1]],h=l,f=2;f<s;){var p=o[f-2],d=o[f-1],g=o[f++],y=o[f++],m=o[f++],x=o[f++],S=o[f++],_=o[f++];if(h<=0){c.push(g,y,m,x,S,_);continue}for(var b=Math.min(h,v-1)+1,w=1;w<=b;w++){var A=w/b;Zi(p,g,m,S,A,i),Zi(d,y,x,_,A,n),p=i[3],d=n[3],c.push(i[1],n[1],i[2],n[2],p,d),g=i[5],y=n[5],m=i[6],x=n[6]}h-=b-1}return o===a?[c,e]:[a,c]}function Nf(a,e){for(var t=a.length,r=a[t-2],i=a[t-1],n=[],o=0;o<e.length;)n[o++]=r,n[o++]=i;return n}function gR(a,e){for(var t,r,i,n=[],o=[],s=0;s<Math.max(a.length,e.length);s++){var l=a[s],u=e[s],v=void 0,c=void 0;l?u?(t=dR(l,u),v=t[0],c=t[1],r=v,i=c):(c=Nf(i||l,l),v=l):(v=Nf(r||u,u),c=u),n.push(v),o.push(c)}return[n,o]}function Of(a){for(var e=0,t=0,r=0,i=a.length,n=0,o=i-2;n<i;o=n,n+=2){var s=a[o],l=a[o+1],u=a[n],v=a[n+1],c=s*v-u*l;e+=c,t+=(s+u)*c,r+=(l+v)*c}return e===0?[a[0]||0,a[1]||0]:[t/e/3,r/e/3,e]}function yR(a,e,t,r){for(var i=(a.length-2)/6,n=1/0,o=0,s=a.length,l=s-2,u=0;u<i;u++){for(var v=u*6,c=0,h=0;h<s;h+=2){var f=h===0?v:(v+h-2)%l+2,p=a[f]-t[0],d=a[f+1]-t[1],g=e[h]-r[0],y=e[h+1]-r[1],m=g-p,x=y-d;c+=m*m+x*x}c<n&&(n=c,o=u)}return o}function mR(a){for(var e=[],t=a.length,r=0;r<t;r+=2)e[r]=a[t-r-2],e[r+1]=a[t-r-1];return e}function xR(a,e,t,r){for(var i=[],n,o=0;o<a.length;o++){var s=a[o],l=e[o],u=Of(s),v=Of(l);n==null&&(n=u[2]<0!=v[2]<0);var c=[],h=[],f=0,p=1/0,d=[],g=s.length;n&&(s=mR(s));for(var y=yR(s,l,u,v)*6,m=g-2,x=0;x<m;x+=2){var S=(y+x)%m+2;c[x+2]=s[S]-u[0],c[x+3]=s[S+1]-u[1]}if(c[0]=s[y]-u[0],c[1]=s[y+1]-u[1],t>0)for(var _=r/t,b=-r/2;b<=r/2;b+=_){for(var w=Math.sin(b),A=Math.cos(b),T=0,x=0;x<s.length;x+=2){var D=c[x],I=c[x+1],L=l[x]-v[0],M=l[x+1]-v[1],P=L*A-M*w,R=L*w+M*A;d[x]=P,d[x+1]=R;var E=P-D,N=R-I;T+=E*E+N*N}if(T<p){p=T,f=b;for(var V=0;V<d.length;V++)h[V]=d[V]}}else for(var O=0;O<g;O+=2)h[O]=l[O]-v[0],h[O+1]=l[O+1]-v[1];i.push({from:c,to:h,fromCp:u,toCp:v,rotation:-f})}return i}function fn(a){return a.__isCombineMorphing}var Sy="__mOriginal_";function pn(a,e,t){var r=Sy+e,i=a[r]||a[e];a[r]||(a[r]=a[e]);var n=t.replace,o=t.after,s=t.before;a[e]=function(){var l=arguments,u;return s&&s.apply(this,l),n?u=n.apply(this,l):u=i.apply(this,l),o&&o.apply(this,l),u}}function Pa(a,e){var t=Sy+e;a[t]&&(a[e]=a[t],a[t]=null)}function zf(a,e){for(var t=0;t<a.length;t++)for(var r=a[t],i=0;i<r.length;){var n=r[i],o=r[i+1];r[i++]=e[0]*n+e[2]*o+e[4],r[i++]=e[1]*n+e[3]*o+e[5]}}function by(a,e){var t=a.getUpdatedPathProxy(),r=e.getUpdatedPathProxy(),i=gR(js(t),js(r)),n=i[0],o=i[1],s=a.getComputedTransform(),l=e.getComputedTransform();function u(){this.transform=null}s&&zf(n,s),l&&zf(o,l),pn(e,"updateTransform",{replace:u}),e.transform=null;var v=xR(n,o,10,Math.PI),c=[];pn(e,"buildPath",{replace:function(h){for(var f=e.__morphT,p=1-f,d=[],g=0;g<v.length;g++){var y=v[g],m=y.from,x=y.to,S=y.rotation*f,_=y.fromCp,b=y.toCp,w=Math.sin(S),A=Math.cos(S);C0(d,_,b,f);for(var T=0;T<m.length;T+=2){var D=m[T],I=m[T+1],L=x[T],M=x[T+1],P=D*p+L*f,R=I*p+M*f;c[T]=P*A-R*w+d[0],c[T+1]=P*w+R*A+d[1]}var E=c[0],N=c[1];h.moveTo(E,N);for(var T=2;T<m.length;){var L=c[T++],M=c[T++],V=c[T++],O=c[T++],W=c[T++],Z=c[T++];E===L&&N===M&&V===W&&O===Z?h.lineTo(W,Z):h.bezierCurveTo(L,M,V,O,W,Z),E=W,N=Z}}}})}function nu(a,e,t){if(!a||!e)return e;var r=t.done,i=t.during;by(a,e),e.__morphT=0;function n(){Pa(e,"buildPath"),Pa(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},j({during:function(o){e.dirtyShape(),i&&i(o)},done:function(){n(),r&&r()}},t)),e}function SR(a,e,t,r,i,n){var o=16;a=i===t?0:Math.round(32767*(a-t)/(i-t)),e=n===r?0:Math.round(32767*(e-r)/(n-r));for(var s=0,l,u=(1<<o)/2;u>0;u/=2){var v=0,c=0;(a&u)>0&&(v=1),(e&u)>0&&(c=1),s+=u*u*(3*v^c),c===0&&(v===1&&(a=u-1-a,e=u-1-e),l=a,a=e,e=l)}return s}function dn(a){var e=1/0,t=1/0,r=-1/0,i=-1/0,n=z(a,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),v=l.x+l.width/2+(u?u[4]:0),c=l.y+l.height/2+(u?u[5]:0);return e=Math.min(v,e),t=Math.min(c,t),r=Math.max(v,r),i=Math.max(c,i),[v,c]}),o=z(n,function(s,l){return{cp:s,z:SR(s[0],s[1],e,t,r,i),path:a[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function _y(a){return pR(a.path,a.count)}function Qs(){return{fromIndividuals:[],toIndividuals:[],count:0}}function bR(a,e,t){var r=[];function i(_){for(var b=0;b<_.length;b++){var w=_[b];fn(w)?i(w.childrenRef()):w instanceof Dt&&r.push(w)}}i(a);var n=r.length;if(!n)return Qs();var o=t.dividePath||_y,s=o({path:e,count:n});if(s.length!==n)return console.error("Invalid morphing: unmatched splitted path"),Qs();r=dn(r),s=dn(s);for(var l=t.done,u=t.during,v=t.individualDelay,c=new Sa,h=0;h<n;h++){var f=r[h],p=s[h];p.parent=e,p.copyTransform(c),v||by(f,p)}e.__isCombineMorphing=!0,e.childrenRef=function(){return s};function d(_){for(var b=0;b<s.length;b++)s[b].addSelfToZr(_)}pn(e,"addSelfToZr",{after:function(_){d(_)}}),pn(e,"removeSelfFromZr",{after:function(_){for(var b=0;b<s.length;b++)s[b].removeSelfFromZr(_)}});function g(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,Pa(e,"addSelfToZr"),Pa(e,"removeSelfFromZr")}var y=s.length;if(v)for(var m=y,x=function(){m--,m===0&&(g(),l&&l())},h=0;h<y;h++){var S=v?j({delay:(t.delay||0)+v(h,y,r[h],s[h]),done:x},t):t;nu(r[h],s[h],S)}else e.__morphT=0,e.animateTo({__morphT:1},j({during:function(_){for(var b=0;b<y;b++){var w=s[b];w.__morphT=e.__morphT,w.dirtyShape()}u&&u(_)},done:function(){g();for(var _=0;_<a.length;_++)Pa(a[_],"updateTransform");l&&l()}},t));return e.__zr&&d(e.__zr),{fromIndividuals:r,toIndividuals:s,count:y}}function _R(a,e,t){var r=e.length,i=[],n=t.dividePath||_y;function o(f){for(var p=0;p<f.length;p++){var d=f[p];fn(d)?o(d.childrenRef()):d instanceof Dt&&i.push(d)}}if(fn(a)){o(a.childrenRef());var s=i.length;if(s<r)for(var l=0,u=s;u<r;u++)i.push(sl(i[l++%s]));i.length=r}else{i=n({path:a,count:r});for(var v=a.getComputedTransform(),u=0;u<i.length;u++)i[u].setLocalTransform(v);if(i.length!==r)return console.error("Invalid morphing: unmatched splitted path"),Qs()}i=dn(i),e=dn(e);for(var c=t.individualDelay,u=0;u<r;u++){var h=c?j({delay:(t.delay||0)+c(u,r,i[u],e[u])},t):t;nu(i[u],e[u],h)}return{fromIndividuals:i,toIndividuals:e,count:e.length}}function Bf(a){return B(a[0])}function Gf(a,e){for(var t=[],r=a.length,i=0;i<r;i++)t.push({one:a[i],many:[]});for(var i=0;i<e.length;i++){var n=e[i].length,o=void 0;for(o=0;o<n;o++)t[o%r].many.push(e[i][o])}for(var s=0,i=r-1;i>=0;i--)if(!t[i].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var n=l.length,u=Math.ceil(n/2);t[i].many=l.slice(u,n),t[s].many=l.slice(0,u),s++}return t}var wR={clone:function(a){for(var e=[],t=1-Math.pow(1-a.path.style.opacity,1/a.count),r=0;r<a.count;r++){var i=sl(a.path);i.setStyle("opacity",t),e.push(i)}return e},split:null};function is(a,e,t,r,i,n){if(!a.length||!e.length)return;var o=Ja("update",r,i);if(!(o&&o.duration>0))return;var s=r.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,v;Bf(a)&&(u=a,v=e),Bf(e)&&(u=e,v=a);function c(y,m,x,S,_){var b=y.many,w=y.one;if(b.length===1&&!_){var A=m?b[0]:w,T=m?w:b[0];if(fn(A))c({many:[A],one:T},!0,x,S,!0);else{var D=s?j({delay:s(x,S)},l):l;nu(A,T,D),n(A,T,A,T,D)}}else for(var I=j({dividePath:wR[t],individualDelay:s&&function(N,V,O,W){return s(N+x,S)}},l),L=m?bR(b,w,I):_R(w,b,I),M=L.fromIndividuals,P=L.toIndividuals,R=M.length,E=0;E<R;E++){var D=s?j({delay:s(E,R)},l):l;n(M[E],P[E],m?b[E]:y.one,m?y.one:b[E],D)}}for(var h=u?u===a:a.length>e.length,f=u?Gf(v,u):Gf(h?e:a,[h?a:e]),p=0,d=0;d<f.length;d++)p+=f[d].many.length;for(var g=0,d=0;d<f.length;d++)c(f[d],h,g,p),g+=f[d].many.length}function vr(a){if(!a)return[];if(B(a)){for(var e=[],t=0;t<a.length;t++)e.push(vr(a[t]));return e}var r=[];return a.traverse(function(i){i instanceof Dt&&!i.disableMorphing&&!i.invisible&&!i.ignore&&r.push(i)}),r}var wy=1e4,AR=Lt();function TR(a){for(var e=a.dimensions,t=0;t<e.length;t++){var r=a.getDimensionInfo(e[t]);if(r&&r.otherDims.itemGroupId===0)return e[t]}}function Ff(a){var e=[];return C(a,function(t){var r=t.data;if(r.count()>wy){de("Universal transition is disabled on large data > 10k.");return}for(var i=r.getIndices(),n=TR(r),o=0;o<i.length;o++)e.push({data:r,dim:t.dim||n,divide:t.divide,dataIndex:o})}),e}function ns(a,e,t){a.traverse(function(r){r instanceof Dt&&wt(r,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function os(a){if(a.parent){var e=a.getComputedTransform();a.setLocalTransform(e),a.parent.remove(a)}}function Nr(a){a.stopAnimation(),a.isGroup&&a.traverse(function(e){e.stopAnimation()})}function CR(a,e,t){var r=Ja("update",t,e);r&&a.traverse(function(i){if(i instanceof jr){var n=D0(i);n&&i.animateFrom({style:n},r)}})}function DR(a,e){var t=a.length;if(t!==e.length)return!1;for(var r=0;r<t;r++){var i=a[r],n=e[r];if(i.data.getId(i.dataIndex)!==n.data.getId(n.dataIndex))return!1}return!0}function Ay(a,e,t){var r=Ff(a),i=Ff(e);function n(y,m,x,S,_){(x||y)&&m.animateFrom({style:x&&x!==y?H(H({},x.style),y.style):y.style},_)}function o(y){for(var m=0;m<y.length;m++)if(y[m].dim)return y[m].dim}var s=o(r),l=o(i),u=!1;function v(y,m){return function(x){var S=x.data,_=x.dataIndex;if(m)return S.getId(_);var b=S.hostModel&&S.hostModel.get("dataGroupId"),w=y?s||l:l||s,A=w&&S.getDimensionInfo(w),T=A&&A.ordinalMeta;if(A){var D=S.get(A.name,_);return T&&T.categories[D]||D+""}var I=S.getRawDataItem(_);return I&&I.groupId?I.groupId+"":b||S.getId(_)}}var c=DR(r,i),h={};if(!c)for(var f=0;f<i.length;f++){var p=i[f],d=p.data.getItemGraphicEl(p.dataIndex);d&&(h[d.id]=!0)}function g(y,m){var x=r[m],S=i[y],_=S.data.hostModel,b=x.data.getItemGraphicEl(x.dataIndex),w=S.data.getItemGraphicEl(S.dataIndex);if(b===w){w&&CR(w,S.dataIndex,_);return}b&&h[b.id]||w&&(Nr(w),b?(Nr(b),os(b),u=!0,is(vr(b),vr(w),S.divide,_,y,n)):ns(w,_,y))}new Qe(r,i,v(!0,c),v(!1,c),null,"multiple").update(g).updateManyToOne(function(y,m){var x=i[y],S=x.data,_=S.hostModel,b=S.getItemGraphicEl(x.dataIndex),w=te(z(m,function(A){return r[A].data.getItemGraphicEl(r[A].dataIndex)}),function(A){return A&&A!==b&&!h[A.id]});b&&(Nr(b),w.length?(C(w,function(A){Nr(A),os(A)}),u=!0,is(vr(w),vr(b),x.divide,_,y,n)):ns(b,_,x.dataIndex))}).updateOneToMany(function(y,m){var x=r[m],S=x.data.getItemGraphicEl(x.dataIndex);if(!(S&&h[S.id])){var _=te(z(y,function(w){return i[w].data.getItemGraphicEl(i[w].dataIndex)}),function(w){return w&&w!==S}),b=i[y[0]].data.hostModel;_.length&&(C(_,function(w){return Nr(w)}),S?(Nr(S),os(S),u=!0,is(vr(S),vr(_),x.divide,b,y[0],n)):C(_,function(w){return ns(w,b,y[0])}))}}).updateManyToMany(function(y,m){new Qe(m,y,function(x){return r[x].data.getId(r[x].dataIndex)},function(x){return i[x].data.getId(i[x].dataIndex)}).update(function(x,S){g(y[x],m[S])}).execute()}).execute(),u&&C(e,function(y){var m=y.data,x=m.hostModel,S=x&&t.getViewOfSeriesModel(x),_=Ja("update",x,0);S&&x.isAnimationEnabled()&&_&&_.duration>0&&S.group.traverse(function(b){b instanceof Dt&&!b.animators.length&&b.animateFrom({style:{opacity:0}},_)})})}function Hf(a){var e=a.getModel("universalTransition").get("seriesKey");return e||a.id}function Wf(a){return B(a)?a.sort().join(","):a}function $e(a){if(a.hostModel)return a.hostModel.getModel("universalTransition").get("divideShape")}function IR(a,e){var t=it(),r=it(),i=it();C(a.oldSeries,function(o,s){var l=a.oldData[s],u=Hf(o),v=Wf(u);r.set(v,l),B(u)&&C(u,function(c){i.set(c,{data:l,key:v})})});function n(o){t.get(o)&&de("Duplicated seriesKey in universalTransition "+o)}return C(e.updatedSeries,function(o){if(o.isUniversalTransitionEnabled()&&o.isAnimationEnabled()){var s=o.getData(),l=Hf(o),u=Wf(l),v=r.get(u);if(v)n(u),t.set(u,{oldSeries:[{divide:$e(v),data:v}],newSeries:[{divide:$e(s),data:s}]});else if(B(l)){n(u);var c=[];C(l,function(p){var d=r.get(p);d&&c.push({divide:$e(d),data:d})}),c.length&&t.set(u,{oldSeries:c,newSeries:[{data:s,divide:$e(s)}]})}else{var h=i.get(l);if(h){var f=t.get(h.key);f||(f={oldSeries:[{data:h.data,divide:$e(h.data)}],newSeries:[]},t.set(h.key,f)),f.newSeries.push({data:s,divide:$e(s)})}}}}),t}function $f(a,e){for(var t=0;t<a.length;t++){var r=e.seriesIndex!=null&&e.seriesIndex===a[t].seriesIndex||e.seriesId!=null&&e.seriesId===a[t].id;if(r)return t}}function LR(a,e,t,r){var i=[],n=[];C(jt(a.from),function(o){var s=$f(e.oldSeries,o);s>=0&&i.push({data:e.oldData[s],divide:$e(e.oldData[s]),dim:o.dimension})}),C(jt(a.to),function(o){var s=$f(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();n.push({data:l,divide:$e(l),dim:o.dimension})}}),i.length>0&&n.length>0&&Ay(i,n,r)}function MR(a){a.registerUpdateLifecycle("series:beforeupdate",function(e,t,r){C(jt(r.seriesTransition),function(i){C(jt(i.to),function(n){for(var o=r.updatedSeries,s=0;s<o.length;s++)(n.seriesIndex!=null&&n.seriesIndex===o[s].seriesIndex||n.seriesId!=null&&n.seriesId===o[s].id)&&(o[s][Yn]=!0)})})}),a.registerUpdateLifecycle("series:transition",function(e,t,r){var i=AR(t);if(i.oldSeries&&r.updatedSeries&&r.optionChanged){var n=r.seriesTransition;if(n)C(jt(n),function(h){LR(h,i,r,t)});else{var o=IR(i,r);C(o.keys(),function(h){var f=o.get(h);Ay(f.oldSeries,f.newSeries,t)})}C(r.updatedSeries,function(h){h[Yn]&&(h[Yn]=!1)})}for(var s=e.getSeries(),l=i.oldSeries=[],u=i.oldData=[],v=0;v<s.length;v++){var c=s[v].getData();c.count()<wy&&(l.push(s[v]),u.push(c))}})}J([I0]);J([cx]);J([Vx,Qx,cS,qS,f1,nb,Mb,g_,H_,j_,lw,hA,BA,QA,mT,TT,WT,QT,hC,SC,kC,gD]);J(BD);J(xI);J(bd);J(NI);J(ig);J(WI);J(JI);J(QL);J(_M);J(oi);J(HM);J(ZM);J(o2);J(g2);J(A2);J(R2);J(U2);J(pP);J(vy);J(cy);J(FP);J(gy);J(yy);J(UP);J(nR);J(L0);J(MR);J(M0);