import{aN as cd,bC as me,bp as fd,bj as hd,br as pd,aG as Lt,aD as z,bk as Se,bL as yt,aJ as $e,ai as Ye,bE as Ze,aI as xl,aK as $t,c8 as Ht,ay as Yt,t as dd,bX as gd,bs as bt,bl as ui,aE as vi,bH as bl,Q as yd,bS as Oa,bR as md,c1 as _l,aF as wl,bu as Sd,ac as xd,a9 as bd,aq as _d,T as wd,bJ as Ad,bt as ci,ao as Td,bQ as Cd,c6 as Dd,bb as Ld,bv as Id,X as Md,aC as Pd,aA as Ed,ar as Rd,ba as kd,ak as Vd}from"./index-D5GfLbIx.js";/* empty css *//* empty css *//* empty css *//* empty css */import{es as Al,ac as V,c6 as Nd,dd as mo,cn as os,ah as fa,ba as D,f as Tt,d9 as lf,d4 as uf,d2 as $,bm as Gt,z as mt,n as So,dS as Rt,J as Te,b6 as ot,X as ha,b8 as dr,cP as sn,P as Wt,y as ss,dF as zd,b1 as Gd,dl as Ne,cV as Dt,a8 as kr,cv as gt,cI as Mt,bz as ht,dw as U,dB as Od,ea as Bd,eb as vf,c5 as Fd,cu as Hd,cJ as Wd,ca as Ut,c7 as Pt,eq as xt,ag as cf,co as qe,aa as Re,di as pa,bI as Ud,m as Tl,bf as $d,j as ff,cH as lt,aL as Yd,aH as Zd,bk as K,bR as hf,cA as le,bN as pf,cR as Xd,a6 as df,bC as Fn,D as qd,ae as Kd,bJ as jd,a4 as Jd,c3 as Qd,dv as tg,l as eg,cz as rg,cE as ag,dX as ng,cy as ig,ak as da,aT as og,au as pt,bL as sg,cw as gf,cD as ls,bA as lg,c4 as ug,bT as vg,cp as q,cC as Zt,bV as Cl,be as cg,df as yr,dh as yf,cT as Nt,bH as fe,Z as Be,dQ as mf,C as kt,ab as St,bS as Vr,dY as Fe,e8 as ae,el as Et,e5 as ue,bE as Qt,dT as Ur,dC as Hn,_ as re,an as at,b3 as st,d0 as us,bO as fg,b4 as La,$ as Ft,aR as Sf,aY as $r,G as nt,aZ as ve,dz as Wn,a3 as Un,er as it,cb as hg,bn as pg,F as Ae,b$ as Yr,dn as Ia,dU as dg,b0 as ne,d5 as Ct,x as ce,da as Ce,b as $n,al as gg,h as Xt,a as mr,g as Ma,N as xf,d8 as be,i as te,A as ke,I as xo,af as yg,K as Bt,c2 as Z,aO as mg,t as Sg,v as _e,R as xg,w as vs,ep as bg,dV as Yn,dZ as bf,en as Sr,aI as Zr,aP as ut,bZ as _f,Q as Zn,s as xr,e3 as Br,aU as cs,e9 as fs,bb as _g,a9 as Pa,e7 as wf,aE as wg,aF as Kt,U as Ar,d6 as hs,dR as se,dK as Af,bo as Tf,bq as Xn,a2 as Cf,aA as fn,H as Ag,dP as hn,e as Df,aD as ze,bw as bo,dp as Jt,dA as ps,bs as Tg,a$ as At,o as Qe,et as pn,cx as Dl,e1 as ra,bd as Ll,dj as Cg,d1 as Lf,dr as Dg,ef as fi,bl as hi,db as dn,dc as la,M as Il,av as je,dg as Ea,d_ as Lg,aJ as Ig,eg as Nr,cO as Ml,e0 as Mg,d$ as _o,dW as ds,bh as ga,cN as ya,dm as Ra,eo as qn,dG as Pg,dD as If,b9 as Eg,k as Mf,b5 as Rg,Y as Pl,e2 as El,e6 as kg,dq as Vg,bj as Ng,aS as Pf,as as zg,aX as gs,de as gn,ai as Gr,ed as ys,aj as br,ej as Gg,dO as Og,u as Bg,em as Ef,bX as ua,at as Fg,c1 as ms,am as yn,c0 as wo,by as Ao,c$ as Hg,dH as pi,V as Rf,ek as It,aW as Ss,aK as Kn,eh as di,aN as Wg,aw as Ug,dE as $g,aB as Rl,aC as Yg,dy as kl,cr as jn,bx as To,cB as Zg,c8 as Jn,d as Vl,cK as Xg,aV as qg,E as Kg,cF as jg,cQ as Jg,br as ka,a5 as ma,ay as Qg,cq as kf,a_ as Nl,bF as ty,bB as Vf,cY as ey,bU as Nf,aq as zf,ar as ry,B as Gf,c_ as zl,cX as Of,bt as Bf,bu as Gl,c as Va,cs as Ff,cc as xs,dJ as ay,dI as ny,ei as iy,ap as oy,bY as sy,cZ as ly,bG as uy,ec as vy,d7 as Hf,bp as cy,bK as Ol,dt as fy,d3 as hy,aG as py,L as dy,q as gy,r as yy,cm as my,aQ as Wf,cL as Sy,cU as xy,bi as Uf,dM as bs,ct as by,ad as Bl,du as $f,dN as _y,cW as wy,bD as Yf,e4 as Zf,cS as Ba,bv as Ay,p as _s,bc as gi,dx as Co,a7 as Ty,O as Cy,ds as mn,bP as Dy,bg as Ly,cM as Iy,b_ as Qn,bW as My,dk as Py,ee as Do,az as Ey,dL as Fl,ao as Ry,bQ as Xf,aM as ky,cG as Vy,a0 as Ny,W as zy,a1 as Gy,b7 as Hl,S as Oy,b2 as Sn,ax as ws,T as yi,bM as By,cd as Fy,ce as Hy,cf as Wy,cg as Uy,ch as $y,ci as Yy,cj as Zy,ck as Xy,cl as qy,c9 as Wl}from"./install-D_iTbSFG.js";import{b as Ky,c as jy,l as Jy,a as Qy}from"./projection-BHFE6Meg.js";import"./reflection-BwOBPyb9.js";var tm=1e-8;function Ul(a,e){return Math.abs(a-e)n&&(r=o,n=l)}if(r)return rm(r.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(t){var r=this._rect;if(r&&!t)return r;var n=[1/0,1/0],i=[-1/0,-1/0],o=this.geometries;return D(o,function(s){s.type==="polygon"?$l(s.exterior,n,i,t):D(s.points,function(l){$l(l,n,i,t)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(i[0])&&isFinite(i[1])||(n[0]=n[1]=i[0]=i[1]=0),r=new Tt(n[0],n[1],i[0]-n[0],i[1]-n[1]),t||(this._rect=r),r},e.prototype.contain=function(t){var r=this.getBoundingRect(),n=this.geometries;if(!r.contain(t[0],t[1]))return!1;t:for(var i=0,o=n.length;i>1^-(s&1),l=l>>1^-(l&1),s+=n,l+=i,n=s,i=l,r.push([s/t,l/t])}return r}function im(a,e){return a=nm(a),$(Gt(a.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var r=t.properties,n=t.geometry,i=[];switch(n.type){case"Polygon":var o=n.coordinates;i.push(new Yl(o[0],o.slice(1)));break;case"MultiPolygon":D(n.coordinates,function(l){l[0]&&i.push(new Yl(l[0],l.slice(1)))});break;case"LineString":i.push(new Zl([n.coordinates]));break;case"MultiLineString":i.push(new Zl(n.coordinates))}var s=new Kf(r[e||"name"],i,r.cp);return s.properties=r,s})}var qr=Math.PI*2,ar=ss.CMD,om=["top","right","bottom","left"];function sm(a,e,t,r,n){var i=t.width,o=t.height;switch(a){case"top":r.set(t.x+i/2,t.y-e),n.set(0,-1);break;case"bottom":r.set(t.x+i/2,t.y+o+e),n.set(0,1);break;case"left":r.set(t.x-e,t.y+o/2),n.set(-1,0);break;case"right":r.set(t.x+i+e,t.y+o/2),n.set(1,0);break}}function lm(a,e,t,r,n,i,o,s,l){o-=a,s-=e;var u=Math.sqrt(o*o+s*s);o/=u,s/=u;var v=o*t+a,c=s*t+e;if(Math.abs(r-n)%qr<1e-4)return l[0]=v,l[1]=c,u-t;if(i){var f=r;r=Ne(n),n=Ne(f)}else r=Ne(r),n=Ne(n);r>n&&(n+=qr);var h=Math.atan2(s,o);if(h<0&&(h+=qr),h>=r&&h<=n||h+qr>=r&&h+qr<=n)return l[0]=v,l[1]=c,u-t;var p=t*Math.cos(r)+a,d=t*Math.sin(r)+e,g=t*Math.cos(n)+a,y=t*Math.sin(n)+e,S=(p-o)*(p-o)+(d-s)*(d-s),m=(g-o)*(g-o)+(y-s)*(y-s);return S0){e=e/180*Math.PI,we.fromArray(a[0]),dt.fromArray(a[1]),wt.fromArray(a[2]),mt.sub(Ee,we,dt),mt.sub(Pe,wt,dt);var t=Ee.len(),r=Pe.len();if(!(t<.001||r<.001)){Ee.scale(1/t),Pe.scale(1/r);var n=Ee.dot(Pe),i=Math.cos(e);if(i1&&mt.copy(jt,wt),jt.toArray(a[1])}}}}function cm(a,e,t){if(t<=180&&t>0){t=t/180*Math.PI,we.fromArray(a[0]),dt.fromArray(a[1]),wt.fromArray(a[2]),mt.sub(Ee,dt,we),mt.sub(Pe,wt,dt);var r=Ee.len(),n=Pe.len();if(!(r<.001||n<.001)){Ee.scale(1/r),Pe.scale(1/n);var i=Ee.dot(e),o=Math.cos(t);if(i=l)mt.copy(jt,wt);else{jt.scaleAndAdd(Pe,s/Math.tan(Math.PI/2-v));var c=wt.x!==dt.x?(jt.x-dt.x)/(wt.x-dt.x):(jt.y-dt.y)/(wt.y-dt.y);if(isNaN(c))return;c<0?mt.copy(jt,dt):c>1&&mt.copy(jt,wt)}jt.toArray(a[1])}}}}function xi(a,e,t,r){var n=t==="normal",i=n?a:a.ensureState(t);i.ignore=e;var o=r.get("smooth");o&&o===!0&&(o=.3),i.shape=i.shape||{},o>0&&(i.shape.smooth=o);var s=r.getModel("lineStyle").getLineStyle();n?a.useStyle(s):i.style=s}function fm(a,e){var t=e.smooth,r=e.points;if(r)if(a.moveTo(r[0][0],r[0][1]),t>0&&r.length>=3){var n=dr(r[0],r[1]),i=dr(r[1],r[2]);if(!n||!i){a.lineTo(r[1][0],r[1][1]),a.lineTo(r[2][0],r[2][1]);return}var o=Math.min(n,i)*t,s=sn([],r[1],r[0],o/n),l=sn([],r[1],r[2],o/i),u=sn([],s,l,.5);a.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),a.bezierCurveTo(l[0],l[1],l[0],l[1],r[2][0],r[2][1])}else for(var v=1;v=0&&r.attr(i.oldLayoutSelect),Pt(f,"emphasis")>=0&&r.attr(i.oldLayoutEmphasis)),xt(r,u,t,l)}else if(r.attr(u),!Wd(r).valueAnimation){var c=Rt(r.style.opacity,1);r.style.opacity=0,Ut(r,{style:{opacity:c}},t,l)}if(i.oldLayout=u,r.states.select){var h=i.oldLayoutSelect={};Fa(h,u,Ha),Fa(h,r.states.select,Ha)}if(r.states.emphasis){var p=i.oldLayoutEmphasis={};Fa(p,u,Ha),Fa(p,r.states.emphasis,Ha)}cf(r,l,v,t,t)}if(n&&!n.ignore&&!n.invisible){var i=dm(n),o=i.oldLayout,d={points:n.shape.points};o?(n.attr({shape:o}),xt(n,{shape:d},t)):(n.setShape(d),n.style.strokePercent=0,Ut(n,{style:{strokePercent:1}},t)),i.oldLayout=d}},a}(),_i=Dt();function ym(a){a.registerUpdateLifecycle("series:beforeupdate",function(e,t,r){var n=_i(t).labelManager;n||(n=_i(t).labelManager=new gm),n.clearLabels()}),a.registerUpdateLifecycle("series:layoutlabels",function(e,t,r){var n=_i(t).labelManager;r.updatedSeries.forEach(function(i){n.addLabelsOfSeries(t.getViewOfSeriesModel(i))}),n.updateLayoutConfig(t),n.layout(t),n.processLabelsOverall()})}var wi=Math.sin,Ai=Math.cos,th=Math.PI,nr=Math.PI*2,mm=180/th,eh=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,n,i,o){this._add("C",e,t,r,n,i,o)},a.prototype.quadraticCurveTo=function(e,t,r,n){this._add("Q",e,t,r,n)},a.prototype.arc=function(e,t,r,n,i,o){this.ellipse(e,t,r,r,0,n,i,o)},a.prototype.ellipse=function(e,t,r,n,i,o,s,l){var u=s-o,v=!l,c=Math.abs(u),f=qe(c-nr)||(v?u>=nr:-u>=nr),h=u>0?u%nr:u%nr+nr,p=!1;f?p=!0:qe(c)?p=!1:p=h>=th==!!v;var d=e+r*Ai(o),g=t+n*wi(o);this._start&&this._add("M",d,g);var y=Math.round(i*mm);if(f){var S=1/this._p,m=(v?1:-1)*(nr-S);this._add("A",r,n,y,1,+v,e+r*Ai(o+m),t+n*wi(o+m)),S>.01&&this._add("A",r,n,y,0,+v,d,g)}else{var x=e+r*Ai(s),b=t+n*wi(s);this._add("A",r,n,y,+p,+v,x,b)}},a.prototype.rect=function(e,t,r,n){this._add("M",e,t),this._add("l",r,0),this._add("l",0,n),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,n,i,o,s,l,u){for(var v=[],c=this._p,f=1;f"}function Dm(a){return""}function Ds(a,e){e=e||{};var t=e.newline?` `:"";function r(n){var i=n.children,o=n.tag,s=n.attrs,l=n.text;return Cm(o,s)+(o!=="style"?$d(l):l||"")+(i?""+t+$(i,function(u){return r(u)}).join(t)+t:"")+Dm(o)}return r(a)}function Lm(a,e,t){t=t||{};var r=t.newline?` `:"",n=" {"+r,i=r+"}",o=$(Mt(a),function(l){return l+n+$(Mt(a[l]),function(u){return u+":"+a[l][u]+";"}).join(r)+i}).join(r),s=$(Mt(e),function(l){return"@keyframes "+l+n+$(Mt(e[l]),function(u){return u+n+$(Mt(e[l][u]),function(v){var c=e[l][u][v];return v==="d"&&(c='path("'+c+'")'),v+":"+c+";"}).join(r)+i}).join(r)+i}).join(r);return!o&&!s?"":[""].join(r)}function Io(a){return{zrId:a,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function jl(a,e,t,r){return zt("svg","root",{width:a,height:e,xmlns:rh,"xmlns:xlink":ah,version:"1.1",baseProfile:"full",viewBox:r?"0 0 "+a+" "+e:!1},t)}var Im=0;function ih(){return Im++}var Jl={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 Mm(a,e,t){var r=K({},a.shape);K(r,e),a.buildPath(t,r);var n=new eh;return n.reset(pf(a)),t.rebuildPath(n,1),n.generateStr(),n.getStr()}function Pm(a,e){var t=e.originX,r=e.originY;(t||r)&&(a[or]=t+"px "+r+"px")}var Em={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function oh(a,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=a,t}function Rm(a,e,t){var r=a.shape.paths,n={},i,o;if(D(r,function(l){var u=Io(t.zrId);u.animation=!0,ti(l,{},u,!0);var v=u.cssAnims,c=u.cssNodes,f=Mt(v),h=f.length;if(h){o=f[h-1];var p=v[o];for(var d in p){var g=p[d];n[d]=n[d]||{d:""},n[d].d+=g.d||""}for(var y in c){var S=c[y].animation;S.indexOf(o)>=0&&(i=S)}}}),!!i){e.d=!1;var s=oh(n,t);return i.replace(o,s)}}function Ql(a){return lt(a)?Jl[a]?"cubic-bezier("+Jl[a]+")":Yd(a)?a:"":""}function ti(a,e,t,r){var n=a.animators,i=n.length,o=[];if(a instanceof ff){var s=Rm(a,e,t);if(s)o.push(s);else if(!i)return}else if(!i)return;for(var l={},u=0;u0}).length){var J=oh(w,t);return J+" "+S[0]+" both"}}for(var g in l){var s=d(l[g]);s&&o.push(s)}if(o.length){var y=t.zrId+"-cls-"+ih();t.cssNodes["."+y]={animation:o.join(",")},e.class=y}}function km(a,e,t){if(!a.ignore)if(a.isSilent()){var r={"pointer-events":"none"};tu(r,e,t)}else{var n=a.states.emphasis&&a.states.emphasis.style?a.states.emphasis.style:{},i=n.fill;if(!i){var o=a.style&&a.style.fill,s=a.states.select&&a.states.select.style&&a.states.select.style.fill,l=a.currentStates.indexOf("select")>=0&&s||o;l&&(i=Xd(l))}var u=n.lineWidth;if(u){var v=!n.strokeNoScale&&a.transform?a.transform[0]:1;u=u/v}var r={cursor:"pointer"};i&&(r.fill=i),n.stroke&&(r.stroke=n.stroke),u&&(r["stroke-width"]=u),tu(r,e,t)}}function tu(a,e,t,r){var n=JSON.stringify(a),i=t.cssStyleCache[n];i||(i=t.zrId+"-cls-"+ih(),t.cssStyleCache[n]=i,t.cssNodes["."+i+":hover"]=a),e.class=e.class?e.class+" "+i:i}var Sa=Math.round;function sh(a){return a&<(a.src)}function lh(a){return a&>(a.toDataURL)}function Ls(a,e,t,r){wm(function(n,i){var o=n==="fill"||n==="stroke";o&&gf(i)?vh(e,a,n,r):o&&ls(i)?ch(t,a,n,r):a[n]=i,o&&r.ssr&&i==="none"&&(a["pointer-events"]="visible")},e,t,!1),Fm(t,a,r)}function Is(a,e){var t=lg(e);t&&(t.each(function(r,n){r!=null&&(a[(Kl+n).toLowerCase()]=r+"")}),e.isSilent()&&(a[Kl+"silent"]="true"))}function eu(a){return qe(a[0]-1)&&qe(a[1])&&qe(a[2])&&qe(a[3]-1)}function Vm(a){return qe(a[4])&&qe(a[5])}function Ms(a,e,t){if(e&&!(Vm(e)&&eu(e))){var r=1e4;a.transform=eu(e)?"translate("+Sa(e[4]*r)/r+" "+Sa(e[5]*r)/r+")":sg(e)}}function ru(a,e,t){for(var r=a.points,n=[],i=0;i"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";da(f,g),da(h,g)}else if(f==null||h==null){var y=function(C,L){if(C){var M=C.elm,I=f||L.width,P=h||L.height;C.tag==="pattern"&&(u?(P=1,I/=i.width):v&&(I=1,P/=i.height)),C.attrs.width=I,C.attrs.height=P,M&&(M.setAttribute("width",I),M.setAttribute("height",P))}},S=og(p,null,a,function(C){l||y(_,C),y(c,C)});S&&S.width&&S.height&&(f=f||S.width,h=h||S.height)}c=zt("image","img",{href:p,width:f,height:h}),o.width=f,o.height=h}else n.svgElement&&(c=pt(n.svgElement),o.width=n.svgWidth,o.height=n.svgHeight);if(c){var m,x;l?m=x=1:u?(x=1,m=o.width/i.width):v?(m=1,x=o.height/i.height):o.patternUnits="userSpaceOnUse",m!=null&&!isNaN(m)&&(o.width=m),x!=null&&!isNaN(x)&&(o.height=x);var b=hf(n);b&&(o.patternTransform=b);var _=zt("pattern","",o,[c]),w=Ds(_),A=r.patternCache,T=A[w];T||(T=r.zrId+"-p"+r.patternIdx++,A[w]=T,o.id=T,_=r.defs[T]=zt("pattern",T,o,[c])),e[t]=Fn(T)}}function Hm(a,e,t){var r=t.clipPathCache,n=t.defs,i=r[a.id];if(!i){i=t.zrId+"-c"+t.clipPathIdx++;var o={id:i};r[a.id]=i,n[i]=zt("clipPath",i,o,[uh(a,t)])}e["clip-path"]=Fn(i)}function iu(a){return document.createTextNode(a)}function hr(a,e,t){a.insertBefore(e,t)}function ou(a,e){a.removeChild(e)}function su(a,e){a.appendChild(e)}function fh(a){return a.parentNode}function hh(a){return a.nextSibling}function Ti(a,e){a.textContent=e}var lu=58,Wm=120,Um=zt("","");function Mo(a){return a===void 0}function Me(a){return a!==void 0}function $m(a,e,t){for(var r={},n=e;n<=t;++n){var i=a[n].key;i!==void 0&&(r[i]=n)}return r}function aa(a,e){var t=a.key===e.key,r=a.tag===e.tag;return r&&t}function xa(a){var e,t=a.children,r=a.tag;if(Me(r)){var n=a.elm=nh(r);if(Ps(Um,a),q(t))for(e=0;ei?(p=t[l+1]==null?null:t[l+1].elm,ph(a,p,t,n,l)):_n(a,e,r,i))}function Er(a,e){var t=e.elm=a.elm,r=a.children,n=e.children;a!==e&&(Ps(a,e),Mo(e.text)?Me(r)&&Me(n)?r!==n&&Ym(t,r,n):Me(n)?(Me(a.text)&&Ti(t,""),ph(t,null,n,0,n.length-1)):Me(r)?_n(t,r,0,r.length-1):Me(a.text)&&Ti(t,""):a.text!==e.text&&(Me(r)&&_n(t,r,0,r.length-1),Ti(t,e.text)))}function Zm(a,e){if(aa(a,e))Er(a,e);else{var t=a.elm,r=fh(t);xa(e),r!==null&&(hr(r,e.elm,hh(t)),_n(r,[a],0,0))}return e}var Xm=0,qm=function(){function a(e,t,r){if(this.type="svg",this.refreshHover=uu(),this.configLayer=uu(),this.storage=t,this._opts=r=K({},r),this.root=e,this._id="zr"+Xm++,this._oldVNode=jl(r.width,r.height),e&&!r.ssr){var n=this._viewport=document.createElement("div");n.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=nh("svg");Ps(null,this._oldVNode),n.appendChild(i),e.appendChild(n)}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",Zm(this._oldVNode,e),this._oldVNode=e}},a.prototype.renderOneToVNode=function(e){return nu(e,Io(this._id))},a.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),r=this._width,n=this._height,i=Io(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var o=[],s=this._bgVNode=Km(r,n,this._backgroundColor,i);s&&o.push(s);var l=e.compress?null:this._mainVNode=zt("g","main",{},[]);this._paintList(t,i,l?l.children:o),l&&o.push(l);var u=$(Mt(i.defs),function(f){return i.defs[f]});if(u.length&&o.push(zt("defs","defs",{},u)),e.animation){var v=Lm(i.cssNodes,i.cssAnims,{newline:!0});if(v){var c=zt("style","stl",{},[],v);o.push(c)}}return jl(r,n,o,e.useViewBox)},a.prototype.renderToString=function(e){return e=e||{},Ds(this.renderToVNode({animation:Rt(e.cssAnimation,!0),emphasis:Rt(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Rt(e.useViewBox,!0)}),{newline:!0})},a.prototype.setBackgroundColor=function(e){this._backgroundColor=e},a.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},a.prototype._paintList=function(e,t,r){for(var n=e.length,i=[],o=0,s,l,u=0,v=0;v=0&&!(f&&l&&f[d]===l[d]);d--);for(var g=p-1;g>d;g--)o--,s=i[o-1];for(var y=d+1;yF?(X=E+A*F/2,j=X):(X=E+C,j=H-C),n.setItemLayout(N,{angle:F,startAngle:X,endAngle:j,clockwise:x,cx:l,cy:u,r0:c,r:b?Nt(k,w,[c,v]):v}),E=H}),It?y:g,b=Math.abs(m.label.y-t);if(b>=x.maxY){var _=m.label.x-e-m.len2*n,w=r+m.len,A=Math.abs(_)a.unconstrainedWidth?null:h:null;r.setStyle("width",p)}var d=r.getBoundingRect();i.width=d.width;var g=(r.style.margin||0)+2.1;i.height=d.height+g,i.y-=(i.height-c)/2}}}function Ci(a){return a.position==="center"}function e0(a){var e=a.getData(),t=[],r,n,i=!1,o=(a.get("minShowLabelAngle")||0)*Qm,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,v=s.x,c=s.y,f=s.height;function h(_){_.ignore=!0}function p(_){if(!_.ignore)return!0;for(var w in _.states)if(_.states[w].ignore===!1)return!0;return!1}e.each(function(_){var w=e.getItemGraphicEl(_),A=w.shape,T=w.getTextContent(),C=w.getTextGuideLine(),L=e.getItemModel(_),M=L.getModel("label"),I=M.get("position")||L.get(["emphasis","label","position"]),P=M.get("distanceToLabelLine"),E=M.get("alignTo"),R=U(M.get("edgeDistance"),u),k=M.get("bleedMargin"),N=L.getModel("labelLine"),F=N.get("length");F=U(F,u);var H=N.get("length2");if(H=U(H,u),Math.abs(A.endAngle-A.startAngle)0?"right":"left":j>0?"left":"right"}var ft=Math.PI,_t=0,Vt=M.get("rotate");if(le(Vt))_t=Vt*(ft/180);else if(I==="center")_t=0;else if(Vt==="radial"||Vt===!0){var ie=j<0?-X+ft:-X;_t=ie}else if(Vt==="tangential"&&I!=="outside"&&I!=="outer"){var ee=Math.atan2(j,rt);ee<0&&(ee=ft*2+ee);var rr=rt>0;rr&&(ee=ft+ee),_t=ee-ft}if(i=!!_t,T.x=tt,T.y=O,T.rotation=_t,T.setStyle({verticalAlign:"middle"}),Y){T.setStyle({align:J});var li=T.states.select;li&&(li.x+=T.x,li.y+=T.y)}else{var Ue=T.getBoundingRect().clone();Ue.applyTransform(T.getComputedTransform());var Sl=(T.style.margin||0)+2.1;Ue.y-=Sl/2,Ue.height+=Sl,t.push({label:T,labelLine:C,position:I,len:F,len2:H,minTurnAngle:N.get("minTurnAngle"),maxSurfaceAngle:N.get("maxSurfaceAngle"),surfaceNormal:new mt(j,rt),linePoints:G,textAlign:J,labelDistance:P,labelAlignTo:E,edgeDistance:R,bleedMargin:k,rect:Ue,unconstrainedWidth:Ue.width,labelStyleWidth:T.style.width})}w.setTextConfig({inside:Y})}}),!i&&a.get("avoidLabelOverlap")&&t0(t,r,n,l,u,f,v,c);for(var d=0;d0){for(var v=o.getItemLayout(0),c=1;isNaN(v&&v.startAngle)&&c=i.r0}},e.type="pie",e}(kt);function Xr(a,e,t){e=q(e)&&{coordDimensions:e}||K({encodeDefine:a.getEncode()},e);var r=a.getSource(),n=Hn(r,e).dimensions,i=new re(n,a);return i.initData(r,t),i}var za=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}(),n0=Dt(),i0=function(a){V(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 za(at(this.getData,this),at(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){a.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return Xr(this,{coordDimensions:["value"],encodeDefaulter:st(us,this)})},e.prototype.getDataParams=function(t){var r=this.getData(),n=n0(r),i=n.seats;if(!i){var o=[];r.each(r.mapDimension("value"),function(l){o.push(l)}),i=n.seats=fg(o,r.hostModel.get("percentPrecision"))}var s=a.prototype.getDataParams.call(this,t);return s.percent=i[t]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(t){La(t,"labelLine",["show"]);var r=t.labelLine,n=t.emphasis.labelLine;r.show=r.show&&t.label.show,n.show=n.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,endAngle:"auto",padAngle:0,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}(Ft);function o0(a){return{seriesType:a,reset:function(e,t){var r=e.getData();r.filterSelf(function(n){var i=r.mapDimension("value"),o=r.get(i,n);return!(le(o)&&!isNaN(o)&&o<0)})}}}function s0(a){a.registerChartView(a0),a.registerSeriesModel(i0),Sf("pie",a.registerAction),a.registerLayout(st(Jm,"pie")),a.registerProcessor(Na("pie")),a.registerProcessor(o0("pie"))}var l0=function(a){V(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 $r(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(t,r,n){return n.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}(Ft),Sh=4,u0=function(){function a(){}return a}(),v0=function(a){V(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 u0},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,r){var n=r.points,i=r.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&i[0]=0;u--){var v=u*2,c=i[v]-s/2,f=i[v+1]-l/2;if(t>=c&&r>=f&&t<=c+s&&r<=f+l)return u}return-1},e.prototype.contain=function(t,r){var n=this.transformCoordToLocal(t,r),i=this.getBoundingRect();if(t=n[0],r=n[1],i.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,n=r.points,i=r.size,o=i[0],s=i[1],l=1/0,u=1/0,v=-1/0,c=-1/0,f=0;f=0&&(u.dataIndex=c+(e.startIndex||0))})},a.prototype.remove=function(){this._clear()},a.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},a}(),f0=function(a){V(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,n){var i=t.getData(),o=this._updateSymbolDraw(i,t);o.updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,r,n){var i=t.getData(),o=this._updateSymbolDraw(i,t);o.incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,r,n){this._symbolDraw.incrementalUpdate(t,r.getData(),{clipShape:this._getClipShape(r)}),this._finished=t.end===r.getData().count()},e.prototype.updateTransform=function(t,r,n){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var o=Wn("").reset(t,r,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(t.get("clip",!0)){var r=t.coordinateSystem;return r&&r.getArea&&r.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,r){var n=this._symbolDraw,i=r.pipelineContext,o=i.large;return(!n||o!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=o?new c0:new Un,this._isLargeDraw=o,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(t,r){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(kt);function h0(a){it(hg),a.registerSeriesModel(l0),a.registerChartView(f0),a.registerLayout(Wn("scatter"))}function p0(a){a.eachSeriesByType("radar",function(e){var t=e.getData(),r=[],n=e.coordinateSystem;if(n){var i=n.getIndicatorAxes();D(i,function(o,s){t.each(t.mapDimension(i[s].dim),function(l,u){r[u]=r[u]||[];var v=n.dataToPoint(l,s);r[u][s]=fu(v)?v:hu(n)})}),t.each(function(o){var s=pg(r[o],function(l){return fu(l)})||hu(n);r[o].push(s.slice()),t.setItemLayout(o,r[o])})}})}function fu(a){return!isNaN(a[0])&&!isNaN(a[1])}function hu(a){return[a.cx,a.cy]}function d0(a){var e=a.polar;if(e){q(e)||(e=[e]);var t=[];D(e,function(r,n){r.indicator?(r.type&&!r.shape&&(r.shape=r.type),a.radar=a.radar||[],q(a.radar)||(a.radar=[a.radar]),a.radar.push(r)):t.push(r)}),a.polar=t}D(a.series,function(r){r&&r.type==="radar"&&r.polarIndex&&(r.radarIndex=r.polarIndex)})}var g0=function(a){V(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,n){var i=t.coordinateSystem,o=this.group,s=t.getData(),l=this._data;function u(f,h){var p=f.getItemVisual(h,"symbol")||"circle";if(p!=="none"){var d=Ia(f.getItemVisual(h,"symbolSize")),g=ve(p,-1,-1,2,2),y=f.getItemVisual(h,"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(f,h,p,d,g,y){p.removeAll();for(var S=0;S0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var d=l;p.color!=null&&(d=ot({color:p.color},l));var g=Ct(pt(p),{boundaryGap:t,splitNumber:r,scale:n,axisLine:i,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:c,nameTextStyle:d,triggerEvent:f},!1);if(lt(v)){var y=g.name;g.name=v.replace("{value}",y??"")}else gt(v)&&(g.name=v(g.name,g));var S=new ce(g,null,this.ecModel);return Ce(S,$n.prototype),S.mainType="radar",S.componentIndex=this.componentIndex,S},this);this._indicatorModels=h},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:Ct({lineStyle:{color:"#bbb"}},Kr.axisLine),axisLabel:Ua(Kr.axisLabel,!1),axisTick:Ua(Kr.axisTick,!1),splitLine:Ua(Kr.splitLine,!0),splitArea:Ua(Kr.splitArea,!0),indicator:[]},e}(Xt),S0=["axisLine","axisTickLabel","axisName"],x0=function(a){V(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,n){var i=this.group;i.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var r=t.coordinateSystem,n=r.getIndicatorAxes(),i=$(n,function(o){var s=o.model.get("showName")?o.name:"",l=new mr(o.model,{axisName:s,position:[r.cx,r.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});D(i,function(o){D(S0,o.add,o),this.group.add(o.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(t){var r=t.coordinateSystem,n=r.getIndicatorAxes();if(!n.length)return;var i=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"),f=l.get("color"),h=u.get("color"),p=q(f)?f:[f],d=q(h)?h:[h],g=[],y=[];function S(E,R,k){var N=k%R.length;return E[N]=E[N]||[],N}if(i==="circle")for(var m=n[0].getTicksCoords(),x=r.cx,b=r.cy,_=0;_=4&&(v={x:parseFloat(f[0]||0),y:parseFloat(f[1]||0),width:parseFloat(f[2]),height:parseFloat(f[3])})}if(v&&s!=null&&l!=null&&(c=_h(v,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var h=n;n=new nt,n.add(h),h.scaleX=h.scaleY=c.scale,h.x=c.x,h.y=c.y}return!t.ignoreRootClip&&s!=null&&l!=null&&n.setClipPath(new Bt({shape:{x:0,y:0,width:s,height:l}})),{root:n,width:s,height:l,viewBoxRect:v,viewBoxTransform:c,named:i}},a.prototype._parseNode=function(e,t,r,n,i,o){var s=e.nodeName.toLowerCase(),l,u=n;if(s==="defs"&&(i=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=t;else{if(!i){var v=Di[s];if(v&&Z(Di,s)){l=v.call(this,e,t);var c=e.getAttribute("name");if(c){var f={name:c,namedFrom:null,svgNodeTagLower:s,el:l};r.push(f),s==="g"&&(u=f)}else n&&r.push({name:n.name,namedFrom:n,svgNodeTagLower:s,el:l});t.add(l)}}var h=gu[s];if(h&&Z(gu,s)){var p=h.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,i,o):g.nodeType===3&&o&&this._parseText(g,l),g=g.nextSibling},a.prototype._parseText=function(e,t){var r=new df({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});he(t,r),oe(e,r,this._defsUsePending,!1,!1),D0(r,t);var n=r.style,i=n.fontSize;i&&i<9&&(n.fontSize=9,r.scaleX*=i/9,r.scaleY*=i/9);var o=(n.fontSize||n.fontFamily)&&[n.fontStyle,n.fontWeight,(n.fontSize||12)+"px",n.fontFamily||"sans-serif"].join(" ");n.font=o;var s=r.getBoundingRect();return this._textX+=s.width,t.add(r),r},a.internalField=function(){Di={g:function(e,t){var r=new nt;return he(t,r),oe(e,r,this._defsUsePending,!1,!1),r},rect:function(e,t){var r=new Bt;return he(t,r),oe(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 Ma;return he(t,r),oe(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 _e;return he(t,r),oe(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 Sg;return he(t,r),oe(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"),n;r&&(n=Su(r));var i=new Ae({shape:{points:n||[]},silent:!0});return he(t,i),oe(e,i,this._defsUsePending,!1,!1),i},polyline:function(e,t){var r=e.getAttribute("points"),n;r&&(n=Su(r));var i=new Te({shape:{points:n||[]},silent:!0});return he(t,i),oe(e,i,this._defsUsePending,!1,!1),i},image:function(e,t){var r=new Re;return he(t,r),oe(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",n=e.getAttribute("y")||"0",i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(r)+parseFloat(i),this._textY=parseFloat(n)+parseFloat(o);var s=new nt;return he(t,s),oe(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,t){var r=e.getAttribute("x"),n=e.getAttribute("y");r!=null&&(this._textX=parseFloat(r)),n!=null&&(this._textY=parseFloat(n));var i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new nt;return he(t,s),oe(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(o),s},path:function(e,t){var r=e.getAttribute("d")||"",n=mg(r);return he(t,n),oe(e,n,this._defsUsePending,!1,!1),n.silent=!0,n}}}(),a}(),gu={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),n=parseInt(a.getAttribute("y2")||"0",10),i=new vs(e,t,r,n);return yu(a,i),mu(a,i),i},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),n=new xg(e,t,r);return yu(a,n),mu(a,n),n}};function yu(a,e){var t=a.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function mu(a,e){for(var t=a.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var r=t.getAttribute("offset"),n=void 0;r&&r.indexOf("%")>0?n=parseInt(r,10)/100:r?n=parseFloat(r):n=0;var i={};bh(t,i,i);var o=i.stopColor||t.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:n,color:o})}t=t.nextSibling}}function he(a,e){a&&a.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),ot(e.__inheritedStyle,a.__inheritedStyle))}function Su(a){for(var e=ri(a),t=[],r=0;r0;i-=2){var o=r[i],s=r[i-1],l=ri(o);switch(n=n||Zr(),s){case"translate":Sr(n,n,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":bf(n,n,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Yn(n,n,-parseFloat(l[0])*Li,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*Li);mo(n,[1,0,u,1,0,0],n);break;case"skewY":var v=Math.tan(parseFloat(l[0])*Li);mo(n,[1,v,0,1,0,0],n);break;case"matrix":n[0]=parseFloat(l[0]),n[1]=parseFloat(l[1]),n[2]=parseFloat(l[2]),n[3]=parseFloat(l[3]),n[4]=parseFloat(l[4]),n[5]=parseFloat(l[5]);break}}e.setLocalTransform(n)}}var bu=/([^\s:;]+)\s*:\s*([^:;]+)/g;function bh(a,e,t){var r=a.getAttribute("style");if(r){bu.lastIndex=0;for(var n;(n=bu.exec(r))!=null;){var i=n[1],o=Z(wn,i)?wn[i]:null;o&&(e[o]=n[2]);var s=Z(An,i)?An[i]:null;s&&(t[s]=n[2])}}}function R0(a,e,t){for(var r=0;r0,g={api:r,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:d,isGeo:o,transformInfoRaw:f};l.resourceType==="geoJSON"?this._buildGeoJSON(g):l.resourceType==="geoSVG"&&this._buildSVG(g),this._updateController(e,t,r),this._updateMapSelectHandler(e,u,r,n)},a.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=ut(),r=ut(),n=this._regionsGroup,i=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function v(h,p){return p&&(h=p(h)),h&&[h[0]*i.scaleX+i.x,h[1]*i.scaleY+i.y]}function c(h){for(var p=[],d=!u&&l&&l.project,g=0;g=0)&&(f=n);var h=o?{normal:{align:"center",verticalAlign:"middle"}}:null;ue(e,Qt(r),{labelFetcher:f,labelDataIndex:c,defaultText:t},h);var p=e.getTextContent();if(p&&(wh(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 Cu(a,e,t,r,n,i){a.data?a.data.setItemGraphicEl(i,e):ht(e).eventData={componentType:"geo",componentIndex:n.componentIndex,geoIndex:n.componentIndex,name:t,region:r&&r.option||{}}}function Du(a,e,t,r,n){a.data||fs({el:e,componentModel:n,itemName:t,itemTooltipOption:r.get("tooltip")})}function Lu(a,e,t,r,n){e.highDownSilentOnTouch=!!n.get("selectedMode");var i=r.getModel("emphasis"),o=i.get("focus");return Et(e,o,i.get("blurScope"),i.get("disabled")),a.isGeo&&_g(e,n,t),o}function Iu(a,e,t){var r=[],n;function i(){n=[]}function o(){n.length&&(r.push(n),n=[])}var s=e({polygonStart:i,polygonEnd:o,lineStart:i,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&n.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),D(a,function(l){s.lineStart();for(var u=0;u-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={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}(Ft);function Q0(a,e){var t={};return D(a,function(r){r.each(r.mapDimension("value"),function(n,i){var o="ec-"+r.getName(i);t[o]=t[o]||[],isNaN(n)||t[o].push(n)})}),a[0].map(a[0].mapDimension("value"),function(r,n){for(var i="ec-"+a[0].getName(n),o=0,s=1/0,l=-1/0,u=t[i].length,v=0;v1?(x.width=m,x.height=m/g):(x.height=m,x.width=m*g),x.y=S[1]-x.height/2,x.x=S[0]-x.width/2;else{var b=a.getBoxLayoutParams();b.aspect=g,x=fe(b,{width:p,height:d})}this.setViewRect(x.x,x.y,x.width,x.height),this.setCenter(a.get("center"),e),this.setZoom(a.get("zoom"))}function a1(a,e){D(e.get("geoCoord"),function(t,r){a.addGeoCoord(r,t)})}var n1=function(){function a(){this.dimensions=Th}return a.prototype.create=function(e,t){var r=[];function n(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 Eo(l+s,l,K({nameMap:o.get("nameMap")},n(o)));u.zoomLimit=o.get("scaleLimit"),r.push(u),o.coordinateSystem=u,u.model=o,u.resize=Ru,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 i={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();i[s]=i[s]||[],i[s].push(o)}}),D(i,function(o,s){var l=$(o,function(v){return v.get("nameMap")}),u=new Eo(s,s,K({nameMap:hs(l)},n(o[0])));u.zoomLimit=se.apply(null,$(o,function(v){return v.get("scaleLimit")})),r.push(u),u.resize=Ru,u.resize(o[0],t),D(o,function(v){v.coordinateSystem=u,a1(u,v)})}),r},a.prototype.getFilledRegions=function(e,t,r,n){for(var i=(e||[]).slice(),o=ut(),s=0;s=0;o--){var s=n[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function v1(a,e){var t=a.isExpand?a.children:[],r=a.parentNode.children,n=a.hierNode.i?r[a.hierNode.i-1]:null;if(t.length){h1(a);var i=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;n?(a.hierNode.prelim=n.hierNode.prelim+e(a,n),a.hierNode.modifier=a.hierNode.prelim-i):a.hierNode.prelim=i}else n&&(a.hierNode.prelim=n.hierNode.prelim+e(a,n));a.parentNode.hierNode.defaultAncestor=p1(a,n,a.parentNode.hierNode.defaultAncestor||r[0],e)}function c1(a){var e=a.hierNode.prelim+a.parentNode.hierNode.modifier;a.setLayout({x:e},!0),a.hierNode.modifier+=a.parentNode.hierNode.modifier}function Vu(a){return arguments.length?a:y1}function na(a,e){return a-=Math.PI/2,{x:e*Math.cos(a),y:e*Math.sin(a)}}function f1(a,e){return fe(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function h1(a){for(var e=a.children,t=e.length,r=0,n=0;--t>=0;){var i=e[t];i.hierNode.prelim+=r,i.hierNode.modifier+=r,n+=i.hierNode.change,r+=i.hierNode.shift+n}}function p1(a,e,t,r){if(e){for(var n=a,i=a,o=i.parentNode.children[0],s=e,l=n.hierNode.modifier,u=i.hierNode.modifier,v=o.hierNode.modifier,c=s.hierNode.modifier;s=Ii(s),i=Mi(i),s&&i;){n=Ii(n),o=Mi(o),n.hierNode.ancestor=a;var f=s.hierNode.prelim+c-i.hierNode.prelim-u+r(s,i);f>0&&(g1(d1(s,a,t),a,f),u+=f,l+=f),c+=s.hierNode.modifier,u+=i.hierNode.modifier,l+=n.hierNode.modifier,v+=o.hierNode.modifier}s&&!Ii(n)&&(n.hierNode.thread=s,n.hierNode.modifier+=c-l),i&&!Mi(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-v,t=a)}return t}function Ii(a){var e=a.children;return e.length&&a.isExpand?e[e.length-1]:a.hierNode.thread}function Mi(a){var e=a.children;return e.length&&a.isExpand?e[0]:a.hierNode.thread}function d1(a,e,t){return a.hierNode.ancestor.parentNode===e.parentNode?a.hierNode.ancestor:t}function g1(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 y1(a,e){return a.parentNode===e.parentNode?1:2}var m1=function(){function a(){this.parentPoint=[],this.childPoints=[]}return a}(),S1=function(a){V(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 m1},e.prototype.buildPath=function(t,r){var n=r.childPoints,i=n.length,o=r.parentPoint,s=n[0],l=n[i-1];if(i===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,f=U(r.forkPosition,1),h=[];h[v]=o[v],h[c]=o[c]+(l[c]-o[c])*f,t.moveTo(o[0],o[1]),t.lineTo(h[0],h[1]),t.moveTo(s[0],s[1]),h[v]=s[v],t.lineTo(h[0],h[1]),h[v]=l[v],t.lineTo(h[0],h[1]),t.lineTo(l[0],l[1]);for(var p=1;pS.x,b||(x=x-Math.PI));var w=b?"left":"right",A=s.getModel("label"),T=A.get("rotate"),C=T*(Math.PI/180),L=g.getTextContent();L&&(g.setTextConfig({position:A.get("position")||w,rotation:T==null?-x:C,origin:"center"}),L.setStyle("verticalAlign","middle"))}var M=s.get(["emphasis","focus"]),I=M==="relative"?fn(o.getAncestorsIndices(),o.getDescendantIndices()):M==="ancestor"?o.getAncestorsIndices():M==="descendant"?o.getDescendantIndices():null;I&&(ht(t).focus=I),b1(n,o,v,t,p,h,d,r),t.__edge&&(t.onHoverStateChange=function(P){if(P!=="blur"){var E=o.parentNode&&a.getItemGraphicEl(o.parentNode.dataIndex);E&&E.hoverState===Ag||wf(t.__edge,P)}})}function b1(a,e,t,r,n,i,o,s){var l=e.getModel(),u=a.get("edgeShape"),v=a.get("layout"),c=a.getOrient(),f=a.get(["lineStyle","curveness"]),h=a.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),d=r.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(d||(d=r.__edge=new Df({shape:Ro(v,c,f,n,n)})),xt(d,{shape:Ro(v,c,f,i,o)},a));else if(u==="polyline"&&v==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var g=e.children,y=[],S=0;St&&(t=n.height)}this.height=t+1},a.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,r=this.children,n=r.length;t=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=0){var r=t.getData().tree.root,n=a.targetNode;if(lt(n)&&(n=r.getNodeById(n)),n&&r.contains(n))return{node:n};var i=a.targetNodeId;if(i!=null&&(n=r.getNodeById(i)))return{node:n}}}function Ph(a){for(var e=[];a;)a=a.parentNode,a&&e.push(a);return e.reverse()}function Gs(a,e){var t=Ph(a);return Pt(t,e)>=0}function ai(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 M1=function(a){V(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},n=t.leaves||{},i=new ce(n,this,this.ecModel),o=zs.createTree(r,this,s);function s(c){c.wrapMethod("getItemModel",function(f,h){var p=o.getNodeByDataIndex(h);return p&&p.children.length&&p.isExpand||(f.parentModel=i),f})}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 f=c.hostTree.data.getRawDataItem(c.dataIndex);c.isExpand=f&&f.collapsed!=null?!f.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,n){for(var i=this.getData().tree,o=i.root.children[0],s=i.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return ne("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var r=a.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return r.treeAncestors=ai(n,this),r.collapsed=!n.isExpand,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}(Ft);function P1(a,e,t){for(var r=[a],n=[],i;i=r.pop();)if(n.push(i),i.isExpand){var o=i.children;if(o.length)for(var s=0;s=0;i--)t.push(n[i])}}function E1(a,e){a.eachSeriesByType("tree",function(t){R1(t,e)})}function R1(a,e){var t=f1(a,e);a.layoutInfo=t;var r=a.get("layout"),n=0,i=0,o=null;r==="radial"?(n=2*Math.PI,i=Math.min(t.height,t.width)/2,o=Vu(function(m,x){return(m.parentNode===x.parentNode?1:2)/m.depth})):(n=t.width,i=t.height,o=Vu());var s=a.getData().tree.root,l=s.children[0];if(l){u1(s),P1(l,v1,o),s.hierNode.modifier=-l.hierNode.prelim,Jr(l,c1);var u=l,v=l,c=l;Jr(l,function(m){var x=m.getLayout().x;xv.getLayout().x&&(v=m),m.depth>c.depth&&(c=m)});var f=u===v?1:o(u,v)/2,h=f-u.getLayout().x,p=0,d=0,g=0,y=0;if(r==="radial")p=n/(v.getLayout().x+f+h),d=i/(c.depth-1||1),Jr(l,function(m){g=(m.getLayout().x+h)*p,y=(m.depth-1)*d;var x=na(g,y);m.setLayout({x:x.x,y:x.y,rawX:g,rawY:y},!0)});else{var S=a.getOrient();S==="RL"||S==="LR"?(d=i/(v.getLayout().x+f+h),p=n/(c.depth-1||1),Jr(l,function(m){y=(m.getLayout().x+h)*d,g=S==="LR"?(m.depth-1)*p:n-(m.depth-1)*p,m.setLayout({x:g,y},!0)})):(S==="TB"||S==="BT")&&(p=n/(v.getLayout().x+f+h),d=i/(c.depth-1||1),Jr(l,function(m){g=(m.getLayout().x+h)*p,y=S==="TB"?(m.depth-1)*d:i-(m.depth-1)*d,m.setLayout({x:g,y},!0)}))}}}function k1(a){a.eachSeriesByType("tree",function(e){var t=e.getData(),r=t.tree;r.eachNode(function(n){var i=n.getModel(),o=i.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(n.dataIndex,"style");K(s,o)})})}function V1(a){a.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(r){var n=e.dataIndex,i=r.getData().tree,o=i.getNodeByDataIndex(n);o.isExpand=!o.isExpand})}),a.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,r){t.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var i=n.coordinateSystem,o=Vs(i,e,void 0,r);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}function N1(a){a.registerChartView(x1),a.registerSeriesModel(M1),a.registerLayout(E1),a.registerVisual(k1),V1(a)}var Bu=["treemapZoomToNode","treemapRender","treemapMove"];function z1(a){for(var e=0;e1;)i=i.parentNode;var o=bo(a.ecModel,i.name||i.dataIndex+"",r);n.setVisual("decal",o)})}var G1=function(a){V(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 n={name:t.name,children:t.data};Rh(n);var i=t.levels||[],o=this.designatedVisualItemStyle={},s=new ce({itemStyle:o},this,r);i=t.levels=O1(i,r);var l=$(i||[],function(c){return new ce(c,s,r)},this),u=zs.createTree(n,this,v);function v(c){c.wrapMethod("getItemModel",function(f,h){var p=u.getNodeByDataIndex(h),d=p?l[p.depth]:null;return f.parentModel=d||s,f})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,r,n){var i=this.getData(),o=this.getRawValue(t),s=i.getName(t);return ne("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var r=a.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return r.treeAncestors=ai(n,this),r.treePathInfo=r.treeAncestors,r},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},K(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var r=this._idIndexMap;r||(r=this._idIndexMap=ut(),this._idIndexMapCount=0);var n=r.get(t);return n==null&&r.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var r=this.getRawData().tree.root;(!t||t!==r&&!r.contains(t))&&(this._viewRoot=r)},e.prototype.enableAriaDecal=function(){Eh(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:"▶",zoomToNodeRatio:.32*.32,scaleLimit:null,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"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},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}(Ft);function Rh(a){var e=0;D(a.children,function(r){Rh(r);var n=r.value;q(n)&&(n=n[0]),e+=n});var t=a.value;q(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),q(a.value)?a.value[0]=t:a.value=t}function O1(a,e){var t=Jt(e.get("color")),r=Jt(e.get(["aria","decal","decals"]));if(t){a=a||[];var n,i;D(a,function(s){var l=new ce(s),u=l.get("color"),v=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(n=!0),(l.get(["itemStyle","decal"])||v&&v!=="none")&&(i=!0)});var o=a[0]||(a[0]={});return n||(o.color=t.slice()),!i&&r&&(o.decal=r.slice()),a}}var B1=8,Fu=8,Pi=5,F1=function(){function a(e){this.group=new nt,e.add(this.group)}return a.prototype.render=function(e,t,r,n){var i=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!i.get("show")||!r)){var s=i.getModel("itemStyle"),l=i.getModel("emphasis"),u=s.getModel("textStyle"),v=l.getModel(["itemStyle","textStyle"]),c={pos:{left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(r,c,u),this._renderContent(e,c,s,l,u,v,n),ps(o,c.pos,c.box)}},a.prototype._prepare=function(e,t,r){for(var n=e;n;n=n.parentNode){var i=ze(n.getModel().get("name"),""),o=r.getTextRect(i),s=Math.max(o.width+B1*2,t.emptyItemWidth);t.totalWidth+=s+Fu,t.renderList.push({node:n,text:i,width:s})}},a.prototype._renderContent=function(e,t,r,n,i,o,s){for(var l=0,u=t.emptyItemWidth,v=e.get(["breadcrumb","height"]),c=Tg(t.pos,t.box),f=t.totalWidth,h=t.renderList,p=n.getModel("itemStyle").getItemStyle(),d=h.length-1;d>=0;d--){var g=h[d],y=g.node,S=g.width,m=g.text;f>c.width&&(f-=S-u,S=u,m=null);var x=new Ae({shape:{points:H1(l,0,S,v,d===h.length-1,d===0)},style:ot(r.getItemStyle(),{lineJoin:"bevel"}),textContent:new St({style:At(i,{text:m})}),textConfig:{position:"inside"},z2:Pa*1e4,onclick:st(s,y)});x.disableLabelAnimation=!0,x.getTextContent().ensureState("emphasis").style=At(o,{text:m}),x.ensureState("emphasis").style=p,Et(x,n.get("focus"),n.get("blurScope"),n.get("disabled")),this.group.add(x),W1(x,e,y),l+=S+Fu}},a.prototype.remove=function(){this.group.removeAll()},a}();function H1(a,e,t,r,n,i){var o=[[n?a:a-Pi,e],[a+t,e],[a+t,e+r],[n?a:a-Pi,e+r]];return!i&&o.splice(2,0,[a+t+Pi,e+r/2]),!n&&o.push([a,e+r/2]),o}function W1(a,e,t){ht(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&&ai(t,e)}}var U1=function(){function a(){this._storage=[],this._elExistsMap={}}return a.prototype.add=function(e,t,r,n,i){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:r,delay:n,easing:i}),!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())},n=0,i=this._storage.length;nWu||Math.abs(t.dy)>Wu)){var r=this.seriesModel.getData().tree.root;if(!r)return;var n=r.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(t){var r=t.originX,n=t.originY,i=t.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new Tt(s.x,s.y,s.width,s.height),u=null,v=this._controllerHost;u=v.zoomLimit;var c=v.zoom=v.zoom||1;if(c*=i,u){var f=u.min||0,h=u.max||1/0;c=Math.max(Math.min(h,c),f)}var p=c/v.zoom;v.zoom=c;var d=this.seriesModel.layoutInfo;r-=d.x,n-=d.y;var g=Zr();Sr(g,g,[-r,-n]),bf(g,g,[p,p]),Sr(g,g,[r,n]),l.applyTransform(g),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},e.prototype._initEvents=function(t){var r=this;t.on("click",function(n){if(r._state==="ready"){var i=r.seriesModel.get("nodeClick",!0);if(i){var o=r.findTarget(n.offsetX,n.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)r._rootToNode(o);else if(i==="zoomToNode")r._zoomToNode(o);else if(i==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),v=l.get("target",!0)||"blank";u&&pn(u,v)}}}}},this)},e.prototype._renderBreadcrumb=function(t,r,n){var i=this;n||(n=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(r.getWidth()/2,r.getHeight()/2),n||(n={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new F1(this.group))).render(t,r,n.node,function(o){i._state!=="animating"&&(Gs(t.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Qr(),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 n,i=this.seriesModel.getViewRoot();return i.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(t,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)n={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),n},e.type="treemap",e}(kt);function Qr(){return{nodeGroup:[],background:[],content:[]}}function K1(a,e,t,r,n,i,o,s,l,u){if(!o)return;var v=o.getLayout(),c=a.getData(),f=o.getModel();if(c.setItemGraphicEl(o.dataIndex,null),!v||!v.isInView)return;var h=v.width,p=v.height,d=v.borderWidth,g=v.invisible,y=o.getRawIndex(),S=s&&s.getRawIndex(),m=o.viewChildren,x=v.upperHeight,b=m&&m.length,_=f.getModel("itemStyle"),w=f.getModel(["emphasis","itemStyle"]),A=f.getModel(["blur","itemStyle"]),T=f.getModel(["select","itemStyle"]),C=_.get("borderRadius")||0,L=O("nodeGroup",ko);if(!L)return;if(l.add(L),L.x=v.x||0,L.y=v.y||0,L.markRedraw(),Tn(L).nodeWidth=h,Tn(L).nodeHeight=p,v.isAboveViewRoot)return L;var M=O("background",Hu,u,Z1);M&&H(L,M,b&&v.upperLabelHeight);var I=f.getModel("emphasis"),P=I.get("focus"),E=I.get("blurScope"),R=I.get("disabled"),k=P==="ancestor"?o.getAncestorsIndices():P==="descendant"?o.getDescendantIndices():P;if(b)Dl(L)&&ra(L,!1),M&&(ra(M,!R),c.setItemGraphicEl(o.dataIndex,M),Ll(M,k,E));else{var N=O("content",Hu,u,X1);N&&X(L,N),M.disableMorphing=!0,M&&Dl(M)&&ra(M,!1),ra(L,!R),c.setItemGraphicEl(o.dataIndex,L);var F=f.getShallow("cursor");F&&N.attr("cursor",F),Ll(L,k,E)}return L;function H(Y,W,Q){var et=ht(W);if(et.dataIndex=o.dataIndex,et.seriesIndex=a.seriesIndex,W.setShape({x:0,y:0,width:h,height:p,r:C}),g)j(W);else{W.invisible=!1;var B=o.getVisual("style"),ct=B.stroke,vt=Yu(_);vt.fill=ct;var ft=lr(w);ft.fill=w.get("borderColor");var _t=lr(A);_t.fill=A.get("borderColor");var Vt=lr(T);if(Vt.fill=T.get("borderColor"),Q){var ie=h-2*d;rt(W,ct,B.opacity,{x:d,y:0,width:ie,height:x})}else W.removeTextContent();W.setStyle(vt),W.ensureState("emphasis").style=ft,W.ensureState("blur").style=_t,W.ensureState("select").style=Vt,Br(W)}Y.add(W)}function X(Y,W){var Q=ht(W);Q.dataIndex=o.dataIndex,Q.seriesIndex=a.seriesIndex;var et=Math.max(h-2*d,0),B=Math.max(p-2*d,0);if(W.culling=!0,W.setShape({x:d,y:d,width:et,height:B,r:C}),g)j(W);else{W.invisible=!1;var ct=o.getVisual("style"),vt=ct.fill,ft=Yu(_);ft.fill=vt,ft.decal=ct.decal;var _t=lr(w),Vt=lr(A),ie=lr(T);rt(W,vt,ct.opacity,null),W.setStyle(ft),W.ensureState("emphasis").style=_t,W.ensureState("blur").style=Vt,W.ensureState("select").style=ie,Br(W)}Y.add(W)}function j(Y){!Y.invisible&&i.push(Y)}function rt(Y,W,Q,et){var B=f.getModel(et?$u:Uu),ct=ze(f.get("name"),null),vt=B.getShallow("show");ue(Y,Qt(f,et?$u:Uu),{defaultText:vt?ct:null,inheritColor:W,defaultOpacity:Q,labelFetcher:a,labelDataIndex:o.dataIndex});var ft=Y.getTextContent();if(ft){var _t=ft.style,Vt=Cg(_t.padding||0);et&&(Y.setTextConfig({layoutRect:et}),ft.disableLabelLayout=!0),ft.beforeUpdate=function(){var ee=Math.max((et?et.width:Y.shape.width)-Vt[1]-Vt[3],0),rr=Math.max((et?et.height:Y.shape.height)-Vt[0]-Vt[2],0);(_t.width!==ee||_t.height!==rr)&&ft.setStyle({width:ee,height:rr})},_t.truncateMinChar=2,_t.lineOverflow="truncate",tt(_t,et,v);var ie=ft.getState("emphasis");tt(ie?ie.style:null,et,v)}}function tt(Y,W,Q){var et=Y?Y.text:null;if(!W&&Q.isLeafRoot&&et!=null){var B=a.get("drillDownIcon",!0);Y.text=B?B+" "+et:et}}function O(Y,W,Q,et){var B=S!=null&&t[Y][S],ct=n[Y];return B?(t[Y][S]=null,G(ct,B)):g||(B=new W,B instanceof xr&&(B.z2=j1(Q,et)),J(ct,B)),e[Y][y]=B}function G(Y,W){var Q=Y[y]={};W instanceof ko?(Q.oldX=W.x,Q.oldY=W.y):Q.oldShape=K({},W.shape)}function J(Y,W){var Q=Y[y]={},et=o.parentNode,B=W instanceof nt;if(et&&(!r||r.direction==="drillDown")){var ct=0,vt=0,ft=n.background[et.getRawIndex()];!r&&ft&&ft.oldShape&&(ct=ft.oldShape.width,vt=ft.oldShape.height),B?(Q.oldX=0,Q.oldY=vt):Q.oldShape={x:ct,y:vt,width:0,height:0}}Q.fadein=!B}}function j1(a,e){return a*Y1+e}var _a=D,J1=Zt,Cn=-1,Ot=function(){function a(e){var t=e.mappingMethod,r=e.type,n=this.option=pt(e);this.type=r,this.mappingMethod=t,this._normalizeData=eS[t];var i=a.visualHandlers[r];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[t],t==="piecewise"?(Ei(n),Q1(n)):t==="category"?n.categories?tS(n):Ei(n,!0):(da(t!=="linear"||n.dataExtent),Ei(n))}return a.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},a.prototype.getNormalizer=function(){return at(this._normalizeData,this)},a.listVisualTypes=function(){return Mt(a.visualHandlers)},a.isValidType=function(e){return a.visualHandlers.hasOwnProperty(e)},a.eachVisual=function(e,t,r){Zt(e)?D(e,t,r):t.call(r,e)},a.mapVisual=function(e,t,r){var n,i=q(e)?[]:Zt(e)?{}:(n=!0,null);return a.eachVisual(e,function(o,s){var l=t.call(r,o,s);n?i=l:i[s]=l}),i},a.retrieveVisuals=function(e){var t={},r;return e&&_a(a.visualHandlers,function(n,i){e.hasOwnProperty(i)&&(t[i]=e[i],r=!0)}),r?t:null},a.prepareVisualTypes=function(e){if(q(e))e=e.slice();else if(J1(e)){var t=[];_a(e,function(r,n){t.push(n)}),e=t}else return[];return e.sort(function(r,n){return n==="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 n,i=1/0,o=0,s=t.length;o=0;i--)r[i]==null&&(delete t[e[i]],e.pop())}function Ei(a,e){var t=a.visual,r=[];Zt(t)?_a(t,function(i){r.push(i)}):t!=null&&r.push(t);var n={color:1,symbol:1};!e&&r.length===1&&!n.hasOwnProperty(a.type)&&(r[1]=r[0]),kh(a,r)}function Ya(a){return{applyVisual:function(e,t,r){var n=this.mapValueToVisual(e);r("color",a(t("color"),n))},_normalizedToVisual:Vo([0,1])}}function Zu(a){var e=this.option.visual;return e[Math.round(Nt(a,[0,1],[0,e.length-1],!0))]||{}}function ta(a){return function(e,t,r){r(a,this.mapValueToVisual(e))}}function ia(a){var e=this.option.visual;return e[this.option.loop&&a!==Cn?a%e.length:a]}function ur(){return this.option.visual[0]}function Vo(a){return{linear:function(e){return Nt(e,a,this.option.visual,!0)},category:ia,piecewise:function(e,t){var r=No.call(this,t);return r==null&&(r=Nt(e,a,this.option.visual,!0)),r},fixed:ur}}function No(a){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var r=Ot.findPieceIndex(a,t),n=t[r];if(n&&n.visual)return n.visual[this.type]}}function kh(a,e){return a.visual=e,a.type==="color"&&(a.parsedVisual=$(e,function(t){var r=Dg(t);return r||[0,0,0,1]})),e}var eS={linear:function(a){return Nt(a,this.option.dataExtent,[0,1],!0)},piecewise:function(a){var e=this.option.pieceList,t=Ot.findPieceIndex(a,e,!0);if(t!=null)return Nt(t,[0,e.length-1],[0,1],!0)},category:function(a){var e=this.option.categories?this.option.categoryMap[a]:a;return e??Cn},fixed:yr};function Za(a,e,t){return a?e<=t:e=t.length||d===t[d.depth]){var y=sS(n,l,d,g,p,r);Nh(d,y,t,r)}})}}}function nS(a,e,t){var r=K({},e),n=t.designatedVisualItemStyle;return D(["color","colorAlpha","colorSaturation"],function(i){n[i]=e[i];var o=a.get(i);n[i]=null,o!=null&&(r[i]=o)}),r}function Xu(a){var e=Ri(a,"color");if(e){var t=Ri(a,"colorAlpha"),r=Ri(a,"colorSaturation");return r&&(e=la(e,null,null,r)),t&&(e=dn(e,t)),e}}function iS(a,e){return e!=null?la(e,null,null,a):null}function Ri(a,e){var t=a[e];if(t!=null&&t!=="none")return t}function oS(a,e,t,r,n,i){if(!(!i||!i.length)){var o=ki(e,"color")||n.color!=null&&n.color!=="none"&&(ki(e,"colorAlpha")||ki(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&su[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 f=new Ot(c);return Vh(f).drColorMappingBy=v,f}}}function ki(a,e){var t=a.get(e);return q(t)&&t.length?{name:e,range:t}:null}function sS(a,e,t,r,n,i){var o=K({},e);if(n){var s=n.type,l=s==="color"&&Vh(n).drColorMappingBy,u=l==="index"?r:l==="id"?i.mapIdToIndex(t.getId()):t.getValue(a.get("visualDimension"));o[s]=n.mapValueToVisual(u)}return o}var wa=Math.max,Dn=Math.min,qu=se,Os=D,zh=["itemStyle","borderWidth"],lS=["itemStyle","gapWidth"],uS=["upperLabel","show"],vS=["upperLabel","height"];const cS={seriesType:"treemap",reset:function(a,e,t,r){var n=t.getWidth(),i=t.getHeight(),o=a.option,s=fe(a.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=o.size||[],u=U(qu(s.width,l[0]),n),v=U(qu(s.height,l[1]),i),c=r&&r.type,f=["treemapZoomToNode","treemapRootToNode"],h=ba(r,f,a),p=c==="treemapRender"||c==="treemapMove"?r.rootRect:null,d=a.getViewRoot(),g=Ph(d);if(c!=="treemapMove"){var y=c==="treemapZoomToNode"?yS(a,h,d,u,v):p?[p.width,p.height]:[u,v],S=o.sort;S&&S!=="asc"&&S!=="desc"&&(S="desc");var m={squareRatio:o.squareRatio,sort:S,leafDepth:o.leafDepth};d.hostTree.clearLayouts();var x={x:0,y:0,width:y[0],height:y[1],area:y[0]*y[1]};d.setLayout(x),Gh(d,m,!1,0),x=d.getLayout(),Os(g,function(_,w){var A=(g[w+1]||d).getValue();_.setLayout(K({dataExtent:[A,A],borderWidth:0,upperHeight:0},x))})}var b=a.getData().tree.root;b.setLayout(mS(s,p,h),!0),a.setLayoutInfo(s),Oh(b,new Tt(-s.x,-s.y,n,i),g,d,0)}};function Gh(a,e,t,r){var n,i;if(!a.isRemoved()){var o=a.getLayout();n=o.width,i=o.height;var s=a.getModel(),l=s.get(zh),u=s.get(lS)/2,v=Bh(s),c=Math.max(l,v),f=l-u,h=c-u;a.setLayout({borderWidth:l,upperHeight:c,upperLabelHeight:v},!0),n=wa(n-2*f,0),i=wa(i-f-h,0);var p=n*i,d=fS(a,s,p,e,t,r);if(d.length){var g={x:f,y:h,width:n,height:i},y=Dn(n,i),S=1/0,m=[];m.area=0;for(var x=0,b=d.length;x=0;l--){var u=n[r==="asc"?o-l-1:l].getValue();u/t*es[1]&&(s[1]=u)})),{sum:r,dataExtent:s}}function gS(a,e,t){for(var r=0,n=1/0,i=0,o=void 0,s=a.length;ir&&(r=o));var l=a.area*a.area,u=e*e*t;return l?wa(u*r/l,l/(u*n)):1/0}function Ku(a,e,t,r,n){var i=e===t.width?0:1,o=1-i,s=["x","y"],l=["width","height"],u=t[s[i]],v=e?a.area/e:0;(n||v>t[l[o]])&&(v=t[l[o]]);for(var c=0,f=a.length;cIl&&(u=Il),i=s}ur&&(r=e);var i=r%2?r+2:r+3;n=[];for(var o=0;o0&&(b[0]=-b[0],b[1]=-b[1]);var w=x[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var A=-Math.atan2(x[1],x[0]);c[0].8?"left":f[0]<-.8?"right":"center",d=f[1]>.8?"top":f[1]<-.8?"bottom":"middle";break;case"start":i.x=-f[0]*y+v[0],i.y=-f[1]*S+v[1],p=f[0]>.8?"right":f[0]<-.8?"left":"center",d=f[1]>.8?"bottom":f[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=y*w+v[0],i.y=v[1]+T,p=x[0]<0?"right":"left",i.originX=-y*w,i.originY=-T;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=_[0],i.y=_[1]+T,p="center",i.originY=-T;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-y*w+c[0],i.y=c[1]+T,p=x[0]>=0?"right":"left",i.originX=y*w,i.originY=-T;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||d,align:i.__align||p})}},e}(nt),Us=function(){function a(e){this.group=new nt,this._LineCtor=e||Ws}return a.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var r=this,n=r.group,i=r._lineData;r._lineData=e,i||n.removeAll();var o=rv(e);e.diff(i).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(i,e,l,s,o)}).remove(function(s){n.remove(i.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=rv(e),this._lineData=null,this.group.removeAll()},a.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function r(s){!s.isGroup&&!NS(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var n=e.start;n0}function rv(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:Qt(e)}}function av(a){return isNaN(a[0])||isNaN(a[1])}function Oi(a){return a&&!av(a[0])&&!av(a[1])}var Bi=[],Fi=[],Hi=[],Dr=If,Wi=Eg,nv=Math.abs;function iv(a,e,t){for(var r=a[0],n=a[1],i=a[2],o=1/0,s,l=t*t,u=.1,v=.1;v<=.9;v+=.1){Bi[0]=Dr(r[0],n[0],i[0],v),Bi[1]=Dr(r[1],n[1],i[1],v);var c=nv(Wi(Bi,e)-l);c=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function Ui(a,e){var t=[],r=Pg,n=[[],[],[]],i=[[],[]],o=[];e/=2,a.eachEdge(function(s,l){var u=s.getLayout(),v=s.getVisual("fromSymbol"),c=s.getVisual("toSymbol");u.__original||(u.__original=[je(u[0]),je(u[1])],u[2]&&u.__original.push(je(u[2])));var f=u.__original;if(u[2]!=null){if(Kt(n[0],f[0]),Kt(n[1],f[2]),Kt(n[2],f[1]),v&&v!=="none"){var h=sa(s.node1),p=iv(n,f[0],h*e);r(n[0][0],n[1][0],n[2][0],p,t),n[0][0]=t[3],n[1][0]=t[4],r(n[0][1],n[1][1],n[2][1],p,t),n[0][1]=t[3],n[1][1]=t[4]}if(c&&c!=="none"){var h=sa(s.node2),p=iv(n,f[1],h*e);r(n[0][0],n[1][0],n[2][0],p,t),n[1][0]=t[1],n[2][0]=t[2],r(n[0][1],n[1][1],n[2][1],p,t),n[1][1]=t[1],n[2][1]=t[2]}Kt(u[0],n[0]),Kt(u[1],n[2]),Kt(u[2],n[1])}else{if(Kt(i[0],f[0]),Kt(i[1],f[1]),Nr(o,i[1],i[0]),Ea(o,o),v&&v!=="none"){var h=sa(s.node1);_o(i[0],i[0],o,h*e)}if(c&&c!=="none"){var h=sa(s.node2);_o(i[1],i[1],o,-h*e)}Kt(u[0],i[0]),Kt(u[1],i[1])}})}function ov(a){return a.type==="view"}var zS=function(a){V(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 n=new Un,i=new Us,o=this.group;this._controller=new Zn(r.getZr()),this._controllerHost={target:o},o.add(n.group),o.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},e.prototype.render=function(t,r,n){var i=this,o=t.coordinateSystem;this._model=t;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(ov(o)){var v={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(v):xt(u,v,t)}Ui(t.getGraph(),oa(t));var c=t.getData();s.updateData(c);var f=t.getEdgeData();l.updateData(f),this._updateNodeAndLinkScale(),this._updateController(t,r,n),clearTimeout(this._layoutTimeout);var h=t.forceLayout,p=t.get(["force","layoutAnimation"]);h&&this._startForceLayoutIteration(h,p);var d=t.get("layout");c.graph.eachNode(function(m){var x=m.dataIndex,b=m.getGraphicEl(),_=m.getModel();if(b){b.off("drag").off("dragend");var w=_.get("draggable");w&&b.on("drag",function(T){switch(d){case"force":h.warmUp(),!i._layouting&&i._startForceLayoutIteration(h,p),h.setFixed(x),c.setItemLayout(x,[b.x,b.y]);break;case"circular":c.setItemLayout(x,[b.x,b.y]),m.setLayout({fixed:!0},!0),Hs(t,"symbolSize",m,[T.offsetX,T.offsetY]),i.updateLayout(t);break;case"none":default:c.setItemLayout(x,[b.x,b.y]),Fs(t.getGraph(),t),i.updateLayout(t);break}}).on("dragend",function(){h&&h.setUnfixed(x)}),b.setDraggable(w,!!_.get("cursor"));var A=_.get(["emphasis","focus"]);A==="adjacency"&&(ht(b).focus=m.getAdjacentDataIndices())}}),c.graph.eachEdge(function(m){var x=m.getGraphicEl(),b=m.getModel().get(["emphasis","focus"]);x&&b==="adjacency"&&(ht(x).focus={edge:[m.dataIndex],node:[m.node1.dataIndex,m.node2.dataIndex]})});var g=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),y=c.getLayout("cx"),S=c.getLayout("cy");c.graph.eachNode(function(m){Uh(m,g,y,S)}),this._firstRender=!1},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,r){var n=this;(function i(){t.step(function(o){n.updateLayout(n._model),(n._layouting=!o)&&(r?n._layoutTimeout=setTimeout(i,16):i())})})()},e.prototype._updateController=function(t,r,n){var i=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,v,c){var f=l.getBoundingRect();return f.applyTransform(l.transform),f.contain(v,c)&&!ei(u,n,t)}),!ov(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){Es(s,u.dx,u.dy),n.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Rs(s,u.scale,u.originX,u.originY),n.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),i._updateNodeAndLinkScale(),Ui(t.getGraph(),oa(t)),i._lineDraw.updateLayout(),n.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,r=t.getData(),n=oa(t);r.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(n)})},e.prototype.updateLayout=function(t){Ui(t.getGraph(),oa(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(kt);function Lr(a){return"_EC_"+a}var GS=function(){function a(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return a.prototype.isDirected=function(){return this._directed},a.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var r=this._nodesMap;if(!r[Lr(e)]){var n=new vr(e,t);return n.hostGraph=this,this.nodes.push(n),r[Lr(e)]=n,n}},a.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},a.prototype.getNodeById=function(e){return this._nodesMap[Lr(e)]},a.prototype.addEdge=function(e,t,r){var n=this._nodesMap,i=this._edgesMap;if(le(e)&&(e=this.nodes[e]),le(t)&&(t=this.nodes[t]),e instanceof vr||(e=n[Lr(e)]),t instanceof vr||(t=n[Lr(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new Yh(e,t,r);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),t.inEdges.push(s)),e.edges.push(s),e!==t&&t.edges.push(s),this.edges.push(s),i[o]=s,s}},a.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},a.prototype.getEdge=function(e,t){e instanceof vr&&(e=e.id),t instanceof vr&&(t=t.id);var r=this._edgesMap;return this._directed?r[e+"-"+t]:r[e+"-"+t]||r[t+"-"+e]},a.prototype.eachNode=function(e,t){for(var r=this.nodes,n=r.length,i=0;i=0&&e.call(t,r[i],i)},a.prototype.eachEdge=function(e,t){for(var r=this.edges,n=r.length,i=0;i=0&&r[i].node1.dataIndex>=0&&r[i].node2.dataIndex>=0&&e.call(t,r[i],i)},a.prototype.breadthFirstTraverse=function(e,t,r,n){if(t instanceof vr||(t=this._nodesMap[Lr(t)]),!!t){for(var i=r==="out"?"outEdges":r==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var i=0,o=n.length;i=0&&this[a][e].setItemVisual(this.dataIndex,t,r)},getVisual:function(t){return this[a][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,r){this.dataIndex>=0&&this[a][e].setItemLayout(this.dataIndex,t,r)},getLayout:function(){return this[a][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[a][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[a][e].getRawIndex(this.dataIndex)}}}Ce(vr,Zh("hostGraph","data"));Ce(Yh,Zh("hostGraph","edgeData"));function Xh(a,e,t,r,n){for(var i=new GS(r),o=0;o "+f)),u++)}var h=t.get("coordinateSystem"),p;if(h==="cartesian2d"||h==="polar")p=$r(a,t);else{var d=Mf.get(h),g=d?d.dimensions||[]:[];Pt(g,"value")<0&&g.concat(["value"]);var y=Hn(a,{coordDimensions:g,encodeDefine:t.getEncode()}).dimensions;p=new re(y,t),p.initData(a)}var S=new re(["value"],t);return S.initData(l,s),n&&n(p,S),Ih({mainData:p,struct:i,structAttr:"graph",datas:{node:p,edge:S},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var OS=function(a){V(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 n(){return r._categoriesData}this.legendVisualProvider=new za(n,n),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),La(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,r){var n=t.edges||t.links||[],i=t.data||t.nodes||[],o=this;if(i&&n){TS(this);var s=Xh(i,n,this,!0,l);return D(s.edges,function(u){CS(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=ce.prototype.getModel;function f(p,d){var g=c.call(this,p,d);return g.resolveParentPath=h,g}v.wrapMethod("getItemModel",function(p){return p.resolveParentPath=h,p.getModel=f,p});function h(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,n){if(n==="edge"){var i=this.getData(),o=this.getDataParams(t,n),s=i.graph.getEdgeByIndex(t),l=i.getName(s.node1.dataIndex),u=i.getName(s.node2.dataIndex),v=[];return l!=null&&v.push(l),u!=null&&v.push(u),ne("nameValue",{name:v.join(" > "),value:o.value,noValue:o.value==null})}var c=Rg({series:this,dataIndex:t,multipleSeries:r});return c},e.prototype._updateCategoriesData=function(){var t=$(this.option.categories||[],function(n){return n.value!=null?n:K({value:0},n)}),r=new re(["value"],this);r.initData(t),this._categoriesData=r,this._categoriesModels=r.mapArray(function(n){return r.getItemModel(n)})},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}(Ft),BS={type:"graphRoam",event:"graphRoam",update:"none"};function FS(a){a.registerChartView(zS),a.registerSeriesModel(OS),a.registerProcessor(xS),a.registerVisual(bS),a.registerVisual(_S),a.registerLayout(DS),a.registerLayout(a.PRIORITY.VISUAL.POST_CHART_LAYOUT,IS),a.registerLayout(PS),a.registerCoordinateSystem("graphView",{dimensions:Ga.dimensions,create:RS}),a.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},yr),a.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},yr),a.registerAction(BS,function(e,t,r){t.eachComponent({mainType:"series",query:e},function(n){var i=n.coordinateSystem,o=Vs(i,e,void 0,r);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}var HS=function(){function a(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return a}(),WS=function(a){V(e,a);function e(t){var r=a.call(this,t)||this;return r.type="pointer",r}return e.prototype.getDefaultShape=function(){return new HS},e.prototype.buildPath=function(t,r){var n=Math.cos,i=Math.sin,o=r.r,s=r.width,l=r.angle,u=r.x-n(l)*s*(s>=o/3?1:2),v=r.y-i(l)*s*(s>=o/3?1:2);l=r.angle-Math.PI/2,t.moveTo(u,v),t.lineTo(r.x+n(l)*s,r.y+i(l)*s),t.lineTo(r.x+n(r.angle)*o,r.y+i(r.angle)*o),t.lineTo(r.x-n(l)*s,r.y-i(l)*s),t.lineTo(u,v)},e}(Wt);function US(a,e){var t=a.get("center"),r=e.getWidth(),n=e.getHeight(),i=Math.min(r,n),o=U(t[0],e.getWidth()),s=U(t[1],e.getHeight()),l=U(a.get("radius"),i/2);return{cx:o,cy:s,r:l}}function qa(a,e){var t=a==null?"":a+"";return e&&(lt(e)?t=e.replace("{value}",t):gt(e)&&(t=e(a))),t}var $S=function(a){V(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,n){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),o=US(t,n);this._renderMain(t,r,n,i,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,r,n,i,o){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"),f=c.get("roundCap"),h=f?Pl:Be,p=c.get("show"),d=c.getModel("lineStyle"),g=d.get("width"),y=[u,v];yf(y,!l),u=y[0],v=y[1];for(var S=v-u,m=u,x=[],b=0;p&&b=T&&(C===0?0:i[C-1][0])Math.PI/2&&(tt+=Math.PI)):rt==="tangential"?tt=-A-Math.PI/2:le(rt)&&(tt=rt*Math.PI/180),tt===0?c.add(new St({style:At(m,{text:F,x:X,y:j,verticalAlign:E<-.8?"top":E>.8?"bottom":"middle",align:P<-.4?"left":P>.4?"right":"center"},{inheritColor:H}),silent:!0})):c.add(new St({style:At(m,{text:F,x:X,y:j,verticalAlign:"middle",align:"center"},{inheritColor:H}),silent:!0,originX:X,originY:j,rotation:tt}))}if(S.get("show")&&R!==x){var k=S.get("distance");k=k?k+v:v;for(var O=0;O<=b;O++){P=Math.cos(A),E=Math.sin(A);var G=new _e({shape:{x1:P*(p-k)+f,y1:E*(p-k)+h,x2:P*(p-w-k)+f,y2:E*(p-w-k)+h},silent:!0,style:M});M.stroke==="auto"&&G.setStyle({stroke:i((R+O/b)/x)}),c.add(G),A+=C}A-=C}else A+=T}},e.prototype._renderPointer=function(t,r,n,i,o,s,l,u,v){var c=this.group,f=this._data,h=this._progressEls,p=[],d=t.get(["pointer","show"]),g=t.getModel("progress"),y=g.get("show"),S=t.getData(),m=S.mapDimension("value"),x=+t.get("min"),b=+t.get("max"),_=[x,b],w=[s,l];function A(C,L){var M=S.getItemModel(C),I=M.getModel("pointer"),P=U(I.get("width"),o.r),E=U(I.get("length"),o.r),R=t.get(["pointer","icon"]),k=I.get("offsetCenter"),N=U(k[0],o.r),F=U(k[1],o.r),H=I.get("keepAspect"),X;return R?X=ve(R,N-P/2,F-E,P,E,null,H):X=new WS({shape:{angle:-Math.PI/2,width:P,r:E,x:N,y:F}}),X.rotation=-(L+Math.PI/2),X.x=o.cx,X.y=o.cy,X}function T(C,L){var M=g.get("roundCap"),I=M?Pl:Be,P=g.get("overlap"),E=P?g.get("width"):v/S.count(),R=P?o.r-E:o.r-(C+1)*E,k=P?o.r:o.r-C*E,N=new I({shape:{startAngle:s,endAngle:L,cx:o.cx,cy:o.cy,clockwise:u,r0:R,r:k}});return P&&(N.z2=Nt(S.get(m,C),[x,b],[100,0],!0)),N}(y||d)&&(S.diff(f).add(function(C){var L=S.get(m,C);if(d){var M=A(C,s);Ut(M,{rotation:-((isNaN(+L)?w[0]:Nt(L,_,w,!0))+Math.PI/2)},t),c.add(M),S.setItemGraphicEl(C,M)}if(y){var I=T(C,s),P=g.get("clip");Ut(I,{shape:{endAngle:Nt(L,_,w,P)}},t),c.add(I),El(t.seriesIndex,S.dataType,C,I),p[C]=I}}).update(function(C,L){var M=S.get(m,C);if(d){var I=f.getItemGraphicEl(L),P=I?I.rotation:s,E=A(C,P);E.rotation=P,xt(E,{rotation:-((isNaN(+M)?w[0]:Nt(M,_,w,!0))+Math.PI/2)},t),c.add(E),S.setItemGraphicEl(C,E)}if(y){var R=h[L],k=R?R.shape.endAngle:s,N=T(C,k),F=g.get("clip");xt(N,{shape:{endAngle:Nt(M,_,w,F)}},t),c.add(N),El(t.seriesIndex,S.dataType,C,N),p[C]=N}}).execute(),S.each(function(C){var L=S.getItemModel(C),M=L.getModel("emphasis"),I=M.get("focus"),P=M.get("blurScope"),E=M.get("disabled");if(d){var R=S.getItemGraphicEl(C),k=S.getItemVisual(C,"style"),N=k.fill;if(R instanceof Re){var F=R.style;R.useStyle(K({image:F.image,x:F.x,y:F.y,width:F.width,height:F.height},k))}else R.useStyle(k),R.type!=="pointer"&&R.setColor(N);R.setStyle(L.getModel(["pointer","itemStyle"]).getItemStyle()),R.style.fill==="auto"&&R.setStyle("fill",i(Nt(S.get(m,C),_,[0,1],!0))),R.z2EmphasisLift=0,ae(R,L),Et(R,I,P,E)}if(y){var H=p[C];H.useStyle(S.getItemVisual(C,"style")),H.setStyle(L.getModel(["progress","itemStyle"]).getItemStyle()),H.z2EmphasisLift=0,ae(H,L),Et(H,I,P,E)}}),this._progressEls=p)},e.prototype._renderAnchor=function(t,r){var n=t.getModel("anchor"),i=n.get("show");if(i){var o=n.get("size"),s=n.get("icon"),l=n.get("offsetCenter"),u=n.get("keepAspect"),v=ve(s,r.cx-o/2+U(l[0],r.r),r.cy-o/2+U(l[1],r.r),o,o,null,u);v.z2=n.get("showAbove")?1:0,v.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(v)}},e.prototype._renderTitleAndDetail=function(t,r,n,i,o){var s=this,l=t.getData(),u=l.mapDimension("value"),v=+t.get("min"),c=+t.get("max"),f=new nt,h=[],p=[],d=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){h[y]=new St({silent:!0}),p[y]=new St({silent:!0})}).update(function(y,S){h[y]=s._titleEls[S],p[y]=s._detailEls[S]}).execute(),l.each(function(y){var S=l.getItemModel(y),m=l.get(u,y),x=new nt,b=i(Nt(m,[v,c],[0,1],!0)),_=S.getModel("title");if(_.get("show")){var w=_.get("offsetCenter"),A=o.cx+U(w[0],o.r),T=o.cy+U(w[1],o.r),C=h[y];C.attr({z2:g?0:2,style:At(_,{x:A,y:T,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:b})}),x.add(C)}var L=S.getModel("detail");if(L.get("show")){var M=L.get("offsetCenter"),I=o.cx+U(M[0],o.r),P=o.cy+U(M[1],o.r),E=U(L.get("width"),o.r),R=U(L.get("height"),o.r),k=t.get(["progress","show"])?l.getItemVisual(y,"style").fill:b,C=p[y],N=L.get("formatter");C.attr({z2:g?0:2,style:At(L,{x:I,y:P,text:qa(m,N),width:isNaN(E)?null:E,height:isNaN(R)?null:R,align:"center",verticalAlign:"middle"},{inheritColor:k})}),kg(C,{normal:L},m,function(H){return qa(H,N)}),d&&cf(C,y,l,t,{getFormattedLabel:function(H,X,j,rt,tt,O){return qa(O?O.interpolatedValue:m,N)}}),x.add(C)}f.add(x)}),this.group.add(f),this._titleEls=h,this._detailEls=p},e.type="gauge",e}(kt),YS=function(a){V(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 Xr(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,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,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}(Ft);function ZS(a){a.registerChartView($S),a.registerSeriesModel(YS)}var XS=["itemStyle","opacity"],qS=function(a){V(e,a);function e(t,r){var n=a.call(this)||this,i=n,o=new Te,s=new St;return i.setTextContent(s),n.setTextGuideLine(o),n.updateData(t,r,!0),n}return e.prototype.updateData=function(t,r,n){var i=this,o=t.hostModel,s=t.getItemModel(r),l=t.getItemLayout(r),u=s.getModel("emphasis"),v=s.get(XS);v=v??1,n||Fe(i),i.useStyle(t.getItemVisual(r,"style")),i.style.lineJoin="round",n?(i.setShape({points:l.points}),i.style.opacity=0,Ut(i,{style:{opacity:v}},o,r)):xt(i,{style:{opacity:v},shape:{points:l.points}},o,r),ae(i,s),this._updateLabel(t,r),Et(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,r){var n=this,i=this.getTextGuideLine(),o=n.getTextContent(),s=t.hostModel,l=t.getItemModel(r),u=t.getItemLayout(r),v=u.label,c=t.getItemVisual(r,"style"),f=c.fill;ue(o,Qt(l),{labelFetcher:t.hostModel,labelDataIndex:r,defaultOpacity:c.opacity,defaultText:t.getName(r)},{normal:{align:v.textAlign,verticalAlign:v.verticalAlign}}),n.setTextConfig({local:!0,inside:!!v.inside,insideStroke:f,outsideFill:f});var h=v.linePoints;i.setShape({points:h}),n.textGuideLineConfig={anchor:h?new mt(h[0][0],h[0][1]):null},xt(o,{style:{x:v.x,y:v.y}},s,r),o.attr({rotation:v.rotation,originX:v.x,originY:v.y,z2:10}),As(n,Ts(l),{stroke:f})},e}(Ae),KS=function(a){V(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,n){var i=t.getData(),o=this._data,s=this.group;i.diff(o).add(function(l){var u=new qS(i,l);i.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var v=o.getItemGraphicEl(u);v.updateData(i,l),s.add(v),i.setItemGraphicEl(l,v)}).remove(function(l){var u=o.getItemGraphicEl(l);mf(u,t,l)}).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(kt),jS=function(a){V(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 za(at(this.getData,this),at(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,r){return Xr(this,{coordDimensions:["value"],encodeDefaulter:st(us,this)})},e.prototype._defaultLabelLine=function(t){La(t,"labelLine",["show"]);var r=t.labelLine,n=t.emphasis.labelLine;r.show=r.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var r=this.getData(),n=a.prototype.getDataParams.call(this,t),i=r.mapDimension("value"),o=r.getSum(i);return n.percent=o?+(r.get(i,t)/o*100).toFixed(2):0,n.$vars.push("percent"),n},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}(Ft);function JS(a,e){return fe(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function QS(a,e){for(var t=a.mapDimension("value"),r=a.mapArray(t,function(l){return l}),n=[],i=e==="ascending",o=0,s=a.count();odx)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([a.offsetX,a.offsetY]);n.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(a){if(!(this._mouseDownPoint||!Yi(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 Yi(a,e){var t=a._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}var mx=function(a){V(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&&Ct(r,t,!0),this._initDimensions()},e.prototype.contains=function(t,r){var n=t.get("parallelIndex");return n!=null&&r.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(t){D(["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=[],n=Gt(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(i){return(i.get("parallelIndex")||0)===this.componentIndex},this);D(n,function(i){t.push("dim"+i.get("dim")),r.push(i.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(Xt),Sx=function(a){V(e,a);function e(t,r,n,i,o){var s=a.call(this,t,r,n)||this;return s.type=i||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(ke),Zi=D,Kh=Math.min,jh=Math.max,uv=Math.floor,xx=Math.ceil,vv=ds,bx=Math.PI,_x=function(){function a(e,t,r){this.type="parallel",this._axesMap=ut(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,r)}return a.prototype._init=function(e,t,r){var n=e.dimensions,i=e.parallelAxisIndex;Zi(n,function(o,s){var l=i[s],u=t.getComponent("parallelAxis",l),v=this._axesMap.set(o,new Sx(o,gs(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,n=t.layoutBase,i=t.pixelDimIndex,o=e[1-i],s=e[i];return o>=r&&o<=r+t.axisLength&&s>=n&&s<=n+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 n=r.getData();Zi(this.dimensions,function(i){var o=this._axesMap.get(i);o.scale.unionExtentFromData(n,n.mapDimension(i)),gn(o.scale,o.model)},this)}},this)},a.prototype.resize=function(e,t){this._rect=fe(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"],n=["width","height"],i=e.get("layout"),o=i==="horizontal"?0:1,s=t[n[o]],l=[0,s],u=this.dimensions.length,v=Ka(e.get("axisExpandWidth"),l),c=Ka(e.get("axisExpandCount")||0,[0,u]),f=e.get("axisExpandable")&&u>3&&u>c&&c>1&&v>0&&s>0,h=e.get("axisExpandWindow"),p;if(h)p=Ka(h[1]-h[0],l),h[1]=h[0]+p;else{p=Ka(v*(c-1),l);var d=e.get("axisExpandCenter")||uv(u/2);h=[v*d-p/2],h[1]=h[0]+p}var g=(s-p)/(u-c);g<3&&(g=0);var y=[uv(vv(h[0]/v,1))+1,xx(vv(h[1]/v,1))-1],S=g/v*h[0];return{layout:i,pixelDimIndex:o,layoutBase:t[r[o]],layoutLength:s,axisBase:t[r[1-o]],axisLength:t[n[1-o]],axisExpandable:f,axisExpandWidth:v,axisCollapseWidth:g,axisExpandWindow:h,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:S}},a.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,r=this.dimensions,n=this._makeLayoutInfo(),i=n.layout;t.each(function(o){var s=[0,n.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),Zi(r,function(o,s){var l=(n.axisExpandable?Ax:wx)(s,n),u={horizontal:{x:l.position,y:n.axisLength},vertical:{x:0,y:l.position}},v={horizontal:bx/2,vertical:0},c=[u[i].x+e.x,u[i].y+e.y],f=v[i],h=Zr();Yn(h,h,f),Sr(h,h,c),this._axesLayout[o]={position:c,rotation:f,transform:h,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,n){r==null&&(r=0),n==null&&(n=e.count());var i=this._axesMap,o=this.dimensions,s=[],l=[];D(o,function(g){s.push(e.mapDimension(g)),l.push(i.get(g).model)});for(var u=this.hasAxisBrushed(),v=r;vi*(1-c[0])?(u="jump",l=s-i*(1-c[2])):(l=s-i*c[1])>=0&&(l=s-i*(1-c[1]))<=0&&(l=0),l*=t.axisExpandWidth/v,l?ys(l,n,o,"all"):u="none";else{var h=n[1]-n[0],p=o[1]*s/h;n=[jh(0,p-h/2)],n[1]=Kh(o[1],n[0]+h),n[0]=n[1]-h}return{axisExpandWindow:n,behavior:u}},a}();function Ka(a,e){return Kh(jh(a,e[0]),e[1])}function wx(a,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*a,axisNameAvailableWidth:t,axisLabelShow:!0}}function Ax(a,e){var t=e.layoutLength,r=e.axisExpandWidth,n=e.axisCount,i=e.axisCollapseWidth,o=e.winInnerIndices,s,l=i,u=!1,v;return a=0;n--)br(r[n])},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 n=r[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,o=r.length;iIx}function ap(a){var e=a.length-1;return e<0&&(e=0),[a[0],a[e]]}function np(a,e,t,r){var n=new nt;return n.add(new Bt({name:"main",style:qs(t),silent:!0,draggable:!0,cursor:"move",drift:st(hv,a,e,n,["n","s","w","e"]),ondragend:st(wr,e,{isEnd:!0})})),D(r,function(i){n.add(new Bt({name:i.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:st(hv,a,e,n,i),ondragend:st(wr,e,{isEnd:!0})}))}),n}function ip(a,e,t,r){var n=r.brushStyle.lineWidth||0,i=Fr(n,Mx),o=t[0][0],s=t[1][0],l=o-n/2,u=s-n/2,v=t[0][1],c=t[1][1],f=v-i+n/2,h=c-i+n/2,p=v-o,d=c-s,g=p+n,y=d+n;Ve(a,e,"main",o,s,p,d),r.transformable&&(Ve(a,e,"w",l,u,i,y),Ve(a,e,"e",f,u,i,y),Ve(a,e,"n",l,u,g,i),Ve(a,e,"s",l,h,g,i),Ve(a,e,"nw",l,u,i,i),Ve(a,e,"ne",f,u,i,i),Ve(a,e,"sw",l,h,i,i),Ve(a,e,"se",f,h,i,i))}function Ho(a,e){var t=e.__brushOption,r=t.transformable,n=e.childAt(0);n.useStyle(qs(t)),n.attr({silent:!r,cursor:r?"move":"default"}),D([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(i){var o=e.childOfName(i.join("")),s=i.length===1?Wo(a,i[0]):Nx(a,i);o&&o.attr({silent:!r,invisible:!r,cursor:r?Ex[s]+"-resize":null})})}function Ve(a,e,t,r,n,i,o){var s=e.childOfName(t);s&&s.setShape(Gx(Ks(a,e,[[r,n],[r+i,n+o]])))}function qs(a){return ot({strokeNoScale:!0},a.brushStyle)}function op(a,e,t,r){var n=[Ta(a,t),Ta(e,r)],i=[Fr(a,t),Fr(e,r)];return[[n[0],i[0]],[n[1],i[1]]]}function Vx(a){return ua(a.group)}function Wo(a,e){var t={w:"left",e:"right",n:"top",s:"bottom"},r={left:"w",right:"e",top:"n",bottom:"s"},n=Ef(t[e],Vx(a));return r[n]}function Nx(a,e){var t=[Wo(a,e[0]),Wo(a,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function hv(a,e,t,r,n,i){var o=t.__brushOption,s=a.toRectRange(o.range),l=sp(e,n,i);D(r,function(u){var v=Px[u];s[v[0]][v[1]]+=l[v[0]]}),o.range=a.fromRectRange(op(s[0][0],s[1][0],s[0][1],s[1][1])),Ys(e,t),wr(e,{isEnd:!1})}function zx(a,e,t,r){var n=e.__brushOption.range,i=sp(a,t,r);D(n,function(o){o[0]+=i[0],o[1]+=i[1]}),Ys(a,e),wr(a,{isEnd:!1})}function sp(a,e,t){var r=a.group,n=r.transformCoordToLocal(e,t),i=r.transformCoordToLocal(0,0);return[n[0]-i[0],n[1]-i[1]]}function Ks(a,e,t){var r=rp(a,e);return r&&r!==_r?r.clipPath(t,a._transform):pt(t)}function Gx(a){var e=Ta(a[0][0],a[1][0]),t=Ta(a[0][1],a[1][1]),r=Fr(a[0][0],a[1][0]),n=Fr(a[0][1],a[1][1]);return{x:e,y:t,width:r-e,height:n-t}}function Ox(a,e,t){if(!(!a._brushType||Fx(a,e.offsetX,e.offsetY))){var r=a._zr,n=a._covers,i=Xs(a,e,t);if(!a._dragging)for(var o=0;or.getWidth()||t<0||t>r.getHeight()}var ii={lineX:gv(0),lineY:gv(1),rect:{createCover:function(a,e){function t(r){return r}return np({toRectRange:t,fromRectRange:t},a,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(a){var e=ap(a);return op(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(a,e,t,r){ip(a,e,t,r)},updateCommon:Ho,contain:$o},polygon:{createCover:function(a,e){var t=new nt;return t.add(new Te({name:"main",style:qs(e),silent:!0})),t},getCreatingRange:function(a){return a},endCreating:function(a,e){e.remove(e.childAt(0)),e.add(new Ae({name:"main",draggable:!0,drift:st(zx,a,e),ondragend:st(wr,a,{isEnd:!0})}))},updateCoverShape:function(a,e,t,r){e.childAt(0).setShape({points:Ks(a,e,t)})},updateCommon:Ho,contain:$o}};function gv(a){return{createCover:function(e,t){return np({toRectRange:function(r){var n=[r,[0,100]];return a&&n.reverse(),n},fromRectRange:function(r){return r[a]}},e,t,[[["w"],["e"]],[["n"],["s"]]][a])},getCreatingRange:function(e){var t=ap(e),r=Ta(t[0][a],t[1][a]),n=Fr(t[0][a],t[1][a]);return[r,n]},updateCoverShape:function(e,t,r,n){var i,o=rp(e,t);if(o!==_r&&o.getLinearBrushOtherExtent)i=o.getLinearBrushOtherExtent(a);else{var s=e._zr;i=[0,[s.getWidth(),s.getHeight()][1-a]]}var l=[r,i];a&&l.reverse(),ip(e,t,l,n)},updateCommon:Ho,contain:$o}}function up(a){return a=js(a),function(e){return Fg(e,a)}}function vp(a,e){return a=js(a),function(t){var r=e??t,n=r?a.width:a.height,i=r?a.x:a.y;return[i,i+(n||0)]}}function cp(a,e,t){var r=js(a);return function(n,i){return r.contain(i[0],i[1])&&!ei(n,e,t)}}function js(a){return Tt.create(a)}var Hx=["axisLine","axisTickLabel","axisName"],Wx=function(a){V(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 $s(r.getZr())).on("brush",at(this._onBrush,this))},e.prototype.render=function(t,r,n,i){if(!Ux(t,r,i)){this.axisModel=t,this.api=n,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new nt,this.group.add(this._axisGroup),!!t.get("show")){var s=Yx(t,r),l=s.coordinateSystem,u=t.getAreaSelectStyle(),v=u.width,c=t.axis.dim,f=l.getAxisLayout(c),h=K({strokeContainThreshold:v},f),p=new mr(t,h);D(Hx,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(h,u,t,s,v,n),ms(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,r,n,i,o,s){var l=n.axis.getExtent(),u=l[1]-l[0],v=Math.min(30,Math.abs(u)*.1),c=Tt.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:up(c),isTargetByCursor:cp(c,s,i),getLinearBrushOtherExtent:vp(c,0)}]).enableBrush({brushType:"lineX",brushStyle:r,removeOnClick:!0}).updateCovers($x(n))},e.prototype._onBrush=function(t){var r=t.areas,n=this.axisModel,i=n.axis,o=$(r,function(s){return[i.coordToData(s.range[0],!0),i.coordToData(s.range[1],!0)]});(!n.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(te);function Ux(a,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===a}function $x(a){var e=a.axis;return $(a.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function Yx(a,e){return e.getComponent("parallel",a.get("parallelIndex"))}var Zx={type:"axisAreaSelect",event:"axisAreaSelected"};function Xx(a){a.registerAction(Zx,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 qx={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function fp(a){a.registerComponentView(gx),a.registerComponentModel(mx),a.registerCoordinateSystem("parallel",Cx),a.registerPreprocessor(fx),a.registerComponentModel(Bo),a.registerComponentView(Wx),yn(a,"parallel",Bo,qx),Xx(a)}function Kx(a){it(fp),a.registerChartView(nx),a.registerSeriesModel(sx),a.registerVisual(a.PRIORITY.VISUAL.BRUSH,cx)}var jx=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}(),Jx=function(a){V(e,a);function e(t){return a.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new jx},e.prototype.buildPath=function(t,r){var n=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+n,r.y2),t.bezierCurveTo(r.cpx2+n,r.cpy2,r.cpx1+n,r.cpy1,r.x1+n,r.y1)):(t.lineTo(r.x2,r.y2+n),t.bezierCurveTo(r.cpx2,r.cpy2+n,r.cpx1,r.cpy1+n,r.x1,r.y1+n)),t.closePath()},e.prototype.highlight=function(){ga(this)},e.prototype.downplay=function(){ya(this)},e}(Wt),Qx=function(a){V(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,n){var i=this,o=t.getGraph(),s=this.group,l=t.layoutInfo,u=l.width,v=l.height,c=t.getData(),f=t.getData("edge"),h=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(p){var d=new Jx,g=ht(d);g.dataIndex=p.dataIndex,g.seriesIndex=t.seriesIndex,g.dataType="edge";var y=p.getModel(),S=y.getModel("lineStyle"),m=S.get("curveness"),x=p.node1.getLayout(),b=p.node1.getModel(),_=b.get("localX"),w=b.get("localY"),A=p.node2.getLayout(),T=p.node2.getModel(),C=T.get("localX"),L=T.get("localY"),M=p.getLayout(),I,P,E,R,k,N,F,H;d.shape.extent=Math.max(1,M.dy),d.shape.orient=h,h==="vertical"?(I=(_!=null?_*u:x.x)+M.sy,P=(w!=null?w*v:x.y)+x.dy,E=(C!=null?C*u:A.x)+M.ty,R=L!=null?L*v:A.y,k=I,N=P*(1-m)+R*m,F=E,H=P*m+R*(1-m)):(I=(_!=null?_*u:x.x)+x.dx,P=(w!=null?w*v:x.y)+M.sy,E=C!=null?C*u:A.x,R=(L!=null?L*v:A.y)+M.ty,k=I*(1-m)+E*m,N=P,F=I*m+E*(1-m),H=R),d.setShape({x1:I,y1:P,x2:E,y2:R,cpx1:k,cpy1:N,cpx2:F,cpy2:H}),d.useStyle(S.getItemStyle()),yv(d.style,h,p);var X=""+y.get("value"),j=Qt(y,"edgeLabel");ue(d,j,{labelFetcher:{getFormattedLabel:function(O,G,J,Y,W,Q){return t.getFormattedLabel(O,G,"edge",Y,Ur(W,j.normal&&j.normal.get("formatter"),X),Q)}},labelDataIndex:p.dataIndex,defaultText:X}),d.setTextConfig({position:"inside"});var rt=y.getModel("emphasis");ae(d,y,"lineStyle",function(O){var G=O.getItemStyle();return yv(G,h,p),G}),s.add(d),f.setItemGraphicEl(p.dataIndex,d);var tt=rt.get("focus");Et(d,tt==="adjacency"?p.getAdjacentDataIndices():tt==="trajectory"?p.getTrajectoryDataIndices():tt,rt.get("blurScope"),rt.get("disabled"))}),o.eachNode(function(p){var d=p.getLayout(),g=p.getModel(),y=g.get("localX"),S=g.get("localY"),m=g.getModel("emphasis"),x=g.get(["itemStyle","borderRadius"])||0,b=new Bt({shape:{x:y!=null?y*u:d.x,y:S!=null?S*v:d.y,width:d.dx,height:d.dy,r:x},style:g.getModel("itemStyle").getItemStyle(),z2:10});ue(b,Qt(g),{labelFetcher:{getFormattedLabel:function(w,A){return t.getFormattedLabel(w,A,"node")}},labelDataIndex:p.dataIndex,defaultText:p.id}),b.disableLabelAnimation=!0,b.setStyle("fill",p.getVisual("color")),b.setStyle("decal",p.getVisual("style").decal),ae(b,g),s.add(b),c.setItemGraphicEl(p.dataIndex,b),ht(b).dataType="node";var _=m.get("focus");Et(b,_==="adjacency"?p.getAdjacentDataIndices():_==="trajectory"?p.getTrajectoryDataIndices():_,m.get("blurScope"),m.get("disabled"))}),c.eachItemGraphicEl(function(p,d){var g=c.getItemModel(d);g.get("draggable")&&(p.drift=function(y,S){i._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=S,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:c.getRawIndex(d),localX:this.shape.x/u,localY:this.shape.y/v})},p.ondragend=function(){i._focusAdjacencyDisabled=!1},p.draggable=!0,p.cursor="move")}),!this._data&&t.isAnimationEnabled()&&s.setClipPath(tb(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(kt);function yv(a,e,t){switch(a.fill){case"source":a.fill=t.node1.getVisual("color"),a.decal=t.node1.getVisual("style").decal;break;case"target":a.fill=t.node2.getVisual("color"),a.decal=t.node2.getVisual("style").decal;break;case"gradient":var r=t.node1.getVisual("color"),n=t.node2.getVisual("color");lt(r)&<(n)&&(a.fill=new vs(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:r,offset:0},{color:n,offset:1}]))}}function tb(a,e,t){var r=new Bt({shape:{x:a.x-10,y:a.y-10,width:0,height:a.height+20}});return Ut(r,{shape:{width:a.width+20}},e,t),r}var eb=function(a){V(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 n=t.edges||t.links||[],i=t.data||t.nodes||[],o=t.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new ce(o[l],this,r));var u=Xh(i,n,this,!0,v);return u.data;function v(c,f){c.wrapMethod("getItemModel",function(h,p){var d=h.parentModel,g=d.getData().getItemLayout(p);if(g){var y=g.depth,S=d.levelModels[y];S&&(h.parentModel=S)}return h}),f.wrapMethod("getItemModel",function(h,p){var d=h.parentModel,g=d.getGraph().getEdgeByIndex(p),y=g.node1.getLayout();if(y){var S=y.depth,m=d.levelModels[S];m&&(h.parentModel=m)}return h})}},e.prototype.setNodePosition=function(t,r){var n=this.option.data||this.option.nodes,i=n[t];i.localX=r[0],i.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,n){function i(h){return isNaN(h)||h==null}if(n==="edge"){var o=this.getDataParams(t,n),s=o.data,l=o.value,u=s.source+" -- "+s.target;return ne("nameValue",{name:u,value:l,noValue:i(l)})}else{var v=this.getGraph().getNodeByIndex(t),c=v.getLayout().value,f=this.getDataParams(t,n).data.name;return ne("nameValue",{name:f!=null?f+"":null,value:c,noValue:i(c)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,r){var n=a.prototype.getDataParams.call(this,t,r);if(n.value==null&&r==="node"){var i=this.getGraph().getNodeByIndex(t),o=i.getLayout().value;n.value=o}return n},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},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(Ft);function rb(a,e){a.eachSeriesByType("sankey",function(t){var r=t.get("nodeWidth"),n=t.get("nodeGap"),i=ab(t,e);t.layoutInfo=i;var o=i.width,s=i.height,l=t.getGraph(),u=l.nodes,v=l.edges;ib(u);var c=Gt(u,function(d){return d.getLayout().value===0}),f=c.length!==0?0:t.get("layoutIterations"),h=t.get("orient"),p=t.get("nodeAlign");nb(u,v,r,n,o,s,f,h,p)})}function ab(a,e){return fe(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function nb(a,e,t,r,n,i,o,s,l){ob(a,e,t,n,i,s,l),vb(a,e,i,n,r,o,s),Sb(a,s)}function ib(a){D(a,function(e){var t=Je(e.outEdges,Ln),r=Je(e.inEdges,Ln),n=e.getValue()||0,i=Math.max(t,r,n);e.setLayout({value:i},!0)})}function ob(a,e,t,r,n,i,o){for(var s=[],l=[],u=[],v=[],c=0,f=0;f=0;y&&g.depth>h&&(h=g.depth),d.setLayout({depth:y?g.depth:c},!0),i==="vertical"?d.setLayout({dy:t},!0):d.setLayout({dx:t},!0);for(var S=0;Sc-1?h:c-1;o&&o!=="left"&&sb(a,o,i,w);var A=i==="vertical"?(n-t)/w:(r-t)/w;ub(a,A,i)}function hp(a){var e=a.hostGraph.data.getRawDataItem(a.dataIndex);return e.depth!=null&&e.depth>=0}function sb(a,e,t,r){if(e==="right"){for(var n=[],i=a,o=0;i.length;){for(var s=0;s0;i--)l*=.99,hb(s,l,o),Xi(s,n,t,r,o),mb(s,l,o),Xi(s,n,t,r,o)}function cb(a,e){var t=[],r=e==="vertical"?"y":"x",n=wo(a,function(i){return i.getLayout()[r]});return n.keys.sort(function(i,o){return i-o}),D(n.keys,function(i){t.push(n.buckets.get(i))}),t}function fb(a,e,t,r,n,i){var o=1/0;D(a,function(s){var l=s.length,u=0;D(s,function(c){u+=c.getLayout().value});var v=i==="vertical"?(r-(l-1)*n)/u:(t-(l-1)*n)/u;v0&&(s=l.getLayout()[i]+u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),v=l.getLayout()[i]+l.getLayout()[f]+e;var p=n==="vertical"?r:t;if(u=v-e-p,u>0){s=l.getLayout()[i]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),v=s;for(var h=c-2;h>=0;--h)l=o[h],u=l.getLayout()[i]+l.getLayout()[f]+e-v,u>0&&(s=l.getLayout()[i]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),v=l.getLayout()[i]}})}function hb(a,e,t){D(a.slice().reverse(),function(r){D(r,function(n){if(n.outEdges.length){var i=Je(n.outEdges,pb,t)/Je(n.outEdges,Ln);if(isNaN(i)){var o=n.outEdges.length;i=o?Je(n.outEdges,db,t)/o:0}if(t==="vertical"){var s=n.getLayout().x+(i-tr(n,t))*e;n.setLayout({x:s},!0)}else{var l=n.getLayout().y+(i-tr(n,t))*e;n.setLayout({y:l},!0)}}})})}function pb(a,e){return tr(a.node2,e)*a.getValue()}function db(a,e){return tr(a.node2,e)}function gb(a,e){return tr(a.node1,e)*a.getValue()}function yb(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 Ln(a){return a.getValue()}function Je(a,e,t){for(var r=0,n=a.length,i=-1;++io&&(o=l)}),D(r,function(s){var l=new Ot({type:"color",mappingMethod:"linear",dataExtent:[i,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),v=s.getModel().get(["itemStyle","color"]);v!=null?(s.setVisual("color",v),s.setVisual("style",{fill:v})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}n.length&&D(n,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function bb(a){a.registerChartView(Qx),a.registerSeriesModel(eb),a.registerLayout(rb),a.registerVisual(xb),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 pp=function(){function a(){}return a.prototype._hasEncodeRule=function(e){var t=this.getEncode();return t&&t.get(e)!=null},a.prototype.getInitialData=function(e,t){var r,n=t.getComponent("xAxis",this.get("xAxisIndex")),i=t.getComponent("yAxis",this.get("yAxisIndex")),o=n.get("type"),s=i.get("type"),l;o==="category"?(e.layout="horizontal",r=n.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(e.layout="vertical",r=i.getOrdinalMeta(),l=!this._hasEncodeRule("y")):e.layout=e.layout||"horizontal";var u=["x","y"],v=e.layout==="horizontal"?0:1,c=this._baseAxisDim=u[v],f=u[1-v],h=[n,i],p=h[v].get("type"),d=h[1-v].get("type"),g=e.data;if(g&&l){var y=[];D(g,function(x,b){var _;q(x)?(_=x.slice(),x.unshift(b)):q(x.value)?(_=K({},x),_.value=_.value.slice(),x.value.unshift(b)):_=x,y.push(_)}),e.data=y}var S=this.defaultValueDimensions,m=[{name:c,type:Ao(p),ordinalMeta:r,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:f,type:Ao(d),dimsDef:S.slice()}];return Xr(this,{coordDimensions:m,dimensionsCount:S.length+1,encodeDefaulter:st(Hg,m,this)})},a.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},a}(),dp=function(a){V(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}(Ft);Ce(dp,pp,!0);var _b=function(a){V(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,n){var i=t.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=t.get("layout")==="horizontal"?1:0;i.diff(s).add(function(u){if(i.hasValue(u)){var v=i.getItemLayout(u),c=mv(v,i,u,l,!0);i.setItemGraphicEl(u,c),o.add(c)}}).update(function(u,v){var c=s.getItemGraphicEl(v);if(!i.hasValue(u)){o.remove(c);return}var f=i.getItemLayout(u);c?(Fe(c),gp(f,c,i,u)):c=mv(f,i,u,l),o.add(c),i.setItemGraphicEl(u,c)}).remove(function(u){var v=s.getItemGraphicEl(u);v&&o.remove(v)}).execute(),this._data=i},e.prototype.remove=function(t){var r=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(i){i&&r.remove(i)})},e.type="boxplot",e}(kt),wb=function(){function a(){}return a}(),Ab=function(a){V(e,a);function e(t){var r=a.call(this,t)||this;return r.type="boxplotBoxPath",r}return e.prototype.getDefaultShape=function(){return new wb},e.prototype.buildPath=function(t,r){var n=r.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();id){var x=[y,m];r.push(x)}}}return{boxData:t,outliers:r}}var Pb={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==Rf){var r="";It(r)}var n=Mb(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};function Eb(a){a.registerSeriesModel(dp),a.registerChartView(_b),a.registerLayout(Cb),a.registerTransform(Pb)}var Rb=["itemStyle","borderColor"],kb=["itemStyle","borderColor0"],Vb=["itemStyle","borderColorDoji"],Nb=["itemStyle","color"],zb=["itemStyle","color0"];function Js(a,e){return e.get(a>0?Nb:zb)}function Qs(a,e){return e.get(a===0?Vb:a>0?Rb:kb)}var Gb={seriesType:"candlestick",plan:Ss(),performRawSeries:!0,reset:function(a,e){if(!e.isSeriesFiltered(a)){var t=a.pipelineContext.large;return!t&&{progress:function(r,n){for(var i;(i=r.next())!=null;){var o=n.getItemModel(i),s=n.getItemLayout(i).sign,l=o.getItemStyle();l.fill=Js(s,o),l.stroke=Qs(s,o)||l.fill;var u=n.ensureUniqueItemVisual(i,"style");K(u,l)}}}}}},Ob=["color","borderColor"],Bb=function(a){V(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,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,r,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,r,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,r):this._incrementalRenderNormal(t,r)},e.prototype.eachRendered=function(t){qn(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(),n=this._data,i=this.group,o=r.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||i.removeAll(),r.diff(n).add(function(v){if(r.hasValue(v)){var c=r.getItemLayout(v);if(s&&Sv(u,c))return;var f=qi(c,v,!0);Ut(f,{shape:{points:c.ends}},t,v),Ki(f,r,v,o),i.add(f),r.setItemGraphicEl(v,f)}}).update(function(v,c){var f=n.getItemGraphicEl(c);if(!r.hasValue(v)){i.remove(f);return}var h=r.getItemLayout(v);if(s&&Sv(u,h)){i.remove(f);return}f?(xt(f,{shape:{points:h.ends}},t,v),Fe(f)):f=qi(h),Ki(f,r,v,o),i.add(f),r.setItemGraphicEl(v,f)}).remove(function(v){var c=n.getItemGraphicEl(v);c&&i.remove(c)}).execute(),this._data=r},e.prototype._renderLarge=function(t){this._clear(),xv(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 n=r.getData(),i=n.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=n.getItemLayout(o),l=qi(s);Ki(l,n,o,i),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,r){xv(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}(kt),Fb=function(){function a(){}return a}(),Hb=function(a){V(e,a);function e(t){var r=a.call(this,t)||this;return r.type="normalCandlestickBox",r}return e.prototype.getDefaultShape=function(){return new Fb},e.prototype.buildPath=function(t,r){var n=r.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},e}(Wt);function qi(a,e,t){var r=a.ends;return new Hb({shape:{points:t?Wb(r,a):r},z2:100})}function Sv(a,e){for(var t=!0,r=0;rb?L[i]:C[i],ends:P,brushRect:F(_,w,m)})}function k(X,j){var rt=[];return rt[n]=j,rt[i]=X,isNaN(j)||isNaN(X)?[NaN,NaN]:e.dataToPoint(rt)}function N(X,j,rt){var tt=j.slice(),O=j.slice();tt[n]=di(tt[n]+r/2,1,!1),O[n]=di(O[n]-r/2,1,!0),rt?X.push(tt,O):X.push(O,tt)}function F(X,j,rt){var tt=k(X,rt),O=k(j,rt);return tt[n]-=r/2,O[n]-=r/2,{x:tt[0],y:tt[1],width:r,height:O[1]-tt[1]}}function H(X){return X[n]=di(X[n],1),X}}function p(d,g){for(var y=Wg(d.count*4),S=0,m,x=[],b=[],_,w=g.getStore(),A=!!a.get(["itemStyle","borderColorDoji"]);(_=d.next())!=null;){var T=w.get(s,_),C=w.get(u,_),L=w.get(v,_),M=w.get(c,_),I=w.get(f,_);if(isNaN(T)||isNaN(M)||isNaN(I)){y[S++]=NaN,S+=3;continue}y[S++]=bv(w,_,C,L,v,A),x[n]=T,x[i]=M,m=e.dataToPoint(x,null,b),y[S++]=m?m[0]:NaN,y[S++]=m?m[1]:NaN,x[i]=I,m=e.dataToPoint(x,null,b),y[S++]=m?m[1]:NaN}g.setLayout("largePoints",y)}}};function bv(a,e,t,r,n,i){var o;return t>r?o=-1:t0?a.get(n,e-1)<=r?1:-1:1,o}function Zb(a,e){var t=a.getBaseAxis(),r,n=t.type==="category"?t.getBandWidth():(r=t.getExtent(),Math.abs(r[1]-r[0])/e.count()),i=U(Rt(a.get("barMaxWidth"),n),n),o=U(Rt(a.get("barMinWidth"),1),n),s=a.get("barWidth");return s!=null?U(s,n):Math.max(Math.min(n/2,i),o)}function Xb(a){a.registerChartView(Bb),a.registerSeriesModel(yp),a.registerPreprocessor($b),a.registerVisual(Gb),a.registerLayout(Yb)}function _v(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 qb=function(a){V(e,a);function e(t,r){var n=a.call(this)||this,i=new Cf(t,r),o=new nt;return n.add(i),n.add(o),n.updateData(t,r),n}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var r=t.symbolType,n=t.color,i=t.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(i)/v*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){i.stopAnimation();var f=void 0;gt(c)?f=c(n):f=c,i.__t>0&&(f=-s*i.__t),this._animateSymbol(i,s,f,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(t,r,n,i,o){if(r>0){t.__t=0;var s=this,l=t.animate("",i).when(o?r*2:r,{__t:o?2:1}).delay(n).during(function(){s._updateSymbolPosition(t)});i||l.done(function(){s.remove(t)}),l.start()}},e.prototype._getLineLength=function(t){return dr(t.__p1,t.__cp1)+dr(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,n){this.childAt(0).updateData(t,r,n),this._updateEffectSymbol(t,r)},e.prototype._updateSymbolPosition=function(t){var r=t.__p1,n=t.__p2,i=t.__cp1,o=t.__t<1?t.__t:2-t.__t,s=[t.x,t.y],l=s.slice(),u=If,v=$g;s[0]=u(r[0],i[0],n[0],o),s[1]=u(r[1],i[1],n[1],o);var c=t.__t<1?v(r[0],i[0],n[0],o):v(n[0],i[0],r[0],1-o),f=t.__t<1?v(r[1],i[1],n[1],o):v(n[1],i[1],r[1],1-o);t.rotation=-Math.atan2(f,c)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT=0&&!(i[l]<=r);l--);l=Math.min(l,o-2)}else{for(l=s;lr);l++);l=Math.min(l-1,o-2)}var v=(r-i[l])/(i[l+1]-i[l]),c=n[l],f=n[l+1];t.x=c[0]*(1-v)+v*f[0],t.y=c[1]*(1-v)+v*f[1];var h=t.__t<1?f[0]-c[0]:c[0]-f[0],p=t.__t<1?f[1]-c[1]:c[1]-f[1];t.rotation=-Math.atan2(p,h)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=r,t.ignore=!1}},e}(mp),t_=function(){function a(){this.polyline=!1,this.curveness=0,this.segs=[]}return a}(),e_=function(a){V(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 t_},e.prototype.buildPath=function(t,r){var n=r.segs,i=r.curveness,o;if(r.polyline)for(o=this._off;o0){t.moveTo(n[o++],n[o++]);for(var l=1;l0){var h=(u+c)/2-(v-f)*i,p=(v+f)/2-(c-u)*i;t.quadraticCurveTo(h,p,c,f)}else t.lineTo(c,f)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,r){var n=this.shape,i=n.segs,o=n.curveness,s=this.style.lineWidth;if(n.polyline)for(var l=0,u=0;u0)for(var c=i[u++],f=i[u++],h=1;h0){var g=(c+p)/2-(f-d)*o,y=(f+d)/2-(p-c)*o;if(Yg(c,f,g,y,p,d,s,t,r))return l}else if(Rl(c,f,p,d,s,t,r))return l;l++}return-1},e.prototype.contain=function(t,r){var n=this.transformCoordToLocal(t,r),i=this.getBoundingRect();if(t=n[0],r=n[1],i.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,n=r.segs,i=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+e.__startIndex)})},a.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},a}(),xp={seriesType:"lines",plan:Ss(),reset:function(a){var e=a.coordinateSystem;if(e){var t=a.get("polyline"),r=a.pipelineContext.large;return{progress:function(n,i){var o=[];if(r){var s=void 0,l=n.end-n.start;if(t){for(var u=0,v=n.start;v0&&(v||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(i);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,n){var i=t.getData(),o=this._updateLineDraw(i,t);o.incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},e.prototype.incrementalRender=function(t,r,n){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,n){var i=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=xp.reset(t,r,n);s.progress&&s.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},e.prototype._updateLineDraw=function(t,r){var n=this._lineDraw,i=this._showEffect(r),o=!!r.get("polyline"),s=r.pipelineContext,l=s.large;return(!n||i!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(n&&n.remove(),n=this._lineDraw=l?new r_:new Us(o?i?Qb:Sp:i?mp:Ws),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=l),this.group.add(n.group),n},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var r=t.getZr(),n=r.painter.getType()==="svg";!n&&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}(kt),n_=typeof Uint32Array>"u"?Array:Uint32Array,i_=typeof Float64Array>"u"?Array:Float64Array;function wv(a){var e=a.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(a.data=$(e,function(t){var r=[t[0].coord,t[1].coord],n={coords:r};return t[0].name&&(n.fromName=t[0].name),t[1].name&&(n.toName=t[1].name),hs([n,t[0],t[1]])}))}var o_=function(a){V(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||[],wv(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(wv(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=fn(this._flatCoords,r.flatCoords),this._flatCoordsOffset=fn(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),n=r.option instanceof Array?r.option:r.getShallow("coords");return n},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 n=this._flatCoordsOffset[t*2],i=this._flatCoordsOffset[t*2+1],o=0;o ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?1e4:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?2e4:this.get("progressiveThreshold"))},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),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}(Ft);function ja(a){return a instanceof Array||(a=[a,a]),a}var s_={seriesType:"lines",reset:function(a){var e=ja(a.get("symbol")),t=ja(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 n(i,o){var s=i.getItemModel(o),l=ja(s.getShallow("symbol",!0)),u=ja(s.getShallow("symbolSize",!0));l[0]&&i.setItemVisual(o,"fromSymbol",l[0]),l[1]&&i.setItemVisual(o,"toSymbol",l[1]),u[0]&&i.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&i.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:r.hasItemOption?n:null}}};function l_(a){a.registerChartView(a_),a.registerSeriesModel(o_),a.registerLayout(xp),a.registerVisual(s_)}var u_=256,v_=function(){function a(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=kl.createCanvas();this.canvas=e}return a.prototype.update=function(e,t,r,n,i,o){var s=this._getBrush(),l=this._getGradient(i,"inRange"),u=this._getGradient(i,"outOfRange"),v=this.pointSize+this.blurSize,c=this.canvas,f=c.getContext("2d"),h=e.length;c.width=t,c.height=r;for(var p=0;p0){var M=o(m)?l:u;m>0&&(m=m*C+A),b[_++]=M[L],b[_++]=M[L+1],b[_++]=M[L+2],b[_++]=M[L+3]*m*256}else _+=4}return f.putImageData(x,0,0),c},a.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=kl.createCanvas()),t=this.pointSize+this.blurSize,r=t*2;e.width=r,e.height=r;var n=e.getContext("2d");return n.clearRect(0,0,r,r),n.shadowOffsetX=r,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-t,t,this.pointSize,0,Math.PI*2,!0),n.closePath(),n.fill(),e},a.prototype._getGradient=function(e,t){for(var r=this._gradientPixels,n=r[t]||(r[t]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,i),n[o++]=i[0],n[o++]=i[1],n[o++]=i[2],n[o++]=i[3];return n},a}();function c_(a,e,t){var r=a[1]-a[0];e=$(e,function(o){return{interval:[(o.interval[0]-a[0])/r,(o.interval[1]-a[0])/r]}});var n=e.length,i=0;return function(o){var s;for(s=i;s=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}return s>=0&&s=e[0]&&r<=e[1]}}function Av(a){var e=a.dimensions;return e[0]==="lng"&&e[1]==="lat"}var h_=function(a){V(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,n){var i;r.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===t&&(i=s)})}),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):Av(o)&&this._renderOnGeo(o,t,i,n)},e.prototype.incrementalPrepareRender=function(t,r,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,r,n,i){var o=r.coordinateSystem;o&&(Av(o)?this.render(r,n,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(r,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){qn(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,r,n,i,o){var s=t.coordinateSystem,l=jn(s,"cartesian2d"),u,v,c,f;if(l){var h=s.getAxis("x"),p=s.getAxis("y");u=h.getBandWidth()+.5,v=p.getBandWidth()+.5,c=h.scale.getExtent(),f=p.scale.getExtent()}for(var d=this.group,g=t.getData(),y=t.getModel(["emphasis","itemStyle"]).getItemStyle(),S=t.getModel(["blur","itemStyle"]).getItemStyle(),m=t.getModel(["select","itemStyle"]).getItemStyle(),x=t.get(["itemStyle","borderRadius"]),b=Qt(t),_=t.getModel("emphasis"),w=_.get("focus"),A=_.get("blurScope"),T=_.get("disabled"),C=l?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],L=n;Lc[1]||Ef[1])continue;var R=s.dataToPoint([P,E]);M=new Bt({shape:{x:R[0]-u/2,y:R[1]-v/2,width:u,height:v},style:I})}else{if(isNaN(g.get(C[1],L)))continue;M=new Bt({z2:1,shape:s.dataToRect([g.get(C[0],L)]).contentShape,style:I})}if(g.hasItemOption){var k=g.getItemModel(L),N=k.getModel("emphasis");y=N.getModel("itemStyle").getItemStyle(),S=k.getModel(["blur","itemStyle"]).getItemStyle(),m=k.getModel(["select","itemStyle"]).getItemStyle(),x=k.get(["itemStyle","borderRadius"]),w=N.get("focus"),A=N.get("blurScope"),T=N.get("disabled"),b=Qt(k)}M.shape.r=x;var F=t.getRawValue(L),H="-";F&&F[2]!=null&&(H=F[2]+""),ue(M,b,{labelFetcher:t,labelDataIndex:L,defaultOpacity:I.opacity,defaultText:H}),M.ensureState("emphasis").style=y,M.ensureState("blur").style=S,M.ensureState("select").style=m,Et(M,w,A,T),M.incremental=o,o&&(M.states.emphasis.hoverLayer=!0),d.add(M),g.setItemGraphicEl(L,M),this._progressiveEls&&this._progressiveEls.push(M)}},e.prototype._renderOnGeo=function(t,r,n,i){var o=n.targetVisuals.inRange,s=n.targetVisuals.outOfRange,l=r.getData(),u=this._hmLayer||this._hmLayer||new v_;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 f=Math.max(v.x,0),h=Math.max(v.y,0),p=Math.min(v.width+v.x,i.getWidth()),d=Math.min(v.height+v.y,i.getHeight()),g=p-f,y=d-h,S=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],m=l.mapArray(S,function(w,A,T){var C=t.dataToPoint([w,A]);return C[0]-=f,C[1]-=h,C.push(T),C}),x=n.getExtent(),b=n.type==="visualMap.continuous"?f_(x,n.option.range):c_(x,n.getPieceList(),n.option.selected);u.update(m,g,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},b);var _=new Re({style:{width:g,height:y,x:f,y:h,image:u.canvas},silent:!0});this.group.add(_)},e.type="heatmap",e}(kt),p_=function(a){V(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 $r(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=Mf.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}(Ft);function d_(a){a.registerChartView(h_),a.registerSeriesModel(p_)}var g_=["itemStyle","borderWidth"],Tv=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Qi=new Ma,y_=function(a){V(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,n){var i=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),v=u.isHorizontal(),c=l.master.getRect(),f={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[c.x,c.x+c.width],[c.y,c.y+c.height]],isHorizontal:v,valueDim:Tv[+v],categoryDim:Tv[1-+v]};o.diff(s).add(function(p){if(o.hasValue(p)){var d=Dv(o,p),g=Cv(o,p,d,f),y=Lv(o,f,g);o.setItemGraphicEl(p,y),i.add(y),Mv(y,f,g)}}).update(function(p,d){var g=s.getItemGraphicEl(d);if(!o.hasValue(p)){i.remove(g);return}var y=Dv(o,p),S=Cv(o,p,y,f),m=Cp(o,S);g&&m!==g.__pictorialShapeStr&&(i.remove(g),o.setItemGraphicEl(p,null),g=null),g?A_(g,f,S):g=Lv(o,f,S,!0),o.setItemGraphicEl(p,g),g.__pictorialSymbolMeta=S,i.add(g),Mv(g,f,S)}).remove(function(p){var d=s.getItemGraphicEl(p);d&&Iv(s,p,d.__pictorialSymbolMeta.animationModel,d)}).execute();var h=t.get("clip",!0)?Kn(t.coordinateSystem,!1,t):null;return h?i.setClipPath(h):i.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(t,r){var n=this.group,i=this._data;t.get("animation")?i&&i.eachItemGraphicEl(function(o){Iv(i,ht(o).dataIndex,t,o)}):n.removeAll()},e.type="pictorialBar",e}(kt);function Cv(a,e,t,r){var n=a.getItemLayout(e),i=t.get("symbolRepeat"),o=t.get("symbolClip"),s=t.get("symbolPosition")||"start",l=t.get("symbolRotate"),u=(l||0)*Math.PI/180||0,v=t.get("symbolPatternSize")||2,c=t.isAnimationEnabled(),f={dataIndex:e,layout:n,itemModel:t,symbolType:a.getItemVisual(e,"symbol")||"circle",style:a.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:i,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:v,rotation:u,animationModel:c?t:null,hoverScale:c&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};m_(t,i,n,r,f),S_(a,e,n,i,o,f.boundingLength,f.pxSign,v,r,f),x_(t,f.symbolScale,u,r,f);var h=f.symbolSize,p=Ra(t.get("symbolOffset"),h);return b_(t,h,n,i,o,p,s,f.valueLineWidth,f.boundingLength,f.repeatCutLength,r,f),f}function m_(a,e,t,r,n){var i=r.valueDim,o=a.get("symbolBoundingData"),s=r.coordSys.getOtherAxis(r.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(t[i.wh]<=0),v;if(q(o)){var c=[to(s,o[0])-l,to(s,o[1])-l];c[1]=0?1:-1:v>0?1:-1}function to(a,e){return a.toGlobalCoord(a.dataToCoord(a.scale.parse(e)))}function S_(a,e,t,r,n,i,o,s,l,u){var v=l.valueDim,c=l.categoryDim,f=Math.abs(t[c.wh]),h=a.getItemVisual(e,"symbolSize"),p;q(h)?p=h.slice():h==null?p=["100%","100%"]:p=[h,h],p[c.index]=U(p[c.index],f),p[v.index]=U(p[v.index],r?f:Math.abs(i)),u.symbolSize=p;var d=u.symbolScale=[p[0]/s,p[1]/s];d[v.index]*=(l.isHorizontal?-1:1)*o}function x_(a,e,t,r,n){var i=a.get(g_)||0;i&&(Qi.attr({scaleX:e[0],scaleY:e[1],rotation:t}),Qi.updateTransform(),i/=Qi.getLineScale(),i*=e[r.valueDim.index]),n.valueLineWidth=i||0}function b_(a,e,t,r,n,i,o,s,l,u,v,c){var f=v.categoryDim,h=v.valueDim,p=c.pxSign,d=Math.max(e[h.index]+s,0),g=d;if(r){var y=Math.abs(l),S=se(a.get("symbolMargin"),"15%")+"",m=!1;S.lastIndexOf("!")===S.length-1&&(m=!0,S=S.slice(0,S.length-1));var x=U(S,e[h.index]),b=Math.max(d+x*2,0),_=m?0:x*2,w=Zg(r),A=w?r:Pv((y+_)/b),T=y-A*d;x=T/2/(m?A:Math.max(A-1,1)),b=d+x*2,_=m?0:x*2,!w&&r!=="fixed"&&(A=u?Pv((Math.abs(u)+_)/b):0),g=A*b-_,c.repeatTimes=A,c.symbolMargin=x}var C=p*(g/2),L=c.pathPosition=[];L[f.index]=t[f.wh]/2,L[h.index]=o==="start"?C:o==="end"?l-C:l/2,i&&(L[0]+=i[0],L[1]+=i[1]);var M=c.bundlePosition=[];M[f.index]=t[f.xy],M[h.index]=t[h.xy];var I=c.barRectShape=K({},t);I[h.wh]=p*Math.max(Math.abs(t[h.wh]),Math.abs(L[h.index]+C)),I[f.wh]=t[f.wh];var P=c.clipShape={};P[f.xy]=-t[f.xy],P[f.wh]=v.ecSize[f.wh],P[h.xy]=0,P[h.wh]=t[h.wh]}function bp(a){var e=a.symbolPatternSize,t=ve(a.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function _p(a,e,t,r){var n=a.__pictorialBundle,i=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,v=0,c=i[e.valueDim.index]+o+t.symbolMargin*2;for(tl(a,function(d){d.__pictorialAnimationIndex=v,d.__pictorialRepeatTimes=u,v0:y<0)&&(S=u-1-d),g[l.index]=c*(S-u/2+.5)+s[l.index],{x:g[0],y:g[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function wp(a,e,t,r){var n=a.__pictorialBundle,i=a.__pictorialMainPath;i?Or(i,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,r):(i=a.__pictorialMainPath=bp(t),n.add(i),Or(i,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:0,scaleY:0,rotation:t.rotation},{scaleX:t.symbolScale[0],scaleY:t.symbolScale[1]},t,r))}function Ap(a,e,t){var r=K({},e.barRectShape),n=a.__pictorialBarRect;n?Or(n,null,{shape:r},e,t):(n=a.__pictorialBarRect=new Bt({z2:2,shape:r,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),n.disableMorphing=!0,a.add(n))}function Tp(a,e,t,r){if(t.symbolClip){var n=a.__pictorialClipPath,i=K({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(n)xt(n,{shape:i},s,l);else{i[o.wh]=0,n=new Bt({shape:i}),a.__pictorialBundle.setClipPath(n),a.__pictorialClipPath=n;var u={};u[o.wh]=t.clipShape[o.wh],Yr[r?"updateProps":"initProps"](n,{shape:u},s,l)}}}function Dv(a,e){var t=a.getItemModel(e);return t.getAnimationDelayParams=__,t.isAnimationEnabled=w_,t}function __(a){return{index:a.__pictorialAnimationIndex,count:a.__pictorialRepeatTimes}}function w_(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function Lv(a,e,t,r){var n=new nt,i=new nt;return n.add(i),n.__pictorialBundle=i,i.x=t.bundlePosition[0],i.y=t.bundlePosition[1],t.symbolRepeat?_p(n,e,t):wp(n,e,t),Ap(n,t,r),Tp(n,e,t,r),n.__pictorialShapeStr=Cp(a,t),n.__pictorialSymbolMeta=t,n}function A_(a,e,t){var r=t.animationModel,n=t.dataIndex,i=a.__pictorialBundle;xt(i,{x:t.bundlePosition[0],y:t.bundlePosition[1]},r,n),t.symbolRepeat?_p(a,e,t,!0):wp(a,e,t,!0),Ap(a,t,!0),Tp(a,e,t,!0)}function Iv(a,e,t,r){var n=r.__pictorialBarRect;n&&n.removeTextContent();var i=[];tl(r,function(o){i.push(o)}),r.__pictorialMainPath&&i.push(r.__pictorialMainPath),r.__pictorialClipPath&&(t=null),D(i,function(o){hn(o,{scaleX:0,scaleY:0},t,e,function(){r.parent&&r.parent.remove(r)})}),a.setItemGraphicEl(e,null)}function Cp(a,e){return[a.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function tl(a,e,t){D(a.__pictorialBundle.children(),function(r){r!==a.__pictorialBarRect&&e.call(t,r)})}function Or(a,e,t,r,n,i){e&&a.attr(e),r.symbolClip&&!n?t&&a.attr(t):t&&Yr[n?"updateProps":"initProps"](a,t,r.animationModel,r.dataIndex,i)}function Mv(a,e,t){var r=t.dataIndex,n=t.itemModel,i=n.getModel("emphasis"),o=i.getModel("itemStyle").getItemStyle(),s=n.getModel(["blur","itemStyle"]).getItemStyle(),l=n.getModel(["select","itemStyle"]).getItemStyle(),u=n.getShallow("cursor"),v=i.get("focus"),c=i.get("blurScope"),f=i.get("scale");tl(a,function(d){if(d instanceof Re){var g=d.style;d.useStyle(K({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,f&&(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 h=e.valueDim.posDesc[+(t.boundingLength>0)],p=a.__pictorialBarRect;p.ignoreClip=!0,ue(p,Qt(n),{labelFetcher:e.seriesModel,labelDataIndex:r,defaultText:To(e.seriesModel.getData(),r),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:h}),Et(a,v,c,i.get("disabled"))}function Pv(a){var e=Math.round(a);return Math.abs(a-e)<1e-4?e:Math.ceil(a)}var T_=function(a){V(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=Jn(Vl.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(Vl);function C_(a){a.registerChartView(y_),a.registerSeriesModel(T_),a.registerLayout(a.PRIORITY.VISUAL.LAYOUT,st(Xg,"pictorialBar")),a.registerLayout(a.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,qg("pictorialBar"))}var D_=function(a){V(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,n){var i=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=i.getLayout("layoutInfo"),v=u.rect,c=u.boundaryGap;s.x=0,s.y=v.y+c[0];function f(g){return g.name}var h=new Qe(this._layersSeries||[],l,f,f),p=[];h.add(at(d,this,"add")).update(at(d,this,"update")).remove(at(d,this,"remove")).execute();function d(g,y,S){var m=o._layers;if(g==="remove"){s.remove(m[y]);return}for(var x=[],b=[],_,w=l[y].indices,A=0;Ai&&(i=s),r.push(s)}for(var u=0;ui&&(i=c)}return{y0:n,max:i}}function E_(a){a.registerChartView(D_),a.registerSeriesModel(I_),a.registerLayout(M_),a.registerProcessor(Na("themeRiver"))}var R_=2,k_=4,Rv=function(a){V(e,a);function e(t,r,n,i){var o=a.call(this)||this;o.z2=R_,o.textConfig={inside:!0},ht(o).seriesIndex=r.seriesIndex;var s=new St({z2:k_,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,r,n,i),o}return e.prototype.updateData=function(t,r,n,i,o){this.node=r,r.piece=this,n=n||this._seriesModel,i=i||this._ecModel;var s=this;ht(s).dataIndex=r.dataIndex;var l=r.getModel(),u=l.getModel("emphasis"),v=r.getLayout(),c=K({},v);c.label=null;var f=r.getVisual("style");f.lineJoin="bevel";var h=r.getVisual("decal");h&&(f.decal=cs(h,o));var p=Vr(l.getModel("itemStyle"),c,!0);K(c,p),D(ha,function(S){var m=s.ensureState(S),x=l.getModel([S,"itemStyle"]);m.style=x.getItemStyle();var b=Vr(x,c);b&&(m.shape=b)}),t?(s.setShape(c),s.shape.r=v.r0,Ut(s,{shape:{r:v.r}},n,r.dataIndex)):(xt(s,{shape:c},n),Fe(s)),s.useStyle(f),this._updateLabel(n);var d=l.getShallow("cursor");d&&s.attr("cursor",d),this._seriesModel=n||this._seriesModel,this._ecModel=i||this._ecModel;var g=u.get("focus"),y=g==="relative"?fn(r.getAncestorsIndices(),r.getDescendantIndices()):g==="ancestor"?r.getAncestorsIndices():g==="descendant"?r.getDescendantIndices():g;Et(this,y,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var r=this,n=this.node.getModel(),i=n.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,f=c.getTextContent(),h=this.node.dataIndex,p=i.get("minAngle")/180*Math.PI,d=i.get("show")&&!(p!=null&&Math.abs(s)P&&!jg(R-P)&&R0?(o.virtualPiece?o.virtualPiece.updateData(!1,S,t,r,n):(o.virtualPiece=new Rv(S,t,r,n),v.add(o.virtualPiece)),m.piece.off("click"),o.virtualPiece.on("click",function(x){o._rootToNode(m.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 n=!1,i=t.seriesModel.getViewRoot();i.eachNode(function(o){if(!n&&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";pn(u,v)}}n=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Yo,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,r){var n=r.getData(),i=n.getItemLayout(0);if(i){var o=t[0]-i.cx,s=t[1]-i.cy,l=Math.sqrt(o*o+s*s);return l<=i.r&&l>=i.r0}},e.type="sunburst",e}(kt),G_=function(a){V(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 n={name:t.name,children:t.data};Dp(n);var i=this._levelModels=$(t.levels||[],function(l){return new ce(l,this,r)},this),o=zs.createTree(n,this,s);function s(l){l.wrapMethod("getItemModel",function(u,v){var c=o.getNodeByDataIndex(v),f=i[c.depth];return f&&(u.parentModel=f),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var r=a.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return r.treePathInfo=ai(n,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(){Eh(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}(Ft);function Dp(a){var e=0;D(a.children,function(r){Dp(r);var n=r.value;q(n)&&(n=n[0]),e+=n});var t=a.value;q(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),q(a.value)?a.value[0]=t:a.value=t}var Vv=Math.PI/180;function O_(a,e,t){e.eachSeriesByType(a,function(r){var n=r.get("center"),i=r.get("radius");q(i)||(i=[0,i]),q(n)||(n=[n,n]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=U(n[0],o),v=U(n[1],s),c=U(i[0],l/2),f=U(i[1],l/2),h=-r.get("startAngle")*Vv,p=r.get("minAngle")*Vv,d=r.getData().tree.root,g=r.getViewRoot(),y=g.depth,S=r.get("sort");S!=null&&Lp(g,S);var m=0;D(g.children,function(R){!isNaN(R.getValue())&&m++});var x=g.getValue(),b=Math.PI/(x||m)*2,_=g.depth>0,w=g.height-(_?-1:1),A=(f-c)/(w||1),T=r.get("clockwise"),C=r.get("stillShowZeroSum"),L=T?1:-1,M=function(R,k){if(R){var N=k;if(R!==d){var F=R.getValue(),H=x===0&&C?b:F*b;H1;)o=o.parentNode;var s=n.getColorFromPalette(o.name||o.dataIndex+"",e);return r.depth>1&<(s)&&(s=Jg(s,(r.depth-1)/(i-1)*.5)),s}a.eachSeriesByType("sunburst",function(r){var n=r.getData(),i=n.tree;i.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,r,i.root.height));var u=n.ensureUniqueItemVisual(o.dataIndex,"style");K(u,l)})})}function H_(a){a.registerChartView(z_),a.registerSeriesModel(G_),a.registerLayout(st(O_,"sunburst")),a.registerProcessor(st(Na,"sunburst")),a.registerVisual(F_),N_(a)}var Nv={color:"fill",borderColor:"stroke"},W_={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Ge=Dt(),U_=function(a){V(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 $r(null,this)},e.prototype.getDataParams=function(t,r,n){var i=a.prototype.getDataParams.call(this,t,r);return n&&(i.info=Ge(n).info),i},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(Ft);function $_(a,e){return e=e||[0,0],$(["x","y"],function(t,r){var n=this.getAxis(t),i=e[r],o=a[r]/2;return n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(i-o)-n.dataToCoord(i+o))},this)}function Y_(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:at($_,a)}}}function Z_(a,e){return e=e||[0,0],$([0,1],function(t){var r=e[t],n=a[t]/2,i=[],o=[];return i[t]=r-n,o[t]=r+n,i[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(i)[t]-this.dataToPoint(o)[t])},this)}function X_(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:at(Z_,a)}}}function q_(a,e){var t=this.getAxis(),r=e instanceof Array?e[0]:e,n=(a instanceof Array?a[0]:a)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(r-n)-t.dataToCoord(r+n))}function K_(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:at(q_,a)}}}function j_(a,e){return e=e||[0,0],$(["Radius","Angle"],function(t,r){var n="get"+t+"Axis",i=this[n](),o=e[r],s=a[r]/2,l=i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(o-s)-i.dataToCoord(o+s));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function J_(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(n){var i=e.dataToRadius(n[0]),o=t.dataToAngle(n[1]),s=a.coordToPoint([i,o]);return s.push(i,o*Math.PI/180),s},size:at(j_,a)}}}function Q_(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,n){return a.dataToPoint(r,n)}}}}function Ip(a,e,t,r){return a&&(a.legacy||a.legacy!==!1&&!t&&!r&&e!=="tspan"&&(e==="text"||Z(a,"text")))}function Mp(a,e,t){var r=a,n,i,o;if(e==="text")o=r;else{o={},Z(r,"text")&&(o.text=r.text),Z(r,"rich")&&(o.rich=r.rich),Z(r,"textFill")&&(o.fill=r.textFill),Z(r,"textStroke")&&(o.stroke=r.textStroke),Z(r,"fontFamily")&&(o.fontFamily=r.fontFamily),Z(r,"fontSize")&&(o.fontSize=r.fontSize),Z(r,"fontStyle")&&(o.fontStyle=r.fontStyle),Z(r,"fontWeight")&&(o.fontWeight=r.fontWeight),i={type:"text",style:o,silent:!0},n={};var s=Z(r,"textPosition");t?n.position=s?r.textPosition:"inside":s&&(n.position=r.textPosition),Z(r,"textPosition")&&(n.position=r.textPosition),Z(r,"textOffset")&&(n.offset=r.textOffset),Z(r,"textRotation")&&(n.rotation=r.textRotation),Z(r,"textDistance")&&(n.distance=r.textDistance)}return zv(o,a),D(o.rich,function(l){zv(l,l)}),{textConfig:n,textContent:i}}function zv(a,e){e&&(e.font=e.textFont||e.font,Z(e,"textStrokeWidth")&&(a.lineWidth=e.textStrokeWidth),Z(e,"textAlign")&&(a.align=e.textAlign),Z(e,"textVerticalAlign")&&(a.verticalAlign=e.textVerticalAlign),Z(e,"textLineHeight")&&(a.lineHeight=e.textLineHeight),Z(e,"textWidth")&&(a.width=e.textWidth),Z(e,"textHeight")&&(a.height=e.textHeight),Z(e,"textBackgroundColor")&&(a.backgroundColor=e.textBackgroundColor),Z(e,"textPadding")&&(a.padding=e.textPadding),Z(e,"textBorderColor")&&(a.borderColor=e.textBorderColor),Z(e,"textBorderWidth")&&(a.borderWidth=e.textBorderWidth),Z(e,"textBorderRadius")&&(a.borderRadius=e.textBorderRadius),Z(e,"textBoxShadowColor")&&(a.shadowColor=e.textBoxShadowColor),Z(e,"textBoxShadowBlur")&&(a.shadowBlur=e.textBoxShadowBlur),Z(e,"textBoxShadowOffsetX")&&(a.shadowOffsetX=e.textBoxShadowOffsetX),Z(e,"textBoxShadowOffsetY")&&(a.shadowOffsetY=e.textBoxShadowOffsetY))}function Gv(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 n=r.textPosition.indexOf("inside")>=0,i=a.fill||"#000";Ov(r,e);var o=r.textFill==null;return n?o&&(r.textFill=t.insideFill||"#fff",!r.textStroke&&t.insideStroke&&(r.textStroke=t.insideStroke),!r.textStroke&&(r.textStroke=i),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,D(e.rich,function(s){Ov(s,s)}),r}function Ov(a,e){e&&(Z(e,"fill")&&(a.textFill=e.fill),Z(e,"stroke")&&(a.textStroke=e.fill),Z(e,"lineWidth")&&(a.textStrokeWidth=e.lineWidth),Z(e,"font")&&(a.font=e.font),Z(e,"fontStyle")&&(a.fontStyle=e.fontStyle),Z(e,"fontWeight")&&(a.fontWeight=e.fontWeight),Z(e,"fontSize")&&(a.fontSize=e.fontSize),Z(e,"fontFamily")&&(a.fontFamily=e.fontFamily),Z(e,"align")&&(a.textAlign=e.align),Z(e,"verticalAlign")&&(a.textVerticalAlign=e.verticalAlign),Z(e,"lineHeight")&&(a.textLineHeight=e.lineHeight),Z(e,"width")&&(a.textWidth=e.width),Z(e,"height")&&(a.textHeight=e.height),Z(e,"backgroundColor")&&(a.textBackgroundColor=e.backgroundColor),Z(e,"padding")&&(a.textPadding=e.padding),Z(e,"borderColor")&&(a.textBorderColor=e.borderColor),Z(e,"borderWidth")&&(a.textBorderWidth=e.borderWidth),Z(e,"borderRadius")&&(a.textBorderRadius=e.borderRadius),Z(e,"shadowColor")&&(a.textBoxShadowColor=e.shadowColor),Z(e,"shadowBlur")&&(a.textBoxShadowBlur=e.shadowBlur),Z(e,"shadowOffsetX")&&(a.textBoxShadowOffsetX=e.shadowOffsetX),Z(e,"shadowOffsetY")&&(a.textBoxShadowOffsetY=e.shadowOffsetY),Z(e,"textShadowColor")&&(a.textShadowColor=e.textShadowColor),Z(e,"textShadowBlur")&&(a.textShadowBlur=e.textShadowBlur),Z(e,"textShadowOffsetX")&&(a.textShadowOffsetX=e.textShadowOffsetX),Z(e,"textShadowOffsetY")&&(a.textShadowOffsetY=e.textShadowOffsetY))}var Pp={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},Bv=Mt(Pp);Af(ma,function(a,e){return a[e]=1,a},{});ma.join(", ");var In=["","style","shape","extra"],Hr=Dt();function el(a,e,t,r,n){var i=a+"Animation",o=ka(a,r,n)||{},s=Hr(e).userDuring;return o.duration>0&&(o.during=s?at(nw,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=a),K(o,t[i]),o}function ln(a,e,t,r){r=r||{};var n=r.dataIndex,i=r.isInit,o=r.clearStyle,s=t.isAnimationEnabled(),l=Hr(a),u=e.style;l.userDuring=e.during;var v={},c={};if(ow(a,e,c),Hv("shape",e,c),Hv("extra",e,c),!i&&s&&(iw(a,e,v),Fv("shape",a,e,v),Fv("extra",a,e,v),sw(a,e,u,v)),c.style=u,tw(a,c,o),rw(a,e),s)if(i){var f={};D(In,function(p){var d=p?e[p]:e;d&&d.enterFrom&&(p&&(f[p]=f[p]||{}),K(p?f[p]:f,d.enterFrom))});var h=el("enter",a,e,t,n);h.duration>0&&a.animateFrom(f,h)}else ew(a,e,n||0,t,v);Ep(a,e),u?a.dirty():a.markRedraw()}function Ep(a,e){for(var t=Hr(a).leaveToProps,r=0;r0&&a.animateFrom(n,i)}}function rw(a,e){Z(e,"silent")&&(a.silent=e.silent),Z(e,"ignore")&&(a.ignore=e.ignore),a instanceof xr&&Z(e,"invisible")&&(a.invisible=e.invisible),a instanceof Wt&&Z(e,"autoBatch")&&(a.autoBatch=e.autoBatch)}var Le={},aw={setTransform:function(a,e){return Le.el[a]=e,this},getTransform:function(a){return Le.el[a]},setShape:function(a,e){var t=Le.el,r=t.shape||(t.shape={});return r[a]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(a){var e=Le.el.shape;if(e)return e[a]},setStyle:function(a,e){var t=Le.el,r=t.style;return r&&(r[a]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(a){var e=Le.el.style;if(e)return e[a]},setExtra:function(a,e){var t=Le.el.extra||(Le.el.extra={});return t[a]=e,this},getExtra:function(a){var e=Le.el.extra;if(e)return e[a]}};function nw(){var a=this,e=a.el;if(e){var t=Hr(e).userDuring,r=a.userDuring;if(t!==r){a.el=a.userDuring=null;return}Le.el=e,r(aw)}}function Fv(a,e,t,r){var n=t[a];if(n){var i=e[a],o;if(i){var s=t.transition,l=n.transition;if(l)if(!o&&(o=r[a]={}),gr(l))K(o,i);else for(var u=Jt(l),v=0;v=0){!o&&(o=r[a]={});for(var h=Mt(i),v=0;v=0)){var f=a.getAnimationStyleProps(),h=f?f.style:null;if(h){!i&&(i=r.style={});for(var p=Mt(t),u=0;u=0?e.getStore().get(k,E):void 0}var N=e.get(R.name,E),F=R&&R.ordinalMeta;return F?F.categories[N]:N}function _(P,E){E==null&&(E=u);var R=e.getItemVisual(E,"style"),k=R&&R.fill,N=R&&R.opacity,F=S(E,Ke).getItemStyle();k!=null&&(F.fill=k),N!=null&&(F.opacity=N);var H={inheritColor:lt(k)?k:"#000"},X=m(E,Ke),j=At(X,null,H,!1,!0);j.text=X.getShallow("show")?Rt(a.getFormattedLabel(E,Ke),To(e,E)):null;var rt=Nl(X,H,!1);return T(P,F),F=Gv(F,j,rt),P&&A(F,P),F.legacy=!0,F}function w(P,E){E==null&&(E=u);var R=S(E,Oe).getItemStyle(),k=m(E,Oe),N=At(k,null,null,!0,!0);N.text=k.getShallow("show")?Ur(a.getFormattedLabel(E,Oe),a.getFormattedLabel(E,Ke),To(e,E)):null;var F=Nl(k,null,!0);return T(P,R),R=Gv(R,N,F),P&&A(R,P),R.legacy=!0,R}function A(P,E){for(var R in E)Z(E,R)&&(P[R]=E[R])}function T(P,E){P&&(P.textFill&&(E.textFill=P.textFill),P.textPosition&&(E.textPosition=P.textPosition))}function C(P,E){if(E==null&&(E=u),Z(Nv,P)){var R=e.getItemVisual(E,"style");return R?R[Nv[P]]:null}if(Z(W_,P))return e.getItemVisual(E,P)}function L(P){if(i.type==="cartesian2d"){var E=i.getBaseAxis();return ty(ot({axis:E},P))}}function M(){return t.getCurrentSeriesIndices()}function I(P){return Vf(P,t)}}function yw(a){var e={};return D(a.dimensions,function(t){var r=a.getDimensionInfo(t);if(!r.isExtraCoord){var n=r.coordDim,i=e[n]=e[n]||[];i[r.coordDimIndex]=a.getDimensionIndex(t)}}),e}function no(a,e,t,r,n,i,o){if(!r){i.remove(e);return}var s=ol(a,e,t,r,n,i);return s&&o.setItemGraphicEl(t,s),s&&Et(s,r.focus,r.blurScope,r.emphasisDisabled),s}function ol(a,e,t,r,n,i){var o=-1,s=e;e&&Np(e,r,n)&&(o=Pt(i.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=nl(r),s&&hw(s,u)),r.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),pe.normal.cfg=pe.normal.conOpt=pe.emphasis.cfg=pe.emphasis.conOpt=pe.blur.cfg=pe.blur.conOpt=pe.select.cfg=pe.select.conOpt=null,pe.isLegacy=!1,Sw(u,t,r,n,l,pe),mw(u,t,r,n,l),il(a,u,t,r,pe,n,l),Z(r,"info")&&(Ge(u).info=r.info);for(var v=0;v=0?i.replaceAt(u,o):i.add(u),u}function Np(a,e,t){var r=Ge(a),n=e.type,i=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||n!=null&&n!==r.customGraphicType||n==="path"&&Aw(i)&&zp(i)!==r.customPathData||n==="image"&&Z(o,"image")&&o.image!==r.customImagePath}function mw(a,e,t,r,n){var i=t.clipPath;if(i===!1)a&&a.getClipPath()&&a.removeClipPath();else if(i){var o=a.getClipPath();o&&Np(o,i,r)&&(o=null),o||(o=nl(i),a.setClipPath(o)),il(null,o,e,i,null,r,n)}}function Sw(a,e,t,r,n,i){if(!a.isGroup){Uv(t,null,i),Uv(t,Oe,i);var o=i.normal.conOpt,s=i.emphasis.conOpt,l=i.blur.conOpt,u=i.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var v=a.getTextContent();if(o===!1)v&&a.removeTextContent();else{o=i.normal.conOpt=o||{type:"text"},v?v.clearStates():(v=nl(o),a.setTextContent(v)),il(null,v,e,o,null,r,n);for(var c=o&&o.style,f=0;f=v;h--){var p=e.childAt(h);bw(e,p,n)}}}function bw(a,e,t){e&&oi(e,Ge(a).option,t)}function _w(a){new Qe(a.oldChildren,a.newChildren,$v,$v,a).add(Yv).update(Yv).remove(ww).execute()}function $v(a,e){var t=a&&a.name;return t??cw+e}function Yv(a,e){var t=this.context,r=a!=null?t.newChildren[a]:null,n=e!=null?t.oldChildren[e]:null;ol(t.api,n,t.dataIndex,r,t.seriesModel,t.group)}function ww(a){var e=this.context,t=e.oldChildren[a];t&&oi(t,Ge(t).option,e.seriesModel)}function zp(a){return a&&(a.pathData||a.d)}function Aw(a){return a&&(Z(a,"pathData")||Z(a,"d"))}function Tw(a){a.registerChartView(pw),a.registerSeriesModel(U_)}var Cw=function(a){V(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,r,n,i,o){var s=n.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),v=u.getExtent(),c=s.dataToCoord(r),f=i.get("type");if(f&&f!=="none"){var h=zf(i),p=Lw[f](s,l,c,v);p.style=h,t.graphicKey=p.type,t.pointer=p}var d=i.get(["label","margin"]),g=Dw(r,n,i,l,d);ry(t,n,i,o,g)},e}(Gf);function Dw(a,e,t,r,n){var i=e.axis,o=i.dataToCoord(a),s=r.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=r.getRadiusAxis().getExtent(),u,v,c;if(i.dim==="radius"){var f=Zr();Yn(f,f,s),Sr(f,f,[r.cx,r.cy]),u=Gr([o,-n],f);var h=e.getModel("axisLabel").get("rotate")||0,p=mr.innerTextLayout(s,h*Math.PI/180,-1);v=p.textAlign,c=p.textVerticalAlign}else{var d=l[1];u=r.coordToPoint([d+n,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 Lw={line:function(a,e,t,r){return a.dim==="angle"?{type:"Line",shape:Of(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 n=Math.max(1,a.getBandWidth()),i=Math.PI/180;return a.dim==="angle"?{type:"Sector",shape:zl(e.cx,e.cy,r[0],r[1],(-t-n/2)*i,(-t+n/2)*i)}:{type:"Sector",shape:zl(e.cx,e.cy,t-n/2,t+n/2,0,Math.PI*2)}}},Iw=function(a){V(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,n=this.ecModel;return n.eachComponent(t,function(i){i.getCoordSysModel()===this&&(r=i)},this),r},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(Xt),ll=function(a){V(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Ar).models[0]},e.type="polarAxis",e}(Xt);Ce(ll,$n);var Mw=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e}(ll),Pw=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e}(ll),ul=function(a){V(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}(ke);ul.prototype.dataToRadius=ke.prototype.dataToCoord;ul.prototype.radiusToData=ke.prototype.coordToData;var Ew=Dt(),vl=function(a){V(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(),n=t.scale,i=n.getExtent(),o=n.count();if(i[1]-i[0]<1)return 0;var s=i[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l),v=Bf(s==null?"":s+"",r.getFont(),"center","top"),c=Math.max(v.height,7),f=c/u;isNaN(f)&&(f=1/0);var h=Math.max(0,Math.floor(f)),p=Ew(t.model),d=p.lastAutoInterval,g=p.lastTickCount;return d!=null&&g!=null&&Math.abs(d-h)<=1&&Math.abs(g-o)<=1&&d>h?h=d:(p.lastTickCount=o,p.lastAutoInterval=h),h},e}(ke);vl.prototype.dataToAngle=ke.prototype.dataToCoord;vl.prototype.angleToData=ke.prototype.coordToData;var Gp=["radius","angle"],Rw=function(){function a(e){this.dimensions=Gp,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new ul,this._angleAxis=new vl,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,n=this._radiusAxis;return r.scale.type===e&&t.push(r),n.scale.type===e&&t.push(n),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,n=this.getAngleAxis(),i=n.getExtent(),o=Math.min(i[0],i[1]),s=Math.max(i[0],i[1]);n.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=us;)u+=v*360;return[l,u]},a.prototype.coordToPoint=function(e){var t=e[0],r=e[1]/180*Math.PI,n=Math.cos(r)*t+this.cx,i=-Math.sin(r)*t+this.cy;return[n,i]},a.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),r=t.getExtent().slice();r[0]>r[1]&&r.reverse();var n=e.getExtent(),i=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:r[0],r:r[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:e.inverse,contain:function(s,l){var u=s-this.cx,v=l-this.cy,c=u*u+v*v,f=this.r,h=this.r0;return f!==h&&c-o<=f*f&&c+o>=h*h}}},a.prototype.convertToPixel=function(e,t,r){var n=Zv(t);return n===this?this.dataToPoint(r):null},a.prototype.convertFromPixel=function(e,t,r){var n=Zv(t);return n===this?this.pointToData(r):null},a}();function Zv(a){var e=a.seriesModel,t=a.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function kw(a,e,t){var r=e.get("center"),n=t.getWidth(),i=t.getHeight();a.cx=U(r[0],n),a.cy=U(r[1],i);var o=a.getRadiusAxis(),s=Math.min(n,i)/2,l=e.get("radius");l==null?l=[0,"100%"]:q(l)||(l=[0,l]);var u=[U(l[0],s),U(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function Vw(a,e){var t=this,r=t.getAngleAxis(),n=t.getRadiusAxis();if(r.scale.setExtent(1/0,-1/0),n.scale.setExtent(1/0,-1/0),a.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();D(Gl(l,"radius"),function(u){n.scale.unionExtentFromData(l,u)}),D(Gl(l,"angle"),function(u){r.scale.unionExtentFromData(l,u)})}}),gn(r.scale,r.model),gn(n.scale,n.model),r.type==="category"&&!r.onBand){var i=r.getExtent(),o=360/r.scale.count();r.inverse?i[1]+=o:i[1]-=o,r.setExtent(i[0],i[1])}}function Nw(a){return a.mainType==="angleAxis"}function Xv(a,e){var t;if(a.type=e.get("type"),a.scale=gs(e),a.onBand=e.get("boundaryGap")&&a.type==="category",a.inverse=e.get("inverse"),Nw(e)){a.inverse=a.inverse!==e.get("clockwise");var r=e.get("startAngle"),n=(t=e.get("endAngle"))!==null&&t!==void 0?t:r+(a.inverse?-360:360);a.setExtent(r,n)}e.axis=a,a.model=e}var zw={dimensions:Gp,create:function(a,e){var t=[];return a.eachComponent("polar",function(r,n){var i=new Rw(n+"");i.update=Vw;var o=i.getRadiusAxis(),s=i.getAngleAxis(),l=r.findAxisModel("radiusAxis"),u=r.findAxisModel("angleAxis");Xv(o,l),Xv(s,u),kw(i,r,e),t.push(i),r.coordinateSystem=i,i.model=r}),a.eachSeries(function(r){if(r.get("coordinateSystem")==="polar"){var n=r.getReferringComponents("polar",Ar).models[0];r.coordinateSystem=n.coordinateSystem}}),t}},Gw=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Ja(a,e,t){e[1]>e[0]&&(e=e.slice().reverse());var r=a.coordToPoint([e[0],t]),n=a.coordToPoint([e[1],t]);return{x1:r[0],y1:r[1],x2:n[0],y2:n[1]}}function Qa(a){var e=a.getRadiusAxis();return e.inverse?0:1}function qv(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 Ow=function(a){V(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 n=t.axis,i=n.polar,o=i.getRadiusAxis().getExtent(),s=n.getTicksCoords(),l=n.getMinorTicksCoords(),u=$(n.getViewLabels(),function(v){v=pt(v);var c=n.scale,f=c.type==="ordinal"?c.getRawOrdinalNumber(v.tickValue):v.tickValue;return v.coord=n.dataToCoord(f),v});qv(u),qv(s),D(Gw,function(v){t.get([v,"show"])&&(!n.scale.isBlank()||v==="axisLine")&&Bw[v](this.group,t,i,s,l,o,u)},this)}},e.type="angleAxis",e}(Va),Bw={axisLine:function(a,e,t,r,n,i){var o=e.getModel(["axisLine","lineStyle"]),s=t.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),v=Qa(t),c=v?0:1,f,h=Math.abs(u[1]-u[0])===360?"Circle":"Arc";i[c]===0?f=new Yr[h]({shape:{cx:t.cx,cy:t.cy,r:i[v],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):f=new xf({shape:{cx:t.cx,cy:t.cy,r:i[v],r0:i[c]},style:o.getLineStyle(),z2:1,silent:!0}),f.style.fill=null,a.add(f)},axisTick:function(a,e,t,r,n,i){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=i[Qa(t)],u=$(r,function(v){return new _e({shape:Ja(t,[l,l+s],v.coord)})});a.add(be(u,{style:ot(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(a,e,t,r,n,i){if(n.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=i[Qa(t)],v=[],c=0;cy?"left":"right",x=Math.abs(g[1]-S)/d<.3?"middle":g[1]>S?"top":"bottom";if(s&&s[p]){var b=s[p];Zt(b)&&b.textStyle&&(h=new ce(b.textStyle,l,l.ecModel))}var _=new St({silent:mr.isLabelSilent(e),style:At(h,{x:g[0],y:g[1],fill:h.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:c.formattedLabel,align:m,verticalAlign:x})});if(a.add(_),v){var w=mr.makeAxisEventDataBase(e);w.targetType="axisLabel",w.value=c.rawLabel,ht(_).eventData=w}},this)},splitLine:function(a,e,t,r,n,i){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=0?"p":"n",E=T;b&&(r[v][I]||(r[v][I]={p:T,n:T}),E=r[v][I][P]);var R=void 0,k=void 0,N=void 0,F=void 0;if(p.dim==="radius"){var H=p.dataToCoord(M)-T,X=l.dataToCoord(I);Math.abs(H)=F})}}})}function Zw(a){var e={};D(a,function(r,n){var i=r.getData(),o=r.coordinateSystem,s=o.getBaseAxis(),l=Bp(o,s),u=s.getExtent(),v=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/i.count(),c=e[l]||{bandWidth:v,remainedWidth:v,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},f=c.stacks;e[l]=c;var h=Op(r);f[h]||c.autoWidthCount++,f[h]=f[h]||{width:0,maxWidth:0};var p=U(r.get("barWidth"),v),d=U(r.get("barMaxWidth"),v),g=r.get("barGap"),y=r.get("barCategoryGap");p&&!f[h].width&&(p=Math.min(c.remainedWidth,p),f[h].width=p,c.remainedWidth-=p),d&&(f[h].maxWidth=d),g!=null&&(c.gap=g),y!=null&&(c.categoryGap=y)});var t={};return D(e,function(r,n){t[n]={};var i=r.stacks,o=r.bandWidth,s=U(r.categoryGap,o),l=U(r.gap,1),u=r.remainedWidth,v=r.autoWidthCount,c=(u-s)/(v+(v-1)*l);c=Math.max(c,0),D(i,function(d,g){var y=d.maxWidth;y&&y=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(),n=[],i=t.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),n[i]=t.toGlobalCoord(t.dataToCoord(+e)),n[1-i]=i===0?r.y+r.height/2:r.x+r.width/2,n},a.prototype.convertToPixel=function(e,t,r){var n=Kv(t);return n===this?this.dataToPoint(r):null},a.prototype.convertFromPixel=function(e,t,r){var n=Kv(t);return n===this?this.pointToData(r):null},a}();function Kv(a){var e=a.seriesModel,t=a.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function nA(a,e){var t=[];return a.eachComponent("singleAxis",function(r,n){var i=new aA(r,a,e);i.name="single_"+n,i.resize(r,e),r.coordinateSystem=i,t.push(i)}),a.eachSeries(function(r){if(r.get("coordinateSystem")==="singleAxis"){var n=r.getReferringComponents("singleAxis",Ar).models[0];r.coordinateSystem=n&&n.coordinateSystem}}),t}var iA={create:nA,dimensions:Fp},jv=["x","y"],oA=["width","height"],sA=function(a){V(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,r,n,i,o){var s=n.axis,l=s.coordinateSystem,u=io(l,1-En(s)),v=l.dataToPoint(r)[0],c=i.get("type");if(c&&c!=="none"){var f=zf(i),h=lA[c](s,v,u);h.style=f,t.graphicKey=h.type,t.pointer=h}var p=qo(n);oy(r,t,p,n,i,o)},e.prototype.getHandleTransform=function(t,r,n){var i=qo(r,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=sy(r.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,r,n,i){var o=n.axis,s=o.coordinateSystem,l=En(o),u=io(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=io(s,1-l),f=(c[1]+c[0])/2,h=[f,f];return h[l]=v[l],{x:v[0],y:v[1],rotation:t.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}},e}(Gf),lA={line:function(a,e,t){var r=Of([e,t[0]],[e,t[1]],En(a));return{type:"Line",subPixelOptimize:!0,shape:r}},shadow:function(a,e,t){var r=a.getBandWidth(),n=t[1]-t[0];return{type:"Rect",shape:ly([e-r/2,t[0]],[r,n],En(a))}}};function En(a){return a.isHorizontal()?0:1}function io(a,e){var t=a.getRect();return[t[jv[e]],t[jv[e]]+t[oA[e]]]}var uA=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(te);function vA(a){it(xs),Va.registerAxisPointerClass("SingleAxisPointer",sA),a.registerComponentView(uA),a.registerComponentView(tA),a.registerComponentModel(un),yn(a,"single",un,un.defaultOption),a.registerCoordinateSystem("single",iA)}var cA=function(a){V(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,n){var i=uy(t);a.prototype.init.apply(this,arguments),Jv(t,i)},e.prototype.mergeOption=function(t){a.prototype.mergeOption.apply(this,arguments),Jv(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}(Xt);function Jv(a,e){var t=a.cellSize,r;q(t)?r=t:r=a.cellSize=[t,t],r.length===1&&(r[1]=r[0]);var n=$([0,1],function(i){return vy(e,i)&&(r[i]="auto"),r[i]!=null&&r[i]!=="auto"});Hf(a,e,{type:"box",ignoreSize:n})}var fA=function(a){V(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,n){var i=this.group;i.removeAll();var o=t.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=r.getLocaleModel();this._renderDayRect(t,s,i),this._renderLines(t,s,l,i),this._renderYearText(t,s,l,i),this._renderMonthText(t,u,l,i),this._renderWeekText(t,u,s,l,i)},e.prototype._renderDayRect=function(t,r,n){for(var i=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),s=i.getCellWidth(),l=i.getCellHeight(),u=r.start.time;u<=r.end.time;u=i.getNextNDay(u,1).time){var v=i.dataToRect([u],!1).tl,c=new Bt({shape:{x:v[0],y:v[1],width:s,height:l},cursor:"default",style:o});n.add(c)}},e.prototype._renderLines=function(t,r,n,i){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,f=0;c.time<=r.end.time;f++){p(c.formatedDate),f===0&&(c=s.getDateInfo(r.start.y+"-"+r.start.m));var h=c.date;h.setMonth(h.getMonth()+1),c=s.getDateInfo(h)}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,n);o._tlpoints.push(g[0]),o._blpoints.push(g[g.length-1]),u&&o._drawSplitline(g,l,i)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,v,n),l,i),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,v,n),l,i)},e.prototype._getEdgesPoints=function(t,r,n){var i=[t[0].slice(),t[t.length-1].slice()],o=n==="horizontal"?0:1;return i[0][o]=i[0][o]-r/2,i[1][o]=i[1][o]+r/2,i},e.prototype._drawSplitline=function(t,r,n){var i=new Te({z2:20,shape:{points:t},style:r});n.add(i)},e.prototype._getLinePointsOfOneWeek=function(t,r,n){for(var i=t.coordinateSystem,o=i.getDateInfo(r),s=[],l=0;l<7;l++){var u=i.getNextNDay(o.time,l),v=i.dataToRect([u.time],!1);s[2*u.day]=v.tl,s[2*u.day+1]=v[n==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,r){return lt(t)&&t?cy(t,r):gt(t)?t(r):r.nameMap},e.prototype._yearTextPositionControl=function(t,r,n,i,o){var s=r[0],l=r[1],u=["center","bottom"];i==="bottom"?(l+=o,u=["center","top"]):i==="left"?s-=o:i==="right"?(s+=o,u=["center","top"]):l-=o;var v=0;return(i==="left"||i==="right")&&(v=Math.PI/2),{rotation:v,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(t,r,n,i){var o=t.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=n!=="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,f=n==="horizontal"?0:1,h={top:[v,u[f][1]],bottom:[v,u[1-f][1]],left:[u[1-f][0],c],right:[u[f][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),S=new St({z2:30,style:At(o,{text:y}),silent:o.get("silent")});S.attr(this._yearTextPositionControl(S,h[l],n,l,s)),i.add(S)}},e.prototype._monthTextPositionControl=function(t,r,n,i,o){var s="left",l="top",u=t[0],v=t[1];return n==="horizontal"?(v=v+o,r&&(s="center"),i==="start"&&(l="bottom")):(u=u+o,r&&(l="middle"),i==="start"&&(s="right")),{x:u,y:v,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(t,r,n,i){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||lt(s))&&(s&&(r=Ol(s)||r),s=r.get(["time","monthAbbr"])||[]);var f=u==="start"?0:1,h=n==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=v==="center",d=o.get("silent"),g=0;g=n.start.time&&r.times.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 n=Math.floor(t[1].time/oo)-Math.floor(t[0].time/oo)+1,i=new Date(t[0].time),o=i.getDate(),s=t[1].date.getDate();i.setDate(o+n-1);var l=i.getDate();if(l!==s)for(var u=i.getTime()-t[1].time>0?1:-1;(l=i.getDate())!==s&&(i.getTime()-t[1].time)*u>0;)n-=u,i.setDate(l-u);var v=Math.floor((n+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:n,weeks:v,nthWeek:c,fweek:t[0].day,lweek:t[1].day}},a.prototype._getDateByWeeksAndDay=function(e,t,r){var n=this._getRangeInfo(r);if(e>n.weeks||e===0&&tn.lweek)return null;var i=(e-1)*7-n.fweek+t,o=new Date(n.start.time);return o.setDate(+n.start.d+i),this.getDateInfo(o)},a.create=function(e,t){var r=[];return e.eachComponent("calendar",function(n){var i=new a(n);r.push(i),n.coordinateSystem=i}),e.eachSeries(function(n){n.get("coordinateSystem")==="calendar"&&(n.coordinateSystem=r[n.get("calendarIndex")||0])}),r},a.dimensions=["time","value"],a}();function Qv(a){var e=a.calendarModel,t=a.seriesModel,r=e?e.coordinateSystem:t?t.coordinateSystem:null;return r}function pA(a){a.registerComponentModel(cA),a.registerComponentView(fA),a.registerCoordinateSystem("calendar",hA)}function dA(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 tc(a,e){var t;return D(e,function(r){a[r]!=null&&a[r]!=="auto"&&(t=!0)}),t}function gA(a,e,t){var r=K({},t),n=a[e],i=t.$action||"merge";i==="merge"?n?(Ct(n,r,!0),Hf(n,r,{ignoreSize:!0}),py(t,n),tn(t,n),tn(t,n,"shape"),tn(t,n,"style"),tn(t,n,"extra"),t.clipPath=n.clipPath):a[e]=r:i==="replace"?a[e]=r:i==="remove"&&n&&(a[e]=null)}var Hp=["transition","enterFrom","leaveTo"],yA=Hp.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function tn(a,e,t){if(t&&(!a[t]&&e[t]&&(a[t]={}),a=a[t],e=e[t]),!(!a||!e))for(var r=t?Hp:yA,n=0;n=0;v--){var c=n[v],f=ze(c.id,null),h=f!=null?o.get(f):null;if(h){var p=h.parent,y=de(p),S=p===i?{width:s,height:l}:{width:y.width,height:y.height},m={},x=ps(h,c,S,null,{hv:c.hv,boundingMode:c.bounding},m);if(!de(h).isNew&&x){for(var b=c.transition,_={},w=0;w=0)?_[A]=T:h[A]=T}xt(h,_,t,0)}else h.attr(m)}}},e.prototype._clear=function(){var t=this,r=this._elMap;r.each(function(n){vn(n,de(n).option,r,t._lastGraphicModel)}),this._elMap=ut()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(te);function Ko(a){var e=Z(ec,a)?ec[a]:Nf(a),t=new e({});return de(t).type=a,t}function rc(a,e,t,r){var n=Ko(t);return e.add(n),r.set(a,n),de(n).id=a,de(n).isNew=!0,n}function vn(a,e,t,r){var n=a&&a.parent;n&&(a.type==="group"&&a.traverse(function(i){vn(i,e,t,r)}),oi(a,e,r),t.removeKey(de(a).id))}function ac(a,e,t,r){a.isGroup||D([["cursor",xr.prototype.cursor],["zlevel",r||0],["z",t||0],["z2",0]],function(n){var i=n[0];Z(e,i)?a[i]=Rt(e[i],n[1]):a[i]==null&&(a[i]=n[1])}),D(Mt(e),function(n){if(n.indexOf("on")===0){var i=e[n];a[n]=gt(i)?i:null}}),Z(e,"draggable")&&(a.draggable=e.draggable),e.name!=null&&(a.name=e.name),e.id!=null&&(a.id=e.id)}function bA(a){return a=K({},a),D(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(dy),function(e){delete a[e]}),a}function _A(a,e,t){var r=ht(a).eventData;!a.silent&&!a.ignore&&!r&&(r=ht(a).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:a.name}),r&&(r.info=t.info)}function wA(a){a.registerComponentModel(SA),a.registerComponentView(xA),a.registerPreprocessor(function(e){var t=e.graphic;q(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var AA=function(a){V(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}(gy),TA=function(a){V(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}(yy);function CA(a){a.registerComponentModel(AA),a.registerComponentView(TA),my(a)}var ge=function(){function a(){}return a}(),Wp={};function Rr(a,e){Wp[a]=e}function Up(a){return Wp[a]}var DA=function(a){V(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;D(this.option.feature,function(r,n){var i=Up(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(t)),Ct(r,i.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#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}(Xt),LA=function(a){V(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.render=function(t,r,n,i){var o=this.group;if(o.removeAll(),!t.get("show"))return;var s=+t.get("itemSize"),l=t.get("orient")==="vertical",u=t.get("feature")||{},v=this._features||(this._features={}),c=[];D(u,function(p,d){c.push(d)}),new Qe(this._featureNames||[],c).add(f).update(f).remove(st(f,null)).execute(),this._featureNames=c;function f(p,d){var g=c[p],y=c[d],S=u[g],m=new ce(S,t,t.ecModel),x;if(i&&i.newTitle!=null&&i.featureName===g&&(S.title=i.newTitle),g&&!y){if(IA(g))x={onclick:m.option.onclick,featureName:g};else{var b=Up(g);if(!b)return;x=new b}v[g]=x}else if(x=v[y],!x)return;x.uid=_f("toolbox-feature"),x.model=m,x.ecModel=r,x.api=n;var _=x instanceof ge;if(!g&&y){_&&x.dispose&&x.dispose(r,n);return}if(!m.get("show")||_&&x.unusable){_&&x.remove&&x.remove(r,n);return}h(m,x,g),m.setIconStatus=function(w,A){var T=this.option,C=this.iconPaths;T.iconStatus=T.iconStatus||{},T.iconStatus[w]=A,C[w]&&(A==="emphasis"?ga:ya)(C[w])},x instanceof ge&&x.render&&x.render(m,r,n,i)}function h(p,d,g){var y=p.getModel("iconStyle"),S=p.getModel(["emphasis","iconStyle"]),m=d instanceof ge&&d.getIcons?d.getIcons():p.get("icon"),x=p.get("title")||{},b,_;lt(m)?(b={},b[g]=m):b=m,lt(x)?(_={},_[g]=x):_=x;var w=p.iconPaths={};D(b,function(A,T){var C=Wf(A,{},{x:-s/2,y:-s/2,width:s,height:s});C.setStyle(y.getItemStyle());var L=C.ensureState("emphasis");L.style=S.getItemStyle();var M=new St({style:{text:_[T],align:S.get("textAlign"),borderRadius:S.get("textBorderRadius"),padding:S.get("textPadding"),fill:null,font:Vf({fontStyle:S.get("textFontStyle"),fontFamily:S.get("textFontFamily"),fontSize:S.get("textFontSize"),fontWeight:S.get("textFontWeight")},r)},ignore:!0});C.setTextContent(M),fs({el:C,componentModel:t,itemName:T,formatterParamsExtra:{title:_[T]}}),C.__title=_[T],C.on("mouseover",function(){var I=S.getItemStyle(),P=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";M.setStyle({fill:S.get("textFill")||I.fill||I.stroke||"#000",backgroundColor:S.get("textBackgroundColor")}),C.setTextConfig({position:S.get("textPosition")||P}),M.ignore=!t.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){p.get(["iconStatus",T])!=="emphasis"&&n.leaveEmphasis(this),M.hide()}),(p.get(["iconStatus",T])==="emphasis"?ga:ya)(C),o.add(C),C.on("click",at(d.onclick,d,r,n,T)),w[T]=C})}Sy(o,t,n),o.add(xy(o.getBoundingRect(),t)),l||o.eachChild(function(p){var d=p.__title,g=p.ensureState("emphasis"),y=g.textConfig||(g.textConfig={}),S=p.getTextContent(),m=S&&S.ensureState("emphasis");if(m&&!gt(m)&&d){var x=m.style||(m.style={}),b=Bf(d,St.makeFont(x)),_=p.x+o.x,w=p.y+o.y+s,A=!1;w+b.height>n.getHeight()&&(y.position="top",A=!0);var T=A?-5-b.height:s+10;_+b.width/2>n.getWidth()?(y.position=["100%",T],x.align="right"):_-b.width/2<0&&(y.position=[0,T],x.align="left")}})},e.prototype.updateView=function(t,r,n,i){D(this._features,function(o){o instanceof ge&&o.updateView&&o.updateView(o.model,r,n,i)})},e.prototype.remove=function(t,r){D(this._features,function(n){n instanceof ge&&n.remove&&n.remove(t,r)}),this.group.removeAll()},e.prototype.dispose=function(t,r){D(this._features,function(n){n instanceof ge&&n.dispose&&n.dispose(t,r)})},e.type="toolbox",e}(te);function IA(a){return a.indexOf("my")===0}var MA=function(a){V(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.onclick=function(t,r){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",o=r.getZr().painter.getType()==="svg",s=o?"svg":n.get("type",!0)||"png",l=r.getConnectedDataURL({type:s,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),u=Uf.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var v=document.createElement("a");v.download=i+"."+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 f=l.split(","),h=f[0].indexOf("base64")>-1,p=o?decodeURIComponent(f[1]):f[1];h&&(p=window.atob(p));var d=i+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=p.length,y=new Uint8Array(g);g--;)y[g]=p.charCodeAt(g);var S=new Blob([y]);window.navigator.msSaveOrOpenBlob(S,d)}else{var m=document.createElement("iframe");document.body.appendChild(m);var x=m.contentWindow,b=x.document;b.open("image/svg+xml","replace"),b.write(p),b.close(),x.focus(),b.execCommand("SaveAs",!0,d),document.body.removeChild(m)}}else{var _=n.get("lang"),w='',A=window.open();A.document.write(w),A.document.title=i}},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}(ge),nc="__ec_magicType_stack__",PA=[["line","bar"],["stack"]],EA=function(a){V(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"),n={};return D(t.get("type"),function(i){r[i]&&(n[i]=r[i])}),n},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,n){var i=this.model,o=i.get(["seriesIndex",n]);if(ic[n]){var s={series:[]},l=function(c){var f=c.subType,h=c.id,p=ic[n](f,h,c,i);p&&(ot(p,c.option),s.series.push(p));var d=c.coordinateSystem;if(d&&d.type==="cartesian2d"&&(n==="line"||n==="bar")){var g=d.getAxesByScale("ordinal")[0];if(g){var y=g.dim,S=y+"Axis",m=c.getReferringComponents(S,Ar).models[0],x=m.componentIndex;s[S]=s[S]||[];for(var b=0;b<=x;b++)s[S][x]=s[S][x]||{};s[S][x].boundaryGap=n==="bar"}}};D(PA,function(c){Pt(c,n)>=0&&D(c,function(f){i.setIconStatus(f,"normal")})}),i.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,v=n;n==="stack"&&(u=Ct({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),i.get(["iconStatus",n])!=="emphasis"&&(v="tiled")),r.dispatchAction({type:"changeMagicType",currentType:v,newOption:s,newTitle:u,featureName:"magicType"})}},e}(ge),ic={line:function(a,e,t,r){if(a==="bar")return Ct({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 Ct({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 n=t.get("stack")===nc;if(a==="line"||a==="bar")return r.setIconStatus("stack",n?"normal":"emphasis"),Ct({id:e,stack:n?"":nc},r.get(["option","stack"])||{},!0)}};bs({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(a,e){e.mergeOption(a.newOption)});var si=new Array(60).join("-"),Wr=" ";function RA(a){var e={},t=[],r=[];return a.eachRawSeries(function(n){var i=n.coordinateSystem;if(i&&(i.type==="cartesian2d"||i.type==="polar")){var o=i.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:i.getOtherAxis(o),series:[]},r.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(n)}else t.push(n)}else t.push(n)}),{seriesGroupByCategoryAxis:e,other:t,meta:r}}function kA(a){var e=[];return D(a,function(t,r){var n=t.categoryAxis,i=t.valueAxis,o=i.dim,s=[" "].concat($(t.series,function(h){return h.name})),l=[n.model.getCategories()];D(t.series,function(h){var p=h.getRawData();l.push(h.getRawData().mapArray(p.mapDimension(o),function(d){return d}))});for(var u=[s.join(Wr)],v=0;v=0)return!0}var jo=new RegExp("["+Wr+"]+","g");function GA(a){for(var e=a.split(/\n+/g),t=Rn(e.shift()).split(jo),r=[],n=$(t,function(l){return{name:l,data:[]}}),i=0;i=0;i--){var o=t[i];if(o[n])break}if(i<0){var s=a.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(s){var l=s.getPercentRange();t[0][n]={dataZoomId:n,start:l[0],end:l[1]}}}}),t.push(e)}function UA(a){var e=cl(a),t=e[e.length-1];e.length>1&&e.pop();var r={};return $p(t,function(n,i){for(var o=e.length-1;o>=0;o--)if(n=e[o][i],n){r[i]=n;break}}),r}function $A(a){Yp(a).snapshots=null}function YA(a){return cl(a).length}function cl(a){var e=Yp(a);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var ZA=function(a){V(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.onclick=function(t,r){$A(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}(ge);bs({type:"restore",event:"restore",update:"prepareAndUpdate"},function(a,e){e.resetOption("recreate")});var XA=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],fl=function(){function a(e,t,r){var n=this;this._targetInfoList=[];var i=oc(t,e);D(qA,function(o,s){(!r||!r.include||Pt(r.include,s)>=0)&&o(i,n._targetInfoList)})}return a.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(r,n,i){if((r.coordRanges||(r.coordRanges=[])).push(n),!r.coordRange){r.coordRange=n;var o=so[r.brushType](0,i,n);r.__rangeOffset={offset:vc[r.brushType](o.values,r.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},a.prototype.matchOutputRanges=function(e,t,r){D(e,function(n){var i=this.findTargetInfo(n,t);i&&i!==!0&&D(i.coordSyses,function(o){var s=so[n.brushType](1,o,n.range,!0);r(n,s.values,o,t)})},this)},a.prototype.setInputRanges=function(e,t){D(e,function(r){var n=this.findTargetInfo(r,t);if(r.range=r.range||[],n&&n!==!0){r.panelId=n.panelId;var i=so[r.brushType](0,n.coordSys,r.coordRange),o=r.__rangeOffset;r.range=o?vc[r.brushType](i.values,o.offset,KA(i.xyMinMax,o.xyMinMax)):i.values}},this)},a.prototype.makePanelOpts=function(e,t){return $(this._targetInfoList,function(r){var n=r.getPanelRect();return{panelId:r.panelId,defaultBrushType:t?t(r):null,clipPath:up(n),isTargetByCursor:cp(n,e,r.coordSysModel),getLinearBrushOtherExtent:vp(n)}})},a.prototype.controlSeries=function(e,t,r){var n=this.findTargetInfo(e,r);return n===!0||n&&Pt(n.coordSyses,t.coordinateSystem)>=0},a.prototype.findTargetInfo=function(e,t){for(var r=this._targetInfoList,n=oc(t,e),i=0;ia[1]&&a.reverse(),a}function oc(a,e){return $f(a,e,{includeMainTypes:XA})}var qA={grid:function(a,e){var t=a.xAxisModels,r=a.yAxisModels,n=a.gridModels,i=ut(),o={},s={};!t&&!r&&!n||(D(t,function(l){var u=l.axis.grid.model;i.set(u.id,u),o[u.id]=!0}),D(r,function(l){var u=l.axis.grid.model;i.set(u.id,u),s[u.id]=!0}),D(n,function(l){i.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),i.each(function(l){var u=l.coordinateSystem,v=[];D(u.getCartesians(),function(c,f){(Pt(t,c.getAxis("x").model)>=0||Pt(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:lc.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(a,e){D(a.geoModels,function(t){var r=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:r,coordSyses:[r],getPanelRect:lc.geo})})}},sc=[function(a,e){var t=a.xAxisModel,r=a.yAxisModel,n=a.gridModel;return!n&&t&&(n=t.axis.grid.model),!n&&r&&(n=r.axis.grid.model),n&&n===e.gridModel},function(a,e){var t=a.geoModel;return t&&t===e.geoModel}],lc={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var a=this.coordSys,e=a.getBoundingRect().clone();return e.applyTransform(ua(a)),e}},so={lineX:st(uc,0),lineY:st(uc,1),rect:function(a,e,t,r){var n=a?e.pointToData([t[0][0],t[1][0]],r):e.dataToPoint([t[0][0],t[1][0]],r),i=a?e.pointToData([t[0][1],t[1][1]],r):e.dataToPoint([t[0][1],t[1][1]],r),o=[Jo([n[0],i[0]]),Jo([n[1],i[1]])];return{values:o,xyMinMax:o}},polygon:function(a,e,t,r){var n=[[1/0,-1/0],[1/0,-1/0]],i=$(t,function(o){var s=a?e.pointToData(o,r):e.dataToPoint(o,r);return n[0][0]=Math.min(n[0][0],s[0]),n[1][0]=Math.min(n[1][0],s[1]),n[0][1]=Math.max(n[0][1],s[0]),n[1][1]=Math.max(n[1][1],s[1]),s});return{values:i,xyMinMax:n}}};function uc(a,e,t,r){var n=t.getAxis(["x","y"][a]),i=Jo($([0,1],function(s){return e?n.coordToData(n.toLocalCoord(r[s]),!0):n.toGlobalCoord(n.dataToCoord(r[s]))})),o=[];return o[a]=i,o[1-a]=[NaN,NaN],{values:i,xyMinMax:o}}var vc={lineX:st(cc,0),lineY:st(cc,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 $(a,function(r,n){return[r[0]-t[0]*e[n][0],r[1]-t[1]*e[n][1]]})}};function cc(a,e,t,r){return[e[0]-r[a]*t[0],e[1]-r[a]*t[1]]}function KA(a,e){var t=fc(a),r=fc(e),n=[t[0]/r[0],t[1]/r[1]];return isNaN(n[0])&&(n[0]=1),isNaN(n[1])&&(n[1]=1),n}function fc(a){return a?[a[0][1]-a[0][0],a[1][1]-a[1][0]]:[NaN,NaN]}var Qo=D,jA=wy("toolbox-dataZoom_"),JA=function(a){V(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.render=function(t,r,n,i){this._brushController||(this._brushController=new $s(n.getZr()),this._brushController.on("brush",at(this._onBrush,this)).mount()),eT(t,r,this,i,n),tT(t,r)},e.prototype.onclick=function(t,r,n){QA[n].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 n={},i=this.ecModel;this._brushController.updateCovers([]);var o=new fl(hl(this.model),i,{include:["grid"]});o.matchOutputRanges(r,i,function(u,v,c){if(c.type==="cartesian2d"){var f=u.brushType;f==="rect"?(s("x",c,v[0]),s("y",c,v[1])):s({lineX:"x",lineY:"y"}[f],c,v)}}),WA(i,n),this._dispatchZoomAction(n);function s(u,v,c){var f=v.getAxis(u),h=f.model,p=l(u,h,i),d=p.findRepresentativeAxisProxy(h).getMinMaxSpan();(d.minValueSpan!=null||d.maxValueSpan!=null)&&(c=ys(0,c.slice(),f.scale.getExtent(),0,d.minValueSpan,d.maxValueSpan)),p&&(n[p.id]={dataZoomId:p.id,startValue:c[0],endValue:c[1]})}function l(u,v,c){var f;return c.eachComponent({mainType:"dataZoom",subType:"select"},function(h){var p=h.getAxisModel(u,v.componentIndex);p&&(f=h)}),f}},e.prototype._dispatchZoomAction=function(t){var r=[];Qo(t,function(n,i){r.push(pt(n))}),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}(ge),QA={zoom:function(){var a=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:a})},back:function(){this._dispatchZoomAction(UA(this.ecModel))}};function hl(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 tT(a,e){a.setIconStatus("back",YA(e)>1?"emphasis":"normal")}function eT(a,e,t,r,n){var i=t._isZoomActive;r&&r.type==="takeGlobalCursor"&&(i=r.key==="dataZoomSelect"?r.dataZoomSelectActive:!1),t._isZoomActive=i,a.setIconStatus("zoom",i?"emphasis":"normal");var o=new fl(hl(a),e,{include:["grid"]}),s=o.makePanelOpts(n,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});t._brushController.setPanels(s).enableBrush(i&&s.length?{brushType:"auto",brushStyle:a.getModel("brushStyle").getItemStyle()}:!1)}_y("dataZoom",function(a){var e=a.getComponent("toolbox",0),t=["feature","dataZoom"];if(!e||e.get(t)==null)return;var r=e.getModel(t),n=[],i=hl(r),o=$f(a,i);Qo(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),Qo(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,v){var c=l.componentIndex,f={type:"select",$fromToolbox:!0,filterMode:r.get("filterMode",!0)||"filter",id:jA+u+c};f[v]=c,n.push(f)}return n});function rT(a){a.registerComponentModel(DA),a.registerComponentView(LA),Rr("saveAsImage",MA),Rr("magicType",EA),Rr("dataView",FA),Rr("dataZoom",JA),Rr("restore",ZA),it(CA)}var aT=["rect","polygon","keep","clear"];function nT(a,e){var t=Jt(a?a.brush:[]);if(t.length){var r=[];D(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(r=r.concat(u))});var n=a&&a.toolbox;q(n)&&(n=n[0]),n||(n={feature:{}},a.toolbox=[n]);var i=n.feature||(n.feature={}),o=i.brush||(i.brush={}),s=o.type||(o.type=[]);s.push.apply(s,r),iT(s),e&&!s.length&&s.push.apply(s,aT)}}function iT(a){var e={};D(a,function(t){e[t]=1}),a.length=0,D(e,function(t,r){a.push(r)})}var hc=D;function pc(a){if(a){for(var e in a)if(a.hasOwnProperty(e))return!0}}function ts(a,e,t){var r={};return hc(e,function(i){var o=r[i]=n();hc(a[i],function(s,l){if(Ot.isValidType(l)){var u={type:l,visual:s};t&&t(u,i),o[l]=new Ot(u),l==="opacity"&&(u=pt(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new Ot(u))}})}),r;function n(){var i=function(){};i.prototype.__hidden=i.prototype;var o=new i;return o}}function Zp(a,e,t){var r;D(t,function(n){e.hasOwnProperty(n)&&pc(e[n])&&(r=!0)}),r&&D(t,function(n){e.hasOwnProperty(n)&&pc(e[n])?a[n]=pt(e[n]):delete a[n]})}function oT(a,e,t,r,n,i){var o={};D(a,function(c){var f=Ot.prepareVisualTypes(e[c]);o[c]=f});var s;function l(c){return Yf(t,s,c)}function u(c,f){Zf(t,s,c,f)}t.each(v);function v(c,f){s=c;var h=t.getRawDataItem(s);if(!(h&&h.visualMap===!1))for(var p=r.call(n,c),d=e[p],g=o[p],y=0,S=g.length;ye[0][1]&&(e[0][1]=i[0]),i[1]e[1][1]&&(e[1][1]=i[1])}return e&&Sc(e)}};function Sc(a){return new Tt(a[0][0],a[1][0],a[0][1]-a[0][0],a[1][1]-a[1][0])}var pT=function(a){V(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 $s(r.getZr())).on("brush",at(this._onBrush,this)).mount()},e.prototype.render=function(t,r,n,i){this.model=t,this._updateController(t,r,n,i)},e.prototype.updateTransform=function(t,r,n,i){Xp(r),this._updateController(t,r,n,i)},e.prototype.updateVisual=function(t,r,n,i){this.updateTransform(t,r,n,i)},e.prototype.updateView=function(t,r,n,i){this._updateController(t,r,n,i)},e.prototype._updateController=function(t,r,n,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var r=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:r,areas:pt(n),$from:r}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:r,areas:pt(n),$from:r})},e.type="brush",e}(te),dT="#ddd",gT=function(a){V(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 n=this.option;!r&&Zp(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:dT},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=$(t,function(r){return xc(this.option,r)},this))},e.prototype.setBrushOption=function(t){this.brushOption=xc(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}(Xt);function xc(a,e){return Ct({brushType:a.brushType,brushMode:a.brushMode,transformable:a.transformable,brushStyle:new ce(a.brushStyle).getItemStyle(),removeOnClick:a.removeOnClick,z:a.z},e,!0)}var yT=["rect","polygon","lineX","lineY","keep","clear"],mT=function(a){V(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.render=function(t,r,n){var i,o,s;r.eachComponent({mainType:"brush"},function(l){i=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=i,this._brushMode=o,D(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===i)?"emphasis":"normal")})},e.prototype.updateView=function(t,r,n){this.render(t,r,n)},e.prototype.getIcons=function(){var t=this.model,r=t.get("icon",!0),n={};return D(t.get("type",!0),function(i){r[i]&&(n[i]=r[i])}),n},e.prototype.onclick=function(t,r,n){var i=this._brushType,o=this._brushMode;n==="clear"?(r.dispatchAction({type:"axisAreaSelect",intervals:[]}),r.dispatchAction({type:"brush",command:"clear",areas:[]})):r.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:n==="keep"?i:i===n?!1:n,brushMode:n==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var r={show:!0,type:yT.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}(ge);function ST(a){a.registerComponentView(pT),a.registerComponentModel(gT),a.registerPreprocessor(nT),a.registerVisual(a.PRIORITY.VISUAL.BRUSH,uT),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"},yr),a.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},yr),Rr("brush",mT)}var xT=function(a){V(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}(Xt),bT=function(a){V(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,n){if(this.group.removeAll(),!!t.get("show")){var i=this.group,o=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),u=Rt(t.get("textBaseline"),t.get("textVerticalAlign")),v=new St({style:At(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),c=v.getBoundingRect(),f=t.get("subtext"),h=new St({style:At(s,{text:f,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,h.silent=!d&&!g,p&&v.on("click",function(){pn(p,"_"+t.get("target"))}),d&&h.on("click",function(){pn(d,"_"+t.get("subtarget"))}),ht(v).eventData=ht(h).eventData=g?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(v),f&&i.add(h);var y=i.getBoundingRect(),S=t.getBoxLayoutParams();S.width=y.width,S.height=y.height;var m=fe(S,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));l||(l=t.get("left")||t.get("right"),l==="middle"&&(l="center"),l==="right"?m.x+=m.width:l==="center"&&(m.x+=m.width/2)),u||(u=t.get("top")||t.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?m.y+=m.height:u==="middle"&&(m.y+=m.height/2),u=u||"top"),i.x=m.x,i.y=m.y,i.markRedraw();var x={align:l,verticalAlign:u};v.setStyle(x),h.setStyle(x),y=i.getBoundingRect();var b=m.margin,_=t.getItemStyle(["color","opacity"]);_.fill=t.get("backgroundColor");var w=new Bt({shape:{x:y.x-b[3],y:y.y-b[0],width:y.width+b[1]+b[3],height:y.height+b[0]+b[2],r:t.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});i.add(w)}},e.type="title",e}(te);function _T(a){a.registerComponentModel(xT),a.registerComponentView(bT)}var bc=function(a){V(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,n){this.mergeDefaultAndTheme(t,n),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||[],n=t.axisType,i=this._names=[],o;n==="category"?(o=[],D(r,function(u,v){var c=ze(Ay(u),""),f;Zt(u)?(f=pt(u),f.value=v):f=v,o.push(f),i.push(c)})):o=r;var s={category:"ordinal",time:"time",value:"number"}[n]||"number",l=this._data=new re([{name:"value",type:s}],this);l.initData(o,i)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(Xt),qp=function(a){V(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=Jn(bc.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}(bc);Ce(qp,_s.prototype);var wT=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e}(te),AT=function(a){V(e,a);function e(t,r,n,i){var o=a.call(this,t,r,n)||this;return o.type=i||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(ke),uo=Math.PI,_c=Dt(),TT=function(a){V(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,n){if(this.model=t,this.api=n,this.ecModel=r,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,n),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(i,t);t.formatTooltip=function(u){var v=l.scale.getLabel({value:u});return ne("nameValue",{noName:!0,value:v})},D(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](i,o,l,t)},this),this._renderAxisLabel(i,s,l,t),this._position(i,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,r){var n=t.get(["label","position"]),i=t.get("orient"),o=DT(t,r),s;n==null||n==="auto"?s=i==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},v={horizontal:0,vertical:uo/2},c=i==="vertical"?o.height:o.width,f=t.getModel("controlStyle"),h=f.get("show",!0),p=h?f.get("itemSize"):0,d=h?f.get("itemGap"):0,g=p+d,y=t.get(["label","rotate"])||0;y=y*uo/180;var S,m,x,b=f.get("position",!0),_=h&&f.get("showPlayBtn",!0),w=h&&f.get("showPrevBtn",!0),A=h&&f.get("showNextBtn",!0),T=0,C=c;b==="left"||b==="bottom"?(_&&(S=[0,0],T+=g),w&&(m=[T,0],T+=g),A&&(x=[C-p,0],C-=g)):(_&&(S=[C-p,0],C-=g),w&&(m=[0,0],T+=g),A&&(x=[C-p,0],C-=g));var L=[T,C];return t.get("inverse")&&L.reverse(),{viewRect:o,mainLength:c,orient:i,rotation:v[i],labelRotation:y,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[i],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[i],playPosition:S,prevBtnPosition:m,nextBtnPosition:x,axisExtent:L,controlSize:p,controlGap:d}},e.prototype._position=function(t,r){var n=this._mainGroup,i=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=Zr(),l=o.x,u=o.y+o.height;Sr(s,s,[-l,-u]),Yn(s,s,-uo/2),Sr(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var v=S(o),c=S(n.getBoundingRect()),f=S(i.getBoundingRect()),h=[n.x,n.y],p=[i.x,i.y];p[0]=h[0]=v[0][0];var d=t.labelPosOpt;if(d==null||lt(d)){var g=d==="+"?0:1;m(h,c,v,1,g),m(p,f,v,1,1-g)}else{var g=d>=0?0:1;m(h,c,v,1,g),p[1]=h[1]+d}n.setPosition(h),i.setPosition(p),n.rotation=i.rotation=t.rotation,y(n),y(i);function y(x){x.originX=v[0][0]-x.x,x.originY=v[1][0]-x.y}function S(x){return[[x.x,x.x+x.width],[x.y,x.y+x.height]]}function m(x,b,_,w,A){x[w]+=_[w][A]-b[w][A]}},e.prototype._createAxis=function(t,r){var n=r.getData(),i=r.get("axisType"),o=CT(r,i);o.getTicks=function(){return n.mapArray(["value"],function(u){return{value:u}})};var s=n.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new AT("value",o,t.axisExtent,i);return l.model=r,l},e.prototype._createGroup=function(t){var r=this[t]=new nt;return this.group.add(r),r},e.prototype._renderAxisLine=function(t,r,n,i){var o=n.getExtent();if(i.get(["lineStyle","show"])){var s=new _e({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:K({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});r.add(s);var l=this._progressLine=new _e({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:ot({lineCap:"round",lineWidth:s.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});r.add(l)}},e.prototype._renderAxisTick=function(t,r,n,i){var o=this,s=i.getData(),l=n.scale.getTicks();this._tickSymbols=[],D(l,function(u){var v=n.dataToCoord(u.value),c=s.getItemModel(u.value),f=c.getModel("itemStyle"),h=c.getModel(["emphasis","itemStyle"]),p=c.getModel(["progress","itemStyle"]),d={x:v,y:0,onclick:at(o._changeTimeline,o,u.value)},g=wc(c,f,r,d);g.ensureState("emphasis").style=h.getItemStyle(),g.ensureState("progress").style=p.getItemStyle(),gi(g);var y=ht(g);c.get("tooltip")?(y.dataIndex=u.value,y.dataModel=i):y.dataIndex=y.dataModel=null,o._tickSymbols.push(g)})},e.prototype._renderAxisLabel=function(t,r,n,i){var o=this,s=n.getLabelModel();if(s.get("show")){var l=i.getData(),u=n.getViewLabels();this._tickLabels=[],D(u,function(v){var c=v.tickValue,f=l.getItemModel(c),h=f.getModel("label"),p=f.getModel(["emphasis","label"]),d=f.getModel(["progress","label"]),g=n.dataToCoord(v.tickValue),y=new St({x:g,y:0,rotation:t.labelRotation-t.rotation,onclick:at(o._changeTimeline,o,c),silent:!1,style:At(h,{text:v.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});y.ensureState("emphasis").style=At(p),y.ensureState("progress").style=At(d),r.add(y),gi(y),_c(y).dataIndex=c,o._tickLabels.push(y)})}},e.prototype._renderControl=function(t,r,n,i){var o=t.controlSize,s=t.rotation,l=i.getModel("controlStyle").getItemStyle(),u=i.getModel(["emphasis","controlStyle"]).getItemStyle(),v=i.getPlayState(),c=i.get("inverse",!0);f(t.nextBtnPosition,"next",at(this._changeTimeline,this,c?"-":"+")),f(t.prevBtnPosition,"prev",at(this._changeTimeline,this,c?"+":"-")),f(t.playPosition,v?"stop":"play",at(this._handlePlayClick,this,!v),!0);function f(h,p,d,g){if(h){var y=Co(Rt(i.get(["controlStyle",p+"BtnSize"]),o),o),S=[0,-y/2,y,y],m=LT(i,p+"Icon",S,{x:h[0],y:h[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:d});m.ensureState("emphasis").style=u,r.add(m),gi(m)}}},e.prototype._renderCurrentPointer=function(t,r,n,i){var o=i.getData(),s=i.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,v={onCreate:function(c){c.draggable=!0,c.drift=at(u._handlePointerDrag,u),c.ondragend=at(u._handlePointerDragend,u),Ac(c,u._progressLine,s,n,i,!0)},onUpdate:function(c){Ac(c,u._progressLine,s,n,i)}};this._currentPointer=wc(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,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,r){var n=this._toAxisCoord(t)[0],i=this._axis,o=br(i.getExtent().slice());n>o[1]&&(n=o[1]),n=0&&(o[i]=+o[i].toFixed(f)),[o,c]}var vo={min:st(an,"min"),max:st(an,"max"),average:st(an,"average"),median:st(an,"median")};function Ca(a,e){if(e){var t=a.getData(),r=a.coordinateSystem,n=r&&r.dimensions;if(!kT(e)&&!q(e.coord)&&q(n)){var i=Kp(e,t,r,a);if(e=pt(e),e.type&&vo[e.type]&&i.baseAxis&&i.valueAxis){var o=Pt(n,i.baseAxis.dim),s=Pt(n,i.valueAxis.dim),l=vo[e.type](t,i.baseDataDim,i.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!q(n))e.coord=[];else for(var u=e.coord,v=0;v<2;v++)vo[u[v]]&&(u[v]=dl(t,t.mapDimension(n[v]),u[v]));return e}}function Kp(a,e,t,r){var n={};return a.valueIndex!=null||a.valueDim!=null?(n.valueDataDim=a.valueIndex!=null?e.getDimension(a.valueIndex):a.valueDim,n.valueAxis=t.getAxis(VT(r,n.valueDataDim)),n.baseAxis=t.getOtherAxis(n.valueAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim)):(n.baseAxis=r.getBaseAxis(),n.valueAxis=t.getOtherAxis(n.baseAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim),n.valueDataDim=e.mapDimension(n.valueAxis.dim)),n}function VT(a,e){var t=a.getData().getDimensionInfo(e);return t&&t.coordDim}function Da(a,e){return a&&a.containData&&e.coord&&!rs(e)?a.containData(e.coord):!0}function NT(a,e,t){return a&&a.containZone&&e.coord&&t.coord&&!rs(e)&&!rs(t)?a.containZone(e.coord,t.coord):!0}function jp(a,e){return a?function(t,r,n,i){var o=i<2?t.coord&&t.coord[i]:t.value;return mn(o,e[i])}:function(t,r,n,i){return mn(t.value,e[i])}}function dl(a,e,t){if(t==="average"){var r=0,n=0;return a.each(e,function(i,o){isNaN(i)||(r+=i,n++)}),r/n}else return t==="median"?a.getMedian(e):a.getDataExtent(e)[t==="max"?1:0]}var co=Dt(),gl=function(a){V(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=ut()},e.prototype.render=function(t,r,n){var i=this,o=this.markerGroupMap;o.each(function(s){co(s).keep=!1}),r.eachSeries(function(s){var l=We.getMarkerModelFromSeries(s,i.type);l&&i.renderSeries(s,l,r,n)}),o.each(function(s){!co(s).keep&&i.group.remove(s.group)})},e.prototype.markKeep=function(t){co(t).keep=!0},e.prototype.toggleBlurSeries=function(t,r){var n=this;D(t,function(i){var o=We.getMarkerModelFromSeries(i,n.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(r?Ly(l):Iy(l))})}})},e.type="marker",e}(te);function Cc(a,e,t){var r=e.coordinateSystem;a.each(function(n){var i=a.getItemModel(n),o,s=U(i.get("x"),t.getWidth()),l=U(i.get("y"),t.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(a.getValues(a.dimensions,n));else if(r){var u=a.get(r.dimensions[0],n),v=a.get(r.dimensions[1],n);o=r.dataToPoint([u,v])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),a.setItemLayout(n,o)})}var zT=function(a){V(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,n){r.eachSeries(function(i){var o=We.getMarkerModelFromSeries(i,"markPoint");o&&(Cc(o.getData(),i,n),this.markerGroupMap.get(i.id).updateLayout())},this)},e.prototype.renderSeries=function(t,r,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,v=u.get(s)||u.set(s,new Un),c=GT(o,t,r);r.setData(c),Cc(r.getData(),t,i),c.each(function(f){var h=c.getItemModel(f),p=h.getShallow("symbol"),d=h.getShallow("symbolSize"),g=h.getShallow("symbolRotate"),y=h.getShallow("symbolOffset"),S=h.getShallow("symbolKeepAspect");if(gt(p)||gt(d)||gt(g)||gt(y)){var m=r.getRawValue(f),x=r.getDataParams(f);gt(p)&&(p=p(m,x)),gt(d)&&(d=d(m,x)),gt(g)&&(g=g(m,x)),gt(y)&&(y=y(m,x))}var b=h.getModel("itemStyle").getItemStyle(),_=Qn(l,"color");b.fill||(b.fill=_),c.setItemVisual(f,{symbol:p,symbolSize:d,symbolRotate:g,symbolOffset:y,symbolKeepAspect:S,style:b})}),v.updateData(c),this.group.add(v.group),c.eachItemGraphicEl(function(f){f.traverse(function(h){ht(h).dataModel=r})}),this.markKeep(v),v.group.silent=r.get("silent")||t.get("silent")},e.type="markPoint",e}(gl);function GT(a,e,t){var r;a?r=$(a&&a.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return K(K({},l),{name:s,ordinalMeta:null})}):r=[{name:"value",type:"float"}];var n=new re(r,t),i=$(t.get("data"),st(Ca,e));a&&(i=Gt(i,st(Da,a)));var o=jp(!!a,r);return n.initData(i,null,o),n}function OT(a){a.registerComponentModel(RT),a.registerComponentView(zT),a.registerPreprocessor(function(e){pl(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var BT=function(a){V(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,n){return new e(t,r,n)},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}(We),nn=Dt(),FT=function(a,e,t,r){var n=a.getData(),i;if(q(r))i=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=se(r.yAxis,r.xAxis);else{var u=Kp(r,n,e,a);s=u.valueAxis;var v=My(n,u.valueDataDim);l=dl(n,v,o)}var c=s.dim==="x"?0:1,f=1-c,h=pt(r),p={coord:[]};h.type=null,h.coord=[],h.coord[f]=-1/0,p.coord[f]=1/0;var d=t.get("precision");d>=0&&le(l)&&(l=+l.toFixed(Math.min(d,20))),h.coord[c]=p.coord[c]=l,i=[h,p,{type:o,valueIndex:r.valueIndex,value:l}]}else i=[]}var g=[Ca(a,i[0]),Ca(a,i[1]),K({},i[2])];return g[2].type=g[2].type||null,Ct(g[2],g[0]),Ct(g[2],g[1]),g};function kn(a){return!isNaN(a)&&!isFinite(a)}function Dc(a,e,t,r){var n=1-a,i=r.dimensions[a];return kn(e[n])&&kn(t[n])&&e[a]===t[a]&&r.getAxis(i).containData(e[a])}function HT(a,e){if(a.type==="cartesian2d"){var t=e[0].coord,r=e[1].coord;if(t&&r&&(Dc(1,t,r,a)||Dc(0,t,r,a)))return!0}return Da(a,e[0])&&Da(a,e[1])}function fo(a,e,t,r,n){var i=r.coordinateSystem,o=a.getItemModel(e),s,l=U(o.get("x"),n.getWidth()),u=U(o.get("y"),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(r.getMarkerPosition)s=r.getMarkerPosition(a.getValues(a.dimensions,e));else{var v=i.dimensions,c=a.get(v[0],e),f=a.get(v[1],e);s=i.dataToPoint([c,f])}if(jn(i,"cartesian2d")){var h=i.getAxis("x"),p=i.getAxis("y"),v=i.dimensions;kn(a.get(v[0],e))?s[0]=h.toGlobalCoord(h.getExtent()[t?0:1]):kn(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 WT=function(a){V(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,n){r.eachSeries(function(i){var o=We.getMarkerModelFromSeries(i,"markLine");if(o){var s=o.getData(),l=nn(o).from,u=nn(o).to;l.each(function(v){fo(l,v,!0,i,n),fo(u,v,!1,i,n)}),s.each(function(v){s.setItemLayout(v,[l.getItemLayout(v),u.getItemLayout(v)])}),this.markerGroupMap.get(i.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,r,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,v=u.get(s)||u.set(s,new Us);this.group.add(v.group);var c=UT(o,t,r),f=c.from,h=c.to,p=c.line;nn(r).from=f,nn(r).to=h,r.setData(p);var d=r.get("symbol"),g=r.get("symbolSize"),y=r.get("symbolRotate"),S=r.get("symbolOffset");q(d)||(d=[d,d]),q(g)||(g=[g,g]),q(y)||(y=[y,y]),q(S)||(S=[S,S]),c.from.each(function(x){m(f,x,!0),m(h,x,!1)}),p.each(function(x){var b=p.getItemModel(x).getModel("lineStyle").getLineStyle();p.setItemLayout(x,[f.getItemLayout(x),h.getItemLayout(x)]),b.stroke==null&&(b.stroke=f.getItemVisual(x,"style").fill),p.setItemVisual(x,{fromSymbolKeepAspect:f.getItemVisual(x,"symbolKeepAspect"),fromSymbolOffset:f.getItemVisual(x,"symbolOffset"),fromSymbolRotate:f.getItemVisual(x,"symbolRotate"),fromSymbolSize:f.getItemVisual(x,"symbolSize"),fromSymbol:f.getItemVisual(x,"symbol"),toSymbolKeepAspect:h.getItemVisual(x,"symbolKeepAspect"),toSymbolOffset:h.getItemVisual(x,"symbolOffset"),toSymbolRotate:h.getItemVisual(x,"symbolRotate"),toSymbolSize:h.getItemVisual(x,"symbolSize"),toSymbol:h.getItemVisual(x,"symbol"),style:b})}),v.updateData(p),c.line.eachItemGraphicEl(function(x){ht(x).dataModel=r,x.traverse(function(b){ht(b).dataModel=r})});function m(x,b,_){var w=x.getItemModel(b);fo(x,b,_,t,i);var A=w.getModel("itemStyle").getItemStyle();A.fill==null&&(A.fill=Qn(l,"color")),x.setItemVisual(b,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:Rt(w.get("symbolOffset",!0),S[_?0:1]),symbolRotate:Rt(w.get("symbolRotate",!0),y[_?0:1]),symbolSize:Rt(w.get("symbolSize"),g[_?0:1]),symbol:Rt(w.get("symbol",!0),d[_?0:1]),style:A})}this.markKeep(v),v.group.silent=r.get("silent")||t.get("silent")},e.type="markLine",e}(gl);function UT(a,e,t){var r;a?r=$(a&&a.dimensions,function(u){var v=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return K(K({},v),{name:u,ordinalMeta:null})}):r=[{name:"value",type:"float"}];var n=new re(r,t),i=new re(r,t),o=new re([],t),s=$(t.get("data"),st(FT,e,a,t));a&&(s=Gt(s,st(HT,a)));var l=jp(!!a,r);return n.initData($(s,function(u){return u[0]}),null,l),i.initData($(s,function(u){return u[1]}),null,l),o.initData($(s,function(u){return u[2]})),o.hasItemOption=!0,{from:n,to:i,line:o}}function $T(a){a.registerComponentModel(BT),a.registerComponentView(WT),a.registerPreprocessor(function(e){pl(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var YT=function(a){V(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,n){return new e(t,r,n)},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}(We),on=Dt(),ZT=function(a,e,t,r){var n=r[0],i=r[1];if(!(!n||!i)){var o=Ca(a,n),s=Ca(a,i),l=o.coord,u=s.coord;l[0]=se(l[0],-1/0),l[1]=se(l[1],-1/0),u[0]=se(u[0],1/0),u[1]=se(u[1],1/0);var v=hs([{},o,s]);return v.coord=[o.coord,s.coord],v.x0=o.x,v.y0=o.y,v.x1=s.x,v.y1=s.y,v}};function Vn(a){return!isNaN(a)&&!isFinite(a)}function Lc(a,e,t,r){var n=1-a;return Vn(e[n])&&Vn(t[n])}function XT(a,e){var t=e.coord[0],r=e.coord[1],n={coord:t,x:e.x0,y:e.y0},i={coord:r,x:e.x1,y:e.y1};return jn(a,"cartesian2d")?t&&r&&(Lc(1,t,r)||Lc(0,t,r))?!0:NT(a,n,i):Da(a,n)||Da(a,i)}function Ic(a,e,t,r,n){var i=r.coordinateSystem,o=a.getItemModel(e),s,l=U(o.get(t[0]),n.getWidth()),u=U(o.get(t[1]),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(r.getMarkerPosition){var v=a.getValues(["x0","y0"],e),c=a.getValues(["x1","y1"],e),f=i.clampData(v),h=i.clampData(c),p=[];t[0]==="x0"?p[0]=f[0]>h[0]?c[0]:v[0]:p[0]=f[0]>h[0]?v[0]:c[0],t[1]==="y0"?p[1]=f[1]>h[1]?c[1]:v[1]:p[1]=f[1]>h[1]?v[1]:c[1],s=r.getMarkerPosition(p,t,!0)}else{var d=a.get(t[0],e),g=a.get(t[1],e),y=[d,g];i.clampData&&i.clampData(y,y),s=i.dataToPoint(y,!0)}if(jn(i,"cartesian2d")){var S=i.getAxis("x"),m=i.getAxis("y"),d=a.get(t[0],e),g=a.get(t[1],e);Vn(d)?s[0]=S.toGlobalCoord(S.getExtent()[t[0]==="x0"?0:1]):Vn(g)&&(s[1]=m.toGlobalCoord(m.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var Mc=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],qT=function(a){V(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,n){r.eachSeries(function(i){var o=We.getMarkerModelFromSeries(i,"markArea");if(o){var s=o.getData();s.each(function(l){var u=$(Mc,function(c){return Ic(s,l,c,i,n)});s.setItemLayout(l,u);var v=s.getItemGraphicEl(l);v.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,r,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,v=u.get(s)||u.set(s,{group:new nt});this.group.add(v.group),this.markKeep(v);var c=KT(o,t,r);r.setData(c),c.each(function(f){var h=$(Mc,function(A){return Ic(c,f,A,t,i)}),p=o.getAxis("x").scale,d=o.getAxis("y").scale,g=p.getExtent(),y=d.getExtent(),S=[p.parse(c.get("x0",f)),p.parse(c.get("x1",f))],m=[d.parse(c.get("y0",f)),d.parse(c.get("y1",f))];br(S),br(m);var x=!(g[0]>S[1]||g[1]m[1]||y[1]"],q(t)&&(t=t.slice(),u=!0);var v=r?t:u?[c(t[0]),c(t[1])]:c(t);if(lt(l))return l.replace("{value}",u?v[0]:v).replace("{value2}",u?v[1]:v);if(gt(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?n[0]+" "+v[1]:t[1]===s[1]?n[1]+" "+v[0]:v[0]+" - "+v[1];return v;function c(f){return f===s[0]?"min":f===s[1]?"max":(+f).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,r=e2([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 n=t.dimensions,i=n.length-1;i>=0;i--){var o=n[i],s=t.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,r=this.option,n={inRange:r.inRange,outOfRange:r.outOfRange},i=r.target||(r.target={}),o=r.controller||(r.controller={});Ct(i,n),Ct(o,n);var s=this.isCategory();l.call(this,i),l.call(this,o),u.call(this,i,"inRange","outOfRange"),v.call(this,o);function l(c){t2(r.color)&&!c.inRange&&(c.inRange={color:r.color.slice().reverse()}),c.inRange=c.inRange||{color:t.get("gradientColor")}}function u(c,f,h){var p=c[f],d=c[h];p&&!d&&(d=c[h]={},Ec(p,function(g,y){if(Ot.isValidType(y)){var S=Jp.get(y,"inactive",s);S!=null&&(d[y]=S,y==="color"&&!d.hasOwnProperty("opacity")&&!d.hasOwnProperty("colorAlpha")&&(d.opacity=[0,0]))}}))}function v(c){var f=(c.inRange||{}).symbol||(c.outOfRange||{}).symbol,h=(c.inRange||{}).symbolSize||(c.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),d=this.getItemSymbol(),g=d||"roundRect";Ec(this.stateList,function(y){var S=this.itemSize,m=c[y];m||(m=c[y]={color:s?p:[p]}),m.symbol==null&&(m.symbol=f&&pt(f)||(s?g:[g])),m.symbolSize==null&&(m.symbolSize=h&&pt(h)||(s?S[0]:[S[0],S[0]])),m.symbol=Pc(m.symbol,function(_){return _==="none"?g:_});var x=m.symbolSize;if(x!=null){var b=-1/0;QT(x,function(_){_>b&&(b=_)}),m.symbolSize=Pc(x,function(_){return r2(_,[0,b],[0,S[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}(Xt),Rc=[20,140],a2=function(a){V(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(n){n.mappingMethod="linear",n.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]=Rc[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=Rc[1])},e.prototype._resetRange=function(){var t=this.getExtent(),r=this.option.range;!r||r.auto?(t.auto=1,this.option.range=t):q(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),D(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=br((this.get("range")||[]).slice());return r[0]>t[1]&&(r[0]=t[1]),r[1]>t[1]&&(r[1]=t[1]),r[0]=n[1]||t<=r[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var r=[];return this.eachTargetSeries(function(n){var i=[],o=n.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&i.push(l)},this),r.push({seriesId:n.id,dataIndex:i})},this),r},e.prototype.getVisualMeta=function(t){var r=kc(this,"outOfRange",this.getExtent()),n=kc(this,"inRange",this.option.range.slice()),i=[];function o(h,p){i.push({value:h,color:t(h,p)})}for(var s=0,l=0,u=n.length,v=r.length;lt[1])break;i.push({color:this.getControllerVisual(l,"color",r),offset:s/n})}return i.push({color:this.getControllerVisual(t[1],"color",r),offset:1}),i},e.prototype._createBarPoints=function(t,r){var n=this.visualMapModel.itemSize;return[[n[0]-r[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-r[1],t[1]]]},e.prototype._createBarGroup=function(t){var r=this._orient,n=this.visualMapModel.get("inverse");return new nt(r==="horizontal"&&!n?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:r==="horizontal"&&n?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:r==="vertical"&&!n?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,r){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,o=n.handleThumbs,s=n.handleLabels,l=i.itemSize,u=i.getExtent(),v=this._applyTransform("left",n.mainGroup);n2([0,1],function(c){var f=o[c];f.setStyle("fill",r.handlesColor[c]),f.y=t[c];var h=Ie(t[c],[0,l[1]],u,!0),p=this.getControllerVisual(h,"symbolSize");f.scaleX=f.scaleY=p/l[0],f.x=l[0]-p/2;var d=Gr(n.handleLabelPoints[c],ua(f,this.group));if(this._orient==="horizontal"){var g=v==="left"||v==="top"?(l[0]-p)/2:(l[0]-p)/-2;d[1]+=g}s[c].setStyle({x:d[0],y:d[1],text:i.formatValueText(this._dataInterval[c]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",n.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,r,n,i){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 f={convertOpacityToAlpha:!0},h=this.getControllerVisual(t,"color",f),p=this.getControllerVisual(t,"symbolSize"),d=Ie(t,s,u,!0),g=l[0]-p/2,y={x:c.x,y:c.y};c.y=d,c.x=g;var S=Gr(v.indicatorLabelPoint,ua(c,this.group)),m=v.indicatorLabel;m.attr("invisible",!1);var x=this._applyTransform("left",v.mainGroup),b=this._orient,_=b==="horizontal";m.setStyle({text:(n||"")+o.formatValueText(r),verticalAlign:_?x:"middle",align:_?"center":x});var w={x:g,y:d,style:{fill:h}},A={style:{x:S[0],y:S[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),m.animateTo(A,T)}else c.attr(w),m.attr(A);this._firstShowIndicator=!1;var C=this._shapes.handleLabels;if(C)for(var L=0;Lo[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,"≈ ",l));var f=this._hoverLinkDataIndices,h=[];(r||Gc(n))&&(h=this._hoverLinkDataIndices=n.findTargetDataIndices(c));var p=Ey(f,h);this._dispatchHighDown("downplay",cn(p[0],n)),this._dispatchHighDown("highlight",cn(p[1],n))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var r;if(Tf(t.target,function(l){var u=ht(l);if(u.dataIndex!=null)return r=u,!0},!0),!!r){var n=this.ecModel.getSeriesByIndex(r.seriesIndex),i=this.visualMapModel;if(i.isTargetSeries(n)){var o=n.getData(r.dataType),s=o.getStore().get(i.getDataDimensionIndex(o),r.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var r=this._shapes.handleLabels;if(r)for(var n=0;n=0&&(i.dimension=o,r.push(i))}}),a.getData().setVisual("visualMeta",r)}}];function f2(a,e,t,r){for(var n=e.targetVisuals[r],i=Ot.prepareVisualTypes(n),o={color:Qn(a.getData(),"color")},s=0,l=i.length;s0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),a.registerAction(u2,v2),D(c2,function(e){a.registerVisual(a.PRIORITY.VISUAL.COMPONENT,e)}),a.registerPreprocessor(h2))}function rd(a){a.registerComponentModel(a2),a.registerComponentView(s2),ed(a)}var p2=function(a){V(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 n=this._mode=this._determineMode();this._pieceList=[],d2[this._mode].call(this,this._pieceList),this._resetSelected(t,r);var i=this.option.categories;this.resetVisual(function(o,s){n==="categories"?(o.mappingMethod="category",o.categories=pt(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=$(this._pieceList,function(l){return l=pt(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,r={},n=Ot.listVisualTypes(),i=this.isCategory();D(t.pieces,function(s){D(n,function(l){s.hasOwnProperty(l)&&(r[l]=1)})}),D(r,function(s,l){var u=!1;D(this.stateList,function(v){u=u||o(t,v,l)||o(t.target,v,l)},this),!u&&D(this.stateList,function(v){(t[v]||(t[v]={}))[l]=Jp.get(l,v==="inRange"?"active":"inactive",i)})},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 n=this.option,i=this._pieceList,o=(r?n:t).selected||{};if(n.selected=o,D(i,function(l,u){var v=this.getSelectedMapKey(l);o.hasOwnProperty(v)||(o[v]=!0)},this),n.selectedMode==="single"){var s=!1;D(i,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=pt(t)},e.prototype.getValueState=function(t){var r=Ot.findPieceIndex(t,this._pieceList);return r!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[r])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var r=[],n=this._pieceList;return this.eachTargetSeries(function(i){var o=[],s=i.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var v=Ot.findPieceIndex(l,n);v===t&&o.push(u)},this),r.push({seriesId:i.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 n=t.interval||[];r=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return r},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var r=[],n=["",""],i=this;function o(v,c){var f=i.getRepresentValue({interval:v});c||(c=i.getValueState(f));var h=t(f,c);v[0]===-1/0?n[0]=h:v[1]===1/0?n[1]=h:r.push({value:v[0],color:h},{value:v[1],color:h})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return D(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:n}},e.type="visualMap.piecewise",e.defaultOption=Jn(Nn.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}(Nn),d2={splitNumber:function(a){var e=this.option,t=Math.min(e.precision,20),r=this.getExtent(),n=e.splitNumber;n=Math.max(parseInt(n,10),1),e.splitNumber=n;for(var i=(r[1]-r[0])/n;+i.toFixed(t)!==i&&t<5;)t++;e.precision=t,i=+i.toFixed(t),e.minOpen&&a.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o","≥"][r[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,n)},this)}};function Hc(a,e){var t=a.inverse;(a.orient==="vertical"?!t:t)&&e.reverse()}var g2=function(a){V(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,n=r.get("textGap"),i=r.textStyleModel,o=i.getFont(),s=i.getTextColor(),l=this._getItemAlign(),u=r.itemSize,v=this._getViewData(),c=v.endsText,f=se(r.get("showLabel",!0),!c),h=!r.get("selectedMode");c&&this._renderEndsText(t,c[0],u,f,l),D(v.viewPieceList,function(p){var d=p.piece,g=new nt;g.onclick=at(this._onItemClick,this,d),this._enableHoverLink(g,p.indexInModelPieceList);var y=r.getRepresentValue(d);if(this._createItemSymbol(g,y,[0,0,u[0],u[1]],h),f){var S=this.visualMapModel.getValueState(y);g.add(new St({style:{x:l==="right"?-n:u[0]+n,y:u[1]/2,text:d.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:S==="outOfRange"?.5:1},silent:h}))}t.add(g)},this),c&&this._renderEndsText(t,c[1],u,f,l),Ry(r.get("orient"),t,r.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,r){var n=this;t.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(o){var s=n.visualMapModel;s.option.hoverLink&&n.api.dispatchAction({type:o,batch:cn(s.findTargetDataIndices(r),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,r=t.option;if(r.orient==="vertical")return td(t,this.api,t.itemSize);var n=r.align;return(!n||n==="auto")&&(n="left"),n},e.prototype._renderEndsText=function(t,r,n,i,o){if(r){var s=new nt,l=this.visualMapModel.textStyleModel;s.add(new St({style:At(l,{x:i?o==="right"?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?o:"center",text:r})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,r=$(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),n=t.get("text"),i=t.get("orient"),o=t.get("inverse");return(i==="horizontal"?o:!o)?r.reverse():n&&(n=n.slice().reverse()),{viewPieceList:r,endsText:n}},e.prototype._createItemSymbol=function(t,r,n,i){var o=ve(this.getControllerVisual(r,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(r,"color"));o.silent=i,t.add(o)},e.prototype._onItemClick=function(t){var r=this.visualMapModel,n=r.option,i=n.selectedMode;if(i){var o=pt(n.selected),s=r.getSelectedMapKey(t);i==="single"||i===!0?(o[s]=!0,D(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(Qp);function ad(a){a.registerComponentModel(p2),a.registerComponentView(g2),ed(a)}function y2(a){it(rd),it(ad)}var m2={label:{enabled:!0},decal:{show:!1}},Wc=Dt(),S2={};function x2(a,e){var t=a.getModel("aria");if(!t.get("enabled"))return;var r=pt(m2);Ct(r.label,a.getLocaleModel().get("aria"),!1),Ct(t.option,r,!1),n(),i();function n(){var u=t.getModel("decal"),v=u.get("show");if(v){var c=ut();a.eachSeries(function(f){if(!f.isColorBySeries()){var h=c.get(f.type);h||(h={},c.set(f.type,h)),Wc(f).scope=h}}),a.eachRawSeries(function(f){if(a.isSeriesFiltered(f))return;if(gt(f.enableAriaDecal)){f.enableAriaDecal();return}var h=f.getData();if(f.isColorBySeries()){var S=bo(f.ecModel,f.name,S2,a.getSeriesCount()),m=h.getVisual("decal");h.setVisual("decal",x(m,S))}else{var p=f.getRawData(),d={},g=Wc(f).scope;h.each(function(b){var _=h.getRawIndex(b);d[_]=b});var y=p.count();p.each(function(b){var _=d[b],w=p.getName(b)||b+"",A=bo(f.ecModel,w,g,y),T=h.getItemVisual(_,"decal");h.setItemVisual(_,"decal",x(T,A))})}function x(b,_){var w=b?K(K({},_),b):_;return w.dirty=!0,w}})}}function i(){var u=e.getZr().dom;if(u){var v=a.getLocaleModel().get("aria"),c=t.getModel("label");if(c.option=ot(c.option,v),!!c.get("enabled")){if(u.setAttribute("role","img"),c.get("description")){u.setAttribute("aria-label",c.get("description"));return}var f=a.getSeriesCount(),h=c.get(["data","maxCount"])||10,p=c.get(["series","maxCount"])||10,d=Math.min(f,p),g;if(!(f<1)){var y=s();if(y){var S=c.get(["general","withTitle"]);g=o(S,{title:y})}else g=c.get(["general","withoutTitle"]);var m=[],x=f>1?c.get(["series","multiple","prefix"]):c.get(["series","single","prefix"]);g+=o(x,{seriesCount:f}),a.eachSeries(function(A,T){if(T1?c.get(["series","multiple",M]):c.get(["series","single",M]),C=o(C,{seriesId:A.seriesIndex,seriesName:A.get("name"),seriesType:l(A.subType)});var I=A.getData();if(I.count()>h){var P=c.get(["data","partialData"]);C+=o(P,{displayCnt:h})}else C+=c.get(["data","allData"]);for(var E=c.get(["data","separator","middle"]),R=c.get(["data","separator","end"]),k=c.get(["data","excludeDimensionId"]),N=[],F=0;F":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},w2=function(){function a(e){var t=this._condVal=lt(e)?new RegExp(e):Vy(e)?e:null;if(t==null){var r="";It(r)}}return a.prototype.evaluate=function(e){var t=typeof e;return lt(t)?this._condVal.test(e):le(t)?this._condVal.test(e+""):!1},a}(),A2=function(){function a(){}return a.prototype.evaluate=function(){return this.value},a}(),T2=function(){function a(){}return a.prototype.evaluate=function(){for(var e=this.children,t=0;t2&&r.push(n),n=[I,P]}function v(I,P,E,R){zr(I,E)&&zr(P,R)||n.push(I,P,E,R,E,R)}function c(I,P,E,R,k,N){var F=Math.abs(P-I),H=Math.tan(F/4)*4/3,X=PA:L2&&r.push(n),r}function ns(a,e,t,r,n,i,o,s,l,u){if(zr(a,t)&&zr(e,r)&&zr(n,o)&&zr(i,s)){l.push(o,s);return}var v=2/u,c=v*v,f=o-a,h=s-e,p=Math.sqrt(f*f+h*h);f/=p,h/=p;var d=t-a,g=r-e,y=n-o,S=i-s,m=d*d+g*g,x=y*y+S*S;if(m=0&&A=0){l.push(o,s);return}var T=[],C=[];Sn(a,t,n,o,.5,T),Sn(e,r,i,s,.5,C),ns(T[0],C[0],T[1],C[1],T[2],C[2],T[3],C[3],l,u),ns(T[4],C[4],T[5],C[5],T[6],C[6],T[7],C[7],l,u)}function O2(a,e){var t=as(a),r=[];e=e||1;for(var n=0;n0)for(var u=0;uMath.abs(u),c=id([l,u],v?0:1,e),f=(v?s:u)/c.length,h=0;hn,o=id([r,n],i?0:1,e),s=i?"width":"height",l=i?"height":"width",u=i?"x":"y",v=i?"y":"x",c=a[s]/o.length,f=0;f1?null:new mt(d*l+a,d*u+e)}function H2(a,e,t){var r=new mt;mt.sub(r,t,e),r.normalize();var n=new mt;mt.sub(n,a,e);var i=n.dot(r);return i}function Mr(a,e){var t=a[a.length-1];t&&t[0]===e[0]&&t[1]===e[1]||a.push(e)}function W2(a,e,t){for(var r=a.length,n=[],i=0;io?(u.x=v.x=s+i/2,u.y=l,v.y=l+o):(u.y=v.y=l+o/2,u.x=s,v.x=s+i),W2(e,u,v)}function zn(a,e,t,r){if(t===1)r.push(e);else{var n=Math.floor(t/2),i=a(e);zn(a,i[0],n,r),zn(a,i[1],t-n,r)}return r}function U2(a,e){for(var t=[],r=0;r0;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 Bn(a){var e=1/0,t=1/0,r=-1/0,n=-1/0,i=$(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),n=Math.max(c,n),[v,c]}),o=$(i,function(s,l){return{cp:s,z:Q2(s[0],s[1],e,t,r,n),path:a[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function ld(a){return Z2(a.path,a.count)}function is(){return{fromIndividuals:[],toIndividuals:[],count:0}}function tC(a,e,t){var r=[];function n(b){for(var _=0;_=0;n--)if(!t[n].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var i=l.length,u=Math.ceil(i/2);t[n].many=l.slice(u,i),t[s].many=l.slice(0,u),s++}return t}var rC={clone:function(a){for(var e=[],t=1-Math.pow(1-a.path.style.opacity,1/a.count),r=0;r0))return;var s=r.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,v;Jc(a)&&(u=a,v=e),Jc(e)&&(u=e,v=a);function c(y,S,m,x,b){var _=y.many,w=y.one;if(_.length===1&&!b){var A=S?_[0]:w,T=S?w:_[0];if(Gn(A))c({many:[A],one:T},!0,m,x,!0);else{var C=s?ot({delay:s(m,x)},l):l;ml(A,T,C),i(A,T,A,T,C)}}else for(var L=ot({dividePath:rC[t],individualDelay:s&&function(k,N,F,H){return s(k+m,x)}},l),M=S?tC(_,w,L):eC(w,_,L),I=M.fromIndividuals,P=M.toIndividuals,E=I.length,R=0;Re.length,h=u?Qc(v,u):Qc(f?e:a,[f?a:e]),p=0,d=0;dud))for(var i=r.getIndices(),o=0;o0&&_.group.traverse(function(A){A instanceof Wt&&!A.animators.length&&A.animateFrom({style:{opacity:0}},w)})})}function nf(a){var e=a.getModel("universalTransition").get("seriesKey");return e||a.id}function of(a){return q(a)?a.sort().join(","):a}function Xe(a){if(a.hostModel)return a.hostModel.getModel("universalTransition").get("divideShape")}function uC(a,e){var t=ut(),r=ut(),n=ut();return D(a.oldSeries,function(i,o){var s=a.oldDataGroupIds[o],l=a.oldData[o],u=nf(i),v=of(u);r.set(v,{dataGroupId:s,data:l}),q(u)&&D(u,function(c){n.set(c,{key:v,dataGroupId:s,data:l})})}),D(e.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.get("dataGroupId"),s=i.getData(),l=nf(i),u=of(l),v=r.get(u);if(v)t.set(u,{oldSeries:[{dataGroupId:v.dataGroupId,divide:Xe(v.data),data:v.data}],newSeries:[{dataGroupId:o,divide:Xe(s),data:s}]});else if(q(l)){var c=[];D(l,function(p){var d=r.get(p);d.data&&c.push({dataGroupId:d.dataGroupId,divide:Xe(d.data),data:d.data})}),c.length&&t.set(u,{oldSeries:c,newSeries:[{dataGroupId:o,data:s,divide:Xe(s)}]})}else{var f=n.get(l);if(f){var h=t.get(f.key);h||(h={oldSeries:[{dataGroupId:f.dataGroupId,data:f.data,divide:Xe(f.data)}],newSeries:[]},t.set(f.key,h)),h.newSeries.push({dataGroupId:o,data:s,divide:Xe(s)})}}}}),t}function sf(a,e){for(var t=0;t=0&&n.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Xe(e.oldData[s]),groupIdDim:o.dimension})}),D(Jt(a.to),function(o){var s=sf(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();i.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:Xe(l),groupIdDim:o.dimension})}}),n.length>0&&i.length>0&&vd(n,i,r)}function cC(a){a.registerUpdateLifecycle("series:beforeupdate",function(e,t,r){D(Jt(r.seriesTransition),function(n){D(Jt(n.to),function(i){for(var o=r.updatedSeries,s=0;s"u"?G:getComputedStyle(document.documentElement).getPropertyValue(O).trim()||G}const v=me(""),c=me("");let f=null;function h(){const O=new Date;c.value=`${O.getFullYear()}-${String(O.getMonth()+1).padStart(2,"0")}-${String(O.getDate()).padStart(2,"0")}`,v.value=`${String(O.getHours()).padStart(2,"0")}:${String(O.getMinutes()).padStart(2,"0")}:${String(O.getSeconds()).padStart(2,"0")}`}h();const p=me("success"),d=Yt(()=>`is-${p.value}`),g=Yt(()=>p.value==="success"?"已连接":p.value==="warning"?"高延迟":"断连"),y=Yt(()=>n.value.filter(O=>O.state!=="offline").length),S=Yt(()=>i.value.filter(O=>O.status==="running"||O.status==="assigned").length),m=Yt(()=>[{key:"platform-config",label:"平台配置",icon:Ad,primary:!0,hint:"进入地图编辑 / 平台搭建(map-editor)",to:"/admin/map-editor"},{key:"mission",label:"任务编排",icon:ci,to:"/admin/task-templates"},{key:"cars",label:"AGV 配置",icon:_l,to:"/admin/cars"},{key:"auth",label:"权限配置",icon:Td,to:"/admin/config/system-center?tab=auth"},{key:"system",label:"系统配置",icon:Cd,to:"/admin/config/system-center?tab=system"},{key:"ops",label:"异常处理",icon:Dd,to:"/admin/config/ops-center?tab=ops"},{key:"tasks",label:"任务管理",icon:Ld,to:"/admin/config/strategy?tab=task"},{key:"add",label:"添加",icon:Id,hint:"自定义快捷入口(待实现)",action:()=>{Md.info("自定义快捷入口 — 即将在 v1.8 中开放")}}]);function x(O){O.action?O.action():O.to&&e.push(O.to)}function b(O,G=16){const J=[];let Y=50+O*7%30;for(let vt=0;vt`${ft===0?"M":"L"}${(ft*et).toFixed(2)},${(Q-vt/100*Q*.85-Q*.05).toFixed(2)}`).join(" "),ct=`${B} L${W},${Q} L0,${Q} Z`;return{line:B,area:ct}}const _=Yt(()=>Math.max(12,Math.round(t.value.length*.7))),w=Yt(()=>Math.max(6,Math.round(n.value.length*.27))),A=Yt(()=>Math.max(265,t.value.length*12)),T=Yt(()=>Math.max(10,Math.round(A.value*.04)));function C(O,G){if(O===0&&G===0)return{dir:"flat",arrow:"→",text:"0%"};const J=G-O;if(Math.abs(J)<.5)return{dir:"flat",arrow:"→",text:"0%"};const Y=O===0?100:Math.round(J/O*100);return J>0?{dir:"up",arrow:"↑",text:`${Y}%`}:{dir:"down",arrow:"↓",text:`${Math.abs(Y)}%`}}const L=Yt(()=>[{key:"devices",label:"设备数",value:n.value.length,icon:Pd,tone:"info",trend:C(n.value.length-2,n.value.length)},{key:"sites",label:"工作站数",value:t.value.length,icon:Ed,tone:"success",trend:C(t.value.length-1,t.value.length)},{key:"shelves",label:"货架数",value:_.value,icon:Rd,tone:"info",trend:C(_.value-5,_.value)},{key:"charger",label:"充电桩数",value:w.value,icon:kd,tone:"warning",trend:{dir:"flat",arrow:"→",text:"0%"}},{key:"used",label:"已用储位数",value:A.value,icon:ci,tone:"success",trend:C(A.value-12,A.value)},{key:"free",label:"空余储位数",value:T.value,icon:ci,tone:"idle",trend:C(T.value+3,T.value)}].map((G,J)=>{const Y=b(J+1);return{...G,sparkLine:Y.line,sparkArea:Y.area}})),M=Yt(()=>{const O=i.value.length||1,G={货架交接:{pct:0,tone:"info"},"搬运/落位":{pct:0,tone:"success"},"Z1 任务":{pct:0,tone:"warning"},其他:{pct:0,tone:"idle"}};i.value.forEach(Y=>{const W=Y.typeName??"";W.includes("shelf")||W.includes("货架")?G.货架交接.pct++:W.includes("move")||W.includes("搬运")||W.includes("落位")?G["搬运/落位"].pct++:W.includes("z1")||W.includes("Z1")?G["Z1 任务"].pct++:G.其他.pct++});let J=Object.entries(G).map(([Y,W])=>({name:Y,pct:Math.round(W.pct/O*100),tone:W.tone}));return J.every(Y=>Y.pct===0)&&(J=[{name:"货架交接",pct:45,tone:"info"},{name:"搬运/落位",pct:15,tone:"success"},{name:"Z1 任务",pct:15,tone:"warning"},{name:"其他",pct:25,tone:"idle"}]),J}),I=Yt(()=>n.value.length===0),P=Yt(()=>{const O=n.value.length||12,G={idle:0,running:0,charging:0,paused:0,fault:0,offline:0};n.value.forEach(Y=>{G[Y.state]=(G[Y.state]??0)+1});const J=I.value;return[{key:"running",label:"执行中",value:J?Math.round(O*.45):G.running,color:u("--mg-status-info","#3b82f6")},{key:"idle",label:"空闲",value:J?Math.round(O*.3):G.idle,color:u("--mg-status-success","#22c55e")},{key:"charging",label:"充电中",value:J?Math.round(O*.1):G.charging,color:u("--mg-status-warning","#f59e0b")},{key:"paused",label:"已暂停",value:J?Math.round(O*.05):G.paused,color:u("--mg-status-idle","#94a3b8")},{key:"fault",label:"故障",value:J?Math.round(O*.05):G.fault,color:u("--mg-status-danger","#ef4444")},{key:"offline",label:"离线",value:J?Math.round(O*.05):G.offline,color:u("--mg-text-faint","#a8a0c0")}]}),E=Yt(()=>P.value.reduce((O,G)=>O+G.value,0)),R=Yt(()=>{const O=new Date,G=[];for(let J=287;J>=0;J--){const Y=O.getTime()-J*5*60*1e3,W=J/288*Math.PI*4,Q=Math.round(8+Math.sin(W)*5+Math.cos(W*1.3)*3+(Math.random()*2-1)),et=Math.round(3+Math.sin(W*1.7)*2+Math.cos(W*.6)*1.5+(Math.random()*1-.5));G.push([Y,Math.max(0,Q),Math.max(0,et)])}return G});function k(){const O=new Date(Date.now()-Math.random()*1e3*60*60*6);return`${String(O.getHours()).padStart(2,"0")}:${String(O.getMinutes()).padStart(2,"0")}`}const N=me([{name:"alarm",label:"故障告警",count:0,tone:"danger"},{name:"abnTask",label:"异常任务",count:4,tone:"warning",items:[{text:"AGV-021 路径阻塞 · 等待解锁",time:k()},{text:"M-1024 调度超时",time:k()},{text:"M-1027 取货失败",time:k()},{text:"搬运任务 #913 因充电中断",time:k()}]},{name:"comm",label:"通信异常",count:0,tone:"info"},{name:"server",label:"服务器报警",count:2,tone:"warning",items:[{text:"SimpleScheduler · CPU 持续 85%",time:k()},{text:"WebAPI · 90% 内存使用率",time:k()}]}]),F=Yt(()=>N.value.filter(O=>O.tone==="danger"||O.tone==="warning").reduce((O,G)=>O+G.count,0));let H=null;function X(){if(!o.value)return;H?.dispose(),H=Wl(o.value,void 0,{renderer:"canvas"});const O=u("--mg-status-info","#3b82f6"),G=u("--mg-status-success","#22c55e"),J=u("--mg-text-muted","#606266"),Y=u("--mg-divider","rgba(255,255,255,0.08)"),W=R.value;H.setOption({backgroundColor:"transparent",grid:{left:36,right:16,top:22,bottom:28},tooltip:{trigger:"axis",axisPointer:{type:"line",lineStyle:{type:"dashed",color:J}},formatter:Q=>{const et=Q,B=new Date(et[0].value[0]),ct=`${String(B.getHours()).padStart(2,"0")}:${String(B.getMinutes()).padStart(2,"0")}`;return et.map(vt=>` ${vt.seriesName}: ${vt.value[1]}`).join("
")+`
${ct}`}},legend:{show:!1},xAxis:{type:"time",axisLine:{lineStyle:{color:Y}},axisLabel:{color:J,fontSize:11,formatter:Q=>{const et=new Date(Q);return`${String(et.getHours()).padStart(2,"0")}:00`}},splitLine:{show:!1}},yAxis:{type:"value",axisLine:{show:!1},axisLabel:{color:J,fontSize:11,fontFamily:"JetBrains Mono, monospace"},splitLine:{lineStyle:{color:Y,type:"dashed"}}},series:[{name:"已完成",type:"line",smooth:!0,showSymbol:!1,data:W.map(Q=>[Q[0],Q[1]]),lineStyle:{width:2,color:G},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:`${G}55`},{offset:1,color:`${G}00`}]}},itemStyle:{color:G}},{name:"执行中",type:"line",smooth:!0,showSymbol:!1,data:W.map(Q=>[Q[0],Q[2]]),lineStyle:{width:2,color:O},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:`${O}55`},{offset:1,color:`${O}00`}]}},itemStyle:{color:O}}]})}let j=null;function rt(){if(!s.value)return;j?.dispose(),j=Wl(s.value,void 0,{renderer:"canvas"});const O=u("--mg-text-light","#1a0f3d"),J=!O.startsWith("rgba(255")&&O.toLowerCase()!=="#fff"&&O.toLowerCase()!=="#ffffff"?"#ffffff":"rgba(28,14,62,0.95)",Y=P.value;j.setOption({backgroundColor:"transparent",tooltip:{trigger:"item",formatter:"{b}: {c} 台 ({d}%)"},color:Y.map(W=>W.color),series:[{name:"AGV 状态",type:"pie",radius:["62%","88%"],center:["50%","50%"],avoidLabelOverlap:!1,itemStyle:{borderColor:J,borderWidth:2,borderRadius:3},emphasis:{itemStyle:{shadowBlur:12,shadowColor:"rgba(124, 58, 237, 0.30)"},scale:!0,scaleSize:4},label:{show:!1},labelLine:{show:!1},data:Y.map(W=>({name:W.label,value:W.value}))}]})}function tt(){H?.resize(),j?.resize()}return fd(async()=>{[t.value,r.value,n.value,i.value]=await Promise.all([Ky(),jy(),Jy(),Qy()]),r.value,await hd(),X(),rt(),window.addEventListener("resize",tt),f=setInterval(h,1e3)}),pd(()=>{window.removeEventListener("resize",tt),f&&clearInterval(f),H?.dispose(),H=null,j?.dispose(),j=null}),(O,G)=>{const J=yd,Y=dd,W=wd,Q=bd,et=xd;return bt(),Lt("div",fC,[z("section",hC,[z("div",pC,[z("span",{class:Se(["status-conn",p.value])},[z("span",{class:Se(["mg-live-dot",d.value])},null,2),z("span",null,yt(g.value),1)],2),G[4]||(G[4]=z("span",{class:"status-divider"},null,-1)),z("span",dC,[G[1]||(G[1]=z("span",{class:"status-stat-label"},"在线 AGV",-1)),z("span",gC,[$e(yt(y.value)+" ",1),z("span",yC,"/ "+yt(n.value.length||"—"),1)])]),G[5]||(G[5]=z("span",{class:"status-divider"},null,-1)),z("span",mC,[G[2]||(G[2]=z("span",{class:"status-stat-label"},"告警",-1)),z("span",{class:Se(["status-stat-value mg-num",{"is-danger":F.value>0}])},yt(F.value),3)]),G[6]||(G[6]=z("span",{class:"status-divider"},null,-1)),z("span",SC,[G[3]||(G[3]=z("span",{class:"status-stat-label"},"活跃任务",-1)),z("span",xC,yt(S.value),1)])]),z("div",bC,[z("span",_C,[z("span",wC,yt(c.value),1),z("span",AC,yt(v.value),1)])])]),z("section",TC,[G[13]||(G[13]=z("div",{class:"hero-bg","aria-hidden":"true"},[z("div",{class:"hero-orb hero-orb-a"}),z("div",{class:"hero-orb hero-orb-b"}),z("div",{class:"hero-grid"})],-1)),z("div",CC,[G[7]||(G[7]=z("div",{class:"hero-tag"},[z("span",{class:"tag-dot"}),z("span",null,"智能调度 · 一站式平台")],-1)),G[8]||(G[8]=z("h1",{class:"hero-title"},"迷毂智能调度平台",-1)),G[9]||(G[9]=z("p",{class:"hero-desc"},"以下是系统快捷入口,也可以通过点击「添加」功能进行调整",-1)),z("div",DC,[(bt(!0),Lt(Ye,null,Ze(m.value,(B,ct)=>(bt(),Lt("button",{key:B.key,class:Se(["quick-item",{primary:B.primary}]),style:ui({animationDelay:`${ct*60}ms`}),title:B.hint??B.label,onClick:vt=>x(B)},[z("span",IC,[$t(J,{size:22},{default:Ht(()=>[(bt(),vi(bl(B.icon)))]),_:2},1024)]),z("span",MC,yt(B.label),1)],14,LC))),128))])]),z("div",PC,[G[12]||(G[12]=z("div",{class:"hero-glow"},null,-1)),(bt(),Lt("svg",EC,[G[10]||(G[10]=xl('',4)),z("g",RC,[(bt(),Lt(Ye,null,Ze(4,B=>z("g",{key:`shelf-${B}`},[z("rect",{x:140+(B-1)*60,y:"130",width:"40",height:"70",rx:"3",fill:"url(#boxGrad2)",opacity:"0.85"},null,8,kC),z("rect",{x:146+(B-1)*60,y:"138",width:"28",height:"6",fill:"rgba(255,255,255,0.18)"},null,8,VC),z("rect",{x:146+(B-1)*60,y:"152",width:"28",height:"6",fill:"rgba(255,255,255,0.12)"},null,8,NC),z("rect",{x:146+(B-1)*60,y:"166",width:"28",height:"6",fill:"rgba(255,255,255,0.10)"},null,8,zC),z("rect",{x:146+(B-1)*60,y:"180",width:"28",height:"6",fill:"rgba(255,255,255,0.08)"},null,8,GC)])),64))]),G[11]||(G[11]=xl('AGV-021 · 92%SHELF-A03 · OK',7))]))])]),z("section",OC,[(bt(!0),Lt(Ye,null,Ze(L.value,B=>(bt(),Lt("div",{class:"bento bento-kpi",key:B.key},[z("div",{class:Se(["kpi-accent",`tone-${B.tone}`])},null,2),z("div",BC,[z("div",FC,[$t(J,{size:18,class:Se(["kpi-icon-sm",`tone-${B.tone}`])},{default:Ht(()=>[(bt(),vi(bl(B.icon)))]),_:2},1032,["class"]),z("span",HC,yt(B.label),1)]),z("div",WC,[z("span",UC,yt(B.value),1),z("span",{class:Se(["kpi-trend",`trend-${B.trend.dir}`])},[z("span",$C,yt(B.trend.arrow),1),z("span",YC,yt(B.trend.text),1)],2)])]),(bt(),Lt("svg",ZC,[z("defs",null,[z("linearGradient",{id:`spark-grad-${B.key}`,x1:"0",y1:"0",x2:"0",y2:"1"},[z("stop",{offset:"0%","stop-color":B.tone==="danger"?"var(--mg-status-danger)":B.tone==="warning"?"var(--mg-status-warning)":"var(--mg-primary-hover)","stop-opacity":"0.50"},null,8,qC),z("stop",{offset:"100%","stop-color":B.tone==="danger"?"var(--mg-status-danger)":B.tone==="warning"?"var(--mg-status-warning)":"var(--mg-primary-hover)","stop-opacity":"0"},null,8,KC)],8,XC)]),z("path",{d:B.sparkArea,fill:`url(#spark-grad-${B.key})`},null,8,jC),z("path",{d:B.sparkLine,fill:"none","stroke-width":"1.5",stroke:B.tone==="danger"?"var(--mg-status-danger)":B.tone==="warning"?"var(--mg-status-warning)":"var(--mg-primary-hover)"},null,8,JC)]))]))),128)),$t(Y,{shadow:"never",class:"bento bento-trend"},{header:Ht(()=>[z("div",QC,[z("span",tD,[$t(J,null,{default:Ht(()=>[$t(Oa(md))]),_:1}),G[14]||(G[14]=$e(" 24h 任务趋势 ",-1))]),G[15]||(G[15]=z("span",{class:"card-tip mg-num"},"最近 24 小时 · 5 分钟粒度",-1))])]),default:Ht(()=>[z("div",{ref_key:"trendChartRef",ref:o,class:"trend-chart"},null,512)]),_:1}),$t(Y,{shadow:"never",class:"bento bento-agv"},{header:Ht(()=>[z("div",eD,[z("span",rD,[$t(J,null,{default:Ht(()=>[$t(Oa(_l))]),_:1}),G[16]||(G[16]=$e(" AGV 状态分布 ",-1))]),z("span",aD,[$e(yt(E.value)+" 台",1),I.value?(bt(),Lt("span",nD,"·示例")):wl("",!0)])])]),default:Ht(()=>[z("div",iD,[z("div",oD,[z("div",{ref_key:"agvChartRef",ref:s,class:"agv-chart"},null,512),z("div",sD,[z("div",lD,yt(E.value),1),G[17]||(G[17]=z("div",{class:"agv-center-label"},"总台数",-1))])]),z("ul",uD,[(bt(!0),Lt(Ye,null,Ze(P.value,B=>(bt(),Lt("li",{key:B.key},[z("span",{class:"dot",style:ui({background:B.color})},null,4),z("span",vD,yt(B.label),1),z("span",cD,yt(B.value),1),z("span",fD,yt(E.value>0?Math.round(B.value/E.value*100):0)+"%",1)]))),128))])])]),_:1}),$t(Y,{shadow:"never",class:"bento bento-ratio"},{header:Ht(()=>[z("div",hD,[z("span",pD,[$t(J,null,{default:Ht(()=>[$t(Oa(Sd))]),_:1}),G[18]||(G[18]=$e(" 各任务占比 ",-1))]),z("span",dD,"总计 "+yt(i.value.length)+" 个任务",1)])]),default:Ht(()=>[z("div",gD,[(bt(!0),Lt(Ye,null,Ze(M.value,B=>(bt(),Lt("span",{key:B.name,class:Se(["ratio-seg",`tone-${B.tone}`]),style:ui({width:`${B.pct}%`}),title:`${B.name} ${B.pct}%`},[B.pct>=8?(bt(),Lt("span",mD,yt(B.pct)+"%",1)):wl("",!0)],14,yD))),128))]),z("ul",SD,[(bt(!0),Lt(Ye,null,Ze(M.value,B=>(bt(),Lt("li",{key:B.name},[z("span",{class:Se(["dot",`tone-${B.tone}`])},null,2),z("span",xD,yt(B.name),1),z("span",bD,yt(B.pct)+"%",1)]))),128))])]),_:1}),$t(Y,{shadow:"never",class:"bento bento-todo"},{header:Ht(()=>[z("div",_D,[z("span",wD,[$t(J,null,{default:Ht(()=>[$t(Oa(_d))]),_:1}),G[19]||(G[19]=$e(" 待办事项 ",-1))]),$t(W,{class:"more-link",underline:"never"},{default:Ht(()=>[...G[20]||(G[20]=[$e("详情 ›",-1)])]),_:1})])]),default:Ht(()=>[$t(et,{modelValue:l.value,"onUpdate:modelValue":G[0]||(G[0]=B=>l.value=B),class:"todo-tabs"},{default:Ht(()=>[(bt(!0),Lt(Ye,null,Ze(N.value,B=>(bt(),vi(Q,{key:B.name,name:B.name},{label:Ht(()=>[z("span",AD,[$e(yt(B.label)+" ",1),z("em",{class:Se(["tab-count",B.tone])},yt(B.count),3)])]),default:Ht(()=>[B.count===0?(bt(),Lt("div",TD,[...G[21]||(G[21]=[z("svg",{width:"120",height:"80",viewBox:"0 0 120 80",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[z("defs",null,[z("linearGradient",{id:"empGrad",x1:"0",y1:"0",x2:"1",y2:"1"},[z("stop",{offset:"0%","stop-color":"var(--mg-primary-hover)"}),z("stop",{offset:"100%","stop-color":"var(--mg-primary-active)"})])]),z("ellipse",{cx:"60",cy:"68",rx:"40",ry:"6",fill:"rgba(var(--mg-accent-rgb),0.15)"}),z("rect",{x:"34",y:"28",width:"52",height:"32",rx:"4",fill:"url(#empGrad)",opacity:"0.8"}),z("rect",{x:"40",y:"34",width:"40",height:"3",rx:"1.5",fill:"rgba(255,255,255,0.4)"}),z("rect",{x:"40",y:"42",width:"30",height:"3",rx:"1.5",fill:"rgba(255,255,255,0.30)"}),z("rect",{x:"40",y:"50",width:"36",height:"3",rx:"1.5",fill:"rgba(255,255,255,0.20)"}),z("circle",{cx:"80",cy:"22",r:"6",fill:"var(--mg-accent)",opacity:"0.85"}),z("path",{d:"M77 22h6M80 19v6",stroke:"var(--mg-bg-aside-2)","stroke-width":"1.5","stroke-linecap":"round"})],-1),z("p",null,"暂无数据",-1)])])):(bt(),Lt("ul",CD,[(bt(!0),Lt(Ye,null,Ze(B.items??[],(ct,vt)=>(bt(),Lt("li",{key:vt},[z("span",{class:Se(["todo-pill",B.tone])},yt(B.label),3),z("span",DD,yt(ct.text),1),z("span",LD,yt(ct.time),1)]))),128))]))]),_:2},1032,["name"]))),128))]),_:1},8,["modelValue"])]),_:1})])])}}}),GD=Vd(ID,[["__scopeId","data-v-1b654847"]]);export{GD as default};