Files
Migu2.0/MiGu.Server/wwwroot/assets/DashboardView-Rj8saK5Q.js
T

23 lines
505 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{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)<tm}function fr(a,e,t){var r=0,n=a[0];if(!n)return!1;for(var i=1;i<a.length;i++){var o=a[i];r+=Al(n[0],n[1],o[0],o[1],e,t),n=o}var s=a[0];return(!Ul(n[0],s[0])||!Ul(n[1],s[1]))&&(r+=Al(n[0],n[1],s[0],s[1],e,t)),r!==0}var em=[];function mi(a,e){for(var t=0;t<a.length;t++)fa(a[t],a[t],e)}function $l(a,e,t,r){for(var n=0;n<a.length;n++){var i=a[n];r&&(i=r.project(i)),i&&isFinite(i[0])&&isFinite(i[1])&&(lf(e,e,i),uf(t,t,i))}}function rm(a){for(var e=0,t=0,r=0,n=a.length,i=a[n-1][0],o=a[n-1][1],s=0;s<n;s++){var l=a[s][0],u=a[s][1],v=i*u-l*o;e+=v,t+=(i+l)*v,r+=(o+u)*v,i=l,o=u}return e?[t/e/3,r/e/3,e]:[a[0][0]||0,a[0][1]||0]}var qf=function(){function a(e){this.name=e}return a.prototype.setCenter=function(e){this._center=e},a.prototype.getCenter=function(){var e=this._center;return e||(e=this._center=this.calcCenter()),e},a}(),Yl=function(){function a(e,t){this.type="polygon",this.exterior=e,this.interiors=t}return a}(),Zl=function(){function a(e){this.type="linestring",this.points=e}return a}(),Kf=function(a){V(e,a);function e(t,r,n){var i=a.call(this,t)||this;return i.type="geoJSON",i.geometries=r,i._center=n&&[n[0],n[1]],i}return e.prototype.calcCenter=function(){for(var t=this.geometries,r,n=0,i=0;i<t.length;i++){var o=t[i],s=o.exterior,l=s&&s.length;l>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<o;i++){var s=n[i];if(s.type==="polygon"){var l=s.exterior,u=s.interiors;if(fr(l,t[0],t[1])){for(var v=0;v<(u?u.length:0);v++)if(fr(u[v],t[0],t[1]))continue t;return!0}}}return!1},e.prototype.transformTo=function(t,r,n,i){var o=this.getBoundingRect(),s=o.width/o.height;n?i||(i=n/s):n=s*i;for(var l=new Tt(t,r,n,i),u=o.calculateTransform(l),v=this.geometries,c=0;c<v.length;c++){var f=v[c];f.type==="polygon"?(mi(f.exterior,u),D(f.interiors,function(h){mi(h,u)})):D(f.points,function(h){mi(h,u)})}o=this._rect,o.copy(l),this._center=[o.x+o.width/2,o.y+o.height/2]},e.prototype.cloneShallow=function(t){t==null&&(t=this.name);var r=new e(t,this.geometries,this._center);return r._rect=this._rect,r.transformTo=null,r},e}(qf),am=function(a){V(e,a);function e(t,r){var n=a.call(this,t)||this;return n.type="geoSVG",n._elOnlyForCalculate=r,n}return e.prototype.calcCenter=function(){for(var t=this._elOnlyForCalculate,r=t.getBoundingRect(),n=[r.x+r.width/2,r.y+r.height/2],i=Nd(em),o=t;o&&!o.isGeoSVGGraphicRoot;)mo(i,o.getLocalTransform(),i),o=o.parent;return os(i,i),fa(n,n,i),n},e}(qf);function nm(a){if(!a.UTF8Encoding)return a;var e=a,t=e.UTF8Scale;t==null&&(t=1024);var r=e.features;return D(r,function(n){var i=n.geometry,o=i.encodeOffsets,s=i.coordinates;if(o)switch(i.type){case"LineString":i.coordinates=jf(s,o,t);break;case"Polygon":Si(s,o,t);break;case"MultiLineString":Si(s,o,t);break;case"MultiPolygon":D(s,function(l,u){return Si(l,o[u],t)})}}),e.UTF8Encoding=!1,e}function Si(a,e,t){for(var r=0;r<a.length;r++)a[r]=jf(a[r],e[r],t)}function jf(a,e,t){for(var r=[],n=e[0],i=e[1],o=0;o<a.length;o+=2){var s=a.charCodeAt(o)-64,l=a.charCodeAt(o+1)-64;s=s>>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 S<m?(l[0]=p,l[1]=d,Math.sqrt(S)):(l[0]=g,l[1]=y,Math.sqrt(m))}function xn(a,e,t,r,n,i,o,s){var l=n-a,u=i-e,v=t-a,c=r-e,f=Math.sqrt(v*v+c*c);v/=f,c/=f;var h=l*v+u*c,p=h/f;s&&(p=Math.min(Math.max(p,0),1)),p*=f;var d=o[0]=a+p*v,g=o[1]=e+p*c;return Math.sqrt((d-n)*(d-n)+(g-i)*(g-i))}function Jf(a,e,t,r,n,i,o){t<0&&(a=a+t,t=-t),r<0&&(e=e+r,r=-r);var s=a+t,l=e+r,u=o[0]=Math.min(Math.max(n,a),s),v=o[1]=Math.min(Math.max(i,e),l);return Math.sqrt((u-n)*(u-n)+(v-i)*(v-i))}var xe=[];function um(a,e,t){var r=Jf(e.x,e.y,e.width,e.height,a.x,a.y,xe);return t.set(xe[0],xe[1]),r}function vm(a,e,t){for(var r=0,n=0,i=0,o=0,s,l,u=1/0,v=e.data,c=a.x,f=a.y,h=0;h<v.length;){var p=v[h++];h===1&&(r=v[h],n=v[h+1],i=r,o=n);var d=u;switch(p){case ar.M:i=v[h++],o=v[h++],r=i,n=o;break;case ar.L:d=xn(r,n,v[h],v[h+1],c,f,xe,!0),r=v[h++],n=v[h++];break;case ar.C:d=Gd(r,n,v[h++],v[h++],v[h++],v[h++],v[h],v[h+1],c,f,xe),r=v[h++],n=v[h++];break;case ar.Q:d=zd(r,n,v[h++],v[h++],v[h],v[h+1],c,f,xe),r=v[h++],n=v[h++];break;case ar.A:var g=v[h++],y=v[h++],S=v[h++],m=v[h++],x=v[h++],b=v[h++];h+=1;var _=!!(1-v[h++]);s=Math.cos(x)*S+g,l=Math.sin(x)*m+y,h<=1&&(i=s,o=l);var w=(c-g)*m/S+g;d=lm(g,y,m,x,x+b,_,w,f,xe),r=Math.cos(x+b)*S+g,n=Math.sin(x+b)*m+y;break;case ar.R:i=r=v[h++],o=n=v[h++];var A=v[h++],T=v[h++];d=Jf(i,o,A,T,c,f,xe);break;case ar.Z:d=xn(r,n,i,o,c,f,xe,!0),r=i,n=o;break}d<u&&(u=d,t.set(xe[0],xe[1]))}return u}var we=new mt,dt=new mt,wt=new mt,Ee=new mt,Pe=new mt;function Xl(a,e){if(a){var t=a.getTextGuideLine(),r=a.getTextContent();if(r&&t){var n=a.textGuideLineConfig||{},i=[[0,0],[0,0],[0,0]],o=n.candidates||om,s=r.getBoundingRect().clone();s.applyTransform(r.getComputedTransform());var l=1/0,u=n.anchor,v=a.getComputedTransform(),c=v&&os([],v),f=e.get("length2")||0;u&&wt.copy(u);for(var h=0;h<o.length;h++){var p=o[h];sm(p,0,s,we,Ee),mt.scaleAndAdd(dt,we,Ee,f),dt.transform(c);var d=a.getBoundingRect(),g=u?u.distance(dt):a instanceof Wt?vm(dt,a.path,wt):um(dt,d,wt);g<l&&(l=g,dt.transform(v),wt.transform(v),wt.toArray(i[0]),dt.toArray(i[1]),we.toArray(i[2]))}Qf(i,e.get("minTurnAngle")),t.setShape({points:i})}}}var bn=[],jt=new mt;function Qf(a,e){if(e<=180&&e>0){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(i<n){var o=xn(dt.x,dt.y,wt.x,wt.y,we.x,we.y,bn,!1);jt.fromArray(bn),jt.scaleAndAdd(Pe,o/Math.tan(Math.PI-e));var s=wt.x!==dt.x?(jt.x-dt.x)/(wt.x-dt.x):(jt.y-dt.y)/(wt.y-dt.y);if(isNaN(s))return;s<0?mt.copy(jt,dt):s>1&&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<o){var s=xn(dt.x,dt.y,wt.x,wt.y,we.x,we.y,bn,!1);jt.fromArray(bn);var l=Math.PI/2,u=Math.acos(Pe.dot(e)),v=l+u-t;if(v>=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<r.length;v++)a.lineTo(r[v][0],r[v][1])}function As(a,e,t){var r=a.getTextGuideLine(),n=a.getTextContent();if(!n){r&&a.removeTextGuideLine();return}for(var i=e.normal,o=i.get("show"),s=n.ignore,l=0;l<So.length;l++){var u=So[l],v=e[u],c=u==="normal";if(v){var f=v.get("show"),h=c?s:Rt(n.states[u]&&n.states[u].ignore,s);if(h||!Rt(f,o)){var p=c?r:r&&r.states[u];p&&(p.ignore=!0),r&&xi(r,!0,u,v);continue}r||(r=new Te,a.setTextGuideLine(r),!c&&(s||!o)&&xi(r,!0,"normal",e.normal),a.stateProxy&&(r.stateProxy=a.stateProxy)),xi(r,!1,u,v)}}if(r){ot(r.style,t),r.style.fill=null;var d=i.get("showAbove"),g=a.textGuideLineConfig=a.textGuideLineConfig||{};g.showAbove=d||!1,r.buildPath=fm}}function Ts(a,e){e=e||"labelLine";for(var t={normal:a.getModel(e)},r=0;r<ha.length;r++){var n=ha[r];t[n]=a.getModel([n,e])}return t}function hm(a){if(a){for(var e=[],t=0;t<a.length;t++)e.push(a[t].slice());return e}}function pm(a,e){var t=a.label,r=e&&e.getTextGuideLine();return{dataIndex:a.dataIndex,dataType:a.dataType,seriesIndex:a.seriesModel.seriesIndex,text:a.label.style.text,rect:a.hostRect,labelRect:a.rect,align:t.style.align,verticalAlign:t.style.verticalAlign,labelLinePoints:hm(r&&r.shape.points)}}var ql=["align","verticalAlign","width","height","fontSize"],qt=new kr,bi=Dt(),dm=Dt();function Fa(a,e,t){for(var r=0;r<t.length;r++){var n=t[r];e[n]!=null&&(a[n]=e[n])}}var Ha=["x","y","rotation"],gm=function(){function a(){this._labelList=[],this._chartViewList=[]}return a.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},a.prototype._addLabel=function(e,t,r,n,i){var o=n.style,s=n.__hostTarget,l=s.textConfig||{},u=n.getComputedTransform(),v=n.getBoundingRect().plain();Tt.applyTransform(v,v,u),u?qt.setLocalTransform(u):(qt.x=qt.y=qt.rotation=qt.originX=qt.originY=0,qt.scaleX=qt.scaleY=1),qt.rotation=Ne(qt.rotation);var c=n.__hostTarget,f;if(c){f=c.getBoundingRect().plain();var h=c.getComputedTransform();Tt.applyTransform(f,f,h)}var p=f&&c.getTextGuideLine();this._labelList.push({label:n,labelLine:p,seriesModel:r,dataIndex:e,dataType:t,layoutOption:i,computedLayoutOption:null,rect:v,hostRect:f,priority:f?f.width*f.height:0,defaultAttr:{ignore:n.ignore,labelGuideIgnore:p&&p.ignore,x:qt.x,y:qt.y,scaleX:qt.scaleX,scaleY:qt.scaleY,rotation:qt.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:n.cursor,attachedPos:l.position,attachedRot:l.rotation}})},a.prototype.addLabelsOfSeries=function(e){var t=this;this._chartViewList.push(e);var r=e.__model,n=r.get("labelLayout");(gt(n)||Mt(n).length)&&e.group.traverse(function(i){if(i.ignore)return!0;var o=i.getTextContent(),s=ht(i);o&&!o.disableLabelLayout&&t._addLabel(s.dataIndex,s.dataType,r,o,n)})},a.prototype.updateLayoutConfig=function(e){var t=e.getWidth(),r=e.getHeight();function n(m,x){return function(){Xl(m,x)}}for(var i=0;i<this._labelList.length;i++){var o=this._labelList[i],s=o.label,l=s.__hostTarget,u=o.defaultAttr,v=void 0;gt(o.layoutOption)?v=o.layoutOption(pm(o,l)):v=o.layoutOption,v=v||{},o.computedLayoutOption=v;var c=Math.PI/180;l&&l.setTextConfig({local:!1,position:v.x!=null||v.y!=null?null:u.attachedPos,rotation:v.rotate!=null?v.rotate*c:u.attachedRot,offset:[v.dx||0,v.dy||0]});var f=!1;if(v.x!=null?(s.x=U(v.x,t),s.setStyle("x",0),f=!0):(s.x=u.x,s.setStyle("x",u.style.x)),v.y!=null?(s.y=U(v.y,r),s.setStyle("y",0),f=!0):(s.y=u.y,s.setStyle("y",u.style.y)),v.labelLinePoints){var h=l.getTextGuideLine();h&&(h.setShape({points:v.labelLinePoints}),f=!1)}var p=bi(s);p.needsUpdateLabelLine=f,s.rotation=v.rotate!=null?v.rotate*c:u.rotation,s.scaleX=u.scaleX,s.scaleY=u.scaleY;for(var d=0;d<ql.length;d++){var g=ql[d];s.setStyle(g,v[g]!=null?v[g]:u.style[g])}if(v.draggable){if(s.draggable=!0,s.cursor="move",l){var y=o.seriesModel;if(o.dataIndex!=null){var S=o.seriesModel.getData(o.dataType);y=S.getItemModel(o.dataIndex)}s.on("drag",n(l,y.getModel("labelLine")))}}else s.off("drag"),s.cursor=u.cursor}},a.prototype.layout=function(e){var t=e.getWidth(),r=e.getHeight(),n=Od(this._labelList),i=Gt(n,function(l){return l.layoutOption.moveOverlap==="shiftX"}),o=Gt(n,function(l){return l.layoutOption.moveOverlap==="shiftY"});Bd(i,0,t),vf(o,0,r);var s=Gt(n,function(l){return l.layoutOption.hideOverlap});Fd(s)},a.prototype.processLabelsOverall=function(){var e=this;D(this._chartViewList,function(t){var r=t.__model,n=t.ignoreLabelLineUpdate,i=r.isAnimationEnabled();t.group.traverse(function(o){if(o.ignore&&!o.forceLabelAnimation)return!0;var s=!n,l=o.getTextContent();!s&&l&&(s=bi(l).needsUpdateLabelLine),s&&e._updateLabelLine(o,r),i&&e._animateLabels(o,r)})})},a.prototype._updateLabelLine=function(e,t){var r=e.getTextContent(),n=ht(e),i=n.dataIndex;if(r&&i!=null){var o=t.getData(n.dataType),s=o.getItemModel(i),l={},u=o.getItemVisual(i,"style");if(u){var v=o.getVisual("drawType");l.stroke=u[v]}var c=s.getModel("labelLine");As(e,Ts(s),l),Xl(e,c)}},a.prototype._animateLabels=function(e,t){var r=e.getTextContent(),n=e.getTextGuideLine();if(r&&(e.forceLabelAnimation||!r.ignore&&!r.invisible&&!e.disableLabelAnimation&&!Hd(e))){var i=bi(r),o=i.oldLayout,s=ht(e),l=s.dataIndex,u={x:r.x,y:r.y,rotation:r.rotation},v=t.getData(s.dataType);if(o){r.attr(o);var f=e.prevStates;f&&(Pt(f,"select")>=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<arguments.length;f++){var h=arguments[f];if(isNaN(h)){this._invalid=!0;return}v.push(Math.round(h*c)/c)}this._d.push(e+v.join(" ")),this._start=e==="Z"},a.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},a.prototype.getStr=function(){return this._str},a}(),Cs="none",Sm=Math.round;function xm(a){var e=a.fill;return e!=null&&e!==Cs}function bm(a){var e=a.stroke;return e!=null&&e!==Cs}var Lo=["lineCap","miterLimit","lineJoin"],_m=$(Lo,function(a){return"stroke-"+a.toLowerCase()});function wm(a,e,t,r){var n=e.opacity==null?1:e.opacity;if(t instanceof Re){a("opacity",n);return}if(xm(e)){var i=pa(e.fill);a("fill",i.color);var o=e.fillOpacity!=null?e.fillOpacity*i.opacity*n:i.opacity*n;o<1&&a("fill-opacity",o)}else a("fill",Cs);if(bm(e)){var s=pa(e.stroke);a("stroke",s.color);var l=e.strokeNoScale?t.getLineScale():1,u=l?(e.lineWidth||0)/l:0,v=e.strokeOpacity!=null?e.strokeOpacity*s.opacity*n:s.opacity*n,c=e.strokeFirst;if(u!==1&&a("stroke-width",u),c&&a("paint-order",c?"stroke":"fill"),v<1&&a("stroke-opacity",v),e.lineDash){var f=Ud(t),h=f[0],p=f[1];h&&(p=Sm(p||0),a("stroke-dasharray",h.join(",")),(p||r)&&a("stroke-dashoffset",p))}for(var d=0;d<Lo.length;d++){var g=Lo[d];if(e[g]!==Tl[g]){var y=e[g]||Tl[g];y&&a(_m[d],y)}}}}var rh="http://www.w3.org/2000/svg",ah="http://www.w3.org/1999/xlink",Am="http://www.w3.org/2000/xmlns/",Tm="http://www.w3.org/XML/1998/namespace",Kl="ecmeta_";function nh(a){return document.createElementNS(rh,a)}function zt(a,e,t,r,n){return{tag:a,attrs:t||{},children:r,text:n,key:e}}function Cm(a,e){var t=[];if(e)for(var r in e){var n=e[r],i=r;n!==!1&&(n!==!0&&n!=null&&(i+='="'+n+'"'),t.push(i))}return"<"+a+" "+t.join(" ")+">"}function Dm(a){return"</"+a+">"}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?"":["<![CDATA[",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;u<i;u++){var v=n[u],c=[v.getMaxTime()/1e3+"s"],f=Ql(v.getClip().easing),h=v.getDelay();f?c.push(f):c.push("linear"),h&&c.push(h/1e3+"s"),v.getLoop()&&c.push("infinite");var p=c.join(" ");l[p]=l[p]||[p,[]],l[p][1].push(v)}function d(S){var m=S[1],x=m.length,b={},_={},w={},A="animation-timing-function";function T(Y,W,Q){for(var et=Y.getTracks(),B=Y.getMaxTime(),ct=0;ct<et.length;ct++){var vt=et[ct];if(vt.needsAnimate()){var ft=vt.keyframes,_t=vt.propName;if(Q&&(_t=Q(_t)),_t)for(var Vt=0;Vt<ft.length;Vt++){var ie=ft[Vt],ee=Math.round(ie.time/B*100)+"%",rr=Ql(ie.easing),Ue=ie.rawValue;(lt(Ue)||le(Ue))&&(W[ee]=W[ee]||{},W[ee][_t]=ie.rawValue,rr&&(W[ee][A]=rr))}}}}for(var C=0;C<x;C++){var L=m[C],M=L.targetName;M?M==="shape"&&T(L,_):!r&&T(L,b)}for(var I in b){var P={};Zd(P,a),K(P,b[I]);var E=hf(P),R=b[I][A];w[I]=E?{transform:E}:{},Pm(w[I],P),R&&(w[I][A]=R)}var k,N=!0;for(var I in _){w[I]=w[I]||{};var F=!k,R=_[I][A];F&&(k=new ss);var H=k.len();k.reset(),w[I].d=Mm(a,_[I],k);var X=k.len();if(!F&&H!==X){N=!1;break}R&&(w[I][A]=R)}if(!N)for(var I in w)delete w[I].d;if(!r)for(var C=0;C<x;C++){var L=m[C],M=L.targetName;M==="style"&&T(L,w,function(et){return Em[et]})}for(var j=Mt(w),rt=!0,tt,C=1;C<j.length;C++){var O=j[C-1],G=j[C];if(w[O][or]!==w[G][or]){rt=!1;break}tt=w[O][or]}if(rt&&tt){for(var I in w)w[I][or]&&delete w[I][or];e[or]=tt}if(Gt(j,function(Y){return Mt(w[Y]).length>0}).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&&lt(a.src)}function lh(a){return a&&gt(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<r.length;i++)n.push(Sa(r[i][0]*t)/t),n.push(Sa(r[i][1]*t)/t);e.points=n.join(" ")}function au(a){return!a.smooth}function Nm(a){var e=$(a,function(t){return typeof t=="string"?[t,t]:t});return function(t,r,n){for(var i=0;i<e.length;i++){var o=e[i],s=t[o[0]];s!=null&&(r[o[1]]=Sa(s*n)/n)}}}var zm={circle:[Nm(["cx","cy","r"])],polyline:[ru,au],polygon:[ru,au]};function Gm(a){for(var e=a.animators,t=0;t<e.length;t++)if(e[t].targetName==="shape")return!0;return!1}function uh(a,e){var t=a.style,r=a.shape,n=zm[a.type],i={},o=e.animation,s="path",l=a.style.strokePercent,u=e.compress&&pf(a)||4;if(n&&!e.willUpdate&&!(n[1]&&!n[1](r))&&!(o&&Gm(a))&&!(l<1)){s=a.type;var v=Math.pow(10,u);n[0](r,i,v)}else{var c=!a.path||a.shapeChanged();a.path||a.createPathProxy();var f=a.path;c&&(f.beginPath(),a.buildPath(f,a.shape),a.pathUpdated());var h=f.getVersion(),p=a,d=p.__svgPathBuilder;(p.__svgPathVersion!==h||!d||l!==p.__svgPathStrokePercent)&&(d||(d=p.__svgPathBuilder=new eh),d.reset(u),f.rebuildPath(d,l),d.generateStr(),p.__svgPathVersion=h,p.__svgPathStrokePercent=l),i.d=d.getStr()}return Ms(i,a.transform),Ls(i,t,a,e),Is(i,a),e.animation&&ti(a,i,e),e.emphasis&&km(a,i,e),zt(s,a.id+"",i)}function Om(a,e){var t=a.style,r=t.image;if(r&&!lt(r)&&(sh(r)?r=r.src:lh(r)&&(r=r.toDataURL())),!!r){var n=t.x||0,i=t.y||0,o=t.width,s=t.height,l={href:r,width:o,height:s};return n&&(l.x=n),i&&(l.y=i),Ms(l,a.transform),Ls(l,t,a,e),Is(l,a),e.animation&&ti(a,l,e),zt("image",a.id+"",l)}}function Bm(a,e){var t=a.style,r=t.text;if(r!=null&&(r+=""),!(!r||isNaN(t.x)||isNaN(t.y))){var n=t.font||qd,i=t.x||0,o=Kd(t.y||0,jd(n),t.textBaseline),s=Jd[t.textAlign]||t.textAlign,l={"dominant-baseline":"central","text-anchor":s};if(Qd(t)){var u="",v=t.fontStyle,c=tg(t.fontSize);if(!parseFloat(c))return;var f=t.fontFamily||eg,h=t.fontWeight;u+="font-size:"+c+";font-family:"+f+";",v&&v!=="normal"&&(u+="font-style:"+v+";"),h&&h!=="normal"&&(u+="font-weight:"+h+";"),l.style=u}else l.style="font: "+n;return r.match(/\s/)&&(l["xml:space"]="preserve"),i&&(l.x=i),o&&(l.y=o),Ms(l,a.transform),Ls(l,t,a,e),Is(l,a),e.animation&&ti(a,l,e),zt("text",a.id+"",l,void 0,r)}}function nu(a,e){if(a instanceof Wt)return uh(a,e);if(a instanceof Re)return Om(a,e);if(a instanceof df)return Bm(a,e)}function Fm(a,e,t){var r=a.style;if(ug(r)){var n=vg(a),i=t.shadowCache,o=i[n];if(!o){var s=a.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var v=r.shadowOffsetX||0,c=r.shadowOffsetY||0,f=r.shadowBlur,h=pa(r.shadowColor),p=h.opacity,d=h.color,g=f/2/l,y=f/2/u,S=g+" "+y;o=t.zrId+"-s"+t.shadowIdx++,t.defs[o]=zt("filter",o,{id:o,x:"-100%",y:"-100%",width:"300%",height:"300%"},[zt("feDropShadow","",{dx:v/l,dy:c/u,stdDeviation:S,"flood-color":d,"flood-opacity":p})]),i[n]=o}e.filter=Fn(o)}}function vh(a,e,t,r){var n=a[t],i,o={gradientUnits:n.global?"userSpaceOnUse":"objectBoundingBox"};if(rg(n))i="linearGradient",o.x1=n.x,o.y1=n.y,o.x2=n.x2,o.y2=n.y2;else if(ag(n))i="radialGradient",o.cx=Rt(n.x,.5),o.cy=Rt(n.y,.5),o.r=Rt(n.r,.5);else return;for(var s=n.colorStops,l=[],u=0,v=s.length;u<v;++u){var c=ng(s[u].offset)*100+"%",f=s[u].color,h=pa(f),p=h.color,d=h.opacity,g={offset:c};g["stop-color"]=p,d<1&&(g["stop-opacity"]=d),l.push(zt("stop",u+"",g))}var y=zt(i,"",o,l),S=Ds(y),m=r.gradientCache,x=m[S];x||(x=r.zrId+"-g"+r.gradientIdx++,m[S]=x,o.id=x,r.defs[x]=zt(i,x,o,l)),e[t]=Fn(x)}function ch(a,e,t,r){var n=a.style[t],i=a.getBoundingRect(),o={},s=n.repeat,l=s==="no-repeat",u=s==="repeat-x",v=s==="repeat-y",c;if(ig(n)){var f=n.imageWidth,h=n.imageHeight,p=void 0,d=n.image;if(lt(d)?p=d:sh(d)?p=d.src:lh(d)&&(p=d.toDataURL()),typeof Image>"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;e<t.length;++e){var i=t[e];i!=null&&su(n,xa(i))}else Me(a.text)&&!Zt(a.text)&&su(n,iu(a.text))}else a.elm=iu(a.text);return a.elm}function ph(a,e,t,r,n){for(;r<=n;++r){var i=t[r];i!=null&&hr(a,xa(i),e)}}function _n(a,e,t,r){for(;t<=r;++t){var n=e[t];if(n!=null)if(Me(n.tag)){var i=fh(n.elm);ou(i,n.elm)}else ou(a,n.elm)}}function Ps(a,e){var t,r=e.elm,n=a&&a.attrs||{},i=e.attrs||{};if(n!==i){for(t in i){var o=i[t],s=n[t];s!==o&&(o===!0?r.setAttribute(t,""):o===!1?r.removeAttribute(t):t==="style"?r.style.cssText=o:t.charCodeAt(0)!==Wm?r.setAttribute(t,o):t==="xmlns:xlink"||t==="xmlns"?r.setAttributeNS(Am,t,o):t.charCodeAt(3)===lu?r.setAttributeNS(Tm,t,o):t.charCodeAt(5)===lu?r.setAttributeNS(ah,t,o):r.setAttribute(t,o))}for(t in n)t in i||r.removeAttribute(t)}}function Ym(a,e,t){for(var r=0,n=0,i=e.length-1,o=e[0],s=e[i],l=t.length-1,u=t[0],v=t[l],c,f,h,p;r<=i&&n<=l;)o==null?o=e[++r]:s==null?s=e[--i]:u==null?u=t[++n]:v==null?v=t[--l]:aa(o,u)?(Er(o,u),o=e[++r],u=t[++n]):aa(s,v)?(Er(s,v),s=e[--i],v=t[--l]):aa(o,v)?(Er(o,v),hr(a,o.elm,hh(s.elm)),o=e[++r],v=t[--l]):aa(s,u)?(Er(s,u),hr(a,s.elm,o.elm),s=e[--i],u=t[++n]):(Mo(c)&&(c=$m(e,r,i)),f=c[u.key],Mo(f)?hr(a,xa(u),o.elm):(h=e[f],h.tag!==u.tag?hr(a,xa(u),o.elm):(Er(h,u),e[f]=void 0,hr(a,h.elm,o.elm))),u=t[++n]);(r<=i||n<=l)&&(r>i?(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<n;v++){var c=e[v];if(!c.invisible){var f=c.__clipPaths,h=f&&f.length||0,p=l&&l.length||0,d=void 0;for(d=Math.max(h-1,p-1);d>=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;y<h;y++){var S={};Hm(f[y],S,t);var m=zt("g","clip-g-"+u++,S,[]);(s?s.children:r).push(m),i[o++]=m,s=m}l=f;var x=nu(c,t);x&&(s?s.children:r).push(x)}}},a.prototype.resize=function(e,t){var r=this._opts,n=this.root,i=this._viewport;if(e!=null&&(r.width=e),t!=null&&(r.height=t),n&&i&&(i.style.display="none",e=Cl(n,0,r),t=Cl(n,1,r),i.style.display=""),this._width!==e||this._height!==t){if(this._width=e,this._height=t,i){var o=i.style;o.width=e+"px",o.height=t+"px"}if(ls(this._backgroundColor))this.refresh();else{var s=this._svgDom;s&&(s.setAttribute("width",e),s.setAttribute("height",t));var l=this._bgVNode&&this._bgVNode.elm;l&&(l.setAttribute("width",e),l.setAttribute("height",t))}}},a.prototype.getWidth=function(){return this._width},a.prototype.getHeight=function(){return this._height},a.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},a.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},a.prototype.toDataURL=function(e){var t=this.renderToString(),r="data:image/svg+xml;";return e?(t=cg(t),t&&r+"base64,"+t):r+"charset=UTF-8,"+encodeURIComponent(t)},a}();function uu(a){return function(){}}function Km(a,e,t,r){var n;if(t&&t!=="none")if(n=zt("rect","bg",{width:a,height:e,x:"0",y:"0"}),gf(t))vh({fill:t},n.attrs,"fill",r);else if(ls(t))ch({style:{fill:t},dirty:yr,getBoundingRect:function(){return{width:a,height:e}}},n.attrs,"fill",r);else{var i=pa(t),o=i.color,s=i.opacity;n.attrs.fill=o,s<1&&(n.attrs["fill-opacity"]=s)}return n}function jm(a){a.registerPainter("svg",qm)}var vu=Math.PI*2,Wa=Math.PI/180;function dh(a,e){return fe(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function gh(a,e){var t=dh(a,e),r=a.get("center"),n=a.get("radius");q(n)||(n=[0,n]);var i=U(t.width,e.getWidth()),o=U(t.height,e.getHeight()),s=Math.min(i,o),l=U(n[0],s/2),u=U(n[1],s/2),v,c,f=a.coordinateSystem;if(f){var h=f.dataToPoint(r);v=h[0]||0,c=h[1]||0}else q(r)||(r=[r,r]),v=U(r[0],i)+t.x,c=U(r[1],o)+t.y;return{cx:v,cy:c,r0:l,r:u}}function Jm(a,e,t){e.eachSeriesByType(a,function(r){var n=r.getData(),i=n.mapDimension("value"),o=dh(r,t),s=gh(r,t),l=s.cx,u=s.cy,v=s.r,c=s.r0,f=-r.get("startAngle")*Wa,h=r.get("endAngle"),p=r.get("padAngle")*Wa;h=h==="auto"?f-vu:-h*Wa;var d=r.get("minAngle")*Wa,g=d+p,y=0;n.each(i,function(k){!isNaN(k)&&y++});var S=n.getSum(i),m=Math.PI/(S||y)*2,x=r.get("clockwise"),b=r.get("roseType"),_=r.get("stillShowZeroSum"),w=n.getDataExtent(i);w[0]=0;var A=x?1:-1,T=[f,h],C=A*p/2;yf(T,!x),f=T[0],h=T[1];var L=yh(r);L.startAngle=f,L.endAngle=h,L.clockwise=x;var M=Math.abs(h-f),I=M,P=0,E=f;if(n.setLayout({viewRect:o,r:v}),n.each(i,function(k,N){var F;if(isNaN(k)){n.setItemLayout(N,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:x,cx:l,cy:u,r0:c,r:b?NaN:v});return}b!=="area"?F=S===0&&_?m:k*m:F=M/y,F<g?(F=g,I-=g):P+=k;var H=E+A*F,X=0,j=0;p>F?(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}),I<vu&&y)if(I<=.001){var R=M/y;n.each(i,function(k,N){if(!isNaN(k)){var F=n.getItemLayout(N);F.angle=R;var H=0,X=0;R<p?(H=f+A*(N+1/2)*R,X=H):(H=f+A*N*R+C,X=f+A*(N+1)*R-C),F.startAngle=H,F.endAngle=X}})}else m=I/P,E=f,n.each(i,function(k,N){if(!isNaN(k)){var F=n.getItemLayout(N),H=F.angle===g?g:k*m,X=0,j=0;H<p?(X=E+A*H/2,j=X):(X=E+C,j=E+A*H-C),F.startAngle=X,F.endAngle=j,E+=A*H}})})}var yh=Dt();function Na(a){return{seriesType:a,reset:function(e,t){var r=t.findComponents({mainType:"legend"});if(!(!r||!r.length)){var n=e.getData();n.filterSelf(function(i){for(var o=n.getName(i),s=0;s<r.length;s++)if(!r[s].isSelected(o))return!1;return!0})}}}}var Qm=Math.PI/180;function cu(a,e,t,r,n,i,o,s,l,u){if(a.length<2)return;function v(d){for(var g=d.rB,y=g*g,S=0;S<d.list.length;S++){var m=d.list[S],x=Math.abs(m.label.y-t),b=r+m.len,_=b*b,w=Math.sqrt(Math.abs((1-x*x/y)*_)),A=e+(w+m.len2)*n,T=A-m.label.x,C=m.targetTextWidth-T*n;mh(m,C,!0),m.label.x=A}}function c(d){for(var g={list:[],maxY:0},y={list:[],maxY:0},S=0;S<d.length;S++)if(d[S].labelAlignTo==="none"){var m=d[S],x=m.label.y>t?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(_)<w?Math.sqrt(b*b/(1-_*_/w/w)):w;x.rB=A,x.maxY=b}x.list.push(m)}v(g),v(y)}for(var f=a.length,h=0;h<f;h++)if(a[h].position==="outer"&&a[h].labelAlignTo==="labelLine"){var p=a[h].label.x-u;a[h].linePoints[1][0]+=p,a[h].label.x=u}vf(a,l,l+o)&&c(a)}function t0(a,e,t,r,n,i,o,s){for(var l=[],u=[],v=Number.MAX_VALUE,c=-Number.MAX_VALUE,f=0;f<a.length;f++){var h=a[f].label;Ci(a[f])||(h.x<e?(v=Math.min(v,h.x),l.push(a[f])):(c=Math.max(c,h.x),u.push(a[f])))}for(var f=0;f<a.length;f++){var p=a[f];if(!Ci(p)&&p.linePoints){if(p.labelStyleWidth!=null)continue;var h=p.label,d=p.linePoints,g=void 0;p.labelAlignTo==="edge"?h.x<e?g=d[2][0]-p.labelDistance-o-p.edgeDistance:g=o+n-p.edgeDistance-d[2][0]-p.labelDistance:p.labelAlignTo==="labelLine"?h.x<e?g=v-o-p.bleedMargin:g=o+n-c-p.bleedMargin:h.x<e?g=h.x-o-p.bleedMargin:g=o+n-h.x-p.bleedMargin,p.targetTextWidth=g,mh(p,g)}}cu(u,e,t,r,1,n,i,o,s,c),cu(l,e,t,r,-1,n,i,o,s,v);for(var f=0;f<a.length;f++){var p=a[f];if(!Ci(p)&&p.linePoints){var h=p.label,d=p.linePoints,y=p.labelAlignTo==="edge",S=h.style.padding,m=S?S[1]+S[3]:0,x=h.style.backgroundColor?0:m,b=p.rect.width+x,_=d[1][0]-d[2][0];y?h.x<e?d[2][0]=o+p.edgeDistance+b+p.labelDistance:d[2][0]=o+n-p.edgeDistance-b-p.labelDistance:(h.x<e?d[2][0]=h.x+p.labelDistance:d[2][0]=h.x-p.labelDistance,d[1][0]=d[2][0]+_),d[1][1]=d[2][1]=h.y}}}function mh(a,e,t){if(t===void 0&&(t=!1),a.labelStyleWidth==null){var r=a.label,n=r.style,i=a.rect,o=n.backgroundColor,s=n.padding,l=s?s[1]+s[3]:0,u=n.overflow,v=i.width+(o?0:l);if(e<v||t){var c=i.height;if(u&&u.match("break")){r.setStyle("backgroundColor",null),r.setStyle("width",e-l);var f=r.getBoundingRect();r.setStyle("width",Math.ceil(f.width)),r.setStyle("backgroundColor",o)}else{var h=e-l,p=e<v?h:t?h>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)<o){D(T.states,h),T.ignore=!0,C&&(D(C.states,h),C.ignore=!0);return}if(p(T)){var X=(A.startAngle+A.endAngle)/2,j=Math.cos(X),rt=Math.sin(X),tt,O,G,J;r=A.cx,n=A.cy;var Y=I==="inside"||I==="inner";if(I==="center")tt=A.cx,O=A.cy,J="center";else{var W=(Y?(A.r+A.r0)/2*j:A.r*j)+r,Q=(Y?(A.r+A.r0)/2*rt:A.r*rt)+n;if(tt=W+j*3,O=Q+rt*3,!Y){var et=W+j*(F+l-A.r),B=Q+rt*(F+l-A.r),ct=et+(j<0?-1:1)*H,vt=B;E==="edge"?tt=j<0?v+R:v+u-R:tt=ct+(j<0?-P:P),O=vt,G=[[W,Q],[et,B],[ct,vt]]}J=Y?"center":E==="edge"?j>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;d<t.length;d++){var g=t[d],y=g.label,S=g.labelLine,m=isNaN(y.x)||isNaN(y.y);if(y){y.setStyle({align:g.textAlign}),m&&(D(y.states,h),y.ignore=!0);var x=y.states.select;x&&(x.x+=y.x,x.y+=y.y)}if(S){var b=g.linePoints;m||!b?(D(S.states,h),S.ignore=!0):(Qf(b,g.minTurnAngle),cm(b,g.surfaceNormal,g.maxSurfaceAngle),S.setShape({points:b}),y.__hostTarget.textGuideLineConfig={anchor:new mt(b[0][0],b[0][1])})}}}var r0=function(a){V(e,a);function e(t,r,n){var i=a.call(this)||this;i.z2=2;var o=new St;return i.setTextContent(o),i.updateData(t,r,n,!0),i}return e.prototype.updateData=function(t,r,n,i){var o=this,s=t.hostModel,l=t.getItemModel(r),u=l.getModel("emphasis"),v=t.getItemLayout(r),c=K(Vr(l.getModel("itemStyle"),v,!0),v);if(isNaN(c.startAngle)){o.setShape(c);return}if(i){o.setShape(c);var f=s.getShallow("animationType");s.ecModel.ssr?(Ut(o,{scaleX:0,scaleY:0},s,{dataIndex:r,isFrom:!0}),o.originX=c.cx,o.originY=c.cy):f==="scale"?(o.shape.r=v.r0,Ut(o,{shape:{r:v.r}},s,r)):n!=null?(o.setShape({startAngle:n,endAngle:n}),Ut(o,{shape:{startAngle:v.startAngle,endAngle:v.endAngle}},s,r)):(o.shape.endAngle=v.startAngle,xt(o,{shape:{endAngle:v.endAngle}},s,r))}else Fe(o),xt(o,{shape:c},s,r);o.useStyle(t.getItemVisual(r,"style")),ae(o,l);var h=(v.startAngle+v.endAngle)/2,p=s.get("selectedOffset"),d=Math.cos(h)*p,g=Math.sin(h)*p,y=l.getShallow("cursor");y&&o.attr("cursor",y),this._updateLabel(s,t,r),o.ensureState("emphasis").shape=K({r:v.r+(u.get("scale")&&u.get("scaleSize")||0)},Vr(u.getModel("itemStyle"),v)),K(o.ensureState("select"),{x:d,y:g,shape:Vr(l.getModel(["select","itemStyle"]),v)}),K(o.ensureState("blur"),{shape:Vr(l.getModel(["blur","itemStyle"]),v)});var S=o.getTextGuideLine(),m=o.getTextContent();S&&K(S.ensureState("select"),{x:d,y:g}),K(m.ensureState("select"),{x:d,y:g}),Et(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,r,n){var i=this,o=r.getItemModel(n),s=o.getModel("labelLine"),l=r.getItemVisual(n,"style"),u=l&&l.fill,v=l&&l.opacity;ue(i,Qt(o),{labelFetcher:r.hostModel,labelDataIndex:n,inheritColor:u,defaultOpacity:v,defaultText:t.getFormattedLabel(n,"normal")||r.getName(n)});var c=i.getTextContent();i.setTextConfig({position:null,rotation:null}),c.attr({z2:10});var f=t.get(["label","position"]);if(f!=="outside"&&f!=="outer")i.removeTextGuideLine();else{var h=this.getTextGuideLine();h||(h=new Te,this.setTextGuideLine(h)),As(this,Ts(o),{stroke:u,opacity:Ur(s.get(["lineStyle","opacity"]),v,1)})}},e}(Be),a0=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,r,n,i){var o=t.getData(),s=this._data,l=this.group,u;if(!s&&o.count()>0){for(var v=o.getItemLayout(0),c=1;isNaN(v&&v.startAngle)&&c<o.count();++c)v=o.getItemLayout(c);v&&(u=v.startAngle)}if(this._emptyCircleSector&&l.remove(this._emptyCircleSector),o.count()===0&&t.get("showEmptyCircle")){var f=yh(t),h=new Be({shape:K(gh(t,n),f)});h.useStyle(t.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=h,l.add(h)}o.diff(s).add(function(p){var d=new r0(o,p,u);o.setItemGraphicEl(p,d),l.add(d)}).update(function(p,d){var g=s.getItemGraphicEl(d);g.updateData(o,p,u),g.off("click"),l.add(g),o.setItemGraphicEl(p,g)}).remove(function(p){var d=s.getItemGraphicEl(p);mf(d,t,p)}).execute(),e0(t),t.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},e.prototype.dispose=function(){},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="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]<Sh,v=this.softClipShape,c;if(u){this._ctx=l;return}for(this._ctx=null,c=this._off;c<n.length;){var f=n[c++],h=n[c++];isNaN(f)||isNaN(h)||v&&!v.contain(f,h)||(s.x=f-i[0]/2,s.y=h-i[1]/2,s.width=i[0],s.height=i[1],o.buildPath(t,s,!0))}this.incremental&&(this._off=c,this.notClear=!0)},e.prototype.afterBrush=function(){var t=this.shape,r=t.points,n=t.size,i=this._ctx,o=this.softClipShape,s;if(i){for(s=this._off;s<r.length;){var l=r[s++],u=r[s++];isNaN(l)||isNaN(u)||o&&!o.contain(l,u)||i.fillRect(l-n[0]/2,u-n[1]/2,n[0],n[1])}this.incremental&&(this._off=s,this.notClear=!0)}},e.prototype.findDataIndex=function(t,r){for(var n=this.shape,i=n.points,o=n.size,s=Math.max(o[0],4),l=Math.max(o[1],4),u=i.length/2-1;u>=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<n.length;){var h=n[f++],p=n[f++];l=Math.min(h,l),v=Math.max(h,v),u=Math.min(p,u),c=Math.max(p,c)}t=this._rect=new Tt(l-o/2,u-s/2,v-l+o,c-u+s)}return t},e}(Wt),c0=function(){function a(){this.group=new nt}return a.prototype.updateData=function(e,t){this._clear();var r=this._create();r.setShape({points:e.getLayout("points")}),this._setCommon(r,e,t)},a.prototype.updateLayout=function(e){var t=e.getLayout("points");this.group.eachChild(function(r){if(r.startIndex!=null){var n=(r.endIndex-r.startIndex)*2,i=r.startIndex*4*2;t=new Float32Array(t.buffer,i,n)}r.setShape("points",t),r.reset()})},a.prototype.incrementalPrepareUpdate=function(e){this._clear()},a.prototype.incrementalUpdate=function(e,t,r){var n=this._newAdded[0],i=t.getLayout("points"),o=n&&n.shape.points;if(o&&o.length<2e4){var s=o.length,l=new Float32Array(s+i.length);l.set(o),l.set(i,s),n.endIndex=e.end,n.setShape({points:l})}else{this._newAdded=[];var u=this._create();u.startIndex=e.start,u.endIndex=e.end,u.incremental=!0,u.setShape({points:i}),this._setCommon(u,t,r)}},a.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},a.prototype._create=function(){var e=new v0({cursor:"default"});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},a.prototype._setCommon=function(e,t,r){var n=t.hostModel;r=r||{};var i=t.getVisual("symbolSize");e.setShape("size",i instanceof Array?i:[i,i]),e.softClipShape=r.clipShape||null,e.symbolProxy=ve(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var o=e.shape.size[0]<Sh;e.useStyle(n.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=t.getVisual("style"),l=s&&s.fill;l&&e.setColor(l);var u=ht(e);u.seriesIndex=n.seriesIndex,e.on("mousemove",function(v){u.dataIndex=null;var c=e.hoverDataIdx;c>=0&&(u.dataIndex=c+(e.startIndex||0))})},a.prototype.remove=function(){this._clear()},a.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},a}(),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;S<h.length-1;S++){var m=u(d,g);m&&(m.__dimIdx=S,f[S]?(m.setPosition(f[S]),Yr[y?"initProps":"updateProps"](m,{x:h[S][0],y:h[S][1]},t,g)):m.setPosition(h[S]),p.add(m))}}function c(f){return $(f,function(h){return[i.cx,i.cy]})}s.diff(l).add(function(f){var h=s.getItemLayout(f);if(h){var p=new Ae,d=new Te,g={shape:{points:h}};p.shape.points=c(h),d.shape.points=c(h),Ut(p,g,t,f),Ut(d,g,t,f);var y=new nt,S=new nt;y.add(d),y.add(p),y.add(S),v(d.shape.points,h,S,s,f,!0),s.setItemGraphicEl(f,y)}}).update(function(f,h){var p=l.getItemGraphicEl(h),d=p.childAt(0),g=p.childAt(1),y=p.childAt(2),S={shape:{points:s.getItemLayout(f)}};S.shape.points&&(v(d.shape.points,S.shape.points,y,s,f,!1),Fe(g),Fe(d),xt(d,S,t),xt(g,S,t),s.setItemGraphicEl(f,p))}).remove(function(f){o.remove(l.getItemGraphicEl(f))}).execute(),s.eachItemGraphicEl(function(f,h){var p=s.getItemModel(h),d=f.childAt(0),g=f.childAt(1),y=f.childAt(2),S=s.getItemVisual(h,"style"),m=S.fill;o.add(f),d.useStyle(ot(p.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:m})),ae(d,p,"lineStyle"),ae(g,p,"areaStyle");var x=p.getModel("areaStyle"),b=x.isEmpty()&&x.parentModel.isEmpty();g.ignore=b,D(["emphasis","select","blur"],function(A){var T=p.getModel([A,"areaStyle"]),C=T.isEmpty()&&T.parentModel.isEmpty();g.ensureState(A).ignore=C&&b}),g.useStyle(ot(x.getAreaStyle(),{fill:m,opacity:.7,decal:S.decal}));var _=p.getModel("emphasis"),w=_.getModel("itemStyle").getItemStyle();y.eachChild(function(A){if(A instanceof Re){var T=A.style;A.useStyle(K({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},S))}else A.useStyle(S),A.setColor(m),A.style.strokeNoScale=!0;var C=A.ensureState("emphasis");C.style=pt(w);var L=s.getStore().get(s.getDimensionIndex(A.__dimIdx),h);(L==null||isNaN(L))&&(L=""),ue(A,Qt(p),{labelFetcher:s.hostModel,labelDataIndex:h,labelDimIndex:A.__dimIdx,defaultText:L,inheritColor:m,defaultOpacity:S.opacity})}),Et(f,_.get("focus"),_.get("blurScope"),_.get("disabled"))}),this._data=s},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.type="radar",e}(kt),y0=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),this.legendVisualProvider=new za(at(this.getData,this),at(this.getRawData,this))},e.prototype.getInitialData=function(t,r){return Xr(this,{generateCoord:"indicator_",generateCoordCount:1/0})},e.prototype.formatTooltip=function(t,r,n){var i=this.getData(),o=this.coordinateSystem,s=o.getIndicatorAxes(),l=this.getData().getName(t),u=l===""?this.name:l,v=dg(this,t);return ne("section",{header:u,sortBlocks:!0,blocks:$(s,function(c){var f=i.get(i.mapDimension(c.dim),t);return ne("nameValue",{markerType:"subItem",markerColor:v,name:c.name,value:f,sortParam:f})})})},e.prototype.getTooltipPosition=function(t){if(t!=null){for(var r=this.getData(),n=this.coordinateSystem,i=r.getValues($(n.dimensions,function(u){return r.mapDimension(u)}),t),o=0,s=i.length;o<s;o++)if(!isNaN(i[o])){var l=n.getIndicatorAxes();return n.coordToPoint(l[o].dataToCoord(i[o]),o)}}},e.type="series.radar",e.dependencies=["radar"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},e}(Ft),Kr=gg.value;function Ua(a,e){return ot({show:e},a)}var m0=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(){var t=this.get("boundaryGap"),r=this.get("splitNumber"),n=this.get("scale"),i=this.get("axisLine"),o=this.get("axisTick"),s=this.get("axisLabel"),l=this.get("axisName"),u=this.get(["axisName","show"]),v=this.get(["axisName","formatter"]),c=this.get("axisNameGap"),f=this.get("triggerEvent"),h=$(this.get("indicator")||[],function(p){p.max!=null&&p.max>0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var d=l;p.color!=null&&(d=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;_<m.length;_++){if(v){var w=S(g,p,_);g[w].push(new Ma({shape:{cx:x,cy:b,r:m[_].coord}}))}if(c&&_<m.length-1){var w=S(y,d,_);y[w].push(new xf({shape:{cx:x,cy:b,r0:m[_].coord,r:m[_+1].coord}}))}}else for(var A,T=$(n,function(E,R){var k=E.getTicksCoords();return A=A==null?k.length-1:Math.min(k.length-1,A),$(k,function(N){return r.coordToPoint(N.coord,R)})}),C=[],_=0;_<=A;_++){for(var L=[],M=0;M<n.length;M++)L.push(T[M][_]);if(L[0]&&L.push(L[0].slice()),v){var w=S(g,p,_);g[w].push(new Te({shape:{points:L}}))}if(c&&C){var w=S(y,d,_-1);y[w].push(new Ae({shape:{points:L.concat(C)}}))}C=L.slice().reverse()}var I=l.getLineStyle(),P=u.getAreaStyle();D(y,function(E,R){this.group.add(be(E,{style:ot({stroke:"none",fill:d[R%d.length]},P),silent:!0}))},this),D(g,function(E,R){this.group.add(be(E,{style:ot({fill:"none",stroke:p[R%p.length]},I),silent:!0}))},this)},e.type="radar",e}(te),b0=function(a){V(e,a);function e(t,r,n){var i=a.call(this,t,r,n)||this;return i.type="value",i.angle=0,i.name="",i}return e}(ke),_0=function(){function a(e,t,r){this.dimensions=[],this._model=e,this._indicatorAxes=$(e.getIndicatorModels(),function(n,i){var o="indicator_"+i,s=new b0(o,new xo);return s.name=n.get("name"),s.model=n,n.axis=s,this.dimensions.push(o),s},this),this.resize(e,r)}return a.prototype.getIndicatorAxes=function(){return this._indicatorAxes},a.prototype.dataToPoint=function(e,t){var r=this._indicatorAxes[t];return this.coordToPoint(r.dataToCoord(e),t)},a.prototype.coordToPoint=function(e,t){var r=this._indicatorAxes[t],n=r.angle,i=this.cx+e*Math.cos(n),o=this.cy-e*Math.sin(n);return[i,o]},a.prototype.pointToData=function(e){var t=e[0]-this.cx,r=e[1]-this.cy,n=Math.sqrt(t*t+r*r);t/=n,r/=n;for(var i=Math.atan2(-r,t),o=1/0,s,l=-1,u=0;u<this._indicatorAxes.length;u++){var v=this._indicatorAxes[u],c=Math.abs(i-v.angle);c<o&&(s=v,l=u,o=c)}return[l,+(s&&s.coordToData(n))]},a.prototype.resize=function(e,t){var r=e.get("center"),n=t.getWidth(),i=t.getHeight(),o=Math.min(n,i)/2;this.cx=U(r[0],n),this.cy=U(r[1],i),this.startAngle=e.get("startAngle")*Math.PI/180;var s=e.get("radius");(lt(s)||le(s))&&(s=[0,s]),this.r0=U(s[0],o),this.r=U(s[1],o),D(this._indicatorAxes,function(l,u){l.setExtent(this.r0,this.r);var v=this.startAngle+u*Math.PI*2/this._indicatorAxes.length;v=Math.atan2(Math.sin(v),Math.cos(v)),l.angle=v},this)},a.prototype.update=function(e,t){var r=this._indicatorAxes,n=this._model;D(r,function(s){s.scale.setExtent(1/0,-1/0)}),e.eachSeriesByType("radar",function(s,l){if(!(s.get("coordinateSystem")!=="radar"||e.getComponent("radar",s.get("radarIndex"))!==n)){var u=s.getData();D(r,function(v){v.scale.unionExtentFromData(u,u.mapDimension(v.dim))})}},this);var i=n.get("splitNumber"),o=new xo;o.setExtent(0,i),o.setInterval(1),D(r,function(s,l){yg(s.scale,s.model,o)})},a.prototype.convertToPixel=function(e,t,r){return console.warn("Not implemented."),null},a.prototype.convertFromPixel=function(e,t,r){return console.warn("Not implemented."),null},a.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},a.create=function(e,t){var r=[];return e.eachComponent("radar",function(n){var i=new a(n,e,t);r.push(i),n.coordinateSystem=i}),e.eachSeriesByType("radar",function(n){n.get("coordinateSystem")==="radar"&&(n.coordinateSystem=r[n.get("radarIndex")||0])}),r},a.dimensions=[],a}();function w0(a){a.registerCoordinateSystem("radar",_0),a.registerComponentModel(m0),a.registerComponentView(x0),a.registerVisual({seriesType:"radar",reset:function(e){var t=e.getData();t.each(function(r){t.setItemVisual(r,"legendIcon","roundRect")}),t.setVisual("legendIcon","roundRect")}})}function A0(a){it(w0),a.registerChartView(g0),a.registerSeriesModel(y0),a.registerLayout(p0),a.registerProcessor(Na("radar")),a.registerPreprocessor(d0)}function Es(a,e,t){var r=a.target;r.x+=e,r.y+=t,r.dirty()}function Rs(a,e,t,r){var n=a.target,i=a.zoomLimit,o=a.zoom=a.zoom||1;if(o*=e,i){var s=i.min||0,l=i.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/a.zoom;a.zoom=o,n.x-=(t-n.x)*(u-1),n.y-=(r-n.y)*(u-1),n.scaleX*=u,n.scaleY*=u,n.dirty()}var T0={axisPointer:1,tooltip:1,brush:1};function ei(a,e,t){var r=e.getComponentByElement(a.topTarget),n=r&&r.coordinateSystem;return r&&r!==t&&!T0.hasOwnProperty(r.mainType)&&n&&n.model!==t}function xh(a){if(lt(a)){var e=new DOMParser;a=e.parseFromString(a,"text/xml")}var t=a;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}var Di,wn={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},pu=Mt(wn),An={"alignment-baseline":"textBaseline","stop-color":"stopColor"},du=Mt(An),C0=function(){function a(){this._defs={},this._root=null}return a.prototype.parse=function(e,t){t=t||{};var r=xh(e);this._defsUsePending=[];var n=new nt;this._root=n;var i=[],o=r.getAttribute("viewBox")||"",s=parseFloat(r.getAttribute("width")||t.width),l=parseFloat(r.getAttribute("height")||t.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),oe(r,n,null,!0,!1);for(var u=r.firstChild;u;)this._parseNode(u,n,i,null,!1,!1),u=u.nextSibling;I0(this._defs,this._defsUsePending),this._defsUsePending=[];var v,c;if(o){var f=ri(o);f.length>=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;r<e.length;r+=2){var n=parseFloat(e[r]),i=parseFloat(e[r+1]);t.push([n,i])}return t}function oe(a,e,t,r,n){var i=e,o=i.__inheritedStyle=i.__inheritedStyle||{},s={};a.nodeType===1&&(E0(a,e),bh(a,o,s),r||R0(a,o,s)),i.style=i.style||{},o.fill!=null&&(i.style.fill=xu(i,"fill",o.fill,t)),o.stroke!=null&&(i.style.stroke=xu(i,"stroke",o.stroke,t)),D(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(l){o[l]!=null&&(i.style[l]=parseFloat(o[l]))}),D(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(l){o[l]!=null&&(i.style[l]=o[l])}),n&&(i.__selfStyle=s),o.lineDash&&(i.style.lineDash=$(ri(o.lineDash),function(l){return parseFloat(l)})),(o.visibility==="hidden"||o.visibility==="collapse")&&(i.invisible=!0),o.display==="none"&&(i.ignore=!0)}function D0(a,e){var t=e.__selfStyle;if(t){var r=t.textBaseline,n=r;!r||r==="auto"||r==="baseline"?n="alphabetic":r==="before-edge"||r==="text-before-edge"?n="top":r==="after-edge"||r==="text-after-edge"?n="bottom":(r==="central"||r==="mathematical")&&(n="middle"),a.style.textBaseline=n}var i=e.__inheritedStyle;if(i){var o=i.textAlign,s=o;o&&(o==="middle"&&(s="center"),a.style.textAlign=s)}}var L0=/^url\(\s*#(.*?)\)/;function xu(a,e,t,r){var n=t&&t.match(L0);if(n){var i=bg(n[1]);r.push([a,e,i]);return}return t==="none"&&(t=null),t}function I0(a,e){for(var t=0;t<e.length;t++){var r=e[t];r[0].style[r[1]]=a[r[2]]}}var M0=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function ri(a){return a.match(M0)||[]}var P0=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,Li=Math.PI/180;function E0(a,e){var t=a.getAttribute("transform");if(t){t=t.replace(/,/g," ");var r=[],n=null;t.replace(P0,function(c,f,h){return r.push(f,h),""});for(var i=r.length-1;i>0;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;r<pu.length;r++){var n=pu[r],i=a.getAttribute(n);i!=null&&(e[wn[n]]=i)}for(var r=0;r<du.length;r++){var n=du[r],i=a.getAttribute(n);i!=null&&(t[An[n]]=i)}}function _h(a,e){var t=e.width/a.width,r=e.height/a.height,n=Math.min(t,r);return{scale:n,x:-(a.x+a.width/2)*n+(e.x+e.width/2),y:-(a.y+a.height/2)*n+(e.y+e.height/2)}}function k0(a,e){var t=new C0;return t.parse(a,e)}var V0=ut(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),N0=function(){function a(e,t){this.type="geoSVG",this._usedGraphicMap=ut(),this._freedGraphics=[],this._mapName=e,this._parsedXML=xh(t)}return a.prototype.load=function(){var e=this._firstGraphic;if(!e){e=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(e),this._boundingRect=this._firstGraphic.boundingRect.clone();var t=G0(e.named),r=t.regions,n=t.regionsMap;this._regions=r,this._regionsMap=n}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},a.prototype._buildGraphic=function(e){var t,r;try{t=e&&k0(e,{ignoreViewBox:!0,ignoreRootClip:!0})||{},r=t.root,da(r!=null)}catch(g){throw new Error(`Invalid svg format
`+g.message)}var n=new nt;n.add(r),n.isGeoSVGGraphicRoot=!0;var i=t.width,o=t.height,s=t.viewBoxRect,l=this._boundingRect;if(!l){var u=void 0,v=void 0,c=void 0,f=void 0;if(i!=null?(u=0,c=i):s&&(u=s.x,c=s.width),o!=null?(v=0,f=o):s&&(v=s.y,f=s.height),u==null||v==null){var h=r.getBoundingRect();u==null&&(u=h.x,c=h.width),v==null&&(v=h.y,f=h.height)}l=this._boundingRect=new Tt(u,v,c,f)}if(s){var p=_h(s,l);r.scaleX=r.scaleY=p.scale,r.x=p.x,r.y=p.y}n.setClipPath(new Bt({shape:l.plain()}));var d=[];return D(t.named,function(g){V0.get(g.svgNodeTagLower)!=null&&(d.push(g),z0(g.el))}),{root:n,boundingRect:l,named:d}},a.prototype.useGraphic=function(e){var t=this._usedGraphicMap,r=t.get(e);return r||(r=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),t.set(e,r),r)},a.prototype.freeGraphic=function(e){var t=this._usedGraphicMap,r=t.get(e);r&&(t.removeKey(e),this._freedGraphics.push(r))},a}();function z0(a){a.silent=!1,a.isGroup&&a.traverse(function(e){e.silent=!1})}function G0(a){var e=[],t=ut();return D(a,function(r){if(r.namedFrom==null){var n=new am(r.name,r.el);e.push(n),t.set(r.name,n)}}),{regions:e,regionsMap:t}}var Po=[126,25],_u="南海诸岛",sr=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]];for(var ir=0;ir<sr.length;ir++)for(var Tr=0;Tr<sr[ir].length;Tr++)sr[ir][Tr][0]/=10.5,sr[ir][Tr][1]/=-10.5/.75,sr[ir][Tr][0]+=Po[0],sr[ir][Tr][1]+=Po[1];function O0(a,e){if(a==="china"){for(var t=0;t<e.length;t++)if(e[t].name===_u)return;e.push(new Kf(_u,$(sr,function(r){return{type:"polygon",exterior:r}}),Po))}}var B0={南海诸岛:[32,80],广东:[0,-10],香港:[10,5],澳门:[-10,10],天津:[5,5]};function F0(a,e){if(a==="china"){var t=B0[e.name];if(t){var r=e.getCenter();r[0]+=t[0]/10.5,r[1]+=-t[1]/(10.5/.75),e.setCenter(r)}}}var H0=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function W0(a,e){a==="china"&&e.name==="台湾"&&e.geometries.push({type:"polygon",exterior:H0[0]})}var U0="name",$0=function(){function a(e,t,r){this.type="geoJSON",this._parsedMap=ut(),this._mapName=e,this._specialAreas=r,this._geoJSON=Z0(t)}return a.prototype.load=function(e,t){t=t||U0;var r=this._parsedMap.get(t);if(!r){var n=this._parseToRegions(t);r=this._parsedMap.set(t,{regions:n,boundingRect:Y0(n)})}var i=ut(),o=[];return D(r.regions,function(s){var l=s.name;e&&Z(e,l)&&(s=s.cloneShallow(l=e[l])),o.push(s),i.set(l,s)}),{regions:o,boundingRect:r.boundingRect||new Tt(0,0,0,0),regionsMap:i}},a.prototype._parseToRegions=function(e){var t=this._mapName,r=this._geoJSON,n;try{n=r?im(r,e):[]}catch(i){throw new Error(`Invalid geoJson format
`+i.message)}return O0(t,n),D(n,function(i){var o=i.name;F0(t,i),W0(t,i);var s=this._specialAreas&&this._specialAreas[o];s&&i.transformTo(s.left,s.top,s.width,s.height)},this),n},a.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},a}();function Y0(a){for(var e,t=0;t<a.length;t++){var r=a[t].getBoundingRect();e=e||r.clone(),e.union(r)}return e}function Z0(a){return lt(a)?typeof JSON<"u"&&JSON.parse?JSON.parse(a):new Function("return ("+a+");")():a}var jr=ut();const He={registerMap:function(a,e,t){if(e.svg){var r=new N0(a,e.svg);jr.set(a,r)}else{var n=e.geoJson||e.geoJSON;n&&!e.features?t=e.specialAreas:n=e;var r=new $0(a,n,t);jr.set(a,r)}},getGeoResource:function(a){return jr.get(a)},getMapForUser:function(a){var e=jr.get(a);return e&&e.type==="geoJSON"&&e.getMapForUser()},load:function(a,e,t){var r=jr.get(a);if(r)return r.load(e,t)}};var ks=["rect","circle","line","ellipse","polygon","polyline","path"],X0=ut(ks),q0=ut(ks.concat(["g"])),K0=ut(ks.concat(["g"])),wh=Dt();function $a(a){var e=a.getItemStyle(),t=a.get("areaColor");return t!=null&&(e.fill=t),e}function wu(a){var e=a.style;e&&(e.stroke=e.stroke||e.fill,e.fill=null)}var Ah=function(){function a(e){var t=new nt;this.uid=_f("ec_map_draw"),this._controller=new Zn(e.getZr()),this._controllerHost={target:t},this.group=t,t.add(this._regionsGroup=new nt),t.add(this._svgGroup=new nt)}return a.prototype.draw=function(e,t,r,n,i){var o=e.mainType==="geo",s=e.getData&&e.getData();o&&t.eachComponent({mainType:"series",subType:"map"},function(y){!s&&y.getHostGeoModel()===e&&(s=y.getData())});var l=e.coordinateSystem,u=this._regionsGroup,v=this.group,c=l.getTransformInfo(),f=c.raw,h=c.roam,p=!u.childAt(0)||i;p?(v.x=h.x,v.y=h.y,v.scaleX=h.scaleX,v.scaleY=h.scaleY,v.dirty()):xt(v,h,e);var d=s&&s.getVisual("visualMeta")&&s.getVisual("visualMeta").length>0,g={api:r,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:d,isGeo:o,transformInfoRaw: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<h.length;++g){var y=v(h[g],d);y&&p.push(y)}return p}function f(h){return{shape:{points:c(h)}}}n.removeAll(),D(e.geo.regions,function(h){var p=h.name,d=t.get(p),g=r.get(p)||{},y=g.dataIdx,S=g.regionModel;if(!d){d=t.set(p,new nt),n.add(d),y=s?s.indexOfName(p):null,S=e.isGeo?o.getRegionModel(p):s?s.getItemModel(y):null;var m=S.get("silent",!0);m!=null&&(d.silent=m),r.set(p,{dataIdx:y,regionModel:S})}var x=[],b=[];D(h.geometries,function(A){if(A.type==="polygon"){var T=[A.exterior].concat(A.interiors||[]);u&&(T=Iu(T,u)),D(T,function(L){x.push(new Ae(f(L)))})}else{var C=A.points;u&&(C=Iu(C,u,!0)),D(C,function(L){b.push(new Te(f(L)))})}});var _=v(h.getCenter(),l&&l.project);function w(A,T){if(A.length){var C=new ff({culling:!0,segmentIgnoreThreshold:1,shape:{paths:A}});d.add(C),Au(e,C,y,S),Tu(e,C,p,S,o,y,_),T&&(wu(C),D(C.states,wu))}}w(x),w(b,!0)}),t.each(function(h,p){var d=r.get(p),g=d.dataIdx,y=d.regionModel;Cu(e,h,p,y,o,g),Du(e,h,p,y,o),Lu(e,h,p,y,o)},this)},a.prototype._buildSVG=function(e){var t=e.geo.map,r=e.transformInfoRaw;this._svgGroup.x=r.x,this._svgGroup.y=r.y,this._svgGroup.scaleX=r.scaleX,this._svgGroup.scaleY=r.scaleY,this._svgResourceChanged(t)&&(this._freeSVG(),this._useSVG(t));var n=this._svgDispatcherMap=ut(),i=!1;D(this._svgGraphicRecord.named,function(o){var s=o.name,l=e.mapOrGeoModel,u=e.data,v=o.svgNodeTagLower,c=o.el,f=u?u.indexOfName(s):null,h=l.getRegionModel(s);X0.get(v)!=null&&c instanceof xr&&Au(e,c,f,h),c instanceof xr&&(c.culling=!0);var p=h.get("silent",!0);if(p!=null&&(c.silent=p),c.z2EmphasisLift=0,!o.namedFrom&&(K0.get(v)!=null&&Tu(e,c,s,h,l,f,null),Cu(e,c,s,h,l,f),Du(e,c,s,h,l),q0.get(v)!=null)){var d=Lu(e,c,s,h,l);d==="self"&&(i=!0);var g=n.get(s)||n.set(s,[]);g.push(c)}},this),this._enableBlurEntireSVG(i,e)},a.prototype._enableBlurEntireSVG=function(e,t){if(e&&t.isGeo){var r=t.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle(),n=r.opacity;this._svgGraphicRecord.root.traverse(function(i){if(!i.isGroup){Br(i);var o=i.ensureState("blur").style||{};o.opacity==null&&n!=null&&(o.opacity=n),i.ensureState("emphasis")}})}},a.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},a.prototype.findHighDownDispatchers=function(e,t){if(e==null)return[];var r=t.coordinateSystem;if(r.resourceType==="geoJSON"){var n=this._regionsGroupByName;if(n){var i=n.get(e);return i?[i]:[]}}else if(r.resourceType==="geoSVG")return this._svgDispatcherMap&&this._svgDispatcherMap.get(e)||[]},a.prototype._svgResourceChanged=function(e){return this._svgMapName!==e},a.prototype._useSVG=function(e){var t=He.getGeoResource(e);if(t&&t.type==="geoSVG"){var r=t.useGraphic(this.uid);this._svgGroup.add(r.root),this._svgGraphicRecord=r,this._svgMapName=e}},a.prototype._freeSVG=function(){var e=this._svgMapName;if(e!=null){var t=He.getGeoResource(e);t&&t.type==="geoSVG"&&t.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},a.prototype._updateController=function(e,t,r){var n=e.coordinateSystem,i=this._controller,o=this._controllerHost;o.zoomLimit=e.get("scaleLimit"),o.zoom=n.getZoom(),i.enable(e.get("roam")||!1);var s=e.mainType;function l(){var u={type:"geoRoam",componentType:s};return u[s+"Id"]=e.id,u}i.off("pan").on("pan",function(u){this._mouseDownFlag=!1,Es(o,u.dx,u.dy),r.dispatchAction(K(l(),{dx:u.dx,dy:u.dy,animation:{duration:0}}))},this),i.off("zoom").on("zoom",function(u){this._mouseDownFlag=!1,Rs(o,u.scale,u.originX,u.originY),r.dispatchAction(K(l(),{totalZoom:o.zoom,zoom:u.scale,originX:u.originX,originY:u.originY,animation:{duration:0}}))},this),i.setPointerChecker(function(u,v,c){return n.containPoint([v,c])&&!ei(u,r,e)})},a.prototype.resetForLabelLayout=function(){this.group.traverse(function(e){var t=e.getTextContent();t&&(t.ignore=wh(t).ignore)})},a.prototype._updateMapSelectHandler=function(e,t,r,n){var i=this;t.off("mousedown"),t.off("click"),e.get("selectedMode")&&(t.on("mousedown",function(){i._mouseDownFlag=!0}),t.on("click",function(o){i._mouseDownFlag&&(i._mouseDownFlag=!1)}))},a}();function Au(a,e,t,r){var n=r.getModel("itemStyle"),i=r.getModel(["emphasis","itemStyle"]),o=r.getModel(["blur","itemStyle"]),s=r.getModel(["select","itemStyle"]),l=$a(n),u=$a(i),v=$a(s),c=$a(o),f=a.data;if(f){var h=f.getItemVisual(t,"style"),p=f.getItemVisual(t,"decal");a.isVisualEncodedByVisualMap&&h.fill&&(l.fill=h.fill),p&&(l.decal=cs(p,a.api))}e.setStyle(l),e.style.strokeNoScale=!0,e.ensureState("emphasis").style=u,e.ensureState("select").style=v,e.ensureState("blur").style=c,Br(e)}function Tu(a,e,t,r,n,i,o){var s=a.data,l=a.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),i)),v=s&&s.getItemLayout(i);if(l||u||v&&v.showLabel){var c=l?t:i,f=void 0;(!s||i>=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<l.length;u++)s.point(l[u][0],l[u][1]);s.lineEnd()}),!t&&s.polygonEnd(),r}var j0=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,i){if(!(i&&i.type==="mapToggleSelect"&&i.from===this.uid)){var o=this.group;if(o.removeAll(),!t.getHostGeoModel()){if(this._mapDraw&&i&&i.type==="geoRoam"&&this._mapDraw.resetForLabelLayout(),i&&i.type==="geoRoam"&&i.componentType==="series"&&i.seriesId===t.id){var s=this._mapDraw;s&&o.add(s.group)}else if(t.needsDrawMap){var s=this._mapDraw||new Ah(n);o.add(s.group),s.draw(t,r,n,this,i),this._mapDraw=s}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&r.getComponent("legend")&&this._renderSymbols(t,r,n)}}},e.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},e.prototype._renderSymbols=function(t,r,n){var i=t.originalData,o=this.group;i.each(i.mapDimension("value"),function(s,l){if(!isNaN(s)){var u=i.getItemLayout(l);if(!(!u||!u.point)){var v=u.point,c=u.offset,f=new Ma({style:{fill:t.getData().getVisual("style").fill},shape:{cx:v[0]+c*9,cy:v[1],r:3},silent:!0,z2:8+(c?0:Pa+1)});if(!c){var h=t.mainSeries.getData(),p=i.getName(l),d=h.indexOfName(p),g=i.getItemModel(l),y=g.getModel("label"),S=h.getItemGraphicEl(d);ue(f,Qt(g),{labelFetcher:{getFormattedLabel:function(m,x){return t.getFormattedLabel(d,x)}},defaultText:p}),f.disableLabelAnimation=!0,y.get("position")||f.setTextConfig({position:"bottom"}),S.onHoverStateChange=function(m){wf(f,m)}}o.add(f)}}})},e.type="map",e}(kt),J0=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.needsDrawMap=!1,t.seriesGroup=[],t.getTooltipPosition=function(r){if(r!=null){var n=this.getData().getName(r),i=this.coordinateSystem,o=i.getRegion(n);return o&&i.dataToPoint(o.getCenter())}},t}return e.prototype.getInitialData=function(t){for(var r=Xr(this,{coordDimensions:["value"],encodeDefaulter:st(us,this)}),n=ut(),i=[],o=0,s=r.count();o<s;o++){var l=r.getName(o);n.set(l,o)}var u=He.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return D(u.regions,function(v){var c=v.name,f=n.get(c),h=v.properties&&v.properties.echartsStyle,p;f==null?(p={name:c},i.push(p)):p=r.getRawDataItem(f),h&&Ct(p,h)}),r.appendData(i),r},e.prototype.getHostGeoModel=function(){var t=this.option.geoIndex;return t!=null?this.ecModel.getComponent("geo",t):null},e.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},e.prototype.getRawValue=function(t){var r=this.getData();return r.get(r.mapDimension("value"),t)},e.prototype.getRegionModel=function(t){var r=this.getData();return r.getItemModel(r.indexOfName(t))},e.prototype.formatTooltip=function(t,r,n){for(var i=this.getData(),o=this.getRawValue(t),s=i.getName(t),l=this.seriesGroup,u=[],v=0;v<l.length;v++){var c=l[v].originalData.indexOfName(s),f=i.mapDimension("value");isNaN(l[v].originalData.get(f,c))||u.push(l[v].name)}return ne("section",{header:u.join(", "),noHeader:!u.length,blocks:[ne("nameValue",{name:s,value:o})]})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.getLegendIcon=function(t){var r=t.icon||"roundRect",n=ve(r,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill);return n.setStyle(t.itemStyle),n.style.stroke="none",r.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={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;v<u;v++)s=Math.min(s,t[i][v]),l=Math.max(l,t[i][v]),o+=t[i][v];var c;return e==="min"?c=s:e==="max"?c=l:e==="average"?c=o/u:c=o,u===0?NaN:c})}function t1(a){var e={};a.eachSeriesByType("map",function(t){var r=t.getHostGeoModel(),n=r?"o"+r.id:"i"+t.getMapType();(e[n]=e[n]||[]).push(t)}),D(e,function(t,r){for(var n=Q0($(t,function(o){return o.getData()}),t[0].get("mapValueCalculation")),i=0;i<t.length;i++)t[i].originalData=t[i].getData();for(var i=0;i<t.length;i++)t[i].seriesGroup=t,t[i].needsDrawMap=i===0&&!t[i].getHostGeoModel(),t[i].setData(n.cloneShallow()),t[i].mainSeries=t[0]})}function e1(a){var e={};a.eachSeriesByType("map",function(t){var r=t.getMapType();if(!(t.getHostGeoModel()||e[r])){var n={};D(t.seriesGroup,function(o){var s=o.coordinateSystem,l=o.originalData;o.get("showLegendSymbol")&&a.getComponent("legend")&&l.each(l.mapDimension("value"),function(u,v){var c=l.getName(v),f=s.getRegion(c);if(!(!f||isNaN(u))){var h=n[c]||0,p=s.dataToPoint(f.getCenter());n[c]=h+1,l.setItemLayout(v,{point:p,offset:h})}})});var i=t.getData();i.each(function(o){var s=i.getName(o),l=i.getItemLayout(o)||{};l.showLabel=!n[s],i.setItemLayout(o,l)}),e[r]=!0}})}var Mu=fa,Ga=function(a){V(e,a);function e(t){var r=a.call(this)||this;return r.type="view",r.dimensions=["x","y"],r._roamTransformable=new kr,r._rawTransformable=new kr,r.name=t,r}return e.prototype.setBoundingRect=function(t,r,n,i){return this._rect=new Tt(t,r,n,i),this._rect},e.prototype.getBoundingRect=function(){return this._rect},e.prototype.setViewRect=function(t,r,n,i){this._transformTo(t,r,n,i),this._viewRect=new Tt(t,r,n,i)},e.prototype._transformTo=function(t,r,n,i){var o=this.getBoundingRect(),s=this._rawTransformable;s.transform=o.calculateTransform(new Tt(t,r,n,i));var l=s.parent;s.parent=null,s.decomposeTransform(),s.parent=l,this._updateTransform()},e.prototype.setCenter=function(t,r){t&&(this._center=[U(t[0],r.getWidth()),U(t[1],r.getHeight())],this._updateCenterAndZoom())},e.prototype.setZoom=function(t){t=t||1;var r=this.zoomLimit;r&&(r.max!=null&&(t=Math.min(r.max,t)),r.min!=null&&(t=Math.max(r.min,t))),this._zoom=t,this._updateCenterAndZoom()},e.prototype.getDefaultCenter=function(){var t=this.getBoundingRect(),r=t.x+t.width/2,n=t.y+t.height/2;return[r,n]},e.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},e.prototype.getZoom=function(){return this._zoom||1},e.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},e.prototype._updateCenterAndZoom=function(){var t=this._rawTransformable.getLocalTransform(),r=this._roamTransformable,n=this.getDefaultCenter(),i=this.getCenter(),o=this.getZoom();i=fa([],i,t),n=fa([],n,t),r.originX=i[0],r.originY=i[1],r.x=n[0]-i[0],r.y=n[1]-i[1],r.scaleX=r.scaleY=o,this._updateTransform()},e.prototype._updateTransform=function(){var t=this._roamTransformable,r=this._rawTransformable;r.parent=t,t.updateTransform(),r.updateTransform(),wg(this.transform||(this.transform=[]),r.transform||Zr()),this._rawTransform=r.getLocalTransform(),this.invTransform=this.invTransform||[],os(this.invTransform,this.transform),this.decomposeTransform()},e.prototype.getTransformInfo=function(){var t=this._rawTransformable,r=this._roamTransformable,n=new kr;return n.transform=r.transform,n.decomposeTransform(),{roam:{x:n.x,y:n.y,scaleX:n.scaleX,scaleY:n.scaleY},raw:{x:t.x,y:t.y,scaleX:t.scaleX,scaleY:t.scaleY}}},e.prototype.getViewRect=function(){return this._viewRect},e.prototype.getViewRectAfterRoam=function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},e.prototype.dataToPoint=function(t,r,n){var i=r?this._rawTransform:this.transform;return n=n||[],i?Mu(n,t,i):Kt(n,t)},e.prototype.pointToData=function(t){var r=this.invTransform;return r?Mu([],t,r):[t[0],t[1]]},e.prototype.convertToPixel=function(t,r,n){var i=Pu(r);return i===this?i.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,r,n){var i=Pu(r);return i===this?i.pointToData(n):null},e.prototype.containPoint=function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])},e.dimensions=["x","y"],e}(kr);function Pu(a){var e=a.seriesModel;return e?e.coordinateSystem:null}var r1={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},Th=["lng","lat"],Eo=function(a){V(e,a);function e(t,r,n){var i=a.call(this,t)||this;i.dimensions=Th,i.type="geo",i._nameCoordMap=ut(),i.map=r;var o=n.projection,s=He.load(r,n.nameMap,n.nameProperty),l=He.getGeoResource(r);i.resourceType=l?l.type:null;var u=i.regions=s.regions,v=r1[l.type];i._regionsMap=s.regionsMap,i.regions=s.regions,i.projection=o;var c;if(o)for(var f=0;f<u.length;f++){var h=u[f].getBoundingRect(o);c=c||h.clone(),c.union(h)}else c=s.boundingRect;return i.setBoundingRect(c.x,c.y,c.width,c.height),i.aspectScale=o?1:Rt(n.aspectScale,v.aspectScale),i._invertLongitute=o?!1:v.invertLongitute,i}return e.prototype._transformTo=function(t,r,n,i){var o=this.getBoundingRect(),s=this._invertLongitute;o=o.clone(),s&&(o.y=-o.y-o.height);var l=this._rawTransformable;l.transform=o.calculateTransform(new Tt(t,r,n,i));var u=l.parent;l.parent=null,l.decomposeTransform(),l.parent=u,s&&(l.scaleY=-l.scaleY),this._updateTransform()},e.prototype.getRegion=function(t){return this._regionsMap.get(t)},e.prototype.getRegionByCoord=function(t){for(var r=this.regions,n=0;n<r.length;n++){var i=r[n];if(i.type==="geoJSON"&&i.contain(t))return r[n]}},e.prototype.addGeoCoord=function(t,r){this._nameCoordMap.set(t,r)},e.prototype.getGeoCoord=function(t){var r=this._regionsMap.get(t);return this._nameCoordMap.get(t)||r&&r.getCenter()},e.prototype.dataToPoint=function(t,r,n){if(lt(t)&&(t=this.getGeoCoord(t)),t){var i=this.projection;return i&&(t=i.project(t)),t&&this.projectedToPoint(t,r,n)}},e.prototype.pointToData=function(t){var r=this.projection;return r&&(t=r.unproject(t)),t&&this.pointToProjected(t)},e.prototype.pointToProjected=function(t){return a.prototype.pointToData.call(this,t)},e.prototype.projectedToPoint=function(t,r,n){return a.prototype.dataToPoint.call(this,t,r,n)},e.prototype.convertToPixel=function(t,r,n){var i=Eu(r);return i===this?i.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,r,n){var i=Eu(r);return i===this?i.pointToData(n):null},e}(Ga);Ce(Eo,Ga);function Eu(a){var e=a.geoModel,t=a.seriesModel;return e?e.coordinateSystem:t?t.coordinateSystem||(t.getReferringComponents("geo",Ar).models[0]||{}).coordinateSystem:null}function Ru(a,e){var t=a.get("boundingCoords");if(t!=null){var r=t[0],n=t[1];if(isFinite(r[0])&&isFinite(r[1])&&isFinite(n[0])&&isFinite(n[1])){var i=this.projection;if(i){var o=r[0],s=r[1],l=n[0],u=n[1];r=[1/0,1/0],n=[-1/0,-1/0];var v=function(_,w,A,T){for(var C=A-_,L=T-w,M=0;M<=100;M++){var I=M/100,P=i.project([_+C*I,w+L*I]);lf(r,r,P),uf(n,n,P)}};v(o,s,l,s),v(l,s,l,u),v(l,u,o,u),v(o,u,l,s)}this.setBoundingRect(r[0],r[1],n[0]-r[0],n[1]-r[1])}}var c=this.getBoundingRect(),f=a.get("layoutCenter"),h=a.get("layoutSize"),p=e.getWidth(),d=e.getHeight(),g=c.width/c.height*this.aspectScale,y=!1,S,m;f&&h&&(S=[U(f[0],p),U(f[1],d)],m=U(h,Math.min(p,d)),!isNaN(S[0])&&!isNaN(S[1])&&!isNaN(m)&&(y=!0));var x;if(y)x={},g>1?(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<i.length;s++)o.set(i[s].name,i[s]);var l=He.load(t,r,n);return D(l.regions,function(u){var v=u.name,c=o.get(v),f=u.properties&&u.properties.echartsStyle;c||(c={name:v},i.push(c)),f&&Ct(c,f)}),i},a}(),Ch=new n1,i1=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=He.getGeoResource(t.map);if(i&&i.type==="geoJSON"){var o=t.itemStyle=t.itemStyle||{};"color"in o||(o.color="#eee")}this.mergeDefaultAndTheme(t,n),La(t,"label",["show"])},e.prototype.optionUpdated=function(){var t=this,r=this.option;r.regions=Ch.getFilledRegions(r.regions,r.map,r.nameMap,r.nameProperty);var n={};this._optionModelMap=Af(r.regions||[],function(i,o){var s=o.name;return s&&(i.set(s,new ce(o,t,t.ecModel)),o.selected&&(n[s]=!0)),i},ut()),r.selectedMap||(r.selectedMap=n)},e.prototype.getRegionModel=function(t){return this._optionModelMap.get(t)||new ce(null,this,this.ecModel)},e.prototype.getFormattedLabel=function(t,r){var n=this.getRegionModel(t),i=r==="normal"?n.get(["label","formatter"]):n.get(["emphasis","label","formatter"]),o={name:t};if(gt(i))return o.status=r,i(o);if(lt(i))return i.replace("{a}",t??"")},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.select=function(t){var r=this.option,n=r.selectedMode;if(n){n!=="multiple"&&(r.selectedMap=null);var i=r.selectedMap||(r.selectedMap={});i[t]=!0}},e.prototype.unSelect=function(t){var r=this.option.selectedMap;r&&(r[t]=!1)},e.prototype.toggleSelected=function(t){this[this.isSelected(t)?"unSelect":"select"](t)},e.prototype.isSelected=function(t){var r=this.option.selectedMap;return!!(r&&r[t])},e.type="geo",e.layoutMode="box",e.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},e}(Xt);function ku(a,e){return a.pointToProjected?a.pointToProjected(e):a.pointToData(e)}function Vs(a,e,t,r){var n=a.getZoom(),i=a.getCenter(),o=e.zoom,s=a.projectedToPoint?a.projectedToPoint(i):a.dataToPoint(i);if(e.dx!=null&&e.dy!=null&&(s[0]-=e.dx,s[1]-=e.dy,a.setCenter(ku(a,s),r)),o!=null){if(t){var l=t.min||0,u=t.max||1/0;o=Math.max(Math.min(n*o,u),l)/n}a.scaleX*=o,a.scaleY*=o;var v=(e.originX-a.x)*(o-1),c=(e.originY-a.y)*(o-1);a.x-=v,a.y-=c,a.updateTransform(),a.setCenter(ku(a,s),r),a.setZoom(o*n)}return{center:a.getCenter(),zoom:a.getZoom()}}var o1=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.focusBlurEnabled=!0,t}return e.prototype.init=function(t,r){this._api=r},e.prototype.render=function(t,r,n,i){if(this._model=t,!t.get("show")){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||(this._mapDraw=new Ah(n));var o=this._mapDraw;o.draw(t,r,n,this,i),o.group.on("click",this._handleRegionClick,this),o.group.silent=t.get("silent"),this.group.add(o.group),this.updateSelectStatus(t,r,n)},e.prototype._handleRegionClick=function(t){var r;Tf(t.target,function(n){return(r=ht(n).eventData)!=null},!0),r&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:r.name})},e.prototype.updateSelectStatus=function(t,r,n){var i=this;this._mapDraw.group.traverse(function(o){var s=ht(o).eventData;if(s)return i._model.isSelected(s.name)?n.enterSelect(o):n.leaveSelect(o),!0})},e.prototype.findHighDownDispatchers=function(t){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(t,this._model)},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},e.type="geo",e}(te);function s1(a,e,t){He.registerMap(a,e,t)}function Dh(a){a.registerCoordinateSystem("geo",Ch),a.registerComponentModel(i1),a.registerComponentView(o1),a.registerImpl("registerMap",s1),a.registerImpl("getMap",function(t){return He.getMapForUser(t)});function e(t,r){r.update="geo:updateSelectStatus",a.registerAction(r,function(n,i){var o={},s=[];return i.eachComponent({mainType:"geo",query:n},function(l){l[t](n.name);var u=l.coordinateSystem;D(u.regions,function(c){o[c.name]=l.isSelected(c.name)||!1});var v=[];D(o,function(c,f){o[f]&&v.push(f)}),s.push({geoIndex:l.componentIndex,name:v})}),{selected:o,allSelected:s,name:n.name}})}e("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),e("select",{type:"geoSelect",event:"geoselected"}),e("unSelect",{type:"geoUnSelect",event:"geounselected"}),a.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,r,n){var i=t.componentType||"series";r.eachComponent({mainType:i,query:t},function(o){var s=o.coordinateSystem;if(s.type==="geo"){var l=Vs(s,t,o.get("scaleLimit"),n);o.setCenter&&o.setCenter(l.center),o.setZoom&&o.setZoom(l.zoom),i==="series"&&D(o.seriesGroup,function(u){u.setCenter(l.center),u.setZoom(l.zoom)})}})})}function l1(a){it(Dh),a.registerChartView(j0),a.registerSeriesModel(J0),a.registerLayout(e1),a.registerProcessor(a.PRIORITY.PROCESSOR.STATISTIC,t1),Sf("map",a.registerAction)}function u1(a){var e=a;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var t=[e],r,n;r=t.pop();)if(n=r.children,r.isExpand&&n.length)for(var i=n.length,o=i-1;o>=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;p<i-1;p++){var d=n[p];t.moveTo(d[0],d[1]),h[v]=d[v],t.lineTo(h[0],h[1])}},e}(Wt),x1=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._mainGroup=new nt,t}return e.prototype.init=function(t,r){this._controller=new Zn(r.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,r,n){var i=t.getData(),o=t.layoutInfo,s=this._mainGroup,l=t.get("layout");l==="radial"?(s.x=o.x+o.width/2,s.y=o.y+o.height/2):(s.x=o.x,s.y=o.y),this._updateViewCoordSys(t,n),this._updateController(t,r,n);var u=this._data;i.diff(u).add(function(v){Nu(i,v)&&zu(i,v,null,s,t)}).update(function(v,c){var f=u.getItemGraphicEl(c);if(!Nu(i,v)){f&&Ou(u,c,f,s,t);return}zu(i,v,f,s,t)}).remove(function(v){var c=u.getItemGraphicEl(v);c&&Ou(u,v,c,s,t)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),t.get("expandAndCollapse")===!0&&i.eachItemGraphicEl(function(v,c){v.off("click").on("click",function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:c})})}),this._data=i},e.prototype._updateViewCoordSys=function(t,r){var n=t.getData(),i=[];n.each(function(c){var f=n.getItemLayout(c);f&&!isNaN(f.x)&&!isNaN(f.y)&&i.push([+f.x,+f.y])});var o=[],s=[];Xn(i,o,s);var l=this._min,u=this._max;s[0]-o[0]===0&&(o[0]=l?l[0]:o[0]-1,s[0]=u?u[0]:s[0]+1),s[1]-o[1]===0&&(o[1]=l?l[1]:o[1]-1,s[1]=u?u[1]:s[1]+1);var v=t.coordinateSystem=new Ga;v.zoomLimit=t.get("scaleLimit"),v.setBoundingRect(o[0],o[1],s[0]-o[0],s[1]-o[1]),v.setCenter(t.get("center"),r),v.setZoom(t.get("zoom")),this.group.attr({x:v.x,y:v.y,scaleX:v.scaleX,scaleY:v.scaleY}),this._min=o,this._max=s},e.prototype._updateController=function(t,r,n){var i=this,o=this._controller,s=this._controllerHost,l=this.group;o.setPointerChecker(function(u,v,c){var f=l.getBoundingRect();return f.applyTransform(l.transform),f.contain(v,c)&&!ei(u,n,t)}),o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){Es(s,u.dx,u.dy),n.dispatchAction({seriesId:t.id,type:"treeRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Rs(s,u.scale,u.originX,u.originY),n.dispatchAction({seriesId:t.id,type:"treeRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),i._updateNodeAndLinkScale(t),n.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(t){var r=t.getData(),n=this._getNodeGlobalScale(t);r.eachItemGraphicEl(function(i,o){i.setSymbolScale(n)})},e.prototype._getNodeGlobalScale=function(t){var r=t.coordinateSystem;if(r.type!=="view")return 1;var n=this._nodeScaleRatio,i=r.scaleX||1,o=r.getZoom(),s=(o-1)*n+1;return s/i},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},e.type="tree",e}(kt);function Nu(a,e){var t=a.getItemLayout(e);return t&&!isNaN(t.x)&&!isNaN(t.y)}function zu(a,e,t,r,n){var i=!t,o=a.tree.getNodeByDataIndex(e),s=o.getModel(),l=o.getVisual("style").fill,u=o.isExpand===!1&&o.children.length!==0?l:"#fff",v=a.tree.root,c=o.parentNode===v?o:o.parentNode||o,f=a.getItemGraphicEl(c.dataIndex),h=c.getLayout(),p=f?{x:f.__oldX,y:f.__oldY,rawX:f.__radialOldRawX,rawY:f.__radialOldRawY}:h,d=o.getLayout();i?(t=new Cf(a,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.x=p.x,t.y=p.y):t.updateData(a,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.__radialOldRawX=t.__radialRawX,t.__radialOldRawY=t.__radialRawY,t.__radialRawX=d.rawX,t.__radialRawY=d.rawY,r.add(t),a.setItemGraphicEl(e,t),t.__oldX=t.x,t.__oldY=t.y,xt(t,{x:d.x,y:d.y},n);var g=t.getSymbolPath();if(n.get("layout")==="radial"){var y=v.children[0],S=y.getLayout(),m=y.children.length,x=void 0,b=void 0;if(d.x===S.x&&o.isExpand===!0&&y.children.length){var _={x:(y.children[0].getLayout().x+y.children[m-1].getLayout().x)/2,y:(y.children[0].getLayout().y+y.children[m-1].getLayout().y)/2};x=Math.atan2(_.y-S.y,_.x-S.x),x<0&&(x=Math.PI*2+x),b=_.x<S.x,b&&(x=x-Math.PI)}else x=Math.atan2(d.y-S.y,d.x-S.x),x<0&&(x=Math.PI*2+x),o.children.length===0||o.children.length!==0&&o.isExpand===!1?(b=d.x<S.x,b&&(x=x-Math.PI)):(b=d.x>S.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;S<g.length;S++){var m=g[S].getLayout();y.push([m.x,m.y])}d||(d=r.__edge=new S1({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:c,forkPosition:h}})),xt(d,{shape:{parentPoint:[o.x,o.y],childPoints:y}},a)}d&&!(u==="polyline"&&!e.isExpand)&&(d.useStyle(ot({strokeNoScale:!0,fill:null},p)),ae(d,l,"lineStyle"),Br(d),s.add(d))}function Gu(a,e,t,r,n){var i=e.tree.root,o=Lh(i,a),s=o.source,l=o.sourceLayout,u=e.getItemGraphicEl(a.dataIndex);if(u){var v=e.getItemGraphicEl(s.dataIndex),c=v.__edge,f=u.__edge||(s.isExpand===!1||s.children.length===1?c:void 0),h=r.get("edgeShape"),p=r.get("layout"),d=r.get("orient"),g=r.get(["lineStyle","curveness"]);f&&(h==="curve"?hn(f,{shape:Ro(p,d,g,l,l),style:{opacity:0}},r,{cb:function(){t.remove(f)},removeOpt:n}):h==="polyline"&&r.get("layout")==="orthogonal"&&hn(f,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},r,{cb:function(){t.remove(f)},removeOpt:n}))}}function Lh(a,e){for(var t=e.parentNode===a?e:e.parentNode||e,r;r=t.getLayout(),r==null;)t=t.parentNode===a?t:t.parentNode||t;return{source:t,sourceLayout:r}}function Ou(a,e,t,r,n){var i=a.tree.getNodeByDataIndex(e),o=a.tree.root,s=Lh(o,i).sourceLayout,l={duration:n.get("animationDurationUpdate"),easing:n.get("animationEasingUpdate")};hn(t,{x:s.x+1,y:s.y+1},n,{cb:function(){r.remove(t),a.setItemGraphicEl(e,null)},removeOpt:l}),t.fadeOut(null,a.hostModel,{fadeLabel:!0,animation:l}),i.children.forEach(function(u){Gu(u,a,r,n,l)}),Gu(i,a,r,n,l)}function Ro(a,e,t,r,n){var i,o,s,l,u,v,c,f;if(a==="radial"){u=r.rawX,c=r.rawY,v=n.rawX,f=n.rawY;var h=na(u,c),p=na(u,c+(f-c)*t),d=na(v,f+(c-f)*t),g=na(v,f);return{x1:h.x||0,y1:h.y||0,x2:g.x||0,y2:g.y||0,cpx1:p.x||0,cpy1:p.y||0,cpx2:d.x||0,cpy2:d.y||0}}else u=r.x,c=r.y,v=n.x,f=n.y,(e==="LR"||e==="RL")&&(i=u+(v-u)*t,o=c,s=v+(u-v)*t,l=f),(e==="TB"||e==="BT")&&(i=u,o=c+(f-c)*t,s=v,l=f+(c-f)*t);return{x1:u,y1:c,x2:v,y2:f,cpx1:i,cpy1:o,cpx2:s,cpy2:l}}var ye=Dt();function Ih(a){var e=a.mainData,t=a.datas;t||(t={main:e},a.datasAttr={main:"data"}),a.datas=a.mainData=null,Mh(e,t,a),D(t,function(r){D(e.TRANSFERABLE_METHODS,function(n){r.wrapMethod(n,st(_1,a))})}),e.wrapMethod("cloneShallow",st(A1,a)),D(e.CHANGABLE_METHODS,function(r){e.wrapMethod(r,st(w1,a))}),da(t[e.dataType]===e)}function _1(a,e){if(D1(this)){var t=K({},ye(this).datas);t[this.dataType]=e,Mh(e,t,a)}else Ns(e,this.dataType,ye(this).mainData,a);return e}function w1(a,e){return a.struct&&a.struct.update(),e}function A1(a,e){return D(ye(e).datas,function(t,r){t!==e&&Ns(t.cloneShallow(),r,e,a)}),e}function T1(a){var e=ye(this).mainData;return a==null||e==null?e:ye(e).datas[a]}function C1(){var a=ye(this).mainData;return a==null?[{data:a}]:$(Mt(ye(a).datas),function(e){return{type:e,data:ye(a).datas[e]}})}function D1(a){return ye(a).mainData===a}function Mh(a,e,t){ye(a).datas={},D(e,function(r,n){Ns(r,n,a,t)})}function Ns(a,e,t,r){ye(t).datas[e]=a,ye(a).mainData=t,a.dataType=e,r.struct&&(a[r.structAttr]=r.struct,r.struct[r.datasAttr[e]]=a),a.getLinkedData=T1,a.getLinkedDataAll=C1}var L1=function(){function a(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||"",this.hostTree=t}return a.prototype.isRemoved=function(){return this.dataIndex<0},a.prototype.eachNode=function(e,t,r){gt(e)&&(r=t,t=e,e=null),e=e||{},lt(e)&&(e={order:e});var n=e.order||"preorder",i=this[e.attr||"children"],o;n==="preorder"&&(o=t.call(r,this));for(var s=0;!o&&s<i.length;s++)i[s].eachNode(e,t,r);n==="postorder"&&t.call(r,this)},a.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var r=0;r<this.children.length;r++){var n=this.children[r];n.updateDepthAndHeight(e+1),n.height>t&&(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<n;t++){var i=r[t].getNodeById(e);if(i)return i}},a.prototype.contains=function(e){if(e===this)return!0;for(var t=0,r=this.children,n=r.length;t<n;t++){var i=r[t].contains(e);if(i)return i}},a.prototype.getAncestors=function(e){for(var t=[],r=e?this:this.parentNode;r;)t.push(r),r=r.parentNode;return t.reverse(),t},a.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},a.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},a.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||"value"),this.dataIndex)},a.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},a.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},a.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,r=t.data.getItemModel(this.dataIndex);return r.getModel(e)}},a.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},a.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},a.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},a.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},a.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},a.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t<e.length;++t)if(e[t]===this)return t;return-1}return-1},a.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},a.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},a}(),zs=function(){function a(e){this.type="tree",this._nodes=[],this.hostModel=e}return a.prototype.eachNode=function(e,t,r){this.root.eachNode(e,t,r)},a.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},a.prototype.getNodeById=function(e){return this.root.getNodeById(e)},a.prototype.update=function(){for(var e=this.data,t=this._nodes,r=0,n=t.length;r<n;r++)t[r].dataIndex=-1;for(var r=0,n=e.count();r<n;r++)t[e.getRawIndex(r)].dataIndex=r},a.prototype.clearLayouts=function(){this.data.clearItemLayouts()},a.createTree=function(e,t,r){var n=new a(t),i=[],o=1;s(e);function s(v,c){var f=v.value;o=Math.max(o,q(f)?f.length:1),i.push(v);var h=new L1(ze(v.name,""),n);c?I1(h,c):n.root=h,n._nodes.push(h);var p=v.children;if(p)for(var d=0;d<p.length;d++)s(p[d],h)}n.root.updateDepthAndHeight(0);var l=Hn(i,{coordDimensions:["value"],dimensionsCount:o}).dimensions,u=new re(l,t);return u.initData(i),r&&r(u),Ih({mainData:u,struct:n,structAttr:"tree"}),n.update(),n},a}();function I1(a,e){var t=e.children;a.parentNode!==e&&(t.push(a),a.parentNode=e)}function ba(a,e,t){if(a&&Pt(e,a.type)>=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<o.length;s++)r.push(o[s])}for(;i=n.pop();)e(i,t)}function Jr(a,e){for(var t=[a],r;r=t.pop();)if(e(r),r.isExpand){var n=r.children;if(n.length)for(var i=n.length-1;i>=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;x<u.getLayout().x&&(u=m),x>v.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;e<Bu.length;e++)a.registerAction({type:Bu[e],update:"updateView"},yr);a.registerAction({type:"treemapRootToNode",update:"updateView"},function(t,r){r.eachComponent({mainType:"series",subType:"treemap",query:t},n);function n(i,o){var s=["treemapZoomToNode","treemapRootToNode"],l=ba(t,s,i);if(l){var u=i.getViewRoot();u&&(t.direction=Gs(u,l.node)?"rollUp":"drillDown"),i.resetViewRoot(l.node)}}})}function Eh(a){var e=a.getData(),t=e.tree,r={};t.eachNode(function(n){for(var i=n;i&&i.depth>1;)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;n<i;n++){var o=this._storage[n];o.el.animateTo(o.target,{duration:o.duration,delay:o.delay,easing:o.easing,setToFinal:!0,done:r,aborted:r})}return this},a}();function $1(){return new U1}var ko=nt,Hu=Bt,Wu=3,Uu="label",$u="upperLabel",Y1=Pa*10,Z1=Pa*2,X1=Pa*3,lr=Lf([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Yu=function(a){var e=lr(a);return e.stroke=e.fill=e.lineWidth=null,e},Tn=Dt(),q1=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._state="ready",t._storage=Qr(),t}return e.prototype.render=function(t,r,n,i){var o=r.findComponents({mainType:"series",subType:"treemap",query:i});if(!(Pt(o,t)<0)){this.seriesModel=t,this.api=n,this.ecModel=r;var s=["treemapZoomToNode","treemapRootToNode"],l=ba(i,s,t),u=i&&i.type,v=t.layoutInfo,c=!this._oldTree,f=this._storage,h=u==="treemapRootToNode"&&l&&f?{rootNodeGroup:f.nodeGroup[l.node.getRawIndex()],direction:i.direction}:null,p=this._giveContainerGroup(v),d=t.get("animation"),g=this._doRender(p,t,h);d&&!c&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(p,g,t,h):g.renderFinally(),this._resetController(n),this._renderBreadcrumb(t,n,l)}},e.prototype._giveContainerGroup=function(t){var r=this._containerGroup;return r||(r=this._containerGroup=new ko,this._initEvents(r),this.group.add(r)),r.x=t.x,r.y=t.y,r},e.prototype._doRender=function(t,r,n){var i=r.getData().tree,o=this._oldTree,s=Qr(),l=Qr(),u=this._storage,v=[];function c(S,m,x,b){return K1(r,l,u,n,s,v,S,m,x,b)}d(i.root?[i.root]:[],o&&o.root?[o.root]:[],t,i===o||!o,0);var f=g(u);if(this._oldTree=i,this._storage=l,this._controllerHost){var h=this.seriesModel.layoutInfo,p=i.root.getLayout();p.width===h.width&&p.height===h.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:s,willDeleteEls:f,renderFinally:y};function d(S,m,x,b,_){b?(m=S,D(S,function(T,C){!T.isRemoved()&&A(C,C)})):new Qe(m,S,w,w).add(A).update(A).remove(st(A,null)).execute();function w(T){return T.getId()}function A(T,C){var L=T!=null?S[T]:null,M=C!=null?m[C]:null,I=c(L,M,x,_);I&&d(L&&L.viewChildren||[],M&&M.viewChildren||[],I,b,_+1)}}function g(S){var m=Qr();return S&&D(S,function(x,b){var _=m[b];D(x,function(w){w&&(_.push(w),Tn(w).willDelete=!0)})}),m}function y(){D(f,function(S){D(S,function(m){m.parent&&m.parent.remove(m)})}),D(v,function(S){S.invisible=!0,S.dirty()})}},e.prototype._doAnimation=function(t,r,n,i){var o=n.get("animationDurationUpdate"),s=n.get("animationEasing"),l=(gt(o)?0:o)||0,u=(gt(s)?null:s)||"cubicOut",v=$1();D(r.willDeleteEls,function(c,f){D(c,function(h,p){if(!h.invisible){var d=h.parent,g,y=Tn(d);if(i&&i.direction==="drillDown")g=d===i.rootNodeGroup?{shape:{x:0,y:0,width:y.nodeWidth,height:y.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var S=0,m=0;y.willDelete||(S=y.nodeWidth/2,m=y.nodeHeight/2),g=f==="nodeGroup"?{x:S,y:m,style:{opacity:0}}:{shape:{x:S,y:m,width:0,height:0},style:{opacity:0}}}g&&v.add(h,g,l,0,u)}})}),D(this._storage,function(c,f){D(c,function(h,p){var d=r.lastsForAnimation[f][p],g={};d&&(h instanceof nt?d.oldX!=null&&(g.x=h.x,g.y=h.y,h.x=d.oldX,h.y=d.oldY):(d.oldShape&&(g.shape=K({},h.shape),h.setShape(d.oldShape)),d.fadein?(h.setStyle("opacity",0),g.style={opacity:1}):h.style.opacity!==1&&(g.style={opacity:1})),v.add(h,g,l,0,u))})},this),this._state="animating",v.finished(at(function(){this._state="ready",r.renderFinally()},this)).start()},e.prototype._resetController=function(t){var r=this._controller,n=this._controllerHost;n||(this._controllerHost={target:this.group},n=this._controllerHost),r||(r=this._controller=new Zn(t.getZr()),r.enable(this.seriesModel.get("roam")),n.zoomLimit=this.seriesModel.get("scaleLimit"),n.zoom=this.seriesModel.get("zoom"),r.on("pan",at(this._onPan,this)),r.on("zoom",at(this._onZoom,this)));var i=new Tt(0,0,t.getWidth(),t.getHeight());r.setPointerChecker(function(o,s,l){return i.contain(s,l)})},e.prototype._clearController=function(){var t=this._controller;this._controllerHost=null,t&&(t.dispose(),t=null)},e.prototype._onPan=function(t){if(this._state!=="animating"&&(Math.abs(t.dx)>Wu||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<s;o++){var l=t[o].value;if(l!=null){if(l===e||lt(l)&&l===e+"")return o;r&&f(l,o)}}for(var o=0,s=t.length;o<s;o++){var u=t[o],v=u.interval,c=u.close;if(v){if(v[0]===-1/0){if(Za(c[1],e,v[1]))return o}else if(v[1]===1/0){if(Za(c[0],v[0],e))return o}else if(Za(c[0],v[0],e)&&Za(c[1],e,v[1]))return o;r&&f(v[0],o),r&&f(v[1],o)}}if(r)return e===1/0?t.length-1:e===-1/0?0:n;function f(h,p){var d=Math.abs(h-e);d<i&&(i=d,n=p)}},a.visualHandlers={color:{applyVisual:ta("color"),getColorMapper:function(){var e=this.option;return at(e.mappingMethod==="category"?function(t,r){return!r&&(t=this._normalizeData(t)),ia.call(this,t)}:function(t,r,n){var i=!!n;return!r&&(t=this._normalizeData(t)),n=hi(t,e.parsedVisual,n),i?n:fi(n,"rgba")},this)},_normalizedToVisual:{linear:function(e){return fi(hi(e,this.option.parsedVisual),"rgba")},category:ia,piecewise:function(e,t){var r=No.call(this,t);return r==null&&(r=fi(hi(e,this.option.parsedVisual),"rgba")),r},fixed:ur}},colorHue:Ya(function(e,t){return la(e,t)}),colorSaturation:Ya(function(e,t){return la(e,null,t)}),colorLightness:Ya(function(e,t){return la(e,null,null,t)}),colorAlpha:Ya(function(e,t){return dn(e,t)}),decal:{applyVisual:ta("decal"),_normalizedToVisual:{linear:null,category:ia,piecewise:null,fixed:null}},opacity:{applyVisual:ta("opacity"),_normalizedToVisual:Vo([0,1])},liftZ:{applyVisual:ta("liftZ"),_normalizedToVisual:{linear:ur,category:ur,piecewise:ur,fixed:ur}},symbol:{applyVisual:function(e,t,r){var n=this.mapValueToVisual(e);r("symbol",n)},_normalizedToVisual:{linear:Zu,category:ia,piecewise:function(e,t){var r=No.call(this,t);return r==null&&(r=Zu.call(this,e)),r},fixed:ur}},symbolSize:{applyVisual:ta("symbolSize"),_normalizedToVisual:Vo([0,1])}},a}();function Q1(a){var e=a.pieceList;a.hasSpecialVisual=!1,D(e,function(t,r){t.originIndex=r,t.visual!=null&&(a.hasSpecialVisual=!0)})}function tS(a){var e=a.categories,t=a.categoryMap={},r=a.visual;if(_a(e,function(o,s){t[o]=s}),!q(r)){var n=[];Zt(r)?_a(r,function(o,s){var l=t[s];n[l??Cn]=o}):n[Cn]=r,r=kh(a,n)}for(var i=e.length-1;i>=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}var rS="itemStyle",Vh=Dt();const aS={seriesType:"treemap",reset:function(a){var e=a.getData().tree,t=e.root;t.isRemoved()||Nh(t,{},a.getViewRoot().getAncestors(),a)}};function Nh(a,e,t,r){var n=a.getModel(),i=a.getLayout(),o=a.hostTree.data;if(!(!i||i.invisible||!i.isInView)){var s=n.getModel(rS),l=nS(s,e,r),u=o.ensureUniqueItemVisual(a.dataIndex,"style"),v=s.get("borderColor"),c=s.get("borderColorSaturation"),f;c!=null&&(f=Xu(l),v=iS(c,f)),u.stroke=v;var h=a.viewChildren;if(!h||!h.length)f=Xu(l),u.fill=f;else{var p=oS(a,n,i,s,l,h);D(h,function(d,g){if(d.depth>=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&&s<u[0]&&(u[0]=s),l!=null&&l>u[1]&&(u[1]=l);var v=e.get("colorMappingBy"),c={type:o.name,dataExtent:u,visual:o.range};c.type==="color"&&(v==="index"||v==="id")?(c.mappingMethod="category",c.loop=!0):c.mappingMethod="linear";var 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<b;){var _=d[x];m.push(_),m.area+=_.getLayout().area;var w=gS(m,y,e.squareRatio);w<=S?(x++,S=w):(m.area-=m.pop().getLayout().area,Ku(m,y,g,u,!1),y=Dn(g.width,g.height),m.length=m.area=0,S=1/0)}if(m.length&&Ku(m,y,g,u,!0),!t){var A=s.get("childrenVisibleMin");A!=null&&p<A&&(t=!0)}for(var x=0,b=d.length;x<b;x++)Gh(d[x],e,t,r+1)}}}function fS(a,e,t,r,n,i){var o=a.children||[],s=r.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=r.leafDepth!=null&&r.leafDepth<=i;if(n&&!l)return a.viewChildren=[];o=Gt(o,function(h){return!h.isRemoved()}),pS(o,s);var u=dS(e,o,s);if(u.sum===0)return a.viewChildren=[];if(u.sum=hS(e,t,u.sum,s,o),u.sum===0)return a.viewChildren=[];for(var v=0,c=o.length;v<c;v++){var f=o[v].getValue()/u.sum*t;o[v].setLayout({area:f})}return l&&(o.length&&a.setLayout({isLeafRoot:!0},!0),o.length=0),a.viewChildren=o,a.setLayout({dataExtent:u.dataExtent},!0),o}function hS(a,e,t,r,n){if(!r)return t;for(var i=a.get("visibleMin"),o=n.length,s=o,l=o-1;l>=0;l--){var u=n[r==="asc"?o-l-1:l].getValue();u/t*e<i&&(s=l,t-=u)}return r==="asc"?n.splice(0,o-s):n.splice(s,o-s),t}function pS(a,e){return e&&a.sort(function(t,r){var n=e==="asc"?t.getValue()-r.getValue():r.getValue()-t.getValue();return n===0?e==="asc"?t.dataIndex-r.dataIndex:r.dataIndex-t.dataIndex:n}),a}function dS(a,e,t){for(var r=0,n=0,i=e.length;n<i;n++)r+=e[n].getValue();var o=a.get("visualDimension"),s;return!e||!e.length?s=[NaN,NaN]:o==="value"&&t?(s=[e[e.length-1].getValue(),e[0].getValue()],t==="asc"&&s.reverse()):(s=[1/0,-1/0],Os(e,function(l){var u=l.getValue(o);u<s[0]&&(s[0]=u),u>s[1]&&(s[1]=u)})),{sum:r,dataExtent:s}}function gS(a,e,t){for(var r=0,n=1/0,i=0,o=void 0,s=a.length;i<s;i++)o=a[i].getLayout().area,o&&(o<n&&(n=o),o>r&&(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;c<f;c++){var h=a[c],p={},d=v?h.getLayout().area/v:0,g=p[l[o]]=wa(v-2*r,0),y=t[s[i]]+t[l[i]]-u,S=c===f-1||y<d?y:d,m=p[l[i]]=wa(S-2*r,0);p[s[o]]=t[s[o]]+Dn(r,g/2),p[s[i]]=u+Dn(r,m/2),u+=S,h.setLayout(p,!0)}t[s[o]]+=v,t[l[o]]-=v}function yS(a,e,t,r,n){var i=(e||{}).node,o=[r,n];if(!i||i===t)return o;for(var s,l=r*n,u=l*a.option.zoomToNodeRatio;s=i.parentNode;){for(var v=0,c=s.children,f=0,h=c.length;f<h;f++)v+=c[f].getValue();var p=i.getValue();if(p===0)return o;u*=v/p;var d=s.getModel(),g=d.get(zh),y=Math.max(g,Bh(d));u+=4*g*g+(3*g+y)*Math.pow(u,.5),u>Il&&(u=Il),i=s}u<l&&(u=l);var S=Math.pow(u/l,.5);return[r*S,n*S]}function mS(a,e,t){if(e)return{x:e.x,y:e.y};var r={x:0,y:0};if(!t)return r;var n=t.node,i=n.getLayout();if(!i)return r;for(var o=[i.width/2,i.height/2],s=n;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:a.width/2-o[0],y:a.height/2-o[1]}}function Oh(a,e,t,r,n){var i=a.getLayout(),o=t[n],s=o&&o===a;if(!(o&&!s||n===t.length&&a!==r)){a.setLayout({isInView:!0,invisible:!s&&!e.intersect(i),isAboveViewRoot:s},!0);var l=new Tt(e.x-i.x,e.y-i.y,e.width,e.height);Os(a.viewChildren||[],function(u){Oh(u,l,t,r,n+1)})}}function Bh(a){return a.get(uS)?a.get(vS):0}function SS(a){a.registerSeriesModel(G1),a.registerChartView(q1),a.registerVisual(aS),a.registerLayout(cS),z1(a)}function xS(a){var e=a.findComponents({mainType:"legend"});!e||!e.length||a.eachSeriesByType("graph",function(t){var r=t.getCategoriesData(),n=t.getGraph(),i=n.data,o=r.mapArray(r.getName);i.filterSelf(function(s){var l=i.getItemModel(s),u=l.getShallow("category");if(u!=null){le(u)&&(u=o[u]);for(var v=0;v<e.length;v++)if(!e[v].isSelected(u))return!1}return!0})})}function bS(a){var e={};a.eachSeriesByType("graph",function(t){var r=t.getCategoriesData(),n=t.getData(),i={};r.each(function(o){var s=r.getName(o);i["ec-"+s]=o;var l=r.getItemModel(o),u=l.getModel("itemStyle").getItemStyle();u.fill||(u.fill=t.getColorFromPalette(s,e)),r.setItemVisual(o,"style",u);for(var v=["symbol","symbolSize","symbolKeepAspect"],c=0;c<v.length;c++){var f=l.getShallow(v[c],!0);f!=null&&r.setItemVisual(o,v[c],f)}}),r.count()&&n.each(function(o){var s=n.getItemModel(o),l=s.getShallow("category");if(l!=null){lt(l)&&(l=i["ec-"+l]);var u=r.getItemVisual(l,"style"),v=n.ensureUniqueItemVisual(o,"style");K(v,u);for(var c=["symbol","symbolSize","symbolKeepAspect"],f=0;f<c.length;f++)n.setItemVisual(o,c[f],r.getItemVisual(l,c[f]))}})})}function Xa(a){return a instanceof Array||(a=[a,a]),a}function _S(a){a.eachSeriesByType("graph",function(e){var t=e.getGraph(),r=e.getEdgeData(),n=Xa(e.get("edgeSymbol")),i=Xa(e.get("edgeSymbolSize"));r.setVisual("fromSymbol",n&&n[0]),r.setVisual("toSymbol",n&&n[1]),r.setVisual("fromSymbolSize",i&&i[0]),r.setVisual("toSymbolSize",i&&i[1]),r.setVisual("style",e.getModel("lineStyle").getLineStyle()),r.each(function(o){var s=r.getItemModel(o),l=t.getEdgeByIndex(o),u=Xa(s.getShallow("symbol",!0)),v=Xa(s.getShallow("symbolSize",!0)),c=s.getModel("lineStyle").getLineStyle(),f=r.ensureUniqueItemVisual(o,"style");switch(K(f,c),f.stroke){case"source":{var h=l.node1.getVisual("style");f.stroke=h&&h.fill;break}case"target":{var h=l.node2.getVisual("style");f.stroke=h&&h.fill;break}}u[0]&&l.setVisual("fromSymbol",u[0]),u[1]&&l.setVisual("toSymbol",u[1]),v[0]&&l.setVisual("fromSymbolSize",v[0]),v[1]&&l.setVisual("toSymbolSize",v[1])})})}var zo="-->",ni=function(a){return a.get("autoCurveness")||null},Fh=function(a,e){var t=ni(a),r=20,n=[];if(le(t))r=t;else if(q(t)){a.__curvenessList=t;return}e>r&&(r=e);var i=r%2?r+2:r+3;n=[];for(var o=0;o<i;o++)n.push((o%2?o+1:o)/10*(o%2?-1:1));a.__curvenessList=n},Aa=function(a,e,t){var r=[a.id,a.dataIndex].join("."),n=[e.id,e.dataIndex].join(".");return[t.uid,r,n].join(zo)},Hh=function(a){var e=a.split(zo);return[e[0],e[2],e[1]].join(zo)},wS=function(a,e){var t=Aa(a.node1,a.node2,e);return e.__edgeMap[t]},AS=function(a,e){var t=Go(Aa(a.node1,a.node2,e),e),r=Go(Aa(a.node2,a.node1,e),e);return t+r},Go=function(a,e){var t=e.__edgeMap;return t[a]?t[a].length:0};function TS(a){ni(a)&&(a.__curvenessList=[],a.__edgeMap={},Fh(a))}function CS(a,e,t,r){if(ni(t)){var n=Aa(a,e,t),i=t.__edgeMap,o=i[Hh(n)];i[n]&&!o?i[n].isForward=!0:o&&i[n]&&(o.isForward=!0,i[n].isForward=!1),i[n]=i[n]||[],i[n].push(r)}}function Bs(a,e,t,r){var n=ni(e),i=q(n);if(!n)return null;var o=wS(a,e);if(!o)return null;for(var s=-1,l=0;l<o.length;l++)if(o[l]===t){s=l;break}var u=AS(a,e);Fh(e,u),a.lineStyle=a.lineStyle||{};var v=Aa(a.node1,a.node2,e),c=e.__curvenessList,f=i||u%2?0:1;if(o.isForward)return c[f+s];var h=Hh(v),p=Go(h,e),d=c[s+p+f];return r?i?n&&n[0]===0?(p+f)%2?d:-d:((p%2?0:1)+f)%2?d:-d:(p+f)%2?d:-d:c[s+p+f]}function Wh(a){var e=a.coordinateSystem;if(!(e&&e.type!=="view")){var t=a.getGraph();t.eachNode(function(r){var n=r.getModel();r.setLayout([+n.get("x"),+n.get("y")])}),Fs(t,a)}}function Fs(a,e){a.eachEdge(function(t,r){var n=Ur(t.getModel().get(["lineStyle","curveness"]),-Bs(t,e,r,!0),0),i=je(t.node1.getLayout()),o=je(t.node2.getLayout()),s=[i,o];+n&&s.push([(i[0]+o[0])/2-(i[1]-o[1])*n,(i[1]+o[1])/2-(o[0]-i[0])*n]),t.setLayout(s)})}function DS(a,e){a.eachSeriesByType("graph",function(t){var r=t.get("layout"),n=t.coordinateSystem;if(n&&n.type!=="view"){var i=t.getData(),o=[];D(n.dimensions,function(f){o=o.concat(i.mapDimensionsAll(f))});for(var s=0;s<i.count();s++){for(var l=[],u=!1,v=0;v<o.length;v++){var c=i.get(o[v],s);isNaN(c)||(u=!0),l.push(c)}u?i.setItemLayout(s,n.dataToPoint(l)):i.setItemLayout(s,[NaN,NaN])}Fs(i.graph,t)}else(!r||r==="none")&&Wh(t)})}function oa(a){var e=a.coordinateSystem;if(e.type!=="view")return 1;var t=a.option.nodeScaleRatio,r=e.scaleX,n=e.getZoom(),i=(n-1)*t+1;return i/r}function sa(a){var e=a.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var ju=Math.PI,Vi=[];function Hs(a,e,t,r){var n=a.coordinateSystem;if(!(n&&n.type!=="view")){var i=n.getBoundingRect(),o=a.getData(),s=o.graph,l=i.width/2+i.x,u=i.height/2+i.y,v=Math.min(i.width,i.height)/2,c=o.count();if(o.setLayout({cx:l,cy:u}),!!c){if(t){var f=n.pointToData(r),h=f[0],p=f[1],d=[h-l,p-u];Ea(d,d),Lg(d,d,v),t.setLayout([l+d[0],u+d[1]],!0);var g=a.get(["circular","rotateLabel"]);Uh(t,g,l,u)}LS[e](a,s,o,v,l,u,c),s.eachEdge(function(y,S){var m=Ur(y.getModel().get(["lineStyle","curveness"]),Bs(y,a,S),0),x=je(y.node1.getLayout()),b=je(y.node2.getLayout()),_,w=(x[0]+b[0])/2,A=(x[1]+b[1])/2;+m&&(m*=3,_=[l*m+w*(1-m),u*m+A*(1-m)]),y.setLayout([x,b,_])})}}}var LS={value:function(a,e,t,r,n,i,o){var s=0,l=t.getSum("value"),u=Math.PI*2/(l||o);e.eachNode(function(v){var c=v.getValue("value"),f=u*(l?c:1)/2;s+=f,v.setLayout([r*Math.cos(s)+n,r*Math.sin(s)+i]),s+=f})},symbolSize:function(a,e,t,r,n,i,o){var s=0;Vi.length=o;var l=oa(a);e.eachNode(function(c){var f=sa(c);isNaN(f)&&(f=2),f<0&&(f=0),f*=l;var h=Math.asin(f/2/r);isNaN(h)&&(h=ju/2),Vi[c.dataIndex]=h,s+=h*2});var u=(2*ju-s)/o/2,v=0;e.eachNode(function(c){var f=u+Vi[c.dataIndex];v+=f,(!c.getLayout()||!c.getLayout().fixed)&&c.setLayout([r*Math.cos(v)+n,r*Math.sin(v)+i]),v+=f})}};function Uh(a,e,t,r){var n=a.getGraphicEl();if(n){var i=a.getModel(),o=i.get(["label","rotate"])||0,s=n.getSymbolPath();if(e){var l=a.getLayout(),u=Math.atan2(l[1]-r,l[0]-t);u<0&&(u=Math.PI*2+u);var v=l[0]<t;v&&(u=u-Math.PI);var c=v?"left":"right";s.setTextConfig({rotation:-u,position:c,origin:"center"});var f=s.ensureState("emphasis");K(f.textConfig||(f.textConfig={}),{position:c})}else s.setTextConfig({rotation:o*=Math.PI/180})}}function IS(a){a.eachSeriesByType("graph",function(e){e.get("layout")==="circular"&&Hs(e,"symbolSize")})}var Cr=_o;function MS(a,e,t){for(var r=a,n=e,i=t.rect,o=i.width,s=i.height,l=[i.x+o/2,i.y+s/2],u=t.gravity==null?.1:t.gravity,v=0;v<r.length;v++){var c=r[v];c.p||(c.p=Ig(o*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),c.pp=je(c.p),c.edges=null}var f=t.friction==null?.6:t.friction,h=f,p,d;return{warmUp:function(){h=f*.8},setFixed:function(g){r[g].fixed=!0},setUnfixed:function(g){r[g].fixed=!1},beforeStep:function(g){p=g},afterStep:function(g){d=g},step:function(g){p&&p(r,n);for(var y=[],S=r.length,m=0;m<n.length;m++){var x=n[m];if(!x.ignoreForceLayout){var b=x.n1,_=x.n2;Nr(y,_.p,b.p);var w=Ml(y)-x.d,A=_.w/(b.w+_.w);isNaN(A)&&(A=0),Ea(y,y),!b.fixed&&Cr(b.p,b.p,y,A*w*h),!_.fixed&&Cr(_.p,_.p,y,-(1-A)*w*h)}}for(var m=0;m<S;m++){var T=r[m];T.fixed||(Nr(y,l,T.p),Cr(T.p,T.p,y,u*h))}for(var m=0;m<S;m++)for(var b=r[m],C=m+1;C<S;C++){var _=r[C];Nr(y,_.p,b.p);var w=Ml(y);w===0&&(Mg(y,Math.random()-.5,Math.random()-.5),w=1);var L=(b.rep+_.rep)/w/w;!b.fixed&&Cr(b.pp,b.pp,y,L),!_.fixed&&Cr(_.pp,_.pp,y,-L)}for(var M=[],m=0;m<S;m++){var T=r[m];T.fixed||(Nr(M,T.p,T.pp),Cr(T.p,T.p,M,h),Kt(T.pp,T.p))}h=h*.992;var I=h<.01;d&&d(r,n,I),g&&g(I)}}}function PS(a){a.eachSeriesByType("graph",function(e){var t=e.coordinateSystem;if(!(t&&t.type!=="view"))if(e.get("layout")==="force"){var r=e.preservedPoints||{},n=e.getGraph(),i=n.data,o=n.edgeData,s=e.getModel("force"),l=s.get("initLayout");e.preservedPoints?i.each(function(m){var x=i.getId(m);i.setItemLayout(m,r[x]||[NaN,NaN])}):!l||l==="none"?Wh(e):l==="circular"&&Hs(e,"value");var u=i.getDataExtent("value"),v=o.getDataExtent("value"),c=s.get("repulsion"),f=s.get("edgeLength"),h=q(c)?c:[c,c],p=q(f)?f:[f,f];p=[p[1],p[0]];var d=i.mapArray("value",function(m,x){var b=i.getItemLayout(x),_=Nt(m,u,h);return isNaN(_)&&(_=(h[0]+h[1])/2),{w:_,rep:_,fixed:i.getItemModel(x).get("fixed"),p:!b||isNaN(b[0])||isNaN(b[1])?null:b}}),g=o.mapArray("value",function(m,x){var b=n.getEdgeByIndex(x),_=Nt(m,v,p);isNaN(_)&&(_=(p[0]+p[1])/2);var w=b.getModel(),A=Ur(b.getModel().get(["lineStyle","curveness"]),-Bs(b,e,x,!0),0);return{n1:d[b.node1.dataIndex],n2:d[b.node2.dataIndex],d:_,curveness:A,ignoreForceLayout:w.get("ignoreForceLayout")}}),y=t.getBoundingRect(),S=MS(d,g,{rect:y,gravity:s.get("gravity"),friction:s.get("friction")});S.beforeStep(function(m,x){for(var b=0,_=m.length;b<_;b++)m[b].fixed&&Kt(m[b].p,n.getNodeByIndex(b).getLayout())}),S.afterStep(function(m,x,b){for(var _=0,w=m.length;_<w;_++)m[_].fixed||n.getNodeByIndex(_).setLayout(m[_].p),r[i.getId(_)]=m[_].p;for(var _=0,w=x.length;_<w;_++){var A=x[_],T=n.getEdgeByIndex(_),C=A.n1.p,L=A.n2.p,M=T.getLayout();M=M?M.slice():[],M[0]=M[0]||[],M[1]=M[1]||[],Kt(M[0],C),Kt(M[1],L),+A.curveness&&(M[2]=[(C[0]+L[0])/2-(C[1]-L[1])*A.curveness,(C[1]+L[1])/2-(L[0]-C[0])*A.curveness]),T.setLayout(M)}}),e.forceLayout=S,e.preservedPoints=r,S.step()}else e.forceLayout=null})}function ES(a,e,t){var r=K(a.getBoxLayoutParams(),{aspect:t});return fe(r,{width:e.getWidth(),height:e.getHeight()})}function RS(a,e){var t=[];return a.eachSeriesByType("graph",function(r){var n=r.get("coordinateSystem");if(!n||n==="view"){var i=r.getData(),o=i.mapArray(function(g){var y=i.getItemModel(g);return[+y.get("x"),+y.get("y")]}),s=[],l=[];Xn(o,s,l),l[0]-s[0]===0&&(l[0]+=1,s[0]-=1),l[1]-s[1]===0&&(l[1]+=1,s[1]-=1);var u=(l[0]-s[0])/(l[1]-s[1]),v=ES(r,e,u);isNaN(u)&&(s=[v.x,v.y],l=[v.x+v.width,v.y+v.height]);var c=l[0]-s[0],f=l[1]-s[1],h=v.width,p=v.height,d=r.coordinateSystem=new Ga;d.zoomLimit=r.get("scaleLimit"),d.setBoundingRect(s[0],s[1],c,f),d.setViewRect(v.x,v.y,h,p),d.setCenter(r.get("center"),e),d.setZoom(r.get("zoom")),t.push(d)}}),t}var Ju=_e.prototype,Ni=Df.prototype,$h=function(){function a(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return a}();(function(a){V(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e})($h);function zi(a){return isNaN(+a.cpx1)||isNaN(+a.cpy1)}var kS=function(a){V(e,a);function e(t){var r=a.call(this,t)||this;return r.type="ec-line",r}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new $h},e.prototype.buildPath=function(t,r){zi(r)?Ju.buildPath.call(this,t,r):Ni.buildPath.call(this,t,r)},e.prototype.pointAt=function(t){return zi(this.shape)?Ju.pointAt.call(this,t):Ni.pointAt.call(this,t)},e.prototype.tangentAt=function(t){var r=this.shape,n=zi(r)?[r.x2-r.x1,r.y2-r.y1]:Ni.tangentAt.call(this,t);return Ea(n,n)},e}(Wt),Gi=["fromSymbol","toSymbol"];function Qu(a){return"_"+a+"Type"}function tv(a,e,t){var r=e.getItemVisual(t,a);if(!r||r==="none")return r;var n=e.getItemVisual(t,a+"Size"),i=e.getItemVisual(t,a+"Rotate"),o=e.getItemVisual(t,a+"Offset"),s=e.getItemVisual(t,a+"KeepAspect"),l=Ia(n),u=Ra(o||0,l);return r+l+u+(i||"")+(s||"")}function ev(a,e,t){var r=e.getItemVisual(t,a);if(!(!r||r==="none")){var n=e.getItemVisual(t,a+"Size"),i=e.getItemVisual(t,a+"Rotate"),o=e.getItemVisual(t,a+"Offset"),s=e.getItemVisual(t,a+"KeepAspect"),l=Ia(n),u=Ra(o||0,l),v=ve(r,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return v.__specifiedRotation=i==null||isNaN(i)?void 0:+i*Math.PI/180||0,v.name=a,v}}function VS(a){var e=new kS({name:"line",subPixelOptimize:!0});return Oo(e.shape,a),e}function Oo(a,e){a.x1=e[0][0],a.y1=e[0][1],a.x2=e[1][0],a.y2=e[1][1],a.percent=1;var t=e[2];t?(a.cpx1=t[0],a.cpy1=t[1]):(a.cpx1=NaN,a.cpy1=NaN)}var Ws=function(a){V(e,a);function e(t,r,n){var i=a.call(this)||this;return i._createLine(t,r,n),i}return e.prototype._createLine=function(t,r,n){var i=t.hostModel,o=t.getItemLayout(r),s=VS(o);s.shape.percent=0,Ut(s,{shape:{percent:1}},i,r),this.add(s),D(Gi,function(l){var u=ev(l,t,r);this.add(u),this[Qu(l)]=tv(l,t,r)},this),this._updateCommonStl(t,r,n)},e.prototype.updateData=function(t,r,n){var i=t.hostModel,o=this.childOfName("line"),s=t.getItemLayout(r),l={shape:{}};Oo(l.shape,s),xt(o,l,i,r),D(Gi,function(u){var v=tv(u,t,r),c=Qu(u);if(this[c]!==v){this.remove(this.childOfName(u));var f=ev(u,t,r);this.add(f)}this[c]=v},this),this._updateCommonStl(t,r,n)},e.prototype.getLinePath=function(){return this.childAt(0)},e.prototype._updateCommonStl=function(t,r,n){var i=t.hostModel,o=this.childOfName("line"),s=n&&n.emphasisLineStyle,l=n&&n.blurLineStyle,u=n&&n.selectLineStyle,v=n&&n.labelStatesModels,c=n&&n.emphasisDisabled,f=n&&n.focus,h=n&&n.blurScope;if(!n||t.hasItemOption){var p=t.getItemModel(r),d=p.getModel("emphasis");s=d.getModel("lineStyle").getLineStyle(),l=p.getModel(["blur","lineStyle"]).getLineStyle(),u=p.getModel(["select","lineStyle"]).getLineStyle(),c=d.get("disabled"),f=d.get("focus"),h=d.get("blurScope"),v=Qt(p)}var g=t.getItemVisual(r,"style"),y=g.stroke;o.useStyle(g),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=s,o.ensureState("blur").style=l,o.ensureState("select").style=u,D(Gi,function(_){var w=this.childOfName(_);if(w){w.setColor(y),w.style.opacity=g.opacity;for(var A=0;A<ha.length;A++){var T=ha[A],C=o.getState(T);if(C){var L=C.style||{},M=w.ensureState(T),I=M.style||(M.style={});L.stroke!=null&&(I[w.__isEmptyBrush?"stroke":"fill"]=L.stroke),L.opacity!=null&&(I.opacity=L.opacity)}}w.markRedraw()}},this);var S=i.getRawValue(r);ue(this,v,{labelDataIndex:r,labelFetcher:{getFormattedLabel:function(_,w){return i.getFormattedLabel(_,w,t.dataType)}},inheritColor:y||"#000",defaultOpacity:g.opacity,defaultText:(S==null?t.getName(r):isFinite(S)?ds(S):S)+""});var m=this.getTextContent();if(m){var x=v.normal;m.__align=m.style.align,m.__verticalAlign=m.style.verticalAlign,m.__position=x.get("position")||"middle";var b=x.get("distance");q(b)||(b=[b,b]),m.__labelDistance=b}this.setTextConfig({position:null,local:!0,inside:!1}),Et(this,f,h,c)},e.prototype.highlight=function(){ga(this)},e.prototype.downplay=function(){ya(this)},e.prototype.updateLayout=function(t,r){this.setLinePoints(t.getItemLayout(r))},e.prototype.setLinePoints=function(t){var r=this.childOfName("line");Oo(r.shape,t),r.dirty()},e.prototype.beforeUpdate=function(){var t=this,r=t.childOfName("fromSymbol"),n=t.childOfName("toSymbol"),i=t.getTextContent();if(!r&&!n&&(!i||i.ignore))return;for(var o=1,s=this.parent;s;)s.scaleX&&(o/=s.scaleX),s=s.parent;var l=t.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,v=l.pointAt(0),c=l.pointAt(u),f=Nr([],c,v);Ea(f,f);function h(C,L){var M=C.__specifiedRotation;if(M==null){var I=l.tangentAt(L);C.attr("rotation",(L===1?-1:1)*Math.PI/2-Math.atan2(I[1],I[0]))}else C.attr("rotation",M)}if(r&&(r.setPosition(v),h(r,0),r.scaleX=r.scaleY=o*u,r.markRedraw()),n&&(n.setPosition(c),h(n,1),n.scaleX=n.scaleY=o*u,n.markRedraw()),i&&!i.ignore){i.x=i.y=0,i.originX=i.originY=0;var p=void 0,d=void 0,g=i.__labelDistance,y=g[0]*o,S=g[1]*o,m=u/2,x=l.tangentAt(m),b=[x[1],-x[0]],_=l.pointAt(m);b[1]>0&&(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]<v[0]&&(A=Math.PI+A),i.rotation=A}var T=void 0;switch(i.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":T=-S,d="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":T=S,d="top";break;default:T=0,d="middle"}switch(i.__position){case"end":i.x=f[0]*y+c[0],i.y=f[1]*S+c[1],p=f[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;n<e.end;n++){var i=t.getItemLayout(n);if(Oi(i)){var o=new this._LineCtor(t,n,this._seriesScope);o.traverse(r),this.group.add(o),t.setItemGraphicEl(n,o),this._progressiveEls.push(o)}}},a.prototype.remove=function(){this.group.removeAll()},a.prototype.eachRendered=function(e){qn(this._progressiveEls||this.group,e)},a.prototype._doAdd=function(e,t,r){var n=e.getItemLayout(t);if(Oi(n)){var i=new this._LineCtor(e,t,r);e.setItemGraphicEl(t,i),this.group.add(i)}},a.prototype._doUpdate=function(e,t,r,n,i){var o=e.getItemGraphicEl(r);if(!Oi(t.getItemLayout(n))){this.group.remove(o);return}o?o.updateData(t,n,i):o=new this._LineCtor(t,n,i),t.setItemGraphicEl(n,o),this.group.add(o)},a}();function NS(a){return a.animators&&a.animators.length>0}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<o&&(o=c,s=v)}for(var f=0;f<32;f++){var h=s+u;Fi[0]=Dr(r[0],n[0],i[0],s),Fi[1]=Dr(r[1],n[1],i[1],s),Hi[0]=Dr(r[0],n[0],i[0],h),Hi[1]=Dr(r[1],n[1],i[1],h);var c=Wi(Fi,e)-l;if(nv(c)<.01)break;var p=Wi(Hi,e)-l;u/=2,c<0?p>=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function 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<n;i++)r[i].dataIndex>=0&&e.call(t,r[i],i)},a.prototype.eachEdge=function(e,t){for(var r=this.edges,n=r.length,i=0;i<n;i++)r[i].dataIndex>=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<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!e.call(n,t,null))for(var s=[t];s.length;)for(var l=s.shift(),u=l[i],o=0;o<u.length;o++){var v=u[o],c=v.node1===l?v.node2:v.node1;if(!c.__visited){if(e.call(n,c,l))return;s.push(c),c.__visited=!0}}}},a.prototype.update=function(){for(var e=this.data,t=this.edgeData,r=this.nodes,n=this.edges,i=0,o=r.length;i<o;i++)r[i].dataIndex=-1;for(var i=0,o=e.count();i<o;i++)r[e.getRawIndex(i)].dataIndex=i;t.filterSelf(function(s){var l=n[t.getRawIndex(s)];return l.node1.dataIndex>=0&&l.node2.dataIndex>=0});for(var i=0,o=n.length;i<o;i++)n[i].dataIndex=-1;for(var i=0,o=t.count();i<o;i++)n[t.getRawIndex(i)].dataIndex=i},a.prototype.clone=function(){for(var e=new a(this._directed),t=this.nodes,r=this.edges,n=0;n<t.length;n++)e.addNode(t[n].id,t[n].dataIndex);for(var n=0;n<r.length;n++){var i=r[n];e.addEdge(i.node1.id,i.node2.id,i.dataIndex)}return e},a}(),vr=function(){function a(e,t){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=e??"",this.dataIndex=t??-1}return a.prototype.degree=function(){return this.edges.length},a.prototype.inDegree=function(){return this.inEdges.length},a.prototype.outDegree=function(){return this.outEdges.length},a.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,r=t.data.getItemModel(this.dataIndex);return r.getModel(e)}},a.prototype.getAdjacentDataIndices=function(){for(var e={edge:[],node:[]},t=0;t<this.edges.length;t++){var r=this.edges[t];r.dataIndex<0||(e.edge.push(r.dataIndex),e.node.push(r.node1.dataIndex,r.node2.dataIndex))}return e},a.prototype.getTrajectoryDataIndices=function(){for(var e=ut(),t=ut(),r=0;r<this.edges.length;r++){var n=this.edges[r];if(!(n.dataIndex<0)){e.set(n.dataIndex,!0);for(var i=[n.node1],o=[n.node2],s=0;s<i.length;){var l=i[s];s++,t.set(l.dataIndex,!0);for(var u=0;u<l.inEdges.length;u++)e.set(l.inEdges[u].dataIndex,!0),i.push(l.inEdges[u].node1)}for(s=0;s<o.length;){var v=o[s];s++,t.set(v.dataIndex,!0);for(var u=0;u<v.outEdges.length;u++)e.set(v.outEdges[u].dataIndex,!0),o.push(v.outEdges[u].node2)}}}return{edge:e.keys(),node:t.keys()}},a}(),Yh=function(){function a(e,t,r){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=r??-1}return a.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,r=t.edgeData.getItemModel(this.dataIndex);return r.getModel(e)}},a.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},a.prototype.getTrajectoryDataIndices=function(){var e=ut(),t=ut();e.set(this.dataIndex,!0);for(var r=[this.node1],n=[this.node2],i=0;i<r.length;){var o=r[i];i++,t.set(o.dataIndex,!0);for(var s=0;s<o.inEdges.length;s++)e.set(o.inEdges[s].dataIndex,!0),r.push(o.inEdges[s].node1)}for(i=0;i<n.length;){var l=n[i];i++,t.set(l.dataIndex,!0);for(var s=0;s<l.outEdges.length;s++)e.set(l.outEdges[s].dataIndex,!0),n.push(l.outEdges[s].node2)}return{edge:e.keys(),node:t.keys()}},a}();function Zh(a,e){return{getValue:function(t){var r=this[a][e];return r.getStore().get(r.getDimensionIndex(t||"value"),this.dataIndex)},setVisual:function(t,r){this.dataIndex>=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<a.length;o++)i.addNode(se(a[o].id,a[o].name,o),o);for(var s=[],l=[],u=0,o=0;o<e.length;o++){var v=e[o],c=v.source,f=v.target;i.addEdge(c,f,u)&&(l.push(v),s.push(se(ze(v.id,null),c+" > "+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<i.length;b++){var _=Math.min(Math.max(i[b][0],0),1);v=u+S*_;var w=new h({shape:{startAngle:m,endAngle:v,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-g,r:o.r},silent:!0});w.setStyle({fill:i[b][1]}),w.setStyle(d.getLineStyle(["color","width"])),x.push(w),m=v}x.reverse(),D(x,function(T){return s.add(T)});var A=function(T){if(T<=0)return i[0][1];var C;for(C=0;C<i.length;C++)if(i[C][0]>=T&&(C===0?0:i[C-1][0])<T)return i[C][1];return i[C-1][1]};this._renderTicks(t,r,n,A,o,u,v,l,g),this._renderTitleAndDetail(t,r,n,A,o),this._renderAnchor(t,o),this._renderPointer(t,r,n,A,o,u,v,l,g)},e.prototype._renderTicks=function(t,r,n,i,o,s,l,u,v){for(var c=this.group,f=o.cx,h=o.cy,p=o.r,d=+t.get("min"),g=+t.get("max"),y=t.getModel("splitLine"),S=t.getModel("axisTick"),m=t.getModel("axisLabel"),x=t.get("splitNumber"),b=S.get("splitNumber"),_=U(y.get("length"),p),w=U(S.get("length"),p),A=s,T=(l-s)/x,C=T/b,L=y.getModel("lineStyle").getLineStyle(),M=S.getModel("lineStyle").getLineStyle(),I=y.get("distance"),P,E,R=0;R<=x;R++){if(P=Math.cos(A),E=Math.sin(A),y.get("show")){var k=I?I+v:v,N=new _e({shape:{x1:P*(p-k)+f,y1:E*(p-k)+h,x2:P*(p-_-k)+f,y2:E*(p-_-k)+h},style:L,silent:!0});L.stroke==="auto"&&N.setStyle({stroke:i(R/x)}),c.add(N)}if(m.get("show")){var k=m.get("distance")+I,F=qa(ds(R/x*(g-d)+d),m.get("formatter")),H=i(R/x),X=P*(p-_-k)+f,j=E*(p-_-k)+h,rt=m.get("rotate"),tt=0;rt==="radial"?(tt=-A+2*Math.PI,tt>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();o<s;o++)n[o]=o;return gt(e)?n.sort(e):e!=="none"&&n.sort(function(l,u){return i?r[l]-r[u]:r[u]-r[l]}),n}function tx(a){var e=a.hostModel,t=e.get("orient");a.each(function(r){var n=a.getItemModel(r),i=n.getModel("label"),o=i.get("position"),s=n.getModel("labelLine"),l=a.getItemLayout(r),u=l.points,v=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",c,f,h,p;if(v)o==="insideLeft"?(f=(u[0][0]+u[3][0])/2+5,h=(u[0][1]+u[3][1])/2,c="left"):o==="insideRight"?(f=(u[1][0]+u[2][0])/2-5,h=(u[1][1]+u[2][1])/2,c="right"):(f=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,h=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,c="center"),p=[[f,h],[f,h]];else{var d=void 0,g=void 0,y=void 0,S=void 0,m=s.get("length");o==="left"?(d=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,y=d-m,f=y-5,c="right"):o==="right"?(d=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,y=d+m,f=y+5,c="left"):o==="top"?(d=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,S=g-m,h=S-5,c="center"):o==="bottom"?(d=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,S=g+m,h=S+5,c="center"):o==="rightTop"?(d=t==="horizontal"?u[3][0]:u[1][0],g=t==="horizontal"?u[3][1]:u[1][1],t==="horizontal"?(S=g-m,h=S-5,c="center"):(y=d+m,f=y+5,c="top")):o==="rightBottom"?(d=u[2][0],g=u[2][1],t==="horizontal"?(S=g+m,h=S+5,c="center"):(y=d+m,f=y+5,c="bottom")):o==="leftTop"?(d=u[0][0],g=t==="horizontal"?u[0][1]:u[1][1],t==="horizontal"?(S=g-m,h=S-5,c="center"):(y=d-m,f=y-5,c="right")):o==="leftBottom"?(d=t==="horizontal"?u[1][0]:u[3][0],g=t==="horizontal"?u[1][1]:u[2][1],t==="horizontal"?(S=g+m,h=S+5,c="center"):(y=d-m,f=y-5,c="right")):(d=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,t==="horizontal"?(S=g+m,h=S+5,c="center"):(y=d+m,f=y+5,c="left")),t==="horizontal"?(y=d,f=y):(S=g,h=S),p=[[d,g],[y,S]]}l.label={linePoints:p,x:f,y:h,verticalAlign:"middle",textAlign:c,inside:v}})}function ex(a,e){a.eachSeriesByType("funnel",function(t){var r=t.getData(),n=r.mapDimension("value"),i=t.get("sort"),o=JS(t,e),s=t.get("orient"),l=o.width,u=o.height,v=QS(r,i),c=o.x,f=o.y,h=s==="horizontal"?[U(t.get("minSize"),u),U(t.get("maxSize"),u)]:[U(t.get("minSize"),l),U(t.get("maxSize"),l)],p=r.getDataExtent(n),d=t.get("min"),g=t.get("max");d==null&&(d=Math.min(p[0],0)),g==null&&(g=p[1]);var y=t.get("funnelAlign"),S=t.get("gap"),m=s==="horizontal"?l:u,x=(m-S*(r.count()-1))/r.count(),b=function(P,E){if(s==="horizontal"){var R=r.get(n,P)||0,k=Nt(R,[d,g],h,!0),N=void 0;switch(y){case"top":N=f;break;case"center":N=f+(u-k)/2;break;case"bottom":N=f+(u-k);break}return[[E,N],[E,N+k]]}var F=r.get(n,P)||0,H=Nt(F,[d,g],h,!0),X;switch(y){case"left":X=c;break;case"center":X=c+(l-H)/2;break;case"right":X=c+l-H;break}return[[X,E],[X+H,E]]};i==="ascending"&&(x=-x,S=-S,s==="horizontal"?c+=l:f+=u,v=v.reverse());for(var _=0;_<v.length;_++){var w=v[_],A=v[_+1],T=r.getItemModel(w);if(s==="horizontal"){var C=T.get(["itemStyle","width"]);C==null?C=x:(C=U(C,l),i==="ascending"&&(C=-C));var L=b(w,c),M=b(A,c+C);c+=C+S,r.setItemLayout(w,{points:L.concat(M.slice().reverse())})}else{var I=T.get(["itemStyle","height"]);I==null?I=x:(I=U(I,u),i==="ascending"&&(I=-I));var L=b(w,f),M=b(A,f+I);f+=I+S,r.setItemLayout(w,{points:L.concat(M.slice().reverse())})}}tx(r)})}function rx(a){a.registerChartView(KS),a.registerSeriesModel(jS),a.registerLayout(ex),a.registerProcessor(Na("funnel"))}var ax=.3,nx=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._dataGroup=new nt,t._initialized=!1,t}return e.prototype.init=function(){this.group.add(this._dataGroup)},e.prototype.render=function(t,r,n,i){this._progressiveEls=null;var o=this._dataGroup,s=t.getData(),l=this._data,u=t.coordinateSystem,v=u.dimensions,c=lv(t);s.diff(l).add(f).update(h).remove(p).execute();function f(g){var y=sv(s,o,g,v,u);$i(y,s,g,c)}function h(g,y){var S=l.getItemGraphicEl(y),m=qh(s,g,v,u);s.setItemGraphicEl(g,S),xt(S,{shape:{points:m}},t,g),Fe(S),$i(S,s,g,c)}function p(g){var y=l.getItemGraphicEl(g);o.remove(y)}if(!this._initialized){this._initialized=!0;var d=ix(u,t,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(d)}this._data=s},e.prototype.incrementalPrepareRender=function(t,r,n){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},e.prototype.incrementalRender=function(t,r,n){for(var i=r.getData(),o=r.coordinateSystem,s=o.dimensions,l=lv(r),u=this._progressiveEls=[],v=t.start;v<t.end;v++){var c=sv(i,this._dataGroup,v,s,o);c.incremental=!0,$i(c,i,v,l),u.push(c)}},e.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},e.type="parallel",e}(kt);function ix(a,e,t){var r=a.model,n=a.getRect(),i=new Bt({shape:{x:n.x,y:n.y,width:n.width,height:n.height}}),o=r.get("layout")==="horizontal"?"width":"height";return i.setShape(o,0),Ut(i,{shape:{width:n.width,height:n.height}},e,t),i}function qh(a,e,t,r){for(var n=[],i=0;i<t.length;i++){var o=t[i],s=a.get(a.mapDimension(o),e);ox(s,r.getAxis(o).type)||n.push(r.dataToPoint(s,o))}return n}function sv(a,e,t,r,n){var i=qh(a,t,r,n),o=new Te({shape:{points:i},z2:10});return e.add(o),a.setItemGraphicEl(t,o),o}function lv(a){var e=a.get("smooth",!0);return e===!0&&(e=ax),e=Vg(e),Ng(e)&&(e=0),{smooth:e}}function $i(a,e,t,r){a.useStyle(e.getItemVisual(t,"style")),a.style.fill=null,a.setShape("smooth",r.smooth);var n=e.getItemModel(t),i=n.getModel("emphasis");ae(a,n,"lineStyle"),Et(a,i.get("focus"),i.get("blurScope"),i.get("disabled"))}function ox(a,e){return e==="category"?a==null:a==null||isNaN(a)}var sx=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.getInitialData=function(t,r){return $r(null,this,{useEncodeDefaulter:at(lx,null,this)})},e.prototype.getRawIndicesByActiveState=function(t){var r=this.coordinateSystem,n=this.getData(),i=[];return r.eachActiveState(n,function(o,s){t===o&&i.push(n.getRawIndex(s))}),i},e.type="series.parallel",e.dependencies=["parallel"],e.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},e}(Ft);function lx(a){var e=a.ecModel.getComponent("parallel",a.get("parallelIndex"));if(e){var t={};return D(e.dimensions,function(r){var n=ux(r);t[r]=n}),t}}function ux(a){return+a.replace("dim","")}var vx=["lineStyle","opacity"],cx={seriesType:"parallel",reset:function(a,e){var t=a.coordinateSystem,r={normal:a.get(["lineStyle","opacity"]),active:a.get("activeOpacity"),inactive:a.get("inactiveOpacity")};return{progress:function(n,i){t.eachActiveState(i,function(o,s){var l=r[o];if(o==="normal"&&i.hasItemOption){var u=i.getItemModel(s).get(vx,!0);u!=null&&(l=u)}var v=i.ensureUniqueItemVisual(s,"style");v.opacity=l},n.start,n.end)}}}};function fx(a){hx(a),px(a)}function hx(a){if(!a.parallel){var e=!1;D(a.series,function(t){t&&t.type==="parallel"&&(e=!0)}),e&&(a.parallel=[{}])}}function px(a){var e=Jt(a.parallelAxis);D(e,function(t){if(Zt(t)){var r=t.parallelIndex||0,n=Jt(a.parallel)[r];n&&n.parallelAxisDefault&&Ct(t,n.parallelAxisDefault,!1)}})}var dx=5,gx=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._model=t,this._api=n,this._handlers||(this._handlers={},D(yx,function(i,o){n.getZr().on(o,this._handlers[o]=at(i,this))},this)),Pf(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},e.prototype.dispose=function(t,r){zg(this,"_throttledDispatchExpand"),D(this._handlers,function(n,i){r.getZr().off(i,n)}),this._handlers=null},e.prototype._throttledDispatchExpand=function(t){this._dispatchExpand(t)},e.prototype._dispatchExpand=function(t){t&&this._api.dispatchAction(K({type:"parallelAxisExpand"},t))},e.type="parallel",e}(te),yx={mousedown:function(a){Yi(this,"click")&&(this._mouseDownPoint=[a.offsetX,a.offsetY])},mouseup:function(a){var e=this._mouseDownPoint;if(Yi(this,"click")&&e){var t=[a.offsetX,a.offsetY],r=Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2);if(r>dx)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;v<n;v++){var c=void 0;if(!u)c="normal";else{c="active";for(var f=e.getValues(s,v),h=0,p=o.length;h<p;h++){var d=l[h].getActiveState(f[h]);if(d==="inactive"){c="inactive";break}}}t(c,v)}},a.prototype.hasAxisBrushed=function(){for(var e=this.dimensions,t=this._axesMap,r=!1,n=0,i=e.length;n<i;n++)t.get(e[n]).model.getActiveState()!=="normal"&&(r=!0);return r},a.prototype.axisCoordToPoint=function(e,t){var r=this._axesLayout[t];return Gr([e,0],r.transform)},a.prototype.getAxisLayout=function(e){return pt(this._axesLayout[e])},a.prototype.getSlidedAxisExpandWindow=function(e){var t=this._makeLayoutInfo(),r=t.pixelDimIndex,n=t.axisExpandWindow.slice(),i=n[1]-n[0],o=[0,t.axisExpandWidth*(t.axisCount-1)];if(!this.containPoint(e))return{behavior:"none",axisExpandWindow:n};var s=e[r]-t.layoutBase-t.axisExpandWindow0Pos,l,u="slide",v=t.axisCollapseWidth,c=this._model.get("axisExpandSlideTriggerArea"),f=c[0]!=null;if(v)f&&v&&s<i*c[0]?(u="jump",l=s-i*c[2]):f&&v&&s>i*(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<o[0]?(s=a*i,v=i):a<=o[1]?(s=e.axisExpandWindow0Pos+a*r-e.axisExpandWindow[0],l=r,u=!0):(s=t-(n-1-a)*i,v=i),{position:s,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:v}}function Tx(a,e){var t=[];return a.eachComponent("parallel",function(r,n){var i=new _x(r,a,e);i.name="parallel_"+n,i.resize(r,e),r.coordinateSystem=i,i.model=r,t.push(i)}),a.eachSeries(function(r){if(r.get("coordinateSystem")==="parallel"){var n=r.getReferringComponents("parallel",Ar).models[0];r.coordinateSystem=n.coordinateSystem}}),t}var Cx={create:Tx},Bo=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.activeIntervals=[],t}return e.prototype.getAreaSelectStyle=function(){return Lf([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},e.prototype.setActiveIntervals=function(t){var r=this.activeIntervals=pt(t);if(r)for(var n=r.length-1;n>=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;i<o;i++)if(r[i][0]<=t&&t<=r[i][1])return"active";return"inactive"},e}(Xt);Ce(Bo,$n);var _r=!0,Ta=Math.min,Fr=Math.max,Dx=Math.pow,Lx=1e4,Ix=6,Mx=6,cv="globalPan",Px={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},Ex={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},fv={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},Rx=0,$s=function(a){V(e,a);function e(t){var r=a.call(this)||this;return r._track=[],r._covers=[],r._handlers={},r._zr=t,r.group=new nt,r._uid="brushController_"+Rx++,D(Bx,function(n,i){this._handlers[i]=at(n,this)},r),r}return e.prototype.enableBrush=function(t){return this._brushType&&this._doDisableBrush(),t.brushType&&this._doEnableBrush(t),this},e.prototype._doEnableBrush=function(t){var r=this._zr;this._enableGlobalPan||Gg(r,cv,this._uid),D(this._handlers,function(n,i){r.on(i,n)}),this._brushType=t.brushType,this._brushOption=Ct(pt(fv),t,!0)},e.prototype._doDisableBrush=function(){var t=this._zr;Og(t,cv,this._uid),D(this._handlers,function(r,n){t.off(n,r)}),this._brushType=this._brushOption=null},e.prototype.setPanels=function(t){if(t&&t.length){var r=this._panels={};D(t,function(n){r[n.panelId]=pt(n)})}else this._panels=null;return this},e.prototype.mount=function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var r=this.group;return this._zr.add(r),r.attr({x:t.x||0,y:t.y||0,rotation:t.rotation||0,scaleX:t.scaleX||1,scaleY:t.scaleY||1}),this._transform=r.getLocalTransform(),this},e.prototype.updateCovers=function(t){t=$(t,function(f){return Ct(pt(fv),f,!0)});var r="\0-brush-index-",n=this._covers,i=this._covers=[],o=this,s=this._creatingCover;return new Qe(n,t,u,l).add(v).update(v).remove(c).execute(),this;function l(f,h){return(f.id!=null?f.id:r+h)+"-"+f.brushType}function u(f,h){return l(f.__brushOption,h)}function v(f,h){var p=t[f];if(h!=null&&n[h]===s)i[f]=n[h];else{var d=i[f]=h!=null?(n[h].__brushOption=p,n[h]):Qh(o,Jh(o,p));Ys(o,d)}}function c(f){n[f]!==s&&o.group.remove(n[f])}},e.prototype.unmount=function(){return this.enableBrush(!1),Fo(this),this._zr.remove(this.group),this},e.prototype.dispose=function(){this.unmount(),this.off()},e}(Bg);function Jh(a,e){var t=ii[e.brushType].createCover(a,e);return t.__brushOption=e,ep(t,e),a.group.add(t),t}function Qh(a,e){var t=Zs(e);return t.endCreating&&(t.endCreating(a,e),ep(e,e.__brushOption)),e}function tp(a,e){var t=e.__brushOption;Zs(e).updateCoverShape(a,e,t.range,t)}function ep(a,e){var t=e.z;t==null&&(t=Lx),a.traverse(function(r){r.z=t,r.z2=t})}function Ys(a,e){Zs(e).updateCommon(a,e),tp(a,e)}function Zs(a){return ii[a.__brushOption.brushType]}function Xs(a,e,t){var r=a._panels;if(!r)return _r;var n,i=a._transform;return D(r,function(o){o.isTargetByCursor(e,t,i)&&(n=o)}),n}function rp(a,e){var t=a._panels;if(!t)return _r;var r=e.__brushOption.panelId;return r!=null?t[r]:_r}function Fo(a){var e=a._covers,t=e.length;return D(e,function(r){a.group.remove(r)},a),e.length=0,!!t}function wr(a,e){var t=$(a._covers,function(r){var n=r.__brushOption,i=pt(n.range);return{brushType:n.brushType,panelId:n.panelId,range:i}});a.trigger("brush",{areas:t,isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function kx(a){var e=a._track;if(!e.length)return!1;var t=e[e.length-1],r=e[0],n=t[0]-r[0],i=t[1]-r[1],o=Dx(n*n+i*i,.5);return o>Ix}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;o<n.length;o++){var s=n[o].__brushOption;if(i&&(i===_r||s.panelId===i.panelId)&&ii[s.brushType].contain(n[o],t[0],t[1]))return}i&&r.setCursorStyle("crosshair")}}function Uo(a){var e=a.event;e.preventDefault&&e.preventDefault()}function $o(a,e,t){return a.childOfName("main").contain(e,t)}function lp(a,e,t,r){var n=a._creatingCover,i=a._creatingPanel,o=a._brushOption,s;if(a._track.push(t.slice()),kx(a)||n){if(i&&!n){o.brushMode==="single"&&Fo(a);var l=pt(o);l.brushType=pv(l.brushType,i),l.panelId=i===_r?null:i.panelId,n=a._creatingCover=Jh(a,l),a._covers.push(n)}if(n){var u=ii[pv(a._brushType,i)],v=n.__brushOption;v.range=u.getCreatingRange(Ks(a,n,a._track)),r&&(Qh(a,n),u.updateCommon(a,n)),tp(a,n),s={isEnd:r}}}else r&&o.brushMode==="single"&&o.removeOnClick&&Xs(a,e,t)&&Fo(a)&&(s={isEnd:r,removeOnClick:!0});return s}function pv(a,e){return a==="auto"?e.defaultBrushType:a}var Bx={mousedown:function(a){if(this._dragging)dv(this,a);else if(!a.target||!a.target.draggable){Uo(a);var e=this.group.transformCoordToLocal(a.offsetX,a.offsetY);this._creatingCover=null;var t=this._creatingPanel=Xs(this,a,e);t&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(a){var e=a.offsetX,t=a.offsetY,r=this.group.transformCoordToLocal(e,t);if(Ox(this,a,r),this._dragging){Uo(a);var n=lp(this,a,r,!1);n&&wr(this,n)}},mouseup:function(a){dv(this,a)}};function dv(a,e){if(a._dragging){Uo(e);var t=e.offsetX,r=e.offsetY,n=a.group.transformCoordToLocal(t,r),i=lp(a,e,n,!0);a._dragging=!1,a._track=[],a._creatingCover=null,i&&wr(a,i)}}function Fx(a,e,t){var r=a._zr;return e<0||e>r.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)&&lt(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<o.length;l++)o[l].depth!=null&&o[l].depth>=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<e.length;f++)s[f]=1;for(var f=0;f<a.length;f++)l[f]=a[f].inEdges.length,l[f]===0&&u.push(a[f]);for(var h=-1;u.length;){for(var p=0;p<u.length;p++){var d=u[p],g=d.hostGraph.data.getRawDataItem(d.dataIndex),y=g.depth!=null&&g.depth>=0;y&&g.depth>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;S<d.outEdges.length;S++){var m=d.outEdges[S],x=e.indexOf(m);s[x]=0;var b=m.node2,_=a.indexOf(b);--l[_]===0&&v.indexOf(b)<0&&v.push(b)}}++c,u=v,v=[]}for(var f=0;f<s.length;f++)if(s[f]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var w=h>c-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;s<i.length;s++){var l=i[s];l.setLayout({skNodeHeight:o},!0);for(var u=0;u<l.inEdges.length;u++){var v=l.inEdges[u];n.indexOf(v.node1)<0&&n.push(v.node1)}}i=n,n=[],++o}D(a,function(c){hp(c)||c.setLayout({depth:Math.max(0,r-c.getLayout().skNodeHeight)},!0)})}else e==="justify"&&lb(a,r)}function lb(a,e){D(a,function(t){!hp(t)&&!t.outEdges.length&&t.setLayout({depth:e},!0)})}function ub(a,e,t){D(a,function(r){var n=r.getLayout().depth*e;t==="vertical"?r.setLayout({y:n},!0):r.setLayout({x:n},!0)})}function vb(a,e,t,r,n,i,o){var s=cb(a,o);fb(s,e,t,r,n,o),Xi(s,n,t,r,o);for(var l=1;i>0;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;v<o&&(o=v)}),D(a,function(s){D(s,function(l,u){var v=l.getLayout().value*o;i==="vertical"?(l.setLayout({x:u},!0),l.setLayout({dx:v},!0)):(l.setLayout({y:u},!0),l.setLayout({dy:v},!0))})}),D(e,function(s){var l=+s.getValue()*o;s.setLayout({dy:l},!0)})}function Xi(a,e,t,r,n){var i=n==="vertical"?"x":"y";D(a,function(o){o.sort(function(d,g){return d.getLayout()[i]-g.getLayout()[i]});for(var s,l,u,v=0,c=o.length,f=n==="vertical"?"dx":"dy",h=0;h<c;h++)l=o[h],u=v-l.getLayout()[i],u>0&&(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;++i<n;){var o=+e(a[i],t);isNaN(o)||(r+=o)}return r}function mb(a,e,t){D(a,function(r){D(r,function(n){if(n.inEdges.length){var i=Je(n.inEdges,gb,t)/Je(n.inEdges,Ln);if(isNaN(i)){var o=n.inEdges.length;i=o?Je(n.inEdges,yb,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 Sb(a,e){var t=e==="vertical"?"x":"y";D(a,function(r){r.outEdges.sort(function(n,i){return n.node2.getLayout()[t]-i.node2.getLayout()[t]}),r.inEdges.sort(function(n,i){return n.node1.getLayout()[t]-i.node1.getLayout()[t]})}),D(a,function(r){var n=0,i=0;D(r.outEdges,function(o){o.setLayout({sy:n},!0),n+=o.getLayout().dy}),D(r.inEdges,function(o){o.setLayout({ty:i},!0),i+=o.getLayout().dy})})}function xb(a){a.eachSeriesByType("sankey",function(e){var t=e.getGraph(),r=t.nodes,n=t.edges;if(r.length){var i=1/0,o=-1/0;D(r,function(s){var l=s.getLayout().value;l<i&&(i=l),l>o&&(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();i<n.length;i++)t.moveTo(n[i][0],n[i][1]),i++,t.lineTo(n[i][0],n[i][1])},e}(Wt);function mv(a,e,t,r,n){var i=a.ends,o=new Ab({shape:{points:n?Tb(i,r,a):i}});return gp(a,o,e,t,n),o}function gp(a,e,t,r,n){var i=t.hostModel,o=Yr[n?"initProps":"updateProps"];o(e,{shape:{points:a.ends}},i,r),e.useStyle(t.getItemVisual(r,"style")),e.style.strokeNoScale=!0,e.z2=100;var s=t.getItemModel(r),l=s.getModel("emphasis");ae(e,s),Et(e,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function Tb(a,e,t){return $(a,function(r){return r=r.slice(),r[e]=t.initBaseline,r})}var va=D;function Cb(a){var e=Db(a);va(e,function(t){var r=t.seriesModels;r.length&&(Lb(t),va(r,function(n,i){Ib(n,t.boxOffsetList[i],t.boxWidthList[i])}))})}function Db(a){var e=[],t=[];return a.eachSeriesByType("boxplot",function(r){var n=r.getBaseAxis(),i=Pt(t,n);i<0&&(i=t.length,t[i]=n,e[i]={axis:n,seriesModels:[]}),e[i].seriesModels.push(r)}),e}function Lb(a){var e=a.axis,t=a.seriesModels,r=t.length,n=a.boxWidthList=[],i=a.boxOffsetList=[],o=[],s;if(e.type==="category")s=e.getBandWidth();else{var l=0;va(t,function(p){l=Math.max(l,p.getData().count())});var u=e.getExtent();s=Math.abs(u[1]-u[0])/l}va(t,function(p){var d=p.get("boxWidth");q(d)||(d=[d,d]),o.push([U(d[0],s)||0,U(d[1],s)||0])});var v=s*.8-2,c=v/r*.3,f=(v-c*(r-1))/r,h=f/2-v/2;va(t,function(p,d){i.push(h),h+=c+f,n.push(Math.min(Math.max(f,o[d][0]),o[d][1]))})}function Ib(a,e,t){var r=a.coordinateSystem,n=a.getData(),i=t/2,o=a.get("layout")==="horizontal"?0:1,s=1-o,l=["x","y"],u=n.mapDimension(l[o]),v=n.mapDimensionsAll(l[s]);if(u==null||v.length<5)return;for(var c=0;c<n.count();c++){var f=n.get(u,c),h=m(f,v[2],c),p=m(f,v[0],c),d=m(f,v[1],c),g=m(f,v[3],c),y=m(f,v[4],c),S=[];x(S,d,!1),x(S,g,!0),S.push(p,d,y,g),b(S,p),b(S,y),b(S,h),n.setItemLayout(c,{initBaseline:h[s],ends:S})}function m(_,w,A){var T=n.get(w,A),C=[];C[o]=_,C[s]=T;var L;return isNaN(_)||isNaN(T)?L=[NaN,NaN]:(L=r.dataToPoint(C),L[o]+=e),L}function x(_,w,A){var T=w.slice(),C=w.slice();T[o]+=i,C[o]-=i,A?_.push(T,C):_.push(C,T)}function b(_,w){var A=w.slice(),T=w.slice();A[o]-=i,T[o]+=i,_.push(A,T)}}function Mb(a,e){e=e||{};for(var t=[],r=[],n=e.boundIQR,i=n==="none"||n===0,o=0;o<a.length;o++){var s=br(a[o].slice()),l=pi(s,.25),u=pi(s,.5),v=pi(s,.75),c=s[0],f=s[s.length-1],h=(n??1.5)*(v-l),p=i?c:Math.max(c,l-h),d=i?f:Math.min(f,v+h),g=e.itemNameFormatter,y=gt(g)?g({value:o}):lt(g)?g.replace("{value}",o+""):o+"";t.push([y,p,l,u,v,d]);for(var S=0;S<s.length;S++){var m=s[S];if(m<p||m>d){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;r<e.ends.length;r++)if(a.contain(e.ends[r][0],e.ends[r][1])){t=!1;break}return t}function Ki(a,e,t,r){var n=e.getItemModel(t);a.useStyle(e.getItemVisual(t,"style")),a.style.strokeNoScale=!0,a.__simpleBox=r,ae(a,n);var i=e.getItemLayout(t).sign;D(a.states,function(s,l){var u=n.getModel(l),v=Js(i,u),c=Qs(i,u)||v,f=s.style||(s.style={});v&&(f.fill=v),c&&(f.stroke=c)});var o=n.getModel("emphasis");Et(a,o.get("focus"),o.get("blurScope"),o.get("disabled"))}function Wb(a,e){return $(a,function(t){return t=t.slice(),t[1]=e.initBaseline,t})}var Ub=function(){function a(){}return a}(),ji=function(a){V(e,a);function e(t){var r=a.call(this,t)||this;return r.type="largeCandlestickBox",r}return e.prototype.getDefaultShape=function(){return new Ub},e.prototype.buildPath=function(t,r){for(var n=r.points,i=0;i<n.length;)if(this.__sign===n[i++]){var o=n[i++];t.moveTo(o,n[i++]),t.lineTo(o,n[i++])}else i+=3},e}(Wt);function xv(a,e,t,r){var n=a.getData(),i=n.getLayout("largePoints"),o=new ji({shape:{points:i},__sign:1,ignoreCoarsePointer:!0});e.add(o);var s=new ji({shape:{points:i},__sign:-1,ignoreCoarsePointer:!0});e.add(s);var l=new ji({shape:{points:i},__sign:0,ignoreCoarsePointer:!0});e.add(l),Ji(1,o,a),Ji(-1,s,a),Ji(0,l,a),r&&(o.incremental=!0,s.incremental=!0),t&&t.push(o,s)}function Ji(a,e,t,r){var n=Qs(a,t)||Js(a,t),i=t.getModel("itemStyle").getItemStyle(Ob);e.useStyle(i),e.style.fill=null,e.style.stroke=n}var yp=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],t}return e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,r,n){var i=r.getItemLayout(t);return i&&n.rect(i.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(Ft);Ce(yp,pp,!0);function $b(a){!a||!q(a.series)||D(a.series,function(e){Zt(e)&&e.type==="k"&&(e.type="candlestick")})}var Yb={seriesType:"candlestick",plan:Ss(),reset:function(a){var e=a.coordinateSystem,t=a.getData(),r=Zb(a,t),n=0,i=1,o=["x","y"],s=t.getDimensionIndex(t.mapDimension(o[n])),l=$(t.mapDimensionsAll(o[i]),t.getDimensionIndex,t),u=l[0],v=l[1],c=l[2],f=l[3];if(t.setLayout({candleWidth:r,isSimpleBox:r<=1.3}),s<0||l.length<4)return;return{progress:a.pipelineContext.large?p:h};function h(d,g){for(var y,S=g.getStore();(y=d.next())!=null;){var m=S.get(s,y),x=S.get(u,y),b=S.get(v,y),_=S.get(c,y),w=S.get(f,y),A=Math.min(x,b),T=Math.max(x,b),C=k(A,m),L=k(T,m),M=k(_,m),I=k(w,m),P=[];N(P,L,0),N(P,C,1),P.push(H(I),H(L),H(M),H(C));var E=g.getItemModel(y),R=!!E.get(["itemStyle","borderColorDoji"]);g.setItemLayout(y,{sign:bv(S,y,x,b,v,R),initBaseline:x>b?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:t<r?o=1:o=i?0:e>0?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;s<i;s++){var l=ve(r,-1,-1,2,2,n);l.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var u=-s/i*t.period+t.effectOffset;l.animate("",!0).when(t.period,{scaleX:t.rippleScale/2,scaleY:t.rippleScale/2}).delay(u).start(),l.animateStyle(!0).when(t.period,{opacity:0}).delay(u).start(),o.add(l)}_v(o,t)},e.prototype.updateEffectAnimation=function(t){for(var r=this._effectCfg,n=this.childAt(1),i=["symbolType","period","rippleScale","rippleNumber"],o=0;o<i.length;o++){var s=i[o];if(r[s]!==t[s]){this.stopEffectAnimation(),this.startEffectAnimation(t);return}}_v(n,t)},e.prototype.highlight=function(){ga(this)},e.prototype.downplay=function(){ya(this)},e.prototype.getSymbolType=function(){var t=this.childAt(0);return t&&t.getSymbolType()},e.prototype.updateData=function(t,r){var n=this,i=t.hostModel;this.childAt(0).updateData(t,r);var o=this.childAt(1),s=t.getItemModel(r),l=t.getItemVisual(r,"symbol"),u=Ia(t.getItemVisual(r,"symbolSize")),v=t.getItemVisual(r,"style"),c=v&&v.fill,f=s.getModel("emphasis");o.setScale(u),o.traverse(function(g){g.setStyle("fill",c)});var h=Ra(t.getItemVisual(r,"symbolOffset"),u);h&&(o.x=h[0],o.y=h[1]);var p=t.getItemVisual(r,"symbolRotate");o.rotation=(p||0)*Math.PI/180||0;var d={};d.showEffectOn=i.get("showEffectOn"),d.rippleScale=s.get(["rippleEffect","scale"]),d.brushType=s.get(["rippleEffect","brushType"]),d.period=s.get(["rippleEffect","period"])*1e3,d.effectOffset=r/t.count(),d.z=i.getShallow("z")||0,d.zlevel=i.getShallow("zlevel")||0,d.symbolType=l,d.color=c,d.rippleEffectColor=s.get(["rippleEffect","color"]),d.rippleNumber=s.get(["rippleEffect","number"]),d.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(d):this.startEffectAnimation(d),this._effectCfg=d):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(g){g==="emphasis"?d.showEffectOn!=="render"&&n.startEffectAnimation(d):g==="normal"&&d.showEffectOn!=="render"&&n.stopEffectAnimation()}),this._effectCfg=d,Et(this,f.get("focus"),f.get("blurScope"),f.get("disabled"))},e.prototype.fadeOut=function(t){t&&t()},e}(nt),Kb=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._symbolDraw=new Un(qb)},e.prototype.render=function(t,r,n){var i=t.getData(),o=this._symbolDraw;o.updateData(i,{clipShape:this._getClipShape(t)}),this.group.add(o.group)},e.prototype._getClipShape=function(t){var r=t.coordinateSystem,n=r&&r.getArea&&r.getArea();return t.get("clip",!0)?n:null},e.prototype.updateTransform=function(t,r,n){var i=t.getData();this.group.dirty();var o=Wn("").reset(t,r,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout()},e.prototype._updateGroupTransform=function(t){var r=t.coordinateSystem;r&&r.getRoamTransform&&(this.group.transform=Ug(r.getRoamTransform()),this.group.decomposeTransform())},e.prototype.remove=function(t,r){this._symbolDraw&&this._symbolDraw.remove(!0)},e.type="effectScatter",e}(kt),jb=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.brushSelector=function(t,r,n){return n.point(r.getItemLayout(t))},e.type="series.effectScatter",e.dependencies=["grid","polar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},e}(Ft);function Jb(a){a.registerChartView(Kb),a.registerSeriesModel(jb),a.registerLayout(Wn("effectScatter"))}var mp=function(a){V(e,a);function e(t,r,n){var i=a.call(this)||this;return i.add(i.createLine(t,r,n)),i._updateEffectSymbol(t,r),i}return e.prototype.createLine=function(t,r,n){return new Ws(t,r,n)},e.prototype._updateEffectSymbol=function(t,r){var n=t.getItemModel(r),i=n.getModel("effect"),o=i.get("symbolSize"),s=i.get("symbol");q(o)||(o=[o,o]);var l=t.getItemVisual(r,"style"),u=i.get("color")||l&&l.stroke,v=this.childAt(1);this._symbolType!==s&&(this.remove(v),v=ve(s,-.5,-.5,1,1,u),v.z2=100,v.culling=!0,this.add(v)),v&&(v.setStyle("shadowColor",u),v.setStyle(i.getItemStyle(["color"])),v.scaleX=o[0],v.scaleY=o[1],v.setColor(u),this._symbolType=s,this._symbolScale=o,this._updateEffectAnimation(t,i,r))},e.prototype._updateEffectAnimation=function(t,r,n){var i=this.childAt(1);if(i){var o=t.getItemLayout(n),s=r.get("period")*1e3,l=r.get("loop"),u=r.get("roundTrip"),v=r.get("constantSpeed"),c=se(r.get("delay"),function(h){return h/t.count()*s/3});if(i.ignore=!0,this._updateAnimationPoints(i,o),v>0&&(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<t.__t?(t.scaleY=dr(l,s)*1.05,o===1&&(s[0]=l[0]+(s[0]-l[0])/2,s[1]=l[1]+(s[1]-l[1])/2)):t.__lastT===1?t.scaleY=2*dr(r,s):t.scaleY=this._symbolScale[1]),t.__lastT=t.__t,t.ignore=!1,t.x=s[0],t.y=s[1]},e.prototype.updateLayout=function(t,r){this.childAt(0).updateLayout(t,r);var n=t.getItemModel(r).getModel("effect");this._updateEffectAnimation(t,n,r)},e}(nt),Sp=function(a){V(e,a);function e(t,r,n){var i=a.call(this)||this;return i._createPolyline(t,r,n),i}return e.prototype._createPolyline=function(t,r,n){var i=t.getItemLayout(r),o=new Te({shape:{points:i}});this.add(o),this._updateCommonStl(t,r,n)},e.prototype.updateData=function(t,r,n){var i=t.hostModel,o=this.childAt(0),s={shape:{points:t.getItemLayout(r)}};xt(o,s,i,r),this._updateCommonStl(t,r,n)},e.prototype._updateCommonStl=function(t,r,n){var i=this.childAt(0),o=t.getItemModel(r),s=n&&n.emphasisLineStyle,l=n&&n.focus,u=n&&n.blurScope,v=n&&n.emphasisDisabled;if(!n||t.hasItemOption){var c=o.getModel("emphasis");s=c.getModel("lineStyle").getLineStyle(),v=c.get("disabled"),l=c.get("focus"),u=c.get("blurScope")}i.useStyle(t.getItemVisual(r,"style")),i.style.fill=null,i.style.strokeNoScale=!0;var f=i.ensureState("emphasis");f.style=s,Et(this,l,u,v)},e.prototype.updateLayout=function(t,r){var n=this.childAt(0);n.setShape("points",t.getItemLayout(r))},e}(nt),Qb=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t._lastFrame=0,t._lastFramePercent=0,t}return e.prototype.createLine=function(t,r,n){return new Sp(t,r,n)},e.prototype._updateAnimationPoints=function(t,r){this._points=r;for(var n=[0],i=0,o=1;o<r.length;o++){var s=r[o-1],l=r[o];i+=dr(s,l),n.push(i)}if(i===0){this._length=0;return}for(var o=0;o<n.length;o++)n[o]/=i;this._offsets=n,this._length=i},e.prototype._getLineLength=function(){return this._length},e.prototype._updateSymbolPosition=function(t){var r=t.__t<1?t.__t:2-t.__t,n=this._points,i=this._offsets,o=n.length;if(i){var s=this._lastFrame,l;if(r<this._lastFramePercent){var u=Math.min(s+1,o-1);for(l=u;l>=0&&!(i[l]<=r);l--);l=Math.min(l,o-2)}else{for(l=s;l<o&&!(i[l]>r);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;o<n.length;){var s=n[o++];if(s>0){t.moveTo(n[o++],n[o++]);for(var l=1;l<s;l++)t.lineTo(n[o++],n[o++])}}else for(o=this._off;o<n.length;){var u=n[o++],v=n[o++],c=n[o++],f=n[o++];if(t.moveTo(u,v),i>0){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;u<i.length;){var v=i[u++];if(v>0)for(var c=i[u++],f=i[u++],h=1;h<v;h++){var p=i[u++],d=i[u++];if(Rl(c,f,p,d,s,t,r))return l}l++}else for(var l=0,u=0;u<i.length;){var c=i[u++],f=i[u++],p=i[u++],d=i[u++];if(o>0){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;u<n.length;){var v=n[u++],c=n[u++];i=Math.min(v,i),s=Math.max(v,s),o=Math.min(c,o),l=Math.max(c,l)}t=this._rect=new Tt(i,o,s,l)}return t},e}(Wt),r_=function(){function a(){this.group=new nt}return a.prototype.updateData=function(e){this._clear();var t=this._create();t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e)},a.prototype.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clear()},a.prototype.incrementalUpdate=function(e,t){var r=this._newAdded[0],n=t.getLayout("linesPoints"),i=r&&r.shape.segs;if(i&&i.length<2e4){var o=i.length,s=new Float32Array(o+n.length);s.set(i),s.set(n,o),r.setShape({segs:s})}else{this._newAdded=[];var l=this._create();l.incremental=!0,l.setShape({segs:n}),this._setCommon(l,t),l.__startIndex=e.start}},a.prototype.remove=function(){this._clear()},a.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},a.prototype._create=function(){var e=new e_({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(e),this.group.add(e),e},a.prototype._setCommon=function(e,t,r){var n=t.hostModel;e.setShape({polyline:n.get("polyline"),curveness:n.get(["lineStyle","curveness"])}),e.useStyle(n.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var i=t.getVisual("style");i&&i.stroke&&e.setStyle("stroke",i.stroke),e.setStyle("fill",null);var o=ht(e);o.seriesIndex=n.seriesIndex,e.on("mousemove",function(s){o.dataIndex=null;var l=e.hoverDataIdx;l>0&&(o.dataIndex=l+e.__startIndex)})},a.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},a}(),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;v<n.end;v++)u+=a.getLineCoordsCount(v);s=new Float32Array(l+u*2)}else s=new Float32Array(l*4);for(var c=0,f=[],v=n.start;v<n.end;v++){var h=a.getLineCoords(v,o);t&&(s[c++]=h);for(var p=0;p<h;p++)f=e.dataToPoint(o[p],!1,f),s[c++]=f[0],s[c++]=f[1]}i.setLayout("linesPoints",s)}else for(var v=n.start;v<n.end;v++){var d=i.getItemModel(v),h=a.getLineCoords(v,o),g=[];if(t)for(var y=0;y<h;y++)g.push(e.dataToPoint(o[y]));else{g[0]=e.dataToPoint(o[0]),g[1]=e.dataToPoint(o[1]);var S=d.get(["lineStyle","curveness"]);+S&&(g[2]=[(g[0][0]+g[1][0])/2-(g[0][1]-g[1][1])*S,(g[0][1]+g[1][1])/2-(g[1][0]-g[0][0])*S])}i.setItemLayout(v,g)}}}}}},a_=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._updateLineDraw(i,t),s=t.get("zlevel"),l=t.get(["effect","trailLength"]),u=n.getZr(),v=u.painter.getType()==="svg";v||u.painter.getLayer(s).clear(!0),this._lastZlevel!=null&&!v&&u.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&l>0&&(v||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<i;o++)r[o]=r[o]||[],r[o][0]=this._flatCoords[n+o*2],r[o][1]=this._flatCoords[n+o*2+1];return i}else{for(var s=this._getCoordsFromItemModel(t),o=0;o<s.length;o++)r[o]=r[o]||[],r[o][0]=s[o][0],r[o][1]=s[o][1];return s.length}},e.prototype._processFlatCoordsArray=function(t){var r=0;if(this._flatCoords&&(r=this._flatCoords.length),le(t[0])){for(var n=t.length,i=new n_(n),o=new i_(n),s=0,l=0,u=0,v=0;v<n;){u++;var c=t[v++];i[l++]=s+r,i[l++]=c;for(var f=0;f<c;f++){var h=t[v++],p=t[v++];o[s++]=h,o[s++]=p}}return{flatCoordsOffset:new Uint32Array(i.buffer,0,l),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},e.prototype.getInitialData=function(t,r){var n=new re(["value"],this);return n.hasItemOption=!1,n.initData(t.data,[],function(i,o,s,l){if(i instanceof Array)return NaN;n.hasItemOption=!0;var u=i.value;if(u!=null)return u instanceof Array?u[l]:u}),n},e.prototype.formatTooltip=function(t,r,n){var i=this.getData(),o=i.getItemModel(t),s=o.get("name");if(s)return s;var l=o.get("fromName"),u=o.get("toName"),v=[];return l!=null&&v.push(l),u!=null&&v.push(u),ne("nameValue",{name:v.join(" > ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?1e4:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?2e4:this.get("progressiveThreshold"))},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),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;p<h;++p){var d=e[p],g=d[0],y=d[1],S=d[2],m=n(S);f.globalAlpha=m,f.drawImage(s,g-v,y-v)}if(!c.width||!c.height)return c;for(var x=f.getImageData(0,0,c.width,c.height),b=x.data,_=0,w=b.length,A=this.minOpacity,T=this.maxOpacity,C=T-A;_<w;){var m=b[_+3]/256,L=Math.floor(m*(u_-1))*4;if(m>0){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<n;s++){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}if(s===n)for(s=i-1;s>=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}return s>=0&&s<n&&t[s]}}function f_(a,e){var t=a[1]-a[0];return e=[(e[0]-a[0])/t,(e[1]-a[0])/t],function(r){return r>=e[0]&&r<=e[1]}}function 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;L<i;L++){var M=void 0,I=g.getItemVisual(L,"style");if(l){var P=g.get(C[0],L),E=g.get(C[1],L);if(isNaN(g.get(C[2],L))||isNaN(P)||isNaN(E)||P<c[0]||P>c[1]||E<f[0]||E>f[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]<c[0]&&c.reverse(),v=c[u]}else o!=null?v=to(s,o)-l:e?v=r.coordSysExtent[i.index][u]-l:v=t[i.wh];n.boundingLength=v,e&&(n.repeatCutLength=t[i.wh]);var f=i.xy==="x",h=s.inverse;n.pxSign=f&&!h||!f&&h?v>=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,v<u?Or(d,null,p(v),t,r):Or(d,null,{scaleX:0,scaleY:0},t,r,function(){n.remove(d)}),v++});v<u;v++){var f=bp(t);f.__pictorialAnimationIndex=v,f.__pictorialRepeatTimes=u,n.add(f);var h=p(v);Or(f,{x:h.x,y:h.y,scaleX:0,scaleY:0},{scaleX:h.scaleX,scaleY:h.scaleY,rotation:h.rotation},t,r)}function p(d){var g=s.slice(),y=t.pxSign,S=d;return(t.symbolRepeatDirection==="start"?y>0: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;A<w.length;A++){var T=i.getItemLayout(w[A]),C=T.x,L=T.y0,M=T.y;x.push(C,L),b.push(C,L+M),_=i.getItemVisual(w[A],"style")}var I,P=i.getItemLayout(w[0]),E=t.getModel("label"),R=E.get("margin"),k=t.getModel("emphasis");if(g==="add"){var N=p[y]=new nt;I=new Kg({shape:{points:x,stackedOnPoints:b,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),N.add(I),s.add(N),t.isAnimationEnabled()&&I.setClipPath(L_(I.getBoundingRect(),t,function(){I.removeClipPath()}))}else{var N=m[S];I=N.childAt(0),s.add(N),p[y]=N,xt(I,{shape:{points:x,stackedOnPoints:b}},t),Fe(I)}ue(I,Qt(t),{labelDataIndex:w[A-1],defaultText:i.getName(w[A-1]),inheritColor:_.fill},{normal:{verticalAlign:"middle"}}),I.setTextConfig({position:null,local:!0});var F=I.getTextContent();F&&(F.x=P.x-R,F.y=P.y0+P.y/2),I.useStyle(_),i.setItemGraphicEl(y,I),ae(I,t),Et(I,k.get("focus"),k.get("blurScope"),k.get("disabled"))}this._layersSeries=l,this._layers=p},e.type="themeRiver",e}(kt);function L_(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:{x:a.x-50,width:a.width+100,height:a.height+20}},e,t),r}var eo=2,I_=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))},e.prototype.fixData=function(t){var r=t.length,n={},i=wo(t,function(f){return n.hasOwnProperty(f[0]+"")||(n[f[0]+""]=-1),f[2]}),o=[];i.buckets.each(function(f,h){o.push({name:h,dataList:f})});for(var s=o.length,l=0;l<s;++l){for(var u=o[l].name,v=0;v<o[l].dataList.length;++v){var c=o[l].dataList[v][0]+"";n[c]=l}for(var c in n)n.hasOwnProperty(c)&&n[c]!==l&&(n[c]=l,t[r]=[c,0,u],r++)}return t},e.prototype.getInitialData=function(t,r){for(var n=this.getReferringComponents("singleAxis",Ar).models[0],i=n.get("type"),o=Gt(t.data,function(p){return p[2]!==void 0}),s=this.fixData(o||[]),l=[],u=this.nameMap=ut(),v=0,c=0;c<s.length;++c)l.push(s[c][eo]),u.get(s[c][eo])||(u.set(s[c][eo],v),v++);var f=Hn(s,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:Ao(i)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,h=new re(f,this);return h.initData(s),h},e.prototype.getLayerSeries=function(){for(var t=this.getData(),r=t.count(),n=[],i=0;i<r;++i)n[i]=i;var o=t.mapDimension("single"),s=wo(n,function(u){return t.get("name",u)}),l=[];return s.buckets.each(function(u,v){u.sort(function(c,f){return t.get(o,c)-t.get(o,f)}),l.push({name:v,indices:u})}),l},e.prototype.getAxisTooltipData=function(t,r,n){q(t)||(t=t?[t]:[]);for(var i=this.getData(),o=this.getLayerSeries(),s=[],l=o.length,u,v=0;v<l;++v){for(var c=Number.MAX_VALUE,f=-1,h=o[v].indices.length,p=0;p<h;++p){var d=i.get(t[0],o[v].indices[p]),g=Math.abs(d-r);g<=c&&(u=d,c=g,f=o[v].indices[p])}s.push(f)}return{dataIndices:s,nestestValue:u}},e.prototype.formatTooltip=function(t,r,n){var i=this.getData(),o=i.getName(t),s=i.get(i.mapDimension("value"),t);return ne("nameValue",{name:o,value:s})},e.type="series.themeRiver",e.dependencies=["singleAxis"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},e}(Ft);function M_(a,e){a.eachSeriesByType("themeRiver",function(t){var r=t.getData(),n=t.coordinateSystem,i={},o=n.getRect();i.rect=o;var s=t.get("boundaryGap"),l=n.getAxis();if(i.boundaryGap=s,l.orient==="horizontal"){s[0]=U(s[0],o.height),s[1]=U(s[1],o.height);var u=o.height-s[0]-s[1];Ev(r,t,u)}else{s[0]=U(s[0],o.width),s[1]=U(s[1],o.width);var v=o.width-s[0]-s[1];Ev(r,t,v)}r.setLayout("layoutInfo",i)})}function Ev(a,e,t){if(a.count())for(var r=e.coordinateSystem,n=e.getLayerSeries(),i=a.mapDimension("single"),o=a.mapDimension("value"),s=$(n,function(g){return $(g.indices,function(y){var S=r.dataToPoint(a.get(i,y));return S[1]=a.get(o,y),S})}),l=P_(s),u=l.y0,v=t/l.max,c=n.length,f=n[0].indices.length,h,p=0;p<f;++p){h=u[p]*v,a.setItemLayout(n[0].indices[p],{layerIndex:0,x:s[0][p][0],y0:h,y:s[0][p][1]*v});for(var d=1;d<c;++d)h+=s[d-1][p][1]*v,a.setItemLayout(n[d].indices[p],{layerIndex:d,x:s[d][p][0],y0:h,y:s[d][p][1]*v})}}function P_(a){for(var e=a.length,t=a[0].length,r=[],n=[],i=0,o=0;o<t;++o){for(var s=0,l=0;l<e;++l)s+=a[l][o][1];s>i&&(i=s),r.push(s)}for(var u=0;u<t;++u)n[u]=(i-r[u])/2;i=0;for(var v=0;v<t;++v){var c=r[v]+n[v];c>i&&(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);f.ignore=!d,D(So,function(y){var S=y==="normal"?n.getModel("label"):n.getModel([y,"label"]),m=y==="normal",x=m?f:f.ensureState(y),b=t.getFormattedLabel(h,y);m&&(b=b||r.node.name),x.style=At(S,{},null,y!=="normal",!0),b&&(x.style.text=b);var _=S.get("show");_!=null&&!m&&(x.ignore=!_);var w=g(S,"position"),A=m?c:c.states[y],T=A.style.fill;A.textConfig={outsideFill:S.get("color")==="inherit"?T:null,inside:w!=="outside"};var C,L=g(S,"distance")||0,M=g(S,"align"),I=g(S,"rotate"),P=Math.PI*.5,E=Math.PI*1.5,R=Ne(I==="tangential"?Math.PI/2-l:l),k=R>P&&!jg(R-P)&&R<E;w==="outside"?(C=o.r+L,M=k?"right":"left"):!M||M==="center"?(s===2*Math.PI&&o.r0===0?C=0:C=(o.r+o.r0)/2,M="center"):M==="left"?(C=o.r0+L,M=k?"right":"left"):M==="right"&&(C=o.r-L,M=k?"left":"right"),x.style.align=M,x.style.verticalAlign=g(S,"verticalAlign")||"middle",x.x=C*u+o.cx,x.y=C*v+o.cy;var N=0;I==="radial"?N=Ne(-l)+(k?Math.PI:0):I==="tangential"?N=Ne(Math.PI/2-l)+(k?Math.PI:0):le(I)&&(N=I*Math.PI/180),x.rotation=Ne(N)});function g(y,S){var m=y.get(S);return m??i.get(S)}f.dirtyStyle()},e}(Be),Yo="sunburstRootToNode",kv="sunburstHighlight",V_="sunburstUnhighlight";function N_(a){a.registerAction({type:Yo,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},r);function r(n,i){var o=ba(e,[Yo],n);if(o){var s=n.getViewRoot();s&&(e.direction=Gs(s,o.node)?"rollUp":"drillDown"),n.resetViewRoot(o.node)}}}),a.registerAction({type:kv,update:"none"},function(e,t,r){e=K({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},n);function n(i){var o=ba(e,[kv],i);o&&(e.dataIndex=o.node.dataIndex)}r.dispatchAction(K(e,{type:"highlight"}))}),a.registerAction({type:V_,update:"updateView"},function(e,t,r){e=K({},e),r.dispatchAction(K(e,{type:"downplay"}))})}var z_=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,i){var o=this;this.seriesModel=t,this.api=n,this.ecModel=r;var s=t.getData(),l=s.tree.root,u=t.getViewRoot(),v=this.group,c=t.get("renderLabelForZeroData"),f=[];u.eachNode(function(S){f.push(S)});var h=this._oldChildren||[];p(f,h),y(l,u),this._initEvents(),this._oldChildren=f;function p(S,m){if(S.length===0&&m.length===0)return;new Qe(m,S,x,x).add(b).update(b).remove(st(b,null)).execute();function x(_){return _.getId()}function b(_,w){var A=_==null?null:S[_],T=w==null?null:m[w];d(A,T)}}function d(S,m){if(!c&&S&&!S.getValue()&&(S=null),S!==l&&m!==l){if(m&&m.piece)S?(m.piece.updateData(!1,S,t,r,n),s.setItemGraphicEl(S.dataIndex,m.piece)):g(m);else if(S){var x=new Rv(S,t,r,n);v.add(x),s.setItemGraphicEl(S.dataIndex,x)}}}function g(S){S&&S.piece&&(v.remove(S.piece),S.piece=null)}function y(S,m){m.depth>0?(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;H<p&&(H=p),N=k+L*H;var X=R.depth-y-(_?-1:1),j=c+A*X,rt=c+A*(X+1),tt=r.getLevelModel(R);if(tt){var O=tt.get("r0",!0),G=tt.get("r",!0),J=tt.get("radius",!0);J!=null&&(O=J[0],G=J[1]),O!=null&&(j=U(O,l/2)),G!=null&&(rt=U(G,l/2))}R.setLayout({angle:H,startAngle:k,endAngle:N,clockwise:T,cx:u,cy:v,r0:j,r:rt})}if(R.children&&R.children.length){var Y=0;D(R.children,function(W){Y+=M(W,k+Y)})}return N-k}};if(_){var I=c,P=c+A,E=Math.PI*2;d.setLayout({angle:E,startAngle:h,endAngle:h+E,clockwise:T,cx:u,cy:v,r0:I,r:P})}M(g,h)})}function Lp(a,e){var t=a.children||[];a.children=B_(t,e),t.length&&D(a.children,function(r){Lp(r,e)})}function B_(a,e){if(gt(e)){var t=$(a,function(n,i){var o=n.getValue();return{params:{depth:n.depth,height:n.height,dataIndex:n.dataIndex,getValue:function(){return o}},index:i}});return t.sort(function(n,i){return e(n.params,i.params)}),$(t,function(n){return a[n.index]})}else{var r=e==="asc";return a.sort(function(n,i){var o=(n.getValue()-i.getValue())*(r?1:-1);return o===0?(n.dataIndex-i.dataIndex)*(r?-1:1):o})}}function F_(a){var e={};function t(r,n,i){for(var o=r;o&&o.depth>1;)o=o.parentNode;var s=n.getColorFromPalette(o.name||o.dataIndex+"",e);return r.depth>1&&lt(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;r<In.length;r++){var n=In[r],i=n?e[n]:e;i&&i.leaveTo&&(t||(t=Hr(a).leaveToProps={}),n&&(t[n]=t[n]||{}),K(n?t[n]:t,i.leaveTo))}}function oi(a,e,t,r){if(a){var n=a.parent,i=Hr(a).leaveToProps;if(i){var o=el("update",a,e,t,0);o.done=function(){n.remove(a)},a.animateTo(i,o)}else n.remove(a)}}function gr(a){return a==="all"}function tw(a,e,t){var r=e.style;if(!a.isGroup&&r){if(t){a.useStyle({});for(var n=a.animators,i=0;i<n.length;i++){var o=n[i];o.targetName==="style"&&o.changeTarget(a.style)}}a.setStyle(r)}e&&(e.style=null,e&&a.attr(e),e.style=r)}function ew(a,e,t,r,n){if(n){var i=el("update",a,e,r,t);i.duration>0&&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<u.length;v++){var c=u[v],f=i[c];o[c]=f}else if(gr(s)||Pt(s,a)>=0){!o&&(o=r[a]={});for(var h=Mt(i),v=0;v<h.length;v++){var c=h[v],f=i[c];lw(n[c],f)&&(o[c]=f)}}}}}function Hv(a,e,t){var r=e[a];if(r)for(var n=t[a]={},i=Mt(r),o=0;o<i.length;o++){var s=i[o];n[s]=Qg(r[s])}}function iw(a,e,t){for(var r=e.transition,n=gr(r)?ma:Jt(r||[]),i=0;i<n.length;i++){var o=n[i];if(!(o==="style"||o==="shape"||o==="extra")){var s=a[o];t[o]=s}}}function ow(a,e,t){for(var r=0;r<Bv.length;r++){var n=Bv[r],i=Pp[n],o=e[n];o&&(t[i[0]]=o[0],t[i[1]]=o[1])}for(var r=0;r<ma.length;r++){var s=ma[r];e[s]!=null&&(t[s]=e[s])}}function sw(a,e,t,r){if(t){var n=a.style,i;if(n){var o=t.transition,s=e.transition;if(o&&!gr(o)){var l=Jt(o);!i&&(i=r.style={});for(var u=0;u<l.length;u++){var v=l[u],c=n[v];i[v]=c}}else if(a.getAnimationStyleProps&&(gr(s)||gr(o)||Pt(s,"style")>=0)){var f=a.getAnimationStyleProps(),h=f?f.style:null;if(h){!i&&(i=r.style={});for(var p=Mt(t),u=0;u<p.length;u++){var v=p[u];if(h[v]){var c=n[v];i[v]=c}}}}}}}function lw(a,e){return kf(a)?a!==e:a!=null&&isFinite(a)}var Rp=Dt(),uw=["percent","easing","shape","style","extra"];function kp(a){a.stopAnimation("keyframe"),a.attr(Rp(a))}function Mn(a,e,t){if(!(!t.isAnimationEnabled()||!e)){if(q(e)){D(e,function(s){Mn(a,s,t)});return}var r=e.keyframes,n=e.duration;if(t&&n==null){var i=ka("enter",t,0);n=i&&i.duration}if(!(!r||!n)){var o=Rp(a);D(In,function(s){if(!(s&&!a[s])){var l;r.sort(function(u,v){return u.percent-v.percent}),D(r,function(u){var v=a.animators,c=s?u[s]:u;if(c){var f=Mt(c);if(s||(f=Gt(f,function(d){return Pt(uw,d)<0})),!!f.length){l||(l=a.animate(s,e.loop,!0),l.scope="keyframe");for(var h=0;h<v.length;h++)v[h]!==l&&v[h].targetName===l.targetName&&v[h].stopTracks(f);s&&(o[s]=o[s]||{});var p=s?o[s]:o;D(f,function(d){p[d]=((s?a[s]:a)||{})[d]}),l.whenWithKeys(n*u.percent,c,f,u.easing)}}}),l&&l.delay(e.delay||0).duration(n).start(e.easing)}})}}}var Oe="emphasis",Ke="normal",rl="blur",al="select",er=[Ke,Oe,rl,al],ro={normal:["itemStyle"],emphasis:[Oe,"itemStyle"],blur:[rl,"itemStyle"],select:[al,"itemStyle"]},ao={normal:["label"],emphasis:[Oe,"label"],blur:[rl,"label"],select:[al,"label"]},vw=["x","y"],cw="e\0\0",pe={normal:{},emphasis:{},blur:{},select:{}},fw={cartesian2d:Y_,geo:X_,single:K_,polar:J_,calendar:Q_};function Zo(a){return a instanceof Wt}function Xo(a){return a instanceof xr}function hw(a,e){e.copyTransform(a),Xo(e)&&Xo(a)&&(e.setStyle(a.style),e.z=a.z,e.z2=a.z2,e.zlevel=a.zlevel,e.invisible=a.invisible,e.ignore=a.ignore,Zo(e)&&Zo(a)&&e.setShape(a.shape))}var 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.prototype.render=function(t,r,n,i){this._progressiveEls=null;var o=this._data,s=t.getData(),l=this.group,u=Wv(t,s,r,n);o||l.removeAll(),s.diff(o).add(function(c){no(n,null,c,u(c,i),t,l,s)}).remove(function(c){var f=o.getItemGraphicEl(c);f&&oi(f,Ge(f).option,t)}).update(function(c,f){var h=o.getItemGraphicEl(f);no(n,h,c,u(c,i),t,l,s)}).execute();var v=t.get("clip",!0)?Kn(t.coordinateSystem,!1,t):null;v?l.setClipPath(v):l.removeClipPath(),this._data=s},e.prototype.incrementalPrepareRender=function(t,r,n){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,r,n,i,o){var s=r.getData(),l=Wv(r,s,n,i),u=this._progressiveEls=[];function v(h){h.isGroup||(h.incremental=!0,h.ensureState("emphasis").hoverLayer=!0)}for(var c=t.start;c<t.end;c++){var f=no(null,null,c,l(c,o),r,this.group,s);f&&(f.traverse(v),u.push(f))}},e.prototype.eachRendered=function(t){qn(this._progressiveEls||this.group,t)},e.prototype.filterForExposedEvent=function(t,r,n,i){var o=r.element;if(o==null||n.name===o)return!0;for(;(n=n.__hostTarget||n.parent)&&n!==this.group;)if(n.name===o)return!0;return!1},e.type="custom",e}(kt);function nl(a){var e=a.type,t;if(e==="path"){var r=a.shape,n=r.width!=null&&r.height!=null?{x:r.x||0,y:r.y||0,width:r.width,height:r.height}:null,i=zp(r);t=ey(i,null,n,r.layout||"center"),Ge(t).customPathData=i}else if(e==="image")t=new Re({}),Ge(t).customImagePath=a.style.image;else if(e==="text")t=new St({});else if(e==="group")t=new nt;else{if(e==="compoundPath")throw new Error('"compoundPath" is not supported yet.');var o=Nf(e);if(!o){var s="";It(s)}t=new o}return Ge(t).customGraphicType=e,t.name=a.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function il(a,e,t,r,n,i,o){kp(e);var s=n&&n.normal.cfg;s&&e.setTextConfig(s),r&&r.transition==null&&(r.transition=vw);var l=r&&r.style;if(l){if(e.type==="text"){var u=l;Z(u,"textFill")&&(u.fill=u.textFill),Z(u,"textStroke")&&(u.stroke=u.textStroke)}var v=void 0,c=Zo(e)?l.decal:null;a&&c&&(c.dirty=!0,v=cs(c,a)),l.__decalPattern=v}if(Xo(e)&&l){var v=l.__decalPattern;v&&(l.decal=v)}ln(e,r,i,{dataIndex:t,isInit:o,clearStyle:!0}),Mn(e,r.keyframeAnimation,i)}function Vp(a,e,t,r,n){var i=e.isGroup?null:e,o=n&&n[a].cfg;if(i){var s=i.ensureState(a);if(r===!1){var l=i.getState(a);l&&(l.style=null)}else s.style=r||null;o&&(s.textConfig=o),Br(i)}}function dw(a,e,t){if(!a.isGroup){var r=a,n=t.currentZ,i=t.currentZLevel;r.z=n,r.zlevel=i;var o=e.z2;o!=null&&(r.z2=o||0);for(var s=0;s<er.length;s++)gw(r,e,er[s])}}function gw(a,e,t){var r=t===Ke,n=r?e:Pn(e,t),i=n?n.z2:null,o;i!=null&&(o=r?a:a.ensureState(t),o.z2=i||0)}function Wv(a,e,t,r){var n=a.get("renderItem"),i=a.coordinateSystem,o={};i&&(o=i.prepareCustoms?i.prepareCustoms(i):fw[i.type](i));for(var s=ot({getWidth:r.getWidth,getHeight:r.getHeight,getZr:r.getZr,getDevicePixelRatio:r.getDevicePixelRatio,value:x,style:_,ordinalRawValue:b,styleEmphasis:w,visual:C,barLayout:L,currentSeriesIndices:M,font:I},o.api||{}),l={context:{},seriesId:a.id,seriesName:a.name,seriesIndex:a.seriesIndex,coordSys:o.coordSys,dataInsideLength:e.count(),encode:yw(a.getData())},u,v,c={},f={},h={},p={},d=0;d<er.length;d++){var g=er[d];h[g]=a.getModel(ro[g]),p[g]=a.getModel(ao[g])}function y(P){return P===u?v||(v=e.getItemModel(P)):e.getItemModel(P)}function S(P,E){return e.hasItemOption?P===u?c[E]||(c[E]=y(P).getModel(ro[E])):y(P).getModel(ro[E]):h[E]}function m(P,E){return e.hasItemOption?P===u?f[E]||(f[E]=y(P).getModel(ao[E])):y(P).getModel(ao[E]):p[E]}return function(P,E){return u=P,v=null,c={},f={},n&&n(ot({dataIndexInside:P,dataIndex:e.getRawIndex(P),actionType:E?E.type:null},l),s)};function x(P,E){return E==null&&(E=u),e.getStore().get(e.getDimensionIndex(P||0),E)}function b(P,E){E==null&&(E=u),P=P||0;var R=e.getDimensionInfo(P);if(!R){var k=e.getDimensionIndex(P);return k>=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<er.length;v++){var c=er[v];if(c!==Ke){var f=Pn(r,c),h=sl(r,f,c);Vp(c,u,f,h,pe)}}return dw(u,r,n),r.type==="group"&&xw(a,u,t,r,n),o>=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<er.length;f++){var h=er[f];if(h!==Ke){var p=i[h].conOpt;Vp(h,v,p,sl(o,p,h),null)}}c?v.dirty():v.markRedraw()}}}}function Uv(a,e,t){var r=e?Pn(a,e):a,n=e?sl(a,r,Oe):a.style,i=a.type,o=r?r.textConfig:null,s=a.textContent,l=s?e?Pn(s,e):s:null;if(n&&(t.isLegacy||Ip(n,i,!!o,!!l))){t.isLegacy=!0;var u=Mp(n,i,!e);!o&&u.textConfig&&(o=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var v=l;!v.type&&(v.type="text")}var c=e?t[e]:t.normal;c.cfg=o,c.conOpt=l}function Pn(a,e){return e?a?a[e]:null:a}function sl(a,e,t){var r=e&&e.style;return r==null&&t===Oe&&a&&(r=a.styleEmphasis),r}function xw(a,e,t,r,n){var i=r.children,o=i?i.length:0,s=r.$mergeChildren,l=s==="byName"||r.diffChildrenByName,u=s===!1;if(!(!o&&!l&&!u)){if(l){_w({api:a,oldChildren:e.children()||[],newChildren:i||[],dataIndex:t,seriesModel:n,group:e});return}u&&e.removeAll();for(var v=0;v<o;v++){var c=i[v],f=e.childAt(v);c?(c.ignore==null&&(c.ignore=!1),ol(a,f,t,c,n,e)):f.ignore=!0}for(var h=e.childCount()-1;h>=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=u<o?1:-1;u<o||u>s;)u+=v*360;return[l,u]},a.prototype.coordToPoint=function(e){var t=e[0],r=e[1]/180*Math.PI,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;c<n.length;c++)for(var f=0;f<n[c].length;f++)v.push(new _e({shape:Ja(t,[u,u+l],n[c][f].coord)}));a.add(be(v,{style:ot(s.getModel("lineStyle").getLineStyle(),ot(o.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(a,e,t,r,n,i,o){var s=e.getCategories(!0),l=e.getModel("axisLabel"),u=l.get("margin"),v=e.get("triggerEvent");D(o,function(c,f){var h=l,p=c.tickValue,d=i[Qa(t)],g=t.coordToPoint([d+u,c.coord]),y=t.cx,S=t.cy,m=Math.abs(g[0]-y)/d<.3?"center":g[0]>y?"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<r.length;c++){var f=u++%l.length;v[f]=v[f]||[],v[f].push(new _e({shape:Ja(t,i,r[c].coord)}))}for(var c=0;c<v.length;c++)a.add(be(v[c],{style:ot({stroke:l[c%l.length]},s.getLineStyle()),silent:!0,z:e.get("z")}))},minorSplitLine:function(a,e,t,r,n,i){if(n.length){for(var o=e.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=[],u=0;u<n.length;u++)for(var v=0;v<n[u].length;v++)l.push(new _e({shape:Ja(t,i,n[u][v].coord)}));a.add(be(l,{style:s.getLineStyle(),silent:!0,z:e.get("z")}))}},splitArea:function(a,e,t,r,n,i){if(r.length){var o=e.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var v=[],c=Math.PI/180,f=-r[0].coord*c,h=Math.min(i[0],i[1]),p=Math.max(i[0],i[1]),d=e.get("clockwise"),g=1,y=r.length;g<=y;g++){var S=g===y?r[0].coord:r[g].coord,m=u++%l.length;v[m]=v[m]||[],v[m].push(new Be({shape:{cx:t.cx,cy:t.cy,r0:h,r:p,startAngle:f,endAngle:-S*c,clockwise:d},silent:!0})),f=-S*c}for(var g=0;g<v.length;g++)a.add(be(v[g],{style:ot({fill:l[g%l.length]},s.getAreaStyle()),silent:!0}))}}},Fw=["axisLine","axisTickLabel","axisName"],Hw=["splitLine","splitArea","minorSplitLine"],Ww=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=this._axisGroup,i=this._axisGroup=new nt;this.group.add(i);var o=t.axis,s=o.polar,l=s.getAngleAxis(),u=o.getTicksCoords(),v=o.getMinorTicksCoords(),c=l.getExtent()[0],f=o.getExtent(),h=$w(s,t,c),p=new mr(t,h);D(Fw,p.add,p),i.add(p.getGroup()),ms(n,i,t),D(Hw,function(d){t.get([d,"show"])&&!o.scale.isBlank()&&Uw[d](this.group,t,s,c,f,u,v)},this)}},e.type="radiusAxis",e}(Va),Uw={splitLine:function(a,e,t,r,n,i){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0,v=t.getAngleAxis(),c=Math.PI/180,f=v.getExtent(),h=Math.abs(f[1]-f[0])===360?"Circle":"Arc";l=l instanceof Array?l:[l];for(var p=[],d=0;d<i.length;d++){var g=u++%l.length;p[g]=p[g]||[],p[g].push(new Yr[h]({shape:{cx:t.cx,cy:t.cy,r:Math.max(i[d].coord,0),startAngle:-f[0]*c,endAngle:-f[1]*c,clockwise:v.inverse}}))}for(var d=0;d<p.length;d++)a.add(be(p[d],{style:ot({stroke:l[d%l.length],fill:null},s.getLineStyle()),silent:!0}))},minorSplitLine:function(a,e,t,r,n,i,o){if(o.length){for(var s=e.getModel("minorSplitLine"),l=s.getModel("lineStyle"),u=[],v=0;v<o.length;v++)for(var c=0;c<o[v].length;c++)u.push(new Ma({shape:{cx:t.cx,cy:t.cy,r:o[v][c].coord}}));a.add(be(u,{style:ot({fill:null},l.getLineStyle()),silent:!0}))}},splitArea:function(a,e,t,r,n,i){if(i.length){var o=e.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var v=[],c=i[0].coord,f=1;f<i.length;f++){var h=u++%l.length;v[h]=v[h]||[],v[h].push(new Be({shape:{cx:t.cx,cy:t.cy,r0:c,r:i[f].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),c=i[f].coord}for(var f=0;f<v.length;f++)a.add(be(v[f],{style:ot({fill:l[f%l.length]},s.getAreaStyle()),silent:!0}))}}};function $w(a,e,t){return{position:[a.cx,a.cy],rotation:t/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}function Op(a){return a.get("stack")||"__ec_stack_"+a.seriesIndex}function Bp(a,e){return e.dim+a.model.componentIndex}function Yw(a,e,t){var r={},n=Zw(Gt(e.getSeriesByType(a),function(i){return!e.isSeriesFiltered(i)&&i.coordinateSystem&&i.coordinateSystem.type==="polar"}));e.eachSeriesByType(a,function(i){if(i.coordinateSystem.type==="polar"){var o=i.getData(),s=i.coordinateSystem,l=s.getBaseAxis(),u=Bp(s,l),v=Op(i),c=n[u][v],f=c.offset,h=c.width,p=s.getOtherAxis(l),d=i.coordinateSystem.cx,g=i.coordinateSystem.cy,y=i.get("barMinHeight")||0,S=i.get("barMinAngle")||0;r[v]=r[v]||[];for(var m=o.mapDimension(p.dim),x=o.mapDimension(l.dim),b=Ff(o,m),_=l.dim!=="radius"||!i.get("roundCap",!0),w=p.model,A=w.get("startValue"),T=p.dataToCoord(A||0),C=0,L=o.count();C<L;C++){var M=o.get(m,C),I=o.get(x,C),P=M>=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)<y&&(H=(H<0?-1:1)*y),R=E,k=E+H,N=X-f,F=N-h,b&&(r[v][I][P]=k)}else{var j=p.dataToCoord(M,_)-T,rt=l.dataToCoord(I);Math.abs(j)<S&&(j=(j<0?-1:1)*S),R=rt+f,k=R+h,N=E,F=E+j,b&&(r[v][I][P]=F)}o.setItemLayout(C,{cx:d,cy:g,r0:R,r:k,startAngle:-N*Math.PI/180,endAngle:-F*Math.PI/180,clockwise:N>=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<c&&(y=Math.min(y,u),d.width&&(y=Math.min(y,d.width)),u-=y,d.width=y,v--)}),c=(u-s)/(v+(v-1)*l),c=Math.max(c,0);var f=0,h;D(i,function(d,g){d.width||(d.width=c),h=d,f+=d.width*(1+l)}),h&&(f-=h.width*l);var p=-f/2;D(i,function(d,g){t[n][g]=t[n][g]||{offset:p,width:d.width},p+=d.width*(1+l)})}),t}var Xw={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},qw={splitNumber:5},Kw=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="polar",e}(te);function jw(a){it(xs),Va.registerAxisPointerClass("PolarAxisPointer",Cw),a.registerCoordinateSystem("polar",zw),a.registerComponentModel(Iw),a.registerComponentView(Kw),yn(a,"angle",Mw,Xw),yn(a,"radius",Pw,qw),a.registerComponentView(Ow),a.registerComponentView(Ww),a.registerLayout(st(Yw,"bar"))}function qo(a,e){e=e||{};var t=a.coordinateSystem,r=a.axis,n={},i=r.position,o=r.orient,s=t.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};n.position=[o==="vertical"?u.vertical[i]:l[0],o==="horizontal"?u.horizontal[i]:l[3]];var v={horizontal:0,vertical:1};n.rotation=Math.PI/2*v[o];var c={top:-1,bottom:1,right:1,left:-1};n.labelDirection=n.tickDirection=n.nameDirection=c[i],a.get(["axisTick","inside"])&&(n.tickDirection=-n.tickDirection),se(e.labelInside,a.get(["axisLabel","inside"]))&&(n.labelDirection=-n.labelDirection);var f=e.rotate;return f==null&&(f=a.get(["axisLabel","rotate"])),n.labelRotation=i==="top"?-f:f,n.z2=1,n}var Jw=["axisLine","axisTickLabel","axisName"],Qw=["splitArea","splitLine"],tA=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="SingleAxisPointer",t}return e.prototype.render=function(t,r,n,i){var o=this.group;o.removeAll();var s=this._axisGroup;this._axisGroup=new nt;var l=qo(t),u=new mr(t,l);D(Jw,u.add,u),o.add(this._axisGroup),o.add(u.getGroup()),D(Qw,function(v){t.get([v,"show"])&&eA[v](this,this.group,this._axisGroup,t)},this),ms(s,this._axisGroup,t),a.prototype.render.call(this,t,r,n,i)},e.prototype.remove=function(){ay(this)},e.type="singleAxis",e}(Va),eA={splitLine:function(a,e,t,r){var n=r.axis;if(!n.scale.isBlank()){var i=r.getModel("splitLine"),o=i.getModel("lineStyle"),s=o.get("color");s=s instanceof Array?s:[s];for(var l=o.get("width"),u=r.coordinateSystem.getRect(),v=n.isHorizontal(),c=[],f=0,h=n.getTicksCoords({tickModel:i}),p=[],d=[],g=0;g<h.length;++g){var y=n.toGlobalCoord(h[g].coord);v?(p[0]=y,p[1]=u.y,d[0]=y,d[1]=u.y+u.height):(p[0]=u.x,p[1]=y,d[0]=u.x+u.width,d[1]=y);var S=new _e({shape:{x1:p[0],y1:p[1],x2:d[0],y2:d[1]},silent:!0});iy(S.shape,l);var m=f++%s.length;c[m]=c[m]||[],c[m].push(S)}for(var x=o.getLineStyle(["color"]),g=0;g<c.length;++g)e.add(be(c[g],{style:ot({stroke:s[g%s.length]},x),silent:!0}))}},splitArea:function(a,e,t,r){ny(a,t,r,r)}},un=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.getCoordSysModel=function(){return this},e.type="singleAxis",e.layoutMode="box",e.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}},e}(Xt);Ce(un,$n.prototype);var rA=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.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.pointToData=function(t,r){return this.coordinateSystem.pointToData(t)[0]},e}(ke),Fp=["single"],aA=function(){function a(e,t,r){this.type="single",this.dimension="single",this.dimensions=Fp,this.axisPointerEnabled=!0,this.model=e,this._init(e,t,r)}return a.prototype._init=function(e,t,r){var n=this.dimension,i=new rA(n,gs(e),[0,0],e.get("type"),e.get("position")),o=i.type==="category";i.onBand=o&&e.get("boundaryGap"),i.inverse=e.get("inverse"),i.orient=e.get("orient"),e.axis=i,i.model=e,i.coordinateSystem=this,this._axis=i},a.prototype.update=function(e,t){e.eachSeries(function(r){if(r.coordinateSystem===this){var n=r.getData();D(n.mapDimensionsAll(this.dimension),function(i){this._axis.scale.unionExtentFromData(n,i)},this),gn(this._axis.scale,this._axis.model)}},this)},a.prototype.resize=function(e,t){this._rect=fe({left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")},{width:t.getWidth(),height:t.getHeight()}),this._adjustAxis()},a.prototype.getRect=function(){return this._rect},a.prototype._adjustAxis=function(){var e=this._rect,t=this._axis,r=t.isHorizontal(),n=r?[0,e.width]:[0,e.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),this._updateAxisTransform(t,r?e.x:e.y)},a.prototype._updateAxisTransform=function(e,t){var r=e.getExtent(),n=r[0]+r[1],i=e.isHorizontal();e.toGlobalCoord=i?function(o){return o+t}:function(o){return n-o+t},e.toLocalCoord=i?function(o){return o-t}:function(o){return n-o+t}},a.prototype.getAxis=function(){return this._axis},a.prototype.getBaseAxis=function(){return this._axis},a.prototype.getAxes=function(){return[this._axis]},a.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},a.prototype.containPoint=function(e){var t=this.getRect(),r=this.getAxis(),n=r.orient;return n==="horizontal"?r.contain(r.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:r.contain(r.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},a.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},a.prototype.dataToPoint=function(e){var t=this.getAxis(),r=this.getRect(),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<c[f].length-1;g++){var y=c[f][g].slice(),S=this._firstDayOfMonth[g];if(p){var m=this._firstDayPoints[g];y[h]=(m[h]+c[0][g+1][h])/2}var x=o.get("formatter"),b=s[+S.m-1],_={yyyy:S.y,yy:(S.y+"").slice(2),MM:S.m,M:+S.m,nameMap:b},w=this._formatterLabel(x,_),A=new St({z2:30,style:K(At(o,{text:w}),this._monthTextPositionControl(y,p,n,u,l)),silent:d});i.add(A)}}},e.prototype._weekTextPositionControl=function(t,r,n,i,o){var s="center",l="middle",u=t[0],v=t[1],c=n==="start";return r==="horizontal"?(u=u+i+(c?1:-1)*o[0]/2,s=c?"right":"left"):(v=v+i+(c?1:-1)*o[1]/2,l=c?"bottom":"top"),{x:u,y:v,align:s,verticalAlign:l}},e.prototype._renderWeekText=function(t,r,n,i,o){var s=t.getModel("dayLabel");if(s.get("show")){var l=t.coordinateSystem,u=s.get("position"),v=s.get("nameMap"),c=s.get("margin"),f=l.getFirstDayOfWeek();if(!v||lt(v)){v&&(r=Ol(v)||r);var h=r.get(["time","dayOfWeekShort"]);v=h||$(r.get(["time","dayOfWeekAbbr"]),function(_){return _[0]})}var p=l.getNextNDay(n.end.time,7-n.lweek).time,d=[l.getCellWidth(),l.getCellHeight()];c=U(c,Math.min(d[1],d[0])),u==="start"&&(p=l.getNextNDay(n.start.time,-(7+n.fweek)).time,c=-c);for(var g=s.get("silent"),y=0;y<7;y++){var S=l.getNextNDay(p,y),m=l.dataToRect([S.time],!1).center,x=y;x=Math.abs((y+f)%7);var b=new St({z2:30,style:K(At(s,{text:v[x]}),this._weekTextPositionControl(m,i,u,c,d)),silent:g});o.add(b)}}},e.type="calendar",e}(te),oo=864e5,hA=function(){function a(e,t,r){this.type="calendar",this.dimensions=a.dimensions,this.getDimensionsInfo=a.getDimensionsInfo,this._model=e}return a.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},a.prototype.getRangeInfo=function(){return this._rangeInfo},a.prototype.getModel=function(){return this._model},a.prototype.getRect=function(){return this._rect},a.prototype.getCellWidth=function(){return this._sw},a.prototype.getCellHeight=function(){return this._sh},a.prototype.getOrient=function(){return this._orient},a.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},a.prototype.getDateInfo=function(e){e=fy(e);var t=e.getFullYear(),r=e.getMonth()+1,n=r<10?"0"+r:""+r,i=e.getDate(),o=i<10?"0"+i:""+i,s=e.getDay();return s=Math.abs((s+7-this.getFirstDayOfWeek())%7),{y:t+"",m:n,d:o,day:s,time:e.getTime(),formatedDate:t+"-"+n+"-"+o,date:e}},a.prototype.getNextNDay=function(e,t){return t=t||0,t===0?this.getDateInfo(e):(e=new Date(this.getDateInfo(e).time),e.setDate(e.getDate()+t),this.getDateInfo(e))},a.prototype.update=function(e,t){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var r=this._rangeInfo.weeks||1,n=["width","height"],i=this._model.getCellSize().slice(),o=this._model.getBoxLayoutParams(),s=this._orient==="horizontal"?[r,7]:[7,r];D([0,1],function(c){v(i,c)&&(o[n[c]]=i[c]*s[c])});var l={width:t.getWidth(),height:t.getHeight()},u=this._rect=fe(o,l);D([0,1],function(c){v(i,c)||(i[c]=u[n[c]]/s[c])});function v(c,f){return c[f]!=null&&c[f]!=="auto"}this._sw=i[0],this._sh=i[1]},a.prototype.dataToPoint=function(e,t){q(e)&&(e=e[0]),t==null&&(t=!0);var r=this.getDateInfo(e),n=this._rangeInfo,i=r.formatedDate;if(t&&!(r.time>=n.start.time&&r.time<n.end.time+oo))return[NaN,NaN];var o=r.day,s=this._getRangeInfo([n.start.time,i]).nthWeek;return this._orient==="vertical"?[this._rect.x+o*this._sw+this._sw/2,this._rect.y+s*this._sh+this._sh/2]:[this._rect.x+s*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]},a.prototype.pointToData=function(e){var t=this.pointToDate(e);return t&&t.time},a.prototype.dataToRect=function(e,t){var r=this.dataToPoint(e,t);return{contentShape:{x:r[0]-(this._sw-this._lineWidth)/2,y:r[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:r,tl:[r[0]-this._sw/2,r[1]-this._sh/2],tr:[r[0]+this._sw/2,r[1]-this._sh/2],br:[r[0]+this._sw/2,r[1]+this._sh/2],bl:[r[0]-this._sw/2,r[1]+this._sh/2]}},a.prototype.pointToDate=function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,r=Math.floor((e[1]-this._rect.y)/this._sh)+1,n=this._rangeInfo.range;return this._orient==="vertical"?this._getDateByWeeksAndDay(r,t-1,n):this._getDateByWeeksAndDay(t,r-1,n)},a.prototype.convertToPixel=function(e,t,r){var n=Qv(t);return n===this?n.dataToPoint(r):null},a.prototype.convertFromPixel=function(e,t,r){var n=Qv(t);return n===this?n.pointToData(r):null},a.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},a.prototype._initRangeOption=function(){var e=this._model.get("range"),t;if(q(e)&&e.length===1&&(e=e[0]),q(e))t=e;else{var r=e.toString();if(/^\d{4}$/.test(r)&&(t=[r+"-01-01",r+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(r)){var n=this.getDateInfo(r),i=n.date;i.setMonth(i.getMonth()+1);var o=this.getNextNDay(i,-1);t=[n.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(r)&&(t=[r,r])}if(!t)return e;var s=this._getRangeInfo(t);return s.start.time>s.end.time&&t.reverse(),t},a.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],r;t[0].time>t[1].time&&(r=!0,t.reverse());var 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&&t<n.fweek||e===n.weeks&&t>n.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<r.length;n++){var i=r[n];a[i]==null&&e[i]!=null&&(a[i]=e[i])}}function mA(a,e){if(a&&(a.hv=e.hv=[tc(e,["left","right"]),tc(e,["top","bottom"])],a.type==="group")){var t=a,r=e;t.width==null&&(t.width=r.width=0),t.height==null&&(t.height=r.height=0)}}var SA=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.preventAutoZ=!0,t}return e.prototype.mergeOption=function(t,r){var n=this.option.elements;this.option.elements=null,a.prototype.mergeOption.call(this,t,r),this.option.elements=n},e.prototype.optionUpdated=function(t,r){var n=this.option,i=(r?n:t).elements,o=n.elements=r?[]:n.elements,s=[];this._flatten(i,s,null);var l=hy(o,s,"normalMerge"),u=this._elOptionsToUpdate=[];D(l,function(v,c){var f=v.newOption;f&&(u.push(f),dA(v,f),gA(o,c,f),mA(o[c],f))},this),n.elements=Gt(o,function(v){return v&&delete v.$action,v!=null})},e.prototype._flatten=function(t,r,n){D(t,function(i){if(i){n&&(i.parentOption=n),r.push(i);var o=i.children;o&&o.length&&this._flatten(o,r,i),delete i.children}},this)},e.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},e.type="graphic",e.defaultOption={elements:[]},e}(Xt),ec={path:null,compoundPath:null,group:nt,image:Re,text:St},de=Dt(),xA=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._elMap=ut()},e.prototype.render=function(t,r,n){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,n)},e.prototype._updateElements=function(t){var r=t.useElOptionsToUpdate();if(r){var n=this._elMap,i=this.group,o=t.get("z"),s=t.get("zlevel");D(r,function(l){var u=ze(l.id,null),v=u!=null?n.get(u):null,c=ze(l.parentId,null),f=c!=null?n.get(c):i,h=l.type,p=l.style;h==="text"&&p&&l.hv&&l.hv[1]&&(p.textVerticalAlign=p.textBaseline=p.verticalAlign=p.align=null);var d=l.textContent,g=l.textConfig;if(p&&Ip(p,h,!!g,!!d)){var y=Mp(p,h,!0);!g&&y.textConfig&&(g=l.textConfig=y.textConfig),!d&&y.textContent&&(d=y.textContent)}var S=bA(l),m=l.$action||"merge",x=m==="merge",b=m==="replace";if(x){var _=!v,w=v;_?w=rc(u,f,l.type,n):(w&&(de(w).isNew=!1),kp(w)),w&&(ln(w,S,t,{isInit:_}),ac(w,l,o,s))}else if(b){vn(v,l,n,t);var A=rc(u,f,l.type,n);A&&(ln(A,S,t,{isInit:!0}),ac(A,l,o,s))}else m==="remove"&&(Ep(v,l),vn(v,l,n,t));var T=n.get(u);if(T&&d)if(x){var C=T.getTextContent();C?C.attr(d):T.setTextContent(new St(d))}else b&&T.setTextContent(new St(d));if(T){var L=l.clipPath;if(L){var M=L.type,I=void 0,_=!1;if(x){var P=T.getClipPath();_=!P||de(P).type!==M,I=_?Ko(M):P}else b&&(_=!0,I=Ko(M));T.setClipPath(I),ln(I,L,t,{isInit:_}),Mn(I,L.keyframeAnimation,t)}var E=de(T);T.setTextConfig(g),E.option=l,_A(T,t,l),fs({el:T,componentModel:t,itemName:T.name,itemTooltipOption:l.tooltip}),Mn(T,l.keyframeAnimation,t)}})}},e.prototype._relocate=function(t,r){for(var n=t.option.elements,i=this.group,o=this._elMap,s=r.getWidth(),l=r.getHeight(),u=["x","y"],v=0;v<n.length;v++){var c=n[v],f=ze(c.id,null),h=f!=null?o.get(f):null;if(!(!h||!h.isGroup)){var p=h.parent,d=p===i,g=de(h),y=de(p);g.width=U(g.option.width,d?s:y.width)||0,g.height=U(g.option.height,d?l:y.height)||0}}for(var v=n.length-1;v>=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<u.length;w++){var A=u[w],T=m[A];b&&(gr(b)||Pt(b,A)>=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='<body style="margin:0;"><img src="'+l+'" style="max-width:100%;" title="'+(_&&_[0]||"")+'" /></body>',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<l[0].length;v++){for(var c=[],f=0;f<l.length;f++)c.push(l[f][v]);u.push(c.join(Wr))}e.push(u.join(`
`))}),e.join(`
`+si+`
`)}function VA(a){return $(a,function(e){var t=e.getRawData(),r=[e.name],n=[];return t.each(t.dimensions,function(){for(var i=arguments.length,o=arguments[i-1],s=t.getName(o),l=0;l<i-1;l++)n[l]=arguments[l];r.push((s?s+Wr:"")+n.join(Wr))}),r.join(`
`)}).join(`
`+si+`
`)}function NA(a){var e=RA(a);return{value:Gt([kA(e.seriesGroupByCategoryAxis),VA(e.other)],function(t){return!!t.replace(/[\n\t\s]/g,"")}).join(`
`+si+`
`),meta:e.meta}}function Rn(a){return a.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function zA(a){var e=a.slice(0,a.indexOf(`
`));if(e.indexOf(Wr)>=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<e.length;i++){var o=Rn(e[i]).split(jo);r.push(o.shift());for(var s=0;s<o.length;s++)n[s]&&(n[s].data[i]=o[s])}return{series:n,categories:r}}function OA(a){for(var e=a.split(/\n+/g),t=Rn(e.shift()),r=[],n=0;n<e.length;n++){var i=Rn(e[n]);if(i){var o=i.split(jo),s="",l=void 0,u=!1;isNaN(o[0])?(u=!0,s=o[0],o=o.slice(1),r[n]={name:s,value:[]},l=r[n].value):l=r[n]=[];for(var v=0;v<o.length;v++)l.push(+o[v]);l.length===1&&(u?r[n].value=l[0]:r[n]=l[0])}}return{name:t,data:r}}function BA(a,e){var t=a.split(new RegExp(`
*`+si+`
*`,"g")),r={series:[]};return D(t,function(n,i){if(zA(n)){var o=GA(n),s=e[i],l=s.axisDim+"Axis";s&&(r[l]=r[l]||[],r[l][s.axisIndex]={data:o.categories},r.series=r.series.concat(o.series))}else{var o=OA(n);r.series.push(o)}}),r}var FA=function(a){V(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.onclick=function(t,r){setTimeout(function(){r.dispatchAction({type:"hideTip"})});var n=r.getDom(),i=this.model;this._dom&&n.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",o.style.backgroundColor=i.get("backgroundColor")||"#fff";var s=document.createElement("h4"),l=i.get("lang")||[];s.innerHTML=l[0]||i.get("title"),s.style.cssText="margin:10px 20px",s.style.color=i.get("textColor");var u=document.createElement("div"),v=document.createElement("textarea");u.style.cssText="overflow:auto";var c=i.get("optionToContent"),f=i.get("contentToOption"),h=NA(t);if(gt(c)){var p=c(r.getOption());lt(p)?u.innerHTML=p:by(p)&&u.appendChild(p)}else{v.readOnly=i.get("readOnly");var d=v.style;d.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",d.color=i.get("textColor"),d.borderColor=i.get("textareaBorderColor"),d.backgroundColor=i.get("textareaColor"),v.value=h.value,u.appendChild(v)}var g=h.meta,y=document.createElement("div");y.style.cssText="position:absolute;bottom:5px;left:0;right:0";var S="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",m=document.createElement("div"),x=document.createElement("div");S+=";background-color:"+i.get("buttonColor"),S+=";color:"+i.get("buttonTextColor");var b=this;function _(){n.removeChild(o),b._dom=null}Bl(m,"click",_),Bl(x,"click",function(){if(f==null&&c!=null||f!=null&&c==null){_();return}var w;try{gt(f)?w=f(u,r.getOption()):w=BA(v.value,g)}catch(A){throw _(),new Error("Data view format error "+A)}w&&r.dispatchAction({type:"changeDataView",newOption:w}),_()}),m.innerHTML=l[1],x.innerHTML=l[2],x.style.cssText=m.style.cssText=S,!i.get("readOnly")&&y.appendChild(x),y.appendChild(m),o.appendChild(s),o.appendChild(u),o.appendChild(y),u.style.height=n.clientHeight-80+"px",n.appendChild(o),this._dom=o},e.prototype.remove=function(t,r){this._dom&&r.getDom().removeChild(this._dom)},e.prototype.dispose=function(t,r){this.remove(t,r)},e.getDefaultOption=function(t){var r={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:t.getLocaleModel().get(["toolbox","dataView","title"]),lang:t.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"};return r},e}(ge);function HA(a,e){return $(a,function(t,r){var n=e&&e[r];if(Zt(n)&&!q(n)){var i=Zt(t)&&!q(t);i||(t={value:t});var o=n.name!=null&&t.name==null;return t=ot(t,n),o&&delete t.name,t}else return t})}bs({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(a,e){var t=[];D(a.newOption.series,function(r){var n=e.getSeriesByName(r.name)[0];if(!n)t.push(K({type:"scatter"},r));else{var i=n.get("data");t.push({name:r.name,data:HA(r.data,i)})}}),e.mergeOption(ot({series:t},a.newOption))});var $p=D,Yp=Dt();function WA(a,e){var t=cl(a);$p(e,function(r,n){for(var i=t.length-1;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;i<r.length;i++){var o=r[i],s=e.panelId;if(s){if(o.panelId===s)return o}else for(var l=0;l<sc.length;l++)if(sc[l](n,o))return o}return!0},a}();function Jo(a){return a[0]>a[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;y<S;y++){var m=g[y];d[m]&&d[m].applyVisual(c,l,u)}}}function sT(a,e,t,r){var n={};return D(a,function(i){var o=Ot.prepareVisualTypes(e[i]);n[i]=o}),{progress:function(o,s){var l;r!=null&&(l=s.getDimensionIndex(r));function u(b){return Yf(s,c,b)}function v(b,_){Zf(s,c,b,_)}for(var c,f=s.getStore();(c=o.next())!=null;){var h=s.getRawDataItem(c);if(!(h&&h.visualMap===!1))for(var p=r!=null?f.get(l,c):c,d=t(p),g=e[d],y=n[d],S=0,m=y.length;S<m;S++){var x=y[S];g[x]&&g[x].applyVisual(p,u,v)}}}}}function lT(a){var e=a.brushType,t={point:function(r){return dc[e].point(r,t,a)},rect:function(r){return dc[e].rect(r,t,a)}};return t}var dc={lineX:gc(0),lineY:gc(1),rect:{point:function(a,e,t){return a&&t.boundingRect.contain(a[0],a[1])},rect:function(a,e,t){return a&&t.boundingRect.intersect(a)}},polygon:{point:function(a,e,t){return a&&t.boundingRect.contain(a[0],a[1])&&fr(t.range,a[0],a[1])},rect:function(a,e,t){var r=t.range;if(!a||r.length<=1)return!1;var n=a.x,i=a.y,o=a.width,s=a.height,l=r[0];if(fr(r,n,i)||fr(r,n+o,i)||fr(r,n,i+s)||fr(r,n+o,i+s)||Tt.create(a).contain(l[0],l[1])||Ba(n,i,n+o,i,r)||Ba(n,i,n,i+s,r)||Ba(n+o,i,n+o,i+s,r)||Ba(n,i+s,n+o,i+s,r))return!0}}};function gc(a){var e=["x","y"],t=["width","height"];return{point:function(r,n,i){if(r){var o=i.range,s=r[a];return ea(s,o)}},rect:function(r,n,i){if(r){var o=i.range,s=[r[e[a]],r[e[a]]+r[t[a]]];return s[1]<s[0]&&s.reverse(),ea(s[0],o)||ea(s[1],o)||ea(o[0],s)||ea(o[1],s)}}}}function ea(a,e){return e[0]<=a&&a<=e[1]}var yc=["inBrush","outOfBrush"],lo="__ecBrushSelect",es="__ecInBrushSelectEvent";function Xp(a){a.eachComponent({mainType:"brush"},function(e){var t=e.brushTargetManager=new fl(e.option,a);t.setInputRanges(e.areas,a)})}function uT(a,e,t){var r=[],n,i;a.eachComponent({mainType:"brush"},function(o){t&&t.type==="takeGlobalCursor"&&o.setBrushOption(t.key==="brush"?t.brushOption:{brushType:!1})}),Xp(a),a.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:pt(o.areas),selected:[]};r.push(l);var u=o.option,v=u.brushLink,c=[],f=[],h=[],p=!1;s||(n=u.throttleType,i=u.throttleDelay);var d=$(o.areas,function(b){var _=hT[b.brushType],w=ot({boundingRect:_?_(b):void 0},b);return w.selectors=lT(w),w}),g=ts(o.option,yc,function(b){b.mappingMethod="fixed"});q(v)&&D(v,function(b){c[b]=1});function y(b){return v==="all"||!!c[b]}function S(b){return!!b.length}a.eachSeries(function(b,_){var w=h[_]=[];b.subType==="parallel"?m(b,_):x(b,_,w)});function m(b,_){var w=b.coordinateSystem;p=p||w.hasAxisBrushed(),y(_)&&w.eachActiveState(b.getData(),function(A,T){A==="active"&&(f[T]=1)})}function x(b,_,w){if(!(!b.brushSelector||fT(o,_))&&(D(d,function(T){o.brushTargetManager.controlSeries(T,b,a)&&w.push(T),p=p||S(w)}),y(_)&&S(w))){var A=b.getData();A.each(function(T){mc(b,w,A,T)&&(f[T]=1)})}}a.eachSeries(function(b,_){var w={seriesId:b.id,seriesIndex:_,seriesName:b.name,dataIndex:[]};l.selected.push(w);var A=h[_],T=b.getData(),C=y(_)?function(L){return f[L]?(w.dataIndex.push(T.getRawIndex(L)),"inBrush"):"outOfBrush"}:function(L){return mc(b,A,T,L)?(w.dataIndex.push(T.getRawIndex(L)),"inBrush"):"outOfBrush"};(y(_)?p:S(A))&&oT(yc,g,T,C)})}),vT(e,n,i,r,t)}function vT(a,e,t,r,n){if(n){var i=a.getZr();if(!i[es]){i[lo]||(i[lo]=cT);var o=Pf(i,lo,t,e);o(a,r)}}}function cT(a,e){if(!a.isDisposed()){var t=a.getZr();t[es]=!0,a.dispatchAction({type:"brushSelect",batch:e}),t[es]=!1}}function mc(a,e,t,r){for(var n=0,i=e.length;n<i;n++){var o=e[n];if(a.brushSelector(r,t,o.selectors,o))return!0}}function fT(a,e){var t=a.option.seriesIndex;return t!=null&&t!=="all"&&(q(t)?Pt(t,e)<0:e!==t)}var hT={rect:function(a){return Sc(a.range)},polygon:function(a){for(var e,t=a.range,r=0,n=t.length;r<n;r++){e=e||[[1/0,-1/0],[1/0,-1/0]];var i=t[r];i[0]<e[0][0]&&(e[0][0]=i[0]),i[0]>e[0][1]&&(e[0][1]=i[0]),i[1]<e[1][0]&&(e[1][0]=i[1]),i[1]>e[1][1]&&(e[1][1]=i[1])}return e&&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<r.getHeight()/2?"-":"+":o.x+o.width/2<r.getWidth()/2?"+":"-":lt(n)?s={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[i][n]:s=n;var l={horizontal:"center",vertical:s>=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<o[0]&&(n=o[0]),this._currentPointer.x=n,this._currentPointer.markRedraw();var s=this._progressLine;s&&(s.shape.x2=n,s.dirty());var l=this._findNearestTick(n),u=this.model;(r||l!==u.getCurrentIndex()&&u.get("realtime"))&&this._changeTimeline(l)},e.prototype._doPlayStop=function(){var t=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var r=t.model;t._changeTimeline(r.getCurrentIndex()+(r.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},e.prototype._toAxisCoord=function(t){var r=this._mainGroup.getLocalTransform();return Gr(t,r,!0)},e.prototype._findNearestTick=function(t){var r=this.model.getData(),n=1/0,i,o=this._axis;return r.each(["value"],function(s,l){var u=o.dataToCoord(s),v=Math.abs(u-t);v<n&&(n=v,i=l)}),i},e.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},e.prototype._changeTimeline=function(t){var r=this.model.getCurrentIndex();t==="+"?t=r+1:t==="-"&&(t=r-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})},e.prototype._updateTicksStatus=function(){var t=this.model.getCurrentIndex(),r=this._tickSymbols,n=this._tickLabels;if(r)for(var i=0;i<r.length;i++)r&&r[i]&&r[i].toggleState("progress",i<t);if(n)for(var i=0;i<n.length;i++)n&&n[i]&&n[i].toggleState("progress",_c(n[i]).dataIndex<=t)},e.type="timeline.slider",e}(wT);function CT(a,e){if(e=e||a.get("type"),e)switch(e){case"category":return new Cy({ordinalMeta:a.getCategories(),extent:[1/0,-1/0]});case"time":return new Ty({locale:a.ecModel.getLocaleModel(),useUTC:a.ecModel.get("useUTC")});default:return new xo}}function DT(a,e){return fe(a.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},a.get("padding"))}function LT(a,e,t,r){var n=r.style,i=Wf(a.get(["controlStyle",e]),r||{},new Tt(t[0],t[1],t[2],t[3]));return n&&i.setStyle(n),i}function wc(a,e,t,r,n,i){var o=e.get("color");if(n)n.setColor(o),t.add(n),i&&i.onUpdate(n);else{var s=a.get("symbol");n=ve(s,-1,-1,2,2,o),n.setStyle("strokeNoScale",!0),t.add(n),i&&i.onCreate(n)}var l=e.getItemStyle(["color"]);n.setStyle(l),r=Ct({rectHover:!0,z2:100},r,!0);var u=Ia(a.get("symbolSize"));r.scaleX=u[0]/2,r.scaleY=u[1]/2;var v=Ra(a.get("symbolOffset"),u);v&&(r.x=(r.x||0)+v[0],r.y=(r.y||0)+v[1]);var c=a.get("symbolRotate");return r.rotation=(c||0)*Math.PI/180||0,n.attr(r),n.updateTransform(),n}function Ac(a,e,t,r,n,i){if(!a.dragging){var o=n.getModel("checkpointStyle"),s=r.dataToCoord(n.getData().get("value",t));if(i||!o.get("animation",!0))a.attr({x:s,y:0}),e&&e.attr({shape:{x2:s}});else{var l={duration:o.get("animationDuration",!0),easing:o.get("animationEasing",!0)};a.stopAnimation(null,!0),a.animateTo({x:s,y:0},l),e&&e.animateTo({shape:{x2:s}},l)}}}function IT(a){a.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(e,t,r){var n=t.getComponent("timeline");return n&&e.currentIndex!=null&&(n.setCurrentIndex(e.currentIndex),!n.get("loop",!0)&&n.isIndexMax()&&n.getPlayState()&&(n.setPlayState(!1),r.dispatchAction({type:"timelinePlayChange",playState:!1,from:e.from}))),t.resetOption("timeline",{replaceMerge:n.get("replaceMerge",!0)}),ot({currentIndex:n.option.currentIndex},e)}),a.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(e,t){var r=t.getComponent("timeline");r&&e.playState!=null&&r.setPlayState(e.playState)})}function MT(a){var e=a&&a.timeline;q(e)||(e=e?[e]:[]),D(e,function(t){t&&PT(t)})}function PT(a){var e=a.type,t={number:"value",time:"time"};if(t[e]&&(a.axisType=t[e],delete a.type),Tc(a),pr(a,"controlPosition")){var r=a.controlStyle||(a.controlStyle={});pr(r,"position")||(r.position=a.controlPosition),r.position==="none"&&!pr(r,"show")&&(r.show=!1,delete r.position),delete a.controlPosition}D(a.data||[],function(n){Zt(n)&&!q(n)&&(!pr(n,"value")&&pr(n,"name")&&(n.value=n.name),Tc(n))})}function Tc(a){var e=a.itemStyle||(a.itemStyle={}),t=e.emphasis||(e.emphasis={}),r=a.label||a.label||{},n=r.normal||(r.normal={}),i={normal:1,emphasis:1};D(r,function(o,s){!i[s]&&!pr(n,s)&&(n[s]=o)}),t.label&&!pr(r,"emphasis")&&(r.emphasis=t.label,delete t.label)}function pr(a,e){return a.hasOwnProperty(e)}function ET(a){a.registerComponentModel(qp),a.registerComponentView(TT),a.registerSubTypeDefaulter("timeline",function(){return"slider"}),IT(a),a.registerPreprocessor(MT)}function pl(a,e){if(!a)return!1;for(var t=q(a)?a:[a],r=0;r<t.length;r++)if(t[r]&&t[r][e])return!0;return!1}function en(a){La(a,"label",["show"])}var rn=Dt(),We=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.createdBySelf=!1,t}return e.prototype.init=function(t,r,n){this.mergeDefaultAndTheme(t,n),this._mergeOption(t,n,!1,!0)},e.prototype.isAnimationEnabled=function(){if(Uf.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},e.prototype.mergeOption=function(t,r){this._mergeOption(t,r,!1,!1)},e.prototype._mergeOption=function(t,r,n,i){var o=this.mainType;n||r.eachSeries(function(s){var l=s.get(this.mainType,!0),u=rn(s)[o];if(!l||!l.data){rn(s)[o]=null;return}u?u._mergeOption(l,r,!0):(i&&en(l),D(l.data,function(v){v instanceof Array?(en(v[0]),en(v[1])):en(v)}),u=this.createMarkerModelFromSeries(l,this,r),K(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),rn(s)[o]=u},this)},e.prototype.formatTooltip=function(t,r,n){var i=this.getData(),o=this.getRawValue(t),s=i.getName(t);return ne("section",{header:this.name,blocks:[ne("nameValue",{name:s,value:o,noName:!s,noValue:o==null})]})},e.prototype.getData=function(){return this._data},e.prototype.setData=function(t){this._data=t},e.prototype.getDataParams=function(t,r){var n=_s.prototype.getDataParams.call(this,t,r),i=this.__hostSeries;return i&&(n.seriesId=i.id,n.seriesName=i.name,n.seriesType=i.subType),n},e.getMarkerModelFromSeries=function(t,r){return rn(t)[r]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e}(Xt);Ce(We,_s.prototype);var RT=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="markPoint",e.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},e}(We);function rs(a){return!(isNaN(parseFloat(a.x))&&isNaN(parseFloat(a.y)))}function kT(a){return!isNaN(parseFloat(a.x))&&!isNaN(parseFloat(a.y))}function an(a,e,t,r,n,i){var o=[],s=Ff(e,r),l=s?e.getCalculationInfo("stackResultDimension"):r,u=dl(e,l,a),v=e.indicesOfNearest(l,u)[0];o[n]=e.get(t,v),o[i]=e.get(l,v);var c=e.get(r,v),f=Dy(e.get(r,v));return f=Math.min(f,20),f>=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]<S[0]||y[0]>m[1]||y[1]<m[0]),b=!x;c.setItemLayout(f,{points:h,allClipped:b});var _=c.getItemModel(f).getModel("itemStyle").getItemStyle(),w=Qn(l,"color");_.fill||(_.fill=w,lt(_.fill)&&(_.fill=dn(_.fill,.4))),_.stroke||(_.stroke=w),c.setItemVisual(f,"style",_)}),c.diff(on(v).data).add(function(f){var h=c.getItemLayout(f);if(!h.allClipped){var p=new Ae({shape:{points:h.points}});c.setItemGraphicEl(f,p),v.group.add(p)}}).update(function(f,h){var p=on(v).data.getItemGraphicEl(h),d=c.getItemLayout(f);d.allClipped?p&&v.group.remove(p):(p?xt(p,{shape:{points:d.points}},r,f):p=new Ae({shape:{points:d.points}}),c.setItemGraphicEl(f,p),v.group.add(p))}).remove(function(f){var h=on(v).data.getItemGraphicEl(f);v.group.remove(h)}).execute(),c.eachItemGraphicEl(function(f,h){var p=c.getItemModel(h),d=c.getItemVisual(h,"style");f.useStyle(c.getItemVisual(h,"style")),ue(f,Qt(p),{labelFetcher:r,labelDataIndex:h,defaultText:c.getName(h)||"",inheritColor:lt(d.fill)?dn(d.fill,1):"#000"}),ae(f,p),Et(f,null,null,p.get(["emphasis","disabled"])),ht(f).dataModel=r}),on(v).data=c,v.group.silent=r.get("silent")||t.get("silent")},e.type="markArea",e}(gl);function KT(a,e,t){var r,n,i=["x0","y0","x1","y1"];if(a){var o=$(a&&a.dimensions,function(u){var v=e.getData(),c=v.getDimensionInfo(v.mapDimension(u))||{};return K(K({},c),{name:u,ordinalMeta:null})});n=$(i,function(u,v){return{name:u,type:o[v%2].type}}),r=new re(n,t)}else n=[{name:"value",type:"float"}],r=new re(n,t);var s=$(t.get("data"),st(ZT,e,a,t));a&&(s=Gt(s,st(XT,a)));var l=a?function(u,v,c,f){var h=u.coord[Math.floor(f/2)][f%2];return mn(h,n[f])}:function(u,v,c,f){return mn(u.value,n[f])};return r.initData(s,null,l),r.hasItemOption=!0,r}function jT(a){a.registerComponentModel(YT),a.registerComponentView(qT),a.registerPreprocessor(function(e){pl(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var Jp={get:function(a,e,t){var r=pt((JT[a]||{})[e]);return t&&q(r)?r[r.length-1]:r}},JT={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},Pc=Ot.mapVisual,QT=Ot.eachVisual,t2=q,Ec=D,e2=br,r2=Nt,Nn=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,r,n){this.mergeDefaultAndTheme(t,n)},e.prototype.optionUpdated=function(t,r){var n=this.option;!r&&Zp(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var r=this.stateList;t=at(t,this),this.controllerVisuals=ts(this.option.controller,r,t),this.targetVisuals=ts(this.option.target,r,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,r=[];return t==null||t==="all"?this.ecModel.eachSeries(function(n,i){r.push(i)}):r=Jt(t),r},e.prototype.eachTargetSeries=function(t,r){D(this.getTargetSeriesIndices(),function(n){var i=this.ecModel.getSeriesByIndex(n);i&&t.call(r,i)},this)},e.prototype.isTargetSeries=function(t){var r=!1;return this.eachTargetSeries(function(n){n===t&&(r=!0)}),r},e.prototype.formatValueText=function(t,r,n){var i=this.option,o=i.precision,s=this.dataBound,l=i.formatter,u;n=n||["<",">"],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]<t[0]&&(r[0]=t[0]),r[1]<t[0]&&(r[1]=t[0]),r},e.prototype.getValueState=function(t){var r=this.option.range,n=this.getExtent();return(r[0]<=n[0]||r[0]<=t)&&(r[1]>=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;l<v&&(!n.length||r[l]<=n[0]);l++)r[l]<n[s]&&o(r[l],"outOfRange");for(var c=1;s<u;s++,c=0)c&&i.length&&o(n[s],"outOfRange"),o(n[s],"inRange");for(var c=1;l<v;l++)(!n.length||n[n.length-1]<r[l])&&(c&&(i.length&&o(i[i.length-1].value,"outOfRange"),c=0),o(r[l],"outOfRange"));var f=i.length;return{stops:i,outerColors:[f?i[0].color:"transparent",f?i[f-1].color:"transparent"]}},e.type="visualMap.continuous",e.defaultOption=Jn(Nn.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),e}(Nn);function kc(a,e,t){if(t[0]===t[1])return t.slice();for(var r=200,n=(t[1]-t[0])/r,i=t[0],o=[],s=0;s<=r&&i<t[1];s++)o.push(i),i+=n;return o.push(t[1]),o}var Qp=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t.autoPositionValues={left:1,right:1,top:1,bottom:1},t}return e.prototype.init=function(t,r){this.ecModel=t,this.api=r},e.prototype.render=function(t,r,n,i){if(this.visualMapModel=t,t.get("show")===!1){this.group.removeAll();return}this.doRender(t,r,n,i)},e.prototype.renderBackground=function(t){var r=this.visualMapModel,n=Py(r.get("padding")||0),i=t.getBoundingRect();t.add(new Bt({z2:-1,silent:!0,shape:{x:i.x-n[3],y:i.y-n[0],width:i.width+n[3]+n[1],height:i.height+n[0]+n[2]},style:{fill:r.get("backgroundColor"),stroke:r.get("borderColor"),lineWidth:r.get("borderWidth")}}))},e.prototype.getControllerVisual=function(t,r,n){n=n||{};var i=n.forceState,o=this.visualMapModel,s={};if(r==="color"){var l=o.get("contentColor");s.color=l}function u(h){return s[h]}function v(h,p){s[h]=p}var c=o.controllerVisuals[i||o.getValueState(t)],f=Ot.prepareVisualTypes(c);return D(f,function(h){var p=c[h];n.convertOpacityToAlpha&&h==="opacity"&&(h="colorAlpha",p=c.__alphaForOpacity),Ot.dependsOn(h,r)&&p&&p.applyVisual(t,u,v)}),s[r]},e.prototype.positionGroup=function(t){var r=this.visualMapModel,n=this.api;ps(t,r.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},e.prototype.doRender=function(t,r,n,i){},e.type="visualMap",e}(te),Vc=[["left","right","width"],["top","bottom","height"]];function td(a,e,t){var r=a.option,n=r.align;if(n!=null&&n!=="auto")return n;for(var i={width:e.getWidth(),height:e.getHeight()},o=r.orient==="horizontal"?1:0,s=Vc[o],l=[0,null,10],u={},v=0;v<3;v++)u[Vc[1-o][v]]=l[v],u[s[v]]=v===2?t[0]:r[s[v]];var c=[["x","width",3],["y","height",0]][o],f=fe(u,i,r.padding);return s[(f.margin[c[2]]||0)+f[c[0]]+f[c[1]]*.5<i[c[1]]*.5?0:1]}function cn(a,e){return D(a||[],function(t){t.dataIndex!=null&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),a}var Ie=Nt,n2=D,Nc=Math.min,ho=Math.max,i2=12,o2=6,s2=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type=e.type,t._shapes={},t._dataInterval=[],t._handleEnds=[],t._hoverLinkDataIndices=[],t}return e.prototype.init=function(t,r){a.prototype.init.call(this,t,r),this._hoverLinkFromSeriesMouseOver=at(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=at(this._hideIndicator,this)},e.prototype.doRender=function(t,r,n,i){(!i||i.type!=="selectDataRange"||i.from!==this.uid)&&this._buildView()},e.prototype._buildView=function(){this.group.removeAll();var t=this.visualMapModel,r=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(r);var n=t.get("text");this._renderEndsText(r,n,0),this._renderEndsText(r,n,1),this._updateView(!0),this.renderBackground(r),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(r)},e.prototype._renderEndsText=function(t,r,n){if(r){var i=r[1-n];i=i!=null?i+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,v=this._applyTransform([l[0]/2,n===0?-s:l[1]+s],u),c=this._applyTransform(n===0?"bottom":"top",u),f=this._orient,h=this.visualMapModel.textStyleModel;this.group.add(new St({style:At(h,{x:v[0],y:v[1],verticalAlign:f==="horizontal"?"middle":c,align:f==="horizontal"?c:"center",text:i})}))}},e.prototype._renderBar=function(t){var r=this.visualMapModel,n=this._shapes,i=r.itemSize,o=this._orient,s=this._useHandle,l=td(r,this.api,i),u=n.mainGroup=this._createBarGroup(l),v=new nt;u.add(v),v.add(n.outOfRange=zc()),v.add(n.inRange=zc(null,s?Oc(this._orient):null,at(this._dragHandle,this,"all",!1),at(this._dragHandle,this,"all",!0))),v.setClipPath(new Bt({shape:{x:0,y:0,width:i[0],height:i[1],r:3}}));var c=r.textStyleModel.getTextRect("国"),f=ho(c.width,c.height);s&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(r,u,0,i,f,o),this._createHandle(r,u,1,i,f,o)),this._createIndicator(r,u,i,f,o),t.add(u)},e.prototype._createHandle=function(t,r,n,i,o,s){var l=at(this._dragHandle,this,n,!1),u=at(this._dragHandle,this,n,!0),v=Co(t.get("handleSize"),i[0]),c=ve(t.get("handleIcon"),-v/2,-v/2,v,v,null,!0),f=Oc(this._orient);c.attr({cursor:f,draggable:!0,drift:l,ondragend:u,onmousemove:function(y){Do(y.event)}}),c.x=i[0]/2,c.useStyle(t.getModel("handleStyle").getItemStyle()),c.setStyle({strokeNoScale:!0,strokeFirst:!0}),c.style.lineWidth*=2,c.ensureState("emphasis").style=t.getModel(["emphasis","handleStyle"]).getItemStyle(),ra(c,!0),r.add(c);var h=this.visualMapModel.textStyleModel,p=new St({cursor:f,draggable:!0,drift:l,onmousemove:function(y){Do(y.event)},ondragend:u,style:At(h,{x:0,y:0,text:""})});p.ensureState("blur").style={opacity:.1},p.stateTransition={duration:200},this.group.add(p);var d=[v,0],g=this._shapes;g.handleThumbs[n]=c,g.handleLabelPoints[n]=d,g.handleLabels[n]=p},e.prototype._createIndicator=function(t,r,n,i,o){var s=Co(t.get("indicatorSize"),n[0]),l=ve(t.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:n[0]/2});var u=t.getModel("indicatorStyle").getItemStyle();if(l instanceof Re){var v=l.style;l.useStyle(K({image:v.image,x:v.x,y:v.y,width:v.width,height:v.height},u))}else l.useStyle(u);r.add(l);var c=this.visualMapModel.textStyleModel,f=new St({silent:!0,invisible:!0,style:At(c,{x:0,y:0,text:""})});this.group.add(f);var h=[(o==="horizontal"?i/2:o2)+n[0]/2,0],p=this._shapes;p.indicator=l,p.indicatorLabel=f,p.indicatorLabelPoint=h,this._firstShowIndicator=!0},e.prototype._dragHandle=function(t,r,n,i){if(this._useHandle){if(this._dragging=!r,!r){var o=this._applyTransform([n,i],this._shapes.mainGroup,!0);this._updateInterval(t,o[1]),this._hideIndicator(),this._updateView()}r===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),r?!this._hovering&&this._clearHoverLinkToSeries():Gc(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},e.prototype._resetInterval=function(){var t=this.visualMapModel,r=this._dataInterval=t.getSelected(),n=t.getExtent(),i=[0,t.itemSize[1]];this._handleEnds=[Ie(r[0],n,i,!0),Ie(r[1],n,i,!0)]},e.prototype._updateInterval=function(t,r){r=r||0;var n=this.visualMapModel,i=this._handleEnds,o=[0,n.itemSize[1]];ys(r,i,o,t,0);var s=n.getExtent();this._dataInterval=[Ie(i[0],o,s,!0),Ie(i[1],o,s,!0)]},e.prototype._updateView=function(t){var r=this.visualMapModel,n=r.getExtent(),i=this._shapes,o=[0,r.itemSize[1]],s=t?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,n,s,"inRange"),u=this._createBarVisual(n,n,o,"outOfRange");i.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),i.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},e.prototype._createBarVisual=function(t,r,n,i){var o={forceState:i,convertOpacityToAlpha:!0},s=this._makeColorGradient(t,o),l=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],u=this._createBarPoints(n,l);return{barColor:new vs(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},e.prototype._makeColorGradient=function(t,r){var n=100,i=[],o=(t[1]-t[0])/n;i.push({color:this.getControllerVisual(t[0],"color",r),offset:0});for(var s=1;s<n;s++){var l=t[0]+o*s;if(l>t[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;L<C.length;L++)this.api.enterBlur(C[L])}},e.prototype._enableHoverLinkToSeries=function(){var t=this;this._shapes.mainGroup.on("mousemove",function(r){if(t._hovering=!0,!t._dragging){var n=t.visualMapModel.itemSize,i=t._applyTransform([r.offsetX,r.offsetY],t._shapes.mainGroup,!0,!0);i[1]=Nc(ho(0,i[1]),n[1]),t._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=n[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},e.prototype._enableHoverLinkFromSeries=function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},e.prototype._doHoverLinkToSeries=function(t,r){var n=this.visualMapModel,i=n.itemSize;if(n.option.hoverLink){var o=[0,i[1]],s=n.getExtent();t=Nc(ho(o[0],t),o[1]);var l=l2(n,s,o),u=[t-l,t+l],v=Ie(t,o,s,!0),c=[Ie(u[0],o,s,!0),Ie(u[1],o,s,!0)];u[0]<o[0]&&(c[0]=-1/0),u[1]>o[1]&&(c[1]=1/0),r&&(c[0]===-1/0?this._showIndicator(v,c[1],"< ",l):c[1]===1/0?this._showIndicator(v,c[0],"> ",l):this._showIndicator(v,v,"≈ ",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<r.length;n++)this.api.leaveBlur(r[n])},e.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",cn(t,this.visualMapModel)),t.length=0},e.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},e.prototype._applyTransform=function(t,r,n,i){var o=ua(r,i?null:this.group);return q(t)?Gr(t,o,n):Ef(t,o,n)},e.prototype._dispatchHighDown=function(t,r){r&&r.length&&this.api.dispatchAction({type:t,batch:r})},e.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.type="visualMap.continuous",e}(Qp);function zc(a,e,t,r){return new Ae({shape:{points:a},draggable:!!t,cursor:e,drift:t,onmousemove:function(n){Do(n.event)},ondragend:r})}function l2(a,e,t){var r=i2/2,n=a.get("hoverLinkDataSize");return n&&(r=Ie(n,e,t,!0)/2),r}function Gc(a){var e=a.get("hoverLinkOnHandle");return!!(e??a.get("realtime"))}function Oc(a){return a==="vertical"?"ns-resize":"ew-resize"}var u2={type:"selectDataRange",event:"dataRangeSelected",update:"update"},v2=function(a,e){e.eachComponent({mainType:"visualMap",query:a},function(t){t.setSelected(a.selected)})},c2=[{createOnAllSeries:!0,reset:function(a,e){var t=[];return e.eachComponent("visualMap",function(r){var n=a.pipelineContext;!r.isTargetSeries(a)||n&&n.large||t.push(sT(r.stateList,r.targetVisuals,at(r.getValueState,r),r.getDataDimensionIndex(a.getData())))}),t}},{createOnAllSeries:!0,reset:function(a,e){var t=a.getData(),r=[];e.eachComponent("visualMap",function(n){if(n.isTargetSeries(a)){var i=n.getVisualMeta(at(f2,null,a,n))||{stops:[],outerColors:[]},o=n.getDataDimensionIndex(t);o>=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;s<l;s++){var u=i[s],v=n[u==="opacity"?"__alphaForOpacity":u];v&&v.applyVisual(t,c,f)}return o.color;function c(h){return o[h]}function f(h,p){o[h]=p}}var Bc=D;function h2(a){var e=a&&a.visualMap;q(e)||(e=e?[e]:[]),Bc(e,function(t){if(t){Ir(t,"splitList")&&!Ir(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var r=t.pieces;r&&q(r)&&Bc(r,function(n){Zt(n)&&(Ir(n,"start")&&!Ir(n,"min")&&(n.min=n.start),Ir(n,"end")&&!Ir(n,"max")&&(n.max=n.end))})}})}function Ir(a,e){return a&&a.hasOwnProperty&&a.hasOwnProperty(e)}var Fc=!1;function ed(a){Fc||(Fc=!0,a.registerSubTypeDefaulter("visualMap",function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0: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<n;s+=i,o++){var l=o===n-1?r[1]:s+i;a.push({interval:[s,l],close:[1,1]})}e.maxOpen&&a.push({interval:[r[1],1/0],close:[0,0]}),Fl(a),D(a,function(u,v){u.index=v,u.text=this.formatValueText(u.interval)},this)},categories:function(a){var e=this.option;D(e.categories,function(t){a.push({text:this.formatValueText(t,!0),value:t})},this),Hc(e,a)},pieces:function(a){var e=this.option;D(e.pieces,function(t,r){Zt(t)||(t={value:t});var n={text:"",index:r};if(t.label!=null&&(n.text=t.label),t.hasOwnProperty("value")){var i=n.value=t.value;n.interval=[i,i],n.close=[1,1]}else{for(var o=n.interval=[],s=n.close=[0,0],l=[1,0,1],u=[-1/0,1/0],v=[],c=0;c<2;c++){for(var f=[["gte","gt","min"],["lte","lt","max"]][c],h=0;h<3&&o[c]==null;h++)o[c]=t[f[h]],s[c]=l[h],v[c]=h===2;o[c]==null&&(o[c]=u[c])}v[0]&&o[1]===1/0&&(s[0]=0),v[1]&&o[0]===-1/0&&(s[1]=0),o[0]===o[1]&&s[0]&&s[1]&&(n.value=o[0])}n.visual=Ot.retrieveVisuals(t),a.push(n)},this),Hc(e,a),Fl(a),D(a,function(t){var r=t.close,n=[["<","≤"][r[1]],[">","≥"][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(T<d){var C=void 0,L=A.get("name"),M=L?"withName":"withoutName";C=f>1?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<I.count();F++)if(F<h){var H=I.getName(F),X=k?Gt(I.getValues(F),function(rt,tt){return Pt(k,tt)===-1}):I.getValues(F),j=c.get(["data",H?"withName":"withoutName"]);N.push(o(j,{name:H,value:X.join(E)}))}C+=N.join(E)+R,m.push(C)}});var b=c.getModel(["series","multiple","separator"]),_=b.get("middle"),w=b.get("end");g+=m.join(_)+w,u.setAttribute("aria-label",g)}}}}function o(u,v){if(!lt(u))return u;var c=u;return D(v,function(f,h){c=c.replace(new RegExp("\\{\\s*"+h+"\\s*\\}","g"),f)}),c}function s(){var u=a.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){var v=a.getLocaleModel().get(["series","typeNames"]);return v[u]||v.chart}}function b2(a){if(!(!a||!a.aria)){var e=a.aria;e.show!=null&&(e.enabled=e.show),e.label=e.label||{},D(["description","general","series","data"],function(t){e[t]!=null&&(e.label[t]=e[t])})}}function _2(a){a.registerPreprocessor(b2),a.registerVisual(a.PRIORITY.VISUAL.ARIA,x2)}var Uc={value:"eq","<":"lt","<=":"lte",">":"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;t<e.length;t++)if(!e[t].evaluate())return!1;return!0},a}(),C2=function(){function a(){}return a.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1},a}(),D2=function(){function a(){}return a.prototype.evaluate=function(){return!this.child.evaluate()},a}(),L2=function(){function a(){}return a.prototype.evaluate=function(){for(var e=!!this.valueParser,t=this.getValue,r=t(this.valueGetterParam),n=e?this.valueParser(r):null,i=0;i<this.subCondList.length;i++)if(!this.subCondList[i].evaluate(e?n:r))return!1;return!0},a}();function yl(a,e){if(a===!0||a===!1){var t=new A2;return t.value=a,t}var r="";return nd(a)||It(r),a.and?$c("and",a,e):a.or?$c("or",a,e):a.not?I2(a,e):M2(a,e)}function $c(a,e,t){var r=e[a],n="";q(r)||It(n),r.length||It(n);var i=a==="and"?new T2:new C2;return i.children=$(r,function(o){return yl(o,t)}),i.children.length||It(n),i}function I2(a,e){var t=a.not,r="";nd(t)||It(r);var n=new D2;return n.child=yl(t,e),n.child||It(r),n}function M2(a,e){for(var t="",r=e.prepareGetValue(a),n=[],i=Mt(a),o=a.parser,s=o?Xf(o):null,l=0;l<i.length;l++){var u=i[l];if(!(u==="parser"||e.valueGetterAttrMap.get(u))){var v=Z(Uc,u)?Uc[u]:u,c=a[u],f=s?s(c):c,h=ky(v,f)||v==="reg"&&new w2(f);h||It(t),n.push(h)}}n.length||It(t);var p=new L2;return p.valueGetterParam=r,p.valueParser=s,p.getValue=e.getValue,p.subCondList=n,p}function nd(a){return Zt(a)&&!kf(a)}var P2=function(){function a(e,t){this._cond=yl(e,t)}return a.prototype.evaluate=function(){return this._cond.evaluate()},a}();function E2(a,e){return new P2(a,e)}var R2={type:"echarts:filter",transform:function(a){for(var e=a.upstream,t,r=E2(a.config,{valueGetterAttrMap:ut({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;Z(s,"dimension")||It(l);var v=e.getDimensionInfo(u);return v||It(l),{dimIdx:v.index}},getValue:function(s){return e.retrieveValueFromItem(t,s.dimIdx)}}),n=[],i=0,o=e.count();i<o;i++)t=e.getRawDataItem(i),r.evaluate()&&n.push(t);return{data:n}}},k2={type:"echarts:sort",transform:function(a){var e=a.upstream,t=a.config,r="",n=Jt(t);n.length||It(r);var i=[];D(n,function(v){var c=v.dimension,f=v.order,h=v.parser,p=v.incomparable;if(c==null&&It(r),f!=="asc"&&f!=="desc"&&It(r),p&&p!=="min"&&p!=="max"){var d="";It(d)}if(f!=="asc"&&f!=="desc"){var g="";It(g)}var y=e.getDimensionInfo(c);y||It(r);var S=h?Xf(h):null;h&&!S&&It(r),i.push({dimIdx:y.index,parser:S,comparator:new Ny(f,p)})});var o=e.sourceFormat;o!==Rf&&o!==zy&&It(r);for(var s=[],l=0,u=e.count();l<u;l++)s.push(e.getRawDataItem(l));return s.sort(function(v,c){for(var f=0;f<i.length;f++){var h=i[f],p=e.retrieveValueFromItem(v,h.dimIdx),d=e.retrieveValueFromItem(c,h.dimIdx);h.parser&&(p=h.parser(p),d=h.parser(d));var g=h.comparator.evaluate(p,d);if(g!==0)return g}return 0}),{data:s}}};function V2(a){a.registerTransform(R2),a.registerTransform(k2)}var N2=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="dataset",t}return e.prototype.init=function(t,r,n){a.prototype.init.call(this,t,r,n),this._sourceManager=new Gy(this),Hl(this)},e.prototype.mergeOption=function(t,r){a.prototype.mergeOption.call(this,t,r),Hl(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:Oy},e}(Xt),z2=function(a){V(e,a);function e(){var t=a!==null&&a.apply(this,arguments)||this;return t.type="dataset",t}return e.type="dataset",e}(te);function G2(a){a.registerComponentModel(N2),a.registerComponentView(z2)}var De=ss.CMD;function zr(a,e){return Math.abs(a-e)<1e-5}function as(a){var e=a.data,t=a.len(),r=[],n,i=0,o=0,s=0,l=0;function u(I,P){n&&n.length>2&&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=P<I?-1:1,j=Math.cos(I),rt=Math.sin(I),tt=Math.cos(P),O=Math.sin(P),G=j*k+E,J=rt*N+R,Y=tt*k+E,W=O*N+R,Q=k*H*X,et=N*H*X;n.push(G-Q*rt,J+et*j,Y+Q*O,W-et*tt,Y,W)}for(var f,h,p,d,g=0;g<t;){var y=e[g++],S=g===1;switch(S&&(i=e[g],o=e[g+1],s=i,l=o,(y===De.L||y===De.C||y===De.Q)&&(n=[s,l])),y){case De.M:i=s=e[g++],o=l=e[g++],u(s,l);break;case De.L:f=e[g++],h=e[g++],v(i,o,f,h),i=f,o=h;break;case De.C:n.push(e[g++],e[g++],e[g++],e[g++],i=e[g++],o=e[g++]);break;case De.Q:f=e[g++],h=e[g++],p=e[g++],d=e[g++],n.push(i+2/3*(f-i),o+2/3*(h-o),p+2/3*(f-p),d+2/3*(h-d),p,d),i=p,o=d;break;case De.A:var m=e[g++],x=e[g++],b=e[g++],_=e[g++],w=e[g++],A=e[g++]+w;g+=1;var T=!e[g++];f=Math.cos(w)*b+m,h=Math.sin(w)*_+x,S?(s=f,l=h,u(s,l)):v(i,o,f,h),i=Math.cos(A)*b+m,o=Math.sin(A)*_+x;for(var C=(T?-1:1)*Math.PI/2,L=w;T?L>A:L<A;L+=C){var M=T?Math.max(L+C,A):Math.min(L+C,A);c(L,M,m,x,b,_)}break;case De.R:s=i=e[g++],l=o=e[g++],f=s+e[g++],h=l+e[g++],u(f,l),v(f,l,f,h),v(f,h,s,h),v(s,h,s,l),v(s,l,f,l);break;case De.Z:n&&v(i,o,s,l),i=s,o=l;break}}return n&&n.length>2&&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<c&&x<c){l.push(o,s);return}var b=f*d+h*g,_=-f*y-h*S,w=m-b*b,A=x-_*_;if(w<c&&b>=0&&A<c&&_>=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;n<t.length;n++){var i=t[n],o=[],s=i[0],l=i[1];o.push(s,l);for(var u=2;u<i.length;){var v=i[u++],c=i[u++],f=i[u++],h=i[u++],p=i[u++],d=i[u++];ns(s,l,v,c,f,h,p,d,o,e),s=p,l=d}r.push(o)}return r}function id(a,e,t){var r=a[e],n=a[1-e],i=Math.abs(r/n),o=Math.ceil(Math.sqrt(i*t)),s=Math.floor(t/o);s===0&&(s=1,o=t);for(var l=[],u=0;u<o;u++)l.push(s);var v=o*s,c=t-v;if(c>0)for(var u=0;u<c;u++)l[u%o]+=1;return l}function Yc(a,e,t){for(var r=a.r0,n=a.r,i=a.startAngle,o=a.endAngle,s=Math.abs(o-i),l=s*n,u=n-r,v=l>Math.abs(u),c=id([l,u],v?0:1,e),f=(v?s:u)/c.length,h=0;h<c.length;h++)for(var p=(v?u:s)/c[h],d=0;d<c[h];d++){var g={};v?(g.startAngle=i+f*h,g.endAngle=i+f*(h+1),g.r0=r+p*d,g.r=r+p*(d+1)):(g.startAngle=i+p*d,g.endAngle=i+p*(d+1),g.r0=r+f*h,g.r=r+f*(h+1)),g.clockwise=a.clockwise,g.cx=a.cx,g.cy=a.cy,t.push(g)}}function B2(a,e,t){for(var r=a.width,n=a.height,i=r>n,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;f<o.length;f++)for(var h=a[l]/o[f],p=0;p<o[f];p++){var d={};d[u]=f*c,d[v]=p*h,d[s]=c,d[l]=h,d.x+=a.x,d.y+=a.y,t.push(d)}}function Zc(a,e,t,r){return a*r-t*e}function F2(a,e,t,r,n,i,o,s){var l=t-a,u=r-e,v=o-n,c=s-i,f=Zc(v,c,l,u);if(Math.abs(f)<1e-6)return null;var h=a-n,p=e-i,d=Zc(h,p,v,c)/f;return d<0||d>1?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;i<r;i++){var o=a[i],s=a[(i+1)%r],l=F2(o[0],o[1],s[0],s[1],e.x,e.y,t.x,t.y);l&&n.push({projPt:H2(l,e,t),pt:l,idx:i})}if(n.length<2)return[{points:a},{points:a}];n.sort(function(g,y){return g.projPt-y.projPt});var u=n[0],v=n[n.length-1];if(v.idx<u.idx){var c=u;u=v,v=c}for(var f=[u.pt.x,u.pt.y],h=[v.pt.x,v.pt.y],p=[f],d=[h],i=u.idx+1;i<=v.idx;i++)Mr(p,a[i].slice());Mr(p,h),Mr(p,f);for(var i=v.idx+1;i<=u.idx+r;i++)Mr(d,a[i%r].slice());return Mr(d,f),Mr(d,h),[{points:p},{points:d}]}function Xc(a){var e=a.points,t=[],r=[];Xn(e,t,r);var n=new Tt(t[0],t[1],r[0]-t[0],r[1]-t[1]),i=n.width,o=n.height,s=n.x,l=n.y,u=new mt,v=new mt;return i>o?(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;r<e;r++)t.push(ws(a));return t}function $2(a,e){e.setStyle(a.style),e.z=a.z,e.z2=a.z2,e.zlevel=a.zlevel}function Y2(a){for(var e=[],t=0;t<a.length;)e.push([a[t++],a[t++]]);return e}function Z2(a,e){var t=[],r=a.shape,n;switch(a.type){case"rect":B2(r,e,t),n=Bt;break;case"sector":Yc(r,e,t),n=Be;break;case"circle":Yc({r0:0,r:r.r,startAngle:0,endAngle:Math.PI*2,cx:r.cx,cy:r.cy},e,t),n=Be;break;default:var i=a.getComputedTransform(),o=i?Math.sqrt(Math.max(i[0]*i[0]+i[1]*i[1],i[2]*i[2]+i[3]*i[3])):1,s=$(O2(a.getUpdatedPathProxy(),o),function(y){return Y2(y)}),l=s.length;if(l===0)zn(Xc,{points:s[0]},e,t);else if(l===e)for(var u=0;u<l;u++)t.push({points:s[u]});else{var v=0,c=$(s,function(y){var S=[],m=[];Xn(y,S,m);var x=(m[1]-S[1])*(m[0]-S[0]);return v+=x,{poly:y,area:x}});c.sort(function(y,S){return S.area-y.area});for(var f=e,u=0;u<l;u++){var h=c[u];if(f<=0)break;var p=u===l-1?f:Math.ceil(h.area/v*e);p<0||(zn(Xc,{points:h.poly},p,t),f-=p)}}n=Ae;break}if(!n)return U2(a,e);for(var d=[],u=0;u<t.length;u++){var g=new n;g.setShape(t[u]),$2(a,g),d.push(g)}return d}function X2(a,e){var t=a.length,r=e.length;if(t===r)return[a,e];for(var n=[],i=[],o=t<r?a:e,s=Math.min(t,r),l=Math.abs(r-t)/6,u=(s-2)/6,v=Math.ceil(l/u)+1,c=[o[0],o[1]],f=l,h=2;h<s;){var p=o[h-2],d=o[h-1],g=o[h++],y=o[h++],S=o[h++],m=o[h++],x=o[h++],b=o[h++];if(f<=0){c.push(g,y,S,m,x,b);continue}for(var _=Math.min(f,v-1)+1,w=1;w<=_;w++){var A=w/_;Sn(p,g,S,x,A,n),Sn(d,y,m,b,A,i),p=n[3],d=i[3],c.push(n[1],i[1],n[2],i[2],p,d),g=n[5],y=i[5],S=n[6],m=i[6]}f-=_-1}return o===a?[c,e]:[a,c]}function qc(a,e){for(var t=a.length,r=a[t-2],n=a[t-1],i=[],o=0;o<e.length;)i[o++]=r,i[o++]=n;return i}function q2(a,e){for(var t,r,n,i=[],o=[],s=0;s<Math.max(a.length,e.length);s++){var l=a[s],u=e[s],v=void 0,c=void 0;l?u?(t=X2(l,u),v=t[0],c=t[1],r=v,n=c):(c=qc(n||l,l),v=l):(v=qc(r||u,u),c=u),i.push(v),o.push(c)}return[i,o]}function Kc(a){for(var e=0,t=0,r=0,n=a.length,i=0,o=n-2;i<n;o=i,i+=2){var s=a[o],l=a[o+1],u=a[i],v=a[i+1],c=s*v-u*l;e+=c,t+=(s+u)*c,r+=(l+v)*c}return e===0?[a[0]||0,a[1]||0]:[t/e/3,r/e/3,e]}function K2(a,e,t,r){for(var n=(a.length-2)/6,i=1/0,o=0,s=a.length,l=s-2,u=0;u<n;u++){for(var v=u*6,c=0,f=0;f<s;f+=2){var h=f===0?v:(v+f-2)%l+2,p=a[h]-t[0],d=a[h+1]-t[1],g=e[f]-r[0],y=e[f+1]-r[1],S=g-p,m=y-d;c+=S*S+m*m}c<i&&(i=c,o=u)}return o}function j2(a){for(var e=[],t=a.length,r=0;r<t;r+=2)e[r]=a[t-r-2],e[r+1]=a[t-r-1];return e}function J2(a,e,t,r){for(var n=[],i,o=0;o<a.length;o++){var s=a[o],l=e[o],u=Kc(s),v=Kc(l);i==null&&(i=u[2]<0!=v[2]<0);var c=[],f=[],h=0,p=1/0,d=[],g=s.length;i&&(s=j2(s));for(var y=K2(s,l,u,v)*6,S=g-2,m=0;m<S;m+=2){var x=(y+m)%S+2;c[m+2]=s[x]-u[0],c[m+3]=s[x+1]-u[1]}c[0]=s[y]-u[0],c[1]=s[y+1]-u[1];for(var b=r/t,_=-r/2;_<=r/2;_+=b){for(var w=Math.sin(_),A=Math.cos(_),T=0,m=0;m<s.length;m+=2){var C=c[m],L=c[m+1],M=l[m]-v[0],I=l[m+1]-v[1],P=M*A-I*w,E=M*w+I*A;d[m]=P,d[m+1]=E;var R=P-C,k=E-L;T+=R*R+k*k}if(T<p){p=T,h=_;for(var N=0;N<d.length;N++)f[N]=d[N]}}n.push({from:c,to:f,fromCp:u,toCp:v,rotation:-h})}return n}function Gn(a){return a.__isCombineMorphing}var od="__mOriginal_";function On(a,e,t){var r=od+e,n=a[r]||a[e];a[r]||(a[r]=a[e]);var i=t.replace,o=t.after,s=t.before;a[e]=function(){var l=arguments,u;return s&&s.apply(this,l),i?u=i.apply(this,l):u=n.apply(this,l),o&&o.apply(this,l),u}}function ca(a,e){var t=od+e;a[t]&&(a[e]=a[t],a[t]=null)}function jc(a,e){for(var t=0;t<a.length;t++)for(var r=a[t],n=0;n<r.length;){var i=r[n],o=r[n+1];r[n++]=e[0]*i+e[2]*o+e[4],r[n++]=e[1]*i+e[3]*o+e[5]}}function sd(a,e){var t=a.getUpdatedPathProxy(),r=e.getUpdatedPathProxy(),n=q2(as(t),as(r)),i=n[0],o=n[1],s=a.getComputedTransform(),l=e.getComputedTransform();function u(){this.transform=null}s&&jc(i,s),l&&jc(o,l),On(e,"updateTransform",{replace:u}),e.transform=null;var v=J2(i,o,10,Math.PI),c=[];On(e,"buildPath",{replace:function(f){for(var h=e.__morphT,p=1-h,d=[],g=0;g<v.length;g++){var y=v[g],S=y.from,m=y.to,x=y.rotation*h,b=y.fromCp,_=y.toCp,w=Math.sin(x),A=Math.cos(x);sn(d,b,_,h);for(var T=0;T<S.length;T+=2){var C=S[T],L=S[T+1],M=m[T],I=m[T+1],P=C*p+M*h,E=L*p+I*h;c[T]=P*A-E*w+d[0],c[T+1]=P*w+E*A+d[1]}var R=c[0],k=c[1];f.moveTo(R,k);for(var T=2;T<S.length;){var M=c[T++],I=c[T++],N=c[T++],F=c[T++],H=c[T++],X=c[T++];R===M&&k===I&&N===H&&F===X?f.lineTo(H,X):f.bezierCurveTo(M,I,N,F,H,X),R=H,k=X}}}})}function ml(a,e,t){if(!a||!e)return e;var r=t.done,n=t.during;sd(a,e),e.__morphT=0;function i(){ca(e,"buildPath"),ca(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},ot({during:function(o){e.dirtyShape(),n&&n(o)},done:function(){i(),r&&r()}},t)),e}function Q2(a,e,t,r,n,i){var o=16;a=n===t?0:Math.round(32767*(a-t)/(n-t)),e=i===r?0:Math.round(32767*(e-r)/(i-r));for(var s=0,l,u=(1<<o)/2;u>0;u/=2){var v=0,c=0;(a&u)>0&&(v=1),(e&u)>0&&(c=1),s+=u*u*(3*v^c),c===0&&(v===1&&(a=u-1-a,e=u-1-e),l=a,a=e,e=l)}return s}function 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;_<b.length;_++){var w=b[_];Gn(w)?n(w.childrenRef()):w instanceof Wt&&r.push(w)}}n(a);var i=r.length;if(!i)return is();var o=t.dividePath||ld,s=o({path:e,count:i});if(s.length!==i)return console.error("Invalid morphing: unmatched splitted path"),is();r=Bn(r),s=Bn(s);for(var l=t.done,u=t.during,v=t.individualDelay,c=new kr,f=0;f<i;f++){var h=r[f],p=s[f];p.parent=e,p.copyTransform(c),v||sd(h,p)}e.__isCombineMorphing=!0,e.childrenRef=function(){return s};function d(b){for(var _=0;_<s.length;_++)s[_].addSelfToZr(b)}On(e,"addSelfToZr",{after:function(b){d(b)}}),On(e,"removeSelfFromZr",{after:function(b){for(var _=0;_<s.length;_++)s[_].removeSelfFromZr(b)}});function g(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,ca(e,"addSelfToZr"),ca(e,"removeSelfFromZr")}var y=s.length;if(v)for(var S=y,m=function(){S--,S===0&&(g(),l&&l())},f=0;f<y;f++){var x=v?ot({delay:(t.delay||0)+v(f,y,r[f],s[f]),done:m},t):t;ml(r[f],s[f],x)}else e.__morphT=0,e.animateTo({__morphT:1},ot({during:function(b){for(var _=0;_<y;_++){var w=s[_];w.__morphT=e.__morphT,w.dirtyShape()}u&&u(b)},done:function(){g();for(var b=0;b<a.length;b++)ca(a[b],"updateTransform");l&&l()}},t));return e.__zr&&d(e.__zr),{fromIndividuals:r,toIndividuals:s,count:y}}function eC(a,e,t){var r=e.length,n=[],i=t.dividePath||ld;function o(h){for(var p=0;p<h.length;p++){var d=h[p];Gn(d)?o(d.childrenRef()):d instanceof Wt&&n.push(d)}}if(Gn(a)){o(a.childrenRef());var s=n.length;if(s<r)for(var l=0,u=s;u<r;u++)n.push(ws(n[l++%s]));n.length=r}else{n=i({path:a,count:r});for(var v=a.getComputedTransform(),u=0;u<n.length;u++)n[u].setLocalTransform(v);if(n.length!==r)return console.error("Invalid morphing: unmatched splitted path"),is()}n=Bn(n),e=Bn(e);for(var c=t.individualDelay,u=0;u<r;u++){var f=c?ot({delay:(t.delay||0)+c(u,r,n[u],e[u])},t):t;ml(n[u],e[u],f)}return{fromIndividuals:n,toIndividuals:e,count:e.length}}function Jc(a){return q(a[0])}function Qc(a,e){for(var t=[],r=a.length,n=0;n<r;n++)t.push({one:a[n],many:[]});for(var n=0;n<e.length;n++){var i=e[n].length,o=void 0;for(o=0;o<i;o++)t[o%r].many.push(e[n][o])}for(var s=0,n=r-1;n>=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;r<a.count;r++){var n=ws(a.path);n.setStyle("opacity",t),e.push(n)}return e},split:null};function po(a,e,t,r,n,i){if(!a.length||!e.length)return;var o=ka("update",r,n);if(!(o&&o.duration>0))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;R<E;R++){var C=s?ot({delay:s(R,E)},l):l;i(I[R],P[R],S?_[R]:y.one,S?y.one:_[R],C)}}for(var f=u?u===a:a.length>e.length,h=u?Qc(v,u):Qc(f?e:a,[f?a:e]),p=0,d=0;d<h.length;d++)p+=h[d].many.length;for(var g=0,d=0;d<h.length;d++)c(h[d],f,g,p),g+=h[d].many.length}function cr(a){if(!a)return[];if(q(a)){for(var e=[],t=0;t<a.length;t++)e.push(cr(a[t]));return e}var r=[];return a.traverse(function(n){n instanceof Wt&&!n.disableMorphing&&!n.invisible&&!n.ignore&&r.push(n)}),r}var ud=1e4,aC=0,tf=1,ef=2,nC=Dt();function iC(a,e){for(var t=a.dimensions,r=0;r<t.length;r++){var n=a.getDimensionInfo(t[r]);if(n&&n.otherDims[e]===0)return t[r]}}function oC(a,e,t){var r=a.getDimensionInfo(t),n=r&&r.ordinalMeta;if(r){var i=a.get(r.name,e);return n&&n.categories[i]||i+""}}function rf(a,e,t,r){var n=r?"itemChildGroupId":"itemGroupId",i=iC(a,n);if(i){var o=oC(a,e,i);return o}var s=a.getRawDataItem(e),l=r?"childGroupId":"groupId";if(s&&s[l])return s[l]+"";if(!r)return t||a.getId(e)}function af(a){var e=[];return D(a,function(t){var r=t.data,n=t.dataGroupId;if(!(r.count()>ud))for(var i=r.getIndices(),o=0;o<i.length;o++)e.push({data:r,groupId:rf(r,o,n,!1),childGroupId:rf(r,o,n,!0),divide:t.divide,dataIndex:o})}),e}function go(a,e,t){a.traverse(function(r){r instanceof Wt&&Ut(r,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function yo(a){if(a.parent){var e=a.getComputedTransform();a.setLocalTransform(e),a.parent.remove(a)}}function Pr(a){a.stopAnimation(),a.isGroup&&a.traverse(function(e){e.stopAnimation()})}function sC(a,e,t){var r=ka("update",t,e);r&&a.traverse(function(n){if(n instanceof xr){var i=By(n);i&&n.animateFrom({style:i},r)}})}function lC(a,e){var t=a.length;if(t!==e.length)return!1;for(var r=0;r<t;r++){var n=a[r],i=e[r];if(n.data.getId(n.dataIndex)!==i.data.getId(i.dataIndex))return!1}return!0}function vd(a,e,t){var r=af(a),n=af(e);function i(m,x,b,_,w){(b||m)&&x.animateFrom({style:b&&b!==m?K(K({},b.style),m.style):m.style},w)}var o=!1,s=aC,l=ut(),u=ut();r.forEach(function(m){m.groupId&&l.set(m.groupId,!0),m.childGroupId&&u.set(m.childGroupId,!0)});for(var v=0;v<n.length;v++){var c=n[v].groupId;if(u.get(c)){s=tf;break}var f=n[v].childGroupId;if(f&&l.get(f)){s=ef;break}}function h(m,x){return function(b){var _=b.data,w=b.dataIndex;return x?_.getId(w):m?s===tf?b.childGroupId:b.groupId:s===ef?b.childGroupId:b.groupId}}var p=lC(r,n),d={};if(!p)for(var v=0;v<n.length;v++){var g=n[v],y=g.data.getItemGraphicEl(g.dataIndex);y&&(d[y.id]=!0)}function S(m,x){var b=r[x],_=n[m],w=_.data.hostModel,A=b.data.getItemGraphicEl(b.dataIndex),T=_.data.getItemGraphicEl(_.dataIndex);if(A===T){T&&sC(T,_.dataIndex,w);return}A&&d[A.id]||T&&(Pr(T),A?(Pr(A),yo(A),o=!0,po(cr(A),cr(T),_.divide,w,m,i)):go(T,w,m))}new Qe(r,n,h(!0,p),h(!1,p),null,"multiple").update(S).updateManyToOne(function(m,x){var b=n[m],_=b.data,w=_.hostModel,A=_.getItemGraphicEl(b.dataIndex),T=Gt($(x,function(C){return r[C].data.getItemGraphicEl(r[C].dataIndex)}),function(C){return C&&C!==A&&!d[C.id]});A&&(Pr(A),T.length?(D(T,function(C){Pr(C),yo(C)}),o=!0,po(cr(T),cr(A),b.divide,w,m,i)):go(A,w,b.dataIndex))}).updateOneToMany(function(m,x){var b=r[x],_=b.data.getItemGraphicEl(b.dataIndex);if(!(_&&d[_.id])){var w=Gt($(m,function(T){return n[T].data.getItemGraphicEl(n[T].dataIndex)}),function(T){return T&&T!==_}),A=n[m[0]].data.hostModel;w.length&&(D(w,function(T){return Pr(T)}),_?(Pr(_),yo(_),o=!0,po(cr(_),cr(w),b.divide,A,m[0],i)):D(w,function(T){return go(T,A,m[0])}))}}).updateManyToMany(function(m,x){new Qe(x,m,function(b){return r[b].data.getId(r[b].dataIndex)},function(b){return n[b].data.getId(n[b].dataIndex)}).update(function(b,_){S(m[b],x[_])}).execute()}).execute(),o&&D(e,function(m){var x=m.data,b=x.hostModel,_=b&&t.getViewOfSeriesModel(b),w=ka("update",b,0);_&&b.isAnimationEnabled()&&w&&w.duration>0&&_.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<a.length;t++){var r=e.seriesIndex!=null&&e.seriesIndex===a[t].seriesIndex||e.seriesId!=null&&e.seriesId===a[t].id;if(r)return t}}function vC(a,e,t,r){var n=[],i=[];D(Jt(a.from),function(o){var s=sf(e.oldSeries,o);s>=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<o.length;s++)(i.seriesIndex!=null&&i.seriesIndex===o[s].seriesIndex||i.seriesId!=null&&i.seriesId===o[s].id)&&(o[s][yi]=!0)})})}),a.registerUpdateLifecycle("series:transition",function(e,t,r){var n=nC(t);if(n.oldSeries&&r.updatedSeries&&r.optionChanged){var i=r.seriesTransition;if(i)D(Jt(i),function(h){vC(h,n,r,t)});else{var o=uC(n,r);D(o.keys(),function(h){var p=o.get(h);vd(p.oldSeries,p.newSeries,t)})}D(r.updatedSeries,function(h){h[yi]&&(h[yi]=!1)})}for(var s=e.getSeries(),l=n.oldSeries=[],u=n.oldDataGroupIds=[],v=n.oldData=[],c=0;c<s.length;c++){var f=s[c].getData();f.count()<ud&&(l.push(s[c]),u.push(s[c].get("dataGroupId")),v.push(f))}})}it([Fy]);it([jm]);it([Hy,Wy,s0,h0,A0,l1,N1,SS,FS,ZS,rx,Kx,bb,Eb,Xb,Jb,l_,d_,C_,E_,H_,Tw]);it(Uy);it(jw);it(Dh);it(vA);it(fp);it(pA);it(wA);it(rT);it($y);it(xs);it(ST);it(_T);it(ET);it(OT);it($T);it(jT);it(Yy);it(Zy);it(Xy);it(qy);it(y2);it(rd);it(ad);it(_2);it(V2);it(G2);it(cC);it(ym);const fC={class:"dashboard"},hC={class:"status-bar"},pC={class:"status-left"},dC={class:"status-stat"},gC={class:"status-stat-value mg-num"},yC={class:"status-stat-total"},mC={class:"status-stat"},SC={class:"status-stat"},xC={class:"status-stat-value mg-num"},bC={class:"status-right"},_C={class:"status-stat"},wC={class:"status-stat-label"},AC={class:"status-stat-value mg-num"},TC={class:"hero-banner"},CC={class:"hero-left"},DC={class:"quick-grid"},LC=["title","onClick"],IC={class:"quick-icon"},MC={class:"quick-label"},PC={class:"hero-right","aria-hidden":"true"},EC={class:"hero-scene",viewBox:"0 0 520 320",xmlns:"http://www.w3.org/2000/svg"},RC={class:"shelves"},kC=["x"],VC=["x"],NC=["x"],zC=["x"],GC=["x"],OC={class:"bento-grid"},BC={class:"kpi-body"},FC={class:"kpi-row1"},HC={class:"kpi-label"},WC={class:"kpi-row2"},UC={class:"kpi-value mg-num"},$C={class:"kpi-trend-arrow"},YC={class:"kpi-trend-text mg-num"},ZC={class:"kpi-spark",viewBox:"0 0 100 32",preserveAspectRatio:"none","aria-hidden":"true"},XC=["id"],qC=["stop-color"],KC=["stop-color"],jC=["d","fill"],JC=["d","stroke"],QC={class:"card-head"},tD={class:"card-title"},eD={class:"card-head"},rD={class:"card-title"},aD={class:"card-tip mg-num"},nD={key:0,class:"mock-tag"},iD={class:"agv-row"},oD={class:"agv-chart-wrap"},sD={class:"agv-center"},lD={class:"agv-center-value mg-num"},uD={class:"agv-legend"},vD={class:"legend-name"},cD={class:"legend-value mg-num"},fD={class:"legend-pct mg-num"},hD={class:"card-head"},pD={class:"card-title"},dD={class:"card-tip mg-num"},gD={class:"ratio-track",role:"img","aria-label":"任务占比堆叠条"},yD=["title"],mD={key:0,class:"ratio-seg-pct mg-num"},SD={class:"ratio-legend"},xD={class:"legend-name"},bD={class:"legend-value mg-num"},_D={class:"card-head"},wD={class:"card-title"},AD={class:"tab-label"},TD={key:0,class:"empty-pane"},CD={key:1,class:"todo-list"},DD={class:"todo-text"},LD={class:"todo-time"},ID=cd({__name:"DashboardView",setup(a){const e=gd(),t=me([]),r=me([]),n=me([]),i=me([]),o=me(),s=me(),l=me("alarm");function u(O,G){return typeof window>"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<G;vt++)Y+=Math.sin((vt+O)*.55)*6+vt*O%5-2,Y=Math.max(8,Math.min(96,Y)),J.push(Y);const W=100,Q=32,et=W/(G-1),B=J.map((vt,ft)=>`${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=>`<span style="color:${vt.color}">●</span> ${vt.seriesName}: <b>${vt.value[1]}</b>`).join("<br/>")+`<br/><span style="color:${J};font-size:11px">${ct}</span>`}},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('<defs data-v-1b654847><linearGradient id="floorGrad" x1="0" y1="0" x2="0" y2="1" data-v-1b654847><stop offset="0%" stop-color="#3b1e7a" stop-opacity="0.6" data-v-1b654847></stop><stop offset="100%" stop-color="#0e0a24" stop-opacity="0.95" data-v-1b654847></stop></linearGradient><linearGradient id="boxGrad" x1="0" y1="0" x2="1" y2="1" data-v-1b654847><stop offset="0%" stop-color="#c4b5fd" data-v-1b654847></stop><stop offset="100%" stop-color="#7c3aed" data-v-1b654847></stop></linearGradient><linearGradient id="boxGrad2" x1="0" y1="0" x2="1" y2="1" data-v-1b654847><stop offset="0%" stop-color="#a78bfa" data-v-1b654847></stop><stop offset="100%" stop-color="#5b21b6" data-v-1b654847></stop></linearGradient><linearGradient id="agvGrad" x1="0" y1="0" x2="1" y2="0" data-v-1b654847><stop offset="0%" stop-color="#8b5cf6" data-v-1b654847></stop><stop offset="100%" stop-color="#4c1d95" data-v-1b654847></stop></linearGradient><radialGradient id="lightGrad" cx="50%" cy="40%" r="60%" data-v-1b654847><stop offset="0%" stop-color="rgba(196,181,253,0.9)" data-v-1b654847></stop><stop offset="60%" stop-color="rgba(124,58,237,0.25)" data-v-1b654847></stop><stop offset="100%" stop-color="rgba(124,58,237,0)" data-v-1b654847></stop></radialGradient><pattern id="gridPat" width="32" height="20" patternUnits="userSpaceOnUse" patternTransform="skewX(-30)" data-v-1b654847><path d="M0 0H32M0 20H32" stroke="rgba(196,181,253,0.18)" stroke-width="1" data-v-1b654847></path><path d="M0 0V20M32 0V20" stroke="rgba(196,181,253,0.10)" stroke-width="1" data-v-1b654847></path></pattern></defs><ellipse cx="260" cy="120" rx="220" ry="120" fill="url(#lightGrad)" opacity="0.85" data-v-1b654847></ellipse><path d="M40 280 L480 280 L420 200 L100 200 Z" fill="url(#floorGrad)" data-v-1b654847></path><path d="M40 280 L480 280 L420 200 L100 200 Z" fill="url(#gridPat)" opacity="0.85" data-v-1b654847></path>',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('<g data-v-1b654847><rect x="60" y="226" width="180" height="14" rx="2" fill="#1a1040" stroke="rgba(196,181,253,0.4)" data-v-1b654847></rect><line x1="60" y1="232" x2="240" y2="232" stroke="rgba(196,181,253,0.35)" stroke-dasharray="6 4" data-v-1b654847></line></g><g class="agv agv-1" data-v-1b654847><rect x="100" y="240" width="56" height="22" rx="4" fill="url(#agvGrad)" stroke="rgba(196,181,253,0.55)" data-v-1b654847></rect><rect x="106" y="234" width="44" height="10" rx="2" fill="rgba(196,181,253,0.85)" data-v-1b654847></rect><circle cx="112" cy="266" r="5" fill="#1a1040" stroke="#c4b5fd" data-v-1b654847></circle><circle cx="148" cy="266" r="5" fill="#1a1040" stroke="#c4b5fd" data-v-1b654847></circle><circle cx="128" cy="232" r="3" fill="#fff" data-v-1b654847><animate attributeName="opacity" values="0.4;1;0.4" dur="1.8s" repeatCount="indefinite" data-v-1b654847></animate></circle></g><g class="agv agv-2" data-v-1b654847><rect x="320" y="248" width="64" height="24" rx="4" fill="url(#agvGrad)" stroke="rgba(196,181,253,0.55)" data-v-1b654847></rect><rect x="328" y="240" width="48" height="12" rx="2" fill="rgba(196,181,253,0.85)" data-v-1b654847></rect><circle cx="332" cy="276" r="5" fill="#1a1040" stroke="#c4b5fd" data-v-1b654847></circle><circle cx="372" cy="276" r="5" fill="#1a1040" stroke="#c4b5fd" data-v-1b654847></circle><circle cx="352" cy="238" r="3" fill="#fff" data-v-1b654847><animate attributeName="opacity" values="0.4;1;0.4" dur="2.2s" repeatCount="indefinite" data-v-1b654847></animate></circle></g><g data-v-1b654847><rect x="270" y="232" width="22" height="22" fill="url(#boxGrad)" rx="2" data-v-1b654847></rect><rect x="270" y="210" width="22" height="22" fill="url(#boxGrad)" rx="2" data-v-1b654847></rect><rect x="246" y="232" width="22" height="22" fill="url(#boxGrad2)" rx="2" data-v-1b654847></rect></g><g data-v-1b654847><rect x="420" y="120" width="36" height="120" fill="#1a1040" stroke="rgba(196,181,253,0.55)" data-v-1b654847></rect><rect x="420" y="120" width="36" height="14" fill="rgba(196,181,253,0.45)" data-v-1b654847></rect><rect x="424" y="138" width="28" height="6" fill="rgba(196,181,253,0.20)" data-v-1b654847></rect><rect x="424" y="152" width="28" height="6" fill="rgba(196,181,253,0.20)" data-v-1b654847></rect><rect x="424" y="166" width="28" height="6" fill="rgba(196,181,253,0.20)" data-v-1b654847></rect><rect x="424" y="180" width="28" height="6" fill="rgba(196,181,253,0.20)" data-v-1b654847></rect><rect x="424" y="194" width="28" height="6" fill="rgba(196,181,253,0.20)" data-v-1b654847></rect><rect x="424" y="208" width="28" height="6" fill="rgba(196,181,253,0.20)" data-v-1b654847></rect><circle cx="438" cy="115" r="3" fill="#fff" data-v-1b654847><animate attributeName="opacity" values="0.3;1;0.3" dur="1.5s" repeatCount="indefinite" data-v-1b654847></animate></circle></g><g class="float-data" transform="translate(360,110)" data-v-1b654847><rect x="-30" y="-16" width="80" height="22" rx="11" fill="rgba(255,255,255,0.10)" stroke="rgba(196,181,253,0.55)" data-v-1b654847></rect><circle cx="-18" cy="-5" r="3" fill="#22c55e" data-v-1b654847></circle><text x="-10" y="-1" font-size="10" fill="#fff" font-family="monospace" data-v-1b654847>AGV-021 · 92%</text></g><g class="float-data" transform="translate(140,80)" data-v-1b654847><rect x="-30" y="-16" width="92" height="22" rx="11" fill="rgba(255,255,255,0.10)" stroke="rgba(196,181,253,0.55)" data-v-1b654847></rect><circle cx="-18" cy="-5" r="3" fill="#a855f7" data-v-1b654847></circle><text x="-10" y="-1" font-size="10" fill="#fff" font-family="monospace" data-v-1b654847>SHELF-A03 · OK</text></g>',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};